pax_global_header00006660000000000000000000000064132040157420014510gustar00rootroot0000000000000052 comment=6d2c30daf3b29b84b15b547ef956e165f5e9685d neovim-0.2.2/000077500000000000000000000000001320401574200130065ustar00rootroot00000000000000neovim-0.2.2/.editorconfig000066400000000000000000000003301320401574200154570ustar00rootroot00000000000000root = true [*] indent_style = space indent_size = 2 end_of_line = lf insert_final_newline = true charset = utf_8 [runtime/doc/*.txt] indent_style = tab indent_size = 8 [Makefile] indent_style = tab tab_width = 4 neovim-0.2.2/.gitignore000066400000000000000000000014561320401574200150040ustar00rootroot00000000000000# Build/deps dir /build/ /cmake-build-debug/ /dist/ /.deps/ /tmp/ *.mo .*.sw? *~ *.pyc *.o *.so tags /src/nvim/po/vim.pot /src/nvim/po/*.ck # generated by tests with $NVIM_LOG_FILE set. /.nvimlog # Files generated by scripts/vim-patch.sh /.vim-src/ # Files generated by the tests /src/nvim/testdir/del /src/nvim/testdir/test*.out /src/nvim/testdir/test*.res /src/nvim/testdir/test.log /src/nvim/testdir/messages /src/nvim/testdir/viminfo /src/nvim/testdir/test.ok /src/nvim/testdir/*.failed /src/nvim/testdir/X* /src/nvim/testdir/valgrind.* /src/nvim/testdir/.gdbinit # Folder generated by the unit tests /test/includes/post/ # generated by luacheck during `make testlint' /test/.luacheckcache # local make targets local.mk # runtime/doc /runtime/doc/*.html /runtime/doc/tags.ref /runtime/doc/errors.log neovim-0.2.2/.travis.yml000066400000000000000000000103411320401574200151160ustar00rootroot00000000000000dist: trusty sudo: false language: c env: global: # To force rebuilding of third-party dependencies, set this to 'true'. - BUILD_NVIM_DEPS=false # Travis has 1.5 virtual cores according to # http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM - MAKE_CMD="make -j2" # Update PATH for pip. - PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:/usr/lib/llvm-symbolizer-4.0/bin:$PATH" # Build directory for Neovim. - BUILD_DIR="$TRAVIS_BUILD_DIR/build" # Build directory for third-party dependencies. - DEPS_BUILD_DIR="$HOME/nvim-deps" # Directory where third-party dependency sources are downloaded to. - DEPS_DOWNLOAD_DIR="$TRAVIS_BUILD_DIR/deps-downloads" # Install directory for Neovim. - INSTALL_PREFIX="$HOME/nvim-install" # Log directory for Clang sanitizers and Valgrind. - LOG_DIR="$BUILD_DIR/log" # Nvim log file. - NVIM_LOG_FILE="$BUILD_DIR/.nvimlog" # Default CMake flags. - CMAKE_FLAGS="-DTRAVIS_CI_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -DBUSTED_OUTPUT_TYPE=nvim -DDEPS_PREFIX=$DEPS_BUILD_DIR/usr -DMIN_LOG_LEVEL=3" - DEPS_CMAKE_FLAGS="-DDEPS_DOWNLOAD_DIR:PATH=$DEPS_DOWNLOAD_DIR" # Additional CMake flags for 32-bit builds. - CMAKE_FLAGS_32BIT="-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32 -DCMAKE_IGNORE_PATH=/lib:/usr/lib:/usr/local/lib -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake" # Environment variables for Clang sanitizers. - ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan" - TSAN_OPTIONS="log_path=$LOG_DIR/tsan" - UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan" # Environment variables for Valgrind. - VALGRIND_LOG="$LOG_DIR/valgrind-%p.log" # Cache marker for third-party dependencies cache. # If this file exists, we know that the cache contains compiled # dependencies and we can use it. - CACHE_MARKER="$HOME/.cache/nvim-deps/.travis_cache_marker" # default target name for functional tests - FUNCTIONALTEST=functionaltest - CI_TARGET=tests jobs: include: - stage: sanitizers os: linux compiler: clang-4.0 env: > CLANG_SANITIZER=ASAN_UBSAN CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON" - stage: normal builds os: linux compiler: gcc-5 env: FUNCTIONALTEST=functionaltest-lua - os: linux # Travis creates a cache per compiler. # Set a different value here to store 32-bit # dependencies in a separate cache. compiler: gcc-5 -m32 env: BUILD_32BIT=ON - os: osx compiler: clang osx_image: xcode7.3 # macOS 10.11 - os: osx compiler: gcc-4.9 osx_image: xcode7.3 # macOS 10.11 - stage: lint os: linux env: CI_TARGET=lint - stage: Flaky builds os: linux compiler: gcc-5 env: GCOV=gcov-5 CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON" - os: linux compiler: clang-4.0 env: CLANG_SANITIZER=TSAN allow_failures: - env: GCOV=gcov-5 CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON" - env: CLANG_SANITIZER=TSAN fast_finish: true before_install: ci/before_install.sh install: ci/install.sh before_script: ci/before_script.sh script: ci/script.sh before_cache: ci/before_cache.sh after_success: ci/after_success.sh addons: apt: sources: - ubuntu-toolchain-r-test - llvm-toolchain-trusty-4.0 packages: - autoconf - automake - apport - build-essential - clang-4.0 - cmake - cscope - g++-5-multilib - g++-multilib - gcc-5-multilib - gcc-multilib - gdb - language-pack-tr - libc6-dev-i386 - libtool - llvm-4.0-dev - locales - pkg-config - unzip - valgrind - xclip branches: except: - nightly cache: apt: true directories: - "$HOME/.cache/pip" - "$HOME/.cache/nvim-deps" notifications: webhooks: urls: - https://webhooks.gitter.im/e/b5c38c99f9677aa3d031 neovim-0.2.2/BACKERS.md000066400000000000000000000351111320401574200144030ustar00rootroot00000000000000# Bountysource Backers Thank you to everyone who backed our [Bountysource fundraiser](https://www.bountysource.com/teams/neovim/fundraiser)! ### Your name and URL in BACKERS.md. - [Bob Breznak](http://brez.io) - [Tim Uruski](http://timuruski.net) - @mikker (http://brnbw.com) - Aaron J. [@metaxis](http://twitter.com/metaxis) Peterson - Adam George http://www.adamgeorge.com - Adam Lindberg (http://alind.io) - Adam McLain http://twitter.com/adammclain - Adam Piper http://ahri.net - Adrian Philipp http://adrian-philipp.com - Alexander Quine - Alexandru Dabija - Alexis Hildebrandt http://surryhill.net - Andrew M. Farrell http://amfarrell.com - Anton Beloglazov http://beloglazov.info/ - Arthur Axel fREW Schmidt - https://blog.afoolishmanifesto.com - Ben Thouret http://benjamin.thouret.com - Benedikt Böhm http://bb.xnull.de - bfredl, http://bfredl.github.io - Brandon Smith, http://reardencode.com - Brandon Wang, http://brandonwang.me - Brennen Bearnes http://p1k3.com - Brock Wilcox (awwaiid) http://thelackthereof.org/ - Cameron Eagans http://cweagans.net - Carl Myers http://cmyers.org/ - Carlos Alves http://www.carlosalves.info - Chris Chernesky, http://www.tinderglow.com - Chris Hartjes - Christoffer Holmstedt (http://www.christofferholmstedt.se) - Ciaran Downey - Craig Bane http://standardizedways.co.uk - Dane Summers http://pinedesk.biz - Daniel Collin https://twitter.com/daniel_collin - Daniel Rogers http://remotecodelist.com - Darshan Sawardekar http://pressing-matters.io - David Gabriel http://wiki.dest-unreachable.net - Deepak Kumar www.kreatio.com - Derek Rodger http://devslant.com - ebene fünf GmbH www.ebenefuenf.de - Ehtesh Choudhury - Emil Hernvall http://emilhernvall.github.io/ - Eric Siegel https://github.com/esiegel - Ethan Schoonover http://ethanschoonover.com - FFunction http://ffctn.com - Frank http://duckpun.ch - Gabriele Lana http://github.com/gabrielelana - Gavin Rogers http://praxeology.co.uk - Geoff Greer https://floobits.com/ - Glenn Strauss https://github.com/gstrauss/ - Gustav Buchholtz http://grod.se - Henri Bourcereau http://bourcereau.fr - http://jaredforsyth.com - http://www.1bsyl.com - Johann Dahm (http://johanndahm.com) - Ian Farmer http://farmernet.net - iauns - http://www.noobtube.com - Jacob Jewell www.immersiveapplications.com - James A. Overton http://james.overton.ca - James Tomasino - http://jamestomasino.com - Jamiel Almeida http://slashfoo.com - Jan Christoph Ebersbach http://www.e-jc.de/ - Jason Peacock http://jasonpeacock.com - Jason Weathered http://jasoncodes.com/ - Javier Maestro - Jeff Craig http://blog.foxxtrot.net/ - Jeremy Huffman http://jeremyhuffman.com - Jeremy Morrell http://rathercurio.us - Jesper Kjeldgaard (thejspr) - http://thejspr.com - Jim Hester (http://jimhester.com) - Joe Moon http://joe.xoxomoon.com - Johan Simonsson, http://fun-tech.se - John P. Kiffmeyer (http://jpk.is) - John Szakmeister http://www.szakmeister.net/ - John W. Long http://wiseheartdesign.com Twitter: @johnwlong GitHub: @jlong - Jon Yurek http://thoughtbot.com - jonaias http://jonaias.info - Josh Davis, http://joshldavis.com - Joshua Levesque (www.jandyco.com) - Justin M. Keyes https://github.com/justinmk - Justin Russell http://jrussell.me - kbussell - Kevin Sjöberg, http://kevinsjoberg.com - Kevin Sumner http://kevinsumner.com - Kevin Wu http://kevinformatics.com - Ley Missailidis, http://polymet.is - Loa https://github.com/loa - Lowe Schmidt http://loweschmidt.se - Marcello Barnaba http://sindro.me/ - Marcin Kulik - http://ku1ik.com - Marius Rieder http://www.durchmesser.ch/ - Mark Allen [@bytemeorg](http://twitter.com/bytemeorg) - Mark Percival http://markpercival.us - Mark Sprevak - Martin Ansdell-Smith https://ansdell.net/ - Martin Kopischke http://martin.kopischke.net - masukomi http://masukomi.org - Matt Greer -- http://mattgreer.org - MetaCosm | #Vim on Freenode - Michael Ulm www.mulm.at - Mikael Jansson http://mikaelj.se - Mikkel Høgh http://mikkel.hoegh.org/ - Ming Liu http://ming.codes - Holger Peters http://www.holger-peters.de - Alexander Myshov http://myshov.com/ - Darren Cheng http://sanguinerane.com/ - Felix Rath www.0fx.eu - Hong Xu http://www.topbug.net - Slava Kim https://www.meteor.com - Nate Soares (So8res) http://so8r.es - neektza http://pltconfusion.com - Niclas Nilsson, http://niclasnilsson.se - Nikolay Bachiyski http://extrapolate.me/ - Nikush Patel http://nikush.co.uk - Norman Köhring https://koehr.in - Osamu Komagata - Øystein E. Krog https://github.com/oysteinkrog - Pablo Brasero Moreno http://pablobm.com - Peter Souter http://www.petersouter.co.uk - Phil Levchenko (http://philslair.com) - Pierre Douyon https://github.com/pgdouyon - Prateek Rungta - Przemysław Pietrzkiewicz, http://ppi.sh - Rasmus Mattsson http://zzm.se - Reed Esau https://github.com/reedes - Richard Harding https://bmark.us - Rob Warner http://grailbox.com - Runar Balstad Jensen, http://stdout.no/ - Ryan Paul http://seg.phault.net - Saad Malik - https://github.com/saamalik - Saggi Malachi - http://sagg.im - Scott Wessels (http://www.usgn.net) - Sean DuBois (Sean-Der) http://siobud.com - Sebastian Vetter (http://www.roadside-developer.com) - Simen Endsjø, http://simendsjo.me - Stanley Chan (Happy-Dude) - Stefan Penner - Steve Vermeulen https://github.com/svermeulen - Steven Myint (https://github.com/myint) - Tae Sandoval Murgan - The Kompanee http://thekompanee.com - Thomas Cannon - Tim Oxley http://campjs.com/ - Timo Schmiade - Timothy Dahlin - Tiziano Santoro - Toban Wiebe http://tobanwiebe.com - Tobias Sjösten http://vvv.tobiassjosten.net/ - Tom Cammann http://github.com/takac - Val Markovic http://val.markovic.io/ - Víðir Valberg Guðmundsson http://rabotnik.coop - Weiyi Lou http://parlseygardens.net - Wesley Moore http://wezm.net/ - Woody Peterson, http://www.bitsofsignal.com - Zach Kelling, http://zeekay.io ### Your name in BACKERS.md. - @a13xb - @d1eg0 - @derkha - @georgebashi - @tmcw - @xpayn - Adam Baxter (voltagex) - Adam Miller (maxamillion) - Adam Sunderland/iterion - Adon Metcalfe (adonm) - Adrian Duyzer - Aidan Stein - ak47 - Aketzu - Alessandro Gangemi - Alessandro Pagnin - Alessandro Proscia - Alex Genco (alexgenco) - Alex Heeton - Alex Roper - Alex Soto (apsoto@gmail.com) - Alexander Flatter - Alexander Jeurissen - Alexander Shabalin - Alexander Woerndle - Alexandru Keszeg - Allan Hudgins - Ami Chayun - Amit Beka - Anders Fuzz - Andre Azzolini - Andre da Palma - André Santos/andrefs - Andrea Michi - Andreas Heider - Andreas Lappe - andrej ocenas / aocenas - Andrew Arminio @5thWall - Andrew DeMaria ~ muff1nman - Andrew Fallows - Andrew Fecheyr (@andruby) - Andrew Hartford - Andrey Tarantsov - Andrey Yurovsky - Andy Dirnberger - Andy Gayton - Andy Lindeman - Andy Webster - AngelLeliel - Anton Egorov / satyrius - Anton Shemerey - Arnaud Bétrémieux - Arne Ehrlich - Arseny Zarechnev - Arvind Deshpande - Astro Jetson Jr - Attila Maczak - Avétis KAZARIAN (avetisk) - BarryKay - bbinet - BenBergman - Bengt Lüers - Benjamin Bryant - Bèr 'berkes' Kessels - Bernd Homuth - Bheesham Persaud - Bilal Quadri - Bjorn Tipling - Bojan Zivanovic - Boris Searles - Braden Bruington - Brandon Liu/thenovices - Brandon Mathis - @imathis - Brett Ritter - Brian Shaver (shakerlxxv) - Bryan Grohman - Bryn Edwards - Calin Iorgulescu - calind - Cameron Wood / cewood - Chris Lopes - Chris Lord - Chris Porter - Chris Sims (@jcsims) - Christian Anton / fibbs - Christian Delahousse cdelahousse - Christian Lange - Christian Wellenbrock - Christophe Badoit - Christopher Lübbemeier - Christopher Mullins - Chungha Kim - ckromero - Claas-Thido Pfaff - Claes Mogren - Clayton Drazner - claytron - Colin Cooper - corytheboyd - Cristián Alberto Arenas Ulloa / NiñoScript - Cyril LEPAGNOT/cyrill62 - D3 Designs - DAddYE (github: DAddYE) - Dan Webb - Daniel C. Henning / danielsdesk - Daniel Egeberg - Daniel Egger - Daniel Hodan/czertbytes - Daniel Latzer - Daniel Riti - Daniel Weisser - Daniele Polencic - Dave Dixon - David Collie - David Galeano - David Newell - David Rappo, Bountysource.com - David Rasch - David Stensland - terite - Davit Samvelyan - Dean Morin - deffi420 - defrex - Deraen - Dewdrops - Dick Seabrook - Dominik Ritter - Don Browne - Donald Walker - Donna Martz - dpc - dperson - dvidsilva - Edan Maor - Eddy Garcia - Edward Ash/cazador481 - Elias Tandel Barrionovo - Elijah Mirecki - Elliot Winkler (github: mcmire) - Enric Lluelles - Eric Fode - Erik Goldman - Erik Johnson Github: terminalmage Twitter: @terminalmage - Erik Nordlund - Ethan Erchinger/erchn - Evan Tatarka - Ewoud van Raamsdonk - fd0 - Federico Galassi - Félix Archambault - Ferdinand Salis-Samaden - Florian Bartels - Florian Sachs - foca - forbesmyester - Frédéric de Villamil - Fredrik Rambris - Dapeng Li (luislee818) - Janko Marohnić (janko-m) - Jun Wu - Maurice van der Pot (Griffon26) - Ory Band (oryband) - Garrett Dawson - Gaveen Prabhasara - George Nikolopoulos - github username "alandyer" - Giuseppe Rota - gkalas - Gökhan Kocak - goodgravy - Göran Gustafsson (GLEG) - Graham Jans - Greg Marcil - Gregory Byrd/GByrd - Gustavo Barron / Cicloid - Gyuri Horák - Harald Hvaal - Harm Aarts - Harry Glaser - Håvard Grimelid - hencjo - Henning Hasemann - Henry "Ingvij" Kupty - henry4k - Heryandi - Hontvári József Levente - IKEDA, Yoshifumi - Ilia Choly - iliis - Ilya Katz - Indrek Juhkam / indrekj - irwand - Islam Sharabash / ibash - Ivar Vasara - Jack Stouffer - Jacqueline Leykam - Jakob Landbo - James Herdman - James Magness - James Murty / jmurty - James Nguyen - James Orr - James Pickard - James Seward - Jamie Hillman - Jan Larres - Jan Weitz - Janko Luin - Jannik Nielsen / bitkid - Jared Tyler Miller - Jason Imison - Jason Long / @jasonlong - Jason Stillwell/dragonfax - Jasu - javaguirre - Jedidiah Hurt - Jeff Schornick - Jen Patrick - Jens Hausherr - Jess Brown / Jess - Jesse Cooke/@jc00ke - Jessica Frazelle/ jfrazelle - Jesus Alvarez - Jez Allan - Jimmie Elvenmark - Jiří Koten - JJ Murre - joe di castro - Joe Malin/633squadron - Joel Meyer - Joey Trapp - Johan Klokkhammer Helsing - John Cant - John K. Paul - John Krueger - John Netherdrake - John Schmidt / schmee - John Whitley/@jwhitley - Jon Anhold - Jon Gosting - Jonas Rollsby - Jonathan Buschmann - Jonathan Gibert - Jonathan Jacobs - Jonathan Kinred - Jorge Gallegos (kad) - Joris Morger - Josemar Luedke - Joshua Brookover - Joshua Travis - Jouko Karvonen - jstemmer - Juan Campa - Juan Hernández Babón / jhbabon - juanolon - Justin Carter Moy - Justin Force - Kamil Slowikowski - Karl Ove Hufthammer - Kazuo Teramoto - Kevin Goslar - Kevin Hamer - Kevin Watters - Kevin Zimmerman / zim44 - kryft - Krzysztof Adamski - Lachlan Brad Easton - Lance Ulmer - Larry Riedel (Larry@Riedel.org) - Lasse Immonen (lasse.immonen@gmail.com) - Léo Unbekandt / Soulou - Leszek Swirski - Levi Brown - lhl - linduxed - Lluis Satorre Gonzalez - lobachevsky - Louis Pilfold - Lucas Stephanou/lucasts - Lucas Werkmeister - Luke Sampson - Luke van der Hoeven / @plukevdh - Maciej Litwiniuk (@mlitwiniuk) - Mads Navntoft Noe - Maik Derstappen / MrTango - Manuel Salvadores - Marcus Huntemann/mapclyps - Marcus Martin/nymaen - Markus Dobler - Mat Moore - Mate Nagy - Mathias Fußenegger - Matt Moretti - Matthew Machuga - Matthew Sunderland - Matthias Bilger - Matthias Lehmann - Maximilian Gerlach - Meryn Stol - Michael 'manveru' Fellinger - Michael "beefsack" Alexander - Michael Iles - Michael Irwin/mdi - Michael Kebe - Michael Lerch - Michael R. Jones - Michael Sanders/msanders - Michael Schall / schallm - Michail Denchev - Michał Bartoszkiewicz - Mickaël FORTUNATO - Miguel Santesmases - Mihir Pendse - Mike Bissett/paran01d - Mike Sergio - Mike Wadsten - mikedillion - Mikkel Oscar Lyderik Larsen - Miles Edland / edlandm - Miles Frain - Mirko Grönroos - Moritz Lotze - Morten Nygaard Åsnes - MrException - Julian Churchill (julianchurchill) - Nakul Dhotre - Corey Farwell (frewsxcv) - Tarrant Rollins (tarrant) - Naseer Ahmed - Nate Jones - Nate Soares (So8res) - Nate Straz - Neil Kirsopp - Nelson Chen/nelsonjchen - Nicholas Firth-McCoy (nfm) - Nick Sloan - Nickolas Means - Nicolai Ruckel - Niko Kivelä - nop - Nuno Frade - Olaf Heinemann - Ole Reifschneider - Oliver Caldwell - Olivier Lechevalier - orangain - orestis - pablasso - Pascal Hartig - Patrick Berkeley - Patrick Bihan-Faou, TeamBox SARL - Patrick Stapfer - Paul R Alexander - Pavel Afanasyev - Pawel Grzech - Paweł Nowak - Pedro Rodriguez T - Per Modin - Peter Edge - Peter Fern - Philipe Farias/philipefarias - Philipp Millar - Piotr Mitoraj - Prithvi Prabhu (prithvi) - Qingping Hou / houqp - Quasar Jarosz - queria - Rachid Zarouali / Xinity - Radek Szymczyszyn - Randy Topliffe / Taar - Ranko Radonić - Raphael Henrique Ribas - Ravi Joseph Pinto - rekab - Renato Zannon - Richard "RichiH" Hartmann - Richard Mihalovič - Richard Sotarsh Clark - Rio Kierkels - rob allen - Rob Bevan - Rob Miller @robmil - Rob O'Dwyer - Rodolfo Borges (aka bart9h) - Rodrigo Souto - Roland Szabo - Romans Malinovskis - Roshan George - Rostepher - runar - Russ Adams / rustushki - Ryan Phillips - Ryan Pierce/ fission1110 - Ryan Schmitt - Ryan Tarpine - Sadik Gokhan Caglar - Sam Stokes - Sanpi - Santiago Suarez Ordoñez - saxman7000 - Scott D'Aquila - Scott Mathson - Sean Copenhaver (@copenhas) - Sean McCleary - Sean M. Collins (sc68cal) - Sean Tegtmeyer - seanbell - Sebastian Geiger - Sergey Alexandrov - Shane Delmore - shawndumas - shazow - Silvan Jegen - Simon Ratner (simonratner) - Song Gao - Stanimir Angelov Mladenov - Stanislav B. - zbstof - Stefan Gojan (hoschi) - Stefan Hoffmann / stefan991 - Stefan Wienert - Steffen Rademacker - Stephen Oney/soney - Steve "ryz" Haßenpflug - Steven Daniel Webb - Steven Sloss - Sven Opitz - Sverre Rabbelier - Szymon Ząbkiewicz - Taichi Nakamura - Takayuki Soga - Teasp00n - Terin Stock - @terinjokes - Thai Pangsakulyanont (dtinth) - Thameera Senanayaka - Theo Belaire - Thomas Ferris Nicolaisen - Thomas Hirsch - Thomas Maffia/Szerated - Thomas Pani - Thomas Thune Hansen - Thorbjørn Lindeijer - Thunder Hu - Thys Meintjes - Tim Anema - Tim Matthews - Timo Kröger - Tolstyak - Tom Panning - Tom Wadley - Tony Kemp - tonyo112 - Tori "TicViking" Hamblin - treppo - Truman Ellis - Tuomas Vähänen - Tyler Briles/MrBri - Tyler Brock - Tyler Mandry - Ulf Fischer/ulf - Vangelis Tsoumenis - Vítězslav Homolka - Vladimir Chernis - Vojtech Jasny - vvakame - Vytis Valentinavičius - Wade Berrier - warrenv - whateverhuis - Will Binns-Smith - Xavier Antoviaque (xavier@antoviaque.org) - xsb - Yann Villessuzanne - yko - Youta Harada(cohalz) - Yrjö Peussa - Yusuke Kanda(@uskanda) - Yuval Langer - zerowidth - Ziling Zhao - Zsolt Botykai ### Anonymous Supporters There were also 307 other people who didn't claim any level of reward but contributed to the fundraiser. Thank you all for the support! neovim-0.2.2/BSDmakefile000066400000000000000000000001731320401574200150400ustar00rootroot00000000000000.DONE: @echo "Please use GNU Make (gmake) to build neovim" .DEFAULT: @echo "Please use GNU Make (gmake) to build neovim" neovim-0.2.2/CMakeLists.txt000066400000000000000000000531221320401574200155510ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8.7) project(nvim) if(POLICY CMP0059) cmake_policy(SET CMP0059 OLD) # Needed until cmake 2.8.12. #4389 endif() # Point CMake at any custom modules we may ship list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") # We don't support building in-tree. include(PreventInTreeBuilds) # Prefer our bundled versions of dependencies. set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies") if(CMAKE_CROSSCOMPILING AND NOT UNIX) list(INSERT CMAKE_FIND_ROOT_PATH 0 ${DEPS_PREFIX}) list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}/../host/bin) else() list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}) set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig") endif() # used for check_c_compiler_flag include(CheckCCompilerFlag) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") # CMake tries to treat /sw and /opt/local as extension of the system path, but # that doesn't really work out very well. Once you have a dependency that # resides there and have to add it as an include directory, then any other # dependency that could be satisfied from there must be--otherwise you can end # up with conflicting versions. So, let's make them more of a priority having # them be included as one of the first places to look for dependencies. list(APPEND CMAKE_PREFIX_PATH /sw /opt/local) # Work around some old, broken detection by CMake for knowing when to use the # isystem flag. Apple's compilers have supported this for quite some time # now. if(CMAKE_COMPILER_IS_GNUCC) set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ") endif() if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ") endif() endif() if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Darwin") # Enable fixing case-insensitive filenames for Windows and Mac. set(USE_FNAME_CASE TRUE) endif() # Set default build type. if(NOT CMAKE_BUILD_TYPE) message(STATUS "CMAKE_BUILD_TYPE not given, defaulting to 'Debug'.") set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE) endif() # Set available build types for CMake GUIs. # A different build type can still be set by -DCMAKE_BUILD_TYPE=... set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") # If not in a git repo (e.g., a tarball) these tokens define the complete # version string, else they are combined with the result of `git describe`. set(NVIM_VERSION_MAJOR 0) set(NVIM_VERSION_MINOR 2) set(NVIM_VERSION_PATCH 2) set(NVIM_VERSION_PRERELEASE "") # for package maintainers # API level set(NVIM_API_LEVEL 3) # Bump this after any API change. set(NVIM_API_LEVEL_COMPAT 0) # Adjust this after a _breaking_ API change. set(NVIM_API_PRERELEASE false) file(TO_CMAKE_PATH ${CMAKE_CURRENT_LIST_DIR}/.git FORCED_GIT_DIR) include(GetGitRevisionDescription) get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT) if(NVIM_VERSION_COMMIT) # is a git repo git_describe(NVIM_VERSION_MEDIUM) # `git describe` annotates the most recent tagged release; for pre-release # builds we must replace that with the unreleased version. string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+" "v${NVIM_VERSION_MAJOR}.${NVIM_VERSION_MINOR}.${NVIM_VERSION_PATCH}" NVIM_VERSION_MEDIUM ${NVIM_VERSION_MEDIUM}) endif() set(NVIM_VERSION_BUILD_TYPE "${CMAKE_BUILD_TYPE}") # NVIM_VERSION_CFLAGS set further below. set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Default to -O2 on release builds. if(CMAKE_C_FLAGS_RELEASE MATCHES "-O3") message(STATUS "Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2.") string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") endif() # Minimize logging for release-type builds. if(NOT CMAKE_C_FLAGS_RELEASE MATCHES DMIN_LOG_LEVEL) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DMIN_LOG_LEVEL=3") endif() if(NOT CMAKE_C_FLAGS_MINSIZEREL MATCHES DMIN_LOG_LEVEL) set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DMIN_LOG_LEVEL=3") endif() if(NOT CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DMIN_LOG_LEVEL) set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DMIN_LOG_LEVEL=3") endif() if(CMAKE_COMPILER_IS_GNUCC) check_c_compiler_flag(-Og HAS_OG_FLAG) else() set(HAS_OG_FLAG 0) endif() # # Build-type: RelWithDebInfo # if(HAS_OG_FLAG) set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -Og -g") endif() # We _want_ assertions in RelWithDebInfo build-type. if(CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DNDEBUG) string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") endif() # Enable -Wconversion. if(NOT MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion") endif() # gcc 4.0+ sets _FORTIFY_SOURCE=2 automatically. This currently # does not work with Neovim due to some uses of dynamically-sized structures. # https://github.com/neovim/neovim/issues/223 include(CheckCSourceCompiles) # Include the build type's default flags in the check for _FORTIFY_SOURCE, # otherwise we may incorrectly identify the level as acceptable and find out # later that it was not when optimizations were enabled. CFLAGS is applied # even though you don't see it in CMAKE_REQUIRED_FLAGS. set(INIT_FLAGS_NAME CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}) string(TOUPPER ${INIT_FLAGS_NAME} INIT_FLAGS_NAME) if(${INIT_FLAGS_NAME}) set(CMAKE_REQUIRED_FLAGS "${${INIT_FLAGS_NAME}}") endif() # Include because some toolchains define _FORTIFY_SOURCE=2 in # internal header files, which should in turn be #included by . check_c_source_compiles(" #include #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 1 #error \"_FORTIFY_SOURCE > 1\" #endif int main(void) { return 0; } " HAS_ACCEPTABLE_FORTIFY) if(NOT HAS_ACCEPTABLE_FORTIFY) message(STATUS "Unsupported _FORTIFY_SOURCE found, forcing _FORTIFY_SOURCE=1.") # Extract possible prefix to _FORTIFY_SOURCE (e.g. -Wp,-D_FORTIFY_SOURCE). STRING(REGEX MATCH "[^\ ]+-D_FORTIFY_SOURCE" _FORTIFY_SOURCE_PREFIX "${CMAKE_C_FLAGS}") STRING(REPLACE "-D_FORTIFY_SOURCE" "" _FORTIFY_SOURCE_PREFIX "${_FORTIFY_SOURCE_PREFIX}" ) if(NOT _FORTIFY_SOURCE_PREFIX STREQUAL "") message(STATUS "Detected _FORTIFY_SOURCE Prefix=${_FORTIFY_SOURCE_PREFIX}.") endif() # -U in add_definitions doesn't end up in the correct spot, so we add it to # the flags variable instead. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FORTIFY_SOURCE_PREFIX}-U_FORTIFY_SOURCE ${_FORTIFY_SOURCE_PREFIX}-D_FORTIFY_SOURCE=1") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_FORTIFY_SOURCE_PREFIX}-U_FORTIFY_SOURCE ${_FORTIFY_SOURCE_PREFIX}-D_FORTIFY_SOURCE=1") endif() # Remove --sort-common from linker flags, as this seems to cause bugs (see #2641, #3374). # TODO: Figure out the root cause. if(CMAKE_EXE_LINKER_FLAGS MATCHES "--sort-common" OR CMAKE_SHARED_LINKER_FLAGS MATCHES "--sort-common" OR CMAKE_MODULE_LINKER_FLAGS MATCHES "--sort-common") message(STATUS "Removing --sort-common from linker flags.") string(REGEX REPLACE ",--sort-common(=[^,]+)?" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") string(REGEX REPLACE ",--sort-common(=[^,]+)?" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") string(REGEX REPLACE ",--sort-common(=[^,]+)?" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}") # If no linker flags remain for a -Wl argument, remove it. # '-Wl$' will match LDFLAGS="-Wl,--sort-common", # '-Wl ' will match LDFLAGS="-Wl,--sort-common -Wl,..." string(REGEX REPLACE "-Wl($| )" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") string(REGEX REPLACE "-Wl($| )" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") string(REGEX REPLACE "-Wl($| )" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}") endif() check_c_source_compiles(" #include int main(void) { void *trace[1]; int trace_size = backtrace(trace, 1); return 0; } " HAVE_EXECINFO_BACKTRACE) if(MSVC) # XXX: /W4 gives too many warnings. #3241 add_definitions(/W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) else() add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99) check_c_compiler_flag(-Wimplicit-fallthrough HAS_WIMPLICIT_FALLTHROUGH_FLAG) if(HAS_WIMPLICIT_FALLTHROUGH_FLAG) add_definitions(-Wimplicit-fallthrough) endif() # On FreeBSD 64 math.h uses unguarded C11 extension, which taints clang # 3.4.1 used there. if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND CMAKE_C_COMPILER_ID MATCHES "Clang") add_definitions(-Wno-c11-extensions) endif() endif() if(MINGW) # Use POSIX compatible stdio in Mingw add_definitions(-D__USE_MINGW_ANSI_STDIO) add_definitions(-D_WIN32_WINNT=0x0600) endif() # OpenBSD's GCC (4.2.1) doesn't have -Wvla check_c_compiler_flag(-Wvla HAS_WVLA_FLAG) if(HAS_WVLA_FLAG) add_definitions(-Wvla) endif() if(UNIX) # -fstack-protector breaks non Unix builds even in Mingw-w64 check_c_compiler_flag(-fstack-protector-strong HAS_FSTACK_PROTECTOR_STRONG_FLAG) check_c_compiler_flag(-fstack-protector HAS_FSTACK_PROTECTOR_FLAG) if(HAS_FSTACK_PROTECTOR_STRONG_FLAG) add_definitions(-fstack-protector-strong) elseif(HAS_FSTACK_PROTECTOR_FLAG) add_definitions(-fstack-protector --param ssp-buffer-size=4) endif() endif() check_c_compiler_flag(-fdiagnostics-color=auto HAS_DIAG_COLOR_FLAG) if(HAS_DIAG_COLOR_FLAG) add_definitions(-fdiagnostics-color=auto) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.5") # Array-bounds testing is broken in some GCC versions before 4.8.5. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273 check_c_compiler_flag(-Wno-array-bounds HAS_NO_ARRAY_BOUNDS_FLAG) if(HAS_NO_ARRAY_BOUNDS_FLAG) add_definitions(-Wno-array-bounds) endif() endif() endif() option(TRAVIS_CI_BUILD "Travis/QuickBuild CI. Extra flags will be set." OFF) if(TRAVIS_CI_BUILD) message(STATUS "Travis/QuickBuild CI build enabled.") add_definitions(-Werror) if(DEFINED ENV{BUILD_32BIT}) # Get some test coverage for unsigned char add_definitions(-funsigned-char) endif() endif() if(CMAKE_BUILD_TYPE MATCHES Debug) set(DEBUG 1) else() set(DEBUG 0) endif() add_definitions(-DINCLUDE_GENERATED_DECLARATIONS) if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "Linux") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") # For O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW flags on older systems # (pre POSIX.1-2008: glibc 2.11 and earlier). #4042 add_definitions(-D_GNU_SOURCE) endif() if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "SunOS") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined -lsocket") endif() if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8) # Required for luajit. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -image_base 100000000") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -image_base 100000000") endif() include_directories("${PROJECT_BINARY_DIR}/config") include_directories("${PROJECT_SOURCE_DIR}/src") find_package(LibUV REQUIRED) include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS}) find_package(Msgpack 1.0.0 REQUIRED) include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS}) # Note: The test lib requires LuaJIT; it will be skipped if LuaJIT is missing. option(PREFER_LUA "Prefer Lua over LuaJIT in the nvim executable." OFF) if(PREFER_LUA) find_package(Lua REQUIRED) set(LUA_PREFERRED_INCLUDE_DIRS ${LUA_INCLUDE_DIR}) set(LUA_PREFERRED_LIBRARIES ${LUA_LIBRARIES}) find_package(LuaJit) else() find_package(LuaJit REQUIRED) set(LUA_PREFERRED_INCLUDE_DIRS ${LUAJIT_INCLUDE_DIRS}) set(LUA_PREFERRED_LIBRARIES ${LUAJIT_LIBRARIES}) endif() list(APPEND CMAKE_REQUIRED_INCLUDES "${MSGPACK_INCLUDE_DIRS}") check_c_source_compiles(" #include int main(void) { return MSGPACK_OBJECT_FLOAT32; } " MSGPACK_HAS_FLOAT32) if(MSGPACK_HAS_FLOAT32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_MSGPACK_HAS_FLOAT32") endif() option(FEAT_TUI "Enable the Terminal UI" ON) if(FEAT_TUI) find_package(Unibilium REQUIRED) include_directories(SYSTEM ${UNIBILIUM_INCLUDE_DIRS}) list(APPEND CMAKE_REQUIRED_INCLUDES "${UNIBILIUM_INCLUDE_DIRS}") list(APPEND CMAKE_REQUIRED_LIBRARIES "${UNIBILIUM_LIBRARIES}") check_c_source_compiles(" #include int main(void) { return unibi_num_from_var(unibi_var_from_num(0)); } " UNIBI_HAS_VAR_FROM) if(UNIBI_HAS_VAR_FROM) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_UNIBI_HAS_VAR_FROM") endif() find_package(LibTermkey REQUIRED) include_directories(SYSTEM ${LIBTERMKEY_INCLUDE_DIRS}) endif() find_package(LibVterm REQUIRED) include_directories(SYSTEM ${LIBVTERM_INCLUDE_DIRS}) if(WIN32) find_package(Winpty REQUIRED) include_directories(SYSTEM ${WINPTY_INCLUDE_DIRS}) endif() option(CLANG_ASAN_UBSAN "Enable Clang address & undefined behavior sanitizer for nvim binary." OFF) option(CLANG_MSAN "Enable Clang memory sanitizer for nvim binary." OFF) option(CLANG_TSAN "Enable Clang thread sanitizer for nvim binary." OFF) if((CLANG_ASAN_UBSAN AND CLANG_MSAN) OR (CLANG_ASAN_UBSAN AND CLANG_TSAN) OR (CLANG_MSAN AND CLANG_TSAN)) message(FATAL_ERROR "Sanitizers cannot be enabled simultaneously.") endif() if((CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) AND NOT CMAKE_C_COMPILER_ID MATCHES "Clang") message(FATAL_ERROR "Sanitizers are only supported for Clang.") endif() if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD|FreeBSD") message(STATUS "detected OpenBSD/FreeBSD; disabled jemalloc. #5318") option(ENABLE_JEMALLOC "enable jemalloc" OFF) else() option(ENABLE_JEMALLOC "enable jemalloc" ON) endif() if (ENABLE_JEMALLOC) if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) message(STATUS "Sanitizers have been enabled; don't use jemalloc.") else() find_package(JeMalloc) if(JEMALLOC_FOUND) include_directories(SYSTEM ${JEMALLOC_INCLUDE_DIRS}) endif() endif() endif() find_package(LibIntl) if(LibIntl_FOUND) include_directories(SYSTEM ${LibIntl_INCLUDE_DIRS}) endif() find_package(Iconv) if(Iconv_FOUND) include_directories(SYSTEM ${Iconv_INCLUDE_DIRS}) endif() # Determine platform's threading library. Set CMAKE_THREAD_PREFER_PTHREAD # explicitly to indicate a strong preference for pthread. set(CMAKE_THREAD_PREFER_PTHREAD ON) find_package(Threads REQUIRED) # Place targets in bin/ or lib/ for all build configurations set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) foreach(CFGNAME ${CMAKE_CONFIGURATION_TYPES}) string(TOUPPER ${CFGNAME} CFGNAME) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib) endforeach() # Find Lua interpreter include(LuaHelpers) set(LUA_DEPENDENCIES lpeg mpack bit) if(NOT LUA_PRG) foreach(CURRENT_LUA_PRG luajit lua5.1 lua5.2 lua) # If LUA_PRG is set find_program() will not search unset(LUA_PRG CACHE) unset(LUA_PRG_WORKS) find_program(LUA_PRG ${CURRENT_LUA_PRG}) if(LUA_PRG) check_lua_deps(${LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS) if(LUA_PRG_WORKS) break() endif() endif() endforeach() else() check_lua_deps(${LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS) endif() if(NOT LUA_PRG_WORKS) message(FATAL_ERROR "A suitable Lua interpreter was not found.") endif() message(STATUS "Using the Lua interpreter ${LUA_PRG}.") # Setup busted. find_program(BUSTED_PRG NAMES busted busted.bat) find_program(BUSTED_LUA_PRG busted-lua) if(NOT BUSTED_OUTPUT_TYPE) set(BUSTED_OUTPUT_TYPE "nvim") endif() find_program(LUACHECK_PRG luacheck) find_program(GPERF_PRG gperf) include(InstallHelpers) file(GLOB MANPAGES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} man/nvim.1) install_helper( FILES ${MANPAGES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) # MIN_LOG_LEVEL for log.h if("${MIN_LOG_LEVEL}" MATCHES "^$") message(STATUS "MIN_LOG_LEVEL not specified") else() if(NOT MIN_LOG_LEVEL MATCHES "^[0-3]$") message(FATAL_ERROR "invalid MIN_LOG_LEVEL: " ${MIN_LOG_LEVEL}) endif() message(STATUS "MIN_LOG_LEVEL set to ${MIN_LOG_LEVEL}") endif() # Go down the tree. add_subdirectory(src/nvim) # Read compilation flags from src/nvim, used in config subdirectory below. include(GetCompileFlags) get_compile_flags(NVIM_VERSION_CFLAGS) add_subdirectory(test/includes) add_subdirectory(config) add_subdirectory(test/functional/fixtures) # compile test programs add_subdirectory(runtime) # Setup some test-related bits. We do this after going down the tree because we # need some of the targets. if(BUSTED_PRG) get_property(TEST_INCLUDE_DIRS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) # Set policy CMP0026 to OLD so we avoid CMake warnings on newer # versions of cmake. if(POLICY CMP0026) cmake_policy(SET CMP0026 OLD) endif() if(CMAKE_GENERATOR MATCHES "Visual Studio") set(TEST_LIBNVIM_PATH ${CMAKE_BINARY_DIR}/lib/nvim-test.dll) else() get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION) endif() # When running tests from 'ninja' we need to use the # console pool: to do so we need to use the USES_TERMINAL # option, but this is only available in CMake 3.2 set(TEST_TARGET_ARGS) if(NOT (${CMAKE_VERSION} VERSION_LESS 3.2.0)) list(APPEND TEST_TARGET_ARGS "USES_TERMINAL") endif() configure_file( test/config/paths.lua.in ${CMAKE_BINARY_DIR}/test/config/paths.lua) set(UNITTEST_PREREQS nvim-test unittest-headers) set(FUNCTIONALTEST_PREREQS nvim printargs-test shell-test) if(NOT WIN32) list(APPEND FUNCTIONALTEST_PREREQS tty-test) endif() set(BENCHMARK_PREREQS nvim tty-test) # Useful for automated build systems, if they want to manually run the tests. add_custom_target(unittest-prereqs DEPENDS ${UNITTEST_PREREQS}) add_custom_target(functionaltest-prereqs DEPENDS ${FUNCTIONALTEST_PREREQS}) add_custom_target(benchmark-prereqs DEPENDS ${BENCHMARK_PREREQS}) check_lua_module(${LUA_PRG} "ffi" LUA_HAS_FFI) if(LUA_HAS_FFI) add_custom_target(unittest COMMAND ${CMAKE_COMMAND} -DBUSTED_PRG=${BUSTED_PRG} -DLUA_PRG=${LUA_PRG} -DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE} -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=unit -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${UNITTEST_PREREQS} ${TEST_TARGET_ARGS}) else() message(WARNING "disabling unit tests: no Luajit FFI in ${LUA_PRG}") endif() add_custom_target(functionaltest COMMAND ${CMAKE_COMMAND} -DBUSTED_PRG=${BUSTED_PRG} -DLUA_PRG=${LUA_PRG} -DNVIM_PRG=$ -DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE} -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=functional -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${FUNCTIONALTEST_PREREQS} ${TEST_TARGET_ARGS}) add_custom_target(benchmark COMMAND ${CMAKE_COMMAND} -DBUSTED_PRG=${BUSTED_PRG} -DLUA_PRG=${LUA_PRG} -DNVIM_PRG=$ -DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE} -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=benchmark -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${BENCHMARK_PREREQS} ${TEST_TARGET_ARGS}) endif() if(BUSTED_LUA_PRG) add_custom_target(functionaltest-lua COMMAND ${CMAKE_COMMAND} -DBUSTED_PRG=${BUSTED_LUA_PRG} -DLUA_PRG=${LUA_PRG} -DNVIM_PRG=$ -DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE} -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=functional -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${FUNCTIONALTEST_PREREQS} ${TEST_TARGET_ARGS}) endif() if(LUACHECK_PRG) add_custom_target(testlint COMMAND ${CMAKE_COMMAND} -DLUACHECK_PRG=${LUACHECK_PRG} -DLUAFILES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DIGNORE_PATTERN="*/preload.lua" -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${PROJECT_SOURCE_DIR}/cmake/RunLuacheck.cmake) add_custom_target( blobcodelint COMMAND ${CMAKE_COMMAND} -DLUACHECK_PRG=${LUACHECK_PRG} -DLUAFILES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/src/nvim/lua -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DREAD_GLOBALS=vim -P ${PROJECT_SOURCE_DIR}/cmake/RunLuacheck.cmake ) # TODO(ZyX-I): Run linter for all lua code in src add_custom_target( lualint DEPENDS blobcodelint ) endif() set(CPACK_PACKAGE_NAME "Neovim") set(CPACK_PACKAGE_VENDOR "neovim.io") set(CPACK_PACKAGE_VERSION ${NVIM_VERSION_MEDIUM}) set(CPACK_PACKAGE_INSTALL_DIRECTORY "Neovim") # Set toplevel directory/installer name as Neovim set(CPACK_PACKAGE_FILE_NAME "Neovim") set(CPACK_TOPLEVEL_TAG "Neovim") set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") set(CPACK_NSIS_MODIFY_PATH ON) set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) include(CPack) neovim-0.2.2/CONTRIBUTING.md000066400000000000000000000176331320401574200152510ustar00rootroot00000000000000# Contributing to Neovim Getting started --------------- If you want to help but don't know where to start, here are some low-risk/isolated tasks: - [Merge a Vim patch]. - Try a [complexity:low] issue. - Fix bugs found by [clang scan-build](#clang-scan-build), [coverity](#coverity), and [PVS](#pvs-studio). Developer guidelines -------------------- - Nvim developers should read `:help dev-help`. - External UI developers should read `:help dev-ui`. Reporting problems ------------------ - Check the [**FAQ**][wiki-faq]. - Search [existing issues][github-issues] (including closed!) - Update Neovim to the latest version to see if your problem persists. - Disable plugins incrementally, to narrow down the cause of the issue. - When reporting a crash, include a stacktrace. - [Bisect][git-bisect] to the cause of a regression, if you are able. This is _extremely_ helpful. - Check `$NVIM_LOG_FILE`, if it exists. - Include `cmake --system-information` for **build** issues. Pull requests ("PRs") --------------------- - To avoid duplicate work, create a `[WIP]` pull request as soon as possible. - Avoid cosmetic changes to unrelated files in the same commit. - Use a [feature branch][git-feature-branch] instead of the master branch. - Use a **rebase workflow** for small PRs. - After addressing review comments, it's fine to rebase and force-push. - Use a **merge workflow** for big, high-risk PRs. - Merge `master` into your PR when there are conflicts or when master introduces breaking changes. - Use the `ri` git alias: ``` [alias] ri = "!sh -c 't=\"${1:-master}\"; s=\"${2:-HEAD}\"; mb=\"$(git merge-base \"$t\" \"$s\")\"; if test \"x$mb\" = x ; then o=\"$t\"; else lm=\"$(git log -n1 --merges \"$t..$s\" --pretty=%H)\"; if test \"x$lm\" = x ; then o=\"$mb\"; else o=\"$lm\"; fi; fi; test $# -gt 0 && shift; test $# -gt 0 && shift; git rebase --interactive \"$o\" \"$@\"'" ``` This avoids unnecessary rebases yet still allows you to combine related commits, separate monolithic commits, etc. - Do not edit commits that come before the merge commit. - During a squash/fixup, use `exec make -C build unittest` between each pick/edit/reword. ### Stages: WIP, RFC, RDY Pull requests have three stages: `[WIP]` (Work In Progress), `[RFC]` (Request For Comment) and `[RDY]` (Ready). - Untagged PRs are assumed to be `[RFC]`, i.e. you are requesting a review. - Prepend `[WIP]` to the PR title if you are _not_ requesting feedback and the work is still in flux. - Prepend `[RDY]` to the PR title if you are _done_ with the PR and are only waiting on it to be merged. For example, a typical workflow is: 1. You open a `[WIP]` PR where the work is _not_ ready for feedback, you just want to let others know what you are doing. 2. Once the PR is ready for review, you replace `[WIP]` in the title with `[RFC]`. You may add fix up commits to address issues that come up during review. 3. Once the PR is ready for merging, you rebase/squash your work appropriately and then replace `[RFC]` in the title with `[RDY]`. ### Commit messages Follow [commit message hygiene][hygiene] to *make reviews easier* and to make the VCS/git logs more valuable. - Try to keep the first line under 72 characters. - **Prefix the commit subject with a _scope_:** `doc:`, `test:`, `foo.c:`, `runtime:`, ... - For commits that contain only style/lint changes, a single-word subject line is preferred: `style` or `lint`. - A blank line must separate the subject from the description. - Use the _imperative voice_: "Fix bug" rather than "Fixed bug" or "Fixes bug." ### Automated builds (CI) Each pull request must pass the automated builds on [travis CI], [quickbuild] and [AppVeyor]. - CI builds are compiled with [`-Werror`][gcc-warnings], so compiler warnings will fail the build. - If any tests fail, the build will fail. See [Building Neovim#running-tests][wiki-run-tests] to run tests locally. Passing locally doesn't guarantee passing the CI build, because of the different compilers and platforms tested against. - CI runs [ASan] and other analyzers. - To run valgrind locally: `VALGRIND=1 make test` - To run Clang ASan/UBSan locally: `CC=clang make CMAKE_FLAGS="-DCLANG_ASAN_UBSAN=ON"` - The `lint` build ([#3174][3174]) checks modified lines _and their immediate neighbors_. This is to encourage incrementally updating the legacy style to meet our style guidelines. - A single word (`lint` or `style`) is sufficient as the subject line of a commit that contains only style changes. - [How to investigate QuickBuild failures](https://github.com/neovim/neovim/pull/4718#issuecomment-217631350) QuickBuild uses this invocation: mkdir -p build/${params.get("buildType")} \ && cd build/${params.get("buildType")} \ && cmake -G "Unix Makefiles" -DBUSTED_OUTPUT_TYPE=TAP -DCMAKE_BUILD_TYPE=${params.get("buildType")} -DTRAVIS_CI_BUILD=ON ../.. && ${node.getAttribute("make", "make")} VERBOSE=1 nvim unittest-prereqs functionaltest-prereqs ### Clang scan-build The auto-generated [clang-scan] report presents walk-throughs of bugs found by Clang's [scan-build](https://clang-analyzer.llvm.org/scan-build.html) static analyzer. To verify a fix locally, run `scan-build` like this: rm -rf build/ scan-build --use-analyzer=/usr/bin/clang make ### Coverity [Coverity](https://scan.coverity.com/projects/neovim-neovim) runs against the master build. To view the defects, just request access; you will be approved. Use this commit-message format for coverity fixes: coverity/: where `` is the Coverity ID (CID). For example see [#804](https://github.com/neovim/neovim/pull/804). ### PVS-Studio View the [PVS analysis report](https://neovim.io/doc/reports/pvs/) to see bugs found by [PVS Studio](https://www.viva64.com/en/pvs-studio/). You can run `scripts/pvscheck.sh` locally to run PVS on your machine. Reviewing --------- To help review pull requests, start with [this checklist][review-checklist]. Reviewing can be done on GitHub, but you may find it easier to do locally. Using [`hub`][hub], you can create a new branch with the contents of a pull request, e.g. [#1820][1820]: hub checkout https://github.com/neovim/neovim/pull/1820 Use [`git log -p master..FETCH_HEAD`][git-history-filtering] to list all commits in the feature branch which aren't in the `master` branch; `-p` shows each commit's diff. To show the whole surrounding function of a change as context, use the `-W` argument as well. [gcc-warnings]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html [git-bisect]: http://git-scm.com/book/tr/v2/Git-Tools-Debugging-with-Git [git-feature-branch]: https://www.atlassian.com/git/tutorials/comparing-workflows [git-history-filtering]: https://www.atlassian.com/git/tutorials/git-log/filtering-the-commit-history [git-history-rewriting]: http://git-scm.com/book/en/v2/Git-Tools-Rewriting-History [git-rebasing]: http://git-scm.com/book/en/v2/Git-Branching-Rebasing [github-issues]: https://github.com/neovim/neovim/issues [1820]: https://github.com/neovim/neovim/pull/1820 [hub]: https://hub.github.com/ [hygiene]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html [style-guide]: http://neovim.io/develop/style-guide.xml [ASan]: http://clang.llvm.org/docs/AddressSanitizer.html [wiki-run-tests]: https://github.com/neovim/neovim/wiki/Building-Neovim#running-tests [wiki-faq]: https://github.com/neovim/neovim/wiki/FAQ [review-checklist]: https://github.com/neovim/neovim/wiki/Code-review-checklist [3174]: https://github.com/neovim/neovim/issues/3174 [travis CI]: https://travis-ci.org/neovim/neovim [quickbuild]: http://neovim-qb.szakmeister.net/dashboard [AppVeyor]: https://ci.appveyor.com/project/neovim/neovim [Merge a Vim patch]: https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-Vim [clang-scan]: https://neovim.io/doc/reports/clang/ [complexity:low]: https://github.com/neovim/neovim/issues?q=is%3Aopen+is%3Aissue+label%3Acomplexity%3Alow neovim-0.2.2/ISSUE_TEMPLATE.md000066400000000000000000000004641320401574200155170ustar00rootroot00000000000000 - `nvim --version`: - Vim (version: ) behaves differently? - Operating system/version: - Terminal name/version: - `$TERM`: ### Steps to reproduce using `nvim -u NORC` ``` nvim -u NORC ``` ### Actual behaviour ### Expected behaviour neovim-0.2.2/LICENSE000066400000000000000000000366371320401574200140320ustar00rootroot00000000000000Copyright Neovim contributors. All rights reserved. Neovim is licensed under the terms of the Apache 2.0 license, except for parts of Neovim that were contributed under the Vim license (see below). Neovim's license follows: ==== Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. ==== The above license applies to all parts of Neovim except (1) parts that were contributed under the Vim license and (2) externally maintained libraries. The externally maintained libraries used by Neovim are: - Klib: a Generic Library in C. MIT/X11 license. - libuv. Copyright Joyent, Inc. and other Node contributors. Node.js license. - LuaJIT: a Just-In-Time Compiler for Lua. Copyright Mike Pall. MIT license. ==== Any parts of Neovim that were contributed under the Vim license are licensed under the Vim license unless the copyright holder gave permission to license those contributions under the Apache 2.0 license. The Vim license follows: VIM LICENSE I) There are no restrictions on distributing unmodified copies of Vim except that they must include this license text. You can also distribute unmodified parts of Vim, likewise unrestricted except that they must include this license text. You are also allowed to include executables that you made from the unmodified Vim sources, plus your own usage examples and Vim scripts. II) It is allowed to distribute a modified (or extended) version of Vim, including executables and/or source code, when the following four conditions are met: 1) This license text must be included unmodified. 2) The modified Vim must be distributed in one of the following five ways: a) If you make changes to Vim yourself, you must clearly describe in the distribution how to contact you. When the maintainer asks you (in any way) for a copy of the modified Vim you distributed, you must make your changes, including source code, available to the maintainer without fee. The maintainer reserves the right to include your changes in the official version of Vim. What the maintainer will do with your changes and under what license they will be distributed is negotiable. If there has been no negotiation then this license, or a later version, also applies to your changes. The current maintainer is Bram Moolenaar . If this changes it will be announced in appropriate places (most likely vim.sf.net, www.vim.org and/or comp.editors). When it is completely impossible to contact the maintainer, the obligation to send him your changes ceases. Once the maintainer has confirmed that he has received your changes they will not have to be sent again. b) If you have received a modified Vim that was distributed as mentioned under a) you are allowed to further distribute it unmodified, as mentioned at I). If you make additional changes the text under a) applies to those changes. c) Provide all the changes, including source code, with every copy of the modified Vim you distribute. This may be done in the form of a context diff. You can choose what license to use for new code you add. The changes and their license must not restrict others from making their own changes to the official version of Vim. d) When you have a modified Vim which includes changes as mentioned under c), you can distribute it without the source code for the changes if the following three conditions are met: - The license that applies to the changes permits you to distribute the changes to the Vim maintainer without fee or restriction, and permits the Vim maintainer to include the changes in the official version of Vim without fee or restriction. - You keep the changes for at least three years after last distributing the corresponding modified Vim. When the maintainer or someone who you distributed the modified Vim to asks you (in any way) for the changes within this period, you must make them available to him. - You clearly describe in the distribution how to contact you. This contact information must remain valid for at least three years after last distributing the corresponding modified Vim, or as long as possible. e) When the GNU General Public License (GPL) applies to the changes, you can distribute the modified Vim under the GNU GPL version 2 or any later version. 3) A message must be added, at least in the output of the ":version" command and in the intro screen, such that the user of the modified Vim is able to see that it was modified. When distributing as mentioned under 2)e) adding the message is only required for as far as this does not conflict with the license used for the changes. 4) The contact information as required under 2)a) and 2)d) must not be removed or changed, except that the person himself can make corrections. III) If you distribute a modified version of Vim, you are encouraged to use the Vim license for your changes and make them available to the maintainer, including the source code. The preferred way to do this is by e-mail or by uploading the files to a server and e-mailing the URL. If the number of changes is small (e.g., a modified Makefile) e-mailing a context diff will do. The e-mail address to be used is IV) It is not allowed to remove this license from the distribution of the Vim sources, parts of it or from a modified version. You may use this license for previous Vim releases instead of the license that they came with, at your option. neovim-0.2.2/Makefile000066400000000000000000000073131320401574200144520ustar00rootroot00000000000000filter-false = $(strip $(filter-out 0 off OFF false FALSE,$1)) filter-true = $(strip $(filter-out 1 on ON true TRUE,$1)) # See contrib/local.mk.example -include local.mk CMAKE_PRG ?= $(shell (command -v cmake3 || echo cmake)) CMAKE_BUILD_TYPE ?= Debug CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) DOC_DOWNLOAD_URL_BASE := https://raw.githubusercontent.com/neovim/doc/gh-pages CLINT_ERRORS_FILE_PATH := /reports/clint/errors.json BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \ echo "Unix Makefiles") ifeq (,$(BUILD_TOOL)) ifeq (Ninja,$(BUILD_TYPE)) ifneq ($(shell $(CMAKE_PRG) --help 2>/dev/null | grep Ninja),) BUILD_TOOL := ninja else # User's version of CMake doesn't support Ninja BUILD_TOOL = $(MAKE) BUILD_TYPE := Unix Makefiles endif else BUILD_TOOL = $(MAKE) endif endif ifneq ($(VERBOSE),) # Only need to handle Ninja here. Make will inherit the VERBOSE variable. ifeq ($(BUILD_TYPE),Ninja) VERBOSE_FLAG := -v endif endif BUILD_CMD = $(BUILD_TOOL) $(VERBOSE_FLAG) # Extra CMake flags which extend the default set CMAKE_EXTRA_FLAGS ?= DEPS_CMAKE_FLAGS ?= USE_BUNDLED_DEPS ?= ifneq (,$(USE_BUNDLED_DEPS)) BUNDLED_CMAKE_FLAG := -DUSE_BUNDLED=$(USE_BUNDLED_DEPS) endif ifneq (,$(findstring functionaltest-lua,$(MAKECMDGOALS))) BUNDLED_LUA_CMAKE_FLAG := -DUSE_BUNDLED_LUA=ON $(shell [ -x .deps/usr/bin/lua ] || rm build/.ran-*) endif # For use where we want to make sure only a single job is run. This does issue # a warning, but we need to keep SCRIPTS argument. SINGLE_MAKE = export MAKEFLAGS= ; $(MAKE) all: nvim nvim: build/.ran-cmake deps +$(BUILD_CMD) -C build libnvim: build/.ran-cmake deps +$(BUILD_CMD) -C build libnvim cmake: touch CMakeLists.txt $(MAKE) build/.ran-cmake build/.ran-cmake: | deps cd build && $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) .. touch $@ deps: | build/.ran-third-party-cmake ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),) +$(BUILD_CMD) -C .deps endif build/.ran-third-party-cmake: ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),) mkdir -p .deps cd .deps && \ $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \ $(DEPS_CMAKE_FLAGS) ../third-party endif mkdir -p build touch $@ # TODO: cmake 3.2+ add_custom_target() has a USES_TERMINAL flag. oldtest: | nvim helptags +$(SINGLE_MAKE) -C src/nvim/testdir clean ifeq ($(strip $(TEST_FILE)),) +$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" $(MAKEOVERRIDES) else +$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" NEW_TESTS=$(TEST_FILE) SCRIPTS= $(MAKEOVERRIDES) endif helptags: | nvim +$(BUILD_CMD) -C build helptags functionaltest: | nvim +$(BUILD_CMD) -C build functionaltest functionaltest-lua: | nvim +$(BUILD_CMD) -C build functionaltest-lua testlint: | build/.ran-cmake deps $(BUILD_CMD) -C build testlint lualint: | build/.ran-cmake deps $(BUILD_CMD) -C build lualint unittest: | nvim +$(BUILD_CMD) -C build unittest benchmark: | nvim +$(BUILD_CMD) -C build benchmark test: functionaltest unittest clean: +test -d build && $(BUILD_CMD) -C build clean || true $(MAKE) -C src/nvim/testdir clean $(MAKE) -C runtime/doc clean distclean: clean rm -rf .deps build install: | nvim +$(BUILD_CMD) -C build install clint: build/.ran-cmake +$(BUILD_CMD) -C build clint clint-full: build/.ran-cmake +$(BUILD_CMD) -C build clint-full check-single-includes: build/.ran-cmake +$(BUILD_CMD) -C build check-single-includes appimage: bash scripts/genappimage.sh lint: check-single-includes clint testlint lualint .PHONY: test testlint lualint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage neovim-0.2.2/README.md000066400000000000000000000133421320401574200142700ustar00rootroot00000000000000[![Neovim](https://raw.githubusercontent.com/neovim/neovim.github.io/master/logos/neovim-logo-600x173.png)](https://neovim.io) [Wiki](https://github.com/neovim/neovim/wiki) | [Documentation](https://neovim.io/doc) | [Twitter](https://twitter.com/Neovim) | [Community](https://neovim.io/community/) | [Gitter **Chat**](https://gitter.im/neovim/neovim) [![Travis Build Status](https://travis-ci.org/neovim/neovim.svg?branch=master)](https://travis-ci.org/neovim/neovim) [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/urdqjrik5u521fac/branch/master?svg=true)](https://ci.appveyor.com/project/neovim/neovim/branch/master) [![codecov](https://img.shields.io/codecov/c/github/neovim/neovim.svg)](https://codecov.io/gh/neovim/neovim) [![Coverity Scan Build](https://scan.coverity.com/projects/2227/badge.svg)](https://scan.coverity.com/projects/2227) [![Clang Scan Build](https://neovim.io/doc/reports/clang/badge.svg)](https://neovim.io/doc/reports/clang) [![PVS-studio Check](https://neovim.io/doc/reports/pvs/badge.svg)](https://neovim.io/doc/reports/pvs) [![Debian CI](https://badges.debian.net/badges/debian/testing/neovim/version.svg)](https://buildd.debian.org/neovim) [![Downloads](https://img.shields.io/github/downloads/neovim/neovim/total.svg?maxAge=2592000)](https://github.com/neovim/neovim/releases/) Neovim is a project that seeks to aggressively refactor Vim in order to: - Simplify maintenance and encourage [contributions](CONTRIBUTING.md) - Split the work between multiple developers - Enable [advanced UIs] without modifications to the core - Maximize [extensibility](https://github.com/neovim/neovim/wiki/Plugin-UI-architecture) See [the wiki](https://github.com/neovim/neovim/wiki/Introduction) and [Roadmap] for more information. [![Throughput Graph](https://graphs.waffle.io/neovim/neovim/throughput.svg)](https://waffle.io/neovim/neovim/metrics) Install from source ------------------- make CMAKE_BUILD_TYPE=RelWithDebInfo sudo make install To install to a non-default location, specify `CMAKE_INSTALL_PREFIX`: make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=/full/path/" make install See [the wiki](https://github.com/neovim/neovim/wiki/Building-Neovim) for details. Install from package -------------------- Pre-built packages for Windows, macOS, and Linux are found at the [Releases](https://github.com/neovim/neovim/releases/) page. Managed packages are in [Homebrew], [Debian], [Ubuntu], [Fedora], [Arch Linux], [Gentoo], and [more](https://github.com/neovim/neovim/wiki/Installing-Neovim)! Project layout -------------- ├─ ci/ build automation ├─ cmake/ build scripts ├─ runtime/ user plugins/docs ├─ src/ application source code (see src/nvim/README.md) │ ├─ api/ API subsystem │ ├─ eval/ VimL subsystem │ ├─ event/ event-loop subsystem │ ├─ generators/ code generation (pre-compilation) │ ├─ lib/ generic data structures │ ├─ lua/ lua subsystem │ ├─ msgpack_rpc/ RPC subsystem │ ├─ os/ low-level platform code │ └─ tui/ built-in UI ├─ third-party/ cmake subproject to build dependencies └─ test/ tests (see test/README.md) - To disable `third-party/` specify `USE_BUNDLED_DEPS=NO` or `USE_BUNDLED=NO` (CMake option). Features -------- - Modern [GUIs](https://github.com/neovim/neovim/wiki/Related-projects#gui) - [API](https://github.com/neovim/neovim/wiki/Related-projects#api-clients) access from any language including clojure, lisp, go, haskell, lua, javascript, perl, python, ruby, rust. - Embedded, scriptable [terminal emulator](https://neovim.io/doc/user/nvim_terminal_emulator.html) - Asynchronous [job control](https://github.com/neovim/neovim/pull/2247) - [Shared data (shada)](https://github.com/neovim/neovim/pull/2506) among multiple editor instances - [XDG base directories](https://github.com/neovim/neovim/pull/3470) support - Compatible with most Vim plugins, including Ruby and Python plugins. See [`:help nvim-features`][nvim-features] for the full list! License ------- Neovim is licensed under the terms of the Apache 2.0 license, except for parts that were contributed under the Vim license. - Contributions committed before [b17d96][license-commit] remain under the Vim license. - Contributions committed after [b17d96][license-commit] are licensed under Apache 2.0 unless those contributions were copied from Vim (identified in the commit logs by the `vim-patch` token). See `LICENSE` for details. Vim is Charityware. You can use and copy it as much as you like, but you are encouraged to make a donation for needy children in Uganda. Please see the kcc section of the vim docs or visit the ICCF web site, available at these URLs: http://iccf-holland.org/ http://www.vim.org/iccf/ http://www.iccf.nl/ You can also sponsor the development of Vim. Vim sponsors can vote for features. The money goes to Uganda anyway. [license-commit]: https://github.com/neovim/neovim/commit/b17d9691a24099c9210289f16afb1a498a89d803 [nvim-features]: https://neovim.io/doc/user/vim_diff.html#nvim-features [Roadmap]: https://neovim.io/roadmap/ [advanced UIs]: https://github.com/neovim/neovim/wiki/Related-projects#gui [Homebrew]: https://github.com/neovim/homebrew-neovim#installation [Debian]: https://packages.debian.org/testing/neovim [Ubuntu]: http://packages.ubuntu.com/search?keywords=neovim [Fedora]: https://admin.fedoraproject.org/pkgdb/package/rpms/neovim [Arch Linux]: https://www.archlinux.org/packages/?q=neovim [Gentoo]: https://packages.gentoo.org/packages/app-editors/neovim neovim-0.2.2/appveyor.yml000066400000000000000000000006101320401574200153730ustar00rootroot00000000000000version: '{build}' environment: APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9" configuration: - MINGW_64 - MINGW_32 - MINGW_64-gcov matrix: allow_failures: - configuration: MINGW_64-gcov install: [] build_script: - call ci\build.bat cache: - C:\msys64\var\cache\pacman\pkg -> ci\build.bat - .deps -> third-party\** artifacts: - path: build/Neovim.zip - path: build/bin/nvim.exe neovim-0.2.2/busted/000077500000000000000000000000001320401574200142745ustar00rootroot00000000000000neovim-0.2.2/busted/outputHandlers/000077500000000000000000000000001320401574200173155ustar00rootroot00000000000000neovim-0.2.2/busted/outputHandlers/TAP.lua000066400000000000000000000053261320401574200204520ustar00rootroot00000000000000-- TODO(jkeyes): remove this and use the upstream version as soon as it is -- available in a release of busted. local pretty = require 'pl.pretty' return function(options) local busted = require 'busted' local handler = require 'busted.outputHandlers.base'() local success = 'ok %u - %s' local failure = 'not ' .. success local skip = 'ok %u - # SKIP %s' local counter = 0 handler.suiteReset = function() counter = 0 return nil, true end handler.suiteEnd = function() print('1..' .. counter) io.flush() return nil, true end local function showFailure(t) local message = t.message local trace = t.trace or {} if message == nil then message = 'Nil error' elseif type(message) ~= 'string' then message = pretty.write(message) end print(failure:format(counter, t.name)) print('# ' .. t.element.trace.short_src .. ' @ ' .. t.element.trace.currentline) if t.randomseed then print('# Random seed: ' .. t.randomseed) end print('# Failure message: ' .. message:gsub('\n', '\n# ')) if options.verbose and trace.traceback then print('# ' .. trace.traceback:gsub('^\n', '', 1):gsub('\n', '\n# ')) end end handler.testStart = function(element, parent) local trace = element.trace if options.verbose and trace and trace.short_src then local fileline = trace.short_src .. ' @ ' .. trace.currentline .. ': ' local testName = fileline .. handler.getFullName(element) print('# ' .. testName) end io.flush() return nil, true end handler.testEnd = function(element, parent, status, trace) counter = counter + 1 if status == 'success' then local t = handler.successes[#handler.successes] print(success:format(counter, t.name)) elseif status == 'pending' then local t = handler.pendings[#handler.pendings] print(skip:format(counter, (t.message or t.name))) elseif status == 'failure' then showFailure(handler.failures[#handler.failures]) elseif status == 'error' then showFailure(handler.errors[#handler.errors]) end io.flush() return nil, true end handler.error = function(element, parent, message, debug) if element.descriptor ~= 'it' then counter = counter + 1 showFailure(handler.errors[#handler.errors]) end io.flush() return nil, true end busted.subscribe({ 'suite', 'reset' }, handler.suiteReset) busted.subscribe({ 'suite', 'end' }, handler.suiteEnd) busted.subscribe({ 'test', 'start' }, handler.testStart, { predicate = handler.cancelOnPending }) busted.subscribe({ 'test', 'end' }, handler.testEnd, { predicate = handler.cancelOnPending }) busted.subscribe({ 'error' }, handler.error) return handler end neovim-0.2.2/busted/outputHandlers/nvim.lua000066400000000000000000000231141320401574200207720ustar00rootroot00000000000000local s = require 'say' local pretty = require 'pl.pretty' local term = require 'term' local colors local isWindows = package.config:sub(1,1) == '\\' if isWindows then colors = setmetatable({}, {__index = function() return function(s) return s end end}) else colors = require 'term.colors' end return function(options) local busted = require 'busted' local handler = require 'busted.outputHandlers.base'() local c = { succ = function(s) return colors.bright(colors.green(s)) end, skip = function(s) return colors.bright(colors.yellow(s)) end, fail = function(s) return colors.bright(colors.magenta(s)) end, errr = function(s) return colors.bright(colors.red(s)) end, test = tostring, file = colors.cyan, time = colors.dim, note = colors.yellow, sect = function(s) return colors.green(colors.dim(s)) end, nmbr = colors.bright, } local repeatSuiteString = '\nRepeating all tests (run %d of %d) . . .\n\n' local randomizeString = c.note('Note: Randomizing test order with a seed of %d.\n') local globalSetup = c.sect('[----------]') .. ' Global test environment setup.\n' local fileStartString = c.sect('[----------]') .. ' Running tests from ' .. c.file('%s') .. '\n' local runString = c.sect('[ RUN ]') .. ' ' .. c.test('%s') .. ': ' local successString = c.succ('OK') .. '\n' local skippedString = c.skip('SKIP') .. '\n' local failureString = c.fail('FAIL') .. '\n' local errorString = c.errr('ERR') .. '\n' local fileEndString = c.sect('[----------]') .. ' '.. c.nmbr('%d') .. ' %s from ' .. c.file('%s') .. ' ' .. c.time('(%.2f ms total)') .. '\n\n' local globalTeardown = c.sect('[----------]') .. ' Global test environment teardown.\n' local suiteEndString = c.sect('[==========]') .. ' ' .. c.nmbr('%d') .. ' %s from ' .. c.nmbr('%d') .. ' test %s ran. ' .. c.time('(%.2f ms total)') .. '\n' local successStatus = c.succ('[ PASSED ]') .. ' ' .. c.nmbr('%d') .. ' %s.\n' local timeString = c.time('%.2f ms') local summaryStrings = { skipped = { header = c.skip('[ SKIPPED ]') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n', test = c.skip('[ SKIPPED ]') .. ' %s\n', footer = ' ' .. c.nmbr('%d') .. ' SKIPPED %s\n', }, failure = { header = c.fail('[ FAILED ]') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n', test = c.fail('[ FAILED ]') .. ' %s\n', footer = ' ' .. c.nmbr('%d') .. ' FAILED %s\n', }, error = { header = c.errr('[ ERROR ]') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n', test = c.errr('[ ERROR ]') .. ' %s\n', footer = ' ' .. c.nmbr('%d') .. ' %s\n', }, } c = nil local fileCount = 0 local fileTestCount = 0 local testCount = 0 local successCount = 0 local skippedCount = 0 local failureCount = 0 local errorCount = 0 local pendingDescription = function(pending) local name = pending.name local string = '' if type(pending.message) == 'string' then string = string .. pending.message .. '\n' elseif pending.message ~= nil then string = string .. pretty.write(pending.message) .. '\n' end return string end local failureDescription = function(failure) local string = failure.randomseed and ('Random seed: ' .. failure.randomseed .. '\n') or '' if type(failure.message) == 'string' then string = string .. failure.message elseif failure.message == nil then string = string .. 'Nil error' else string = string .. pretty.write(failure.message) end string = string .. '\n' if options.verbose and failure.trace and failure.trace.traceback then string = string .. failure.trace.traceback .. '\n' end return string end local getFileLine = function(element) local fileline = '' if element.trace or element.trace.short_src then fileline = colors.cyan(element.trace.short_src) .. ' @ ' .. colors.cyan(element.trace.currentline) .. ': ' end return fileline end local getTestList = function(status, count, list, getDescription) local string = '' local header = summaryStrings[status].header if count > 0 and header then local tests = (count == 1 and 'test' or 'tests') local errors = (count == 1 and 'error' or 'errors') string = header:format(count, status == 'error' and errors or tests) local testString = summaryStrings[status].test if testString then for _, t in ipairs(list) do local fullname = getFileLine(t.element) .. colors.bright(t.name) string = string .. testString:format(fullname) string = string .. getDescription(t) end end end return string end local getSummary = function(status, count) local string = '' local footer = summaryStrings[status].footer if count > 0 and footer then local tests = (count == 1 and 'TEST' or 'TESTS') local errors = (count == 1 and 'ERROR' or 'ERRORS') string = footer:format(count, status == 'error' and errors or tests) end return string end local getSummaryString = function() local tests = (successCount == 1 and 'test' or 'tests') local string = successStatus:format(successCount, tests) string = string .. getTestList('skipped', skippedCount, handler.pendings, pendingDescription) string = string .. getTestList('failure', failureCount, handler.failures, failureDescription) string = string .. getTestList('error', errorCount, handler.errors, failureDescription) string = string .. ((skippedCount + failureCount + errorCount) > 0 and '\n' or '') string = string .. getSummary('skipped', skippedCount) string = string .. getSummary('failure', failureCount) string = string .. getSummary('error', errorCount) return string end handler.suiteReset = function() fileCount = 0 fileTestCount = 0 testCount = 0 successCount = 0 skippedCount = 0 failureCount = 0 errorCount = 0 return nil, true end handler.suiteStart = function(suite, count, total, randomseed) if total > 1 then io.write(repeatSuiteString:format(count, total)) end if randomseed then io.write(randomizeString:format(randomseed)) end io.write(globalSetup) io.flush() return nil, true end local function getElapsedTime(tbl) if tbl.duration then return tbl.duration * 1000 else return tonumber('nan') end end handler.suiteEnd = function(suite, count, total) local elapsedTime_ms = getElapsedTime(suite) local tests = (testCount == 1 and 'test' or 'tests') local files = (fileCount == 1 and 'file' or 'files') io.write(globalTeardown) io.write(suiteEndString:format(testCount, tests, fileCount, files, elapsedTime_ms)) io.write(getSummaryString()) io.flush() return nil, true end handler.fileStart = function(file) fileTestCount = 0 io.write(fileStartString:format(file.name)) io.flush() return nil, true end handler.fileEnd = function(file) local elapsedTime_ms = getElapsedTime(file) local tests = (fileTestCount == 1 and 'test' or 'tests') fileCount = fileCount + 1 io.write(fileEndString:format(fileTestCount, tests, file.name, elapsedTime_ms)) io.flush() return nil, true end handler.testStart = function(element, parent) io.write(runString:format(handler.getFullName(element))) io.flush() return nil, true end handler.testEnd = function(element, parent, status, debug) local elapsedTime_ms = getElapsedTime(element) local string fileTestCount = fileTestCount + 1 testCount = testCount + 1 if status == 'success' then successCount = successCount + 1 string = successString elseif status == 'pending' then skippedCount = skippedCount + 1 string = skippedString elseif status == 'failure' then failureCount = failureCount + 1 string = nil elseif status == 'error' then errorCount = errorCount + 1 string = nil end if string ~= nil then if elapsedTime_ms == elapsedTime_ms then string = timeString:format(elapsedTime_ms) .. ' ' .. string end io.write(string) io.flush() end return nil, true end handler.testFailure = function(element, parent, message, debug) io.write(failureString) io.flush() io.write(failureDescription(handler.failures[#handler.failures])) io.flush() return nil, true end handler.testError = function(element, parent, message, debug) io.write(errorString) io.flush() io.write(failureDescription(handler.errors[#handler.errors])) io.flush() return nil, true end handler.error = function(element, parent, message, debug) if element.descriptor ~= 'it' then io.write(failureDescription(handler.errors[#handler.errors])) io.flush() errorCount = errorCount + 1 end return nil, true end busted.subscribe({ 'suite', 'reset' }, handler.suiteReset) busted.subscribe({ 'suite', 'start' }, handler.suiteStart) busted.subscribe({ 'suite', 'end' }, handler.suiteEnd) busted.subscribe({ 'file', 'start' }, handler.fileStart) busted.subscribe({ 'file', 'end' }, handler.fileEnd) busted.subscribe({ 'test', 'start' }, handler.testStart, { predicate = handler.cancelOnPending }) busted.subscribe({ 'test', 'end' }, handler.testEnd, { predicate = handler.cancelOnPending }) busted.subscribe({ 'failure', 'it' }, handler.testFailure) busted.subscribe({ 'error', 'it' }, handler.testError) busted.subscribe({ 'failure' }, handler.error) busted.subscribe({ 'error' }, handler.error) return handler end neovim-0.2.2/ci/000077500000000000000000000000001320401574200134015ustar00rootroot00000000000000neovim-0.2.2/ci/after_success.sh000077500000000000000000000003701320401574200165710ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail if [[ -n "${GCOV}" ]]; then coveralls --gcov "$(which "${GCOV}")" --encoding iso-8859-1 || echo 'coveralls upload failed.' bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.' fi neovim-0.2.2/ci/before_cache.sh000077500000000000000000000010611320401574200163230ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CI_DIR}/common/suite.sh" # Don't cache pip's log and selfcheck. rm -rf "${HOME}/.cache/pip/log" rm -f "${HOME}/.cache/pip/selfcheck.json" # Update the third-party dependency cache only if the build was successful. if ended_successfully; then rm -rf "${HOME}/.cache/nvim-deps" mv "${DEPS_BUILD_DIR}" "${HOME}/.cache/nvim-deps" touch "${CACHE_MARKER}" echo "Updated third-party dependencies (timestamp: $(stat -c '%y' "${CACHE_MARKER}"))." fi neovim-0.2.2/ci/before_install.sh000077500000000000000000000015341320401574200167330ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail if [[ "${CI_TARGET}" == lint ]]; then exit fi if [[ "${TRAVIS_OS_NAME}" == osx ]]; then brew update fi echo 'python info:' ( 2>&1 python --version || true 2>&1 python2 --version || true 2>&1 python3 --version || true 2>&1 pip --version || true 2>&1 pip2 --version || true 2>&1 pip3 --version || true echo 'pyenv versions:' 2>&1 pyenv versions || true ) | sed 's/^/ /' echo "Upgrade Python 2 pip." pip2.7 -q install --user --upgrade pip if [[ "${TRAVIS_OS_NAME}" == osx ]]; then echo "Install Python 3." brew install python3 echo "Upgrade Python 3 pip." pip3 -q install --user --upgrade pip else echo "Upgrade Python 3 pip." # Allow failure. pyenv pip3 on travis is broken: # https://github.com/travis-ci/travis-ci/issues/8363 pip3 -q install --user --upgrade pip || true fi neovim-0.2.2/ci/before_script.sh000077500000000000000000000015151320401574200165700ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail if [[ "${CI_TARGET}" == lint ]]; then exit fi CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CI_DIR}/common/build.sh" # Test some of the configuration variables. if [[ -n "${GCOV}" ]] && [[ ! $(type -P "${GCOV}") ]]; then echo "\$GCOV: '${GCOV}' is not executable." exit 1 fi if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; then echo "\$LLVM_SYMBOLIZER: '${LLVM_SYMBOLIZER}' is not executable." exit 1 fi if [[ "${TRAVIS_OS_NAME}" == osx ]]; then # Adds user to a dummy group. # That allows to test changing the group of the file by `os_fchown`. sudo dscl . -create /Groups/chown_test sudo dscl . -append /Groups/chown_test GroupMembership "${USER}" fi # Compile dependencies. build_deps rm -rf "${LOG_DIR}" mkdir -p "${LOG_DIR}" neovim-0.2.2/ci/build.bat000066400000000000000000000042161320401574200151730ustar00rootroot00000000000000:: These are native MinGW builds, but they use the toolchain inside :: MSYS2, this allows using all the dependencies and tools available :: in MSYS2, but we cannot build inside the MSYS2 shell. echo on if "%CONFIGURATION%" == "MINGW_32" ( set ARCH=i686 set BITS=32 ) else ( set ARCH=x86_64 set BITS=64 ) if "%CONFIGURATION%" == "MINGW_64-gcov" ( set USE_GCOV="-DUSE_GCOV=ON" ) :: We cannot have sh.exe in the PATH (MinGW) set PATH=%PATH:C:\Program Files\Git\usr\bin;=% set PATH=C:\msys64\mingw%BITS%\bin;C:\Windows\System32;C:\Windows;%PATH% :: The default cpack in the PATH is not CMake set PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH% :: Build third-party dependencies C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" || goto :error C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-diffutils mingw-w64-%ARCH%-unibilium gperf" || goto :error :: Setup python (use AppVeyor system python) C:\Python27\python.exe -m pip install neovim || goto :error C:\Python35\python.exe -m pip install neovim || goto :error :: Disambiguate python3 move c:\Python35\python.exe c:\Python35\python3.exe set PATH=C:\Python35;C:\Python27;%PATH% :: Sanity check python -c "import neovim; print(str(neovim))" || goto :error python3 -c "import neovim; print(str(neovim))" || goto :error mkdir .deps cd .deps cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error mingw32-make VERBOSE=1 || goto :error cd .. :: Build Neovim mkdir build cd build cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error mingw32-make VERBOSE=1 || goto :error bin\nvim --version || goto :error :: Functional tests mingw32-make functionaltest VERBOSE=1 || goto :error if defined USE_GCOV ( C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.'" ) :: Build artifacts cpack -G ZIP -C RelWithDebInfo if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo goto :EOF :error exit /b %errorlevel% neovim-0.2.2/ci/common/000077500000000000000000000000001320401574200146715ustar00rootroot00000000000000neovim-0.2.2/ci/common/build.sh000066400000000000000000000042371320401574200163320ustar00rootroot00000000000000top_make() { ${MAKE_CMD} "$@" } build_make() { top_make -C "${BUILD_DIR}" "$@" } build_deps() { if test "${BUILD_32BIT}" = ON ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi if test "${FUNCTIONALTEST}" = "functionaltest-lua" \ || test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON" fi rm -rf "${DEPS_BUILD_DIR}" # If there is a valid cache and we're not forced to recompile, # use cached third-party dependencies. if test -f "${CACHE_MARKER}" && test "${BUILD_NVIM_DEPS}" != "true" ; then local statcmd="stat -c '%y'" if test "${TRAVIS_OS_NAME}" = osx ; then statcmd="stat -f '%Sm'" fi echo "Using third-party dependencies from Travis's cache (last updated: $(${statcmd} "${CACHE_MARKER}"))." mkdir -p "$(dirname "${DEPS_BUILD_DIR}")" mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" else mkdir -p "${DEPS_BUILD_DIR}" fi # Even if we're using cached dependencies, run CMake and make to # update CMake configuration and update to newer deps versions. cd "${DEPS_BUILD_DIR}" echo "Configuring with '${DEPS_CMAKE_FLAGS}'." CC= cmake ${DEPS_CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}/third-party/" if ! top_make; then exit 1 fi cd "${TRAVIS_BUILD_DIR}" } prepare_build() { if test -n "${CLANG_SANITIZER}" ; then CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON" fi if test "${BUILD_32BIT}" = ON ; then CMAKE_FLAGS="${CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi mkdir -p "${BUILD_DIR}" cd "${BUILD_DIR}" echo "Configuring with '${CMAKE_FLAGS} $@'." cmake ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}" } build_nvim() { echo "Building nvim." if ! top_make nvim ; then exit 1 fi if test "$CLANG_SANITIZER" != "TSAN" ; then echo "Building libnvim." if ! top_make libnvim ; then exit 1 fi echo "Building nvim-test." if ! top_make nvim-test ; then exit 1 fi fi # Invoke nvim to trigger *San early. if ! (bin/nvim --version && bin/nvim -u NONE -e -c ':qall') ; then asan_check "${LOG_DIR}" exit 1 fi asan_check "${LOG_DIR}" cd "${TRAVIS_BUILD_DIR}" } neovim-0.2.2/ci/common/suite.sh000066400000000000000000000114361320401574200163630ustar00rootroot00000000000000# HACK: get newline for use in strings given that "\n" and $'' do not work. NL="$(printf '\nE')" NL="${NL%E}" FAIL_SUMMARY="" # Test success marker. If END_MARKER file exists, we know that all tests # finished. If FAIL_SUMMARY_FILE exists we know that some tests failed, this # file will contain information about failed tests. Build is considered # successful if tests ended without any of them failing. END_MARKER="$BUILD_DIR/.tests_finished" FAIL_SUMMARY_FILE="$BUILD_DIR/.test_errors" ANSI_CLEAR="\033[0K" travis_fold() { local action="$1" local name="$2" name="$(echo -n "$name" | tr '\n\0' '--' | sed 's/[^A-Za-z0-9]\{1,\}/-/g')" name="$(echo -n "$name" | sed 's/-$//')" echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}" } if test "$TRAVIS" != "true" ; then travis_fold() { return 0 } fi enter_suite() { set +x FAILED=0 rm -f "${END_MARKER}" local suite_name="$1" export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE}/$suite_name" travis_fold start "${NVIM_TEST_CURRENT_SUITE}" set -x } exit_suite() { set +x if test -f "$NVIM_LOG_FILE" ; then printf "===============================================================================\n" printf "NVIM_LOG_FILE: $NVIM_LOG_FILE\n" cat "$NVIM_LOG_FILE" 2>/dev/null || printf '(empty)' printf "\n" rm -rf "$NVIM_LOG_FILE" fi travis_fold end "${NVIM_TEST_CURRENT_SUITE}" if test $FAILED -ne 0 ; then echo "Suite ${NVIM_TEST_CURRENT_SUITE} failed, summary:" echo "${FAIL_SUMMARY}" fi export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE%/*}" if test "$1" != "--continue" ; then exit $FAILED else local saved_failed=$FAILED FAILED=0 return $saved_failed fi } fail() { local test_name="$1" local fail_char="$2" local message="$3" : ${fail_char:=F} : ${message:=Test $test_name failed} local full_msg="$fail_char $NVIM_TEST_CURRENT_SUITE|$test_name :: $message" FAIL_SUMMARY="${FAIL_SUMMARY}${NL}${full_msg}" echo "${full_msg}" >> "${FAIL_SUMMARY_FILE}" echo "Failed: $full_msg" FAILED=1 } run_test() { local cmd="$1" test $# -gt 0 && shift local test_name="$1" : ${test_name:=$cmd} test $# -gt 0 && shift if ! eval "$cmd" ; then fail "${test_name}" "$@" fi } run_test_wd() { local hang_ok= if test "$1" = "--allow-hang" ; then hang_ok=1 shift fi local timeout="$1" test $# -gt 0 && shift local cmd="$1" test $# -gt 0 && shift local restart_cmd="$1" : ${restart_cmd:=true} test $# -gt 0 && shift local test_name="$1" : ${test_name:=$cmd} test $# -gt 0 && shift local output_file="$(mktemp)" local status_file="$(mktemp)" local sid_file="$(mktemp)" local restarts=5 local prev_tmpsize=-1 while test $restarts -gt 0 ; do : > "$status_file" : > "$sid_file" setsid \ env \ output_file="$output_file" \ status_file="$status_file" \ sid_file="$sid_file" \ cmd="$cmd" \ CI_DIR="$CI_DIR" \ sh -c ' . "${CI_DIR}/common/test.sh" ps -o sid= > "$sid_file" ( ret=0 if ! eval "$cmd" 2>&1 ; then ret=1 fi echo "$ret" > "$status_file" ) | tee -a "$output_file" ' while test "$(stat -c "%s" "$status_file")" -eq 0 ; do prev_tmpsize=$tmpsize sleep $timeout tmpsize="$(stat -c "%s" "$output_file")" if test $tempsize -eq $prev_temsize ; then # no output, assuming either hang or exit break fi done restarts=$(( restarts - 1 )) if test "$(stat -c "%s" "$status_file")" -eq 0 ; then # Status file not updated, assuming hang # SID not known, this should not ever happen if test "$(stat -c "%s" "$sid_file")" -eq 0 ; then fail "$test_name" E "Shell did not run" break fi # Kill all processes which belong to one session: should get rid of test # processes as well as sh itself. pkill -KILL -s$(cat "$sid_file") if test $restarts -eq 0 ; then if test -z "$hang_ok" ; then fail "$test_name" E "Test hang up" fi else echo "Test ${test_name} hang up, restarting" eval "$restart_cmd" fi else local new_failed="$(cat "$status_file")" if test "$new_failed" != "0" ; then fail "$test_name" F "Test failed in run_test_wd" fi break fi done rm -f "$output_file" rm -f "$status_file" rm -f "$sid_file" } ended_successfully() { if test -f "${FAIL_SUMMARY_FILE}" ; then echo 'Test failed, complete summary:' cat "${FAIL_SUMMARY_FILE}" return 1 fi if ! test -f "${END_MARKER}" ; then echo 'ended_successfully called before end marker was touched' return 1 fi return 0 } end_tests() { touch "${END_MARKER}" ended_successfully } neovim-0.2.2/ci/common/test.sh000066400000000000000000000104571320401574200162130ustar00rootroot00000000000000. "${CI_DIR}/common/build.sh" . "${CI_DIR}/common/suite.sh" print_core() { local app="$1" local core="$2" if test "$app" = quiet ; then echo "Found core $core" return 0 fi echo "======= Core file $core =======" if test "${TRAVIS_OS_NAME}" = osx ; then lldb -Q -o "bt all" -f "${app}" -c "${core}" else gdb -n -batch -ex 'thread apply all bt full' "${app}" -c "${core}" fi } check_core_dumps() { local del= if test "$1" = "--delete" ; then del=1 shift fi local app="${1:-${BUILD_DIR}/bin/nvim}" if test "${TRAVIS_OS_NAME}" = osx ; then local cores="$(find /cores/ -type f -print)" else local cores="$(find ./ -type f -name 'core.*' -print)" fi if test -z "${cores}" ; then return fi local core for core in $cores; do if test "$del" = "1" ; then print_core "$app" "$core" >&2 rm "$core" else print_core "$app" "$core" fi done if test "$app" != quiet ; then fail 'cores' E 'Core dumps found' fi } check_logs() { # Iterate through each log to remove an useless warning. for log in $(find "${1}" -type f -name "${2}"); do sed -i "${log}" \ -e '/Warning: noted but unhandled ioctl/d' \ -e '/could cause spurious value errors to appear/d' \ -e '/See README_MISSING_SYSCALL_OR_IOCTL for guidance/d' done # Now do it again, but only consider files with size > 0. local err="" for log in $(find "${1}" -type f -name "${2}" -size +0); do cat "${log}" err=1 done if test -n "${err}" ; then fail 'logs' E 'Runtime errors detected.' fi } valgrind_check() { check_logs "${1}" "valgrind-*" } asan_check() { check_logs "${1}" "*san.*" } run_unittests() {( enter_suite unittests ulimit -c unlimited || true if ! build_make unittest ; then fail 'unittests' F 'Unit tests failed' fi check_core_dumps "$(which luajit)" exit_suite )} run_functionaltests() {( enter_suite functionaltests ulimit -c unlimited || true if ! build_make ${FUNCTIONALTEST}; then fail 'functionaltests' F 'Functional tests failed' fi asan_check "${LOG_DIR}" valgrind_check "${LOG_DIR}" check_core_dumps exit_suite )} run_oldtests() {( enter_suite oldtests ulimit -c unlimited || true if ! make -C "${TRAVIS_BUILD_DIR}/src/nvim/testdir"; then reset fail 'oldtests' F 'Legacy tests failed' fi asan_check "${LOG_DIR}" valgrind_check "${LOG_DIR}" check_core_dumps exit_suite )} check_runtime_files() {( set +x local test_name="$1" ; shift local message="$1" ; shift local tst="$1" ; shift cd runtime for file in $(git ls-files "$@") ; do # Check that test is not trying to work with files with spaces/etc # Prefer failing the build over using more robust construct because files # with IFS are not welcome. if ! test -e "$file" ; then fail "$test_name" E \ "It appears that $file is only a part of the file name" fi if ! test "$tst" "$INSTALL_PREFIX/share/nvim/runtime/$file" ; then fail "$test_name" F "$(printf "$message" "$file")" fi done )} install_nvim() {( enter_suite 'install_nvim' if ! build_make install ; then fail 'install' E 'make install failed' exit_suite fi "${INSTALL_PREFIX}/bin/nvim" --version if ! "${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall' ; then echo "Running ':help' in the installed nvim failed." echo "Maybe the helptags have not been generated properly." fail 'help' F 'Failed running :help' fi # Check that all runtime files were installed check_runtime_files \ 'runtime-install' \ 'It appears that %s is not installed.' \ -e \ '*.vim' '*.ps' '*.dict' '*.py' '*.tutor' # Check that some runtime files are installed and are executables check_runtime_files \ 'not-exe' \ 'It appears that %s is not installed or is not executable.' \ -x \ '*.awk' '*.sh' '*.bat' # Check that generated syntax file has function names, #5060. local genvimsynf=syntax/vim/generated.vim local gpat='syn keyword vimFuncName .*eval' if ! grep -q "$gpat" "${INSTALL_PREFIX}/share/nvim/runtime/$genvimsynf" ; then fail 'funcnames' F "It appears that $genvimsynf does not contain $gpat." fi exit_suite )} csi_clean() { find "${BUILD_DIR}/bin" -name 'test-includes-*' -delete find "${BUILD_DIR}" -name '*test-include*.o' -delete } neovim-0.2.2/ci/install.sh000077500000000000000000000012431320401574200154060ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail if [[ "${CI_TARGET}" == lint ]]; then exit fi if [[ "${TRAVIS_OS_NAME}" == osx ]]; then brew install gettext brew reinstall -s libtool fi # Use default CC to avoid compilation problems when installing Python modules. echo "Install neovim module and coveralls for Python 2." CC=cc pip2.7 -q install --user --upgrade neovim cpp-coveralls echo "Install neovim module for Python 3." # Allow failure. pyenv pip3 on travis is broken: # https://github.com/travis-ci/travis-ci/issues/8363 CC=cc pip3 -q install --user --upgrade neovim || true echo "Install neovim RubyGem." gem install --no-document --version ">= 0.2.0" neovim neovim-0.2.2/ci/run_lint.sh000077500000000000000000000011451320401574200155730ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CI_DIR}/common/build.sh" source "${CI_DIR}/common/suite.sh" enter_suite 'clint' run_test 'top_make clint-full' clint exit_suite --continue enter_suite 'testlint' run_test 'top_make testlint' testlint exit_suite --continue enter_suite 'lualint' run_test 'top_make lualint' lualint exit_suite --continue enter_suite single-includes CLICOLOR_FORCE=1 run_test_wd \ --allow-hang \ 10s \ 'top_make check-single-includes' \ 'csi_clean' \ single-includes exit_suite --continue end_tests neovim-0.2.2/ci/run_tests.sh000077500000000000000000000011651320401574200157710ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CI_DIR}/common/build.sh" source "${CI_DIR}/common/test.sh" source "${CI_DIR}/common/suite.sh" enter_suite build check_core_dumps --delete quiet prepare_build build_nvim exit_suite --continue enter_suite tests if test "$CLANG_SANITIZER" != "TSAN" ; then # Additional threads are only created when the builtin UI starts, which # doesn't happen in the unit/functional tests run_test run_unittests run_test run_functionaltests fi run_test run_oldtests run_test install_nvim exit_suite --continue end_tests neovim-0.2.2/ci/script.sh000077500000000000000000000005621320401574200152470ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail # This will pass the environment variables down to a bash process which runs # as $USER, while retaining the environment variables defined and belonging # to secondary groups given above in usermod. if [[ "${TRAVIS_OS_NAME}" == osx ]]; then sudo -E su "${USER}" -c "ci/run_${CI_TARGET}.sh" else ci/run_${CI_TARGET}.sh fi neovim-0.2.2/cmake/000077500000000000000000000000001320401574200140665ustar00rootroot00000000000000neovim-0.2.2/cmake/ConvertPo.cmake000066400000000000000000000013111320401574200170030ustar00rootroot00000000000000string(TOUPPER ${INPUT_ENC} upperInputEnc) string(TOLOWER ${INPUT_ENC} lowerInputEnc) get_filename_component(inputName ${INPUT_FILE} NAME) execute_process( COMMAND ${ICONV_PRG} -f ${INPUT_ENC} -t ${OUTPUT_ENC} ${INPUT_FILE} OUTPUT_VARIABLE trans ERROR_VARIABLE err RESULT_VARIABLE res) if(NOT res EQUAL 0) message(FATAL_ERROR "iconv failed to run correctly: ${err}") endif() string(REPLACE "charset=${lowerInputEnc}" "charset=${OUTPUT_CHARSET}" trans "${trans}") string(REPLACE "charset=${upperInputEnc}" "charset=${OUTPUT_CHARSET}" trans "${trans}") string(REPLACE "# Original translations" "# Generated from ${inputName}, DO NOT EDIT" trans "${trans}") file(WRITE ${OUTPUT_FILE} "${trans}") neovim-0.2.2/cmake/Download.cmake000066400000000000000000000005571320401574200166460ustar00rootroot00000000000000file( DOWNLOAD "${URL}" "${FILE}" STATUS status LOG log ) list(GET status 0 status_code) list(GET status 1 status_string) if(NOT status_code EQUAL 0) if(NOT ALLOW_FAILURE) message(FATAL_ERROR "error: downloading '${URL}' failed status_code: ${status_code} status_string: ${status_string} log: ${log} ") endif() endif() neovim-0.2.2/cmake/FindIconv.cmake000066400000000000000000000006721320401574200167540ustar00rootroot00000000000000# - Try to find iconv # Once done, this will define # # Iconv_FOUND - system has iconv # Iconv_INCLUDE_DIRS - the iconv include directories # Iconv_LIBRARIES - link these to use iconv include(LibFindMacros) find_path(ICONV_INCLUDE_DIR NAMES iconv.h) find_library(ICONV_LIBRARY NAMES iconv) set(Iconv_PROCESS_INCLUDES ICONV_INCLUDE_DIR) if(ICONV_LIBRARY) set(Iconv_PROCESS_LIBS ICONV_LIBRARY) endif() libfind_process(Iconv) neovim-0.2.2/cmake/FindJeMalloc.cmake000066400000000000000000000032131320401574200173560ustar00rootroot00000000000000# - Try to find jemalloc # Once done this will define # JEMALLOC_FOUND - System has jemalloc # JEMALLOC_INCLUDE_DIRS - The jemalloc include directories # JEMALLOC_LIBRARIES - The libraries needed to use jemalloc if(NOT USE_BUNDLED_JEMALLOC) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_JEMALLOC QUIET jemalloc) endif() else() set(PC_JEMALLOC_INCLUDEDIR) set(PC_JEMALLOC_INCLUDE_DIRS) set(PC_JEMALLOC_LIBDIR) set(PC_JEMALLOC_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(JEMALLOC_DEFINITIONS ${PC_JEMALLOC_CFLAGS_OTHER}) find_path(JEMALLOC_INCLUDE_DIR jemalloc/jemalloc.h PATHS ${PC_JEMALLOC_INCLUDEDIR} ${PC_JEMALLOC_INCLUDE_DIRS} ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libjemalloc.a as a preferred library name. if(JEMALLOC_USE_STATIC) list(APPEND JEMALLOC_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}jemalloc${CMAKE_STATIC_LIBRARY_SUFFIX}") elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") list(INSERT JEMALLOC_NAMES 0 "${CMAKE_STATIC_LIBRARY_PREFIX}jemalloc${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() list(APPEND JEMALLOC_NAMES jemalloc) find_library(JEMALLOC_LIBRARY NAMES ${JEMALLOC_NAMES} HINTS ${PC_JEMALLOC_LIBDIR} ${PC_JEMALLOC_LIBRARY_DIRS} ${LIMIT_SEARCH}) set(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY}) set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(JeMalloc DEFAULT_MSG JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR) mark_as_advanced(JEMALLOC_INCLUDE_DIR JEMALLOC_LIBRARY) neovim-0.2.2/cmake/FindLibIntl.cmake000066400000000000000000000032261320401574200172310ustar00rootroot00000000000000# - Try to find libintl # Once done, this will define # # LibIntl_FOUND - system has libintl # LibIntl_INCLUDE_DIRS - the libintl include directories # LibIntl_LIBRARIES - link these to use libintl include(CheckCSourceCompiles) include(CheckVariableExists) include(LibFindMacros) # Append custom gettext path to CMAKE_PREFIX_PATH # if installed via Mac Hombrew if (CMAKE_HOST_APPLE) find_program(HOMEBREW_PROG brew) if (EXISTS ${HOMEBREW_PROG}) execute_process(COMMAND ${HOMEBREW_PROG} --prefix gettext OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE HOMEBREW_GETTEXT_PREFIX) list(APPEND CMAKE_PREFIX_PATH "${HOMEBREW_GETTEXT_PREFIX}") endif() endif() find_path(LibIntl_INCLUDE_DIR NAMES libintl.h PATH_SUFFIXES gettext ) find_library(LibIntl_LIBRARY NAMES intl libintl.a ) if (LibIntl_INCLUDE_DIR) set(CMAKE_REQUIRED_INCLUDES "${LibIntl_INCLUDE_DIR}") endif() # This is required because some operating systems don't have a separate # libintl--it is built into glibc. So we only need to specify the library # if one was actually found. if (LibIntl_LIBRARY) set(CMAKE_REQUIRED_LIBRARIES "${LibIntl_LIBRARY}") endif() check_c_source_compiles(" #include int main(int argc, char** argv) { gettext(\"foo\"); ngettext(\"foo\", \"bar\", 1); bindtextdomain(\"foo\", \"bar\"); bind_textdomain_codeset(\"foo\", \"bar\"); textdomain(\"foo\"); }" HAVE_WORKING_LIBINTL) if (HAVE_WORKING_LIBINTL) check_variable_exists(_nl_msg_cat_cntr HAVE_NL_MSG_CAT_CNTR) endif() set(LibIntl_PROCESS_INCLUDES LibIntl_INCLUDE_DIR) set(LibIntl_PROCESS_LIBS LibIntl_LIBRARY) libfind_process(LibIntl) neovim-0.2.2/cmake/FindLibTermkey.cmake000066400000000000000000000030471320401574200177440ustar00rootroot00000000000000# - Try to find libtermkey # Once done this will define # LIBTERMKEY_FOUND - System has libtermkey # LIBTERMKEY_INCLUDE_DIRS - The libtermkey include directories # LIBTERMKEY_LIBRARIES - The libraries needed to use libtermkey if(NOT USE_BUNDLED_LIBTERMKEY) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_LIBTERMKEY QUIET termkey) endif() else() set(PC_LIBTERMKEY_INCLUDEDIR) set(PC_LIBTERMKEY_INCLUDE_DIRS) set(PC_LIBTERMKEY_LIBDIR) set(PC_LIBTERMKEY_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(LIBTERMKEY_DEFINITIONS ${PC_LIBTERMKEY_CFLAGS_OTHER}) find_path(LIBTERMKEY_INCLUDE_DIR termkey.h PATHS ${PC_LIBTERMKEY_INCLUDEDIR} ${PC_LIBTERMKEY_INCLUDE_DIRS} ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libuv.a as a preferred library name. if(LIBTERMKEY_USE_STATIC) list(APPEND LIBTERMKEY_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}termkey${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() list(APPEND LIBTERMKEY_NAMES termkey) find_library(LIBTERMKEY_LIBRARY NAMES ${LIBTERMKEY_NAMES} HINTS ${PC_LIBTERMKEY_LIBDIR} ${PC_LIBTERMKEY_LIBRARY_DIRS} ${LIMIT_SEARCH}) set(LIBTERMKEY_LIBRARIES ${LIBTERMKEY_LIBRARY}) set(LIBTERMKEY_INCLUDE_DIRS ${LIBTERMKEY_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LIBTERMKEY_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(LibTermkey DEFAULT_MSG LIBTERMKEY_LIBRARY LIBTERMKEY_INCLUDE_DIR) mark_as_advanced(LIBTERMKEY_INCLUDE_DIR LIBTERMKEY_LIBRARY) neovim-0.2.2/cmake/FindLibUV.cmake000066400000000000000000000056511320401574200166610ustar00rootroot00000000000000# - Try to find libuv # Once done, this will define # # LIBUV_FOUND - system has libuv # LIBUV_INCLUDE_DIRS - the libuv include directories # LIBUV_LIBRARIES - link these to use libuv # # Set the LIBUV_USE_STATIC variable to specify if static libraries should # be preferred to shared ones. if(NOT USE_BUNDLED_LIBUV) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_LIBUV QUIET libuv) endif() else() set(PC_LIBUV_INCLUDEDIR) set(PC_LIBUV_INCLUDE_DIRS) set(PC_LIBUV_LIBDIR) set(PC_LIBUV_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() find_path(LIBUV_INCLUDE_DIR uv.h HINTS ${PC_LIBUV_INCLUDEDIR} ${PC_LIBUV_INCLUDE_DIRS} ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libuv.a as a preferred library name. if(LIBUV_USE_STATIC) list(APPEND LIBUV_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}uv${CMAKE_STATIC_LIBRARY_SUFFIX}") endif(LIBUV_USE_STATIC) if(MSVC) list(APPEND LIBUV_NAMES libuv) else() list(APPEND LIBUV_NAMES uv) endif() find_library(LIBUV_LIBRARY NAMES ${LIBUV_NAMES} HINTS ${PC_LIBUV_LIBDIR} ${PC_LIBUV_LIBRARY_DIRS} ${LIMIT_SEARCH}) mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARY) if(PC_LIBUV_LIBRARIES) list(REMOVE_ITEM PC_LIBUV_LIBRARIES uv) endif() set(LIBUV_LIBRARIES ${LIBUV_LIBRARY} ${PC_LIBUV_LIBRARIES}) set(LIBUV_INCLUDE_DIRS ${LIBUV_INCLUDE_DIR}) # Deal with the fact that libuv.pc is missing important dependency information. include(CheckLibraryExists) check_library_exists(dl dlopen "dlfcn.h" HAVE_LIBDL) if(HAVE_LIBDL) list(APPEND LIBUV_LIBRARIES dl) endif() check_library_exists(kstat kstat_lookup "kstat.h" HAVE_LIBKSTAT) if(HAVE_LIBKSTAT) list(APPEND LIBUV_LIBRARIES kstat) endif() check_library_exists(kvm kvm_open "kvm.h" HAVE_LIBKVM) if(HAVE_LIBKVM AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") list(APPEND LIBUV_LIBRARIES kvm) endif() check_library_exists(nsl gethostbyname "nsl.h" HAVE_LIBNSL) if(HAVE_LIBNSL) list(APPEND LIBUV_LIBRARIES nsl) endif() check_library_exists(perfstat perfstat_cpu "libperfstat.h" HAVE_LIBPERFSTAT) if(HAVE_LIBPERFSTAT) list(APPEND LIBUV_LIBRARIES perfstat) endif() check_library_exists(rt clock_gettime "time.h" HAVE_LIBRT) if(HAVE_LIBRT) list(APPEND LIBUV_LIBRARIES rt) endif() check_library_exists(sendfile sendfile "" HAVE_LIBSENDFILE) if(HAVE_LIBSENDFILE) list(APPEND LIBUV_LIBRARIES sendfile) endif() if(WIN32) # check_library_exists() does not work for Win32 API calls in X86 due to name # mangling calling conventions list(APPEND LIBUV_LIBRARIES iphlpapi) list(APPEND LIBUV_LIBRARIES psapi) list(APPEND LIBUV_LIBRARIES userenv) list(APPEND LIBUV_LIBRARIES ws2_32) endif() include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LIBUV_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(LibUV DEFAULT_MSG LIBUV_LIBRARY LIBUV_INCLUDE_DIR) mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARY) neovim-0.2.2/cmake/FindLibVterm.cmake000066400000000000000000000027311320401574200174200ustar00rootroot00000000000000# - Try to find libvterm # Once done this will define # LIBVTERM_FOUND - System has libvterm # LIBVTERM_INCLUDE_DIRS - The libvterm include directories # LIBVTERM_LIBRARIES - The libraries needed to use libvterm if(NOT USE_BUNDLED_LIBVTERM) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_LIBVTERM QUIET vterm) endif() else() set(PC_LIBVTERM_INCLUDEDIR) set(PC_LIBVTERM_INCLUDE_DIRS) set(PC_LIBVTERM_LIBDIR) set(PC_LIBVTERM_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(LIBVTERM_DEFINITIONS ${PC_LIBVTERM_CFLAGS_OTHER}) find_path(LIBVTERM_INCLUDE_DIR vterm.h PATHS ${PC_LIBVTERM_INCLUDEDIR} ${PC_LIBVTERM_INCLUDE_DIRS} ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libuv.a as a preferred library name. if(LIBVTERM_USE_STATIC) list(APPEND LIBVTERM_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}vterm${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() list(APPEND LIBVTERM_NAMES vterm) find_library(LIBVTERM_LIBRARY NAMES ${LIBVTERM_NAMES} HINTS ${PC_LIBVTERM_LIBDIR} ${PC_LIBVTERM_LIBRARY_DIRS} ${LIMIT_SEARCH}) set(LIBVTERM_LIBRARIES ${LIBVTERM_LIBRARY}) set(LIBVTERM_INCLUDE_DIRS ${LIBVTERM_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LIBVTERM_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(LibVterm DEFAULT_MSG LIBVTERM_LIBRARY LIBVTERM_INCLUDE_DIR) mark_as_advanced(LIBVTERM_INCLUDE_DIR LIBVTERM_LIBRARY) neovim-0.2.2/cmake/FindLua.cmake000066400000000000000000000160021320401574200164110ustar00rootroot00000000000000# Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. #.rst: # FindLua # ------- # # # # Locate Lua library This module defines # # :: # # LUA_FOUND - if false, do not try to link to Lua # LUA_LIBRARIES - both lua and lualib # LUA_INCLUDE_DIR - where to find lua.h # LUA_VERSION_STRING - the version of Lua found # LUA_VERSION_MAJOR - the major version of Lua # LUA_VERSION_MINOR - the minor version of Lua # LUA_VERSION_PATCH - the patch version of Lua # # # # Note that the expected include convention is # # :: # # #include "lua.h" # # and not # # :: # # #include # # This is because, the lua location is not standardized and may exist in # locations other than lua/ unset(_lua_include_subdirs) unset(_lua_library_names) unset(_lua_append_versions) # this is a function only to have all the variables inside go away automatically function(_lua_set_version_vars) set(LUA_VERSIONS5 5.3 5.2 5.1 5.0) if (Lua_FIND_VERSION_EXACT) if (Lua_FIND_VERSION_COUNT GREATER 1) set(_lua_append_versions ${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}) endif () elseif (Lua_FIND_VERSION) # once there is a different major version supported this should become a loop if (NOT Lua_FIND_VERSION_MAJOR GREATER 5) if (Lua_FIND_VERSION_COUNT EQUAL 1) set(_lua_append_versions ${LUA_VERSIONS5}) else () foreach (subver IN LISTS LUA_VERSIONS5) if (NOT subver VERSION_LESS ${Lua_FIND_VERSION}) list(APPEND _lua_append_versions ${subver}) endif () endforeach () endif () endif () else () # once there is a different major version supported this should become a loop set(_lua_append_versions ${LUA_VERSIONS5}) endif () list(APPEND _lua_include_subdirs "include/lua" "include") foreach (ver IN LISTS _lua_append_versions) string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _ver "${ver}") list(APPEND _lua_include_subdirs include/lua${CMAKE_MATCH_1}${CMAKE_MATCH_2} include/lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2} include/lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2} ) endforeach () set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE) set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE) endfunction(_lua_set_version_vars) function(_lua_check_header_version _hdr_file) # At least 5.[012] have different ways to express the version # so all of them need to be tested. Lua 5.2 defines LUA_VERSION # and LUA_RELEASE as joined by the C preprocessor, so avoid those. file(STRINGS "${_hdr_file}" lua_version_strings REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*") string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};") if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$") string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};") string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};") set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}") else () string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$") string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") endif () string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}") string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}") string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}") endif () foreach (ver IN LISTS _lua_append_versions) if (ver STREQUAL "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}") set(LUA_VERSION_MAJOR ${LUA_VERSION_MAJOR} PARENT_SCOPE) set(LUA_VERSION_MINOR ${LUA_VERSION_MINOR} PARENT_SCOPE) set(LUA_VERSION_PATCH ${LUA_VERSION_PATCH} PARENT_SCOPE) set(LUA_VERSION_STRING ${LUA_VERSION_STRING} PARENT_SCOPE) return() endif () endforeach () endfunction(_lua_check_header_version) _lua_set_version_vars() if (LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h") _lua_check_header_version("${LUA_INCLUDE_DIR}/lua.h") endif () if (NOT LUA_VERSION_STRING) foreach (subdir IN LISTS _lua_include_subdirs) unset(LUA_INCLUDE_PREFIX CACHE) find_path(LUA_INCLUDE_PREFIX ${subdir}/lua.h HINTS ENV LUA_DIR PATHS ~/Library/Frameworks /Library/Frameworks /sw # Fink /opt/local # DarwinPorts /opt/csw # Blastwave /opt ) if (LUA_INCLUDE_PREFIX) _lua_check_header_version("${LUA_INCLUDE_PREFIX}/${subdir}/lua.h") if (LUA_VERSION_STRING) set(LUA_INCLUDE_DIR "${LUA_INCLUDE_PREFIX}/${subdir}") break() endif () endif () endforeach () endif () unset(_lua_include_subdirs) unset(_lua_append_versions) if (LUA_VERSION_STRING) set(_lua_library_names lua${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR} lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} lua.${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} ) endif () find_library(LUA_LIBRARY NAMES ${_lua_library_names} lua HINTS ENV LUA_DIR PATH_SUFFIXES lib PATHS ~/Library/Frameworks /Library/Frameworks /sw /opt/local /opt/csw /opt ) unset(_lua_library_names) if (LUA_LIBRARY) # include the math library for Unix if (UNIX AND NOT APPLE AND NOT BEOS) find_library(LUA_MATH_LIBRARY m) set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}") # include dl library for statically-linked Lua library get_filename_component(LUA_LIB_EXT ${LUA_LIBRARY} EXT) if(LUA_LIB_EXT STREQUAL CMAKE_STATIC_LIBRARY_SUFFIX) list(APPEND LUA_LIBRARIES ${CMAKE_DL_LIBS}) endif() # For Windows and Mac, don't need to explicitly include the math library else () set(LUA_LIBRARIES "${LUA_LIBRARY}") endif () endif () include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if # all listed variables are TRUE FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR VERSION_VAR LUA_VERSION_STRING) mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY) neovim-0.2.2/cmake/FindLuaJit.cmake000066400000000000000000000032001320401574200170540ustar00rootroot00000000000000# - Try to find luajit # Once done this will define # LUAJIT_FOUND - System has luajit # LUAJIT_INCLUDE_DIRS - The luajit include directories # LUAJIT_LIBRARIES - The libraries needed to use luajit if(NOT USE_BUNDLED_LUAJIT) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_LUAJIT QUIET luajit) endif() else() set(PC_LUAJIT_INCLUDEDIR) set(PC_LUAJIT_INCLUDE_DIRS) set(PC_LUAJIT_LIBDIR) set(PC_LUAJIT_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(LUAJIT_DEFINITIONS ${PC_LUAJIT_CFLAGS_OTHER}) find_path(LUAJIT_INCLUDE_DIR luajit.h PATHS ${PC_LUAJIT_INCLUDEDIR} ${PC_LUAJIT_INCLUDE_DIRS} PATH_SUFFIXES luajit-2.0 ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libluajit-5.1.a as a preferred # library name. if(LUAJIT_USE_STATIC) list(APPEND LUAJIT_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}luajit-5.1${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() if(MSVC) list(APPEND LUAJIT_NAMES lua51) elseif(MINGW) list(APPEND LUAJIT_NAMES libluajit libluajit-5.1) else() list(APPEND LUAJIT_NAMES luajit-5.1) endif() find_library(LUAJIT_LIBRARY NAMES ${LUAJIT_NAMES} PATHS ${PC_LUAJIT_LIBDIR} ${PC_LUAJIT_LIBRARY_DIRS} ${LIMIT_SEARCH}) set(LUAJIT_LIBRARIES ${LUAJIT_LIBRARY}) set(LUAJIT_INCLUDE_DIRS ${LUAJIT_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(LuaJit DEFAULT_MSG LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR) mark_as_advanced(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARY) neovim-0.2.2/cmake/FindMsgpack.cmake000066400000000000000000000047361320401574200172700ustar00rootroot00000000000000# - Try to find msgpack # Once done this will define # MSGPACK_FOUND - System has msgpack # MSGPACK_INCLUDE_DIRS - The msgpack include directories # MSGPACK_LIBRARIES - The libraries needed to use msgpack if(NOT USE_BUNDLED_MSGPACK) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_search_module(PC_MSGPACK QUIET msgpackc>=${Msgpack_FIND_VERSION} msgpack>=${Msgpack_FIND_VERSION}) endif() else() set(PC_MSGPACK_INCLUDEDIR) set(PC_MSGPACK_INCLUDE_DIRS) set(PC_MSGPACK_LIBDIR) set(PC_MSGPACK_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(MSGPACK_DEFINITIONS ${PC_MSGPACK_CFLAGS_OTHER}) find_path(MSGPACK_INCLUDE_DIR msgpack/version_master.h HINTS ${PC_MSGPACK_INCLUDEDIR} ${PC_MSGPACK_INCLUDE_DIRS} ${LIMIT_SEARCH}) if(MSGPACK_INCLUDE_DIR) file(READ ${MSGPACK_INCLUDE_DIR}/msgpack/version_master.h msgpack_version_h) string(REGEX REPLACE ".*MSGPACK_VERSION_MAJOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MAJOR "${msgpack_version_h}") string(REGEX REPLACE ".*MSGPACK_VERSION_MINOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MINOR "${msgpack_version_h}") string(REGEX REPLACE ".*MSGPACK_VERSION_REVISION +([0-9]+).*" "\\1" MSGPACK_VERSION_REVISION "${msgpack_version_h}") set(MSGPACK_VERSION_STRING "${MSGPACK_VERSION_MAJOR}.${MSGPACK_VERSION_MINOR}.${MSGPACK_VERSION_REVISION}") else() set(MSGPACK_VERSION_STRING) endif() # If we're asked to use static linkage, add libmsgpack{,c}.a as a preferred library name. if(MSGPACK_USE_STATIC) list(APPEND MSGPACK_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}msgpackc${CMAKE_STATIC_LIBRARY_SUFFIX}" "${CMAKE_STATIC_LIBRARY_PREFIX}msgpack${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() if(MSVC) # The import library for the msgpack DLL has a different name list(APPEND MSGPACK_NAMES msgpack_import) else() list(APPEND MSGPACK_NAMES msgpackc msgpack) endif() find_library(MSGPACK_LIBRARY NAMES ${MSGPACK_NAMES} # Check each directory for all names to avoid using headers/libraries from # different places. NAMES_PER_DIR HINTS ${PC_MSGPACK_LIBDIR} ${PC_MSGPACK_LIBRARY_DIRS} ${LIMIT_SEARCH}) mark_as_advanced(MSGPACK_INCLUDE_DIR MSGPACK_LIBRARY) set(MSGPACK_LIBRARIES ${MSGPACK_LIBRARY}) set(MSGPACK_INCLUDE_DIRS ${MSGPACK_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set MSGPACK_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(Msgpack REQUIRED_VARS MSGPACK_LIBRARY MSGPACK_INCLUDE_DIR VERSION_VAR MSGPACK_VERSION_STRING) neovim-0.2.2/cmake/FindUnibilium.cmake000066400000000000000000000030231320401574200176240ustar00rootroot00000000000000# - Try to find unibilium # Once done this will define # UNIBILIUM_FOUND - System has unibilium # UNIBILIUM_INCLUDE_DIRS - The unibilium include directories # UNIBILIUM_LIBRARIES - The libraries needed to use unibilium if(NOT USE_BUNDLED_UNIBILIUM) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_UNIBILIUM QUIET unibilium) endif() else() set(PC_UNIBILIUM_INCLUDEDIR) set(PC_UNIBILIUM_INCLUDE_DIRS) set(PC_UNIBILIUM_LIBDIR) set(PC_UNIBILIUM_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(UNIBILIUM_DEFINITIONS ${PC_UNIBILIUM_CFLAGS_OTHER}) find_path(UNIBILIUM_INCLUDE_DIR unibilium.h PATHS ${PC_UNIBILIUM_INCLUDEDIR} ${PC_UNIBILIUM_INCLUDE_DIRS} ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libunibilium.a as a preferred library name. if(UNIBILIUM_USE_STATIC) list(APPEND UNIBILIUM_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}unibilium${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() list(APPEND UNIBILIUM_NAMES unibilium) find_library(UNIBILIUM_LIBRARY NAMES ${UNIBILIUM_NAMES} HINTS ${PC_UNIBILIUM_LIBDIR} ${PC_UNIBILIUM_LIBRARY_DIRS} ${LIMIT_SEARCH}) set(UNIBILIUM_LIBRARIES ${UNIBILIUM_LIBRARY}) set(UNIBILIUM_INCLUDE_DIRS ${UNIBILIUM_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set UNIBILIUM_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(unibilium DEFAULT_MSG UNIBILIUM_LIBRARY UNIBILIUM_INCLUDE_DIR) mark_as_advanced(UNIBILIUM_INCLUDE_DIR UNIBILIUM_LIBRARY) neovim-0.2.2/cmake/FindWinpty.cmake000066400000000000000000000005041320401574200171620ustar00rootroot00000000000000include(LibFindMacros) find_path(WINPTY_INCLUDE_DIR winpty.h) set(WINPTY_INCLUDE_DIRS ${WINPTY_INCLUDE_DIR}) find_library(WINPTY_LIBRARY winpty) find_program(WINPTY_AGENT_EXE winpty-agent.exe) set(WINPTY_LIBRARIES ${WINPTY_LIBRARY}) find_package_handle_standard_args(Winpty DEFAULT_MSG WINPTY_LIBRARY WINPTY_INCLUDE_DIR) neovim-0.2.2/cmake/GenerateHelptags.cmake.in000066400000000000000000000025211320401574200207170ustar00rootroot00000000000000if(DEFINED ENV{DESTDIR}) file(TO_CMAKE_PATH $ENV{DESTDIR}/@CMAKE_INSTALL_FULL_DATADIR@/nvim/runtime/doc HELPTAGS_WORKING_DIRECTORY) else() file(TO_CMAKE_PATH @CMAKE_INSTALL_FULL_DATADIR@/nvim/runtime/doc HELPTAGS_WORKING_DIRECTORY) endif() message(STATUS "Generating helptags in ${HELPTAGS_WORKING_DIRECTORY}.") if(EXISTS ${HELPTAGS_WORKING_DIRECTORY}/) message(STATUS "${HELPTAGS_WORKING_DIRECTORY} already exists") # If the doc directory already exists, helptags could fail due to duplicate # tags. Tell the user to remove the directory and try again. set(TROUBLESHOOTING "\nRemove \"${HELPTAGS_WORKING_DIRECTORY}\" and try again.") endif() # Workaround for hanging "yes | nvim -c 'helptags ++t .'" # and therefore hanging "yes | make install": # Set INPUT_FILE to an empty file, causing execute_process # to disregard other standard input (such as "yes |"). set(EMPTY_FILE ${CMAKE_CURRENT_BINARY_DIR}/.GenerateHelptags) file(WRITE ${EMPTY_FILE} "") execute_process( COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bin/nvim -u NONE -es -c "helptags ++t ." -c quit WORKING_DIRECTORY ${HELPTAGS_WORKING_DIRECTORY} INPUT_FILE ${EMPTY_FILE} OUTPUT_VARIABLE err ERROR_VARIABLE err RESULT_VARIABLE res) if(NOT res EQUAL 0) message(FATAL_ERROR "Generating helptags failed: ${err} - ${res}${TROUBLESHOOTING}") endif() neovim-0.2.2/cmake/GetCompileFlags.cmake000066400000000000000000000026431320401574200201020ustar00rootroot00000000000000function(get_compile_flags _compile_flags) # Create template akin to CMAKE_C_COMPILE_OBJECT. set(compile_flags " ") # Get C compiler. string(REPLACE "" "${CMAKE_C_COMPILER}" compile_flags "${compile_flags}") # Get flags set by add_definition(). get_directory_property(definitions DIRECTORY "src/nvim" DEFINITIONS) string(REPLACE "" "${definitions}" compile_flags "${compile_flags}") # Get general C flags. string(REPLACE "" "${CMAKE_C_FLAGS}" compile_flags "${compile_flags}") # Get C flags specific to build type. string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type) string(REPLACE "" "${CMAKE_C_FLAGS_${build_type}}" compile_flags "${compile_flags}") # Get include directories. get_directory_property(include_directories_list DIRECTORY "src/nvim" INCLUDE_DIRECTORIES) foreach(include_directory ${include_directories_list}) set(include_directories "${include_directories} -I${include_directory}") endforeach() string(REPLACE "" "${include_directories}" compile_flags "${compile_flags}") # Clean duplicate whitespace. string(REPLACE " " " " compile_flags "${compile_flags}") set(${_compile_flags} "${compile_flags}" PARENT_SCOPE) endfunction() neovim-0.2.2/cmake/GetGitRevisionDescription.cmake000066400000000000000000000114321320401574200221770ustar00rootroot00000000000000# https://github.com/rpavlik/cmake-modules # # - Returns a version string from Git # # These functions force a re-configure on each git commit so that you can # trust the values of the variables in your build system. # # get_git_head_revision( [ ...]) # # Returns the refspec and sha hash of the current head revision # # git_describe( [ ...]) # # Returns the results of git describe on the source tree, and adjusting # the output so that it tests false if an error occurs. # # git_get_exact_tag( [ ...]) # # Returns the results of git describe --exact-match on the source tree, # and adjusting the output so that it tests false if there was no exact # matching tag. # # Requires CMake 2.6 or newer (uses the 'function' command) # # Original Author: # 2009-2010 Ryan Pavlik # http://academic.cleardefinition.com # Iowa State University HCI Graduate Program/VRAC # # Copyright Iowa State University 2009-2010. # 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) if(__get_git_revision_description) return() endif() set(__get_git_revision_description YES) # We must run the following at "include" time, not at function call time, # to find the path to this module rather than the path to a calling list file get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) function(get_git_dir _gitdir) # check FORCED_GIT_DIR first if(FORCED_GIT_DIR) set(${_gitdir} ${FORCED_GIT_DIR} PARENT_SCOPE) return() endif() # check GIT_DIR in environment set(GIT_DIR $ENV{GIT_DIR}) if(NOT GIT_DIR) set(GIT_PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(GIT_DIR ${GIT_PARENT_DIR}/.git) endif() # .git dir not found, search parent directories while(NOT EXISTS ${GIT_DIR}) set(GIT_PREVIOUS_PARENT ${GIT_PARENT_DIR}) get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) return() endif() set(GIT_DIR ${GIT_PARENT_DIR}/.git) endwhile() # check if this is a submodule if(NOT IS_DIRECTORY ${GIT_DIR}) file(READ ${GIT_DIR} submodule) string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule}) get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH) get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE) endif() set(${_gitdir} ${GIT_DIR} PARENT_SCOPE) endfunction() function(get_git_head_revision _refspecvar _hashvar) get_git_dir(GIT_DIR) if(NOT GIT_DIR) return() endif() set(GIT_DATA ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data) if(NOT EXISTS ${GIT_DATA}) file(MAKE_DIRECTORY ${GIT_DATA}) endif() if(NOT EXISTS ${GIT_DIR}/HEAD) return() endif() set(HEAD_FILE ${GIT_DATA}/HEAD) configure_file(${GIT_DIR}/HEAD ${HEAD_FILE} COPYONLY) configure_file(${_gitdescmoddir}/GetGitRevisionDescription.cmake.in ${GIT_DATA}/grabRef.cmake @ONLY) include(${GIT_DATA}/grabRef.cmake) set(${_refspecvar} ${HEAD_REF} PARENT_SCOPE) set(${_hashvar} ${HEAD_HASH} PARENT_SCOPE) endfunction() function(git_describe _var) get_git_dir(GIT_DIR) if(NOT GIT_DIR) return() endif() if(NOT GIT_FOUND) find_package(Git QUIET) endif() if(NOT GIT_FOUND) set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) return() endif() get_git_head_revision(refspec hash) if(NOT hash) set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) return() endif() execute_process(COMMAND ${GIT_EXECUTABLE} describe ${hash} ${ARGN} WORKING_DIRECTORY ${GIT_DIR} RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT res EQUAL 0) set(out "${out}-${res}-NOTFOUND") endif() set(${_var} ${out} PARENT_SCOPE) endfunction() function(git_timestamp _var) get_git_dir(GIT_DIR) if(NOT GIT_DIR) return() endif() if(NOT GIT_FOUND) find_package(Git QUIET) endif() if(NOT GIT_FOUND) return() endif() get_git_head_revision(refspec hash) if(NOT hash) set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) return() endif() execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --format="%ci" ${hash} ${ARGN} WORKING_DIRECTORY ${GIT_DIR} RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) if(res EQUAL 0) string(REGEX REPLACE "[-\" :]" "" out ${out}) string(SUBSTRING ${out} 0 12 out) else() set(out "${out}-${res}-NOTFOUND") endif() set(${_var} ${out} PARENT_SCOPE) endfunction() function(git_get_exact_tag _var) git_describe(out --exact-match ${ARGN}) set(${_var} ${out} PARENT_SCOPE) endfunction() neovim-0.2.2/cmake/GetGitRevisionDescription.cmake.in000066400000000000000000000023011320401574200225770ustar00rootroot00000000000000# # Internal file for GetGitRevisionDescription.cmake # # Requires CMake 2.6 or newer (uses the 'function' command) # # Original Author: # 2009-2010 Ryan Pavlik # http://academic.cleardefinition.com # Iowa State University HCI Graduate Program/VRAC # # Copyright Iowa State University 2009-2010. # 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) set(HEAD_HASH) file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) if(HEAD_CONTENTS MATCHES "ref") # named branch string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") if(EXISTS "@GIT_DIR@/${HEAD_REF}") configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}") configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) set(HEAD_HASH "${HEAD_REF}") endif() else() # detached HEAD configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) endif() if(NOT HEAD_HASH) file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) string(STRIP "${HEAD_HASH}" HEAD_HASH) endif() neovim-0.2.2/cmake/InstallClintErrors.cmake000066400000000000000000000001261320401574200206640ustar00rootroot00000000000000file(GLOB_RECURSE JSON_FILES *.json) file(COPY ${JSON_FILES} DESTINATION "${TARGET}") neovim-0.2.2/cmake/InstallHelpers.cmake000066400000000000000000000115671320401574200200330ustar00rootroot00000000000000# Fix CMAKE_INSTALL_MANDIR on BSD before including GNUInstallDirs. #6771 if(CMAKE_SYSTEM_NAME MATCHES "BSD" AND NOT DEFINED CMAKE_INSTALL_MANDIR) if(DEFINED ENV{MANPREFIX}) set(CMAKE_INSTALL_MANDIR "$ENV{MANPREFIX}/man") elseif(CMAKE_INSTALL_PREFIX MATCHES "^/usr/local$") set(CMAKE_INSTALL_MANDIR "man") endif() endif() # For $CMAKE_INSTALL_{DATAROOT,MAN, ...}DIR include(GNUInstallDirs) # This will create any directories that need to be created in the destination # path with the typical owner, group, and user permissions--independent of the # umask setting. function(create_install_dir_with_perms) cmake_parse_arguments(_install_dir "" "DESTINATION" "DIRECTORY_PERMISSIONS" ${ARGN} ) if(NOT _install_dir_DESTINATION) message(FATAL_ERROR "Must specify DESTINATION") endif() if(NOT _install_dir_DIRECTORY_PERMISSIONS) set(_install_dir_DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() install(CODE " set(_current_dir \"\${CMAKE_INSTALL_PREFIX}/${_install_dir_DESTINATION}\") set(_dir_permissions \"${_install_dir_DIRECTORY_PERMISSIONS}\") set(_parent_dirs) set(_prev_dir) # Explicitly prepend DESTDIR when using EXISTS. # file(INSTALL ...) implicitly respects DESTDIR, but EXISTS does not. while(NOT EXISTS \$ENV{DESTDIR}\${_current_dir} AND NOT \${_prev_dir} STREQUAL \${_current_dir}) list(APPEND _parent_dirs \${_current_dir}) set(_prev_dir \${_current_dir}) get_filename_component(_current_dir \${_current_dir} PATH) endwhile() if(_parent_dirs) list(REVERSE _parent_dirs) endif() # Create any missing folders with the useful permissions. Note: this uses # a hidden option of CMake, but it's been shown to work with 2.8.11 thru # 3.0.2. foreach(_current_dir \${_parent_dirs}) if(NOT IS_DIRECTORY \${_current_dir}) # file(INSTALL ...) implicitly respects DESTDIR, so there's no need to # prepend it here. file(INSTALL DESTINATION \${_current_dir} TYPE DIRECTORY DIR_PERMISSIONS \${_dir_permissions} FILES \"\") endif() endforeach() ") endfunction() # This is to prevent the user's umask from corrupting the expected permissions # for the parent directories. We want to behave like the install tool here: # preserve what's there already, but create new things with useful permissions. function(install_helper) cmake_parse_arguments(_install_helper "" "DESTINATION;DIRECTORY;RENAME" "FILES;PROGRAMS;TARGETS;DIRECTORY_PERMISSIONS;FILE_PERMISSIONS" ${ARGN} ) if(NOT _install_helper_DESTINATION AND NOT _install_helper_TARGETS) message(FATAL_ERROR "Must specify the DESTINATION path") endif() if(NOT _install_helper_FILES AND NOT _install_helper_DIRECTORY AND NOT _install_helper_PROGRAMS AND NOT _install_helper_TARGETS) message(FATAL_ERROR "Must specify FILES, PROGRAMS, TARGETS, or a DIRECTORY to install") endif() if(NOT _install_helper_DIRECTORY_PERMISSIONS) set(_install_helper_DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() if(NOT _install_helper_FILE_PERMISSIONS) set(_install_helper_FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) endif() if(NOT _install_helper_PROGRAM_PERMISSIONS) set(_install_helper_PROGRAM_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() if(_install_helper_RENAME) set(RENAME RENAME ${_install_helper_RENAME}) endif() if(_install_helper_TARGETS) set(_install_helper_DESTINATION "") endif() if(_install_helper_TARGETS) # Ensure the bin area exists with the correct permissions. create_install_dir_with_perms(DESTINATION ${CMAKE_INSTALL_BINDIR}) install( TARGETS ${_install_helper_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) else() create_install_dir_with_perms( DESTINATION ${_install_helper_DESTINATION} DIRECTORY_PERMISSIONS ${_install_helper_DIRECTORY_PERMISSIONS}) endif() if(_install_helper_DIRECTORY) install( DIRECTORY ${_install_helper_DIRECTORY} DESTINATION ${_install_helper_DESTINATION} DIRECTORY_PERMISSIONS ${_install_helper_DIRECTORY_PERMISSIONS} FILE_PERMISSIONS ${_install_helper_FILE_PERMISSIONS}) endif() if(_install_helper_FILES) install( FILES ${_install_helper_FILES} DESTINATION ${_install_helper_DESTINATION} PERMISSIONS ${_install_helper_FILE_PERMISSIONS} ${RENAME}) endif() if(_install_helper_PROGRAMS) install( PROGRAMS ${_install_helper_PROGRAMS} DESTINATION ${_install_helper_DESTINATION} PERMISSIONS ${_install_helper_PROGRAM_PERMISSIONS} ${RENAME}) endif() endfunction() neovim-0.2.2/cmake/LibFindMacros.cmake000066400000000000000000000110601320401574200175420ustar00rootroot00000000000000# Version 1.0 (2013-04-12) # Public Domain, originally written by Lasse Kärkkäinen # Published at http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries # If you improve the script, please modify the forementioned wiki page because # I no longer maintain my scripts (hosted as static files at zi.fi). Feel free # to remove this entire header if you use real version control instead. # Changelog: # 2013-04-12 Added version number (1.0) and this header, no other changes # 2009-10-08 Originally published # Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments # used for the current package. For this to work, the first parameter must be the # prefix of the current package, then the prefix of the new package etc, which are # passed to find_package. macro (libfind_package PREFIX) set (LIBFIND_PACKAGE_ARGS ${ARGN}) if (${PREFIX}_FIND_QUIETLY) set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET) endif (${PREFIX}_FIND_QUIETLY) if (${PREFIX}_FIND_REQUIRED) set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED) endif (${PREFIX}_FIND_REQUIRED) find_package(${LIBFIND_PACKAGE_ARGS}) endmacro (libfind_package) # CMake developers made the UsePkgConfig system deprecated in the same release (2.6) # where they added pkg_check_modules. Consequently I need to support both in my scripts # to avoid those deprecated warnings. Here's a helper that does just that. # Works identically to pkg_check_modules, except that no checks are needed prior to use. macro (libfind_pkg_check_modules PREFIX PKGNAME) if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) include(UsePkgConfig) pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS) else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(${PREFIX} ${PKGNAME}) endif (PKG_CONFIG_FOUND) endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) endmacro (libfind_pkg_check_modules) # Do the final processing once the paths have been detected. # If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain # all the variables, each of which contain one include directory. # Ditto for ${PREFIX}_PROCESS_LIBS and library files. # Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES. # Also handles errors in case library detection was required, etc. macro (libfind_process PREFIX) # Skip processing if already processed during this run if (NOT ${PREFIX}_FOUND) # Start with the assumption that the library was found set (${PREFIX}_FOUND TRUE) # Process all includes and set _FOUND to false if any are missing foreach (i ${${PREFIX}_PROCESS_INCLUDES}) if (${i}) set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}}) mark_as_advanced(${i}) else (${i}) set (${PREFIX}_FOUND FALSE) endif (${i}) endforeach (i) # Process all libraries and set _FOUND to false if any are missing foreach (i ${${PREFIX}_PROCESS_LIBS}) if (${i}) set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}}) mark_as_advanced(${i}) else (${i}) set (${PREFIX}_FOUND FALSE) endif (${i}) endforeach (i) # Print message and/or exit on fatal error if (${PREFIX}_FOUND) if (NOT ${PREFIX}_FIND_QUIETLY) message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}") endif (NOT ${PREFIX}_FIND_QUIETLY) else (${PREFIX}_FOUND) if (${PREFIX}_FIND_REQUIRED) foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS}) message("${i}=${${i}}") endforeach (i) message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.") endif (${PREFIX}_FIND_REQUIRED) endif (${PREFIX}_FOUND) endif (NOT ${PREFIX}_FOUND) endmacro (libfind_process) macro(libfind_library PREFIX basename) set(TMP "") if(MSVC80) set(TMP -vc80) endif(MSVC80) if(MSVC90) set(TMP -vc90) endif(MSVC90) set(${PREFIX}_LIBNAMES ${basename}${TMP}) if(${ARGC} GREATER 2) set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2}) string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES}) set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP}) endif(${ARGC} GREATER 2) find_library(${PREFIX}_LIBRARY NAMES ${${PREFIX}_LIBNAMES} PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS} ) endmacro(libfind_library) neovim-0.2.2/cmake/LuaHelpers.cmake000066400000000000000000000021461320401574200171370ustar00rootroot00000000000000# # Functions to help checking for a Lua interpreter # # Check if a module is available in Lua function(check_lua_module LUA_PRG_PATH MODULE RESULT_VAR) execute_process(COMMAND ${LUA_PRG_PATH} -e "require('${MODULE}')" RESULT_VARIABLE module_missing ERROR_QUIET) if(module_missing) set(${RESULT_VAR} False PARENT_SCOPE) else() set(${RESULT_VAR} True PARENT_SCOPE) endif() endfunction() # Check Lua interpreter for dependencies function(check_lua_deps LUA_PRG_PATH MODULES RESULT_VAR) # Check if the lua interpreter at the given path # satisfies all Neovim dependencies message(STATUS "Checking Lua interpreter ${LUA_PRG_PATH}") if(NOT EXISTS ${LUA_PRG_PATH}) message(STATUS "[${LUA_PRG_PATH}] file not found") endif() foreach(module ${MODULES}) check_lua_module(${LUA_PRG_PATH} ${module} has_module) if(NOT has_module) message(STATUS "[${LUA_PRG_PATH}] The '${module}' lua package is required for building Neovim") set(${RESULT_VAR} False PARENT_SCOPE) return() endif() endforeach() set(${RESULT_VAR} True PARENT_SCOPE) endfunction() neovim-0.2.2/cmake/PreventInTreeBuilds.cmake000066400000000000000000000015471320401574200207740ustar00rootroot00000000000000function(PreventInTreeBuilds) get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH) get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH) if("${srcdir}" STREQUAL "${bindir}") message("") message("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") message("Neovim doesn't support in-tree builds. It's recommended that you") message("use a build/ subdirectory:") message(" mkdir build") message(" cd build") message(" cmake ..") message("") message("Make sure to cleanup some CMake artifacts from this failed build") message("with:") message(" rm -rf CMakeFiles CMakeCache.txt") message("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") message("") message(FATAL_ERROR "Stopping build.") endif() endfunction() PreventInTreeBuilds() neovim-0.2.2/cmake/RunLuacheck.cmake000066400000000000000000000012141320401574200172720ustar00rootroot00000000000000set(LUACHECK_ARGS -q "${LUAFILES_DIR}") if(DEFINED IGNORE_PATTERN) list(APPEND LUACHECK_ARGS --exclude-files "${LUAFILES_DIR}/${IGNORE_PATTERN}") endif() if(DEFINED CHECK_PATTERN) list(APPEND LUACHECK_ARGS --include-files "${LUAFILES_DIR}/${CHECK_PATTERN}") endif() if(DEFINED READ_GLOBALS) list(APPEND LUACHECK_ARGS --read-globals "${READ_GLOBALS}") endif() execute_process( COMMAND "${LUACHECK_PRG}" ${LUACHECK_ARGS} WORKING_DIRECTORY "${LUAFILES_DIR}" ERROR_VARIABLE err RESULT_VARIABLE res ) if(NOT res EQUAL 0) message(STATUS "Output to stderr:\n${err}") message(FATAL_ERROR "Linting tests failed with error: ${res}.") endif() neovim-0.2.2/cmake/RunMsgfmt.cmake000066400000000000000000000003531320401574200170130ustar00rootroot00000000000000set(ENV{OLD_PO_FILE_INPUT} yes) execute_process( COMMAND ${MSGFMT_PRG} -o ${MO_FILE} ${PO_FILE} ERROR_VARIABLE err RESULT_VARIABLE res) if(NOT res EQUAL 0) message(FATAL_ERROR "msgfmt failed to run correctly: ${err}") endif() neovim-0.2.2/cmake/RunMsgmerge.cmake000066400000000000000000000004751320401574200173310ustar00rootroot00000000000000set(ENV{OLD_PO_FILE_INPUT} yes) set(ENV{OLD_PO_FILE_OUTPUT} yes) execute_process( COMMAND ${MSGMERGE_PRG} -q --update --backup=none --sort-by-file ${PO_FILE} ${POT_FILE} ERROR_VARIABLE err RESULT_VARIABLE res) if(NOT res EQUAL 0) message(FATAL_ERROR "msgmerge failed to run correctly: ${err}") endif() neovim-0.2.2/cmake/RunTests.cmake000066400000000000000000000031661320401574200166650ustar00rootroot00000000000000# Set LC_ALL to meet expectations of some locale-sensitive tests. set(ENV{LC_ALL} "en_US.UTF-8") set(ENV{VIMRUNTIME} ${WORKING_DIR}/runtime) set(ENV{NVIM_RPLUGIN_MANIFEST} ${WORKING_DIR}/Xtest_rplugin_manifest) set(ENV{XDG_CONFIG_HOME} ${WORKING_DIR}/Xtest_xdg/config) set(ENV{XDG_DATA_HOME} ${WORKING_DIR}/Xtest_xdg/share) if(NOT DEFINED ENV{NVIM_LOG_FILE}) set(ENV{NVIM_LOG_FILE} ${WORKING_DIR}/.nvimlog) endif() if(NVIM_PRG) set(ENV{NVIM_PRG} "${NVIM_PRG}") endif() if(DEFINED ENV{TEST_FILE}) set(TEST_PATH "$ENV{TEST_FILE}") else() set(TEST_PATH "${TEST_DIR}/${TEST_TYPE}") endif() if(BUSTED_OUTPUT_TYPE STREQUAL junit) set(EXTRA_ARGS OUTPUT_FILE ${BUILD_DIR}/${TEST_TYPE}test-junit.xml) endif() if(DEFINED ENV{TEST_TAG}) set(TEST_TAG "--tags=$ENV{TEST_TAG}") endif() if(DEFINED ENV{TEST_FILTER}) set(TEST_TAG "--filter=$ENV{TEST_FILTER}") endif() execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKING_DIR}/Xtest-tmpdir) set(ENV{TMPDIR} ${WORKING_DIR}/Xtest-tmpdir) set(ENV{SYSTEM_NAME} ${SYSTEM_NAME}) execute_process( COMMAND ${BUSTED_PRG} ${TEST_TAG} ${TEST_FILTER} -v -o ${BUSTED_OUTPUT_TYPE} --lua=${LUA_PRG} --lazy --helper=${TEST_DIR}/${TEST_TYPE}/preload.lua --lpath=${BUILD_DIR}/?.lua ${TEST_PATH} WORKING_DIRECTORY ${WORKING_DIR} ERROR_VARIABLE err RESULT_VARIABLE res ${EXTRA_ARGS}) file(REMOVE ${WORKING_DIR}/Xtest_rplugin_manifest) file(REMOVE_RECURSE ${WORKING_DIR}/Xtest_xdg) file(REMOVE_RECURSE ${WORKING_DIR}/Xtest-tmpdir) if(NOT res EQUAL 0) message(STATUS "Output to stderr:\n${err}") message(FATAL_ERROR "Running ${TEST_TYPE} tests failed with error: ${res}.") endif() neovim-0.2.2/cmake/RunXgettext.cmake000066400000000000000000000006001320401574200173650ustar00rootroot00000000000000set(ENV{OLD_PO_FILE_INPUT} yes) set(ENV{OLD_PO_FILE_OUTPUT} yes) list(SORT SOURCES) execute_process( COMMAND ${XGETTEXT_PRG} -o ${POT_FILE} --default-domain=nvim --add-comments --keyword=_ --keyword=N_ -D ${SEARCH_DIR} ${SOURCES} ERROR_VARIABLE err RESULT_VARIABLE res) if(NOT res EQUAL 0) message(FATAL_ERROR "xgettext failed to run correctly: ${err}") endif() neovim-0.2.2/cmake/WindowsDllCopy.cmake000066400000000000000000000017471320401574200200220ustar00rootroot00000000000000# In Windows we need to find dependency DLLs and install them along with our # binaries. This script uses the following variables: # # - BINARY: The binary file whose dependencies need to be installed # - DST: The destination path # - CMAKE_PREFIX_PATH: A list of directories to search for dependencies if(NOT DEFINED BINARY) message(FATAL_ERROR "Missing required argument -DBINARY=") endif() if(NOT DEFINED DST) message(FATAL_ERROR "Missing required arguments -DDST=") endif() if(NOT DEFINED CMAKE_PREFIX_PATH) message(FATAL_ERROR "Missing required arguments -DCMAKE_PREFIX_PATH=") endif() include(GetPrerequisites) get_prerequisites(${BINARY} DLLS 1 1 "" "${CMAKE_PREFIX_PATH}") foreach(DLL_NAME ${DLLS}) find_program(DLL_PATH ${DLL_NAME}) if(NOT DLL_PATH) message(FATAL_ERROR "Unable to find dependency ${DLL_NAME}") endif() message("Copying ${DLL_NAME} to ${DST}") execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${DLL_PATH} ${DST}) unset(DLL_PATH CACHE) endforeach() neovim-0.2.2/cmake/i386-linux-gnu.toolchain.cmake000066400000000000000000000002761320401574200214710ustar00rootroot00000000000000set(CMAKE_SYSTEM_PROCESSOR i386) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_VERSION gnu) if(NOT ${CMAKE_C_COMPILER}) set(CMAKE_C_COMPILER gcc) endif() set(CMAKE_C_COMPILER_ARG1 "-m32") neovim-0.2.2/cmake/mingw32-w64-cross-travis.toolchain.cmake000066400000000000000000000031601320401574200234100ustar00rootroot00000000000000# # Mingw-w64 cross compiler toolchain # # - The usual CMAKE variables will point to the cross compiler # - HOST_EXE_LINKER, HOST_C_COMPILER, HOST_EXE_LINKER_FLAGS, # HOST_C_FLAGS point to a host compiler # set(MINGW_TRIPLET i686-w64-mingw32) # For x86_64 use #set(MINGW_TRIPLET x86_64-w64-mingw32) # The location of your toolchain sys-root set(MINGW_PREFIX_PATH /opt/mingw32/${MINGW_TRIPLET}/) # or sometimes like this #set(MINGW_PREFIX_PATH /usr/${MINGW_TRIPLET}/sys-root) # the name of the target operating system set(CMAKE_SYSTEM_NAME Windows) # which compilers to use for C and C++ set(CMAKE_C_COMPILER ${MINGW_TRIPLET}-gcc) set(CMAKE_CXX_COMPILER ${MINGW_TRIPLET}-g++) set(CMAKE_RC_COMPILER ${MINGW_TRIPLET}-windres) set(CMAKE_C_COMPILER ${MINGW_TRIPLET}-gcc) set(CMAKE_CXX_COMPILER ${MINGW_TRIPLET}-g++) set(CMAKE_RC_COMPILER ${MINGW_TRIPLET}-windres) # Where is the target environment located set(CMAKE_FIND_ROOT_PATH "${MINGW_PREFIX_PATH}/mingw") # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CROSS_TARGET ${MINGW_TRIPLET}) # We need a host compiler too - assuming mildly sane Unix # defaults here set(HOST_C_COMPILER cc) set(HOST_EXE_LINKER ld) if (MINGW_TRIPLET MATCHES "^x86_64") set(HOST_C_FLAGS) set(HOST_EXE_LINKER_FLAGS) else() # In 32 bits systems have the HOST compiler generate 32 bits binaries set(HOST_C_FLAGS -m32) set(HOST_EXE_LINKER_FLAGS -m32) endif() neovim-0.2.2/codecov.yml000066400000000000000000000005471320401574200151610ustar00rootroot00000000000000codecov: notify: require_ci_to_pass: yes ci: - appveyor - travis - !neovim-qb.szakmeister.net coverage: precision: 2 round: down range: "70...100" status: project: yes patch: yes changes: no parsers: gcov: branch_detection: conditional: yes loop: yes method: no macro: no comment: off neovim-0.2.2/config/000077500000000000000000000000001320401574200142535ustar00rootroot00000000000000neovim-0.2.2/config/CMakeLists.txt000066400000000000000000000117211320401574200170150ustar00rootroot00000000000000include(CheckTypeSize) include(CheckSymbolExists) include(CheckFunctionExists) include(CheckIncludeFiles) include(CheckCSourceRuns) include(CheckCSourceCompiles) check_type_size("int" SIZEOF_INT) check_type_size("long" SIZEOF_LONG) check_type_size("intmax_t" SIZEOF_INTMAX_T) check_type_size("size_t" SIZEOF_SIZE_T) check_type_size("long long" SIZEOF_LONG_LONG) check_type_size("void *" SIZEOF_VOID_PTR) check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON) # Headers check_include_files(iconv.h HAVE_ICONV_H) check_include_files(langinfo.h HAVE_LANGINFO_H) check_include_files(locale.h HAVE_LOCALE_H) check_include_files(pwd.h HAVE_PWD_H) check_include_files(strings.h HAVE_STRINGS_H) check_include_files(sys/wait.h HAVE_SYS_WAIT_H) if(NOT HAVE_SYS_WAIT_H AND UNIX) # See if_cscope.c message(SEND_ERROR "header sys/wait.h is required for Unix") endif() check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H) check_include_files(termios.h HAVE_TERMIOS_H) check_include_files(utime.h HAVE_UTIME_H) check_include_files(sys/uio.h HAVE_SYS_UIO_H) # Functions check_function_exists(fseeko HAVE_FSEEKO) check_function_exists(getpwent HAVE_GETPWENT) check_function_exists(getpwnam HAVE_GETPWNAM) check_function_exists(getpwuid HAVE_GETPWUID) check_function_exists(uv_translate_sys_error HAVE_UV_TRANSLATE_SYS_ERROR) check_function_exists(readv HAVE_READV) if(Iconv_FOUND) set(HAVE_ICONV 1) endif() if(JEMALLOC_FOUND) set(HAVE_JEMALLOC 1) endif() check_function_exists(_putenv_s HAVE_PUTENV_S) if(WIN32 AND NOT HAVE_PUTENV_S) message(SEND_ERROR "_putenv_s() function not found on your system.") endif() check_function_exists(opendir HAVE_OPENDIR) check_function_exists(readlink HAVE_READLINK) check_function_exists(setenv HAVE_SETENV) if(UNIX AND NOT HAVE_SETENV) message(SEND_ERROR "setenv() function not found on your system.") endif() check_function_exists(unsetenv HAVE_UNSETENV) check_function_exists(setpgid HAVE_SETPGID) check_function_exists(setsid HAVE_SETSID) check_function_exists(sigaction HAVE_SIGACTION) check_function_exists(strcasecmp HAVE_STRCASECMP) check_function_exists(strncasecmp HAVE_STRNCASECMP) check_function_exists(utime HAVE_UTIME) check_function_exists(utimes HAVE_UTIMES) # Symbols check_symbol_exists(FD_CLOEXEC "fcntl.h" HAVE_FD_CLOEXEC) if(HAVE_LANGINFO_H) check_symbol_exists(CODESET "langinfo.h" HAVE_NL_LANGINFO_CODESET) endif() check_include_files("endian.h" HAVE_ENDIAN_H) check_include_files("sys/endian.h" HAVE_SYS_ENDIAN_H) set(ENDIAN_INCLUDE_FILE "endian.h") if(HAVE_SYS_ENDIAN_H AND NOT HAVE_ENDIAN_H) set(ENDIAN_INCLUDE_FILE "sys/endian.h") endif() set(SI "#include \n") set(MS "int main(int argc,char**argv)\n{\n uint64_t i=0x0102030405060708ULL;") set(ME "}") check_c_source_compiles(" #define _BSD_SOURCE 1 #define _DEFAULT_SOURCE 1 ${SI} #include <${ENDIAN_INCLUDE_FILE}> #ifndef be64toh # error No be64toh macros #endif ${MS} uint64_t j = be64toh(i); return (j == 0); // j must not be zero ${ME}" HAVE_BE64TOH_MACROS) if(NOT "${HAVE_BE64TOH_MACROS}") check_function_exists(be64toh HAVE_BE64TOH_FUNC) endif() if("${HAVE_BE64TOH_MACROS}" OR "${HAVE_BE64TOH_FUNC}") set(HAVE_BE64TOH 1) endif() if (NOT "${HAVE_BE64TOH}") if (NOT "${CMAKE_CROSSCOMPILING}") # It is safe to make ORDER_BIG_ENDIAN not defined if # - HAVE_BE64TOH is true. In this case be64toh will be used unconditionally in # any case and ORDER_BIG_ENDIAN will not be examined. # - CMAKE_CROSSCOMPILING *and* HAVE_BE64TOH are both false. In this case # be64toh function which uses cycle and arithmetic operations is used which # will work regardless of endianess. Function is sub-optimal though. check_c_source_runs(" ${SI} ${MS} char *s = (char *) &i; return ( s[0] == 0x01 && s[1] == 0x02 && s[2] == 0x03 && s[3] == 0x04 && s[4] == 0x05 && s[5] == 0x06 && s[6] == 0x07 && s[7] == 0x08) ? 0 : 1; ${ME}" ORDER_BIG_ENDIAN) endif() endif() # generate configuration header and update include directories configure_file ( "${PROJECT_SOURCE_DIR}/config/config.h.in" "${PROJECT_BINARY_DIR}/config/auto/config.h" ) # generate version definitions configure_file ( "${PROJECT_SOURCE_DIR}/config/versiondef.h.in" "${PROJECT_BINARY_DIR}/config/auto/versiondef.h" ) # generate pathdef.c find_program(WHOAMI_PROG whoami) find_program(HOSTNAME_PROG hostname) if (DEFINED ENV{USERNAME}) set(USERNAME $ENV{USERNAME}) elseif (NOT DEFINED USERNAME AND EXISTS ${WHOAMI_PROG}) execute_process(COMMAND ${WHOAMI_PROG} OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE USERNAME) endif() if (DEFINED ENV{HOSTNAME}) set(HOSTNAME $ENV{HOSTNAME}) elseif (EXISTS ${HOSTNAME_PROG}) execute_process(COMMAND ${HOSTNAME_PROG} OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE HOSTNAME) endif() configure_file ( "${PROJECT_SOURCE_DIR}/config/pathdef.c.in" "${PROJECT_BINARY_DIR}/config/auto/pathdef.c" ESCAPE_QUOTES) neovim-0.2.2/config/config.h.in000066400000000000000000000032401320401574200162750ustar00rootroot00000000000000#ifndef AUTO_CONFIG_H #define AUTO_CONFIG_H #cmakedefine DEBUG #define SIZEOF_INT @SIZEOF_INT@ #define SIZEOF_LONG @SIZEOF_LONG@ #if @SIZEOF_VOID_PTR@ == 8 #define ARCH_64 #elif @SIZEOF_VOID_PTR@ == 4 #define ARCH_32 #endif #define PROJECT_NAME "@PROJECT_NAME@" #define LOCALE_INSTALL_DIR "@CMAKE_INSTALL_FULL_LOCALEDIR@" #cmakedefine HAVE__NSGETENVIRON #cmakedefine HAVE_FD_CLOEXEC #cmakedefine HAVE_FSEEKO #cmakedefine HAVE_GETPWENT #cmakedefine HAVE_GETPWNAM #cmakedefine HAVE_GETPWUID #cmakedefine HAVE_ICONV #cmakedefine HAVE_ICONV_H #cmakedefine HAVE_LANGINFO_H #cmakedefine HAVE_LOCALE_H #cmakedefine HAVE_NL_LANGINFO_CODESET #cmakedefine HAVE_NL_MSG_CAT_CNTR #cmakedefine HAVE_PUTENV_S #cmakedefine HAVE_PWD_H #cmakedefine HAVE_READLINK #cmakedefine HAVE_UV_TRANSLATE_SYS_ERROR // TODO: add proper cmake check // #define HAVE_SELINUX 1 #cmakedefine HAVE_SETENV #cmakedefine HAVE_UNSETENV #cmakedefine HAVE_SETPGID #cmakedefine HAVE_SETSID #cmakedefine HAVE_SIGACTION #cmakedefine HAVE_STRCASECMP #cmakedefine HAVE_STRINGS_H #cmakedefine HAVE_STRNCASECMP #cmakedefine HAVE_SYS_UTSNAME_H #cmakedefine HAVE_SYS_WAIT_H #cmakedefine HAVE_TERMIOS_H #cmakedefine HAVE_UTIME #cmakedefine HAVE_UTIME_H #cmakedefine HAVE_UTIMES #cmakedefine HAVE_WORKING_LIBINTL #cmakedefine UNIX #cmakedefine USE_FNAME_CASE #cmakedefine HAVE_SYS_UIO_H #ifdef HAVE_SYS_UIO_H #cmakedefine HAVE_READV # ifndef HAVE_READV # undef HAVE_SYS_UIO_H # endif #endif #cmakedefine FEAT_TUI #ifndef UNIT_TESTING #cmakedefine HAVE_JEMALLOC #endif #cmakedefine HAVE_BE64TOH #cmakedefine ORDER_BIG_ENDIAN #define ENDIAN_INCLUDE_FILE <@ENDIAN_INCLUDE_FILE@> #cmakedefine HAVE_EXECINFO_BACKTRACE #endif // AUTO_CONFIG_H neovim-0.2.2/config/pathdef.c.in000066400000000000000000000003661320401574200164440ustar00rootroot00000000000000#include "${PROJECT_SOURCE_DIR}/src/nvim/vim.h" char *default_vim_dir = "${CMAKE_INSTALL_FULL_DATAROOTDIR}/nvim"; char *default_vimruntime_dir = ""; char_u *compiled_user = (char_u *)"${USERNAME}"; char_u *compiled_sys = (char_u *)"${HOSTNAME}"; neovim-0.2.2/config/versiondef.h.in000066400000000000000000000011321320401574200171720ustar00rootroot00000000000000#ifndef AUTO_VERSIONDEF_H #define AUTO_VERSIONDEF_H #define NVIM_VERSION_MAJOR @NVIM_VERSION_MAJOR@ #define NVIM_VERSION_MINOR @NVIM_VERSION_MINOR@ #define NVIM_VERSION_PATCH @NVIM_VERSION_PATCH@ #define NVIM_VERSION_PRERELEASE "@NVIM_VERSION_PRERELEASE@" #cmakedefine NVIM_VERSION_MEDIUM "@NVIM_VERSION_MEDIUM@" #define NVIM_API_LEVEL @NVIM_API_LEVEL@ #define NVIM_API_LEVEL_COMPAT @NVIM_API_LEVEL_COMPAT@ #define NVIM_API_PRERELEASE @NVIM_API_PRERELEASE@ #define NVIM_VERSION_CFLAGS "@NVIM_VERSION_CFLAGS@" #define NVIM_VERSION_BUILD_TYPE "@NVIM_VERSION_BUILD_TYPE@" #endif // AUTO_VERSIONDEF_H neovim-0.2.2/contrib/000077500000000000000000000000001320401574200144465ustar00rootroot00000000000000neovim-0.2.2/contrib/YouCompleteMe/000077500000000000000000000000001320401574200171755ustar00rootroot00000000000000neovim-0.2.2/contrib/YouCompleteMe/README.md000066400000000000000000000013371320401574200204600ustar00rootroot00000000000000# YouCompleteMe Integration ## What is this? This provides the code necessary to configure vim's YCM plugin to provide C semantic support (completion, go-to-definition, etc) for developers working on the Neovim project. ## Installation ### Step 1 Install [YouCompleteMe](https://github.com/Valloric/YouCompleteMe). ### Step 2 ```bash cp contrib/YouCompleteMe/ycm_extra_conf.py .ycm_extra_conf.py echo .ycm_extra_conf.py >> .git/info/exclude make ``` Tip: to improve source code navigation, add something like this to your nvim configuration: ```vim au FileType c,cpp nnoremap :YcmCompleter GoTo ``` And use `ctrl+]` when the cursor is positioned in a symbol to quickly jump to a definition or declaration. neovim-0.2.2/contrib/YouCompleteMe/ycm_extra_conf.py000066400000000000000000000042561320401574200225560ustar00rootroot00000000000000# .ycm_extra_conf.py for nvim source code. import os import ycm_core def DirectoryOfThisScript(): return os.path.dirname(os.path.abspath(__file__)) def GetDatabase(): compilation_database_folder = os.path.join(DirectoryOfThisScript(), 'build') if os.path.exists(compilation_database_folder): return ycm_core.CompilationDatabase(compilation_database_folder) return None def GetCompilationInfoForFile(filename): database = GetDatabase() if not database: return None return database.GetCompilationInfoForFile(filename) # It seems YCM does not resolve directories correctly. This function will # adjust paths in the compiler flags to be absolute def FixDirectories(args, compiler_working_dir): def adjust_path(path): return os.path.abspath(os.path.join(compiler_working_dir, path)) adjust_next_arg = False new_args = [] for arg in args: if adjust_next_arg: arg = adjust_path(arg) adjust_next_arg = False else: for dir_flag in ['-I', '-isystem', '-o', '-c']: if arg.startswith(dir_flag): if arg != dir_flag: # flag and path are concatenated in same arg path = arg[len(dir_flag):] new_path = adjust_path(path) arg = '{0}{1}'.format(dir_flag, new_path) else: # path is specified in next argument adjust_next_arg = True new_args.append(arg) return new_args def FlagsForFile(filename): compilation_info = GetCompilationInfoForFile(filename) if not compilation_info: return None # Add flags not needed for clang-the-binary, # but needed for libclang-the-library (YCM uses this last one). flags = FixDirectories((list(compilation_info.compiler_flags_) if compilation_info.compiler_flags_ else []), compilation_info.compiler_working_dir_) extra_flags = ['-Wno-newline-eof'] return { 'flags': flags + extra_flags, 'do_cache': True } neovim-0.2.2/contrib/doxygen/000077500000000000000000000000001320401574200161235ustar00rootroot00000000000000neovim-0.2.2/contrib/doxygen/customdoxygen.css000066400000000000000000000263241320401574200215540ustar00rootroot00000000000000 /* * Title, should be H1 */ .title { font-family: 'Lato', sans-serif; font-size: 2em; margin: 0.67em 0 0; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } div.qindex, div.navtab { background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; } div.line { font-family: monospace, fixed; min-height: 13px; line-height: 1.0; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; } span.lineno { padding-right: 4px; text-align: right; border-right: 2px solid #0F0; white-space: pre; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } blockquote { background-color: #F7F8FB; border-left: 2px solid #9CAFD4; margin: 0 24px 0 4px; padding: 0 12px 0 16px; } /* @end */ hr { height: 0px; border: none; display: none; } dl { padding: 0 0 0 10px; } /* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ dl.section { margin-left: 0px; padding-left: 0px; } dl.note { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #D0C000; } dl.warning, dl.attention { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #FF0000; } dl.pre, dl.post, dl.invariant { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00D000; } dl.deprecated { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #505050; } dl.todo { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00C0E0; } dl.test { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #3030E0; } dl.bug { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #C08050; } dl.section dd { margin-bottom: 6px; } /* tooltip related style info */ .ttc { position: absolute; display: none; } #powerTip { cursor: default; white-space: nowrap; background-color: white; border: 1px solid gray; border-radius: 4px 4px 4px 4px; box-shadow: 1px 1px 7px gray; display: none; font-size: smaller; max-width: 80%; opacity: 0.9; padding: 1ex 1em 1em; position: absolute; z-index: 2147483647; } #powerTip div.ttdoc { color: grey; font-style: italic; } #powerTip div.ttname a { font-weight: bold; } #powerTip div.ttname { font-weight: bold; } #powerTip div.ttdeci { color: #006318; } #powerTip div { margin: 0px; padding: 0px; font: 12px/16px Roboto,sans-serif; } #powerTip:before, #powerTip:after { content: ""; position: absolute; margin: 0px; } #powerTip.n:after, #powerTip.n:before, #powerTip.s:after, #powerTip.s:before, #powerTip.w:after, #powerTip.w:before, #powerTip.e:after, #powerTip.e:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.se:after, #powerTip.se:before, #powerTip.nw:after, #powerTip.nw:before, #powerTip.sw:after, #powerTip.sw:before { border: solid transparent; content: " "; height: 0; width: 0; position: absolute; } #powerTip.n:after, #powerTip.s:after, #powerTip.w:after, #powerTip.e:after, #powerTip.nw:after, #powerTip.ne:after, #powerTip.sw:after, #powerTip.se:after { border-color: rgba(255, 255, 255, 0); } #powerTip.n:before, #powerTip.s:before, #powerTip.w:before, #powerTip.e:before, #powerTip.nw:before, #powerTip.ne:before, #powerTip.sw:before, #powerTip.se:before { border-color: rgba(128, 128, 128, 0); } #powerTip.n:after, #powerTip.n:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.nw:after, #powerTip.nw:before { top: 100%; } #powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { border-top-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.n:before { border-top-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.n:after, #powerTip.n:before { left: 50%; } #powerTip.nw:after, #powerTip.nw:before { right: 14px; } #powerTip.ne:after, #powerTip.ne:before { left: 14px; } #powerTip.s:after, #powerTip.s:before, #powerTip.se:after, #powerTip.se:before, #powerTip.sw:after, #powerTip.sw:before { bottom: 100%; } #powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { border-bottom-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { border-bottom-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.s:after, #powerTip.s:before { left: 50%; } #powerTip.sw:after, #powerTip.sw:before { right: 14px; } #powerTip.se:after, #powerTip.se:before { left: 14px; } #powerTip.e:after, #powerTip.e:before { left: 100%; } #powerTip.e:after { border-left-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.e:before { border-left-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } #powerTip.w:after, #powerTip.w:before { right: 100%; } #powerTip.w:after { border-right-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.w:before { border-right-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } /* * Centered container for all content */ div.contents, div.header > *, ul.tablist, .navpath ul { margin:0 15px; } @media (min-width: 568px) { div.contents, div.header > *, ul.tablist, .navpath ul { margin: 0 auto; width: 90%; max-width: 1200px; } } /* * padding inside content */ div.contents > * { padding-top: 8px; padding-bottom: 8px; } @media (min-width: 568px) { div.contents > h2, div.contents > div.textblock, div.contents > div.memitem, div.contents > table.memberdecls h2, div.contents > p { padding-top: 30px; } } div.contents h2 { margin-top: 0px; } div.summary { display: none; } /* * Tabs * * Based on doxygen tabs.css */ .tabs, .tabs2, .tabs3 { width: 100%; background-color: #f4f4f4; border-top: solid 1px #ececec; } .tablist { margin: 0; padding: 0; display: table; } .tablist li { float: left; display: table-cell; line-height: 36px; list-style: none; } .tablist a { display: block; padding: 0 30px 0 0; } .tabs3 .tablist a { padding: 0 20px 0 0; } .tablist li.current a { color: #54a23d; } /* * Navpath */ .navpath ul { padding:20px 0px; } .navpath li { list-style-type:none; padding-right: 10px; float:left; } .navpath li.navelem a { padding-left: 10px; } .navpath li.navelem:before { content: "/"; color: #777; } /* * Member * * Styles for detailed member documentation */ .memitem { border-top: solid 1px #c9c9c9; } .memname { font-weight: bold; font-family: monospace; } td.memname { color: #54a23d; } .memname td { vertical-align: bottom; } .memproto, dl.reflist dt { font-weight: bold; } .memdoc, dl.reflist dd { } /* * Parameters */ .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #aa0e0e; white-space: nowrap; } .paramname em { font-style: normal; } .params, .retval, .exception, .tparams { margin-left: 0px; padding-left: 0px; } .params td { padding-right: 1em; padding-bottom: 0.5em; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } /* * Inline Label etc. */ table.mlabels { border-spacing: 0px; } td.mlabels-left { width: 100%; padding: 0px; } td.mlabels-right { vertical-align: bottom; padding: 0px; white-space: nowrap; } span.mlabels { margin-left: 8px; } /* * Member Descriptions */ table.memberdecls { font-family: monospace; border-spacing: 0px; padding: 0px; } .memSeparator { line-height: 1px; margin: 0px; padding: 0 0 0.2em 0; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memItemRight { width: 100%; } .memTemplParams { color: #4665A2; white-space: nowrap; font-size: 80%; } /* * Fieldtable (Enums) */ .fieldtable td, .fieldtable th { padding: 0 1em 0.2em 0; } .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; vertical-align: top; } /* * Directory */ .directory table { border-collapse:collapse; } .directory td { margin: 0px; padding: 0px; vertical-align: top; } .directory td.entry { white-space: nowrap; padding-right: 6px; padding-top: 3px; } .directory td.entry a { outline:none; } .directory td.entry a img { border: none; } .directory td.desc { width: 100%; padding-left: 6px; padding-right: 6px; padding-top: 3px; } .directory tr.even { padding-left: 6px; } .directory img { vertical-align: -30%; } .directory .levels { white-space: nowrap; width: 100%; text-align: right; } .directory .levels span { cursor: pointer; padding-left: 2px; padding-right: 2px; color: #3c92d1; } .arrow { color: #9CAFD4; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer; font-size: 80%; display: inline-block; width: 16px; height: 22px; } .icon { font-family: Arial, Helvetica; font-weight: bold; font-size: 12px; height: 14px; width: 16px; display: inline-block; background-color: #54a23d; color: white; text-align: center; border-radius: 4px; margin-left: 2px; margin-right: 2px; } .icona { width: 24px; height: 22px; display: inline-block; } .iconfopen { width: 24px; height: 18px; margin-bottom: 4px; background-image:url('ftv2folderopen.png'); background-position: 0px 0px; background-repeat: repeat-y; vertical-align:top; display: inline-block; } .iconfclosed { width: 24px; height: 18px; margin-bottom: 4px; background-image:url('ftv2folderclosed.png'); background-position: 0px 0px; background-repeat: repeat-y; vertical-align:top; display: inline-block; } .icondoc { width: 24px; height: 18px; margin-bottom: 4px; background-image:url('ftv2doc.png'); background-position: 0px -1px; background-repeat: repeat-y; vertical-align:top; display: inline-block; } /* * Data Structure Index * * Hardcoded style attribute */ .contents > table[style] { margin: 20px auto !important; } /* * Search Box */ #MSearchBox { right: 4%; } @media print { #top { display: none; } #side-nav { display: none; } #nav-path { display: none; } body { overflow:visible; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } .summary { display: none; } .memitem { page-break-inside: avoid; } #doc-content { margin-left:0 !important; height:auto !important; width:auto !important; overflow:inherit; display:inline; } } neovim-0.2.2/contrib/doxygen/extra.css000066400000000000000000000275021320401574200177660ustar00rootroot00000000000000/*! normalize.css v3.0.0 | MIT License | git.io/normalize */ /** * 1. Set default font family to sans-serif. * 2. Prevent iOS text size adjust after orientation change, without disabling * user zoom. */ html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } /** * Remove default margin. */ body { margin: 0; } /* HTML5 display definitions ========================================================================== */ /** * Correct `block` display not defined in IE 8/9. */ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } /** * 1. Correct `inline-block` display not defined in IE 8/9. * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. */ audio, canvas, progress, video { display: inline-block; /* 1 */ vertical-align: baseline; /* 2 */ } /** * Prevent modern browsers from displaying `audio` without controls. * Remove excess height in iOS 5 devices. */ audio:not([controls]) { display: none; height: 0; } /** * Address `[hidden]` styling not present in IE 8/9. * Hide the `template` element in IE, Safari, and Firefox < 22. */ [hidden], template { display: none; } /* Links ========================================================================== */ /** * Remove the gray background color from active links in IE 10. */ a { background: transparent; } /** * Improve readability when focused and also mouse hovered in all browsers. */ a:active, a:hover { outline: 0; } /* Text-level semantics ========================================================================== */ /** * Address styling not present in IE 8/9, Safari 5, and Chrome. */ abbr[title] { border-bottom: 1px dotted; } /** * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. */ b, strong { font-weight: bold; } /** * Address styling not present in Safari 5 and Chrome. */ dfn { font-style: italic; } /** * Address variable `h1` font-size and margin within `section` and `article` * contexts in Firefox 4+, Safari 5, and Chrome. */ h1 { font-size: 2em; margin: 0.67em 0; } /** * Address styling not present in IE 8/9. */ mark { background: #ff0; color: #000; } /** * Address inconsistent and variable font size in all browsers. */ small { font-size: 80%; } /** * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } /* Embedded content ========================================================================== */ /** * Remove border when inside `a` element in IE 8/9. */ img { border: 0; } /** * Correct overflow displayed oddly in IE 9. */ svg:not(:root) { overflow: hidden; } /* Grouping content ========================================================================== */ /** * Address margin not present in IE 8/9 and Safari 5. */ figure { margin: 1em 40px; } /** * Address differences between Firefox and other browsers. */ hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } /** * Contain overflow in all browsers. */ pre { overflow: auto; } /** * Address odd `em`-unit font size rendering in all browsers. */ code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } /* Forms ========================================================================== */ /** * Known limitation: by default, Chrome and Safari on OS X allow very limited * styling of `select`, unless a `border` property is set. */ /** * 1. Correct color not being inherited. * Known issue: affects color of disabled elements. * 2. Correct font properties not being inherited. * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. */ button, input, optgroup, select, textarea { color: inherit; /* 1 */ font: inherit; /* 2 */ margin: 0; /* 3 */ } /** * Address `overflow` set to `hidden` in IE 8/9/10. */ button { overflow: visible; } /** * Address inconsistent `text-transform` inheritance for `button` and `select`. * All other form control elements do not inherit `text-transform` values. * Correct `button` style inheritance in Firefox, IE 8+, and Opera * Correct `select` style inheritance in Firefox. */ button, select { text-transform: none; } /** * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` * and `video` controls. * 2. Correct inability to style clickable `input` types in iOS. * 3. Improve usability and consistency of cursor style between image-type * `input` and others. */ button, html input[type="button"], /* 1 */ input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } /** * Re-set default cursor for disabled elements. */ button[disabled], html input[disabled] { cursor: default; } /** * Remove inner padding and border in Firefox 4+. */ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } /** * Address Firefox 4+ setting `line-height` on `input` using `!important` in * the UA stylesheet. */ input { line-height: normal; } /** * It's recommended that you don't attempt to style these elements. * Firefox's implementation doesn't respect box-sizing, padding, or width. * * 1. Address box sizing set to `content-box` in IE 8/9/10. * 2. Remove excess padding in IE 8/9/10. */ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } /** * Fix the cursor style for Chrome's increment/decrement buttons. For certain * `font-size` values of the `input`, it causes the cursor style of the * decrement button to change from `default` to `text`. */ input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } /** * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome * (include `-moz` to future-proof). */ input[type="search"] { -webkit-appearance: textfield; /* 1 */ -moz-box-sizing: content-box; -webkit-box-sizing: content-box; /* 2 */ box-sizing: content-box; } /** * Remove inner padding and search cancel button in Safari and Chrome on OS X. * Safari (but not Chrome) clips the cancel button when the search input has * padding (and `textfield` appearance). */ input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } /** * Define consistent border, margin, and padding. */ fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } /** * 1. Correct `color` not being inherited in IE 8/9. * 2. Remove padding so people aren't caught out if they zero out fieldsets. */ legend { border: 0; /* 1 */ padding: 0; /* 2 */ } /** * Remove default vertical scrollbar in IE 8/9. */ textarea { overflow: auto; } /** * Don't inherit the `font-weight` (applied by a rule above). * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. */ optgroup { font-weight: bold; } /* Tables ========================================================================== */ /** * Remove most spacing between table cells. */ table { border-collapse: collapse; border-spacing: 0; } td, th { padding: 0; } /* neovim.io/css/main.css */ * { -moz-box-sizing: border-box; box-sizing: border-box; } body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.4; color: #444; background-color: #fbfbfb; } @media (min-width: 568px) { body { font-size: 17px; } } a { color: #3c92d1; text-decoration: none; } h1, h2, h3 { font-family: 'Lato', sans-serif; } h2 { font-size: 24px; font-weight: 400; color: #54a23d; margin-bottom: 0; } @media (min-width: 568px) { h2 { font-size: 30px; } } h3 { /* color: #54a23d; */ } blockquote { border-left: 5px solid #eeeeee; margin-left: 0; padding-left: 15px; } /* * Content container * * Centered container for all content */ .container { margin: 0 15px; } @media (min-width: 568px) { .container { margin: 0 auto; width: 90%; max-width: 1200px; } } /* * Navbar * * Logo and navigation at the top of the page */ .navbar { padding: 12px 0; } @media (min-width: 568px) { .navbar { padding-top: 30px; padding-bottom: 30px; } } .logo { width: 120px; position: relative; top: 4px; } @media (min-width: 568px) { .logo { width: 180px; } } .site-nav { display: none; } @media (min-width: 568px) { .site-nav { display: block; float: right; } .site-nav ul { list-style: none; } .site-nav li { display: inline-block; margin-top: 5px; margin-left: 20px; font-size: 18px; font-family: 'Lato', sans-serif; } } /* * Masthead * * Big intro billboard */ .masthead { border-top: solid 1px #ececec; border-bottom: solid 1px #ececec; text-align: center; padding: 20px 12px; } @media (min-width: 568px) { .masthead { padding-top: 40px; padding-bottom: 40px; } } .masthead .container { } @media (min-width: 568px) { .masthead .container { width: 568px; margin: 0 auto; } } .masthead h1 { font-size: 20px; font-weight: 400; } @media (min-width: 568px) { .masthead h1 { font-size: 40px; margin-bottom: 50px; } } .masthead .lead { font-weight: 900; color: #54a23d; font-family: 'Lato', sans-serif; font-size: 16px; font-weight: 900; } @media (min-width: 568px) { .masthead .lead { font-size: 26px; } } /* * Columns * * Two columns utilizing the golden ratio */ .col-wide, .col-narrow { display: block; } @media (min-width: 568px) { .col-wide { display: table-cell; width: 61.8%; vertical-align: top; } .col-narrow { display: table-cell; width: 38.2%; padding-left: 6%; vertical-align: top; } } /* * Front page * * Big section blocks for the front page */ .front-section { padding: 8px 0; } @media (min-width: 568px) { .front-section { padding-top: 30px; padding-bottom: 30px; display: table; width: 100%; } .front-section h2:first-child { margin-top: 0; } } .front-section.shaded { background-color: #f4f4f4; } /* * FAQs * * Formatted as a definition list */ .faqs dt { font-weight: 700; } .faqs dd { color: #777; font-size: 15px; margin-left: 0; margin-bottom: 20px; } /* * Buttons * * Fun to click */ .btn { display: inline-block; text-align: center; vertical-align: middle; background-color: #3c92d1; color: #fff; font-family: 'Lato', sans-serif; border-radius: 4px; padding: 15px 30px; } .btn:hover { background-color: #3889c4; } .btn.full-width { width: 100%; } /* * Sponsors * * Callout-style box */ .sponsors { background-color: #f5f5f5; padding: 5px 20px; border-radius: 4px; margin-top: 10px; } .sponsors h3 { color: #54a23d; } .first-level-sponsor { margin-bottom: 20px; } .first-level-sponsor img { max-width: 100%; } .second-level-sponsors { width: 100%; } .second-level-sponsors td { width: 50%; padding: 12px 0; text-align: center; vertical-align: middle; } .second-level-sponsors img { width: 80%; } @media (min-width: 568px) { .second-level-sponsor img { width: auto; } } /* * Footer * * Links, legalese, etc. */ footer .container { border-top: solid 1px #ececec; padding: 20px 0 50px; font-size: 12px; color: #777; } @media (min-width: 568px) { footer .container { font-size: 14px; display: table; } } footer a { color: #444; } /* * Misc * * Odds 'n ends */ .light { color: #777; } .light a { color: #444; } .small { font-size: 70%; } /* * Newsletter CSS */ .newsletter h1 { margin-bottom: 0px; } neovim-0.2.2/contrib/doxygen/footer.html000066400000000000000000000012071320401574200203070ustar00rootroot00000000000000
$generatedby Doxygen $doxygenversion
neovim-0.2.2/contrib/doxygen/header.html000066400000000000000000000025071320401574200202450ustar00rootroot00000000000000 $projectname: $title $title $treeview $search $mathjax $extrastylesheet
neovim-0.2.2/contrib/doxygen/logo-devdoc.png000066400000000000000000000653661320401574200210530ustar00rootroot00000000000000PNG  IHDRh|D* AiCCPICC ProfileH wTSϽ7" %z ;HQIP&vDF)VdTG"cE b PQDE݌k 5ޚYg}׺PtX4X\XffGD=HƳ.d,P&s"7C$ E6<~&S2)212 "įl+ɘ&Y4Pޚ%ᣌ\%g|eTI(L0_&l2E9r9hxgIbטifSb1+MxL 0oE%YmhYh~S=zU&ϞAYl/$ZUm@O ޜl^ ' lsk.+7oʿ9V;?#I3eE妧KD d9i,UQ h A1vjpԁzN6p\W p G@ K0ށiABZyCAP8C@&*CP=#t] 4}a ٰ;GDxJ>,_“@FXDBX$!k"EHqaYbVabJ0՘cVL6f3bձX'?v 6-V``[a;p~\2n5׌ &x*sb|! ߏƿ' Zk! $l$T4QOt"y\b)AI&NI$R$)TIj"]&=&!:dGrY@^O$ _%?P(&OJEBN9J@y@yCR nXZOD}J}/G3ɭk{%Oחw_.'_!JQ@SVF=IEbbbb5Q%O@%!BӥyҸM:e0G7ӓ e%e[(R0`3R46i^)*n*|"fLUo՝mO0j&jajj.ϧwϝ_4갺zj=U45nɚ4ǴhZ ZZ^0Tf%9->ݫ=cXgN].[7A\SwBOK/X/_Q>QG[ `Aaac#*Z;8cq>[&IIMST`ϴ kh&45ǢYYF֠9<|y+ =X_,,S-,Y)YXmĚk]c}džjcΦ浭-v};]N"&1=xtv(}'{'IߝY) Σ -rqr.d._xpUەZM׍vm=+KGǔ ^WWbj>:>>>v}/avO8 FV> 2 u/_$\BCv< 5 ]s.,4&yUx~xw-bEDCĻHGKwFGEGME{EEKX,YFZ ={$vrK .3\rϮ_Yq*©L_wד+]eD]cIIIOAu_䩔)3ѩiB%a+]3='/40CiU@ёL(sYfLH$%Y jgGeQn~5f5wugv5k֮\۹Nw]m mHFˍenQQ`hBBQ-[lllfjۗ"^bO%ܒY}WwvwXbY^Ю]WVa[q`id2JjGէ{׿m>PkAma꺿g_DHGGu;776ƱqoC{P38!9 ҝˁ^r۽Ug9];}}_~imp㭎}]/}.{^=}^?z8hc' O*?f`ϳgC/Oϩ+FFGGόzˌㅿ)ѫ~wgbk?Jި9mdwi獵ޫ?cǑOO?w| x&mf2:Y~ pHYs  .iTXtXML:com.adobe.xmp Acorn version 4.4 5 72 72 '@IDATxUŵiqHQ F@TQQ5ɋOcOb&1է=I@i60Hz)߷fù[έ}53k֞kЅ%J @(PB %J @(PB %J @(PB %J @(PB %J @(PB %J @(PB %J @(PZ$E_s-z?x| \mX](P @` yW'KqhmH$5SNa 4@(PH]3Orק2u^l_tM3XyLb_~8u;PB 4"vS޲ϠF3^Wmm|ݿ7{6RNJ%jt*GGS +%J @O{=|̫j#]2t$IlKĺVOYr˫s֦*3 t$⥣Ș=w B&B % '>u[Ae_.l\u&Г`=HERKY~"wirvNgĢȈXPvИ5*rYtÐTmIy0:2t:Mw𹣇֫4%hg'#{#B  h5@3K|KUr7a^44tےĎP%v)SGu2 )igF өHLQlNaB JU}{ /*gi'a- 3D&1F]] e6~aHxtf@q]f5+J )yPluê ِ@Y"n t$4ijxjq2zϞس .qt~)QiڝafvdTh.VC(T-яrwn34 0nt]6K-:),m+[>$ gFgioP],w'}̮sC(P 1~补s_.Noط+&1Vf 2Ckqĺ+}v%_~搝 |aL&[0 .xΜ1y5ֆ%%P@=C.yHMʫ؆M9u& H"-E5 ]5.v7S XKC[QC&/52ϡB h 4 cOT:Dfk15 \`9 8kZO*jP2(oYݸʯ|XKe"8{ jLjt$3Sh0-@(P%AOcv1WɊ#&+*;lLdC6JZ{b{HUeK$De h$9hu,9wcf?љ>88^f8.T_cY$n"3goL~úB +IO~-O?iw+x81zQϧg̬8WBi8pzɁ,ǻBu`ēމN>s[壃ʺm$œkiQ`" F2кT~ϛ|;&PĮCT݌Bhw7FM _;wpɻGmlƌв78,E@ x; Πt6;*6:Ll^\%t[mL3 AŮfruuhPlpڿ(^#.t C H{B[U(F0@drdU$a;aф 8K)c,lJp24Of.ҝdra+Yx8Љ?{$^Cci5?\;u ;ڞ g:\~&s@"V҉lU%I`GaȂ/Y9ze#*]W@;bI ?_L2Lt`fdsfC dj}M]-_>3ޥ.h5iHkI~h?Que2m){GFeBO(PI=+ [x~Ikoٻ{"6= h90.3-xЌ|(6Obvt9Oeb`D^^OUbg:{*P f܌[~>NC>:PU3SVlZf~_6]|G+:b6A2 1d8' bY@iN ʝZ8(0}gv7?V KIHOF;'BFNsVs}E/}G#.@(P!w뒽޶b+KύD8ֆ=z%W}M/}4^e=TJ֜=~?X,3N`iJ/-v&ZuK?WG>{8g1 F\e%- -|WsWl9ѽ}=* ,ƯƳfZUj}r63j7/gZ0 %JMF ?шXOJ` TMHIw6UY3|~~ueIa@, s%5M!N$ڦYP@4ʁ^M)>[zs_;i1^ aKǐc/wplx15WDD"h2#-zaGJ`d;^*nw8VәpuʉҴG:rib7sQoV֧dK( IڔR?f5,W @e21Cյ[]m +?.$h$`Yql/3m%Z(h{P;2(tXݶ(vSr{.) ⷎHr*;Z[R#;cVLr^*7a˫B8'Wl=^W8#^%-6MPRŢ(NĭG %J @$\4*u(클(kd*^aYSb>S6)͓i~+ @OE6h99XZ,/쪧F`m/#E<+o7ʃ,].14Xh'@(PYgSt2ȦK:ңo+^S胑\-=J17ZhJ~v{h/ @Pm$46[ޏq4Q- ^ c5]M]݌qd4Ť'ɰǵo;$c m }k^.@%0rSv:۾^PIXۺu뻉D6kh̘1SUF(K)6?;S>LKx~Cm5jԐh4zАGpQWRR*y7t>畗ԔHg?Oڲe_gϞ}7e1bQgqYBNu>ƍ[Z]]=GA?84'5М xZL0'ZQp z[~`]lU !32$!+8+`N.rh ~y fj{W#H]ȕ-+Ǟ,ĄZ DiD2u\NڛN'2tZJ:βݻ4iNe^ԯ_{S9kF%>zǮDcudr ٪=m4(O?ʢO}Jm48掀887stѾf?Bw1Jz>!o=YQQх$/x'SD5ׯc A9 G#'}D5~=u,Nƍ͛opn}y$?;džJh (:Tm4Kj2E]jc}ಢmX:mzsĚ%hue:k|i1q' .XZzm \vK`p1mئ€l&&gxKYrtI7 F1h.w̚5 h#ѳ<ϋ/~vz,:;>V_z\ԣJh A3fW?OP1!`nm"r=yXƵ4DP7 /Pr6>s$Ge#sq= ~&F%~n>mˮed8L9 SO=~~m{:рG|<ɀh/F~E_s2 d^w=䓦ic=|ʾ/P9Gd}9sܓ[2B샷:es:Y]]4RO-Gco(Zcu# +%gxU?8D kݲx~?lCnN"VӘ$ C9&Q$q$S~h̹'P=Qt|<qf>K8:Gtq><رcWжY3+L|r&nąG~@ۿ=y ʂ}--qǑ0p ddg_G:~SO}ASgnܛ f$`ڿZvCMTiy'?i*+W,]+4y]t2רnȦIf@U>d WTTG?_e%)O_k #T\l   >}[Dv/Ã7l=J1 1"!p73R2^T|gu+ljuڊ8܀Y}dF[MV7s39ڑƋZ$::4!4ӿxx)Dw~ȱ&G:ܤ_ݻ;<2M q}Nj[/ /=>n_[m۶;yy Z )㏿ LGjt3,fUlYM:9iJP 5hΉ.h%6l8j2Kի'5I؁귴 UD_/wV-Z 8Kє?Sҍkjjj榵/^q~5RFN%4ëeK=73n͚-{t)Wqg+tph7rԊYr,K^AT1_{B.Nb9S>1gz898T>,7M,~vxĦc}[;YtEhe785aӦMC8x >O"qCtUk /3ΟzœBr"7ڀ{g}K/MČs3^K/k) ,gctK͇6U4-tSr*#eՐ!C@?"V{>c7?xt:qm8OE*7'y~UEP,dr4g ę]G؇åP,A tFMG2&#J"J [kˤyI4&?Qs oRA7I wBBM΄ &@i4"n,oC 5 =2uq/H~X(8SLYҨX|?0;]ʃ_8H=m +H{]hހ]X~d~4p7&^kiI<]kޔS}$)NjC=9Vq:fY=tsxWr5ydC_^Pꐿ':aؿ'rͤ@rTnjoyVWɔ^e"=sqk#HWkGX֫0'FDg2]ۯ(֢;'_ kО1A?3r?o,)JN!e6 I YF0Ifޭ*p$S#`AѪn~e=&; 2sjq0AHsNE(7qz˼W! ~ENyiդ CCUP${0J'#Ѹ 'zq-b $tM̺t~d.hzV}smc4/~'Yl ><%p_XPHOeN(~nOa>OI?gPVS//sa CB%XbAJ0)k ;vULyEUYvc%|/@_A*.~sFo4Kq,l%7=9k.o~YNt4CnUݸKq6j xy3R)`7G,xZsZ֐dXt39qzsެv?AȴFT`އ\fp"Hk쬶 <~dKJiϴ78>m-Y@3o rԋlaB r']drStl0}5ּy0}EC33ZĪM=cg+u56%Vĝ @4@a4`¬`) 8- 33hfu=-o-5qg<.*ӕg+8:0ޮBǔ!ʻ(ݯ/cKm)'ـ* Pm@Da 1#6َ)&%k:1u<ƴ&<K ٍ/. A)dl;-_|7u^Y<3z!d7' `Y-4R2G~}h7rl2 UJ)B:F}h hVZ/&'[ kq ЌB{hQ*;#aINXPD`'@DgVGuGˇޚ&%6D#9zט,!EŒ?|8̼`aODv&U3|ܶϗ?2eß ucnJ.U0f.- lϊC::d'o~!'4;u LsFsi6guLΕ/n._[3K lj~4[5 ^}xT˖-gڵavF2>WJFOlhdu 2wJF]nmrzd[勼;iq1}zesv(5PU  1?bӠI˺xDcVۀ2a4mNJ8W1x˔&T6i:;@ItF/wMW~:T15[_Q+VMHydsec\N u4*@Ί&YV'7Fй7* e!y+ h?'-ۯJB^Ho~bX` 77ox}B`"y/סՋ9 "d>sm,J !f*%bhE9\;aiPp B_hPo,Ogv\UMcOn{ =5 ׹̭$$%!ֵD~|%8۔=gjk^4E[/`ݖeYTTUP :p@(^ \ucg!<9Utkʽt4-NoM{[ɐuvdAM-۴8mh -6qd*:  74z(vM/mfR 2oMgf>׬7o :O[̀| cy ځGi)^ '7Ee%?-?lqgzÖJ֭=jQz"Q''1l``5lwROSTZ0EOy9NණN 'b4 ")J evɚD"^ٔrB _تXif`^ v&вE/",Zek]nGߨB@rҺЦ̆3SB/l44G>U&"9 8WjF>]G3Y.Cؾ86Fa]#w-!Z?. MʔwU&&IO@' 6 *TY/4 Y)$|T62UO~.M+ e7W)h),--ʢ?_gZQH^ d|[ȖW~_hţ2| 8PH4+/0kX*s7H7hiU#6WQ͝y:txA2'wY O{uY3N>c+cv4 ޳d/0;\pH2W_5ҧT  :n_PgF iAsm0kIJ8U4uYjP XV%(;&NRT9 G"{nSOm4<:K/ =KtE+T833ZbFRh N$.dרɝOF˞S>BI`E141cƔ @I_4UhsoZĘdv:n."@p$4403ϤDcrȩ (6/qsoG~l pc F&2!9韀ԊQwx)Sh]\4 *{}֜ڬ2bȸ&<,UQ^J(nDU/6- 'ҴifQFM:q%1ֹ?V& ذk6HrյӸ8APn2uJ z k0o^tўt.2)?Y6+1mp5mi~ 3aͻF Ti_ą玗@61 L[OFE['Ԓ>ȡHo-Jkڛ Qj,dĂ} -A(8;ZO4tX$+|I#ܹM>R WS\9aQ<M5&.u#\rr U)CzX%7WS,P츖5CF552d sg/v;mV<7uMhvaF_j2|.oEn%;Z* $,ޓY^Uޮ dh* We{̷'7:#񧽗}#0}"YYXhqE8Wղ +5c j+, vg4P,Z9* = ̝uH:+`['pgehW/xl2@iAXe󃸆ژ)YyT׮FCmwc2W5:mod׉$X89"0FE7'"sR^_v]z3H@$@cqSiE0Jr)D&jb~Q~sKpƨ̯$ZJ6j|([NFK2qh+xd8mB_FM#Ħ0!Բ4SʍJ܈N[*?sc }u+1MLc)24tHhx98)!H/ q'6i*aK)L*}Y**B)wq3/<0kY,[fQUMa8+UH i'h8.3=:~/=r:Уz9̞Cqa[Dc\Z})#44'&"v^3BT5/Avy(exlpZ?E`0x^8xc,Y23?3]/~6:\N3:F@&ˠ8rƅbylt>o#mrOo+dW */^ \KsaaŃ@ 8ѥr;pXhA9|mƇJQA>vYW,wAY|K;w T˴fRqggn\sNnzv˃ppfb<4=r@>;OWSe@!^H6OSt.ℌ9ar˷}?3BA\e l>rt.k<ƦL7 i.1$0't2&EףKFKvEkNPeD+b;S %̻~Pޚ{1=v%I<@'3}0+:|5W>7H5R|>6,E& }O*β5 idNhgZ ) 35ߥeTǜO};}]uXBĹًsq\Akt?Ql; A Z bB>vI ws%oJ=sЮ$תĮ{g=i`V‹I~oڐ_4`DsE[F7%n:,X`2BBrAMF[-!P tΛK^I{qّBGnƦ&XB 1#*0eG8IF˺TfZ&[^ j+:]ݔL"~^K&Z6 ltvihzJb ](-a rdUŽs ,| ʣ{ Ne)צ1zSϿH wWso+\@ M`+dh(%PB 3J55@kesP`wylpo2xS>QueSUtol"DusCLod-AV gmFEAD/G l )3lPˋWc]Ͷ Zn4~\Atjũ&'vє ۮǍ7pWj>0Y2N>ְś֡) 4ePYG?~AP^h1 ]%,2)r,,ťݎ~|ۇmR2Vt0jV4n84&bIx_6" hv_FTxcٖw)*h`qf ȫ>8eq1#+'D!B,"6n%"?')&ţH?:=>5F2y-K/XbPN~YS` Tl  wL c:St. N9|ѐѺ{غfLh7hTd`&4308J'ŀjl6<H[:ă}Jఖ2Eu95%2F,pڮU3"dv-LktR߾Q٥u;{1m3&E\h"w:'@⁗~-~9M}y_h &z Zw ºP9Ǽ?<\4G }ϫV s91+7(,@ x:AC) BYdbdz]4^-a1 ZH0 tACe1U"ބ'Vy$$}7Iә{nؕB?x, 4aÇY<2`}Y6g9+oԯQ26' la2Pz׹p&)0 c#S?}& G hD''BF[^Bw4"P@ڕN OcgįМM <+ 6pW@=W$6 ͟u&w-=Buu~u?䓓x"آy|+G/X2Ι_mqOE~r; Jk91ґ F ᤾[X Θ0ЂpiV?-D⟛9Z 9تNiԜbJfBk1BUFgehh6?u<2ojgJ׷oǃ]/oQ1QF Hq}p-;~rԩ4 dt.@{f@5ϲ(\h7@ݙ XMܤQN]“!xicWcc ۝ qp`B;ԉT]. H ?-DiJx" us{A1ChOfHBxjhqr!h^{mTn(BA{B%ԦMdi/O͘1#ဖL R@a1cib jCAZs,ʦg@($3RHb֏^TCuٖRBbAZsbOa?v(/NA 䉗a#5Sci3Vk[9b܄tm*!is,m.ir/])!'|S wb}4W4_ 1De'ךN;|L>xʸz…[S^nwFa疷5HjΟaXiYȯS+@'6|e\U$+0VTa_֍#(ά(Ǫ .) i/ G: Ud Lʞ{,vb]^HC׀.E itGGDZHƌÊ M;Q3" )hc iN9㞁oRT4c ?l0m| W RS uP!]WT ,4Z80:B1mo9G\GPQYs97P<[_GN>pmZ1QAF"P=j9a,ŋ^4F0Ћ}0%HK (Ky)OBKƍw)@OtitЬCuӆ04ujP<4q{^s[˟13d`~KkJKݙqN?&ThΕz]G::l^znKrelе{a5LˤEkV+6CF P/7]\:xJilD+a:irf'Lֵ$Bp/0`È wx)gyd* E 'p ?g{C [IDAT}sz2w.[fP5n(h0<>'h.2+vo_L l2\g-!J!^&^]517@7UrPWlP%W Mv!/fzWC%G`QV?l&pJ|W4A MpƬ{K/=PűCnSn8H@ͬD62Enu /aRXGikS{?>_G?A*qf̙w6KkөW 2wyk uli}jx|b>28'f5Ҟ݆U|BvԠ ^}e_jIu](ohh!&,´3;iH4pɠE,4mZְ;;Zsb]4r)@16TqFt;g 78v{r1u@hChisbP+{Ntr:k޲P -}E:>WR@l=:ƻ1x!'˱gf٘ mJVm~AHDH8ɧ!ZZh9hBȫP:2AmƏjelHM5ZJHNIxݯQ~#WF  Ÿt\Hpqb 8k*Ľ,Zm I1Hs1u$*htsD(tJUaJa6A?KZr\k,Ϗ Cuo6KڧQ4:z5 hӱcOܒ<>?JJS8 HFGtȜ>&=׃}mrX3WE.7ԣl-Ř#-mp=(+H%\5k:elj2ewc6C6XpI&5mlK `R8 +Zn+jh{^j (/l^(U/U2`W@YP-@$r,6ÕȐH.n9DoB5|CZ5xۻ!| s* Ɯ؇7spVpZ>P[r7#pjfy`- ]M*Fmۮ(Ly#:U{B 6mw f +-,zv.ȯ# 8 U0C;CW>ʊa<+=|7z;guMHh:dpbPѢqtV8KofŇPB Jn&ɐ%8SV6!ar>͘_(]}-HW8>`J]\h' _]355 Z:[>ŻXe2{sC͕(T@CJ @(v$Ǭ5}K`^3\v'/(|a@vsw=啥WoU y >,uG6~ 6LӈE#Ɋe-`IV/[A6g(+ %8#21&6{g/e2+9mʜ. k5%҇?MA30aݎhn`U_7~Xv ?z8b+8_dL{Iü#TJ ;76KK@NC]0T"h: qh#ӐgC~xԽ-f4TӅl@N$~W ^._S}HrRBJ @(H 6^e[ GaI۵bafNg~3)G4B7N6_.`,؊_2 ͊c@6D٫WR-viZ RpӢEfs8{L?xljVwJ @(6H٠) M6TB>@9T6YE<'iP~ϑeqތ^RtTӀXAǕҨ}P3;L F4)˯&BEIk";jTRyGĉ&K B % 8V fQUbC02/X#N 2 lqnLKǠ1MHc5 Ehɦb[%e]46i NQXտF6"q sp}aËμsvku^FPŮJ*2 Es[E==YM,va Ad5tTc _;ǽx&d.OŒ&LS{2Hfliҹwd8v@sSpy;aNꎡ%=2g}{<>^nFg3\ڇѧs'κmt7ϭJ%2ҹr>c{2qG4}×κ/!e=&q3<|Ѭ Ѷ&d4џƼs@A(ze2u9m<1ϼg-'"CH謁ny~×͚2Q~+zex|3>{^T6 i}'*Ͳ93~7%ej=Ż-똮CQAٕd6 uy_2tW (ڇ/ ܖsGFt+/*}y2OU.}+sW4E{m#'L&4EL1(oX^W s=*eFb+$?dTKm!`ʩiTK6=]uy%ԖdzVͦ;@Y 0ž _KV6V1u^Ν|=wθ{Ըx8W"~ܔNk!eY{;d2s'՘);L:c. |9hy`Ӄpcg UuUwᶜ;BF:怮7gxGwOKoNsq)A>,^T:P#8g$uƣ$J$@Γ"}k5bKDPZg'scԟy8~I!2XgA1QQ ΍ x SȢiW5|mwշ|ښ?⎛PC{kmUQ" o;'άEi^]}m#6l՞EZ2U]G謻G}lnګ9a%/g,l`YTM ==(?û/rm|Iz'M|;LD{1#2W7AxHL.yA`,@څ-r꬏UoJMW4q֫A ao!EMCc9lyJ#%KQnW7snԯdn\_= l* K27hnĥ"aα rYYS%?Tnd/=rc.OL8X|77@6lZ>`lP3ge97M~^: ҠEhϧNIqh, Hi6^$Iџq+W5iNIDK/!e1=Y#`.<㪹gJ%0~Q霃d2k]lV1Z"3pƤ7;˕~B_͔0P";E/%fO}*bpkuFdwxMFÌ@f44Lh 2!w@^fŦf=8G%fuyfJ31sf(|崏r +UB U+iccqo:GP>H3k ^g}´6zsjszYëlaֹ9r!N 3sVPS$FVDo],\T|IDz8sN^n潥.V~{A̎?@:֥GԼ@]o'9RKj1A-玑v ;|0FH: zm_ȹu?uQPC. =/v%xvbo׭{|& eIi4A0$(f 5g'%dѯq>j+hd2Nϥ۶oѮ}-S,28W=r<+7mמIgjS/[~g9:BFn€m1ybu=-9fɽETjb@6^CA9&GIq,gCUJ$6~33l| l+f[p-"5lBy5֖R+לu^敦J?>c<^@zoEgV6?pGȈulB_1[xåe˽b^'L=4WдMN ]NZGM%yW[Xv)q*`M!t;W|v<R\S沎FjC˼^!1Of5#{ !#z2①ҜQytQm8ˊ𓽟xT}ɯYw2z9KP27dkD=MHKd!'3U*RoeL6w ؖ 8SG;@ڿP<|&l7զjK*FOXo(\ La7qH3r|no ^OUD# _mJٺE\`!5r0‚"d>4~ 8$2x `4I[G~%'MpQ}N?])RwKo'>8ŏfݽbk_KTJ8ceAn`e3QZt<@x>XT4yN}`ɴ/Vugw:L! ]2;RXhrxX*^,i?sPGȈA_̶[ +jo}ᄒ[+w}p<6C \a،-ؚãUCxS22.ݺj^*FKĮnӰjtDx%JLsSٱL-jXQ6,7jэvjF#s)02|-zYc<SY1wQC^bǔt{w>1!=5&89œ /?YA7SJg&?~ uר>2bu2zdj0.@(N֝ɍĎng7y>?YfGcRj8^@?\澍.?1pV-^^Lm2Y}O uY~&SsM ,= dЫluxc2dΓHh留`H Β9>WzP:\_Qÿz➁*`榾߫I~z[9@$hmޣm]8ÿ?4 .G#R^(f.|ќۖK'ܜr&Mr(-r323@6Hm/Ѧ_dBm˒UOf3yʽNzOiIY%k$SR&_<0([k %J`WlEp67_*=VLt[W^.h;ѩw+~N}*O2Mg, ](PB %J @(PB %J @(PB %J @(PB %J .&C!ǂdIENDB`neovim-0.2.2/contrib/gdb/000077500000000000000000000000001320401574200152025ustar00rootroot00000000000000neovim-0.2.2/contrib/gdb/neovim_gdb.vim000066400000000000000000000216741320401574200200420ustar00rootroot00000000000000sign define GdbBreakpoint text=● sign define GdbCurrentLine text=⇒ let s:gdb_port = 7778 let s:run_gdb = "gdb -q -f build/bin/nvim" let s:breakpoints = {} let s:max_breakpoint_sign_id = 0 let s:GdbServer = {} function s:GdbServer.new(gdb) let this = copy(self) let this._gdb = a:gdb return this endfunction function s:GdbServer.on_exit() let self._gdb._server_exited = 1 endfunction let s:GdbPaused = vimexpect#State([ \ ['Continuing.', 'continue'], \ ['\v[\o32]{2}([^:]+):(\d+):\d+', 'jump'], \ ['Remote communication error. Target disconnected.:', 'retry'], \ ]) function s:GdbPaused.continue(...) call self._parser.switch(s:GdbRunning) call self.update_current_line_sign(0) endfunction function s:GdbPaused.jump(file, line, ...) if tabpagenr() != self._tab " Don't jump if we are not in the debugger tab return endif let window = winnr() exe self._jump_window 'wincmd w' let self._current_buf = bufnr('%') let target_buf = bufnr(a:file, 1) if bufnr('%') != target_buf exe 'buffer ' target_buf let self._current_buf = target_buf endif exe ':' a:line let self._current_line = a:line exe window 'wincmd w' call self.update_current_line_sign(1) endfunction function s:GdbPaused.retry(...) if self._server_exited return endif sleep 1 call self.attach() call self.send('continue') endfunction let s:GdbRunning = vimexpect#State([ \ ['\v^Breakpoint \d+', 'pause'], \ ['\v\[Inferior\ +.{-}\ +exited\ +normally', 'disconnected'], \ ['(gdb)', 'pause'], \ ]) function s:GdbRunning.pause(...) call self._parser.switch(s:GdbPaused) if !self._initialized call self.send('set confirm off') call self.send('set pagination off') if !empty(self._server_addr) call self.send('set remotetimeout 50') call self.attach() call s:RefreshBreakpoints() call self.send('c') endif let self._initialized = 1 endif endfunction function s:GdbRunning.disconnected(...) if !self._server_exited && self._reconnect " Refresh to force a delete of all watchpoints call s:RefreshBreakpoints() sleep 1 call self.attach() call self.send('continue') endif endfunction let s:Gdb = {} function s:Gdb.kill() tunmap tunmap tunmap tunmap call self.update_current_line_sign(0) exe 'bd! '.self._client_buf if self._server_buf != -1 exe 'bd! '.self._server_buf endif exe 'tabnext '.self._tab tabclose unlet g:gdb endfunction function! s:Gdb.send(data) call jobsend(self._client_id, a:data."\") endfunction function! s:Gdb.attach() call self.send(printf('target remote %s', self._server_addr)) endfunction function! s:Gdb.update_current_line_sign(add) " to avoid flicker when removing/adding the sign column(due to the change in " line width), we switch ids for the line sign and only remove the old line " sign after marking the new one let old_line_sign_id = get(self, '_line_sign_id', 4999) let self._line_sign_id = old_line_sign_id == 4999 ? 4998 : 4999 if a:add && self._current_line != -1 && self._current_buf != -1 exe 'sign place '.self._line_sign_id.' name=GdbCurrentLine line=' \.self._current_line.' buffer='.self._current_buf endif exe 'sign unplace '.old_line_sign_id endfunction function! s:Spawn(server_cmd, client_cmd, server_addr, reconnect) if exists('g:gdb') throw 'Gdb already running' endif let gdb = vimexpect#Parser(s:GdbRunning, copy(s:Gdb)) " gdbserver port let gdb._server_addr = a:server_addr let gdb._reconnect = a:reconnect let gdb._initialized = 0 " window number that will be displaying the current file let gdb._jump_window = 1 let gdb._current_buf = -1 let gdb._current_line = -1 let gdb._has_breakpoints = 0 let gdb._server_exited = 0 " Create new tab for the debugging view tabnew let gdb._tab = tabpagenr() " create horizontal split to display the current file and maybe gdbserver sp let gdb._server_buf = -1 if type(a:server_cmd) == type('') " spawn gdbserver in a vertical split let server = s:GdbServer.new(gdb) vsp | enew | let gdb._server_id = termopen(a:server_cmd, server) let gdb._jump_window = 2 let gdb._server_buf = bufnr('%') endif " go to the bottom window and spawn gdb client wincmd j enew | let gdb._client_id = termopen(a:client_cmd, gdb) let gdb._client_buf = bufnr('%') tnoremap :GdbContinuei tnoremap :GdbNexti tnoremap :GdbStepi tnoremap :GdbFinishi " go to the window that displays the current file exe gdb._jump_window 'wincmd w' let g:gdb = gdb endfunction function! s:Test(bang, filter) let cmd = "GDB=1 make test" if a:bang == '!' let server_addr = '| vgdb' let cmd = printf('VALGRIND=1 %s', cmd) else let server_addr = printf('localhost:%d', s:gdb_port) let cmd = printf('GDBSERVER_PORT=%d %s', s:gdb_port, cmd) endif if a:filter != '' let cmd = printf('TEST_SCREEN_TIMEOUT=1000000 TEST_FILTER="%s" %s', a:filter, cmd) endif call s:Spawn(cmd, s:run_gdb, server_addr, 1) endfunction function! s:ToggleBreak() let file_name = bufname('%') let file_breakpoints = get(s:breakpoints, file_name, {}) let linenr = line('.') if has_key(file_breakpoints, linenr) call remove(file_breakpoints, linenr) else let file_breakpoints[linenr] = 1 endif let s:breakpoints[file_name] = file_breakpoints call s:RefreshBreakpointSigns() call s:RefreshBreakpoints() endfunction function! s:ClearBreak() let s:breakpoints = {} call s:RefreshBreakpointSigns() call s:RefreshBreakpoints() endfunction function! s:RefreshBreakpointSigns() let buf = bufnr('%') let i = 5000 while i <= s:max_breakpoint_sign_id exe 'sign unplace '.i let i += 1 endwhile let s:max_breakpoint_sign_id = 0 let id = 5000 for linenr in keys(get(s:breakpoints, bufname('%'), {})) exe 'sign place '.id.' name=GdbBreakpoint line='.linenr.' buffer='.buf let s:max_breakpoint_sign_id = id let id += 1 endfor endfunction function! s:RefreshBreakpoints() if !exists('g:gdb') return endif if g:gdb._parser.state() == s:GdbRunning " pause first call jobsend(g:gdb._client_id, "\") endif if g:gdb._has_breakpoints call g:gdb.send('delete') endif let g:gdb._has_breakpoints = 0 for [file, breakpoints] in items(s:breakpoints) for linenr in keys(breakpoints) let g:gdb._has_breakpoints = 1 call g:gdb.send('break '.file.':'.linenr) endfor endfor endfunction function! s:GetExpression(...) range let [lnum1, col1] = getpos("'<")[1:2] let [lnum2, col2] = getpos("'>")[1:2] let lines = getline(lnum1, lnum2) let lines[-1] = lines[-1][:col2 - 1] let lines[0] = lines[0][col1 - 1:] return join(lines, "\n") endfunction function! s:Send(data) if !exists('g:gdb') throw 'Gdb is not running' endif call g:gdb.send(a:data) endfunction function! s:Eval(expr) call s:Send(printf('print %s', a:expr)) endfunction function! s:Watch(expr) let expr = a:expr if expr[0] != '&' let expr = '&' . expr endif call s:Eval(expr) call s:Send('watch *$') endfunction function! s:Interrupt() if !exists('g:gdb') throw 'Gdb is not running' endif call jobsend(g:gdb._client_id, "\info line\") endfunction function! s:Kill() if !exists('g:gdb') throw 'Gdb is not running' endif call g:gdb.kill() endfunction command! GdbDebugNvim call s:Spawn(printf('make && gdbserver localhost:%d build/bin/nvim', s:gdb_port), s:run_gdb, printf('localhost:%d', s:gdb_port), 0) command! -nargs=1 GdbDebugServer call s:Spawn(0, s:run_gdb, 'localhost:'., 0) command! -bang -nargs=? GdbDebugTest call s:Test(, ) command! -nargs=1 -complete=file GdbInspectCore call s:Spawn(0, printf('gdb -q -f -c %s build/bin/nvim', ), 0, 0) command! GdbDebugStop call s:Kill() command! GdbToggleBreakpoint call s:ToggleBreak() command! GdbClearBreakpoints call s:ClearBreak() command! GdbContinue call s:Send("c") command! GdbNext call s:Send("n") command! GdbStep call s:Send("s") command! GdbFinish call s:Send("finish") command! GdbFrameUp call s:Send("up") command! GdbFrameDown call s:Send("down") command! GdbInterrupt call s:Interrupt() command! GdbEvalWord call s:Eval(expand('')) command! -range GdbEvalRange call s:Eval(s:GetExpression()) command! GdbWatchWord call s:Watch(expand('') command! -range GdbWatchRange call s:Watch(s:GetExpression()) nnoremap :GdbContinue nnoremap :GdbNext nnoremap :GdbStep nnoremap :GdbFinish nnoremap :GdbToggleBreakpoint nnoremap :GdbFrameUp nnoremap :GdbFrameDown nnoremap :GdbEvalWord vnoremap :GdbEvalRange nnoremap :GdbWatchWord vnoremap :GdbWatchRange neovim-0.2.2/contrib/gdb/nvim-gdb-pretty-printers.py000066400000000000000000000053501320401574200224530ustar00rootroot00000000000000# Register a gdb pretty printer for UGrid instances. Usage: # # - start gdb # - run `source contrib/gdb/nvim-gdb-pretty-printers.py` # - when a `UGrid` pointer can be evaluated in the current frame, just print # it's value normally: `p *grid` (assuming `grid` is the variable name # holding the pointer) # - highlighting can be activated by setting the NVIM_GDB_HIGHLIGHT_UGRID # environment variable(only xterm-compatible terminals supported). This # can be done while gdb is running through the python interface: # `python os.environ['NVIM_GDB_HIGHLIGHT_UGRID'] = '1'` import os import gdb import gdb.printing SGR0 = '\x1b(B\x1b[m' def get_color_code(bg, color_num): if color_num < 16: prefix = 3 if color_num > 7: prefix = 9 if bg: prefix += 1 color_num %= 8 else: prefix = '48;5;' if bg else '38;5;' return '\x1b[{0}{1}m'.format(prefix, color_num) def highlight(attrs): fg, bg = [int(attrs['foreground']), int(attrs['background'])] rv = [SGR0] # start with sgr0 if fg != -1: rv.append(get_color_code(False, fg)) if bg != -1: rv.append(get_color_code(True, bg)) if bool(attrs['bold']): rv.append('\x1b[1m') if bool(attrs['italic']): rv.append('\x1b[3m') if bool(attrs['undercurl']) or bool(attrs['underline']): rv.append('\x1b[4m') if bool(attrs['reverse']): rv.append('\x1b[7m') return ''.join(rv) class UGridPrinter(object): def __init__(self, val): self.val = val def to_string(self): do_hl = (os.getenv('NVIM_GDB_HIGHLIGHT_UGRID') and os.getenv('NVIM_GDB_HIGHLIGHT_UGRID') != '0') grid = self.val height = int(grid['height']) width = int(grid['width']) delimiter = '-' * (width + 2) rows = [delimiter] for row in range(height): cols = [] if do_hl: cols.append(SGR0) curhl = None for col in range(width): cell = grid['cells'][row][col] if do_hl: hl = highlight(cell['attrs']) if hl != curhl: cols.append(hl) curhl = hl cols.append(cell['data'].string('utf-8')) if do_hl: cols.append(SGR0) rows.append('|' + ''.join(cols) + '|') rows.append(delimiter) return '\n' + '\n'.join(rows) def display_hint(self): return 'hint' def pretty_printers(): pp = gdb.printing.RegexpCollectionPrettyPrinter('nvim') pp.add_printer('UGrid', '^ugrid$', UGridPrinter) return pp gdb.printing.register_pretty_printer(gdb, pretty_printers(), replace=True) neovim-0.2.2/contrib/local.mk.example000066400000000000000000000050501320401574200175230ustar00rootroot00000000000000# Copy this to 'local.mk' in the repository root. # Individual entries must be uncommented to take effect. # By default, the installation prefix is '/usr/local'. # CMAKE_EXTRA_FLAGS += -DCMAKE_INSTALL_PREFIX=/usr/local/nvim-latest # These CFLAGS can be used in addition to those specified in CMakeLists.txt: # CMAKE_EXTRA_FLAGS="-DCMAKE_C_FLAGS=-ftrapv -Wlogical-op" # By default, the jemalloc family of memory allocation functions are used. # Uncomment the following to instead use libc memory allocation functions. # CMAKE_EXTRA_FLAGS += -DENABLE_JEMALLOC=OFF # Sets the build type; defaults to Debug. Valid values: # # - Debug: Disables optimizations (-O0), enables debug information. # # - RelWithDebInfo: Enables optimizations (-Og or -O2) with debug information. # # - MinSizeRel: Enables all -O2 optimization that do not typically # increase code size, and performs further optimizations # designed to reduce code size (-Os). # Disables debug information. # # - Release: Same as RelWithDebInfo, but disables debug information. # # CMAKE_BUILD_TYPE := Debug # Log levels: 0 (DEBUG), 1 (INFO), 2 (WARNING), 3 (ERROR) # Default is 1 (INFO) unless CMAKE_BUILD_TYPE is Release or RelWithDebInfo. # CMAKE_EXTRA_FLAGS += -DMIN_LOG_LEVEL=1 # By default, nvim uses bundled versions of its required third-party # dependencies. # Uncomment these entries to instead use system-wide installations of # them. # # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_BUSTED=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_DEPS=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_JEMALLOC=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBTERMKEY=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBUV=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBVTERM=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUAJIT=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUAROCKS=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_MSGPACK=OFF # DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_UNIBILIUM=OFF # By default, bundled libraries are statically linked to nvim. # This has no effect for non-bundled deps, which are always dynamically linked. # Uncomment these entries to instead use dynamic linking. # # CMAKE_EXTRA_FLAGS += -DLIBTERMKEY_USE_STATIC=OFF # CMAKE_EXTRA_FLAGS += -DLIBUNIBILIUM_USE_STATIC=OFF # CMAKE_EXTRA_FLAGS += -DLIBUV_USE_STATIC=OFF # CMAKE_EXTRA_FLAGS += -DLIBVTERM_USE_STATIC=OFF # CMAKE_EXTRA_FLAGS += -DLUAJIT_USE_STATIC=OFF # CMAKE_EXTRA_FLAGS += -DMSGPACK_USE_STATIC=OFF # # # .DEFAULT_GOAL := nvim # # Run doxygen over the source code. # Output will be in build/doxygen # # doxygen: # doxygen src/Doxyfile neovim-0.2.2/contrib/uncrustify.cfg000066400000000000000000002125611320401574200173510ustar00rootroot00000000000000# Uncrustify 0.60 # # General options # # The type of line endings newlines = auto # auto/lf/crlf/cr # The original size of tabs in the input input_tab_size = 8 # number # The size of tabs in the output (only used if align_with_tabs=true) output_tab_size = 8 # number # The ASCII value of the string escape char, usually 92 (\) or 94 (^). (Pawn) string_escape_char = 92 # number # Alternate string escape char for Pawn. Only works right before the quote char. string_escape_char2 = 0 # number # Allow interpreting '>=' and '>>=' as part of a template in 'void f(list>=val);'. # If true (default), 'assert(x<0 && y>=3)' will be broken. # Improvements to template detection may make this option obsolete. tok_split_gte = false # false/true # Control what to do with the UTF-8 BOM (recommend 'remove') utf8_bom = ignore # ignore/add/remove/force # If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8 utf8_byte = false # false/true # Force the output encoding to UTF-8 utf8_force = false # false/true # # Indenting # # The number of columns to indent per level. # Usually 2, 3, 4, or 8. indent_columns = 2 # number # The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents. # For FreeBSD, this is set to 4. Negative value is absolute and not increased for each ( level indent_continue = 0 # number # How to use tabs when indenting code # 0=spaces only # 1=indent with tabs to brace level, align with spaces # 2=indent and align with tabs, using spaces when not on a tabstop indent_with_tabs = 0 # number # Comments that are not a brace level are indented with tabs on a tabstop. # Requires indent_with_tabs=2. If false, will use spaces. indent_cmt_with_tabs = false # false/true # Whether to indent strings broken by '\' so that they line up indent_align_string = true # false/true # The number of spaces to indent multi-line XML strings. # Requires indent_align_string=True indent_xml_string = 0 # number # Spaces to indent '{' from level indent_brace = 0 # number # Whether braces are indented to the body level indent_braces = false # false/true # Disabled indenting function braces if indent_braces is true indent_braces_no_func = false # false/true # Disabled indenting class braces if indent_braces is true indent_braces_no_class = false # false/true # Disabled indenting struct braces if indent_braces is true indent_braces_no_struct = false # false/true # Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc. indent_brace_parent = false # false/true # Whether the 'namespace' body is indented indent_namespace = false # false/true # The number of spaces to indent a namespace block indent_namespace_level = 0 # number # If the body of the namespace is longer than this number, it won't be indented. # Requires indent_namespace=true. Default=0 (no limit) indent_namespace_limit = 0 # number # Whether the 'extern "C"' body is indented indent_extern = false # false/true # Whether the 'class' body is indented indent_class = true # false/true # Whether to indent the stuff after a leading class colon indent_class_colon = true # false/true # Virtual indent from the ':' for member initializers. Default is 2 indent_ctor_init_leading = 2 # number # Additional indenting for constructor initializer list indent_ctor_init = 0 # number # False=treat 'else\nif' as 'else if' for indenting purposes # True=indent the 'if' one level indent_else_if = false # false/true # Amount to indent variable declarations after an open brace. neg=relative, pos=absolute indent_var_def_blk = 0 # number # Indent continued variable declarations instead of aligning. indent_var_def_cont = false # false/true # True: force indentation of function definition to start in column 1 # False: use the default behavior indent_func_def_force_col1 = false # false/true # True: indent continued function call parameters one indent level # False: align parameters under the open paren indent_func_call_param = false # false/true # Same as indent_func_call_param, but for function defs indent_func_def_param = false # false/true # Same as indent_func_call_param, but for function protos indent_func_proto_param = false # false/true # Same as indent_func_call_param, but for class declarations indent_func_class_param = false # false/true # Same as indent_func_call_param, but for class variable constructors indent_func_ctor_var_param = false # false/true # Same as indent_func_call_param, but for templates indent_template_param = false # false/true # Double the indent for indent_func_xxx_param options indent_func_param_double = false # false/true # Indentation column for standalone 'const' function decl/proto qualifier indent_func_const = 0 # number # Indentation column for standalone 'throw' function decl/proto qualifier indent_func_throw = 0 # number # The number of spaces to indent a continued '->' or '.' # Usually set to 0, 1, or indent_columns. indent_member = 0 # number # Spaces to indent single line ('//') comments on lines before code indent_sing_line_comments = 0 # number # If set, will indent trailing single line ('//') comments relative # to the code instead of trying to keep the same absolute column indent_relative_single_line_comments = false # false/true # Spaces to indent 'case' from 'switch' # Usually 0 or indent_columns. indent_switch_case = 0 # number # Spaces to shift the 'case' line, without affecting any other lines # Usually 0. indent_case_shift = 0 # number # Spaces to indent '{' from 'case'. # By default, the brace will appear under the 'c' in case. # Usually set to 0 or indent_columns. indent_case_brace = 0 # number # Whether to indent comments found in first column indent_col1_comment = true # false/true # How to indent goto labels # >0 : absolute column where 1 is the leftmost column # <=0 : subtract from brace indent indent_label = 0 # number # Same as indent_label, but for access specifiers that are followed by a colon indent_access_spec = 1 # number # Indent the code after an access specifier by one level. # If set, this option forces 'indent_access_spec=0' indent_access_spec_body = false # false/true # If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended) indent_paren_nl = false # false/true # Controls the indent of a close paren after a newline. # 0: Indent to body level # 1: Align under the open paren # 2: Indent to the brace level indent_paren_close = 0 # number # Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren indent_comma_paren = false # false/true # Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren indent_bool_paren = false # false/true # If 'indent_bool_paren' is true, controls the indent of the first expression. If TRUE, aligns the first expression to the following ones indent_first_bool_expr = false # false/true # If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended) indent_square_nl = false # false/true # Don't change the relative indent of ESQL/C 'EXEC SQL' bodies indent_preserve_sql = false # false/true # Align continued statements at the '='. Default=True # If FALSE or the '=' is followed by a newline, the next line is indent one tab. indent_align_assign = true # false/true # Indent OC blocks at brace level instead of usual rules. indent_oc_block = false # false/true # Indent OC blocks in a message relative to the parameter name. # 0=use indent_oc_block rules, 1+=spaces to indent indent_oc_block_msg = 0 # number # Minimum indent for subsequent parameters indent_oc_msg_colon = 0 # number # # Spacing options # # Add or remove space around arithmetic operator '+', '-', '/', '*', etc sp_arith = add # ignore/add/remove/force # Add or remove space around assignment operator '=', '+=', etc sp_assign = add # ignore/add/remove/force # Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign sp_cpp_lambda_assign = ignore # ignore/add/remove/force # Add or remove space after the capture specification in C++11 lambda. sp_cpp_lambda_paren = ignore # ignore/add/remove/force # Add or remove space around assignment operator '=' in a prototype sp_assign_default = ignore # ignore/add/remove/force # Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign. sp_before_assign = ignore # ignore/add/remove/force # Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign. sp_after_assign = ignore # ignore/add/remove/force # Add or remove space around assignment '=' in enum sp_enum_assign = add # ignore/add/remove/force # Add or remove space before assignment '=' in enum. Overrides sp_enum_assign. sp_enum_before_assign = ignore # ignore/add/remove/force # Add or remove space after assignment '=' in enum. Overrides sp_enum_assign. sp_enum_after_assign = ignore # ignore/add/remove/force # Add or remove space around preprocessor '##' concatenation operator. Default=Add sp_pp_concat = add # ignore/add/remove/force # Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. sp_pp_stringify = add # ignore/add/remove/force # Add or remove space before preprocessor '#' stringify operator as in '#define x(y) L#y'. sp_before_pp_stringify = ignore # ignore/add/remove/force # Add or remove space around boolean operators '&&' and '||' sp_bool = add # ignore/add/remove/force # Add or remove space around compare operator '<', '>', '==', etc sp_compare = add # ignore/add/remove/force # Add or remove space inside '(' and ')' sp_inside_paren = remove # ignore/add/remove/force # Add or remove space between nested parens sp_paren_paren = remove # ignore/add/remove/force # Whether to balance spaces inside nested parens sp_balance_nested_parens = false # false/true # Add or remove space between ')' and '{' sp_paren_brace = add # ignore/add/remove/force # Add or remove space before pointer star '*' sp_before_ptr_star = add # ignore/add/remove/force # Add or remove space before pointer star '*' that isn't followed by a variable name # If set to 'ignore', sp_before_ptr_star is used instead. sp_before_unnamed_ptr_star = add # ignore/add/remove/force # Add or remove space between pointer stars '*' sp_between_ptr_star = remove # ignore/add/remove/force # Add or remove space after pointer star '*', if followed by a word. sp_after_ptr_star = remove # ignore/add/remove/force # Add or remove space after a pointer star '*', if followed by a func proto/def. sp_after_ptr_star_func = add # ignore/add/remove/force # Add or remove space after a pointer star '*', if followed by an open paren (function types). sp_ptr_star_paren = ignore # ignore/add/remove/force # Add or remove space before a pointer star '*', if followed by a func proto/def. sp_before_ptr_star_func = remove # ignore/add/remove/force # Add or remove space before a reference sign '&' sp_before_byref = remove # ignore/add/remove/force # Add or remove space before a reference sign '&' that isn't followed by a variable name # If set to 'ignore', sp_before_byref is used instead. sp_before_unnamed_byref = remove # ignore/add/remove/force # Add or remove space after reference sign '&', if followed by a word. sp_after_byref = add # ignore/add/remove/force # Add or remove space after a reference sign '&', if followed by a func proto/def. sp_after_byref_func = add # ignore/add/remove/force # Add or remove space before a reference sign '&', if followed by a func proto/def. sp_before_byref_func = remove # ignore/add/remove/force # Add or remove space between type and word. Default=Force sp_after_type = add # ignore/add/remove/force # Add or remove space before the paren in the D constructs 'template Foo(' and 'class Foo('. sp_before_template_paren = ignore # ignore/add/remove/force # Add or remove space in 'template <' vs 'template<'. # If set to ignore, sp_before_angle is used. sp_template_angle = ignore # ignore/add/remove/force # Add or remove space before '<>' sp_before_angle = remove # ignore/add/remove/force # Add or remove space inside '<' and '>' sp_inside_angle = remove # ignore/add/remove/force # Add or remove space after '<>' sp_after_angle = remove # ignore/add/remove/force # Add or remove space between '<>' and '(' as found in 'new List();' sp_angle_paren = remove # ignore/add/remove/force # Add or remove space between '<>' and a word as in 'List m;' sp_angle_word = remove # ignore/add/remove/force # Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add sp_angle_shift = add # ignore/add/remove/force # Permit removal of the space between '>>' in 'foo >' (C++11 only). Default=False # sp_angle_shift cannot remove the space without this option. sp_permit_cpp11_shift = false # false/true # Add or remove space before '(' of 'if', 'for', 'switch', and 'while' sp_before_sparen = add # ignore/add/remove/force # Add or remove space inside if-condition '(' and ')' sp_inside_sparen = remove # ignore/add/remove/force # Add or remove space before if-condition ')'. Overrides sp_inside_sparen. sp_inside_sparen_close = ignore # ignore/add/remove/force # Add or remove space before if-condition '('. Overrides sp_inside_sparen. sp_inside_sparen_open = ignore # ignore/add/remove/force # Add or remove space after ')' of 'if', 'for', 'switch', and 'while' sp_after_sparen = ignore # ignore/add/remove/force # Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while' sp_sparen_brace = add # ignore/add/remove/force # Add or remove space between 'invariant' and '(' in the D language. sp_invariant_paren = ignore # ignore/add/remove/force # Add or remove space after the ')' in 'invariant (C) c' in the D language. sp_after_invariant_paren = ignore # ignore/add/remove/force # Add or remove space before empty statement ';' on 'if', 'for' and 'while' sp_special_semi = remove # ignore/add/remove/force # Add or remove space before ';'. Default=Remove sp_before_semi = remove # ignore/add/remove/force # Add or remove space before ';' in non-empty 'for' statements sp_before_semi_for = remove # ignore/add/remove/force # Add or remove space before a semicolon of an empty part of a for statement. sp_before_semi_for_empty = remove # ignore/add/remove/force # Add or remove space after ';', except when followed by a comment. Default=Add sp_after_semi = add # ignore/add/remove/force # Add or remove space after ';' in non-empty 'for' statements. Default=Force sp_after_semi_for = force # ignore/add/remove/force # Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; ). sp_after_semi_for_empty = remove # ignore/add/remove/force # Add or remove space before '[' (except '[]') sp_before_square = remove # ignore/add/remove/force # Add or remove space before '[]' sp_before_squares = remove # ignore/add/remove/force # Add or remove space inside a non-empty '[' and ']' sp_inside_square = remove # ignore/add/remove/force # Add or remove space after ',' sp_after_comma = add # ignore/add/remove/force # Add or remove space before ',' sp_before_comma = remove # ignore/add/remove/force # Add or remove space between an open paren and comma: '(,' vs '( ,' sp_paren_comma = force # ignore/add/remove/force # Add or remove space before the variadic '...' when preceded by a non-punctuator sp_before_ellipsis = ignore # ignore/add/remove/force # Add or remove space after class ':' sp_after_class_colon = add # ignore/add/remove/force # Add or remove space before class ':' sp_before_class_colon = add # ignore/add/remove/force # Add or remove space before case ':'. Default=Remove sp_before_case_colon = remove # ignore/add/remove/force # Add or remove space between 'operator' and operator sign sp_after_operator = remove # ignore/add/remove/force # Add or remove space between the operator symbol and the open paren, as in 'operator ++(' sp_after_operator_sym = remove # ignore/add/remove/force # Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a' sp_after_cast = remove # ignore/add/remove/force # Add or remove spaces inside cast parens sp_inside_paren_cast = remove # ignore/add/remove/force # Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)' sp_cpp_cast_paren = remove # ignore/add/remove/force # Add or remove space between 'sizeof' and '(' sp_sizeof_paren = remove # ignore/add/remove/force # Add or remove space after the tag keyword (Pawn) sp_after_tag = ignore # ignore/add/remove/force # Add or remove space inside enum '{' and '}' sp_inside_braces_enum = add # ignore/add/remove/force # Add or remove space inside struct/union '{' and '}' sp_inside_braces_struct = add # ignore/add/remove/force # Add or remove space inside '{' and '}' sp_inside_braces = add # ignore/add/remove/force # Add or remove space inside '{}' sp_inside_braces_empty = remove # ignore/add/remove/force # Add or remove space between return type and function name # A minimum of 1 is forced except for pointer return types. sp_type_func = add # ignore/add/remove/force # Add or remove space between function name and '(' on function declaration sp_func_proto_paren = remove # ignore/add/remove/force # Add or remove space between function name and '(' on function definition sp_func_def_paren = remove # ignore/add/remove/force # Add or remove space inside empty function '()' sp_inside_fparens = remove # ignore/add/remove/force # Add or remove space inside function '(' and ')' sp_inside_fparen = remove # ignore/add/remove/force # Add or remove space inside the first parens in the function type: 'void (*x)(...)' sp_inside_tparen = ignore # ignore/add/remove/force # Add or remove between the parens in the function type: 'void (*x)(...)' sp_after_tparen_close = ignore # ignore/add/remove/force # Add or remove space between ']' and '(' when part of a function call. sp_square_fparen = remove # ignore/add/remove/force # Add or remove space between ')' and '{' of function sp_fparen_brace = add # ignore/add/remove/force # Add or remove space between function name and '(' on function calls sp_func_call_paren = remove # ignore/add/remove/force # Add or remove space between function name and '()' on function calls without parameters. # If set to 'ignore' (the default), sp_func_call_paren is used. sp_func_call_paren_empty = ignore # ignore/add/remove/force # Add or remove space between the user function name and '(' on function calls # You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file. sp_func_call_user_paren = remove # ignore/add/remove/force # Add or remove space between a constructor/destructor and the open paren sp_func_class_paren = remove # ignore/add/remove/force # Add or remove space between 'return' and '(' sp_return_paren = add # ignore/add/remove/force # Add or remove space between '__attribute__' and '(' sp_attribute_paren = remove # ignore/add/remove/force # Add or remove space between 'defined' and '(' in '#if defined (FOO)' sp_defined_paren = remove # ignore/add/remove/force # Add or remove space between 'throw' and '(' in 'throw (something)' sp_throw_paren = remove # ignore/add/remove/force # Add or remove space between 'throw' and anything other than '(' as in '@throw [...];' sp_after_throw = ignore # ignore/add/remove/force # Add or remove space between 'catch' and '(' in 'catch (something) { }' # If set to ignore, sp_before_sparen is used. sp_catch_paren = ignore # ignore/add/remove/force # Add or remove space between 'version' and '(' in 'version (something) { }' (D language) # If set to ignore, sp_before_sparen is used. sp_version_paren = ignore # ignore/add/remove/force # Add or remove space between 'scope' and '(' in 'scope (something) { }' (D language) # If set to ignore, sp_before_sparen is used. sp_scope_paren = ignore # ignore/add/remove/force # Add or remove space between macro and value sp_macro = add # ignore/add/remove/force # Add or remove space between macro function ')' and value sp_macro_func = remove # ignore/add/remove/force # Add or remove space between 'else' and '{' if on the same line sp_else_brace = add # ignore/add/remove/force # Add or remove space between '}' and 'else' if on the same line sp_brace_else = add # ignore/add/remove/force # Add or remove space between '}' and the name of a typedef on the same line sp_brace_typedef = add # ignore/add/remove/force # Add or remove space between 'catch' and '{' if on the same line sp_catch_brace = add # ignore/add/remove/force # Add or remove space between '}' and 'catch' if on the same line sp_brace_catch = add # ignore/add/remove/force # Add or remove space between 'finally' and '{' if on the same line sp_finally_brace = add # ignore/add/remove/force # Add or remove space between '}' and 'finally' if on the same line sp_brace_finally = add # ignore/add/remove/force # Add or remove space between 'try' and '{' if on the same line sp_try_brace = add # ignore/add/remove/force # Add or remove space between get/set and '{' if on the same line sp_getset_brace = add # ignore/add/remove/force # Add or remove space before the '::' operator sp_before_dc = remove # ignore/add/remove/force # Add or remove space after the '::' operator sp_after_dc = remove # ignore/add/remove/force # Add or remove around the D named array initializer ':' operator sp_d_array_colon = ignore # ignore/add/remove/force # Add or remove space after the '!' (not) operator. Default=Remove sp_not = remove # ignore/add/remove/force # Add or remove space after the '~' (invert) operator. Default=Remove sp_inv = remove # ignore/add/remove/force # Add or remove space after the '&' (address-of) operator. Default=Remove # This does not affect the spacing after a '&' that is part of a type. sp_addr = remove # ignore/add/remove/force # Add or remove space around the '.' or '->' operators. Default=Remove sp_member = remove # ignore/add/remove/force # Add or remove space after the '*' (dereference) operator. Default=Remove # This does not affect the spacing after a '*' that is part of a type. sp_deref = remove # ignore/add/remove/force # Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove sp_sign = remove # ignore/add/remove/force # Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove sp_incdec = remove # ignore/add/remove/force # Add or remove space before a backslash-newline at the end of a line. Default=Add sp_before_nl_cont = remove # ignore/add/remove/force # Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;' sp_after_oc_scope = remove # ignore/add/remove/force # Add or remove space after the colon in message specs # '-(int) f:(int) x;' vs '-(int) f: (int) x;' sp_after_oc_colon = remove # ignore/add/remove/force # Add or remove space before the colon in message specs # '-(int) f: (int) x;' vs '-(int) f : (int) x;' sp_before_oc_colon = remove # ignore/add/remove/force # Add or remove space after the colon in immutable dictionary expression # 'NSDictionary *test = @{@"foo" :@"bar"};' sp_after_oc_dict_colon = ignore # ignore/add/remove/force # Add or remove space before the colon in immutable dictionary expression # 'NSDictionary *test = @{@"foo" :@"bar"};' sp_before_oc_dict_colon = ignore # ignore/add/remove/force # Add or remove space after the colon in message specs # '[object setValue:1];' vs '[object setValue: 1];' sp_after_send_oc_colon = add # ignore/add/remove/force # Add or remove space before the colon in message specs # '[object setValue:1];' vs '[object setValue :1];' sp_before_send_oc_colon = remove # ignore/add/remove/force # Add or remove space after the (type) in message specs # '-(int)f: (int) x;' vs '-(int)f: (int)x;' sp_after_oc_type = remove # ignore/add/remove/force # Add or remove space after the first (type) in message specs # '-(int) f:(int)x;' vs '-(int)f:(int)x;' sp_after_oc_return_type = ignore # ignore/add/remove/force # Add or remove space between '@selector' and '(' # '@selector(msgName)' vs '@selector (msgName)' # Also applies to @protocol() constructs sp_after_oc_at_sel = ignore # ignore/add/remove/force # Add or remove space between '@selector(x)' and the following word # '@selector(foo) a:' vs '@selector(foo)a:' sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force # Add or remove space inside '@selector' parens # '@selector(foo)' vs '@selector( foo )' # Also applies to @protocol() constructs sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force # Add or remove space before a block pointer caret # '^int (int arg){...}' vs. ' ^int (int arg){...}' sp_before_oc_block_caret = ignore # ignore/add/remove/force # Add or remove space after a block pointer caret # '^int (int arg){...}' vs. '^ int (int arg){...}' sp_after_oc_block_caret = ignore # ignore/add/remove/force # Add or remove space between the receiver and selector in a message. # '[receiver selector ...]' sp_after_oc_msg_receiver = ignore # ignore/add/remove/force # Add or remove space after @property. sp_after_oc_property = ignore # ignore/add/remove/force # Add or remove space around the ':' in 'b ? t : f' sp_cond_colon = add # ignore/add/remove/force # Add or remove space around the '?' in 'b ? t : f' sp_cond_question = add # ignore/add/remove/force # Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here. sp_case_label = ignore # ignore/add/remove/force # Control the space around the D '..' operator. sp_range = ignore # ignore/add/remove/force # Control the spacing after ':' in 'for (TYPE VAR : EXPR)' (Java) sp_after_for_colon = ignore # ignore/add/remove/force # Control the spacing before ':' in 'for (TYPE VAR : EXPR)' (Java) sp_before_for_colon = ignore # ignore/add/remove/force # Control the spacing in 'extern (C)' (D) sp_extern_paren = ignore # ignore/add/remove/force # Control the space after the opening of a C++ comment '// A' vs '//A' sp_cmt_cpp_start = add # ignore/add/remove/force # Controls the spaces between #else or #endif and a trailing comment sp_endif_cmt = ignore # ignore/add/remove/force # Controls the spaces after 'new', 'delete', and 'delete[]' sp_after_new = ignore # ignore/add/remove/force # Controls the spaces before a trailing or embedded comment sp_before_tr_emb_cmt = ignore # ignore/add/remove/force # Number of spaces before a trailing or embedded comment sp_num_before_tr_emb_cmt = 0 # number # Control space between a Java annotation and the open paren. sp_annotation_paren = ignore # ignore/add/remove/force # # Code alignment (not left column spaces/tabs) # # Whether to keep non-indenting tabs align_keep_tabs = false # false/true # Whether to use tabs for aligning align_with_tabs = false # false/true # Whether to bump out to the next tab when aligning align_on_tabstop = false # false/true # Whether to left-align numbers align_number_left = false # false/true # Align variable definitions in prototypes and functions align_func_params = true # false/true # Align parameters in single-line functions that have the same name. # The function names must already be aligned with each other. align_same_func_call_params = true # false/true # The span for aligning variable definitions (0=don't align) align_var_def_span = 0 # number # How to align the star in variable definitions. # 0=Part of the type 'void * foo;' # 1=Part of the variable 'void *foo;' # 2=Dangling 'void *foo;' align_var_def_star_style = 1 # number # How to align the '&' in variable definitions. # 0=Part of the type # 1=Part of the variable # 2=Dangling align_var_def_amp_style = 2 # number # The threshold for aligning variable definitions (0=no limit) align_var_def_thresh = 3 # number # The gap for aligning variable definitions align_var_def_gap = 1 # number # Whether to align the colon in struct bit fields align_var_def_colon = true # false/true # Whether to align any attribute after the variable name align_var_def_attribute = true # false/true # Whether to align inline struct/enum/union variable definitions align_var_def_inline = true # false/true # The span for aligning on '=' in assignments (0=don't align) align_assign_span = 0 # number # The threshold for aligning on '=' in assignments (0=no limit) align_assign_thresh = 0 # number # The span for aligning on '=' in enums (0=don't align) align_enum_equ_span = 0 # number # The threshold for aligning on '=' in enums (0=no limit) align_enum_equ_thresh = 0 # number # The span for aligning struct/union (0=don't align) align_var_struct_span = 0 # number # The threshold for aligning struct/union member definitions (0=no limit) align_var_struct_thresh = 0 # number # The gap for aligning struct/union member definitions align_var_struct_gap = 0 # number # The span for aligning struct initializer values (0=don't align) align_struct_init_span = 0 # number # The minimum space between the type and the synonym of a typedef align_typedef_gap = 0 # number # The span for aligning single-line typedefs (0=don't align) align_typedef_span = 0 # number # How to align typedef'd functions with other typedefs # 0: Don't mix them at all # 1: align the open paren with the types # 2: align the function type name with the other type names align_typedef_func = 0 # number # Controls the positioning of the '*' in typedefs. Just try it. # 0: Align on typedef type, ignore '*' # 1: The '*' is part of type name: typedef int *pint; # 2: The '*' is part of the type, but dangling: typedef int *pint; align_typedef_star_style = 2 # number # Controls the positioning of the '&' in typedefs. Just try it. # 0: Align on typedef type, ignore '&' # 1: The '&' is part of type name: typedef int &pint; # 2: The '&' is part of the type, but dangling: typedef int &pint; align_typedef_amp_style = 2 # number # The span for aligning comments that end lines (0=don't align) align_right_cmt_span = 4 # number # If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment align_right_cmt_mix = false # false/true # If a trailing comment is more than this number of columns away from the text it follows, # it will qualify for being aligned. This has to be > 0 to do anything. align_right_cmt_gap = 0 # number # Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore) align_right_cmt_at_col = 1 # number # The span for aligning function prototypes (0=don't align) align_func_proto_span = 0 # number # Minimum gap between the return type and the function name. align_func_proto_gap = 0 # number # Align function protos on the 'operator' keyword instead of what follows align_on_operator = true # false/true # Whether to mix aligning prototype and variable declarations. # If true, align_var_def_XXX options are used instead of align_func_proto_XXX options. align_mix_var_proto = false # false/true # Align single-line functions with function prototypes, uses align_func_proto_span align_single_line_func = true # false/true # Aligning the open brace of single-line functions. # Requires align_single_line_func=true, uses align_func_proto_span align_single_line_brace = true # false/true # Gap for align_single_line_brace. align_single_line_brace_gap = 0 # number # The span for aligning ObjC msg spec (0=don't align) align_oc_msg_spec_span = 0 # number # Whether to align macros wrapped with a backslash and a newline. # This will not work right if the macro contains a multi-line comment. align_nl_cont = true # false/true # # Align macro functions and variables together align_pp_define_together = false # false/true # The minimum space between label and value of a preprocessor define align_pp_define_gap = 0 # number # The span for aligning on '#define' bodies (0=don't align) align_pp_define_span = 0 # number # Align lines that start with '<<' with previous '<<'. Default=true align_left_shift = true # false/true # Span for aligning parameters in an Obj-C message call on the ':' (0=don't align) align_oc_msg_colon_span = 0 # number # If true, always align with the first parameter, even if it is too short. align_oc_msg_colon_first = false # false/true # Aligning parameters in an Obj-C '+' or '-' declaration on the ':' align_oc_decl_colon = false # false/true # # Newline adding and removing options # # Whether to collapse empty blocks between '{' and '}' nl_collapse_empty_body = true # false/true # Don't split one-line braced assignments - 'foo_t f = { 1, 2 };' nl_assign_leave_one_liners = false # false/true # Don't split one-line braced statements inside a class xx { } body nl_class_leave_one_liners = false # false/true # Don't split one-line enums: 'enum foo { BAR = 15 };' nl_enum_leave_one_liners = false # false/true # Don't split one-line get or set functions nl_getset_leave_one_liners = false # false/true # Don't split one-line function definitions - 'int foo() { return 0; }' nl_func_leave_one_liners = false # false/true # Don't split one-line if/else statements - 'if(a) b++;' nl_if_leave_one_liners = true # false/true # Don't split one-line OC messages nl_oc_msg_leave_one_liner = false # false/true # Add or remove newlines at the start of the file nl_start_of_file = ignore # ignore/add/remove/force # The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force' nl_start_of_file_min = 0 # number # Add or remove newline at the end of the file nl_end_of_file = add # ignore/add/remove/force # The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force') nl_end_of_file_min = 1 # number # Add or remove newline between '=' and '{' nl_assign_brace = ignore # ignore/add/remove/force # Add or remove newline between '=' and '[' (D only) nl_assign_square = ignore # ignore/add/remove/force # Add or remove newline after '= [' (D only). Will also affect the newline before the ']' nl_after_square_assign = ignore # ignore/add/remove/force # The number of blank lines after a block of variable definitions at the top of a function body # 0 = No change (default) nl_func_var_def_blk = 1 # number # The number of newlines before a block of typedefs # 0 = No change (default) nl_typedef_blk_start = 0 # number # The number of newlines after a block of typedefs # 0 = No change (default) nl_typedef_blk_end = 0 # number # The maximum consecutive newlines within a block of typedefs # 0 = No change (default) nl_typedef_blk_in = 0 # number # The number of newlines before a block of variable definitions not at the top of a function body # 0 = No change (default) nl_var_def_blk_start = 0 # number # The number of newlines after a block of variable definitions not at the top of a function body # 0 = No change (default) nl_var_def_blk_end = 0 # number # The maximum consecutive newlines within a block of variable definitions # 0 = No change (default) nl_var_def_blk_in = 0 # number # Add or remove newline between a function call's ')' and '{', as in: # list_for_each(item, &list) { } nl_fcall_brace = ignore # ignore/add/remove/force # Add or remove newline between 'enum' and '{' nl_enum_brace = ignore # ignore/add/remove/force # Add or remove newline between 'struct and '{' nl_struct_brace = ignore # ignore/add/remove/force # Add or remove newline between 'union' and '{' nl_union_brace = ignore # ignore/add/remove/force # Add or remove newline between 'if' and '{' nl_if_brace = ignore # ignore/add/remove/force # Add or remove newline between '}' and 'else' nl_brace_else = remove # ignore/add/remove/force # Add or remove newline between 'else if' and '{' # If set to ignore, nl_if_brace is used instead nl_elseif_brace = ignore # ignore/add/remove/force # Add or remove newline between 'else' and '{' nl_else_brace = ignore # ignore/add/remove/force # Add or remove newline between 'else' and 'if' nl_else_if = ignore # ignore/add/remove/force # Add or remove newline between '}' and 'finally' nl_brace_finally = ignore # ignore/add/remove/force # Add or remove newline between 'finally' and '{' nl_finally_brace = ignore # ignore/add/remove/force # Add or remove newline between 'try' and '{' nl_try_brace = ignore # ignore/add/remove/force # Add or remove newline between get/set and '{' nl_getset_brace = ignore # ignore/add/remove/force # Add or remove newline between 'for' and '{' nl_for_brace = ignore # ignore/add/remove/force # Add or remove newline between 'catch' and '{' nl_catch_brace = ignore # ignore/add/remove/force # Add or remove newline between '}' and 'catch' nl_brace_catch = ignore # ignore/add/remove/force # Add or remove newline between 'while' and '{' nl_while_brace = ignore # ignore/add/remove/force # Add or remove newline between 'scope (x)' and '{' (D) nl_scope_brace = ignore # ignore/add/remove/force # Add or remove newline between 'unittest' and '{' (D) nl_unittest_brace = ignore # ignore/add/remove/force # Add or remove newline between 'version (x)' and '{' (D) nl_version_brace = ignore # ignore/add/remove/force # Add or remove newline between 'using' and '{' nl_using_brace = ignore # ignore/add/remove/force # Add or remove newline between two open or close braces. # Due to general newline/brace handling, REMOVE may not work. nl_brace_brace = ignore # ignore/add/remove/force # Add or remove newline between 'do' and '{' nl_do_brace = ignore # ignore/add/remove/force # Add or remove newline between '}' and 'while' of 'do' statement nl_brace_while = ignore # ignore/add/remove/force # Add or remove newline between 'switch' and '{' nl_switch_brace = ignore # ignore/add/remove/force # Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc. # Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch, and nl_catch_brace. nl_multi_line_cond = false # false/true # Force a newline in a define after the macro name for multi-line defines. nl_multi_line_define = false # false/true # Whether to put a newline before 'case' statement nl_before_case = true # false/true # Add or remove newline between ')' and 'throw' nl_before_throw = ignore # ignore/add/remove/force # Whether to put a newline after 'case' statement nl_after_case = true # false/true # Add or remove a newline between a case ':' and '{'. Overrides nl_after_case. nl_case_colon_brace = ignore # ignore/add/remove/force # Newline between namespace and { nl_namespace_brace = remove # ignore/add/remove/force # Add or remove newline between 'template<>' and whatever follows. nl_template_class = ignore # ignore/add/remove/force # Add or remove newline between 'class' and '{' nl_class_brace = remove # ignore/add/remove/force # Add or remove newline after each ',' in the constructor member initialization nl_class_init_args = add # ignore/add/remove/force # Add or remove newline between return type and function name in a function definition nl_func_type_name = ignore # ignore/add/remove/force # Add or remove newline between return type and function name inside a class {} # Uses nl_func_type_name or nl_func_proto_type_name if set to ignore. nl_func_type_name_class = ignore # ignore/add/remove/force # Add or remove newline between function scope and name in a definition # Controls the newline after '::' in 'void A::f() { }' nl_func_scope_name = ignore # ignore/add/remove/force # Add or remove newline between return type and function name in a prototype nl_func_proto_type_name = ignore # ignore/add/remove/force # Add or remove newline between a function name and the opening '(' nl_func_paren = ignore # ignore/add/remove/force # Add or remove newline between a function name and the opening '(' in the definition nl_func_def_paren = ignore # ignore/add/remove/force # Add or remove newline after '(' in a function declaration nl_func_decl_start = ignore # ignore/add/remove/force # Add or remove newline after '(' in a function definition nl_func_def_start = ignore # ignore/add/remove/force # Overrides nl_func_decl_start when there is only one parameter. nl_func_decl_start_single = ignore # ignore/add/remove/force # Overrides nl_func_def_start when there is only one parameter. nl_func_def_start_single = ignore # ignore/add/remove/force # Add or remove newline after each ',' in a function declaration nl_func_decl_args = add # ignore/add/remove/force # Add or remove newline after each ',' in a function definition nl_func_def_args = ignore # ignore/add/remove/force # Add or remove newline before the ')' in a function declaration nl_func_decl_end = ignore # ignore/add/remove/force # Add or remove newline before the ')' in a function definition nl_func_def_end = ignore # ignore/add/remove/force # Overrides nl_func_decl_end when there is only one parameter. nl_func_decl_end_single = ignore # ignore/add/remove/force # Overrides nl_func_def_end when there is only one parameter. nl_func_def_end_single = ignore # ignore/add/remove/force # Add or remove newline between '()' in a function declaration. nl_func_decl_empty = ignore # ignore/add/remove/force # Add or remove newline between '()' in a function definition. nl_func_def_empty = ignore # ignore/add/remove/force # Whether to put each OC message parameter on a separate line # See nl_oc_msg_leave_one_liner nl_oc_msg_args = false # false/true # Add or remove newline between function signature and '{' nl_fdef_brace = ignore # ignore/add/remove/force # Add or remove a newline between the return keyword and return expression. nl_return_expr = ignore # ignore/add/remove/force # Whether to put a newline after semicolons, except in 'for' statements nl_after_semicolon = false # false/true # Whether to put a newline after brace open. # This also adds a newline before the matching brace close. nl_after_brace_open = false # false/true # If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is # placed between the open brace and a trailing single-line comment. nl_after_brace_open_cmt = false # false/true # Whether to put a newline after a virtual brace open with a non-empty body. # These occur in un-braced if/while/do/for statement bodies. nl_after_vbrace_open = false # false/true # Whether to put a newline after a virtual brace open with an empty body. # These occur in un-braced if/while/do/for statement bodies. nl_after_vbrace_open_empty = false # false/true # Whether to put a newline after a brace close. # Does not apply if followed by a necessary ';'. nl_after_brace_close = false # false/true # Whether to put a newline after a virtual brace close. # Would add a newline before return in: 'if (foo) a++; return;' nl_after_vbrace_close = false # false/true # Control the newline between the close brace and 'b' in: 'struct { int a; } b;' # Affects enums, unions, and structures. If set to ignore, uses nl_after_brace_close nl_brace_struct_var = ignore # ignore/add/remove/force # Whether to alter newlines in '#define' macros nl_define_macro = true # false/true # Whether to not put blanks after '#ifxx', '#elxx', or before '#endif' nl_squeeze_ifdef = false # false/true # Add or remove blank line before 'if' nl_before_if = add # ignore/add/remove/force # Add or remove blank line after 'if' statement nl_after_if = ignore # ignore/add/remove/force # Add or remove blank line before 'for' nl_before_for = add # ignore/add/remove/force # Add or remove blank line after 'for' statement nl_after_for = ignore # ignore/add/remove/force # Add or remove blank line before 'while' nl_before_while = add # ignore/add/remove/force # Add or remove blank line after 'while' statement nl_after_while = ignore # ignore/add/remove/force # Add or remove blank line before 'switch' nl_before_switch = add # ignore/add/remove/force # Add or remove blank line after 'switch' statement nl_after_switch = ignore # ignore/add/remove/force # Add or remove blank line before 'do' nl_before_do = add # ignore/add/remove/force # Add or remove blank line after 'do/while' statement nl_after_do = ignore # ignore/add/remove/force # Whether to double-space commented-entries in struct/enum nl_ds_struct_enum_cmt = true # false/true # Whether to double-space before the close brace of a struct/union/enum # (lower priority than 'eat_blanks_before_close_brace') nl_ds_struct_enum_close_brace = true # false/true # Add or remove a newline around a class colon. # Related to pos_class_colon, nl_class_init_args, and pos_comma. nl_class_colon = ignore # ignore/add/remove/force # Change simple unbraced if statements into a one-liner # 'if(b)\n i++;' => 'if(b) i++;' nl_create_if_one_liner = true # false/true # Change simple unbraced for statements into a one-liner # 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);' nl_create_for_one_liner = true # false/true # Change simple unbraced while statements into a one-liner # 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);' nl_create_while_one_liner = true # false/true # # Positioning options # # The position of arithmetic operators in wrapped expressions pos_arith = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of assignment in wrapped expressions. # Do not affect '=' followed by '{' pos_assign = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of boolean operators in wrapped expressions pos_bool = lead_break # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of comparison operators in wrapped expressions pos_compare = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of conditional (b ? t : f) operators in wrapped expressions pos_conditional = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of the comma in wrapped expressions pos_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of the comma in the constructor initialization list pos_class_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of colons between constructor and member initialization pos_class_colon = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # # Line Splitting options # # Try to limit code width to N number of columns code_width = 80 # number # Whether to fully split long 'for' statements at semi-colons ls_for_split_full = false # false/true # Whether to fully split long function protos/calls at commas ls_func_split_full = true # false/true # Whether to split lines as close to code_width as possible and ignore some groupings ls_code_width = false # false/true # # Blank line options # # The maximum consecutive newlines nl_max = 3 # number # The number of newlines after a function prototype, if followed by another function prototype nl_after_func_proto = 0 # number # The number of newlines after a function prototype, if not followed by another function prototype nl_after_func_proto_group = 0 # number # The number of newlines after '}' of a multi-line function body nl_after_func_body = 2 # number # The number of newlines after '}' of a multi-line function body in a class declaration nl_after_func_body_class = 0 # number # The number of newlines after '}' of a single line function body nl_after_func_body_one_liner = 2 # number # The minimum number of newlines before a multi-line comment. # Doesn't apply if after a brace open or another multi-line comment. nl_before_block_comment = 2 # number # The minimum number of newlines before a single-line C comment. # Doesn't apply if after a brace open or other single-line C comments. nl_before_c_comment = 2 # number # The minimum number of newlines before a CPP comment. # Doesn't apply if after a brace open or other CPP comments. nl_before_cpp_comment = 2 # number # Whether to force a newline after a multi-line comment. nl_after_multiline_comment = true # false/true # The number of newlines after '}' or ';' of a struct/enum/union definition nl_after_struct = 0 # number # The number of newlines after '}' or ';' of a class definition nl_after_class = 0 # number # The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. # Will not change the newline count if after a brace open. # 0 = No change. nl_before_access_spec = 2 # number # The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. # 0 = No change. nl_after_access_spec = 2 # number # The number of newlines between a function def and the function comment. # 0 = No change. nl_comment_func_def = 1 # number # The number of newlines after a try-catch-finally block that isn't followed by a brace close. # 0 = No change. nl_after_try_catch_finally = 1 # number # The number of newlines before and after a property, indexer or event decl. # 0 = No change. nl_around_cs_property = 0 # number # The number of newlines between the get/set/add/remove handlers in C#. # 0 = No change. nl_between_get_set = 0 # number # Add or remove newline between C# property and the '{' nl_property_brace = ignore # ignore/add/remove/force # Whether to remove blank lines after '{' eat_blanks_after_open_brace = true # false/true # Whether to remove blank lines before '}' eat_blanks_before_close_brace = true # false/true # How aggressively to remove extra newlines not in preproc. # 0: No change # 1: Remove most newlines not handled by other config # 2: Remove all newlines and reformat completely by config nl_remove_extra_newlines = 0 # number # Whether to put a blank line before 'return' statements, unless after an open brace. nl_before_return = false # false/true # Whether to put a blank line after 'return' statements, unless followed by a close brace. nl_after_return = true # false/true # Whether to put a newline after a Java annotation statement. # Only affects annotations that are after a newline. nl_after_annotation = ignore # ignore/add/remove/force # Controls the newline between two annotations. nl_between_annotation = ignore # ignore/add/remove/force # # Code modifying options (non-whitespace) # # Add or remove braces on single-line 'do' statement mod_full_brace_do = add # ignore/add/remove/force # Add or remove braces on single-line 'for' statement mod_full_brace_for = add # ignore/add/remove/force # Add or remove braces on single-line function definitions. (Pawn) mod_full_brace_function = ignore # ignore/add/remove/force # Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'. mod_full_brace_if = add # ignore/add/remove/force # Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if. # If any must be braced, they are all braced. If all can be unbraced, then the braces are removed. mod_full_brace_if_chain = false # false/true # Don't remove braces around statements that span N newlines mod_full_brace_nl = 1 # number # Add or remove braces on single-line 'while' statement mod_full_brace_while = add # ignore/add/remove/force # Add or remove braces on single-line 'using ()' statement mod_full_brace_using = ignore # ignore/add/remove/force # Add or remove unnecessary paren on 'return' statement mod_paren_on_return = remove # ignore/add/remove/force # Whether to change optional semicolons to real semicolons mod_pawn_semicolon = false # false/true # Add parens on 'while' and 'if' statement around bools mod_full_paren_if_bool = true # false/true # Whether to remove superfluous semicolons mod_remove_extra_semicolon = true # false/true # If a function body exceeds the specified number of newlines and doesn't have a comment after # the close brace, a comment will be added. mod_add_long_function_closebrace_comment = 0 # number # If a switch body exceeds the specified number of newlines and doesn't have a comment after # the close brace, a comment will be added. mod_add_long_switch_closebrace_comment = 0 # number # If an #ifdef body exceeds the specified number of newlines and doesn't have a comment after # the #endif, a comment will be added. mod_add_long_ifdef_endif_comment = 1 # number # If an #ifdef or #else body exceeds the specified number of newlines and doesn't have a comment after # the #else, a comment will be added. mod_add_long_ifdef_else_comment = 1 # number # If TRUE, will sort consecutive single-line 'import' statements [Java, D] mod_sort_import = false # false/true # If TRUE, will sort consecutive single-line 'using' statements [C#] mod_sort_using = false # false/true # If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C] # This is generally a bad idea, as it may break your code. mod_sort_include = false # false/true # If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace. mod_move_case_break = true # false/true # Will add or remove the braces around a fully braced case statement. # Will only remove the braces if there are no variable declarations in the block. mod_case_brace = ignore # ignore/add/remove/force # If TRUE, it will remove a void 'return;' that appears as the last statement in a function. mod_remove_empty_return = true # false/true # # Comment modifications # # Try to wrap comments at cmt_width columns cmt_width = 80 # number # Set the comment reflow mode (default: 0) # 0: no reflowing (apart from the line wrapping due to cmt_width) # 1: no touching at all # 2: full reflow cmt_reflow_mode = 0 # number # If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars. # Default is true. cmt_indent_multi = true # false/true # Whether to group c-comments that look like they are in a block cmt_c_group = false # false/true # Whether to put an empty '/*' on the first line of the combined c-comment cmt_c_nl_start = false # false/true # Whether to put a newline before the closing '*/' of the combined c-comment cmt_c_nl_end = false # false/true # Whether to group cpp-comments that look like they are in a block cmt_cpp_group = false # false/true # Whether to put an empty '/*' on the first line of the combined cpp-comment cmt_cpp_nl_start = false # false/true # Whether to put a newline before the closing '*/' of the combined cpp-comment cmt_cpp_nl_end = false # false/true # Whether to change cpp-comments into c-comments cmt_cpp_to_c = false # false/true # Whether to put a star on subsequent comment lines cmt_star_cont = false # false/true # The number of spaces to insert at the start of subsequent comment lines cmt_sp_before_star_cont = 0 # number # The number of spaces to insert after the star on subsequent comment lines cmt_sp_after_star_cont = 0 # number # For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of # the comment are the same length. Default=True cmt_multi_check_last = true # false/true # The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment. # Will substitute $(filename) with the current file's name. cmt_insert_file_header = "" # string # The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment. # Will substitute $(filename) with the current file's name. cmt_insert_file_footer = "" # string # The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment. # Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff. # Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... } cmt_insert_func_header = "" # string # The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment. # Will substitute $(class) with the class name. cmt_insert_class_header = "" # string # The filename that contains text to insert before an Obj-C message specification if the method isn't preceded with a C/C++ comment. # Will substitute $(message) with the function name and $(javaparam) with the javadoc @param and @return stuff. cmt_insert_oc_msg_header = "" # string # If a preprocessor is encountered when stepping backwards from a function name, then # this option decides whether the comment should be inserted. # Affects cmt_insert_oc_msg_header, cmt_insert_func_header and cmt_insert_class_header. cmt_insert_before_preproc = false # false/true # # Preprocessor options # # Control indent of preprocessors inside #if blocks at brace level 0 pp_indent = ignore # ignore/add/remove/force # Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false) pp_indent_at_level = false # false/true # If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1. pp_indent_count = 1 # number # Add or remove space after # based on pp_level of #if blocks pp_space = add # ignore/add/remove/force # Sets the number of spaces added with pp_space pp_space_count = 0 # number # The indent for #region and #endregion in C# and '#pragma region' in C/C++ pp_indent_region = 0 # number # Whether to indent the code between #region and #endregion pp_region_indent_code = false # false/true # If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level pp_indent_if = 0 # number # Control whether to indent the code between #if, #else and #endif when not at file-level pp_if_indent_code = false # false/true # Whether to indent '#define' at the brace level (true) or from column 1 (false) pp_define_at_level = false # false/true # You can force a token to be a type with the 'type' option. # Example: # type myfoo1 myfoo2 # # You can create custom macro-based indentation using macro-open, # macro-else and macro-close. # Example: # macro-open BEGIN_TEMPLATE_MESSAGE_MAP # macro-open BEGIN_MESSAGE_MAP # macro-close END_MESSAGE_MAP # # You can assign any keyword to any type with the set option. # set func_call_user _ N_ # # The full syntax description of all custom definition config entries # is shown below: # # define custom tokens as: # - embed whitespace in token using '' escape character, or # put token in quotes # - these: ' " and ` are recognized as quote delimiters # # type token1 token2 token3 ... # ^ optionally specify multiple tokens on a single line # define def_token output_token # ^ output_token is optional, then NULL is assumed # macro-open token # macro-close token # macro-else token # set id token1 token2 ... # ^ optionally specify multiple tokens on a single line # ^ id is one of the names in token_enum.h sans the CT_ prefix, # e.g. PP_PRAGMA # # all tokens are separated by any mix of ',' commas, '=' equal signs # and whitespace (space, tab) # neovim-0.2.2/contrib/vim-addon-local-vimrc/000077500000000000000000000000001320401574200205325ustar00rootroot00000000000000neovim-0.2.2/contrib/vim-addon-local-vimrc/README.md000066400000000000000000000005441320401574200220140ustar00rootroot00000000000000# vim-addon-local-vimrc ## Installation ### Step 1 Install [vim-addon-local-vimrc](https://github.com/MarcWeber/vim-addon-local-vimrc). For example with [Vundle](https://github.com/MarcWeber/vim-addon-local-vimrc): ```vim Bundle 'MarcWeber/vim-addon-local-vimrc' ``` ### Step 2 ```bash cp vimrc ../../.vimrc echo .vimrc >> ../../.git/info/exclude ``` neovim-0.2.2/contrib/vim-addon-local-vimrc/vimrc000066400000000000000000000005061320401574200215760ustar00rootroot00000000000000set modelines=0 augroup LOCAL_SETUP autocmd! autocmd BufRead,BufNewFile *.h set filetype=c autocmd FileType c setlocal expandtab autocmd FileType c setlocal shiftwidth=2 autocmd FileType c setlocal softtabstop=2 autocmd FileType c setlocal textwidth=80 autocmd FileType c setlocal comments=:///,:// augroup end neovim-0.2.2/man/000077500000000000000000000000001320401574200135615ustar00rootroot00000000000000neovim-0.2.2/man/Makefile000066400000000000000000000000751320401574200152230ustar00rootroot00000000000000MAN = nvim.1 lint: mandoc -Tlint -Wall $(MAN) igor $(MAN) neovim-0.2.2/man/nvim.1000066400000000000000000000204271320401574200146210ustar00rootroot00000000000000.Dd January 28, 2016 .Dt NVIM 1 .Os .Sh NAME .Nm nvim .Nd edit text .Sh SYNOPSIS .Nm .Op Ar options .Op Ar file ... .Nm .Op Ar options .Fl .Nm .Op Ar options .Fl t Ar tag .Nm .Op Ar options .Fl q Op Ar errorfile .Sh DESCRIPTION .Nm is a text editor based on Vim. To enter commands in .Nm , type a colon .Pq Sq \&: which is also used in this manual to denote commands. For more information, consult the on-line help system with the .Ic :help command. .Bl -tag -width Fl .It Ar file ... File(s) to edit. If none are specified, open an empty buffer. If multiple files are specified, open one buffer for each file. To switch between buffers, use the .Ic :next and .Ic :previous commands. .It Fl Read text from standard input until .Dv EOF , then open a buffer with that text. Commands are read from standard error, which should be a terminal. .It Fl t Ar tag The file to edit and the initial cursor position depends on a tag, a sort of goto label. .Ar tag is looked up in the tags file, the associated file becomes the current file and the associated command is executed. If .Ar tag is a function name, the file containing that function is opened with the cursor positioned at the start of the function. See .Ic :help tag-commands . .It Fl q Op Ar errorfile QuickFix mode. Display the first error in .Ar errorfile . If .Ar errorfile is omitted, the value of the 'errorfile' option is used (defaults to .Cm errors.err ) . Further errors can be jumped to with the .Ic :cnext command. See .Ic :help quickfix . .It There are a number of other options: .It Fl - Interpret all further arguments as files. Can be used to edit files starting with a hyphen .Pq Sq - . .It Fl -literal Interpret filenames literally, that is, do not expand wildcards. Has no effect on Unix-like systems, where the shell expands wildcards. .It Fl e Ex mode. See .Ic :help Ex-mode . .It Fl E Improved Ex mode. See .Ic :help gQ . .It Fl s Silent mode. Only takes effect if .Fl e or .Fl E is specified before it. .It Fl d Diff mode. Show the difference between two to four files, similar to .Xr sdiff 1 . See .Ic :help diff . .It Fl R Read-only mode. Sets the option 'readonly'. Implies .Fl n . Buffers can still be edited, but cannot be written to disk if already associated with a file. To overwrite a file, add an exclamation mark to the needed Ex command, such as .Ic :w! . See .Ic :help 'readonly' . .It Fl Z Restricted mode. Disable commands that make use of an external shell. .It Fl m Disable file modifications. Unsets the option 'write'. Writing to a file is disabled, but buffers can still be modified. .It Fl M Disable file and buffer modifications. Unsets the options 'write' and 'modifiable'. Note that these options can be set to re-enable making modifications. .It Fl b Binary mode. See .Ic :help edit-binary . .It Fl l Lisp mode. Sets the options 'lisp' and 'showmatch'. .It Fl A Arabic mode. Sets the option 'arabic'. .It Fl F Farsi mode. Sets the options 'fkmap' and 'rightleft'. .It Fl H Hebrew mode. Sets the options 'hkmap' and 'rightleft'. .It Fl V Ns Oo Ar N Oc Ns Op Ar file Verbose mode. Print messages about which files are being sourced and for reading and writing a ShaDa file. .Ar N is the value for the 'verbose' option; defaults to .Cm 10 if omitted. If .Ar file is specified, append messages to .Ar file instead of printing them. .It Fl D Debugging mode. Started when executing the first command from a script. .It Fl n Disable the use of swap files. Sets the option 'updatecount' to .Cm 0 . Can be useful for editing file(s) on a slow medium. .It Fl r Op Ar file Recovery mode. If .Ar file is omitted then list swap files with recovery information. Otherwise the swap file .Ar file is used to recover a crashed session. The swap file has the same name as the file it's associated with, but with .Sq .swp appended. See .Ic :help recovery . .It Fl L Op Ar file Alias for .Fl r . .It Fl u Ar vimrc Use .Ar vimrc instead of the default of .Pa ~/.config/nvim/init.vim . If .Ar vimrc is .Cm NORC , do not load any initialization files (excluding plugins), and do not attempt to parse environment variables. If .Ar vimrc is .Cm NONE , loading plugins is also skipped. See .Ic :help initialization . .It Fl i Ar shada Use .Ar shada instead of the default of .Pa ~/.local/share/nvim/shada/main.shada . If .Ar shada is .Cm NONE , do not read or write a ShaDa file. See .Ic :help shada . .It Fl -noplugin Skip loading plugins. Implied by .Cm -u NONE . .It Fl o Ns Op Ar N Open .Ar N windows stacked horizontally. If .Ar N is omitted, open one window for each file. If .Ar N is less than the number of file arguments, allocate windows for the first .Ar N files and hide the rest. .It Fl O Ns Op Ar N Like .Fl o , but tile windows vertically. .It Fl p Ns Op Ar N Like .Fl o , but for tab pages. .It Cm + Ns Op Ar linenum For the first file, position the cursor on line .Ar linenum . If .Ar linenum is omitted, position the cursor on the last line of the file. Note that .Cm +5 and .Cm -c 5 on the command-line are equivalent to .Ic :5 inside .Nm . .It Cm +/ Ns Op Ar pattern For the first file, position the cursor on the first occurrence of .Ar pattern . If .Ar pattern is omitted, the most recently used search pattern is used (if there is one). Note that .Cm +/foo and .Cm -c /foo on the command-line are equivalent to .Ic /foo and .Ic :/foo inside .Nm . See .Ic :help search-pattern . .It Fl c Ar command Execute .Ar command after reading the first file. Up to 10 instances of .Fl c or .Cm + can be used. Note that .Qq Cm +set si and .Cm -c \(dqset si\(dq are equivalent. .It Fl -cmd Ar command Like .Fl c , but execute .Ar command before processing any vimrc. Up to 10 instances of these can be used independently from instances of .Fl c . .It Fl S Op Ar session Source .Ar session after the first file argument has been read. Equivalent to .Cm -c \(dqsource session\(dq . .Ar session cannot start with a hyphen .Pq Sq - . If .Ar session is omitted, then .Pa Session.vim , if found, is used. See .Ic :help session-file . .It Fl s Ar scriptin Read normal mode commands from .Ar scriptin . The same can be done with the command .Ic :source! scriptin . If the end of the file is reached before .Nm exits, further characters are read from the keyboard. .It Fl w Ar scriptout Append all typed characters to .Ar scriptout . Can be used for creating a script to be used with .Fl s or .Ic :source! . .It Fl W Ar scriptout Like .Fl w , but truncate .Ar scriptout . .It Fl -startuptime Ar file During startup, append timing messages to .Ar file . Can be used to diagnose slow startup times. .It Fl -api-info Dump API metadata serialized to msgpack and exit. .It Fl -embed Use standard input and standard output as a msgpack-rpc channel. Implies .Fl -headless . .It Fl -headless Do not start a user interface. .It Fl h , -help Print usage information and exit. .It Fl v , -version Print version information and exit. .El .Sh ENVIRONMENT .Bl -tag -width Fl .It Ev VIM Used to locate various user files, such as the user's init.vim. .It Ev VIMRUNTIME Used to locate run time files, such as on-line documentation and syntax highlighting definitions. .It Ev XDG_CONFIG_HOME Path to use for the user-local configuration directory, see .Sx FILES . Defaults to .Pa ~/.config if not set. .It Ev XDG_DATA_HOME Like .Ev XDG_CONFIG_HOME , but used to store data not generally edited by the user, namely swap, backup, and ShaDa files. Defaults to .Pa ~/.local/share if not set. .It Ev VIMINIT A string of Ex commands to be executed at startup. For example, the command to quit is .Ic :q , so to have .Nm quit immediately after starting, set .Ev VIMINIT to .Cm q . See .Ic :help VIMINIT . .It Ev SHELL Used to set the 'shell' option, which determines the shell used by the .Ic :terminal command. .El .Sh FILES .Bl -tag -width "~/.config/nvim/init.vim" .It Pa ~/.config/nvim/init.vim The user-local .Nm configuration file. See .Ev XDG_CONFIG_HOME above. .It Pa ~/.config/nvim The user-local .Nm configuration directory. See .Ev XDG_CONFIG_HOME above. .It Pa $VIM/sysinit.vim The system-global .Nm configuration file. .It Pa /usr/local/share/nvim The system-global .Nm runtime directory. .El .Sh AUTHORS .Nm was started by .An Thiago de Arruda , with a lot of help from others. .Pp Most of Vim was written by .An -nosplit .An Bram Moolenaar , with a lot of help from others. See .Ic :help credits . .Pp Vim is based on Stevie, worked on by .An Tim Thompson , .An Tony Andrews , and .An G.R. (Fred) Walter . neovim-0.2.2/runtime/000077500000000000000000000000001320401574200144715ustar00rootroot00000000000000neovim-0.2.2/runtime/CMakeLists.txt000066400000000000000000000112451320401574200172340ustar00rootroot00000000000000set(SYN_VIM_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/genvimvim.lua) set(GENERATED_RUNTIME_DIR ${PROJECT_BINARY_DIR}/runtime) set(GENERATED_SYN_VIM ${GENERATED_RUNTIME_DIR}/syntax/vim/generated.vim) set(GENERATED_HELP_TAGS ${GENERATED_RUNTIME_DIR}/doc/tags) set(GENERATED_PACKAGE_DIR ${GENERATED_RUNTIME_DIR}/pack/dist/opt) set(FUNCS_DATA ${PROJECT_BINARY_DIR}/funcs_data.mpack) file(MAKE_DIRECTORY ${GENERATED_RUNTIME_DIR}) file(MAKE_DIRECTORY ${GENERATED_RUNTIME_DIR}/syntax) file(MAKE_DIRECTORY ${GENERATED_RUNTIME_DIR}/syntax/vim) add_custom_command(OUTPUT ${GENERATED_SYN_VIM} COMMAND ${LUA_PRG} ${SYN_VIM_GENERATOR} ${PROJECT_SOURCE_DIR}/src/nvim ${GENERATED_SYN_VIM} ${FUNCS_DATA} DEPENDS ${SYN_VIM_GENERATOR} ${PROJECT_SOURCE_DIR}/src/nvim/ex_cmds.lua ${PROJECT_SOURCE_DIR}/src/nvim/auevents.lua ${PROJECT_SOURCE_DIR}/src/nvim/options.lua ${PROJECT_SOURCE_DIR}/src/nvim/eval.c ${FUNCS_DATA} ) if(POLICY CMP0054) cmake_policy(SET CMP0054 OLD) endif() file(GLOB PACKAGES ${PROJECT_SOURCE_DIR}/runtime/pack/dist/opt/*) set(GENERATED_PACKAGE_TAGS) foreach(PACKAGE ${PACKAGES}) get_filename_component(PACKNAME ${PACKAGE} NAME) file(GLOB "${PACKNAME}_DOC_FILES" ${PACKAGE}/doc/*.txt) if("${PACKNAME}_DOC_FILES") file(MAKE_DIRECTORY ${GENERATED_PACKAGE_DIR}/${PACKNAME}) add_custom_target("${PACKNAME}-tags" COMMAND ${CMAKE_COMMAND} -E copy_directory ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME} COMMAND "${PROJECT_BINARY_DIR}/bin/nvim" -u NONE -i NONE -e --headless -c "helptags doc" -c quit DEPENDS nvim WORKING_DIRECTORY "${GENERATED_PACKAGE_DIR}/${PACKNAME}" ) add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags" DEPENDS "${PACKNAME}-tags" ) set("${PACKNAME}_DOC_NAMES") foreach(DF "${${PACKNAME}_DOC_FILES}") get_filename_component(F ${DF} NAME) list(APPEND "${PACKNAME}_DOC_NAMES" ${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/${F}) endforeach() install_helper( FILES ${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags "${${PACKNAME}_DOC_NAMES}" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/pack/dist/opt/${PACKNAME}/doc) list(APPEND GENERATED_PACKAGE_TAGS "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags") endif() endforeach() file(GLOB DOCFILES ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt) set(BUILDDOCFILES) foreach(DF ${DOCFILES}) get_filename_component(F ${DF} NAME) list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F}) endforeach() add_custom_target(helptags COMMAND ${CMAKE_COMMAND} -E remove_directory ${GENERATED_RUNTIME_DIR}/doc COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc COMMAND "${PROJECT_BINARY_DIR}/bin/nvim" -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit DEPENDS nvim WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}" ) add_custom_command(OUTPUT ${GENERATED_HELP_TAGS} DEPENDS helptags ) add_custom_target(doc_html COMMAND make html DEPENDS ${GENERATED_HELP_TAGS} WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc" ) add_custom_target( runtime ALL DEPENDS ${GENERATED_SYN_VIM} ${GENERATED_HELP_TAGS} ${GENERATED_PACKAGE_TAGS} ) # CMake is painful here. It will create the destination using the user's # current umask, and we don't want that. And we don't just want to install # the target directory, as it will mess with existing permissions. So this # seems like the best compromise. If we create it, then everyone can see it. # If it's preexisting, leave it alone. install_helper( FILES ${GENERATED_HELP_TAGS} ${BUILDDOCFILES} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/doc) install_helper( FILES ${GENERATED_SYN_VIM} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/syntax/vim) if(NOT APPLE) install_helper( FILES ${CMAKE_CURRENT_SOURCE_DIR}/nvim.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) install_helper( FILES ${CMAKE_CURRENT_SOURCE_DIR}/nvim.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps) endif() file(GLOB_RECURSE RUNTIME_PROGRAMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.awk *.sh *.bat) foreach(PROG ${RUNTIME_PROGRAMS}) get_filename_component(BASEDIR ${PROG} PATH) install_helper(PROGRAMS ${PROG} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/${BASEDIR}) endforeach() file(GLOB_RECURSE RUNTIME_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} rgb.txt *.vim *.dict *.py *.rb *.ps *.tutor) foreach(F ${RUNTIME_FILES}) get_filename_component(BASEDIR ${F} PATH) install_helper(FILES ${F} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/${BASEDIR}) endforeach() neovim-0.2.2/runtime/autoload/000077500000000000000000000000001320401574200163015ustar00rootroot00000000000000neovim-0.2.2/runtime/autoload/README.txt000066400000000000000000000014051320401574200177770ustar00rootroot00000000000000The autoload directory is for standard Vim autoload scripts. These are functions used by plugins and for general use. They will be loaded automatically when the function is invoked. See ":help autoload". gzip.vim for editing compressed files netrw*.vim browsing (remote) directories and editing remote files tar.vim browsing tar files zip.vim browsing zip files paste.vim common code for mswin.vim, menu.vim and macmap.vim spellfile.vim downloading of a missing spell file Omni completion files: ccomplete.vim C csscomplete.vim HTML / CSS htmlcomplete.vim HTML javascriptcomplete.vim Javascript phpcomplete.vim PHP pythoncomplete.vim Python rubycomplete.vim Ruby syntaxcomplete.vim from syntax highlighting xmlcomplete.vim XML (uses files in the xml directory) neovim-0.2.2/runtime/autoload/ada.vim000066400000000000000000000540471320401574200175550ustar00rootroot00000000000000"------------------------------------------------------------------------------ " Description: Perform Ada specific completion & tagging. " Language: Ada (2005) " $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ " Maintainer: Mathias Brousset " Martin Krischik " Taylor Venable " Neil Bird " Ned Okie " $Author: krischik $ " $Date: 2017-01-31 20:20:05 +0200 (Mon, 01 Jan 2017) $ " Version: 4.6 " $Revision: 887 $ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $ " History: 24.05.2006 MK Unified Headers " 26.05.2006 MK ' should not be in iskeyword. " 16.07.2006 MK Ada-Mode as vim-ball " 02.10.2006 MK Better folding. " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces " 08.07.2007 TV fix mapleader problems. " 09.05.2007 MK Session just won't work no matter how much " tweaking is done " 19.09.2007 NO still some mapleader problems " 31.01.2017 MB fix more mapleader problems " Help Page: ft-ada-functions "------------------------------------------------------------------------------ if version < 700 finish endif let s:keepcpo= &cpo set cpo&vim " Section: Constants {{{1 " let g:ada#DotWordRegex = '\a\w*\(\_s*\.\_s*\a\w*\)*' let g:ada#WordRegex = '\a\w*' let g:ada#Comment = "\\v^(\"[^\"]*\"|'.'|[^\"']){-}\\zs\\s*--.*" let g:ada#Keywords = [] " Section: g:ada#Keywords {{{1 " " Section: add Ada keywords {{{2 " for Item in ['abort', 'else', 'new', 'return', 'abs', 'elsif', 'not', 'reverse', 'abstract', 'end', 'null', 'accept', 'entry', 'select', 'access', 'exception', 'of', 'separate', 'aliased', 'exit', 'or', 'subtype', 'all', 'others', 'synchronized', 'and', 'for', 'out', 'array', 'function', 'overriding', 'tagged', 'at', 'task', 'generic', 'package', 'terminate', 'begin', 'goto', 'pragma', 'then', 'body', 'private', 'type', 'if', 'procedure', 'case', 'in', 'protected', 'until', 'constant', 'interface', 'use', 'is', 'raise', 'declare', 'range', 'when', 'delay', 'limited', 'record', 'while', 'delta', 'loop', 'rem', 'with', 'digits', 'renames', 'do', 'mod', 'requeue', 'xor'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'keyword', \ 'info': 'Ada keyword.', \ 'kind': 'k', \ 'icase': 1}] endfor " Section: GNAT Project Files {{{3 " if exists ('g:ada_with_gnat_project_files') for Item in ['project'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'keyword', \ 'info': 'GNAT projectfile keyword.', \ 'kind': 'k', \ 'icase': 1}] endfor endif " Section: add standart exception {{{2 " for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'exception', \ 'info': 'Ada standart exception.', \ 'kind': 'x', \ 'icase': 1}] endfor " Section: add GNAT exception {{{3 " if exists ('g:ada_gnat_extensions') for Item in ['Assert_Failure'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'exception', \ 'info': 'GNAT exception.', \ 'kind': 'x', \ 'icase': 1}] endfor endif " Section: add Ada buildin types {{{2 " for Item in ['Boolean', 'Integer', 'Natural', 'Positive', 'Float', 'Character', 'Wide_Character', 'Wide_Wide_Character', 'String', 'Wide_String', 'Wide_Wide_String', 'Duration'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'type', \ 'info': 'Ada buildin type.', \ 'kind': 't', \ 'icase': 1}] endfor " Section: add GNAT buildin types {{{3 " if exists ('g:ada_gnat_extensions') for Item in ['Short_Integer', 'Short_Short_Integer', 'Long_Integer', 'Long_Long_Integer', 'Short_Float', 'Short_Short_Float', 'Long_Float', 'Long_Long_Float'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'type', \ 'info': 'GNAT buildin type.', \ 'kind': 't', \ 'icase': 1}] endfor endif " Section: add Ada Attributes {{{2 " for Item in ['''Access', '''Address', '''Adjacent', '''Aft', '''Alignment', '''Base', '''Bit_Order', '''Body_Version', '''Callable', '''Caller', '''Ceiling', '''Class', '''Component_Size', '''Compose', '''Constrained', '''Copy_Sign', '''Count', '''Definite', '''Delta', '''Denorm', '''Digits', '''Emax', '''Exponent', '''External_Tag', '''Epsilon', '''First', '''First_Bit', '''Floor', '''Fore', '''Fraction', '''Identity', '''Image', '''Input', '''Large', '''Last', '''Last_Bit', '''Leading_Part', '''Length', '''Machine', '''Machine_Emax', '''Machine_Emin', '''Machine_Mantissa', '''Machine_Overflows', '''Machine_Radix', '''Machine_Rounding', '''Machine_Rounds', '''Mantissa', '''Max', '''Max_Size_In_Storage_Elements', '''Min', '''Mod', '''Model', '''Model_Emin', '''Model_Epsilon', '''Model_Mantissa', '''Model_Small', '''Modulus', '''Output', '''Partition_ID', '''Pos', '''Position', '''Pred', '''Priority', '''Range', '''Read', '''Remainder', '''Round', '''Rounding', '''Safe_Emax', '''Safe_First', '''Safe_Large', '''Safe_Last', '''Safe_Small', '''Scale', '''Scaling', '''Signed_Zeros', '''Size', '''Small', '''Storage_Pool', '''Storage_Size', '''Stream_Size', '''Succ', '''Tag', '''Terminated', '''Truncation', '''Unbiased_Rounding', '''Unchecked_Access', '''Val', '''Valid', '''Value', '''Version', '''Wide_Image', '''Wide_Value', '''Wide_Wide_Image', '''Wide_Wide_Value', '''Wide_Wide_Width', '''Wide_Width', '''Width', '''Write'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'attribute', \ 'info': 'Ada attribute.', \ 'kind': 'a', \ 'icase': 1}] endfor " Section: add GNAT Attributes {{{3 " if exists ('g:ada_gnat_extensions') for Item in ['''Abort_Signal', '''Address_Size', '''Asm_Input', '''Asm_Output', '''AST_Entry', '''Bit', '''Bit_Position', '''Code_Address', '''Default_Bit_Order', '''Elaborated', '''Elab_Body', '''Elab_Spec', '''Emax', '''Enum_Rep', '''Epsilon', '''Fixed_Value', '''Has_Access_Values', '''Has_Discriminants', '''Img', '''Integer_Value', '''Machine_Size', '''Max_Interrupt_Priority', '''Max_Priority', '''Maximum_Alignment', '''Mechanism_Code', '''Null_Parameter', '''Object_Size', '''Passed_By_Reference', '''Range_Length', '''Storage_Unit', '''Target_Name', '''Tick', '''To_Address', '''Type_Class', '''UET_Address', '''Unconstrained_Array', '''Universal_Literal_String', '''Unrestricted_Access', '''VADS_Size', '''Value_Size', '''Wchar_T_Size', '''Word_Size'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'attribute', \ 'info': 'GNAT attribute.', \ 'kind': 'a', \ 'icase': 1}] endfor endif " Section: add Ada Pragmas {{{2 " for Item in ['All_Calls_Remote', 'Assert', 'Assertion_Policy', 'Asynchronous', 'Atomic', 'Atomic_Components', 'Attach_Handler', 'Controlled', 'Convention', 'Detect_Blocking', 'Discard_Names', 'Elaborate', 'Elaborate_All', 'Elaborate_Body', 'Export', 'Import', 'Inline', 'Inspection_Point', 'Interface (Obsolescent)', 'Interrupt_Handler', 'Interrupt_Priority', 'Linker_Options', 'List', 'Locking_Policy', 'Memory_Size (Obsolescent)', 'No_Return', 'Normalize_Scalars', 'Optimize', 'Pack', 'Page', 'Partition_Elaboration_Policy', 'Preelaborable_Initialization', 'Preelaborate', 'Priority', 'Priority_Specific_Dispatching', 'Profile', 'Pure', 'Queueing_Policy', 'Relative_Deadline', 'Remote_Call_Interface', 'Remote_Types', 'Restrictions', 'Reviewable', 'Shared (Obsolescent)', 'Shared_Passive', 'Storage_Size', 'Storage_Unit (Obsolescent)', 'Suppress', 'System_Name (Obsolescent)', 'Task_Dispatching_Policy', 'Unchecked_Union', 'Unsuppress', 'Volatile', 'Volatile_Components'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'pragma', \ 'info': 'Ada pragma.', \ 'kind': 'p', \ 'icase': 1}] endfor " Section: add GNAT Pragmas {{{3 " if exists ('g:ada_gnat_extensions') for Item in ['Abort_Defer', 'Ada_83', 'Ada_95', 'Ada_05', 'Annotate', 'Ast_Entry', 'C_Pass_By_Copy', 'Comment', 'Common_Object', 'Compile_Time_Warning', 'Complex_Representation', 'Component_Alignment', 'Convention_Identifier', 'CPP_Class', 'CPP_Constructor', 'CPP_Virtual', 'CPP_Vtable', 'Debug', 'Elaboration_Checks', 'Eliminate', 'Export_Exception', 'Export_Function', 'Export_Object', 'Export_Procedure', 'Export_Value', 'Export_Valued_Procedure', 'Extend_System', 'External', 'External_Name_Casing', 'Finalize_Storage_Only', 'Float_Representation', 'Ident', 'Import_Exception', 'Import_Function', 'Import_Object', 'Import_Procedure', 'Import_Valued_Procedure', 'Initialize_Scalars', 'Inline_Always', 'Inline_Generic', 'Interface_Name', 'Interrupt_State', 'Keep_Names', 'License', 'Link_With', 'Linker_Alias', 'Linker_Section', 'Long_Float', 'Machine_Attribute', 'Main_Storage', 'Obsolescent', 'Passive', 'Polling', 'Profile_Warnings', 'Propagate_Exceptions', 'Psect_Object', 'Pure_Function', 'Restriction_Warnings', 'Source_File_Name', 'Source_File_Name_Project', 'Source_Reference', 'Stream_Convert', 'Style_Checks', 'Subtitle', 'Suppress_All', 'Suppress_Exception_Locations', 'Suppress_Initialization', 'Task_Info', 'Task_Name', 'Task_Storage', 'Thread_Body', 'Time_Slice', 'Title', 'Unimplemented_Unit', 'Universal_Data', 'Unreferenced', 'Unreserve_All_Interrupts', 'Use_VADS_Size', 'Validity_Checks', 'Warnings', 'Weak_External'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'pragma', \ 'info': 'GNAT pragma.', \ 'kind': 'p', \ 'icase': 1}] endfor endif " 1}}} " Section: g:ada#Ctags_Kinds {{{1 " let g:ada#Ctags_Kinds = { \ 'P': ["packspec", "package specifications"], \ 'p': ["package", "packages"], \ 'T': ["typespec", "type specifications"], \ 't': ["type", "types"], \ 'U': ["subspec", "subtype specifications"], \ 'u': ["subtype", "subtypes"], \ 'c': ["component", "record type components"], \ 'l': ["literal", "enum type literals"], \ 'V': ["varspec", "variable specifications"], \ 'v': ["variable", "variables"], \ 'f': ["formal", "generic formal parameters"], \ 'n': ["constant", "constants"], \ 'x': ["exception", "user defined exceptions"], \ 'R': ["subprogspec", "subprogram specifications"], \ 'r': ["subprogram", "subprograms"], \ 'K': ["taskspec", "task specifications"], \ 'k': ["task", "tasks"], \ 'O': ["protectspec", "protected data specifications"], \ 'o': ["protected", "protected data"], \ 'E': ["entryspec", "task/protected data entry specifications"], \ 'e': ["entry", "task/protected data entries"], \ 'b': ["label", "labels"], \ 'i': ["identifier", "loop/declare identifiers"], \ 'a': ["autovar", "automatic variables"], \ 'y': ["annon", "loops and blocks with no identifier"]} " Section: ada#Word (...) {{{1 " " Extract current Ada word across multiple lines " AdaWord ([line, column])\ " function ada#Word (...) if a:0 > 1 let l:Line_Nr = a:1 let l:Column_Nr = a:2 - 1 else let l:Line_Nr = line('.') let l:Column_Nr = col('.') - 1 endif let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' ) " Cope with tag searching for items in comments; if we are, don't loop " backards looking for previous lines if l:Column_Nr > strlen(l:Line) " We were in a comment let l:Line = getline(l:Line_Nr) let l:Search_Prev_Lines = 0 else let l:Search_Prev_Lines = 1 endif " Go backwards until we find a match (Ada ID) that *doesn't* include our " location - i.e., the previous ID. This is because the current 'correct' " match will toggle matching/not matching as we traverse characters " backwards. Thus, we have to find the previous unrelated match, exclude " it, then use the next full match (ours). " Remember to convert vim column 'l:Column_Nr' [1..n] to string offset [0..(n-1)] " ... but start, here, one after the required char. let l:New_Column = l:Column_Nr + 1 while 1 let l:New_Column = l:New_Column - 1 if l:New_Column < 0 " Have to include previous l:Line from file let l:Line_Nr = l:Line_Nr - 1 if l:Line_Nr < 1 || !l:Search_Prev_Lines " Start of file or matching in a comment let l:Line_Nr = 1 let l:New_Column = 0 let l:Our_Match = match (l:Line, g:ada#WordRegex ) break endif " Get previous l:Line, and prepend it to our search string let l:New_Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' ) let l:New_Column = strlen (l:New_Line) - 1 let l:Column_Nr = l:Column_Nr + l:New_Column let l:Line = l:New_Line . l:Line endif " Check to see if this is a match excluding 'us' let l:Match_End = l:New_Column + \ matchend (strpart (l:Line,l:New_Column), g:ada#WordRegex ) - 1 if l:Match_End >= l:New_Column && \ l:Match_End < l:Column_Nr " Yes let l:Our_Match = l:Match_End+1 + \ match (strpart (l:Line,l:Match_End+1), g:ada#WordRegex ) break endif endwhile " Got anything? if l:Our_Match < 0 return '' else let l:Line = strpart (l:Line, l:Our_Match) endif " Now simply add further lines until the match gets no bigger let l:Match_String = matchstr (l:Line, g:ada#WordRegex) let l:Last_Line = line ('$') let l:Line_Nr = line ('.') + 1 while l:Line_Nr <= l:Last_Line let l:Last_Match = l:Match_String let l:Line = l:Line . \ substitute (getline (l:Line_Nr), g:ada#Comment, '', '') let l:Match_String = matchstr (l:Line, g:ada#WordRegex) if l:Match_String == l:Last_Match break endif endwhile " Strip whitespace & return return substitute (l:Match_String, '\s\+', '', 'g') endfunction ada#Word " Section: ada#List_Tag (...) {{{1 " " List tags in quickfix window " function ada#List_Tag (...) if a:0 > 1 let l:Tag_Word = ada#Word (a:1, a:2) elseif a:0 > 0 let l:Tag_Word = a:1 else let l:Tag_Word = ada#Word () endif echo "Searching for" l:Tag_Word let l:Pattern = '^' . l:Tag_Word . '$' let l:Tag_List = taglist (l:Pattern) let l:Error_List = [] " " add symbols " for Tag_Item in l:Tag_List if l:Tag_Item['kind'] == '' let l:Tag_Item['kind'] = 's' endif let l:Error_List += [ \ l:Tag_Item['filename'] . '|' . \ l:Tag_Item['cmd'] . '|' . \ l:Tag_Item['kind'] . "\t" . \ l:Tag_Item['name'] ] endfor set errorformat=%f\|%l\|%m cexpr l:Error_List cwindow endfunction ada#List_Tag " Section: ada#Jump_Tag (Word, Mode) {{{1 " " Word tag - include '.' and if Ada make uppercase " function ada#Jump_Tag (Word, Mode) if a:Word == '' " Get current word let l:Word = ada#Word() if l:Word == '' throw "NOT_FOUND: no identifier found." endif else let l:Word = a:Word endif echo "Searching for " . l:Word try execute a:Mode l:Word catch /.*:E426:.*/ let ignorecase = &ignorecase set ignorecase execute a:Mode l:Word let &ignorecase = ignorecase endtry return endfunction ada#Jump_Tag " Section: ada#Insert_Backspace () {{{1 " " Backspace at end of line after auto-inserted commentstring '-- ' wipes it " function ada#Insert_Backspace () let l:Line = getline ('.') if col ('.') > strlen (l:Line) && \ match (l:Line, '-- $') != -1 && \ match (&comments,'--') != -1 return "\\\" else return "\" endif return endfunction ada#InsertBackspace " Section: Insert Completions {{{1 " " Section: ada#User_Complete(findstart, base) {{{2 " " This function is used for the 'complete' option. " function! ada#User_Complete(findstart, base) if a:findstart == 1 " " locate the start of the word " let line = getline ('.') let start = col ('.') - 1 while start > 0 && line[start - 1] =~ '\i\|''' let start -= 1 endwhile return start else " " look up matches " let l:Pattern = '^' . a:base . '.*$' " " add keywords " for Tag_Item in g:ada#Keywords if l:Tag_Item['word'] =~? l:Pattern if complete_add (l:Tag_Item) == 0 return [] endif if complete_check () return [] endif endif endfor return [] endif endfunction ada#User_Complete " Section: ada#Completion (cmd) {{{2 " " Word completion (^N/^R/^X^]) - force '.' inclusion function ada#Completion (cmd) set iskeyword+=46 return a:cmd . "\=ada#Completion_End ()\" endfunction ada#Completion " Section: ada#Completion_End () {{{2 " function ada#Completion_End () set iskeyword-=46 return '' endfunction ada#Completion_End " Section: ada#Create_Tags {{{1 " function ada#Create_Tags (option) if a:option == 'file' let l:Filename = fnamemodify (bufname ('%'), ':p') elseif a:option == 'dir' let l:Filename = \ fnamemodify (bufname ('%'), ':p:h') . "*.ada " . \ fnamemodify (bufname ('%'), ':p:h') . "*.adb " . \ fnamemodify (bufname ('%'), ':p:h') . "*.ads" else let l:Filename = a:option endif execute '!ctags --excmd=number ' . l:Filename endfunction ada#Create_Tags " Section: ada#Switch_Session {{{1 " function ada#Switch_Session (New_Session) " " you should not save to much date into the seession since they will " be sourced " let l:sessionoptions=&sessionoptions try set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize if a:New_Session != v:this_session " " We actually got a new session - otherwise there " is nothing to do. " if strlen (v:this_session) > 0 execute 'mksession! ' . v:this_session endif let v:this_session = a:New_Session "if filereadable (v:this_session) "execute 'source ' . v:this_session "endif augroup ada_session autocmd! autocmd VimLeavePre * execute 'mksession! ' . v:this_session augroup END "if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open "TlistOpen "endif endif finally let &sessionoptions=l:sessionoptions endtry return endfunction ada#Switch_Session " Section: GNAT Pretty Printer folding {{{1 " if exists('g:ada_folding') && g:ada_folding[0] == 'g' " " Lines consisting only of ')' ';' are due to a gnat pretty bug and " have the same level as the line above (can't happen in the first " line). " let s:Fold_Collate = '^\([;)]*$\|' " " some lone statements are folded with the line above " if stridx (g:ada_folding, 'i') >= 0 let s:Fold_Collate .= '\s\+\$\|' endif if stridx (g:ada_folding, 'b') >= 0 let s:Fold_Collate .= '\s\+\$\|' endif if stridx (g:ada_folding, 'p') >= 0 let s:Fold_Collate .= '\s\+\$\|' endif if stridx (g:ada_folding, 'x') >= 0 let s:Fold_Collate .= '\s\+\$\|' endif " We also handle empty lines and " comments here. let s:Fold_Collate .= '--\)' function ada#Pretty_Print_Folding (Line) " {{{2 let l:Text = getline (a:Line) if l:Text =~ s:Fold_Collate " " fold with line above " let l:Level = "=" elseif l:Text =~ '^\s\+(' " " gnat outdents a line which stards with a ( by one characters so " that parameters which follow are aligned. " let l:Level = (indent (a:Line) + 1) / &shiftwidth else let l:Level = indent (a:Line) / &shiftwidth endif return l:Level endfunction ada#Pretty_Print_Folding " }}}2 endif " Section: Options and Menus {{{1 " " Section: ada#Switch_Syntax_Options {{{2 " function ada#Switch_Syntax_Option (option) syntax off if exists ('g:ada_' . a:option) unlet g:ada_{a:option} echo a:option . 'now off' else let g:ada_{a:option}=1 echo a:option . 'now on' endif syntax on endfunction ada#Switch_Syntax_Option " Section: ada#Map_Menu {{{2 " function ada#Map_Menu (Text, Keys, Command) if a:Keys[0] == ':' execute \ "50amenu " . \ "Ada." . escape(a:Text, ' ') . \ "" . a:Keys . \ " :" . a:Command . "" execute \ "command -buffer " . \ a:Keys[1:] . \" :" . a:Command . "" elseif a:Keys[0] == '<' execute \ "50amenu " . \ "Ada." . escape(a:Text, ' ') . \ "" . a:Keys . \ " :" . a:Command . "" execute \ "nnoremap " . \ a:Keys . \" :" . a:Command . "" execute \ "inoremap " . \ a:Keys . \" :" . a:Command . "" else if exists("g:mapleader") let l:leader = g:mapleader else let l:leader = '\' endif execute \ "50amenu " . \ "Ada." . escape(a:Text, ' ') . \ "" . escape(l:leader . "a" . a:Keys , '\') . \ " :" . a:Command . "" execute \ "nnoremap " . \ " a" . a:Keys . \" :" . a:Command execute \ "inoremap " . \ " a" . a:Keys . \" :" . a:Command endif return endfunction " Section: ada#Map_Popup {{{2 " function ada#Map_Popup (Text, Keys, Command) if exists("g:mapleader") let l:leader = g:mapleader else let l:leader = '\' endif execute \ "50amenu " . \ "PopUp." . escape(a:Text, ' ') . \ "" . escape(l:leader . "a" . a:Keys , '\') . \ " :" . a:Command . "" call ada#Map_Menu (a:Text, a:Keys, a:Command) return endfunction ada#Map_Popup " }}}1 lockvar g:ada#WordRegex lockvar g:ada#DotWordRegex lockvar g:ada#Comment lockvar! g:ada#Keywords lockvar! g:ada#Ctags_Kinds let &cpo = s:keepcpo unlet s:keepcpo finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker neovim-0.2.2/runtime/autoload/adacomplete.vim000066400000000000000000000071251320401574200213010ustar00rootroot00000000000000"------------------------------------------------------------------------------ " Description: Vim Ada omnicompletion file " Language: Ada (2005) " $Id: adacomplete.vim 887 2008-07-08 14:29:01Z krischik $ " Maintainer: Martin Krischik " $Author: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 " $Revision: 887 $ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $ " History: 24.05.2006 MK Unified Headers " 26.05.2006 MK improved search for begin of word. " 16.07.2006 MK Ada-Mode as vim-ball " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested agaist using setlocal omnifunc " 05.11.2006 MK Bram suggested to save on spaces " Help Page: ft-ada-omni "------------------------------------------------------------------------------ if version < 700 finish endif " Section: adacomplete#Complete () {{{1 " " This function is used for the 'omnifunc' option. " function! adacomplete#Complete (findstart, base) if a:findstart == 1 return ada#User_Complete (a:findstart, a:base) else " " look up matches " if exists ("g:ada_omni_with_keywords") call ada#User_Complete (a:findstart, a:base) endif " " search tag file for matches " let l:Pattern = '^' . a:base . '.*$' let l:Tag_List = taglist (l:Pattern) " " add symbols " for Tag_Item in l:Tag_List if l:Tag_Item['kind'] == '' " " Tag created by gnat xref " let l:Match_Item = { \ 'word': l:Tag_Item['name'], \ 'menu': l:Tag_Item['filename'], \ 'info': "Symbol from file " . l:Tag_Item['filename'] . " line " . l:Tag_Item['cmd'], \ 'kind': 's', \ 'icase': 1} else " " Tag created by ctags " let l:Info = 'Symbol : ' . l:Tag_Item['name'] . "\n" let l:Info .= 'Of type : ' . g:ada#Ctags_Kinds[l:Tag_Item['kind']][1] . "\n" let l:Info .= 'Defined in File : ' . l:Tag_Item['filename'] . "\n" if has_key( l:Tag_Item, 'package') let l:Info .= 'Package : ' . l:Tag_Item['package'] . "\n" let l:Menu = l:Tag_Item['package'] elseif has_key( l:Tag_Item, 'separate') let l:Info .= 'Separate from Package : ' . l:Tag_Item['separate'] . "\n" let l:Menu = l:Tag_Item['separate'] elseif has_key( l:Tag_Item, 'packspec') let l:Info .= 'Package Specification : ' . l:Tag_Item['packspec'] . "\n" let l:Menu = l:Tag_Item['packspec'] elseif has_key( l:Tag_Item, 'type') let l:Info .= 'Datetype : ' . l:Tag_Item['type'] . "\n" let l:Menu = l:Tag_Item['type'] else let l:Menu = l:Tag_Item['filename'] endif let l:Match_Item = { \ 'word': l:Tag_Item['name'], \ 'menu': l:Menu, \ 'info': l:Info, \ 'kind': l:Tag_Item['kind'], \ 'icase': 1} endif if complete_add (l:Match_Item) == 0 return [] endif if complete_check () return [] endif endfor return [] endif endfunction adacomplete#Complete finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker neovim-0.2.2/runtime/autoload/ccomplete.vim000066400000000000000000000412041320401574200207720ustar00rootroot00000000000000" Vim completion script " Language: C " Maintainer: Bram Moolenaar " Last Change: 2012 Jun 20 let s:cpo_save = &cpo set cpo&vim " This function is used for the 'omnifunc' option. function! ccomplete#Complete(findstart, base) if a:findstart " Locate the start of the item, including ".", "->" and "[...]". let line = getline('.') let start = col('.') - 1 let lastword = -1 while start > 0 if line[start - 1] =~ '\w' let start -= 1 elseif line[start - 1] =~ '\.' if lastword == -1 let lastword = start endif let start -= 1 elseif start > 1 && line[start - 2] == '-' && line[start - 1] == '>' if lastword == -1 let lastword = start endif let start -= 2 elseif line[start - 1] == ']' " Skip over [...]. let n = 0 let start -= 1 while start > 0 let start -= 1 if line[start] == '[' if n == 0 break endif let n -= 1 elseif line[start] == ']' " nested [] let n += 1 endif endwhile else break endif endwhile " Return the column of the last word, which is going to be changed. " Remember the text that comes before it in s:prepended. if lastword == -1 let s:prepended = '' return start endif let s:prepended = strpart(line, start, lastword - start) return lastword endif " Return list of matches. let base = s:prepended . a:base " Don't do anything for an empty base, would result in all the tags in the " tags file. if base == '' return [] endif " init cache for vimgrep to empty let s:grepCache = {} " Split item in words, keep empty word after "." or "->". " "aa" -> ['aa'], "aa." -> ['aa', ''], "aa.bb" -> ['aa', 'bb'], etc. " We can't use split, because we need to skip nested [...]. let items = [] let s = 0 while 1 let e = match(base, '\.\|->\|\[', s) if e < 0 if s == 0 || base[s - 1] != ']' call add(items, strpart(base, s)) endif break endif if s == 0 || base[s - 1] != ']' call add(items, strpart(base, s, e - s)) endif if base[e] == '.' let s = e + 1 " skip over '.' elseif base[e] == '-' let s = e + 2 " skip over '->' else " Skip over [...]. let n = 0 let s = e let e += 1 while e < len(base) if base[e] == ']' if n == 0 break endif let n -= 1 elseif base[e] == '[' " nested [...] let n += 1 endif let e += 1 endwhile let e += 1 call add(items, strpart(base, s, e - s)) let s = e endif endwhile " Find the variable items[0]. " 1. in current function (like with "gd") " 2. in tags file(s) (like with ":tag") " 3. in current file (like with "gD") let res = [] if searchdecl(items[0], 0, 1) == 0 " Found, now figure out the type. " TODO: join previous line if it makes sense let line = getline('.') let col = col('.') if stridx(strpart(line, 0, col), ';') != -1 " Handle multiple declarations on the same line. let col2 = col - 1 while line[col2] != ';' let col2 -= 1 endwhile let line = strpart(line, col2 + 1) let col -= col2 endif if stridx(strpart(line, 0, col), ',') != -1 " Handle multiple declarations on the same line in a function " declaration. let col2 = col - 1 while line[col2] != ',' let col2 -= 1 endwhile if strpart(line, col2 + 1, col - col2 - 1) =~ ' *[^ ][^ ]* *[^ ]' let line = strpart(line, col2 + 1) let col -= col2 endif endif if len(items) == 1 " Completing one word and it's a local variable: May add '[', '.' or " '->'. let match = items[0] let kind = 'v' if match(line, '\<' . match . '\s*\[') > 0 let match .= '[' else let res = s:Nextitem(strpart(line, 0, col), [''], 0, 1) if len(res) > 0 " There are members, thus add "." or "->". if match(line, '\*[ \t(]*' . match . '\>') > 0 let match .= '->' else let match .= '.' endif endif endif let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}] else " Completing "var.", "var.something", etc. let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1) endif endif if len(items) == 1 " Only one part, no "." or "->": complete from tags file. let tags = taglist('^' . base) " Remove members, these can't appear without something in front. call filter(tags, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1') " Remove static matches in other files. call filter(tags, '!has_key(v:val, "static") || !v:val["static"] || bufnr("%") == bufnr(v:val["filename"])') call extend(res, map(tags, 's:Tag2item(v:val)')) endif if len(res) == 0 " Find the variable in the tags file(s) let diclist = taglist('^' . items[0] . '$') " Remove members, these can't appear without something in front. call filter(diclist, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1') let res = [] for i in range(len(diclist)) " New ctags has the "typeref" field. Patched version has "typename". if has_key(diclist[i], 'typename') call extend(res, s:StructMembers(diclist[i]['typename'], items[1:], 1)) elseif has_key(diclist[i], 'typeref') call extend(res, s:StructMembers(diclist[i]['typeref'], items[1:], 1)) endif " For a variable use the command, which must be a search pattern that " shows the declaration of the variable. if diclist[i]['kind'] == 'v' let line = diclist[i]['cmd'] if line[0] == '/' && line[1] == '^' let col = match(line, '\<' . items[0] . '\>') call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:], 0, 1)) endif endif endfor endif if len(res) == 0 && searchdecl(items[0], 1) == 0 " Found, now figure out the type. " TODO: join previous line if it makes sense let line = getline('.') let col = col('.') let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1) endif " If the last item(s) are [...] they need to be added to the matches. let last = len(items) - 1 let brackets = '' while last >= 0 if items[last][0] != '[' break endif let brackets = items[last] . brackets let last -= 1 endwhile return map(res, 's:Tagline2item(v:val, brackets)') endfunc function! s:GetAddition(line, match, memarg, bracket) " Guess if the item is an array. if a:bracket && match(a:line, a:match . '\s*\[') > 0 return '[' endif " Check if the item has members. if len(s:SearchMembers(a:memarg, [''], 0)) > 0 " If there is a '*' before the name use "->". if match(a:line, '\*[ \t(]*' . a:match . '\>') > 0 return '->' else return '.' endif endif return '' endfunction " Turn the tag info "val" into an item for completion. " "val" is is an item in the list returned by taglist(). " If it is a variable we may add "." or "->". Don't do it for other types, " such as a typedef, by not including the info that s:GetAddition() uses. function! s:Tag2item(val) let res = {'match': a:val['name']} let res['extra'] = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename']) let s = s:Dict2info(a:val) if s != '' let res['info'] = s endif let res['tagline'] = '' if has_key(a:val, "kind") let kind = a:val['kind'] let res['kind'] = kind if kind == 'v' let res['tagline'] = "\t" . a:val['cmd'] let res['dict'] = a:val elseif kind == 'f' let res['match'] = a:val['name'] . '(' endif endif return res endfunction " Use all the items in dictionary for the "info" entry. function! s:Dict2info(dict) let info = '' for k in sort(keys(a:dict)) let info .= k . repeat(' ', 10 - len(k)) if k == 'cmd' let info .= substitute(matchstr(a:dict['cmd'], '/^\s*\zs.*\ze$/'), '\\\(.\)', '\1', 'g') else let info .= a:dict[k] endif let info .= "\n" endfor return info endfunc " Parse a tag line and return a dictionary with items like taglist() function! s:ParseTagline(line) let l = split(a:line, "\t") let d = {} if len(l) >= 3 let d['name'] = l[0] let d['filename'] = l[1] let d['cmd'] = l[2] let n = 2 if l[2] =~ '^/' " Find end of cmd, it may contain Tabs. while n < len(l) && l[n] !~ '/;"$' let n += 1 let d['cmd'] .= " " . l[n] endwhile endif for i in range(n + 1, len(l) - 1) if l[i] == 'file:' let d['static'] = 1 elseif l[i] !~ ':' let d['kind'] = l[i] else let d[matchstr(l[i], '[^:]*')] = matchstr(l[i], ':\zs.*') endif endfor endif return d endfunction " Turn a match item "val" into an item for completion. " "val['match']" is the matching item. " "val['tagline']" is the tagline in which the last part was found. function! s:Tagline2item(val, brackets) let line = a:val['tagline'] let add = s:GetAddition(line, a:val['match'], [a:val], a:brackets == '') let res = {'word': a:val['match'] . a:brackets . add } if has_key(a:val, 'info') " Use info from Tag2item(). let res['info'] = a:val['info'] else " Parse the tag line and add each part to the "info" entry. let s = s:Dict2info(s:ParseTagline(line)) if s != '' let res['info'] = s endif endif if has_key(a:val, 'kind') let res['kind'] = a:val['kind'] elseif add == '(' let res['kind'] = 'f' else let s = matchstr(line, '\t\(kind:\)\=\zs\S\ze\(\t\|$\)') if s != '' let res['kind'] = s endif endif if has_key(a:val, 'extra') let res['menu'] = a:val['extra'] return res endif " Isolate the command after the tag and filename. let s = matchstr(line, '[^\t]*\t[^\t]*\t\zs\(/^.*$/\|[^\t]*\)\ze\(;"\t\|\t\|$\)') if s != '' let res['menu'] = s:Tagcmd2extra(s, a:val['match'], matchstr(line, '[^\t]*\t\zs[^\t]*\ze\t')) endif return res endfunction " Turn a command from a tag line to something that is useful in the menu function! s:Tagcmd2extra(cmd, name, fname) if a:cmd =~ '^/^' " The command is a search command, useful to see what it is. let x = matchstr(a:cmd, '^/^\s*\zs.*\ze$/') let x = substitute(x, '\<' . a:name . '\>', '@@', '') let x = substitute(x, '\\\(.\)', '\1', 'g') let x = x . ' - ' . a:fname elseif a:cmd =~ '^\d*$' " The command is a line number, the file name is more useful. let x = a:fname . ' - ' . a:cmd else " Not recognized, use command and file name. let x = a:cmd . ' - ' . a:fname endif return x endfunction " Find composing type in "lead" and match items[0] with it. " Repeat this recursively for items[1], if it's there. " When resolving typedefs "depth" is used to avoid infinite recursion. " Return the list of matches. function! s:Nextitem(lead, items, depth, all) " Use the text up to the variable name and split it in tokens. let tokens = split(a:lead, '\s\+\|\<') " Try to recognize the type of the variable. This is rough guessing... let res = [] for tidx in range(len(tokens)) " Skip tokens starting with a non-ID character. if tokens[tidx] !~ '^\h' continue endif " Recognize "struct foobar" and "union foobar". " Also do "class foobar" when it's C++ after all (doesn't work very well " though). if (tokens[tidx] == 'struct' || tokens[tidx] == 'union' || tokens[tidx] == 'class') && tidx + 1 < len(tokens) let res = s:StructMembers(tokens[tidx] . ':' . tokens[tidx + 1], a:items, a:all) break endif " TODO: add more reserved words if index(['int', 'short', 'char', 'float', 'double', 'static', 'unsigned', 'extern'], tokens[tidx]) >= 0 continue endif " Use the tags file to find out if this is a typedef. let diclist = taglist('^' . tokens[tidx] . '$') for tagidx in range(len(diclist)) let item = diclist[tagidx] " New ctags has the "typeref" field. Patched version has "typename". if has_key(item, 'typeref') call extend(res, s:StructMembers(item['typeref'], a:items, a:all)) continue endif if has_key(item, 'typename') call extend(res, s:StructMembers(item['typename'], a:items, a:all)) continue endif " Only handle typedefs here. if item['kind'] != 't' continue endif " Skip matches local to another file. if has_key(item, 'static') && item['static'] && bufnr('%') != bufnr(item['filename']) continue endif " For old ctags we recognize "typedef struct aaa" and " "typedef union bbb" in the tags file command. let cmd = item['cmd'] let ei = matchend(cmd, 'typedef\s\+') if ei > 1 let cmdtokens = split(strpart(cmd, ei), '\s\+\|\<') if len(cmdtokens) > 1 if cmdtokens[0] == 'struct' || cmdtokens[0] == 'union' || cmdtokens[0] == 'class' let name = '' " Use the first identifier after the "struct" or "union" for ti in range(len(cmdtokens) - 1) if cmdtokens[ti] =~ '^\w' let name = cmdtokens[ti] break endif endfor if name != '' call extend(res, s:StructMembers(cmdtokens[0] . ':' . name, a:items, a:all)) endif elseif a:depth < 10 " Could be "typedef other_T some_T". call extend(res, s:Nextitem(cmdtokens[0], a:items, a:depth + 1, a:all)) endif endif endif endfor if len(res) > 0 break endif endfor return res endfunction " Search for members of structure "typename" in tags files. " Return a list with resulting matches. " Each match is a dictionary with "match" and "tagline" entries. " When "all" is non-zero find all, otherwise just return 1 if there is any " member. function! s:StructMembers(typename, items, all) " Todo: What about local structures? let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) if fnames == '' return [] endif let typename = a:typename let qflist = [] let cached = 0 if a:all == 0 let n = '1' " stop at first found match if has_key(s:grepCache, a:typename) let qflist = s:grepCache[a:typename] let cached = 1 endif else let n = '' endif if !cached while 1 exe 'silent! keepj noautocmd ' . n . 'vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames let qflist = getqflist() if len(qflist) > 0 || match(typename, "::") < 0 break endif " No match for "struct:context::name", remove "context::" and try again. let typename = substitute(typename, ':[^:]*::', ':', '') endwhile if a:all == 0 " Store the result to be able to use it again later. let s:grepCache[a:typename] = qflist endif endif " Put matching members in matches[]. let matches = [] for l in qflist let memb = matchstr(l['text'], '[^\t]*') if memb =~ '^' . a:items[0] " Skip matches local to another file. if match(l['text'], "\tfile:") < 0 || bufnr('%') == bufnr(matchstr(l['text'], '\t\zs[^\t]*')) let item = {'match': memb, 'tagline': l['text']} " Add the kind of item. let s = matchstr(l['text'], '\t\(kind:\)\=\zs\S\ze\(\t\|$\)') if s != '' let item['kind'] = s if s == 'f' let item['match'] = memb . '(' endif endif call add(matches, item) endif endif endfor if len(matches) > 0 " Skip over [...] items let idx = 1 while 1 if idx >= len(a:items) return matches " No further items, return the result. endif if a:items[idx][0] != '[' break endif let idx += 1 endwhile " More items following. For each of the possible members find the " matching following members. return s:SearchMembers(matches, a:items[idx :], a:all) endif " Failed to find anything. return [] endfunction " For matching members, find matches for following items. " When "all" is non-zero find all, otherwise just return 1 if there is any " member. function! s:SearchMembers(matches, items, all) let res = [] for i in range(len(a:matches)) let typename = '' if has_key(a:matches[i], 'dict') if has_key(a:matches[i].dict, 'typename') let typename = a:matches[i].dict['typename'] elseif has_key(a:matches[i].dict, 'typeref') let typename = a:matches[i].dict['typeref'] endif let line = "\t" . a:matches[i].dict['cmd'] else let line = a:matches[i]['tagline'] let e = matchend(line, '\ttypename:') if e < 0 let e = matchend(line, '\ttyperef:') endif if e > 0 " Use typename field let typename = matchstr(line, '[^\t]*', e) endif endif if typename != '' call extend(res, s:StructMembers(typename, a:items, a:all)) else " Use the search command (the declaration itself). let s = match(line, '\t\zs/^') if s > 0 let e = match(line, '\<' . a:matches[i]['match'] . '\>', s) if e > 0 call extend(res, s:Nextitem(strpart(line, s, e - s), a:items, 0, a:all)) endif endif endif if a:all == 0 && len(res) > 0 break endif endfor return res endfunc let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/autoload/clojurecomplete.vim000066400000000000000000000175351320401574200222250ustar00rootroot00000000000000" Vim completion script " Language: Clojure " Maintainer: Sung Pae " URL: https://github.com/guns/vim-clojure-static " License: Same as Vim " Last Change: 18 July 2016 " -*- COMPLETION WORDS -*- " Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-011/clj/src/vim_clojure_static/generate.clj " Clojure version 1.8.0 let s:words = ["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-readably*","*read-eval*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc!","assoc","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","booleans","bound-fn","bound-fn*","bound?","butlast","byte","byte-array","bytes","case","cast","cat","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj!","conj","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj!","disj","dissoc!","dissoc","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","identical?","identity","if","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","init-proxy","instance?","int","int-array","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","neg?","new","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop!","pop","pop-thread-bindings","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","quot","quote","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seque","sequence","sequential?","set!","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","use","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"] " Simple word completion for special forms and public vars in clojure.core function! clojurecomplete#Complete(findstart, base) if a:findstart return searchpos('\<', 'bnW', line('.'))[1] - 1 else return { 'words': filter(copy(s:words), 'v:val =~# "\\V\\^' . a:base . '"') } endif endfunction " vim:sts=8:sw=8:ts=8:noet neovim-0.2.2/runtime/autoload/context.vim000066400000000000000000000125261320401574200205100ustar00rootroot00000000000000" Language: ConTeXt typesetting engine " Maintainer: Nicola Vitacolonna " Latest Revision: 2016 Oct 21 let s:keepcpo= &cpo set cpo&vim " Helper functions {{{ function! s:context_echo(message, mode) redraw echo "\r" execute 'echohl' a:mode echomsg '[ConTeXt]' a:message echohl None endf function! s:sh() return has('win32') || has('win64') || has('win16') || has('win95') \ ? ['cmd.exe', '/C'] \ : ['/bin/sh', '-c'] endfunction " For backward compatibility if exists('*win_getid') function! s:win_getid() return win_getid() endf function! s:win_id2win(winid) return win_id2win(a:winid) endf else function! s:win_getid() return winnr() endf function! s:win_id2win(winnr) return a:winnr endf endif " }}} " ConTeXt jobs {{{ if has('job') let g:context_jobs = [] " Print the status of ConTeXt jobs function! context#job_status() let l:jobs = filter(g:context_jobs, 'job_status(v:val) == "run"') let l:n = len(l:jobs) call s:context_echo( \ 'There '.(l:n == 1 ? 'is' : 'are').' '.(l:n == 0 ? 'no' : l:n) \ .' job'.(l:n == 1 ? '' : 's').' running' \ .(l:n == 0 ? '.' : ' (' . join(l:jobs, ', ').').'), \ 'ModeMsg') endfunction " Stop all ConTeXt jobs function! context#stop_jobs() let l:jobs = filter(g:context_jobs, 'job_status(v:val) == "run"') for job in l:jobs call job_stop(job) endfor sleep 1 let l:tmp = [] for job in l:jobs if job_status(job) == "run" call add(l:tmp, job) endif endfor let g:context_jobs = l:tmp if empty(g:context_jobs) call s:context_echo('Done. No jobs running.', 'ModeMsg') else call s:context_echo('There are still some jobs running. Please try again.', 'WarningMsg') endif endfunction function! context#callback(path, job, status) if index(g:context_jobs, a:job) != -1 && job_status(a:job) != 'run' " just in case call remove(g:context_jobs, index(g:context_jobs, a:job)) endif call s:callback(a:path, a:job, a:status) endfunction function! context#close_cb(channel) call job_status(ch_getjob(a:channel)) " Trigger exit_cb's callback for faster feedback endfunction function! s:typeset(path) call add(g:context_jobs, \ job_start(add(s:sh(), context#command() . ' ' . shellescape(fnamemodify(a:path, ":t"))), { \ 'close_cb' : 'context#close_cb', \ 'exit_cb' : function(get(b:, 'context_callback', get(g:, 'context_callback', 'context#callback')), \ [a:path]), \ 'in_io' : 'null' \ })) endfunction else " No jobs function! context#job_status() call s:context_echo('Not implemented', 'WarningMsg') endfunction! function! context#stop_jobs() call s:context_echo('Not implemented', 'WarningMsg') endfunction function! context#callback(path, job, status) call s:callback(a:path, a:job, a:status) endfunction function! s:typeset(path) execute '!' . context#command() . ' ' . shellescape(fnamemodify(a:path, ":t")) call call(get(b:, 'context_callback', get(g:, 'context_callback', 'context#callback')), \ [a:path, 0, v:shell_error]) endfunction endif " has('job') function! s:callback(path, job, status) abort if a:status < 0 " Assume the job was terminated return endif " Get info about the current window let l:winid = s:win_getid() " Save window id let l:efm = &l:errorformat " Save local errorformat let l:cwd = fnamemodify(getcwd(), ":p") " Save local working directory " Set errorformat to parse ConTeXt errors execute 'setl efm=' . escape(b:context_errorformat, ' ') try " Set cwd to expand error file correctly execute 'lcd' fnameescape(fnamemodify(a:path, ':h')) catch /.*/ execute 'setl efm=' . escape(l:efm, ' ') throw v:exception endtry try execute 'cgetfile' fnameescape(fnamemodify(a:path, ':r') . '.log') botright cwindow finally " Restore cwd and errorformat execute s:win_id2win(l:winid) . 'wincmd w' execute 'lcd ' . fnameescape(l:cwd) execute 'setl efm=' . escape(l:efm, ' ') endtry if a:status == 0 call s:context_echo('Success!', 'ModeMsg') else call s:context_echo('There are errors. ', 'ErrorMsg') endif endfunction function! context#command() return get(b:, 'context_mtxrun', get(g:, 'context_mtxrun', 'mtxrun')) \ . ' --script context --autogenerate --nonstopmode' \ . ' --synctex=' . (get(b:, 'context_synctex', get(g:, 'context_synctex', 0)) ? '1' : '0') \ . ' ' . get(b:, 'context_extra_options', get(g:, 'context_extra_options', '')) endfunction " Accepts an optional path (useful for big projects, when the file you are " editing is not the project's root document). If no argument is given, uses " the path of the current buffer. function! context#typeset(...) abort let l:path = fnamemodify(strlen(a:000[0]) > 0 ? a:1 : expand("%"), ":p") let l:cwd = fnamemodify(getcwd(), ":p") " Save local working directory call s:context_echo('Typesetting...', 'ModeMsg') execute 'lcd' fnameescape(fnamemodify(l:path, ":h")) try call s:typeset(l:path) finally " Restore local working directory execute 'lcd ' . fnameescape(l:cwd) endtry endfunction! "}}} let &cpo = s:keepcpo unlet s:keepcpo " vim: sw=2 fdm=marker neovim-0.2.2/runtime/autoload/contextcomplete.vim000066400000000000000000000012201320401574200222260ustar00rootroot00000000000000" Language: ConTeXt typesetting engine " Maintainer: Nicola Vitacolonna " Latest Revision: 2016 Oct 15 let s:keepcpo= &cpo set cpo&vim " Complete keywords in MetaPost blocks function! contextcomplete#Complete(findstart, base) if a:findstart == 1 if len(synstack(line('.'), 1)) > 0 && \ synIDattr(synstack(line('.'), 1)[0], "name") ==# 'contextMPGraphic' return syntaxcomplete#Complete(a:findstart, a:base) else return -3 endif else return syntaxcomplete#Complete(a:findstart, a:base) endif endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim: sw=2 fdm=marker neovim-0.2.2/runtime/autoload/csscomplete.vim000066400000000000000000001242711320401574200213460ustar00rootroot00000000000000" Vim completion script " Language: CSS " Based on MDN CSS Reference at 2016 Jan " plus CSS Speech Module " Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com ) " Original Author: Mikolaj Machowski ( mikmach AT wp DOT pl ) " Last Change: 2016 Jan 11 let s:values = split("all additive-symbols align-content align-items align-self animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size block-size border border-block-end border-block-end-color border-block-end-style border-block-end-width border-block-start border-block-start-color border-block-start-style border-block-start-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline-end border-inline-end-color border-inline-end-style border-inline-end-width border-inline-start border-inline-start-color border-inline-start-style border-inline-start-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side clear clip clip-path color columns column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width content counter-increment counter-reset cue cue-before cue-after cursor direction display empty-cells fallback filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font font-family font-feature-settings font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid grid-area grid-auto-columns grid-auto-flow grid-auto-position grid-auto-rows grid-column grid-column-start grid-column-end grid-row grid-row-start grid-row-end grid-template grid-template-areas grid-template-rows grid-template-columns height hyphens image-rendering image-resolution image-orientation ime-mode inline-size isolation justify-content left letter-spacing line-break line-height list-style list-style-image list-style-position list-style-type margin margin-block-end margin-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top marks mask mask-type max-block-size max-height max-inline-size max-width max-zoom min-block-size min-height min-inline-size min-width min-zoom mix-blend-mode negative object-fit object-position offset-block-end offset-block-start offset-inline-end offset-inline-start opacity order orientation orphans outline outline-color outline-offset outline-style outline-width overflow overflow-wrap overflow-x overflow-y pad padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top page-break-after page-break-before page-break-inside pause-before pause-after pause perspective perspective-origin pointer-events position prefix quotes range resize rest rest-before rest-after right ruby-align ruby-merge ruby-position scroll-behavior scroll-snap-coordinate scroll-snap-destination scroll-snap-points-x scroll-snap-points-y scroll-snap-type scroll-snap-type-x scroll-snap-type-y shape-image-threshold shape-margin shape-outside speak speak-as suffix symbols system table-layout tab-size text-align text-align-last text-combine-upright text-decoration text-decoration-color text-decoration-line text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-orientation text-overflow text-rendering text-shadow text-transform text-underline-position top touch-action transform transform-box transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi unicode-range user-zoom vertical-align visibility voice-balance voice-duration voice-family voice-pitch voice-rate voice-range voice-stress voice-volume white-space widows width will-change word-break word-spacing word-wrap writing-mode z-index zoom") function! csscomplete#CompleteCSS(findstart, base) if a:findstart " We need whole line to proper checking let line = getline('.') let start = col('.') - 1 let compl_begin = col('.') - 2 while start >= 0 && line[start - 1] =~ '\%(\k\|-\)' let start -= 1 endwhile let b:after = line[compl_begin :] let b:compl_context = line[0:compl_begin] return start endif " There are few chars important for context: " ^ ; : { } /* */ " Where ^ is start of line and /* */ are comment borders " Depending on their relative position to cursor we will know what should " be completed. " 1. if nearest are ^ or { or ; current word is property " 2. if : it is value (with exception of pseudo things) " 3. if } we are outside of css definitions " 4. for comments ignoring is be the easiest but assume they are the same " as 1. " 5. if @ complete at-rule " 6. if ! complete important if exists("b:compl_context") let line = b:compl_context let after = b:after unlet! b:compl_context else let line = a:base endif let res = [] let res2 = [] let borders = {} " Check last occurrence of sequence let openbrace = strridx(line, '{') let closebrace = strridx(line, '}') let colon = strridx(line, ':') let semicolon = strridx(line, ';') let opencomm = strridx(line, '/*') let closecomm = strridx(line, '*/') let style = strridx(line, 'style\s*=') let atrule = strridx(line, '@') let exclam = strridx(line, '!') if openbrace > -1 let borders[openbrace] = "openbrace" endif if closebrace > -1 let borders[closebrace] = "closebrace" endif if colon > -1 let borders[colon] = "colon" endif if semicolon > -1 let borders[semicolon] = "semicolon" endif if opencomm > -1 let borders[opencomm] = "opencomm" endif if closecomm > -1 let borders[closecomm] = "closecomm" endif if style > -1 let borders[style] = "style" endif if atrule > -1 let borders[atrule] = "atrule" endif if exclam > -1 let borders[exclam] = "exclam" endif if len(borders) == 0 || borders[max(keys(borders))] =~ '^\%(openbrace\|semicolon\|opencomm\|closecomm\|style\)$' " Complete properties let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$') for m in s:values if m =~? '^'.entered_property call add(res, m . ':') elseif m =~? entered_property call add(res2, m . ':') endif endfor return res + res2 elseif borders[max(keys(borders))] == 'colon' " Get name of property let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$')) let wide_keywords = ["initial", "inherit", "unset"] let color_values = ["transparent", "rgb(", "rgba(", "hsl(", "hsla(", "#"] let border_style_values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] let border_width_values = ["thin", "thick", "medium"] let list_style_type_values = ["decimal", "decimal-leading-zero", "arabic-indic", "armenian", "upper-armenian", "lower-armenian", "bengali", "cambodian", "khmer", "cjk-decimal", "devanagari", "georgian", "gujarati", "gurmukhi", "hebrew", "kannada", "lao", "malayalam", "mongolian", "myanmar", "oriya", "persian", "lower-roman", "upper-roman", "tamil", "telugu", "thai", "tibetan", "lower-alpha", "lower-latin", "upper-alpha", "upper-latin", "cjk-earthly-branch", "cjk-heavenly-stem", "lower-greek", "hiragana", "hiragana-iroha", "katakana", "katakana-iroha", "disc", "circle", "square", "disclosure-open", "disclosure-closed"] let timing_functions = ["cubic-bezier(", "steps(", "linear", "ease", "ease-in", "ease-in-out", "ease-out", "step-start", "step-end"] if prop == 'all' let values = [] elseif prop == 'additive-symbols' let values = [] elseif prop == 'align-content' let values = ["flex-start", "flex-end", "center", "space-between", "space-around", "stretch"] elseif prop == 'align-items' let values = ["flex-start", "flex-end", "center", "baseline", "stretch"] elseif prop == 'align-self' let values = ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"] elseif prop == 'animation' let values = timing_functions + ["normal", "reverse", "alternate", "alternate-reverse"] + ["none", "forwards", "backwards", "both"] + ["running", "paused"] elseif prop == 'animation-delay' let values = [] elseif prop == 'animation-direction' let values = ["normal", "reverse", "alternate", "alternate-reverse"] elseif prop == 'animation-duration' let values = [] elseif prop == 'animation-fill-mode' let values = ["none", "forwards", "backwards", "both"] elseif prop == 'animation-iteration-count' let values = [] elseif prop == 'animation-name' let values = [] elseif prop == 'animation-play-state' let values = ["running", "paused"] elseif prop == 'animation-timing-function' let values = timing_functions elseif prop == 'background-attachment' let values = ["scroll", "fixed"] elseif prop == 'background-color' let values = color_values elseif prop == 'background-image' let values = ["url(", "none"] elseif prop == 'background-position' let vals = matchstr(line, '.*:\s*\zs.*') if vals =~ '^\%([a-zA-Z]\+\)\?$' let values = ["top", "center", "bottom"] elseif vals =~ '^[a-zA-Z]\+\s\+\%([a-zA-Z]\+\)\?$' let values = ["left", "center", "right"] else return [] endif elseif prop == 'background-repeat' let values = ["repeat", "repeat-x", "repeat-y", "no-repeat"] elseif prop == 'background-size' let values = ["auto", "contain", "cover"] elseif prop == 'background' let values = ["scroll", "fixed"] + color_values + ["url(", "none"] + ["top", "center", "bottom", "left", "right"] + ["repeat", "repeat-x", "repeat-y", "no-repeat"] + ["auto", "contain", "cover"] elseif prop =~ 'border\%(-top\|-right\|-bottom\|-left\|-block-start\|-block-end\)\?$' let vals = matchstr(line, '.*:\s*\zs.*') if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$' let values = border_width_values elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$' let values = border_style_values elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$' let values = color_values else return [] endif elseif prop =~ 'border-\%(top\|right\|bottom\|left\|block-start\|block-end\)-color' let values = color_values elseif prop =~ 'border-\%(top\|right\|bottom\|left\|block-start\|block-end\)-style' let values = border_style_values elseif prop =~ 'border-\%(top\|right\|bottom\|left\|block-start\|block-end\)-width' let values = border_width_values elseif prop == 'border-color' let values = color_values elseif prop == 'border-style' let values = border_style_values elseif prop == 'border-width' let values = border_width_values elseif prop == 'bottom' let values = ["auto"] elseif prop == 'box-decoration-break' let values = ["slice", "clone"] elseif prop == 'box-shadow' let values = ["inset"] elseif prop == 'box-sizing' let values = ["border-box", "content-box"] elseif prop =~ 'break-\%(before\|after\)' let values = ["auto", "always", "avoid", "left", "right", "page", "column", "region", "recto", "verso", "avoid-page", "avoid-column", "avoid-region"] elseif prop == 'break-inside' let values = ["auto", "avoid", "avoid-page", "avoid-column", "avoid-region"] elseif prop == 'caption-side' let values = ["top", "bottom"] elseif prop == 'clear' let values = ["none", "left", "right", "both"] elseif prop == 'clip' let values = ["auto", "rect("] elseif prop == 'clip-path' let values = ["fill-box", "stroke-box", "view-box", "none"] elseif prop == 'color' let values = color_values elseif prop == 'columns' let values = [] elseif prop == 'column-count' let values = ['auto'] elseif prop == 'column-fill' let values = ['auto', 'balance'] elseif prop == 'column-rule-color' let values = color_values elseif prop == 'column-rule-style' let values = border_style_values elseif prop == 'column-rule-width' let values = border_width_values elseif prop == 'column-rule' let vals = matchstr(line, '.*:\s*\zs.*') if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$' let values = border_width_values elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$' let values = border_style_values elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$' let values = color_values else return [] endif elseif prop == 'column-span' let values = ["none", "all"] elseif prop == 'column-width' let values = ["auto"] elseif prop == 'content' let values = ["normal", "attr(", "open-quote", "close-quote", "no-open-quote", "no-close-quote"] elseif prop =~ 'counter-\%(increment\|reset\)$' let values = ["none"] elseif prop =~ 'cue\%(-after\|-before\)\=$' let values = ["url("] elseif prop == 'cursor' let values = ["url(", "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress"] elseif prop == 'direction' let values = ["ltr", "rtl"] elseif prop == 'display' let values = ["inline", "block", "list-item", "inline-list-item", "run-in", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none", "flex", "inline-flex", "grid", "inline-grid", "ruby", "ruby-base", "ruby-text", "ruby-base-container", "ruby-text-container", "contents"] elseif prop == 'elevation' let values = ["below", "level", "above", "higher", "lower"] elseif prop == 'empty-cells' let values = ["show", "hide"] elseif prop == 'fallback' let values = list_style_type_values elseif prop == 'filter' let values = ["blur(", "brightness(", "contrast(", "drop-shadow(", "grayscale(", "hue-rotate(", "invert(", "opacity(", "sepia(", "saturate("] elseif prop == 'flex-basis' let values = ["auto", "content"] elseif prop == 'flex-flow' let values = ["row", "row-reverse", "column", "column-reverse", "nowrap", "wrap", "wrap-reverse"] elseif prop == 'flex-grow' let values = [] elseif prop == 'flex-shrink' let values = [] elseif prop == 'flex-wrap' let values = ["nowrap", "wrap", "wrap-reverse"] elseif prop == 'flex' let values = ["nowrap", "wrap", "wrap-reverse"] + ["row", "row-reverse", "column", "column-reverse", "nowrap", "wrap", "wrap-reverse"] + ["auto", "content"] elseif prop == 'float' let values = ["left", "right", "none"] elseif prop == 'font-family' let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"] elseif prop == 'font-feature-settings' let values = ["normal", '"aalt"', '"abvf"', '"abvm"', '"abvs"', '"afrc"', '"akhn"', '"blwf"', '"blwm"', '"blws"', '"calt"', '"case"', '"ccmp"', '"cfar"', '"cjct"', '"clig"', '"cpct"', '"cpsp"', '"cswh"', '"curs"', '"cv', '"c2pc"', '"c2sc"', '"dist"', '"dlig"', '"dnom"', '"dtls"', '"expt"', '"falt"', '"fin2"', '"fin3"', '"fina"', '"flac"', '"frac"', '"fwid"', '"half"', '"haln"', '"halt"', '"hist"', '"hkna"', '"hlig"', '"hngl"', '"hojo"', '"hwid"', '"init"', '"isol"', '"ital"', '"jalt"', '"jp78"', '"jp83"', '"jp90"', '"jp04"', '"kern"', '"lfbd"', '"liga"', '"ljmo"', '"lnum"', '"locl"', '"ltra"', '"ltrm"', '"mark"', '"med2"', '"medi"', '"mgrk"', '"mkmk"', '"mset"', '"nalt"', '"nlck"', '"nukt"', '"numr"', '"onum"', '"opbd"', '"ordn"', '"ornm"', '"palt"', '"pcap"', '"pkna"', '"pnum"', '"pref"', '"pres"', '"pstf"', '"psts"', '"pwid"', '"qwid"', '"rand"', '"rclt"', '"rkrf"', '"rlig"', '"rphf"', '"rtbd"', '"rtla"', '"rtlm"', '"ruby"', '"salt"', '"sinf"', '"size"', '"smcp"', '"smpl"', '"ss01"', '"ss02"', '"ss03"', '"ss04"', '"ss05"', '"ss06"', '"ss07"', '"ss08"', '"ss09"', '"ss10"', '"ss11"', '"ss12"', '"ss13"', '"ss14"', '"ss15"', '"ss16"', '"ss17"', '"ss18"', '"ss19"', '"ss20"', '"ssty"', '"stch"', '"subs"', '"sups"', '"swsh"', '"titl"', '"tjmo"', '"tnam"', '"tnum"', '"trad"', '"twid"', '"unic"', '"valt"', '"vatu"', '"vert"', '"vhal"', '"vjmo"', '"vkna"', '"vkrn"', '"vpal"', '"vrt2"', '"zero"'] elseif prop == 'font-kerning' let values = ["auto", "normal", "none"] elseif prop == 'font-language-override' let values = ["normal"] elseif prop == 'font-size' let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"] elseif prop == 'font-size-adjust' let values = [] elseif prop == 'font-stretch' let values = ["normal", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"] elseif prop == 'font-style' let values = ["normal", "italic", "oblique"] elseif prop == 'font-synthesis' let values = ["none", "weight", "style"] elseif prop == 'font-variant-alternates' let values = ["normal", "historical-forms", "stylistic(", "styleset(", "character-variant(", "swash(", "ornaments(", "annotation("] elseif prop == 'font-variant-caps' let values = ["normal", "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps"] elseif prop == 'font-variant-asian' let values = ["normal", "ruby", "jis78", "jis83", "jis90", "jis04", "simplified", "traditional"] elseif prop == 'font-variant-ligatures' let values = ["normal", "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual"] elseif prop == 'font-variant-numeric' let values = ["normal", "ordinal", "slashed-zero", "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", "stacked-fractions"] elseif prop == 'font-variant-position' let values = ["normal", "sub", "super"] elseif prop == 'font-variant' let values = ["normal", "historical-forms", "stylistic(", "styleset(", "character-variant(", "swash(", "ornaments(", "annotation("] + ["small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps"] + ["ruby", "jis78", "jis83", "jis90", "jis04", "simplified", "traditional"] + ["none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual"] + ["ordinal", "slashed-zero", "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", "stacked-fractions"] + ["sub", "super"] elseif prop == 'font-weight' let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"] elseif prop == 'font' let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"] elseif prop =~ '^\%(height\|width\)$' let values = ["auto", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"] elseif prop =~ '^\%(left\|rigth\)$' let values = ["auto"] elseif prop == 'image-rendering' let values = ["auto", "crisp-edges", "pixelated"] elseif prop == 'image-orientation' let values = ["from-image", "flip"] elseif prop == 'ime-mode' let values = ["auto", "normal", "active", "inactive", "disabled"] elseif prop == 'inline-size' let values = ["auto", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"] elseif prop == 'isolation' let values = ["auto", "isolate"] elseif prop == 'justify-content' let values = ["flex-start", "flex-end", "center", "space-between", "space-around"] elseif prop == 'letter-spacing' let values = ["normal"] elseif prop == 'line-break' let values = ["auto", "loose", "normal", "strict"] elseif prop == 'line-height' let values = ["normal"] elseif prop == 'list-style-image' let values = ["url(", "none"] elseif prop == 'list-style-position' let values = ["inside", "outside"] elseif prop == 'list-style-type' let values = list_style_type_values elseif prop == 'list-style' let values = list_style_type_values + ["inside", "outside"] + ["url(", "none"] elseif prop == 'margin' let values = ["auto"] elseif prop =~ 'margin-\%(right\|left\|top\|bottom\|block-start\|block-end\|inline-start\|inline-end\)$' let values = ["auto"] elseif prop == 'marks' let values = ["crop", "cross", "none"] elseif prop == 'mask' let values = ["url("] elseif prop == 'mask-type' let values = ["luminance", "alpha"] elseif prop == '\%(max\|min\)-\%(block\|inline\)-size' let values = ["auto", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"] elseif prop == '\%(max\|min\)-\%(height\|width\)' let values = ["auto", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"] elseif prop == '\%(max\|min\)-zoom' let values = ["auto"] elseif prop == 'mix-blend-mode' let values = ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"] elseif prop == 'opacity' let values = [] elseif prop == 'orientation' let values = ["auto", "portrait", "landscape"] elseif prop == 'orphans' let values = [] elseif prop == 'outline-offset' let values = [] elseif prop == 'outline-color' let values = color_values elseif prop == 'outline-style' let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] elseif prop == 'outline-width' let values = ["thin", "thick", "medium"] elseif prop == 'outline' let vals = matchstr(line, '.*:\s*\zs.*') if vals =~ '^\%([a-zA-Z0-9,()#]\+\)\?$' let values = color_values elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+\%([a-zA-Z]\+\)\?$' let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$' let values = ["thin", "thick", "medium"] else return [] endif elseif prop == 'overflow-wrap' let values = ["normal", "break-word"] elseif prop =~ 'overflow\%(-x\|-y\)\=' let values = ["visible", "hidden", "scroll", "auto"] elseif prop == 'pad' let values = [] elseif prop == 'padding' let values = [] elseif prop =~ 'padding-\%(top\|right\|bottom\|left\|inline-start\|inline-end\|block-start\|block-end\)$' let values = [] elseif prop =~ 'page-break-\%(after\|before\)$' let values = ["auto", "always", "avoid", "left", "right", "recto", "verso"] elseif prop == 'page-break-inside' let values = ["auto", "avoid"] elseif prop =~ 'pause\%(-after\|-before\)\=$' let values = ["none", "x-weak", "weak", "medium", "strong", "x-strong"] elseif prop == 'perspective' let values = ["none"] elseif prop == 'perspective-origin' let values = ["top", "bottom", "left", "center", " right"] elseif prop == 'pointer-events' let values = ["auto", "none", "visiblePainted", "visibleFill", "visibleStroke", "visible", "painted", "fill", "stroke", "all"] elseif prop == 'position' let values = ["static", "relative", "absolute", "fixed", "sticky"] elseif prop == 'prefix' let values = [] elseif prop == 'quotes' let values = ["none"] elseif prop == 'range' let values = ["auto", "infinite"] elseif prop == 'resize' let values = ["none", "both", "horizontal", "vertical"] elseif prop =~ 'rest\%(-after\|-before\)\=$' let values = ["none", "x-weak", "weak", "medium", "strong", "x-strong"] elseif prop == 'ruby-align' let values = ["start", "center", "space-between", "space-around"] elseif prop == 'ruby-merge' let values = ["separate", "collapse", "auto"] elseif prop == 'ruby-position' let values = ["over", "under", "inter-character"] elseif prop == 'scroll-behavior' let values = ["auto", "smooth"] elseif prop == 'scroll-snap-coordinate' let values = ["none"] elseif prop == 'scroll-snap-destination' return [] elseif prop == 'scroll-snap-points-\%(x\|y\)$' let values = ["none", "repeat("] elseif prop == 'scroll-snap-type\%(-x\|-y\)\=$' let values = ["none", "mandatory", "proximity"] elseif prop == 'shape-image-threshold' let values = [] elseif prop == 'shape-margin' let values = [] elseif prop == 'shape-outside' let values = ["margin-box", "border-box", "padding-box", "content-box", 'inset(', 'circle(', 'ellipse(', 'polygon(', 'url('] elseif prop == 'speak' let values = ["auto", "none", "normal"] elseif prop == 'speak-as' let values = ["auto", "normal", "spell-out", "digits"] elseif prop == 'src' let values = ["url("] elseif prop == 'suffix' let values = [] elseif prop == 'symbols' let values = [] elseif prop == 'system' let vals = matchstr(line, '.*:\s*\zs.*') if vals =~ '^extends' let values = list_style_type_values else let values = ["cyclic", "numeric", "alphabetic", "symbolic", "additive", "fixed", "extends"] endif elseif prop == 'table-layout' let values = ["auto", "fixed"] elseif prop == 'tab-size' let values = [] elseif prop == 'text-align' let values = ["start", "end", "left", "right", "center", "justify", "match-parent"] elseif prop == 'text-align-last' let values = ["auto", "start", "end", "left", "right", "center", "justify"] elseif prop == 'text-combine-upright' let values = ["none", "all", "digits"] elseif prop == 'text-decoration-line' let values = ["none", "underline", "overline", "line-through", "blink"] elseif prop == 'text-decoration-color' let values = color_values elseif prop == 'text-decoration-style' let values = ["solid", "double", "dotted", "dashed", "wavy"] elseif prop == 'text-decoration' let values = ["none", "underline", "overline", "line-through", "blink"] + ["solid", "double", "dotted", "dashed", "wavy"] + color_values elseif prop == 'text-emphasis-color' let values = color_values elseif prop == 'text-emphasis-position' let values = ["over", "under", "left", "right"] elseif prop == 'text-emphasis-style' let values = ["none", "filled", "open", "dot", "circle", "double-circle", "triangle", "sesame"] elseif prop == 'text-emphasis' let values = color_values + ["over", "under", "left", "right"] + ["none", "filled", "open", "dot", "circle", "double-circle", "triangle", "sesame"] elseif prop == 'text-indent' let values = ["hanging", "each-line"] elseif prop == 'text-orientation' let values = ["mixed", "upright", "sideways", "sideways-right", "use-glyph-orientation"] elseif prop == 'text-overflow' let values = ["clip", "ellipsis"] elseif prop == 'text-rendering' let values = ["auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision"] elseif prop == 'text-shadow' let values = color_values elseif prop == 'text-transform' let values = ["capitalize", "uppercase", "lowercase", "full-width", "none"] elseif prop == 'text-underline-position' let values = ["auto", "under", "left", "right"] elseif prop == 'touch-action' let values = ["auto", "none", "pan-x", "pan-y", "manipulation", "pan-left", "pan-right", "pan-top", "pan-down"] elseif prop == 'transform' let values = ["matrix(", "translate(", "translateX(", "translateY(", "scale(", "scaleX(", "scaleY(", "rotate(", "skew(", "skewX(", "skewY(", "matrix3d(", "translate3d(", "translateZ(", "scale3d(", "scaleZ(", "rotate3d(", "rotateX(", "rotateY(", "rotateZ(", "perspective("] elseif prop == 'transform-box' let values = ["border-box", "fill-box", "view-box"] elseif prop == 'transform-origin' let values = ["left", "center", "right", "top", "bottom"] elseif prop == 'transform-style' let values = ["flat", "preserve-3d"] elseif prop == 'top' let values = ["auto"] elseif prop == 'transition-property' let values = ["all", "none"] + s:values elseif prop == 'transition-duration' let values = [] elseif prop == 'transition-delay' let values = [] elseif prop == 'transition-timing-function' let values = timing_functions elseif prop == 'transition' let values = ["all", "none"] + s:values + timing_functions elseif prop == 'unicode-bidi' let values = ["normal", "embed", "isolate", "bidi-override", "isolate-override", "plaintext"] elseif prop == 'unicode-range' let values = ["U+"] elseif prop == 'user-zoom' let values = ["zoom", "fixed"] elseif prop == 'vertical-align' let values = ["baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"] elseif prop == 'visibility' let values = ["visible", "hidden", "collapse"] elseif prop == 'voice-volume' let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"] elseif prop == 'voice-balance' let values = ["left", "center", "right", "leftwards", "rightwards"] elseif prop == 'voice-family' let values = [] elseif prop == 'voice-rate' let values = ["normal", "x-slow", "slow", "medium", "fast", "x-fast"] elseif prop == 'voice-pitch' let values = ["absolute", "x-low", "low", "medium", "high", "x-high"] elseif prop == 'voice-range' let values = ["absolute", "x-low", "low", "medium", "high", "x-high"] elseif prop == 'voice-stress' let values = ["normal", "strong", "moderate", "none", "reduced "] elseif prop == 'voice-duration' let values = ["auto"] elseif prop == 'white-space' let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"] elseif prop == 'widows' let values = [] elseif prop == 'will-change' let values = ["auto", "scroll-position", "contents"] + s:values elseif prop == 'word-break' let values = ["normal", "break-all", "keep-all"] elseif prop == 'word-spacing' let values = ["normal"] elseif prop == 'word-wrap' let values = ["normal", "break-word"] elseif prop == 'writing-mode' let values = ["horizontal-tb", "vertical-rl", "vertical-lr", "sideways-rl", "sideways-lr"] elseif prop == 'z-index' let values = ["auto"] elseif prop == 'zoom' let values = ["auto"] else " If no property match it is possible we are outside of {} and " trying to complete pseudo-(class|element) let element = tolower(matchstr(line, '\zs[a-zA-Z1-6]*\ze:[^:[:space:]]\{-}$')) if stridx('a,abbr,address,area,article,aside,audio,b,base,bdi,bdo,bgsound,blockquote,body,br,button,canvas,caption,center,cite,code,col,colgroup,command,content,data,datalist,dd,del,details,dfn,dialog,div,dl,dt,element,em,embed,fieldset,figcaption,figure,font,footer,form,frame,frameset,head,header,hgroup,hr,html,i,iframe,image,img,input,ins,isindex,kbd,keygen,label,legend,li,link,main,map,mark,menu,menuitem,meta,meter,nav,nobr,noframes,noscript,object,ol,optgroup,option,output,p,param,picture,pre,progress,q,rp,rt,rtc,ruby,s,samp,script,section,select,shadow,small,source,span,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,title,tr,track,u,ul,var,video,wbr', ','.element.',') > -1 let values = ["active", "any", "checked", "default", "dir(", "disabled", "empty", "enabled", "first", "first-child", "first-of-type", "fullscreen", "focus", "hover", "indeterminate", "in-range", "invalid", "lang(", "last-child", "last-of-type", "left", "link", "not(", "nth-child(", "nth-last-child(", "nth-last-of-type(", "nth-of-type(", "only-child", "only-of-type", "optional", "out-of-range", "read-only", "read-write", "required", "right", "root", "scope", "target", "valid", "visited", "first-line", "first-letter", "before", "after", "selection", "backdrop"] else return [] endif endif let values = wide_keywords + values " Complete values let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$') for m in values if m =~? '^'.entered_value call add(res, m) elseif m =~? entered_value call add(res2, m) endif endfor return res + res2 elseif borders[max(keys(borders))] == 'closebrace' return [] elseif borders[max(keys(borders))] == 'exclam' " Complete values let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$') let values = ["important"] for m in values if m =~? '^'.entered_imp call add(res, m) endif endfor return res elseif borders[max(keys(borders))] == 'atrule' let afterat = matchstr(line, '.*@\zs.*') if afterat =~ '\s' let atrulename = matchstr(line, '.*@\zs[a-zA-Z-]\+\ze') if atrulename == 'media' let entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$') if entered_atruleafter =~ "([^)]*$" let entered_atruleafter = matchstr(entered_atruleafter, '(\s*\zs[^)]*$') let values = ["max-width", "min-width", "width", "max-height", "min-height", "height", "max-aspect-ration", "min-aspect-ration", "aspect-ratio", "orientation", "max-resolution", "min-resolution", "resolution", "scan", "grid", "update-frequency", "overflow-block", "overflow-inline", "max-color", "min-color", "color", "max-color-index", "min-color-index", "color-index", "monochrome", "inverted-colors", "pointer", "hover", "any-pointer", "any-hover", "light-level", "scripting"] else let values = ["screen", "print", "speech", "all", "not", "and", "("] endif elseif atrulename == 'supports' let entered_atruleafter = matchstr(line, '.*@supports\s\+\zs.*$') if entered_atruleafter =~ "([^)]*$" let entered_atruleafter = matchstr(entered_atruleafter, '(\s*\zs.*$') let values = s:values else let values = ["("] endif elseif atrulename == 'charset' let entered_atruleafter = matchstr(line, '.*@charset\s\+\zs.*$') let values = [ \ '"UTF-8";', '"ANSI_X3.4-1968";', '"ISO_8859-1:1987";', '"ISO_8859-2:1987";', '"ISO_8859-3:1988";', '"ISO_8859-4:1988";', '"ISO_8859-5:1988";', \ '"ISO_8859-6:1987";', '"ISO_8859-7:1987";', '"ISO_8859-8:1988";', '"ISO_8859-9:1989";', '"ISO-8859-10";', '"ISO_6937-2-add";', '"JIS_X0201";', \ '"JIS_Encoding";', '"Shift_JIS";', '"Extended_UNIX_Code_Packed_Format_for_Japanese";', '"Extended_UNIX_Code_Fixed_Width_for_Japanese";', \ '"BS_4730";', '"SEN_850200_C";', '"IT";', '"ES";', '"DIN_66003";', '"NS_4551-1";', '"NF_Z_62-010";', '"ISO-10646-UTF-1";', '"ISO_646.basic:1983";', \ '"INVARIANT";', '"ISO_646.irv:1983";', '"NATS-SEFI";', '"NATS-SEFI-ADD";', '"NATS-DANO";', '"NATS-DANO-ADD";', '"SEN_850200_B";', '"KS_C_5601-1987";', \ '"ISO-2022-KR";', '"EUC-KR";', '"ISO-2022-JP";', '"ISO-2022-JP-2";', '"JIS_C6220-1969-jp";', '"JIS_C6220-1969-ro";', '"PT";', '"greek7-old";', \ '"latin-greek";', '"NF_Z_62-010_(1973)";', '"Latin-greek-1";', '"ISO_5427";', '"JIS_C6226-1978";', '"BS_viewdata";', '"INIS";', '"INIS-8";', \ '"INIS-cyrillic";', '"ISO_5427:1981";', '"ISO_5428:1980";', '"GB_1988-80";', '"GB_2312-80";', '"NS_4551-2";', '"videotex-suppl";', '"PT2";', \ '"ES2";', '"MSZ_7795.3";', '"JIS_C6226-1983";', '"greek7";', '"ASMO_449";', '"iso-ir-90";', '"JIS_C6229-1984-a";', '"JIS_C6229-1984-b";', \ '"JIS_C6229-1984-b-add";', '"JIS_C6229-1984-hand";', '"JIS_C6229-1984-hand-add";', '"JIS_C6229-1984-kana";', '"ISO_2033-1983";', \ '"ANSI_X3.110-1983";', '"T.61-7bit";', '"T.61-8bit";', '"ECMA-cyrillic";', '"CSA_Z243.4-1985-1";', '"CSA_Z243.4-1985-2";', '"CSA_Z243.4-1985-gr";', \ '"ISO_8859-6-E";', '"ISO_8859-6-I";', '"T.101-G2";', '"ISO_8859-8-E";', '"ISO_8859-8-I";', '"CSN_369103";', '"JUS_I.B1.002";', '"IEC_P27-1";', \ '"JUS_I.B1.003-serb";', '"JUS_I.B1.003-mac";', '"greek-ccitt";', '"NC_NC00-10:81";', '"ISO_6937-2-25";', '"GOST_19768-74";', '"ISO_8859-supp";', \ '"ISO_10367-box";', '"latin-lap";', '"JIS_X0212-1990";', '"DS_2089";', '"us-dk";', '"dk-us";', '"KSC5636";', '"UNICODE-1-1-UTF-7";', '"ISO-2022-CN";', \ '"ISO-2022-CN-EXT";', '"ISO-8859-13";', '"ISO-8859-14";', '"ISO-8859-15";', '"ISO-8859-16";', '"GBK";', '"GB18030";', '"OSD_EBCDIC_DF04_15";', \ '"OSD_EBCDIC_DF03_IRV";', '"OSD_EBCDIC_DF04_1";', '"ISO-11548-1";', '"KZ-1048";', '"ISO-10646-UCS-2";', '"ISO-10646-UCS-4";', '"ISO-10646-UCS-Basic";', \ '"ISO-10646-Unicode-Latin1";', '"ISO-10646-J-1";', '"ISO-Unicode-IBM-1261";', '"ISO-Unicode-IBM-1268";', '"ISO-Unicode-IBM-1276";', \ '"ISO-Unicode-IBM-1264";', '"ISO-Unicode-IBM-1265";', '"UNICODE-1-1";', '"SCSU";', '"UTF-7";', '"UTF-16BE";', '"UTF-16LE";', '"UTF-16";', '"CESU-8";', \ '"UTF-32";', '"UTF-32BE";', '"UTF-32LE";', '"BOCU-1";', '"ISO-8859-1-Windows-3.0-Latin-1";', '"ISO-8859-1-Windows-3.1-Latin-1";', \ '"ISO-8859-2-Windows-Latin-2";', '"ISO-8859-9-Windows-Latin-5";', '"hp-roman8";', '"Adobe-Standard-Encoding";', '"Ventura-US";', \ '"Ventura-International";', '"DEC-MCS";', '"IBM850";', '"PC8-Danish-Norwegian";', '"IBM862";', '"PC8-Turkish";', '"IBM-Symbols";', '"IBM-Thai";', \ '"HP-Legal";', '"HP-Pi-font";', '"HP-Math8";', '"Adobe-Symbol-Encoding";', '"HP-DeskTop";', '"Ventura-Math";', '"Microsoft-Publishing";', \ '"Windows-31J";', '"GB2312";', '"Big5";', '"macintosh";', '"IBM037";', '"IBM038";', '"IBM273";', '"IBM274";', '"IBM275";', '"IBM277";', '"IBM278";', \ '"IBM280";', '"IBM281";', '"IBM284";', '"IBM285";', '"IBM290";', '"IBM297";', '"IBM420";', '"IBM423";', '"IBM424";', '"IBM437";', '"IBM500";', '"IBM851";', \ '"IBM852";', '"IBM855";', '"IBM857";', '"IBM860";', '"IBM861";', '"IBM863";', '"IBM864";', '"IBM865";', '"IBM868";', '"IBM869";', '"IBM870";', '"IBM871";', \ '"IBM880";', '"IBM891";', '"IBM903";', '"IBM904";', '"IBM905";', '"IBM918";', '"IBM1026";', '"EBCDIC-AT-DE";', '"EBCDIC-AT-DE-A";', '"EBCDIC-CA-FR";', \ '"EBCDIC-DK-NO";', '"EBCDIC-DK-NO-A";', '"EBCDIC-FI-SE";', '"EBCDIC-FI-SE-A";', '"EBCDIC-FR";', '"EBCDIC-IT";', '"EBCDIC-PT";', '"EBCDIC-ES";', \ '"EBCDIC-ES-A";', '"EBCDIC-ES-S";', '"EBCDIC-UK";', '"EBCDIC-US";', '"UNKNOWN-8BIT";', '"MNEMONIC";', '"MNEM";', '"VISCII";', '"VIQR";', '"KOI8-R";', \ '"HZ-GB-2312";', '"IBM866";', '"IBM775";', '"KOI8-U";', '"IBM00858";', '"IBM00924";', '"IBM01140";', '"IBM01141";', '"IBM01142";', '"IBM01143";', \ '"IBM01144";', '"IBM01145";', '"IBM01146";', '"IBM01147";', '"IBM01148";', '"IBM01149";', '"Big5-HKSCS";', '"IBM1047";', '"PTCP154";', '"Amiga-1251";', \ '"KOI7-switched";', '"BRF";', '"TSCII";', '"windows-1250";', '"windows-1251";', '"windows-1252";', '"windows-1253";', '"windows-1254";', '"windows-1255";', \ '"windows-1256";', '"windows-1257";', '"windows-1258";', '"TIS-620";'] elseif atrulename == 'namespace' let entered_atruleafter = matchstr(line, '.*@namespace\s\+\zs.*$') let values = ["url("] elseif atrulename == 'document' let entered_atruleafter = matchstr(line, '.*@document\s\+\zs.*$') let values = ["url(", "url-prefix(", "domain(", "regexp("] elseif atrulename == 'import' let entered_atruleafter = matchstr(line, '.*@import\s\+\zs.*$') if entered_atruleafter =~ "^[\"']" let filestart = matchstr(entered_atruleafter, '^.\zs.*') let files = split(glob(filestart.'*'), '\n') let values = map(copy(files), '"\"".v:val') elseif entered_atruleafter =~ "^url(" let filestart = matchstr(entered_atruleafter, "^url([\"']\\?\\zs.*") let files = split(glob(filestart.'*'), '\n') let values = map(copy(files), '"url(".v:val') else let values = ['"', 'url('] endif else return [] endif for m in values if m =~? '^'.entered_atruleafter if entered_atruleafter =~? '^"' && m =~? '^"' let m = m[1:] endif if b:after =~? '"' && stridx(m, '"') > -1 let m = m[0:stridx(m, '"')-1] endif call add(res, m) elseif m =~? entered_atruleafter if m =~? '^"' let m = m[1:] endif call add(res2, m) endif endfor return res + res2 endif let values = ["charset", "page", "media", "import", "font-face", "namespace", "supports", "keyframes", "viewport", "document"] let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$') for m in values if m =~? '^'.entered_atrule call add(res, m .' ') elseif m =~? entered_atrule call add(res2, m .' ') endif endfor return res + res2 endif return [] endfunction neovim-0.2.2/runtime/autoload/decada.vim000066400000000000000000000056661320401574200202340ustar00rootroot00000000000000"------------------------------------------------------------------------------ " Description: Vim Ada/Dec Ada compiler file " Language: Ada (Dec Ada) " $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $ " Copyright: Copyright (C) 2006 Martin Krischik " Maintainer: Martin Krischik " $Author: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 " $Revision: 887 $ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $ " History: 21.07.2006 MK New Dec Ada " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces " Help Page: compiler-decada "------------------------------------------------------------------------------ if version < 700 finish endif function decada#Unit_Name () dict " {{{1 " Convert filename into acs unit: " 1: remove the file extenstion. " 2: replace all double '_' or '-' with an dot (which denotes a separate) " 3: remove a trailing '_' (wich denotes a specification) return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '') endfunction decada#Unit_Name " }}}1 function decada#Make () dict " {{{1 let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '') let &errorformat = g:self.Error_Format let &makeprg = l:make_prg wall make copen set wrap wincmd W endfunction decada#Build " }}}1 function decada#Set_Session (...) dict " {{{1 if a:0 > 0 call ada#Switch_Session (a:1) elseif argc() == 0 && strlen (v:servername) > 0 call ada#Switch_Session ( \ expand('~')[0:-2] . ".vimfiles.session]decada_" . \ v:servername . ".vim") endif return endfunction decada#Set_Session " }}}1 function decada#New () " }}}1 let Retval = { \ 'Make' : function ('decada#Make'), \ 'Unit_Name' : function ('decada#Unit_Name'), \ 'Set_Session' : function ('decada#Set_Session'), \ 'Project_Dir' : '', \ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<', \ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' . \ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'} return Retval endfunction decada#New " }}}1 finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker neovim-0.2.2/runtime/autoload/gnat.vim000066400000000000000000000123231320401574200177500ustar00rootroot00000000000000"------------------------------------------------------------------------------ " Description: Vim Ada/GNAT compiler file " Language: Ada (GNAT) " $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $ " Copyright: Copyright (C) 2006 Martin Krischik " Maintainer: Martin Krischi k " Ned Okie " $Author: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 " $Revision: 887 $ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $ " History: 24.05.2006 MK Unified Headers " 16.07.2006 MK Ada-Mode as vim-ball " 05.08.2006 MK Add session support " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces " 19.09.2007 NO use project file only when there is a project " Help Page: compiler-gnat "------------------------------------------------------------------------------ if version < 700 finish endif function gnat#Make () dict " {{{1 let &l:makeprg = self.Get_Command('Make') let &l:errorformat = self.Error_Format wall make copen set wrap wincmd W endfunction gnat#Make " }}}1 function gnat#Pretty () dict " {{{1 execute "!" . self.Get_Command('Pretty') endfunction gnat#Make " }}}1 function gnat#Find () dict " {{{1 execute "!" . self.Get_Command('Find') endfunction gnat#Find " }}}1 function gnat#Tags () dict " {{{1 execute "!" . self.Get_Command('Tags') edit tags call gnat#Insert_Tags_Header () update quit endfunction gnat#Tags " }}}1 function gnat#Set_Project_File (...) dict " {{{1 if a:0 > 0 let self.Project_File = a:1 if ! filereadable (self.Project_File) let self.Project_File = findfile ( \ fnamemodify (self.Project_File, ':r'), \ $ADA_PROJECT_PATH, \ 1) endif elseif strlen (self.Project_File) > 0 let self.Project_File = browse (0, 'GNAT Project File?', '', self.Project_File) elseif expand ("%:e") == 'gpr' let self.Project_File = browse (0, 'GNAT Project File?', '', expand ("%:e")) else let self.Project_File = browse (0, 'GNAT Project File?', '', 'default.gpr') endif if strlen (v:this_session) > 0 execute 'mksession! ' . v:this_session endif "if strlen (self.Project_File) > 0 "if has("vms") "call ada#Switch_Session ( "\ expand('~')[0:-2] . ".vimfiles.session]gnat_" . "\ fnamemodify (self.Project_File, ":t:r") . ".vim") "else "call ada#Switch_Session ( "\ expand('~') . "/vimfiles/session/gnat_" . "\ fnamemodify (self.Project_File, ":t:r") . ".vim") "endif "else "call ada#Switch_Session ('') "endif return endfunction gnat#Set_Project_File " }}}1 function gnat#Get_Command (Command) dict " {{{1 let l:Command = eval ('self.' . a:Command . '_Command') return eval (l:Command) endfunction gnat#Get_Command " }}}1 function gnat#Set_Session (...) dict " {{{1 if argc() == 1 && fnamemodify (argv(0), ':e') == 'gpr' call self.Set_Project_File (argv(0)) elseif strlen (v:servername) > 0 call self.Set_Project_File (v:servername . '.gpr') endif endfunction gnat#Set_Session " }}}1 function gnat#New () " {{{1 let l:Retval = { \ 'Make' : function ('gnat#Make'), \ 'Pretty' : function ('gnat#Pretty'), \ 'Find' : function ('gnat#Find'), \ 'Tags' : function ('gnat#Tags'), \ 'Set_Project_File' : function ('gnat#Set_Project_File'), \ 'Set_Session' : function ('gnat#Set_Session'), \ 'Get_Command' : function ('gnat#Get_Command'), \ 'Project_File' : '', \ 'Make_Command' : '"gnat make -P " . self.Project_File . " -F -gnatef "', \ 'Pretty_Command' : '"gnat pretty -P " . self.Project_File . " "', \ 'Find_Program' : '"gnat find -P " . self.Project_File . " -F "', \ 'Tags_Command' : '"gnat xref -P " . self.Project_File . " -v *.AD*"', \ 'Error_Format' : '%f:%l:%c: %trror: %m,' . \ '%f:%l:%c: %tarning: %m,' . \ '%f:%l:%c: (%ttyle) %m'} return l:Retval endfunction gnat#New " }}}1 function gnat#Insert_Tags_Header () " {{{1 1insert !_TAG_FILE_FORMAT 1 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR AdaCore /info@adacore.com/ !_TAG_PROGRAM_NAME gnatxref // !_TAG_PROGRAM_URL http://www.adacore.com /official site/ !_TAG_PROGRAM_VERSION 5.05w // . return endfunction gnat#Insert_Tags_Header " }}}1 finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker neovim-0.2.2/runtime/autoload/gzip.vim000066400000000000000000000144151320401574200177740ustar00rootroot00000000000000" Vim autoload file for editing compressed files. " Maintainer: Bram Moolenaar " Last Change: 2016 Sep 28 " These functions are used by the gzip plugin. " Function to check that executing "cmd [-f]" works. " The result is cached in s:have_"cmd" for speed. fun s:check(cmd) let name = substitute(a:cmd, '\(\S*\).*', '\1', '') if !exists("s:have_" . name) let e = executable(name) if e < 0 let r = system(name . " --version") let e = (r !~ "not found" && r != "") endif exe "let s:have_" . name . "=" . e endif exe "return s:have_" . name endfun " Set b:gzip_comp_arg to the gzip argument to be used for compression, based on " the flags in the compressed file. " The only compression methods that can be detected are max speed (-1) and max " compression (-9). fun s:set_compression(line) " get the Compression Method let l:cm = char2nr(a:line[2]) " if it's 8 (DEFLATE), we can check for the compression level if l:cm == 8 " get the eXtra FLags let l:xfl = char2nr(a:line[8]) " max compression if l:xfl == 2 let b:gzip_comp_arg = "-9" " min compression elseif l:xfl == 4 let b:gzip_comp_arg = "-1" endif endif endfun " After reading compressed file: Uncompress text in buffer with "cmd" fun gzip#read(cmd) " don't do anything if the cmd is not supported if !s:check(a:cmd) return endif " for gzip check current compression level and set b:gzip_comp_arg. silent! unlet b:gzip_comp_arg if a:cmd[0] == 'g' call s:set_compression(getline(1)) endif " make 'patchmode' empty, we don't want a copy of the written file let pm_save = &pm set pm= " remove 'a' and 'A' from 'cpo' to avoid the alternate file changes let cpo_save = &cpo set cpo-=a cpo-=A " set 'modifiable' let ma_save = &ma setlocal ma " set 'write' let write_save = &write set write " Reset 'foldenable', otherwise line numbers get adjusted. if has("folding") let fen_save = &fen setlocal nofen endif " when filtering the whole buffer, it will become empty let empty = line("'[") == 1 && line("']") == line("$") let tmp = tempname() let tmpe = tmp . "." . expand(":e") if exists('*fnameescape') let tmp_esc = fnameescape(tmp) let tmpe_esc = fnameescape(tmpe) else let tmp_esc = escape(tmp, ' ') let tmpe_esc = escape(tmpe, ' ') endif " write the just read lines to a temp file "'[,']w tmp.gz" execute "silent '[,']w " . tmpe_esc " uncompress the temp file: call system("gzip -dn tmp.gz") call system(a:cmd . " " . s:escape(tmpe)) if !filereadable(tmp) " uncompress didn't work! Keep the compressed file then. echoerr "Error: Could not read uncompressed file" let ok = 0 else let ok = 1 " delete the compressed lines; remember the line number let l = line("'[") - 1 if exists(":lockmarks") lockmarks '[,']d _ else '[,']d _ endif " read in the uncompressed lines "'[-1r tmp" " Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options. setlocal nobin if exists(":lockmarks") if empty execute "silent lockmarks " . l . "r ++edit " . tmp_esc else execute "silent lockmarks " . l . "r " . tmp_esc endif else execute "silent " . l . "r " . tmp_esc endif " if buffer became empty, delete trailing blank line if empty silent $delete _ 1 endif " delete the temp file and the used buffers call delete(tmp) silent! exe "bwipe " . tmp_esc silent! exe "bwipe " . tmpe_esc endif " Store the OK flag, so that we can use it when writing. let b:uncompressOk = ok " Restore saved option values. let &pm = pm_save let &cpo = cpo_save let &l:ma = ma_save let &write = write_save if has("folding") let &l:fen = fen_save endif " When uncompressed the whole buffer, do autocommands if ok && empty if exists('*fnameescape') let fname = fnameescape(expand("%:r")) else let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<") endif if &verbose >= 8 execute "doau BufReadPost " . fname else execute "silent! doau BufReadPost " . fname endif endif endfun " After writing compressed file: Compress written file with "cmd" fun gzip#write(cmd) if exists('b:uncompressOk') && !b:uncompressOk echomsg "Not compressing file because uncompress failed; reset b:uncompressOk to compress anyway" " don't do anything if the cmd is not supported elseif s:check(a:cmd) " Rename the file before compressing it. let nm = resolve(expand("")) let nmt = s:tempname(nm) if rename(nm, nmt) == 0 if exists("b:gzip_comp_arg") call system(a:cmd . " " . b:gzip_comp_arg . " -- " . s:escape(nmt)) else call system(a:cmd . " -- " . s:escape(nmt)) endif call rename(nmt . "." . expand(":e"), nm) endif endif endfun " Before appending to compressed file: Uncompress file with "cmd" fun gzip#appre(cmd) " don't do anything if the cmd is not supported if s:check(a:cmd) let nm = expand("") " for gzip check current compression level and set b:gzip_comp_arg. silent! unlet b:gzip_comp_arg if a:cmd[0] == 'g' call s:set_compression(readfile(nm, "b", 1)[0]) endif " Rename to a weird name to avoid the risk of overwriting another file let nmt = expand(":p:h") . "/X~=@l9q5" let nmte = nmt . "." . expand(":e") if rename(nm, nmte) == 0 if &patchmode != "" && getfsize(nm . &patchmode) == -1 " Create patchmode file by creating the decompressed file new call system(a:cmd . " -c -- " . s:escape(nmte) . " > " . s:escape(nmt)) call rename(nmte, nm . &patchmode) else call system(a:cmd . " -- " . s:escape(nmte)) endif call rename(nmt, nm) endif endif endfun " find a file name for the file to be compressed. Use "name" without an " extension if possible. Otherwise use a weird name to avoid overwriting an " existing file. fun s:tempname(name) let fn = fnamemodify(a:name, ":r") if !filereadable(fn) && !isdirectory(fn) return fn endif return fnamemodify(a:name, ":p:h") . "/X~=@l9q5" endfun fun s:escape(name) " shellescape() was added by patch 7.0.111 if exists("*shellescape") return shellescape(a:name) endif return "'" . a:name . "'" endfun " vim: set sw=2 : neovim-0.2.2/runtime/autoload/health.vim000066400000000000000000000125561320401574200202740ustar00rootroot00000000000000function! s:enhance_syntax() abort syntax case match syntax keyword healthError ERROR[:] \ containedin=markdownCodeBlock,mkdListItemLine highlight default link healthError Error syntax keyword healthWarning WARNING[:] \ containedin=markdownCodeBlock,mkdListItemLine highlight default link healthWarning WarningMsg syntax keyword healthSuccess OK[:] \ containedin=markdownCodeBlock,mkdListItemLine highlight default healthSuccess guibg=#5fff00 guifg=#080808 ctermbg=82 ctermfg=232 syntax match healthHelp "|.\{-}|" contains=healthBar \ containedin=markdownCodeBlock,mkdListItemLine syntax match healthBar "|" contained conceal highlight default link healthHelp Identifier " We do not care about markdown syntax errors in :checkhealth output. highlight! link markdownError Normal endfunction " Runs the specified healthchecks. " Runs all discovered healthchecks if a:plugin_names is empty. function! health#check(plugin_names) abort let healthchecks = empty(a:plugin_names) \ ? s:discover_health_checks() \ : s:to_fn_names(a:plugin_names) tabnew setlocal wrap breakindent setlocal filetype=markdown setlocal conceallevel=2 concealcursor=nc setlocal keywordprg=:help let &l:iskeyword='!-~,^*,^|,^",192-255' call s:enhance_syntax() if empty(healthchecks) call setline(1, 'ERROR: No healthchecks found.') else redraw|echo 'Running healthchecks...' for c in healthchecks let output = '' call append('$', split(printf("\n%s\n%s", c, repeat('=',72)), "\n")) try let output = "\n\n".execute('call '.c.'()') catch if v:exception =~# '^Vim\%((\a\+)\)\=:E117.*\V'.c let output = execute( \ 'call health#report_error(''No healthcheck found for "' \ .s:to_plugin_name(c) \ .'" plugin.'')') else let output = execute( \ 'call health#report_error(''Failed to run healthcheck for "' \ .s:to_plugin_name(c) \ .'" plugin. Exception:''."\n".v:throwpoint."\n".v:exception)') endif endtry call append('$', split(output, "\n") + ['']) redraw endfor endif " needed for plasticboy/vim-markdown, because it uses fdm=expr normal! zR setlocal nomodified setlocal bufhidden=hide redraw|echo '' endfunction " Starts a new report. function! health#report_start(name) abort echo "\n## " . a:name endfunction " Indents lines *except* line 1 of a string if it contains newlines. function! s:indent_after_line1(s, columns) abort let lines = split(a:s, "\n", 0) if len(lines) < 2 " We do not indent line 1, so nothing to do. return a:s endif for i in range(1, len(lines)-1) " Indent lines after the first. let lines[i] = substitute(lines[i], '^\s*', repeat(' ', a:columns), 'g') endfor return join(lines, "\n") endfunction " Changes ':h clipboard' to ':help |clipboard|'. function! s:help_to_link(s) abort return substitute(a:s, '\v:h%[elp] ([^|][^"\r\n ]+)', ':help |\1|', 'g') endfunction " Format a message for a specific report item function! s:format_report_message(status, msg, ...) abort " {{{ let output = ' - ' . a:status . ': ' . s:indent_after_line1(a:msg, 4) let advice = [] " Optional parameters if a:0 > 0 let advice = type(a:1) == type("") ? [a:1] : a:1 if type(advice) != type([]) throw "Expected String or List" endif endif " Report each suggestion if len(advice) > 0 let output .= "\n - ADVICE:" endif for suggestion in advice let output .= "\n - " . s:indent_after_line1(suggestion, 10) endfor return s:help_to_link(output) endfunction " }}} " Use {msg} to report information in the current section function! health#report_info(msg) abort " {{{ echo s:format_report_message('INFO', a:msg) endfunction " }}} " Reports a successful healthcheck. function! health#report_ok(msg) abort " {{{ echo s:format_report_message('OK', a:msg) endfunction " }}} " Reports a health warning. function! health#report_warn(msg, ...) abort " {{{ if a:0 > 0 echo s:format_report_message('WARNING', a:msg, a:1) else echo s:format_report_message('WARNING', a:msg) endif endfunction " }}} " Reports a failed healthcheck. function! health#report_error(msg, ...) abort " {{{ if a:0 > 0 echo s:format_report_message('ERROR', a:msg, a:1) else echo s:format_report_message('ERROR', a:msg) endif endfunction " }}} function! s:filepath_to_function(name) abort return substitute(substitute(substitute(a:name, '.*autoload[\/]', '', ''), \ '\.vim', '#check', ''), '[\/]', '#', 'g') endfunction function! s:discover_health_checks() abort let healthchecks = globpath(&runtimepath, 'autoload/health/*.vim', 1, 1) let healthchecks = map(healthchecks, 'filepath_to_function(v:val)') return healthchecks endfunction " Translates a list of plugin names to healthcheck function names. function! s:to_fn_names(plugin_names) abort let healthchecks = [] let plugin_names = type('') ==# type(a:plugin_names) \ ? split(a:plugin_names, '', v:false) \ : a:plugin_names for p in plugin_names call add(healthchecks, 'health#'.p.'#check') endfor return healthchecks endfunction " Extracts 'foo' from 'health#foo#check'. function! s:to_plugin_name(fn_name) abort return substitute(a:fn_name, \ '\v.*health\#(.+)\#check.*', '\1', '') endfunction neovim-0.2.2/runtime/autoload/health/000077500000000000000000000000001320401574200175465ustar00rootroot00000000000000neovim-0.2.2/runtime/autoload/health/nvim.vim000066400000000000000000000146051320401574200212420ustar00rootroot00000000000000let s:suggest_faq = 'https://github.com/neovim/neovim/wiki/FAQ' function! s:check_config() abort let ok = v:true call health#report_start('Configuration') " If $VIM is empty we don't care. Else make sure it is valid. if !empty($VIM) && !filereadable($VIM.'/runtime/doc/nvim.txt') let ok = v:false call health#report_error("$VIM is invalid: ".$VIM) endif if exists('$NVIM_TUI_ENABLE_CURSOR_SHAPE') let ok = v:false call health#report_warn("$NVIM_TUI_ENABLE_CURSOR_SHAPE is ignored in Nvim 0.2+", \ [ "Use the 'guicursor' option to configure cursor shape. :help 'guicursor'", \ 'https://github.com/neovim/neovim/wiki/Following-HEAD#20170402' ]) endif if &paste let ok = v:false call health#report_error("'paste' is enabled. This option is only for pasting text.\nIt should not be set in your config.", \ [ 'Remove `set paste` from your init.vim, if applicable.', \ 'Check `:verbose set paste?` to see if a plugin or script set the option.', ]) endif if ok call health#report_ok('no issues found') endif endfunction " Load the remote plugin manifest file and check for unregistered plugins function! s:check_rplugin_manifest() abort call health#report_start('Remote Plugins') let existing_rplugins = {} for item in remote#host#PluginsForHost('python') let existing_rplugins[item.path] = 'python' endfor for item in remote#host#PluginsForHost('python3') let existing_rplugins[item.path] = 'python3' endfor let require_update = 0 for path in map(split(&runtimepath, ','), 'resolve(v:val)') let python_glob = glob(path.'/rplugin/python*', 1, 1) if empty(python_glob) continue endif let python_dir = python_glob[0] let python_version = fnamemodify(python_dir, ':t') for script in glob(python_dir.'/*.py', 1, 1) \ + glob(python_dir.'/*/__init__.py', 1, 1) let contents = join(readfile(script)) if contents =~# '\<\%(from\|import\)\s\+neovim\>' if script =~# '[\/]__init__\.py$' let script = tr(fnamemodify(script, ':h'), '\', '/') endif if !has_key(existing_rplugins, script) let msg = printf('"%s" is not registered.', fnamemodify(path, ':t')) if python_version ==# 'pythonx' if !has('python2') && !has('python3') let msg .= ' (python2 and python3 not available)' endif elseif !has(python_version) let msg .= printf(' (%s not available)', python_version) else let require_update = 1 endif call health#report_warn(msg) endif break endif endfor endfor if require_update call health#report_warn('Out of date', ['Run `:UpdateRemotePlugins`']) else call health#report_ok('Up to date') endif endfunction function! s:check_performance() abort call health#report_start('Performance') " check buildtype let buildtype = matchstr(execute('version'), '\v\cbuild type:?\s*[^\n\r\t ]+') if empty(buildtype) call health#report_error('failed to get build type from :version') elseif buildtype =~# '\v(MinSizeRel|Release|RelWithDebInfo)' call health#report_ok(buildtype) else call health#report_info(buildtype) call health#report_warn( \ "Non-optimized build-type. Nvim will be slower.", \ ["Install a different Nvim package, or rebuild with `CMAKE_BUILD_TYPE=RelWithDebInfo`.", \ s:suggest_faq]) endif endfunction function! s:check_tmux() abort if empty($TMUX) || !executable('tmux') return endif call health#report_start('tmux') " check escape-time let suggestions = ["Set escape-time in ~/.tmux.conf:\nset-option -sg escape-time 10", \ s:suggest_faq] let cmd = 'tmux show-option -qvgs escape-time' let out = system(cmd) let tmux_esc_time = substitute(out, '\v(\s|\r|\n)', '', 'g') if v:shell_error call health#report_error('command failed: '.cmd."\n".out) elseif empty(tmux_esc_time) call health#report_error('escape-time is not set', suggestions) elseif tmux_esc_time > 300 call health#report_error( \ 'escape-time ('.tmux_esc_time.') is higher than 300ms', suggestions) else call health#report_ok('escape-time: '.tmux_esc_time.'ms') endif " check default-terminal and $TERM call health#report_info('$TERM: '.$TERM) let cmd = 'tmux show-option -qvg default-terminal' let out = system(cmd) let tmux_default_term = substitute(out, '\v(\s|\r|\n)', '', 'g') if empty(tmux_default_term) let cmd = 'tmux show-option -qvgs default-terminal' let out = system(cmd) let tmux_default_term = substitute(out, '\v(\s|\r|\n)', '', 'g') endif if v:shell_error call health#report_error('command failed: '.cmd."\n".out) elseif tmux_default_term !=# $TERM call health#report_info('default-terminal: '.tmux_default_term) call health#report_error( \ '$TERM differs from the tmux `default-terminal` setting. Colors might look wrong.', \ ['$TERM may have been set by some rc (.bashrc, .zshrc, ...).']) elseif $TERM !~# '\v(tmux-256color|screen-256color)' call health#report_error( \ '$TERM should be "screen-256color" or "tmux-256color" in tmux. Colors might look wrong.', \ ["Set default-terminal in ~/.tmux.conf:\nset-option -g default-terminal \"screen-256color\"", \ s:suggest_faq]) endif endfunction function! s:check_terminal() abort if !executable('infocmp') return endif call health#report_start('terminal') let cmd = 'infocmp -L' let out = system(cmd) let kbs_entry = matchstr(out, 'key_backspace=[^,[:space:]]*') let kdch1_entry = matchstr(out, 'key_dc=[^,[:space:]]*') if v:shell_error call health#report_error('command failed: '.cmd."\n".out) else call health#report_info('key_backspace (kbs) terminfo entry: ' \ .(empty(kbs_entry) ? '? (not found)' : kbs_entry)) call health#report_info('key_dc (kdch1) terminfo entry: ' \ .(empty(kbs_entry) ? '? (not found)' : kdch1_entry)) endif for env_var in ['XTERM_VERSION', 'VTE_VERSION', 'TERM_PROGRAM', 'COLORTERM', 'SSH_TTY'] if !exists('$'.env_var) call health#report_info(printf("$%s='%s'", env_var, eval('$'.env_var))) endif endfor endfunction function! health#nvim#check() abort call s:check_config() call s:check_performance() call s:check_rplugin_manifest() call s:check_terminal() call s:check_tmux() endfunction neovim-0.2.2/runtime/autoload/health/provider.vim000066400000000000000000000445771320401574200221360ustar00rootroot00000000000000let s:shell_error = 0 function! s:is_bad_response(s) abort return a:s =~? '\v(^unable)|(^error)|(^outdated)' endfunction function! s:trim(s) abort return substitute(a:s, '^\_s*\|\_s*$', '', 'g') endfunction " Convert '\' to '/'. Collapse '//' and '/./'. function! s:normalize_path(s) abort return substitute(substitute(a:s, '\', '/', 'g'), '/\./\|/\+', '/', 'g') endfunction " Simple version comparison. function! s:version_cmp(a, b) abort let a = split(a:a, '\.', 0) let b = split(a:b, '\.', 0) for i in range(len(a)) if str2nr(a[i]) > str2nr(b[i]) return 1 elseif str2nr(a[i]) < str2nr(b[i]) return -1 endif endfor return 0 endfunction " Handler for s:system() function. function! s:system_handler(jobid, data, event) dict abort if a:event ==# 'stdout' || a:event ==# 'stderr' let self.output .= join(a:data, '') elseif a:event ==# 'exit' let s:shell_error = a:data endif endfunction " Attempts to construct a shell command from an args list. " Only for display, to help users debug a failed command. function! s:shellify(cmd) abort if type(a:cmd) != type([]) return a:cmd endif return join(map(copy(a:cmd), \'v:val =~# ''\m[\-.a-zA-Z_/]'' ? shellescape(v:val) : v:val'), ' ') endfunction " Run a system command and timeout after 30 seconds. function! s:system(cmd, ...) abort let stdin = a:0 ? a:1 : '' let ignore_stderr = a:0 > 1 ? a:2 : 0 let ignore_error = a:0 > 2 ? a:3 : 0 let opts = { \ 'output': '', \ 'on_stdout': function('s:system_handler'), \ 'on_exit': function('s:system_handler'), \ } if !ignore_stderr let opts.on_stderr = function('s:system_handler') endif let jobid = jobstart(a:cmd, opts) if jobid < 1 call health#report_error(printf('Command error (job=%d): %s', jobid, s:shellify(a:cmd))) let s:shell_error = 1 return opts.output endif if !empty(stdin) call jobsend(jobid, stdin) endif let res = jobwait([jobid], 30000) if res[0] == -1 call health#report_error(printf('Command timed out: %s', s:shellify(a:cmd))) call jobstop(jobid) elseif s:shell_error != 0 && !ignore_error call health#report_error(printf("Command error (job=%d): %s\nOutput: %s", jobid, \ s:shellify(a:cmd), opts.output)) endif return opts.output endfunction function! s:systemlist(cmd, ...) abort let stdout = split(s:system(a:cmd, a:0 ? a:1 : ''), "\n") if a:0 > 1 && !empty(a:2) return filter(stdout, '!empty(v:val)') endif return stdout endfunction " Fetch the contents of a URL. function! s:download(url) abort if executable('curl') let rv = s:system(['curl', '-sL', a:url], '', 1, 1) return s:shell_error ? 'curl error with '.a:url.': '.s:shell_error : rv elseif executable('python') let script = " \try:\n \ from urllib.request import urlopen\n \except ImportError:\n \ from urllib2 import urlopen\n \\n \response = urlopen('".a:url."')\n \print(response.read().decode('utf8'))\n \" let rv = s:system(['python', '-c', script]) return empty(rv) && s:shell_error \ ? 'python urllib.request error: '.s:shell_error \ : rv endif return 'missing `curl` and `python`, cannot make pypi request' endfunction " Check for clipboard tools. function! s:check_clipboard() abort call health#report_start('Clipboard (optional)') let clipboard_tool = provider#clipboard#Executable() if exists('g:clipboard') && empty(clipboard_tool) call health#report_error( \ provider#clipboard#Error(), \ ["Use the example in :help g:clipboard as a template, or don't set g:clipboard at all."]) elseif empty(clipboard_tool) call health#report_warn( \ 'No clipboard tool found. Clipboard registers (`"+` and `"*`) will not work.', \ [':help clipboard']) else call health#report_ok('Clipboard tool found: '. clipboard_tool) endif endfunction " Get the latest Neovim Python client version from PyPI. function! s:latest_pypi_version() abort let pypi_version = 'unable to get pypi response' let pypi_response = s:download('https://pypi.python.org/pypi/neovim/json') if !empty(pypi_response) try let pypi_data = json_decode(pypi_response) catch /E474/ return 'error: '.pypi_response endtry let pypi_version = get(get(pypi_data, 'info', {}), 'version', 'unable to parse') endif return pypi_version endfunction " Get version information using the specified interpreter. The interpreter is " used directly in case breaking changes were introduced since the last time " Neovim's Python client was updated. " " Returns: [ " {python executable version}, " {current nvim version}, " {current pypi nvim status}, " {installed version status} " ] function! s:version_info(python) abort let pypi_version = s:latest_pypi_version() let python_version = s:trim(s:system([ \ a:python, \ '-c', \ 'import sys; print(".".join(str(x) for x in sys.version_info[:3]))', \ ])) if empty(python_version) let python_version = 'unable to parse '.a:python.' response' endif let nvim_path = s:trim(s:system([ \ a:python, '-c', 'import neovim; print(neovim.__file__)'])) if s:shell_error || empty(nvim_path) return [python_version, 'unable to load neovim Python module', pypi_version, \ nvim_path] endif " Assuming that multiple versions of a package are installed, sort them " numerically in descending order. function! s:compare(metapath1, metapath2) abort let a = matchstr(fnamemodify(a:metapath1, ':p:h:t'), '[0-9.]\+') let b = matchstr(fnamemodify(a:metapath2, ':p:h:t'), '[0-9.]\+') return a == b ? 0 : a > b ? 1 : -1 endfunction " Try to get neovim.VERSION (added in 0.1.11dev). let nvim_version = s:system([a:python, '-c', \ 'from neovim import VERSION as v; '. \ 'print("{}.{}.{}{}".format(v.major, v.minor, v.patch, v.prerelease))'], \ '', 1, 1) if empty(nvim_version) let nvim_version = 'unable to find neovim Python module version' let base = fnamemodify(nvim_path, ':h') let metas = glob(base.'-*/METADATA', 1, 1) \ + glob(base.'-*/PKG-INFO', 1, 1) \ + glob(base.'.egg-info/PKG-INFO', 1, 1) let metas = sort(metas, 's:compare') if !empty(metas) for meta_line in readfile(metas[0]) if meta_line =~# '^Version:' let nvim_version = matchstr(meta_line, '^Version: \zs\S\+') break endif endfor endif endif let nvim_path_base = fnamemodify(nvim_path, ':~:h') let version_status = 'unknown; '.nvim_path_base if !s:is_bad_response(nvim_version) && !s:is_bad_response(pypi_version) if s:version_cmp(nvim_version, pypi_version) == -1 let version_status = 'outdated; from '.nvim_path_base else let version_status = 'up to date' endif endif return [python_version, nvim_version, pypi_version, version_status] endfunction " Check the Python interpreter's usability. function! s:check_bin(bin) abort if !filereadable(a:bin) && (!has('win32') || !filereadable(a:bin.'.exe')) call health#report_error(printf('"%s" was not found.', a:bin)) return 0 elseif executable(a:bin) != 1 call health#report_error(printf('"%s" is not executable.', a:bin)) return 0 endif return 1 endfunction function! s:check_python(version) abort call health#report_start('Python ' . a:version . ' provider (optional)') let pyname = 'python'.(a:version == 2 ? '' : '3') let pyenv = resolve(exepath('pyenv')) let pyenv_root = exists('$PYENV_ROOT') ? resolve($PYENV_ROOT) : '' let venv = exists('$VIRTUAL_ENV') ? resolve($VIRTUAL_ENV) : '' let host_prog_var = pyname.'_host_prog' let loaded_var = 'g:loaded_'.pyname.'_provider' let python_bin = '' let python_multiple = [] if exists(loaded_var) && !exists('*provider#'.pyname.'#Call') call health#report_info('Disabled. '.loaded_var.'='.eval(loaded_var)) return endif if !empty(pyenv) if empty(pyenv_root) call health#report_warn( \ 'pyenv was found, but $PYENV_ROOT is not set.', \ ['Did you follow the final install instructions?', \ 'If you use a shell "framework" like Prezto or Oh My Zsh, try without.', \ 'Try a different shell (bash).'] \ ) else call health#report_ok(printf('pyenv found: "%s"', pyenv)) endif endif if exists('g:'.host_prog_var) call health#report_info(printf('Using: g:%s = "%s"', host_prog_var, get(g:, host_prog_var))) endif let [pyname, pythonx_errs] = provider#pythonx#Detect(a:version) if empty(pyname) call health#report_warn('No Python interpreter was found with the neovim ' \ . 'module. Using the first available for diagnostics.') if !empty(pythonx_errs) call health#report_warn(pythonx_errs) endif endif if !empty(pyname) if exists('g:'.host_prog_var) let python_bin = exepath(pyname) endif let pyname = fnamemodify(pyname, ':t') endif if !empty(pythonx_errs) call health#report_error('Python provider error', pythonx_errs) endif if !empty(pyname) && empty(python_bin) && empty(pythonx_errs) if !exists('g:'.host_prog_var) call health#report_info(printf('`g:%s` is not set. Searching for ' \ . '%s in the environment.', host_prog_var, pyname)) endif if !empty(pyenv) let python_bin = s:trim(s:system([pyenv, 'which', pyname], '', 1)) if empty(python_bin) call health#report_warn(printf('pyenv could not find %s.', pyname)) endif endif if empty(python_bin) let python_bin = exepath(pyname) if exists('$PATH') for path in split($PATH, has('win32') ? ';' : ':') let path_bin = s:normalize_path(path.'/'.pyname) if path_bin != s:normalize_path(python_bin) \ && index(python_multiple, path_bin) == -1 \ && executable(path_bin) call add(python_multiple, path_bin) endif endfor if len(python_multiple) " This is worth noting since the user may install something " that changes $PATH, like homebrew. call health#report_info(printf('Multiple %s executables found. ' \ . 'Set `g:%s` to avoid surprises.', pyname, host_prog_var)) endif if python_bin =~# '\' call health#report_warn(printf('`%s` appears to be a pyenv shim.', python_bin), [ \ '`pyenv` is not in $PATH, your pyenv installation is broken. ' \ .'Set `g:'.host_prog_var.'` to avoid surprises.', \ ]) endif endif endif endif if !empty(python_bin) if empty(venv) && !empty(pyenv) && !exists('g:'.host_prog_var) \ && !empty(pyenv_root) && resolve(python_bin) !~# '^'.pyenv_root.'/' call health#report_warn('pyenv is not set up optimally.', [ \ printf('Create a virtualenv specifically ' \ . 'for Neovim using pyenv, and set `g:%s`. This will avoid ' \ . 'the need to install the Neovim Python module in each ' \ . 'version/virtualenv.', host_prog_var) \ ]) elseif !empty(venv) && exists('g:'.host_prog_var) if !empty(pyenv_root) let venv_root = pyenv_root else let venv_root = fnamemodify(venv, ':h') endif if resolve(python_bin) !~# '^'.venv_root.'/' call health#report_warn('Your virtualenv is not set up optimally.', [ \ printf('Create a virtualenv specifically ' \ . 'for Neovim and use `g:%s`. This will avoid ' \ . 'the need to install Neovim''s Python module in each ' \ . 'virtualenv.', host_prog_var) \ ]) endif endif endif if empty(python_bin) && !empty(pyname) " An error message should have already printed. call health#report_error(printf('`%s` was not found.', pyname)) elseif !empty(python_bin) && !s:check_bin(python_bin) let python_bin = '' endif " Check if $VIRTUAL_ENV is active let virtualenv_inactive = 0 if exists('$VIRTUAL_ENV') if !empty(pyenv) let pyenv_prefix = resolve(s:trim(s:system([pyenv, 'prefix']))) if $VIRTUAL_ENV != pyenv_prefix let virtualenv_inactive = 1 endif elseif !empty(pyname) && exepath(pyname) !~# '^'.$VIRTUAL_ENV.'/' let virtualenv_inactive = 1 endif endif if virtualenv_inactive call health#report_warn( \ '$VIRTUAL_ENV exists but appears to be inactive. ' \ . 'This could lead to unexpected results.', \ [ 'If you are using Zsh, see: http://vi.stackexchange.com/a/7654/5229' ]) endif " Diagnostic output call health#report_info('Executable: ' . (empty(python_bin) ? 'Not found' : python_bin)) if len(python_multiple) for path_bin in python_multiple call health#report_info('Other python executable: ' . path_bin) endfor endif if !empty(python_bin) let [pyversion, current, latest, status] = s:version_info(python_bin) if a:version != str2nr(pyversion) call health#report_warn('Unexpected Python version.' . \ ' This could lead to confusing error messages.') endif if a:version == 3 && str2float(pyversion) < 3.3 call health#report_warn('Python 3.3+ is recommended.') endif call health#report_info('Python'.a:version.' version: ' . pyversion) if s:is_bad_response(status) call health#report_info(printf('%s-neovim version: %s (%s)', pyname, current, status)) else call health#report_info(printf('%s-neovim version: %s', pyname, current)) endif if s:is_bad_response(current) call health#report_error( \ "Neovim Python client is not installed.\nError: ".current, \ ['Run in shell: pip' . a:version . ' install neovim']) endif if s:is_bad_response(latest) call health#report_warn('Could not contact PyPI to get latest version.') call health#report_error('HTTP request failed: '.latest) elseif s:is_bad_response(status) call health#report_warn(printf('Latest %s-neovim is NOT installed: %s', \ pyname, latest)) elseif !s:is_bad_response(current) call health#report_ok(printf('Latest %s-neovim is installed: %s', \ pyname, latest)) endif endif endfunction function! s:check_ruby() abort call health#report_start('Ruby provider (optional)') let loaded_var = 'g:loaded_ruby_provider' if exists(loaded_var) && !exists('*provider#ruby#Call') call health#report_info('Disabled. '.loaded_var.'='.eval(loaded_var)) return endif if !executable('ruby') || !executable('gem') call health#report_warn( \ '`ruby` and `gem` must be in $PATH.', \ ['Install Ruby and verify that `ruby` and `gem` commands work.']) return endif call health#report_info('Ruby: '. s:system('ruby -v')) let host = provider#ruby#Detect() if empty(host) call health#report_warn('Missing "neovim" gem.', \ ['Run in shell: gem install neovim', \ 'Is the gem bin directory in $PATH? Check `gem environment`.', \ 'If you are using rvm/rbenv/chruby, try "rehashing".']) return endif call health#report_info('Host: '. host) let latest_gem_cmd = has('win32') ? 'cmd /c gem list -ra ^^neovim$' : 'gem list -ra ^neovim$' let latest_gem = s:system(split(latest_gem_cmd)) if s:shell_error || empty(latest_gem) call health#report_error('Failed to run: '. latest_gem_cmd, \ ["Make sure you're connected to the internet.", \ 'Are you behind a firewall or proxy?']) return endif let latest_gem = get(split(latest_gem, 'neovim (\|, \|)$' ), 1, 'not found') let current_gem_cmd = host .' --version' let current_gem = s:system(current_gem_cmd) if s:shell_error call health#report_error('Failed to run: '. current_gem_cmd, \ ['Report this issue with the output of: ', current_gem_cmd]) return endif if s:version_cmp(current_gem, latest_gem) == -1 call health#report_warn( \ printf('Gem "neovim" is out-of-date. Installed: %s, latest: %s', \ current_gem, latest_gem), \ ['Run in shell: gem update neovim']) else call health#report_ok('Latest "neovim" gem is installed: '. current_gem) endif endfunction function! s:check_node() abort call health#report_start('Node provider (optional)') let loaded_var = 'g:loaded_node_provider' if exists(loaded_var) && !exists('*provider#node#Call') call health#report_info('Disabled. '.loaded_var.'='.eval(loaded_var)) return endif if !executable('node') || !executable('npm') call health#report_warn( \ '`node` and `npm` must be in $PATH.', \ ['Install Node.js and verify that `node` and `npm` commands work.']) return endif call health#report_info('Node: '. s:system('node -v')) let host = provider#node#Detect() if empty(host) call health#report_warn('Missing "neovim" npm package.', \ ['Run in shell: npm install -g neovim', \ 'Is the npm bin directory in $PATH?']) return endif call health#report_info('Host: '. host) let latest_npm_cmd = has('win32') ? 'cmd /c npm info neovim --json' : 'npm info neovim --json' let latest_npm = s:system(split(latest_npm_cmd)) if s:shell_error || empty(latest_npm) call health#report_error('Failed to run: '. latest_npm_cmd, \ ["Make sure you're connected to the internet.", \ 'Are you behind a firewall or proxy?']) return endif if !empty(latest_npm) try let pkg_data = json_decode(latest_npm) catch /E474/ return 'error: '.latest_npm endtry let latest_npm = get(get(pkg_data, 'dist-tags', {}), 'latest', 'unable to parse') endif let current_npm_cmd = host .' --version' let current_npm = s:system(current_npm_cmd) if s:shell_error call health#report_error('Failed to run: '. current_npm_cmd, \ ['Report this issue with the output of: ', current_npm_cmd]) return endif if s:version_cmp(current_npm, latest_npm) == -1 call health#report_warn( \ printf('Package "neovim" is out-of-date. Installed: %s, latest: %s', \ current_npm, latest_npm), \ ['Run in shell: npm update neovim']) else call health#report_ok('Latest "neovim" npm is installed: '. current_npm) endif endfunction function! health#provider#check() abort call s:check_clipboard() call s:check_python(2) call s:check_python(3) call s:check_ruby() call s:check_node() endfunction neovim-0.2.2/runtime/autoload/htmlcomplete.vim000066400000000000000000000615521320401574200215240ustar00rootroot00000000000000" Vim completion script " Language: HTML and XHTML " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) " Last Change: 2014 Jun 20 " Distinguish between HTML versions. " To use with other HTML versions add another "elseif" condition to match " proper DOCTYPE. function! htmlcomplete#DetectOmniFlavor() if &filetype == 'xhtml' let b:html_omni_flavor = 'xhtml10s' else let b:html_omni_flavor = 'html401t' endif let i = 1 let line = "" while i < 10 && i < line("$") let line = getline(i) if line =~ '' let b:html_omni_flavor = 'html40' endif if line =~ '\' let b:html_omni_flavor .= 't' elseif line =~ '\' let b:html_omni_flavor .= 'f' else let b:html_omni_flavor .= 's' endif endif endif endfunction function! htmlcomplete#CompleteTags(findstart, base) if a:findstart " locate the start of the word let line = getline('.') let start = col('.') - 1 let curline = line('.') let compl_begin = col('.') - 2 while start >= 0 && line[start - 1] =~ '\(\k\|[!:.-]\)' let start -= 1 endwhile " Handling of entities {{{ if start >= 0 && line[start - 1] =~ '&' let b:entitiescompl = 1 let b:compl_context = '' return start endif " }}} " Handling of ') if style_start > 0 && style_end > 0 let buf_styles = getline(style_start + 1, style_end - 1) for a_style in buf_styles if index(style, a_style) == -1 if diff_style_start == 0 if a_style =~ '\\_s\+.*id='oneCharWidth'.*\_s\+.*id='oneInputWidth'.*\_s\+.*id='oneEmWidth'\)\?\zs/d_ $ ??,$d_ let temp = getline(1,'$') " clean out id on the main content container because we already set it on " the table let temp[0] = substitute(temp[0], " id='vimCodeElement[^']*'", "", "") " undo deletion of start and end part " so we can later save the file as valid html " TODO: restore using grabbed lines if undolevel is 1? normal! 2u if s:settings.use_css call add(html, '
') elseif s:settings.use_xhtml call add(html, '
') else call add(html, '
') endif let html += temp call add(html, '
') " Close this buffer " TODO: the comment above says we're going to allow saving the file " later...but here we discard it? quit! endfor let html[body_line_num] = body_line call add(html, '') call add(html, '') call add(html, s:body_end_line) call add(html, '') " The generated HTML is admittedly ugly and takes a LONG time to fold. " Make sure the user doesn't do syntax folding when loading a generated file, " using a modeline. call add(html, '') let i = 1 let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html") " Find an unused file name if current file name is already in use while filereadable(name) let name = substitute(name, '\d*\.x\?html$', '', '') . i . '.' . fnamemodify(copy(name), ":t:e") let i += 1 endwhile exe "topleft new " . name setlocal modifiable " just in case some user autocmd creates content in the new buffer, make sure " it is empty before proceeding %d " set the fileencoding to match the charset we'll be using let &l:fileencoding=s:settings.vim_encoding " According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte " order mark is highly recommend on the web when using multibyte encodings. But, " it is not a good idea to include it on UTF-8 files. Otherwise, let Vim " determine when it is actually inserted. if s:settings.vim_encoding == 'utf-8' setlocal nobomb else setlocal bomb endif call append(0, html) if len(style) > 0 1 let style_start = search('^')-1 " add required javascript in reverse order so we can just call append again " and again without adjusting {{{ " insert script closing tag call append(style_start, [ \ '', \ s:settings.use_xhtml ? '//]]>' : '-->', \ "" \ ]) " insert script which corrects the size of small input elements in " prevent_copy mode. See 2html.vim for details on why this is needed and how " it works. if !empty(s:settings.prevent_copy) call append(style_start, [ \ '', \ '/* simulate a "ch" unit by asking the browser how big a zero character is */', \ 'function FixCharWidth() {', \ ' /* get the hidden element which gives the width of a single character */', \ ' var goodWidth = document.getElementById("oneCharWidth").clientWidth;', \ ' /* get all input elements, we''ll filter on class later */', \ ' var inputTags = document.getElementsByTagName("input");', \ ' var ratio = 5;', \ ' var inputWidth = document.getElementById("oneInputWidth").clientWidth;', \ ' var emWidth = document.getElementById("oneEmWidth").clientWidth;', \ ' if (inputWidth > goodWidth) {', \ ' while (ratio < 100*goodWidth/emWidth && ratio < 100) {', \ ' ratio += 5;', \ ' }', \ ' document.getElementById("vimCodeElement'.s:settings.id_suffix.'").className = "em"+ratio;', \ ' }', \ '}' \ ]) endif " " insert javascript to get IDs from line numbers, and to open a fold before " jumping to any lines contained therein call append(style_start, [ \ " /* Always jump to new location even if the line was hidden inside a fold, or", \ " * we corrected the raw number to a line ID.", \ " */", \ " if (lineElem) {", \ " lineElem.scrollIntoView(true);", \ " }", \ " return true;", \ "}", \ "if ('onhashchange' in window) {", \ " window.onhashchange = JumpToLine;", \ "}" \ ]) if s:settings.dynamic_folds call append(style_start, [ \ "", \ " /* navigate upwards in the DOM tree to open all folds containing the line */", \ " var node = lineElem;", \ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')", \ " {", \ " if (node.className == 'closed-fold')", \ " {", \ " /* toggle open the fold ID (remove window ID) */", \ " toggleFold(node.id.substr(4));", \ " }", \ " node = node.parentNode;", \ " }", \ ]) endif call append(style_start, [ \ "", \ "/* function to open any folds containing a jumped-to line before jumping to it */", \ "function JumpToLine()", \ "{", \ " var lineNum;", \ " lineNum = window.location.hash;", \ " lineNum = lineNum.substr(1); /* strip off '#' */", \ "", \ " if (lineNum.indexOf('L') == -1) {", \ " lineNum = 'L'+lineNum;", \ " }", \ " if (lineNum.indexOf('W') == -1) {", \ " lineNum = 'W1'+lineNum;", \ " }", \ " lineElem = document.getElementById(lineNum);" \ ]) " Insert javascript to toggle matching folds open and closed in all windows, " if dynamic folding is active. if s:settings.dynamic_folds call append(style_start, [ \ " function toggleFold(objID)", \ " {", \ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)", \ " {", \ " var fold;", \ ' fold = document.getElementById("win"+win_num+objID);', \ " if(fold.className == 'closed-fold')", \ " {", \ " fold.className = 'open-fold';", \ " }", \ " else if (fold.className == 'open-fold')", \ " {", \ " fold.className = 'closed-fold';", \ " }", \ " }", \ " }", \ ]) endif " insert script tag; javascript is always needed for the line number " normalization for URL hashes call append(style_start, [ \ " See |mysyntaxfile-add| for installing script languages permanently. APACHE *apache.vim* *ft-apache-syntax* The apache syntax file provides syntax highlighting for Apache HTTP server version 2.2.3. *asm.vim* *asmh8300.vim* *nasm.vim* *masm.vim* *asm68k* ASSEMBLY *ft-asm-syntax* *ft-asmh8300-syntax* *ft-nasm-syntax* *ft-masm-syntax* *ft-asm68k-syntax* *fasm.vim* Files matching "*.i" could be Progress or Assembly. If the automatic detection doesn't work for you, or you don't edit Progress at all, use this in your startup vimrc: > :let filetype_i = "asm" Replace "asm" with the type of assembly you use. There are many types of assembly languages that all use the same file name extensions. Therefore you will have to select the type yourself, or add a line in the assembly file that Vim will recognize. Currently these syntax files are included: asm GNU assembly (the default) asm68k Motorola 680x0 assembly asmh8300 Hitachi H-8300 version of GNU assembly ia64 Intel Itanium 64 fasm Flat assembly (http://flatassembler.net) masm Microsoft assembly (probably works for any 80x86) nasm Netwide assembly tasm Turbo Assembly (with opcodes 80x86 up to Pentium, and MMX) pic PIC assembly (currently for PIC16F84) The most flexible is to add a line in your assembly file containing: > asmsyntax=nasm Replace "nasm" with the name of the real assembly syntax. This line must be one of the first five lines in the file. No non-white text must be immediately before or after this text. Note that specifying asmsyntax=foo is equivalent to setting ft=foo in a |modeline|, and that in case of a conflict between the two settings the one from the modeline will take precedence (in particular, if you have ft=asm in the modeline, you will get the GNU syntax highlighting regardless of what is specified as asmsyntax). The syntax type can always be overruled for a specific buffer by setting the b:asmsyntax variable: > :let b:asmsyntax = "nasm" If b:asmsyntax is not set, either automatically or by hand, then the value of the global variable asmsyntax is used. This can be seen as a default assembly language: > :let asmsyntax = "nasm" As a last resort, if nothing is defined, the "asm" syntax is used. Netwide assembler (nasm.vim) optional highlighting ~ To enable a feature: > :let {variable}=1|set syntax=nasm To disable a feature: > :unlet {variable} |set syntax=nasm Variable Highlight ~ nasm_loose_syntax unofficial parser allowed syntax not as Error (parser dependent; not recommended) nasm_ctx_outside_macro contexts outside macro not as Error nasm_no_warn potentially risky syntax not as ToDo ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax* *.asp and *.asa files could be either Perl or Visual Basic script. Since it's hard to detect this you can set two global variables to tell Vim what you are using. For Perl script use: > :let g:filetype_asa = "aspperl" :let g:filetype_asp = "aspperl" For Visual Basic use: > :let g:filetype_asa = "aspvbs" :let g:filetype_asp = "aspvbs" BAAN *baan.vim* *baan-syntax* The baan.vim gives syntax support for BaanC of release BaanIV upto SSA ERP LN for both 3 GL and 4 GL programming. Large number of standard defines/constants are supported. Some special violation of coding standards will be signalled when one specify in ones |init.vim|: > let baan_code_stds=1 *baan-folding* Syntax folding can be enabled at various levels through the variables mentioned below (Set those in your |init.vim|). The more complex folding on source blocks and SQL can be CPU intensive. To allow any folding and enable folding at function level use: > let baan_fold=1 Folding can be enabled at source block level as if, while, for ,... The indentation preceding the begin/end keywords has to match (spaces are not considered equal to a tab). > let baan_fold_block=1 Folding can be enabled for embedded SQL blocks as SELECT, SELECTDO, SELECTEMPTY, ... The indentation preceding the begin/end keywords has to match (spaces are not considered equal to a tab). > let baan_fold_sql=1 Note: Block folding can result in many small folds. It is suggested to |:set| the options 'foldminlines' and 'foldnestmax' in |init.vim| or use |:setlocal| in .../after/syntax/baan.vim (see |after-directory|). Eg: > set foldminlines=5 set foldnestmax=6 BASIC *basic.vim* *vb.vim* *ft-basic-syntax* *ft-vb-syntax* Both Visual Basic and "normal" basic use the extension ".bas". To detect which one should be used, Vim checks for the string "VB_Name" in the first five lines of the file. If it is not found, filetype will be "basic", otherwise "vb". Files with the ".frm" extension will always be seen as Visual Basic. C *c.vim* *ft-c-syntax* A few things in C highlighting are optional. To enable them assign any value to the respective variable. Example: > :let c_comment_strings = 1 To disable them use ":unlet". Example: > :unlet c_comment_strings Variable Highlight ~ *c_gnu* GNU gcc specific items *c_comment_strings* strings and numbers inside a comment *c_space_errors* trailing white space and spaces before a *c_no_trail_space_error* ... but no trailing spaces *c_no_tab_space_error* ... but no spaces before a *c_no_bracket_error* don't highlight {}; inside [] as errors *c_no_curly_error* don't highlight {}; inside [] and () as errors; except { and } in first column Default is to highlight them, otherwise you can't spot a missing ")". *c_curly_error* highlight a missing }; this forces syncing from the start of the file, can be slow *c_no_ansi* don't do standard ANSI types and constants *c_ansi_typedefs* ... but do standard ANSI types *c_ansi_constants* ... but do standard ANSI constants *c_no_utf* don't highlight \u and \U in strings *c_syntax_for_h* for *.h files use C syntax instead of C++ and use objc syntax instead of objcpp *c_no_if0* don't highlight "#if 0" blocks as comments *c_no_cformat* don't highlight %-formats in strings *c_no_c99* don't highlight C99 standard items *c_no_c11* don't highlight C11 standard items *c_no_bsd* don't highlight BSD specific types When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will become a fold. If you don't want comments to become a fold use: > :let c_no_comment_fold = 1 "#if 0" blocks are also folded, unless: > :let c_no_if0_fold = 1 If you notice highlighting errors while scrolling backwards, which are fixed when redrawing with CTRL-L, try setting the "c_minlines" internal variable to a larger number: > :let c_minlines = 100 This will make the syntax synchronization start 100 lines before the first displayed line. The default value is 50 (15 when c_no_if0 is set). The disadvantage of using a larger number is that redrawing can become slow. When using the "#if 0" / "#endif" comment highlighting, notice that this only works when the "#if 0" is within "c_minlines" from the top of the window. If you have a long "#if 0" construct it will not be highlighted correctly. To match extra items in comments, use the cCommentGroup cluster. Example: > :au Syntax c call MyCadd() :function MyCadd() : syn keyword cMyItem contained Ni : syn cluster cCommentGroup add=cMyItem : hi link cMyItem Title :endfun ANSI constants will be highlighted with the "cConstant" group. This includes "NULL", "SIG_IGN" and others. But not "TRUE", for example, because this is not in the ANSI standard. If you find this confusing, remove the cConstant highlighting: > :hi link cConstant NONE If you see '{' and '}' highlighted as an error where they are OK, reset the highlighting for cErrInParen and cErrInBracket. If you want to use folding in your C files, you can add these lines in a file in the "after" directory in 'runtimepath'. For Unix this would be ~/.config/nvim/after/syntax/c.vim. > syn sync fromstart set foldmethod=syntax CH *ch.vim* *ft-ch-syntax* C/C++ interpreter. Ch has similar syntax highlighting to C and builds upon the C syntax file. See |c.vim| for all the settings that are available for C. By setting a variable you can tell Vim to use Ch syntax for *.h files, instead of C or C++: > :let ch_syntax_for_h = 1 CHILL *chill.vim* *ft-chill-syntax* Chill syntax highlighting is similar to C. See |c.vim| for all the settings that are available. Additionally there is: chill_space_errors like c_space_errors chill_comment_string like c_comment_strings chill_minlines like c_minlines CHANGELOG *changelog.vim* *ft-changelog-syntax* ChangeLog supports highlighting spaces at the start of a line. If you do not like this, add following line to your vimrc: > let g:changelog_spacing_errors = 0 This works the next time you edit a changelog file. You can also use "b:changelog_spacing_errors" to set this per buffer (before loading the syntax file). You can change the highlighting used, e.g., to flag the spaces as an error: > :hi link ChangelogError Error Or to avoid the highlighting: > :hi link ChangelogError NONE This works immediately. CLOJURE *ft-clojure-syntax* The default syntax groups can be augmented through the *g:clojure_syntax_keywords* and *b:clojure_syntax_keywords* variables. The value should be a |Dictionary| of syntax group names to a |List| of custom identifiers: > let g:clojure_syntax_keywords = { \ 'clojureMacro': ["defproject", "defcustom"], \ 'clojureFunc': ["string/join", "string/replace"] \ } < Refer to the Clojure syntax script for valid syntax group names. If the |buffer-variable| *b:clojure_syntax_without_core_keywords* is set, only language constants and special forms are matched. Setting *g:clojure_fold* enables folding Clojure code via the syntax engine. Any list, vector, or map that extends over more than one line can be folded using the standard Vim |fold-commands|. Please note that this option does not work with scripts that redefine the bracket syntax regions, such as rainbow-parentheses plugins. This option is off by default. > " Default let g:clojure_fold = 0 < COBOL *cobol.vim* *ft-cobol-syntax* COBOL highlighting has different needs for legacy code than it does for fresh development. This is due to differences in what is being done (maintenance versus development) and other factors. To enable legacy code highlighting, add this line to your vimrc: > :let cobol_legacy_code = 1 To disable it again, use this: > :unlet cobol_legacy_code COLD FUSION *coldfusion.vim* *ft-coldfusion-syntax* The ColdFusion has its own version of HTML comments. To turn on ColdFusion comment highlighting, add the following line to your startup file: > :let html_wrong_comments = 1 The ColdFusion syntax file is based on the HTML syntax file. CPP *cpp.vim* *ft-cpp-syntax* Most of things are same as |ft-c-syntax|. Variable Highlight ~ cpp_no_cpp11 don't highlight C++11 standard items cpp_no_cpp14 don't highlight C++14 standard items CSH *csh.vim* *ft-csh-syntax* This covers the shell named "csh". Note that on some systems tcsh is actually used. Detecting whether a file is csh or tcsh is notoriously hard. Some systems symlink /bin/csh to /bin/tcsh, making it almost impossible to distinguish between csh and tcsh. In case VIM guesses wrong you can set the "filetype_csh" variable. For using csh: *g:filetype_csh* > :let g:filetype_csh = "csh" For using tcsh: > :let g:filetype_csh = "tcsh" Any script with a tcsh extension or a standard tcsh filename (.tcshrc, tcsh.tcshrc, tcsh.login) will have filetype tcsh. All other tcsh/csh scripts will be classified as tcsh, UNLESS the "filetype_csh" variable exists. If the "filetype_csh" variable exists, the filetype will be set to the value of the variable. CYNLIB *cynlib.vim* *ft-cynlib-syntax* Cynlib files are C++ files that use the Cynlib class library to enable hardware modelling and simulation using C++. Typically Cynlib files have a .cc or a .cpp extension, which makes it very difficult to distinguish them from a normal C++ file. Thus, to enable Cynlib highlighting for .cc files, add this line to your vimrc file: > :let cynlib_cyntax_for_cc=1 Similarly for cpp files (this extension is only usually used in Windows) > :let cynlib_cyntax_for_cpp=1 To disable these again, use this: > :unlet cynlib_cyntax_for_cc :unlet cynlib_cyntax_for_cpp < CWEB *cweb.vim* *ft-cweb-syntax* Files matching "*.w" could be Progress or cweb. If the automatic detection doesn't work for you, or you don't edit Progress at all, use this in your startup vimrc: > :let filetype_w = "cweb" DESKTOP *desktop.vim* *ft-desktop-syntax* Primary goal of this syntax file is to highlight .desktop and .directory files according to freedesktop.org standard: http://standards.freedesktop.org/desktop-entry-spec/latest/ But actually almost none implements this standard fully. Thus it will highlight all Unix ini files. But you can force strict highlighting according to standard by placing this in your vimrc file: > :let enforce_freedesktop_standard = 1 DIFF *diff.vim* The diff highlighting normally finds translated headers. This can be slow if there are very long lines in the file. To disable translations: > :let diff_translations = 0 Also see |diff-slow|. DIRCOLORS *dircolors.vim* *ft-dircolors-syntax* The dircolors utility highlighting definition has one option. It exists to provide compatibility with the Slackware GNU/Linux distributions version of the command. It adds a few keywords that are generally ignored by most versions. On Slackware systems, however, the utility accepts the keywords and uses them for processing. To enable the Slackware keywords add the following line to your startup file: > let dircolors_is_slackware = 1 DOCBOOK *docbk.vim* *ft-docbk-syntax* *docbook* DOCBOOK XML *docbkxml.vim* *ft-docbkxml-syntax* DOCBOOK SGML *docbksgml.vim* *ft-docbksgml-syntax* There are two types of DocBook files: SGML and XML. To specify what type you are using the "b:docbk_type" variable should be set. Vim does this for you automatically if it can recognize the type. When Vim can't guess it the type defaults to XML. You can set the type manually: > :let docbk_type = "sgml" or: > :let docbk_type = "xml" You need to do this before loading the syntax file, which is complicated. Simpler is setting the filetype to "docbkxml" or "docbksgml": > :set filetype=docbksgml or: > :set filetype=docbkxml You can specify the DocBook version: > :let docbk_ver = 3 When not set 4 is used. DOSBATCH *dosbatch.vim* *ft-dosbatch-syntax* There is one option with highlighting DOS batch files. This covers new extensions to the Command Interpreter introduced with Windows 2000 and is controlled by the variable dosbatch_cmdextversion. For Windows NT this should have the value 1, and for Windows 2000 it should be 2. Select the version you want with the following line: > :let dosbatch_cmdextversion = 1 If this variable is not defined it defaults to a value of 2 to support Windows 2000. A second option covers whether *.btm files should be detected as type "dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter is used by default. You may select the former with the following line: > :let g:dosbatch_syntax_for_btm = 1 If this variable is undefined or zero, btm syntax is selected. DOXYGEN *doxygen.vim* *doxygen-syntax* Doxygen generates code documentation using a special documentation format (similar to Javadoc). This syntax script adds doxygen highlighting to c, cpp, idl and php files, and should also work with java. There are a few of ways to turn on doxygen formatting. It can be done explicitly or in a modeline by appending '.doxygen' to the syntax of the file. Example: > :set syntax=c.doxygen or > // vim:syntax=c.doxygen It can also be done automatically for C, C++, C#, IDL and PHP files by setting the global or buffer-local variable load_doxygen_syntax. This is done by adding the following to your vimrc. > :let g:load_doxygen_syntax=1 There are a couple of variables that have an effect on syntax highlighting, and are to do with non-standard highlighting options. Variable Default Effect ~ g:doxygen_enhanced_color g:doxygen_enhanced_colour 0 Use non-standard highlighting for doxygen comments. doxygen_my_rendering 0 Disable rendering of HTML bold, italic and html_my_rendering underline. doxygen_javadoc_autobrief 1 Set to 0 to disable javadoc autobrief colour highlighting. doxygen_end_punctuation '[.]' Set to regexp match for the ending punctuation of brief There are also some hilight groups worth mentioning as they can be useful in configuration. Highlight Effect ~ doxygenErrorComment The colour of an end-comment when missing punctuation in a code, verbatim or dot section doxygenLinkError The colour of an end-comment when missing the \endlink from a \link section. DTD *dtd.vim* *ft-dtd-syntax* The DTD syntax highlighting is case sensitive by default. To disable case-sensitive highlighting, add the following line to your startup file: > :let dtd_ignore_case=1 The DTD syntax file will highlight unknown tags as errors. If this is annoying, it can be turned off by setting: > :let dtd_no_tag_errors=1 before sourcing the dtd.vim syntax file. Parameter entity names are highlighted in the definition using the 'Type' highlighting group and 'Comment' for punctuation and '%'. Parameter entity instances are highlighted using the 'Constant' highlighting group and the 'Type' highlighting group for the delimiters % and ;. This can be turned off by setting: > :let dtd_no_param_entities=1 The DTD syntax file is also included by xml.vim to highlight included dtd's. EIFFEL *eiffel.vim* *ft-eiffel-syntax* While Eiffel is not case-sensitive, its style guidelines are, and the syntax highlighting file encourages their use. This also allows to highlight class names differently. If you want to disable case-sensitive highlighting, add the following line to your startup file: > :let eiffel_ignore_case=1 Case still matters for class names and TODO marks in comments. Conversely, for even stricter checks, add one of the following lines: > :let eiffel_strict=1 :let eiffel_pedantic=1 Setting eiffel_strict will only catch improper capitalization for the five predefined words "Current", "Void", "Result", "Precursor", and "NONE", to warn against their accidental use as feature or class names. Setting eiffel_pedantic will enforce adherence to the Eiffel style guidelines fairly rigorously (like arbitrary mixes of upper- and lowercase letters as well as outdated ways to capitalize keywords). If you want to use the lower-case version of "Current", "Void", "Result", and "Precursor", you can use > :let eiffel_lower_case_predef=1 instead of completely turning case-sensitive highlighting off. Support for ISE's proposed new creation syntax that is already experimentally handled by some compilers can be enabled by: > :let eiffel_ise=1 Finally, some vendors support hexadecimal constants. To handle them, add > :let eiffel_hex_constants=1 to your startup file. EUPHORIA *euphoria3.vim* *euphoria4.vim* *ft-euphoria-syntax* Two syntax highlighting files exists for Euphoria. One for Euphoria version 3.1.1, which is the default syntax highlighting file, and one for Euphoria version 4.0.5 or later. Euphoria version 3.1.1 (http://www.rapideuphoria.com/) is still necessary for developing applications for the DOS platform, which Euphoria version 4 (http://www.openeuphoria.org/) does not support. The following file extensions are auto-detected as Euphoria file type: *.e, *.eu, *.ew, *.ex, *.exu, *.exw *.E, *.EU, *.EW, *.EX, *.EXU, *.EXW To select syntax highlighting file for Euphoria, as well as for auto-detecting the *.e and *.E file extensions as Euphoria file type, add the following line to your startup file: > :let filetype_euphoria="euphoria3" or :let filetype_euphoria="euphoria4" ERLANG *erlang.vim* *ft-erlang-syntax* Erlang is a functional programming language developed by Ericsson. Files with the following extensions are recognized as Erlang files: erl, hrl, yaws. The BIFs (built-in functions) are highlighted by default. To disable this, put the following line in your vimrc: > :let g:erlang_highlight_bifs = 0 To enable highlighting some special atoms, put this in your vimrc: > :let g:erlang_highlight_special_atoms = 1 FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax* FlexWiki is an ASP.NET-based wiki package available at http://www.flexwiki.com NOTE: this site currently doesn't work, on Wikipedia is mentioned that development stopped in 2009. Syntax highlighting is available for the most common elements of FlexWiki syntax. The associated ftplugin script sets some buffer-local options to make editing FlexWiki pages more convenient. FlexWiki considers a newline as the start of a new paragraph, so the ftplugin sets 'tw'=0 (unlimited line length), 'wrap' (wrap long lines instead of using horizontal scrolling), 'linebreak' (to wrap at a character in 'breakat' instead of at the last char on screen), and so on. It also includes some keymaps that are disabled by default. If you want to enable the keymaps that make "j" and "k" and the cursor keys move up and down by display lines, add this to your vimrc: > :let flexwiki_maps = 1 FORM *form.vim* *ft-form-syntax* The coloring scheme for syntax elements in the FORM file uses the default modes Conditional, Number, Statement, Comment, PreProc, Type, and String, following the language specifications in 'Symbolic Manipulation with FORM' by J.A.M. Vermaseren, CAN, Netherlands, 1991. If you want include your own changes to the default colors, you have to redefine the following syntax groups: - formConditional - formNumber - formStatement - formHeaderStatement - formComment - formPreProc - formDirective - formType - formString Note that the form.vim syntax file implements FORM preprocessor commands and directives per default in the same syntax group. A predefined enhanced color mode for FORM is available to distinguish between header statements and statements in the body of a FORM program. To activate this mode define the following variable in your vimrc file > :let form_enhanced_color=1 The enhanced mode also takes advantage of additional color features for a dark gvim display. Here, statements are colored LightYellow instead of Yellow, and conditionals are LightBlue for better distinction. FORTRAN *fortran.vim* *ft-fortran-syntax* Default highlighting and dialect ~ Highlighting appropriate for Fortran 2008 is used by default. This choice should be appropriate for most users most of the time because Fortran 2008 is almost a superset of previous versions (Fortran 2003, 95, 90, and 77). Fortran source code form ~ Fortran code can be in either fixed or free source form. Note that the syntax highlighting will not be correct if the form is incorrectly set. When you create a new fortran file, the syntax script assumes fixed source form. If you always use free source form, then > :let fortran_free_source=1 in your vimrc prior to the :syntax on command. If you always use fixed source form, then > :let fortran_fixed_source=1 in your vimrc prior to the :syntax on command. If the form of the source code depends, in a non-standard way, upon the file extension, then it is most convenient to set fortran_free_source in a ftplugin file. For more information on ftplugin files, see |ftplugin|. Note that this will work only if the "filetype plugin indent on" command precedes the "syntax on" command in your .vimrc file. When you edit an existing fortran file, the syntax script will assume free source form if the fortran_free_source variable has been set, and assumes fixed source form if the fortran_fixed_source variable has been set. If neither of these variables have been set, the syntax script attempts to determine which source form has been used by examining the file extension using conventions common to the ifort, gfortran, Cray, NAG, and PathScale compilers (.f, .for, .f77 for fixed-source, .f90, .f95, .f03, .f08 for free-source). If none of this works, then the script examines the first five columns of the first 500 lines of your file. If no signs of free source form are detected, then the file is assumed to be in fixed source form. The algorithm should work in the vast majority of cases. In some cases, such as a file that begins with 500 or more full-line comments, the script may incorrectly decide that the fortran code is in fixed form. If that happens, just add a non-comment statement beginning anywhere in the first five columns of the first twenty-five lines, save (:w) and then reload (:e!) the file. Tabs in fortran files ~ Tabs are not recognized by the Fortran standards. Tabs are not a good idea in fixed format fortran source code which requires fixed column boundaries. Therefore, tabs are marked as errors. Nevertheless, some programmers like using tabs. If your fortran files contain tabs, then you should set the variable fortran_have_tabs in your vimrc with a command such as > :let fortran_have_tabs=1 placed prior to the :syntax on command. Unfortunately, the use of tabs will mean that the syntax file will not be able to detect incorrect margins. Syntax folding of fortran files ~ If you wish to use foldmethod=syntax, then you must first set the variable fortran_fold with a command such as > :let fortran_fold=1 to instruct the syntax script to define fold regions for program units, that is main programs starting with a program statement, subroutines, function subprograms, block data subprograms, interface blocks, and modules. If you also set the variable fortran_fold_conditionals with a command such as > :let fortran_fold_conditionals=1 then fold regions will also be defined for do loops, if blocks, and select case constructs. If you also set the variable fortran_fold_multilinecomments with a command such as > :let fortran_fold_multilinecomments=1 then fold regions will also be defined for three or more consecutive comment lines. Note that defining fold regions can be slow for large files. If fortran_fold, and possibly fortran_fold_conditionals and/or fortran_fold_multilinecomments, have been set, then vim will fold your file if you set foldmethod=syntax. Comments or blank lines placed between two program units are not folded because they are seen as not belonging to any program unit. More precise fortran syntax ~ If you set the variable fortran_more_precise with a command such as > :let fortran_more_precise=1 then the syntax coloring will be more precise but slower. In particular, statement labels used in do, goto and arithmetic if statements will be recognized, as will construct names at the end of a do, if, select or forall construct. Non-default fortran dialects ~ The syntax script supports two Fortran dialects: f08 and F. You will probably find the default highlighting (f08) satisfactory. A few legacy constructs deleted or declared obsolescent in the 2008 standard are highlighted as todo items. If you use F, the advantage of setting the dialect appropriately is that other legacy features excluded from F will be highlighted as todo items and that free source form will be assumed. The dialect can be selected in various ways. If all your fortran files use the same dialect, set the global variable fortran_dialect in your vimrc prior to your syntax on statement. The case-sensitive, permissible values of fortran_dialect are "f08" or "F". Invalid values of fortran_dialect are ignored. If the dialect depends upon the file extension, then it is most convenient to set a buffer-local variable in a ftplugin file. For more information on ftplugin files, see |ftplugin|. For example, if all your fortran files with an .f90 extension are written in the F subset, your ftplugin file should contain the code > let s:extfname = expand("%:e") if s:extfname ==? "f90" let b:fortran_dialect="F" else unlet! b:fortran_dialect endif Note that this will work only if the "filetype plugin indent on" command precedes the "syntax on" command in your vimrc file. Finer control is necessary if the file extension does not uniquely identify the dialect. You can override the default dialect, on a file-by-file basis, by including a comment with the directive "fortran_dialect=xx" (where xx=F or f08) in one of the first three lines in your file. For example, your older .f files may be legacy code but your newer ones may be F codes, and you would identify the latter by including in the first three lines of those files a Fortran comment of the form > ! fortran_dialect=F For previous versions of the syntax, you may have set fortran_dialect to the now-obsolete values "f77", "f90", "f95", or "elf". Such settings will be silently handled as "f08". Users of "elf" may wish to experiment with "F" instead. The syntax/fortran.vim script contains embedded comments that tell you how to comment and/or uncomment some lines to (a) activate recognition of some non-standard, vendor-supplied intrinsics and (b) to prevent features deleted or declared obsolescent in the 2008 standard from being highlighted as todo items. Limitations ~ Parenthesis checking does not catch too few closing parentheses. Hollerith strings are not recognized. Some keywords may be highlighted incorrectly because Fortran90 has no reserved words. For further information related to fortran, see |ft-fortran-indent| and |ft-fortran-plugin|. FVWM CONFIGURATION FILES *fvwm.vim* *ft-fvwm-syntax* In order for Vim to recognize Fvwm configuration files that do not match the patterns *fvwmrc* or *fvwm2rc* , you must put additional patterns appropriate to your system in your myfiletypes.vim file. For these patterns, you must set the variable "b:fvwm_version" to the major version number of Fvwm, and the 'filetype' option to fvwm. For example, to make Vim identify all files in /etc/X11/fvwm2/ as Fvwm2 configuration files, add the following: > :au! BufNewFile,BufRead /etc/X11/fvwm2/* let b:fvwm_version = 2 | \ set filetype=fvwm GSP *gsp.vim* *ft-gsp-syntax* The default coloring style for GSP pages is defined by |html.vim|, and the coloring for java code (within java tags or inline between backticks) is defined by |java.vim|. The following HTML groups defined in |html.vim| are redefined to incorporate and highlight inline java code: htmlString htmlValue htmlEndTag htmlTag htmlTagN Highlighting should look fine most of the places where you'd see inline java code, but in some special cases it may not. To add another HTML group where you will have inline java code where it does not highlight correctly, just copy the line you want from |html.vim| and add gspJava to the contains clause. The backticks for inline java are highlighted according to the htmlError group to make them easier to see. GROFF *groff.vim* *ft-groff-syntax* The groff syntax file is a wrapper for |nroff.vim|, see the notes under that heading for examples of use and configuration. The purpose of this wrapper is to set up groff syntax extensions by setting the filetype from a |modeline| or in a personal filetype definitions file (see |filetype.txt|). HASKELL *haskell.vim* *lhaskell.vim* *ft-haskell-syntax* The Haskell syntax files support plain Haskell code as well as literate Haskell code, the latter in both Bird style and TeX style. The Haskell syntax highlighting will also highlight C preprocessor directives. If you want to highlight delimiter characters (useful if you have a light-coloured background), add to your vimrc: > :let hs_highlight_delimiters = 1 To treat True and False as keywords as opposed to ordinary identifiers, add: > :let hs_highlight_boolean = 1 To also treat the names of primitive types as keywords: > :let hs_highlight_types = 1 And to treat the names of even more relatively common types as keywords: > :let hs_highlight_more_types = 1 If you want to highlight the names of debugging functions, put in your vimrc: > :let hs_highlight_debug = 1 The Haskell syntax highlighting also highlights C preprocessor directives, and flags lines that start with # but are not valid directives as erroneous. This interferes with Haskell's syntax for operators, as they may start with #. If you want to highlight those as operators as opposed to errors, put in your vimrc: > :let hs_allow_hash_operator = 1 The syntax highlighting for literate Haskell code will try to automatically guess whether your literate Haskell code contains TeX markup or not, and correspondingly highlight TeX constructs or nothing at all. You can override this globally by putting in your vimrc > :let lhs_markup = none for no highlighting at all, or > :let lhs_markup = tex to force the highlighting to always try to highlight TeX markup. For more flexibility, you may also use buffer local versions of this variable, so e.g. > :let b:lhs_markup = tex will force TeX highlighting for a particular buffer. It has to be set before turning syntax highlighting on for the buffer or loading a file. HTML *html.vim* *ft-html-syntax* The coloring scheme for tags in the HTML file works as follows. The <> of opening tags are colored differently than the of a closing tag. This is on purpose! For opening tags the 'Function' color is used, while for closing tags the 'Type' color is used (See syntax.vim to check how those are defined for you) Known tag names are colored the same way as statements in C. Unknown tag names are colored with the same color as the <> or respectively which makes it easy to spot errors Note that the same is true for argument (or attribute) names. Known attribute names are colored differently than unknown ones. Some HTML tags are used to change the rendering of text. The following tags are recognized by the html.vim syntax coloring file and change the way normal text is shown: ( is used as an alias for , while as an alias for ),

-

, , and <A>, but only if used as a link (that is, it must include a href as in <A href="somefile.html">). If you want to change how such text is rendered, you must redefine the following syntax groups: - htmlBold - htmlBoldUnderline - htmlBoldUnderlineItalic - htmlUnderline - htmlUnderlineItalic - htmlItalic - htmlTitle for titles - htmlH1 - htmlH6 for headings To make this redefinition work you must redefine them all with the exception of the last two (htmlTitle and htmlH[1-6], which are optional) and define the following variable in your vimrc (this is due to the order in which the files are read during initialization) > :let html_my_rendering=1 If you'd like to see an example download mysyntax.vim at http://www.fleiner.com/vim/download.html You can also disable this rendering by adding the following line to your vimrc file: > :let html_no_rendering=1 HTML comments are rather special (see an HTML reference document for the details), and the syntax coloring scheme will highlight all errors. However, if you prefer to use the wrong style (starts with <!-- and ends with -->) you can define > :let html_wrong_comments=1 JavaScript and Visual Basic embedded inside HTML documents are highlighted as 'Special' with statements, comments, strings and so on colored as in standard programming languages. Note that only JavaScript and Visual Basic are currently supported, no other scripting language has been added yet. Embedded and inlined cascading style sheets (CSS) are highlighted too. There are several html preprocessor languages out there. html.vim has been written such that it should be trivial to include it. To do so add the following two lines to the syntax coloring file for that language (the example comes from the asp.vim file): runtime! syntax/html.vim syn cluster htmlPreproc add=asp Now you just need to make sure that you add all regions that contain the preprocessor language to the cluster htmlPreproc. HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax* The coloring scheme for HTML/OS works as follows: Functions and variable names are the same color by default, because VIM doesn't specify different colors for Functions and Identifiers. To change this (which is recommended if you want function names to be recognizable in a different color) you need to add the following line to your vimrc: > :hi Function term=underline cterm=bold ctermfg=LightGray Of course, the ctermfg can be a different color if you choose. Another issues that HTML/OS runs into is that there is no special filetype to signify that it is a file with HTML/OS coding. You can change this by opening a file and turning on HTML/OS syntax by doing the following: > :set syntax=htmlos Lastly, it should be noted that the opening and closing characters to begin a block of HTML/OS code can either be << or [[ and >> or ]], respectively. IA64 *ia64.vim* *intel-itanium* *ft-ia64-syntax* Highlighting for the Intel Itanium 64 assembly language. See |asm.vim| for how to recognize this filetype. To have *.inc files be recognized as IA64, add this to your vimrc file: > :let g:filetype_inc = "ia64" INFORM *inform.vim* *ft-inform-syntax* Inform highlighting includes symbols provided by the Inform Library, as most programs make extensive use of it. If do not wish Library symbols to be highlighted add this to your vim startup: > :let inform_highlight_simple=1 By default it is assumed that Inform programs are Z-machine targeted, and highlights Z-machine assembly language symbols appropriately. If you intend your program to be targeted to a Glulx/Glk environment you need to add this to your startup sequence: > :let inform_highlight_glulx=1 This will highlight Glulx opcodes instead, and also adds glk() to the set of highlighted system functions. The Inform compiler will flag certain obsolete keywords as errors when it encounters them. These keywords are normally highlighted as errors by Vim. To prevent such error highlighting, you must add this to your startup sequence: > :let inform_suppress_obsolete=1 By default, the language features highlighted conform to Compiler version 6.30 and Library version 6.11. If you are using an older Inform development environment, you may with to add this to your startup sequence: > :let inform_highlight_old=1 IDL *idl.vim* *idl-syntax* IDL (Interface Definition Language) files are used to define RPC calls. In Microsoft land, this is also used for defining COM interfaces and calls. IDL's structure is simple enough to permit a full grammar based approach to rather than using a few heuristics. The result is large and somewhat repetitive but seems to work. There are some Microsoft extensions to idl files that are here. Some of them are disabled by defining idl_no_ms_extensions. The more complex of the extensions are disabled by defining idl_no_extensions. Variable Effect ~ idl_no_ms_extensions Disable some of the Microsoft specific extensions idl_no_extensions Disable complex extensions idlsyntax_showerror Show IDL errors (can be rather intrusive, but quite helpful) idlsyntax_showerror_soft Use softer colours by default for errors JAVA *java.vim* *ft-java-syntax* The java.vim syntax highlighting file offers several options: In Java 1.0.2 it was never possible to have braces inside parens, so this was flagged as an error. Since Java 1.1 this is possible (with anonymous classes), and therefore is no longer marked as an error. If you prefer the old way, put the following line into your vim startup file: > :let java_mark_braces_in_parens_as_errors=1 All identifiers in java.lang.* are always visible in all classes. To highlight them use: > :let java_highlight_java_lang_ids=1 You can also highlight identifiers of most standard Java packages if you download the javaid.vim script at http://www.fleiner.com/vim/download.html. If you prefer to only highlight identifiers of a certain package, say java.io use the following: > :let java_highlight_java_io=1 Check the javaid.vim file for a list of all the packages that are supported. Function names are not highlighted, as the way to find functions depends on how you write Java code. The syntax file knows two possible ways to highlight functions: If you write function declarations that are always indented by either a tab, 8 spaces or 2 spaces you may want to set > :let java_highlight_functions="indent" However, if you follow the Java guidelines about how functions and classes are supposed to be named (with respect to upper and lowercase), use > :let java_highlight_functions="style" If both options do not work for you, but you would still want function declarations to be highlighted create your own definitions by changing the definitions in java.vim or by creating your own java.vim which includes the original one and then adds the code to highlight functions. In Java 1.1 the functions System.out.println() and System.err.println() should only be used for debugging. Therefore it is possible to highlight debugging statements differently. To do this you must add the following definition in your startup file: > :let java_highlight_debug=1 The result will be that those statements are highlighted as 'Special' characters. If you prefer to have them highlighted differently you must define new highlightings for the following groups.: Debug, DebugSpecial, DebugString, DebugBoolean, DebugType which are used for the statement itself, special characters used in debug strings, strings, boolean constants and types (this, super) respectively. I have opted to chose another background for those statements. Javadoc is a program that takes special comments out of Java program files and creates HTML pages. The standard configuration will highlight this HTML code similarly to HTML files (see |html.vim|). You can even add Javascript and CSS inside this code (see below). There are four differences however: 1. The title (all characters up to the first '.' which is followed by some white space or up to the first '@') is colored differently (to change the color change the group CommentTitle). 2. The text is colored as 'Comment'. 3. HTML comments are colored as 'Special' 4. The special Javadoc tags (@see, @param, ...) are highlighted as specials and the argument (for @see, @param, @exception) as Function. To turn this feature off add the following line to your startup file: > :let java_ignore_javadoc=1 If you use the special Javadoc comment highlighting described above you can also turn on special highlighting for Javascript, visual basic scripts and embedded CSS (stylesheets). This makes only sense if you actually have Javadoc comments that include either Javascript or embedded CSS. The options to use are > :let java_javascript=1 :let java_css=1 :let java_vb=1 In order to highlight nested parens with different colors define colors for javaParen, javaParen1 and javaParen2, for example with > :hi link javaParen Comment or > :hi javaParen ctermfg=blue guifg=#0000ff If you notice highlighting errors while scrolling backwards, which are fixed when redrawing with CTRL-L, try setting the "java_minlines" internal variable to a larger number: > :let java_minlines = 50 This will make the syntax synchronization start 50 lines before the first displayed line. The default value is 10. The disadvantage of using a larger number is that redrawing can become slow. LACE *lace.vim* *ft-lace-syntax* Lace (Language for Assembly of Classes in Eiffel) is case insensitive, but the style guide lines are not. If you prefer case insensitive highlighting, just define the vim variable 'lace_case_insensitive' in your startup file: > :let lace_case_insensitive=1 LEX *lex.vim* *ft-lex-syntax* Lex uses brute-force synchronizing as the "^%%$" section delimiter gives no clue as to what section follows. Consequently, the value for > :syn sync minlines=300 may be changed by the user if s/he is experiencing synchronization difficulties (such as may happen with large lex files). LIFELINES *lifelines.vim* *ft-lifelines-syntax* To highlight deprecated functions as errors, add in your vimrc: > :let g:lifelines_deprecated = 1 < LISP *lisp.vim* *ft-lisp-syntax* The lisp syntax highlighting provides two options: > g:lisp_instring : if it exists, then "(...)" strings are highlighted as if the contents of the string were lisp. Useful for AutoLisp. g:lisp_rainbow : if it exists and is nonzero, then differing levels of parenthesization will receive different highlighting. < The g:lisp_rainbow option provides 10 levels of individual colorization for the parentheses and backquoted parentheses. Because of the quantity of colorization levels, unlike non-rainbow highlighting, the rainbow mode specifies its highlighting using ctermfg and guifg, thereby bypassing the usual colorscheme control using standard highlighting groups. The actual highlighting used depends on the dark/bright setting (see |'bg'|). LITE *lite.vim* *ft-lite-syntax* There are two options for the lite syntax highlighting. If you like SQL syntax highlighting inside Strings, use this: > :let lite_sql_query = 1 For syncing, minlines defaults to 100. If you prefer another value, you can set "lite_minlines" to the value you desire. Example: > :let lite_minlines = 200 LPC *lpc.vim* *ft-lpc-syntax* LPC stands for a simple, memory-efficient language: Lars Pensj| C. The file name of LPC is usually *.c. Recognizing these files as LPC would bother users writing only C programs. If you want to use LPC syntax in Vim, you should set a variable in your vimrc file: > :let lpc_syntax_for_c = 1 If it doesn't work properly for some particular C or LPC files, use a modeline. For a LPC file: // vim:set ft=lpc: For a C file that is recognized as LPC: // vim:set ft=c: If you don't want to set the variable, use the modeline in EVERY LPC file. There are several implementations for LPC, we intend to support most widely used ones. Here the default LPC syntax is for MudOS series, for MudOS v22 and before, you should turn off the sensible modifiers, and this will also assert the new efuns after v22 to be invalid, don't set this variable when you are using the latest version of MudOS: > :let lpc_pre_v22 = 1 For LpMud 3.2 series of LPC: > :let lpc_compat_32 = 1 For LPC4 series of LPC: > :let lpc_use_lpc4_syntax = 1 For uLPC series of LPC: uLPC has been developed to Pike, so you should use Pike syntax instead, and the name of your source file should be *.pike LUA *lua.vim* *ft-lua-syntax* The Lua syntax file can be used for versions 4.0, 5.0, 5.1 and 5.2 (5.2 is the default). You can select one of these versions using the global variables lua_version and lua_subversion. For example, to activate Lua 5.1 syntax highlighting, set the variables like this: :let lua_version = 5 :let lua_subversion = 1 MAIL *mail.vim* *ft-mail.vim* Vim highlights all the standard elements of an email (headers, signatures, quoted text and URLs / email addresses). In keeping with standard conventions, signatures begin in a line containing only "--" followed optionally by whitespaces and end with a newline. Vim treats lines beginning with ']', '}', '|', '>' or a word followed by '>' as quoted text. However Vim highlights headers and signatures in quoted text only if the text is quoted with '>' (optionally followed by one space). By default mail.vim synchronises syntax to 100 lines before the first displayed line. If you have a slow machine, and generally deal with emails with short headers, you can change this to a smaller value: > :let mail_minlines = 30 MAKE *make.vim* *ft-make-syntax* In makefiles, commands are usually highlighted to make it easy for you to spot errors. However, this may be too much coloring for you. You can turn this feature off by using: > :let make_no_commands = 1 MAPLE *maple.vim* *ft-maple-syntax* Maple V, by Waterloo Maple Inc, supports symbolic algebra. The language supports many packages of functions which are selectively loaded by the user. The standard set of packages' functions as supplied in Maple V release 4 may be highlighted at the user's discretion. Users may place in their vimrc file: > :let mvpkg_all= 1 to get all package functions highlighted, or users may select any subset by choosing a variable/package from the table below and setting that variable to 1, also in their vimrc file (prior to sourcing $VIMRUNTIME/syntax/syntax.vim). Table of Maple V Package Function Selectors > mv_DEtools mv_genfunc mv_networks mv_process mv_Galois mv_geometry mv_numapprox mv_simplex mv_GaussInt mv_grobner mv_numtheory mv_stats mv_LREtools mv_group mv_orthopoly mv_student mv_combinat mv_inttrans mv_padic mv_sumtools mv_combstruct mv_liesymm mv_plots mv_tensor mv_difforms mv_linalg mv_plottools mv_totorder mv_finance mv_logic mv_powseries MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax* Empty *.m files will automatically be presumed to be Matlab files unless you have the following in your vimrc: > let filetype_m = "mma" MOO *moo.vim* *ft-moo-syntax* If you use C-style comments inside expressions and find it mangles your highlighting, you may want to use extended (slow!) matches for C-style comments: > :let moo_extended_cstyle_comments = 1 To disable highlighting of pronoun substitution patterns inside strings: > :let moo_no_pronoun_sub = 1 To disable highlighting of the regular expression operator '%|', and matching '%(' and '%)' inside strings: > :let moo_no_regexp = 1 Unmatched double quotes can be recognized and highlighted as errors: > :let moo_unmatched_quotes = 1 To highlight builtin properties (.name, .location, .programmer etc.): > :let moo_builtin_properties = 1 Unknown builtin functions can be recognized and highlighted as errors. If you use this option, add your own extensions to the mooKnownBuiltinFunction group. To enable this option: > :let moo_unknown_builtin_functions = 1 An example of adding sprintf() to the list of known builtin functions: > :syn keyword mooKnownBuiltinFunction sprintf contained MSQL *msql.vim* *ft-msql-syntax* There are two options for the msql syntax highlighting. If you like SQL syntax highlighting inside Strings, use this: > :let msql_sql_query = 1 For syncing, minlines defaults to 100. If you prefer another value, you can set "msql_minlines" to the value you desire. Example: > :let msql_minlines = 200 N1QL *n1ql.vim* *ft-n1ql-syntax* N1QL is a SQL-like declarative language for manipulating JSON documents in Couchbase Server databases. Vim syntax highlights N1QL statements, keywords, operators, types, comments, and special values. Vim ignores syntactical elements specific to SQL or its many dialects, like COLUMN or CHAR, that don't exist in N1QL. NCF *ncf.vim* *ft-ncf-syntax* There is one option for NCF syntax highlighting. If you want to have unrecognized (by ncf.vim) statements highlighted as errors, use this: > :let ncf_highlight_unknowns = 1 If you don't want to highlight these errors, leave it unset. NROFF *nroff.vim* *ft-nroff-syntax* The nroff syntax file works with AT&T n/troff out of the box. You need to activate the GNU groff extra features included in the syntax file before you can use them. For example, Linux and BSD distributions use groff as their default text processing package. In order to activate the extra syntax highlighting features for groff, add the following option to your start-up files: > :let b:nroff_is_groff = 1 Groff is different from the old AT&T n/troff that you may still find in Solaris. Groff macro and request names can be longer than 2 characters and there are extensions to the language primitives. For example, in AT&T troff you access the year as a 2-digit number with the request \(yr. In groff you can use the same request, recognized for compatibility, or you can use groff's native syntax, \[yr]. Furthermore, you can use a 4-digit year directly: \[year]. Macro requests can be longer than 2 characters, for example, GNU mm accepts the requests ".VERBON" and ".VERBOFF" for creating verbatim environments. In order to obtain the best formatted output g/troff can give you, you should follow a few simple rules about spacing and punctuation. 1. Do not leave empty spaces at the end of lines. 2. Leave one space and one space only after an end-of-sentence period, exclamation mark, etc. 3. For reasons stated below, it is best to follow all period marks with a carriage return. The reason behind these unusual tips is that g/n/troff have a line breaking algorithm that can be easily upset if you don't follow the rules given above. Unlike TeX, troff fills text line-by-line, not paragraph-by-paragraph and, furthermore, it does not have a concept of glue or stretch, all horizontal and vertical space input will be output as is. Therefore, you should be careful about not using more space between sentences than you intend to have in your final document. For this reason, the common practice is to insert a carriage return immediately after all punctuation marks. If you want to have "even" text in your final processed output, you need to maintain regular spacing in the input text. To mark both trailing spaces and two or more spaces after a punctuation as an error, use: > :let nroff_space_errors = 1 Another technique to detect extra spacing and other errors that will interfere with the correct typesetting of your file, is to define an eye-catching highlighting definition for the syntax groups "nroffDefinition" and "nroffDefSpecial" in your configuration files. For example: > hi def nroffDefinition term=italic cterm=italic gui=reverse hi def nroffDefSpecial term=italic,bold cterm=italic,bold \ gui=reverse,bold If you want to navigate preprocessor entries in your source file as easily as with section markers, you can activate the following option in your vimrc file: > let b:preprocs_as_sections = 1 As well, the syntax file adds an extra paragraph marker for the extended paragraph macro (.XP) in the ms package. Finally, there is a |groff.vim| syntax file that can be used for enabling groff syntax highlighting either on a file basis or globally by default. OCAML *ocaml.vim* *ft-ocaml-syntax* The OCaml syntax file handles files having the following prefixes: .ml, .mli, .mll and .mly. By setting the following variable > :let ocaml_revised = 1 you can switch from standard OCaml-syntax to revised syntax as supported by the camlp4 preprocessor. Setting the variable > :let ocaml_noend_error = 1 prevents highlighting of "end" as error, which is useful when sources contain very long structures that Vim does not synchronize anymore. PAPP *papp.vim* *ft-papp-syntax* The PApp syntax file handles .papp files and, to a lesser extend, .pxml and .pxsl files which are all a mixture of perl/xml/html/other using xml as the top-level file format. By default everything inside phtml or pxml sections is treated as a string with embedded preprocessor commands. If you set the variable: > :let papp_include_html=1 in your startup file it will try to syntax-hilight html code inside phtml sections, but this is relatively slow and much too colourful to be able to edit sensibly. ;) The newest version of the papp.vim syntax file can usually be found at http://papp.plan9.de. PASCAL *pascal.vim* *ft-pascal-syntax* Files matching "*.p" could be Progress or Pascal. If the automatic detection doesn't work for you, or you don't edit Progress at all, use this in your startup vimrc: > :let filetype_p = "pascal" The Pascal syntax file has been extended to take into account some extensions provided by Turbo Pascal, Free Pascal Compiler and GNU Pascal Compiler. Delphi keywords are also supported. By default, Turbo Pascal 7.0 features are enabled. If you prefer to stick with the standard Pascal keywords, add the following line to your startup file: > :let pascal_traditional=1 To switch on Delphi specific constructions (such as one-line comments, keywords, etc): > :let pascal_delphi=1 The option pascal_symbol_operator controls whether symbol operators such as +, *, .., etc. are displayed using the Operator color or not. To colorize symbol operators, add the following line to your startup file: > :let pascal_symbol_operator=1 Some functions are highlighted by default. To switch it off: > :let pascal_no_functions=1 Furthermore, there are specific variables for some compilers. Besides pascal_delphi, there are pascal_gpc and pascal_fpc. Default extensions try to match Turbo Pascal. > :let pascal_gpc=1 or > :let pascal_fpc=1 To ensure that strings are defined on a single line, you can define the pascal_one_line_string variable. > :let pascal_one_line_string=1 If you dislike <Tab> chars, you can set the pascal_no_tabs variable. Tabs will be highlighted as Error. > :let pascal_no_tabs=1 PERL *perl.vim* *ft-perl-syntax* There are a number of possible options to the perl syntax highlighting. Inline POD highlighting is now turned on by default. If you don't wish to have the added complexity of highlighting POD embedded within Perl files, you may set the 'perl_include_pod' option to 0: > :let perl_include_pod = 0 To reduce the complexity of parsing (and increase performance) you can switch off two elements in the parsing of variable names and contents. > To handle package references in variable and function names not differently from the rest of the name (like 'PkgName::' in '$PkgName::VarName'): > :let perl_no_scope_in_variables = 1 (In Vim 6.x it was the other way around: "perl_want_scope_in_variables" enabled it.) If you do not want complex things like '@{${"foo"}}' to be parsed: > :let perl_no_extended_vars = 1 (In Vim 6.x it was the other way around: "perl_extended_vars" enabled it.) The coloring strings can be changed. By default strings and qq friends will be highlighted like the first line. If you set the variable perl_string_as_statement, it will be highlighted as in the second line. "hello world!"; qq|hello world|; ^^^^^^^^^^^^^^NN^^^^^^^^^^^^^^^N (unlet perl_string_as_statement) S^^^^^^^^^^^^SNNSSS^^^^^^^^^^^SN (let perl_string_as_statement) (^ = perlString, S = perlStatement, N = None at all) The syncing has 3 options. The first two switch off some triggering of synchronization and should only be needed in case it fails to work properly. If while scrolling all of a sudden the whole screen changes color completely then you should try and switch off one of those. Let me know if you can figure out the line that causes the mistake. One triggers on "^\s*sub\s*" and the other on "^[$@%]" more or less. > :let perl_no_sync_on_sub :let perl_no_sync_on_global_var Below you can set the maximum distance VIM should look for starting points for its attempts in syntax highlighting. > :let perl_sync_dist = 100 If you want to use folding with perl, set perl_fold: > :let perl_fold = 1 If you want to fold blocks in if statements, etc. as well set the following: > :let perl_fold_blocks = 1 Subroutines are folded by default if 'perl_fold' is set. If you do not want this, you can set 'perl_nofold_subs': > :let perl_nofold_subs = 1 Anonymous subroutines are not folded by default; you may enable their folding via 'perl_fold_anonymous_subs': > :let perl_fold_anonymous_subs = 1 Packages are also folded by default if 'perl_fold' is set. To disable this behavior, set 'perl_nofold_packages': > :let perl_nofold_packages = 1 PHP3 and PHP4 *php.vim* *php3.vim* *ft-php-syntax* *ft-php3-syntax* [note: previously this was called "php3", but since it now also supports php4 it has been renamed to "php"] There are the following options for the php syntax highlighting. If you like SQL syntax highlighting inside Strings: > let php_sql_query = 1 For highlighting the Baselib methods: > let php_baselib = 1 Enable HTML syntax highlighting inside strings: > let php_htmlInStrings = 1 Using the old colorstyle: > let php_oldStyle = 1 Enable highlighting ASP-style short tags: > let php_asp_tags = 1 Disable short tags: > let php_noShortTags = 1 For highlighting parent error ] or ): > let php_parent_error_close = 1 For skipping a php end tag, if there exists an open ( or [ without a closing one: > let php_parent_error_open = 1 Enable folding for classes and functions: > let php_folding = 1 Selecting syncing method: > let php_sync_method = x x = -1 to sync by search (default), x > 0 to sync at least x lines backwards, x = 0 to sync from start. PLAINTEX *plaintex.vim* *ft-plaintex-syntax* TeX is a typesetting language, and plaintex is the file type for the "plain" variant of TeX. If you never want your *.tex files recognized as plain TeX, see |ft-tex-plugin|. This syntax file has the option > let g:plaintex_delimiters = 1 if you want to highlight brackets "[]" and braces "{}". PPWIZARD *ppwiz.vim* *ft-ppwiz-syntax* PPWizard is a preprocessor for HTML and OS/2 INF files This syntax file has the options: - ppwiz_highlight_defs : determines highlighting mode for PPWizard's definitions. Possible values are ppwiz_highlight_defs = 1 : PPWizard #define statements retain the colors of their contents (e.g. PPWizard macros and variables) ppwiz_highlight_defs = 2 : preprocessor #define and #evaluate statements are shown in a single color with the exception of line continuation symbols The default setting for ppwiz_highlight_defs is 1. - ppwiz_with_html : If the value is 1 (the default), highlight literal HTML code; if 0, treat HTML code like ordinary text. PHTML *phtml.vim* *ft-phtml-syntax* There are two options for the phtml syntax highlighting. If you like SQL syntax highlighting inside Strings, use this: > :let phtml_sql_query = 1 For syncing, minlines defaults to 100. If you prefer another value, you can set "phtml_minlines" to the value you desire. Example: > :let phtml_minlines = 200 POSTSCRIPT *postscr.vim* *ft-postscr-syntax* There are several options when it comes to highlighting PostScript. First which version of the PostScript language to highlight. There are currently three defined language versions, or levels. Level 1 is the original and base version, and includes all extensions prior to the release of level 2. Level 2 is the most common version around, and includes its own set of extensions prior to the release of level 3. Level 3 is currently the highest level supported. You select which level of the PostScript language you want highlighted by defining the postscr_level variable as follows: > :let postscr_level=2 If this variable is not defined it defaults to 2 (level 2) since this is the most prevalent version currently. Note, not all PS interpreters will support all language features for a particular language level. In particular the %!PS-Adobe-3.0 at the start of PS files does NOT mean the PostScript present is level 3 PostScript! If you are working with Display PostScript, you can include highlighting of Display PS language features by defining the postscr_display variable as follows: > :let postscr_display=1 If you are working with Ghostscript, you can include highlighting of Ghostscript specific language features by defining the variable postscr_ghostscript as follows: > :let postscr_ghostscript=1 PostScript is a large language, with many predefined elements. While it useful to have all these elements highlighted, on slower machines this can cause Vim to slow down. In an attempt to be machine friendly font names and character encodings are not highlighted by default. Unless you are working explicitly with either of these this should be ok. If you want them to be highlighted you should set one or both of the following variables: > :let postscr_fonts=1 :let postscr_encodings=1 There is a stylistic option to the highlighting of and, or, and not. In PostScript the function of these operators depends on the types of their operands - if the operands are booleans then they are the logical operators, if they are integers then they are binary operators. As binary and logical operators can be highlighted differently they have to be highlighted one way or the other. By default they are treated as logical operators. They can be highlighted as binary operators by defining the variable postscr_andornot_binary as follows: > :let postscr_andornot_binary=1 < *ptcap.vim* *ft-printcap-syntax* PRINTCAP + TERMCAP *ft-ptcap-syntax* *ft-termcap-syntax* This syntax file applies to the printcap and termcap databases. In order for Vim to recognize printcap/termcap files that do not match the patterns *printcap*, or *termcap*, you must put additional patterns appropriate to your system in your |myfiletypefile| file. For these patterns, you must set the variable "b:ptcap_type" to either "print" or "term", and then the 'filetype' option to ptcap. For example, to make Vim identify all files in /etc/termcaps/ as termcap files, add the following: > :au BufNewFile,BufRead /etc/termcaps/* let b:ptcap_type = "term" | \ set filetype=ptcap If you notice highlighting errors while scrolling backwards, which are fixed when redrawing with CTRL-L, try setting the "ptcap_minlines" internal variable to a larger number: > :let ptcap_minlines = 50 (The default is 20 lines.) PROGRESS *progress.vim* *ft-progress-syntax* Files matching "*.w" could be Progress or cweb. If the automatic detection doesn't work for you, or you don't edit cweb at all, use this in your startup vimrc: > :let filetype_w = "progress" The same happens for "*.i", which could be assembly, and "*.p", which could be Pascal. Use this if you don't use assembly and Pascal: > :let filetype_i = "progress" :let filetype_p = "progress" PYTHON *python.vim* *ft-python-syntax* There are six options to control Python syntax highlighting. For highlighted numbers: > :let python_no_number_highlight = 1 For highlighted builtin functions: > :let python_no_builtin_highlight = 1 For highlighted standard exceptions: > :let python_no_exception_highlight = 1 For highlighted doctests and code inside: > :let python_no_doctest_highlight = 1 or > :let python_no_doctest_code_highlight = 1 (first option implies second one). For highlighted trailing whitespace and mix of spaces and tabs: > :let python_space_error_highlight = 1 If you want all possible Python highlighting (the same as setting the preceding last option and unsetting all other ones): > :let python_highlight_all = 1 Note: only existence of these options matter, not their value. You can replace 1 above with anything. QUAKE *quake.vim* *ft-quake-syntax* The Quake syntax definition should work for most any FPS (First Person Shooter) based on one of the Quake engines. However, the command names vary a bit between the three games (Quake, Quake 2, and Quake 3 Arena) so the syntax definition checks for the existence of three global variables to allow users to specify what commands are legal in their files. The three variables can be set for the following effects: set to highlight commands only available in Quake: > :let quake_is_quake1 = 1 set to highlight commands only available in Quake 2: > :let quake_is_quake2 = 1 set to highlight commands only available in Quake 3 Arena: > :let quake_is_quake3 = 1 Any combination of these three variables is legal, but might highlight more commands than are actually available to you by the game. READLINE *readline.vim* *ft-readline-syntax* The readline library is primarily used by the BASH shell, which adds quite a few commands and options to the ones already available. To highlight these items as well you can add the following to your |vimrc| or just type it in the command line before loading a file with the readline syntax: > let readline_has_bash = 1 This will add highlighting for the commands that BASH (version 2.05a and later, and part earlier) adds. RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax* You may set what syntax definitions should be used for code blocks via > let rst_syntax_code_list = ['vim', 'lisp', ...] < REXX *rexx.vim* *ft-rexx-syntax* If you notice highlighting errors while scrolling backwards, which are fixed when redrawing with CTRL-L, try setting the "rexx_minlines" internal variable to a larger number: > :let rexx_minlines = 50 This will make the syntax synchronization start 50 lines before the first displayed line. The default value is 10. The disadvantage of using a larger number is that redrawing can become slow. Vim tries to guess what type a ".r" file is. If it can't be detected (from comment lines), the default is "r". To make the default rexx add this line to your vimrc: *g:filetype_r* > :let g:filetype_r = "r" RUBY *ruby.vim* *ft-ruby-syntax* Ruby: Operator highlighting |ruby_operators| Ruby: Whitespace errors |ruby_space_errors| Ruby: Folding |ruby_fold| |ruby_foldable_groups| Ruby: Reducing expensive operations |ruby_no_expensive| |ruby_minlines| Ruby: Spellchecking strings |ruby_spellcheck_strings| *ruby_operators* Ruby: Operator highlighting ~ Operators can be highlighted by defining "ruby_operators": > :let ruby_operators = 1 < *ruby_space_errors* Ruby: Whitespace errors ~ Whitespace errors can be highlighted by defining "ruby_space_errors": > :let ruby_space_errors = 1 < This will highlight trailing whitespace and tabs preceded by a space character as errors. This can be refined by defining "ruby_no_trail_space_error" and "ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after spaces respectively. *ruby_fold* *ruby_foldable_groups* Ruby: Folding ~ Folding can be enabled by defining "ruby_fold": > :let ruby_fold = 1 < This will set the value of 'foldmethod' to "syntax" locally to the current buffer or window, which will enable syntax-based folding when editing Ruby filetypes. Default folding is rather detailed, i.e., small syntax units like "if", "do", "%w[]" may create corresponding fold levels. You can set "ruby_foldable_groups" to restrict which groups are foldable: > :let ruby_foldable_groups = 'if case %' < The value is a space-separated list of keywords: keyword meaning ~ -------- ------------------------------------- ~ ALL Most block syntax (default) NONE Nothing if "if" or "unless" block def "def" block class "class" block module "module" block do "do" block begin "begin" block case "case" block for "for", "while", "until" loops { Curly bracket block or hash literal [ Array literal % Literal with "%" notation, e.g.: %w(STRING), %!STRING! / Regexp string String and shell command output (surrounded by ', ", `) : Symbol # Multiline comment << Here documents __END__ Source code after "__END__" directive *ruby_no_expensive* Ruby: Reducing expensive operations ~ By default, the "end" keyword is colorized according to the opening statement of the block it closes. While useful, this feature can be expensive; if you experience slow redrawing (or you are on a terminal with poor color support) you may want to turn it off by defining the "ruby_no_expensive" variable: > :let ruby_no_expensive = 1 < In this case the same color will be used for all control keywords. *ruby_minlines* If you do want this feature enabled, but notice highlighting errors while scrolling backwards, which are fixed when redrawing with CTRL-L, try setting the "ruby_minlines" variable to a value larger than 50: > :let ruby_minlines = 100 < Ideally, this value should be a number of lines large enough to embrace your largest class or module. *ruby_spellcheck_strings* Ruby: Spellchecking strings ~ Ruby syntax will perform spellchecking of strings if you define "ruby_spellcheck_strings": > :let ruby_spellcheck_strings = 1 < SCHEME *scheme.vim* *ft-scheme-syntax* By default only R5RS keywords are highlighted and properly indented. MzScheme-specific stuff will be used if b:is_mzscheme or g:is_mzscheme variables are defined. Also scheme.vim supports keywords of the Chicken Scheme->C compiler. Define b:is_chicken or g:is_chicken, if you need them. SDL *sdl.vim* *ft-sdl-syntax* The SDL highlighting probably misses a few keywords, but SDL has so many of them it's almost impossibly to cope. The new standard, SDL-2000, specifies that all identifiers are case-sensitive (which was not so before), and that all keywords can be used either completely lowercase or completely uppercase. To have the highlighting reflect this, you can set the following variable: > :let sdl_2000=1 This also sets many new keywords. If you want to disable the old keywords, which is probably a good idea, use: > :let SDL_no_96=1 The indentation is probably also incomplete, but right now I am very satisfied with it for my own projects. SED *sed.vim* *ft-sed-syntax* To make tabs stand out from regular blanks (accomplished by using Todo highlighting on the tabs), define "highlight_sedtabs" by putting > :let highlight_sedtabs = 1 in the vimrc file. (This special highlighting only applies for tabs inside search patterns, replacement texts, addresses or text included by an Append/Change/Insert command.) If you enable this option, it is also a good idea to set the tab width to one character; by doing that, you can easily count the number of tabs in a string. Bugs: The transform command (y) is treated exactly like the substitute command. This means that, as far as this syntax file is concerned, transform accepts the same flags as substitute, which is wrong. (Transform accepts no flags.) I tolerate this bug because the involved commands need very complex treatment (95 patterns, one for each plausible pattern delimiter). SGML *sgml.vim* *ft-sgml-syntax* The coloring scheme for tags in the SGML file works as follows. The <> of opening tags are colored differently than the </> of a closing tag. This is on purpose! For opening tags the 'Function' color is used, while for closing tags the 'Type' color is used (See syntax.vim to check how those are defined for you) Known tag names are colored the same way as statements in C. Unknown tag names are not colored which makes it easy to spot errors. Note that the same is true for argument (or attribute) names. Known attribute names are colored differently than unknown ones. Some SGML tags are used to change the rendering of text. The following tags are recognized by the sgml.vim syntax coloring file and change the way normal text is shown: <varname> <emphasis> <command> <function> <literal> <replaceable> <ulink> and <link>. If you want to change how such text is rendered, you must redefine the following syntax groups: - sgmlBold - sgmlBoldItalic - sgmlUnderline - sgmlItalic - sgmlLink for links To make this redefinition work you must redefine them all and define the following variable in your vimrc (this is due to the order in which the files are read during initialization) > let sgml_my_rendering=1 You can also disable this rendering by adding the following line to your vimrc file: > let sgml_no_rendering=1 (Adapted from the html.vim help text by Claudio Fleiner <claudio@fleiner.com>) *ft-posix-synax* *ft-dash-syntax* SH *sh.vim* *ft-sh-syntax* *ft-bash-syntax* *ft-ksh-syntax* This covers syntax highlighting for the older Unix (Bourne) sh, and newer shells such as bash, dash, posix, and the Korn shells. Vim attempts to determine which shell type is in use by specifying that various filenames are of specific types: > ksh : .kshrc* *.ksh bash: .bashrc* bashrc bash.bashrc .bash_profile* *.bash < If none of these cases pertain, then the first line of the file is examined (ex. looking for /bin/sh /bin/ksh /bin/bash). If the first line specifies a shelltype, then that shelltype is used. However some files (ex. .profile) are known to be shell files but the type is not apparent. Furthermore, on many systems sh is symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" (Posix). One may specify a global default by instantiating one of the following variables in your vimrc: ksh: > let g:is_kornshell = 1 < posix: (using this is the nearly the same as setting g:is_kornshell to 1) > let g:is_posix = 1 < bash: > let g:is_bash = 1 < sh: (default) Bourne shell > let g:is_sh = 1 < (dash users should use posix) If there's no "#! ..." line, and the user hasn't availed himself/herself of a default sh.vim syntax setting as just shown, then syntax/sh.vim will assume the Bourne shell syntax. No need to quote RFCs or market penetration statistics in error reports, please -- just select the default version of the sh your system uses and install the associated "let..." in your <.vimrc>. The syntax/sh.vim file provides several levels of syntax-based folding: > let g:sh_fold_enabled= 0 (default, no syntax folding) let g:sh_fold_enabled= 1 (enable function folding) let g:sh_fold_enabled= 2 (enable heredoc folding) let g:sh_fold_enabled= 4 (enable if/do/for folding) > then various syntax items (ie. HereDocuments and function bodies) become syntax-foldable (see |:syn-fold|). You also may add these together to get multiple types of folding: > let g:sh_fold_enabled= 3 (enables function and heredoc folding) If you notice highlighting errors while scrolling backwards which are fixed when one redraws with CTRL-L, try setting the "sh_minlines" internal variable to a larger number. Example: > let sh_minlines = 500 This will make syntax synchronization start 500 lines before the first displayed line. The default value is 200. The disadvantage of using a larger number is that redrawing can become slow. If you don't have much to synchronize on, displaying can be very slow. To reduce this, the "sh_maxlines" internal variable can be set. Example: > let sh_maxlines = 100 < The default is to use the twice sh_minlines. Set it to a smaller number to speed up displaying. The disadvantage is that highlight errors may appear. syntax/sh.vim tries to flag certain problems as errors; usually things like extra ']'s, 'done's, 'fi's, etc. If you find the error handling problematic for your purposes, you may suppress such error highlighting by putting the following line in your .vimrc: > let g:sh_no_error= 1 < *sh-embed* *sh-awk* Sh: EMBEDDING LANGUAGES~ You may wish to embed languages into sh. I'll give an example courtesy of Lorance Stinson on how to do this with awk as an example. Put the following file into $HOME/.config/nvim/after/syntax/sh/awkembed.vim: > " AWK Embedding: " ============== " Shamelessly ripped from aspperl.vim by Aaron Hope. if exists("b:current_syntax") unlet b:current_syntax endif syn include @AWKScript syntax/awk.vim syn region AWKScriptCode matchgroup=AWKCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@AWKScript contained syn region AWKScriptEmbedded matchgroup=AWKCommand start=+\<awk\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=AWKScriptCode syn cluster shCommandSubList add=AWKScriptEmbedded hi def link AWKCommand Type < This code will then let the awk code in the single quotes: > awk '...awk code here...' be highlighted using the awk highlighting syntax. Clearly this may be extended to other languages. SPEEDUP *spup.vim* *ft-spup-syntax* (AspenTech plant simulator) The Speedup syntax file has some options: - strict_subsections : If this variable is defined, only keywords for sections and subsections will be highlighted as statements but not other keywords (like WITHIN in the OPERATION section). - highlight_types : Definition of this variable causes stream types like temperature or pressure to be highlighted as Type, not as a plain Identifier. Included are the types that are usually found in the DECLARE section; if you defined own types, you have to include them in the syntax file. - oneline_comments : this value ranges from 1 to 3 and determines the highlighting of # style comments. oneline_comments = 1 : allow normal Speedup code after an even number of #s. oneline_comments = 2 : show code starting with the second # as error. This is the default setting. oneline_comments = 3 : show the whole line as error if it contains more than one #. Since especially OPERATION sections tend to become very large due to PRESETting variables, syncing may be critical. If your computer is fast enough, you can increase minlines and/or maxlines near the end of the syntax file. SQL *sql.vim* *ft-sql-syntax* *sqlinformix.vim* *ft-sqlinformix-syntax* *sqlanywhere.vim* *ft-sqlanywhere-syntax* While there is an ANSI standard for SQL, most database engines add their own custom extensions. Vim currently supports the Oracle and Informix dialects of SQL. Vim assumes "*.sql" files are Oracle SQL by default. Vim currently has SQL support for a variety of different vendors via syntax scripts. You can change Vim's default from Oracle to any of the current SQL supported types. You can also easily alter the SQL dialect being used on a buffer by buffer basis. For more detailed instructions see |ft_sql.txt|. TCSH *tcsh.vim* *ft-tcsh-syntax* This covers the shell named "tcsh". It is a superset of csh. See |csh.vim| for how the filetype is detected. Tcsh does not allow \" in strings unless the "backslash_quote" shell variable is set. If you want VIM to assume that no backslash quote constructs exist add this line to your vimrc: > :let tcsh_backslash_quote = 0 If you notice highlighting errors while scrolling backwards, which are fixed when redrawing with CTRL-L, try setting the "tcsh_minlines" internal variable to a larger number: > :let tcsh_minlines = 1000 This will make the syntax synchronization start 1000 lines before the first displayed line. If you set "tcsh_minlines" to "fromstart", then synchronization is done from the start of the file. The default value for tcsh_minlines is 100. The disadvantage of using a larger number is that redrawing can become slow. TEX *tex.vim* *ft-tex-syntax* *latex-syntax* Tex Contents~ Tex: Want Syntax Folding? |tex-folding| Tex: No Spell Checking Wanted |g:tex_nospell| Tex: Don't Want Spell Checking In Comments? |tex-nospell| Tex: Want Spell Checking in Verbatim Zones? |tex-verb| Tex: Run-on Comments or MathZones |tex-runon| Tex: Slow Syntax Highlighting? |tex-slow| Tex: Want To Highlight More Commands? |tex-morecommands| Tex: Excessive Error Highlighting? |tex-error| Tex: Need a new Math Group? |tex-math| Tex: Starting a New Style? |tex-style| Tex: Taking Advantage of Conceal Mode |tex-conceal| Tex: Selective Conceal Mode |g:tex_conceal| Tex: Controlling iskeyword |g:tex_isk| Tex: Fine Subscript and Superscript Control |tex-supersub| *tex-folding* *g:tex_fold_enabled* Tex: Want Syntax Folding? ~ As of version 28 of <syntax/tex.vim>, syntax-based folding of parts, chapters, sections, subsections, etc are supported. Put > let g:tex_fold_enabled=1 in your vimrc, and :set fdm=syntax. I suggest doing the latter via a modeline at the end of your LaTeX file: > % vim: fdm=syntax If your system becomes too slow, then you might wish to look into > https://vimhelp.appspot.com/vim_faq.txt.html#faq-29.7 < *g:tex_nospell* Tex: No Spell Checking Wanted~ If you don't want spell checking anywhere in your LaTeX document, put > let g:tex_nospell=1 into your vimrc. If you merely wish to suppress spell checking inside comments only, see |g:tex_comment_nospell|. *tex-nospell* *g:tex_comment_nospell* Tex: Don't Want Spell Checking In Comments? ~ Some folks like to include things like source code in comments and so would prefer that spell checking be disabled in comments in LaTeX files. To do this, put the following in your vimrc: > let g:tex_comment_nospell= 1 If you want to suppress spell checking everywhere inside your LaTeX document, see |g:tex_nospell|. *tex-verb* *g:tex_verbspell* Tex: Want Spell Checking in Verbatim Zones?~ Often verbatim regions are used for things like source code; seldom does one want source code spell-checked. However, for those of you who do want your verbatim zones spell-checked, put the following in your vimrc: > let g:tex_verbspell= 1 < *tex-runon* *tex-stopzone* Tex: Run-on Comments or MathZones ~ The <syntax/tex.vim> highlighting supports TeX, LaTeX, and some AmsTeX. The highlighting supports three primary zones/regions: normal, texZone, and texMathZone. Although considerable effort has been made to have these zones terminate properly, zones delineated by $..$ and $$..$$ cannot be synchronized as there's no difference between start and end patterns. Consequently, a special "TeX comment" has been provided > %stopzone which will forcibly terminate the highlighting of either a texZone or a texMathZone. *tex-slow* *tex-sync* Tex: Slow Syntax Highlighting? ~ If you have a slow computer, you may wish to reduce the values for > :syn sync maxlines=200 :syn sync minlines=50 (especially the latter). If your computer is fast, you may wish to increase them. This primarily affects synchronizing (i.e. just what group, if any, is the text at the top of the screen supposed to be in?). Another cause of slow highlighting is due to syntax-driven folding; see |tex-folding| for a way around this. *g:tex_fast* Finally, if syntax highlighting is still too slow, you may set > :let g:tex_fast= "" in your vimrc. Used this way, the g:tex_fast variable causes the syntax highlighting script to avoid defining any regions and associated synchronization. The result will be much faster syntax highlighting; the price: you will no longer have as much highlighting or any syntax-based folding, and you will be missing syntax-based error checking. You may decide that some syntax is acceptable; you may use the following table selectively to enable just some syntax highlighting: > b : allow bold and italic syntax c : allow texComment syntax m : allow texMatcher syntax (ie. {...} and [...]) M : allow texMath syntax p : allow parts, chapter, section, etc syntax r : allow texRefZone syntax (nocite, bibliography, label, pageref, eqref) s : allow superscript/subscript regions S : allow texStyle syntax v : allow verbatim syntax V : allow texNewEnv and texNewCmd syntax < As an example, let g:tex_fast= "M" will allow math-associated highlighting but suppress all the other region-based syntax highlighting. (also see: |g:tex_conceal| and |tex-supersub|) *tex-morecommands* *tex-package* Tex: Want To Highlight More Commands? ~ LaTeX is a programmable language, and so there are thousands of packages full of specialized LaTeX commands, syntax, and fonts. If you're using such a package you'll often wish that the distributed syntax/tex.vim would support it. However, clearly this is impractical. So please consider using the techniques in |mysyntaxfile-add| to extend or modify the highlighting provided by syntax/tex.vim. Please consider uploading any extensions that you write, which typically would go in $HOME/after/syntax/tex/[pkgname].vim, to http://vim.sf.net/. *tex-error* *g:tex_no_error* Tex: Excessive Error Highlighting? ~ The <tex.vim> supports lexical error checking of various sorts. Thus, although the error checking is ofttimes very useful, it can indicate errors where none actually are. If this proves to be a problem for you, you may put in your vimrc the following statement: > let g:tex_no_error=1 and all error checking by <syntax/tex.vim> will be suppressed. *tex-math* Tex: Need a new Math Group? ~ If you want to include a new math group in your LaTeX, the following code shows you an example as to how you might do so: > call TexNewMathZone(sfx,mathzone,starform) You'll want to provide the new math group with a unique suffix (currently, A-L and V-Z are taken by <syntax/tex.vim> itself). As an example, consider how eqnarray is set up by <syntax/tex.vim>: > call TexNewMathZone("D","eqnarray",1) You'll need to change "mathzone" to the name of your new math group, and then to the call to it in .vim/after/syntax/tex.vim. The "starform" variable, if true, implies that your new math group has a starred form (ie. eqnarray*). *tex-style* *b:tex_stylish* Tex: Starting a New Style? ~ One may use "\makeatletter" in *.tex files, thereby making the use of "@" in commands available. However, since the *.tex file doesn't have one of the following suffices: sty cls clo dtx ltx, the syntax highlighting will flag such use of @ as an error. To solve this: > :let b:tex_stylish = 1 :set ft=tex Putting "let g:tex_stylish=1" into your vimrc will make <syntax/tex.vim> always accept such use of @. *tex-cchar* *tex-cole* *tex-conceal* Tex: Taking Advantage of Conceal Mode~ If you have |'conceallevel'| set to 2 and if your encoding is utf-8, then a number of character sequences can be translated into appropriate utf-8 glyphs, including various accented characters, Greek characters in MathZones, and superscripts and subscripts in MathZones. Not all characters can be made into superscripts or subscripts; the constraint is due to what utf-8 supports. In fact, only a few characters are supported as subscripts. One way to use this is to have vertically split windows (see |CTRL-W_v|); one with |'conceallevel'| at 0 and the other at 2; and both using |'scrollbind'|. *g:tex_conceal* Tex: Selective Conceal Mode~ You may selectively use conceal mode by setting g:tex_conceal in your vimrc. By default, g:tex_conceal is set to "admgs" to enable concealment for the following sets of characters: > a = accents/ligatures b = bold and italic d = delimiters m = math symbols g = Greek s = superscripts/subscripts < By leaving one or more of these out, the associated conceal-character substitution will not be made. *g:tex_isk* *g:tex_stylish* Tex: Controlling iskeyword~ Normally, LaTeX keywords support 0-9, a-z, A-z, and 192-255 only. Latex keywords don't support the underscore - except when in *.sty files. The syntax highlighting script handles this with the following logic: * If g:tex_stylish exists and is 1 then the file will be treated as a "sty" file, so the "_" will be allowed as part of keywords (regardless of g:tex_isk) * Else if the file's suffix is sty, cls, clo, dtx, or ltx, then the file will be treated as a "sty" file, so the "_" will be allowed as part of keywords (regardless of g:tex_isk) * If g:tex_isk exists, then it will be used for the local 'iskeyword' * Else the local 'iskeyword' will be set to 48-57,a-z,A-Z,192-255 *tex-supersub* *g:tex_superscripts* *g:tex_subscripts* Tex: Fine Subscript and Superscript Control~ See |tex-conceal| for how to enable concealed character replacement. See |g:tex_conceal| for selectively concealing accents, bold/italic, math, Greek, and superscripts/subscripts. One may exert fine control over which superscripts and subscripts one wants syntax-based concealment for (see |:syn-cchar|). Since not all fonts support all characters, one may override the concealed-replacement lists; by default these lists are given by: > let g:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]" let g:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]" < For example, I use Luxi Mono Bold; it doesn't support subscript characters for "hklmnpst", so I put > let g:tex_subscripts= "[0-9aeijoruvx,+-/().]" < in ~/.config/nvim/ftplugin/tex/tex.vim in order to avoid having inscrutable utf-8 glyphs appear. TF *tf.vim* *ft-tf-syntax* There is one option for the tf syntax highlighting. For syncing, minlines defaults to 100. If you prefer another value, you can set "tf_minlines" to the value you desire. Example: > :let tf_minlines = your choice < VIM *vim.vim* *ft-vim-syntax* *g:vimsyn_minlines* *g:vimsyn_maxlines* There is a trade-off between more accurate syntax highlighting versus screen updating speed. To improve accuracy, you may wish to increase the g:vimsyn_minlines variable. The g:vimsyn_maxlines variable may be used to improve screen updating rates (see |:syn-sync| for more on this). > g:vimsyn_minlines : used to set synchronization minlines g:vimsyn_maxlines : used to set synchronization maxlines < (g:vim_minlines and g:vim_maxlines are deprecated variants of these two options) *g:vimsyn_embed* The g:vimsyn_embed option allows users to select what, if any, types of embedded script highlighting they wish to have. > g:vimsyn_embed == 0 : disable (don't embed any scripts) g:vimsyn_embed == 'lPr' : support embedded lua, python and ruby < This option is disabled by default. *g:vimsyn_folding* Some folding is now supported with syntax/vim.vim: > g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding g:vimsyn_folding =~ 'a' : augroups g:vimsyn_folding =~ 'f' : fold functions g:vimsyn_folding =~ 'P' : fold python script < *g:vimsyn_noerror* Not all error highlighting that syntax/vim.vim does may be correct; Vim script is a difficult language to highlight correctly. A way to suppress error highlighting is to put the following line in your |vimrc|: > let g:vimsyn_noerror = 1 < XF86CONFIG *xf86conf.vim* *ft-xf86conf-syntax* The syntax of XF86Config file differs in XFree86 v3.x and v4.x. Both variants are supported. Automatic detection is used, but is far from perfect. You may need to specify the version manually. Set the variable xf86conf_xfree86_version to 3 or 4 according to your XFree86 version in your vimrc. Example: > :let xf86conf_xfree86_version=3 When using a mix of versions, set the b:xf86conf_xfree86_version variable. Note that spaces and underscores in option names are not supported. Use "SyncOnGreen" instead of "__s yn con gr_e_e_n" if you want the option name highlighted. XML *xml.vim* *ft-xml-syntax* Xml namespaces are highlighted by default. This can be inhibited by setting a global variable: > :let g:xml_namespace_transparent=1 < *xml-folding* The xml syntax file provides syntax |folding| (see |:syn-fold|) between start and end tags. This can be turned on by > :let g:xml_syntax_folding = 1 :set foldmethod=syntax Note: syntax folding might slow down syntax highlighting significantly, especially for large files. X Pixmaps (XPM) *xpm.vim* *ft-xpm-syntax* xpm.vim creates its syntax items dynamically based upon the contents of the XPM file. Thus if you make changes e.g. in the color specification strings, you have to source it again e.g. with ":set syn=xpm". To copy a pixel with one of the colors, yank a "pixel" with "yl" and insert it somewhere else with "P". Do you want to draw with the mouse? Try the following: > :function! GetPixel() : let c = getline(".")[col(".") - 1] : echo c : exe "noremap <LeftMouse> <LeftMouse>r".c : exe "noremap <LeftDrag> <LeftMouse>r".c :endfunction :noremap <RightMouse> <LeftMouse>:call GetPixel()<CR> :set guicursor=n:hor20 " to see the color beneath the cursor This turns the right button into a pipette and the left button into a pen. It will work with XPM files that have one character per pixel only and you must not click outside of the pixel strings, but feel free to improve it. It will look much better with a font in a quadratic cell size, e.g. for X: > :set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-* YAML *yaml.vim* *ft-yaml-syntax* *g:yaml_schema* *b:yaml_schema* A YAML schema is a combination of a set of tags and a mechanism for resolving non-specific tags. For user this means that YAML parser may, depending on plain scalar contents, treat plain scalar (which can actually be only string and nothing else) as a value of the other type: null, boolean, floating-point, integer. `g:yaml_schema` option determines according to which schema values will be highlighted specially. Supported schemas are Schema Description ~ failsafe No additional highlighting. json Supports JSON-style numbers, booleans and null. core Supports more number, boolean and null styles. pyyaml In addition to core schema supports highlighting timestamps, but there are some differences in what is recognized as numbers and many additional boolean values not present in core schema. Default schema is `core`. Note that schemas are not actually limited to plain scalars, but this is the only difference between schemas defined in YAML specification and the only difference defined in the syntax file. ZSH *zsh.vim* *ft-zsh-syntax* The syntax script for zsh allows for syntax-based folding: > :let g:zsh_fold_enable = 1 ============================================================================== 5. Defining a syntax *:syn-define* *E410* Vim understands three types of syntax items: 1. Keyword It can only contain keyword characters, according to the 'iskeyword' option. It cannot contain other syntax items. It will only match with a complete word (there are no keyword characters before or after the match). The keyword "if" would match in "if(a=b)", but not in "ifdef x", because "(" is not a keyword character and "d" is. 2. Match This is a match with a single regexp pattern. 3. Region This starts at a match of the "start" regexp pattern and ends with a match with the "end" regexp pattern. Any other text can appear in between. A "skip" regexp pattern can be used to avoid matching the "end" pattern. Several syntax ITEMs can be put into one syntax GROUP. For a syntax group you can give highlighting attributes. For example, you could have an item to define a "/* .. */" comment and another one that defines a "// .." comment, and put them both in the "Comment" group. You can then specify that a "Comment" will be in bold font and have a blue color. You are free to make one highlight group for one syntax item, or put all items into one group. This depends on how you want to specify your highlighting attributes. Putting each item in its own group results in having to specify the highlighting for a lot of groups. Note that a syntax group and a highlight group are similar. For a highlight group you will have given highlight attributes. These attributes will be used for the syntax group with the same name. In case more than one item matches at the same position, the one that was defined LAST wins. Thus you can override previously defined syntax items by using an item that matches the same text. But a keyword always goes before a match or region. And a keyword with matching case always goes before a keyword with ignoring case. PRIORITY *:syn-priority* When several syntax items may match, these rules are used: 1. When multiple Match or Region items start in the same position, the item defined last has priority. 2. A Keyword has priority over Match and Region items. 3. An item that starts in an earlier position has priority over items that start in later positions. DEFINING CASE *:syn-case* *E390* :sy[ntax] case [match | ignore] This defines if the following ":syntax" commands will work with matching case, when using "match", or with ignoring case, when using "ignore". Note that any items before this are not affected, and all items until the next ":syntax case" command are affected. :sy[ntax] case Show either "syntax case match" or "syntax case ignore" (translated). SPELL CHECKING *:syn-spell* :sy[ntax] spell [toplevel | notoplevel | default] This defines where spell checking is to be done for text that is not in a syntax item: toplevel: Text is spell checked. notoplevel: Text is not spell checked. default: When there is a @Spell cluster no spell checking. For text in syntax items use the @Spell and @NoSpell clusters |spell-syntax|. When there is no @Spell and no @NoSpell cluster then spell checking is done for "default" and "toplevel". To activate spell checking the 'spell' option must be set. :sy[ntax] spell Show either "syntax spell toplevel", "syntax spell notoplevel" or "syntax spell default" (translated). SYNTAX ISKEYWORD SETTING *:syn-iskeyword* :sy[ntax] iskeyword [clear | {option}] This defines the keyword characters. It's like the 'iskeyword' option for but only applies to syntax highlighting. clear: Syntax specific iskeyword setting is disabled and the buffer-local 'iskeyword' setting is used. {option} Set the syntax 'iskeyword' option to a new value. Example: > :syntax iskeyword @,48-57,192-255,$,_ < This would set the syntax specific iskeyword option to include all alphabetic characters, plus the numeric characters, all accented characters and also includes the "_" and the "$". If no argument is given, the current value will be output. Setting this option influences what |/\k| matches in syntax patterns and also determines where |:syn-keyword| will be checked for a new match. It is recommended when writing syntax files, to use this command to set the correct value for the specific syntax language and not change the 'iskeyword' option. DEFINING KEYWORDS *:syn-keyword* :sy[ntax] keyword {group-name} [{options}] {keyword} .. [{options}] This defines a number of keywords. {group-name} Is a syntax group name such as "Comment". [{options}] See |:syn-arguments| below. {keyword} .. Is a list of keywords which are part of this group. Example: > :syntax keyword Type int long char < The {options} can be given anywhere in the line. They will apply to all keywords given, also for options that come after a keyword. These examples do exactly the same: > :syntax keyword Type contained int long char :syntax keyword Type int long contained char :syntax keyword Type int long char contained < *E789* *E890* When you have a keyword with an optional tail, like Ex commands in Vim, you can put the optional characters inside [], to define all the variations at once: > :syntax keyword vimCommand ab[breviate] n[ext] < Don't forget that a keyword can only be recognized if all the characters are included in the 'iskeyword' option. If one character isn't, the keyword will never be recognized. Multi-byte characters can also be used. These do not have to be in 'iskeyword'. See |:syn-iskeyword| for defining syntax specific iskeyword settings. A keyword always has higher priority than a match or region, the keyword is used if more than one item matches. Keywords do not nest and a keyword can't contain anything else. Note that when you have a keyword that is the same as an option (even one that isn't allowed here), you can not use it. Use a match instead. The maximum length of a keyword is 80 characters. The same keyword can be defined multiple times, when its containment differs. For example, you can define the keyword once not contained and use one highlight group, and once contained, and use a different highlight group. Example: > :syn keyword vimCommand tag :syn keyword vimSetting contained tag < When finding "tag" outside of any syntax item, the "vimCommand" highlight group is used. When finding "tag" in a syntax item that contains "vimSetting", the "vimSetting" group is used. DEFINING MATCHES *:syn-match* :sy[ntax] match {group-name} [{options}] [excludenl] [keepend] {pattern} [{options}] This defines one match. {group-name} A syntax group name such as "Comment". [{options}] See |:syn-arguments| below. [excludenl] Don't make a pattern with the end-of-line "$" extend a containing match or region. Must be given before the pattern. |:syn-excludenl| keepend Don't allow contained matches to go past a match with the end pattern. See |:syn-keepend|. {pattern} The search pattern that defines the match. See |:syn-pattern| below. Note that the pattern may match more than one line, which makes the match depend on where Vim starts searching for the pattern. You need to make sure syncing takes care of this. Example (match a character constant): > :syntax match Character /'.'/hs=s+1,he=e-1 < DEFINING REGIONS *:syn-region* *:syn-start* *:syn-skip* *:syn-end* *E398* *E399* :sy[ntax] region {group-name} [{options}] [matchgroup={group-name}] [keepend] [extend] [excludenl] start={start_pattern} .. [skip={skip_pattern}] end={end_pattern} .. [{options}] This defines one region. It may span several lines. {group-name} A syntax group name such as "Comment". [{options}] See |:syn-arguments| below. [matchgroup={group-name}] The syntax group to use for the following start or end pattern matches only. Not used for the text in between the matched start and end patterns. Use NONE to reset to not using a different group for the start or end match. See |:syn-matchgroup|. keepend Don't allow contained matches to go past a match with the end pattern. See |:syn-keepend|. extend Override a "keepend" for an item this region is contained in. See |:syn-extend|. excludenl Don't make a pattern with the end-of-line "$" extend a containing match or item. Only useful for end patterns. Must be given before the patterns it applies to. |:syn-excludenl| start={start_pattern} The search pattern that defines the start of the region. See |:syn-pattern| below. skip={skip_pattern} The search pattern that defines text inside the region where not to look for the end pattern. See |:syn-pattern| below. end={end_pattern} The search pattern that defines the end of the region. See |:syn-pattern| below. Example: > :syntax region String start=+"+ skip=+\\"+ end=+"+ < The start/skip/end patterns and the options can be given in any order. There can be zero or one skip pattern. There must be one or more start and end patterns. This means that you can omit the skip pattern, but you must give at least one start and one end pattern. It is allowed to have white space before and after the equal sign (although it mostly looks better without white space). When more than one start pattern is given, a match with one of these is sufficient. This means there is an OR relation between the start patterns. The last one that matches is used. The same is true for the end patterns. The search for the end pattern starts right after the start pattern. Offsets are not used for this. This implies that the match for the end pattern will never overlap with the start pattern. The skip and end pattern can match across line breaks, but since the search for the pattern can start in any line it often does not do what you want. The skip pattern doesn't avoid a match of an end pattern in the next line. Use single-line patterns to avoid trouble. Note: The decision to start a region is only based on a matching start pattern. There is no check for a matching end pattern. This does NOT work: > :syn region First start="(" end=":" :syn region Second start="(" end=";" < The Second always matches before the First (last defined pattern has higher priority). The Second region then continues until the next ';', no matter if there is a ':' before it. Using a match does work: > :syn match First "(\_.\{-}:" :syn match Second "(\_.\{-};" < This pattern matches any character or line break with "\_." and repeats that with "\{-}" (repeat as few as possible). *:syn-keepend* By default, a contained match can obscure a match for the end pattern. This is useful for nesting. For example, a region that starts with "{" and ends with "}", can contain another region. An encountered "}" will then end the contained region, but not the outer region: { starts outer "{}" region { starts contained "{}" region } ends contained "{}" region } ends outer "{} region If you don't want this, the "keepend" argument will make the matching of an end pattern of the outer region also end any contained item. This makes it impossible to nest the same region, but allows for contained items to highlight parts of the end pattern, without causing that to skip the match with the end pattern. Example: > :syn match vimComment +"[^"]\+$+ :syn region vimCommand start="set" end="$" contains=vimComment keepend < The "keepend" makes the vimCommand always end at the end of the line, even though the contained vimComment includes a match with the <EOL>. When "keepend" is not used, a match with an end pattern is retried after each contained match. When "keepend" is included, the first encountered match with an end pattern is used, truncating any contained matches. *:syn-extend* The "keepend" behavior can be changed by using the "extend" argument. When an item with "extend" is contained in an item that uses "keepend", the "keepend" is ignored and the containing region will be extended. This can be used to have some contained items extend a region while others don't. Example: > :syn region htmlRef start=+<a>+ end=+</a>+ keepend contains=htmlItem,htmlScript :syn match htmlItem +<[^>]*>+ contained :syn region htmlScript start=+<script+ end=+</script[^>]*>+ contained extend < Here the htmlItem item does not make the htmlRef item continue further, it is only used to highlight the <> items. The htmlScript item does extend the htmlRef item. Another example: > :syn region xmlFold start="<a>" end="</a>" fold transparent keepend extend < This defines a region with "keepend", so that its end cannot be changed by contained items, like when the "</a>" is matched to highlight it differently. But when the xmlFold region is nested (it includes itself), the "extend" applies, so that the "</a>" of a nested region only ends that region, and not the one it is contained in. *:syn-excludenl* When a pattern for a match or end pattern of a region includes a '$' to match the end-of-line, it will make a region item that it is contained in continue on the next line. For example, a match with "\\$" (backslash at the end of the line) can make a region continue that would normally stop at the end of the line. This is the default behavior. If this is not wanted, there are two ways to avoid it: 1. Use "keepend" for the containing item. This will keep all contained matches from extending the match or region. It can be used when all contained items must not extend the containing item. 2. Use "excludenl" in the contained item. This will keep that match from extending the containing match or region. It can be used if only some contained items must not extend the containing item. "excludenl" must be given before the pattern it applies to. *:syn-matchgroup* "matchgroup" can be used to highlight the start and/or end pattern differently than the body of the region. Example: > :syntax region String matchgroup=Quote start=+"+ skip=+\\"+ end=+"+ < This will highlight the quotes with the "Quote" group, and the text in between with the "String" group. The "matchgroup" is used for all start and end patterns that follow, until the next "matchgroup". Use "matchgroup=NONE" to go back to not using a matchgroup. In a start or end pattern that is highlighted with "matchgroup" the contained items of the region are not used. This can be used to avoid that a contained item matches in the start or end pattern match. When using "transparent", this does not apply to a start or end pattern match that is highlighted with "matchgroup". Here is an example, which highlights three levels of parentheses in different colors: > :sy region par1 matchgroup=par1 start=/(/ end=/)/ contains=par2 :sy region par2 matchgroup=par2 start=/(/ end=/)/ contains=par3 contained :sy region par3 matchgroup=par3 start=/(/ end=/)/ contains=par1 contained :hi par1 ctermfg=red guifg=red :hi par2 ctermfg=blue guifg=blue :hi par3 ctermfg=darkgreen guifg=darkgreen < *E849* The maximum number of syntax groups is 19999. ============================================================================== 6. :syntax arguments *:syn-arguments* The :syntax commands that define syntax items take a number of arguments. The common ones are explained here. The arguments may be given in any order and may be mixed with patterns. Not all commands accept all arguments. This table shows which arguments can not be used for all commands: *E395* contains oneline fold display extend concealends~ :syntax keyword - - - - - - :syntax match yes - yes yes yes - :syntax region yes yes yes yes yes yes These arguments can be used for all three commands: conceal cchar contained containedin nextgroup transparent skipwhite skipnl skipempty conceal *conceal* *:syn-conceal* When the "conceal" argument is given, the item is marked as concealable. Whether or not it is actually concealed depends on the value of the 'conceallevel' option. The 'concealcursor' option is used to decide whether concealable items in the current line are displayed unconcealed to be able to edit the line. Another way to conceal text is with |matchadd()|. concealends *:syn-concealends* When the "concealends" argument is given, the start and end matches of the region, but not the contents of the region, are marked as concealable. Whether or not they are actually concealed depends on the setting on the 'conceallevel' option. The ends of a region can only be concealed separately in this way when they have their own highlighting via "matchgroup" cchar *:syn-cchar* *E844* The "cchar" argument defines the character shown in place of the item when it is concealed (setting "cchar" only makes sense when the conceal argument is given.) If "cchar" is not set then the default conceal character defined in the 'listchars' option is used. The character cannot be a control character such as Tab. Example: > :syntax match Entity "&" conceal cchar=& See |hl-Conceal| for highlighting. contained *:syn-contained* When the "contained" argument is given, this item will not be recognized at the top level, but only when it is mentioned in the "contains" field of another match. Example: > :syntax keyword Todo TODO contained :syntax match Comment "//.*" contains=Todo display *:syn-display* If the "display" argument is given, this item will be skipped when the detected highlighting will not be displayed. This will speed up highlighting, by skipping this item when only finding the syntax state for the text that is to be displayed. Generally, you can use "display" for match and region items that meet these conditions: - The item does not continue past the end of a line. Example for C: A region for a "/*" comment can't contain "display", because it continues on the next line. - The item does not contain items that continue past the end of the line or make it continue on the next line. - The item does not change the size of any item it is contained in. Example for C: A match with "\\$" in a preprocessor match can't have "display", because it may make that preprocessor match shorter. - The item does not allow other items to match that didn't match otherwise, and that item may extend the match too far. Example for C: A match for a "//" comment can't use "display", because a "/*" inside that comment would match then and start a comment which extends past the end of the line. Examples, for the C language, where "display" can be used: - match with a number - match with a label transparent *:syn-transparent* If the "transparent" argument is given, this item will not be highlighted itself, but will take the highlighting of the item it is contained in. This is useful for syntax items that don't need any highlighting but are used only to skip over a part of the text. The "contains=" argument is also inherited from the item it is contained in, unless a "contains" argument is given for the transparent item itself. To avoid that unwanted items are contained, use "contains=NONE". Example, which highlights words in strings, but makes an exception for "vim": > :syn match myString /'[^']*'/ contains=myWord,myVim :syn match myWord /\<[a-z]*\>/ contained :syn match myVim /\<vim\>/ transparent contained contains=NONE :hi link myString String :hi link myWord Comment Since the "myVim" match comes after "myWord" it is the preferred match (last match in the same position overrules an earlier one). The "transparent" argument makes the "myVim" match use the same highlighting as "myString". But it does not contain anything. If the "contains=NONE" argument would be left out, then "myVim" would use the contains argument from myString and allow "myWord" to be contained, which will be highlighted as a Constant. This happens because a contained match doesn't match inside itself in the same position, thus the "myVim" match doesn't overrule the "myWord" match here. When you look at the colored text, it is like looking at layers of contained items. The contained item is on top of the item it is contained in, thus you see the contained item. When a contained item is transparent, you can look through, thus you see the item it is contained in. In a picture: look from here | | | | | | V V V V V V xxxx yyy more contained items .................... contained item (transparent) ============================= first item The 'x', 'y' and '=' represent a highlighted syntax item. The '.' represent a transparent group. What you see is: =======xxxx=======yyy======== Thus you look through the transparent "....". oneline *:syn-oneline* The "oneline" argument indicates that the region does not cross a line boundary. It must match completely in the current line. However, when the region has a contained item that does cross a line boundary, it continues on the next line anyway. A contained item can be used to recognize a line continuation pattern. But the "end" pattern must still match in the first line, otherwise the region doesn't even start. When the start pattern includes a "\n" to match an end-of-line, the end pattern must be found in the same line as where the start pattern ends. The end pattern may also include an end-of-line. Thus the "oneline" argument means that the end of the start pattern and the start of the end pattern must be within one line. This can't be changed by a skip pattern that matches a line break. fold *:syn-fold* The "fold" argument makes the fold level increase by one for this item. Example: > :syn region myFold start="{" end="}" transparent fold :syn sync fromstart :set foldmethod=syntax This will make each {} block form one fold. The fold will start on the line where the item starts, and end where the item ends. If the start and end are within the same line, there is no fold. The 'foldnestmax' option limits the nesting of syntax folds. {not available when Vim was compiled without |+folding| feature} *:syn-contains* *E405* *E406* *E407* *E408* *E409* contains={group-name},.. The "contains" argument is followed by a list of syntax group names. These groups will be allowed to begin inside the item (they may extend past the containing group's end). This allows for recursive nesting of matches and regions. If there is no "contains" argument, no groups will be contained in this item. The group names do not need to be defined before they can be used here. contains=ALL If the only item in the contains list is "ALL", then all groups will be accepted inside the item. contains=ALLBUT,{group-name},.. If the first item in the contains list is "ALLBUT", then all groups will be accepted inside the item, except the ones that are listed. Example: > :syntax region Block start="{" end="}" ... contains=ALLBUT,Function contains=TOP If the first item in the contains list is "TOP", then all groups will be accepted that don't have the "contained" argument. contains=TOP,{group-name},.. Like "TOP", but excluding the groups that are listed. contains=CONTAINED If the first item in the contains list is "CONTAINED", then all groups will be accepted that have the "contained" argument. contains=CONTAINED,{group-name},.. Like "CONTAINED", but excluding the groups that are listed. The {group-name} in the "contains" list can be a pattern. All group names that match the pattern will be included (or excluded, if "ALLBUT" is used). The pattern cannot contain white space or a ','. Example: > ... contains=Comment.*,Keyw[0-3] The matching will be done at moment the syntax command is executed. Groups that are defined later will not be matched. Also, if the current syntax command defines a new group, it is not matched. Be careful: When putting syntax commands in a file you can't rely on groups NOT being defined, because the file may have been sourced before, and ":syn clear" doesn't remove the group names. The contained groups will also match in the start and end patterns of a region. If this is not wanted, the "matchgroup" argument can be used |:syn-matchgroup|. The "ms=" and "me=" offsets can be used to change the region where contained items do match. Note that this may also limit the area that is highlighted containedin={group-name}... *:syn-containedin* The "containedin" argument is followed by a list of syntax group names. The item will be allowed to begin inside these groups. This works as if the containing item has a "contains=" argument that includes this item. The {group-name}... can be used just like for "contains", as explained above. This is useful when adding a syntax item afterwards. An item can be told to be included inside an already existing item, without changing the definition of that item. For example, to highlight a word in a C comment after loading the C syntax: > :syn keyword myword HELP containedin=cComment contained Note that "contained" is also used, to avoid that the item matches at the top level. Matches for "containedin" are added to the other places where the item can appear. A "contains" argument may also be added as usual. Don't forget that keywords never contain another item, thus adding them to "containedin" won't work. nextgroup={group-name},.. *:syn-nextgroup* The "nextgroup" argument is followed by a list of syntax group names, separated by commas (just like with "contains", so you can also use patterns). If the "nextgroup" argument is given, the mentioned syntax groups will be tried for a match, after the match or region ends. If none of the groups have a match, highlighting continues normally. If there is a match, this group will be used, even when it is not mentioned in the "contains" field of the current group. This is like giving the mentioned group priority over all other groups. Example: > :syntax match ccFoobar "Foo.\{-}Bar" contains=ccFoo :syntax match ccFoo "Foo" contained nextgroup=ccFiller :syntax region ccFiller start="." matchgroup=ccBar end="Bar" contained This will highlight "Foo" and "Bar" differently, and only when there is a "Bar" after "Foo". In the text line below, "f" shows where ccFoo is used for highlighting, and "bbb" where ccBar is used. > Foo asdfasd Bar asdf Foo asdf Bar asdf fff bbb fff bbb Note the use of ".\{-}" to skip as little as possible until the next Bar. when ".*" would be used, the "asdf" in between "Bar" and "Foo" would be highlighted according to the "ccFoobar" group, because the ccFooBar match would include the first "Foo" and the last "Bar" in the line (see |pattern|). skipwhite *:syn-skipwhite* skipnl *:syn-skipnl* skipempty *:syn-skipempty* These arguments are only used in combination with "nextgroup". They can be used to allow the next group to match after skipping some text: skipwhite skip over space and tab characters skipnl skip over the end of a line skipempty skip over empty lines (implies a "skipnl") When "skipwhite" is present, the white space is only skipped if there is no next group that matches the white space. When "skipnl" is present, the match with nextgroup may be found in the next line. This only happens when the current item ends at the end of the current line! When "skipnl" is not present, the nextgroup will only be found after the current item in the same line. When skipping text while looking for a next group, the matches for other groups are ignored. Only when no next group matches, other items are tried for a match again. This means that matching a next group and skipping white space and <EOL>s has a higher priority than other items. Example: > :syn match ifstart "\<if.*" nextgroup=ifline skipwhite skipempty :syn match ifline "[^ \t].*" nextgroup=ifline skipwhite skipempty contained :syn match ifline "endif" contained Note that the "[^ \t].*" match matches all non-white text. Thus it would also match "endif". Therefore the "endif" match is put last, so that it takes precedence. Note that this example doesn't work for nested "if"s. You need to add "contains" arguments to make that work (omitted for simplicity of the example). IMPLICIT CONCEAL *:syn-conceal-implicit* :sy[ntax] conceal [on|off] This defines if the following ":syntax" commands will define keywords, matches or regions with the "conceal" flag set. After ":syn conceal on", all subsequent ":syn keyword", ":syn match" or ":syn region" defined will have the "conceal" flag set implicitly. ":syn conceal off" returns to the normal state where the "conceal" flag must be given explicitly. :sy[ntax] conceal Show either "syntax conceal on" or "syntax conceal off" (translated). ============================================================================== 7. Syntax patterns *:syn-pattern* *E401* *E402* In the syntax commands, a pattern must be surrounded by two identical characters. This is like it works for the ":s" command. The most common to use is the double quote. But if the pattern contains a double quote, you can use another character that is not used in the pattern. Examples: > :syntax region Comment start="/\*" end="\*/" :syntax region String start=+"+ end=+"+ skip=+\\"+ See |pattern| for the explanation of what a pattern is. Syntax patterns are always interpreted like the 'magic' option is set, no matter what the actual value of 'magic' is. And the patterns are interpreted like the 'l' flag is not included in 'cpoptions'. This was done to make syntax files portable and independent of the 'magic' setting. Try to avoid patterns that can match an empty string, such as "[a-z]*". This slows down the highlighting a lot, because it matches everywhere. *:syn-pattern-offset* The pattern can be followed by a character offset. This can be used to change the highlighted part, and to change the text area included in the match or region (which only matters when trying to match other items). Both are relative to the matched pattern. The character offset for a skip pattern can be used to tell where to continue looking for an end pattern. The offset takes the form of "{what}={offset}" The {what} can be one of seven strings: ms Match Start offset for the start of the matched text me Match End offset for the end of the matched text hs Highlight Start offset for where the highlighting starts he Highlight End offset for where the highlighting ends rs Region Start offset for where the body of a region starts re Region End offset for where the body of a region ends lc Leading Context offset past "leading context" of pattern The {offset} can be: s start of the matched pattern s+{nr} start of the matched pattern plus {nr} chars to the right s-{nr} start of the matched pattern plus {nr} chars to the left e end of the matched pattern e+{nr} end of the matched pattern plus {nr} chars to the right e-{nr} end of the matched pattern plus {nr} chars to the left {nr} (for "lc" only): start matching {nr} chars right of the start Examples: "ms=s+1", "hs=e-2", "lc=3". Although all offsets are accepted after any pattern, they are not always meaningful. This table shows which offsets are actually used: ms me hs he rs re lc ~ match item yes yes yes yes - - yes region item start yes - yes - yes - yes region item skip - yes - - - - yes region item end - yes - yes - yes yes Offsets can be concatenated, with a ',' in between. Example: > :syn match String /"[^"]*"/hs=s+1,he=e-1 < some "string" text ^^^^^^ highlighted Notes: - There must be no white space between the pattern and the character offset(s). - The highlighted area will never be outside of the matched text. - A negative offset for an end pattern may not always work, because the end pattern may be detected when the highlighting should already have stopped. - Before Vim 7.2 the offsets were counted in bytes instead of characters. This didn't work well for multi-byte characters, so it was changed with the Vim 7.2 release. - The start of a match cannot be in a line other than where the pattern matched. This doesn't work: "a\nb"ms=e. You can make the highlighting start in another line, this does work: "a\nb"hs=e. Example (match a comment but don't highlight the /* and */): > :syntax region Comment start="/\*"hs=e+1 end="\*/"he=s-1 < /* this is a comment */ ^^^^^^^^^^^^^^^^^^^ highlighted A more complicated Example: > :syn region Exa matchgroup=Foo start="foo"hs=s+2,rs=e+2 matchgroup=Bar end="bar"me=e-1,he=e-1,re=s-1 < abcfoostringbarabc mmmmmmmmmmm match sssrrreee highlight start/region/end ("Foo", "Exa" and "Bar") Leading context *:syn-lc* *:syn-leading* *:syn-context* Note: This is an obsolete feature, only included for backwards compatibility with previous Vim versions. It's now recommended to use the |/\@<=| construct in the pattern. The "lc" offset specifies leading context -- a part of the pattern that must be present, but is not considered part of the match. An offset of "lc=n" will cause Vim to step back n columns before attempting the pattern match, allowing characters which have already been matched in previous patterns to also be used as leading context for this match. This can be used, for instance, to specify that an "escaping" character must not precede the match: > :syn match ZNoBackslash "[^\\]z"ms=s+1 :syn match WNoBackslash "[^\\]w"lc=1 :syn match Underline "_\+" < ___zzzz ___wwww ^^^ ^^^ matches Underline ^ ^ matches ZNoBackslash ^^^^ matches WNoBackslash The "ms" offset is automatically set to the same value as the "lc" offset, unless you set "ms" explicitly. Multi-line patterns *:syn-multi-line* The patterns can include "\n" to match an end-of-line. Mostly this works as expected, but there are a few exceptions. When using a start pattern with an offset, the start of the match is not allowed to start in a following line. The highlighting can start in a following line though. Using the "\zs" item also requires that the start of the match doesn't move to another line. The skip pattern can include the "\n", but the search for an end pattern will continue in the first character of the next line, also when that character is matched by the skip pattern. This is because redrawing may start in any line halfway in a region and there is no check if the skip pattern started in a previous line. For example, if the skip pattern is "a\nb" and an end pattern is "b", the end pattern does match in the second line of this: > x x a b x x Generally this means that the skip pattern should not match any characters after the "\n". External matches *:syn-ext-match* These extra regular expression items are available in region patterns: */\z(* */\z(\)* *E50* *E52* *E879* \z(\) Marks the sub-expression as "external", meaning that it can be accessed from another pattern match. Currently only usable in defining a syntax region start pattern. */\z1* */\z2* */\z3* */\z4* */\z5* \z1 ... \z9 */\z6* */\z7* */\z8* */\z9* *E66* *E67* Matches the same string that was matched by the corresponding sub-expression in a previous start pattern match. Sometimes the start and end patterns of a region need to share a common sub-expression. A common example is the "here" document in Perl and many Unix shells. This effect can be achieved with the "\z" special regular expression items, which marks a sub-expression as "external", in the sense that it can be referenced from outside the pattern in which it is defined. The here-document example, for instance, can be done like this: > :syn region hereDoc start="<<\z(\I\i*\)" end="^\z1$" As can be seen here, the \z actually does double duty. In the start pattern, it marks the "\(\I\i*\)" sub-expression as external; in the end pattern, it changes the \z1 back-reference into an external reference referring to the first external sub-expression in the start pattern. External references can also be used in skip patterns: > :syn region foo start="start \(\I\i*\)" skip="not end \z1" end="end \z1" Note that normal and external sub-expressions are completely orthogonal and indexed separately; for instance, if the pattern "\z(..\)\(..\)" is applied to the string "aabb", then \1 will refer to "bb" and \z1 will refer to "aa". Note also that external sub-expressions cannot be accessed as back-references within the same pattern like normal sub-expressions. If you want to use one sub-expression as both a normal and an external sub-expression, you can nest the two, as in "\(\z(...\)\)". Note that only matches within a single line can be used. Multi-line matches cannot be referred to. ============================================================================== 8. Syntax clusters *:syn-cluster* *E400* :sy[ntax] cluster {cluster-name} [contains={group-name}..] [add={group-name}..] [remove={group-name}..] This command allows you to cluster a list of syntax groups together under a single name. contains={group-name}.. The cluster is set to the specified list of groups. add={group-name}.. The specified groups are added to the cluster. remove={group-name}.. The specified groups are removed from the cluster. A cluster so defined may be referred to in a contains=.., containedin=.., nextgroup=.., add=.. or remove=.. list with a "@" prefix. You can also use this notation to implicitly declare a cluster before specifying its contents. Example: > :syntax match Thing "# [^#]\+ #" contains=@ThingMembers :syntax cluster ThingMembers contains=ThingMember1,ThingMember2 As the previous example suggests, modifications to a cluster are effectively retroactive; the membership of the cluster is checked at the last minute, so to speak: > :syntax keyword A aaa :syntax keyword B bbb :syntax cluster AandB contains=A :syntax match Stuff "( aaa bbb )" contains=@AandB :syntax cluster AandB add=B " now both keywords are matched in Stuff This also has implications for nested clusters: > :syntax keyword A aaa :syntax keyword B bbb :syntax cluster SmallGroup contains=B :syntax cluster BigGroup contains=A,@SmallGroup :syntax match Stuff "( aaa bbb )" contains=@BigGroup :syntax cluster BigGroup remove=B " no effect, since B isn't in BigGroup :syntax cluster SmallGroup remove=B " now bbb isn't matched within Stuff < *E848* The maximum number of clusters is 9767. ============================================================================== 9. Including syntax files *:syn-include* *E397* It is often useful for one language's syntax file to include a syntax file for a related language. Depending on the exact relationship, this can be done in two different ways: - If top-level syntax items in the included syntax file are to be allowed at the top level in the including syntax, you can simply use the |:runtime| command: > " In cpp.vim: :runtime! syntax/c.vim :unlet b:current_syntax < - If top-level syntax items in the included syntax file are to be contained within a region in the including syntax, you can use the ":syntax include" command: :sy[ntax] include [@{grouplist-name}] {file-name} All syntax items declared in the included file will have the "contained" flag added. In addition, if a group list is specified, all top-level syntax items in the included file will be added to that list. > " In perl.vim: :syntax include @Pod <sfile>:p:h/pod.vim :syntax region perlPOD start="^=head" end="^=cut" contains=@Pod < When {file-name} is an absolute path (starts with "/", "c:", "$VAR" or "<sfile>") that file is sourced. When it is a relative path (e.g., "syntax/pod.vim") the file is searched for in 'runtimepath'. All matching files are loaded. Using a relative path is recommended, because it allows a user to replace the included file with his own version, without replacing the file that does the ":syn include". *E847* The maximum number of includes is 999. ============================================================================== 10. Synchronizing *:syn-sync* *E403* *E404* Vim wants to be able to start redrawing in any position in the document. To make this possible it needs to know the syntax state at the position where redrawing starts. :sy[ntax] sync [ccomment [group-name] | minlines={N} | ...] There are four ways to synchronize: 1. Always parse from the start of the file. |:syn-sync-first| 2. Based on C-style comments. Vim understands how C-comments work and can figure out if the current line starts inside or outside a comment. |:syn-sync-second| 3. Jumping back a certain number of lines and start parsing there. |:syn-sync-third| 4. Searching backwards in the text for a pattern to sync on. |:syn-sync-fourth| *:syn-sync-maxlines* *:syn-sync-minlines* For the last three methods, the line range where the parsing can start is limited by "minlines" and "maxlines". If the "minlines={N}" argument is given, the parsing always starts at least that many lines backwards. This can be used if the parsing may take a few lines before it's correct, or when it's not possible to use syncing. If the "maxlines={N}" argument is given, the number of lines that are searched for a comment or syncing pattern is restricted to N lines backwards (after adding "minlines"). This is useful if you have few things to sync on and a slow machine. Example: > :syntax sync maxlines=500 ccomment < *:syn-sync-linebreaks* When using a pattern that matches multiple lines, a change in one line may cause a pattern to no longer match in a previous line. This means has to start above where the change was made. How many lines can be specified with the "linebreaks" argument. For example, when a pattern may include one line break use this: > :syntax sync linebreaks=1 The result is that redrawing always starts at least one line before where a change was made. The default value for "linebreaks" is zero. Usually the value for "minlines" is bigger than "linebreaks". First syncing method: *:syn-sync-first* > :syntax sync fromstart The file will be parsed from the start. This makes syntax highlighting accurate, but can be slow for long files. Vim caches previously parsed text, so that it's only slow when parsing the text for the first time. However, when making changes some part of the text needs to be parsed again (worst case: to the end of the file). Using "fromstart" is equivalent to using "minlines" with a very large number. Second syncing method: *:syn-sync-second* *:syn-sync-ccomment* For the second method, only the "ccomment" argument needs to be given. Example: > :syntax sync ccomment When Vim finds that the line where displaying starts is inside a C-style comment, the last region syntax item with the group-name "Comment" will be used. This requires that there is a region with the group-name "Comment"! An alternate group name can be specified, for example: > :syntax sync ccomment javaComment This means that the last item specified with "syn region javaComment" will be used for the detected C comment region. This only works properly if that region does have a start pattern "\/*" and an end pattern "*\/". The "maxlines" argument can be used to restrict the search to a number of lines. The "minlines" argument can be used to at least start a number of lines back (e.g., for when there is some construct that only takes a few lines, but it hard to sync on). Note: Syncing on a C comment doesn't work properly when strings are used that cross a line and contain a "*/". Since letting strings cross a line is a bad programming habit (many compilers give a warning message), and the chance of a "*/" appearing inside a comment is very small, this restriction is hardly ever noticed. Third syncing method: *:syn-sync-third* For the third method, only the "minlines={N}" argument needs to be given. Vim will subtract {N} from the line number and start parsing there. This means {N} extra lines need to be parsed, which makes this method a bit slower. Example: > :syntax sync minlines=50 "lines" is equivalent to "minlines" (used by older versions). Fourth syncing method: *:syn-sync-fourth* The idea is to synchronize on the end of a few specific regions, called a sync pattern. Only regions can cross lines, so when we find the end of some region, we might be able to know in which syntax item we are. The search starts in the line just above the one where redrawing starts. From there the search continues backwards in the file. This works just like the non-syncing syntax items. You can use contained matches, nextgroup, etc. But there are a few differences: - Keywords cannot be used. - The syntax items with the "sync" keyword form a completely separated group of syntax items. You can't mix syncing groups and non-syncing groups. - The matching works backwards in the buffer (line by line), instead of forwards. - A line continuation pattern can be given. It is used to decide which group of lines need to be searched like they were one line. This means that the search for a match with the specified items starts in the first of the consecutive that contain the continuation pattern. - When using "nextgroup" or "contains", this only works within one line (or group of continued lines). - When using a region, it must start and end in the same line (or group of continued lines). Otherwise the end is assumed to be at the end of the line (or group of continued lines). - When a match with a sync pattern is found, the rest of the line (or group of continued lines) is searched for another match. The last match is used. This is used when a line can contain both the start end the end of a region (e.g., in a C-comment like /* this */, the last "*/" is used). There are two ways how a match with a sync pattern can be used: 1. Parsing for highlighting starts where redrawing starts (and where the search for the sync pattern started). The syntax group that is expected to be valid there must be specified. This works well when the regions that cross lines cannot contain other regions. 2. Parsing for highlighting continues just after the match. The syntax group that is expected to be present just after the match must be specified. This can be used when the previous method doesn't work well. It's much slower, because more text needs to be parsed. Both types of sync patterns can be used at the same time. Besides the sync patterns, other matches and regions can be specified, to avoid finding unwanted matches. [The reason that the sync patterns are given separately, is that mostly the search for the sync point can be much simpler than figuring out the highlighting. The reduced number of patterns means it will go (much) faster.] *syn-sync-grouphere* *E393* *E394* :syntax sync match {sync-group-name} grouphere {group-name} "pattern" .. Define a match that is used for syncing. {group-name} is the name of a syntax group that follows just after the match. Parsing of the text for highlighting starts just after the match. A region must exist for this {group-name}. The first one defined will be used. "NONE" can be used for when there is no syntax group after the match. *syn-sync-groupthere* :syntax sync match {sync-group-name} groupthere {group-name} "pattern" .. Like "grouphere", but {group-name} is the name of a syntax group that is to be used at the start of the line where searching for the sync point started. The text between the match and the start of the sync pattern searching is assumed not to change the syntax highlighting. For example, in C you could search backwards for "/*" and "*/". If "/*" is found first, you know that you are inside a comment, so the "groupthere" is "cComment". If "*/" is found first, you know that you are not in a comment, so the "groupthere" is "NONE". (in practice it's a bit more complicated, because the "/*" and "*/" could appear inside a string. That's left as an exercise to the reader...). :syntax sync match .. :syntax sync region .. Without a "groupthere" argument. Define a region or match that is skipped while searching for a sync point. *syn-sync-linecont* :syntax sync linecont {pattern} When {pattern} matches in a line, it is considered to continue in the next line. This means that the search for a sync point will consider the lines to be concatenated. If the "maxlines={N}" argument is given too, the number of lines that are searched for a match is restricted to N. This is useful if you have very few things to sync on and a slow machine. Example: > :syntax sync maxlines=100 You can clear all sync settings with: > :syntax sync clear You can clear specific sync patterns with: > :syntax sync clear {sync-group-name} .. ============================================================================== 11. Listing syntax items *:syntax* *:sy* *:syn* *:syn-list* This command lists all the syntax items: > :sy[ntax] [list] To show the syntax items for one syntax group: > :sy[ntax] list {group-name} To list the syntax groups in one cluster: *E392* > :sy[ntax] list @{cluster-name} See above for other arguments for the ":syntax" command. Note that the ":syntax" command can be abbreviated to ":sy", although ":syn" is mostly used, because it looks better. ============================================================================== 12. Highlight command *:highlight* *:hi* *E28* *E411* *E415* There are two types of highlight groups: - The built-in |highlight-groups|. - The ones used for specific languages. For these the name starts with the name of the language. Many of these don't have any attributes, but are linked to a group of the second type. *hitest.vim* You can see all the groups currently active with this command: > :so $VIMRUNTIME/syntax/hitest.vim This will open a new window containing all highlight group names, displayed in their own color. *:colo* *:colorscheme* *E185* :colo[rscheme] Output the name of the currently active color scheme. This is basically the same as > :echo g:colors_name < In case g:colors_name has not been defined :colo will output "default". When compiled without the |+eval| feature it will output "unknown". :colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath' for the file "colors/{name}.vim". The first one that is found is loaded. Also searches all plugins in 'packpath', first below "start" and then under "opt". Doesn't work recursively, thus you can't use ":colorscheme" in a color scheme script. To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim", and use `:runtime` to load the original colorscheme: > runtime colors/evening.vim hi Statement ctermfg=Blue guifg=Blue < After the color scheme has been loaded the |ColorScheme| autocommand event is triggered. For info about writing a colorscheme file: > :edit $VIMRUNTIME/colors/README.txt :hi[ghlight] List all the current highlight groups that have attributes set. :hi[ghlight] {group-name} List one highlight group. :hi[ghlight] clear Reset all highlighting to the defaults. Removes all highlighting for groups added by the user! Uses the current value of 'background' to decide which default colors to use. :hi[ghlight] clear {group-name} :hi[ghlight] {group-name} NONE Disable the highlighting for one highlight group. It is _not_ set back to the default colors. :hi[ghlight] [default] {group-name} {key}={arg} .. Add a highlight group, or change the highlighting for an existing group. See |highlight-args| for the {key}={arg} arguments. See |:highlight-default| for the optional [default] argument. Normally a highlight group is added once when starting up. This sets the default values for the highlighting. After that, you can use additional highlight commands to change the arguments that you want to set to non-default values. The value "NONE" can be used to switch the value off or go back to the default value. A simple way to change colors is with the |:colorscheme| command. This loads a file with ":highlight" commands such as this: > :hi Comment gui=bold Note that all settings that are not included remain the same, only the specified field is used, and settings are merged with previous ones. So, the result is like this single command has been used: > :hi Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold < *:highlight-verbose* When listing a highlight group and 'verbose' is non-zero, the listing will also tell where it was last set. Example: > :verbose hi Comment < Comment xxx term=bold ctermfg=4 guifg=Blue ~ Last set from /home/mool/vim/vim7/runtime/syntax/syncolor.vim ~ When ":hi clear" is used then the script where this command is used will be mentioned for the default values. See |:verbose-cmd| for more information. *highlight-args* *E416* *E417* *E423* There are three types of terminals for highlighting: term a normal terminal (vt100, xterm) cterm a color terminal (Windows console, color-xterm) gui the GUI For each type the highlighting can be given. This makes it possible to use the same syntax file on all terminals, and use the optimal highlighting. 1. highlight arguments for normal terminals *bold* *underline* *undercurl* *inverse* *italic* *standout* term={attr-list} *attr-list* *highlight-term* *E418* attr-list is a comma separated list (without spaces) of the following items (in any order): bold underline undercurl a curly underline reverse inverse same as reverse italic standout NONE no attributes used (used to reset it) Note that "bold" can be used here and by using a bold font. They have the same effect. If running in a terminal, "undercurl" acts as an alias for "underline". It is set using |highlight-guisp|. start={term-list} *highlight-start* *E422* stop={term-list} *term-list* *highlight-stop* These lists of terminal codes can be used to get non-standard attributes on a terminal. The escape sequence specified with the "start" argument is written before the characters in the highlighted area. It can be anything that you want to send to the terminal to highlight this area. The escape sequence specified with the "stop" argument is written after the highlighted area. This should undo the "start" argument. Otherwise the screen will look messed up. {term-list} is a a string with escape sequences. This is any string of characters, except that it can't start with "t_" and blanks are not allowed. The <> notation is recognized here, so you can use things like "<Esc>" and "<Space>". Example: start=<Esc>[27h;<Esc>[<Space>r; 2. highlight arguments for color terminals cterm={attr-list} *highlight-cterm* See above for the description of {attr-list} |attr-list|. The "cterm" argument is likely to be different from "term", when colors are used. For example, in a normal terminal comments could be underlined, in a color terminal they can be made Blue. Note: Many terminals (e.g., DOS console) can't mix these attributes with coloring. Use only one of "cterm=" OR "ctermfg=" OR "ctermbg=". ctermfg={color-nr} *highlight-ctermfg* *E421* ctermbg={color-nr} *highlight-ctermbg* The {color-nr} argument is a color number. Its range is zero to (not including) the number of |tui-colors| available. The actual color with this number depends on the type of terminal and its settings. Sometimes the color also depends on the settings of "cterm". For example, on some systems "cterm=bold ctermfg=3" gives another color, on others you just get color 3. For an xterm this depends on your resources, and is a bit unpredictable. See your xterm documentation for the defaults. The colors for a color-xterm can be changed from the .Xdefaults file. Unfortunately this means that it's not possible to get the same colors for each user. The MSDOS standard colors are fixed (in a console window), so these have been used for the names. But the meaning of color names in X11 are fixed, so these color settings have been used, to make the highlighting settings portable (complicated, isn't it?). The following names are recognized, with the color number used: *cterm-colors* NR-16 NR-8 COLOR NAME ~ 0 0 Black 1 4 DarkBlue 2 2 DarkGreen 3 6 DarkCyan 4 1 DarkRed 5 5 DarkMagenta 6 3 Brown, DarkYellow 7 7 LightGray, LightGrey, Gray, Grey 8 0* DarkGray, DarkGrey 9 4* Blue, LightBlue 10 2* Green, LightGreen 11 6* Cyan, LightCyan 12 1* Red, LightRed 13 5* Magenta, LightMagenta 14 3* Yellow, LightYellow 15 7* White The number under "NR-16" is used for 16-color terminals ('t_Co' greater than or equal to 16). The number under "NR-8" is used for 8-color terminals ('t_Co' less than 16). The '*' indicates that the bold attribute is set for ctermfg. In many 8-color terminals (e.g., "linux"), this causes the bright colors to appear. This doesn't work for background colors! Without the '*' the bold attribute is removed. If you want to set the bold attribute in a different way, put a "cterm=" argument AFTER the "ctermfg=" or "ctermbg=" argument. Or use a number instead of a color name. The case of the color names is ignored. Note that for 16 color ansi style terminals (including xterms), the numbers in the NR-8 column is used. Here '*' means 'add 8' so that Blue is 12, DarkGray is 8 etc. Note that for some color terminals these names may result in the wrong colors! You can also use "NONE" to remove the color. *:hi-normal-cterm* When setting the "ctermfg" or "ctermbg" colors for the Normal group, these will become the colors used for the non-highlighted text. Example: > :highlight Normal ctermfg=grey ctermbg=darkblue < When setting the "ctermbg" color for the Normal group, the 'background' option will be adjusted automatically, under the condition that the color is recognized and 'background' was not set explicitly. This causes the highlight groups that depend on 'background' to change! This means you should set the colors for Normal first, before setting other colors. When a colorscheme is being used, changing 'background' causes it to be reloaded, which may reset all colors (including Normal). First delete the "g:colors_name" variable when you don't want this. When you have set "ctermfg" or "ctermbg" for the Normal group, Vim needs to reset the color when exiting. This is done with the "orig_pair" |terminfo| entry. *E419* *E420* When Vim knows the normal foreground and background colors, "fg" and "bg" can be used as color names. This only works after setting the colors for the Normal group and for the Windows console. Example, for reverse video: > :highlight Visual ctermfg=bg ctermbg=fg < Note that the colors are used that are valid at the moment this command are given. If the Normal group colors are changed later, the "fg" and "bg" colors will not be adjusted. 3. highlight arguments for the GUI gui={attr-list} *highlight-gui* These give the attributes to use in the GUI mode. See |attr-list| for a description. Note that "bold" can be used here and by using a bold font. They have the same effect. Note that the attributes are ignored for the "Normal" group. font={font-name} *highlight-font* font-name is the name of a font, as it is used on the system Vim runs on. For X11 this is a complicated name, for example: > font=-misc-fixed-bold-r-normal--14-130-75-75-c-70-iso8859-1 < The font-name "NONE" can be used to revert to the default font. When setting the font for the "Normal" group, this becomes the default font (until the 'guifont' option is changed; the last one set is used). The following only works with Motif not with other GUIs: When setting the font for the "Menu" group, the menus will be changed. When setting the font for the "Tooltip" group, the tooltips will be changed. All fonts used, except for Menu and Tooltip, should be of the same character size as the default font! Otherwise redrawing problems will occur. To use a font name with an embedded space or other special character, put it in single quotes. The single quote cannot be used then. Example: > :hi comment font='Monospace 10' guifg={color-name} *highlight-guifg* guibg={color-name} *highlight-guibg* guisp={color-name} *highlight-guisp* These give the foreground (guifg), background (guibg) and special (guisp) color to use in the GUI. "guisp" is used for undercurl. There are a few special names: NONE no color (transparent) bg use normal background color background use normal background color fg use normal foreground color foreground use normal foreground color To use a color name with an embedded space or other special character, put it in single quotes. The single quote cannot be used then. Example: > :hi comment guifg='salmon pink' < *gui-colors* Suggested color names (these are available on most systems): Red LightRed DarkRed Green LightGreen DarkGreen SeaGreen Blue LightBlue DarkBlue SlateBlue Cyan LightCyan DarkCyan Magenta LightMagenta DarkMagenta Yellow LightYellow Brown DarkYellow Gray LightGray DarkGray Black White Orange Purple Violet You can also specify a color by its RGB (red, green, blue) values. The format is "#rrggbb", where "rr" is the Red value "gg" is the Green value "bb" is the Blue value All values are hexadecimal, range from "00" to "ff". Examples: > :highlight Comment guifg=#11f0c3 guibg=#ff00ff < *highlight-groups* *highlight-default* These are the builtin highlighting groups. Note that the highlighting depends on the value of 'background'. You can see the current settings with the ":highlight" command. *hl-ColorColumn* ColorColumn used for the columns set with 'colorcolumn' *hl-Conceal* Conceal placeholder characters substituted for concealed text (see 'conceallevel') *hl-Cursor* Cursor the character under the cursor *hl-CursorIM* CursorIM like Cursor, but used when in IME mode |CursorIM| *hl-CursorColumn* CursorColumn the screen column that the cursor is in when 'cursorcolumn' is set *hl-CursorLine* CursorLine the screen line that the cursor is in when 'cursorline' is set *hl-Directory* Directory directory names (and other special names in listings) *hl-DiffAdd* DiffAdd diff mode: Added line |diff.txt| *hl-DiffChange* DiffChange diff mode: Changed line |diff.txt| *hl-DiffDelete* DiffDelete diff mode: Deleted line |diff.txt| *hl-DiffText* DiffText diff mode: Changed text within a changed line |diff.txt| {Nvim} *hl-EndOfBuffer* EndOfBuffer filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. {Nvim} *hl-TermCursor* TermCursor cursor in a focused terminal {Nvim} *hl-TermCursorNC* TermCursorNC cursor in an unfocused terminal *hl-ErrorMsg* ErrorMsg error messages on the command line *hl-VertSplit* VertSplit the column separating vertically split windows *hl-Folded* Folded line used for closed folds *hl-FoldColumn* FoldColumn 'foldcolumn' *hl-SignColumn* SignColumn column where |signs| are displayed *hl-IncSearch* IncSearch 'incsearch' highlighting; also used for the text replaced with ":s///c" *hl-Substitute* Substitute |:substitute| replacement text highlighting *hl-LineNr* LineNr Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. *hl-CursorLineNr* CursorLineNr Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. *hl-MatchParen* MatchParen The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| *hl-ModeMsg* ModeMsg 'showmode' message (e.g., "-- INSERT --") *hl-MoreMsg* MoreMsg |more-prompt| *hl-NonText* NonText '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. *hl-Normal* Normal normal text *hl-NormalNC* NormalNC normal text in non-current windows *hl-Pmenu* Pmenu Popup menu: normal item. *hl-PmenuSel* PmenuSel Popup menu: selected item. *hl-PmenuSbar* PmenuSbar Popup menu: scrollbar. *hl-PmenuThumb* PmenuThumb Popup menu: Thumb of the scrollbar. *hl-Question* Question |hit-enter| prompt and yes/no questions *hl-QuickFixLine* QuickFixLine Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. *hl-Search* Search Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. *hl-SpecialKey* SpecialKey Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace| *hl-SpellBad* SpellBad Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. *hl-SpellCap* SpellCap Word that should start with a capital. |spell| Combined with the highlighting used otherwise. *hl-SpellLocal* SpellLocal Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. *hl-SpellRare* SpellRare Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise. *hl-StatusLine* StatusLine status line of current window *hl-StatusLineNC* StatusLineNC status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. *hl-TabLine* TabLine tab pages line, not active tab page label *hl-TabLineFill* TabLineFill tab pages line, where there are no labels *hl-TabLineSel* TabLineSel tab pages line, active tab page label *hl-Title* Title titles for output from ":set all", ":autocmd" etc. *hl-Visual* Visual Visual mode selection *hl-VisualNOS* VisualNOS Visual mode selection when vim is "Not Owning the Selection". *hl-WarningMsg* WarningMsg warning messages *hl-Whitespace* Whitespace "nbsp", "space", "tab" and "trail" in 'listchars' *hl-WildMenu* WildMenu current match in 'wildmenu' completion *hl-User1* *hl-User1..9* *hl-User9* The 'statusline' syntax allows the use of 9 different highlights in the statusline and ruler (via 'rulerformat'). The names are User1 to User9. For the GUI you can use the following groups to set the colors for the menu, scrollbars and tooltips. They don't have defaults. This doesn't work for the Win32 GUI. Only three highlight arguments have any effect here: font, guibg, and guifg. *hl-Menu* Menu Current font, background and foreground colors of the menus. Also used for the toolbar. Applicable highlight arguments: font, guibg, guifg. *hl-Scrollbar* Scrollbar Current background and foreground of the main window's scrollbars. Applicable highlight arguments: guibg, guifg. *hl-Tooltip* Tooltip Current font, background and foreground of the tooltips. Applicable highlight arguments: font, guibg, guifg. ============================================================================== 13. Linking groups *:hi-link* *:highlight-link* *E412* *E413* When you want to use the same highlighting for several syntax groups, you can do this more easily by linking the groups into one common highlight group, and give the color attributes only for that group. To set a link: :hi[ghlight][!] [default] link {from-group} {to-group} To remove a link: :hi[ghlight][!] [default] link {from-group} NONE Notes: *E414* - If the {from-group} and/or {to-group} doesn't exist, it is created. You don't get an error message for a non-existing group. - As soon as you use a ":highlight" command for a linked group, the link is removed. - If there are already highlight settings for the {from-group}, the link is not made, unless the '!' is given. For a ":highlight link" command in a sourced file, you don't get an error message. This can be used to skip links for groups that already have settings. *:hi-default* *:highlight-default* The [default] argument is used for setting the default highlighting for a group. If highlighting has already been specified for the group the command will be ignored. Also when there is an existing link. Using [default] is especially useful to overrule the highlighting of a specific syntax file. For example, the C syntax file contains: > :highlight default link cComment Comment If you like Question highlighting for C comments, put this in your vimrc file: > :highlight link cComment Question Without the "default" in the C syntax file, the highlighting would be overruled when the syntax file is loaded. ============================================================================== 14. Cleaning up *:syn-clear* *E391* If you want to clear the syntax stuff for the current buffer, you can use this command: > :syntax clear This command should be used when you want to switch off syntax highlighting, or when you want to switch to using another syntax. It's normally not needed in a syntax file itself, because syntax is cleared by the autocommands that load the syntax file. The command also deletes the "b:current_syntax" variable, since no syntax is loaded after this command. If you want to disable syntax highlighting for all buffers, you need to remove the autocommands that load the syntax files: > :syntax off What this command actually does, is executing the command > :source $VIMRUNTIME/syntax/nosyntax.vim See the "nosyntax.vim" file for details. Note that for this to work $VIMRUNTIME must be valid. See |$VIMRUNTIME|. To clean up specific syntax groups for the current buffer: > :syntax clear {group-name} .. This removes all patterns and keywords for {group-name}. To clean up specific syntax group lists for the current buffer: > :syntax clear @{grouplist-name} .. This sets {grouplist-name}'s contents to an empty list. *:syntax-reset* *:syn-reset* If you have changed the colors and messed them up, use this command to get the defaults back: > :syntax reset It is a bit of a wrong name, since it does not reset any syntax items, it only affects the highlighting. Note that the syntax colors that you set in your vimrc file will also be reset back to their Vim default. Note that if you are using a color scheme, the colors defined by the color scheme for syntax highlighting will be lost. What this actually does is: > let g:syntax_cmd = "reset" runtime! syntax/syncolor.vim Note that this uses the 'runtimepath' option. *syncolor* If you want to use different colors for syntax highlighting, you can add a Vim script file to set these colors. Put this file in a directory in 'runtimepath' which comes after $VIMRUNTIME, so that your settings overrule the default colors. This way these colors will be used after the ":syntax reset" command. For Unix you can use the file ~/.config/nvim/after/syntax/syncolor.vim. Example: > if &background == "light" highlight comment ctermfg=darkgreen guifg=darkgreen else highlight comment ctermfg=green guifg=green endif *E679* Do make sure this syncolor.vim script does not use a "syntax on", set the 'background' option or uses a "colorscheme" command, because it results in an endless loop. Note that when a color scheme is used, there might be some confusion whether your defined colors are to be used or the colors from the scheme. This depends on the color scheme file. See |:colorscheme|. *syntax_cmd* The "syntax_cmd" variable is set to one of these values when the syntax/syncolor.vim files are loaded: "on" ":syntax on" command. Highlight colors are overruled but links are kept "enable" ":syntax enable" command. Only define colors for groups that don't have highlighting yet. Use ":syntax default". "reset" ":syntax reset" command or loading a color scheme. Define all the colors. "skip" Don't define colors. Used to skip the default settings when a syncolor.vim file earlier in 'runtimepath' has already set them. ============================================================================== 15. Highlighting tags *tag-highlight* If you want to highlight all the tags in your file, you can use the following mappings. <F11> -- Generate tags.vim file, and highlight tags. <F12> -- Just highlight tags based on existing tags.vim file. > :map <F11> :sp tags<CR>:%s/^\([^ :]*:\)\=\([^ ]*\).*/syntax keyword Tag \2/<CR>:wq! tags.vim<CR>/^<CR><F12> :map <F12> :so tags.vim<CR> WARNING: The longer the tags file, the slower this will be, and the more memory Vim will consume. Only highlighting typedefs, unions and structs can be done too. For this you must use Exuberant ctags (found at http://ctags.sf.net). Put these lines in your Makefile: # Make a highlight file for types. Requires Exuberant ctags and awk types: types.vim types.vim: *.[ch] ctags --c-kinds=gstu -o- *.[ch] |\ awk 'BEGIN{printf("syntax keyword Type\t")}\ {printf("%s ", $$1)}END{print ""}' > $@ And put these lines in your vimrc: > " load the types.vim highlighting file, if it exists autocmd BufRead,BufNewFile *.[ch] let fname = expand('<afile>:p:h') . '/types.vim' autocmd BufRead,BufNewFile *.[ch] if filereadable(fname) autocmd BufRead,BufNewFile *.[ch] exe 'so ' . fname autocmd BufRead,BufNewFile *.[ch] endif ============================================================================== 16. Window-local syntax *:ownsyntax* Normally all windows on a buffer share the same syntax settings. It is possible, however, to set a particular window on a file to have its own private syntax setting. A possible example would be to edit LaTeX source with conventional highlighting in one window, while seeing the same source highlighted differently (so as to hide control sequences and indicate bold, italic etc regions) in another. The 'scrollbind' option is useful here. To set the current window to have the syntax "foo", separately from all other windows on the buffer: > :ownsyntax foo < *w:current_syntax* This will set the "w:current_syntax" variable to "foo". The value of "b:current_syntax" does not change. This is implemented by saving and restoring "b:current_syntax", since the syntax files do set "b:current_syntax". The value set by the syntax file is assigned to "w:current_syntax". Note: This resets the 'spell', 'spellcapcheck' and 'spellfile' options. Once a window has its own syntax, syntax commands executed from other windows on the same buffer (including :syntax clear) have no effect. Conversely, syntax commands executed from that window do not affect other windows on the same buffer. A window with its own syntax reverts to normal behavior when another buffer is loaded into that window or the file is reloaded. When splitting the window, the new window will use the original syntax. ============================================================================== 17. Color xterms *xterm-color* *color-xterm* *colortest.vim* To test your color setup, a file has been included in the Vim distribution. To use it, execute this command: > :runtime syntax/colortest.vim Nvim uses |256-color| and |true-color| terminal capabilities whereever possible. ============================================================================== 18. When syntax is slow *:syntime* This is aimed at authors of a syntax file. If your syntax causes redrawing to be slow, here are a few hints on making it faster. To see slowness switch on some features that usually interfere, such as 'relativenumber' and |folding|. Note: this is only available when compiled with the |+profile| feature. You many need to build Vim with "huge" features. To find out what patterns are consuming most time, get an overview with this sequence: > :syntime on [ redraw the text at least once with CTRL-L ] :syntime report This will display a list of syntax patterns that were used, sorted by the time it took to match them against the text. :syntime on Start measuring syntax times. This will add some overhead to compute the time spent on syntax pattern matching. :syntime off Stop measuring syntax times. :syntime clear Set all the counters to zero, restart measuring. :syntime report Show the syntax items used since ":syntime on" in the current window. Use a wider display to see more of the output. The list is sorted by total time. The columns are: TOTAL Total time in seconds spent on matching this pattern. COUNT Number of times the pattern was used. MATCH Number of times the pattern actually matched SLOWEST The longest time for one try. AVERAGE The average time for one try. NAME Name of the syntax item. Note that this is not unique. PATTERN The pattern being used. Pattern matching gets slow when it has to try many alternatives. Try to include as much literal text as possible to reduce the number of ways a pattern does NOT match. When using the "\@<=" and "\@<!" items, add a maximum size to avoid trying at all positions in the current and previous line. For example, if the item is literal text specify the size of that text (in bytes): "<\@<=span" Matches "span" in "<span". This tries matching with "<" in many places. "<\@1<=span" Matches the same, but only tries one byte before "span". vim:tw=78:sw=4:ts=8:ft=help:norl: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/tabpage.txt����������������������������������������������������������������0000664�0000000�0000000�00000040171�13204015742�0017405�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*tabpage.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar Editing with windows in multiple tab pages. *tab-page* *tabpage* The commands which have been added to use multiple tab pages are explained here. Additionally, there are explanations for commands that work differently when used in combination with more than one tab page. Type |gO| to see the table of contents. ============================================================================== 1. Introduction *tab-page-intro* A tab page holds one or more windows. You can easily switch between tab pages, so that you have several collections of windows to work on different things. Usually you will see a list of labels at the top of the Vim window, one for each tab page. With the mouse you can click on the label to jump to that tab page. There are other ways to move between tab pages, see below. Most commands work only in the current tab page. That includes the |CTRL-W| commands, |:windo|, |:all| and |:ball| (when not using the |:tab| modifier). The commands that are aware of other tab pages than the current one are mentioned below. Tabs are also a nice way to edit a buffer temporarily without changing the current window layout. Open a new tab page, do whatever you want to do and close the tab page. ============================================================================== 2. Commands *tab-page-commands* OPENING A NEW TAB PAGE: When starting Vim "vim -p filename ..." opens each file argument in a separate tab page (up to 'tabpagemax'). See |-p| A double click with the mouse in the non-GUI tab pages line opens a new, empty tab page. It is placed left of the position of the click. The first click may select another tab page first, causing an extra screen update. This also works in a few GUI versions, esp. Win32. But only when clicking right of the labels. In the GUI tab pages line you can use the right mouse button to open menu. |tabline-menu|. For the related autocommands see |tabnew-autocmd|. :[count]tabe[dit] *:tabe* *:tabedit* *:tabnew* :[count]tabnew Open a new tab page with an empty window, after the current tab page. If [count] is given the new tab page appears after the tabpage [count] otherwise the new tab page will appear after the current one. > :tabnew " opens tabpage after the current one :.tabnew " as above :+tabnew " opens tabpage after the next tab page " note: it is one further than :tabnew :-tabnew " opens tabpage before the current :0tabnew " opens tabpage before the first one :$tabnew " opens tabpage after the last one :[count]tabe[dit] [++opt] [+cmd] {file} :[count]tabnew [++opt] [+cmd] {file} Open a new tab page and edit {file}, like with |:edit|. For [count] see |:tabnew| above. :[count]tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind* Open a new tab page and edit {file} in 'path', like with |:find|. For [count] see |:tabnew| above. {not available when the |+file_in_path| feature was disabled at compile time} :[count]tab {cmd} *:tab* Execute {cmd} and when it opens a new window open a new tab page instead. Doesn't work for |:diffsplit|, |:diffpatch|, |:execute| and |:normal|. If [count] is given the new tab page appears after the tab page [count] otherwise the new tab page will appear after the current one. Examples: > :tab split " opens current buffer in new tab page :tab help gt " opens tab page with help for "gt" :.tab help gt " as above :+tab help " opens tab page with help after the next " tab page :-tab help " opens tab page with help before the " current one :0tab help " opens tab page with help before the " first one :$tab help " opens tab page with help after the last " one CTRL-W gf Open a new tab page and edit the file name under the cursor. See |CTRL-W_gf|. CTRL-W gF Open a new tab page and edit the file name under the cursor and jump to the line number following the file name. See |CTRL-W_gF|. CLOSING A TAB PAGE: Closing the last window of a tab page closes the tab page too, unless there is only one tab page. Using the mouse: If the tab page line is displayed you can click in the "X" at the top right to close the current tab page. A custom |'tabline'| may show something else. *:tabc* *:tabclose* :tabc[lose][!] Close current tab page. This command fails when: - There is only one tab page on the screen. *E784* - When 'hidden' is not set, [!] is not used, a buffer has changes, and there is no other window on this buffer. Changes to the buffer are not written and won't get lost, so this is a "safe" command. > :tabclose " close the current tab page :{count}tabc[lose][!] :tabc[lose][!] {count} Close tab page {count}. Fails in the same way as `:tabclose` above. > :-tabclose " close the previous tab page :+tabclose " close the next tab page :1tabclose " close the first tab page :$tabclose " close the last tab page :tabclose -2 " close the two previous tab page :tabclose + " close the next tab page :tabclose 3 " close the third tab page :tabclose $ " close the last tab page < *:tabo* *:tabonly* :tabo[nly][!] Close all other tab pages. When the 'hidden' option is set, all buffers in closed windows become hidden. When 'hidden' is not set, and the 'autowrite' option is set, modified buffers are written. Otherwise, windows that have buffers that are modified are not removed, unless the [!] is given, then they become hidden. But modified buffers are never abandoned, so changes cannot get lost. > :tabonly " close all tab pages except the current one :tabo[nly][!] {count} Close all tab pages except {count} one. > :.tabonly " as above :-tabonly " close all tab pages except the previous " one :+tabonly " close all tab pages except the next one :1tabonly " close all tab pages except the first one :$tabonly " close all tab pages except the last one :tabonly - " close all tab pages except the previous " one :tabonly +2 " close all tab pages except the two next " one :tabonly 1 " close all tab pages except the first one :tabonly $ " close all tab pages except the last one SWITCHING TO ANOTHER TAB PAGE: Using the mouse: If the tab page line is displayed you can click in a tab page label to switch to that tab page. Click where there is no label to go to the next tab page. |'tabline'| :tabn[ext] *:tabn* *:tabnext* *gt* <C-PageDown> *CTRL-<PageDown>* *<C-PageDown>* gt *i_CTRL-<PageDown>* *i_<C-PageDown>* Go to the next tab page. Wraps around from the last to the first one. :{count}tabn[ext] :tabn[ext] {count} Go to tab page {count}. The first tab page has number one. > :-tabnext " go to the previous tab page :+tabnext " go to the next tab page :+2tabnext " go to the two next tab page :1tabnext " go to the first tab page :$tabnext " go to the last tab page :tabnext $ " as above :tabnext - " go to the previous tab page :tabnext -1 " as above :tabnext + " go to the next tab page :tabnext +1 " as above {count}<C-PageDown> {count}gt Go to tab page {count}. The first tab page has number one. :tabp[revious] *:tabp* *:tabprevious* *gT* *:tabN* :tabN[ext] *:tabNext* *CTRL-<PageUp>* <C-PageUp> *<C-PageUp>* *i_CTRL-<PageUp>* *i_<C-PageUp>* gT Go to the previous tab page. Wraps around from the first one to the last one. :tabp[revious] {count} :tabN[ext] {count} {count}<C-PageUp> {count}gT Go {count} tab pages back. Wraps around from the first one to the last one. :tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind* :tabfir[st] Go to the first tab page. *:tabl* *:tablast* :tabl[ast] Go to the last tab page. Other commands: *:tabs* :tabs List the tab pages and the windows they contain. Shows a ">" for the current window. Shows a "+" for modified buffers. For example: Tab page 1 ~ + tabpage.txt ~ ex_docmd.c ~ Tab page 2 ~ > main.c ~ REORDERING TAB PAGES: :tabm[ove] [N] *:tabm* *:tabmove* :[N]tabm[ove] Move the current tab page to after tab page N. Use zero to make the current tab page the first one. Without N the tab page is made the last one. > :.tabmove " do nothing :-tabmove " move the tab page to the left :+tabmove " move the tab page to the right :0tabmove " move the tab page to the beginning of the tab " list :tabmove 0 " as above :tabmove " move the tab page to the last :$tabmove " as above :tabmove $ " as above :tabm[ove] +[N] :tabm[ove] -[N] Move the current tab page N places to the right (with +) or to the left (with -). > :tabmove - " move the tab page to the left :tabmove -1 " as above :tabmove + " move the tab page to the right :tabmove +1 " as above Note that although it is possible to move a tab behind the N-th one by using :Ntabmove. And move it by N places by using :+Ntabmove. For clarification what +N means in this context see |[range]|. LOOPING OVER TAB PAGES: *:tabd* *:tabdo* :[range]tabd[o] {cmd} Execute {cmd} in each tab page or, if [range] is given, only in tabpages which tab page number is in the [range]. It works like doing this: > :tabfirst :{cmd} :tabnext :{cmd} etc. < This only operates in the current window of each tab page. When an error is detected on one tab page, further tab pages will not be visited. The last tab page (or where an error occurred) becomes the current tab page. {cmd} can contain '|' to concatenate several commands. {cmd} must not open or close tab pages or reorder them. Also see |:windo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo| and |:lfdo|. ============================================================================== 3. Other items *tab-page-other* *tabline-menu* The GUI tab pages line has a popup menu. It is accessed with a right click. The entries are: Close Close the tab page under the mouse pointer. The current one if there is no label under the mouse pointer. New Tab Open a tab page, editing an empty buffer. It appears to the left of the mouse pointer. Open Tab... Like "New Tab" and additionally use a file selector to select a file to edit. Diff mode works per tab page. You can see the diffs between several files within one tab page. Other tab pages can show differences between other files. Variables local to a tab page start with "t:". |tabpage-variable| Currently there is only one option local to a tab page: 'cmdheight'. *tabnew-autocmd* The TabLeave and TabEnter autocommand events can be used to do something when switching from one tab page to another. The exact order depends on what you are doing. When creating a new tab page this works as if you create a new window on the same buffer and then edit another buffer. Thus ":tabnew" triggers: WinLeave leave current window TabLeave leave current tab page WinEnter enter window in new tab page TabEnter enter new tab page BufLeave leave current buffer BufEnter enter new empty buffer When switching to another tab page the order is: BufLeave WinLeave TabLeave WinEnter TabEnter BufEnter When entering a new tab page (|:tabnew|), TabNew is triggered before TabEnter and after WinEnter. ============================================================================== 4. Setting 'tabline' *setting-tabline* The 'tabline' option specifies what the line with tab pages labels looks like. It is only used when there is no GUI tab line. You can use the 'showtabline' option to specify when you want the line with tab page labels to appear: never, when there is more than one tab page or always. The highlighting of the tab pages line is set with the groups TabLine TabLineSel and TabLineFill. |hl-TabLine| |hl-TabLineSel| |hl-TabLineFill| A "+" will be shown for a tab page that has a modified window. The number of windows in a tabpage is also shown. Thus "3+" means three windows and one of them has a modified buffer. The 'tabline' option allows you to define your preferred way to tab pages labels. This isn't easy, thus an example will be given here. For basics see the 'statusline' option. The same items can be used in the 'tabline' option. Additionally, the |tabpagebuflist()|, |tabpagenr()| and |tabpagewinnr()| functions are useful. Since the number of tab labels will vary, you need to use an expression for the whole option. Something like: > :set tabline=%!MyTabLine() Then define the MyTabLine() function to list all the tab pages labels. A convenient method is to split it in two parts: First go over all the tab pages and define labels for them. Then get the label for each tab page. > function MyTabLine() let s = '' for i in range(tabpagenr('$')) " select the highlighting if i + 1 == tabpagenr() let s .= '%#TabLineSel#' else let s .= '%#TabLine#' endif " set the tab page number (for mouse clicks) let s .= '%' . (i + 1) . 'T' " the label is made by MyTabLabel() let s .= ' %{MyTabLabel(' . (i + 1) . ')} ' endfor " after the last tab fill with TabLineFill and reset tab page nr let s .= '%#TabLineFill#%T' " right-align the label to close the current tab page if tabpagenr('$') > 1 let s .= '%=%#TabLine#%999Xclose' endif return s endfunction Now the MyTabLabel() function is called for each tab page to get its label. > function MyTabLabel(n) let buflist = tabpagebuflist(a:n) let winnr = tabpagewinnr(a:n) return bufname(buflist[winnr - 1]) endfunction This is just a simplistic example that results in a tab pages line that resembles the default, but without adding a + for a modified buffer or truncating the names. You will want to reduce the width of labels in a clever way when there is not enough room. Check the 'columns' option for the space available. ============================================================================== 5. Setting 'guitablabel' *setting-guitablabel* When the GUI tab pages line is displayed, 'guitablabel' can be used to specify the label to display for each tab page. Unlike 'tabline', which specifies the whole tab pages line at once, 'guitablabel' is used for each label separately. 'guitabtooltip' is very similar and is used for the tooltip of the same label. This only appears when the mouse pointer hovers over the label, thus it usually is longer. Only supported on some systems though. See the 'statusline' option for the format of the value. The "%N" item can be used for the current tab page number. The |v:lnum| variable is also set to this number when the option is evaluated. The items that use a file name refer to the current window of the tab page. Note that syntax highlighting is not used for the option. The %T and %X items are also ignored. A simple example that puts the tab page number and the buffer name in the label: > :set guitablabel=%N\ %f An example that resembles the default 'guitablabel': Show the number of windows in the tab page and a '+' if there is a modified buffer: > function GuiTabLabel() let label = '' let bufnrlist = tabpagebuflist(v:lnum) " Add '+' if one of the buffers in the tab page is modified for bufnr in bufnrlist if getbufvar(bufnr, "&modified") let label = '+' break endif endfor " Append the number of windows in the tab page if more than one let wincount = tabpagewinnr(v:lnum, '$') if wincount > 1 let label .= wincount endif if label != '' let label .= ' ' endif " Append the buffer name return label . bufname(bufnrlist[tabpagewinnr(v:lnum) - 1]) endfunction set guitablabel=%{GuiTabLabel()} Note that the function must be defined before setting the option, otherwise you get an error message for the function not being known. If you want to fall back to the default label, return an empty string. If you want to show something specific for a tab page, you might want to use a tab page local variable. |t:var| vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/tagsrch.txt����������������������������������������������������������������0000664�0000000�0000000�00000104327�13204015742�0017441�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*tagsrch.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar Tags and special searches *tags-and-searches* See section |29.1| of the user manual for an introduction. Type |gO| to see the table of contents. ============================================================================== 1. Jump to a tag *tag-commands* *tag* *tags* A tag is an identifier that appears in a "tags" file. It is a sort of label that can be jumped to. For example: In C programs each function name can be used as a tag. The "tags" file has to be generated by a program like ctags, before the tag commands can be used. With the ":tag" command the cursor will be positioned on the tag. With the CTRL-] command, the keyword on which the cursor is standing is used as the tag. If the cursor is not on a keyword, the first keyword to the right of the cursor is used. The ":tag" command works very well for C programs. If you see a call to a function and wonder what that function does, position the cursor inside of the function name and hit CTRL-]. This will bring you to the function definition. An easy way back is with the CTRL-T command. Also read about the tag stack below. *:ta* *:tag* *E426* *E429* :[count]ta[g][!] {ident} Jump to the definition of {ident}, using the information in the tags file(s). Put {ident} in the tag stack. See |tag-!| for [!]. {ident} can be a regexp pattern, see |tag-regexp|. When there are several matching tags for {ident}, jump to the [count] one. When [count] is omitted the first one is jumped to. See |tag-matchlist| for jumping to other matching tags. g<LeftMouse> *g<LeftMouse>* <C-LeftMouse> *<C-LeftMouse>* *CTRL-]* CTRL-] Jump to the definition of the keyword under the cursor. Same as ":tag {ident}", where {ident} is the keyword under or after cursor. When there are several matching tags for {ident}, jump to the [count] one. When no [count] is given the first one is jumped to. See |tag-matchlist| for jumping to other matching tags. *v_CTRL-]* {Visual}CTRL-] Same as ":tag {ident}", where {ident} is the text that is highlighted. *telnet-CTRL-]* CTRL-] is the default telnet escape key. When you type CTRL-] to jump to a tag, you will get the telnet prompt instead. Most versions of telnet allow changing or disabling the default escape key. See the telnet man page. You can 'telnet -E {Hostname}' to disable the escape character, or 'telnet -e {EscapeCharacter} {Hostname}' to specify another escape character. If possible, try to use "ssh" instead of "telnet" to avoid this problem. *tag-priority* When there are multiple matches for a tag, this priority is used: 1. "FSC" A full matching static tag for the current file. 2. "F C" A full matching global tag for the current file. 3. "F " A full matching global tag for another file. 4. "FS " A full matching static tag for another file. 5. " SC" An ignore-case matching static tag for the current file. 6. " C" An ignore-case matching global tag for the current file. 7. " " An ignore-case matching global tag for another file. 8. " S " An ignore-case matching static tag for another file. Note that when the current file changes, the priority list is mostly not changed, to avoid confusion when using ":tnext". It is changed when using ":tag {ident}". The ignore-case matches are not found for a ":tag" command when: - the 'ignorecase' option is off and 'tagcase' is "followic" - 'tagcase' is "match" - 'tagcase' is "smart" and the pattern contains an upper case character. - 'tagcase' is "followscs" and 'smartcase' option is on and the pattern contains an upper case character. The ignore-case matches are found when: - a pattern is used (starting with a "/") - for ":tselect" - when 'tagcase' is "followic" and 'ignorecase' is off - when 'tagcase' is "match" - when 'tagcase' is "followscs" and the 'smartcase' option is off Note that using ignore-case tag searching disables binary searching in the tags file, which causes a slowdown. This can be avoided by fold-case sorting the tag file. See the 'tagbsearch' option for an explanation. ============================================================================== 2. Tag stack *tag-stack* *tagstack* *E425* On the tag stack is remembered which tags you jumped to, and from where. Tags are only pushed onto the stack when the 'tagstack' option is set. g<RightMouse> *g<RightMouse>* <C-RightMouse> *<C-RightMouse>* *CTRL-T* CTRL-T Jump to [count] older entry in the tag stack (default 1). *:po* *:pop* *E555* *E556* :[count]po[p][!] Jump to [count] older entry in tag stack (default 1). See |tag-!| for [!]. :[count]ta[g][!] Jump to [count] newer entry in tag stack (default 1). See |tag-!| for [!]. *:tags* :tags Show the contents of the tag stack. The active entry is marked with a '>'. The output of ":tags" looks like this: # TO tag FROM line in file/text 1 1 main 1 harddisk2:text/vim/test > 2 2 FuncA 58 i = FuncA(10); 3 1 FuncC 357 harddisk2:text/vim/src/amiga.c This list shows the tags that you jumped to and the cursor position before that jump. The older tags are at the top, the newer at the bottom. The '>' points to the active entry. This is the tag that will be used by the next ":tag" command. The CTRL-T and ":pop" command will use the position above the active entry. Below the "TO" is the number of the current match in the match list. Note that this doesn't change when using ":pop" or ":tag". The line number and file name are remembered to be able to get back to where you were before the tag command. The line number will be correct, also when deleting/inserting lines, unless this was done by another program (e.g. another instance of Vim). For the current file, the "file/text" column shows the text at the position. An indent is removed and a long line is truncated to fit in the window. You can jump to previously used tags with several commands. Some examples: ":pop" or CTRL-T to position before previous tag {count}CTRL-T to position before {count} older tag ":tag" to newer tag ":0tag" to last used tag The most obvious way to use this is while browsing through the call graph of a program. Consider the following call graph: main ---> FuncA ---> FuncC ---> FuncB (Explanation: main calls FuncA and FuncB; FuncA calls FuncC). You can get from main to FuncA by using CTRL-] on the call to FuncA. Then you can CTRL-] to get to FuncC. If you now want to go back to main you can use CTRL-T twice. Then you can CTRL-] to FuncB. If you issue a ":ta {ident}" or CTRL-] command, this tag is inserted at the current position in the stack. If the stack was full (it can hold up to 20 entries), the oldest entry is deleted and the older entries shift one position up (their index number is decremented by one). If the last used entry was not at the bottom, the entries below the last used one are deleted. This means that an old branch in the call graph is lost. After the commands explained above the tag stack will look like this: # TO tag FROM line in file/text 1 1 main 1 harddisk2:text/vim/test 2 1 FuncB 59 harddisk2:text/vim/src/main.c *E73* When you try to use the tag stack while it doesn't contain anything you will get an error message. ============================================================================== 3. Tag match list *tag-matchlist* *E427* *E428* When there are several matching tags, these commands can be used to jump between them. Note that these commands don't change the tag stack, they keep the same entry. *:ts* *:tselect* :ts[elect][!] [ident] List the tags that match [ident], using the information in the tags file(s). When [ident] is not given, the last tag name from the tag stack is used. See |tag-!| for [!]. With a '>' in the first column is indicated which is the current position in the list (if there is one). [ident] can be a regexp pattern, see |tag-regexp|. See |tag-priority| for the priorities used in the listing. Example output: > nr pri kind tag file 1 F f mch_delay os_amiga.c mch_delay(msec, ignoreinput) > 2 F f mch_delay os_msdos.c mch_delay(msec, ignoreinput) 3 F f mch_delay os_unix.c mch_delay(msec, ignoreinput) Enter nr of choice (<CR> to abort): < See |tag-priority| for the "pri" column. Note that this depends on the current file, thus using ":tselect xxx" can produce different results. The "kind" column gives the kind of tag, if this was included in the tags file. The "info" column shows information that could be found in the tags file. It depends on the program that produced the tags file. When the list is long, you may get the |more-prompt|. If you already see the tag you want to use, you can type 'q' and enter the number. *:sts* *:stselect* :sts[elect][!] [ident] Does ":tselect[!] [ident]" and splits the window for the selected tag. *g]* g] Like CTRL-], but use ":tselect" instead of ":tag". *v_g]* {Visual}g] Same as "g]", but use the highlighted text as the identifier. *:tj* *:tjump* :tj[ump][!] [ident] Like ":tselect", but jump to the tag directly when there is only one match. *:stj* *:stjump* :stj[ump][!] [ident] Does ":tjump[!] [ident]" and splits the window for the selected tag. *g_CTRL-]* g CTRL-] Like CTRL-], but use ":tjump" instead of ":tag". *v_g_CTRL-]* {Visual}g CTRL-] Same as "g CTRL-]", but use the highlighted text as the identifier. *:tn* *:tnext* :[count]tn[ext][!] Jump to [count] next matching tag (default 1). See |tag-!| for [!]. *:tp* *:tprevious* :[count]tp[revious][!] Jump to [count] previous matching tag (default 1). See |tag-!| for [!]. *:tN* *:tNext* :[count]tN[ext][!] Same as ":tprevious". *:tr* *:trewind* :[count]tr[ewind][!] Jump to first matching tag. If [count] is given, jump to [count]th matching tag. See |tag-!| for [!]. *:tf* *:tfirst* :[count]tf[irst][!] Same as ":trewind". *:tl* *:tlast* :tl[ast][!] Jump to last matching tag. See |tag-!| for [!]. *:lt* *:ltag* :lt[ag][!] [ident] Jump to tag [ident] and add the matching tags to a new location list for the current window. [ident] can be a regexp pattern, see |tag-regexp|. When [ident] is not given, the last tag name from the tag stack is used. The search pattern to locate the tag line is prefixed with "\V" to escape all the special characters (very nomagic). The location list showing the matching tags is independent of the tag stack. See |tag-!| for [!]. When there is no other message, Vim shows which matching tag has been jumped to, and the number of matching tags: > tag 1 of 3 or more The " or more" is used to indicate that Vim didn't try all the tags files yet. When using ":tnext" a few times, or with ":tlast", more matches may be found. When you didn't see this message because of some other message, or you just want to know where you are, this command will show it again (and jump to the same tag as last time): > :0tn < *tag-skip-file* When a matching tag is found for which the file doesn't exist, this match is skipped and the next matching tag is used. Vim reports this, to notify you of missing files. When the end of the list of matches has been reached, an error message is given. *tag-preview* The tag match list can also be used in the preview window. The commands are the same as above, with a "p" prepended. {not available when compiled without the |+quickfix| feature} *:pts* *:ptselect* :pts[elect][!] [ident] Does ":tselect[!] [ident]" and shows the new tag in a "Preview" window. See |:ptag| for more info. *:ptj* *:ptjump* :ptj[ump][!] [ident] Does ":tjump[!] [ident]" and shows the new tag in a "Preview" window. See |:ptag| for more info. *:ptn* *:ptnext* :[count]ptn[ext][!] ":tnext" in the preview window. See |:ptag|. *:ptp* *:ptprevious* :[count]ptp[revious][!] ":tprevious" in the preview window. See |:ptag|. *:ptN* *:ptNext* :[count]ptN[ext][!] Same as ":ptprevious". *:ptr* *:ptrewind* :[count]ptr[ewind][!] ":trewind" in the preview window. See |:ptag|. *:ptf* *:ptfirst* :[count]ptf[irst][!] Same as ":ptrewind". *:ptl* *:ptlast* :ptl[ast][!] ":tlast" in the preview window. See |:ptag|. ============================================================================== 4. Tags details *tag-details* *static-tag* A static tag is a tag that is defined for a specific file. In a C program this could be a static function. In Vi jumping to a tag sets the current search pattern. This means that the "n" command after jumping to a tag does not search for the same pattern that it did before jumping to the tag. Vim does not do this as we consider it to be a bug. You can still find the tag search pattern in the search history. If you really want the old Vi behavior, set the 't' flag in 'cpoptions'. *tag-binary-search* Vim uses binary searching in the tags file to find the desired tag quickly (when enabled at compile time |+tag_binary|). But this only works if the tags file was sorted on ASCII byte value. Therefore, if no match was found, another try is done with a linear search. If you only want the linear search, reset the 'tagbsearch' option. Or better: Sort the tags file! Note that the binary searching is disabled when not looking for a tag with a specific name. This happens when ignoring case and when a regular expression is used that doesn't start with a fixed string. Tag searching can be a lot slower then. The former can be avoided by case-fold sorting the tags file. See 'tagbsearch' for details. *tag-regexp* The ":tag" and ":tselect" commands accept a regular expression argument. See |pattern| for the special characters that can be used. When the argument starts with '/', it is used as a pattern. If the argument does not start with '/', it is taken literally, as a full tag name. Examples: > :tag main < jumps to the tag "main" that has the highest priority. > :tag /^get < jumps to the tag that starts with "get" and has the highest priority. > :tag /norm < lists all the tags that contain "norm", including "id_norm". When the argument both exists literally, and match when used as a regexp, a literal match has a higher priority. For example, ":tag /open" matches "open" before "open_file" and "file_open". When using a pattern case is ignored. If you want to match case use "\C" in the pattern. *tag-!* If the tag is in the current file this will always work. Otherwise the performed actions depend on whether the current file was changed, whether a ! is added to the command and on the 'autowrite' option: tag in file autowrite ~ current file changed ! option action ~ ----------------------------------------------------------------------------- yes x x x goto tag no no x x read other file, goto tag no yes yes x abandon current file, read other file, goto tag no yes no on write current file, read other file, goto tag no yes no off fail ----------------------------------------------------------------------------- - If the tag is in the current file, the command will always work. - If the tag is in another file and the current file was not changed, the other file will be made the current file and read into the buffer. - If the tag is in another file, the current file was changed and a ! is added to the command, the changes to the current file are lost, the other file will be made the current file and read into the buffer. - If the tag is in another file, the current file was changed and the 'autowrite' option is on, the current file will be written, the other file will be made the current file and read into the buffer. - If the tag is in another file, the current file was changed and the 'autowrite' option is off, the command will fail. If you want to save the changes, use the ":w" command and then use ":tag" without an argument. This works because the tag is put on the stack anyway. If you want to lose the changes you can use the ":tag!" command. *tag-security* Note that Vim forbids some commands, for security reasons. This works like using the 'secure' option for exrc/vimrc files in the current directory. See |trojan-horse| and |sandbox|. When the {tagaddress} changes a buffer, you will get a warning message: "WARNING: tag command changed a buffer!!!" In a future version changing the buffer will be impossible. All this for security reasons: Somebody might hide a nasty command in the tags file, which would otherwise go unnoticed. Example: > :$d|/tag-function-name/ In Vi the ":tag" command sets the last search pattern when the tag is searched for. In Vim this is not done, the previous search pattern is still remembered, unless the 't' flag is present in 'cpoptions'. The search pattern is always put in the search history, so you can modify it if searching fails. *tags-option* The 'tags' option is a list of file names. Each of these files is searched for the tag. This can be used to use a different tags file than the default file "tags". It can also be used to access a common tags file. The next file in the list is not used when: - A matching static tag for the current buffer has been found. - A matching global tag has been found. This also depends on whether case is ignored. Case is ignored when: - 'tagcase' is "followic" and 'ignorecase' is set - 'tagcase' is "ignore" - 'tagcase' is "smart" and the pattern only contains lower case characters. - 'tagcase' is "followscs" and 'smartcase' is set and the pattern only contains lower case characters. If case is not ignored, and the tags file only has a match without matching case, the next tags file is searched for a match with matching case. If no tag with matching case is found, the first match without matching case is used. If case is ignored, and a matching global tag with or without matching case is found, this one is used, no further tags files are searched. When a tag file name starts with "./", the '.' is replaced with the path of the current file. This makes it possible to use a tags file in the directory where the current file is (no matter what the current directory is). The idea of using "./" is that you can define which tag file is searched first: In the current directory ("tags,./tags") or in the directory of the current file ("./tags,tags"). For example: > :set tags=./tags,tags,/home/user/commontags In this example the tag will first be searched for in the file "tags" in the directory where the current file is. Next the "tags" file in the current directory. If it is not found there, then the file "/home/user/commontags" will be searched for the tag. This can be switched off by including the 'd' flag in 'cpoptions', to make it Vi compatible. "./tags" will then be the tags file in the current directory, instead of the tags file in the directory where the current file is. Instead of the comma a space may be used. Then a backslash is required for the space to be included in the string option: > :set tags=tags\ /home/user/commontags To include a space in a file name use three backslashes. To include a comma in a file name use two backslashes. For example, use: > :set tags=tag\\\ file,/home/user/common\\,tags for the files "tag file" and "/home/user/common,tags". The 'tags' option will have the value "tag\ file,/home/user/common\,tags". If the 'tagrelative' option is on (which is the default) and using a tag file in another directory, file names in that tag file are relative to the directory where the tag file is. ============================================================================== 5. Tags file format *tags-file-format* *E431* *ctags* *jtags* A tags file can be created with an external command, for example "ctags". It will contain a tag for each function. Some versions of "ctags" will also make a tag for each "#defined" macro, typedefs, enums, etc. Some programs that generate tags files: ctags As found on most Unix systems. Only supports C. Only does the basic work. *Exuberant_ctags* exuberant ctags This a very good one. It works for C, C++, Java, Fortran, Eiffel and others. It can generate tags for many items. See http://ctags.sourceforge.net. JTags For Java, in Java. It can be found at http://www.fleiner.com/jtags/. ptags.py For Python, in Python. Found in your Python source directory at Tools/scripts/ptags.py. ptags For Perl, in Perl. It can be found at http://www.eleves.ens.fr:8080/home/nthiery/Tags/. gnatxref For Ada. See http://www.gnuada.org/. gnatxref is part of the gnat package. The lines in the tags file must have one of these three formats: 1. {tagname} {TAB} {tagfile} {TAB} {tagaddress} 2. {tagfile}:{tagname} {TAB} {tagfile} {TAB} {tagaddress} 3. {tagname} {TAB} {tagfile} {TAB} {tagaddress} {term} {field} .. The first is a normal tag, which is completely compatible with Vi. It is the only format produced by traditional ctags implementations. This is often used for functions that are global, also referenced in other files. The lines in the tags file can end in <LF> or <CR><LF>. On the Macintosh <CR> also works. The <CR> and <NL> characters can never appear inside a line. *tag-old-static* The second format is for a static tag only. It is obsolete now, replaced by the third format. It is only supported by Elvis 1.x and Vim and a few versions of ctags. A static tag is often used for functions that are local, only referenced in the file {tagfile}. Note that for the static tag, the two occurrences of {tagfile} must be exactly the same. Also see |tags-option| below, for how static tags are used. The third format is new. It includes additional information in optional fields at the end of each line. It is backwards compatible with Vi. It is only supported by new versions of ctags (such as Exuberant ctags). {tagname} The identifier. Normally the name of a function, but it can be any identifier. It cannot contain a <Tab>. {TAB} One <Tab> character. Note: previous versions allowed any white space here. This has been abandoned to allow spaces in {tagfile}. It can be re-enabled by including the |+tag_any_white| feature at compile time. *tag-any-white* {tagfile} The file that contains the definition of {tagname}. It can have an absolute or relative path. It may contain environment variables and wildcards (although the use of wildcards is doubtful). It cannot contain a <Tab>. {tagaddress} The Ex command that positions the cursor on the tag. It can be any Ex command, although restrictions apply (see |tag-security|). Posix only allows line numbers and search commands, which are mostly used. {term} ;" The two characters semicolon and double quote. This is interpreted by Vi as the start of a comment, which makes the following be ignored. This is for backwards compatibility with Vi, it ignores the following fields. {field} .. A list of optional fields. Each field has the form: <Tab>{fieldname}:{value} The {fieldname} identifies the field, and can only contain alphabetical characters [a-zA-Z]. The {value} is any string, but cannot contain a <Tab>. These characters are special: "\t" stands for a <Tab> "\r" stands for a <CR> "\n" stands for a <NL> "\\" stands for a single '\' character There is one field that doesn't have a ':'. This is the kind of the tag. It is handled like it was preceded with "kind:". See the documentation of ctags for the kinds it produces. The only other field currently recognized by Vim is "file:" (with an empty value). It is used for a static tag. The first lines in the tags file can contain lines that start with !_TAG_ These are sorted to the first lines, only rare tags that start with "!" can sort to before them. Vim recognizes two items. The first one is the line that indicates if the file was sorted. When this line is found, Vim uses binary searching for the tags file: !_TAG_FILE_SORTED<Tab>1<Tab>{anything} ~ A tag file may be case-fold sorted to avoid a linear search when case is ignored. (Case is ignored when 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is "ignore".) See 'tagbsearch' for details. The value '2' should be used then: !_TAG_FILE_SORTED<Tab>2<Tab>{anything} ~ The other tag that Vim recognizes, but only when compiled with the |+multi_byte| feature, is the encoding of the tags file: !_TAG_FILE_ENCODING<Tab>utf-8<Tab>{anything} ~ Here "utf-8" is the encoding used for the tags. Vim will then convert the tag being searched for from 'encoding' to the encoding of the tags file. And when listing tags the reverse happens. When the conversion fails the unconverted tag is used. *tag-search* The command can be any Ex command, but often it is a search command. Examples: tag1 file1 /^main(argc, argv)/ ~ tag2 file2 108 ~ The command is always executed with 'magic' not set. The only special characters in a search pattern are "^" (begin-of-line) and "$" (<EOL>). See |pattern|. Note that you must put a backslash before each backslash in the search text. This is for backwards compatibility with Vi. *E434* *E435* If the command is a normal search command (it starts and ends with "/" or "?"), some special handling is done: - Searching starts on line 1 of the file. The direction of the search is forward for "/", backward for "?". Note that 'wrapscan' does not matter, the whole file is always searched. (Vi does use 'wrapscan', which caused tags sometimes not be found.) - If the search fails, another try is done ignoring case. If that fails too, a search is done for: "^tagname[ \t]*(" (the tag with '^' prepended and "[ \t]*(" appended). When using function names, this will find the function name when it is in column 0. This will help when the arguments to the function have changed since the tags file was made. If this search also fails another search is done with: "^[#a-zA-Z_].*\<tagname[ \t]*(" This means: A line starting with '#' or an identifier and containing the tag followed by white space and a '('. This will find macro names and function names with a type prepended. ============================================================================== 6. Include file searches *include-search* *definition-search* *E387* *E388* *E389* These commands look for a string in the current file and in all encountered included files (recursively). This can be used to find the definition of a variable, function or macro. If you only want to search in the current buffer, use the commands listed at |pattern-searches|. These commands are not available when the |+find_in_path| feature was disabled at compile time. When a line is encountered that includes another file, that file is searched before continuing in the current buffer. Files included by included files are also searched. When an include file could not be found it is silently ignored. Use the |:checkpath| command to discover which files could not be found, possibly your 'path' option is not set up correctly. Note: the included file is searched, not a buffer that may be editing that file. Only for the current file the lines in the buffer are used. The string can be any keyword or a defined macro. For the keyword any match will be found. For defined macros only lines that match with the 'define' option will be found. The default is "^#\s*define", which is for C programs. For other languages you probably want to change this. See 'define' for an example for C++. The string cannot contain an end-of-line, only matches within a line are found. When a match is found for a defined macro, the displaying of lines continues with the next line when a line ends in a backslash. The commands that start with "[" start searching from the start of the current file. The commands that start with "]" start at the current cursor position. The 'include' option is used to define a line that includes another file. The default is "\^#\s*include", which is for C programs. Note: Vim does not recognize C syntax, if the 'include' option matches a line inside "#ifdef/#endif" or inside a comment, it is searched anyway. The 'isfname' option is used to recognize the file name that comes after the matched pattern. The 'path' option is used to find the directory for the include files that do not have an absolute path. The 'comments' option is used for the commands that display a single line or jump to a line. It defines patterns that may start a comment. Those lines are ignored for the search, unless [!] is used. One exception: When the line matches the pattern "^# *define" it is not considered to be a comment. If you want to list matches, and then select one to jump to, you could use a mapping to do that for you. Here is an example: > :map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR> < *[i* [i Display the first line that contains the keyword under the cursor. The search starts at the beginning of the file. Lines that look like a comment are ignored (see 'comments' option). If a count is given, the count'th matching line is displayed, and comment lines are not ignored. *]i* ]i like "[i", but start at the current cursor position. *:is* *:isearch* :[range]is[earch][!] [count] [/]pattern[/] Like "[i" and "]i", but search in [range] lines (default: whole file). See |:search-args| for [/] and [!]. *[I* [I Display all lines that contain the keyword under the cursor. Filenames and line numbers are displayed for the found lines. The search starts at the beginning of the file. *]I* ]I like "[I", but start at the current cursor position. *:il* *:ilist* :[range]il[ist][!] [/]pattern[/] Like "[I" and "]I", but search in [range] lines (default: whole file). See |:search-args| for [/] and [!]. *[_CTRL-I* [ CTRL-I Jump to the first line that contains the keyword under the cursor. The search starts at the beginning of the file. Lines that look like a comment are ignored (see 'comments' option). If a count is given, the count'th matching line is jumped to, and comment lines are not ignored. *]_CTRL-I* ] CTRL-I like "[ CTRL-I", but start at the current cursor position. *:ij* *:ijump* :[range]ij[ump][!] [count] [/]pattern[/] Like "[ CTRL-I" and "] CTRL-I", but search in [range] lines (default: whole file). See |:search-args| for [/] and [!]. CTRL-W CTRL-I *CTRL-W_CTRL-I* *CTRL-W_i* CTRL-W i Open a new window, with the cursor on the first line that contains the keyword under the cursor. The search starts at the beginning of the file. Lines that look like a comment line are ignored (see 'comments' option). If a count is given, the count'th matching line is jumped to, and comment lines are not ignored. *:isp* *:isplit* :[range]isp[lit][!] [count] [/]pattern[/] Like "CTRL-W i" and "CTRL-W i", but search in [range] lines (default: whole file). See |:search-args| for [/] and [!]. *[d* [d Display the first macro definition that contains the macro under the cursor. The search starts from the beginning of the file. If a count is given, the count'th matching line is displayed. *]d* ]d like "[d", but start at the current cursor position. *:ds* *:dsearch* :[range]ds[earch][!] [count] [/]string[/] Like "[d" and "]d", but search in [range] lines (default: whole file). See |:search-args| for [/] and [!]. *[D* [D Display all macro definitions that contain the macro under the cursor. Filenames and line numbers are displayed for the found lines. The search starts from the beginning of the file. *]D* ]D like "[D", but start at the current cursor position. *:dli* *:dlist* :[range]dli[st][!] [/]string[/] Like `[D` and `]D`, but search in [range] lines (default: whole file). See |:search-args| for [/] and [!]. Note that `:dl` works like `:delete` with the "l" flag, not `:dlist`. *[_CTRL-D* [ CTRL-D Jump to the first macro definition that contains the keyword under the cursor. The search starts from the beginning of the file. If a count is given, the count'th matching line is jumped to. *]_CTRL-D* ] CTRL-D like "[ CTRL-D", but start at the current cursor position. *:dj* *:djump* :[range]dj[ump][!] [count] [/]string[/] Like "[ CTRL-D" and "] CTRL-D", but search in [range] lines (default: whole file). See |:search-args| for [/] and [!]. CTRL-W CTRL-D *CTRL-W_CTRL-D* *CTRL-W_d* CTRL-W d Open a new window, with the cursor on the first macro definition line that contains the keyword under the cursor. The search starts from the beginning of the file. If a count is given, the count'th matching line is jumped to. *:dsp* *:dsplit* :[range]dsp[lit][!] [count] [/]string[/] Like "CTRL-W d", but search in [range] lines (default: whole file). See |:search-args| for [/] and [!]. *:che* *:checkpath* :che[ckpath] List all the included files that could not be found. :che[ckpath]! List all the included files. *:search-args* Common arguments for the commands above: [!] When included, find matches in lines that are recognized as comments. When excluded, a match is ignored when the line is recognized as a comment (according to 'comments'), or the match is in a C comment (after "//" or inside /* */). Note that a match may be missed if a line is recognized as a comment, but the comment ends halfway the line. And if the line is a comment, but it is not recognized (according to 'comments') a match may be found in it anyway. Example: > /* comment foobar */ < A match for "foobar" is found, because this line is not recognized as a comment (even though syntax highlighting does recognize it). Note: Since a macro definition mostly doesn't look like a comment, the [!] makes no difference for ":dlist", ":dsearch" and ":djump". [/] A pattern can be surrounded by '/'. Without '/' only whole words are matched, using the pattern "\<pattern\>". Only after the second '/' a next command can be appended with '|'. Example: > :isearch /string/ | echo "the last one" < For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern is used as a literal string, not as a search pattern. vim:tw=78:ts=8:ft=help:norl: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/term.txt�������������������������������������������������������������������0000664�0000000�0000000�00000060130�13204015742�0016746�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*term.txt* Nvim NVIM REFERENCE MANUAL Terminal UI *tui* Nvim (except in |--headless| mode) uses information about the terminal you are using to present a built-in UI. If that information is not correct, the screen may be messed up or keys may not be recognized. Type |gO| to see the table of contents. ============================================================================== Startup *startup-terminal* Nvim (except in |--headless| mode) guesses a terminal type when it starts. |$TERM| is the primary hint that determines the terminal type. *terminfo* *E557* *E558* *E559* The terminfo database is used if available. The Unibilium library (used by Nvim to read terminfo) allows you to override the system terminfo with one in $HOME/.terminfo/ directory, in part or in whole. Building your own terminfo is usually as simple as running this as a non-superuser: > curl -LO http://invisible-island.net/datafiles/current/terminfo.src.gz gunzip terminfo.src.gz tic terminfo.src < *$TERM* The $TERM environment variable must match the terminal you are using! Otherwise Nvim cannot know what sequences your terminal expects, and weird or sub-optimal behavior will result (scrolling quirks, wrong colors, etc.). $TERM is also important because it is mirrored by SSH to the remote session, unlike other common client-end environment variables ($COLORTERM, $XTERM_VERSION, $VTE_VERSION, $KONSOLE_PROFILE_NAME, $TERM_PROGRAM, ...). For this terminal Set $TERM to |builtin-terms| ------------------------------------------------------------------------- iTerm (original) iterm, iTerm.app N iTerm2 (new capabilities) iterm2, iTerm2.app Y anything libvte-based vte, vte-256color Y (e.g. GNOME Terminal) (aliases: gnome, gnome-256color) tmux tmux, tmux-256color Y screen screen, screen-256color Y PuTTY putty, putty-256color Y Terminal.app nsterm N Linux virtual terminal linux, linux-256color Y *builtin-terms* *builtin_terms* If a |terminfo| database is not available, or no entry for the terminal type is found in that database, Nvim will use a compiled-in mini-database of terminfo entries for "xterm", "putty", "screen", "tmux", "rxvt", "iterm", "interix", "linux", "st", "vte", "gnome", and "ansi". The lookup matches the initial portion of the terminal type, so (for example) "putty-256color" and "putty" will both be mapped to the built-in "putty" entry. The built-in terminfo entries describe the terminal as 256-colour capable if possible. See |tui-colors|. If no built-in terminfo record matches the terminal type, the built-in "ansi" terminfo record is used as a final fallback. The built-in mini-database is not combined with an external terminfo database, nor can it be used in preference to one. You can thus entirely override any omissions or out-of-date information in the built-in terminfo database by supplying an external one with entries for the terminal type. Settings depending on terminal *term-dependent-settings* If you want to set terminal-dependent options or mappings, you can do this in your init.vim. Example: > if $TERM =~ '^\(rxvt\|screen\|interix\|putty\)\(-.*\)\?$' set notermguicolors elseif $TERM =~ '^\(tmux\|iterm\|vte\|gnome\)\(-.*\)\?$' set termguicolors elseif $TERM =~ '^\(xterm\)\(-.*\)\?$' if $XTERM_VERSION != '' set termguicolors elseif $KONSOLE_PROFILE_NAME != '' set termguicolors elseif $VTE_VERSION != '' set termguicolors else set notermguicolors endif elseif $TERM =~ ... ... and so forth ... endif < *scroll-region* *xterm-scroll-region* Where possible, Nvim will use the terminal's ability to set a scroll region in order to redraw faster when a window is scrolled. If the terminal's terminfo description describes an ability to set top and bottom scroll margins, that is used. This will not speed up scrolling in a window that is not the full width of the terminal. Xterm has an extra ability, not described by terminfo, to set left and right scroll margins as well. If Nvim detects that the terminal is Xterm, it will make use of this ability to speed up scrolling that is not the full width of the terminal. This ability is only present in genuine Xterm, not in the many terminal emulators that incorrectly describe themselves as xterm. Nvim's detection of genuine Xterm will not work over an SSH connection, because the environment variable, set by genuine Xterm, that it looks for is not automatically replicated over an SSH login session. *tui-colors* Nvim uses 256 colours by default, ignoring |terminfo| for most terminal types, including "linux" (whose virtual terminals have had 256-colour support since 4.8) and anything claiming to be "xterm". Also when $COLORTERM or $TERM contain the string "256". Nvim similarly assumes that any terminal emulator that sets $COLORTERM to any value, is capable of at least 16-colour operation. *true-color* *xterm-true-color* Nvim emits true (24-bit) colours in the terminal, if 'termguicolors' is set. It uses the "setrgbf" and "setrgbb" |terminfo| extensions (proposed by Rüdiger Sonderfeld in 2013). If your terminfo definition is missing them, then Nvim will decide whether to add them to your terminfo definition, using the ISO 8613-6:1994/ITU T.416:1993 control sequences for setting RGB colours (but modified to use semicolons instead of colons unless the terminal is known to follow the standard). Another convention, pioneered in 2016 by tmux, is the "Tc" terminfo extension. If terminfo has this flag, Nvim will add constructed "setrgbf" and "setrgbb" capabilities as if they had been in the terminfo definition. If terminfo does not (yet) have this flag, Nvim will fall back to $TERM and other environment variables. It will add constructed "setrgbf" and "setrgbb" capabilities in the case of the the "rxvt", "linux", "st", "tmux", and "iterm" terminal types, or when Konsole, genuine Xterm, a libvte terminal emulator version 0.36 or later, or a terminal emulator that sets the COLORTERM environment variable to "truecolor" is detected. *xterm-resize* Nvim can resize the terminal display on some terminals that implement an extension pioneered by dtterm. |terminfo| does not have a flag for this extension. So Nvim simply assumes that (all) "dtterm", "xterm", "teraterm", "rxvt" terminal types, and Konsole, are capable of this. *tui-cursor-shape* Nvim will adjust the shape of the cursor from a block to a line when in insert mode (or as specified by the 'guicursor' option), on terminals that support it. It uses the same |terminfo| extensions that were pioneered by tmux for this: "Ss" and "Se". If your terminfo definition is missing them, then Nvim will decide whether to add them to your terminfo definition, by looking at $TERM and other environment variables. For the "rxvt", "putty", "linux", "screen", "teraterm", and "iterm" terminal types, or when Konsole, a libvte-based terminal emulator, or genuine Xterm are detected, it will add constructed "Ss" and "Se" capabilities. Note: Sometimes it will appear that Nvim when run within tmux is not changing the cursor, but in fact it is tmux receiving instructions from Nvim to change the cursor and not knowing what to do in turn. tmux has to translate what it receives from Nvim into whatever control sequence is appropriate for the terminal that it is outputting to. It shares a common mechanism with Nvim, of using the "Ss" and "Se" capabilities from terminfo (for the output terminal) if they are present. Unlike Nvim, if they are not present in terminfo you must add them by setting "terminal-overrides" in ~/.tmux.conf . See the tmux(1) manual page for the details of how and what to do in the tmux configuration file. It will look something like: > set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' <or (alas!) for Konsole specifically, something more complex like: > set -ga terminal-overrides 'xterm*:\E]50;CursorShape=%?%p1%{3}%<%t%{0}%e%{1}%;%d\007' < *cs7-problem* Note: If the terminal settings are changed after running Vim, you might have an illegal combination of settings. This has been reported on Solaris 2.5 with "stty cs8 parenb", which is restored as "stty cs7 parenb". Use "stty cs8 -parenb -istrip" instead, this is restored correctly. Many cursor key codes start with an <Esc>. Vim must find out if this is a single hit of the <Esc> key or the start of a cursor key sequence. It waits for a next character to arrive. If it does not arrive within one second a single <Esc> is assumed. On very slow systems this may fail, causing cursor keys not to work sometimes. If you discover this problem reset the 'timeout' option. Vim will wait for the next character to arrive after an <Esc>. If you want to enter a single <Esc> you must type it twice. Some terminals have confusing codes for the cursor keys. The televideo 925 is such a terminal. It sends a CTRL-H for cursor-left. This would make it impossible to distinguish a backspace and cursor-left. To avoid this problem CTRL-H is never recognized as cursor-left. *vt100-cursor-keys* *xterm-cursor-keys* Other terminals (e.g., vt100 and xterm) have cursor keys that send <Esc>OA, <Esc>OB, etc. Unfortunately these are valid commands in insert mode: Stop insert, Open a new line above the new one, start inserting 'A', 'B', etc. Instead of performing these commands Vim will erroneously recognize this typed key sequence as a cursor key movement. To avoid this and make Vim do what you want in either case you could use these settings: > :set notimeout " don't timeout on mappings :set ttimeout " do timeout on terminal key codes :set timeoutlen=100 " timeout after 100 msec This requires the key-codes to be sent within 100 msec in order to recognize them as a cursor key. When you type you normally are not that fast, so they are recognized as individual typed commands, even though Vim receives the same sequence of bytes. ============================================================================== Window size *window-size* [This is about the size of the whole window Vim is using, not a window that is created with the ":split" command.] On Unix systems, three methods are tried to get the window size: - an ioctl call (TIOCGSIZE or TIOCGWINSZ, depends on your system) - the environment variables "LINES" and "COLUMNS" - from the |terminfo| entries "lines" and "columns" If everything fails a default size of 24 lines and 80 columns is assumed. If a window-resize signal is received the size will be set again. If the window size is wrong you can use the 'lines' and 'columns' options to set the correct values. See |:mode|. ============================================================================== Slow and fast terminals *slow-fast-terminal* *slow-terminal* If you have a fast terminal you may like to set the 'ruler' option. The cursor position is shown in the status line. If you are using horizontal scrolling ('wrap' option off) consider setting 'sidescroll' to a small number. If you have a slow terminal you may want to reset the 'showcmd' and 'ruler' options. The command characters and cursor positions will not be shown in the status line (which involves a lot of cursor motions and attribute changes for every keypress or movement). If the terminal scrolls very slowly, set the 'scrolljump' to 5 or so. If the cursor is moved off the screen (e.g., with "j") Vim will scroll 5 lines at a time. Another possibility is to reduce the number of lines that Vim uses with the command "z{height}<CR>". If the characters from the terminal are arriving with more than 1 second between them you might want to set the 'timeout' and/or 'ttimeout' option. See the "Options" chapter |options|. If you are using a color terminal that is slow when displaying lines beyond the end of a buffer, this is because Nvim is drawing the whitespace twice, in two sets of colours and attributes. To prevent this, use this command: > hi NonText cterm=NONE ctermfg=NONE This draws the spaces with the default colours and attributes, which allows the second pass of drawing to be optimized away. Note: Although in theory the colours of whitespace are immaterial, in practice they change the colours of cursors and selections that cross them. This may have a visible, but minor, effect on some UIs. ============================================================================== Using the mouse *mouse-using* This section is about using the mouse on a terminal or a terminal window. How to use the mouse in a GUI window is explained in |gui-mouse|. For scrolling with a mouse wheel see |scroll-mouse-wheel|. These characters in the 'mouse' option tell in which situations the mouse will be used by Vim: n Normal mode v Visual mode i Insert mode c Command-line mode h all previous modes when in a help file a all previous modes r for |hit-enter| prompt If you only want to use the mouse in a few modes or also want to use it for the two questions you will have to concatenate the letters for those modes. For example: > :set mouse=nv Will make the mouse work in Normal mode and Visual mode. > :set mouse=h Will make the mouse work in help files only (so you can use "g<LeftMouse>" to jump to tags). Whether the selection that is started with the mouse is in Visual mode or Select mode depends on whether "mouse" is included in the 'selectmode' option. In an xterm, with the currently active mode included in the 'mouse' option, normal mouse clicks are used by Vim, mouse clicks with the shift or ctrl key pressed go to the xterm. With the currently active mode not included in 'mouse' all mouse clicks go to the xterm. *xterm-clipboard* The middle mouse button will insert the unnamed register. In that case, here is how you copy and paste a piece of text: Copy/paste with the mouse and Visual mode ('mouse' option must be set, see above): 1. Press left mouse button on first letter of text, move mouse pointer to last letter of the text and release the button. This will start Visual mode and highlight the selected area. 2. Press "y" to yank the Visual text in the unnamed register. 3. Click the left mouse button at the insert position. 4. Click the middle mouse button. Shortcut: If the insert position is on the screen at the same time as the Visual text, you can do 2, 3 and 4 all in one: Click the middle mouse button at the insert position. *xterm-copy-paste* NOTE: In some (older) xterms, it's not possible to move the cursor past column 95 or 223. This is an xterm problem, not Vim's. Get a newer xterm |color-xterm|. Copy/paste in xterm with (current mode NOT included in 'mouse'): 1. Press left mouse button on first letter of text, move mouse pointer to last letter of the text and release the button. 2. Use normal Vim commands to put the cursor at the insert position. 3. Press "a" to start Insert mode. 4. Click the middle mouse button. 5. Press ESC to end Insert mode. (The same can be done with anything in 'mouse' if you keep the shift key pressed while using the mouse.) Note: if you lose the 8th bit when pasting (special characters are translated into other characters), you may have to do "stty cs8 -istrip -parenb" in your shell before starting Vim. Thus in an xterm the shift and ctrl keys cannot be used with the mouse. Mouse commands requiring the CTRL modifier can be simulated by typing the "g" key before using the mouse: "g<LeftMouse>" is "<C-LeftMouse> (jump to tag under mouse click) "g<RightMouse>" is "<C-RightMouse> ("CTRL-T") *bracketed-paste-mode* Bracketed paste mode allows terminal applications to distinguish between typed text and pasted text. Thus you can paste text without Nvim trying to format or indent the text. See also https://cirw.in/blog/bracketed-paste Nvim enables bracketed paste by default. If it does not work in your terminal, try the 'paste' option instead. *mouse-mode-table* *mouse-overview* A short overview of what the mouse buttons do, when 'mousemodel' is "extend": Normal Mode: event position selection change action ~ cursor window ~ <LeftMouse> yes end yes <C-LeftMouse> yes end yes "CTRL-]" (2) <S-LeftMouse> yes no change yes "*" (2) *<S-LeftMouse>* <LeftDrag> yes start or extend (1) no *<LeftDrag>* <LeftRelease> yes start or extend (1) no <MiddleMouse> yes if not active no put <MiddleMouse> yes if active no yank and put <RightMouse> yes start or extend yes <A-RightMouse> yes start or extend blockw. yes *<A-RightMouse>* <S-RightMouse> yes no change yes "#" (2) *<S-RightMouse>* <C-RightMouse> no no change no "CTRL-T" <RightDrag> yes extend no *<RightDrag>* <RightRelease> yes extend no *<RightRelease>* Insert or Replace Mode: event position selection change action ~ cursor window ~ <LeftMouse> yes (cannot be active) yes <C-LeftMouse> yes (cannot be active) yes "CTRL-O^]" (2) <S-LeftMouse> yes (cannot be active) yes "CTRL-O*" (2) <LeftDrag> yes start or extend (1) no like CTRL-O (1) <LeftRelease> yes start or extend (1) no like CTRL-O (1) <MiddleMouse> no (cannot be active) no put register <RightMouse> yes start or extend yes like CTRL-O <A-RightMouse> yes start or extend blockw. yes <S-RightMouse> yes (cannot be active) yes "CTRL-O#" (2) <C-RightMouse> no (cannot be active) no "CTRL-O CTRL-T" In a help window: event position selection change action ~ cursor window ~ <2-LeftMouse> yes (cannot be active) no "^]" (jump to help tag) When 'mousemodel' is "popup", these are different: Normal Mode: event position selection change action ~ cursor window ~ <S-LeftMouse> yes start or extend (1) no <A-LeftMouse> yes start or extend blockw. no *<A-LeftMouse>* <RightMouse> no popup menu no Insert or Replace Mode: event position selection change action ~ cursor window ~ <S-LeftMouse> yes start or extend (1) no like CTRL-O (1) <A-LeftMouse> yes start or extend blockw. no <RightMouse> no popup menu no (1) only if mouse pointer moved since press (2) only if click is in same buffer Clicking the left mouse button causes the cursor to be positioned. If the click is in another window that window is made the active window. When editing the command-line the cursor can only be positioned on the command-line. When in Insert mode Vim remains in Insert mode. If 'scrolloff' is set, and the cursor is positioned within 'scrolloff' lines from the window border, the text is scrolled. A selection can be started by pressing the left mouse button on the first character, moving the mouse to the last character, then releasing the mouse button. You will not always see the selection until you release the button, only in some versions (GUI, Windows) will the dragging be shown immediately. Note that you can make the text scroll by moving the mouse at least one character in the first/last line in the window when 'scrolloff' is non-zero. In Normal, Visual and Select mode clicking the right mouse button causes the Visual area to be extended. When 'mousemodel' is "popup", the left button has to be used while keeping the shift key pressed. When clicking in a window which is editing another buffer, the Visual or Select mode is stopped. In Normal, Visual and Select mode clicking the right mouse button with the alt key pressed causes the Visual area to become blockwise. When 'mousemodel' is "popup" the left button has to be used with the alt key. Note that this won't work on systems where the window manager consumes the mouse events when the alt key is pressed (it may move the window). *double-click* Double, triple and quadruple clicks are supported when the GUI is active, for Windows and for an xterm. For selecting text, extra clicks extend the selection: click select ~ double word or % match *<2-LeftMouse>* triple line *<3-LeftMouse>* quadruple rectangular block *<4-LeftMouse>* Exception: In a Help window a double click jumps to help for the word that is clicked on. A double click on a word selects that word. 'iskeyword' is used to specify which characters are included in a word. A double click on a character that has a match selects until that match (like using "v%"). If the match is an #if/#else/#endif block, the selection becomes linewise. For MS-DOS and xterm the time for double clicking can be set with the 'mousetime' option. For the other systems this time is defined outside of Vim. An example, for using a double click to jump to the tag under the cursor: > :map <2-LeftMouse> :exe "tag ". expand("<cword>")<CR> Dragging the mouse with a double click (button-down, button-up, button-down and then drag) will result in whole words to be selected. This continues until the button is released, at which point the selection is per character again. In Insert mode, when a selection is started, Vim goes into Normal mode temporarily. When Visual or Select mode ends, it returns to Insert mode. This is like using CTRL-O in Insert mode. Select mode is used when the 'selectmode' option contains "mouse". *drag-status-line* When working with several windows, the size of the windows can be changed by dragging the status line with the mouse. Point the mouse at a status line, press the left button, move the mouse to the new position of the status line, release the button. Just clicking the mouse in a status line makes that window the current window, without moving the cursor. If by selecting a window it will change position or size, the dragging of the status line will look confusing, but it will work (just try it). *<MiddleRelease>* *<MiddleDrag>* Mouse clicks can be mapped. The codes for mouse clicks are: code mouse button normal action ~ <LeftMouse> left pressed set cursor position <LeftDrag> left moved while pressed extend selection <LeftRelease> left released set selection end <MiddleMouse> middle pressed paste text at cursor position <MiddleDrag> middle moved while pressed - <MiddleRelease> middle released - <RightMouse> right pressed extend selection <RightDrag> right moved while pressed extend selection <RightRelease> right released set selection end <X1Mouse> X1 button pressed - *X1Mouse* <X1Drag> X1 moved while pressed - *X1Drag* <X1Release> X1 button release - *X1Release* <X2Mouse> X2 button pressed - *X2Mouse* <X2Drag> X2 moved while pressed - *X2Drag* <X2Release> X2 button release - *X2Release* The X1 and X2 buttons refer to the extra buttons found on some mice. The 'Microsoft Explorer' mouse has these buttons available to the right thumb. Currently X1 and X2 only work on Win32 and X11 environments. Examples: > :noremap <MiddleMouse> <LeftMouse><MiddleMouse> Paste at the position of the middle mouse button click (otherwise the paste would be done at the cursor position). > :noremap <LeftRelease> <LeftRelease>y Immediately yank the selection, when using Visual mode. Note the use of ":noremap" instead of "map" to avoid a recursive mapping. > :map <X1Mouse> <C-O> :map <X2Mouse> <C-I> Map the X1 and X2 buttons to go forwards and backwards in the jump list, see |CTRL-O| and |CTRL-I|. *mouse-swap-buttons* To swap the meaning of the left and right mouse buttons: > :noremap <LeftMouse> <RightMouse> :noremap <LeftDrag> <RightDrag> :noremap <LeftRelease> <RightRelease> :noremap <RightMouse> <LeftMouse> :noremap <RightDrag> <LeftDrag> :noremap <RightRelease> <LeftRelease> :noremap g<LeftMouse> <C-RightMouse> :noremap g<RightMouse> <C-LeftMouse> :noremap! <LeftMouse> <RightMouse> :noremap! <LeftDrag> <RightDrag> :noremap! <LeftRelease> <RightRelease> :noremap! <RightMouse> <LeftMouse> :noremap! <RightDrag> <LeftDrag> :noremap! <RightRelease> <LeftRelease> < vim:tw=78:ts=8:ft=help:norl: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/tips.txt�������������������������������������������������������������������0000664�0000000�0000000�00000037662�13204015742�0016774�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*tips.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar Tips and ideas for using Vim *tips* These are just a few that we thought would be helpful for many users. You can find many more tips on the wiki. The URL can be found on http://www.vim.org Don't forget to browse the user manual, it also contains lots of useful tips |usr_toc.txt|. Type |gO| to see the table of contents. ============================================================================== Editing C programs *C-editing* There are quite a few features in Vim to help you edit C program files. Here is an overview with tags to jump to: |usr_29.txt| Moving through programs chapter in the user manual. |usr_30.txt| Editing programs chapter in the user manual. |C-indenting| Automatically set the indent of a line while typing text. |=| Re-indent a few lines. |format-comments| Format comments. |:checkpath| Show all recursively included files. |[i| Search for identifier under cursor in current and included files. |[_CTRL-I| Jump to match for "[i" |[I| List all lines in current and included files where identifier under the cursor matches. |[d| Search for define under cursor in current and included files. |CTRL-]| Jump to tag under cursor (e.g., definition of a function). |CTRL-T| Jump back to before a CTRL-] command. |:tselect| Select one tag out of a list of matching tags. |gd| Go to Declaration of local variable under cursor. |gD| Go to Declaration of global variable under cursor. |gf| Go to file name under the cursor. |%| Go to matching (), {}, [], /* */, #if, #else, #endif. |[/| Go to previous start of comment. |]/| Go to next end of comment. |[#| Go back to unclosed #if, #ifdef, or #else. |]#| Go forward to unclosed #else or #endif. |[(| Go back to unclosed '(' |])| Go forward to unclosed ')' |[{| Go back to unclosed '{' |]}| Go forward to unclosed '}' |v_ab| Select "a block" from "[(" to "])", including braces |v_ib| Select "inner block" from "[(" to "])" |v_aB| Select "a block" from "[{" to "]}", including brackets |v_iB| Select "inner block" from "[{" to "]}" ============================================================================== Finding where identifiers are used *ident-search* You probably already know that |tags| can be used to jump to the place where a function or variable is defined. But sometimes you wish you could jump to all the places where a function or variable is being used. This is possible in two ways: 1. Using the |:grep| command. This should work on most Unix systems, but can be slow (it reads all files) and only searches in one directory. 2. Using ID utils. This is fast and works in multiple directories. It uses a database to store locations. You will need some additional programs for this to work. And you need to keep the database up to date. Using the GNU id-tools: What you need: - The GNU id-tools installed (mkid is needed to create ID and lid is needed to use the macros). - An identifier database file called "ID" in the current directory. You can create it with the shell command "mkid file1 file2 ..". Put this in your |init.vim|: > map _u :call ID_search()<Bar>execute "/\\<" . g:word . "\\>"<CR> map _n :n<Bar>execute "/\\<" . g:word . "\\>"<CR> function! ID_search() let g:word = expand("<cword>") let x = system("lid --key=none ". g:word) let x = substitute(x, "\n", " ", "g") execute "next " . x endfun To use it, place the cursor on a word, type "_u" and vim will load the file that contains the word. Search for the next occurrence of the word in the same file with "n". Go to the next file with "_n". This has been tested with id-utils-3.2 (which is the name of the id-tools archive file on your closest gnu-ftp-mirror). [the idea for this comes from Andreas Kutschera] ============================================================================== Scrolling in Insert mode *scroll-insert* If you are in insert mode and you want to see something that is just off the screen, you can use CTRL-X CTRL-E and CTRL-X CTRL-Y to scroll the screen. |i_CTRL-X_CTRL-E| To make this easier, you could use these mappings: > :inoremap <C-E> <C-X><C-E> :inoremap <C-Y> <C-X><C-Y> You then lose the ability to copy text from the line above/below the cursor |i_CTRL-E|. Also consider setting 'scrolloff' to a larger value, so that you can always see some context around the cursor. If 'scrolloff' is bigger than half the window height, the cursor will always be in the middle and the text is scrolled when the cursor is moved up/down. ============================================================================== Smooth scrolling *scroll-smooth* If you like the scrolling to go a bit smoother, you can use these mappings: > :map <C-U> <C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y> :map <C-D> <C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E> ============================================================================== Correcting common typing mistakes *type-mistakes* When there are a few words that you keep on typing in the wrong way, make abbreviations that correct them. For example: > :ab teh the :ab fro for ============================================================================== Counting words, lines, etc. *count-items* To count how often any pattern occurs in the current buffer use the substitute command and add the 'n' flag to avoid the substitution. The reported number of substitutions is the number of items. Examples: > :%s/./&/gn characters :%s/\i\+/&/gn words :%s/^//n lines :%s/the/&/gn "the" anywhere :%s/\<the\>/&/gn "the" as a word You might want to reset 'hlsearch' or do ":nohlsearch". Add the 'e' flag if you don't want an error when there are no matches. An alternative is using |v_g_CTRL-G| in Visual mode. If you want to find matches in multiple files use |:vimgrep|. *count-bytes* If you want to count bytes, you can use this: Visually select the characters (block is also possible) Use "y" to yank the characters Use the strlen() function: > :echo strlen(@") A line break is counted for one byte. ============================================================================== Restoring the cursor position *restore-position* Sometimes you want to write a mapping that makes a change somewhere in the file and restores the cursor position, without scrolling the text. For example, to change the date mark in a file: > :map <F2> msHmtgg/Last [cC]hange:\s*/e+1<CR>"_D"=strftime("%Y %b %d")<CR>p'tzt`s Breaking up saving the position: ms store cursor position in the 's' mark H go to the first line in the window mt store this position in the 't' mark Breaking up restoring the position: 't go to the line previously at the top of the window zt scroll to move this line to the top of the window `s jump to the original position of the cursor For something more advanced see |winsaveview()| and |winrestview()|. ============================================================================== Renaming files *rename-files* Say I have a directory with the following files in them (directory picked at random :-): buffer.c charset.c digraph.c ... and I want to rename *.c *.bla. I'd do it like this: > $ vim :r !ls *.c :%s/\(.*\).c/mv & \1.bla :w !sh :q! ============================================================================== Change a name in multiple files *change-name* Example for using a script file to change a name in several files: Create a file "subs.vim" containing substitute commands and a :update command: > :%s/Jones/Smith/g :%s/Allen/Peter/g :update < Execute Vim on all files you want to change, and source the script for each argument: > vim *.let argdo source subs.vim See |:argdo|. ============================================================================== Speeding up external commands *speed-up* In some situations, execution of an external command can be very slow. This can also slow down wildcard expansion on Unix. Here are a few suggestions to increase the speed. If your .cshrc (or other file, depending on the shell used) is very long, you should separate it into a section for interactive use and a section for non-interactive use (often called secondary shells). When you execute a command from Vim like ":!ls", you do not need the interactive things (for example, setting the prompt). Put the stuff that is not needed after these lines: > if ($?prompt == 0) then exit 0 endif Another way is to include the "-f" flag in the 'shell' option, e.g.: > :set shell=csh\ -f (the backslash is needed to include the space in the option). This will make csh completely skip the use of the .cshrc file. This may cause some things to stop working though. ============================================================================== Useful mappings *useful-mappings* Here are a few mappings that some people like to use. *map-backtick* > :map ' ` Make the single quote work like a backtick. Puts the cursor on the column of a mark, instead of going to the first non-blank character in the line. *emacs-keys* For Emacs-style editing on the command-line: > " start of line :cnoremap <C-A> <Home> " back one character :cnoremap <C-B> <Left> " delete character under cursor :cnoremap <C-D> <Del> " end of line :cnoremap <C-E> <End> " forward one character :cnoremap <C-F> <Right> " recall newer command-line :cnoremap <C-N> <Down> " recall previous (older) command-line :cnoremap <C-P> <Up> " back one word :cnoremap <Esc><C-B> <S-Left> " forward one word :cnoremap <Esc><C-F> <S-Right> < *format-bullet-list* This mapping will format any bullet list. It requires that there is an empty line above and below each list entry. The expression commands are used to be able to give comments to the parts of the mapping. > :let m = ":map _f :set ai<CR>" " need 'autoindent' set :let m = m . "{O<Esc>" " add empty line above item :let m = m . "}{)^W" " move to text after bullet :let m = m . "i <CR> <Esc>" " add space for indent :let m = m . "gq}" " format text after the bullet :let m = m . "{dd" " remove the empty line :let m = m . "5lDJ" " put text after bullet :execute m |" define the mapping (<> notation |<>|. Note that this is all typed literally. ^W is "^" "W", not CTRL-W.) Note that the last comment starts with |", because the ":execute" command doesn't accept a comment directly. You also need to set 'textwidth' to a non-zero value, e.g., > :set tw=70 A mapping that does about the same, but takes the indent for the list from the first line (Note: this mapping is a single long line with a lot of spaces): > :map _f :set ai<CR>}{a <Esc>WWmmkD`mi<CR><Esc>kkddpJgq}'mJO<Esc>j < *collapse* These two mappings reduce a sequence of empty (;b) or blank (;n) lines into a single line > :map ;b GoZ<Esc>:g/^$/.,/./-j<CR>Gdd :map ;n GoZ<Esc>:g/^[ <Tab>]*$/.,/[^ <Tab>]/-j<CR>Gdd ============================================================================== Compressing the help files *gzip-helpfile* For those of you who are really short on disk space, you can compress the help files and still be able to view them with Vim. This makes accessing the help files a bit slower and requires the "gzip" program. (1) Compress all the help files: "gzip doc/*.txt". (2) Edit "doc/tags" and change the ".txt" to ".txt.gz": > :%s=\(\t.*\.txt\)\t=\1.gz\t= (3) Add this line to your vimrc: > set helpfile={dirname}/help.txt.gz Where {dirname} is the directory where the help files are. The |gzip| plugin will take care of decompressing the files. You must make sure that $VIMRUNTIME is set to where the other Vim files are, when they are not in the same location as the compressed "doc" directory. See |$VIMRUNTIME|. ============================================================================== Hex editing *hex-editing* *using-xxd* See section |23.3| of the user manual. If one has a particular extension that one uses for binary files (such as exe, bin, etc), you may find it helpful to automate the process with the following bit of autocmds for your |init.vim|. Change that "*.bin" to whatever comma-separated list of extension(s) you find yourself wanting to edit: > " vim -b : edit binary using xxd-format! augroup Binary au! au BufReadPre *.bin let &bin=1 au BufReadPost *.bin if &bin | %!xxd au BufReadPost *.bin set ft=xxd | endif au BufWritePre *.bin if &bin | %!xxd -r au BufWritePre *.bin endif au BufWritePost *.bin if &bin | %!xxd au BufWritePost *.bin set nomod | endif augroup END ============================================================================== Using <> notation in autocommands *autocmd-<>* The <> notation is not recognized in the argument of an :autocmd. To avoid having to use special characters, you could use a self-destroying mapping to get the <> notation and then call the mapping from the autocmd. Example: *map-self-destroy* > " This is for automatically adding the name of the file to the menu list. " It uses a self-destroying mapping! " 1. use a line in the buffer to convert the 'dots' in the file name to \. " 2. store that in register '"' " 3. add that name to the Buffers menu list " WARNING: this does have some side effects, like overwriting the " current register contents and removing any mapping for the "i" command. " autocmd BufNewFile,BufReadPre * nmap i :nunmap i<CR>O<C-R>%<Esc>:.g/\./s/\./\\./g<CR>0"9y$u:menu Buffers.<C-R>9 :buffer <C-R>%<C-V><CR><CR> autocmd BufNewFile,BufReadPre * normal i Another method, perhaps better, is to use the ":execute" command. In the string you can use the <> notation by preceding it with a backslash. Don't forget to double the number of existing backslashes and put a backslash before '"'. > autocmd BufNewFile,BufReadPre * exe "normal O\<C-R>%\<Esc>:.g/\\./s/\\./\\\\./g\<CR>0\"9y$u:menu Buffers.\<C-R>9 :buffer \<C-R>%\<C-V>\<CR>\<CR>" For a real buffer menu, user functions should be used (see |:function|), but then the <> notation isn't used, which defeats using it as an example here. ============================================================================== Highlighting matching parens *match-parens* This example shows the use of a few advanced tricks: - using the |CursorMoved| autocommand event - using |searchpairpos()| to find a matching paren - using |synID()| to detect whether the cursor is in a string or comment - using |:match| to highlight something - using a |pattern| to match a specific position in the file. This should be put in a Vim script file, since it uses script-local variables. It skips matches in strings or comments, unless the cursor started in string or comment. This requires syntax highlighting. A slightly more advanced version is used in the |matchparen| plugin. > let s:paren_hl_on = 0 function s:Highlight_Matching_Paren() if s:paren_hl_on match none let s:paren_hl_on = 0 endif let c_lnum = line('.') let c_col = col('.') let c = getline(c_lnum)[c_col - 1] let plist = split(&matchpairs, ':\|,') let i = index(plist, c) if i < 0 return endif if i % 2 == 0 let s_flags = 'nW' let c2 = plist[i + 1] else let s_flags = 'nbW' let c2 = c let c = plist[i - 1] endif if c == '[' let c = '\[' let c2 = '\]' endif let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . \ '=~? "string\\|comment"' execute 'if' s_skip '| let s_skip = 0 | endif' let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip) if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$') exe 'match Search /\(\%' . c_lnum . 'l\%' . c_col . \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' let s:paren_hl_on = 1 endif endfunction autocmd CursorMoved,CursorMovedI * call s:Highlight_Matching_Paren() autocmd InsertEnter * match none < vim:tw=78:ts=8:ft=help:norl: ������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/uganda.txt�����������������������������������������������������������������0000664�0000000�0000000�00000032754�13204015742�0017251�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*uganda.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar *uganda* *Uganda* *copying* *copyright* *license* SUMMARY *iccf* *ICCF* Vim is Charityware. You can use and copy it as much as you like, but you are encouraged to make a donation for needy children in Uganda. Please see |kcc| below or visit the ICCF web site, available at these URLs: http://iccf-holland.org/ http://www.vim.org/iccf/ http://www.iccf.nl/ You can also sponsor the development of Vim. Vim sponsors can vote for features. See |sponsor|. The money goes to Uganda anyway. The Open Publication License applies to the Vim documentation, see |manual-copyright|. === begin of license === VIM LICENSE I) There are no restrictions on distributing unmodified copies of Vim except that they must include this license text. You can also distribute unmodified parts of Vim, likewise unrestricted except that they must include this license text. You are also allowed to include executables that you made from the unmodified Vim sources, plus your own usage examples and Vim scripts. II) It is allowed to distribute a modified (or extended) version of Vim, including executables and/or source code, when the following four conditions are met: 1) This license text must be included unmodified. 2) The modified Vim must be distributed in one of the following five ways: a) If you make changes to Vim yourself, you must clearly describe in the distribution how to contact you. When the maintainer asks you (in any way) for a copy of the modified Vim you distributed, you must make your changes, including source code, available to the maintainer without fee. The maintainer reserves the right to include your changes in the official version of Vim. What the maintainer will do with your changes and under what license they will be distributed is negotiable. If there has been no negotiation then this license, or a later version, also applies to your changes. The current maintainer is Bram Moolenaar <Bram@vim.org>. If this changes it will be announced in appropriate places (most likely vim.sf.net, www.vim.org and/or comp.editors). When it is completely impossible to contact the maintainer, the obligation to send him your changes ceases. Once the maintainer has confirmed that he has received your changes they will not have to be sent again. b) If you have received a modified Vim that was distributed as mentioned under a) you are allowed to further distribute it unmodified, as mentioned at I). If you make additional changes the text under a) applies to those changes. c) Provide all the changes, including source code, with every copy of the modified Vim you distribute. This may be done in the form of a context diff. You can choose what license to use for new code you add. The changes and their license must not restrict others from making their own changes to the official version of Vim. d) When you have a modified Vim which includes changes as mentioned under c), you can distribute it without the source code for the changes if the following three conditions are met: - The license that applies to the changes permits you to distribute the changes to the Vim maintainer without fee or restriction, and permits the Vim maintainer to include the changes in the official version of Vim without fee or restriction. - You keep the changes for at least three years after last distributing the corresponding modified Vim. When the maintainer or someone who you distributed the modified Vim to asks you (in any way) for the changes within this period, you must make them available to him. - You clearly describe in the distribution how to contact you. This contact information must remain valid for at least three years after last distributing the corresponding modified Vim, or as long as possible. e) When the GNU General Public License (GPL) applies to the changes, you can distribute the modified Vim under the GNU GPL version 2 or any later version. 3) A message must be added, at least in the output of the ":version" command and in the intro screen, such that the user of the modified Vim is able to see that it was modified. When distributing as mentioned under 2)e) adding the message is only required for as far as this does not conflict with the license used for the changes. 4) The contact information as required under 2)a) and 2)d) must not be removed or changed, except that the person himself can make corrections. III) If you distribute a modified version of Vim, you are encouraged to use the Vim license for your changes and make them available to the maintainer, including the source code. The preferred way to do this is by e-mail or by uploading the files to a server and e-mailing the URL. If the number of changes is small (e.g., a modified Makefile) e-mailing a context diff will do. The e-mail address to be used is <maintainer@vim.org> IV) It is not allowed to remove this license from the distribution of the Vim sources, parts of it or from a modified version. You may use this license for previous Vim releases instead of the license that they came with, at your option. === end of license === Note: - If you are happy with Vim, please express that by reading the rest of this file and consider helping needy children in Uganda. - If you want to support further Vim development consider becoming a |sponsor|. The money goes to Uganda anyway. - According to Richard Stallman the Vim license is GNU GPL compatible. A few minor changes have been made since he checked it, but that should not make a difference. - If you link Vim with a library that goes under the GNU GPL, this limits further distribution to the GNU GPL. Also when you didn't actually change anything in Vim. - Once a change is included that goes under the GNU GPL, this forces all further changes to also be made under the GNU GPL or a compatible license. ============================================================================== Kibaale Children's Centre *kcc* *Kibaale* *charity* Kibaale Children's Centre (KCC) is located in Kibaale, a small town in the south of Uganda, near Tanzania, in East Africa. The area is known as Rakai District. The population is mostly farmers. Although people are poor, there is enough food. But this district is suffering from AIDS more than any other part of the world. Some say that it started there. Estimations are that 10 to 30% of the Ugandans are infected with HIV. Because parents die, there are many orphans. In this district about 60,000 children have lost one or both parents, out of a population of 350,000. And this is still continuing. The children need a lot of help. The KCC is working hard to provide the needy with food, medical care and education. Food and medical care to keep them healthy now, and education so that they can take care of themselves in the future. KCC works on a Christian base, but help is given to children of any religion. The key to solving the problems in this area is education. This has been neglected in the past years with president Idi Amin and the following civil wars. Now that the government is stable again, the children and parents have to learn how to take care of themselves and how to avoid infections. There is also help for people who are ill and hungry, but the primary goal is to prevent people from getting ill and to teach them how to grow healthy food. Most of the orphans are living in an extended family. An uncle or older sister is taking care of them. Because these families are big and the income (if any) is low, a child is lucky if it gets healthy food. Clothes, medical care and schooling is beyond its reach. To help these needy children, a sponsorship program was put into place. A child can be financially adopted. For a few dollars a month KCC sees to it that the child gets indispensable items, is healthy, goes to school and KCC takes care of anything else that needs to be done for the child and the family that supports it. Besides helping the child directly, the environment where the child grows up needs to be improved. KCC helps schools to improve their teaching methods. There is a demonstration school at the centre and teacher trainings are given. Health workers are being trained, hygiene education is carried out and households are stimulated to build a proper latrine. I helped setting up a production site for cement slabs. These are used to build a good latrine. They are sold below cost price. There is a small clinic at the project, which provides children and their family with medical help. When needed, transport to a hospital is offered. Immunization programs are carried out and help is provided when an epidemic is breaking out (measles and cholera have been a problem). *donate* Summer 1994 to summer 1995 I spent a whole year at the centre, working as a volunteer. I have helped to expand the centre and worked in the area of water and sanitation. I learned that the help that the KCC provides really helps. When I came back to Holland, I wanted to continue supporting KCC. To do this I'm raising funds and organizing the sponsorship program. Please consider one of these possibilities: 1. Sponsor a child in primary school: 17 euro a month (or more). 2. Sponsor a child in secondary school: 25 euro a month (or more). 3. Sponsor the clinic: Any amount a month or quarter 4. A one-time donation Compared with other organizations that do child sponsorship the amounts are very low. This is because the money goes directly to the centre. Less than 5% is used for administration. This is possible because this is a small organization that works with volunteers. If you would like to sponsor a child, you should have the intention to do this for at least one year. How do you know that the money will be spent right? First of all you have my personal guarantee as the author of Vim. I trust the people that are working at the centre, I know them personally. Furthermore, the centre has been co-sponsored and inspected by World Vision, Save the Children Fund and is now under the supervision of Pacific Academy Outreach Society. The centre is visited about once a year to check the progress (at our own cost). I have visited the centre myself many times, starting in 1993. The visit reports are on the ICCF web site. If you have any further questions, send me e-mail: <Bram@vim.org>. The address of the centre is: Kibaale Children's Centre p.o. box 1658 Masaka, Uganda, East Africa Sending money: *iccf-donations* Check the ICCF web site for the latest information! See |iccf| for the URL. USA: The methods mentioned below can be used. Sending a check to the Nehemiah Group Outreach Society (NGOS) is no longer possible, unfortunately. We are looking for another way to get you an IRS tax receipt. For sponsoring a child contact KCF in Canada (see below). US checks can be sent to them to lower banking costs. Canada: Contact Kibaale Children's Fund (KCF) in Surrey, Canada. They take care of the Canadian sponsors for the children in Kibaale. KCF forwards 100% of the money to the project in Uganda. You can send them a one time donation directly. Please send me a note so that I know what has been donated because of Vim. Ask KCF for information about sponsorship. Kibaale Children's Fund c/o Pacific Academy 10238-168 Street Surrey, B.C. V4N 1Z4 Canada Phone: 604-581-5353 If you make a donation to Kibaale Children's Fund (KCF) you will receive a tax receipt which can be submitted with your tax return. Holland: Transfer to the account of "Stichting ICCF Holland" in Lisse. This will allow for tax deduction if you live in Holland. Postbank, nr. 4548774 IBAN: NL95 INGB 0004 5487 74 Germany: It is possible to make donations that allow for a tax return. Check the ICCF web site for the latest information: http://iccf-holland.org/germany.html World: Use a postal money order. That should be possible from any country, mostly from the post office. Use this name (which is in my passport): "Abraham Moolenaar". Use Euro for the currency if possible. Europe: Use a bank transfer if possible. Your bank should have a form that you can use for this. See "Others" below for the swift code and IBAN number. Any other method should work. Ask for information about sponsorship. Credit Card: You can use PayPal to send money with a Credit card. This is the most widely used Internet based payment system. It's really simple to use. Use this link to find more info: https://www.paypal.com/en_US/mrb/pal=XAC62PML3GF8Q The e-mail address for sending the money to is: Bram@iccf-holland.org For amounts above 400 Euro ($500) sending a check is preferred. Others: Transfer to one of these accounts if possible: Postbank, account 4548774 Swift code: INGB NL 2A IBAN: NL95 INGB 0004 5487 74 under the name "stichting ICCF Holland", Lisse If that doesn't work: Rabobank Lisse, account 3765.05.117 Swift code: RABO NL 2U under the name "Bram Moolenaar", Lisse Otherwise, send a check in euro or US dollars to the address below. Minimal amount: $70 (my bank does not accept smaller amounts for foreign check, sorry) Address to send checks to: Bram Moolenaar Finsterruetihof 1 8134 Adliswil Switzerland This address is expected to be valid for a long time. vim:tw=78:ts=8:ft=help:norl: ��������������������neovim-0.2.2/runtime/doc/ui.txt���������������������������������������������������������������������0000664�0000000�0000000�00000026660�13204015742�0016426�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*ui.txt* Nvim NVIM REFERENCE MANUAL Nvim UI protocol *ui* Type |gO| to see the table of contents. ============================================================================== Introduction *ui-intro* GUIs can be implemented as external processes communicating with Nvim over the RPC API. The UI model consists of a terminal-like grid with a single, monospace font size. Some elements (UI "widgets") can be drawn separately from the grid ("externalized"). *ui-options* After connecting to Nvim (usually a spawned, embedded instance) use the |nvim_ui_attach| API method to tell Nvim that your program wants to draw the Nvim screen grid with a size of width × height cells. `options` must be a dictionary with these (optional) keys: `rgb` Decides the color format. Set true (default) for 24-bit RGB colors. Set false for terminal colors (max of 256). *ui-ext-options* `ext_popupmenu` Externalize the popupmenu. |ui-popupmenu| `ext_tabline` Externalize the tabline. |ui-tabline| `ext_cmdline` Externalize the cmdline. |ui-cmdline| `ext_wildmenu` Externalize the wildmenu. |ui-ext-wildmenu| Nvim will then send msgpack-rpc notifications, with the method name "redraw" and a single argument, an array of screen update events. Update events are tuples whose first element is the event name and remaining elements the event parameters. Events must be handled in order. The user should only see the updated screen state after all events in the same "redraw" batch are processed (not any intermediate state after processing only part of the array). Nvim sends |ui-global| and |ui-grid| events unconditionally; these suffice to implement a terminal-like interface. Nvim optionally sends screen elements "semantically" as structured events instead of raw grid-lines. Then the UI must decide how to present those elements itself; Nvim will not draw those elements on the grid. This is controlled by the |ui-ext-options|. Future versions of Nvim may add new update kinds and may append new parameters to existing update kinds. Clients must be prepared to ignore such extensions to be forward-compatible. |api-contract| ============================================================================== Global Events *ui-global* ["set_title", title] ["set_icon", icon] Set the window title, and icon (minimized) window title, respectively. In windowing systems not distinguishing between the two, "set_icon" can be ignored. ["mode_info_set", cursor_style_enabled, mode_info] `cursor_style_enabled` is a boolean indicating if the UI should set the cursor style. `mode_info` is a list of mode property maps. The current mode is given by the `mode_idx` field of the `mode_change` event. Each mode property map may contain these keys: KEY DESCRIPTION ~ `cursor_shape`: "block", "horizontal", "vertical" `cell_percentage`: Cell % occupied by the cursor. `blinkwait`, `blinkon`, `blinkoff`: See |cursor-blinking|. `hl_id`: Cursor highlight group. `hl_lm`: Cursor highlight group if 'langmap' is active. `short_name`: Mode code name, see 'guicursor'. `name`: Mode descriptive name. `mouse_shape`: (To be implemented.) Some keys are missing in some modes. ["mode_change", mode, mode_idx] The mode changed. The first parameter `mode` is a string representing the current mode. `mode_idx` is an index into the array received in the `mode_info_set` event. UIs should change the cursor style according to the properties specified in the corresponding item. The set of modes reported will change in new versions of Nvim, for instance more submodes and temporary states might be represented as separate modes. ["mouse_on"] ["mouse_off"] Tells the client whether mouse support, as determined by |'mouse'| option, is considered to be active in the current mode. This is mostly useful for a terminal frontend, or other situations where nvim mouse would conflict with other usages of the mouse. It is safe for a client to ignore this and always send mouse events. ["busy_on"] ["busy_off"] Nvim started or stopped being busy, and possibly not responsive to user input. This could be indicated to the user by hiding the cursor. ["suspend"] |:suspend| command or |Ctrl-Z| mapping is used. A terminal client (or other client where it makes sense) could suspend itself. Other clients can safely ignore it. ["update_menu"] The menu mappings changed. ["bell"] ["visual_bell"] Notify the user with an audible or visual bell, respectively. ============================================================================== Grid Events *ui-grid* ["resize", width, height] The grid is resized to `width` and `height` cells. ["clear"] Clear the grid. ["eol_clear"] Clear from the cursor position to the end of the current line. ["cursor_goto", row, col] Move the cursor to position (row, col). Currently, the same cursor is used to define the position for text insertion and the visible cursor. However, only the last cursor position, after processing the entire array in the "redraw" event, is intended to be a visible cursor position. ["update_fg", color] ["update_bg", color] ["update_sp", color] Set the default foreground, background and special colors respectively. *ui-event-highlight_set* ["highlight_set", attrs] Set the attributes that the next text put on the grid will have. `attrs` is a dict with the keys below. Any absent key is reset to its default value. Color defaults are set by the `update_fg` etc updates. All boolean keys default to false. `foreground`: foreground color. `background`: backround color. `special`: color to use for underline and undercurl, when present. `reverse`: reverse video. Foreground and background colors are switched. `italic`: italic text. `bold`: bold text. `underline`: underlined text. The line has `special` color. `undercurl`: undercurled text. The curl has `special` color. ["put", text] The (utf-8 encoded) string `text` is put at the cursor position (and the cursor is advanced), with the highlights as set by the last `highlight_set` update. ["set_scroll_region", top, bot, left, right] Define the scroll region used by `scroll` below. ["scroll", count] Scroll the text in the scroll region. The diagrams below illustrate what will happen, depending on the scroll direction. "=" is used to represent the SR(scroll region) boundaries and "-" the moved rectangles. Note that dst and src share a common region. If count is bigger than 0, move a rectangle in the SR up, this can happen while scrolling down. > +-------------------------+ | (clipped above SR) | ^ |=========================| dst_top | | dst (still in SR) | | +-------------------------+ src_top | | src (moved up) and dst | | |-------------------------| dst_bot | | src (cleared) | | +=========================+ src_bot < If count is less than zero, move a rectangle in the SR down, this can happen while scrolling up. > +=========================+ src_top | src (cleared) | | |------------------------ | dst_top | | src (moved down) and dst| | +-------------------------+ src_bot | | dst (still in SR) | | |=========================| dst_bot | | (clipped below SR) | v +-------------------------+ < ============================================================================== Popupmenu Events *ui-popupmenu* Only sent if `ext_popupmenu` option is set in |ui-options| ["popupmenu_show", items, selected, row, col] Show |popupmenu-completion|. `items` is an array of completion items to show; each item is an array of the form [word, kind, menu, info] as defined at |complete-items|, except that `word` is replaced by `abbr` if present. `selected` is the initially-selected item, a zero-based index into the array of items (-1 if no item is selected). `row` and `col` give the anchor position, where the first character of the completed word will be. ["popupmenu_select", selected] Select an item in the current popupmenu. `selected` is a zero-based index into the array of items from the last popupmenu_show event, or -1 if no item is selected. ["popupmenu_hide"] Hide the popupmenu. ============================================================================== Tabline Events *ui-tabline* Only sent if `ext_tabline` option is set in |ui-options| ["tabline_update", curtab, tabs] Tabline was updated. UIs should present this data in a custom tabline widget. curtab: Current Tabpage tabs: List of Dicts [{ "tab": Tabpage, "name": String }, ...] ============================================================================== Cmdline Events *ui-cmdline* Only sent if `ext_cmdline` option is set in |ui-options| ["cmdline_show", content, pos, firstc, prompt, indent, level] content: List of [attrs, string] [[{}, "t"], [attrs, "est"], ...] Triggered when the cmdline is displayed or changed. The `content` is the full content that should be displayed in the cmdline, and the `pos` is the position of the cursor that in the cmdline. The content is divided into chunks with different highlight attributes represented as a dict (see |ui-event-highlight_set|). `firstc` and `prompt` are text, that if non-empty should be displayed in front of the command line. `firstc` always indicates built-in command lines such as `:` (ex command) and `/` `?` (search), while `prompt` is an |input()| prompt. `indent` tells how many spaces the content should be indented. The Nvim command line can be invoked recursively, for instance by typing `<c-r>=` at the command line prompt. The `level` field is used to distinguish different command lines active at the same time. The first invoked command line has level 1, the next recursively-invoked prompt has level 2. A command line invoked from the |cmd-line-window| has a higher level than than the edited command line. ["cmdline_pos", pos, level] Change the cursor position in the cmdline. ["cmdline_special_char", c, shift, level] Display a special char in the cmdline at the cursor position. This is typically used to indicate a pending state, e.g. after |c_CTRL-V|. If `shift` is true the text after the cursor should be shifted, otherwise it should overwrite the char at the cursor. Should be hidden at next cmdline_show. ["cmdline_hide"] Hide the cmdline. ["cmdline_block_show", lines] Show a block of context to the current command line. For example if the user defines a |:function| interactively: > :function Foo() : echo "foo" : < `lines` is a list of lines of highlighted chunks, in the same form as the "cmdline_show" `contents` parameter. ["cmdline_block_append", line] Append a line at the end of the currently shown block. ["cmdline_block_hide"] Hide the block. ============================================================================== Wildmenu Events *ui-wildmenu* Only sent if `ext_wildmenu` option is set in |ui-options| ["wildmenu_show", items] Activate the wildmenu (command-line completion). `items` is an array with the completion items. ["wildmenu_select", selected] Select an item in the current wildmenu. `selected` is a zero-based index into the array of items from the last wildmenu_show event, or -1 if no item is selected. ["wildmenu_hide"] Hide the wildmenu. ============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: ��������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/undo.txt�������������������������������������������������������������������0000664�0000000�0000000�00000036315�13204015742�0016754�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*undo.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar Undo and redo *undo-redo* The basics are explained in section |02.5| of the user manual. Type |gO| to see the table of contents. ============================================================================== 1. Undo and redo commands *undo-commands* <Undo> or *undo* *<Undo>* *u* u Undo [count] changes. *:u* *:un* *:undo* :u[ndo] Undo one change. *E830* :u[ndo] {N} Jump to after change number {N}. See |undo-branches| for the meaning of {N}. *CTRL-R* CTRL-R Redo [count] changes which were undone. *:red* *:redo* *redo* :red[o] Redo one change which was undone. *U* U Undo all latest changes on one line, the line where the latest change was made. |U| itself also counts as a change, and thus |U| undoes a previous |U|. The last changes are remembered. You can use the undo and redo commands above to revert the text to how it was before each change. You can also apply the changes again, getting back the text before the undo. The "U" command is treated by undo/redo just like any other command. Thus a "u" command undoes a "U" command and a 'CTRL-R' command redoes it again. When mixing "U", "u" and 'CTRL-R' you will notice that the "U" command will restore the situation of a line to before the previous "U" command. This may be confusing. Try it out to get used to it. The "U" command will always mark the buffer as changed. When "U" changes the buffer back to how it was without changes, it is still considered changed. Use "u" to undo changes until the buffer becomes unchanged. ============================================================================== 2. Two ways of undo *undo-two-ways* How undo and redo commands work depends on the 'u' flag in 'cpoptions'. There is the Vim way ('u' excluded) and the Vi-compatible way ('u' included). In the Vim way, "uu" undoes two changes. In the Vi-compatible way, "uu" does nothing (undoes an undo). 'u' excluded, the Vim way: You can go back in time with the undo command. You can then go forward again with the redo command. If you make a new change after the undo command, the redo will not be possible anymore. 'u' included, the Vi-compatible way: The undo command undoes the previous change, and also the previous undo command. The redo command repeats the previous undo command. It does NOT repeat a change command, use "." for that. Examples Vim way Vi-compatible way ~ "uu" two times undo no-op "u CTRL-R" no-op two times undo Rationale: Nvi uses the "." command instead of CTRL-R. Unfortunately, this is not Vi compatible. For example "dwdwu." in Vi deletes two words, in Nvi it does nothing. ============================================================================== 3. Undo blocks *undo-blocks* One undo command normally undoes a typed command, no matter how many changes that command makes. This sequence of undo-able changes forms an undo block. Thus if the typed key(s) call a function, all the commands in the function are undone together. If you want to write a function or script that doesn't create a new undoable change but joins in with the previous change use this command: *:undoj* *:undojoin* *E790* :undoj[oin] Join further changes with the previous undo block. Warning: Use with care, it may prevent the user from properly undoing changes. Don't use this after undo or redo. This is most useful when you need to prompt the user halfway through a change. For example in a function that calls |getchar()|. Do make sure that there was a related change before this that you must join with. This doesn't work by itself, because the next key press will start a new change again. But you can do something like this: > :undojoin | delete After this an "u" command will undo the delete command and the previous change. To do the opposite, break a change into two undo blocks, in Insert mode use CTRL-G u. This is useful if you want an insert command to be undoable in parts. E.g., for each sentence. |i_CTRL-G_u| Setting the value of 'undolevels' also breaks undo. Even when the new value is equal to the old value. ============================================================================== 4. Undo branches *undo-branches* *undo-tree* Above we only discussed one line of undo/redo. But it is also possible to branch off. This happens when you undo a few changes and then make a new change. The undone changes become a branch. You can go to that branch with the following commands. This is explained in the user manual: |usr_32.txt|. *:undol* *:undolist* :undol[ist] List the leafs in the tree of changes. Example: number changes when saved ~ 88 88 2010/01/04 14:25:53 108 107 08/07 12:47:51 136 46 13:33:01 7 166 164 3 seconds ago The "number" column is the change number. This number continuously increases and can be used to identify a specific undo-able change, see |:undo|. The "changes" column is the number of changes to this leaf from the root of the tree. The "when" column is the date and time when this change was made. The four possible formats are: N seconds ago HH:MM:SS hour, minute, seconds MM/DD HH:MM:SS idem, with month and day YYYY/MM/DD HH:MM:SS idem, with year The "saved" column specifies, if this change was written to disk and which file write it was. This can be used with the |:later| and |:earlier| commands. For more details use the |undotree()| function. *g-* g- Go to older text state. With a count repeat that many times. *:ea* *:earlier* :earlier {count} Go to older text state {count} times. :earlier {N}s Go to older text state about {N} seconds before. :earlier {N}m Go to older text state about {N} minutes before. :earlier {N}h Go to older text state about {N} hours before. :earlier {N}d Go to older text state about {N} days before. :earlier {N}f Go to older text state {N} file writes before. When changes were made since the last write ":earlier 1f" will revert the text to the state when it was written. Otherwise it will go to the write before that. When at the state of the first file write, or when the file was not written, ":earlier 1f" will go to before the first change. *g+* g+ Go to newer text state. With a count repeat that many times. *:lat* *:later* :later {count} Go to newer text state {count} times. :later {N}s Go to newer text state about {N} seconds later. :later {N}m Go to newer text state about {N} minutes later. :later {N}h Go to newer text state about {N} hours later. :later {N}d Go to newer text state about {N} days later. :later {N}f Go to newer text state {N} file writes later. When at the state of the last file write, ":later 1f" will go to the newest text state. Note that text states will become unreachable when undo information is cleared for 'undolevels'. Don't be surprised when moving through time shows multiple changes to take place at a time. This happens when moving through the undo tree and then making a new change. EXAMPLE Start with this text: one two three ~ Delete the first word by pressing "x" three times: ne two three ~ e two three ~ two three ~ Now undo that by pressing "u" three times: e two three ~ ne two three ~ one two three ~ Delete the second word by pressing "x" three times: one wo three ~ one o three ~ one three ~ Now undo that by using "g-" three times: one o three ~ one wo three ~ two three ~ You are now back in the first undo branch, after deleting "one". Repeating "g-" will now bring you back to the original text: e two three ~ ne two three ~ one two three ~ Jump to the last change with ":later 1h": one three ~ And back to the start again with ":earlier 1h": one two three ~ Note that using "u" and CTRL-R will not get you to all possible text states while repeating "g-" and "g+" does. ============================================================================== 5. Undo persistence *undo-persistence* *persistent-undo* When unloading a buffer Vim normally destroys the tree of undos created for that buffer. By setting the 'undofile' option, Vim will automatically save your undo history when you write a file and restore undo history when you edit the file again. The 'undofile' option is checked after writing a file, before the BufWritePost autocommands. If you want to control what files to write undo information for, you can use a BufWritePre autocommand: > au BufWritePre /tmp/* setlocal noundofile Vim saves undo trees in a separate undo file, one for each edited file, using a simple scheme that maps filesystem paths directly to undo files. Vim will detect if an undo file is no longer synchronized with the file it was written for (with a hash of the file contents) and ignore it when the file was changed after the undo file was written, to prevent corruption. An undo file is also ignored if its owner differs from the owner of the edited file, except when the owner of the undo file is the current user. Set 'verbose' to get a message about that when opening a file. Location of the undo files is controlled by the 'undodir' option, by default they are saved to the dedicated directory in the application data folder. You can also save and restore undo histories by using ":wundo" and ":rundo" respectively: *:wundo* *:rundo* :wundo[!] {file} Write undo history to {file}. When {file} exists and it does not look like an undo file (the magic number at the start of the file is wrong), then this fails, unless the ! was added. If it exists and does look like an undo file it is overwritten. If there is no undo-history, nothing will be written. Implementation detail: Overwriting happens by first deleting the existing file and then creating a new file with the same name. So it is not possible to overwrite an existing undofile in a write-protected directory. :rundo {file} Read undo history from {file}. You can use these in autocommands to explicitly specify the name of the history file. E.g.: > au BufReadPost * call ReadUndo() au BufWritePost * call WriteUndo() func ReadUndo() if filereadable(expand('%:h'). '/UNDO/' . expand('%:t')) rundo %:h/UNDO/%:t endif endfunc func WriteUndo() let dirname = expand('%:h') . '/UNDO' if !isdirectory(dirname) call mkdir(dirname) endif wundo %:h/UNDO/%:t endfunc You should keep 'undofile' off, otherwise you end up with two undo files for every write. You can use the |undofile()| function to find out the file name that Vim would use. Note that while reading/writing files and 'undofile' is set most errors will be silent, unless 'verbose' is set. With :wundo and :rundo you will get more error messages, e.g., when the file cannot be read or written. NOTE: undo files are never deleted by Vim. You need to delete them yourself. Reading an existing undo file may fail for several reasons: *E822* It cannot be opened, because the file permissions don't allow it. *E823* The magic number at the start of the file doesn't match. This usually means it is not an undo file. *E824* The version number of the undo file indicates that it's written by a newer version of Vim. You need that newer version to open it. Don't write the buffer if you want to keep the undo info in the file. "File contents changed, cannot use undo info" The file text differs from when the undo file was written. This means the undo file cannot be used, it would corrupt the text. This also happens when 'encoding' differs from when the undo file was written. *E825* The undo file does not contain valid contents and cannot be used. "Not reading undo file, owner differs" The undo file is owned by someone else than the owner of the text file. For safety the undo file is not used. Writing an undo file may fail for these reasons: *E828* The file to be written cannot be created. Perhaps you do not have write permissions in the directory. "Cannot write undo file in any directory in 'undodir'" None of the directories in 'undodir' can be used. "Will not overwrite with undo file, cannot read" A file exists with the name of the undo file to be written, but it cannot be read. You may want to delete this file or rename it. "Will not overwrite, this is not an undo file" A file exists with the name of the undo file to be written, but it does not start with the right magic number. You may want to delete this file or rename it. "Skipping undo file write, nothing to undo" There is no undo information to be written, nothing has been changed or 'undolevels' is negative. *E829* An error occurred while writing the undo file. You may want to try again. ============================================================================== 6. Remarks about undo *undo-remarks* The number of changes that are remembered is set with the 'undolevels' option. If it is zero, the Vi-compatible way is always used. If it is negative no undo is possible. Use this if you are running out of memory. *clear-undo* When you set 'undolevels' to -1 the undo information is not immediately cleared, this happens at the next change. To force clearing the undo information you can use these commands: > :let old_undolevels = &undolevels :set undolevels=-1 :exe "normal a \<BS>\<Esc>" :let &undolevels = old_undolevels :unlet old_undolevels Marks for the buffer ('a to 'z) are also saved and restored, together with the text. When all changes have been undone, the buffer is not considered to be changed. It is then possible to exit Vim with ":q" instead of ":q!". Note that this is relative to the last write of the file. Typing "u" after ":w" actually changes the buffer, compared to what was written, so the buffer is considered changed then. When manual |folding| is being used, the folds are not saved and restored. Only changes completely within a fold will keep the fold as it was, because the first and last line of the fold don't change. The numbered registers can also be used for undoing deletes. Each time you delete text, it is put into register "1. The contents of register "1 are shifted to "2, etc. The contents of register "9 are lost. You can now get back the most recent deleted text with the put command: '"1P'. (also, if the deleted text was the result of the last delete or copy operation, 'P' or 'p' also works as this puts the contents of the unnamed register). You can get back the text of three deletes ago with '"3P'. *redo-register* If you want to get back more than one part of deleted text, you can use a special feature of the repeat command ".". It will increase the number of the register used. So if you first do ""1P", the following "." will result in a '"2P'. Repeating this will result in all numbered registers being inserted. Example: If you deleted text with 'dd....' it can be restored with '"1P....'. If you don't know in which register the deleted text is, you can use the :display command. An alternative is to try the first register with '"1P', and if it is not what you want do 'u.'. This will remove the contents of the first put, and repeat the put command for the second register. Repeat the 'u.' until you got what you want. vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_01.txt�����������������������������������������������������������������0000664�0000000�0000000�00000010047�13204015742�0017112�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_01.txt* Nvim VIM USER MANUAL - by Bram Moolenaar About the manuals This chapter introduces the manuals available with Vim. Read this to know the conditions under which the commands are explained. |01.1| Two manuals |01.2| Vim installed |01.3| Using the Vim tutor |01.4| Copyright Next chapter: |usr_02.txt| The first steps in Vim Table of contents: |usr_toc.txt| ============================================================================== *01.1* Two manuals The Vim documentation consists of two parts: 1. The User manual Task oriented explanations, from simple to complex. Reads from start to end like a book. 2. The Reference manual Precise description of how everything in Vim works. The notation used in these manuals is explained here: |notation| JUMPING AROUND The text contains hyperlinks between the two parts, allowing you to quickly jump between the description of an editing task and a precise explanation of the commands and options used for it. Use these two commands: Press CTRL-] to jump to a subject under the cursor. Press CTRL-O to jump back (repeat to go further back). Many links are in vertical bars, like this: |bars|. The bars themselves may be hidden or invisible, see below. An option name, like 'number', a command in double quotes like ":write" and any other word can also be used as a link. Try it out: Move the cursor to CTRL-] and press CTRL-] on it. Other subjects can be found with the ":help" command, see |help.txt|. The bars and stars are usually hidden with the |conceal| feature. They also use |hl-Ignore|, using the same color for the text as the background. You can make them visible with: > :set conceallevel=0 :hi link HelpBar Normal :hi link HelpStar Normal ============================================================================== *01.2* Vim installed *setup-vimrc_example* It's not required for this tutorial, but we provide an example vimrc you may use: :!cp -i $VIMRUNTIME/vimrc_example.vim ~/.config/nvim/init.vim If the file already exists you probably want to keep it. For more info see |vimrc|. ============================================================================== *01.3* Using the Vim tutor *tutor* *vimtutor* Instead of reading the text (boring!) you can use the vimtutor to learn your first Vim commands. This is a 30 minute tutorial that teaches the most basic Vim functionality hands-on. To start the tutorial, execute > :Tutor < from within nvim. The tutorial will lead you from that point. Have fun! ============================================================================== *01.4* Copyright *manual-copyright* The Vim user manual and reference manual are Copyright (c) 1988-2003 by Bram Moolenaar. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. The latest version is presently available at: http://www.opencontent.org/openpub/ People who contribute to the manuals must agree with the above copyright notice. *frombook* Parts of the user manual come from the book "Vi IMproved - Vim" by Steve Oualline (published by New Riders Publishing, ISBN: 0735710015). The Open Publication License applies to this book. Only selected parts are included and these have been modified (e.g., by removing the pictures, updating the text for Vim 6.0 and later, fixing mistakes). The omission of the |frombook| tag does not mean that the text does not come from the book. Many thanks to Steve Oualline and New Riders for creating this book and publishing it under the OPL! It has been a great help while writing the user manual. Not only by providing literal text, but also by setting the tone and style. If you make money through selling the manuals, you are strongly encouraged to donate part of the profit to help AIDS victims in Uganda. See |iccf|. ============================================================================== Next chapter: |usr_02.txt| The first steps in Vim Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_02.txt�����������������������������������������������������������������0000664�0000000�0000000�00000056566�13204015742�0017133�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_02.txt* Nvim VIM USER MANUAL - by Bram Moolenaar The first steps in Vim This chapter provides just enough information to edit a file with Vim. Not well or fast, but you can edit. Take some time to practice with these commands, they form the base for what follows. |02.1| Running Vim for the First Time |02.2| Inserting text |02.3| Moving around |02.4| Deleting characters |02.5| Undo and Redo |02.6| Other editing commands |02.7| Getting out |02.8| Finding help Next chapter: |usr_03.txt| Moving around Previous chapter: |usr_01.txt| About the manuals Table of contents: |usr_toc.txt| ============================================================================== *02.1* Running Vim for the First Time To start Vim, enter this command: > gvim file.txt On Unix you can type this at any command prompt. If you are running Windows, open a command prompt window and enter the command. In either case, Vim starts editing a file called file.txt. Because this is a new file, you get a blank window. This is what your screen will look like: +---------------------------------------+ |# | |~ | |~ | |~ | |~ | |"file.txt" [New file] | +---------------------------------------+ ('#" is the cursor position.) The tilde (~) lines indicate lines not in the file. In other words, when Vim runs out of file to display, it displays tilde lines. At the bottom of the screen, a message line indicates the file is named file.txt and shows that you are creating a new file. The message information is temporary and other information overwrites it. THE VIM COMMAND The gvim command causes the editor to create a new window for editing. If you use this command: > vim file.txt the editing occurs inside your command window. In other words, if you are running inside an xterm, the editor uses your xterm window. If you are using the command prompt under Microsoft Windows, the editing occurs inside this window. The text in the window will look the same for both versions, but with gvim you have extra features, like a menu bar. More about that later. ============================================================================== *02.2* Inserting text The Vim editor is a modal editor. That means that the editor behaves differently, depending on which mode you are in. The two basic modes are called Normal mode and Insert mode. In Normal mode the characters you type are commands. In Insert mode the characters are inserted as text. Since you have just started Vim it will be in Normal mode. To start Insert mode you type the "i" command (i for Insert). Then you can enter the text. It will be inserted into the file. Do not worry if you make mistakes; you can correct them later. To enter the following programmer's limerick, this is what you type: > iA very intelligent turtle Found programming Unix a hurdle After typing "turtle" you press the <Enter> key to start a new line. Finally you press the <Esc> key to stop Insert mode and go back to Normal mode. You now have two lines of text in your Vim window: +---------------------------------------+ |A very intelligent turtle | |Found programming Unix a hurdle | |~ | |~ | | | +---------------------------------------+ WHAT IS THE MODE? To be able to see what mode you are in, type this command: > :set showmode You will notice that when typing the colon Vim moves the cursor to the last line of the window. That's where you type colon commands (commands that start with a colon). Finish this command by pressing the <Enter> key (all commands that start with a colon are finished this way). Now, if you type the "i" command Vim will display --INSERT-- at the bottom of the window. This indicates you are in Insert mode. +---------------------------------------+ |A very intelligent turtle | |Found programming Unix a hurdle | |~ | |~ | |-- INSERT -- | +---------------------------------------+ If you press <Esc> to go back to Normal mode the last line will be made blank. GETTING OUT OF TROUBLE One of the problems for Vim novices is mode confusion, which is caused by forgetting which mode you are in or by accidentally typing a command that switches modes. To get back to Normal mode, no matter what mode you are in, press the <Esc> key. Sometimes you have to press it twice. If Vim beeps back at you, you already are in Normal mode. ============================================================================== *02.3* Moving around After you return to Normal mode, you can move around by using these keys: h left *hjkl* j down k up l right At first, it may appear that these commands were chosen at random. After all, who ever heard of using l for right? But actually, there is a very good reason for these choices: Moving the cursor is the most common thing you do in an editor, and these keys are on the home row of your right hand. In other words, these commands are placed where you can type them the fastest (especially when you type with ten fingers). Note: You can also move the cursor by using the arrow keys. If you do, however, you greatly slow down your editing because to press the arrow keys, you must move your hand from the text keys to the arrow keys. Considering that you might be doing it hundreds of times an hour, this can take a significant amount of time. Also, there are keyboards which do not have arrow keys, or which locate them in unusual places; therefore, knowing the use of the hjkl keys helps in those situations. One way to remember these commands is that h is on the left, l is on the right and j points down. In a picture: > k h l j The best way to learn these commands is by using them. Use the "i" command to insert some more lines of text. Then use the hjkl keys to move around and insert a word somewhere. Don't forget to press <Esc> to go back to Normal mode. |:Tutor| is also a nice way to learn by doing. For Japanese users, Hiroshi Iwatani suggested using this: Komsomolsk ^ | Huan Ho <--- ---> Los Angeles (Yellow river) | v Java (the island, not the programming language) ============================================================================== *02.4* Deleting characters To delete a character, move the cursor over it and type "x". (This is a throwback to the old days of the typewriter, when you deleted things by typing xxxx over them.) Move the cursor to the beginning of the first line, for example, and type xxxxxxx (seven x's) to delete "A very ". The result should look like this: +---------------------------------------+ |intelligent turtle | |Found programming Unix a hurdle | |~ | |~ | | | +---------------------------------------+ Now you can insert new text, for example by typing: > iA young <Esc> This begins an insert (the i), inserts the words "A young", and then exits insert mode (the final <Esc>). The result: +---------------------------------------+ |A young intelligent turtle | |Found programming Unix a hurdle | |~ | |~ | | | +---------------------------------------+ DELETING A LINE To delete a whole line use the "dd" command. The following line will then move up to fill the gap: +---------------------------------------+ |Found programming Unix a hurdle | |~ | |~ | |~ | | | +---------------------------------------+ DELETING A LINE BREAK In Vim you can join two lines together, which means that the line break between them is deleted. The "J" command does this. Take these two lines: A young intelligent ~ turtle ~ Move the cursor to the first line and press "J": A young intelligent turtle ~ ============================================================================== *02.5* Undo and Redo Suppose you delete too much. Well, you can type it in again, but an easier way exists. The "u" command undoes the last edit. Take a look at this in action: After using "dd" to delete the first line, "u" brings it back. Another one: Move the cursor to the A in the first line: A young intelligent turtle ~ Now type xxxxxxx to delete "A young". The result is as follows: intelligent turtle ~ Type "u" to undo the last delete. That delete removed the g, so the undo restores the character. g intelligent turtle ~ The next u command restores the next-to-last character deleted: ng intelligent turtle ~ The next u command gives you the u, and so on: ung intelligent turtle ~ oung intelligent turtle ~ young intelligent turtle ~ young intelligent turtle ~ A young intelligent turtle ~ REDO If you undo too many times, you can press CTRL-R (redo) to reverse the preceding command. In other words, it undoes the undo. To see this in action, press CTRL-R twice. The character A and the space after it disappear: young intelligent turtle ~ There's a special version of the undo command, the "U" (undo line) command. The undo line command undoes all the changes made on the last line that was edited. Typing this command twice cancels the preceding "U". A very intelligent turtle ~ xxxx Delete very A intelligent turtle ~ xxxxxx Delete turtle A intelligent ~ Restore line with "U" A very intelligent turtle ~ Undo "U" with "u" A intelligent ~ The "U" command is a change by itself, which the "u" command undoes and CTRL-R redoes. This might be a bit confusing. Don't worry, with "u" and CTRL-R you can go to any of the situations you had. More about that in section |32.2|. ============================================================================== *02.6* Other editing commands Vim has a large number of commands to change the text. See |Q_in| and below. Here are a few often used ones. APPENDING The "i" command inserts a character before the character under the cursor. That works fine; but what happens if you want to add stuff to the end of the line? For that you need to insert text after the cursor. This is done with the "a" (append) command. For example, to change the line and that's not saying much for the turtle. ~ to and that's not saying much for the turtle!!! ~ move the cursor over to the dot at the end of the line. Then type "x" to delete the period. The cursor is now positioned at the end of the line on the e in turtle. Now type > a!!!<Esc> to append three exclamation points after the e in turtle: and that's not saying much for the turtle!!! ~ OPENING UP A NEW LINE The "o" command creates a new, empty line below the cursor and puts Vim in Insert mode. Then you can type the text for the new line. Suppose the cursor is somewhere in the first of these two lines: A very intelligent turtle ~ Found programming Unix a hurdle ~ If you now use the "o" command and type new text: > oThat liked using Vim<Esc> The result is: A very intelligent turtle ~ That liked using Vim ~ Found programming Unix a hurdle ~ The "O" command (uppercase) opens a line above the cursor. USING A COUNT Suppose you want to move up nine lines. You can type "kkkkkkkkk" or you can enter the command "9k". In fact, you can precede many commands with a number. Earlier in this chapter, for instance, you added three exclamation points to the end of a line by typing "a!!!<Esc>". Another way to do this is to use the command "3a!<Esc>". The count of 3 tells the command that follows to triple its effect. Similarly, to delete three characters, use the command "3x". The count always comes before the command it applies to. ============================================================================== *02.7* Getting out To exit, use the "ZZ" command. This command writes the file and exits. Note: Unlike many other editors, Vim does not automatically make a backup file. If you type "ZZ", your changes are committed and there's no turning back. You can configure the Vim editor to produce backup files, see |07.4|. DISCARDING CHANGES Sometimes you will make a sequence of changes and suddenly realize you were better off before you started. Not to worry; Vim has a quit-and-throw-things-away command. It is: > :q! Don't forget to press <Enter> to finish the command. For those of you interested in the details, the three parts of this command are the colon (:), which enters Command-line mode; the q command, which tells the editor to quit; and the override command modifier (!). The override command modifier is needed because Vim is reluctant to throw away changes. If you were to just type ":q", Vim would display an error message and refuse to exit: E37: No write since last change (use ! to override) ~ By specifying the override, you are in effect telling Vim, "I know that what I'm doing looks stupid, but I'm a big boy and really want to do this." If you want to continue editing with Vim: The ":e!" command reloads the original version of the file. ============================================================================== *02.8* Finding help Everything you always wanted to know can be found in the Vim help files. Don't be afraid to ask! If you know what you are looking for, it is usually easier to search for it using the help system, instead of using Google. Because the subjects follow a certain style guide. Also the help has the advantage of belonging to your particular Vim version. You won't see help for commands added later. These would not work for you. To get generic help use this command: > :help You could also use the first function key <F1>. If your keyboard has a <Help> key it might work as well. If you don't supply a subject, ":help" displays the general help window. The creators of Vim did something very clever (or very lazy) with the help system: They made the help window a normal editing window. You can use all the normal Vim commands to move through the help information. Therefore h, j, k, and l move left, down, up and right. To get out of the help window, use the same command you use to get out of the editor: "ZZ". This will only close the help window, not exit Vim. As you read the help text, you will notice some text enclosed in vertical bars (for example, |help|). This indicates a hyperlink. If you position the cursor anywhere between the bars and press CTRL-] (jump to tag), the help system takes you to the indicated subject. (For reasons not discussed here, the Vim terminology for a hyperlink is tag. So CTRL-] jumps to the location of the tag given by the word under the cursor.) After a few jumps, you might want to go back. CTRL-T (pop tag) takes you back to the preceding position. CTRL-O (jump to older position) also works nicely here. At the top of the help screen, there is the notation *help.txt*. This name between "*" characters is used by the help system to define a tag (hyperlink destination). See |29.1| for details about using tags. To get help on a given subject, use the following command: > :help {subject} To get help on the "x" command, for example, enter the following: > :help x To find out how to delete text, use this command: > :help deleting To get a complete index of all Vim commands, use the following command: > :help index When you need to get help for a control character command (for example, CTRL-A), you need to spell it with the prefix "CTRL-". > :help CTRL-A The Vim editor has many different modes. By default, the help system displays the normal-mode commands. For example, the following command displays help for the normal-mode CTRL-H command: > :help CTRL-H To identify other modes, use a mode prefix. If you want the help for the insert-mode version of a command, use "i_". For CTRL-H this gives you the following command: > :help i_CTRL-H When you start the Vim editor, you can use several command-line arguments. These all begin with a dash (-). To find what the -t argument does, for example, use the command: > :help -t The Vim editor has a number of options that enable you to configure and customize the editor. If you want help for an option, you need to enclose it in single quotation marks. To find out what the 'number' option does, for example, use the following command: > :help 'number' The table with all mode prefixes can be found below: |help-summary|. Special keys are enclosed in angle brackets. To find help on the up-arrow key in Insert mode, for instance, use this command: > :help i_<Up> If you see an error message that you don't understand, for example: E37: No write since last change (use ! to override) ~ You can use the error ID at the start to find help about it: > :help E37 Summary: *help-summary* > 1) Use Ctrl-D after typing a topic and let Vim show all available topics. Or press Tab to complete: > :help some<Tab> < More information on how to use the help: > :help helphelp 2) Follow the links in bars to related help. You can go from the detailed help to the user documentation, which describes certain commands more from a user perspective and less detailed. E.g. after: > :help pattern.txt < You can see the user guide topics |03.9| and |usr_27.txt| in the introduction. 3) Options are enclosed in single apostrophes. To go to the help topic for the list option: > :help 'list' < If you only know you are looking for a certain option, you can also do: > :help options.txt < to open the help page which describes all option handling and then search using regular expressions, e.g. textwidth. Certain options have their own namespace, e.g.: > :help cpo-<letter> < for the corresponding flag of the 'cpoptions' settings, substitute <letter> by a specific flag, e.g.: > :help cpo-; < And for the guioption flags: > :help go-<letter> 4) Normal mode commands do not have a prefix. To go to the help page for the "gt" command: > :help gt 5) Insert mode commands start with i_. Help for deleting a word: > :help i_CTRL-W 6) Visual mode commands start with v_. Help for jumping to the other side of the Visual area: > :help v_o 7) Command line editing and arguments start with c_. Help for using the command argument %: > :help c_% 8) Ex-commands always start with ":", so to go to the :s command help: > :help :s 9) Commands specifically for debugging start with ">". To go to the help for the "cont" debug command: > :help >cont 10) Key combinations. They usually start with a single letter indicating the mode for which they can be used. E.g.: > :help i_CTRL-X < takes you to the family of Ctrl-X commands for insert mode which can be used to auto complete different things. Note, that certain keys will always be written the same, e.g. Control will always be CTRL. For normal mode commands there is no prefix and the topic is available at :h CTRL-<Letter>. E.g. > :help CTRL-W < In contrast > :help c_CTRL-R < will describe what the Ctrl-R does when entering commands in the Command line and > :help v_Ctrl-A < talks about incrementing numbers in visual mode and > :help g_CTRL-A < talks about the g<C-A> command (e.g. you have to press "g" then <Ctrl-A>). Here the "g" stand for the normal command "g" which always expects a second key before doing something similar to the commands starting with "z" 11) Regexp items always start with /. So to get help for the "\+" quantifier in Vim regexes: > :help /\+ < If you need to know everything about regular expressions, start reading at: > :help pattern.txt 12) Registers always start with "quote". To find out about the special ":" register: > :help quote: 13) Vim Script is available at > :help eval.txt < Certain aspects of the language are available at :h expr-X where "X" is a single letter. E.g. > :help expr-! < will take you to the topic describing the "!" (Not) operator for VimScript. Also important is > :help function-list < to find a short description of all functions available. Help topics for Vim script functions always include the "()", so: > :help append() < talks about the append Vim script function rather than how to append text in the current buffer. 14) Mappings are talked about in the help page :h |map.txt|. Use > :help mapmode-i < to find out about the |:imap| command. Also use :map-topic to find out about certain subtopics particular for mappings. e.g: > :help :map-local < for buffer-local mappings or > :help map-bar < for how the '|' is handled in mappings. 15) Command definitions are talked about :h command-topic, so use > :help command-bar < to find out about the '!' argument for custom commands. 16) Window management commands always start with CTRL-W, so you find the corresponding help at :h CTRL-W_letter. E.g. > :help CTRL-W_p < for moving the previous accessed window. You can also access > :help windows.txt < and read your way through if you are looking for window handling commands. 17) Use |:helpgrep| to search in all help pages (and also of any installed plugins). See |:helpgrep| for how to use it. To search for a topic: > :helpgrep topic < This takes you to the first match. To go to the next one: > :cnext < All matches are available in the quickfix window which can be opened with: > :copen < Move around to the match you like and press Enter to jump to that help. 18) The user manual. This describes help topics for beginners in a rather friendly way. Start at |usr_toc.txt| to find the table of content (as you might have guessed): > :help usr_toc.txt < Skim over the contents to find interesting topics. The "Digraphs" and "Entering special characters" items are in chapter 24, so to go to that particular help page: > :help usr_24.txt < Also if you want to access a certain chapter in the help, the chapter number can be accessed directly like this: > :help 10.1 < goes to chapter 10.1 in |usr_10.txt| and talks about recording macros. 19) Highlighting groups. Always start with hl-groupname. E.g. > :help hl-WarningMsg < talks about the WarningMsg highlighting group. 20) Syntax highlighting is namespaced to :syn-topic e.g. > :help :syn-conceal < talks about the conceal argument for the :syn command. 21) Quickfix commands usually start with :c while location list commands usually start with :l 22) Autocommand events can be found by their name: > :help BufWinLeave < To see all possible events: > :help autocommand-events 23) Command-line switches always start with "-". So for the help of the -f command switch of Vim use: > :help -f 24) Optional features always start with "+". To find out about the conceal feature use: > :help +conceal 25) Documentation for included filetype specific functionality is usually available in the form ft-<filetype>-<functionality>. So > :help ft-c-syntax < talks about the C syntax file and the option it provides. Sometimes, additional sections for omni completion > :help ft-php-omni < or filetype plugins > :help ft-tex-plugin < are available. 26) Error and Warning codes can be looked up directly in the help. So > :help E297 < takes you exactly to the description of the swap error message and > :help W10 < talks about the warning "Changing a readonly file". Sometimes however, those error codes are not described, but rather are listed at the Vim command that usually causes this. So: > :help E128 < takes you to the |:function| command ============================================================================== Next chapter: |usr_03.txt| Moving around Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_03.txt�����������������������������������������������������������������0000664�0000000�0000000�00000055326�13204015742�0017125�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_03.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Moving around Before you can insert or delete text the cursor has to be moved to the right place. Vim has a large number of commands to position the cursor. This chapter shows you how to use the most important ones. You can find a list of these commands below |Q_lr|. |03.1| Word movement |03.2| Moving to the start or end of a line |03.3| Moving to a character |03.4| Matching a parenthesis |03.5| Moving to a specific line |03.6| Telling where you are |03.7| Scrolling around |03.8| Simple searches |03.9| Simple search patterns |03.10| Using marks Next chapter: |usr_04.txt| Making small changes Previous chapter: |usr_02.txt| The first steps in Vim Table of contents: |usr_toc.txt| ============================================================================== *03.1* Word movement To move the cursor forward one word, use the "w" command. Like most Vim commands, you can use a numeric prefix to move past multiple words. For example, "3w" moves three words. This figure shows how it works: This is a line with example text ~ --->-->->-----------------> w w w 3w Notice that "w" moves to the start of the next word if it already is at the start of a word. The "b" command moves backward to the start of the previous word: This is a line with example text ~ <----<--<-<---------<--- b b b 2b b There is also the "e" command that moves to the next end of a word and "ge", which moves to the previous end of a word: This is a line with example text ~ <- <--- -----> ----> ge ge e e If you are at the last word of a line, the "w" command will take you to the first word in the next line. Thus you can use this to move through a paragraph, much faster than using "l". "b" does the same in the other direction. A word ends at a non-word character, such as a ".", "-" or ")". To change what Vim considers to be a word, see the 'iskeyword' option. If you try this out in the help directly, 'iskeyword' needs to be reset for the examples to work: > :set iskeyword& It is also possible to move by white-space separated WORDs. This is not a word in the normal sense, that's why the uppercase is used. The commands for moving by WORDs are also uppercase, as this figure shows: ge b w e <- <- ---> ---> This is-a line, with special/separated/words (and some more). ~ <----- <----- --------------------> -----> gE B W E With this mix of lowercase and uppercase commands, you can quickly move forward and backward through a paragraph. ============================================================================== *03.2* Moving to the start or end of a line The "$" command moves the cursor to the end of a line. If your keyboard has an <End> key it will do the same thing. The "^" command moves to the first non-blank character of the line. The "0" command (zero) moves to the very first character of the line. The <Home> key does the same thing. In a picture: ^ <------------ .....This is a line with example text ~ <----------------- ---------------> 0 $ (the "....." indicates blanks here) The "$" command takes a count, like most movement commands. But moving to the end of the line several times doesn't make sense. Therefore it causes the editor to move to the end of another line. For example, "1$" moves you to the end of the first line (the one you're on), "2$" to the end of the next line, and so on. The "0" command doesn't take a count argument, because the "0" would be part of the count. Unexpectedly, using a count with "^" doesn't have any effect. ============================================================================== *03.3* Moving to a character One of the most useful movement commands is the single-character search command. The command "fx" searches forward in the line for the single character x. Hint: "f" stands for "Find". For example, you are at the beginning of the following line. Suppose you want to go to the h of human. Just execute the command "fh" and the cursor will be positioned over the h: To err is human. To really foul up you need a computer. ~ ---------->---------------> fh fy This also shows that the command "fy" moves to the end of the word really. You can specify a count; therefore, you can go to the "l" of "foul" with "3fl": To err is human. To really foul up you need a computer. ~ ---------------------> 3fl The "F" command searches to the left: To err is human. To really foul up you need a computer. ~ <--------------------- Fh The "tx" command works like the "fx" command, except it stops one character before the searched character. Hint: "t" stands for "To". The backward version of this command is "Tx". To err is human. To really foul up you need a computer. ~ <------------ -------------> Th tn These four commands can be repeated with ";". "," repeats in the other direction. The cursor is never moved to another line. Not even when the sentence continues. Sometimes you will start a search, only to realize that you have typed the wrong command. You type "f" to search backward, for example, only to realize that you really meant "F". To abort a search, press <Esc>. So "f<Esc>" is an aborted forward search and doesn't do anything. Note: <Esc> cancels most operations, not just searches. ============================================================================== *03.4* Matching a parenthesis When writing a program you often end up with nested () constructs. Then the "%" command is very handy: It moves to the matching paren. If the cursor is on a "(" it will move to the matching ")". If it's on a ")" it will move to the matching "(". % <-----> if (a == (b * c) / d) ~ <----------------> % This also works for [] and {} pairs. (This can be defined with the 'matchpairs' option.) When the cursor is not on a useful character, "%" will search forward to find one. Thus if the cursor is at the start of the line of the previous example, "%" will search forward and find the first "(". Then it moves to its match: if (a == (b * c) / d) ~ ---+----------------> % ============================================================================== *03.5* Moving to a specific line If you are a C or C++ programmer, you are familiar with error messages such as the following: prog.c:33: j undeclared (first use in this function) ~ This tells you that you might want to fix something on line 33. So how do you find line 33? One way is to do "9999k" to go to the top of the file and "32j" to go down thirty-two lines. It is not a good way, but it works. A much better way of doing things is to use the "G" command. With a count, this command positions you at the given line number. For example, "33G" puts you on line 33. (For a better way of going through a compiler's error list, see |usr_30.txt|, for information on the :make command.) With no argument, "G" positions you at the end of the file. A quick way to go to the start of a file use "gg". "1G" will do the same, but is a tiny bit more typing. | first line of a file ^ | text text text text | | text text text text | gg 7G | text text text text | | text text text text | text text text text V text text text text | text text text text | G text text text text | last line of a file V Another way to move to a line is using the "%" command with a count. For example, "50%" moves you halfway through the file, and "90%" goes to near the end. The previous assumes that you want to move to a line in the file, no matter if it's currently visible or not. What if you want to move to one of the lines you can see? This figure shows the three commands you can use: +---------------------------+ H --> | text sample text | | sample text | | text sample text | | sample text | M --> | text sample text | | sample text | | text sample text | | sample text | L --> | text sample text | +---------------------------+ Hints: "H" stands for Home, "M" for Middle and "L" for Last. ============================================================================== *03.6* Telling where you are To see where you are in a file, there are three ways: 1. Use the CTRL-G command. You get a message like this (assuming the 'ruler' option is off): "usr_03.txt" line 233 of 650 --35%-- col 45-52 ~ This shows the name of the file you are editing, the line number where the cursor is, the total number of lines, the percentage of the way through the file and the column of the cursor. Sometimes you will see a split column number. For example, "col 2-9". This indicates that the cursor is positioned on the second character, but because character one is a tab, occupying eight spaces worth of columns, the screen column is 9. 2. Set the 'number' option. This will display a line number in front of every line: > :set number < To switch this off again: > :set nonumber < Since 'number' is a boolean option, prepending "no" to its name has the effect of switching it off. A boolean option has only these two values, it is either on or off. Vim has many options. Besides the boolean ones there are options with a numerical value and string options. You will see examples of this where they are used. 3. Set the 'ruler' option. This will display the cursor position in the lower right corner of the Vim window: > :set ruler Using the 'ruler' option has the advantage that it doesn't take much room, thus there is more space for your text. ============================================================================== *03.7* Scrolling around The CTRL-U command scrolls down half a screen of text. Think of looking through a viewing window at the text and moving this window up by half the height of the window. Thus the window moves up over the text, which is backward in the file. Don't worry if you have a little trouble remembering which end is up. Most users have the same problem. The CTRL-D command moves the viewing window down half a screen in the file, thus scrolls the text up half a screen. +----------------+ | some text | | some text | | some text | +---------------+ | some text | | some text | CTRL-U --> | | | | | 123456 | | 123456 | +----------------+ | 7890 | | | +----------------+ | example | CTRL-D --> | 7890 | +---------------+ | | | example | | example | | example | | example | +----------------+ To scroll one line at a time use CTRL-E (scroll up) and CTRL-Y (scroll down). Think of CTRL-E to give you one line Extra. (If you use MS-Windows compatible key mappings CTRL-Y will redo a change instead of scroll.) To scroll forward by a whole screen (except for two lines) use CTRL-F. The other way is backward, CTRL-B is the command to use. Fortunately CTRL-F is Forward and CTRL-B is Backward, that's easy to remember. A common issue is that after moving down many lines with "j" your cursor is at the bottom of the screen. You would like to see the context of the line with the cursor. That's done with the "zz" command. +------------------+ +------------------+ | some text | | some text | | some text | | some text | | some text | | some text | | some text | zz --> | line with cursor | | some text | | some text | | some text | | some text | | line with cursor | | some text | +------------------+ +------------------+ The "zt" command puts the cursor line at the top, "zb" at the bottom. There are a few more scrolling commands, see |Q_sc|. To always keep a few lines of context around the cursor, use the 'scrolloff' option. ============================================================================== *03.8* Simple searches To search for a string, use the "/string" command. To find the word include, for example, use the command: > /include You will notice that when you type the "/" the cursor jumps to the last line of the Vim window, like with colon commands. That is where you type the word. You can press the backspace key (backarrow or <BS>) to make corrections. Use the <Left> and <Right> cursor keys when necessary. Pressing <Enter> executes the command. Note: The characters .*[]^%/\?~$ have special meanings. If you want to use them in a search you must put a \ in front of them. See below. To find the next occurrence of the same string use the "n" command. Use this to find the first #include after the cursor: > /#include And then type "n" several times. You will move to each #include in the text. You can also use a count if you know which match you want. Thus "3n" finds the third match. Using a count with "/" doesn't work. The "?" command works like "/" but searches backwards: > ?word The "N" command repeats the last search the opposite direction. Thus using "N" after a "/" command searches backwards, using "N" after "?" searches forward. IGNORING CASE Normally you have to type exactly what you want to find. If you don't care about upper or lowercase in a word, set the 'ignorecase' option: > :set ignorecase If you now search for "word", it will also match "Word" and "WORD". To match case again: > :set noignorecase HISTORY Suppose you do three searches: > /one /two /three Now let's start searching by typing a simple "/" without pressing <Enter>. If you press <Up> (the cursor key), Vim puts "/three" on the command line. Pressing <Enter> at this point searches for three. If you do not press <Enter>, but press <Up> instead, Vim changes the prompt to "/two". Another press of <Up> moves you to "/one". You can also use the <Down> cursor key to move through the history of search commands in the other direction. If you know what a previously used pattern starts with, and you want to use it again, type that character before pressing <Up>. With the previous example, you can type "/o<Up>" and Vim will put "/one" on the command line. The commands starting with ":" also have a history. That allows you to recall a previous command and execute it again. These two histories are separate. SEARCHING FOR A WORD IN THE TEXT Suppose you see the word "TheLongFunctionName" in the text and you want to find the next occurrence of it. You could type "/TheLongFunctionName", but that's a lot of typing. And when you make a mistake Vim won't find it. There is an easier way: Position the cursor on the word and use the "*" command. Vim will grab the word under the cursor and use it as the search string. The "#" command does the same in the other direction. You can prepend a count: "3*" searches for the third occurrence of the word under the cursor. SEARCHING FOR WHOLE WORDS If you type "/the" it will also match "there". To only find words that end in "the" use: > /the\> The "\>" item is a special marker that only matches at the end of a word. Similarly "\<" only matches at the beginning of a word. Thus to search for the word "the" only: > /\<the\> This does not match "there" or "soothe". Notice that the "*" and "#" commands use these start-of-word and end-of-word markers to only find whole words (you can use "g*" and "g#" to match partial words). HIGHLIGHTING MATCHES While editing a program you see a variable called "nr". You want to check where it's used. You could move the cursor to "nr" and use the "*" command and press "n" to go along all the matches. Vim will highlight all matches. That is a very good way to see where the variable is used, without the need to type commands. To switch this off: > :set nohlsearch Then you need to switch it on again if you want to use it for the next search command: > :set hlsearch If you only want to remove the highlighting, use this command: > :nohlsearch This doesn't reset the option. Instead, it disables the highlighting. As soon as you execute a search command, the highlighting will be used again. Also for the "n" and "N" commands. TUNING SEARCHES There are a few options that change how searching works. These are the essential ones: > :set nowrapscan This stops the search at the end of the file. Or, when you are searching backwards, at the start of the file. The 'wrapscan' option is on by default, thus searching wraps around the end of the file. > :set noincsearch This disables the display of the matches while you are still typing your search. INTERMEZZO If you like one of the options mentioned before, and set it each time you use Vim, you can put the command in your Vim startup file. Edit the file, for example with: > :edit ~/.config/nvim/init.vim Then add a line with the command to set the option, just like you typed it in Vim. Example: > Go:set hlsearch<Esc> "G" moves to the end of the file. "o" starts a new line, where you type the ":set" command. You end insert mode with <Esc>. Then write the file: > ZZ If you now start Vim again, the 'hlsearch' option will already be set. ============================================================================== *03.9* Simple search patterns The Vim editor uses regular expressions to specify what to search for. Regular expressions are an extremely powerful and compact way to specify a search pattern. Unfortunately, this power comes at a price, because regular expressions are a bit tricky to specify. In this section we mention only a few essential ones. More about search patterns and commands in chapter 27 |usr_27.txt|. You can find the full explanation here: |pattern|. BEGINNING AND END OF A LINE The ^ character matches the beginning of a line. On an English-US keyboard you find it above the 6. The pattern "include" matches the word include anywhere on the line. But the pattern "^include" matches the word include only if it is at the beginning of a line. The $ character matches the end of a line. Therefore, "was$" matches the word was only if it is at the end of a line. Let's mark the places where "/the" matches in this example line with "x"s: the solder holding one of the chips melted and the ~ xxx xxx xxx Using "/the$" we find this match: the solder holding one of the chips melted and the ~ xxx And with "/^the" we find this one: the solder holding one of the chips melted and the ~ xxx You can try searching with "/^the$", it will only match a single line consisting of "the". White space does matter here, thus if a line contains a space after the word, like "the ", the pattern will not match. MATCHING ANY SINGLE CHARACTER The . (dot) character matches any existing character. For example, the pattern "c.m" matches a string whose first character is a c, whose second character is anything, and whose third character is m. Example: We use a computer that became the cummin winter. ~ xxx xxx xxx MATCHING SPECIAL CHARACTERS If you really want to match a dot, you must avoid its special meaning by putting a backslash before it. If you search for "ter.", you will find these matches: We use a computer that became the cummin winter. ~ xxxx xxxx Searching for "ter\." only finds the second match. ============================================================================== *03.10* Using marks When you make a jump to a position with the "G" command, Vim remembers the position from before this jump. This position is called a mark. To go back where you came from, use this command: > `` This ` is a backtick or open single-quote character. If you use the same command a second time you will jump back again. That's because the ` command is a jump itself, and the position from before this jump is remembered. Generally, every time you do a command that can move the cursor further than within the same line, this is called a jump. This includes the search commands "/" and "n" (it doesn't matter how far away the match is). But not the character searches with "fx" and "tx" or the word movements "w" and "e". Also, "j" and "k" are not considered to be a jump. Even when you use a count to make them move the cursor quite a long way away. The `` command jumps back and forth, between two points. The CTRL-O command jumps to older positions (Hint: O for older). CTRL-I then jumps back to newer positions (Hint: I is just next to O on the keyboard). Consider this sequence of commands: > 33G /^The CTRL-O You first jump to line 33, then search for a line that starts with "The". Then with CTRL-O you jump back to line 33. Another CTRL-O takes you back to where you started. If you now use CTRL-I you jump to line 33 again. And to the match for "The" with another CTRL-I. | example text ^ | 33G | example text | CTRL-O | CTRL-I | example text | | V line 33 text ^ V | example text | | /^The | example text | CTRL-O | CTRL-I V There you are | V example text Note: CTRL-I is the same as <Tab>. The ":jumps" command gives a list of positions you jumped to. The entry which you used last is marked with a ">". NAMED MARKS *bookmark* Vim enables you to place your own marks in the text. The command "ma" marks the place under the cursor as mark a. You can place 26 marks (a through z) in your text. You can't see them, it's just a position that Vim remembers. To go to a mark, use the command `{mark}, where {mark} is the mark letter. Thus to move to the a mark: > `a The command 'mark (single quotation mark, or apostrophe) moves you to the beginning of the line containing the mark. This differs from the `mark command, which moves you to marked column. The marks can be very useful when working on two related parts in a file. Suppose you have some text near the start of the file you need to look at, while working on some text near the end of the file. Move to the text at the start and place the s (start) mark there: > ms Then move to the text you want to work on and put the e (end) mark there: > me Now you can move around, and when you want to look at the start of the file, you use this to jump there: > 's Then you can use '' to jump back to where you were, or 'e to jump to the text you were working on at the end. There is nothing special about using s for start and e for end, they are just easy to remember. You can use this command to get a list of marks: > :marks You will notice a few special marks. These include: ' The cursor position before doing a jump " The cursor position when last editing the file [ Start of the last change ] End of the last change ============================================================================== Next chapter: |usr_04.txt| Making small changes Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_04.txt�����������������������������������������������������������������0000664�0000000�0000000�00000045145�13204015742�0017124�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_04.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Making small changes This chapter shows you several ways of making corrections and moving text around. It teaches you the three basic ways to change text: operator-motion, Visual mode and text objects. |04.1| Operators and motions |04.2| Changing text |04.3| Repeating a change |04.4| Visual mode |04.5| Moving text |04.6| Copying text |04.7| Using the clipboard |04.8| Text objects |04.9| Replace mode |04.10| Conclusion Next chapter: |usr_05.txt| Set your settings Previous chapter: |usr_03.txt| Moving around Table of contents: |usr_toc.txt| ============================================================================== *04.1* Operators and motions In chapter 2 you learned the "x" command to delete a single character. And using a count: "4x" deletes four characters. The "dw" command deletes a word. You may recognize the "w" command as the move word command. In fact, the "d" command may be followed by any motion command, and it deletes from the current location to the place where the cursor winds up. The "4w" command, for example, moves the cursor over four words. The d4w command deletes four words. To err is human. To really foul up you need a computer. ~ ------------------> d4w To err is human. you need a computer. ~ Vim only deletes up to the position where the motion takes the cursor. That's because Vim knows that you probably don't want to delete the first character of a word. If you use the "e" command to move to the end of a word, Vim guesses that you do want to include that last character: To err is human. you need a computer. ~ --------> d2e To err is human. a computer. ~ Whether the character under the cursor is included depends on the command you used to move to that character. The reference manual calls this "exclusive" when the character isn't included and "inclusive" when it is. The "$" command moves to the end of a line. The "d$" command deletes from the cursor to the end of the line. This is an inclusive motion, thus the last character of the line is included in the delete operation: To err is human. a computer. ~ ------------> d$ To err is human ~ There is a pattern here: operator-motion. You first type an operator command. For example, "d" is the delete operator. Then you type a motion command like "4l" or "w". This way you can operate on any text you can move over. ============================================================================== *04.2* Changing text Another operator is "c", change. It acts just like the "d" operator, except it leaves you in Insert mode. For example, "cw" changes a word. Or more specifically, it deletes a word and then puts you in Insert mode. To err is human ~ -------> c2wbe<Esc> To be human ~ This "c2wbe<Esc>" contains these bits: c the change operator 2w move two words (they are deleted and Insert mode started) be insert this text <Esc> back to Normal mode If you have paid attention, you will have noticed something strange: The space before "human" isn't deleted. There is a saying that for every problem there is an answer that is simple, clear, and wrong. That is the case with the example used here for the "cw" command. The c operator works just like the d operator, with one exception: "cw". It actually works like "ce", change to end of word. Thus the space after the word isn't included. This is an exception that dates back to the old Vi. Since many people are used to it now, the inconsistency has remained in Vim. MORE CHANGES Like "dd" deletes a whole line, "cc" changes a whole line. It keeps the existing indent (leading white space) though. Just like "d$" deletes until the end of the line, "c$" changes until the end of the line. It's like doing "d$" to delete the text and then "a" to start Insert mode and append new text. SHORTCUTS Some operator-motion commands are used so often that they have been given a single letter command: x stands for dl (delete character under the cursor) X stands for dh (delete character left of the cursor) D stands for d$ (delete to end of the line) C stands for c$ (change to end of the line) s stands for cl (change one character) S stands for cc (change a whole line) WHERE TO PUT THE COUNT The commands "3dw" and "d3w" delete three words. If you want to get really picky about things, the first command, "3dw", deletes one word three times; the command "d3w" deletes three words once. This is a difference without a distinction. You can actually put in two counts, however. For example, "3d2w" deletes two words, repeated three times, for a total of six words. REPLACING WITH ONE CHARACTER The "r" command is not an operator. It waits for you to type a character, and will replace the character under the cursor with it. You could do the same with "cl" or with the "s" command, but with "r" you don't have to press <Esc> there is somerhing grong here ~ rT rt rw There is something wrong here ~ Using a count with "r" causes that many characters to be replaced with the same character. Example: There is something wrong here ~ 5rx There is something xxxxx here ~ To replace a character with a line break use "r<Enter>". This deletes one character and inserts a line break. Using a count here only applies to the number of characters deleted: "4r<Enter>" replaces four characters with one line break. ============================================================================== *04.3* Repeating a change The "." command is one of the most simple yet powerful commands in Vim. It repeats the last change. For instance, suppose you are editing an HTML file and want to delete all the <B> tags. You position the cursor on the first < and delete the <B> with the command "df>". You then go to the < of the next </B> and kill it using the "." command. The "." command executes the last change command (in this case, "df>"). To delete another tag, position the cursor on the < and use the "." command. To <B>generate</B> a table of <B>contents ~ f< find first < ---> df> delete to > --> f< find next < ---------> . repeat df> ---> f< find next < -------------> . repeat df> --> The "." command works for all changes you make, except for the "u" (undo), CTRL-R (redo) and commands that start with a colon (:). Another example: You want to change the word "four" to "five". It appears several times in your text. You can do this quickly with this sequence of commands: /four<Enter> find the first string "four" cwfive<Esc> change the word to "five" n find the next "four" . repeat the change to "five" n find the next "four" . repeat the change etc. ============================================================================== *04.4* Visual mode To delete simple items the operator-motion changes work quite well. But often it's not so easy to decide which command will move over the text you want to change. Then you can use Visual mode. You start Visual mode by pressing "v". You move the cursor over the text you want to work on. While you do this, the text is highlighted. Finally type the operator command. For example, to delete from the middle of a word to the middle of another: This is an examination sample of visual mode ~ ----------> velllld This is an example of visual mode ~ When doing this you don't really have to count how many times you have to press "l" to end up in the right position. You can immediately see what text will be deleted when you press "d". If at any time you decide you don't want to do anything with the highlighted text, just press <Esc> and Visual mode will stop without doing anything. SELECTING LINES If you want to work on whole lines, use "V" to start Visual mode. You will see right away that the whole line is highlighted, without moving around. When you move left or right nothing changes. When you move up or down the selection is extended whole lines at a time. For example, select three lines with "Vjj": +------------------------+ | text more text | >> | more text more text | | selected lines >> | text text text | | Vjj >> | text more | V | more text more | +------------------------+ SELECTING BLOCKS If you want to work on a rectangular block of characters, use CTRL-V to start Visual mode. This is very useful when working on tables. name Q1 Q2 Q3 pierre 123 455 234 john 0 90 39 steve 392 63 334 To delete the middle "Q2" column, move the cursor to the "Q" of "Q2". Press CTRL-V to start blockwise Visual mode. Now move the cursor three lines down with "3j" and to the next word with "w". You can see the first character of the last column is included. To exclude it, use "h". Now press "d" and the middle column is gone. GOING TO THE OTHER SIDE If you have selected some text in Visual mode, and discover that you need to change the other end of the selection, use the "o" command (Hint: o for other end). The cursor will go to the other end, and you can move the cursor to change where the selection starts. Pressing "o" again brings you back to the other end. When using blockwise selection, you have four corners. "o" only takes you to one of the other corners, diagonally. Use "O" to move to the other corner in the same line. Note that "o" and "O" in Visual mode work very differently from Normal mode, where they open a new line below or above the cursor. ============================================================================== *04.5* Moving text When you delete something with the "d", "x", or another command, the text is saved. You can paste it back by using the p command. (The Vim name for this is put). Take a look at how this works. First you will delete an entire line, by putting the cursor on the line you want to delete and typing "dd". Now you move the cursor to where you want to put the line and use the "p" (put) command. The line is inserted on the line below the cursor. a line a line a line line 2 dd line 3 p line 3 line 3 line 2 Because you deleted an entire line, the "p" command placed the text line below the cursor. If you delete part of a line (a word, for instance), the "p" command puts it just after the cursor. Some more boring try text to out commands. ~ ----> dw Some more boring text to out commands. ~ -------> welp Some more boring text to try out commands. ~ MORE ON PUTTING The "P" command puts text like "p", but before the cursor. When you deleted a whole line with "dd", "P" will put it back above the cursor. When you deleted a word with "dw", "P" will put it back just before the cursor. You can repeat putting as many times as you like. The same text will be used. You can use a count with "p" and "P". The text will be repeated as many times as specified with the count. Thus "dd" and then "3p" puts three copies of the same deleted line. SWAPPING TWO CHARACTERS Frequently when you are typing, your fingers get ahead of your brain (or the other way around?). The result is a typo such as "teh" for "the". Vim makes it easy to correct such problems. Just put the cursor on the e of "teh" and execute the command "xp". This works as follows: "x" deletes the character e and places it in a register. "p" puts the text after the cursor, which is after the h. teh th the ~ x p ============================================================================== *04.6* Copying text To copy text from one place to another, you could delete it, use "u" to undo the deletion and then "p" to put it somewhere else. There is an easier way: yanking. The "y" operator copies text into a register. Then a "p" command can be used to put it. Yanking is just a Vim name for copying. The "c" letter was already used for the change operator, and "y" was still available. Calling this operator "yank" made it easier to remember to use the "y" key. Since "y" is an operator, you use "yw" to yank a word. A count is possible as usual. To yank two words use "y2w". Example: let sqr = LongVariable * ~ --------------> y2w let sqr = LongVariable * ~ p let sqr = LongVariable * LongVariable ~ Notice that "yw" includes the white space after a word. If you don't want this, use "ye". The "yy" command yanks a whole line, just like "dd" deletes a whole line. Unexpectedly, while "D" deletes from the cursor to the end of the line, "Y" works like "yy", it yanks the whole line. Watch out for this inconsistency! Use "y$" to yank to the end of the line. a text line yy a text line a text line line 2 line 2 p line 2 last line last line a text line last line ============================================================================== *04.7* Using the clipboard If you are using the GUI version of Vim (gvim), you can find the "Copy" item in the "Edit" menu. First select some text with Visual mode, then use the Edit/Copy menu. The selected text is now copied to the clipboard. You can paste the text in other programs. In Vim itself too. If you have copied text to the clipboard in another application, you can paste it in Vim with the Edit/Paste menu. This works in Normal mode and Insert mode. In Visual mode the selected text is replaced with the pasted text. The "Cut" menu item deletes the text before it's put on the clipboard. The "Copy", "Cut" and "Paste" items are also available in the popup menu (only when there is a popup menu, of course). If your Vim has a toolbar, you can also find these items there. If you are not using the GUI, or if you don't like using a menu, you have to use another way. You use the normal "y" (yank) and "p" (put) commands, but prepend "* (double-quote star) before it. To copy a line to the clipboard: > "*yy To put text from the clipboard back into the text: > "*p This only works on versions of Vim that include clipboard support. More about the clipboard in section |09.3| and here: |clipboard|. ============================================================================== *04.8* Text objects If the cursor is in the middle of a word and you want to delete that word, you need to move back to its start before you can do "dw". There is a simpler way to do this: "daw". this is some example text. ~ daw this is some text. ~ The "d" of "daw" is the delete operator. "aw" is a text object. Hint: "aw" stands for "A Word". Thus "daw" is "Delete A Word". To be precise, the white space after the word is also deleted (the white space before the word at the end of the line). Using text objects is the third way to make changes in Vim. We already had operator-motion and Visual mode. Now we add operator-text object. It is very similar to operator-motion, but instead of operating on the text between the cursor position before and after a movement command, the text object is used as a whole. It doesn't matter where in the object the cursor was. To change a whole sentence use "cis". Take this text: Hello there. This ~ is an example. Just ~ some text. ~ Move to the start of the second line, on "is an". Now use "cis": Hello there. Just ~ some text. ~ The cursor is in between the blanks in the first line. Now you type the new sentence "Another line.": Hello there. Another line. Just ~ some text. ~ "cis" consists of the "c" (change) operator and the "is" text object. This stands for "Inner Sentence". There is also the "as" (a sentence) object. The difference is that "as" includes the white space after the sentence and "is" doesn't. If you would delete a sentence, you want to delete the white space at the same time, thus use "das". If you want to type new text the white space can remain, thus you use "cis". You can also use text objects in Visual mode. It will include the text object in the Visual selection. Visual mode continues, thus you can do this several times. For example, start Visual mode with "v" and select a sentence with "as". Now you can repeat "as" to include more sentences. Finally you use an operator to do something with the selected sentences. You can find a long list of text objects here: |text-objects|. ============================================================================== *04.9* Replace mode The "R" command causes Vim to enter replace mode. In this mode, each character you type replaces the one under the cursor. This continues until you type <Esc>. In this example you start Replace mode on the first "t" of "text": This is text. ~ Rinteresting.<Esc> This is interesting. ~ You may have noticed that this command replaced 5 characters in the line with twelve others. The "R" command automatically extends the line if it runs out of characters to replace. It will not continue on the next line. You can switch between Insert mode and Replace mode with the <Insert> key. When you use <BS> (backspace) to make correction, you will notice that the old text is put back. Thus it works like an undo command for the last typed character. ============================================================================== *04.10* Conclusion The operators, movement commands and text objects give you the possibility to make lots of combinations. Now that you know how it works, you can use N operators with M movement commands to make N * M commands! You can find a list of operators here: |operator| For example, there are many other ways to delete pieces of text. Here are a few often used ones: x delete character under the cursor (short for "dl") X delete character before the cursor (short for "dh") D delete from cursor to end of line (short for "d$") dw delete from cursor to next start of word db delete from cursor to previous start of word diw delete word under the cursor (excluding white space) daw delete word under the cursor (including white space) dG delete until the end of the file dgg delete until the start of the file If you use "c" instead of "d" they become change commands. And with "y" you yank the text. And so forth. There are a few often used commands to make changes that didn't fit somewhere else: ~ change case of the character under the cursor, and move the cursor to the next character. This is not an operator (unless 'tildeop' is set), thus you can't use it with a motion command. It does work in Visual mode and changes case for all the selected text then. I Start Insert mode after moving the cursor to the first non-blank in the line. A Start Insert mode after moving the cursor to the end of the line. ============================================================================== Next chapter: |usr_05.txt| Set your settings Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_05.txt�����������������������������������������������������������������0000664�0000000�0000000�00000053577�13204015742�0017135�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_05.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Set your settings Vim can be tuned to work like you want it to. This chapter shows you how to make Vim start with options set to different values. Add plugins to extend Vim's capabilities. Or define your own macros. |05.1| The vimrc file |05.2| The example vimrc file explained |05.3| Simple mappings |05.4| Adding a package |05.5| Adding a plugin |05.6| Adding a help file |05.7| The option window |05.8| Often used options Next chapter: |usr_06.txt| Using syntax highlighting Previous chapter: |usr_04.txt| Making small changes Table of contents: |usr_toc.txt| ============================================================================== *05.1* The vimrc file *vimrc-intro* You probably got tired of typing commands that you use very often. To start Vim with all your favorite option settings and mappings, you write them in what is called the init.vim file. Vim executes the commands in this file when it starts up. If you already have a init.vim file (e.g., when your sysadmin has one setup for you), you can edit it this way: > :edit $MYVIMRC If you don't have a vimrc file yet, see |init.vim| to find out where you can create a vimrc file. This file is always used and is recommended: ~/.config/nvim/init.vim (Unix and OSX) ~ ~/AppData/Local/nvim/init.vim (Windows) ~ The vimrc file can contain all the commands that you type after a colon. The most simple ones are for setting options. For example, if you want Vim to always start with the 'ignorecase' option on, add this line your vimrc file: > set ignorecase For this new line to take effect you need to exit Vim and start it again. Later you will learn how to do this without exiting Vim. This chapter only explains the most basic items. For more information on how to write a Vim script file: |usr_41.txt|. ============================================================================== *05.2* The example vimrc file explained *vimrc_example.vim* In the first chapter was explained how the example vimrc file can be used. The file can be found here: $VIMRUNTIME/vimrc_example.vim ~ In this section we will explain the various commands used in this file. This will give you hints about how to set up your own preferences. Not everything will be explained though. Use the ":help" command to find out more. > set backspace=indent,eol,start This specifies where in Insert mode the <BS> is allowed to delete the character in front of the cursor. The three items, separated by commas, tell Vim to delete the white space at the start of the line, a line break and the character before where Insert mode started. > set autoindent This makes Vim use the indent of the previous line for a newly created line. Thus there is the same amount of white space before the new line. For example when pressing <Enter> in Insert mode, and when using the "o" command to open a new line. > set backup This tells Vim to keep a backup copy of a file when overwriting it. The backup file will have the same name as the original file with "~" added. See |07.4| > set history=50 Keep 50 commands and 50 search patterns in the history. Use another number if you want to remember fewer or more lines. > set ruler Always display the current cursor position in the lower right corner of the Vim window. > set showcmd Display an incomplete command in the lower right corner of the Vim window, left of the ruler. For example, when you type "2f", Vim is waiting for you to type the character to find and "2f" is displayed. When you press "w" next, the "2fw" command is executed and the displayed "2f" is removed. +-------------------------------------------------+ |text in the Vim window | |~ | |~ | |-- VISUAL -- 2f 43,8 17% | +-------------------------------------------------+ ^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^ 'showmode' 'showcmd' 'ruler' > set incsearch Display matches for a search pattern while you type. > map Q gq This defines a key mapping. More about that in the next section. This defines the "Q" command to do formatting with the "gq" operator. This is how it worked before Vim 5.0. Otherwise the "Q" command starts Ex mode, but you will not need it. > vnoremap _g y:exe "grep /" . escape(@", '\\/') . "/ *.c *.h"<CR> This mapping yanks the visually selected text and searches for it in C files. This is a complicated mapping. You can see that mappings can be used to do quite complicated things. Still, it is just a sequence of commands that are executed like you typed them. > syntax on set hlsearch This switches on syntax highlighting. And the 'hlsearch' option tells Vim to highlight matches with the last used search pattern. The "if" command is very useful to set options only when some condition is met. More about that in |usr_41.txt|. *vimrc-filetype* > filetype plugin indent on This switches on three very clever mechanisms: 1. Filetype detection. Whenever you start editing a file, Vim will try to figure out what kind of file this is. When you edit "main.c", Vim will see the ".c" extension and recognize this as a "c" filetype. When you edit a file that starts with "#!/bin/sh", Vim will recognize it as a "sh" filetype. The filetype detection is used for syntax highlighting and the other two items below. See |filetypes|. 2. Using filetype plugin files Many different filetypes are edited with different options. For example, when you edit a "c" file, it's very useful to set the 'cindent' option to automatically indent the lines. These commonly useful option settings are included with Vim in filetype plugins. You can also add your own, see |write-filetype-plugin|. 3. Using indent files When editing programs, the indent of a line can often be computed automatically. Vim comes with these indent rules for a number of filetypes. See |:filetype-indent-on| and 'indentexpr'. > autocmd FileType text setlocal textwidth=78 This makes Vim break text to avoid lines getting longer than 78 characters. But only for files that have been detected to be plain text. There are actually two parts here. "autocmd FileType text" is an autocommand. This defines that when the file type is set to "text" the following command is automatically executed. "setlocal textwidth=78" sets the 'textwidth' option to 78, but only locally in one file. *restore-cursor* > autocmd BufReadPost * \ if line("'\"") > 1 && line("'\"") <= line("$") | \ exe "normal! g`\"" | \ endif Another autocommand. This time it is used after reading any file. The complicated stuff after it checks if the '" mark is defined, and jumps to it if so. The backslash at the start of a line is used to continue the command from the previous line. That avoids a line getting very long. See |line-continuation|. This only works in a Vim script file, not when typing commands at the command-line. ============================================================================== *05.3* Simple mappings A mapping enables you to bind a set of Vim commands to a single key. Suppose, for example, that you need to surround certain words with curly braces. In other words, you need to change a word such as "amount" into "{amount}". With the :map command, you can tell Vim that the F5 key does this job. The command is as follows: > :map <F5> i{<Esc>ea}<Esc> < Note: When entering this command, you must enter <F5> by typing four characters. Similarly, <Esc> is not entered by pressing the <Esc> key, but by typing five characters. Watch out for this difference when reading the manual! Let's break this down: <F5> The F5 function key. This is the trigger key that causes the command to be executed as the key is pressed. i{<Esc> Insert the { character. The <Esc> key ends Insert mode. e Move to the end of the word. a}<Esc> Append the } to the word. After you execute the ":map" command, all you have to do to put {} around a word is to put the cursor on the first character and press F5. In this example, the trigger is a single key; it can be any string. But when you use an existing Vim command, that command will no longer be available. You better avoid that. One key that can be used with mappings is the backslash. Since you probably want to define more than one mapping, add another character. You could map "\p" to add parentheses around a word, and "\c" to add curly braces, for example: > :map \p i(<Esc>ea)<Esc> :map \c i{<Esc>ea}<Esc> You need to type the \ and the p quickly after another, so that Vim knows they belong together. The ":map" command (with no arguments) lists your current mappings. At least the ones for Normal mode. More about mappings in section |40.1|. ============================================================================== *05.4* Adding a package *add-package* *vimball-install* A package is a set of files that you can add to Vim. There are two kinds of packages: optional and automatically loaded on startup. The Vim distribution comes with a few packages that you can optionally use. For example, the vimball plugin. This plugin supports creating and using vimballs (self-installing Vim plugin archives). To start using the vimball plugin, add one line to your vimrc file: > packadd vimball That's all! You can also type the command to try it out. Now you can find help about this plugin: > :help vimball This works, because when `:packadd` loaded the plugin it also added the package directory in 'runtimepath', so that the help file can be found. The tags for vimball's help are already created. If you need to generate the help tags for a package, see the `:helptags` command. You can find packages on the Internet in various places. It usually comes as an archive or as a repository. For an archive you can follow these steps: 1. create the package directory: > mkdir -p ~/.local/share/nvim/site/pack/fancy < "fancy" can be any name of your liking. Use one that describes the package. 2. unpack the archive in that directory. This assumes the top directory in the archive is "start": > cd ~/.local/share/nvim/site/pack/fancy unzip /tmp/fancy.zip < If the archive layout is different make sure that you end up with a path like this: ~/.local/share/nvim/site/pack/fancy/start/fancytext/plugin/fancy.vim ~ Here "fancytext" is the name of the package, it can be anything else. More information about packages can be found here: |packages|. ============================================================================== *05.5* Adding a plugin *add-plugin* *plugin* Vim's functionality can be extended by adding plugins. A plugin is nothing more than a Vim script file that is loaded automatically when Vim starts. You can add a plugin very easily by dropping it in your plugin directory. {not available when Vim was compiled without the |+eval| feature} There are two types of plugins: global plugin: Used for all kinds of files filetype plugin: Only used for a specific type of file The global plugins will be discussed first, then the filetype ones |add-filetype-plugin|. GLOBAL PLUGINS *standard-plugin* When you start Vim, it will automatically load a number of global plugins. You don't have to do anything for this. They add functionality that most people will want to use, but which was implemented as a Vim script instead of being compiled into Vim. You can find them listed in the help index |standard-plugin-list|. Also see |load-plugins|. *add-global-plugin* You can add a global plugin to add functionality that will always be present when you use Vim. There are only two steps for adding a global plugin: 1. Get a copy of the plugin. 2. Drop it in the right directory. GETTING A GLOBAL PLUGIN Where can you find plugins? - Some come with Vim. You can find them in the directory $VIMRUNTIME/macros and its sub-directories. - Download from the net. There is a large collection on http://www.vim.org. - They are sometimes posted in a Vim |maillist|. - You could write one yourself, see |write-plugin|. Some plugins come as a vimball archive, see |vimball|. USING A GLOBAL PLUGIN First read the text in the plugin itself to check for any special conditions. Then copy the file to your plugin directory: system plugin directory ~ Unix ~/.local/share/nvim/site/plugin Example for Unix (assuming you didn't have a plugin directory yet): > mkdir -p ~/.local/share/nvim/site/plugin cp /tmp/yourplugin.vim ~/.local/share/nvim/site/plugin That's all! Now you can use the commands defined in this plugin. Instead of putting plugins directly into the plugin/ directory, you may better organize them by putting them into subdirectories under plugin/. As an example, consider using "~/.local/share/nvim/site/plugin/perl/*.vim" for all your Perl plugins. FILETYPE PLUGINS *add-filetype-plugin* *ftplugins* The Vim distribution comes with a set of plugins for different filetypes that you can start using with this command: > :filetype plugin on That's all! See |vimrc-filetype|. If you are missing a plugin for a filetype you are using, or you found a better one, you can add it. There are two steps for adding a filetype plugin: 1. Get a copy of the plugin. 2. Drop it in the right directory. GETTING A FILETYPE PLUGIN You can find them in the same places as the global plugins. Watch out if the type of file is mentioned, then you know if the plugin is a global or a filetype one. The scripts in $VIMRUNTIME/macros are global ones, the filetype plugins are in $VIMRUNTIME/ftplugin. USING A FILETYPE PLUGIN *ftplugin-name* You can add a filetype plugin by dropping it in the right directory. The name of this directory is in the same directory mentioned above for global plugins, but the last part is "ftplugin". Suppose you have found a plugin for the "stuff" filetype, and you are on Unix. Then you can move this file to the ftplugin directory: > mkdir -p ~/.local/share/nvim/site/ftplugin mv thefile ~/.local/share/nvim/site/ftplugin/stuff.vim If that file already exists you already have a plugin for "stuff". You might want to check if the existing plugin doesn't conflict with the one you are adding. If it's OK, you can give the new one another name: > mv thefile ~/.local/share/nvim/site/ftplugin/stuff_too.vim The underscore is used to separate the name of the filetype from the rest, which can be anything. If you use "otherstuff.vim" it wouldn't work, it would be loaded for the "otherstuff" filetype. The generic names for the filetype plugins are: > ftplugin/<filetype>.vim ftplugin/<filetype>_<name>.vim ftplugin/<filetype>/<name>.vim Here "<name>" can be any name that you prefer. Examples for the "stuff" filetype on Unix: > ~/.local/share/nvim/site/ftplugin/stuff.vim ~/.local/share/nvim/site/ftplugin/stuff_def.vim ~/.local/share/nvim/site/ftplugin/stuff/header.vim The <filetype> part is the name of the filetype the plugin is to be used for. Only files of this filetype will use the settings from the plugin. The <name> part of the plugin file doesn't matter, you can use it to have several plugins for the same filetype. Note that it must end in ".vim". Further reading: |filetype-plugins| Documentation for the filetype plugins and information about how to avoid that mappings cause problems. |load-plugins| When the global plugins are loaded during startup. |ftplugin-overrule| Overruling the settings from a global plugin. |write-plugin| How to write a plugin script. |plugin-details| For more information about using plugins or when your plugin doesn't work. |new-filetype| How to detect a new file type. ============================================================================== *05.6* Adding a help file *add-local-help* If you are lucky, the plugin you installed also comes with a help file. We will explain how to install the help file, so that you can easily find help for your new plugin. Let us suppose a plugin ("my-plugin"), which comes with a help file in a non-standard place (it usually resides in a sub-folder called `doc/`). First, create a "doc" directory in one of the directories in 'runtimepath': > :!mkdir -p ~/.local/share/nvim/site/doc Now, copy the help file to the "doc" directory: > :!cp my-plugin/my-plugin-doc.txt ~/.local/share/nvim/site/doc Here comes the trick, which allows you to jump to the subjects in the new help file. Generate the local tags file with the |:helptags| command: > :helptags ~/.local/share/nvim/site/doc You can see an entry for the local help file when you do: > :help local-additions The title lines from the local help files are automagically added to this section. There you can see which local help files have been added and jump to them through the tag. For writing a local help file, see |write-local-help|. ============================================================================== *05.7* The option window If you are looking for an option that does what you want, you can search in the help files here: |options|. Another way is by using this command: > :options This opens a new window, with a list of options with a one-line explanation. The options are grouped by subject. Move the cursor to a subject and press <Enter> to jump there. Press <Enter> again to jump back. Or use CTRL-O. You can change the value of an option. For example, move to the "displaying text" subject. Then move the cursor down to this line: set wrap nowrap ~ When you hit <Enter>, the line will change to: set nowrap wrap ~ The option has now been switched off. Just above this line is a short description of the 'wrap' option. Move the cursor one line up to place it in this line. Now hit <Enter> and you jump to the full help on the 'wrap' option. For options that take a number or string argument you can edit the value. Then press <Enter> to apply the new value. For example, move the cursor a few lines up to this line: set so=0 ~ Position the cursor on the zero with "$". Change it into a five with "r5". Then press <Enter> to apply the new value. When you now move the cursor around you will notice that the text starts scrolling before you reach the border. This is what the 'scrolloff' option does, it specifies an offset from the window border where scrolling starts. ============================================================================== *05.8* Often used options There are an awful lot of options. Most of them you will hardly ever use. Some of the more useful ones will be mentioned here. Don't forget you can find more help on these options with the ":help" command, with single quotes before and after the option name. For example: > :help 'wrap' In case you have messed up an option value, you can set it back to the default by putting an ampersand (&) after the option name. Example: > :set iskeyword& NOT WRAPPING LINES Vim normally wraps long lines, so that you can see all of the text. Sometimes it's better to let the text continue right of the window. Then you need to scroll the text left-right to see all of a long line. Switch wrapping off with this command: > :set nowrap Vim will automatically scroll the text when you move to text that is not displayed. To see a context of ten characters, do this: > :set sidescroll=10 This doesn't change the text in the file, only the way it is displayed. WRAPPING MOVEMENT COMMANDS Most commands for moving around will stop moving at the start and end of a line. You can change that with the 'whichwrap' option. This sets it to the default value: > :set whichwrap=b,s This allows the <BS> key, when used in the first position of a line, to move the cursor to the end of the previous line. And the <Space> key moves from the end of a line to the start of the next one. To allow the cursor keys <Left> and <Right> to also wrap, use this command: > :set whichwrap=b,s,<,> This is still only for Normal mode. To let <Left> and <Right> do this in Insert mode as well: > :set whichwrap=b,s,<,>,[,] There are a few other flags that can be added, see 'whichwrap'. VIEWING TABS When there are tabs in a file, you cannot see where they are. To make them visible: > :set list Now every tab is displayed as ^I. And a $ is displayed at the end of each line, so that you can spot trailing spaces that would otherwise go unnoticed. A disadvantage is that this looks ugly when there are many Tabs in a file. If you have a color terminal, or are using the GUI, Vim can show the spaces and tabs as highlighted characters. Use the 'listchars' option: > :set listchars=tab:>-,trail:- Now every tab will be displayed as ">---" (with more or less "-") and trailing white space as "-". Looks a lot better, doesn't it? KEYWORDS The 'iskeyword' option specifies which characters can appear in a word: > :set iskeyword < iskeyword=@,48-57,_,192-255 ~ The "@" stands for all alphabetic letters. "48-57" stands for ASCII characters 48 to 57, which are the numbers 0 to 9. "192-255" are the printable latin characters. Sometimes you will want to include a dash in keywords, so that commands like "w" consider "upper-case" to be one word. You can do it like this: > :set iskeyword+=- :set iskeyword < iskeyword=@,48-57,_,192-255,- ~ If you look at the new value, you will see that Vim has added a comma for you. To remove a character use "-=". For example, to remove the underscore: > :set iskeyword-=_ :set iskeyword < iskeyword=@,48-57,192-255,- ~ This time a comma is automatically deleted. ROOM FOR MESSAGES When Vim starts there is one line at the bottom that is used for messages. When a message is long, it is either truncated, thus you can only see part of it, or the text scrolls and you have to press <Enter> to continue. You can set the 'cmdheight' option to the number of lines used for messages. Example: > :set cmdheight=3 This does mean there is less room to edit text, thus it's a compromise. ============================================================================== Next chapter: |usr_06.txt| Using syntax highlighting Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ���������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_06.txt�����������������������������������������������������������������0000664�0000000�0000000�00000022227�13204015742�0017122�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_06.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Using syntax highlighting Black and white text is boring. With colors your file comes to life. This not only looks nice, it also speeds up your work. Change the colors used for the different sorts of text. Print your text, with the colors you see on the screen. |06.1| Switching it on |06.2| No or wrong colors? |06.3| Different colors |06.4| With colors or without colors |06.5| Printing with colors |06.6| Further reading Next chapter: |usr_07.txt| Editing more than one file Previous chapter: |usr_05.txt| Set your settings Table of contents: |usr_toc.txt| ============================================================================== *06.1* Switching it on It all starts with one simple command: > :syntax enable That should work in most situations to get color in your files. Vim will automagically detect the type of file and load the right syntax highlighting. Suddenly comments are blue, keywords brown and strings red. This makes it easy to overview the file. After a while you will find that black&white text slows you down! If you always want to use syntax highlighting, put the ":syntax enable" command in your |init.vim| file. If you want syntax highlighting only when the terminal supports colors, you can put this in your |init.vim| file: > if &t_Co > 1 syntax enable endif If you want syntax highlighting only in the GUI version, put the ":syntax enable" command in your |ginit.vim| file. ============================================================================== *06.2* No or wrong colors? There can be a number of reasons why you don't see colors: - Your terminal does not support colors. Vim will use bold, italic and underlined text, but this doesn't look very nice. You probably will want to try to get a terminal with colors. - Your terminal does support colors, but Vim doesn't know this. Make sure your $TERM setting is correct. For example, when using an xterm that supports colors: > setenv TERM xterm-color < or (depending on your shell): > TERM=xterm-color; export TERM < The terminal name must match the terminal you are using. - The file type is not recognized. Vim doesn't know all file types, and sometimes it's near to impossible to tell what language a file uses. Try this command: > :set filetype < If the result is "filetype=" then the problem is indeed that Vim doesn't know what type of file this is. You can set the type manually: > :set filetype=fortran < To see which types are available, look in the directory $VIMRUNTIME/syntax. For the GUI you can use the Syntax menu. Setting the filetype can also be done with a |modeline|, so that the file will be highlighted each time you edit it. For example, this line can be used in a Makefile (put it near the start or end of the file): > # vim: syntax=make < You might know how to detect the file type yourself. Often the file name extension (after the dot) can be used. See |new-filetype| for how to tell Vim to detect that file type. - There is no highlighting for your file type. You could try using a similar file type by manually setting it as mentioned above. If that isn't good enough, you can write your own syntax file, see |mysyntaxfile|. Or the colors could be wrong: - The colored text is very hard to read. Vim guesses the background color that you are using. If it is black (or another dark color) it will use light colors for text. If it is white (or another light color) it will use dark colors for text. If Vim guessed wrong the text will be hard to read. To solve this, set the 'background' option. For a dark background: > :set background=dark < And for a light background: > :set background=light < Make sure you put this _before_ the ":syntax enable" command, otherwise the colors will already have been set. You could do ":syntax reset" after setting 'background' to make Vim set the default colors again. - The colors are wrong when scrolling bottom to top. Vim doesn't read the whole file to parse the text. It starts parsing wherever you are viewing the file. That saves a lot of time, but sometimes the colors are wrong. A simple fix is hitting CTRL-L. Or scroll back a bit and then forward again. For a real fix, see |:syn-sync|. Some syntax files have a way to make it look further back, see the help for the specific syntax file. For example, |tex.vim| for the TeX syntax. ============================================================================== *06.3* Different colors *:syn-default-override* If you don't like the default colors, you can select another color scheme. In the GUI use the Edit/Color Scheme menu. You can also type the command: > :colorscheme evening "evening" is the name of the color scheme. There are several others you might want to try out. Look in the directory $VIMRUNTIME/colors. When you found the color scheme that you like, add the ":colorscheme" command to your |init.vim| file. You could also write your own color scheme. This is how you do it: 1. Select a color scheme that comes close. Copy this file to your own Vim directory. For Unix, this should work: > !mkdir -p ~/.config/nvim/colors !cp $VIMRUNTIME/colors/morning.vim ~/.config/nvim/colors/mine.vim < This is done from Vim, because it knows the value of $VIMRUNTIME. 2. Edit the color scheme file. These entries are useful: term attributes in a B&W terminal cterm attributes in a color terminal ctermfg foreground color in a color terminal ctermbg background color in a color terminal gui attributes in the GUI guifg foreground color in the GUI guibg background color in the GUI For example, to make comments green: > :highlight Comment ctermfg=green guifg=green < Attributes you can use for "cterm" and "gui" are "bold" and "underline". If you want both, use "bold,underline". For details see the |:highlight| command. 3. Tell Vim to always use your color scheme. Put this line in your |vimrc|: > colorscheme mine If you want to see what the most often used color combinations look like, use this command: > :runtime syntax/colortest.vim You will see text in various color combinations. You can check which ones are readable and look nice. ============================================================================== *06.4* With colors or without colors Displaying text in color takes a lot of effort. If you find the displaying too slow, you might want to disable syntax highlighting for a moment: > :syntax clear When editing another file (or the same one) the colors will come back. *:syn-off* If you want to stop highlighting completely use: > :syntax off This will completely disable syntax highlighting and remove it immediately for all buffers. *:syn-manual* If you want syntax highlighting only for specific files, use this: > :syntax manual This will enable the syntax highlighting, but not switch it on automatically when starting to edit a buffer. To switch highlighting on for the current buffer, set the 'syntax' option: > :set syntax=ON < ============================================================================== *06.5* Printing with colors *syntax-printing* In the MS-Windows version you can print the current file with this command: > :hardcopy You will get the usual printer dialog, where you can select the printer and a few settings. If you have a color printer, the paper output should look the same as what you see inside Vim. But when you use a dark background the colors will be adjusted to look good on white paper. There are several options that change the way Vim prints: 'printdevice' 'printheader' 'printfont' 'printoptions' To print only a range of lines, use Visual mode to select the lines and then type the command: > v100j:hardcopy "v" starts Visual mode. "100j" moves a hundred lines down, they will be highlighted. Then ":hardcopy" will print those lines. You can use other commands to move in Visual mode, of course. This also works on Unix, if you have a PostScript printer. Otherwise, you will have to do a bit more work. You need to convert the text to HTML first, and then print it from a web browser. Convert the current file to HTML with this command: > :TOhtml In case that doesn't work: > :source $VIMRUNTIME/syntax/2html.vim You will see it crunching away, this can take quite a while for a large file. Some time later another window shows the HTML code. Now write this somewhere (doesn't matter where, you throw it away later): > :write main.c.html Open this file in your favorite browser and print it from there. If all goes well, the output should look exactly as it does in Vim. See |2html.vim| for details. Don't forget to delete the HTML file when you are done with it. Instead of printing, you could also put the HTML file on a web server, and let others look at the colored text. ============================================================================== *06.6* Further reading |usr_44.txt| Your own syntax highlighted. |syntax| All the details. ============================================================================== Next chapter: |usr_07.txt| Editing more than one file Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_07.txt�����������������������������������������������������������������0000664�0000000�0000000�00000037104�13204015742�0017123�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_07.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Editing more than one file No matter how many files you have, you can edit them without leaving Vim. Define a list of files to work on and jump from one to the other. Copy text from one file and put it in another one. |07.1| Edit another file |07.2| A list of files |07.3| Jumping from file to file |07.4| Backup files |07.5| Copy text between files |07.6| Viewing a file |07.7| Changing the file name Next chapter: |usr_08.txt| Splitting windows Previous chapter: |usr_06.txt| Using syntax highlighting Table of contents: |usr_toc.txt| ============================================================================== *07.1* Edit another file So far you had to start Vim for every file you wanted to edit. There is a simpler way. To start editing another file, use this command: > :edit foo.txt You can use any file name instead of "foo.txt". Vim will close the current file and open the new one. If the current file has unsaved changes, however, Vim displays an error message and does not open the new file: E37: No write since last change (use ! to override) ~ Note: Vim puts an error ID at the start of each error message. If you do not understand the message or what caused it, look in the help system for this ID. In this case: > :help E37 At this point, you have a number of alternatives. You can write the file using this command: > :write Or you can force Vim to discard your changes and edit the new file, using the force (!) character: > :edit! foo.txt If you want to edit another file, but not write the changes in the current file yet, you can make it hidden: > :hide edit foo.txt The text with changes is still there, but you can't see it. This is further explained in section |22.4|: The buffer list. ============================================================================== *07.2* A list of files You can start Vim to edit a sequence of files. For example: > vim one.c two.c three.c This command starts Vim and tells it that you will be editing three files. Vim displays just the first file. After you have done your thing in this file, to edit the next file you use this command: > :next If you have unsaved changes in the current file, you will get an error message and the ":next" will not work. This is the same problem as with ":edit" mentioned in the previous section. To abandon the changes: > :next! But mostly you want to save the changes and move on to the next file. There is a special command for this: > :wnext This does the same as using two separate commands: > :write :next WHERE AM I? To see which file in the argument list you are editing, look in the window title. It should show something like "(2 of 3)". This means you are editing the second file out of three files. If you want to see the list of files, use this command: > :args This is short for "arguments". The output might look like this: one.c [two.c] three.c ~ These are the files you started Vim with. The one you are currently editing, "two.c", is in square brackets. MOVING TO OTHER ARGUMENTS To go back one file: > :previous This is just like the ":next" command, except that it moves in the other direction. Again, there is a shortcut command for when you want to write the file first: > :wprevious To move to the very last file in the list: > :last And to move back to the first one again: > :first There is no ":wlast" or ":wfirst" command though! You can use a count for ":next" and ":previous". To skip two files forward: > :2next AUTOMATIC WRITING When moving around the files and making changes, you have to remember to use ":write". Otherwise you will get an error message. If you are sure you always want to write modified files, you can tell Vim to automatically write them: > :set autowrite When you are editing a file which you may not want to write, switch it off again: > :set noautowrite EDITING ANOTHER LIST OF FILES You can redefine the list of files without the need to exit Vim and start it again. Use this command to edit three other files: > :args five.c six.c seven.h Or use a wildcard, like it's used in the shell: > :args *.txt Vim will take you to the first file in the list. Again, if the current file has changes, you can either write the file first, or use ":args!" (with ! added) to abandon the changes. DID YOU EDIT THE LAST FILE? *arglist-quit* When you use a list of files, Vim assumes you want to edit them all. To protect you from exiting too early, you will get this error when you didn't edit the last file in the list yet: E173: 46 more files to edit ~ If you really want to exit, just do it again. Then it will work (but not when you did other commands in between). ============================================================================== *07.3* Jumping from file to file To quickly jump between two files, press CTRL-^ (on English-US keyboards the ^ is above the 6 key). Example: > :args one.c two.c three.c You are now in one.c. > :next Now you are in two.c. Now use CTRL-^ to go back to one.c. Another CTRL-^ and you are back in two.c. Another CTRL-^ and you are in one.c again. If you now do: > :next You are in three.c. Notice that the CTRL-^ command does not change the idea of where you are in the list of files. Only commands like ":next" and ":previous" do that. The file you were previously editing is called the "alternate" file. When you just started Vim CTRL-^ will not work, since there isn't a previous file. PREDEFINED MARKS After jumping to another file, you can use two predefined marks which are very useful: > `" This takes you to the position where the cursor was when you left the file. Another mark that is remembered is the position where you made the last change: > `. Suppose you are editing the file "one.txt". Somewhere halfway through the file you use "x" to delete a character. Then you go to the last line with "G" and write the file with ":w". You edit several other files, and then use ":edit one.txt" to come back to "one.txt". If you now use `" Vim jumps to the last line of the file. Using `. takes you to the position where you deleted the character. Even when you move around in the file `" and `. will take you to the remembered position. At least until you make another change or leave the file. FILE MARKS In chapter 4 was explained how you can place a mark in a file with "mx" and jump to that position with "`x". That works within one file. If you edit another file and place marks there, these are specific for that file. Thus each file has its own set of marks, they are local to the file. So far we were using marks with a lowercase letter. There are also marks with an uppercase letter. These are global, they can be used from any file. For example suppose that we are editing the file "foo.txt". Go to halfway down the file ("50%") and place the F mark there (F for foo): > 50%mF Now edit the file "bar.txt" and place the B mark (B for bar) at its last line: > GmB Now you can use the "'F" command to jump back to halfway of foo.txt. Or edit yet another file, type "'B" and you jump to the end of bar.txt. The file marks are remembered until they are placed somewhere else. Thus you can place the mark, do hours of editing and still be able to jump back to that mark. It's often useful to think of a simple connection between the mark letter and where it is placed. For example, use the H mark in a header file, M in a Makefile and C in a C code file. To see where a specific mark is, give an argument to the ":marks" command: > :marks M You can also give several arguments: > :marks MCP Don't forget that you can use CTRL-O and CTRL-I to jump to older and newer positions without placing marks there. ============================================================================== *07.4* Backup files Usually Vim does not produce a backup file. If you want to have one, all you need to do is execute the following command: > :set backup The name of the backup file is the original file with a ~ added to the end. If your file is named data.txt, for example, the backup file name is data.txt~. If you do not like the fact that the backup files end with ~, you can change the extension: > :set backupext=.bak This will use data.txt.bak instead of data.txt~. Another option that matters here is 'backupdir'. It specifies where the backup file is written. The default, to write the backup in the same directory as the original file, will mostly be the right thing. Note: When the 'backup' option isn't set but the 'writebackup' is, Vim will still create a backup file. However, it is deleted as soon as writing the file was completed successfully. This functions as a safety against losing your original file when writing fails in some way (disk full is the most common cause; being hit by lightning might be another, although less common). KEEPING THE ORIGINAL FILE If you are editing source files, you might want to keep the file before you make any changes. But the backup file will be overwritten each time you write the file. Thus it only contains the previous version, not the first one. To make Vim keep the original file, set the 'patchmode' option. This specifies the extension used for the first backup of a changed file. Usually you would do this: > :set patchmode=.orig When you now edit the file data.txt for the first time, make changes and write the file, Vim will keep a copy of the unchanged file under the name "data.txt.orig". If you make further changes to the file, Vim will notice that "data.txt.orig" already exists and leave it alone. Further backup files will then be called "data.txt~" (or whatever you specified with 'backupext'). If you leave 'patchmode' empty (that is the default), the original file will not be kept. ============================================================================== *07.5* Copy text between files This explains how to copy text from one file to another. Let's start with a simple example. Edit the file that contains the text you want to copy. Move the cursor to the start of the text and press "v". This starts Visual mode. Now move the cursor to the end of the text and press "y". This yanks (copies) the selected text. To copy the above paragraph, you would do: > :edit thisfile /This vjjjj$y Now edit the file you want to put the text in. Move the cursor to the character where you want the text to appear after. Use "p" to put the text there. > :edit otherfile /There p Of course you can use many other commands to yank the text. For example, to select whole lines start Visual mode with "V". Or use CTRL-V to select a rectangular block. Or use "Y" to yank a single line, "yaw" to yank-a-word, etc. The "p" command puts the text after the cursor. Use "P" to put the text before the cursor. Notice that Vim remembers if you yanked a whole line or a block, and puts it back that way. USING REGISTERS When you want to copy several pieces of text from one file to another, having to switch between the files and writing the target file takes a lot of time. To avoid this, copy each piece of text to its own register. A register is a place where Vim stores text. Here we will use the registers named a to z (later you will find out there are others). Let's copy a sentence to the f register (f for First): > "fyas The "yas" command yanks a sentence like before. It's the "f that tells Vim the text should be placed in the f register. This must come just before the yank command. Now yank three whole lines to the l register (l for line): > "l3Y The count could be before the "l just as well. To yank a block of text to the b (for block) register: > CTRL-Vjjww"by Notice that the register specification "b is just before the "y" command. This is required. If you would have put it before the "w" command, it would not have worked. Now you have three pieces of text in the f, l and b registers. Edit another file, move around and place the text where you want it: > "fp Again, the register specification "f comes before the "p" command. You can put the registers in any order. And the text stays in the register until you yank something else into it. Thus you can put it as many times as you like. When you delete text, you can also specify a register. Use this to move several pieces of text around. For example, to delete-a-word and write it in the w register: > "wdaw Again, the register specification comes before the delete command "d". APPENDING TO A FILE When collecting lines of text into one file, you can use this command: > :write >> logfile This will write the text of the current file to the end of "logfile". Thus it is appended. This avoids that you have to copy the lines, edit the log file and put them there. Thus you save two steps. But you can only append to the end of a file. To append only a few lines, select them in Visual mode before typing ":write". In chapter 10 you will learn other ways to select a range of lines. ============================================================================== *07.6* Viewing a file Sometimes you only want to see what a file contains, without the intention to ever write it back. There is the risk that you type ":w" without thinking and overwrite the original file anyway. To avoid this, edit the file read-only. To start Vim in readonly mode, use this command: > vim -R file On Unix this command should do the same thing: > view file You are now editing "file" in read-only mode. When you try using ":w" you will get an error message and the file won't be written. When you try to make a change to the file Vim will give you a warning: W10: Warning: Changing a readonly file ~ The change will be done though. This allows for formatting the file, for example, to be able to read it easily. If you make changes to a file and forgot that it was read-only, you can still write it. Add the ! to the write command to force writing. If you really want to forbid making changes in a file, do this: > vim -M file Now every attempt to change the text will fail. The help files are like this, for example. If you try to make a change you get this error message: E21: Cannot make changes, 'modifiable' is off ~ You could use the -M argument to setup Vim to work in a viewer mode. This is only voluntary though, since these commands will remove the protection: > :set modifiable :set write ============================================================================== *07.7* Changing the file name A clever way to start editing a new file is by using an existing file that contains most of what you need. For example, you start writing a new program to move a file. You know that you already have a program that copies a file, thus you start with: > :edit copy.c You can delete the stuff you don't need. Now you need to save the file under a new name. The ":saveas" command can be used for this: > :saveas move.c Vim will write the file under the given name, and edit that file. Thus the next time you do ":write", it will write "move.c". "copy.c" remains unmodified. When you want to change the name of the file you are editing, but don't want to write the file, you can use this command: > :file move.c Vim will mark the file as "not edited". This means that Vim knows this is not the file you started editing. When you try to write the file, you might get this message: E13: File exists (use ! to override) ~ This protects you from accidentally overwriting another file. ============================================================================== Next chapter: |usr_08.txt| Splitting windows Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_08.txt�����������������������������������������������������������������0000664�0000000�0000000�00000045603�13204015742�0017127�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_08.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Splitting windows Display two different files above each other. Or view two locations in the file at the same time. See the difference between two files by putting them side by side. All this is possible with split windows. |08.1| Split a window |08.2| Split a window on another file |08.3| Window size |08.4| Vertical splits |08.5| Moving windows |08.6| Commands for all windows |08.7| Viewing differences with diff mode |08.8| Various |08.9| Tab pages Next chapter: |usr_09.txt| Using the GUI Previous chapter: |usr_07.txt| Editing more than one file Table of contents: |usr_toc.txt| ============================================================================== *08.1* Split a window The easiest way to open a new window is to use the following command: > :split This command splits the screen into two windows and leaves the cursor in the top one: +----------------------------------+ |/* file one.c */ | |~ | |~ | |one.c=============================| |/* file one.c */ | |~ | |one.c=============================| | | +----------------------------------+ What you see here is two windows on the same file. The line with "====" is the status line. It displays information about the window above it. (In practice the status line will be in reverse video.) The two windows allow you to view two parts of the same file. For example, you could make the top window show the variable declarations of a program, and the bottom one the code that uses these variables. The CTRL-W w command can be used to jump between the windows. If you are in the top window, CTRL-W w jumps to the window below it. If you are in the bottom window it will jump to the first window. (CTRL-W CTRL-W does the same thing, in case you let go of the CTRL key a bit later.) CLOSE THE WINDOW To close a window, use the command: > :close Actually, any command that quits editing a file works, like ":quit" and "ZZ". But ":close" prevents you from accidentally exiting Vim when you close the last window. CLOSING ALL OTHER WINDOWS If you have opened a whole bunch of windows, but now want to concentrate on one of them, this command will be useful: > :only This closes all windows, except for the current one. If any of the other windows has changes, you will get an error message and that window won't be closed. ============================================================================== *08.2* Split a window on another file The following command opens a second window and starts editing the given file: > :split two.c If you were editing one.c, then the result looks like this: +----------------------------------+ |/* file two.c */ | |~ | |~ | |two.c=============================| |/* file one.c */ | |~ | |one.c=============================| | | +----------------------------------+ To open a window on a new, empty file, use this: > :new You can repeat the ":split" and ":new" commands to create as many windows as you like. ============================================================================== *08.3* Window size The ":split" command can take a number argument. If specified, this will be the height of the new window. For example, the following opens a new window three lines high and starts editing the file alpha.c: > :3split alpha.c For existing windows you can change the size in several ways. When you have a working mouse, it is easy: Move the mouse pointer to the status line that separates two windows, and drag it up or down. To increase the size of a window: > CTRL-W + To decrease it: > CTRL-W - Both of these commands take a count and increase or decrease the window size by that many lines. Thus "4 CTRL-W +" make the window four lines higher. To set the window height to a specified number of lines: > {height}CTRL-W _ That's: a number {height}, CTRL-W and then an underscore (the - key with Shift on English-US keyboards). To make a window as high as it can be, use the CTRL-W _ command without a count. USING THE MOUSE In Vim you can do many things very quickly from the keyboard. Unfortunately, the window resizing commands require quite a bit of typing. In this case, using the mouse is faster. Position the mouse pointer on a status line. Now press the left mouse button and drag. The status line will move, thus making the window on one side higher and the other smaller. OPTIONS The 'winheight' option can be set to a minimal desired height of a window and 'winminheight' to a hard minimum height. Likewise, there is 'winwidth' for the minimal desired width and 'winminwidth' for the hard minimum width. The 'equalalways' option, when set, makes Vim equalize the windows sizes when a window is closed or opened. ============================================================================== *08.4* Vertical splits The ":split" command creates the new window above the current one. To make the window appear at the left side, use: > :vsplit or: > :vsplit two.c The result looks something like this: +--------------------------------------+ |/* file two.c */ |/* file one.c */ | |~ |~ | |~ |~ | |~ |~ | |two.c===============one.c=============| | | +--------------------------------------+ Actually, the | lines in the middle will be in reverse video. This is called the vertical separator. It separates the two windows left and right of it. There is also the ":vnew" command, to open a vertically split window on a new, empty file. Another way to do this: > :vertical new The ":vertical" command can be inserted before another command that splits a window. This will cause that command to split the window vertically instead of horizontally. (If the command doesn't split a window, it works unmodified.) MOVING BETWEEN WINDOWS Since you can split windows horizontally and vertically as much as you like, you can create almost any layout of windows. Then you can use these commands to move between them: CTRL-W h move to the window on the left CTRL-W j move to the window below CTRL-W k move to the window above CTRL-W l move to the window on the right CTRL-W t move to the TOP window CTRL-W b move to the BOTTOM window You will notice the same letters as used for moving the cursor. And the cursor keys can also be used, if you like. More commands to move to other windows: |Q_wi|. ============================================================================== *08.5* Moving windows You have split a few windows, but now they are in the wrong place. Then you need a command to move the window somewhere else. For example, you have three windows like this: +----------------------------------+ |/* file two.c */ | |~ | |~ | |two.c=============================| |/* file three.c */ | |~ | |~ | |three.c===========================| |/* file one.c */ | |~ | |one.c=============================| | | +----------------------------------+ Clearly the last one should be at the top. Go to that window (using CTRL-W w) and the type this command: > CTRL-W K This uses the uppercase letter K. What happens is that the window is moved to the very top. You will notice that K is again used for moving upwards. When you have vertical splits, CTRL-W K will move the current window to the top and make it occupy the full width of the Vim window. If this is your layout: +-------------------------------------------+ |/* two.c */ |/* three.c */ |/* one.c */ | |~ |~ |~ | |~ |~ |~ | |~ |~ |~ | |~ |~ |~ | |~ |~ |~ | |two.c=========three.c=========one.c========| | | +-------------------------------------------+ Then using CTRL-W K in the middle window (three.c) will result in: +-------------------------------------------+ |/* three.c */ | |~ | |~ | |three.c====================================| |/* two.c */ |/* one.c */ | |~ |~ | |two.c==================one.c===============| | | +-------------------------------------------+ The other three similar commands (you can probably guess these now): CTRL-W H move window to the far left CTRL-W J move window to the bottom CTRL-W L move window to the far right ============================================================================== *08.6* Commands for all windows When you have several windows open and you want to quit Vim, you can close each window separately. A quicker way is using this command: > :qall This stands for "quit all". If any of the windows contain changes, Vim will not exit. The cursor will automatically be positioned in a window with changes. You can then either use ":write" to save the changes, or ":quit!" to throw them away. If you know there are windows with changes, and you want to save all these changes, use this command: > :wall This stands for "write all". But actually, it only writes files with changes. Vim knows it doesn't make sense to write files that were not changed. And then there is the combination of ":qall" and ":wall": the "write and quit all" command: > :wqall This writes all modified files and quits Vim. Finally, there is a command that quits Vim and throws away all changes: > :qall! Be careful, there is no way to undo this command! OPENING A WINDOW FOR ALL ARGUMENTS To make Vim open a window for each file, start it with the "-o" argument: > vim -o one.txt two.txt three.txt This results in: +-------------------------------+ |file one.txt | |~ | |one.txt========================| |file two.txt | |~ | |two.txt========================| |file three.txt | |~ | |three.txt======================| | | +-------------------------------+ The "-O" argument is used to get vertically split windows. When Vim is already running, the ":all" command opens a window for each file in the argument list. ":vertical all" does it with vertical splits. ============================================================================== *08.7* Viewing differences with diff mode There is a special way to start Nvim, which shows the differences between two files. Let's take a file "main.c" and insert a few characters in one line. Write this file with the 'backup' option set, so that the backup file "main.c~" will contain the previous version of the file. Type this command in a shell to start Nvim in diff mode: > nvim -d main.c~ main.c Vim will start, with two windows side by side. You will only see the line in which you added characters, and a few lines above and below it. VV VV +-----------------------------------------+ |+ +--123 lines: /* a|+ +--123 lines: /* a| <- fold | text | text | | text | text | | text | text | | text | changed text | <- changed line | text | text | | text | ------------------| <- deleted line | text | text | | text | text | | text | text | |+ +--432 lines: text|+ +--432 lines: text| <- fold | ~ | ~ | | ~ | ~ | |main.c~==============main.c==============| | | +-----------------------------------------+ (This picture doesn't show the highlighting, use "nvim -d" for that.) The lines that were not modified have been collapsed into one line. This is called a closed fold. They are indicated in the picture with "<- fold". Thus the single fold line at the top stands for 123 text lines. These lines are equal in both files. The line marked with "<- changed line" is highlighted, and the inserted text is displayed with another color. This clearly shows what the difference is between the two files. The line that was deleted is displayed with "---" in the main.c window. See the "<- deleted line" marker in the picture. These characters are not really there. They just fill up main.c, so that it displays the same number of lines as the other window. THE FOLD COLUMN Each window has a column on the left with a slightly different background. In the picture above these are indicated with "VV". You notice there is a plus character there, in front of each closed fold. Move the mouse pointer to that plus and click the left button. The fold will open, and you can see the text that it contains. The fold column contains a minus sign for an open fold. If you click on this -, the fold will close. Obviously, this only works when you have a working mouse. You can also use "zo" to open a fold and "zc" to close it. DIFFING IN VIM Another way to start in diff mode can be done from inside Vim. Edit the "main.c" file, then make a split and show the differences: > :edit main.c :vertical diffsplit main.c~ The ":vertical" command is used to make the window split vertically. If you omit this, you will get a horizontal split. If you have a patch or diff file, you can use the third way to start diff mode. First edit the file to which the patch applies. Then tell Vim the name of the patch file: > :edit main.c :vertical diffpatch main.c.diff WARNING: The patch file must contain only one patch, for the file you are editing. Otherwise you will get a lot of error messages, and some files might be patched unexpectedly. The patching will only be done to the copy of the file in Vim. The file on your harddisk will remain unmodified (until you decide to write the file). SCROLL BINDING When the files have more changes, you can scroll in the usual way. Vim will try to keep both the windows start at the same position, so you can easily see the differences side by side. When you don't want this for a moment, use this command: > :set noscrollbind JUMPING TO CHANGES When you have disabled folding in some way, it may be difficult to find the changes. Use this command to jump forward to the next change: > ]c To go the other way use: > [c Prepended a count to jump further away. REMOVING CHANGES You can move text from one window to the other. This either removes differences or adds new ones. Vim doesn't keep the highlighting updated in all situations. To update it use this command: > :diffupdate To remove a difference, you can move the text in a highlighted block from one window to another. Take the "main.c" and "main.c~" example above. Move the cursor to the left window, on the line that was deleted in the other window. Now type this command: > dp The change will be removed by putting the text of the current window in the other window. "dp" stands for "diff put". You can also do it the other way around. Move the cursor to the right window, to the line where "changed" was inserted. Now type this command: > do The change will now be removed by getting the text from the other window. Since there are no changes left now, Vim puts all text in a closed fold. "do" stands for "diff obtain". "dg" would have been better, but that already has a different meaning ("dgg" deletes from the cursor until the first line). For details about diff mode, see |diff-mode|. ============================================================================== *08.8* Various The 'laststatus' option can be used to specify when the last window has a statusline: 0 never 1 only when there are split windows (the default) 2 always Many commands that edit another file have a variant that splits the window. For Command-line commands this is done by prepending an "s". For example: ":tag" jumps to a tag, ":stag" splits the window and jumps to a tag. For Normal mode commands a CTRL-W is prepended. CTRL-^ jumps to the alternate file, CTRL-W CTRL-^ splits the window and edits the alternate file. The 'splitbelow' option can be set to make a new window appear below the current window. The 'splitright' option can be set to make a vertically split window appear right of the current window. When splitting a window you can prepend a modifier command to tell where the window is to appear: :leftabove {cmd} left or above the current window :aboveleft {cmd} idem :rightbelow {cmd} right or below the current window :belowright {cmd} idem :topleft {cmd} at the top or left of the Vim window :botright {cmd} at the bottom or right of the Vim window ============================================================================== *08.9* Tab pages You will have noticed that windows never overlap. That means you quickly run out of screen space. The solution for this is called Tab pages. Assume you are editing "thisfile". To create a new tab page use this command: > :tabedit thatfile This will edit the file "thatfile" in a window that occupies the whole Vim window. And you will notice a bar at the top with the two file names: +----------------------------------+ | thisfile | /thatfile/ __________X| (thatfile is bold) |/* thatfile */ | |that | |that | |~ | |~ | |~ | | | +----------------------------------+ You now have two tab pages. The first one has a window for "thisfile" and the second one a window for "thatfile". It's like two pages that are on top of each other, with a tab sticking out of each page showing the file name. Now use the mouse to click on "thisfile" in the top line. The result is +----------------------------------+ | /thisfile/ | thatfile __________X| (thisfile is bold) |/* thisfile */ | |this | |this | |~ | |~ | |~ | | | +----------------------------------+ Thus you can switch between tab pages by clicking on the label in the top line. If you don't have a mouse or don't want to use it, you can use the "gt" command. Mnemonic: Goto Tab. Now let's create another tab page with the command: > :tab split This makes a new tab page with one window that is editing the same buffer as the window we were in: +-------------------------------------+ | thisfile | /thisfile/ | thatfile __X| (thisfile is bold) |/* thisfile */ | |this | |this | |~ | |~ | |~ | | | +-------------------------------------+ You can put ":tab" before any Ex command that opens a window. The window will be opened in a new tab page. Another example: > :tab help gt Will show the help text for "gt" in a new tab page. A few more things you can do with tab pages: - click with the mouse in the space after the last label The next tab page will be selected, like with "gt". - click with the mouse on the "X" in the top right corner The current tab page will be closed. Unless there are unsaved changes in the current tab page. - double click with the mouse in the top line A new tab page will be created. - the "tabonly" command Closes all tab pages except the current one. Unless there are unsaved changes in other tab pages. For more information about tab pages see |tab-page|. ============================================================================== Next chapter: |usr_09.txt| Using the GUI Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �����������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_09.txt�����������������������������������������������������������������0000664�0000000�0000000�00000025642�13204015742�0017131�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_09.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Using the GUI Vim works in an ordinary terminal. GVim can do the same things and a few more. The GUI offers menus, a toolbar, scrollbars and other items. This chapter is about these extra things that the GUI offers. |09.1| Parts of the GUI |09.2| Using the mouse |09.3| The clipboard |09.4| Select mode Next chapter: |usr_10.txt| Making big changes Previous chapter: |usr_08.txt| Splitting windows Table of contents: |usr_toc.txt| ============================================================================== *09.1* Parts of the GUI You might have an icon on your desktop that starts gvim. Otherwise, one of these commands should do it: > gvim file.txt vim -g file.txt If this doesn't work you don't have a version of Vim with GUI support. You will have to install one first. Vim will open a window and display "file.txt" in it. What the window looks like depends on the version of Vim. It should resemble the following picture (for as far as this can be shown in ASCII!). +----------------------------------------------------+ | file.txt + (~/dir) - VIM X | <- window title +----------------------------------------------------+ | File Edit Tools Syntax Buffers Window Help | <- menubar +----------------------------------------------------+ | aaa bbb ccc ddd eee fff ggg hhh iii jjj | <- toolbar | aaa bbb ccc ddd eee fff ggg hhh iii jjj | +----------------------------------------------------+ | file text | ^ | | ~ | # | | ~ | # | <- scrollbar | ~ | # | | ~ | # | | ~ | # | | | V | +----------------------------------------------------+ The largest space is occupied by the file text. This shows the file in the same way as in a terminal. With some different colors and another font perhaps. THE WINDOW TITLE At the very top is the window title. This is drawn by your window system. Vim will set the title to show the name of the current file. First comes the name of the file. Then some special characters and the directory of the file in parens. These special characters can be present: - The file cannot be modified (e.g., a help file) + The file contains changes = The file is read-only =+ The file is read-only, contains changes anyway If nothing is shown you have an ordinary, unchanged file. THE MENUBAR You know how menus work, right? Vim has the usual items, plus a few more. Browse them to get an idea of what you can use them for. A relevant submenu is Edit/Global Settings. You will find these entries: Toggle Toolbar make the toolbar appear/disappear Toggle Bottom Scrollbar make a scrollbar appear/disappear at the bottom Toggle Left Scrollbar make a scrollbar appear/disappear at the left Toggle Right Scrollbar make a scrollbar appear/disappear at the right THE TOOLBAR This contains icons for the most often used actions. Hopefully the icons are self-explanatory. There are tooltips to get an extra hint (move the mouse pointer to the icon without clicking and don't move it for a second). The "Edit/Global Settings/Toggle Toolbar" menu item can be used to make the toolbar disappear. If you never want a toolbar, use this command in your vimrc file: > :set guioptions-=T This removes the 'T' flag from the 'guioptions' option. Other parts of the GUI can also be enabled or disabled with this option. See the help for it. THE SCROLLBARS By default there is one scrollbar on the right. It does the obvious thing. When you split the window, each window will get its own scrollbar. You can make a horizontal scrollbar appear with the menu item Edit/Global Settings/Toggle Bottom Scrollbar. This is useful in diff mode, or when the 'wrap' option has been reset (more about that later). When there are vertically split windows, only the windows on the right side will have a scrollbar. However, when you move the cursor to a window on the left, it will be this one the that scrollbar controls. This takes a bit of time to get used to. When you work with vertically split windows, consider adding a scrollbar on the left. This can be done with a menu item, or with the 'guioptions' option: > :set guioptions+=l This adds the 'l' flag to 'guioptions'. ============================================================================== *09.2* Using the mouse Standards are wonderful. In Microsoft Windows, you can use the mouse to select text in a standard manner. The X Window system also has a standard system for using the mouse. Unfortunately, these two standards are not the same. Fortunately, you can customize Vim. You can make the behavior of the mouse work like an X Window system mouse or a Microsoft Windows mouse. The following command makes the mouse behave like an X Window mouse: > :behave xterm The following command makes the mouse work like a Microsoft Windows mouse: > :behave mswin The default behavior of the mouse on Unix systems is xterm. The default behavior on Windows systems is selected during the installation process. For details about what the two behaviors are, see |:behave|. Here follows a summary. XTERM MOUSE BEHAVIOR Left mouse click position the cursor Left mouse drag select text in Visual mode Middle mouse click paste text from the clipboard Right mouse click extend the selected text until the mouse pointer MSWIN MOUSE BEHAVIOR Left mouse click position the cursor Left mouse drag select text in Select mode (see |09.4|) Left mouse click, with Shift extend the selected text until the mouse pointer Middle mouse click paste text from the clipboard Right mouse click display a pop-up menu The mouse can be further tuned. Check out these options if you want to change the way how the mouse works: 'mouse' in which mode the mouse is used by Vim 'mousemodel' what effect a mouse click has 'mousetime' time between clicks for a double-click 'mousehide' hide the mouse while typing 'selectmode' whether the mouse starts Visual or Select mode ============================================================================== *09.3* The clipboard In section |04.7| the basic use of the clipboard was explained. There is one essential thing to explain about X-windows: There are actually two places to exchange text between programs. MS-Windows doesn't have this. In X-Windows there is the "current selection". This is the text that is currently highlighted. In Vim this is the Visual area (this assumes you are using the default option settings). You can paste this selection in another application without any further action. For example, in this text select a few words with the mouse. Vim will switch to Visual mode and highlight the text. Now start another gvim, without a file name argument, so that it displays an empty window. Click the middle mouse button. The selected text will be inserted. The "current selection" will only remain valid until some other text is selected. After doing the paste in the other gvim, now select some characters in that window. You will notice that the words that were previously selected in the other gvim window are displayed differently. This means that it no longer is the current selection. You don't need to select text with the mouse, using the keyboard commands for Visual mode works just as well. THE REAL CLIPBOARD Now for the other place with which text can be exchanged. We call this the "real clipboard", to avoid confusion. Often both the "current selection" and the "real clipboard" are called clipboard, you'll have to get used to that. To put text on the real clipboard, select a few different words in one of the gvims you have running. Then use the Edit/Copy menu entry. Now the text has been copied to the real clipboard. You can't see this, unless you have some application that shows the clipboard contents (e.g., KDE's Klipper). Now select the other gvim, position the cursor somewhere and use the Edit/Paste menu. You will see the text from the real clipboard is inserted. USING BOTH This use of both the "current selection" and the "real clipboard" might sound a bit confusing. But it is very useful. Let's show this with an example. Use one gvim with a text file and perform these actions: - Select two words in Visual mode. - Use the Edit/Copy menu to get these words onto the clipboard. - Select one other word in Visual mode. - Use the Edit/Paste menu item. What will happen is that the single selected word is replaced with the two words from the clipboard. - Move the mouse pointer somewhere else and click the middle button. You will see that the word you just overwrote with the clipboard is inserted here. If you use the "current selection" and the "real clipboard" with care, you can do a lot of useful editing with them. USING THE KEYBOARD If you don't like using the mouse, you can access the current selection and the real clipboard with two registers. The "* register is for the current selection. To make text become the current selection, use Visual mode. For example, to select a whole line just press "V". To insert the current selection before the cursor: > "*P Notice the uppercase "P". The lowercase "p" puts the text after the cursor. The "+ register is used for the real clipboard. For example, to copy the text from the cursor position until the end of the line to the clipboard: > "+y$ Remember, "y" is yank, which is Vim's copy command. To insert the contents of the real clipboard before the cursor: > "+P It's the same as for the current selection, but uses the plus (+) register instead of the star (*) register. ============================================================================== *09.4* Select mode And now something that is used more often on MS-Windows than on X-Windows. But both can do it. You already know about Visual mode. Select mode is like Visual mode, because it is also used to select text. But there is an obvious difference: When typing text, the selected text is deleted and the typed text replaces it. To start working with Select mode, you must first enable it (for MS-Windows it is probably already enabled, but you can do this anyway): > :set selectmode+=mouse Now use the mouse to select some text. It is highlighted like in Visual mode. Now press a letter. The selected text is deleted, and the single letter replaces it. You are in Insert mode now, thus you can continue typing. Since typing normal text causes the selected text to be deleted, you can not use the normal movement commands "hjkl", "w", etc. Instead, use the shifted function keys. <S-Left> (shifted cursor left key) moves the cursor left. The selected text is changed like in Visual mode. The other shifted cursor keys do what you expect. <S-End> and <S-Home> also work. You can tune the way Select mode works with the 'selectmode' option. ============================================================================== Next chapter: |usr_10.txt| Making big changes Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ����������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_10.txt�����������������������������������������������������������������0000664�0000000�0000000�00000070626�13204015742�0017123�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_10.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Making big changes In chapter 4 several ways to make small changes were explained. This chapter goes into making changes that are repeated or can affect a large amount of text. The Visual mode allows doing various things with blocks of text. Use an external program to do really complicated things. |10.1| Record and playback commands |10.2| Substitution |10.3| Command ranges |10.4| The global command |10.5| Visual block mode |10.6| Reading and writing part of a file |10.7| Formatting text |10.8| Changing case |10.9| Using an external program Next chapter: |usr_11.txt| Recovering from a crash Previous chapter: |usr_09.txt| Using the GUI Table of contents: |usr_toc.txt| ============================================================================== *10.1* Record and playback commands The "." command repeats the preceding change. But what if you want to do something more complex than a single change? That's where command recording comes in. There are three steps: 1. The "q{register}" command starts recording keystrokes into the register named {register}. The register name must be between a and z. 2. Type your commands. 3. To finish recording, press q (without any extra character). You can now execute the macro by typing the command "@{register}". Take a look at how to use these commands in practice. You have a list of filenames that look like this: stdio.h ~ fcntl.h ~ unistd.h ~ stdlib.h ~ And what you want is the following: #include "stdio.h" ~ #include "fcntl.h" ~ #include "unistd.h" ~ #include "stdlib.h" ~ You start by moving to the first character of the first line. Next you execute the following commands: qa Start recording a macro in register a. ^ Move to the beginning of the line. i#include "<Esc> Insert the string #include " at the beginning of the line. $ Move to the end of the line. a"<Esc> Append the character double quotation mark (") to the end of the line. j Go to the next line. q Stop recording the macro. Now that you have done the work once, you can repeat the change by typing the command "@a" three times. The "@a" command can be preceded by a count, which will cause the macro to be executed that number of times. In this case you would type: > 3@a MOVE AND EXECUTE You might have the lines you want to change in various places. Just move the cursor to each location and use the "@a" command. If you have done that once, you can do it again with "@@". That's a bit easier to type. If you now execute register b with "@b", the next "@@" will use register b. If you compare the playback method with using ".", there are several differences. First of all, "." can only repeat one change. As seen in the example above, "@a" can do several changes, and move around as well. Secondly, "." can only remember the last change. Executing a register allows you to make any changes and then still use "@a" to replay the recorded commands. Finally, you can use 26 different registers. Thus you can remember 26 different command sequences to execute. USING REGISTERS The registers used for recording are the same ones you used for yank and delete commands. This allows you to mix recording with other commands to manipulate the registers. Suppose you have recorded a few commands in register n. When you execute this with "@n" you notice you did something wrong. You could try recording again, but perhaps you will make another mistake. Instead, use this trick: G Go to the end of the file. o<Esc> Create an empty line. "np Put the text from the n register. You now see the commands you typed as text in the file. {edits} Change the commands that were wrong. This is just like editing text. 0 Go to the start of the line. "ny$ Yank the corrected commands into the n register. dd Delete the scratch line. Now you can execute the corrected commands with "@n". (If your recorded commands include line breaks, adjust the last two items in the example to include all the lines.) APPENDING TO A REGISTER So far we have used a lowercase letter for the register name. To append to a register, use an uppercase letter. Suppose you have recorded a command to change a word to register c. It works properly, but you would like to add a search for the next word to change. This can be done with: > qC/word<Enter>q You start with "qC", which records to the c register and appends. Thus writing to an uppercase register name means to append to the register with the same letter, but lowercase. This works both with recording and with yank and delete commands. For example, you want to collect a sequence of lines into the a register. Yank the first line with: > "aY Now move to the second line, and type: > "AY Repeat this command for all lines. The a register now contains all those lines, in the order you yanked them. ============================================================================== *10.2* Substitution *find-replace* The ":substitute" command enables you to perform string replacements on a whole range of lines. The general form of this command is as follows: > :[range]substitute/from/to/[flags] This command changes the "from" string to the "to" string in the lines specified with [range]. For example, you can change "Professor" to "Teacher" in all lines with the following command: > :%substitute/Professor/Teacher/ < Note: The ":substitute" command is almost never spelled out completely. Most of the time, people use the abbreviated version ":s". From here on the abbreviation will be used. The "%" before the command specifies the command works on all lines. Without a range, ":s" only works on the current line. More about ranges in the next section |10.3|. By default, the ":substitute" command changes only the first occurrence on each line. For example, the preceding command changes the line: Professor Smith criticized Professor Johnson today. ~ to: Teacher Smith criticized Professor Johnson today. ~ To change every occurrence on the line, you need to add the g (global) flag. The command: > :%s/Professor/Teacher/g results in (starting with the original line): Teacher Smith criticized Teacher Johnson today. ~ Other flags include p (print), which causes the ":substitute" command to print out the last line it changes. The c (confirm) flag tells ":substitute" to ask you for confirmation before it performs each substitution. Enter the following: > :%s/Professor/Teacher/c Vim finds the first occurrence of "Professor" and displays the text it is about to change. You get the following prompt: > replace with Teacher (y/n/a/q/l/^E/^Y)? At this point, you must enter one of the following answers: y Yes; make this change. n No; skip this match. a All; make this change and all remaining ones without further confirmation. q Quit; don't make any more changes. l Last; make this change and then quit. CTRL-E Scroll the text one line up. CTRL-Y Scroll the text one line down. The "from" part of the substitute command is actually a pattern. The same kind as used for the search command. For example, this command only substitutes "the" when it appears at the start of a line: > :s/^the/these/ If you are substituting with a "from" or "to" part that includes a slash, you need to put a backslash before it. A simpler way is to use another character instead of the slash. A plus, for example: > :s+one/two+one or two+ ============================================================================== *10.3* Command ranges The ":substitute" command, and many other : commands, can be applied to a selection of lines. This is called a range. The simple form of a range is {number},{number}. For example: > :1,5s/this/that/g Executes the substitute command on the lines 1 to 5. Line 5 is included. The range is always placed before the command. A single number can be used to address one specific line: > :54s/President/Fool/ Some commands work on the whole file when you do not specify a range. To make them work on the current line the "." address is used. The ":write" command works like that. Without a range, it writes the whole file. To make it write only the current line into a file: > :.write otherfile The first line always has number one. How about the last line? The "$" character is used for this. For example, to substitute in the lines from the cursor to the end: > :.,$s/yes/no/ The "%" range that we used before, is actually a short way to say "1,$", from the first to the last line. USING A PATTERN IN A RANGE Suppose you are editing a chapter in a book, and want to replace all occurrences of "grey" with "gray". But only in this chapter, not in the next one. You know that only chapter boundaries have the word "Chapter" in the first column. This command will work then: > :?^Chapter?,/^Chapter/s=grey=gray=g You can see a search pattern is used twice. The first "?^Chapter?" finds the line above the current position that matches this pattern. Thus the ?pattern? range is used to search backwards. Similarly, "/^Chapter/" is used to search forward for the start of the next chapter. To avoid confusion with the slashes, the "=" character was used in the substitute command here. A slash or another character would have worked as well. ADD AND SUBTRACT There is a slight error in the above command: If the title of the next chapter had included "grey" it would be replaced as well. Maybe that's what you wanted, but what if you didn't? Then you can specify an offset. To search for a pattern and then use the line above it: > /Chapter/-1 You can use any number instead of the 1. To address the second line below the match: > /Chapter/+2 The offsets can also be used with the other items in a range. Look at this one: > :.+3,$-5 This specifies the range that starts three lines below the cursor and ends five lines before the last line in the file. USING MARKS Instead of figuring out the line numbers of certain positions, remembering them and typing them in a range, you can use marks. Place the marks as mentioned in chapter 3. For example, use "mt" to mark the top of an area and "mb" to mark the bottom. Then you can use this range to specify the lines between the marks (including the lines with the marks): > :'t,'b VISUAL MODE AND RANGES You can select text with Visual mode. If you then press ":" to start a colon command, you will see this: > :'<,'> Now you can type the command and it will be applied to the range of lines that was visually selected. Note: When using Visual mode to select part of a line, or using CTRL-V to select a block of text, the colon commands will still apply to whole lines. This might change in a future version of Vim. The '< and '> are actually marks, placed at the start and end of the Visual selection. The marks remain at their position until another Visual selection is made. Thus you can use the "'<" command to jump to position where the Visual area started. And you can mix the marks with other items: > :'>,$ This addresses the lines from the end of the Visual area to the end of the file. A NUMBER OF LINES When you know how many lines you want to change, you can type the number and then ":". For example, when you type "5:", you will get: > :.,.+4 Now you can type the command you want to use. It will use the range "." (current line) until ".+4" (four lines down). Thus it spans five lines. ============================================================================== *10.4* The global command The ":global" command is one of the more powerful features of Vim. It allows you to find a match for a pattern and execute a command there. The general form is: > :[range]global/{pattern}/{command} This is similar to the ":substitute" command. But, instead of replacing the matched text with other text, the command {command} is executed. Note: The command executed for ":global" must be one that starts with a colon. Normal mode commands can not be used directly. The |:normal| command can do this for you. Suppose you want to change "foobar" to "barfoo", but only in C++ style comments. These comments start with "//". Use this command: > :g+//+s/foobar/barfoo/g This starts with ":g". That is short for ":global", just like ":s" is short for ":substitute". Then the pattern, enclosed in plus characters. Since the pattern we are looking for contains a slash, this uses the plus character to separate the pattern. Next comes the substitute command that changes "foobar" into "barfoo". The default range for the global command is the whole file. Thus no range was specified in this example. This is different from ":substitute", which works on one line without a range. The command isn't perfect, since it also matches lines where "//" appears halfway in a line, and the substitution will also take place before the "//". Just like with ":substitute", any pattern can be used. When you learn more complicated patterns later, you can use them here. ============================================================================== *10.5* Visual block mode With CTRL-V you can start selection of a rectangular area of text. There are a few commands that do something special with the text block. There is something special about using the "$" command in Visual block mode. When the last motion command used was "$", all lines in the Visual selection will extend until the end of the line, also when the line with the cursor is shorter. This remains effective until you use a motion command that moves the cursor horizontally. Thus using "j" keeps it, "h" stops it. INSERTING TEXT The command "I{string}<Esc>" inserts the text {string} in each line, just left of the visual block. You start by pressing CTRL-V to enter visual block mode. Now you move the cursor to define your block. Next you type I to enter Insert mode, followed by the text to insert. As you type, the text appears on the first line only. After you press <Esc> to end the insert, the text will magically be inserted in the rest of the lines contained in the visual selection. Example: include one ~ include two ~ include three ~ include four ~ Move the cursor to the "o" of "one" and press CTRL-V. Move it down with "3j" to "four". You now have a block selection that spans four lines. Now type: > Imain.<Esc> The result: include main.one ~ include main.two ~ include main.three ~ include main.four ~ If the block spans short lines that do not extend into the block, the text is not inserted in that line. For example, make a Visual block selection that includes the word "long" in the first and last line of this text, and thus has no text selected in the second line: This is a long line ~ short ~ Any other long line ~ ^^^^ selected block Now use the command "Ivery <Esc>". The result is: This is a very long line ~ short ~ Any other very long line ~ In the short line no text was inserted. If the string you insert contains a newline, the "I" acts just like a Normal insert command and affects only the first line of the block. The "A" command works the same way, except that it appends after the right side of the block. And it does insert text in a short line. Thus you can make a choice whether you do or don't want to append text to a short line. There is one special case for "A": Select a Visual block and then use "$" to make the block extend to the end of each line. Using "A" now will append the text to the end of each line. Using the same example from above, and then typing "$A XXX<Esc>, you get this result: This is a long line XXX ~ short XXX ~ Any other long line XXX ~ This really requires using the "$" command. Vim remembers that it was used. Making the same selection by moving the cursor to the end of the longest line with other movement commands will not have the same result. CHANGING TEXT The Visual block "c" command deletes the block and then throws you into Insert mode to enable you to type in a string. The string will be inserted in each line in the block. Starting with the same selection of the "long" words as above, then typing "c_LONG_<Esc>", you get this: This is a _LONG_ line ~ short ~ Any other _LONG_ line ~ Just like with "I" the short line is not changed. Also, you can't enter a newline in the new text. The "C" command deletes text from the left edge of the block to the end of line. It then puts you in Insert mode so that you can type in a string, which is added to the end of each line. Starting with the same text again, and typing "Cnew text<Esc>" you get: This is a new text ~ short ~ Any other new text ~ Notice that, even though only the "long" word was selected, the text after it is deleted as well. Thus only the location of the left edge of the visual block really matters. Again, short lines that do not reach into the block are excluded. Other commands that change the characters in the block: ~ swap case (a -> A and A -> a) U make uppercase (a -> A and A -> A) u make lowercase (a -> a and A -> a) FILLING WITH A CHARACTER To fill the whole block with one character, use the "r" command. Again, starting with the same example text from above, and then typing "rx": This is a xxxx line ~ short ~ Any other xxxx line ~ Note: If you want to include characters beyond the end of the line in the block, check out the 'virtualedit' feature in chapter 25. SHIFTING The command ">" shifts the selected text to the right one shift amount, inserting whitespace. The starting point for this shift is the left edge of the visual block. With the same example again, ">" gives this result: This is a long line ~ short ~ Any other long line ~ The shift amount is specified with the 'shiftwidth' option. To change it to use 4 spaces: > :set shiftwidth=4 The "<" command removes one shift amount of whitespace at the left edge of the block. This command is limited by the amount of text that is there; so if there is less than a shift amount of whitespace available, it removes what it can. JOINING LINES The "J" command joins all selected lines together into one line. Thus it removes the line breaks. Actually, the line break, leading white space and trailing white space is replaced by one space. Two spaces are used after a line ending (that can be changed with the 'joinspaces' option). Let's use the example that we got so familiar with now. The result of using the "J" command: This is a long line short Any other long line ~ The "J" command doesn't require a blockwise selection. It works with "v" and "V" selection in exactly the same way. If you don't want the white space to be changed, use the "gJ" command. ============================================================================== *10.6* Reading and writing part of a file When you are writing an e-mail message, you may want to include another file. This can be done with the ":read {filename}" command. The text of the file is put below the cursor line. Starting with this text: Hi John, ~ Here is the diff that fixes the bug: ~ Bye, Pierre. ~ Move the cursor to the second line and type: > :read patch The file named "patch" will be inserted, with this result: Hi John, ~ Here is the diff that fixes the bug: ~ 2c2 ~ < for (i = 0; i <= length; ++i) ~ --- ~ > for (i = 0; i < length; ++i) ~ Bye, Pierre. ~ The ":read" command accepts a range. The file will be put below the last line number of this range. Thus ":$r patch" appends the file "patch" at the end of the file. What if you want to read the file above the first line? This can be done with the line number zero. This line doesn't really exist, you will get an error message when using it with most commands. But this command is allowed: > :0read patch The file "patch" will be put above the first line of the file. WRITING A RANGE OF LINES To write a range of lines to a file, the ":write" command can be used. Without a range it writes the whole file. With a range only the specified lines are written: > :.,$write tempo This writes the lines from the cursor until the end of the file into the file "tempo". If this file already exists you will get an error message. Vim protects you from accidentally overwriting an existing file. If you know what you are doing and want to overwrite the file, append !: > :.,$write! tempo CAREFUL: The ! must follow the ":write" command immediately, without white space. Otherwise it becomes a filter command, which is explained later in this chapter. APPENDING TO A FILE In the first section of this chapter was explained how to collect a number of lines into a register. The same can be done to collect lines in a file. Write the first line with this command: > :.write collection Now move the cursor to the second line you want to collect, and type this: > :.write >>collection The ">>" tells Vim the "collection" file is not to be written as a new file, but the line must be appended at the end. You can repeat this as many times as you like. ============================================================================== *10.7* Formatting text When you are typing plain text, it's nice if the length of each line is automatically trimmed to fit in the window. To make this happen while inserting text, set the 'textwidth' option: > :set textwidth=78 You might remember that in the example vimrc file this command was used for every text file. Thus if you are using that vimrc file, you were already using it. To check the current value of 'textwidth': > :set textwidth Now lines will be broken to take only up to 78 characters. However, when you insert text halfway through a line or delete a few words, the line will get too long or too short as Vim won't automatically reformat the text. To tell Vim to format the current paragraph: gqap This starts with the "gq" command, which is an operator. Following is "ap", the text object that stands for "a paragraph". A paragraph is separated from the next paragraph by an empty line. Note: A blank line, which contains white space, does NOT separate paragraphs. This is hard to notice! Instead of "ap" you could use any motion or text object. If your paragraphs are properly separated, you can use this command to format the whole file: > gggqG "gg" takes you to the first line, "gq" is the format operator and "G" the motion that jumps to the last line. In case your paragraphs aren't clearly defined, you can format just the lines you manually select. Move the cursor to the first line you want to format. Start with the command "gqj". This formats the current line and the one below it. If the first line was short, words from the next line will be appended. If it was too long, words will be moved to the next line. The cursor moves to the second line. Now you can use "." to repeat the command. Keep doing this until you are at the end of the text you want to format. ============================================================================== *10.8* Changing case You have text with section headers in lowercase. You want to make the word "section" all uppercase. Do this with the "gU" operator. Start with the cursor in the first column: > gUw < section header ----> SECTION header The "gu" operator does exactly the opposite: > guw < SECTION header ----> section header You can also use "g~" to swap case. All these are operators, thus they work with any motion command, with text objects and in Visual mode. To make an operator work on lines you double it. The delete operator is "d", thus to delete a line you use "dd". Similarly, "gugu" makes a whole line lowercase. This can be shortened to "guu". "gUgU" is shortened to "gUU" and "g~g~" to "g~~". Example: > g~~ < Some GIRLS have Fun ----> sOME girls HAVE fUN ~ ============================================================================== *10.9* Using an external program Vim has a very powerful set of commands, it can do anything. But there may still be something that an external command can do better or faster. The command "!{motion}{program}" takes a block of text and filters it through an external program. In other words, it runs the system command represented by {program}, giving it the block of text represented by {motion} as input. The output of this command then replaces the selected block. Because this summarizes badly if you are unfamiliar with Unix filters, take a look at an example. The sort command sorts a file. If you execute the following command, the unsorted file input.txt will be sorted and written to output.txt. This works on both Unix and Windows. > sort <input.txt >output.txt Now do the same thing in Vim. You want to sort lines 1 through 5 of a file. You start by putting the cursor on line 1. Next you execute the following command: > !5G The "!" tells Vim that you are performing a filter operation. The Vim editor expects a motion command to follow, indicating which part of the file to filter. The "5G" command tells Vim to go to line 5, so it now knows that it is to filter lines 1 (the current line) through 5. In anticipation of the filtering, the cursor drops to the bottom of the screen and a ! prompt displays. You can now type in the name of the filter program, in this case "sort". Therefore, your full command is as follows: > !5Gsort<Enter> The result is that the sort program is run on the first 5 lines. The output of the program replaces these lines. line 55 line 11 line 33 line 22 line 11 --> line 33 line 22 line 44 line 44 line 55 last line last line The "!!" command filters the current line through a filter. In Unix the "date" command prints the current time and date. "!!date<Enter>" replaces the current line with the output of "date". This is useful to add a timestamp to a file. WHEN IT DOESN'T WORK Starting a shell, sending it text and capturing the output requires that Vim knows how the shell works exactly. When you have problems with filtering, check the values of these options: 'shell' specifies the program that Vim uses to execute external programs. 'shellcmdflag' argument to pass a command to the shell 'shellquote' quote to be used around the command 'shellxquote' quote to be used around the command and redirection 'shellslash' use forward slashes in the command (only for MS-Windows and alikes) 'shellredir' string used to write the command output into a file On Unix this is hardly ever a problem, because there are two kinds of shells: "sh" like and "csh" like. Vim checks the 'shell' option and sets related options automatically, depending on whether it sees "csh" somewhere in 'shell'. On MS-Windows, however, there are many different shells and you might have to tune the options to make filtering work. Check the help for the options for more information. READING COMMAND OUTPUT To read the contents of the current directory into the file, use this: on Unix: > :read !ls on MS-Windows: > :read !dir The output of the "ls" or "dir" command is captured and inserted in the text, below the cursor. This is similar to reading a file, except that the "!" is used to tell Vim that a command follows. The command may have arguments. And a range can be used to tell where Vim should put the lines: > :0read !date -u This inserts the current time and date in UTC format at the top of the file. (Well, if you have a date command that accepts the "-u" argument.) Note the difference with using "!!date": that replaced a line, while ":read !date" will insert a line. WRITING TEXT TO A COMMAND The Unix command "wc" counts words. To count the words in the current file: > :write !wc This is the same write command as before, but instead of a file name the "!" character is used and the name of an external command. The written text will be passed to the specified command as its standard input. The output could look like this: 4 47 249 ~ The "wc" command isn't verbose. This means you have 4 lines, 47 words and 249 characters. Watch out for this mistake: > :write! wc This will write the file "wc" in the current directory, with force. White space is important here! REDRAWING THE SCREEN If the external command produced an error message, the display may have been messed up. Vim is very efficient and only redraws those parts of the screen that it knows need redrawing. But it can't know about what another program has written. To tell Vim to redraw the screen: > CTRL-L ============================================================================== Next chapter: |usr_11.txt| Recovering from a crash Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ����������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_11.txt�����������������������������������������������������������������0000664�0000000�0000000�00000030220�13204015742�0017106�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_11.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Recovering from a crash Did your computer crash? And you just spent hours editing? Don't panic! Vim stores enough information to be able to restore most of your work. This chapter shows you how to get your work back and explains how the swap file is used. |11.1| Basic recovery |11.2| Where is the swap file? |11.3| Crashed or not? |11.4| Further reading Next chapter: |usr_12.txt| Clever tricks Previous chapter: |usr_10.txt| Making big changes Table of contents: |usr_toc.txt| ============================================================================== *11.1* Basic recovery In most cases recovering a file is quite simple, assuming you know which file you were editing (and the harddisk is still working). Start Vim on the file, with the "-r" argument added: > vim -r help.txt Vim will read the swap file (used to store text you were editing) and may read bits and pieces of the original file. If Vim recovered your changes you will see these messages (with different file names, of course): Using swap file ".help.txt.swp" ~ Original file "~/vim/runtime/doc/help.txt" ~ Recovery completed. You should check if everything is OK. ~ (You might want to write out this file under another name ~ and run diff with the original file to check for changes) ~ You may want to delete the .swp file now. ~ To be on the safe side, write this file under another name: > :write help.txt.recovered Compare the file with the original file to check if you ended up with what you expected. Diff mode is very useful for this |08.7|. For example: > :write help.txt.recovered :edit # :diffsp help.txt Watch out for the original file to contain a more recent version (you saved the file just before the computer crashed). And check that no lines are missing (something went wrong that Vim could not recover). If Vim produces warning messages when recovering, read them carefully. This is rare though. If the recovery resulted in text that is exactly the same as the file contents, you will get this message: Using swap file ".help.txt.swp" ~ Original file "~/vim/runtime/doc/help.txt" ~ Recovery completed. Buffer contents equals file contents. ~ You may want to delete the .swp file now. ~ This usually happens if you already recovered your changes, or you wrote the file after making changes. It is safe to delete the swap file now. It is normal that the last few changes can not be recovered. Vim flushes the changes to disk when you don't type for about four seconds, or after typing about two hundred characters. This is set with the 'updatetime' and 'updatecount' options. Thus when Vim didn't get a chance to save itself when the system went down, the changes after the last flush will be lost. If you were editing without a file name, give an empty string as argument: > vim -r "" You must be in the right directory, otherwise Vim can't find the swap file. ============================================================================== *11.2* Where is the swap file? Vim can store the swap file in several places. Normally it is in the same directory as the original file. To find it, change to the directory of the file, and use: > vim -r Vim will list the swap files that it can find. It will also look in other directories where the swap file for files in the current directory may be located. It will not find swap files in any other directories though, it doesn't search the directory tree. The output could look like this: Swap files found: ~ In current directory: ~ 1. .main.c.swp ~ owned by: mool dated: Tue May 29 21:00:25 2001 ~ file name: ~mool/vim/vim6/src/main.c ~ modified: YES ~ user name: mool host name: masaka.moolenaar.net ~ process ID: 12525 ~ In directory ~/tmp: ~ -- none -- ~ In directory /var/tmp: ~ -- none -- ~ In directory /tmp: ~ -- none -- ~ If there are several swap files that look like they may be the one you want to use, a list is given of these swap files and you are requested to enter the number of the one you want to use. Carefully look at the dates to decide which one you want to use. In case you don't know which one to use, just try them one by one and check the resulting files if they are what you expected. USING A SPECIFIC SWAP FILE If you know which swap file needs to be used, you can recover by giving the swap file name. Vim will then finds out the name of the original file from the swap file. Example: > vim -r .help.txt.swo This is also handy when the swap file is in another directory than expected. Vim recognizes files with the pattern *.s[uvw][a-z] as swap files. If this still does not work, see what file names Vim reports and rename the files accordingly. Check the 'directory' option to see where Vim may have put the swap file. Note: Vim tries to find the swap file by searching the directories in the 'dir' option, looking for files that match "filename.sw?". If wildcard expansion doesn't work (e.g., when the 'shell' option is invalid), Vim does a desperate try to find the file "filename.swp". If that fails too, you will have to give the name of the swapfile itself to be able to recover the file. ============================================================================== *11.3* Crashed or not? *ATTENTION* *E325* Vim tries to protect you from doing stupid things. Suppose you innocently start editing a file, expecting the contents of the file to show up. Instead, Vim produces a very long message: E325: ATTENTION ~ Found a swap file by the name ".main.c.swp" ~ owned by: mool dated: Tue May 29 21:09:28 2001 ~ file name: ~mool/vim/vim6/src/main.c ~ modified: no ~ user name: mool host name: masaka.moolenaar.net ~ process ID: 12559 (still running) ~ While opening file "main.c" ~ dated: Tue May 29 19:46:12 2001 ~ ~ (1) Another program may be editing the same file. ~ If this is the case, be careful not to end up with two ~ different instances of the same file when making changes. ~ Quit, or continue with caution. ~ ~ (2) An edit session for this file crashed. ~ If this is the case, use ":recover" or "vim -r main.c" ~ to recover the changes (see ":help recovery"). ~ If you did this already, delete the swap file ".main.c.swp" ~ to avoid this message. ~ You get this message, because, when starting to edit a file, Vim checks if a swap file already exists for that file. If there is one, there must be something wrong. It may be one of these two situations. 1. Another edit session is active on this file. Look in the message for the line with "process ID". It might look like this: process ID: 12559 (still running) ~ The text "(still running)" indicates that the process editing this file runs on the same computer. When working on a non-Unix system you will not get this extra hint. When editing a file over a network, you may not see the hint, because the process might be running on another computer. In those two cases you must find out what the situation is yourself. If there is another Vim editing the same file, continuing to edit will result in two versions of the same file. The one that is written last will overwrite the other one, resulting in loss of changes. You better quit this Vim. 2. The swap file might be the result from a previous crash of Vim or the computer. Check the dates mentioned in the message. If the date of the swap file is newer than the file you were editing, and this line appears: modified: YES ~ Then you very likely have a crashed edit session that is worth recovering. If the date of the file is newer than the date of the swap file, then either it was changed after the crash (perhaps you recovered it earlier, but didn't delete the swap file?), or else the file was saved before the crash but after the last write of the swap file (then you're lucky: you don't even need that old swap file). Vim will warn you for this with this extra line: NEWER than swap file! ~ UNREADABLE SWAP FILE Sometimes the line [cannot be read] ~ will appear under the name of the swap file. This can be good or bad, depending on circumstances. It is good if a previous editing session crashed without having made any changes to the file. Then a directory listing of the swap file will show that it has zero bytes. You may delete it and proceed. It is slightly bad if you don't have read permission for the swap file. You may want to view the file read-only, or quit. On multi-user systems, if you yourself did the last changes under a different login name, a logout followed by a login under that other name might cure the "read error". Or else you might want to find out who last edited (or is editing) the file and have a talk with them. It is very bad if it means there is a physical read error on the disk containing the swap file. Fortunately, this almost never happens. You may want to view the file read-only at first (if you can), to see the extent of the changes that were "forgotten". If you are the one in charge of that file, be prepared to redo your last changes. WHAT TO DO? *swap-exists-choices* If dialogs are supported you will be asked to select one of five choices: Swap file ".main.c.swp" already exists! ~ [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete it: ~ O Open the file readonly. Use this when you just want to view the file and don't need to recover it. You might want to use this when you know someone else is editing the file, but you just want to look in it and not make changes. E Edit the file anyway. Use this with caution! If the file is being edited in another Vim, you might end up with two versions of the file. Vim will try to warn you when this happens, but better be safe then sorry. R Recover the file from the swap file. Use this if you know that the swap file contains changes that you want to recover. Q Quit. This avoids starting to edit the file. Use this if there is another Vim editing the same file. When you just started Vim, this will exit Vim. When starting Vim with files in several windows, Vim quits only if there is a swap file for the first one. When using an edit command, the file will not be loaded and you are taken back to the previously edited file. A Abort. Like Quit, but also abort further commands. This is useful when loading a script that edits several files, such as a session with multiple windows. D Delete the swap file. Use this when you are sure you no longer need it. For example, when it doesn't contain changes, or when the file itself is newer than the swap file. On Unix this choice is only offered when the process that created the swap file does not appear to be running. If you do not get the dialog (you are running a version of Vim that does not support it), you will have to do it manually. To recover the file, use this command: > :recover Vim cannot always detect that a swap file already exists for a file. This is the case when the other edit session puts the swap files in another directory or when the path name for the file is different when editing it on different machines. Therefore, don't rely on Vim always warning you. If you really don't want to see this message, you can add the 'A' flag to the 'shortmess' option. But it's very unusual that you need this. ============================================================================== *11.4* Further reading |swap-file| An explanation about where the swap file will be created and what its name is. |:preserve| Manually flushing the swap file to disk. |:swapname| See the name of the swap file for the current file. 'updatecount' Number of key strokes after which the swap file is flushed to disk. 'updatetime' Timeout after which the swap file is flushed to disk. 'directory' List of directory names where to store the swap file. 'maxmem' Limit for memory usage before writing text to the swap file. 'maxmemtot' Same, but for all files in total. ============================================================================== Next chapter: |usr_12.txt| Clever tricks Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_12.txt�����������������������������������������������������������������0000664�0000000�0000000�00000031047�13204015742�0017117�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_12.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Clever tricks By combining several commands you can make Vim do nearly everything. In this chapter a number of useful combinations will be presented. This uses the commands introduced in the previous chapters and a few more. |12.1| Replace a word |12.2| Change "Last, First" to "First Last" |12.3| Sort a list |12.4| Reverse line order |12.5| Count words |12.6| Find a man page |12.7| Trim blanks |12.8| Find where a word is used Next chapter: |usr_20.txt| Typing command-line commands quickly Previous chapter: |usr_11.txt| Recovering from a crash Table of contents: |usr_toc.txt| ============================================================================== *12.1* Replace a word The substitute command can be used to replace all occurrences of a word with another word: > :%s/four/4/g The "%" range means to replace in all lines. The "g" flag at the end causes all words in a line to be replaced. This will not do the right thing if your file also contains "thirtyfour". It would be replaced with "thirty4". To avoid this, use the "\<" item to match the start of a word: > :%s/\<four/4/g Obviously, this still goes wrong on "fourteen". Use "\>" to match the end of a word: > :%s/\<four\>/4/g If you are programming, you might want to replace "four" in comments, but not in the code. Since this is difficult to specify, add the "c" flag to have the substitute command prompt you for each replacement: > :%s/\<four\>/4/gc REPLACING IN SEVERAL FILES Suppose you want to replace a word in more than one file. You could edit each file and type the command manually. It's a lot faster to use record and playback. Let's assume you have a directory with C++ files, all ending in ".cpp". There is a function called "GetResp" that you want to rename to "GetAnswer". vim *.cpp Start Vim, defining the argument list to contain all the C++ files. You are now in the first file. qq Start recording into the q register :%s/\<GetResp\>/GetAnswer/g Do the replacements in the first file. :wnext Write this file and move to the next one. q Stop recording. @q Execute the q register. This will replay the substitution and ":wnext". You can verify that this doesn't produce an error message. 999@q Execute the q register on the remaining files. At the last file you will get an error message, because ":wnext" cannot move to the next file. This stops the execution, and everything is done. Note: When playing back a recorded sequence, an error stops the execution. Therefore, make sure you don't get an error message when recording. There is one catch: If one of the .cpp files does not contain the word "GetResp", you will get an error and replacing will stop. To avoid this, add the "e" flag to the substitute command: > :%s/\<GetResp\>/GetAnswer/ge The "e" flag tells ":substitute" that not finding a match is not an error. ============================================================================== *12.2* Change "Last, First" to "First Last" You have a list of names in this form: Doe, John ~ Smith, Peter ~ You want to change that to: John Doe ~ Peter Smith ~ This can be done with just one command: > :%s/\([^,]*\), \(.*\)/\2 \1/ Let's break this down in parts. Obviously it starts with a substitute command. The "%" is the line range, which stands for the whole file. Thus the substitution is done in every line in the file. The arguments for the substitute command are "/from/to/". The slashes separate the "from" pattern and the "to" string. This is what the "from" pattern contains: \([^,]*\), \(.*\) ~ The first part between \( \) matches "Last" \( \) match anything but a comma [^,] any number of times * matches ", " literally , The second part between \( \) matches "First" \( \) any character . any number of times * In the "to" part we have "\2" and "\1". These are called backreferences. They refer to the text matched by the "\( \)" parts in the pattern. "\2" refers to the text matched by the second "\( \)", which is the "First" name. "\1" refers to the first "\( \)", which is the "Last" name. You can use up to nine backreferences in the "to" part of a substitute command. "\0" stands for the whole matched pattern. There are a few more special items in a substitute command, see |sub-replace-special|. ============================================================================== *12.3* Sort a list In a Makefile you often have a list of files. For example: OBJS = \ ~ version.o \ ~ pch.o \ ~ getopt.o \ ~ util.o \ ~ getopt1.o \ ~ inp.o \ ~ patch.o \ ~ backup.o ~ To sort this list, filter the text through the external sort command: > /^OBJS j :.,/^$/-1!sort This goes to the first line, where "OBJS" is the first thing in the line. Then it goes one line down and filters the lines until the next empty line. You could also select the lines in Visual mode and then use "!sort". That's easier to type, but more work when there are many lines. The result is this: OBJS = \ ~ backup.o ~ getopt.o \ ~ getopt1.o \ ~ inp.o \ ~ patch.o \ ~ pch.o \ ~ util.o \ ~ version.o \ ~ Notice that a backslash at the end of each line is used to indicate the line continues. After sorting, this is wrong! The "backup.o" line that was at the end didn't have a backslash. Now that it sorts to another place, it must have a backslash. The simplest solution is to add the backslash with "A \<Esc>". You can keep the backslash in the last line, if you make sure an empty line comes after it. That way you don't have this problem again. ============================================================================== *12.4* Reverse line order The |:global| command can be combined with the |:move| command to move all the lines before the first line, resulting in a reversed file. The command is: > :global/^/m 0 Abbreviated: > :g/^/m 0 The "^" regular expression matches the beginning of the line (even if the line is blank). The |:move| command moves the matching line to after the mythical zeroth line, so the current matching line becomes the first line of the file. As the |:global| command is not confused by the changing line numbering, |:global| proceeds to match all remaining lines of the file and puts each as the first. This also works on a range of lines. First move to above the first line and mark it with "mt". Then move the cursor to the last line in the range and type: > :'t+1,.g/^/m 't ============================================================================== *12.5* Count words Sometimes you have to write a text with a maximum number of words. Vim can count the words for you. When the whole file is what you want to count the words in, use this command: > g CTRL-G Do not type a space after the g, this is just used here to make the command easy to read. The output looks like this: Col 1 of 0; Line 141 of 157; Word 748 of 774; Byte 4489 of 4976 ~ You can see on which word you are (748), and the total number of words in the file (774). When the text is only part of a file, you could move to the start of the text, type "g CTRL-G", move to the end of the text, type "g CTRL-G" again, and then use your brain to compute the difference in the word position. That's a good exercise, but there is an easier way. With Visual mode, select the text you want to count words in. Then type g CTRL-G. The result: Selected 5 of 293 Lines; 70 of 1884 Words; 359 of 10928 Bytes ~ For other ways to count words, lines and other items, see |count-items|. ============================================================================== *12.6* Find a man page *find-manpage* While editing a shell script or C program, you are using a command or function that you want to find the man page for (this is on Unix). Let's first use a simple way: Move the cursor to the word you want to find help on and press > K Nvim will run |:Man| on the word. If the man page is found, it is displayed. You can also use the |:Man| command to open a window on a man page: > :Man csh You can scroll around and the text is highlighted. This allows you to find the help you were looking for. Use CTRL-W w to jump to the window with the text you were working on. To find a man page in a specific section, put the section number first. For example, to look in section 3 for "echo": > :Man 3 echo To jump to another man page, which is in the text with the typical form "word(1)", press CTRL-] on it. Further ":Man" commands will use the same window. To display a man page for the word under the cursor, use this: > K For example, you want to know the return value of "strstr()" while editing this line: if ( strstr (input, "aap") == ) ~ Move the cursor to somewhere on "strstr" and type "K". A window will open to display the man page for strstr(). ============================================================================== *12.7* Trim blanks Some people find spaces and tabs at the end of a line useless, wasteful, and ugly. To remove whitespace at the end of every line, execute the following command: > :%s/\s\+$// The line range "%" is used, thus this works on the whole file. The pattern that the ":substitute" command matches with is "\s\+$". This finds white space characters (\s), 1 or more of them (\+), before the end-of-line ($). Later will be explained how you write patterns like this, see |usr_27.txt|. The "to" part of the substitute command is empty: "//". Thus it replaces with nothing, effectively deleting the matched white space. Another wasteful use of spaces is placing them before a tab. Often these can be deleted without changing the amount of white space. But not always! Therefore, you can best do this manually. Use this search command: > / You cannot see it, but there is a space before a tab in this command. Thus it's "/<Space><Tab>". Now use "x" to delete the space and check that the amount of white space doesn't change. You might have to insert a tab if it does change. Type "n" to find the next match. Repeat this until no more matches can be found. ============================================================================== *12.8* Find where a word is used If you are a Unix user, you can use a combination of Vim and the grep command to edit all the files that contain a given word. This is extremely useful if you are working on a program and want to view or edit all the files that contain a specific variable. For example, suppose you want to edit all the C program files that contain the word "frame_counter". To do this you use the command: > vim `grep -l frame_counter *.c` Let's look at this command in detail. The grep command searches through a set of files for a given word. Because the -l argument is specified, the command will only list the files containing the word and not print the matching lines. The word it is searching for is "frame_counter". Actually, this can be any regular expression. (Note: What grep uses for regular expressions is not exactly the same as what Vim uses.) The entire command is enclosed in backticks (`). This tells the Unix shell to run this command and pretend that the results were typed on the command line. So what happens is that the grep command is run and produces a list of files, these files are put on the Vim command line. This results in Vim editing the file list that is the output of grep. You can then use commands like ":next" and ":first" to browse through the files. FINDING EACH LINE The above command only finds the files in which the word is found. You still have to find the word within the files. Vim has a built-in command that you can use to search a set of files for a given string. If you want to find all occurrences of "error_string" in all C program files, for example, enter the following command: > :grep error_string *.c This causes Vim to search for the string "error_string" in all the specified files (*.c). The editor will now open the first file where a match is found and position the cursor on the first matching line. To go to the next matching line (no matter in what file it is), use the ":cnext" command. To go to the previous match, use the ":cprev" command. Use ":clist" to see all the matches and where they are. The ":grep" command uses the external commands grep (on Unix) or findstr (on Windows). You can change this by setting the option 'grepprg'. ============================================================================== Next chapter: |usr_20.txt| Typing command-line commands quickly Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_20.txt�����������������������������������������������������������������0000664�0000000�0000000�00000032535�13204015742�0017121�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_20.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Typing command-line commands quickly Vim has a few generic features that makes it easier to enter commands. Colon commands can be abbreviated, edited and repeated. Completion is available for nearly everything. |20.1| Command line editing |20.2| Command line abbreviations |20.3| Command line completion |20.4| Command line history |20.5| Command line window Next chapter: |usr_21.txt| Go away and come back Previous chapter: |usr_12.txt| Clever tricks Table of contents: |usr_toc.txt| ============================================================================== *20.1* Command line editing When you use a colon (:) command or search for a string with / or ?, Vim puts the cursor on the bottom of the screen. There you type the command or search pattern. This is called the Command line. Also when it's used for entering a search command. The most obvious way to edit the command you type is by pressing the <BS> key. This erases the character before the cursor. To erase another character, typed earlier, first move the cursor with the cursor keys. For example, you have typed this: > :s/col/pig/ Before you hit <Enter>, you notice that "col" should be "cow". To correct this, you type <Left> five times. The cursor is now just after "col". Type <BS> and "w" to correct: > :s/cow/pig/ Now you can press <Enter> directly. You don't have to move the cursor to the end of the line before executing the command. The most often used keys to move around in the command line: <Left> one character left <Right> one character right <S-Left> or <C-Left> one word left <S-Right> or <C-Right> one word right CTRL-B or <Home> to begin of command line CTRL-E or <End> to end of command line Note: <S-Left> (cursor left key with Shift key pressed) and <C-Left> (cursor left key with Control pressed) will not work on all keyboards. Same for the other Shift and Control combinations. You can also use the mouse to move the cursor. DELETING As mentioned, <BS> deletes the character before the cursor. To delete a whole word use CTRL-W. /the fine pig ~ CTRL-W /the fine ~ CTRL-U removes all text, thus allows you to start all over again. OVERSTRIKE The <Insert> key toggles between inserting characters and replacing the existing ones. Start with this text: /the fine pig ~ Move the cursor to the start of "fine" with <S-Left> twice (or <Left> eight times, if <S-Left> doesn't work). Now press <Insert> to switch to overstrike and type "great": /the greatpig ~ Oops, we lost the space. Now, don't use <BS>, because it would delete the "t" (this is different from Replace mode). Instead, press <Insert> to switch from overstrike to inserting, and type the space: /the great pig ~ CANCELLING You thought of executing a : or / command, but changed your mind. To get rid of what you already typed, without executing it, press CTRL-C or <Esc>. Note: <Esc> is the universal "get out" key. Unfortunately, in the good old Vi pressing <Esc> in a command line executed the command! Since that might be considered to be a bug, Vim uses <Esc> to cancel the command. But with the 'cpoptions' option it can be made Vi compatible. And when using a mapping (which might be written for Vi) <Esc> also works Vi compatible. Therefore, using CTRL-C is a method that always works. If you are at the start of the command line, pressing <BS> will cancel the command. It's like deleting the ":" or "/" that the line starts with. ============================================================================== *20.2* Command line abbreviations Some of the ":" commands are really long. We already mentioned that ":substitute" can be abbreviated to ":s". This is a generic mechanism, all ":" commands can be abbreviated. How short can a command get? There are 26 letters, and many more commands. For example, ":set" also starts with ":s", but ":s" doesn't start a ":set" command. Instead ":set" can be abbreviated to ":se". When the shorter form of a command could be used for two commands, it stands for only one of them. There is no logic behind which one, you have to learn them. In the help files the shortest form that works is mentioned. For example: > :s[ubstitute] This means that the shortest form of ":substitute" is ":s". The following characters are optional. Thus ":su" and ":sub" also work. In the user manual we will either use the full name of command, or a short version that is still readable. For example, ":function" can be abbreviated to ":fu". But since most people don't understand what that stands for, we will use ":fun". (Vim doesn't have a ":funny" command, otherwise ":fun" would be confusing too.) It is recommended that in Vim scripts you write the full command name. That makes it easier to read back when you make later changes. Except for some often used commands like ":w" (":write") and ":r" (":read"). A particularly confusing one is ":end", which could stand for ":endif", ":endwhile" or ":endfunction". Therefore, always use the full name. SHORT OPTION NAMES In the user manual the long version of the option names is used. Many options also have a short name. Unlike ":" commands, there is only one short name that works. For example, the short name of 'autoindent' is 'ai'. Thus these two commands do the same thing: > :set autoindent :set ai You can find the full list of long and short names here: |option-list|. ============================================================================== *20.3* Command line completion This is one of those Vim features that, by itself, is a reason to switch from Vi to Vim. Once you have used this, you can't do without. Suppose you have a directory that contains these files: info.txt intro.txt bodyofthepaper.txt To edit the last one, you use the command: > :edit bodyofthepaper.txt It's easy to type this wrong. A much quicker way is: > :edit b<Tab> Which will result in the same command. What happened? The <Tab> key does completion of the word before the cursor. In this case "b". Vim looks in the directory and finds only one file that starts with a "b". That must be the one you are looking for, thus Vim completes the file name for you. Now type: > :edit i<Tab> Vim will beep, and give you: > :edit info.txt The beep means that Vim has found more than one match. It then uses the first match it found (alphabetically). If you press <Tab> again, you get: > :edit intro.txt Thus, if the first <Tab> doesn't give you the file you were looking for, press it again. If there are more matches, you will see them all, one at a time. If you press <Tab> on the last matching entry, you will go back to what you first typed: > :edit i Then it starts all over again. Thus Vim cycles through the list of matches. Use CTRL-P to go through the list in the other direction: <------------------- <Tab> -------------------------+ | <Tab> --> <Tab> --> :edit i :edit info.txt :edit intro.txt <-- CTRL-P <-- CTRL-P | +---------------------- CTRL-P ------------------------> CONTEXT When you type ":set i" instead of ":edit i" and press <Tab> you get: > :set icon Hey, why didn't you get ":set info.txt"? That's because Vim has context sensitive completion. The kind of words Vim will look for depends on the command before it. Vim knows that you cannot use a file name just after a ":set" command, but you can use an option name. Again, if you repeat typing the <Tab>, Vim will cycle through all matches. There are quite a few, it's better to type more characters first: > :set isk<Tab> Gives: > :set iskeyword Now type "=" and press <Tab>: > :set iskeyword=@,48-57,_,192-255 What happens here is that Vim inserts the old value of the option. Now you can edit it. What is completed with <Tab> is what Vim expects in that place. Just try it out to see how it works. In some situations you will not get what you want. That's either because Vim doesn't know what you want, or because completion was not implemented for that situation. In that case you will get a <Tab> inserted (displayed as ^I). LIST MATCHES When there are many matches, you would like to see an overview. Do this by pressing CTRL-D. For example, pressing CTRL-D after: > :set is results in: > :set is incsearch isfname isident iskeyword isprint :set is Vim lists the matches and then comes back with the text you typed. You can now check the list for the item you wanted. If it isn't there, you can use <BS> to correct the word. If there are many matches, type a few more characters before pressing <Tab> to complete the rest. If you have watched carefully, you will have noticed that "incsearch" doesn't start with "is". In this case "is" stands for the short name of "incsearch". (Many options have a short and a long name.) Vim is clever enough to know that you might have wanted to expand the short name of the option into the long name. THERE IS MORE The CTRL-L command completes the word to the longest unambiguous string. If you type ":edit i" and there are files "info.txt" and "info_backup.txt" you will get ":edit info". The 'wildmode' option can be used to change the way completion works. The 'wildmenu' option can be used to get a menu-like list of matches. Use the 'suffixes' option to specify files that are less important and appear at the end of the list of files. The 'wildignore' option specifies files that are not listed at all. More about all of this here: |cmdline-completion| ============================================================================== *20.4* Command line history In chapter 3 we briefly mentioned the history. The basics are that you can use the <Up> key to recall an older command line. <Down> then takes you back to newer commands. There are actually four histories. The ones we will mention here are for ":" commands and for "/" and "?" search commands. The "/" and "?" commands share the same history, because they are both search commands. The two other histories are for expressions and input lines for the input() function. |cmdline-history| Suppose you have done a ":set" command, typed ten more colon commands and then want to repeat that ":set" command again. You could press ":" and then ten times <Up>. There is a quicker way: > :se<Up> Vim will now go back to the previous command that started with "se". You have a good chance that this is the ":set" command you were looking for. At least you should not have to press <Up> very often (unless ":set" commands is all you have done). The <Up> key will use the text typed so far and compare it with the lines in the history. Only matching lines will be used. If you do not find the line you were looking for, use <Down> to go back to what you typed and correct that. Or use CTRL-U to start all over again. To see all the lines in the history: > :history That's the history of ":" commands. The search history is displayed with this command: > :history / CTRL-P will work like <Up>, except that it doesn't matter what you already typed. Similarly for CTRL-N and <Down>. CTRL-P stands for previous, CTRL-N for next. ============================================================================== *20.5* Command line window Typing the text in the command line works different from typing text in Insert mode. It doesn't allow many commands to change the text. For most commands that's OK, but sometimes you have to type a complicated command. That's where the command line window is useful. Open the command line window with this command: > q: Vim now opens a (small) window at the bottom. It contains the command line history, and an empty line at the end: +-------------------------------------+ |other window | |~ | |file.txt=============================| |:e c | |:e config.h.in | |:set path=.,/usr/include,, | |:set iskeyword=@,48-57,_,192-255 | |:set is | |:q | |: | |command-line=========================| | | +-------------------------------------+ You are now in Normal mode. You can use the "hjkl" keys to move around. For example, move up with "5k" to the ":e config.h.in" line. Type "$h" to go to the "i" of "in" and type "cwout". Now you have changed the line to: :e config.h.out ~ Now press <Enter> and this command will be executed. The command line window will close. The <Enter> command will execute the line under the cursor. It doesn't matter whether Vim is in Insert mode or in Normal mode. Changes in the command line window are lost. They do not result in the history to be changed. Except that the command you execute will be added to the end of the history, like with all executed commands. The command line window is very useful when you want to have overview of the history, lookup a similar command, change it a bit and execute it. A search command can be used to find something. In the previous example the "?config" search command could have been used to find the previous command that contains "config". It's a bit strange, because you are using a command line to search in the command line window. While typing that search command you can't open another command line window, there can be only one. ============================================================================== Next chapter: |usr_21.txt| Go away and come back Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_21.txt�����������������������������������������������������������������0000664�0000000�0000000�00000043360�13204015742�0017120�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_21.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Go away and come back This chapter goes into mixing the use of other programs with Vim. Either by executing program from inside Vim or by leaving Vim and coming back later. Furthermore, this is about the ways to remember the state of Vim and restore it later. |21.1| Suspend and resume |21.2| Executing shell commands |21.3| Remembering information; ShaDa |21.4| Sessions |21.5| Views |21.6| Modelines Next chapter: |usr_22.txt| Finding the file to edit Previous chapter: |usr_20.txt| Typing command-line commands quickly Table of contents: |usr_toc.txt| ============================================================================== *21.1* Suspend and resume Like most Unix programs Vim can be suspended by pressing CTRL-Z. This stops Vim and takes you back to the shell it was started in. You can then do any other commands until you are bored with them. Then bring back Vim with the "fg" command. > CTRL-Z {any sequence of shell commands} fg You are right back where you left Vim, nothing has changed. In case pressing CTRL-Z doesn't work, you can also use ":suspend". Don't forget to bring Vim back to the foreground, you would lose any changes that you made! Only Unix has support for this. On other systems Vim will start a shell for you. This also has the functionality of being able to execute shell commands. But it's a new shell, not the one that you started Vim from. When you are running the GUI you can't go back to the shell where Vim was started. CTRL-Z will minimize the Vim window instead. ============================================================================== *21.2* Executing shell commands To execute a single shell command from Vim use ":!{command}". For example, to see a directory listing: > :!ls :!dir The first one is for Unix, the second one for MS-Windows. Vim will execute the program. When it ends you will get a prompt to hit <Enter>. This allows you to have a look at the output from the command before returning to the text you were editing. The "!" is also used in other places where a program is run. Let's take a look at an overview: :!{program} execute {program} :r !{program} execute {program} and read its output :w !{program} execute {program} and send text to its input :[range]!{program} filter text through {program} Notice that the presence of a range before "!{program}" makes a big difference. Without it executes the program normally, with the range a number of text lines is filtered through the program. Executing a whole row of programs this way is possible. But a shell is much better at it. You can start a new shell with |:terminal|. This is similar to using CTRL-Z to suspend Vim. The difference is that a new shell is started. ============================================================================== *21.3* Remembering information; ShaDa After editing for a while you will have text in registers, marks in various files, a command line history filled with carefully crafted commands. When you exit Vim all of this is lost. But you can get it back! The ShaDa (abbreviation of SHAred DAta) file is designed to store status information: Command-line and Search pattern history Text in registers Marks for various files The buffer list Global variables Each time you exit Vim it will store this information in a file, the ShaDa file. When Vim starts again, the ShaDa file is read and the information restored. The 'shada' option is set by default to restore a limited number of items. You might want to set it to remember more information. This is done through the following command: > :set shada=string The string specifies what to save. The syntax of this string is an option character followed by an argument. The option/argument pairs are separated by commas. Take a look at how you can build up your own shada string. First, the ' option is used to specify how many files for which you save marks (a-z). Pick a nice even number for this option (1000, for instance). Your command now looks like this: > :set shada='1000 The f option controls whether global marks (A-Z and 0-9) are stored. If this option is 0, none are stored. If it is 1 or you do not specify an f option, the marks are stored. You want this feature, so now you have this: > :set shada='1000,f1 The < option controls how many lines are saved for each of the registers. By default, all the lines are saved. If 0, nothing is saved. To avoid adding thousands of lines to your ShaDa file (which might never get used and makes starting Vim slower) you use a maximum of 500 lines: > :set shada='1000,f1,<500 < Other options you might want to use: : number of lines to save from the command line history @ number of lines to save from the input line history / number of lines to save from the search history r removable media, for which no marks will be stored (can be used several times) ! global variables that start with an uppercase letter and don't contain lowercase letters h disable 'hlsearch' highlighting when starting % the buffer list (only restored when starting Vim without file arguments) c convert the text using 'encoding' n name used for the ShaDa file (must be the last option) See the 'shada' option and |shada-file| for more information. When you run Vim multiple times, the last one exiting will store its information. This may cause information that previously exiting Vims stored to be lost. Each item can be remembered only once. GETTING BACK TO WHERE YOU STOPPED VIM You are halfway through editing a file and it's time to leave for holidays. You exit Vim and go enjoy yourselves, forgetting all about your work. After a couple of weeks you start Vim, and type: > '0 And you are right back where you left Vim. So you can get on with your work. Vim creates a mark each time you exit Vim. The last one is '0. The position that '0 pointed to is made '1. And '1 is made to '2, and so forth. Mark '9 is lost. The |:marks| command is useful to find out where '0 to '9 will take you. GETTING BACK TO SOME FILE If you want to go back to a file that you edited recently, but not when exiting Vim, there is a slightly more complicated way. You can see a list of files by typing the command: > :oldfiles < 1: ~/.config/nvim/init.vim ~ 2: ~/text/resume.txt ~ 3: /tmp/draft ~ Now you would like to edit the second file, which is in the list preceded by "2:". You type: > :e #<2 Instead of ":e" you can use any command that has a file name argument, the "#<2" item works in the same place as "%" (current file name) and "#" (alternate file name). So you can also split the window to edit the third file: > :split #<3 That #<123 thing is a bit complicated when you just want to edit a file. Fortunately there is a simpler way: > :browse oldfiles < 1: ~/.config/nvim/init.vim ~ 2: ~/text/resume.txt ~ 3: /tmp/draft ~ -- More -- You get the same list of files as with |:oldfiles|. If you want to edit "resume.txt" first press "q" to stop the listing. You will get a prompt: Type number and <Enter> (empty cancels): ~ Type "2" and press <Enter> to edit the second file. More info at |:oldfiles|, |v:oldfiles| and |c_#<|. MOVE INFO FROM ONE VIM TO ANOTHER You can use the ":wshada" and ":rshada" commands to save and restore the information while still running Vim. This is useful for exchanging register contents between two instances of Vim, for example. In the first Vim do: > :wshada! ~/tmp/shada And in the second Vim do: > :rshada! ~/tmp/shada Obviously, the "w" stands for "write" and the "r" for "read". The ! character is used by ":wshada" to forcefully overwrite an existing file. When it is omitted, and the file exists, the information is merged into the file. The ! character used for ":rshada" means that all the information in ShaDa file has priority over existing information, this may overwrite it. Without the ! only information that wasn't set is used. These commands can also be used to store info and use it again later. You could make a directory full of ShaDa files, each containing info for a different purpose. ============================================================================== *21.4* Sessions Suppose you are editing along, and it is the end of the day. You want to quit work and pick up where you left off the next day. You can do this by saving your editing session and restoring it the next day. A Vim session contains all the information about what you are editing. This includes things such as the file list, window layout, global variables, options and other information. (Exactly what is remembered is controlled by the 'sessionoptions' option, described below.) The following command creates a session file: > :mksession vimbook.vim Later if you want to restore this session, you can use this command: > :source vimbook.vim If you want to start Vim and restore a specific session, you can use the following command: > vim -S vimbook.vim This tells Vim to read a specific file on startup. The 'S' stands for session (actually, you can source any Vim script with -S, thus it might as well stand for "source"). The windows that were open are restored, with the same position and size as before. Mappings and option values are like before. What exactly is restored depends on the 'sessionoptions' option. The default value is "blank,buffers,curdir,folds,help,options,winsize". blank keep empty windows buffers all buffers, not only the ones in a window curdir the current directory folds folds, also manually created ones help the help window options all options and mappings winsize window sizes Change this to your liking. To also restore the size of the Vim window, for example, use: > :set sessionoptions+=resize SESSION HERE, SESSION THERE The obvious way to use sessions is when working on different projects. Suppose you store your session files in the directory "~/.config/nvim". You are currently working on the "secret" project and have to switch to the "boring" project: > :wall :mksession! ~/.config/nvim/secret.vim :source ~/.config/nvim/boring.vim This first uses ":wall" to write all modified files. Then the current session is saved, using ":mksession!". This overwrites the previous session. The next time you load the secret session you can continue where you were at this point. And finally you load the new "boring" session. If you open help windows, split and close various windows, and generally mess up the window layout, you can go back to the last saved session: > :source ~/.config/nvim/boring.vim Thus you have complete control over whether you want to continue next time where you are now, by saving the current setup in a session, or keep the session file as a starting point. Another way of using sessions is to create a window layout that you like to use, and save this in a session. Then you can go back to this layout whenever you want. For example, this is a nice layout to use: +----------------------------------------+ | VIM - main help file | | | |Move around: Use the cursor keys, or "h| |help.txt================================| |explorer | | |dir |~ | |dir |~ | |file |~ | |file |~ | |file |~ | |file |~ | |~/=========|[No File]===================| | | +----------------------------------------+ This has a help window at the top, so that you can read this text. The narrow vertical window on the left contains a file explorer. This is a Vim plugin that lists the contents of a directory. You can select files to edit there. More about this in the next chapter. Create this from a just started Vim with: > :help CTRL-W w :vertical split ~/ You can resize the windows a bit to your liking. Then save the session with: > :mksession ~/.config/nvim/mine.vim Now you can start Vim with this layout: > vim -S ~/.config/nvim/mine.vim Hint: To open a file you see listed in the explorer window in the empty window, move the cursor to the filename and press "O". Double clicking with the mouse will also do this. UNIX AND MS-WINDOWS Some people have to do work on MS-Windows systems one day and on Unix another day. If you are one of them, consider adding "slash" and "unix" to 'sessionoptions'. The session files will then be written in a format that can be used on both systems. This is the command to put in your |init.vim| file: > :set sessionoptions+=unix,slash Vim will use the Unix format then, because the MS-Windows Vim can read and write Unix files, but Unix Vim can't read MS-Windows format session files. Similarly, MS-Windows Vim understands file names with / to separate names, but Unix Vim doesn't understand \. SESSIONS AND SHADA Sessions store many things, but not the position of marks, contents of registers and the command line history. You need to use the shada feature for these things. In most situations you will want to use sessions separately from shada. This can be used to switch to another session, but keep the command line history. And yank text into registers in one session, and paste it back in another session. You might prefer to keep the info with the session. You will have to do this yourself then. Example: > :mksession! ~/.config/nvim/secret.vim :wshada! ~/.local/share/nvim/shada/secret.shada And to restore this again: > :source ~/.config/nvim/secret.vim :rshada! ~/.local/share/nvim/shada/secret.shada ============================================================================== *21.5* Views A session stores the looks of the whole of Vim. When you want to store the properties for one window only, use a view. The use of a view is for when you want to edit a file in a specific way. For example, you have line numbers enabled with the 'number' option and defined a few folds. Just like with sessions, you can remember this view on the file and restore it later. Actually, when you store a session, it stores the view of each window. There are two basic ways to use views. The first is to let Vim pick a name for the view file. You can restore the view when you later edit the same file. To store the view for the current window: > :mkview Vim will decide where to store the view. When you later edit the same file you get the view back with this command: > :loadview That's easy, isn't it? Now you want to view the file without the 'number' option on, or with all folds open, you can set the options to make the window look that way. Then store this view with: > :mkview 1 Obviously, you can get this back with: > :loadview 1 Now you can switch between the two views on the file by using ":loadview" with and without the "1" argument. You can store up to ten views for the same file this way, one unnumbered and nine numbered 1 to 9. A VIEW WITH A NAME The second basic way to use views is by storing the view in a file with a name you choose. This view can be loaded while editing another file. Vim will then switch to editing the file specified in the view. Thus you can use this to quickly switch to editing another file, with all its options set as you saved them. For example, to save the view of the current file: > :mkview ~/.config/nvim/main.vim You can restore it with: > :source ~/.config/nvim/main.vim ============================================================================== *21.6* Modelines When editing a specific file, you might set options specifically for that file. Typing these commands each time is boring. Using a session or view for editing a file doesn't work when sharing the file between several people. The solution for this situation is adding a modeline to the file. This is a line of text that tells Vim the values of options, to be used in this file only. A typical example is a C program where you make indents by a multiple of 4 spaces. This requires setting the 'shiftwidth' option to 4. This modeline will do that: /* vim:set shiftwidth=4: */ ~ Put this line as one of the first or last five lines in the file. When editing the file, you will notice that 'shiftwidth' will have been set to four. When editing another file, it's set back to the default value of eight. For some files the modeline fits well in the header, thus it can be put at the top of the file. For text files and other files where the modeline gets in the way of the normal contents, put it at the end of the file. The 'modelines' option specifies how many lines at the start and end of the file are inspected for containing a modeline. To inspect ten lines: > :set modelines=10 The 'modeline' option can be used to switch this off. Do this when you are working as root on Unix or Administrator on MS-Windows, or when you don't trust the files you are editing: > :set nomodeline Use this format for the modeline: any-text vim:set {option}={value} ... : any-text ~ The "any-text" indicates that you can put any text before and after the part that Vim will use. This allows making it look like a comment, like what was done above with /* and */. The " vim:" part is what makes Vim recognize this line. There must be white space before "vim", or "vim" must be at the start of the line. Thus using something like "gvim:" will not work. The part between the colons is a ":set" command. It works the same way as typing the ":set" command, except that you need to insert a backslash before a colon (otherwise it would be seen as the end of the modeline). Another example: // vim:set textwidth=72 dir=c\:\tmp: use c:\tmp here ~ There is an extra backslash before the first colon, so that it's included in the ":set" command. The text after the second colon is ignored, thus a remark can be placed there. For more details see |modeline|. ============================================================================== Next chapter: |usr_22.txt| Finding the file to edit Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_22.txt�����������������������������������������������������������������0000664�0000000�0000000�00000033657�13204015742�0017131�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_22.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Finding the file to edit Files can be found everywhere. So how do you find them? Vim offers various ways to browse the directory tree. There are commands to jump to a file that is mentioned in another. And Vim remembers which files have been edited before. |22.1| The file browser |22.2| The current directory |22.3| Finding a file |22.4| The buffer list Next chapter: |usr_23.txt| Editing other files Previous chapter: |usr_21.txt| Go away and come back Table of contents: |usr_toc.txt| ============================================================================== *22.1* The file browser Vim has a plugin that makes it possible to edit a directory. Try this: > :edit . Through the magic of autocommands and Vim scripts, the window will be filled with the contents of the directory. It looks like this: " ============================================================================ ~ " Netrw Directory Listing (netrw v109) ~ " Sorted by name ~ " Sort sequence: [\/]$,\.h$,\.c$,\.cpp$,*,\.info$,\.swp$,\.o$\.obj$,\.bak$ ~ " Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec ~ " ============================================================================ ~ ../ ~ ./ ~ check/ ~ Makefile ~ autocmd.txt ~ change.txt ~ eval.txt~ ~ filetype.txt~ ~ help.txt.info ~ You can see these items: 1. The name of the browsing tool and its version number 2. The name of the browsing directory 3. The method of sorting (may be by name, time, or size) 4. How names are to be sorted (directories first, then *.h files, *.c files, etc) 5. How to get help (use the <F1> key), and an abbreviated listing of available commands 6. A listing of files, including "../", which allows one to list the parent directory. If you have syntax highlighting enabled, the different parts are highlighted so as to make it easier to spot them. You can use Normal mode Vim commands to move around in the text. For example, move the cursor atop a file and press <Enter>; you will then be editing that file. To go back to the browser use ":edit ." again, or use ":Explore". CTRL-O also works. Try using <Enter> while the cursor is atop a directory name. The result is that the file browser moves into that directory and displays the items found there. Pressing <Enter> on the first directory "../" moves you one level higher. Pressing "-" does the same thing, without the need to move to the "../" item first. You can press <F1> to get help on the things you can do in the netrw file browser. This is what you get: > 9. Directory Browsing netrw-browse netrw-dir netrw-list netrw-help MAPS netrw-maps <F1>.............Help.......................................|netrw-help| <cr>.............Browsing...................................|netrw-cr| <del>............Deleting Files or Directories..............|netrw-delete| -................Going Up...................................|netrw--| a................Hiding Files or Directories................|netrw-a| mb...............Bookmarking a Directory....................|netrw-mb| gb...............Changing to a Bookmarked Directory.........|netrw-gb| c................Make Browsing Directory The Current Dir....|netrw-c| d................Make A New Directory.......................|netrw-d| D................Deleting Files or Directories..............|netrw-D| <c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h| i................Change Listing Style.......................|netrw-i| <c-l>............Refreshing the Listing.....................|netrw-ctrl-l| o................Browsing with a Horizontal Split...........|netrw-o| p................Use Preview Window.........................|netrw-p| P................Edit in Previous Window....................|netrw-p| q................Listing Bookmarks and History..............|netrw-qb| r................Reversing Sorting Order....................|netrw-r| < (etc) The <F1> key thus brings you to a netrw directory browsing contents help page. It's a regular help page; use the usual |CTRL-]| to jump to tagged help items and |CTRL-O| to jump back. To select files for display and editing: (with the cursor is atop a filename) <enter> Open the file in the current window. |netrw-cr| o Horizontally split window and display file |netrw-o| v Vertically split window and display file |netrw-v| p Use the |preview-window| |netrw-p| P Edit in the previous window |netrw-P| t Open file in a new tab |netrw-t| The following normal-mode commands may be used to control the browser display: i Controls listing style (thin, long, wide, and tree). The long listing includes size and date information. s Repeatedly pressing s will change the way the files are sorted; one may sort on name, modification time, or size. r Reverse the sorting order. As a sampling of extra normal-mode commands: c Change Vim's notion of the current directory to be the same as the browser directory. (see |g:netrw_keepdir| to control this, too) R Rename the file or directory under the cursor; a prompt will be issued for the new name. D Delete the file or directory under the cursor; a confirmation request will be issued. mb gb Make bookmark/goto bookmark One may also use command mode; again, just a sampling: :Explore [directory] Browse specified/current directory :NetrwSettings A comprehensive list of your current netrw settings with help linkage. The netrw browser is not limited to just your local machine; one may use urls such as: (that trailing / is important) :Explore ftp://somehost/path/to/dir/ :e scp://somehost/path/to/dir/ See |netrw-browse| for more. ============================================================================== *22.2* The current directory Just like the shell, Vim has the concept of a current directory. Suppose you are in your home directory and want to edit several files in a directory "VeryLongFileName". You could do: > :edit VeryLongFileName/file1.txt :edit VeryLongFileName/file2.txt :edit VeryLongFileName/file3.txt To avoid much of the typing, do this: > :cd VeryLongFileName :edit file1.txt :edit file2.txt :edit file3.txt The ":cd" command changes the current directory. You can see what the current directory is with the ":pwd" command: > :pwd /home/Bram/VeryLongFileName Vim remembers the last directory that you used. Use "cd -" to go back to it. Example: > :pwd /home/Bram/VeryLongFileName :cd /etc :pwd /etc :cd - :pwd /home/Bram/VeryLongFileName :cd - :pwd /etc WINDOW LOCAL DIRECTORY When you split a window, both windows use the same current directory. When you want to edit a number of files somewhere else in the new window, you can make it use a different directory, without changing the current directory in the other window. This is called a local directory. > :pwd /home/Bram/VeryLongFileName :split :lcd /etc :pwd /etc CTRL-W w :pwd /home/Bram/VeryLongFileName So long as no ":lcd" command has been used, all windows share the same current directory. Doing a ":cd" command in one window will also change the current directory of the other window. For a window where ":lcd" has been used a different current directory is remembered. Using ":cd" or ":lcd" in other windows will not change it. When using a ":cd" command in a window that uses a different current directory, it will go back to using the shared directory. ============================================================================== *22.3* Finding a file You are editing a C program that contains this line: #include "inits.h" ~ You want to see what is in that "inits.h" file. Move the cursor on the name of the file and type: > gf Vim will find the file and edit it. What if the file is not in the current directory? Vim will use the 'path' option to find the file. This option is a list of directory names where to look for your file. Suppose you have your include files located in "c:/prog/include". This command will add it to the 'path' option: > :set path+=c:/prog/include This directory is an absolute path. No matter where you are, it will be the same place. What if you have located files in a subdirectory, below where the file is? Then you can specify a relative path name. This starts with a dot: > :set path+=./proto This tells Vim to look in the directory "proto", below the directory where the file in which you use "gf" is. Thus using "gf" on "inits.h" will make Vim look for "proto/inits.h", starting in the directory of the file. Without the "./", thus "proto", Vim would look in the "proto" directory below the current directory. And the current directory might not be where the file that you are editing is located. The 'path' option allows specifying the directories where to search for files in many more ways. See the help on the 'path' option. The 'isfname' option is used to decide which characters are included in the file name, and which ones are not (e.g., the " character in the example above). When you know the file name, but it's not to be found in the file, you can type it: > :find inits.h Vim will then use the 'path' option to try and locate the file. This is the same as the ":edit" command, except for the use of 'path'. To open the found file in a new window use CTRL-W f instead of "gf", or use ":sfind" instead of ":find". A nice way to directly start Vim to edit a file somewhere in the 'path': > vim "+find stdio.h" This finds the file "stdio.h" in your value of 'path'. The quotes are necessary to have one argument |-+c|. ============================================================================== *22.4* The buffer list The Vim editor uses the term buffer to describe a file being edited. Actually, a buffer is a copy of the file that you edit. When you finish changing the buffer, you write the contents of the buffer to the file. Buffers not only contain file contents, but also all the marks, settings, and other stuff that goes with it. HIDDEN BUFFERS Suppose you are editing the file one.txt and need to edit the file two.txt. You could simply use ":edit two.txt", but since you made changes to one.txt that won't work. You also don't want to write one.txt yet. Vim has a solution for you: > :hide edit two.txt The buffer "one.txt" disappears from the screen, but Vim still knows that you are editing this buffer, so it keeps the modified text. This is called a hidden buffer: The buffer contains text, but you can't see it. The argument of ":hide" is another command. ":hide" makes that command behave as if the 'hidden' option was set. You could also set this option yourself. The effect is that when any buffer is abandoned, it becomes hidden. Be careful! When you have hidden buffers with changes, don't exit Vim without making sure you have saved all the buffers. INACTIVE BUFFERS When a buffer has been used once, Vim remembers some information about it. When it is not displayed in a window and it is not hidden, it is still in the buffer list. This is called an inactive buffer. Overview: Active Appears in a window, text loaded. Hidden Not in a window, text loaded. Inactive Not in a window, no text loaded. The inactive buffers are remembered, because Vim keeps information about them, like marks. And remembering the file name is useful too, so that you can see which files you have edited. And edit them again. LISTING BUFFERS View the buffer list with this command: > :buffers A command which does the same, is not so obvious to list buffers, but is much shorter to type: > :ls The output could look like this: 1 #h "help.txt" line 62 ~ 2 %a + "usr_21.txt" line 1 ~ 3 "usr_toc.txt" line 1 ~ The first column contains the buffer number. You can use this to edit the buffer without having to type the name, see below. After the buffer number come the flags. Then the name of the file and the line number where the cursor was the last time. The flags that can appear are these (from left to right): u Buffer is unlisted |unlisted-buffer|. % Current buffer. # Alternate buffer. a Buffer is loaded and displayed. h Buffer is loaded but hidden. = Buffer is read-only. - Buffer is not modifiable, the 'modifiable' option is off. + Buffer has been modified. EDITING A BUFFER You can edit a buffer by its number. That avoids having to type the file name: > :buffer 2 But the only way to know the number is by looking in the buffer list. You can use the name, or part of it, instead: > :buffer help Vim will find the best match for the name you type. If there is only one buffer that matches the name, it will be used. In this case "help.txt". To open a buffer in a new window: > :sbuffer 3 This works with a name as well. USING THE BUFFER LIST You can move around in the buffer list with these commands: :bnext go to next buffer :bprevious go to previous buffer :bfirst go to the first buffer :blast go to the last buffer To remove a buffer from the list, use this command: > :bdelete 3 Again, this also works with a name. If you delete a buffer that was active (visible in a window), that window will be closed. If you delete the current buffer, the current window will be closed. If it was the last window, Vim will find another buffer to edit. You can't be editing nothing! Note: Even after removing the buffer with ":bdelete" Vim still remembers it. It's actually made "unlisted", it no longer appears in the list from ":buffers". The ":buffers!" command will list unlisted buffers (yes, Vim can do the impossible). To really make Vim forget about a buffer, use ":bwipe". Also see the 'buflisted' option. ============================================================================== Next chapter: |usr_23.txt| Editing other files Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ���������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_23.txt�����������������������������������������������������������������0000664�0000000�0000000�00000021557�13204015742�0017126�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_23.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Editing other files This chapter is about editing files that are not ordinary files. With Vim you can edit files that are compressed. Some files need to be accessed over the internet. With some restrictions, binary files can be edited as well. |23.1| DOS, Mac and Unix files |23.2| Files on the internet |23.3| Binary files |23.4| Compressed files Next chapter: |usr_24.txt| Inserting quickly Previous chapter: |usr_22.txt| Finding the file to edit Table of contents: |usr_toc.txt| ============================================================================== *23.1* DOS, Mac and Unix files Back in the early days, the old Teletype machines used two characters to start a new line. One to move the carriage back to the first position (carriage return, <CR>), another to move the paper up (line feed, <LF>). When computers came out, storage was expensive. Some people decided that they did not need two characters for end-of-line. The Unix people decided they could use <Line Feed> only for end-of-line. The Apple people standardized on <CR>. The MS-DOS (and Microsoft Windows) folks decided to keep the old <CR><LF>. This means that if you try to move a file from one system to another, you have line-break problems. The Vim editor automatically recognizes the different file formats and handles things properly behind your back. The option 'fileformats' contains the various formats that will be tried when a new file is edited. The following command, for example, tells Vim to try Unix format first and MS-DOS format second: > :set fileformats=unix,dos You will notice the format in the message you get when editing a file. You don't see anything if you edit a native file format. Thus editing a Unix file on Unix won't result in a remark. But when you edit a dos file, Vim will notify you of this: "/tmp/test" [dos] 3L, 71C ~ For a Mac file you would see "[mac]". The detected file format is stored in the 'fileformat' option. To see which format you have, execute the following command: > :set fileformat? The three names that Vim uses are: unix <LF> dos <CR><LF> mac <CR> USING THE MAC FORMAT On Unix, <LF> is used to break a line. It's not unusual to have a <CR> character halfway in a line. Incidentally, this happens quite often in Vi (and Vim) scripts. On the Macintosh, where <CR> is the line break character, it's possible to have a <LF> character halfway in a line. The result is that it's not possible to be 100% sure whether a file containing both <CR> and <LF> characters is a Mac or a Unix file. Therefore, Vim assumes that on Unix you probably won't edit a Mac file, and doesn't check for this type of file. To check for this format anyway, add "mac" to 'fileformats': > :set fileformats+=mac Then Vim will take a guess at the file format. Watch out for situations where Vim guesses wrong. OVERRULING THE FORMAT If you use the good old Vi and try to edit an MS-DOS format file, you will find that each line ends with a ^M character. (^M is <CR>). The automatic detection avoids this. Suppose you do want to edit the file that way? Then you need to overrule the format: > :edit ++ff=unix file.txt The "++" string is an item that tells Vim that an option name follows, which overrules the default for this single command. "++ff" is used for 'fileformat'. You could also use "++ff=mac" or "++ff=dos". This doesn't work for any option, only "++ff" and "++enc" are currently implemented. The full names "++fileformat" and "++encoding" also work. CONVERSION You can use the 'fileformat' option to convert from one file format to another. Suppose, for example, that you have an MS-DOS file named README.TXT that you want to convert to Unix format. Start by editing the MS-DOS format file: > vim README.TXT Vim will recognize this as a dos format file. Now change the file format to Unix: > :set fileformat=unix :write The file is written in Unix format. ============================================================================== *23.2* Files on the internet Someone sends you an e-mail message, which refers to a file by its URL. For example: You can find the information here: ~ ftp://ftp.vim.org/pub/vim/README ~ You could start a program to download the file, save it on your local disk and then start Vim to edit it. There is a much simpler way. Move the cursor to any character of the URL. Then use this command: > gf With a bit of luck, Vim will figure out which program to use for downloading the file, download it and edit the copy. To open the file in a new window use CTRL-W f. If something goes wrong you will get an error message. It's possible that the URL is wrong, you don't have permission to read it, the network connection is down, etc. Unfortunately, it's hard to tell the cause of the error. You might want to try the manual way of downloading the file. Accessing files over the internet works with the netrw plugin. Currently URLs with these formats are recognized: ftp:// uses ftp rcp:// uses rcp scp:// uses scp http:// uses wget (reading only) Vim doesn't do the communication itself, it relies on the mentioned programs to be available on your computer. On most Unix systems "ftp" and "rcp" will be present. "scp" and "wget" might need to be installed. Vim detects these URLs for each command that starts editing a new file, also with ":edit" and ":split", for example. Write commands also work, except for http://. For more information, also about passwords, see |netrw|. ============================================================================== *23.3* Binary files You can edit binary files with Vim. Vim wasn't really made for this, thus there are a few restrictions. But you can read a file, change a character and write it back, with the result that only that one character was changed and the file is identical otherwise. To make sure that Vim does not use its clever tricks in the wrong way, add the "-b" argument when starting Vim: > vim -b datafile This sets the 'binary' option. The effect of this is that unexpected side effects are turned off. For example, 'textwidth' is set to zero, to avoid automatic formatting of lines. And files are always read in Unix file format. Binary mode can be used to change a message in a program. Be careful not to insert or delete any characters, it would stop the program from working. Use "R" to enter replace mode. Many characters in the file will be unprintable. To see them in Hex format: > :set display=uhex Otherwise, the "ga" command can be used to see the value of the character under the cursor. The output, when the cursor is on an <Esc>, looks like this: <^[> 27, Hex 1b, Octal 033 ~ There might not be many line breaks in the file. To get some overview switch the 'wrap' option off: > :set nowrap BYTE POSITION To see on which byte you are in the file use this command: > g CTRL-G The output is verbose: Col 9-16 of 9-16; Line 277 of 330; Word 1806 of 2058; Byte 10580 of 12206 ~ The last two numbers are the byte position in the file and the total number of bytes. This takes into account how 'fileformat' changes the number of bytes that a line break uses. To move to a specific byte in the file, use the "go" command. For example, to move to byte 2345: > 2345go USING XXD A real binary editor shows the text in two ways: as it is and in hex format. You can do this in Vim by first converting the file with the "xxd" program. This comes with Vim. First edit the file in binary mode: > vim -b datafile Now convert the file to a hex dump with xxd: > :%!xxd The text will look like this: 0000000: 1f8b 0808 39d7 173b 0203 7474 002b 4e49 ....9..;..tt.+NI ~ 0000010: 4b2c 8660 eb9c ecac c462 eb94 345e 2e30 K,.`.....b..4^.0 ~ 0000020: 373b 2731 0b22 0ca6 c1a2 d669 1035 39d9 7;'1.".....i.59. ~ You can now view and edit the text as you like. Vim treats the information as ordinary text. Changing the hex does not cause the printable character to be changed, or the other way around. Finally convert it back with: > :%!xxd -r Only changes in the hex part are used. Changes in the printable text part on the right are ignored. See the manual page of xxd for more information. ============================================================================== *23.4* Compressed files This is easy: You can edit a compressed file just like any other file. The "gzip" plugin takes care of decompressing the file when you edit it. And compressing it again when you write it. These compression methods are currently supported: .Z compress .gz gzip .bz2 bzip2 Vim uses the mentioned programs to do the actual compression and decompression. You might need to install the programs first. ============================================================================== Next chapter: |usr_24.txt| Inserting quickly Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_24.txt�����������������������������������������������������������������0000664�0000000�0000000�00000050424�13204015742�0017122�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_24.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Inserting quickly When entering text, Vim offers various ways to reduce the number of keystrokes and avoid typing mistakes. Use Insert mode completion to repeat previously typed words. Abbreviate long words to short ones. Type characters that aren't on your keyboard. |24.1| Making corrections |24.2| Showing matches |24.3| Completion |24.4| Repeating an insert |24.5| Copying from another line |24.6| Inserting a register |24.7| Abbreviations |24.8| Entering special characters |24.9| Digraphs |24.10| Normal mode commands Next chapter: |usr_25.txt| Editing formatted text Previous chapter: |usr_23.txt| Editing other files Table of contents: |usr_toc.txt| ============================================================================== *24.1* Making corrections The <BS> key was already mentioned. It deletes the character just before the cursor. The <Del> key does the same for the character under (after) the cursor. When you typed a whole word wrong, use CTRL-W: The horse had fallen to the sky ~ CTRL-W The horse had fallen to the ~ If you really messed up a line and want to start over, use CTRL-U to delete it. This keeps the text after the cursor and the indent. Only the text from the first non-blank to the cursor is deleted. With the cursor on the "f" of "fallen" in the next line pressing CTRL-U does this: The horse had fallen to the ~ CTRL-U fallen to the ~ When you spot a mistake a few words back, you need to move the cursor there to correct it. For example, you typed this: The horse had follen to the ground ~ You need to change "follen" to "fallen". With the cursor at the end, you would type this to correct it: > <Esc>4blraA < get out of Insert mode <Esc> four words back 4b move on top of the "o" l replace with "a" ra restart Insert mode A Another way to do this: > <C-Left><C-Left><C-Left><C-Left><Right><Del>a<End> < four words back <C-Left><C-Left><C-Left><C-Left> move on top of the "o" <Right> delete the "o" <Del> insert an "a" a go to end of the line <End> This uses special keys to move around, while remaining in Insert mode. This resembles what you would do in a modeless editor. It's easier to remember, but takes more time (you have to move your hand from the letters to the cursor keys, and the <End> key is hard to press without looking at the keyboard). These special keys are most useful when writing a mapping that doesn't leave Insert mode. The extra typing doesn't matter then. An overview of the keys you can use in Insert mode: <C-Home> to start of the file <PageUp> a whole screenful up <Home> to start of line <S-Left> one word left <C-Left> one word left <S-Right> one word right <C-Right> one word right <End> to end of the line <PageDown> a whole screenful down <C-End> to end of the file There are a few more, see |ins-special-special|. ============================================================================== *24.2* Showing matches When you type a ) it would be nice to see with which ( it matches. To make Vim do that use this command: > :set showmatch When you now type a text like "(example)", as soon as you type the ) Vim will briefly move the cursor to the matching (, keep it there for half a second, and move back to where you were typing. In case there is no matching (, Vim will beep. Then you know that you might have forgotten the ( somewhere, or typed a ) too many. The match will also be shown for [] and {} pairs. You don't have to wait with typing the next character, as soon as Vim sees it the cursor will move back and inserting continues as before. You can change the time Vim waits with the 'matchtime' option. For example, to make Vim wait one and a half second: > :set matchtime=15 The time is specified in tenths of a second. ============================================================================== *24.3* Completion Vim can automatically complete words on insertion. You type the first part of a word, press CTRL-P, and Vim guesses the rest. Suppose, for example, that you are creating a C program and want to type in the following: total = ch_array[0] + ch_array[1] + ch_array[2]; ~ You start by entering the following: total = ch_array[0] + ch_ ~ At this point, you tell Vim to complete the word using the command CTRL-P. Vim searches for a word that starts with what's in front of the cursor. In this case, it is "ch_", which matches with the word ch_array. So typing CTRL-P gives you the following: total = ch_array[0] + ch_array ~ After a little more typing, you get this (ending in a space): total = ch_array[0] + ch_array[1] + ~ If you now type CTRL-P Vim will search again for a word that completes the word before the cursor. Since there is nothing in front of the cursor, it finds the first word backwards, which is "ch_array". Typing CTRL-P again gives you the next word that matches, in this case "total". A third CTRL-P searches further back. If there is nothing else, it causes the editor to run out of words, so it returns to the original text, which is nothing. A fourth CTRL-P causes the editor to start over again with "ch_array". To search forward, use CTRL-N. Since the search wraps around the end of the file, CTRL-N and CTRL-P will find the same matches, but in a different sequence. Hint: CTRL-N is Next-match and CTRL-P is Previous-match. The Vim editor goes through a lot of effort to find words to complete. By default, it searches the following places: 1. Current file 2. Files in other windows 3. Other loaded files (hidden buffers) 4. Files which are not loaded (inactive buffers) 5. Tag files 6. All files #included by the current file OPTIONS You can customize the search order with the 'complete' option. The 'ignorecase' option is used. When it is set, case differences are ignored when searching for matches. A special option for completion is 'infercase'. This is useful to find matches while ignoring case ('ignorecase' must be set) but still using the case of the word typed so far. Thus if you type "For" and Vim finds a match "fortunately", it will result in "Fortunately". COMPLETING SPECIFIC ITEMS If you know what you are looking for, you can use these commands to complete with a certain type of item: CTRL-X CTRL-F file names CTRL-X CTRL-L whole lines CTRL-X CTRL-D macro definitions (also in included files) CTRL-X CTRL-I current and included files CTRL-X CTRL-K words from a dictionary CTRL-X CTRL-T words from a thesaurus CTRL-X CTRL-] tags CTRL-X CTRL-V Vim command line After each of them CTRL-N can be used to find the next match, CTRL-P to find the previous match. More information for each of these commands here: |ins-completion|. COMPLETING FILE NAMES Let's take CTRL-X CTRL-F as an example. This will find file names. It scans the current directory for files and displays each one that matches the word in front of the cursor. Suppose, for example, that you have the following files in the current directory: main.c sub_count.c sub_done.c sub_exit.c Now enter Insert mode and start typing: The exit code is in the file sub ~ At this point, you enter the command CTRL-X CTRL-F. Vim now completes the current word "sub" by looking at the files in the current directory. The first match is sub_count.c. This is not the one you want, so you match the next file by typing CTRL-N. This match is sub_done.c. Typing CTRL-N again takes you to sub_exit.c. The results: The exit code is in the file sub_exit.c ~ If the file name starts with / (Unix) or C:\ (MS-Windows) you can find all files in the file system. For example, type "/u" and CTRL-X CTRL-F. This will match "/usr" (this is on Unix): the file is found in /usr/ ~ If you now press CTRL-N you go back to "/u". Instead, to accept the "/usr/" and go one directory level deeper, use CTRL-X CTRL-F again: the file is found in /usr/X11R6/ ~ The results depend on what is found in your file system, of course. The matches are sorted alphabetically. COMPLETING IN SOURCE CODE Source code files are well structured. That makes it possible to do completion in an intelligent way. In Vim this is called Omni completion. In some other editors it's called intellisense, but that is a trademark. The key to Omni completion is CTRL-X CTRL-O. Obviously the O stands for Omni here, so that you can remember it easier. Let's use an example for editing C source: { ~ struct foo *p; ~ p-> ~ The cursor is after "p->". Now type CTRL-X CTRL-O. Vim will offer you a list of alternatives, which are the items that "struct foo" contains. That is quite different from using CTRL-P, which would complete any word, while only members of "struct foo" are valid here. For Omni completion to work you may need to do some setup. At least make sure filetype plugins are enabled. Your vimrc file should contain a line like this: > filetype plugin on Or: > filetype plugin indent on For C code you need to create a tags file and set the 'tags' option. That is explained |ft-c-omni|. For other filetypes you may need to do something similar, look below |compl-omni-filetypes|. It only works for specific filetypes. Check the value of the 'omnifunc' option to find out if it would work. ============================================================================== *24.4* Repeating an insert If you press CTRL-A, the editor inserts the text you typed the last time you were in Insert mode. Assume, for example, that you have a file that begins with the following: "file.h" ~ /* Main program begins */ ~ You edit this file by inserting "#include " at the beginning of the first line: #include "file.h" ~ /* Main program begins */ ~ You go down to the beginning of the next line using the commands "j^". You now start to insert a new "#include" line. So you type: > i CTRL-A The result is as follows: #include "file.h" ~ #include /* Main program begins */ ~ The "#include " was inserted because CTRL-A inserts the text of the previous insert. Now you type "main.h"<Enter> to finish the line: #include "file.h" ~ #include "main.h" ~ /* Main program begins */ ~ The CTRL-@ command does a CTRL-A and then exits Insert mode. That's a quick way of doing exactly the same insertion again. ============================================================================== *24.5* Copying from another line The CTRL-Y command inserts the character above the cursor. This is useful when you are duplicating a previous line. For example, you have this line of C code: b_array[i]->s_next = a_array[i]->s_next; ~ Now you need to type the same line, but with "s_prev" instead of "s_next". Start the new line, and press CTRL-Y 14 times, until you are at the "n" of "next": b_array[i]->s_next = a_array[i]->s_next; ~ b_array[i]->s_ ~ Now you type "prev": b_array[i]->s_next = a_array[i]->s_next; ~ b_array[i]->s_prev ~ Continue pressing CTRL-Y until the following "next": b_array[i]->s_next = a_array[i]->s_next; ~ b_array[i]->s_prev = a_array[i]->s_ ~ Now type "prev;" to finish it off. The CTRL-E command acts like CTRL-Y except it inserts the character below the cursor. ============================================================================== *24.6* Inserting a register The command CTRL-R {register} inserts the contents of the register. This is useful to avoid having to type a long word. For example, you need to type this: r = VeryLongFunction(a) + VeryLongFunction(b) + VeryLongFunction(c) ~ The function name is defined in a different file. Edit that file and move the cursor on top of the function name there, and yank it into register v: > "vyiw "v is the register specification, "yiw" is yank-inner-word. Now edit the file where the new line is to be inserted, and type the first letters: r = ~ Now use CTRL-R v to insert the function name: r = VeryLongFunction ~ You continue to type the characters in between the function name, and use CTRL-R v two times more. You could have done the same with completion. Using a register is useful when there are many words that start with the same characters. If the register contains characters such as <BS> or other special characters, they are interpreted as if they had been typed from the keyboard. If you do not want this to happen (you really want the <BS> to be inserted in the text), use the command CTRL-R CTRL-R {register}. ============================================================================== *24.7* Abbreviations An abbreviation is a short word that takes the place of a long one. For example, "ad" stands for "advertisement". Vim enables you to type an abbreviation and then will automatically expand it for you. To tell Vim to expand "ad" into "advertisement" every time you insert it, use the following command: > :iabbrev ad advertisement Now, when you type "ad", the whole word "advertisement" will be inserted into the text. This is triggered by typing a character that can't be part of a word, for example a space: What Is Entered What You See I saw the a I saw the a ~ I saw the ad I saw the ad ~ I saw the ad<Space> I saw the advertisement<Space> ~ The expansion doesn't happen when typing just "ad". That allows you to type a word like "add", which will not get expanded. Only whole words are checked for abbreviations. ABBREVIATING SEVERAL WORDS It is possible to define an abbreviation that results in multiple words. For example, to define "JB" as "Jack Benny", use the following command: > :iabbrev JB Jack Benny As a programmer, I use two rather unusual abbreviations: > :iabbrev #b /**************************************** :iabbrev #e <Space>****************************************/ These are used for creating boxed comments. The comment starts with #b, which draws the top line. I then type the comment text and use #e to draw the bottom line. Notice that the #e abbreviation begins with a space. In other words, the first two characters are space-star. Usually Vim ignores spaces between the abbreviation and the expansion. To avoid that problem, I spell space as seven characters: <, S, p, a, c, e, >. Note: ":iabbrev" is a long word to type. ":iab" works just as well. That's abbreviating the abbreviate command! FIXING TYPING MISTAKES It's very common to make the same typing mistake every time. For example, typing "teh" instead of "the". You can fix this with an abbreviation: > :abbreviate teh the You can add a whole list of these. Add one each time you discover a common mistake. LISTING ABBREVIATIONS The ":abbreviate" command lists the abbreviations: :abbreviate i #e ****************************************/ i #b /**************************************** i JB Jack Benny i ad advertisement ! teh the The "i" in the first column indicates Insert mode. These abbreviations are only active in Insert mode. Other possible characters are: c Command-line mode :cabbrev ! both Insert and Command-line mode :abbreviate Since abbreviations are not often useful in Command-line mode, you will mostly use the ":iabbrev" command. That avoids, for example, that "ad" gets expanded when typing a command like: > :edit ad DELETING ABBREVIATIONS To get rid of an abbreviation, use the ":unabbreviate" command. Suppose you have the following abbreviation: > :abbreviate @f fresh You can remove it with this command: > :unabbreviate @f While you type this, you will notice that @f is expanded to "fresh". Don't worry about this, Vim understands it anyway (except when you have an abbreviation for "fresh", but that's very unlikely). To remove all the abbreviations: > :abclear ":unabbreviate" and ":abclear" also come in the variants for Insert mode (":iunabbreviate and ":iabclear") and Command-line mode (":cunabbreviate" and ":cabclear"). REMAPPING ABBREVIATIONS There is one thing to watch out for when defining an abbreviation: The resulting string should not be mapped. For example: > :abbreviate @a adder :imap dd disk-door When you now type @a, you will get "adisk-doorer". That's not what you want. To avoid this, use the ":noreabbrev" command. It does the same as ":abbreviate", but avoids that the resulting string is used for mappings: > :noreabbrev @a adder Fortunately, it's unlikely that the result of an abbreviation is mapped. ============================================================================== *24.8* Entering special characters The CTRL-V command is used to insert the next character literally. In other words, any special meaning the character has, it will be ignored. For example: > CTRL-V <Esc> Inserts an escape character. Thus you don't leave Insert mode. (Don't type the space after CTRL-V, it's only to make this easier to read). Note: On MS-Windows CTRL-V is used to paste text. Use CTRL-Q instead of CTRL-V. On Unix, on the other hand, CTRL-Q does not work on some terminals, because it has a special meaning. You can also use the command CTRL-V {digits} to insert a character with the decimal number {digits}. For example, the character number 127 is the <Del> character (but not necessarily the <Del> key!). To insert <Del> type: > CTRL-V 127 You can enter characters up to 255 this way. When you type fewer than two digits, a non-digit will terminate the command. To avoid the need of typing a non-digit, prepend one or two zeros to make three digits. All the next commands insert a <Tab> and then a dot: CTRL-V 9. CTRL-V 09. CTRL-V 009. To enter a character in hexadecimal, use an "x" after the CTRL-V: > CTRL-V x7f This also goes up to character 255 (CTRL-V xff). You can use "o" to type a character as an octal number and two more methods allow you to type up to a 16 bit and a 32 bit number (e.g., for a Unicode character): > CTRL-V o123 CTRL-V u1234 CTRL-V U12345678 ============================================================================== *24.9* Digraphs Some characters are not on the keyboard. For example, the copyright character (). To type these characters in Vim, you use digraphs, where two characters represent one. To enter a , for example, you press three keys: > CTRL-K Co To find out what digraphs are available, use the following command: > :digraphs Vim will display the digraph table. Here are three lines of it: AC ~_ 159 NS | 160 !I 161 Ct 162 Pd 163 Cu 164 Ye 165 ~ BB 166 SE 167 ': 168 Co 169 -a 170 << 171 NO 172 ~ -- 173 Rg 174 'm 175 DG 176 +- 177 2S 178 3S 179 ~ This shows, for example, that the digraph you get by typing CTRL-K Pd is the character (). This is character number 163 (decimal). Pd is short for Pound. Most digraphs are selected to give you a hint about the character they will produce. If you look through the list you will understand the logic. You can exchange the first and second character, if there is no digraph for that combination. Thus CTRL-K dP also works. Since there is no digraph for "dP" Vim will also search for a "Pd" digraph. Note: The digraphs depend on the character set that Vim assumes you are using. Always use ":digraphs" to find out which digraphs are currently available. You can define your own digraphs. Example: > :digraph a" This defines that CTRL-K a" inserts an character. You can also specify the character with a decimal number. This defines the same digraph: > :digraph a" 228 More information about digraphs here: |digraphs| Another way to insert special characters is with a keymap. More about that here: |45.5| ============================================================================== *24.10* Normal mode commands Insert mode offers a limited number of commands. In Normal mode you have many more. When you want to use one, you usually leave Insert mode with <Esc>, execute the Normal mode command, and re-enter Insert mode with "i" or "a". There is a quicker way. With CTRL-O {command} you can execute any Normal mode command from Insert mode. For example, to delete from the cursor to the end of the line: > CTRL-O D You can execute only one Normal mode command this way. But you can specify a register or a count. A more complicated example: > CTRL-O "g3dw This deletes up to the third word into register g. ============================================================================== Next chapter: |usr_25.txt| Editing formatted text Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_25.txt�����������������������������������������������������������������0000664�0000000�0000000�00000045200�13204015742�0017117�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_25.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Editing formatted text Text hardly ever comes in one sentence per line. This chapter is about breaking sentences to make them fit on a page and other formatting. Vim also has useful features for editing single-line paragraphs and tables. |25.1| Breaking lines |25.2| Aligning text |25.3| Indents and tabs |25.4| Dealing with long lines |25.5| Editing tables Next chapter: |usr_26.txt| Repeating Previous chapter: |usr_24.txt| Inserting quickly Table of contents: |usr_toc.txt| ============================================================================== *25.1* Breaking lines Vim has a number of functions that make dealing with text easier. By default, the editor does not perform automatic line breaks. In other words, you have to press <Enter> yourself. This is useful when you are writing programs where you want to decide where the line ends. It is not so good when you are creating documentation and want the text to be at most 70 character wide. If you set the 'textwidth' option, Vim automatically inserts line breaks. Suppose, for example, that you want a very narrow column of only 30 characters. You need to execute the following command: > :set textwidth=30 Now you start typing (ruler added): 1 2 3 12345678901234567890123456789012345 I taught programming for a whi ~ If you type "l" next, this makes the line longer than the 30-character limit. When Vim sees this, it inserts a line break and you get the following: 1 2 3 12345678901234567890123456789012345 I taught programming for a ~ whil ~ Continuing on, you can type in the rest of the paragraph: 1 2 3 12345678901234567890123456789012345 I taught programming for a ~ while. One time, I was stopped ~ by the Fort Worth police, ~ because my homework was too ~ hard. True story. ~ You do not have to type newlines; Vim puts them in automatically. Note: The 'wrap' option makes Vim display lines with a line break, but this doesn't insert a line break in the file. REFORMATTING The Vim editor is not a word processor. In a word processor, if you delete something at the beginning of the paragraph, the line breaks are reworked. In Vim they are not; so if you delete the word "programming" from the first line, all you get is a short line: 1 2 3 12345678901234567890123456789012345 I taught for a ~ while. One time, I was stopped ~ by the Fort Worth police, ~ because my homework was too ~ hard. True story. ~ This does not look good. To get the paragraph into shape you use the "gq" operator. Let's first use this with a Visual selection. Starting from the first line, type: > v4jgq "v" to start Visual mode, "4j" to move to the end of the paragraph and then the "gq" operator. The result is: 1 2 3 12345678901234567890123456789012345 I taught for a while. One ~ time, I was stopped by the ~ Fort Worth police, because my ~ homework was too hard. True ~ story. ~ Note: there is a way to do automatic formatting for specific types of text layouts, see |auto-format|. Since "gq" is an operator, you can use one of the three ways to select the text it works on: With Visual mode, with a movement and with a text object. The example above could also be done with "gq4j". That's less typing, but you have to know the line count. A more useful motion command is "}". This moves to the end of a paragraph. Thus "gq}" formats from the cursor to the end of the current paragraph. A very useful text object to use with "gq" is the paragraph. Try this: > gqap "ap" stands for "a-paragraph". This formats the text of one paragraph (separated by empty lines). Also the part before the cursor. If you have your paragraphs separated by empty lines, you can format the whole file by typing this: > gggqG "gg" to move to the first line, "gqG" to format until the last line. Warning: If your paragraphs are not properly separated, they will be joined together. A common mistake is to have a line with a space or tab. That's a blank line, but not an empty line. Vim is able to format more than just plain text. See |fo-table| for how to change this. See the 'joinspaces' option to change the number of spaces used after a full stop. It is possible to use an external program for formatting. This is useful if your text can't be properly formatted with Vim's builtin command. See the 'formatprg' option. ============================================================================== *25.2* Aligning text To center a range of lines, use the following command: > :{range}center [width] {range} is the usual command-line range. [width] is an optional line width to use for centering. If [width] is not specified, it defaults to the value of 'textwidth'. (If 'textwidth' is 0, the default is 80.) For example: > :1,5center 40 results in the following: I taught for a while. One ~ time, I was stopped by the ~ Fort Worth police, because my ~ homework was too hard. True ~ story. ~ RIGHT ALIGNMENT Similarly, the ":right" command right-justifies the text: > :1,5right 37 gives this result: I taught for a while. One ~ time, I was stopped by the ~ Fort Worth police, because my ~ homework was too hard. True ~ story. ~ LEFT ALIGNMENT Finally there is this command: > :{range}left [margin] Unlike ":center" and ":right", however, the argument to ":left" is not the length of the line. Instead it is the left margin. If it is omitted, the text will be put against the left side of the screen (using a zero margin would do the same). If it is 5, the text will be indented 5 spaces. For example, use these commands: > :1left 5 :2,5left This results in the following: I taught for a while. One ~ time, I was stopped by the ~ Fort Worth police, because my ~ homework was too hard. True ~ story. ~ JUSTIFYING TEXT Vim has no built-in way of justifying text. However, there is a neat macro package that does the job. To use this package, execute the following command: > :packadd justify Or put this line in your |vimrc|: > packadd! justify This Vim script file defines a new visual command "_j". To justify a block of text, highlight the text in Visual mode and then execute "_j". Look in the file for more explanations. To go there, do "gf" on this name: $VIMRUNTIME/pack/dist/opt/justify/plugin/justify.vim. An alternative is to filter the text through an external program. Example: > :%!fmt ============================================================================== *25.3* Indents and tabs Indents can be used to make text stand out from the rest. The example texts in this manual, for example, are indented by eight spaces or a tab. You would normally enter this by typing a tab at the start of each line. Take this text: the first line ~ the second line ~ This is entered by typing a tab, some text, <Enter>, tab and more text. The 'autoindent' option inserts indents automatically: > :set autoindent When a new line is started it gets the same indent as the previous line. In the above example, the tab after the <Enter> is not needed anymore. INCREASING INDENT To increase the amount of indent in a line, use the ">" operator. Often this is used as ">>", which adds indent to the current line. The amount of indent added is specified with the 'shiftwidth' option. The default value is 8. To make ">>" insert four spaces worth of indent, for example, type this: > :set shiftwidth=4 When used on the second line of the example text, this is what you get: the first line ~ the second line ~ "4>>" will increase the indent of four lines. TABSTOP If you want to make indents a multiple of 4, you set 'shiftwidth' to 4. But when pressing a <Tab> you still get 8 spaces worth of indent. To change this, set the 'softtabstop' option: > :set softtabstop=4 This will make the <Tab> key insert 4 spaces worth of indent. If there are already four spaces, a <Tab> character is used (saving seven characters in the file). (If you always want spaces and no tab characters, set the 'expandtab' option.) Note: You could set the 'tabstop' option to 4. However, if you edit the file another time, with 'tabstop' set to the default value of 8, it will look wrong. In other programs and when printing the indent will also be wrong. Therefore it is recommended to keep 'tabstop' at eight all the time. That's the standard value everywhere. CHANGING TABS You edit a file which was written with a tabstop of 3. In Vim it looks ugly, because it uses the normal tabstop value of 8. You can fix this by setting 'tabstop' to 3. But you have to do this every time you edit this file. Vim can change the use of tabstops in your file. First, set 'tabstop' to make the indents look good, then use the ":retab" command: > :set tabstop=3 :retab 8 The ":retab" command will change 'tabstop' to 8, while changing the text such that it looks the same. It changes spans of white space into tabs and spaces for this. You can now write the file. Next time you edit it the indents will be right without setting an option. Warning: When using ":retab" on a program, it may change white space inside a string constant. Therefore it's a good habit to use "\t" instead of a real tab. ============================================================================== *25.4* Dealing with long lines Sometimes you will be editing a file that is wider than the number of columns in the window. When that occurs, Vim wraps the lines so that everything fits on the screen. If you switch the 'wrap' option off, each line in the file shows up as one line on the screen. Then the ends of the long lines disappear off the screen to the right. When you move the cursor to a character that can't be seen, Vim will scroll the text to show it. This is like moving a viewport over the text in the horizontal direction. By default, Vim does not display a horizontal scrollbar in the GUI. If you want to enable one, use the following command: > :set guioptions+=b One horizontal scrollbar will appear at the bottom of the Vim window. If you don't have a scrollbar or don't want to use it, use these commands to scroll the text. The cursor will stay in the same place, but it's moved back into the visible text if necessary. zh scroll right 4zh scroll four characters right zH scroll half a window width right ze scroll right to put the cursor at the end zl scroll left 4zl scroll four characters left zL scroll half a window width left zs scroll left to put the cursor at the start Let's attempt to show this with one line of text. The cursor is on the "w" of "which". The "current window" above the line indicates the text that is currently visible. The "window"s below the text indicate the text that is visible after the command left of it. |<-- current window -->| some long text, part of which is visible in the window ~ ze |<-- window -->| zH |<-- window -->| 4zh |<-- window -->| zh |<-- window -->| zl |<-- window -->| 4zl |<-- window -->| zL |<-- window -->| zs |<-- window -->| MOVING WITH WRAP OFF When 'wrap' is off and the text has scrolled horizontally, you can use the following commands to move the cursor to a character you can see. Thus text left and right of the window is ignored. These never cause the text to scroll: g0 to first visible character in this line g^ to first non-blank visible character in this line gm to middle of this line g$ to last visible character in this line |<-- window -->| some long text, part of which is visible ~ g0 g^ gm g$ BREAKING AT WORDS *edit-no-break* When preparing text for use by another program, you might have to make paragraphs without a line break. A disadvantage of using 'nowrap' is that you can't see the whole sentence you are working on. When 'wrap' is on, words are broken halfway, which makes them hard to read. A good solution for editing this kind of paragraph is setting the 'linebreak' option. Vim then breaks lines at an appropriate place when displaying the line. The text in the file remains unchanged. Without 'linebreak' text might look like this: +---------------------------------+ |letter generation program for a b| |ank. They wanted to send out a s| |pecial, personalized letter to th| |eir richest 1000 customers. Unfo| |rtunately for the programmer, he | +---------------------------------+ After: > :set linebreak it looks like this: +---------------------------------+ |letter generation program for a | |bank. They wanted to send out a | |special, personalized letter to | |their richest 1000 customers. | |Unfortunately for the programmer,| +---------------------------------+ Related options: 'breakat' specifies the characters where a break can be inserted. 'showbreak' specifies a string to show at the start of broken line. Set 'textwidth' to zero to avoid a paragraph to be split. MOVING BY VISIBLE LINES The "j" and "k" commands move to the next and previous lines. When used on a long line, this means moving a lot of screen lines at once. To move only one screen line, use the "gj" and "gk" commands. When a line doesn't wrap they do the same as "j" and "k". When the line does wrap, they move to a character displayed one line below or above. You might like to use these mappings, which bind these movement commands to the cursor keys: > :map <Up> gk :map <Down> gj TURNING A PARAGRAPH INTO ONE LINE *edit-paragraph-join* If you want to import text into a program like MS-Word, each paragraph should be a single line. If your paragraphs are currently separated with empty lines, this is how you turn each paragraph into a single line: > :g/./,/^$/join That looks complicated. Let's break it up in pieces: :g/./ A ":global" command that finds all lines that contain at least one character. ,/^$/ A range, starting from the current line (the non-empty line) until an empty line. join The ":join" command joins the range of lines together into one line. Starting with this text, containing eight lines broken at column 30: +----------------------------------+ |A letter generation program | |for a bank. They wanted to | |send out a special, | |personalized letter. | | | |To their richest 1000 | |customers. Unfortunately for | |the programmer, | +----------------------------------+ You end up with two lines: +----------------------------------+ |A letter generation program for a | |bank. They wanted to send out a s| |pecial, personalized letter. | |To their richest 1000 customers. | |Unfortunately for the programmer, | +----------------------------------+ Note that this doesn't work when the separating line is blank but not empty; when it contains spaces and/or tabs. This command does work with blank lines: > :g/\S/,/^\s*$/join This still requires a blank or empty line at the end of the file for the last paragraph to be joined. ============================================================================== *25.5* Editing tables Suppose you are editing a table with four columns: nice table test 1 test 2 test 3 ~ input A 0.534 ~ input B 0.913 ~ You need to enter numbers in the third column. You could move to the second line, use "A", enter a lot of spaces and type the text. For this kind of editing there is a special option: > set virtualedit=all Now you can move the cursor to positions where there isn't any text. This is called "virtual space". Editing a table is a lot easier this way. Move the cursor by searching for the header of the last column: > /test 3 Now press "j" and you are right where you can enter the value for "input A". Typing "0.693" results in: nice table test 1 test 2 test 3 ~ input A 0.534 0.693 ~ input B 0.913 ~ Vim has automatically filled the gap in front of the new text for you. Now, to enter the next field in this column use "Bj". "B" moves back to the start of a white space separated word. Then "j" moves to the place where the next field can be entered. Note: You can move the cursor anywhere in the display, also beyond the end of a line. But Vim will not insert spaces there, until you insert a character in that position. COPYING A COLUMN You want to add a column, which should be a copy of the third column and placed before the "test 1" column. Do this in seven steps: 1. Move the cursor to the left upper corner of this column, e.g., with "/test 3". 2. Press CTRL-V to start blockwise Visual mode. 3. Move the cursor down two lines with "2j". You are now in "virtual space": the "input B" line of the "test 3" column. 4. Move the cursor right, to include the whole column in the selection, plus the space that you want between the columns. "9l" should do it. 5. Yank the selected rectangle with "y". 6. Move the cursor to "test 1", where the new column must be placed. 7. Press "P". The result should be: nice table test 3 test 1 test 2 test 3 ~ input A 0.693 0.534 0.693 ~ input B 0.913 ~ Notice that the whole "test 1" column was shifted right, also the line where the "test 3" column didn't have text. Go back to non-virtual cursor movements with: > :set virtualedit= VIRTUAL REPLACE MODE The disadvantage of using 'virtualedit' is that it "feels" different. You can't recognize tabs or spaces beyond the end of line when moving the cursor around. Another method can be used: Virtual Replace mode. Suppose you have a line in a table that contains both tabs and other characters. Use "rx" on the first tab: inp 0.693 0.534 0.693 ~ | rx | V inpx0.693 0.534 0.693 ~ The layout is messed up. To avoid that, use the "gr" command: inp 0.693 0.534 0.693 ~ | grx | V inpx 0.693 0.534 0.693 ~ What happens is that the "gr" command makes sure the new character takes the right amount of screen space. Extra spaces or tabs are inserted to fill the gap. Thus what actually happens is that a tab is replaced by "x" and then blanks added to make the text after it keep its place. In this case a tab is inserted. When you need to replace more than one character, you use the "R" command to go to Replace mode (see |04.9|). This messes up the layout and replaces the wrong characters: inp 0 0.534 0.693 ~ | R0.786 | V inp 0.78634 0.693 ~ The "gR" command uses Virtual Replace mode. This preserves the layout: inp 0 0.534 0.693 ~ | gR0.786 | V inp 0.786 0.534 0.693 ~ ============================================================================== Next chapter: |usr_26.txt| Repeating Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_26.txt�����������������������������������������������������������������0000664�0000000�0000000�00000017375�13204015742�0017134�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_26.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Repeating An editing task is hardly ever unstructured. A change often needs to be made several times. In this chapter a number of useful ways to repeat a change will be explained. |26.1| Repeating with Visual mode |26.2| Add and subtract |26.3| Making a change in many files |26.4| Using Vim from a shell script Next chapter: |usr_27.txt| Search commands and patterns Previous chapter: |usr_25.txt| Editing formatted text Table of contents: |usr_toc.txt| ============================================================================== *26.1* Repeating with Visual mode Visual mode is very handy for making a change in any sequence of lines. You can see the highlighted text, thus you can check if the correct lines are changed. But making the selection takes some typing. The "gv" command selects the same area again. This allows you to do another operation on the same text. Suppose you have some lines where you want to change "2001" to "2002" and "2000" to "2001": The financial results for 2001 are better ~ than for 2000. The income increased by 50%, ~ even though 2001 had more rain than 2000. ~ 2000 2001 ~ income 45,403 66,234 ~ First change "2001" to "2002". Select the lines in Visual mode, and use: > :s/2001/2002/g Now use "gv" to reselect the same text. It doesn't matter where the cursor is. Then use ":s/2000/2001/g" to make the second change. Obviously, you can repeat these changes several times. ============================================================================== *26.2* Add and subtract When repeating the change of one number into another, you often have a fixed offset. In the example above, one was added to each year. Instead of typing a substitute command for each year that appears, the CTRL-A command can be used. Using the same text as above, search for a year: > /19[0-9][0-9]\|20[0-9][0-9] Now press CTRL-A. The year will be increased by one: The financial results for 2002 are better ~ than for 2000. The income increased by 50%, ~ even though 2001 had more rain than 2000. ~ 2000 2001 ~ income 45,403 66,234 ~ Use "n" to find the next year, and press "." to repeat the CTRL-A ("." is a bit quicker to type). Repeat "n" and "." for all years that appear. Adding more than one can be done by prepending the number to CTRL-A. Suppose you have this list: 1. item four ~ 2. item five ~ 3. item six ~ Move the cursor to "1." and type: > 3 CTRL-A The "1." will change to "4.". Again, you can use "." to repeat this on the other numbers. The CTRL-X command does subtraction in a similar way. The behavior of CTRL-A and CTRL-X depends on the value of |'nrformats'|. For example, if you use: > :set nrformats+=octal pressing CTRL-A over "007" will increment to "010", because "007" will be identified as an octal number. ============================================================================== *26.3* Making a change in many files Suppose you have a variable called "x_cnt" and you want to change it to "x_counter". This variable is used in several of your C files. You need to change it in all files. This is how you do it. Put all the relevant files in the argument list: > :args *.c < This finds all C files and edits the first one. Now you can perform a substitution command on all these files: > :argdo %s/\<x_cnt\>/x_counter/ge | update The ":argdo" command takes an argument that is another command. That command will be executed on all files in the argument list. The "%s" substitute command that follows works on all lines. It finds the word "x_cnt" with "\<x_cnt\>". The "\<" and "\>" are used to match the whole word only, and not "px_cnt" or "x_cnt2". The flags for the substitute command include "g" to replace all occurrences of "x_cnt" in the same line. The "e" flag is used to avoid an error message when "x_cnt" does not appear in the file. Otherwise ":argdo" would abort on the first file where "x_cnt" was not found. The "|" separates two commands. The following "update" command writes the file only if it was changed. If no "x_cnt" was changed to "x_counter" nothing happens. There is also the ":windo" command, which executes its argument in all windows. And ":bufdo" executes its argument on all buffers. Be careful with this, because you might have more files in the buffer list than you think. Check this with the ":buffers" command (or ":ls"). ============================================================================== *26.4* Using Vim from a shell script Suppose you have a lot of files in which you need to change the string "-person-" to "Jones" and then print it. How do you do that? One way is to do a lot of typing. The other is to write a shell script to do the work. The Vim editor does a superb job as a screen-oriented editor when using Normal mode commands. For batch processing, however, Normal mode commands do not result in clear, commented command files; so here you will use Ex mode instead. This mode gives you a nice command-line interface that makes it easy to put into a batch file. ("Ex command" is just another name for a command-line (:) command.) The Ex mode commands you need are as follows: > %s/-person-/Jones/g write tempfile quit You put these commands in the file "change.vim". Now to run the editor in batch mode, use this shell script: > for file in *.txt; do vim -e -s $file < change.vim lpr -r tempfile done The for-done loop is a shell construct to repeat the two lines in between, while the $file variable is set to a different file name each time. The second line runs the Vim editor in Ex mode (-e argument) on the file $file and reads commands from the file "change.vim". The -s argument tells Vim to operate in silent mode. In other words, do not keep outputting the :prompt, or any other prompt for that matter. The "lpr -r tempfile" command prints the resulting "tempfile" and deletes it (that's what the -r argument does). READING FROM STDIN Vim can read text on standard input. Since the normal way is to read commands there, you must tell Vim to read text instead. This is done by passing the "-" argument in place of a file. Example: > ls | vim - This allows you to edit the output of the "ls" command, without first saving the text in a file. If you use the standard input to read text from, you can use the "-S" argument to read a script: > producer | vim -S change.vim - NORMAL MODE SCRIPTS If you really want to use Normal mode commands in a script, you can use it like this: > vim -s script file.txt ... < Note: "-s" has a different meaning when it is used without "-e". Here it means to source the "script" as Normal mode commands. When used with "-e" it means to be silent, and doesn't use the next argument as a file name. The commands in "script" are executed like you typed them. Don't forget that a line break is interpreted as pressing <Enter>. In Normal mode that moves the cursor to the next line. To create the script you can edit the script file and type the commands. You need to imagine what the result would be, which can be a bit difficult. Another way is to record the commands while you perform them manually. This is how you do that: > vim -w script file.txt ... All typed keys will be written to "script". If you make a small mistake you can just continue and remember to edit the script later. The "-w" argument appends to an existing script. That is good when you want to record the script bit by bit. If you want to start from scratch and start all over, use the "-W" argument. It overwrites any existing file. ============================================================================== Next chapter: |usr_27.txt| Search commands and patterns Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_27.txt�����������������������������������������������������������������0000664�0000000�0000000�00000042401�13204015742�0017121�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_27.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Search commands and patterns In chapter 3 a few simple search patterns were mentioned |03.9|. Vim can do much more complex searches. This chapter explains the most often used ones. A detailed specification can be found here: |pattern| |27.1| Ignoring case |27.2| Wrapping around the file end |27.3| Offsets |27.4| Matching multiple times |27.5| Alternatives |27.6| Character ranges |27.7| Character classes |27.8| Matching a line break |27.9| Examples Next chapter: |usr_28.txt| Folding Previous chapter: |usr_26.txt| Repeating Table of contents: |usr_toc.txt| ============================================================================== *27.1* Ignoring case By default, Vim's searches are case sensitive. Therefore, "include", "INCLUDE", and "Include" are three different words and a search will match only one of them. Now switch on the 'ignorecase' option: > :set ignorecase Search for "include" again, and now it will match "Include", "INCLUDE" and "InClUDe". (Set the 'hlsearch' option to quickly see where a pattern matches.) You can switch this off again with: > :set noignorecase But let's keep it set, and search for "INCLUDE". It will match exactly the same text as "include" did. Now set the 'smartcase' option: > :set ignorecase smartcase If you have a pattern with at least one uppercase character, the search becomes case sensitive. The idea is that you didn't have to type that uppercase character, so you must have done it because you wanted case to match. That's smart! With these two options set you find the following matches: pattern matches ~ word word, Word, WORD, WoRd, etc. Word Word WORD WORD WoRd WoRd CASE IN ONE PATTERN If you want to ignore case for one specific pattern, you can do this by prepending the "\c" string. Using "\C" will make the pattern to match case. This overrules the 'ignorecase' and 'smartcase' options, when "\c" or "\C" is used their value doesn't matter. pattern matches ~ \Cword word \CWord Word \cword word, Word, WORD, WoRd, etc. \cWord word, Word, WORD, WoRd, etc. A big advantage of using "\c" and "\C" is that it sticks with the pattern. Thus if you repeat a pattern from the search history, the same will happen, no matter if 'ignorecase' or 'smartcase' was changed. Note: The use of "\" items in search patterns depends on the 'magic' option. In this chapter we will assume 'magic' is on, because that is the standard and recommended setting. If you would change 'magic', many search patterns would suddenly become invalid. Note: If your search takes much longer than you expected, you can interrupt it with CTRL-C on Unix and CTRL-Break on Windows. ============================================================================== *27.2* Wrapping around the file end By default, a forward search starts searching for the given string at the current cursor location. It then proceeds to the end of the file. If it has not found the string by that time, it starts from the beginning and searches from the start of the file to the cursor location. Keep in mind that when repeating the "n" command to search for the next match, you eventually get back to the first match. If you don't notice this you keep searching forever! To give you a hint, Vim displays this message: search hit BOTTOM, continuing at TOP ~ If you use the "?" command, to search in the other direction, you get this message: search hit TOP, continuing at BOTTOM ~ Still, you don't know when you are back at the first match. One way to see this is by switching on the 'ruler' option: > :set ruler Vim will display the cursor position in the lower righthand corner of the window (in the status line if there is one). It looks like this: 101,29 84% ~ The first number is the line number of the cursor. Remember the line number where you started, so that you can check if you passed this position again. NOT WRAPPING To turn off search wrapping, use the following command: > :set nowrapscan Now when the search hits the end of the file, an error message displays: E385: search hit BOTTOM without match for: forever ~ Thus you can find all matches by going to the start of the file with "gg" and keep searching until you see this message. If you search in the other direction, using "?", you get: E384: search hit TOP without match for: forever ~ ============================================================================== *27.3* Offsets By default, the search command leaves the cursor positioned on the beginning of the pattern. You can tell Vim to leave it some other place by specifying an offset. For the forward search command "/", the offset is specified by appending a slash (/) and the offset: > /default/2 This command searches for the pattern "default" and then moves to the beginning of the second line past the pattern. Using this command on the paragraph above, Vim finds the word "default" in the first line. Then the cursor is moved two lines down and lands on "an offset". If the offset is a simple number, the cursor will be placed at the beginning of the line that many lines from the match. The offset number can be positive or negative. If it is positive, the cursor moves down that many lines; if negative, it moves up. CHARACTER OFFSETS The "e" offset indicates an offset from the end of the match. It moves the cursor onto the last character of the match. The command: > /const/e puts the cursor on the "t" of "const". From that position, adding a number moves forward that many characters. This command moves to the character just after the match: > /const/e+1 A positive number moves the cursor to the right, a negative number moves it to the left. For example: > /const/e-1 moves the cursor to the "s" of "const". If the offset begins with "b", the cursor moves to the beginning of the pattern. That's not very useful, since leaving out the "b" does the same thing. It does get useful when a number is added or subtracted. The cursor then goes forward or backward that many characters. For example: > /const/b+2 Moves the cursor to the beginning of the match and then two characters to the right. Thus it lands on the "n". REPEATING To repeat searching for the previously used search pattern, but with a different offset, leave out the pattern: > /that //e Is equal to: > /that/e To repeat with the same offset: > / "n" does the same thing. To repeat while removing a previously used offset: > // SEARCHING BACKWARDS The "?" command uses offsets in the same way, but you must use "?" to separate the offset from the pattern, instead of "/": > ?const?e-2 The "b" and "e" keep their meaning, they don't change direction with the use of "?". START POSITION When starting a search, it normally starts at the cursor position. When you specify a line offset, this can cause trouble. For example: > /const/-2 This finds the next word "const" and then moves two lines up. If you use "n" to search again, Vim could start at the current position and find the same "const" match. Then using the offset again, you would be back where you started. You would be stuck! It could be worse: Suppose there is another match with "const" in the next line. Then repeating the forward search would find this match and move two lines up. Thus you would actually move the cursor back! When you specify a character offset, Vim will compensate for this. Thus the search starts a few characters forward or backward, so that the same match isn't found again. ============================================================================== *27.4* Matching multiple times The "*" item specifies that the item before it can match any number of times. Thus: > /a* matches "a", "aa", "aaa", etc. But also "" (the empty string), because zero times is included. The "*" only applies to the item directly before it. Thus "ab*" matches "a", "ab", "abb", "abbb", etc. To match a whole string multiple times, it must be grouped into one item. This is done by putting "\(" before it and "\)" after it. Thus this command: > /\(ab\)* Matches: "ab", "abab", "ababab", etc. And also "". To avoid matching the empty string, use "\+". This makes the previous item match one or more times. > /ab\+ Matches "ab", "abb", "abbb", etc. It does not match "a" when no "b" follows. To match an optional item, use "\=". Example: > /folders\= Matches "folder" and "folders". SPECIFIC COUNTS To match a specific number of items use the form "\{n,m}". "n" and "m" are numbers. The item before it will be matched "n" to "m" times |inclusive|. Example: > /ab\{3,5} matches "abbb", "abbbb" and "abbbbb". When "n" is omitted, it defaults to zero. When "m" is omitted it defaults to infinity. When ",m" is omitted, it matches exactly "n" times. Examples: pattern match count ~ \{,4} 0, 1, 2, 3 or 4 \{3,} 3, 4, 5, etc. \{0,1} 0 or 1, same as \= \{0,} 0 or more, same as * \{1,} 1 or more, same as \+ \{3} 3 MATCHING AS LITTLE AS POSSIBLE The items so far match as many characters as they can find. To match as few as possible, use "\{-n,m}". It works the same as "\{n,m}", except that the minimal amount possible is used. For example, use: > /ab\{-1,3} Will match "ab" in "abbb". Actually, it will never match more than one b, because there is no reason to match more. It requires something else to force it to match more than the lower limit. The same rules apply to removing "n" and "m". It's even possible to remove both of the numbers, resulting in "\{-}". This matches the item before it zero or more times, as few as possible. The item by itself always matches zero times. It is useful when combined with something else. Example: > /a.\{-}b This matches "axb" in "axbxb". If this pattern would be used: > /a.*b It would try to match as many characters as possible with ".*", thus it matches "axbxb" as a whole. ============================================================================== *27.5* Alternatives The "or" operator in a pattern is "\|". Example: > /foo\|bar This matches "foo" or "bar". More alternatives can be concatenated: > /one\|two\|three Matches "one", "two" and "three". To match multiple times, the whole thing must be placed in "\(" and "\)": > /\(foo\|bar\)\+ This matches "foo", "foobar", "foofoo", "barfoobar", etc. Another example: > /end\(if\|while\|for\) This matches "endif", "endwhile" and "endfor". A related item is "\&". This requires that both alternatives match in the same place. The resulting match uses the last alternative. Example: > /forever\&... This matches "for" in "forever". It will not match "fortuin", for example. ============================================================================== *27.6* Character ranges To match "a", "b" or "c" you could use "/a\|b\|c". When you want to match all letters from "a" to "z" this gets very long. There is a shorter method: > /[a-z] The [] construct matches a single character. Inside you specify which characters to match. You can include a list of characters, like this: > /[0123456789abcdef] This will match any of the characters included. For consecutive characters you can specify the range. "0-3" stands for "0123". "w-z" stands for "wxyz". Thus the same command as above can be shortened to: > /[0-9a-f] To match the "-" character itself make it the first or last one in the range. These special characters are accepted to make it easier to use them inside a [] range (they can actually be used anywhere in the search pattern): \e <Esc> \t <Tab> \r <CR> \b <BS> There are a few more special cases for [] ranges, see |/[]| for the whole story. COMPLEMENTED RANGE To avoid matching a specific character, use "^" at the start of the range. The [] item then matches everything but the characters included. Example: > /"[^"]*" < " a double quote [^"] any character that is not a double quote * as many as possible " a double quote again This matches "foo" and "3!x", including the double quotes. PREDEFINED RANGES A number of ranges are used very often. Vim provides a shortcut for these. For example: > /\a Finds alphabetic characters. This is equal to using "/[a-zA-Z]". Here are a few more of these: item matches equivalent ~ \d digit [0-9] \D non-digit [^0-9] \x hex digit [0-9a-fA-F] \X non-hex digit [^0-9a-fA-F] \s white space [ ] (<Tab> and <Space>) \S non-white characters [^ ] (not <Tab> and <Space>) \l lowercase alpha [a-z] \L non-lowercase alpha [^a-z] \u uppercase alpha [A-Z] \U non-uppercase alpha [^A-Z] Note: Using these predefined ranges works a lot faster than the character range it stands for. These items can not be used inside []. Thus "[\d\l]" does NOT work to match a digit or lowercase alpha. Use "\(\d\|\l\)" instead. See |/\s| for the whole list of these ranges. ============================================================================== *27.7* Character classes The character range matches a fixed set of characters. A character class is similar, but with an essential difference: The set of characters can be redefined without changing the search pattern. For example, search for this pattern: > /\f\+ The "\f" items stands for file name characters. Thus this matches a sequence of characters that can be a file name. Which characters can be part of a file name depends on the system you are using. On MS-Windows, the backslash is included, on Unix it is not. This is specified with the 'isfname' option. The default value for Unix is: > :set isfname isfname=@,48-57,/,.,-,_,+,,,#,$,%,~,= For other systems the default value is different. Thus you can make a search pattern with "\f" to match a file name, and it will automatically adjust to the system you are using it on. Note: Actually, Unix allows using just about any character in a file name, including white space. Including these characters in 'isfname' would be theoretically correct. But it would make it impossible to find the end of a file name in text. Thus the default value of 'isfname' is a compromise. The character classes are: item matches option ~ \i identifier characters 'isident' \I like \i, excluding digits \k keyword characters 'iskeyword' \K like \k, excluding digits \p printable characters 'isprint' \P like \p, excluding digits \f file name characters 'isfname' \F like \f, excluding digits ============================================================================== *27.8* Matching a line break Vim can find a pattern that includes a line break. You need to specify where the line break happens, because all items mentioned so far don't match a line break. To check for a line break in a specific place, use the "\n" item: > /the\nword This will match at a line that ends in "the" and the next line starts with "word". To match "the word" as well, you need to match a space or a line break. The item to use for it is "\_s": > /the\_sword To allow any amount of white space: > /the\_s\+word This also matches when "the " is at the end of a line and " word" at the start of the next one. "\s" matches white space, "\_s" matches white space or a line break. Similarly, "\a" matches an alphabetic character, and "\_a" matches an alphabetic character or a line break. The other character classes and ranges can be modified in the same way by inserting a "_". Many other items can be made to match a line break by prepending "\_". For example: "\_." matches any character or a line break. Note: "\_.*" matches everything until the end of the file. Be careful with this, it can make a search command very slow. Another example is "\_[]", a character range that includes a line break: > /"\_[^"]*" This finds a text in double quotes that may be split up in several lines. ============================================================================== *27.9* Examples Here are a few search patterns you might find useful. This shows how the items mentioned above can be combined. FINDING A CALIFORNIA LICENSE PLATE A sample license plate number is "1MGU103". It has one digit, three uppercase letters and three digits. Directly putting this into a search pattern: > /\d\u\u\u\d\d\d Another way is to specify that there are three digits and letters with a count: > /\d\u\{3}\d\{3} Using [] ranges instead: > /[0-9][A-Z]\{3}[0-9]\{3} Which one of these you should use? Whichever one you can remember. The simple way you can remember is much faster than the fancy way that you can't. If you can remember them all, then avoid the last one, because it's both more typing and slower to execute. FINDING AN IDENTIFIER In C programs (and many other computer languages) an identifier starts with a letter and further consists of letters and digits. Underscores can be used too. This can be found with: > /\<\h\w*\> "\<" and "\>" are used to find only whole words. "\h" stands for "[A-Za-z_]" and "\w" for "[0-9A-Za-z_]". Note: "\<" and "\>" depend on the 'iskeyword' option. If it includes "-", for example, then "ident-" is not matched. In this situation use: > /\w\@<!\h\w*\w\@! < This checks if "\w" does not match before or after the identifier. See |/\@<!| and |/\@!|. ============================================================================== Next chapter: |usr_28.txt| Folding Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_28.txt�����������������������������������������������������������������0000664�0000000�0000000�00000037137�13204015742�0017134�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_28.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Folding Structured text can be separated in sections. And sections in sub-sections. Folding allows you to display a section as one line, providing an overview. This chapter explains the different ways this can be done. |28.1| What is folding? |28.2| Manual folding |28.3| Working with folds |28.4| Saving and restoring folds |28.5| Folding by indent |28.6| Folding with markers |28.7| Folding by syntax |28.8| Folding by expression |28.9| Folding unchanged lines |28.10| Which fold method to use? Next chapter: |usr_29.txt| Moving through programs Previous chapter: |usr_27.txt| Search commands and patterns Table of contents: |usr_toc.txt| ============================================================================== *28.1* What is folding? Folding is used to show a range of lines in the buffer as a single line on the screen. Like a piece of paper which is folded to make it shorter: +------------------------+ | line 1 | | line 2 | | line 3 | |_______________________ | \ \ \________________________\ / folded lines / /________________________/ | line 12 | | line 13 | | line 14 | +------------------------+ The text is still in the buffer, unchanged. Only the way lines are displayed is affected by folding. The advantage of folding is that you can get a better overview of the structure of text, by folding lines of a section and replacing it with a line that indicates that there is a section. ============================================================================== *28.2* Manual folding Try it out: Position the cursor in a paragraph and type: > zfap You will see that the paragraph is replaced by a highlighted line. You have created a fold. |zf| is an operator and |ap| a text object selection. You can use the |zf| operator with any movement command to create a fold for the text that it moved over. |zf| also works in Visual mode. To view the text again, open the fold by typing: > zo And you can close the fold again with: > zc All the folding commands start with "z". With some fantasy, this looks like a folded piece of paper, seen from the side. The letter after the "z" has a mnemonic meaning to make it easier to remember the commands: zf F-old creation zo O-pen a fold zc C-lose a fold Folds can be nested: A region of text that contains folds can be folded again. For example, you can fold each paragraph in this section, and then fold all the sections in this chapter. Try it out. You will notice that opening the fold for the whole chapter will restore the nested folds as they were, some may be open and some may be closed. Suppose you have created several folds, and now want to view all the text. You could go to each fold and type "zo". To do this faster, use this command: > zr This will R-educe the folding. The opposite is: > zm This folds M-ore. You can repeat "zr" and "zm" to open and close nested folds of several levels. If you have nested several levels deep, you can open all of them with: > zR This R-educes folds until there are none left. And you can close all folds with: > zM This folds M-ore and M-ore. You can quickly disable the folding with the |zn| command. Then |zN| brings back the folding as it was. |zi| toggles between the two. This is a useful way of working: - create folds to get overview on your file - move around to where you want to do your work - do |zi| to look at the text and edit it - do |zi| again to go back to moving around More about manual folding in the reference manual: |fold-manual| ============================================================================== *28.3* Working with folds When some folds are closed, movement commands like "j" and "k" move over a fold like it was a single, empty line. This allows you to quickly move around over folded text. You can yank, delete and put folds as if it was a single line. This is very useful if you want to reorder functions in a program. First make sure that each fold contains a whole function (or a bit less) by selecting the right 'foldmethod'. Then delete the function with "dd", move the cursor and put it with "p". If some lines of the function are above or below the fold, you can use Visual selection: - put the cursor on the first line to be moved - hit "V" to start Visual mode - put the cursor on the last line to be moved - hit "d" to delete the selected lines. - move the cursor to the new position and "p"ut the lines there. It is sometimes difficult to see or remember where a fold is located, thus where a |zo| command would actually work. To see the defined folds: > :set foldcolumn=4 This will show a small column on the left of the window to indicate folds. A "+" is shown for a closed fold. A "-" is shown at the start of each open fold and "|" at following lines of the fold. You can use the mouse to open a fold by clicking on the "+" in the foldcolumn. Clicking on the "-" or a "|" below it will close an open fold. To open all folds at the cursor line use |zO|. To close all folds at the cursor line use |zC|. To delete a fold at the cursor line use |zd|. To delete all folds at the cursor line use |zD|. When in Insert mode, the fold at the cursor line is never closed. That allows you to see what you type! Folds are opened automatically when jumping around or moving the cursor left or right. For example, the "0" command opens the fold under the cursor (if 'foldopen' contains "hor", which is the default). The 'foldopen' option can be changed to open folds for specific commands. If you want the line under the cursor always to be open, do this: > :set foldopen=all Warning: You won't be able to move onto a closed fold then. You might want to use this only temporarily and then set it back to the default: > :set foldopen& You can make folds close automatically when you move out of it: > :set foldclose=all This will re-apply 'foldlevel' to all folds that don't contain the cursor. You have to try it out if you like how this feels. Use |zm| to fold more and |zr| to fold less (reduce folds). The folding is local to the window. This allows you to open two windows on the same buffer, one with folds and one without folds. Or one with all folds closed and one with all folds open. ============================================================================== *28.4* Saving and restoring folds When you abandon a file (starting to edit another one), the state of the folds is lost. If you come back to the same file later, all manually opened and closed folds are back to their default. When folds have been created manually, all folds are gone! To save the folds use the |:mkview| command: > :mkview This will store the settings and other things that influence the view on the file. You can change what is stored with the 'viewoptions' option. When you come back to the same file later, you can load the view again: > :loadview You can store up to ten views on one file. For example, to save the current setup as the third view and load the second view: > :mkview 3 :loadview 2 Note that when you insert or delete lines the views might become invalid. Also check out the 'viewdir' option, which specifies where the views are stored. You might want to delete old views now and then. ============================================================================== *28.5* Folding by indent Defining folds with |zf| is a lot of work. If your text is structured by giving lower level items a larger indent, you can use the indent folding method. This will create folds for every sequence of lines with the same indent. Lines with a larger indent will become nested folds. This works well with many programming languages. Try this by setting the 'foldmethod' option: > :set foldmethod=indent Then you can use the |zm| and |zr| commands to fold more and reduce folding. It's easy to see on this example text: This line is not indented This line is indented once This line is indented twice This line is indented twice This line is indented once This line is not indented This line is indented once This line is indented once Note that the relation between the amount of indent and the fold depth depends on the 'shiftwidth' option. Each 'shiftwidth' worth of indent adds one to the depth of the fold. This is called a fold level. When you use the |zr| and |zm| commands you actually increase or decrease the 'foldlevel' option. You could also set it directly: > :set foldlevel=3 This means that all folds with three times a 'shiftwidth' indent or more will be closed. The lower the foldlevel, the more folds will be closed. When 'foldlevel' is zero, all folds are closed. |zM| does set 'foldlevel' to zero. The opposite command |zR| sets 'foldlevel' to the deepest fold level that is present in the file. Thus there are two ways to open and close the folds: (A) By setting the fold level. This gives a very quick way of "zooming out" to view the structure of the text, move the cursor, and "zoom in" on the text again. (B) By using |zo| and |zc| commands to open or close specific folds. This allows opening only those folds that you want to be open, while other folds remain closed. This can be combined: You can first close most folds by using |zm| a few times and then open a specific fold with |zo|. Or open all folds with |zR| and then close specific folds with |zc|. But you cannot manually define folds when 'foldmethod' is "indent", as that would conflict with the relation between the indent and the fold level. More about folding by indent in the reference manual: |fold-indent| ============================================================================== *28.6* Folding with markers Markers in the text are used to specify the start and end of a fold region. This gives precise control over which lines are included in a fold. The disadvantage is that the text needs to be modified. Try it: > :set foldmethod=marker Example text, as it could appear in a C program: /* foobar () {{{ */ int foobar() { /* return a value {{{ */ return 42; /* }}} */ } /* }}} */ Notice that the folded line will display the text before the marker. This is very useful to tell what the fold contains. It's quite annoying when the markers don't pair up correctly after moving some lines around. This can be avoided by using numbered markers. Example: /* global variables {{{1 */ int varA, varB; /* functions {{{1 */ /* funcA() {{{2 */ void funcA() {} /* funcB() {{{2 */ void funcB() {} /* }}}1 */ At every numbered marker a fold at the specified level begins. This will make any fold at a higher level stop here. You can just use numbered start markers to define all folds. Only when you want to explicitly stop a fold before another starts you need to add an end marker. More about folding with markers in the reference manual: |fold-marker| ============================================================================== *28.7* Folding by syntax For each language Vim uses a different syntax file. This defines the colors for various items in the file. If you are reading this in Vim, in a terminal that supports colors, the colors you see are made with the "help" syntax file. In the syntax files it is possible to add syntax items that have the "fold" argument. These define a fold region. This requires writing a syntax file and adding these items in it. That's not so easy to do. But once it's done, all folding happens automatically. Here we'll assume you are using an existing syntax file. Then there is nothing more to explain. You can open and close folds as explained above. The folds will be created and deleted automatically when you edit the file. More about folding by syntax in the reference manual: |fold-syntax| ============================================================================== *28.8* Folding by expression This is similar to folding by indent, but instead of using the indent of a line a user function is called to compute the fold level of a line. You can use this for text where something in the text indicates which lines belong together. An example is an e-mail message where the quoted text is indicated by a ">" before the line. To fold these quotes use this: > :set foldmethod=expr :set foldexpr=strlen(substitute(substitute(getline(v:lnum),'\\s','',\"g\"),'[^>].*','','')) You can try it out on this text: > quoted text he wrote > quoted text he wrote > > double quoted text I wrote > > double quoted text I wrote Explanation for the 'foldexpr' used in the example (inside out): getline(v:lnum) gets the current line substitute(...,'\\s','','g') removes all white space from the line substitute(...,'[^>].*','','') removes everything after leading '>'s strlen(...) counts the length of the string, which is the number of '>'s found Note that a backslash must be inserted before every space, double quote and backslash for the ":set" command. If this confuses you, do > :set foldexpr to check the actual resulting value. To correct a complicated expression, use the command-line completion: > :set foldexpr=<Tab> Where <Tab> is a real Tab. Vim will fill in the previous value, which you can then edit. When the expression gets more complicated you should put it in a function and set 'foldexpr' to call that function. More about folding by expression in the reference manual: |fold-expr| ============================================================================== *28.9* Folding unchanged lines This is useful when you set the 'diff' option in the same window. The |-d| option does this for you. Example: > :setlocal diff foldmethod=diff scrollbind nowrap foldlevel=1 Do this in every window that shows a different version of the same file. You will clearly see the differences between the files, while the text that didn't change is folded. For more details see |fold-diff|. ============================================================================== *28.10* Which fold method to use? All these possibilities make you wonder which method you should choose. Unfortunately, there is no golden rule. Here are some hints. If there is a syntax file with folding for the language you are editing, that is probably the best choice. If there isn't one, you might try to write it. This requires a good knowledge of search patterns. It's not easy, but when it's working you will not have to define folds manually. Typing commands to manually fold regions can be used for unstructured text. Then use the |:mkview| command to save and restore your folds. The marker method requires you to change the file. If you are sharing the files with other people or you have to meet company standards, you might not be allowed to add them. The main advantage of markers is that you can put them exactly where you want them. That avoids that a few lines are missed when you cut and paste folds. And you can add a comment about what is contained in the fold. Folding by indent is something that works in many files, but not always very well. Use it when you can't use one of the other methods. However, it is very useful for outlining. Then you specifically use one 'shiftwidth' for each nesting level. Folding with expressions can make folds in almost any structured text. It is quite simple to specify, especially if the start and end of a fold can easily be recognized. If you use the "expr" method to define folds, but they are not exactly how you want them, you could switch to the "manual" method. This will not remove the defined folds. Then you can delete or add folds manually. ============================================================================== Next chapter: |usr_29.txt| Moving through programs Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_29.txt�����������������������������������������������������������������0000664�0000000�0000000�00000047155�13204015742�0017136�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_29.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Moving through programs The creator of Vim is a computer programmer. It's no surprise that Vim contains many features to aid in writing programs. Jump around to find where identifiers are defined and used. Preview declarations in a separate window. There is more in the next chapter. |29.1| Using tags |29.2| The preview window |29.3| Moving through a program |29.4| Finding global identifiers |29.5| Finding local identifiers Next chapter: |usr_30.txt| Editing programs Previous chapter: |usr_28.txt| Folding Table of contents: |usr_toc.txt| ============================================================================== *29.1* Using tags What is a tag? It is a location where an identifier is defined. An example is a function definition in a C or C++ program. A list of tags is kept in a tags file. This can be used by Vim to directly jump from any place to the tag, the place where an identifier is defined. To generate the tags file for all C files in the current directory, use the following command: > ctags *.c "ctags" is a separate program. Most Unix systems already have it installed. If you do not have it yet, you can find Exuberant ctags here: http://ctags.sf.net ~ Now when you are in Vim and you want to go to a function definition, you can jump to it by using the following command: > :tag startlist This command will find the function "startlist" even if it is in another file. The CTRL-] command jumps to the tag of the word that is under the cursor. This makes it easy to explore a tangle of C code. Suppose, for example, that you are in the function "write_block". You can see that it calls "write_line". But what does "write_line" do? By placing the cursor on the call to "write_line" and pressing CTRL-], you jump to the definition of this function. The "write_line" function calls "write_char". You need to figure out what it does. So you position the cursor over the call to "write_char" and press CTRL-]. Now you are at the definition of "write_char". +-------------------------------------+ |void write_block(char **s; int cnt) | |{ | | int i; | | for (i = 0; i < cnt; ++i) | | write_line(s[i]); | |} | | +-----------|-------------------------+ | CTRL-] | | +----------------------------+ +--> |void write_line(char *s) | |{ | | while (*s != 0) | | write_char(*s++); | |} | | +--------|-------------------+ | CTRL-] | | +------------------------------------+ +--> |void write_char(char c) | |{ | | putchar((int)(unsigned char)c); | |} | +------------------------------------+ The ":tags" command shows the list of tags that you traversed through: :tags # TO tag FROM line in file/text ~ 1 1 write_line 8 write_block.c ~ 2 1 write_char 7 write_line.c ~ > ~ > Now to go back. The CTRL-T command goes to the preceding tag. In the example above you get back to the "write_line" function, in the call to "write_char". This command takes a count argument that indicates how many tags to jump back. You have gone forward, and now back. Let's go forward again. The following command goes to the tag on top of the list: > :tag You can prefix it with a count and jump forward that many tags. For example: ":3tag". CTRL-T also can be preceded with a count. These commands thus allow you to go down a call tree with CTRL-] and back up again with CTRL-T. Use ":tags" to find out where you are. SPLIT WINDOWS The ":tag" command replaces the file in the current window with the one containing the new function. But suppose you want to see not only the old function but also the new one? You can split the window using the ":split" command followed by the ":tag" command. Vim has a shorthand command that does both: > :stag tagname To split the current window and jump to the tag under the cursor use this command: > CTRL-W ] If a count is specified, the new window will be that many lines high. MORE TAGS FILES When you have files in many directories, you can create a tags file in each of them. Vim will then only be able to jump to tags within that directory. To find more tags files, set the 'tags' option to include all the relevant tags files. Example: > :set tags=./tags,./../tags,./*/tags This finds a tags file in the same directory as the current file, one directory level higher and in all subdirectories. This is quite a number of tags files, but it may still not be enough. For example, when editing a file in "~/proj/src", you will not find the tags file "~/proj/sub/tags". For this situation Vim offers to search a whole directory tree for tags files. Example: > :set tags=~/proj/**/tags ONE TAGS FILE When Vim has to search many places for tags files, you can hear the disk rattling. It may get a bit slow. In that case it's better to spend this time while generating one big tags file. You might do this overnight. This requires the Exuberant ctags program, mentioned above. It offers an argument to search a whole directory tree: > cd ~/proj ctags -R . The nice thing about this is that Exuberant ctags recognizes various file types. Thus this doesn't work just for C and C++ programs, also for Eiffel and even Vim scripts. See the ctags documentation to tune this. Now you only need to tell Vim where your big tags file is: > :set tags=~/proj/tags MULTIPLE MATCHES When a function is defined multiple times (or a method in several classes), the ":tag" command will jump to the first one. If there is a match in the current file, that one is used first. You can now jump to other matches for the same tag with: > :tnext Repeat this to find further matches. If there are many, you can select which one to jump to: > :tselect tagname Vim will present you with a list of choices: # pri kind tag file ~ 1 F f mch_init os_amiga.c ~ mch_init() ~ 2 F f mch_init os_mac.c ~ mch_init() ~ 3 F f mch_init os_msdos.c ~ mch_init(void) ~ 4 F f mch_init os_riscos.c ~ mch_init() ~ Enter nr of choice (<CR> to abort): ~ You can now enter the number (in the first column) of the match that you would like to jump to. The information in the other columns give you a good idea of where the match is defined. To move between the matching tags, these commands can be used: :tfirst go to first match :[count]tprevious go to [count] previous match :[count]tnext go to [count] next match :tlast go to last match If [count] is omitted then one is used. GUESSING TAG NAMES Command line completion is a good way to avoid typing a long tag name. Just type the first bit and press <Tab>: > :tag write_<Tab> You will get the first match. If it's not the one you want, press <Tab> until you find the right one. Sometimes you only know part of the name of a function. Or you have many tags that start with the same string, but end differently. Then you can tell Vim to use a pattern to find the tag. Suppose you want to jump to a tag that contains "block". First type this: > :tag /block Now use command line completion: press <Tab>. Vim will find all tags that contain "block" and use the first match. The "/" before a tag name tells Vim that what follows is not a literal tag name, but a pattern. You can use all the items for search patterns here. For example, suppose you want to select a tag that starts with "write_": > :tselect /^write_ The "^" specifies that the tag starts with "write_". Otherwise it would also be found halfway in a tag name. Similarly "$" at the end makes sure the pattern matches until the end of a tag. A TAGS BROWSER Since CTRL-] takes you to the definition of the identifier under the cursor, you can use a list of identifier names as a table of contents. Here is an example. First create a list of identifiers (this requires Exuberant ctags): > ctags --c-types=f -f functions *.c Now start Vim without a file, and edit this file in Vim, in a vertically split window: > vim :vsplit functions The window contains a list of all the functions. There is some more stuff, but you can ignore that. Do ":setlocal ts=99" to clean it up a bit. In this window, define a mapping: > :nnoremap <buffer> <CR> 0ye<C-W>w:tag <C-R>"<CR> Move the cursor to the line that contains the function you want to go to. Now press <Enter>. Vim will go to the other window and jump to the selected function. RELATED ITEMS To make case in tag names be ignored, you can set 'ignorecase' while leaving 'tagcase' as "followic", or set 'tagcase' to "ignore". The 'tagbsearch' option tells if the tags file is sorted or not. The default is to assume a sorted tags file, which makes a tags search a lot faster, but doesn't work if the tags file isn't sorted. The 'taglength' option can be used to tell Vim the number of significant characters in a tag. Cscope is a free program. It does not only find places where an identifier is declared, but also where it is used. See |cscope|. ============================================================================== *29.2* The preview window When you edit code that contains a function call, you need to use the correct arguments. To know what values to pass you can look at how the function is defined. The tags mechanism works very well for this. Preferably the definition is displayed in another window. For this the preview window can be used. To open a preview window to display the function "write_char": > :ptag write_char Vim will open a window, and jumps to the tag "write_char". Then it takes you back to the original position. Thus you can continue typing without the need to use a CTRL-W command. If the name of a function appears in the text, you can get its definition in the preview window with: > CTRL-W } There is a script that automatically displays the text where the word under the cursor was defined. See |CursorHold-example|. To close the preview window use this command: > :pclose To edit a specific file in the preview window, use ":pedit". This can be useful to edit a header file, for example: > :pedit defs.h Finally, ":psearch" can be used to find a word in the current file and any included files and display the match in the preview window. This is especially useful when using library functions, for which you do not have a tags file. Example: > :psearch popen This will show the "stdio.h" file in the preview window, with the function prototype for popen(): FILE *popen __P((const char *, const char *)); ~ You can specify the height of the preview window, when it is opened, with the 'previewheight' option. ============================================================================== *29.3* Moving through a program Since a program is structured, Vim can recognize items in it. Specific commands can be used to move around. C programs often contain constructs like this: #ifdef USE_POPEN ~ fd = popen("ls", "r") ~ #else ~ fd = fopen("tmp", "w") ~ #endif ~ But then much longer, and possibly nested. Position the cursor on the "#ifdef" and press %. Vim will jump to the "#else". Pressing % again takes you to the "#endif". Another % takes you to the "#ifdef" again. When the construct is nested, Vim will find the matching items. This is a good way to check if you didn't forget an "#endif". When you are somewhere inside a "#if" - "#endif", you can jump to the start of it with: > [# If you are not after a "#if" or "#ifdef" Vim will beep. To jump forward to the next "#else" or "#endif" use: > ]# These two commands skip any "#if" - "#endif" blocks that they encounter. Example: #if defined(HAS_INC_H) ~ a = a + inc(); ~ # ifdef USE_THEME ~ a += 3; ~ # endif ~ set_width(a); ~ With the cursor in the last line, "[#" moves to the first line. The "#ifdef" - "#endif" block in the middle is skipped. MOVING IN CODE BLOCKS In C code blocks are enclosed in {}. These can get pretty long. To move to the start of the outer block use the "[[" command. Use "][" to find the end. This assumes that the "{" and "}" are in the first column. The "[{" command moves to the start of the current block. It skips over pairs of {} at the same level. "]}" jumps to the end. An overview: function(int a) +-> { | if (a) | +-> { [[ | | for (;;) --+ | | +-> { | | [{ | | foo(32); | --+ | | [{ | if (bar(a)) --+ | ]} | +-- | +-- break; | ]} | | | } <-+ | | ][ +-- foobar(a) | | } <-+ | } <-+ When writing C++ or Java, the outer {} block is for the class. The next level of {} is for a method. When somewhere inside a class use "[m" to find the previous start of a method. "]m" finds the next start of a method. Additionally, "[]" moves backward to the end of a function and "]]" moves forward to the start of the next function. The end of a function is defined by a "}" in the first column. int func1(void) { return 1; +----------> } | [] | int func2(void) | +-> { | [[ | if (flag) start +-- +-- return flag; | ][ | return 2; | +-> } ]] | | int func3(void) +----------> { return 3; } Don't forget you can also use "%" to move between matching (), {} and []. That also works when they are many lines apart. MOVING IN BRACES The "[(" and "])" commands work similar to "[{" and "]}", except that they work on () pairs instead of {} pairs. > [( < <-------------------------------- <------- if (a == b && (c == d || (e > f)) && x > y) ~ --------------> --------------------------------> > ]) MOVING IN COMMENTS To move back to the start of a comment use "[/". Move forward to the end of a comment with "]/". This only works for /* - */ comments. +-> +-> /* | [/ | * A comment about --+ [/ | +-- * wonderful life. | ]/ | */ <-+ | +-- foo = bar * 3; --+ | ]/ /* a short comment */ <-+ ============================================================================== *29.4* Finding global identifiers You are editing a C program and wonder if a variable is declared as "int" or "unsigned". A quick way to find this is with the "[I" command. Suppose the cursor is on the word "column". Type: > [I Vim will list the matching lines it can find. Not only in the current file, but also in all included files (and files included in them, etc.). The result looks like this: structs.h ~ 1: 29 unsigned column; /* column number */ ~ The advantage over using tags or the preview window is that included files are searched. In most cases this results in the right declaration to be found. Also when the tags file is out of date. Also when you don't have tags for the included files. However, a few things must be right for "[I" to do its work. First of all, the 'include' option must specify how a file is included. The default value works for C and C++. For other languages you will have to change it. LOCATING INCLUDED FILES Vim will find included files in the places specified with the 'path' option. If a directory is missing, some include files will not be found. You can discover this with this command: > :checkpath It will list the include files that could not be found. Also files included by the files that could be found. An example of the output: --- Included files not found in path --- ~ <io.h> ~ vim.h --> ~ <functions.h> ~ <clib/exec_protos.h> ~ The "io.h" file is included by the current file and can't be found. "vim.h" can be found, thus ":checkpath" goes into this file and checks what it includes. The "functions.h" and "clib/exec_protos.h" files, included by "vim.h" are not found. Note: Vim is not a compiler. It does not recognize "#ifdef" statements. This means every "#include" statement is used, also when it comes after "#if NEVER". To fix the files that could not be found, add a directory to the 'path' option. A good place to find out about this is the Makefile. Look out for lines that contain "-I" items, like "-I/usr/local/X11". To add this directory use: > :set path+=/usr/local/X11 When there are many subdirectories, you can use the "*" wildcard. Example: > :set path+=/usr/*/include This would find files in "/usr/local/include" as well as "/usr/X11/include". When working on a project with a whole nested tree of included files, the "**" items is useful. This will search down in all subdirectories. Example: > :set path+=/projects/invent/**/include This will find files in the directories: /projects/invent/include ~ /projects/invent/main/include ~ /projects/invent/main/os/include ~ etc. There are even more possibilities. Check out the 'path' option for info. If you want to see which included files are actually found, use this command: > :checkpath! You will get a (very long) list of included files, the files they include, and so on. To shorten the list a bit, Vim shows "(Already listed)" for files that were found before and doesn't list the included files in there again. JUMPING TO A MATCH "[I" produces a list with only one line of text. When you want to have a closer look at the first item, you can jump to that line with the command: > [<Tab> You can also use "[ CTRL-I", since CTRL-I is the same as pressing <Tab>. The list that "[I" produces has a number at the start of each line. When you want to jump to another item than the first one, type the number first: > 3[<Tab> Will jump to the third item in the list. Remember that you can use CTRL-O to jump back to where you started from. RELATED COMMANDS [i only lists the first match ]I only lists items below the cursor ]i only lists the first item below the cursor FINDING DEFINED IDENTIFIERS The "[I" command finds any identifier. To find only macros, defined with "#define" use: > [D Again, this searches in included files. The 'define' option specifies what a line looks like that defines the items for "[D". You could change it to make it work with other languages than C or C++. The commands related to "[D" are: [d only lists the first match ]D only lists items below the cursor ]d only lists the first item below the cursor ============================================================================== *29.5* Finding local identifiers The "[I" command searches included files. To search in the current file only, and jump to the first place where the word under the cursor is used: > gD Hint: Goto Definition. This command is very useful to find a variable or function that was declared locally ("static", in C terms). Example (cursor on "counter"): +-> static int counter = 0; | | int get_counter(void) gD | { | ++counter; +-- return counter; } To restrict the search even further, and look only in the current function, use this command: > gd This will go back to the start of the current function and find the first occurrence of the word under the cursor. Actually, it searches backwards to an empty line above a "{" in the first column. From there it searches forward for the identifier. Example (cursor on "idx"): int find_entry(char *name) { +-> int idx; | gd | for (idx = 0; idx < table_len; ++idx) | if (strcmp(table[idx].name, name) == 0) +-- return idx; } ============================================================================== Next chapter: |usr_30.txt| Editing programs Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_30.txt�����������������������������������������������������������������0000664�0000000�0000000�00000054166�13204015742�0017126�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_30.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Editing programs Vim has various commands that aid in writing computer programs. Compile a program and directly jump to reported errors. Automatically set the indent for many languages and format comments. |30.1| Compiling |30.2| Indenting C files |30.3| Automatic indenting |30.4| Other indenting |30.5| Tabs and spaces |30.6| Formatting comments Next chapter: |usr_31.txt| Exploiting the GUI Previous chapter: |usr_29.txt| Moving through programs Table of contents: |usr_toc.txt| ============================================================================== *30.1* Compiling Vim has a set of so called "quickfix" commands. They enable you to compile a program from within Vim and then go through the errors generated and fix them (hopefully). You can then recompile and fix any new errors that are found until finally your program compiles without any error. The following command runs the program "make" (supplying it with any argument you give) and captures the results: > :make {arguments} If errors were generated, they are captured and the editor positions you where the first error occurred. Take a look at an example ":make" session. (Typical :make sessions generate far more errors and fewer stupid ones.) After typing ":make" the screen looks like this: :!make | &tee /tmp/vim215953.err ~ gcc -g -Wall -o prog main.c sub.c ~ main.c: In function 'main': ~ main.c:6: too many arguments to function 'do_sub' ~ main.c: At top level: ~ main.c:10: parse error before '}' ~ make: *** [prog] Error 1 ~ 2 returned ~ "main.c" 11L, 111C ~ (3 of 6): too many arguments to function 'do_sub' ~ Press ENTER or type command to continue ~ From this you can see that you have errors in the file "main.c". When you press <Enter>, Vim displays the file "main.c", with the cursor positioned on line 6, the first line with an error. You did not need to specify the file or the line number, Vim knew where to go by looking in the error messages. +---------------------------------------------------+ |int main() | |{ | | int i=3; | cursor -> | do_sub("foo"); | | ++i; | | return (0); | |} | |} | | ~ | |(3 of 12): too many arguments to function 'do_sub' | +---------------------------------------------------+ The following command goes to where the next error occurs: > :cnext Vim jumps to line 10, the last line in the file, where there is an extra '}'. When there is not enough room, Vim will shorten the error message. To see the whole message use: > :cc You can get an overview of all the error messages with the ":clist" command. The output looks like this: > :clist < 3 main.c: 6:too many arguments to function 'do_sub' ~ 5 main.c: 10:parse error before '}' ~ Only the lines where Vim recognized a file name and line number are listed here. It assumes those are the interesting lines and the rest is just boring messages. However, sometimes unrecognized lines do contain something you want to see. Output from the linker, for example, about an undefined function. To see all the messages add a "!" to the command: > :clist! < 1 gcc -g -Wall -o prog main.c sub.c ~ 2 main.c: In function 'main': ~ 3 main.c:6: too many arguments to function 'do_sub' ~ 4 main.c: At top level: ~ 5 main.c:10: parse error before '}' ~ 6 make: *** [prog] Error 1 ~ Vim will highlight the current error. To go back to the previous error, use: > :cprevious Other commands to move around in the error list: :cfirst to first error :clast to last error :cc 3 to error nr 3 USING ANOTHER COMPILER The name of the program to run when the ":make" command is executed is defined by the 'makeprg' option. Usually this is set to "make", but Visual C++ users should set this to "nmake" by executing the following command: > :set makeprg=nmake You can also include arguments in this option. Special characters need to be escaped with a backslash. Example: > :set makeprg=nmake\ -f\ project.mak You can include special Vim keywords in the command specification. The % character expands to the name of the current file. So if you execute the command: > :set makeprg=make\ %:S When you are editing main.c, then ":make" executes the following command: > make main.c This is not too useful, so you will refine the command a little and use the :r (root) modifier: > :set makeprg=make\ %:r:S.o Now the command executed is as follows: > make main.o More about these modifiers here: |filename-modifiers|. OLD ERROR LISTS Suppose you ":make" a program. There is a warning message in one file and an error message in another. You fix the error and use ":make" again to check if it was really fixed. Now you want to look at the warning message. It doesn't show up in the last error list, since the file with the warning wasn't compiled again. You can go back to the previous error list with: > :colder Then use ":clist" and ":cc {nr}" to jump to the place with the warning. To go forward to the next error list: > :cnewer Vim remembers ten error lists. SWITCHING COMPILERS You have to tell Vim what format the error messages are that your compiler produces. This is done with the 'errorformat' option. The syntax of this option is quite complicated and it can be made to fit almost any compiler. You can find the explanation here: |errorformat|. You might be using various different compilers. Setting the 'makeprg' option, and especially the 'errorformat' each time is not easy. Vim offers a simple method for this. For example, to switch to using the Microsoft Visual C++ compiler: > :compiler msvc This will find the Vim script for the "msvc" compiler and set the appropriate options. You can write your own compiler files. See |write-compiler-plugin|. OUTPUT REDIRECTION The ":make" command redirects the output of the executed program to an error file. How this works depends on various things, such as the 'shell'. If your ":make" command doesn't capture the output, check the 'makeef' and 'shellpipe' options. The 'shellquote' and 'shellxquote' options might also matter. In case you can't get ":make" to redirect the file for you, an alternative is to compile the program in another window and redirect the output into a file. Then have Vim read this file with: > :cfile {filename} Jumping to errors will work like with the ":make" command. ============================================================================== *30.2* Indenting C style text A program is much easier to understand when the lines have been properly indented. Vim offers various ways to make this less work. For C or C style programs like Java or C++, set the 'cindent' option. Vim knows a lot about C programs and will try very hard to automatically set the indent for you. Set the 'shiftwidth' option to the amount of spaces you want for a deeper level. Four spaces will work fine. One ":set" command will do it: > :set cindent shiftwidth=4 With this option enabled, when you type something such as "if (x)", the next line will automatically be indented an additional level. if (flag) Automatic indent ---> do_the_work(); Automatic unindent <-- if (other_flag) { Automatic indent ---> do_file(); keep indent do_some_more(); Automatic unindent <-- } When you type something in curly braces ({}), the text will be indented at the start and unindented at the end. The unindenting will happen after typing the '}', since Vim can't guess what you are going to type. One side effect of automatic indentation is that it helps you catch errors in your code early. When you type a } to finish a function, only to find that the automatic indentation gives it more indent than what you expected, there is probably a } missing. Use the "%" command to find out which { matches the } you typed. A missing ) and ; also cause extra indent. Thus if you get more white space than you would expect, check the preceding lines. When you have code that is badly formatted, or you inserted and deleted lines, you need to re-indent the lines. The "=" operator does this. The simplest form is: > == This indents the current line. Like with all operators, there are three ways to use it. In Visual mode "=" indents the selected lines. A useful text object is "a{". This selects the current {} block. Thus, to re-indent the code block the cursor is in: > =a{ I you have really badly indented code, you can re-indent the whole file with: > gg=G However, don't do this in files that have been carefully indented manually. The automatic indenting does a good job, but in some situations you might want to overrule it. SETTING INDENT STYLE Different people have different styles of indentation. By default Vim does a pretty good job of indenting in a way that 90% of programmers do. There are different styles, however; so if you want to, you can customize the indentation style with the 'cinoptions' option. By default 'cinoptions' is empty and Vim uses the default style. You can add various items where you want something different. For example, to make curly braces be placed like this: if (flag) ~ { ~ i = 8; ~ j = 0; ~ } ~ Use this command: > :set cinoptions+={2 There are many of these items. See |cinoptions-values|. ============================================================================== *30.3* Automatic indenting You don't want to switch on the 'cindent' option manually every time you edit a C file. This is how you make it work automatically: > :filetype indent on Actually, this does a lot more than switching on 'cindent' for C files. First of all, it enables detecting the type of a file. That's the same as what is used for syntax highlighting. When the filetype is known, Vim will search for an indent file for this type of file. The Vim distribution includes a number of these for various programming languages. This indent file will then prepare for automatic indenting specifically for this file. If you don't like the automatic indenting, you can switch it off again: > :filetype indent off If you don't like the indenting for one specific type of file, this is how you avoid it. Create a file with just this one line: > :let b:did_indent = 1 Now you need to write this in a file with a specific name: {directory}/indent/{filetype}.vim The {filetype} is the name of the file type, such as "cpp" or "java". You can see the exact name that Vim detected with this command: > :set filetype In this file the output is: filetype=help ~ Thus you would use "help" for {filetype}. For the {directory} part you need to use your runtime directory. Look at the output of this command: > set runtimepath Now use the first item, the name before the first comma. Thus if the output looks like this: runtimepath=~/.config/nvim,/usr/local/share/vim/vim60/runtime,~/.config/nvim/after ~ You use "~/.config/nvim" for {directory}. Then the resulting file name is: ~/.config/nvim/indent/help.vim ~ Instead of switching the indenting off, you could write your own indent file. How to do that is explained here: |indent-expression|. ============================================================================== *30.4* Other indenting The most simple form of automatic indenting is with the 'autoindent' option. It uses the indent from the previous line. A bit smarter is the 'smartindent' option. This is useful for languages where no indent file is available. 'smartindent' is not as smart as 'cindent', but smarter than 'autoindent'. With 'smartindent' set, an extra level of indentation is added for each { and removed for each }. An extra level of indentation will also be added for any of the words in the 'cinwords' option. Lines that begin with # are treated specially: all indentation is removed. This is done so that preprocessor directives will all start in column 1. The indentation is restored for the next line. CORRECTING INDENTS When you are using 'autoindent' or 'smartindent' to get the indent of the previous line, there will be many times when you need to add or remove one 'shiftwidth' worth of indent. A quick way to do this is using the CTRL-D and CTRL-T commands in Insert mode. For example, you are typing a shell script that is supposed to look like this: if test -n a; then ~ echo a ~ echo "-------" ~ fi ~ Start off by setting these options: > :set autoindent shiftwidth=3 You start by typing the first line, <Enter> and the start of the second line: if test -n a; then ~ echo ~ Now you see that you need an extra indent. Type CTRL-T. The result: if test -n a; then ~ echo ~ The CTRL-T command, in Insert mode, adds one 'shiftwidth' to the indent, no matter where in the line you are. You continue typing the second line, <Enter> and the third line. This time the indent is OK. Then <Enter> and the last line. Now you have this: if test -n a; then ~ echo a ~ echo "-------" ~ fi ~ To remove the superfluous indent in the last line press CTRL-D. This deletes one 'shiftwidth' worth of indent, no matter where you are in the line. When you are in Normal mode, you can use the ">>" and "<<" commands to shift lines. ">" and "<" are operators, thus you have the usual three ways to specify the lines you want to indent. A useful combination is: > >i{ This adds one indent to the current block of lines, inside {}. The { and } lines themselves are left unmodified. ">a{" includes them. In this example the cursor is on "printf": original text after ">i{" after ">a{" if (flag) if (flag) if (flag) ~ { { { ~ printf("yes"); printf("yes"); printf("yes"); ~ flag = 0; flag = 0; flag = 0; ~ } } } ~ ============================================================================== *30.5* Tabs and spaces 'tabstop' is set to eight by default. Although you can change it, you quickly run into trouble later. Other programs won't know what tabstop value you used. They probably use the default value of eight, and your text suddenly looks very different. Also, most printers use a fixed tabstop value of eight. Thus it's best to keep 'tabstop' alone. (If you edit a file which was written with a different tabstop setting, see |25.3| for how to fix that.) For indenting lines in a program, using a multiple of eight spaces makes you quickly run into the right border of the window. Using a single space doesn't provide enough visual difference. Many people prefer to use four spaces, a good compromise. Since a <Tab> is eight spaces and you want to use an indent of four spaces, you can't use a <Tab> character to make your indent. There are two ways to handle this: 1. Use a mix of <Tab> and space characters. Since a <Tab> takes the place of eight spaces, you have fewer characters in your file. Inserting a <Tab> is quicker than eight spaces. Backspacing works faster as well. 2. Use spaces only. This avoids the trouble with programs that use a different tabstop value. Fortunately, Vim supports both methods quite well. SPACES AND TABS If you are using a combination of tabs and spaces, you just edit normally. The Vim defaults do a fine job of handling things. You can make life a little easier by setting the 'softtabstop' option. This option tells Vim to make the <Tab> key look and feel as if tabs were set at the value of 'softtabstop', but actually use a combination of tabs and spaces. After you execute the following command, every time you press the <Tab> key the cursor moves to the next 4-column boundary: > :set softtabstop=4 When you start in the first column and press <Tab>, you get 4 spaces inserted in your text. The second time, Vim takes out the 4 spaces and puts in a <Tab> (thus taking you to column 8). Thus Vim uses as many <Tab>s as possible, and then fills up with spaces. When backspacing it works the other way around. A <BS> will always delete the amount specified with 'softtabstop'. Then <Tab>s are used as many as possible and spaces to fill the gap. The following shows what happens pressing <Tab> a few times, and then using <BS>. A "." stands for a space and "------->" for a <Tab>. type result ~ <Tab> .... <Tab><Tab> -------> <Tab><Tab><Tab> ------->.... <Tab><Tab><Tab><BS> -------> <Tab><Tab><Tab><BS><BS> .... An alternative is to use the 'smarttab' option. When it's set, Vim uses 'shiftwidth' for a <Tab> typed in the indent of a line, and a real <Tab> when typed after the first non-blank character. However, <BS> doesn't work like with 'softtabstop'. JUST SPACES If you want absolutely no tabs in your file, you can set the 'expandtab' option: > :set expandtab When this option is set, the <Tab> key inserts a series of spaces. Thus you get the same amount of white space as if a <Tab> character was inserted, but there isn't a real <Tab> character in your file. The backspace key will delete each space by itself. Thus after typing one <Tab> you have to press the <BS> key up to eight times to undo it. If you are in the indent, pressing CTRL-D will be a lot quicker. CHANGING TABS IN SPACES (AND BACK) Setting 'expandtab' does not affect any existing tabs. In other words, any tabs in the document remain tabs. If you want to convert tabs to spaces, use the ":retab" command. Use these commands: > :set expandtab :%retab Now Vim will have changed all indents to use spaces instead of tabs. However, all tabs that come after a non-blank character are kept. If you want these to be converted as well, add a !: > :%retab! This is a little bit dangerous, because it can also change tabs inside a string. To check if these exist, you could use this: > /"[^"\t]*\t[^"]*" It's recommended not to use hard tabs inside a string. Replace them with "\t" to avoid trouble. The other way around works just as well: > :set noexpandtab :%retab! ============================================================================== *30.6* Formatting comments One of the great things about Vim is that it understands comments. You can ask Vim to format a comment and it will do the right thing. Suppose, for example, that you have the following comment: /* ~ * This is a test ~ * of the text formatting. ~ */ ~ You then ask Vim to format it by positioning the cursor at the start of the comment and type: > gq]/ "gq" is the operator to format text. "]/" is the motion that takes you to the end of a comment. The result is: /* ~ * This is a test of the text formatting. ~ */ ~ Notice that Vim properly handled the beginning of each line. An alternative is to select the text that is to be formatted in Visual mode and type "gq". To add a new line to the comment, position the cursor on the middle line and press "o". The result looks like this: /* ~ * This is a test of the text formatting. ~ * ~ */ ~ Vim has automatically inserted a star and a space for you. Now you can type the comment text. When it gets longer than 'textwidth', Vim will break the line. Again, the star is inserted automatically: /* ~ * This is a test of the text formatting. ~ * Typing a lot of text here will make Vim ~ * break ~ */ ~ For this to work some flags must be present in 'formatoptions': r insert the star when typing <Enter> in Insert mode o insert the star when using "o" or "O" in Normal mode c break comment text according to 'textwidth' See |fo-table| for more flags. DEFINING A COMMENT The 'comments' option defines what a comment looks like. Vim distinguishes between a single-line comment and a comment that has a different start, end and middle part. Many single-line comments start with a specific character. In C++ // is used, in Makefiles #, in Vim scripts ". For example, to make Vim understand C++ comments: > :set comments=:// The colon separates the flags of an item from the text by which the comment is recognized. The general form of an item in 'comments' is: {flags}:{text} The {flags} part can be empty, as in this case. Several of these items can be concatenated, separated by commas. This allows recognizing different types of comments at the same time. For example, let's edit an e-mail message. When replying, the text that others wrote is preceded with ">" and "!" characters. This command would work: > :set comments=n:>,n:! There are two items, one for comments starting with ">" and one for comments that start with "!". Both use the flag "n". This means that these comments nest. Thus a line starting with ">" may have another comment after the ">". This allows formatting a message like this: > ! Did you see that site? ~ > ! It looks really great. ~ > I don't like it. The ~ > colors are terrible. ~ What is the URL of that ~ site? ~ Try setting 'textwidth' to a different value, e.g., 80, and format the text by Visually selecting it and typing "gq". The result is: > ! Did you see that site? It looks really great. ~ > I don't like it. The colors are terrible. ~ What is the URL of that site? ~ You will notice that Vim did not move text from one type of comment to another. The "I" in the second line would have fit at the end of the first line, but since that line starts with "> !" and the second line with ">", Vim knows that this is a different kind of comment. A THREE PART COMMENT A C comment starts with "/*", has "*" in the middle and "*/" at the end. The entry in 'comments' for this looks like this: > :set comments=s1:/*,mb:*,ex:*/ The start is defined with "s1:/*". The "s" indicates the start of a three-piece comment. The colon separates the flags from the text by which the comment is recognized: "/*". There is one flag: "1". This tells Vim that the middle part has an offset of one space. The middle part "mb:*" starts with "m", which indicates it is a middle part. The "b" flag means that a blank must follow the text. Otherwise Vim would consider text like "*pointer" also to be the middle of a comment. The end part "ex:*/" has the "e" for identification. The "x" flag has a special meaning. It means that after Vim automatically inserted a star, typing / will remove the extra space. For more details see |format-comments|. ============================================================================== Next chapter: |usr_31.txt| Exploiting the GUI Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_31.txt�����������������������������������������������������������������0000664�0000000�0000000�00000024124�13204015742�0017116�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_31.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Exploiting the GUI Vim works well in a terminal, but the GUI has a few extra items. A file browser can be used for commands that use a file. A dialog to make a choice between alternatives. Use keyboard shortcuts to access menu items quickly. |31.1| The file browser |31.2| Confirmation |31.3| Menu shortcuts |31.4| Vim window position and size |31.5| Various Next chapter: |usr_32.txt| The undo tree Previous chapter: |usr_30.txt| Editing programs Table of contents: |usr_toc.txt| ============================================================================== *31.1* The file browser When using the File/Open... menu you get a file browser. This makes it easier to find the file you want to edit. But what if you want to split a window to edit another file? There is no menu entry for this. You could first use Window/Split and then File/Open..., but that's more work. Since you are typing most commands in Vim, opening the file browser with a typed command is possible as well. To make the split command use the file browser, prepend "browse": > :browse split Select a file and then the ":split" command will be executed with it. If you cancel the file dialog nothing happens, the window isn't split. You can also specify a file name argument. This is used to tell the file browser where to start. Example: > :browse split /etc The file browser will pop up, starting in the directory "/etc". The ":browse" command can be prepended to just about any command that opens a file. If no directory is specified, Vim will decide where to start the file browser. By default it uses the same directory as the last time. Thus when you used ":browse split" and selected a file in "/usr/local/share", the next time you use a ":browse" it will start in "/usr/local/share" again. This can be changed with the 'browsedir' option. It can have one of three values: last Use the last directory browsed (default) buffer Use the same directory as the current buffer current use the current directory For example, when you are in the directory "/usr", editing the file "/usr/local/share/readme", then the command: > :set browsedir=buffer :browse edit Will start the browser in "/usr/local/share". Alternatively: > :set browsedir=current :browse edit Will start the browser in "/usr". Note: To avoid using the mouse, most file browsers offer using key presses to navigate. Since this is different for every system, it is not explained here. Vim uses a standard browser when possible, your system documentation should contain an explanation on the keyboard shortcuts somewhere. When you are not using the GUI version, you could use the file explorer window to select files like in a file browser. However, this doesn't work for the ":browse" command. See |netrw-browse|. ============================================================================== *31.2* Confirmation Vim protects you from accidentally overwriting a file and other ways to lose changes. If you do something that might be a bad thing to do, Vim produces an error message and suggests appending ! if you really want to do it. To avoid retyping the command with the !, you can make Vim give you a dialog. You can then press "OK" or "Cancel" to tell Vim what you want. For example, you are editing a file and made changes to it. You start editing another file with: > :confirm edit foo.txt Vim will pop up a dialog that looks something like this: +-----------------------------------+ | | | ? Save changes to "bar.txt"? | | | | YES NO CANCEL | +-----------------------------------+ Now make your choice. If you do want to save the changes, select "YES". If you want to lose the changes for ever: "NO". If you forgot what you were doing and want to check what really changed use "CANCEL". You will be back in the same file, with the changes still there. Just like ":browse", the ":confirm" command can be prepended to most commands that edit another file. They can also be combined: > :confirm browse edit This will produce a dialog when the current buffer was changed. Then it will pop up a file browser to select the file to edit. Note: In the dialog you can use the keyboard to select the choice. Typically the <Tab> key and the cursor keys change the choice. Pressing <Enter> selects the choice. This depends on the system though. When you are not using the GUI, the ":confirm" command works as well. Instead of popping up a dialog, Vim will print the message at the bottom of the Vim window and ask you to press a key to make a choice. > :confirm edit main.c < Save changes to "Untitled"? ~ [Y]es, (N)o, (C)ancel: ~ You can now press the single key for the choice. You don't have to press <Enter>, unlike other typing on the command line. ============================================================================== *31.3* Menu shortcuts The keyboard is used for all Vim commands. The menus provide a simple way to select commands, without knowing what they are called. But you have to move your hand from the keyboard and grab the mouse. Menus can often be selected with keys as well. This depends on your system, but most often it works this way. Use the <Alt> key in combination with the underlined letter of a menu. For example, <A-w> (<Alt> and w) pops up the Window menu. In the Window menu, the "split" item has the p underlined. To select it, let go of the <Alt> key and press p. After the first selection of a menu with the <Alt> key, you can use the cursor keys to move through the menus. <Right> selects a submenu and <left> closes it. <Esc> also closes a menu. <Enter> selects a menu item. There is a conflict between using the <Alt> key to select menu items, and using <Alt> key combinations for mappings. The 'winaltkeys' option tells Vim what it should do with the <Alt> key. The default value "menu" is the smart choice: If the key combination is a menu shortcut it can't be mapped. All other keys are available for mapping. The value "no" doesn't use any <Alt> keys for the menus. Thus you must use the mouse for the menus, and all <Alt> keys can be mapped. The value "yes" means that Vim will use any <Alt> keys for the menus. Some <Alt> key combinations may also do other things than selecting a menu. ============================================================================== *31.4* Vim window position and size To see the current Vim window position on the screen use: > :winpos This will only work in the GUI. The output may look like this: Window position: X 272, Y 103 ~ The position is given in screen pixels. Now you can use the numbers to move Vim somewhere else. For example, to move it to the left a hundred pixels: > :winpos 172 103 < Note: There may be a small offset between the reported position and where the window moves. This is because of the border around the window. This is added by the window manager. You can use this command in your startup script to position the window at a specific position. The size of the Vim window is computed in characters. Thus this depends on the size of the font being used. You can see the current size with this command: > :set lines columns To change the size set the 'lines' and/or 'columns' options to a new value: > :set lines=50 :set columns=80 Obtaining the size works in a terminal just like in the GUI. Setting the size is not possible in most terminals. You can start the X-Windows version of gvim with an argument to specify the size and position of the window: > gvim -geometry {width}x{height}+{x_offset}+{y_offset} {width} and {height} are in characters, {x_offset} and {y_offset} are in pixels. Example: > gvim -geometry 80x25+100+300 ============================================================================== *31.5* Various You can use gvim to edit an e-mail message. In your e-mail program you must select gvim to be the editor for messages. When you try that, you will see that it doesn't work: The mail program thinks that editing is finished, while gvim is still running! What happens is that gvim disconnects from the shell it was started in. That is fine when you start gvim in a terminal, so that you can do other work in that terminal. But when you really want to wait for gvim to finish, you must prevent it from disconnecting. The "-f" argument does this: > gvim -f file.txt The "-f" stands for foreground. Now Vim will block the shell it was started in until you finish editing and exit. DELAYED START OF THE GUI On Unix it's possible to first start Vim in a terminal. That's useful if you do various tasks in the same shell. If you are editing a file and decide you want to use the GUI after all, you can start it with: > :gui Vim will open the GUI window and no longer use the terminal. You can continue using the terminal for something else. The "-f" argument is used here to run the GUI in the foreground. You can also use ":gui -f". THE GVIM STARTUP FILE When gvim starts, it reads the gvimrc file. That's similar to the vimrc file used when starting Vim. The gvimrc file can be used for settings and commands that are only to be used when the GUI is going to be started. For example, you can set the 'lines' option to set a different window size: > :set lines=55 You don't want to do this in a terminal, since its size is fixed (except for an xterm that supports resizing). The gvimrc file is searched for in the same locations as the vimrc file. Normally its name is "~/.config/nvim/ginit.vim". The $MYGVIMRC environment variable is set to it, thus you can use this command to edit the file, if you have one: > :edit $MYGVIMRC < If for some reason you don't want to use the normal gvimrc file, you can specify another one with the "-U" argument: > gvim -U thisrc ... That allows starting gvim for different kinds of editing. You could set another font size, for example. To completely skip reading a gvimrc file: > gvim -U NONE ... ============================================================================== Next chapter: |usr_32.txt| The undo tree Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_32.txt�����������������������������������������������������������������0000664�0000000�0000000�00000012323�13204015742�0017115�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_32.txt* Nvim VIM USER MANUAL - by Bram Moolenaar The undo tree Vim provides multi-level undo. If you undo a few changes and then make a new change you create a branch in the undo tree. This text is about moving through the branches. |32.1| Undo up to a file write |32.2| Numbering changes |32.3| Jumping around the tree |32.4| Time travelling Next chapter: |usr_40.txt| Make new commands Previous chapter: |usr_31.txt| Exploiting the GUI Table of contents: |usr_toc.txt| ============================================================================== *32.1* Undo up to a file write Sometimes you make several changes, and then discover you want to go back to when you have last written the file. You can do that with this command: > :earlier 1f The "f" stands for "file" here. You can repeat this command to go further back in the past. Or use a count different from 1 to go back faster. If you go back too far, go forward again with: > :later 1f Note that these commands really work in time sequence. This matters if you made changes after undoing some changes. It's explained in the next section. Also note that we are talking about text writes here. For writing the undo information in a file see |undo-persistence|. ============================================================================== *32.2* Numbering changes In section |02.5| we only discussed one line of undo/redo. But it is also possible to branch off. This happens when you undo a few changes and then make a new change. The new changes become a branch in the undo tree. Let's start with the text "one". The first change to make is to append " too". And then move to the first 'o' and change it into 'w'. We then have two changes, numbered 1 and 2, and three states of the text: one ~ | change 1 | one too ~ | change 2 | one two ~ If we now undo one change, back to "one too", and change "one" to "me" we create a branch in the undo tree: one ~ | change 1 | one too ~ / \ change 2 change 3 | | one two me too ~ You can now use the |u| command to undo. If you do this twice you get to "one". Use |CTRL-R| to redo, and you will go to "one too". One more |CTRL-R| takes you to "me too". Thus undo and redo go up and down in the tree, using the branch that was last used. What matters here is the order in which the changes are made. Undo and redo are not considered changes in this context. After each change you have a new state of the text. Note that only the changes are numbered, the text shown in the tree above has no identifier. They are mostly referred to by the number of the change above it. But sometimes by the number of one of the changes below it, especially when moving up in the tree, so that you know which change was just undone. ============================================================================== *32.3* Jumping around the tree So how do you get to "one two" now? You can use this command: > :undo 2 The text is now "one two", you are below change 2. You can use the |:undo| command to jump to below any change in the tree. Now make another change: change "one" to "not": one ~ | change 1 | one too ~ / \ change 2 change 3 | | one two me too ~ | change 4 | not two ~ Now you change your mind and want to go back to "me too". Use the |g-| command. This moves back in time. Thus it doesn't walk the tree upwards or downwards, but goes to the change made before. You can repeat |g-| and you will see the text change: me too ~ one two ~ one too ~ one ~ Use |g+| to move forward in time: one ~ one too ~ one two ~ me too ~ not two ~ Using |:undo| is useful if you know what change you want to jump to. |g-| and |g+| are useful if you don't know exactly what the change number is. You can type a count before |g-| and |g+| to repeat them. ============================================================================== *32.4* Time travelling When you have been working on text for a while the tree grows to become big. Then you may want to go to the text of some minutes ago. To see what branches there are in the undo tree use this command: > :undolist < number changes time ~ 3 2 16 seconds ago 4 3 5 seconds ago Here you can see the number of the leaves in each branch and when the change was made. Assuming we are below change 4, at "not two", you can go back ten seconds with this command: > :earlier 10s Depending on how much time you took for the changes you end up at a certain position in the tree. The |:earlier| command argument can be "m" for minutes, "h" for hours and "d" for days. To go all the way back use a big number: > :earlier 100d To travel forward in time again use the |:later| command: > :later 1m The arguments are "s", "m" and "h", just like with |:earlier|. If you want even more details, or want to manipulate the information, you can use the |undotree()| function. To see what it returns: > :echo undotree() ============================================================================== Next chapter: |usr_40.txt| Make new commands Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_40.txt�����������������������������������������������������������������0000664�0000000�0000000�00000055133�13204015742�0017122�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_40.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Make new commands Vim is an extensible editor. You can take a sequence of commands you use often and turn it into a new command. Or redefine an existing command. Autocommands make it possible to execute commands automatically. |40.1| Key mapping |40.2| Defining command-line commands |40.3| Autocommands Next chapter: |usr_41.txt| Write a Vim script Previous chapter: |usr_32.txt| The undo tree Table of contents: |usr_toc.txt| ============================================================================== *40.1* Key mapping A simple mapping was explained in section |05.3|. The principle is that one sequence of key strokes is translated into another sequence of key strokes. This is a simple, yet powerful mechanism. The simplest form is that one key is mapped to a sequence of keys. Since the function keys, except <F1>, have no predefined meaning in Vim, these are good choices to map. Example: > :map <F2> GoDate: <Esc>:read !date<CR>kJ This shows how three modes are used. After going to the last line with "G", the "o" command opens a new line and starts Insert mode. The text "Date: " is inserted and <Esc> takes you out of insert mode. Notice the use of special keys inside <>. This is called angle bracket notation. You type these as separate characters, not by pressing the key itself. This makes the mappings better readable and you can copy and paste the text without problems. The ":" character takes Vim to the command line. The ":read !date" command reads the output from the "date" command and appends it below the current line. The <CR> is required to execute the ":read" command. At this point of execution the text looks like this: Date: ~ Fri Jun 15 12:54:34 CEST 2001 ~ Now "kJ" moves the cursor up and joins the lines together. To decide which key or keys you use for mapping, see |map-which-keys|. MAPPING AND MODES The ":map" command defines remapping for keys in Normal mode. You can also define mappings for other modes. For example, ":imap" applies to Insert mode. You can use it to insert a date below the cursor: > :imap <F2> <CR>Date: <Esc>:read !date<CR>kJ It looks a lot like the mapping for <F2> in Normal mode, only the start is different. The <F2> mapping for Normal mode is still there. Thus you can map the same key differently for each mode. Notice that, although this mapping starts in Insert mode, it ends in Normal mode. If you want it to continue in Insert mode, append an "a" to the mapping. Here is an overview of map commands and in which mode they work: :map Normal, Visual and Operator-pending :vmap Visual :nmap Normal :omap Operator-pending :map! Insert and Command-line :imap Insert :cmap Command-line Operator-pending mode is when you typed an operator character, such as "d" or "y", and you are expected to type the motion command or a text object. Thus when you type "dw", the "w" is entered in operator-pending mode. Suppose that you want to define <F7> so that the command d<F7> deletes a C program block (text enclosed in curly braces, {}). Similarly y<F7> would yank the program block into the unnamed register. Therefore, what you need to do is to define <F7> to select the current program block. You can do this with the following command: > :omap <F7> a{ This causes <F7> to perform a select block "a{" in operator-pending mode, just like you typed it. This mapping is useful if typing a { on your keyboard is a bit difficult. LISTING MAPPINGS To see the currently defined mappings, use ":map" without arguments. Or one of the variants that include the mode in which they work. The output could look like this: _g :call MyGrep(1)<CR> ~ v <F2> :s/^/> /<CR>:noh<CR>`` ~ n <F2> :.,$s/^/> /<CR>:noh<CR>`` ~ <xHome> <Home> <xEnd> <End> The first column of the list shows in which mode the mapping is effective. This is "n" for Normal mode, "i" for Insert mode, etc. A blank is used for a mapping defined with ":map", thus effective in both Normal and Visual mode. One useful purpose of listing the mapping is to check if special keys in <> form have been recognized (this only works when color is supported). For example, when <Esc> is displayed in color, it stands for the escape character. When it has the same color as the other text, it is five characters. REMAPPING The result of a mapping is inspected for other mappings in it. For example, the mappings for <F2> above could be shortened to: > :map <F2> G<F3> :imap <F2> <Esc><F3> :map <F3> oDate: <Esc>:read !date<CR>kJ For Normal mode <F2> is mapped to go to the last line, and then behave like <F3> was pressed. In Insert mode <F2> stops Insert mode with <Esc> and then also uses <F3>. Then <F3> is mapped to do the actual work. Suppose you hardly ever use Ex mode, and want to use the "Q" command to format text (this was so in old versions of Vim). This mapping will do it: > :map Q gq But, in rare cases you need to use Ex mode anyway. Let's map "gQ" to Q, so that you can still go to Ex mode: > :map gQ Q What happens now is that when you type "gQ" it is mapped to "Q". So far so good. But then "Q" is mapped to "gq", thus typing "gQ" results in "gq", and you don't get to Ex mode at all. To avoid keys to be mapped again, use the ":noremap" command: > :noremap gQ Q Now Vim knows that the "Q" is not to be inspected for mappings that apply to it. There is a similar command for every mode: :noremap Normal, Visual and Operator-pending :vnoremap Visual :nnoremap Normal :onoremap Operator-pending :noremap! Insert and Command-line :inoremap Insert :cnoremap Command-line RECURSIVE MAPPING When a mapping triggers itself, it will run forever. This can be used to repeat an action an unlimited number of times. For example, you have a list of files that contain a version number in the first line. You edit these files with "vim *.txt". You are now editing the first file. Define this mapping: > :map ,, :s/5.1/5.2/<CR>:wnext<CR>,, Now you type ",,". This triggers the mapping. It replaces "5.1" with "5.2" in the first line. Then it does a ":wnext" to write the file and edit the next one. The mapping ends in ",,". This triggers the same mapping again, thus doing the substitution, etc. This continues until there is an error. In this case it could be a file where the substitute command doesn't find a match for "5.1". You can then make a change to insert "5.1" and continue by typing ",," again. Or the ":wnext" fails, because you are in the last file in the list. When a mapping runs into an error halfway, the rest of the mapping is discarded. CTRL-C interrupts the mapping (CTRL-Break on MS-Windows). DELETE A MAPPING To remove a mapping use the ":unmap" command. Again, the mode the unmapping applies to depends on the command used: :unmap Normal, Visual and Operator-pending :vunmap Visual :nunmap Normal :ounmap Operator-pending :unmap! Insert and Command-line :iunmap Insert :cunmap Command-line There is a trick to define a mapping that works in Normal and Operator-pending mode, but not in Visual mode. First define it for all three modes, then delete it for Visual mode: > :map <C-A> /---><CR> :vunmap <C-A> Notice that the five characters "<C-A>" stand for the single key CTRL-A. To remove all mappings use the |:mapclear| command. You can guess the variations for different modes by now. Be careful with this command, it can't be undone. SPECIAL CHARACTERS The ":map" command can be followed by another command. A | character separates the two commands. This also means that a | character can't be used inside a map command. To include one, use <Bar> (five characters). Example: > :map <F8> :write <Bar> !checkin %:S<CR> The same problem applies to the ":unmap" command, with the addition that you have to watch out for trailing white space. These two commands are different: > :unmap a | unmap b :unmap a| unmap b The first command tries to unmap "a ", with a trailing space. When using a space inside a mapping, use <Space> (seven characters): > :map <Space> W This makes the spacebar move a blank-separated word forward. It is not possible to put a comment directly after a mapping, because the " character is considered to be part of the mapping. You can use |", this starts a new, empty command with a comment. Example: > :map <Space> W| " Use spacebar to move forward a word MAPPINGS AND ABBREVIATIONS Abbreviations are a lot like Insert mode mappings. The arguments are handled in the same way. The main difference is the way they are triggered. An abbreviation is triggered by typing a non-word character after the word. A mapping is triggered when typing the last character. Another difference is that the characters you type for an abbreviation are inserted in the text while you type them. When the abbreviation is triggered these characters are deleted and replaced by what the abbreviation produces. When typing the characters for a mapping, nothing is inserted until you type the last character that triggers it. If the 'showcmd' option is set, the typed characters are displayed in the last line of the Vim window. An exception is when a mapping is ambiguous. Suppose you have done two mappings: > :imap aa foo :imap aaa bar Now, when you type "aa", Vim doesn't know if it should apply the first or the second mapping. It waits for another character to be typed. If it is an "a", the second mapping is applied and results in "bar". If it is a space, for example, the first mapping is applied, resulting in "foo", and then the space is inserted. ADDITIONALLY... The <script> keyword can be used to make a mapping local to a script. See |:map-<script>|. The <buffer> keyword can be used to make a mapping local to a specific buffer. See |:map-<buffer>| The <unique> keyword can be used to make defining a new mapping fail when it already exists. Otherwise a new mapping simply overwrites the old one. See |:map-<unique>|. To make a key do nothing, map it to <Nop> (five characters). This will make the <F7> key do nothing at all: > :map <F7> <Nop>| map! <F7> <Nop> There must be no space after <Nop>. ============================================================================== *40.2* Defining command-line commands The Vim editor enables you to define your own commands. You execute these commands just like any other Command-line mode command. To define a command, use the ":command" command, as follows: > :command DeleteFirst 1delete Now when you execute the command ":DeleteFirst" Vim executes ":1delete", which deletes the first line. Note: User-defined commands must start with a capital letter. You cannot use ":Next". The underscore cannot be used! You can use digits, but this is discouraged. To list the user-defined commands, execute the following command: > :command Just like with the builtin commands, the user defined commands can be abbreviated. You need to type just enough to distinguish the command from another. Command line completion can be used to get the full name. NUMBER OF ARGUMENTS User-defined commands can take a series of arguments. The number of arguments must be specified by the -nargs option. For instance, the example :DeleteFirst command takes no arguments, so you could have defined it as follows: > :command -nargs=0 DeleteFirst 1delete However, because zero arguments is the default, you do not need to add "-nargs=0". The other values of -nargs are as follows: -nargs=0 No arguments -nargs=1 One argument -nargs=* Any number of arguments -nargs=? Zero or one argument -nargs=+ One or more arguments USING THE ARGUMENTS Inside the command definition, the arguments are represented by the <args> keyword. For example: > :command -nargs=+ Say :echo "<args>" Now when you type > :Say Hello World Vim echoes "Hello World". However, if you add a double quote, it won't work. For example: > :Say he said "hello" To get special characters turned into a string, properly escaped to use as an expression, use "<q-args>": > :command -nargs=+ Say :echo <q-args> Now the above ":Say" command will result in this to be executed: > :echo "he said \"hello\"" The <f-args> keyword contains the same information as the <args> keyword, except in a format suitable for use as function call arguments. For example: > :command -nargs=* DoIt :call AFunction(<f-args>) :DoIt a b c Executes the following command: > :call AFunction("a", "b", "c") LINE RANGE Some commands take a range as their argument. To tell Vim that you are defining such a command, you need to specify a -range option. The values for this option are as follows: -range Range is allowed; default is the current line. -range=% Range is allowed; default is the whole file. -range={count} Range is allowed; the last number in it is used as a single number whose default is {count}. When a range is specified, the keywords <line1> and <line2> get the values of the first and last line in the range. For example, the following command defines the SaveIt command, which writes out the specified range to the file "save_file": > :command -range=% SaveIt :<line1>,<line2>write! save_file OTHER OPTIONS Some of the other options and keywords are as follows: -count={number} The command can take a count whose default is {number}. The resulting count can be used through the <count> keyword. -bang You can use a !. If present, using <bang> will result in a !. -register You can specify a register. (The default is the unnamed register.) The register specification is available as <reg> (a.k.a. <register>). -complete={type} Type of command-line completion used. See |:command-completion| for the list of possible values. -bar The command can be followed by | and another command, or " and a comment. -buffer The command is only available for the current buffer. Finally, you have the <lt> keyword. It stands for the character <. Use this to escape the special meaning of the <> items mentioned. REDEFINING AND DELETING To redefine the same command use the ! argument: > :command -nargs=+ Say :echo "<args>" :command! -nargs=+ Say :echo <q-args> To delete a user command use ":delcommand". It takes a single argument, which is the name of the command. Example: > :delcommand SaveIt To delete all the user commands: > :comclear Careful, this can't be undone! More details about all this in the reference manual: |user-commands|. ============================================================================== *40.3* Autocommands An autocommand is a command that is executed automatically in response to some event, such as a file being read or written or a buffer change. Through the use of autocommands you can train Vim to edit compressed files, for example. That is used in the |gzip| plugin. Autocommands are very powerful. Use them with care and they will help you avoid typing many commands. Use them carelessly and they will cause a lot of trouble. Suppose you want to replace a datestamp on the end of a file every time it is written. First you define a function: > :function DateInsert() : $delete : read !date :endfunction You want this function to be called each time, just before a buffer is written to a file. This will make that happen: > :autocmd BufWritePre * call DateInsert() "BufWritePre" is the event for which this autocommand is triggered: Just before (pre) writing a buffer to a file. The "*" is a pattern to match with the file name. In this case it matches all files. With this command enabled, when you do a ":write", Vim checks for any matching BufWritePre autocommands and executes them, and then it performs the ":write". The general form of the :autocmd command is as follows: > :autocmd [group] {events} {file_pattern} [nested] {command} The [group] name is optional. It is used in managing and calling the commands (more on this later). The {events} parameter is a list of events (comma separated) that trigger the command. {file_pattern} is a filename, usually with wildcards. For example, using "*.txt" makes the autocommand be used for all files whose name end in ".txt". The optional [nested] flag allows for nesting of autocommands (see below), and finally, {command} is the command to be executed. EVENTS One of the most useful events is BufReadPost. It is triggered after a new file is being edited. It is commonly used to set option values. For example, you know that "*.gsm" files are GNU assembly language. To get the syntax file right, define this autocommand: > :autocmd BufReadPost *.gsm set filetype=asm If Vim is able to detect the type of file, it will set the 'filetype' option for you. This triggers the Filetype event. Use this to do something when a certain type of file is edited. For example, to load a list of abbreviations for text files: > :autocmd Filetype text source ~/.config/nvim/abbrevs.vim When starting to edit a new file, you could make Vim insert a skeleton: > :autocmd BufNewFile *.[ch] 0read ~/skeletons/skel.c See |autocmd-events| for a complete list of events. PATTERNS The {file_pattern} argument can actually be a comma-separated list of file patterns. For example: "*.c,*.h" matches files ending in ".c" and ".h". The usual file wildcards can be used. Here is a summary of the most often used ones: * Match any character any number of times ? Match any character once [abc] Match the character a, b or c . Matches a dot a{b,c} Matches "ab" and "ac" When the pattern includes a slash (/) Vim will compare directory names. Without the slash only the last part of a file name is used. For example, "*.txt" matches "/home/biep/readme.txt". The pattern "/home/biep/*" would also match it. But "home/foo/*.txt" wouldn't. When including a slash, Vim matches the pattern against both the full path of the file ("/home/biep/readme.txt") and the relative path (e.g., "biep/readme.txt"). Note: When working on a system that uses a backslash as file separator, such as MS-Windows, you still use forward slashes in autocommands. This makes it easier to write the pattern, since a backslash has a special meaning. It also makes the autocommands portable. DELETING To delete an autocommand, use the same command as what it was defined with, but leave out the {command} at the end and use a !. Example: > :autocmd! FileWritePre * This will delete all autocommands for the "FileWritePre" event that use the "*" pattern. LISTING To list all the currently defined autocommands, use this: > :autocmd The list can be very long, especially when filetype detection is used. To list only part of the commands, specify the group, event and/or pattern. For example, to list all BufNewFile autocommands: > :autocmd BufNewFile To list all autocommands for the pattern "*.c": > :autocmd * *.c Using "*" for the event will list all the events. To list all autocommands for the cprograms group: > :autocmd cprograms GROUPS The {group} item, used when defining an autocommand, groups related autocommands together. This can be used to delete all the autocommands in a certain group, for example. When defining several autocommands for a certain group, use the ":augroup" command. For example, let's define autocommands for C programs: > :augroup cprograms : autocmd BufReadPost *.c,*.h :set sw=4 sts=4 : autocmd BufReadPost *.cpp :set sw=3 sts=3 :augroup END This will do the same as: > :autocmd cprograms BufReadPost *.c,*.h :set sw=4 sts=4 :autocmd cprograms BufReadPost *.cpp :set sw=3 sts=3 To delete all autocommands in the "cprograms" group: > :autocmd! cprograms NESTING Generally, commands executed as the result of an autocommand event will not trigger any new events. If you read a file in response to a FileChangedShell event, it will not trigger the autocommands that would set the syntax, for example. To make the events triggered, add the "nested" argument: > :autocmd FileChangedShell * nested edit EXECUTING AUTOCOMMANDS It is possible to trigger an autocommand by pretending an event has occurred. This is useful to have one autocommand trigger another one. Example: > :autocmd BufReadPost *.new execute "doautocmd BufReadPost " . expand("<afile>:r") This defines an autocommand that is triggered when a new file has been edited. The file name must end in ".new". The ":execute" command uses expression evaluation to form a new command and execute it. When editing the file "tryout.c.new" the executed command will be: > :doautocmd BufReadPost tryout.c The expand() function takes the "<afile>" argument, which stands for the file name the autocommand was executed for, and takes the root of the file name with ":r". ":doautocmd" executes on the current buffer. The ":doautoall" command works like "doautocmd" except it executes on all the buffers. USING NORMAL MODE COMMANDS The commands executed by an autocommand are Command-line commands. If you want to use a Normal mode command, the ":normal" command can be used. Example: > :autocmd BufReadPost *.log normal G This will make the cursor jump to the last line of *.log files when you start to edit it. Using the ":normal" command is a bit tricky. First of all, make sure its argument is a complete command, including all the arguments. When you use "i" to go to Insert mode, there must also be a <Esc> to leave Insert mode again. If you use a "/" to start a search pattern, there must be a <CR> to execute it. The ":normal" command uses all the text after it as commands. Thus there can be no | and another command following. To work around this, put the ":normal" command inside an ":execute" command. This also makes it possible to pass unprintable characters in a convenient way. Example: > :autocmd BufReadPost *.chg execute "normal ONew entry:\<Esc>" | \ 1read !date This also shows the use of a backslash to break a long command into more lines. This can be used in Vim scripts (not at the command line). When you want the autocommand do something complicated, which involves jumping around in the file and then returning to the original position, you may want to restore the view on the file. See |restore-position| for an example. IGNORING EVENTS At times, you will not want to trigger an autocommand. The 'eventignore' option contains a list of events that will be totally ignored. For example, the following causes events for entering and leaving a window to be ignored: > :set eventignore=WinEnter,WinLeave To ignore all events, use the following command: > :set eventignore=all To set it back to the normal behavior, make 'eventignore' empty: > :set eventignore= ============================================================================== Next chapter: |usr_41.txt| Write a Vim script Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_41.txt�����������������������������������������������������������������0000664�0000000�0000000�00000247640�13204015742�0017131�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_41.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Write a Vim script The Vim script language is used for the startup vimrc file, syntax files, and many other things. This chapter explains the items that can be used in a Vim script. There are a lot of them, thus this is a long chapter. |41.1| Introduction |41.2| Variables |41.3| Expressions |41.4| Conditionals |41.5| Executing an expression |41.6| Using functions |41.7| Defining a function |41.8| Lists and Dictionaries |41.9| Exceptions |41.10| Various remarks |41.11| Writing a plugin |41.12| Writing a filetype plugin |41.13| Writing a compiler plugin |41.14| Writing a plugin that loads quickly |41.15| Writing library scripts |41.16| Distributing Vim scripts Next chapter: |usr_42.txt| Add new menus Previous chapter: |usr_40.txt| Make new commands Table of contents: |usr_toc.txt| ============================================================================== *41.1* Introduction *vim-script-intro* *script* Your first experience with Vim scripts is the vimrc file. Vim reads it when it starts up and executes the commands. You can set options to values you prefer. And you can use any colon command in it (commands that start with a ":"; these are sometimes referred to as Ex commands or command-line commands). Syntax files are also Vim scripts. As are files that set options for a specific file type. A complicated macro can be defined by a separate Vim script file. You can think of other uses yourself. Let's start with a simple example: > :let i = 1 :while i < 5 : echo "count is" i : let i += 1 :endwhile < Note: The ":" characters are not really needed here. You only need to use them when you type a command. In a Vim script file they can be left out. We will use them here anyway to make clear these are colon commands and make them stand out from Normal mode commands. Note: You can try out the examples by yanking the lines from the text here and executing them with :@" The output of the example code is: count is 1 ~ count is 2 ~ count is 3 ~ count is 4 ~ In the first line the ":let" command assigns a value to a variable. The generic form is: > :let {variable} = {expression} In this case the variable name is "i" and the expression is a simple value, the number one. The ":while" command starts a loop. The generic form is: > :while {condition} : {statements} :endwhile The statements until the matching ":endwhile" are executed for as long as the condition is true. The condition used here is the expression "i < 5". This is true when the variable i is smaller than five. Note: If you happen to write a while loop that keeps on running, you can interrupt it by pressing CTRL-C (CTRL-Break on MS-Windows). The ":echo" command prints its arguments. In this case the string "count is" and the value of the variable i. Since i is one, this will print: count is 1 ~ Then there is the ":let i += 1" command. This does the same thing as ":let i = i + 1". This adds one to the variable i and assigns the new value to the same variable. The example was given to explain the commands, but would you really want to make such a loop, it can be written much more compact: > :for i in range(1, 4) : echo "count is" i :endfor We won't explain how |:for| and |range()| work until later. Follow the links if you are impatient. THREE KINDS OF NUMBERS Numbers can be decimal, hexadecimal or octal. A hexadecimal number starts with "0x" or "0X". For example "0x1f" is decimal 31. An octal number starts with a zero. "017" is decimal 15. Careful: don't put a zero before a decimal number, it will be interpreted as an octal number! The ":echo" command always prints decimal numbers. Example: > :echo 0x7f 036 < 127 30 ~ A number is made negative with a minus sign. This also works for hexadecimal and octal numbers. A minus sign is also used for subtraction. Compare this with the previous example: > :echo 0x7f -036 < 97 ~ White space in an expression is ignored. However, it's recommended to use it for separating items, to make the expression easier to read. For example, to avoid the confusion with a negative number above, put a space between the minus sign and the following number: > :echo 0x7f - 036 ============================================================================== *41.2* Variables A variable name consists of ASCII letters, digits and the underscore. It cannot start with a digit. Valid variable names are: counter _aap3 very_long_variable_name_with_underscores FuncLength LENGTH Invalid names are "foo+bar" and "6var". These variables are global. To see a list of currently defined variables use this command: > :let You can use global variables everywhere. This also means that when the variable "count" is used in one script file, it might also be used in another file. This leads to confusion at least, and real problems at worst. To avoid this, you can use a variable local to a script file by prepending "s:". For example, one script contains this code: > :let s:count = 1 :while s:count < 5 : source other.vim : let s:count += 1 :endwhile Since "s:count" is local to this script, you can be sure that sourcing the "other.vim" script will not change this variable. If "other.vim" also uses an "s:count" variable, it will be a different copy, local to that script. More about script-local variables here: |script-variable|. There are more kinds of variables, see |internal-variables|. The most often used ones are: b:name variable local to a buffer w:name variable local to a window g:name global variable (also in a function) v:name variable predefined by Vim DELETING VARIABLES Variables take up memory and show up in the output of the ":let" command. To delete a variable use the ":unlet" command. Example: > :unlet s:count This deletes the script-local variable "s:count" to free up the memory it uses. If you are not sure if the variable exists, and don't want an error message when it doesn't, append !: > :unlet! s:count When a script finishes, the local variables used there will not be automatically freed. The next time the script executes, it can still use the old value. Example: > :if !exists("s:call_count") : let s:call_count = 0 :endif :let s:call_count = s:call_count + 1 :echo "called" s:call_count "times" The "exists()" function checks if a variable has already been defined. Its argument is the name of the variable you want to check. Not the variable itself! If you would do this: > :if !exists(s:call_count) Then the value of s:call_count will be used as the name of the variable that exists() checks. That's not what you want. The exclamation mark ! negates a value. When the value was true, it becomes false. When it was false, it becomes true. You can read it as "not". Thus "if !exists()" can be read as "if not exists()". What Vim calls true is anything that is not zero. Zero is false. Note: Vim automatically converts a string to a number when it is looking for a number. When using a string that doesn't start with a digit the resulting number is zero. Thus look out for this: > :if "true" < The "true" will be interpreted as a zero, thus as false! STRING VARIABLES AND CONSTANTS So far only numbers were used for the variable value. Strings can be used as well. Numbers and strings are the basic types of variables that Vim supports. The type is dynamic, it is set each time when assigning a value to the variable with ":let". More about types in |41.8|. To assign a string value to a variable, you need to use a string constant. There are two types of these. First the string in double quotes: > :let name = "peter" :echo name < peter ~ If you want to include a double quote inside the string, put a backslash in front of it: > :let name = "\"peter\"" :echo name < "peter" ~ To avoid the need for a backslash, you can use a string in single quotes: > :let name = '"peter"' :echo name < "peter" ~ Inside a single-quote string all the characters are as they are. Only the single quote itself is special: you need to use two to get one. A backslash is taken literally, thus you can't use it to change the meaning of the character after it. In double-quote strings it is possible to use special characters. Here are a few useful ones: \t <Tab> \n <NL>, line break \r <CR>, <Enter> \e <Esc> \b <BS>, backspace \" " \\ \, backslash \<Esc> <Esc> \<C-W> CTRL-W The last two are just examples. The "\<name>" form can be used to include the special key "name". See |expr-quote| for the full list of special items in a string. ============================================================================== *41.3* Expressions Vim has a rich, yet simple way to handle expressions. You can read the definition here: |expression-syntax|. Here we will show the most common items. The numbers, strings and variables mentioned above are expressions by themselves. Thus everywhere an expression is expected, you can use a number, string or variable. Other basic items in an expression are: $NAME environment variable &name option @r register Examples: > :echo "The value of 'tabstop' is" &ts :echo "Your home directory is" $HOME :if @a > 5 The &name form can be used to save an option value, set it to a new value, do something and restore the old value. Example: > :let save_ic = &ic :set noic :/The Start/,$delete :let &ic = save_ic This makes sure the "The Start" pattern is used with the 'ignorecase' option off. Still, it keeps the value that the user had set. (Another way to do this would be to add "\C" to the pattern, see |/\C|.) MATHEMATICS It becomes more interesting if we combine these basic items. Let's start with mathematics on numbers: a + b add a - b subtract a * b multiply a / b divide a % b modulo The usual precedence is used. Example: > :echo 10 + 5 * 2 < 20 ~ Grouping is done with parentheses. No surprises here. Example: > :echo (10 + 5) * 2 < 30 ~ Strings can be concatenated with ".". Example: > :echo "foo" . "bar" < foobar ~ When the ":echo" command gets multiple arguments, it separates them with a space. In the example the argument is a single expression, thus no space is inserted. Borrowed from the C language is the conditional expression: a ? b : c If "a" evaluates to true "b" is used, otherwise "c" is used. Example: > :let i = 4 :echo i > 5 ? "i is big" : "i is small" < i is small ~ The three parts of the constructs are always evaluated first, thus you could see it work as: (a) ? (b) : (c) ============================================================================== *41.4* Conditionals The ":if" commands executes the following statements, until the matching ":endif", only when a condition is met. The generic form is: :if {condition} {statements} :endif Only when the expression {condition} evaluates to true (non-zero) will the {statements} be executed. These must still be valid commands. If they contain garbage, Vim won't be able to find the ":endif". You can also use ":else". The generic form for this is: :if {condition} {statements} :else {statements} :endif The second {statements} is only executed if the first one isn't. Finally, there is ":elseif": :if {condition} {statements} :elseif {condition} {statements} :endif This works just like using ":else" and then "if", but without the need for an extra ":endif". A useful example for your vimrc file is checking the 'term' option and doing something depending upon its value: > :if &term == "xterm" : " Do stuff for xterm :elseif &term == "vt100" : " Do stuff for a vt100 terminal :else : " Do something for other terminals :endif LOGIC OPERATIONS We already used some of them in the examples. These are the most often used ones: a == b equal to a != b not equal to a > b greater than a >= b greater than or equal to a < b less than a <= b less than or equal to The result is one if the condition is met and zero otherwise. An example: > :if v:version >= 700 : echo "congratulations" :else : echo "you are using an old version, upgrade!" :endif Here "v:version" is a variable defined by Vim, which has the value of the Vim version. 600 is for version 6.0. Version 6.1 has the value 601. This is very useful to write a script that works with multiple versions of Vim. |v:version| The logic operators work both for numbers and strings. When comparing two strings, the mathematical difference is used. This compares byte values, which may not be right for some languages. When comparing a string with a number, the string is first converted to a number. This is a bit tricky, because when a string doesn't look like a number, the number zero is used. Example: > :if 0 == "one" : echo "yes" :endif This will echo "yes", because "one" doesn't look like a number, thus it is converted to the number zero. For strings there are two more items: a =~ b matches with a !~ b does not match with The left item "a" is used as a string. The right item "b" is used as a pattern, like what's used for searching. Example: > :if str =~ " " : echo "str contains a space" :endif :if str !~ '\.$' : echo "str does not end in a full stop" :endif Notice the use of a single-quote string for the pattern. This is useful, because backslashes would need to be doubled in a double-quote string and patterns tend to contain many backslashes. The 'ignorecase' option is used when comparing strings. When you don't want that, append "#" to match case and "?" to ignore case. Thus "==?" compares two strings to be equal while ignoring case. And "!~#" checks if a pattern doesn't match, also checking the case of letters. For the full table see |expr-==|. MORE LOOPING The ":while" command was already mentioned. Two more statements can be used in between the ":while" and the ":endwhile": :continue Jump back to the start of the while loop; the loop continues. :break Jump forward to the ":endwhile"; the loop is discontinued. Example: > :while counter < 40 : call do_something() : if skip_flag : continue : endif : if finished_flag : break : endif : sleep 50m :endwhile The ":sleep" command makes Vim take a nap. The "50m" specifies fifty milliseconds. Another example is ":sleep 4", which sleeps for four seconds. Even more looping can be done with the ":for" command, see below in |41.8|. ============================================================================== *41.5* Executing an expression So far the commands in the script were executed by Vim directly. The ":execute" command allows executing the result of an expression. This is a very powerful way to build commands and execute them. An example is to jump to a tag, which is contained in a variable: > :execute "tag " . tag_name The "." is used to concatenate the string "tag " with the value of variable "tag_name". Suppose "tag_name" has the value "get_cmd", then the command that will be executed is: > :tag get_cmd The ":execute" command can only execute colon commands. The ":normal" command executes Normal mode commands. However, its argument is not an expression but the literal command characters. Example: > :normal gg=G This jumps to the first line and formats all lines with the "=" operator. To make ":normal" work with an expression, combine ":execute" with it. Example: > :execute "normal " . normal_commands The variable "normal_commands" must contain the Normal mode commands. Make sure that the argument for ":normal" is a complete command. Otherwise Vim will run into the end of the argument and abort the command. For example, if you start Insert mode, you must leave Insert mode as well. This works: > :execute "normal Inew text \<Esc>" This inserts "new text " in the current line. Notice the use of the special key "\<Esc>". This avoids having to enter a real <Esc> character in your script. If you don't want to execute a string but evaluate it to get its expression value, you can use the eval() function: > :let optname = "path" :let optval = eval('&' . optname) A "&" character is prepended to "path", thus the argument to eval() is "&path". The result will then be the value of the 'path' option. The same thing can be done with: > :exe 'let optval = &' . optname ============================================================================== *41.6* Using functions Vim defines many functions and provides a large amount of functionality that way. A few examples will be given in this section. You can find the whole list here: |functions|. A function is called with the ":call" command. The parameters are passed in between parentheses separated by commas. Example: > :call search("Date: ", "W") This calls the search() function, with arguments "Date: " and "W". The search() function uses its first argument as a search pattern and the second one as flags. The "W" flag means the search doesn't wrap around the end of the file. A function can be called in an expression. Example: > :let line = getline(".") :let repl = substitute(line, '\a', "*", "g") :call setline(".", repl) The getline() function obtains a line from the current buffer. Its argument is a specification of the line number. In this case "." is used, which means the line where the cursor is. The substitute() function does something similar to the ":substitute" command. The first argument is the string on which to perform the substitution. The second argument is the pattern, the third the replacement string. Finally, the last arguments are the flags. The setline() function sets the line, specified by the first argument, to a new string, the second argument. In this example the line under the cursor is replaced with the result of the substitute(). Thus the effect of the three statements is equal to: > :substitute/\a/*/g Using the functions becomes more interesting when you do more work before and after the substitute() call. FUNCTIONS *function-list* There are many functions. We will mention them here, grouped by what they are used for. You can find an alphabetical list here: |functions|. Use CTRL-] on the function name to jump to detailed help on it. String manipulation: *string-functions* nr2char() get a character by its ASCII value char2nr() get ASCII value of a character str2nr() convert a string to a Number str2float() convert a string to a Float printf() format a string according to % items escape() escape characters in a string with a '\' shellescape() escape a string for use with a shell command fnameescape() escape a file name for use with a Vim command tr() translate characters from one set to another strtrans() translate a string to make it printable tolower() turn a string to lowercase toupper() turn a string to uppercase match() position where a pattern matches in a string matchend() position where a pattern match ends in a string matchstr() match of a pattern in a string matchstrpos() match and positions of a pattern in a string matchlist() like matchstr() and also return submatches stridx() first index of a short string in a long string strridx() last index of a short string in a long string strlen() length of a string in bytes strchars() length of a string in characters strwidth() size of string when displayed strdisplaywidth() size of string when displayed, deals with tabs substitute() substitute a pattern match with a string submatch() get a specific match in ":s" and substitute() strpart() get part of a string using byte index strcharpart() get part of a string using char index strgetchar() get character from a string using char index expand() expand special keywords iconv() convert text from one encoding to another byteidx() byte index of a character in a string byteidxcomp() like byteidx() but count composing characters repeat() repeat a string multiple times eval() evaluate a string expression execute() execute an Ex command and get the output List manipulation: *list-functions* get() get an item without error for wrong index len() number of items in a List empty() check if List is empty insert() insert an item somewhere in a List add() append an item to a List extend() append a List to a List remove() remove one or more items from a List copy() make a shallow copy of a List deepcopy() make a full copy of a List filter() remove selected items from a List map() change each List item sort() sort a List reverse() reverse the order of a List uniq() remove copies of repeated adjacent items split() split a String into a List join() join List items into a String range() return a List with a sequence of numbers string() String representation of a List call() call a function with List as arguments index() index of a value in a List max() maximum value in a List min() minimum value in a List count() count number of times a value appears in a List repeat() repeat a List multiple times Dictionary manipulation: *dict-functions* get() get an entry without an error for a wrong key len() number of entries in a Dictionary has_key() check whether a key appears in a Dictionary empty() check if Dictionary is empty remove() remove an entry from a Dictionary extend() add entries from one Dictionary to another filter() remove selected entries from a Dictionary map() change each Dictionary entry keys() get List of Dictionary keys values() get List of Dictionary values items() get List of Dictionary key-value pairs copy() make a shallow copy of a Dictionary deepcopy() make a full copy of a Dictionary string() String representation of a Dictionary max() maximum value in a Dictionary min() minimum value in a Dictionary count() count number of times a value appears Floating point computation: *float-functions* float2nr() convert Float to Number abs() absolute value (also works for Number) round() round off ceil() round up floor() round down trunc() remove value after decimal point fmod() remainder of division exp() exponential log() natural logarithm (logarithm to base e) log10() logarithm to base 10 pow() value of x to the exponent y sqrt() square root sin() sine cos() cosine tan() tangent asin() arc sine acos() arc cosine atan() arc tangent atan2() arc tangent sinh() hyperbolic sine cosh() hyperbolic cosine tanh() hyperbolic tangent Other computation: *bitwise-function* and() bitwise AND invert() bitwise invert or() bitwise OR xor() bitwise XOR sha256() SHA-256 hash Variables: *var-functions* type() type of a variable islocked() check if a variable is locked funcref() get a Funcref for a function reference function() get a Funcref for a function name getbufvar() get a variable value from a specific buffer setbufvar() set a variable in a specific buffer getwinvar() get a variable from specific window gettabvar() get a variable from specific tab page gettabwinvar() get a variable from specific window & tab page setwinvar() set a variable in a specific window settabvar() set a variable in a specific tab page settabwinvar() set a variable in a specific window & tab page garbagecollect() possibly free memory Cursor and mark position: *cursor-functions* *mark-functions* col() column number of the cursor or a mark virtcol() screen column of the cursor or a mark line() line number of the cursor or mark wincol() window column number of the cursor winline() window line number of the cursor cursor() position the cursor at a line/column screencol() get screen column of the cursor screenrow() get screen row of the cursor getcurpos() get position of the cursor getpos() get position of cursor, mark, etc. setpos() set position of cursor, mark, etc. byte2line() get line number at a specific byte count line2byte() byte count at a specific line diff_filler() get the number of filler lines above a line screenattr() get attribute at a screen line/row screenchar() get character code at a screen line/row Working with text in the current buffer: *text-functions* getline() get a line or list of lines from the buffer setline() replace a line in the buffer append() append line or list of lines in the buffer indent() indent of a specific line cindent() indent according to C indenting lispindent() indent according to Lisp indenting nextnonblank() find next non-blank line prevnonblank() find previous non-blank line search() find a match for a pattern searchpos() find a match for a pattern searchpair() find the other end of a start/skip/end searchpairpos() find the other end of a start/skip/end searchdecl() search for the declaration of a name getcharsearch() return character search information setcharsearch() set character search information *system-functions* *file-functions* System functions and manipulation of files: glob() expand wildcards globpath() expand wildcards in a number of directories glob2regpat() convert a glob pattern into a search pattern findfile() find a file in a list of directories finddir() find a directory in a list of directories resolve() find out where a shortcut points to fnamemodify() modify a file name pathshorten() shorten directory names in a path simplify() simplify a path without changing its meaning executable() check if an executable program exists exepath() full path of an executable program filereadable() check if a file can be read filewritable() check if a file can be written to getfperm() get the permissions of a file setfperm() set the permissions of a file getftype() get the kind of a file isdirectory() check if a directory exists getfsize() get the size of a file getcwd() get the current working directory haslocaldir() check if current window used |:lcd| tempname() get the name of a temporary file mkdir() create a new directory delete() delete a file rename() rename a file system() get the result of a shell command as a string systemlist() get the result of a shell command as a list hostname() name of the system readfile() read a file into a List of lines writefile() write a List of lines into a file Date and Time: *date-functions* *time-functions* getftime() get last modification time of a file localtime() get current time in seconds strftime() convert time to a string reltime() get the current or elapsed time accurately reltimestr() convert reltime() result to a string reltimefloat() convert reltime() result to a Float *buffer-functions* *window-functions* *arg-functions* Buffers, windows and the argument list: argc() number of entries in the argument list argidx() current position in the argument list arglistid() get id of the argument list argv() get one entry from the argument list bufexists() check if a buffer exists buflisted() check if a buffer exists and is listed bufloaded() check if a buffer exists and is loaded bufname() get the name of a specific buffer bufnr() get the buffer number of a specific buffer tabpagebuflist() return List of buffers in a tab page tabpagenr() get the number of a tab page tabpagewinnr() like winnr() for a specified tab page winnr() get the window number for the current window bufwinid() get the window ID of a specific buffer bufwinnr() get the window number of a specific buffer winbufnr() get the buffer number of a specific window getbufline() get a list of lines from the specified buffer win_findbuf() find windows containing a buffer win_getid() get window ID of a window win_gotoid() go to window with ID win_id2tabwin() get tab and window nr from window ID win_id2win() get window nr from window ID getbufinfo() get a list with buffer information gettabinfo() get a list with tab page information getwininfo() get a list with window information Command line: *command-line-functions* getcmdline() get the current command line getcmdpos() get position of the cursor in the command line setcmdpos() set position of the cursor in the command line getcmdtype() return the current command-line type getcmdwintype() return the current command-line window type getcompletion() list of command-line completion matches Quickfix and location lists: *quickfix-functions* getqflist() list of quickfix errors setqflist() modify a quickfix list getloclist() list of location list items setloclist() modify a location list Insert mode completion: *completion-functions* complete() set found matches complete_add() add to found matches complete_check() check if completion should be aborted pumvisible() check if the popup menu is displayed Folding: *folding-functions* foldclosed() check for a closed fold at a specific line foldclosedend() like foldclosed() but return the last line foldlevel() check for the fold level at a specific line foldtext() generate the line displayed for a closed fold foldtextresult() get the text displayed for a closed fold Syntax and highlighting: *syntax-functions* *highlighting-functions* clearmatches() clear all matches defined by |matchadd()| and the |:match| commands getmatches() get all matches defined by |matchadd()| and the |:match| commands hlexists() check if a highlight group exists hlID() get ID of a highlight group synID() get syntax ID at a specific position synIDattr() get a specific attribute of a syntax ID synIDtrans() get translated syntax ID synstack() get list of syntax IDs at a specific position synconcealed() get info about concealing diff_hlID() get highlight ID for diff mode at a position matchadd() define a pattern to highlight (a "match") matchaddpos() define a list of positions to highlight matcharg() get info about |:match| arguments matchdelete() delete a match defined by |matchadd()| or a |:match| command setmatches() restore a list of matches saved by |getmatches()| Spelling: *spell-functions* spellbadword() locate badly spelled word at or after cursor spellsuggest() return suggested spelling corrections soundfold() return the sound-a-like equivalent of a word History: *history-functions* histadd() add an item to a history histdel() delete an item from a history histget() get an item from a history histnr() get highest index of a history list Interactive: *interactive-functions* browse() put up a file requester browsedir() put up a directory requester confirm() let the user make a choice getchar() get a character from the user getcharmod() get modifiers for the last typed character feedkeys() put characters in the typeahead queue input() get a line from the user inputlist() let the user pick an entry from a list inputsecret() get a line from the user without showing it inputdialog() get a line from the user in a dialog inputsave() save and clear typeahead inputrestore() restore typeahead GUI: *gui-functions* getfontname() get name of current font being used getwinposx() X position of the GUI Vim window getwinposy() Y position of the GUI Vim window balloon_show() set the balloon content Vim server: *server-functions* serverlist() return the list of server names remote_startserver() run a server remote_send() send command characters to a Vim server remote_expr() evaluate an expression in a Vim server server2client() send a reply to a client of a Vim server remote_peek() check if there is a reply from a Vim server remote_read() read a reply from a Vim server foreground() move the Vim window to the foreground remote_foreground() move the Vim server window to the foreground Window size and position: *window-size-functions* winheight() get height of a specific window winwidth() get width of a specific window winrestcmd() return command to restore window sizes winsaveview() get view of current window winrestview() restore saved view of current window Mappings: *mapping-functions* hasmapto() check if a mapping exists mapcheck() check if a matching mapping exists maparg() get rhs of a mapping wildmenumode() check if the wildmode is active Testing: *test-functions* assert_equal() assert that two expressions values are equal assert_notequal() assert that two expressions values are not equal assert_inrange() assert that an expression is inside a range assert_match() assert that a pattern matches the value assert_notmatch() assert that a pattern does not match the value assert_false() assert that an expression is false assert_true() assert that an expression is true assert_exception() assert that a command throws an exception assert_fails() assert that a function call fails Timers: *timer-functions* timer_start() create a timer timer_stop() stop a timer Various: *various-functions* mode() get current editing mode visualmode() last visual mode used exists() check if a variable, function, etc. exists has() check if a feature is supported in Vim changenr() return number of most recent change cscope_connection() check if a cscope connection exists did_filetype() check if a FileType autocommand was used eventhandler() check if invoked by an event handler getpid() get process ID of Vim libcall() call a function in an external library libcallnr() idem, returning a number undofile() get the name of the undo file undotree() return the state of the undo tree getreg() get contents of a register getregtype() get type of a register setreg() set contents and type of a register shiftwidth() effective value of 'shiftwidth' wordcount() get byte/word/char count of buffer taglist() get list of matching tags tagfiles() get a list of tags files luaeval() evaluate Lua expression py3eval() evaluate Python expression (|+python3|) pyeval() evaluate Python expression (|+python|) pyxeval() evaluate |python_x| expression ============================================================================== *41.7* Defining a function Vim enables you to define your own functions. The basic function declaration begins as follows: > :function {name}({var1}, {var2}, ...) : {body} :endfunction < Note: Function names must begin with a capital letter. Let's define a short function to return the smaller of two numbers. It starts with this line: > :function Min(num1, num2) This tells Vim that the function is named "Min" and it takes two arguments: "num1" and "num2". The first thing you need to do is to check to see which number is smaller: > : if a:num1 < a:num2 The special prefix "a:" tells Vim that the variable is a function argument. Let's assign the variable "smaller" the value of the smallest number: > : if a:num1 < a:num2 : let smaller = a:num1 : else : let smaller = a:num2 : endif The variable "smaller" is a local variable. Variables used inside a function are local unless prefixed by something like "g:", "a:", or "s:". Note: To access a global variable from inside a function you must prepend "g:" to it. Thus "g:today" inside a function is used for the global variable "today", and "today" is another variable, local to the function. You now use the ":return" statement to return the smallest number to the user. Finally, you end the function: > : return smaller :endfunction The complete function definition is as follows: > :function Min(num1, num2) : if a:num1 < a:num2 : let smaller = a:num1 : else : let smaller = a:num2 : endif : return smaller :endfunction For people who like short functions, this does the same thing: > :function Min(num1, num2) : if a:num1 < a:num2 : return a:num1 : endif : return a:num2 :endfunction A user defined function is called in exactly the same way as a built-in function. Only the name is different. The Min function can be used like this: > :echo Min(5, 8) Only now will the function be executed and the lines be interpreted by Vim. If there are mistakes, like using an undefined variable or function, you will now get an error message. When defining the function these errors are not detected. When a function reaches ":endfunction" or ":return" is used without an argument, the function returns zero. To redefine a function that already exists, use the ! for the ":function" command: > :function! Min(num1, num2, num3) USING A RANGE The ":call" command can be given a line range. This can have one of two meanings. When a function has been defined with the "range" keyword, it will take care of the line range itself. The function will be passed the variables "a:firstline" and "a:lastline". These will have the line numbers from the range the function was called with. Example: > :function Count_words() range : let lnum = a:firstline : let n = 0 : while lnum <= a:lastline : let n = n + len(split(getline(lnum))) : let lnum = lnum + 1 : endwhile : echo "found " . n . " words" :endfunction You can call this function with: > :10,30call Count_words() It will be executed once and echo the number of words. The other way to use a line range is by defining a function without the "range" keyword. The function will be called once for every line in the range, with the cursor in that line. Example: > :function Number() : echo "line " . line(".") . " contains: " . getline(".") :endfunction If you call this function with: > :10,15call Number() The function will be called six times. VARIABLE NUMBER OF ARGUMENTS Vim enables you to define functions that have a variable number of arguments. The following command, for instance, defines a function that must have 1 argument (start) and can have up to 20 additional arguments: > :function Show(start, ...) The variable "a:1" contains the first optional argument, "a:2" the second, and so on. The variable "a:0" contains the number of extra arguments. For example: > :function Show(start, ...) : echohl Title : echo "start is " . a:start : echohl None : let index = 1 : while index <= a:0 : echo " Arg " . index . " is " . a:{index} : let index = index + 1 : endwhile : echo "" :endfunction This uses the ":echohl" command to specify the highlighting used for the following ":echo" command. ":echohl None" stops it again. The ":echon" command works like ":echo", but doesn't output a line break. You can also use the a:000 variable, it is a List of all the "..." arguments. See |a:000|. LISTING FUNCTIONS The ":function" command lists the names and arguments of all user-defined functions: > :function < function Show(start, ...) ~ function GetVimIndent() ~ function SetSyn(name) ~ To see what a function does, use its name as an argument for ":function": > :function SetSyn < 1 if &syntax == '' ~ 2 let &syntax = a:name ~ 3 endif ~ endfunction ~ DEBUGGING The line number is useful for when you get an error message or when debugging. See |debug-scripts| about debugging mode. You can also set the 'verbose' option to 12 or higher to see all function calls. Set it to 15 or higher to see every executed line. DELETING A FUNCTION To delete the Show() function: > :delfunction Show You get an error when the function doesn't exist. FUNCTION REFERENCES Sometimes it can be useful to have a variable point to one function or another. You can do it with the function() function. It turns the name of a function into a reference: > :let result = 0 " or 1 :function! Right() : return 'Right!' :endfunc :function! Wrong() : return 'Wrong!' :endfunc : :if result == 1 : let Afunc = function('Right') :else : let Afunc = function('Wrong') :endif :echo call(Afunc, []) < Wrong! ~ Note that the name of a variable that holds a function reference must start with a capital. Otherwise it could be confused with the name of a builtin function. The way to invoke a function that a variable refers to is with the call() function. Its first argument is the function reference, the second argument is a List with arguments. Function references are most useful in combination with a Dictionary, as is explained in the next section. ============================================================================== *41.8* Lists and Dictionaries So far we have used the basic types String and Number. Vim also supports two composite types: List and Dictionary. A List is an ordered sequence of things. The things can be any kind of value, thus you can make a List of numbers, a List of Lists and even a List of mixed items. To create a List with three strings: > :let alist = ['aap', 'mies', 'noot'] The List items are enclosed in square brackets and separated by commas. To create an empty List: > :let alist = [] You can add items to a List with the add() function: > :let alist = [] :call add(alist, 'foo') :call add(alist, 'bar') :echo alist < ['foo', 'bar'] ~ List concatenation is done with +: > :echo alist + ['foo', 'bar'] < ['foo', 'bar', 'foo', 'bar'] ~ Or, if you want to extend a List directly: > :let alist = ['one'] :call extend(alist, ['two', 'three']) :echo alist < ['one', 'two', 'three'] ~ Notice that using add() will have a different effect: > :let alist = ['one'] :call add(alist, ['two', 'three']) :echo alist < ['one', ['two', 'three']] ~ The second argument of add() is added as a single item. FOR LOOP One of the nice things you can do with a List is iterate over it: > :let alist = ['one', 'two', 'three'] :for n in alist : echo n :endfor < one ~ two ~ three ~ This will loop over each element in List "alist", assigning the value to variable "n". The generic form of a for loop is: > :for {varname} in {listexpression} : {commands} :endfor To loop a certain number of times you need a List of a specific length. The range() function creates one for you: > :for a in range(3) : echo a :endfor < 0 ~ 1 ~ 2 ~ Notice that the first item of the List that range() produces is zero, thus the last item is one less than the length of the list. You can also specify the maximum value, the stride and even go backwards: > :for a in range(8, 4, -2) : echo a :endfor < 8 ~ 6 ~ 4 ~ A more useful example, looping over lines in the buffer: > :for line in getline(1, 20) : if line =~ "Date: " : echo matchstr(line, 'Date: \zs.*') : endif :endfor This looks into lines 1 to 20 (inclusive) and echoes any date found in there. DICTIONARIES A Dictionary stores key-value pairs. You can quickly lookup a value if you know the key. A Dictionary is created with curly braces: > :let uk2nl = {'one': 'een', 'two': 'twee', 'three': 'drie'} Now you can lookup words by putting the key in square brackets: > :echo uk2nl['two'] < twee ~ The generic form for defining a Dictionary is: > {<key> : <value>, ...} An empty Dictionary is one without any keys: > {} The possibilities with Dictionaries are numerous. There are various functions for them as well. For example, you can obtain a list of the keys and loop over them: > :for key in keys(uk2nl) : echo key :endfor < three ~ one ~ two ~ You will notice the keys are not ordered. You can sort the list to get a specific order: > :for key in sort(keys(uk2nl)) : echo key :endfor < one ~ three ~ two ~ But you can never get back the order in which items are defined. For that you need to use a List, it stores items in an ordered sequence. DICTIONARY FUNCTIONS The items in a Dictionary can normally be obtained with an index in square brackets: > :echo uk2nl['one'] < een ~ A method that does the same, but without so many punctuation characters: > :echo uk2nl.one < een ~ This only works for a key that is made of ASCII letters, digits and the underscore. You can also assign a new value this way: > :let uk2nl.four = 'vier' :echo uk2nl < {'three': 'drie', 'four': 'vier', 'one': 'een', 'two': 'twee'} ~ And now for something special: you can directly define a function and store a reference to it in the dictionary: > :function uk2nl.translate(line) dict : return join(map(split(a:line), 'get(self, v:val, "???")')) :endfunction Let's first try it out: > :echo uk2nl.translate('three two five one') < drie twee ??? een ~ The first special thing you notice is the "dict" at the end of the ":function" line. This marks the function as being used from a Dictionary. The "self" local variable will then refer to that Dictionary. Now let's break up the complicated return command: > split(a:line) The split() function takes a string, chops it into whitespace separated words and returns a list with these words. Thus in the example it returns: > :echo split('three two five one') < ['three', 'two', 'five', 'one'] ~ This list is the first argument to the map() function. This will go through the list, evaluating its second argument with "v:val" set to the value of each item. This is a shortcut to using a for loop. This command: > :let alist = map(split(a:line), 'get(self, v:val, "???")') Is equivalent to: > :let alist = split(a:line) :for idx in range(len(alist)) : let alist[idx] = get(self, alist[idx], "???") :endfor The get() function checks if a key is present in a Dictionary. If it is, then the value is retrieved. If it isn't, then the default value is returned, in the example it's '???'. This is a convenient way to handle situations where a key may not be present and you don't want an error message. The join() function does the opposite of split(): it joins together a list of words, putting a space in between. This combination of split(), map() and join() is a nice way to filter a line of words in a very compact way. OBJECT ORIENTED PROGRAMMING Now that you can put both values and functions in a Dictionary, you can actually use a Dictionary like an object. Above we used a Dictionary for translating Dutch to English. We might want to do the same for other languages. Let's first make an object (aka Dictionary) that has the translate function, but no words to translate: > :let transdict = {} :function transdict.translate(line) dict : return join(map(split(a:line), 'get(self.words, v:val, "???")')) :endfunction It's slightly different from the function above, using 'self.words' to lookup word translations. But we don't have a self.words. Thus you could call this an abstract class. Now we can instantiate a Dutch translation object: > :let uk2nl = copy(transdict) :let uk2nl.words = {'one': 'een', 'two': 'twee', 'three': 'drie'} :echo uk2nl.translate('three one') < drie een ~ And a German translator: > :let uk2de = copy(transdict) :let uk2de.words = {'one': 'eins', 'two': 'zwei', 'three': 'drei'} :echo uk2de.translate('three one') < drei eins ~ You see that the copy() function is used to make a copy of the "transdict" Dictionary and then the copy is changed to add the words. The original remains the same, of course. Now you can go one step further, and use your preferred translator: > :if $LANG =~ "de" : let trans = uk2de :else : let trans = uk2nl :endif :echo trans.translate('one two three') < een twee drie ~ Here "trans" refers to one of the two objects (Dictionaries). No copy is made. More about List and Dictionary identity can be found at |list-identity| and |dict-identity|. Now you might use a language that isn't supported. You can overrule the translate() function to do nothing: > :let uk2uk = copy(transdict) :function! uk2uk.translate(line) : return a:line :endfunction :echo uk2uk.translate('three one wladiwostok') < three one wladiwostok ~ Notice that a ! was used to overwrite the existing function reference. Now use "uk2uk" when no recognized language is found: > :if $LANG =~ "de" : let trans = uk2de :elseif $LANG =~ "nl" : let trans = uk2nl :else : let trans = uk2uk :endif :echo trans.translate('one two three') < one two three ~ For further reading see |Lists| and |Dictionaries|. ============================================================================== *41.9* Exceptions Let's start with an example: > :try : read ~/templates/pascal.tmpl :catch /E484:/ : echo "Sorry, the Pascal template file cannot be found." :endtry The ":read" command will fail if the file does not exist. Instead of generating an error message, this code catches the error and gives the user a nice message. For the commands in between ":try" and ":endtry" errors are turned into exceptions. An exception is a string. In the case of an error the string contains the error message. And every error message has a number. In this case, the error we catch contains "E484:". This number is guaranteed to stay the same (the text may change, e.g., it may be translated). When the ":read" command causes another error, the pattern "E484:" will not match in it. Thus this exception will not be caught and result in the usual error message. You might be tempted to do this: > :try : read ~/templates/pascal.tmpl :catch : echo "Sorry, the Pascal template file cannot be found." :endtry This means all errors are caught. But then you will not see errors that are useful, such as "E21: Cannot make changes, 'modifiable' is off". Another useful mechanism is the ":finally" command: > :let tmp = tempname() :try : exe ".,$write " . tmp : exe "!filter " . tmp : .,$delete : exe "$read " . tmp :finally : call delete(tmp) :endtry This filters the lines from the cursor until the end of the file through the "filter" command, which takes a file name argument. No matter if the filtering works, something goes wrong in between ":try" and ":finally" or the user cancels the filtering by pressing CTRL-C, the "call delete(tmp)" is always executed. This makes sure you don't leave the temporary file behind. More information about exception handling can be found in the reference manual: |exception-handling|. ============================================================================== *41.10* Various remarks Here is a summary of items that apply to Vim scripts. They are also mentioned elsewhere, but form a nice checklist. The end-of-line character depends on the system. For Unix a single <NL> character is used. For Windows <CR><LF> is used. This is important when using mappings that end in a <CR>. See |:source_crnl|. WHITE SPACE Blank lines are allowed and ignored. Leading whitespace characters (blanks and TABs) are always ignored. The whitespaces between parameters (e.g. between the "set" and the "cpoptions" in the example below) are reduced to one blank character and plays the role of a separator, the whitespaces after the last (visible) character may or may not be ignored depending on the situation, see below. For a ":set" command involving the "=" (equal) sign, such as in: > :set cpoptions =aABceFst the whitespace immediately before the "=" sign is ignored. But there can be no whitespace after the "=" sign! To include a whitespace character in the value of an option, it must be escaped by a "\" (backslash) as in the following example: > :set tags=my\ nice\ file The same example written as: > :set tags=my nice file will issue an error, because it is interpreted as: > :set tags=my :set nice :set file COMMENTS The character " (the double quote mark) starts a comment. Everything after and including this character until the end-of-line is considered a comment and is ignored, except for commands that don't consider comments, as shown in examples below. A comment can start on any character position on the line. There is a little "catch" with comments for some commands. Examples: > :abbrev dev development " shorthand :map <F3> o#include " insert include :execute cmd " do it :!ls *.c " list C files The abbreviation 'dev' will be expanded to 'development " shorthand'. The mapping of <F3> will actually be the whole line after the 'o# ....' including the '" insert include'. The "execute" command will give an error. The "!" command will send everything after it to the shell, causing an error for an unmatched '"' character. There can be no comment after ":map", ":abbreviate", ":execute" and "!" commands (there are a few more commands with this restriction). For the ":map", ":abbreviate" and ":execute" commands there is a trick: > :abbrev dev development|" shorthand :map <F3> o#include|" insert include :execute cmd |" do it With the '|' character the command is separated from the next one. And that next command is only a comment. For the last command you need to do two things: |:execute| and use '|': > :exe '!ls *.c' |" list C files Notice that there is no white space before the '|' in the abbreviation and mapping. For these commands, any character until the end-of-line or '|' is included. As a consequence of this behavior, you don't always see that trailing whitespace is included: > :map <F4> o#include To spot these problems, you can set the 'list' option when editing vimrc files. For Unix there is one special way to comment a line, that allows making a Vim script executable: > #!/usr/bin/env vim -S echo "this is a Vim script" quit The "#" command by itself lists a line with the line number. Adding an exclamation mark changes it into doing nothing, so that you can add the shell command to execute the rest of the file. |:#!| |-S| PITFALLS Even bigger problem arises in the following example: > :map ,ab o#include :unmap ,ab Here the unmap command will not work, because it tries to unmap ",ab ". This does not exist as a mapped sequence. An error will be issued, which is very hard to identify, because the ending whitespace character in ":unmap ,ab " is not visible. And this is the same as what happens when one uses a comment after an 'unmap' command: > :unmap ,ab " comment Here the comment part will be ignored. However, Vim will try to unmap ',ab ', which does not exist. Rewrite it as: > :unmap ,ab| " comment RESTORING THE VIEW Sometimes you want to make a change and go back to where the cursor was. Restoring the relative position would also be nice, so that the same line appears at the top of the window. This example yanks the current line, puts it above the first line in the file and then restores the view: > map ,p ma"aYHmbgg"aP`bzt`a What this does: > ma"aYHmbgg"aP`bzt`a < ma set mark a at cursor position "aY yank current line into register a Hmb go to top line in window and set mark b there gg go to first line in file "aP put the yanked line above it `b go back to top line in display zt position the text in the window as before `a go back to saved cursor position PACKAGING To avoid your function names to interfere with functions that you get from others, use this scheme: - Prepend a unique string before each function name. I often use an abbreviation. For example, "OW_" is used for the option window functions. - Put the definition of your functions together in a file. Set a global variable to indicate that the functions have been loaded. When sourcing the file again, first unload the functions. Example: > " This is the XXX package if exists("XXX_loaded") delfun XXX_one delfun XXX_two endif function XXX_one(a) ... body of function ... endfun function XXX_two(b) ... body of function ... endfun let XXX_loaded = 1 ============================================================================== *41.11* Writing a plugin *write-plugin* You can write a Vim script in such a way that many people can use it. This is called a plugin. Vim users can drop your script in their plugin directory and use its features right away |add-plugin|. There are actually two types of plugins: global plugins: For all types of files. filetype plugins: Only for files of a specific type. In this section the first type is explained. Most items are also relevant for writing filetype plugins. The specifics for filetype plugins are in the next section |write-filetype-plugin|. NAME First of all you must choose a name for your plugin. The features provided by the plugin should be clear from its name. And it should be unlikely that someone else writes a plugin with the same name but which does something different. And please limit the name to 8 characters, to avoid problems on old Windows systems. A script that corrects typing mistakes could be called "typecorr.vim". We will use it here as an example. For the plugin to work for everybody, it should follow a few guidelines. This will be explained step-by-step. The complete example plugin is at the end. BODY Let's start with the body of the plugin, the lines that do the actual work: > 14 iabbrev teh the 15 iabbrev otehr other 16 iabbrev wnat want 17 iabbrev synchronisation 18 \ synchronization 19 let s:count = 4 The actual list should be much longer, of course. The line numbers have only been added to explain a few things, don't put them in your plugin file! HEADER You will probably add new corrections to the plugin and soon have several versions lying around. And when distributing this file, people will want to know who wrote this wonderful plugin and where they can send remarks. Therefore, put a header at the top of your plugin: > 1 " Vim global plugin for correcting typing mistakes 2 " Last Change: 2000 Oct 15 3 " Maintainer: Bram Moolenaar <Bram@vim.org> About copyright and licensing: Since plugins are very useful and it's hardly worth restricting their distribution, please consider making your plugin either public domain or use the Vim |license|. A short note about this near the top of the plugin should be sufficient. Example: > 4 " License: This file is placed in the public domain. LINE CONTINUATION, AVOIDING SIDE EFFECTS *use-cpo-save* In line 18 above, the line-continuation mechanism is used |line-continuation|. Users with 'compatible' set will run into trouble here, they will get an error message. We can't just reset 'compatible', because that has a lot of side effects. To avoid this, we will set the 'cpoptions' option to its Vim default value and restore it later. That will allow the use of line-continuation and make the script work for most people. It is done like this: > 11 let s:save_cpo = &cpo 12 set cpo&vim .. 42 let &cpo = s:save_cpo 43 unlet s:save_cpo We first store the old value of 'cpoptions' in the s:save_cpo variable. At the end of the plugin this value is restored. Notice that a script-local variable is used |s:var|. A global variable could already be in use for something else. Always use script-local variables for things that are only used in the script. NOT LOADING It's possible that a user doesn't always want to load this plugin. Or the system administrator has dropped it in the system-wide plugin directory, but a user has his own plugin he wants to use. Then the user must have a chance to disable loading this specific plugin. This will make it possible: > 6 if exists("g:loaded_typecorr") 7 finish 8 endif 9 let g:loaded_typecorr = 1 This also avoids that when the script is loaded twice it would cause error messages for redefining functions and cause trouble for autocommands that are added twice. The name is recommended to start with "loaded_" and then the file name of the plugin, literally. The "g:" is prepended just to avoid mistakes when using the variable in a function (without "g:" it would be a variable local to the function). Using "finish" stops Vim from reading the rest of the file, it's much quicker than using if-endif around the whole file. MAPPING Now let's make the plugin more interesting: We will add a mapping that adds a correction for the word under the cursor. We could just pick a key sequence for this mapping, but the user might already use it for something else. To allow the user to define which keys a mapping in a plugin uses, the <Leader> item can be used: > 22 map <unique> <Leader>a <Plug>TypecorrAdd The "<Plug>TypecorrAdd" thing will do the work, more about that further on. The user can set the "mapleader" variable to the key sequence that he wants this mapping to start with. Thus if the user has done: > let mapleader = "_" the mapping will define "_a". If the user didn't do this, the default value will be used, which is a backslash. Then a map for "\a" will be defined. Note that <unique> is used, this will cause an error message if the mapping already happened to exist. |:map-<unique>| But what if the user wants to define his own key sequence? We can allow that with this mechanism: > 21 if !hasmapto('<Plug>TypecorrAdd') 22 map <unique> <Leader>a <Plug>TypecorrAdd 23 endif This checks if a mapping to "<Plug>TypecorrAdd" already exists, and only defines the mapping from "<Leader>a" if it doesn't. The user then has a chance of putting this in his vimrc file: > map ,c <Plug>TypecorrAdd Then the mapped key sequence will be ",c" instead of "_a" or "\a". PIECES If a script gets longer, you often want to break up the work in pieces. You can use functions or mappings for this. But you don't want these functions and mappings to interfere with the ones from other scripts. For example, you could define a function Add(), but another script could try to define the same function. To avoid this, we define the function local to the script by prepending it with "s:". We will define a function that adds a new typing correction: > 30 function s:Add(from, correct) 31 let to = input("type the correction for " . a:from . ": ") 32 exe ":iabbrev " . a:from . " " . to .. 36 endfunction Now we can call the function s:Add() from within this script. If another script also defines s:Add(), it will be local to that script and can only be called from the script it was defined in. There can also be a global Add() function (without the "s:"), which is again another function. <SID> can be used with mappings. It generates a script ID, which identifies the current script. In our typing correction plugin we use it like this: > 24 noremap <unique> <script> <Plug>TypecorrAdd <SID>Add .. 28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR> Thus when a user types "\a", this sequence is invoked: > \a -> <Plug>TypecorrAdd -> <SID>Add -> :call <SID>Add() If another script would also map <SID>Add, it would get another script ID and thus define another mapping. Note that instead of s:Add() we use <SID>Add() here. That is because the mapping is typed by the user, thus outside of the script. The <SID> is translated to the script ID, so that Vim knows in which script to look for the Add() function. This is a bit complicated, but it's required for the plugin to work together with other plugins. The basic rule is that you use <SID>Add() in mappings and s:Add() in other places (the script itself, autocommands, user commands). We can also add a menu entry to do the same as the mapping: > 26 noremenu <script> Plugin.Add\ Correction <SID>Add The "Plugin" menu is recommended for adding menu items for plugins. In this case only one item is used. When adding more items, creating a submenu is recommended. For example, "Plugin.CVS" could be used for a plugin that offers CVS operations "Plugin.CVS.checkin", "Plugin.CVS.checkout", etc. Note that in line 28 ":noremap" is used to avoid that any other mappings cause trouble. Someone may have remapped ":call", for example. In line 24 we also use ":noremap", but we do want "<SID>Add" to be remapped. This is why "<script>" is used here. This only allows mappings which are local to the script. |:map-<script>| The same is done in line 26 for ":noremenu". |:menu-<script>| <SID> AND <Plug> *using-<Plug>* Both <SID> and <Plug> are used to avoid that mappings of typed keys interfere with mappings that are only to be used from other mappings. Note the difference between using <SID> and <Plug>: <Plug> is visible outside of the script. It is used for mappings which the user might want to map a key sequence to. <Plug> is a special code that a typed key will never produce. To make it very unlikely that other plugins use the same sequence of characters, use this structure: <Plug> scriptname mapname In our example the scriptname is "Typecorr" and the mapname is "Add". This results in "<Plug>TypecorrAdd". Only the first character of scriptname and mapname is uppercase, so that we can see where mapname starts. <SID> is the script ID, a unique identifier for a script. Internally Vim translates <SID> to "<SNR>123_", where "123" can be any number. Thus a function "<SID>Add()" will have a name "<SNR>11_Add()" in one script, and "<SNR>22_Add()" in another. You can see this if you use the ":function" command to get a list of functions. The translation of <SID> in mappings is exactly the same, that's how you can call a script-local function from a mapping. USER COMMAND Now let's add a user command to add a correction: > 38 if !exists(":Correct") 39 command -nargs=1 Correct :call s:Add(<q-args>, 0) 40 endif The user command is defined only if no command with the same name already exists. Otherwise we would get an error here. Overriding the existing user command with ":command!" is not a good idea, this would probably make the user wonder why the command he defined himself doesn't work. |:command| SCRIPT VARIABLES When a variable starts with "s:" it is a script variable. It can only be used inside a script. Outside the script it's not visible. This avoids trouble with using the same variable name in different scripts. The variables will be kept as long as Vim is running. And the same variables are used when sourcing the same script again. |s:var| The fun is that these variables can also be used in functions, autocommands and user commands that are defined in the script. In our example we can add a few lines to count the number of corrections: > 19 let s:count = 4 .. 30 function s:Add(from, correct) .. 34 let s:count = s:count + 1 35 echo s:count . " corrections now" 36 endfunction First s:count is initialized to 4 in the script itself. When later the s:Add() function is called, it increments s:count. It doesn't matter from where the function was called, since it has been defined in the script, it will use the local variables from this script. THE RESULT Here is the resulting complete example: > 1 " Vim global plugin for correcting typing mistakes 2 " Last Change: 2000 Oct 15 3 " Maintainer: Bram Moolenaar <Bram@vim.org> 4 " License: This file is placed in the public domain. 5 6 if exists("g:loaded_typecorr") 7 finish 8 endif 9 let g:loaded_typecorr = 1 10 11 let s:save_cpo = &cpo 12 set cpo&vim 13 14 iabbrev teh the 15 iabbrev otehr other 16 iabbrev wnat want 17 iabbrev synchronisation 18 \ synchronization 19 let s:count = 4 20 21 if !hasmapto('<Plug>TypecorrAdd') 22 map <unique> <Leader>a <Plug>TypecorrAdd 23 endif 24 noremap <unique> <script> <Plug>TypecorrAdd <SID>Add 25 26 noremenu <script> Plugin.Add\ Correction <SID>Add 27 28 noremap <SID>Add :call <SID>Add(expand("<cword>"), 1)<CR> 29 30 function s:Add(from, correct) 31 let to = input("type the correction for " . a:from . ": ") 32 exe ":iabbrev " . a:from . " " . to 33 if a:correct | exe "normal viws\<C-R>\" \b\e" | endif 34 let s:count = s:count + 1 35 echo s:count . " corrections now" 36 endfunction 37 38 if !exists(":Correct") 39 command -nargs=1 Correct :call s:Add(<q-args>, 0) 40 endif 41 42 let &cpo = s:save_cpo 43 unlet s:save_cpo Line 33 wasn't explained yet. It applies the new correction to the word under the cursor. The |:normal| command is used to use the new abbreviation. Note that mappings and abbreviations are expanded here, even though the function was called from a mapping defined with ":noremap". Using "unix" for the 'fileformat' option is recommended. The Vim scripts will then work everywhere. Scripts with 'fileformat' set to "dos" do not work on Unix. Also see |:source_crnl|. To be sure it is set right, do this before writing the file: > :set fileformat=unix DOCUMENTATION *write-local-help* It's a good idea to also write some documentation for your plugin. Especially when its behavior can be changed by the user. See |add-local-help| for how they are installed. Here is a simple example for a plugin help file, called "typecorr.txt": > 1 *typecorr.txt* Plugin for correcting typing mistakes 2 3 If you make typing mistakes, this plugin will have them corrected 4 automatically. 5 6 There are currently only a few corrections. Add your own if you like. 7 8 Mappings: 9 <Leader>a or <Plug>TypecorrAdd 10 Add a correction for the word under the cursor. 11 12 Commands: 13 :Correct {word} 14 Add a correction for {word}. 15 16 *typecorr-settings* 17 This plugin doesn't have any settings. The first line is actually the only one for which the format matters. It will be extracted from the help file to be put in the "LOCAL ADDITIONS:" section of help.txt |local-additions|. The first "*" must be in the first column of the first line. After adding your help file do ":help" and check that the entries line up nicely. You can add more tags inside ** in your help file. But be careful not to use existing help tags. You would probably use the name of your plugin in most of them, like "typecorr-settings" in the example. Using references to other parts of the help in || is recommended. This makes it easy for the user to find associated help. FILETYPE DETECTION *plugin-filetype* If your filetype is not already detected by Vim, you should create a filetype detection snippet in a separate file. It is usually in the form of an autocommand that sets the filetype when the file name matches a pattern. Example: > au BufNewFile,BufRead *.foo set filetype=foofoo Write this single-line file as "ftdetect/foofoo.vim" in the first directory that appears in 'runtimepath'. For Unix that would be "~/.config/nvim/ftdetect/foofoo.vim". The convention is to use the name of the filetype for the script name. You can make more complicated checks if you like, for example to inspect the contents of the file to recognize the language. Also see |new-filetype|. SUMMARY *plugin-special* Summary of special things to use in a plugin: s:name Variables local to the script. <SID> Script-ID, used for mappings and functions local to the script. hasmapto() Function to test if the user already defined a mapping for functionality the script offers. <Leader> Value of "mapleader", which the user defines as the keys that plugin mappings start with. :map <unique> Give a warning if a mapping already exists. :noremap <script> Use only mappings local to the script, not global mappings. exists(":Cmd") Check if a user command already exists. ============================================================================== *41.12* Writing a filetype plugin *write-filetype-plugin* *ftplugin* A filetype plugin is like a global plugin, except that it sets options and defines mappings for the current buffer only. See |add-filetype-plugin| for how this type of plugin is used. First read the section on global plugins above |41.11|. All that is said there also applies to filetype plugins. There are a few extras, which are explained here. The essential thing is that a filetype plugin should only have an effect on the current buffer. DISABLING If you are writing a filetype plugin to be used by many people, they need a chance to disable loading it. Put this at the top of the plugin: > " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 This also needs to be used to avoid that the same plugin is executed twice for the same buffer (happens when using an ":edit" command without arguments). Now users can disable loading the default plugin completely by making a filetype plugin with only this line: > let b:did_ftplugin = 1 This does require that the filetype plugin directory comes before $VIMRUNTIME in 'runtimepath'! If you do want to use the default plugin, but overrule one of the settings, you can write the different setting in a script: > setlocal textwidth=70 Now write this in the "after" directory, so that it gets sourced after the distributed "vim.vim" ftplugin |after-directory|. For Unix this would be "~/.config/nvim/after/ftplugin/vim.vim". Note that the default plugin will have set "b:did_ftplugin", but it is ignored here. OPTIONS To make sure the filetype plugin only affects the current buffer use the > :setlocal command to set options. And only set options which are local to a buffer (see the help for the option to check that). When using |:setlocal| for global options or options local to a window, the value will change for many buffers, and that is not what a filetype plugin should do. When an option has a value that is a list of flags or items, consider using "+=" and "-=" to keep the existing value. Be aware that the user may have changed an option value already. First resetting to the default value and then changing it is often a good idea. Example: > :setlocal formatoptions& formatoptions+=ro MAPPINGS To make sure mappings will only work in the current buffer use the > :map <buffer> command. This needs to be combined with the two-step mapping explained above. An example of how to define functionality in a filetype plugin: > if !hasmapto('<Plug>JavaImport') map <buffer> <unique> <LocalLeader>i <Plug>JavaImport endif noremap <buffer> <unique> <Plug>JavaImport oimport ""<Left><Esc> |hasmapto()| is used to check if the user has already defined a map to <Plug>JavaImport. If not, then the filetype plugin defines the default mapping. This starts with |<LocalLeader>|, which allows the user to select the key(s) he wants filetype plugin mappings to start with. The default is a backslash. "<unique>" is used to give an error message if the mapping already exists or overlaps with an existing mapping. |:noremap| is used to avoid that any other mappings that the user has defined interferes. You might want to use ":noremap <script>" to allow remapping mappings defined in this script that start with <SID>. The user must have a chance to disable the mappings in a filetype plugin, without disabling everything. Here is an example of how this is done for a plugin for the mail filetype: > " Add mappings, unless the user didn't want this. if !exists("no_plugin_maps") && !exists("no_mail_maps") " Quote text by inserting "> " if !hasmapto('<Plug>MailQuote') vmap <buffer> <LocalLeader>q <Plug>MailQuote nmap <buffer> <LocalLeader>q <Plug>MailQuote endif vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR> nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR> endif Two global variables are used: |no_plugin_maps| disables mappings for all filetype plugins |no_mail_maps| disables mappings for the "mail" filetype USER COMMANDS To add a user command for a specific file type, so that it can only be used in one buffer, use the "-buffer" argument to |:command|. Example: > :command -buffer Make make %:r.s VARIABLES A filetype plugin will be sourced for each buffer of the type it's for. Local script variables |s:var| will be shared between all invocations. Use local buffer variables |b:var| if you want a variable specifically for one buffer. FUNCTIONS When defining a function, this only needs to be done once. But the filetype plugin will be sourced every time a file with this filetype will be opened. This construct makes sure the function is only defined once: > :if !exists("*s:Func") : function s:Func(arg) : ... : endfunction :endif < UNDO *undo_indent* *undo_ftplugin* When the user does ":setfiletype xyz" the effect of the previous filetype should be undone. Set the b:undo_ftplugin variable to the commands that will undo the settings in your filetype plugin. Example: > let b:undo_ftplugin = "setlocal fo< com< tw< commentstring<" \ . "| unlet b:match_ignorecase b:match_words b:match_skip" Using ":setlocal" with "<" after the option name resets the option to its global value. That is mostly the best way to reset the option value. This does require removing the "C" flag from 'cpoptions' to allow line continuation, as mentioned above |use-cpo-save|. For undoing the effect of an indent script, the b:undo_indent variable should be set accordingly. FILE NAME The filetype must be included in the file name |ftplugin-name|. Use one of these three forms: .../ftplugin/stuff.vim .../ftplugin/stuff_foo.vim .../ftplugin/stuff/bar.vim "stuff" is the filetype, "foo" and "bar" are arbitrary names. SUMMARY *ftplugin-special* Summary of special things to use in a filetype plugin: <LocalLeader> Value of "maplocalleader", which the user defines as the keys that filetype plugin mappings start with. :map <buffer> Define a mapping local to the buffer. :noremap <script> Only remap mappings defined in this script that start with <SID>. :setlocal Set an option for the current buffer only. :command -buffer Define a user command local to the buffer. exists("*s:Func") Check if a function was already defined. Also see |plugin-special|, the special things used for all plugins. ============================================================================== *41.13* Writing a compiler plugin *write-compiler-plugin* A compiler plugin sets options for use with a specific compiler. The user can load it with the |:compiler| command. The main use is to set the 'errorformat' and 'makeprg' options. Easiest is to have a look at examples. This command will edit all the default compiler plugins: > :next $VIMRUNTIME/compiler/*.vim Use |:next| to go to the next plugin file. There are two special items about these files. First is a mechanism to allow a user to overrule or add to the default file. The default files start with: > :if exists("current_compiler") : finish :endif :let current_compiler = "mine" When you write a compiler file and put it in your personal runtime directory (e.g., ~/.config/nvim/compiler for Unix), you set the "current_compiler" variable to make the default file skip the settings. *:CompilerSet* The second mechanism is to use ":set" for ":compiler!" and ":setlocal" for ":compiler". Vim defines the ":CompilerSet" user command for this. However, older Vim versions don't, thus your plugin should define it then. This is an example: > if exists(":CompilerSet") != 2 command -nargs=* CompilerSet setlocal <args> endif CompilerSet errorformat& " use the default 'errorformat' CompilerSet makeprg=nmake When you write a compiler plugin for the Vim distribution or for a system-wide runtime directory, use the mechanism mentioned above. When "current_compiler" was already set by a user plugin nothing will be done. When you write a compiler plugin to overrule settings from a default plugin, don't check "current_compiler". This plugin is supposed to be loaded last, thus it should be in a directory at the end of 'runtimepath'. For Unix that could be ~/.config/nvim/after/compiler. ============================================================================== *41.14* Writing a plugin that loads quickly *write-plugin-quickload* A plugin may grow and become quite long. The startup delay may become noticeable, while you hardly ever use the plugin. Then it's time for a quickload plugin. The basic idea is that the plugin is loaded twice. The first time user commands and mappings are defined that offer the functionality. The second time the functions that implement the functionality are defined. It may sound surprising that quickload means loading a script twice. What we mean is that it loads quickly the first time, postponing the bulk of the script to the second time, which only happens when you actually use it. When you always use the functionality it actually gets slower! Note that since Vim 7 there is an alternative: use the |autoload| functionality |41.15|. The following example shows how it's done: > " Vim global plugin for demonstrating quick loading " Last Change: 2005 Feb 25 " Maintainer: Bram Moolenaar <Bram@vim.org> " License: This file is placed in the public domain. if !exists("s:did_load") command -nargs=* BNRead call BufNetRead(<f-args>) map <F19> :call BufNetWrite('something')<CR> let s:did_load = 1 exe 'au FuncUndefined BufNet* source ' . expand('<sfile>') finish endif function BufNetRead(...) echo 'BufNetRead(' . string(a:000) . ')' " read functionality here endfunction function BufNetWrite(...) echo 'BufNetWrite(' . string(a:000) . ')' " write functionality here endfunction When the script is first loaded "s:did_load" is not set. The commands between the "if" and "endif" will be executed. This ends in a |:finish| command, thus the rest of the script is not executed. The second time the script is loaded "s:did_load" exists and the commands after the "endif" are executed. This defines the (possible long) BufNetRead() and BufNetWrite() functions. If you drop this script in your plugin directory Vim will execute it on startup. This is the sequence of events that happens: 1. The "BNRead" command is defined and the <F19> key is mapped when the script is sourced at startup. A |FuncUndefined| autocommand is defined. The ":finish" command causes the script to terminate early. 2. The user types the BNRead command or presses the <F19> key. The BufNetRead() or BufNetWrite() function will be called. 3. Vim can't find the function and triggers the |FuncUndefined| autocommand event. Since the pattern "BufNet*" matches the invoked function, the command "source fname" will be executed. "fname" will be equal to the name of the script, no matter where it is located, because it comes from expanding "<sfile>" (see |expand()|). 4. The script is sourced again, the "s:did_load" variable exists and the functions are defined. Notice that the functions that are loaded afterwards match the pattern in the |FuncUndefined| autocommand. You must make sure that no other plugin defines functions that match this pattern. ============================================================================== *41.15* Writing library scripts *write-library-script* Some functionality will be required in several places. When this becomes more than a few lines you will want to put it in one script and use it from many scripts. We will call that one script a library script. Manually loading a library script is possible, so long as you avoid loading it when it's already done. You can do this with the |exists()| function. Example: > if !exists('*MyLibFunction') runtime library/mylibscript.vim endif call MyLibFunction(arg) Here you need to know that MyLibFunction() is defined in a script "library/mylibscript.vim" in one of the directories in 'runtimepath'. To make this a bit simpler Vim offers the autoload mechanism. Then the example looks like this: > call mylib#myfunction(arg) That's a lot simpler, isn't it? Vim will recognize the function name and when it's not defined search for the script "autoload/mylib.vim" in 'runtimepath'. That script must define the "mylib#myfunction()" function. You can put many other functions in the mylib.vim script, you are free to organize your functions in library scripts. But you must use function names where the part before the '#' matches the script name. Otherwise Vim would not know what script to load. If you get really enthusiastic and write lots of library scripts, you may want to use subdirectories. Example: > call netlib#ftp#read('somefile') For Unix the library script used for this could be: ~/.config/nvim/autoload/netlib/ftp.vim Where the function is defined like this: > function netlib#ftp#read(fname) " Read the file fname through ftp endfunction Notice that the name the function is defined with is exactly the same as the name used for calling the function. And the part before the last '#' exactly matches the subdirectory and script name. You can use the same mechanism for variables: > let weekdays = dutch#weekdays This will load the script "autoload/dutch.vim", which should contain something like: > let dutch#weekdays = ['zondag', 'maandag', 'dinsdag', 'woensdag', \ 'donderdag', 'vrijdag', 'zaterdag'] Further reading: |autoload|. ============================================================================== *41.16* Distributing Vim scripts *distribute-script* Vim users will look for scripts on the Vim website: http://www.vim.org. If you made something that is useful for others, share it! Vim scripts can be used on any system. There might not be a tar or gzip command. If you want to pack files together and/or compress them the "zip" utility is recommended. For utmost portability use Vim itself to pack scripts together. This can be done with the Vimball utility. See |vimball|. ============================================================================== Next chapter: |usr_42.txt| Add new menus Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_42.txt�����������������������������������������������������������������0000664�0000000�0000000�00000032242�13204015742�0017120�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_42.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Add new menus By now you know that Vim is very flexible. This includes the menus used in the GUI. You can define your own menu entries to make certain commands easily accessible. This is for mouse-happy users only. |42.1| Introduction |42.2| Menu commands |42.3| Various |42.4| Toolbar and popup menus Next chapter: |usr_43.txt| Using filetypes Previous chapter: |usr_41.txt| Write a Vim script Table of contents: |usr_toc.txt| ============================================================================== *42.1* Introduction The menus that Vim uses are defined in the file "$VIMRUNTIME/menu.vim". If you want to write your own menus, you might first want to look through that file. To define a menu item, use the ":menu" command. The basic form of this command is as follows: > :menu {menu-item} {keys} The {menu-item} describes where on the menu to put the item. A typical {menu-item} is "File.Save", which represents the item "Save" under the "File" menu. A dot is used to separate the names. Example: > :menu File.Save :update<CR> The ":update" command writes the file when it was modified. You can add another level: "Edit.Settings.Shiftwidth" defines a submenu "Settings" under the "Edit" menu, with an item "Shiftwidth". You could use even deeper levels. Don't use this too much, you need to move the mouse quite a bit to use such an item. The ":menu" command is very similar to the ":map" command: the left side specifies how the item is triggered and the right hand side defines the characters that are executed. {keys} are characters, they are used just like you would have typed them. Thus in Insert mode, when {keys} is plain text, that text is inserted. ACCELERATORS The ampersand character (&) is used to indicate an accelerator. For instance, you can use Alt-F to select "File" and S to select "Save". (The 'winaltkeys' option may disable this though!). Therefore, the {menu-item} looks like "&File.&Save". The accelerator characters will be underlined in the menu. You must take care that each key is used only once in each menu. Otherwise you will not know which of the two will actually be used. Vim doesn't warn you for this. PRIORITIES The actual definition of the File.Save menu item is as follows: > :menu 10.340 &File.&Save<Tab>:w :confirm w<CR> The number 10.340 is called the priority number. It is used by the editor to decide where it places the menu item. The first number (10) indicates the position on the menu bar. Lower numbered menus are positioned to the left, higher numbers to the right. These are the priorities used for the standard menus: 10 20 40 50 60 70 9999 +------------------------------------------------------------+ | File Edit Tools Syntax Buffers Window Help | +------------------------------------------------------------+ Notice that the Help menu is given a very high number, to make it appear on the far right. The second number (340) determines the location of the item within the pull-down menu. Lower numbers go on top, higher number on the bottom. These are the priorities in the File menu: +-----------------+ 10.310 |Open... | 10.320 |Split-Open... | 10.325 |New | 10.330 |Close | 10.335 |---------------- | 10.340 |Save | 10.350 |Save As... | 10.400 |---------------- | 10.410 |Split Diff with | 10.420 |Split Patched By | 10.500 |---------------- | 10.510 |Print | 10.600 |---------------- | 10.610 |Save-Exit | 10.620 |Exit | +-----------------+ Notice that there is room in between the numbers. This is where you can insert your own items, if you really want to (it's often better to leave the standard menus alone and add a new menu for your own items). When you create a submenu, you can add another ".number" to the priority. Thus each name in {menu-item} has its priority number. SPECIAL CHARACTERS The {menu-item} in this example is "&File.&Save<Tab>:w". This brings up an important point: {menu-item} must be one word. If you want to put a dot, space or tabs in the name, you either use the <> notation (<Space> and <Tab>, for instance) or use the backslash (\) escape. > :menu 10.305 &File.&Do\ It\.\.\. :exit<CR> In this example, the name of the menu item "Do It..." contains a space and the command is ":exit<CR>". The <Tab> character in a menu name is used to separate the part that defines the menu name from the part that gives a hint to the user. The part after the <Tab> is displayed right aligned in the menu. In the File.Save menu the name used is "&File.&Save<Tab>:w". Thus the menu name is "File.Save" and the hint is ":w". SEPARATORS The separator lines, used to group related menu items together, can be defined by using a name that starts and ends in a '-'. For example "-sep-". When using several separators the names must be different. Otherwise the names don't matter. The command from a separator will never be executed, but you have to define one anyway. A single colon will do. Example: > :amenu 20.510 Edit.-sep3- : ============================================================================== *42.2* Menu commands You can define menu items that exist for only certain modes. This works just like the variations on the ":map" command: :menu Normal, Visual and Operator-pending mode :nmenu Normal mode :vmenu Visual mode :omenu Operator-pending mode :menu! Insert and Command-line mode :imenu Insert mode :cmenu Command-line mode :amenu All modes To avoid that the commands of a menu item are being mapped, use the command ":noremenu", ":nnoremenu", ":anoremenu", etc. USING :AMENU The ":amenu" command is a bit different. It assumes that the {keys} you give are to be executed in Normal mode. When Vim is in Visual or Insert mode when the menu is used, Vim first has to go back to Normal mode. ":amenu" inserts a CTRL-C or CTRL-O for you. For example, if you use this command: > :amenu 90.100 Mine.Find\ Word * Then the resulting menu commands will be: Normal mode: * Visual mode: CTRL-C * Operator-pending mode: CTRL-C * Insert mode: CTRL-O * Command-line mode: CTRL-C * When in Command-line mode the CTRL-C will abandon the command typed so far. In Visual and Operator-pending mode CTRL-C will stop the mode. The CTRL-O in Insert mode will execute the command and then return to Insert mode. CTRL-O only works for one command. If you need to use two or more commands, put them in a function and call that function. Example: > :amenu Mine.Next\ File :call <SID>NextFile()<CR> :function <SID>NextFile() : next : 1/^Code :endfunction This menu entry goes to the next file in the argument list with ":next". Then it searches for the line that starts with "Code". The <SID> before the function name is the script ID. This makes the function local to the current Vim script file. This avoids problems when a function with the same name is defined in another script file. See |<SID>|. SILENT MENUS The menu executes the {keys} as if you typed them. For a ":" command this means you will see the command being echoed on the command line. If it's a long command, the hit-Enter prompt will appear. That can be very annoying! To avoid this, make the menu silent. This is done with the <silent> argument. For example, take the call to NextFile() in the previous example. When you use this menu, you will see this on the command line: :call <SNR>34_NextFile() ~ To avoid this text on the command line, insert "<silent>" as the first argument: > :amenu <silent> Mine.Next\ File :call <SID>NextFile()<CR> Don't use "<silent>" too often. It is not needed for short commands. If you make a menu for someone else, being able the see the executed command will give him a hint about what he could have typed, instead of using the mouse. LISTING MENUS When a menu command is used without a {keys} part, it lists the already defined menus. You can specify a {menu-item}, or part of it, to list specific menus. Example: > :amenu This lists all menus. That's a long list! Better specify the name of a menu to get a shorter list: > :amenu Edit This lists only the "Edit" menu items for all modes. To list only one specific menu item for Insert mode: > :imenu Edit.Undo Take care that you type exactly the right name. Case matters here. But the '&' for accelerators can be omitted. The <Tab> and what comes after it can be left out as well. DELETING MENUS To delete a menu, the same command is used as for listing, but with "menu" changed to "unmenu". Thus ":menu" becomes, ":unmenu", ":nmenu" becomes ":nunmenu", etc. To delete the "Tools.Make" item for Insert mode: > :iunmenu Tools.Make You can delete a whole menu, with all its items, by using the menu name. Example: > :aunmenu Syntax This deletes the Syntax menu and all the items in it. ============================================================================== *42.3* Various You can change the appearance of the menus with flags in 'guioptions'. In the default value they are all included, except "M". You can remove a flag with a command like: > :set guioptions-=m < m When removed the menubar is not displayed. M When added the default menus are not loaded. g When removed the inactive menu items are not made grey but are completely removed. (Does not work on all systems.) For translating menu items, see |:menutrans|. Since the mouse has to be used to select a menu item, it is a good idea to use the ":browse" command for selecting a file. And ":confirm" to get a dialog instead of an error message, e.g., when the current buffer contains changes. These two can be combined: > :amenu File.Open :browse confirm edit<CR> The ":browse" makes a file browser appear to select the file to edit. The ":confirm" will pop up a dialog when the current buffer has changes. You can then select to save the changes, throw them away or cancel the command. For more complicated items, the confirm() and inputdialog() functions can be used. The default menus contain a few examples. ============================================================================== *42.4* Toolbar and popup menus There are two special menus: ToolBar and PopUp. Items that start with these names do not appear in the normal menu bar. TOOLBAR The toolbar appears only when the "T" flag is included in the 'guioptions' option. The toolbar uses icons rather than text to represent the command. For example, the {menu-item} named "ToolBar.New" causes the "New" icon to appear on the toolbar. The Vim editor has 28 built-in icons. You can find a table here: |builtin-tools|. Most of them are used in the default toolbar. You can redefine what these items do (after the default menus are setup). You can add another bitmap for a toolbar item. Or define a new toolbar item with a bitmap. For example, define a new toolbar item with: > :tmenu ToolBar.Compile Compile the current file :amenu ToolBar.Compile :!cc %:S -o %:r:S<CR> Now you need to create the icon. For MS-Windows it must be in bitmap format, with the name "Compile.bmp". For Unix XPM format is used, the file name is "Compile.xpm". The size must be 18 by 18 pixels. On MS-Windows other sizes can be used as well, but it will look ugly. Put the bitmap in the directory "bitmaps" in one of the directories from 'runtimepath'. E.g., for Unix "~/.config/nvim/bitmaps/Compile.xpm". You can define tooltips for the items in the toolbar. A tooltip is a short text that explains what a toolbar item will do. For example "Open file". It appears when the mouse pointer is on the item, without moving for a moment. This is very useful if the meaning of the picture isn't that obvious. Example: > :tmenu ToolBar.Make Run make in the current directory < Note: Pay attention to the case used. "Toolbar" and "toolbar" are different from "ToolBar"! To remove a tooltip, use the |:tunmenu| command. The 'toolbar' option can be used to display text instead of a bitmap, or both text and a bitmap. Most people use just the bitmap, since the text takes quite a bit of space. POPUP MENU The popup menu pops up where the mouse pointer is. On MS-Windows you activate it by clicking the right mouse button. Then you can select an item with the left mouse button. On Unix the popup menu is used by pressing and holding the right mouse button. The popup menu only appears when the 'mousemodel' has been set to "popup" or "popup_setpos". The difference between the two is that "popup_setpos" moves the cursor to the mouse pointer position. When clicking inside a selection, the selection will be used unmodified. When there is a selection but you click outside of it, the selection is removed. There is a separate popup menu for each mode. Thus there are never grey items like in the normal menus. What is the meaning of life, the universe and everything? *42* Douglas Adams, the only person who knew what this question really was about is now dead, unfortunately. So now you might wonder what the meaning of death is... ============================================================================== Next chapter: |usr_43.txt| Using filetypes Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_43.txt�����������������������������������������������������������������0000664�0000000�0000000�00000016375�13204015742�0017132�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_43.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Using filetypes When you are editing a file of a certain type, for example a C program or a shell script, you often use the same option settings and mappings. You quickly get tired of manually setting these each time. This chapter explains how to do it automatically. |43.1| Plugins for a filetype |43.2| Adding a filetype Next chapter: |usr_44.txt| Your own syntax highlighted Previous chapter: |usr_42.txt| Add new menus Table of contents: |usr_toc.txt| ============================================================================== *43.1* Plugins for a filetype *filetype-plugin* How to start using filetype plugins has already been discussed here: |add-filetype-plugin|. But you probably are not satisfied with the default settings, because they have been kept minimal. Suppose that for C files you want to set the 'softtabstop' option to 4 and define a mapping to insert a three-line comment. You do this with only two steps: *your-runtime-dir* 1. Create your own runtime directory. On Unix this usually is "~/.config/nvim". In this directory create the "ftplugin" directory: > mkdir -p ~/.config/nvim/ftplugin < When you are not on Unix, check the value of the 'runtimepath' option to see where Vim will look for the "ftplugin" directory: > set runtimepath? < You would normally use the first directory name (before the first comma). You might want to prepend a directory name to the 'runtimepath' option in your |init.vim| file if you don't like the default value. 2. Create the file "~/.config/nvim/ftplugin/c.vim", with the contents: > setlocal softtabstop=4 noremap <buffer> <LocalLeader>c o/**************<CR><CR>/<Esc> let b:undo_ftplugin = "setl softtabstop< | unmap <buffer> <LocalLeader>c" Try editing a C file. You should notice that the 'softtabstop' option is set to 4. But when you edit another file it's reset to the default zero. That is because the ":setlocal" command was used. This sets the 'softtabstop' option only locally to the buffer. As soon as you edit another buffer, it will be set to the value set for that buffer. For a new buffer it will get the default value or the value from the last ":set" command. Likewise, the mapping for "\c" will disappear when editing another buffer. The ":map <buffer>" command creates a mapping that is local to the current buffer. This works with any mapping command: ":map!", ":vmap", etc. The |<LocalLeader>| in the mapping is replaced with the value of the "maplocalleader" variable. The line to set b:undo_ftplugin is for when the filetype is set to another value. In that case you will want to undo your preferences. The b:undo_ftplugin variable is executed as a command. Watch out for characters with a special meaning inside a string, such as a backslash. You can find examples for filetype plugins in this directory: > $VIMRUNTIME/ftplugin/ More details about writing a filetype plugin can be found here: |write-plugin|. ============================================================================== *43.2* Adding a filetype If you are using a type of file that is not recognized by Vim, this is how to get it recognized. You need a runtime directory of your own. See |your-runtime-dir| above. Create a file "filetype.vim" which contains an autocommand for your filetype. (Autocommands were explained in section |40.3|.) Example: > augroup filetypedetect au BufNewFile,BufRead *.xyz setf xyz augroup END This will recognize all files that end in ".xyz" as the "xyz" filetype. The ":augroup" commands put this autocommand in the "filetypedetect" group. This allows removing all autocommands for filetype detection when doing ":filetype off". The "setf" command will set the 'filetype' option to its argument, unless it was set already. This will make sure that 'filetype' isn't set twice. You can use many different patterns to match the name of your file. Directory names can also be included. See |autocmd-patterns|. For example, the files under "/usr/share/scripts/" are all "ruby" files, but don't have the expected file name extension. Adding this to the example above: > augroup filetypedetect au BufNewFile,BufRead *.xyz setf xyz au BufNewFile,BufRead /usr/share/scripts/* setf ruby augroup END However, if you now edit a file /usr/share/scripts/README.txt, this is not a ruby file. The danger of a pattern ending in "*" is that it quickly matches too many files. To avoid trouble with this, put the filetype.vim file in another directory, one that is at the end of 'runtimepath'. For Unix for example, you could use "~/.config/nvim/after/filetype.vim". You now put the detection of text files in ~/.config/nvim/filetype.vim: > augroup filetypedetect au BufNewFile,BufRead *.txt setf text augroup END That file is found in 'runtimepath' first. Then use this in ~/.config/nvim/after/filetype.vim, which is found last: > augroup filetypedetect au BufNewFile,BufRead /usr/share/scripts/* setf ruby augroup END What will happen now is that Vim searches for "filetype.vim" files in each directory in 'runtimepath'. First ~/.config/nvim/filetype.vim is found. The autocommand to catch *.txt files is defined there. Then Vim finds the filetype.vim file in $VIMRUNTIME, which is halfway 'runtimepath'. Finally ~/.config/nvim/after/filetype.vim is found and the autocommand for detecting ruby files in /usr/share/scripts is added. When you now edit /usr/share/scripts/README.txt, the autocommands are checked in the order in which they were defined. The *.txt pattern matches, thus "setf text" is executed to set the filetype to "text". The pattern for ruby matches too, and the "setf ruby" is executed. But since 'filetype' was already set to "text", nothing happens here. When you edit the file /usr/share/scripts/foobar the same autocommands are checked. Only the one for ruby matches and "setf ruby" sets 'filetype' to ruby. RECOGNIZING BY CONTENTS If your file cannot be recognized by its file name, you might be able to recognize it by its contents. For example, many script files start with a line like: #!/bin/xyz ~ To recognize this script create a file "scripts.vim" in your runtime directory (same place where filetype.vim goes). It might look like this: > if did_filetype() finish endif if getline(1) =~ '^#!.*[/\\]xyz\>' setf xyz endif The first check with did_filetype() is to avoid that you will check the contents of files for which the filetype was already detected by the file name. That avoids wasting time on checking the file when the "setf" command won't do anything. The scripts.vim file is sourced by an autocommand in the default filetype.vim file. Therefore, the order of checks is: 1. filetype.vim files before $VIMRUNTIME in 'runtimepath' 2. first part of $VIMRUNTIME/filetype.vim 3. all scripts.vim files in 'runtimepath' 4. remainder of $VIMRUNTIME/filetype.vim 5. filetype.vim files after $VIMRUNTIME in 'runtimepath' If this is not sufficient for you, add an autocommand that matches all files and sources a script or executes a function to check the contents of the file. ============================================================================== Next chapter: |usr_44.txt| Your own syntax highlighted Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_44.txt�����������������������������������������������������������������0000664�0000000�0000000�00000071011�13204015742�0017117�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_44.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Your own syntax highlighted Vim comes with highlighting for a couple of hundred different file types. If the file you are editing isn't included, read this chapter to find out how to get this type of file highlighted. Also see |:syn-define| in the reference manual. |44.1| Basic syntax commands |44.2| Keywords |44.3| Matches |44.4| Regions |44.5| Nested items |44.6| Following groups |44.7| Other arguments |44.8| Clusters |44.9| Including another syntax file |44.10| Synchronizing |44.11| Installing a syntax file |44.12| Portable syntax file layout Next chapter: |usr_45.txt| Select your language Previous chapter: |usr_43.txt| Using filetypes Table of contents: |usr_toc.txt| ============================================================================== *44.1* Basic syntax commands Using an existing syntax file to start with will save you a lot of time. Try finding a syntax file in $VIMRUNTIME/syntax for a language that is similar. These files will also show you the normal layout of a syntax file. To understand it, you need to read the following. Let's start with the basic arguments. Before we start defining any new syntax, we need to clear out any old definitions: > :syntax clear This isn't required in the final syntax file, but very useful when experimenting. There are more simplifications in this chapter. If you are writing a syntax file to be used by others, read all the way through the end to find out the details. LISTING DEFINED ITEMS To check which syntax items are currently defined, use this command: > :syntax You can use this to check which items have actually been defined. Quite useful when you are experimenting with a new syntax file. It also shows the colors used for each item, which helps to find out what is what. To list the items in a specific syntax group use: > :syntax list {group-name} This also can be used to list clusters (explained in |44.8|). Just include the @ in the name. MATCHING CASE Some languages are not case sensitive, such as Pascal. Others, such as C, are case sensitive. You need to tell which type you have with the following commands: > :syntax case match :syntax case ignore The "match" argument means that Vim will match the case of syntax elements. Therefore, "int" differs from "Int" and "INT". If the "ignore" argument is used, the following are equivalent: "Procedure", "PROCEDURE" and "procedure". The ":syntax case" commands can appear anywhere in a syntax file and affect the syntax definitions that follow. In most cases, you have only one ":syntax case" command in your syntax file; if you work with an unusual language that contains both case-sensitive and non-case-sensitive elements, however, you can scatter the ":syntax case" command throughout the file. ============================================================================== *44.2* Keywords The most basic syntax elements are keywords. To define a keyword, use the following form: > :syntax keyword {group} {keyword} ... The {group} is the name of a syntax group. With the ":highlight" command you can assign colors to a {group}. The {keyword} argument is an actual keyword. Here are a few examples: > :syntax keyword xType int long char :syntax keyword xStatement if then else endif This example uses the group names "xType" and "xStatement". By convention, each group name is prefixed by the filetype for the language being defined. This example defines syntax for the x language (eXample language without an interesting name). In a syntax file for "csh" scripts the name "cshType" would be used. Thus the prefix is equal to the value of 'filetype'. These commands cause the words "int", "long" and "char" to be highlighted one way and the words "if", "then", "else" and "endif" to be highlighted another way. Now you need to connect the x group names to standard Vim names. You do this with the following commands: > :highlight link xType Type :highlight link xStatement Statement This tells Vim to highlight "xType" like "Type" and "xStatement" like "Statement". See |group-name| for the standard names. UNUSUAL KEYWORDS The characters used in a keyword must be in the 'iskeyword' option. If you use another character, the word will never match. Vim doesn't give a warning message for this. The x language uses the '-' character in keywords. This is how it's done: > :setlocal iskeyword+=- :syntax keyword xStatement when-not The ":setlocal" command is used to change 'iskeyword' only for the current buffer. Still it does change the behavior of commands like "w" and "*". If that is not wanted, don't define a keyword but use a match (explained in the next section). The x language allows for abbreviations. For example, "next" can be abbreviated to "n", "ne" or "nex". You can define them by using this command: > :syntax keyword xStatement n[ext] This doesn't match "nextone", keywords always match whole words only. ============================================================================== *44.3* Matches Consider defining something a bit more complex. You want to match ordinary identifiers. To do this, you define a match syntax item. This one matches any word consisting of only lowercase letters: > :syntax match xIdentifier /\<\l\+\>/ < Note: Keywords overrule any other syntax item. Thus the keywords "if", "then", etc., will be keywords, as defined with the ":syntax keyword" commands above, even though they also match the pattern for xIdentifier. The part at the end is a pattern, like it's used for searching. The // is used to surround the pattern (like how it's done in a ":substitute" command). You can use any other character, like a plus or a quote. Now define a match for a comment. In the x language it is anything from # to the end of a line: > :syntax match xComment /#.*/ Since you can use any search pattern, you can highlight very complex things with a match item. See |pattern| for help on search patterns. ============================================================================== *44.4* Regions In the example x language, strings are enclosed in double quotation marks ("). To highlight strings you define a region. You need a region start (double quote) and a region end (double quote). The definition is as follows: > :syntax region xString start=/"/ end=/"/ The "start" and "end" directives define the patterns used to find the start and end of the region. But what about strings that look like this? "A string with a double quote (\") in it" ~ This creates a problem: The double quotation marks in the middle of the string will end the region. You need to tell Vim to skip over any escaped double quotes in the string. Do this with the skip keyword: > :syntax region xString start=/"/ skip=/\\"/ end=/"/ The double backslash matches a single backslash, since the backslash is a special character in search patterns. When to use a region instead of a match? The main difference is that a match item is a single pattern, which must match as a whole. A region starts as soon as the "start" pattern matches. Whether the "end" pattern is found or not doesn't matter. Thus when the item depends on the "end" pattern to match, you cannot use a region. Otherwise, regions are often simpler to define. And it is easier to use nested items, as is explained in the next section. ============================================================================== *44.5* Nested items Take a look at this comment: %Get input TODO: Skip white space ~ You want to highlight TODO in big yellow letters, even though it is in a comment that is highlighted blue. To let Vim know about this, you define the following syntax groups: > :syntax keyword xTodo TODO contained :syntax match xComment /%.*/ contains=xTodo In the first line, the "contained" argument tells Vim that this keyword can exist only inside another syntax item. The next line has "contains=xTodo". This indicates that the xTodo syntax element is inside it. The result is that the comment line as a whole is matched with "xComment" and made blue. The word TODO inside it is matched by xTodo and highlighted yellow (highlighting for xTodo was setup for this). RECURSIVE NESTING The x language defines code blocks in curly braces. And a code block may contain other code blocks. This can be defined this way: > :syntax region xBlock start=/{/ end=/}/ contains=xBlock Suppose you have this text: while i < b { ~ if a { ~ b = c; ~ } ~ } ~ First a xBlock starts at the { in the first line. In the second line another { is found. Since we are inside a xBlock item, and it contains itself, a nested xBlock item will start here. Thus the "b = c" line is inside the second level xBlock region. Then a } is found in the next line, which matches with the end pattern of the region. This ends the nested xBlock. Because the } is included in the nested region, it is hidden from the first xBlock region. Then at the last } the first xBlock region ends. KEEPING THE END Consider the following two syntax items: > :syntax region xComment start=/%/ end=/$/ contained :syntax region xPreProc start=/#/ end=/$/ contains=xComment You define a comment as anything from % to the end of the line. A preprocessor directive is anything from # to the end of the line. Because you can have a comment on a preprocessor line, the preprocessor definition includes a "contains=xComment" argument. Now look what happens with this text: #define X = Y % Comment text ~ int foo = 1; ~ What you see is that the second line is also highlighted as xPreProc. The preprocessor directive should end at the end of the line. That is why you have used "end=/$/". So what is going wrong? The problem is the contained comment. The comment starts with % and ends at the end of the line. After the comment ends, the preprocessor syntax continues. This is after the end of the line has been seen, so the next line is included as well. To avoid this problem and to avoid a contained syntax item eating a needed end of line, use the "keepend" argument. This takes care of the double end-of-line matching: > :syntax region xComment start=/%/ end=/$/ contained :syntax region xPreProc start=/#/ end=/$/ contains=xComment keepend CONTAINING MANY ITEMS You can use the contains argument to specify that everything can be contained. For example: > :syntax region xList start=/\[/ end=/\]/ contains=ALL All syntax items will be contained in this one. It also contains itself, but not at the same position (that would cause an endless loop). You can specify that some groups are not contained. Thus contain all groups but the ones that are listed: > :syntax region xList start=/\[/ end=/\]/ contains=ALLBUT,xString With the "TOP" item you can include all items that don't have a "contained" argument. "CONTAINED" is used to only include items with a "contained" argument. See |:syn-contains| for the details. ============================================================================== *44.6* Following groups The x language has statements in this form: if (condition) then ~ You want to highlight the three items differently. But "(condition)" and "then" might also appear in other places, where they get different highlighting. This is how you can do this: > :syntax match xIf /if/ nextgroup=xIfCondition skipwhite :syntax match xIfCondition /([^)]*)/ contained nextgroup=xThen skipwhite :syntax match xThen /then/ contained The "nextgroup" argument specifies which item can come next. This is not required. If none of the items that are specified are found, nothing happens. For example, in this text: if not (condition) then ~ The "if" is matched by xIf. "not" doesn't match the specified nextgroup xIfCondition, thus only the "if" is highlighted. The "skipwhite" argument tells Vim that white space (spaces and tabs) may appear in between the items. Similar arguments are "skipnl", which allows a line break in between the items, and "skipempty", which allows empty lines. Notice that "skipnl" doesn't skip an empty line, something must match after the line break. ============================================================================== *44.7* Other arguments MATCHGROUP When you define a region, the entire region is highlighted according to the group name specified. To highlight the text enclosed in parentheses () with the group xInside, for example, use the following command: > :syntax region xInside start=/(/ end=/)/ Suppose, that you want to highlight the parentheses differently. You can do this with a lot of convoluted region statements, or you can use the "matchgroup" argument. This tells Vim to highlight the start and end of a region with a different highlight group (in this case, the xParen group): > :syntax region xInside matchgroup=xParen start=/(/ end=/)/ The "matchgroup" argument applies to the start or end match that comes after it. In the previous example both start and end are highlighted with xParen. To highlight the end with xParenEnd: > :syntax region xInside matchgroup=xParen start=/(/ \ matchgroup=xParenEnd end=/)/ A side effect of using "matchgroup" is that contained items will not match in the start or end of the region. The example for "transparent" uses this. TRANSPARENT In a C language file you would like to highlight the () text after a "while" differently from the () text after a "for". In both of these there can be nested () items, which should be highlighted in the same way. You must make sure the () highlighting stops at the matching ). This is one way to do this: > :syntax region cWhile matchgroup=cWhile start=/while\s*(/ end=/)/ \ contains=cCondNest :syntax region cFor matchgroup=cFor start=/for\s*(/ end=/)/ \ contains=cCondNest :syntax region cCondNest start=/(/ end=/)/ contained transparent Now you can give cWhile and cFor different highlighting. The cCondNest item can appear in either of them, but take over the highlighting of the item it is contained in. The "transparent" argument causes this. Notice that the "matchgroup" argument has the same group as the item itself. Why define it then? Well, the side effect of using a matchgroup is that contained items are not found in the match with the start item then. This avoids that the cCondNest group matches the ( just after the "while" or "for". If this would happen, it would span the whole text until the matching ) and the region would continue after it. Now cCondNest only matches after the match with the start pattern, thus after the first (. OFFSETS Suppose you want to define a region for the text between ( and ) after an "if". But you don't want to include the "if" or the ( and ). You can do this by specifying offsets for the patterns. Example: > :syntax region xCond start=/if\s*(/ms=e+1 end=/)/me=s-1 The offset for the start pattern is "ms=e+1". "ms" stands for Match Start. This defines an offset for the start of the match. Normally the match starts where the pattern matches. "e+1" means that the match now starts at the end of the pattern match, and then one character further. The offset for the end pattern is "me=s-1". "me" stands for Match End. "s-1" means the start of the pattern match and then one character back. The result is that in this text: if (foo == bar) ~ Only the text "foo == bar" will be highlighted as xCond. More about offsets here: |:syn-pattern-offset|. ONELINE The "oneline" argument indicates that the region does not cross a line boundary. For example: > :syntax region xIfThen start=/if/ end=/then/ oneline This defines a region that starts at "if" and ends at "then". But if there is no "then" after the "if", the region doesn't match. Note: When using "oneline" the region doesn't start if the end pattern doesn't match in the same line. Without "oneline" Vim does _not_ check if there is a match for the end pattern. The region starts even when the end pattern doesn't match in the rest of the file. CONTINUATION LINES AND AVOIDING THEM Things now become a little more complex. Let's define a preprocessor line. This starts with a # in the first column and continues until the end of the line. A line that ends with \ makes the next line a continuation line. The way you handle this is to allow the syntax item to contain a continuation pattern: > :syntax region xPreProc start=/^#/ end=/$/ contains=xLineContinue :syntax match xLineContinue "\\$" contained In this case, although xPreProc normally matches a single line, the group contained in it (namely xLineContinue) lets it go on for more than one line. For example, it would match both of these lines: #define SPAM spam spam spam \ ~ bacon and spam ~ In this case, this is what you want. If it is not what you want, you can call for the region to be on a single line by adding "excludenl" to the contained pattern. For example, you want to highlight "end" in xPreProc, but only at the end of the line. To avoid making the xPreProc continue on the next line, like xLineContinue does, use "excludenl" like this: > :syntax region xPreProc start=/^#/ end=/$/ \ contains=xLineContinue,xPreProcEnd :syntax match xPreProcEnd excludenl /end$/ contained :syntax match xLineContinue "\\$" contained "excludenl" must be placed before the pattern. Since "xLineContinue" doesn't have "excludenl", a match with it will extend xPreProc to the next line as before. ============================================================================== *44.8* Clusters One of the things you will notice as you start to write a syntax file is that you wind up generating a lot of syntax groups. Vim enables you to define a collection of syntax groups called a cluster. Suppose you have a language that contains for loops, if statements, while loops, and functions. Each of them contains the same syntax elements: numbers and identifiers. You define them like this: > :syntax match xFor /^for.*/ contains=xNumber,xIdent :syntax match xIf /^if.*/ contains=xNumber,xIdent :syntax match xWhile /^while.*/ contains=xNumber,xIdent You have to repeat the same "contains=" every time. If you want to add another contained item, you have to add it three times. Syntax clusters simplify these definitions by enabling you to have one cluster stand for several syntax groups. To define a cluster for the two items that the three groups contain, use the following command: > :syntax cluster xState contains=xNumber,xIdent Clusters are used inside other syntax items just like any syntax group. Their names start with @. Thus, you can define the three groups like this: > :syntax match xFor /^for.*/ contains=@xState :syntax match xIf /^if.*/ contains=@xState :syntax match xWhile /^while.*/ contains=@xState You can add new group names to this cluster with the "add" argument: > :syntax cluster xState add=xString You can remove syntax groups from this list as well: > :syntax cluster xState remove=xNumber ============================================================================== *44.9* Including another syntax file The C++ language syntax is a superset of the C language. Because you do not want to write two syntax files, you can have the C++ syntax file read in the one for C by using the following command: > :runtime! syntax/c.vim The ":runtime!" command searches 'runtimepath' for all "syntax/c.vim" files. This makes the C parts of the C++ syntax be defined like for C files. If you have replaced the c.vim syntax file, or added items with an extra file, these will be loaded as well. After loading the C syntax items the specific C++ items can be defined. For example, add keywords that are not used in C: > :syntax keyword cppStatement new delete this friend using This works just like in any other syntax file. Now consider the Perl language. A Perl script consists of two distinct parts: a documentation section in POD format, and a program written in Perl itself. The POD section starts with "=head" and ends with "=cut". You want to define the POD syntax in one file, and use it from the Perl syntax file. The ":syntax include" command reads in a syntax file and stores the elements it defined in a syntax cluster. For Perl, the statements are as follows: > :syntax include @Pod <sfile>:p:h/pod.vim :syntax region perlPOD start=/^=head/ end=/^=cut/ contains=@Pod When "=head" is found in a Perl file, the perlPOD region starts. In this region the @Pod cluster is contained. All the items defined as top-level items in the pod.vim syntax files will match here. When "=cut" is found, the region ends and we go back to the items defined in the Perl file. The ":syntax include" command is clever enough to ignore a ":syntax clear" command in the included file. And an argument such as "contains=ALL" will only contain items defined in the included file, not in the file that includes it. The "<sfile>:p:h/" part uses the name of the current file (<sfile>), expands it to a full path (:p) and then takes the head (:h). This results in the directory name of the file. This causes the pod.vim file in the same directory to be included. ============================================================================== *44.10* Synchronizing Compilers have it easy. They start at the beginning of a file and parse it straight through. Vim does not have it so easy. It must start in the middle, where the editing is being done. So how does it tell where it is? The secret is the ":syntax sync" command. This tells Vim how to figure out where it is. For example, the following command tells Vim to scan backward for the beginning or end of a C-style comment and begin syntax coloring from there: > :syntax sync ccomment You can tune this processing with some arguments. The "minlines" argument tells Vim the minimum number of lines to look backward, and "maxlines" tells the editor the maximum number of lines to scan. For example, the following command tells Vim to look at least 10 lines before the top of the screen: > :syntax sync ccomment minlines=10 maxlines=500 If it cannot figure out where it is in that space, it starts looking farther and farther back until it figures out what to do. But it looks no farther back than 500 lines. (A large "maxlines" slows down processing. A small one might cause synchronization to fail.) To make synchronizing go a bit faster, tell Vim which syntax items can be skipped. Every match and region that only needs to be used when actually displaying text can be given the "display" argument. By default, the comment to be found will be colored as part of the Comment syntax group. If you want to color things another way, you can specify a different syntax group: > :syntax sync ccomment xAltComment If your programming language does not have C-style comments in it, you can try another method of synchronization. The simplest way is to tell Vim to space back a number of lines and try to figure out things from there. The following command tells Vim to go back 150 lines and start parsing from there: > :syntax sync minlines=150 A large "minlines" value can make Vim slower, especially when scrolling backwards in the file. Finally, you can specify a syntax group to look for by using this command: > :syntax sync match {sync-group-name} \ grouphere {group-name} {pattern} This tells Vim that when it sees {pattern} the syntax group named {group-name} begins just after the pattern given. The {sync-group-name} is used to give a name to this synchronization specification. For example, the sh scripting language begins an if statement with "if" and ends it with "fi": if [ --f file.txt ] ; then ~ echo "File exists" ~ fi ~ To define a "grouphere" directive for this syntax, you use the following command: > :syntax sync match shIfSync grouphere shIf "\<if\>" The "groupthere" argument tells Vim that the pattern ends a group. For example, the end of the if/fi group is as follows: > :syntax sync match shIfSync groupthere NONE "\<fi\>" In this example, the NONE tells Vim that you are not in any special syntax region. In particular, you are not inside an if block. You also can define matches and regions that are with no "grouphere" or "groupthere" arguments. These groups are for syntax groups skipped during synchronization. For example, the following skips over anything inside {}, even if it would normally match another synchronization method: > :syntax sync match xSpecial /{.*}/ More about synchronizing in the reference manual: |:syn-sync|. ============================================================================== *44.11* Installing a syntax file When your new syntax file is ready to be used, drop it in a "syntax" directory in 'runtimepath'. For Unix that would be "~/.config/nvim/syntax". The name of the syntax file must be equal to the file type, with ".vim" added. Thus for the x language, the full path of the file would be: ~/.config/nvim/syntax/x.vim ~ You must also make the file type be recognized. See |43.2|. If your file works well, you might want to make it available to other Vim users. First read the next section to make sure your file works well for others. Then e-mail it to the Vim maintainer: <maintainer@vim.org>. Also explain how the filetype can be detected. With a bit of luck your file will be included in the next Vim version! ADDING TO AN EXISTING SYNTAX FILE We were assuming you were adding a completely new syntax file. When an existing syntax file works, but is missing some items, you can add items in a separate file. That avoids changing the distributed syntax file, which will be lost when installing a new version of Vim. Write syntax commands in your file, possibly using group names from the existing syntax. For example, to add new variable types to the C syntax file: > :syntax keyword cType off_t uint Write the file with the same name as the original syntax file. In this case "c.vim". Place it in a directory near the end of 'runtimepath'. This makes it loaded after the original syntax file. For Unix this would be: ~/.config/nvim/after/syntax/c.vim ~ ============================================================================== *44.12* Portable syntax file layout Wouldn't it be nice if all Vim users exchange syntax files? To make this possible, the syntax file must follow a few guidelines. Start with a header that explains what the syntax file is for, who maintains it and when it was last updated. Don't include too much information about changes history, not many people will read it. Example: > " Vim syntax file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2001 Jun 18 " Remark: Included by the C++ syntax. Use the same layout as the other syntax files. Using an existing syntax file as an example will save you a lot of time. Choose a good, descriptive name for your syntax file. Use lowercase letters and digits. Don't make it too long, it is used in many places: The name of the syntax file "name.vim", 'filetype', b:current_syntax and the start of each syntax group (nameType, nameStatement, nameString, etc). Start with a check for "b:current_syntax". If it is defined, some other syntax file, earlier in 'runtimepath' was already loaded: > if exists("b:current_syntax") finish endif To be compatible with Vim 5.8 use: > if version < 600 syntax clear elseif exists("b:current_syntax") finish endif Set "b:current_syntax" to the name of the syntax at the end. Don't forget that included files do this too, you might have to reset "b:current_syntax" if you include two files. If you want your syntax file to work with Vim 5.x, add a check for v:version. Find an syntax file in the Vim 7.2 distribution for an example. Do not include anything that is a user preference. Don't set 'tabstop', 'expandtab', etc. These belong in a filetype plugin. Do not include mappings or abbreviations. Only include setting 'iskeyword' if it is really necessary for recognizing keywords. To allow users select their own preferred colors, make a different group name for every kind of highlighted item. Then link each of them to one of the standard highlight groups. That will make it work with every color scheme. If you select specific colors it will look bad with some color schemes. And don't forget that some people use a different background color, or have only eight colors available. For the linking use "hi def link", so that the user can select different highlighting before your syntax file is loaded. Example: > hi def link nameString String hi def link nameNumber Number hi def link nameCommand Statement ... etc ... Add the "display" argument to items that are not used when syncing, to speed up scrolling backwards and CTRL-L. ============================================================================== Next chapter: |usr_45.txt| Select your language Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_45.txt�����������������������������������������������������������������0000664�0000000�0000000�00000040560�13204015742�0017125�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_45.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Select your language The messages in Vim can be given in several languages. This chapter explains how to change which one is used. Also, the different ways to work with files in various languages is explained. |45.1| Language for Messages |45.2| Language for Menus |45.3| Using another encoding |45.4| Editing files with a different encoding |45.5| Entering language text Previous chapter: |usr_44.txt| Your own syntax highlighted Table of contents: |usr_toc.txt| ============================================================================== *45.1* Language for Messages When you start Vim, it checks the environment to find out what language you are using. Mostly this should work fine, and you get the messages in your language (if they are available). To see what the current language is, use this command: > :language If it replies with "C", this means the default is being used, which is English. Note: Using different languages only works when Vim was compiled to handle it. To find out if it works, use the ":version" command and check the output for "+gettext" and "+multi_lang". If they are there, you are OK. If you see "-gettext" or "-multi_lang" you will have to find another Vim. What if you would like your messages in a different language? There are several ways. Which one you should use depends on the capabilities of your system. The first way is to set the environment to the desired language before starting Vim. Example for Unix: > env LANG=de_DE.ISO_8859-1 vim This only works if the language is available on your system. The advantage is that all the GUI messages and things in libraries will use the right language as well. A disadvantage is that you must do this before starting Vim. If you want to change language while Vim is running, you can use the second method: > :language fr_FR.ISO_8859-1 This way you can try out several names for your language. You will get an error message when it's not supported on your system. You don't get an error when translated messages are not available. Vim will silently fall back to using English. To find out which languages are supported on your system, find the directory where they are listed. On my system it is "/usr/share/locale". On some systems it's in "/usr/lib/locale". The manual page for "setlocale" should give you a hint where it is found on your system. Be careful to type the name exactly as it should be. Upper and lowercase matter, and the '-' and '_' characters are easily confused. You can also set the language separately for messages, edited text and the time format. See |:language|. DO-IT-YOURSELF MESSAGE TRANSLATION If translated messages are not available for your language, you could write them yourself. To do this, get the source code for Vim and the GNU gettext package. After unpacking the sources, instructions can be found in the directory src/po/README.txt. It's not too difficult to do the translation. You don't need to be a programmer. You must know both English and the language you are translating to, of course. When you are satisfied with the translation, consider making it available to others. Upload it at vim-online (http://vim.sf.net) or e-mail it to the Vim maintainer <maintainer@vim.org>. Or both. ============================================================================== *45.2* Language for Menus The default menus are in English. To be able to use your local language, they must be translated. Normally this is automatically done for you if the environment is set for your language, just like with messages. You don't need to do anything extra for this. But it only works if translations for the language are available. Suppose you are in Germany, with the language set to German, but prefer to use "File" instead of "Datei". You can switch back to using the English menus this way: > :set langmenu=none It is also possible to specify a language: > :set langmenu=nl_NL.ISO_8859-1 Like above, differences between "-" and "_" matter. However, upper/lowercase differences are ignored here. The 'langmenu' option must be set before the menus are loaded. Once the menus have been defined changing 'langmenu' has no direct effect. Therefore, put the command to set 'langmenu' in your vimrc file. If you really want to switch menu language while running Vim, you can do it this way: > :source $VIMRUNTIME/delmenu.vim :set langmenu=de_DE.ISO_8859-1 :source $VIMRUNTIME/menu.vim There is one drawback: All menus that you defined yourself will be gone. You will need to redefine them as well. DO-IT-YOURSELF MENU TRANSLATION To see which menu translations are available, look in this directory: $VIMRUNTIME/lang ~ The files are called menu_{language}.vim. If you don't see the language you want to use, you can do your own translations. The simplest way to do this is by copying one of the existing language files, and change it. First find out the name of your language with the ":language" command. Use this name, but with all letters made lowercase. Then copy the file to your own runtime directory, as found early in 'runtimepath'. For example, for Unix you would do: > :!cp $VIMRUNTIME/lang/menu_ko_kr.euckr.vim ~/.config/nvim/lang/menu_nl_be.iso_8859-1.vim You will find hints for the translation in "$VIMRUNTIME/lang/README.txt". ============================================================================== *45.3* Using another encoding Vim guesses that the files you are going to edit are encoded for your language. For many European languages this is "latin1". Then each byte is one character. That means there are 256 different characters possible. For Asian languages this is not sufficient. These mostly use a double-byte encoding, providing for over ten thousand possible characters. This still isn't enough when a text is to contain several different languages. This is where Unicode comes in. It was designed to include all characters used in commonly used languages. This is the "Super encoding that replaces all others". But it isn't used that much yet. Fortunately, Vim supports these three kinds of encodings. And, with some restrictions, you can use them even when your environment uses another language than the text. Nevertheless, when you only edit files that are in the encoding of your language, the default should work fine and you don't need to do anything. The following is only relevant when you want to edit different languages. Note: Using different encodings only works when Vim was compiled to handle it. To find out if it works, use the ":version" command and check the output for "+multi_byte". If it's there, you are OK. If you see "-multi_byte" you will have to find another Vim. USING UNICODE IN THE GUI The nice thing about Unicode is that other encodings can be converted to it and back without losing information. When you make Vim use Unicode internally, you will be able to edit files in any encoding. Unfortunately, the number of systems supporting Unicode is still limited. Thus it's unlikely that your language uses it. You need to tell Vim you want to use Unicode, and how to handle interfacing with the rest of the system. Let's start with the GUI version of Vim, which is able to display Unicode characters. This should work: > :set encoding=utf-8 :set guifont=-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 The 'encoding' option tells Vim the encoding of the characters that you use. This applies to the text in buffers (files you are editing), registers, Vim script files, etc. You can regard 'encoding' as the setting for the internals of Vim. This example assumes you have this font on your system. The name in the example is for the X Window System. This font is in a package that is used to enhance xterm with Unicode support. If you don't have this font, you might find it here: http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz ~ For MS-Windows, some fonts have a limited number of Unicode characters. Try using the "Courier New" font. You can use the Edit/Select Font... menu to select and try out the fonts available. Only fixed-width fonts can be used though. Example: > :set guifont=courier_new:h12 If it doesn't work well, try getting a fontpack. If Microsoft didn't move it, you can find it here: http://www.microsoft.com/typography/fonts/default.aspx ~ Now you have told Vim to use Unicode internally and display text with a Unicode font. USING UNICODE IN A UNICODE TERMINAL There are terminals that support Unicode directly. The standard xterm that comes with XFree86 is one of them. Let's use that as an example. First of all, the xterm must have been compiled with Unicode support. See |UTF8-xterm| how to check that and how to compile it when needed. Start the xterm with the "-u8" argument. You might also need so specify a font. Example: > xterm -u8 -fn -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 Now you can run Vim inside this terminal. Set 'encoding' to "utf-8" as before. That's all. USING UNICODE IN AN ORDINARY TERMINAL Suppose you want to work with Unicode files, but don't have a terminal with Unicode support. You can do this with Vim, although characters that are not supported by the terminal will not be displayed. The layout of the text will be preserved. Try editing a file with Unicode characters in it. You will notice that Vim will put a question mark (or underscore or some other character) in places where a character should be that the terminal can't display. Move the cursor to a question mark and use this command: > ga Vim will display a line with the code of the character. This gives you a hint about what character it is. You can look it up in a Unicode table. You could actually view a file that way, if you have lots of time at hand. Note: Since 'encoding' is used for all text inside Vim, changing it makes all non-ASCII text invalid. You will notice this when using registers and the |shada-file| (e.g., a remembered search pattern). It's recommended to set 'encoding' in your vimrc file, and leave it alone. ============================================================================== *45.4* Editing files with a different encoding Suppose you have setup Vim to use Unicode, and you want to edit a file that is in 16-bit Unicode. Sounds simple, right? Well, Vim actually uses utf-8 encoding internally, thus the 16-bit encoding must be converted, since there is a difference between the character set (Unicode) and the encoding (utf-8 or 16-bit). Vim will try to detect what kind of file you are editing. It uses the encoding names in the 'fileencodings' option. When using Unicode, the default value is: "ucs-bom,utf-8,latin1". This means that Vim checks the file to see if it's one of these encodings: ucs-bom File must start with a Byte Order Mark (BOM). This allows detection of 16-bit, 32-bit and utf-8 Unicode encodings. utf-8 utf-8 Unicode. This is rejected when a sequence of bytes is illegal in utf-8. latin1 The good old 8-bit encoding. Always works. When you start editing that 16-bit Unicode file, and it has a BOM, Vim will detect this and convert the file to utf-8 when reading it. The 'fileencoding' option (without s at the end) is set to the detected value. In this case it is "utf-16le". That means it's Unicode, 16-bit and little-endian. This file format is common on MS-Windows (e.g., for registry files). When writing the file, Vim will compare 'fileencoding' with 'encoding'. If they are different, the text will be converted. An empty value for 'fileencoding' means that no conversion is to be done. Thus the text is assumed to be encoded with 'encoding'. If the default 'fileencodings' value is not good for you, set it to the encodings you want Vim to try. Only when a value is found to be invalid will the next one be used. Putting "latin1" first doesn't work, because it is never illegal. An example, to fall back to Japanese when the file doesn't have a BOM and isn't utf-8: > :set fileencodings=ucs-bom,utf-8,sjis See |encoding-values| for suggested values. Other values may work as well. This depends on the conversion available. FORCING AN ENCODING If the automatic detection doesn't work you must tell Vim what encoding the file is. Example: > :edit ++enc=koi8-r russian.txt The "++enc" part specifies the name of the encoding to be used for this file only. Vim will convert the file from the specified encoding, Russian in this example, to 'encoding'. 'fileencoding' will also be set to the specified encoding, so that the reverse conversion can be done when writing the file. The same argument can be used when writing the file. This way you can actually use Vim to convert a file. Example: > :write ++enc=utf-8 russian.txt < Note: Conversion may result in lost characters. Conversion from an encoding to Unicode and back is mostly free of this problem, unless there are illegal characters. Conversion from Unicode to other encodings often loses information when there was more than one language in the file. ============================================================================== *45.5* Entering language text Computer keyboards don't have much more than a hundred keys. Some languages have thousands of characters, Unicode has over hundred thousand. So how do you type these characters? First of all, when you don't use too many of the special characters, you can use digraphs. This was already explained in |24.9|. When you use a language that uses many more characters than keys on your keyboard, you will want to use an Input Method (IM). This requires learning the translation from typed keys to resulting character. When you need an IM you probably already have one on your system. It should work with Vim like with other programs. For details see |mbyte-XIM| for the X Window system and |mbyte-IME| for MS-Windows. KEYMAPS For some languages the character set is different from latin, but uses a similar number of characters. It's possible to map keys to characters. Vim uses keymaps for this. Suppose you want to type Hebrew. You can load the keymap like this: > :set keymap=hebrew Vim will try to find a keymap file for you. This depends on the value of 'encoding'. If no matching file was found, you will get an error message. Now you can type Hebrew in Insert mode. In Normal mode, and when typing a ":" command, Vim automatically switches to English. You can use this command to switch between Hebrew and English: > CTRL-^ This only works in Insert mode and Command-line mode. In Normal mode it does something completely different (jumps to alternate file). The usage of the keymap is indicated in the mode message, if you have the 'showmode' option set. In the GUI Vim will indicate the usage of keymaps with a different cursor color. You can also change the usage of the keymap with the 'iminsert' and 'imsearch' options. To see the list of mappings, use this command: > :lmap To find out which keymap files are available, in the GUI you can use the Edit/Keymap menu. Otherwise you can use this command: > :echo globpath(&rtp, "keymap/*.vim") DO-IT-YOURSELF KEYMAPS You can create your own keymap file. It's not very difficult. Start with a keymap file that is similar to the language you want to use. Copy it to the "keymap" directory in your runtime directory. For example, for Unix, you would use the directory "~/.config/nvim/keymap". The name of the keymap file must look like this: keymap/{name}.vim ~ or keymap/{name}_{encoding}.vim ~ {name} is the name of the keymap. Chose a name that is obvious, but different from existing keymaps (unless you want to replace an existing keymap file). {name} cannot contain an underscore. Optionally, add the encoding used after an underscore. Examples: keymap/hebrew.vim ~ keymap/hebrew_utf-8.vim ~ The contents of the file should be self-explanatory. Look at a few of the keymaps that are distributed with Vim. For the details, see |mbyte-keymap|. LAST RESORT If all other methods fail, you can enter any character with CTRL-V: encoding type range ~ 8-bit CTRL-V 123 decimal 0-255 8-bit CTRL-V x a1 hexadecimal 00-ff 16-bit CTRL-V u 013b hexadecimal 0000-ffff 31-bit CTRL-V U 001303a4 hexadecimal 00000000-7fffffff Don't type the spaces. See |i_CTRL-V_digit| for the details. ============================================================================== Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/usr_toc.txt����������������������������������������������������������������0000664�0000000�0000000�00000021134�13204015742�0017456�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*usr_toc.txt* Nvim VIM USER MANUAL - by Bram Moolenaar Table Of Contents *user-manual* ============================================================================== Overview ~ Getting Started |usr_01.txt| About the manuals |usr_02.txt| The first steps in Vim |usr_03.txt| Moving around |usr_04.txt| Making small changes |usr_05.txt| Set your settings |usr_06.txt| Using syntax highlighting |usr_07.txt| Editing more than one file |usr_08.txt| Splitting windows |usr_09.txt| Using the GUI |usr_10.txt| Making big changes |usr_11.txt| Recovering from a crash |usr_12.txt| Clever tricks Editing Effectively |usr_20.txt| Typing command-line commands quickly |usr_21.txt| Go away and come back |usr_22.txt| Finding the file to edit |usr_23.txt| Editing other files |usr_24.txt| Inserting quickly |usr_25.txt| Editing formatted text |usr_26.txt| Repeating |usr_27.txt| Search commands and patterns |usr_28.txt| Folding |usr_29.txt| Moving through programs |usr_30.txt| Editing programs |usr_31.txt| Exploiting the GUI |usr_32.txt| The undo tree Tuning Vim |usr_40.txt| Make new commands |usr_41.txt| Write a Vim script |usr_42.txt| Add new menus |usr_43.txt| Using filetypes |usr_44.txt| Your own syntax highlighted |usr_45.txt| Select your language Reference manual |reference_toc| More detailed information for all commands The user manual is online: https://neovim.io/doc/user ============================================================================== Getting Started ~ Read this from start to end to learn the essential commands. |usr_01.txt| About the manuals |01.1| Two manuals |01.2| Vim installed |01.3| Using the Vim tutor |01.4| Copyright |usr_02.txt| The first steps in Vim |02.1| Running Vim for the First Time |02.2| Inserting text |02.3| Moving around |02.4| Deleting characters |02.5| Undo and Redo |02.6| Other editing commands |02.7| Getting out |02.8| Finding help |usr_03.txt| Moving around |03.1| Word movement |03.2| Moving to the start or end of a line |03.3| Moving to a character |03.4| Matching a paren |03.5| Moving to a specific line |03.6| Telling where you are |03.7| Scrolling around |03.8| Simple searches |03.9| Simple search patterns |03.10| Using marks |usr_04.txt| Making small changes |04.1| Operators and motions |04.2| Changing text |04.3| Repeating a change |04.4| Visual mode |04.5| Moving text |04.6| Copying text |04.7| Using the clipboard |04.8| Text objects |04.9| Replace mode |04.10| Conclusion |usr_05.txt| Set your settings |05.1| The vimrc file |05.2| The example vimrc file explained |05.3| Simple mappings |05.4| Adding a package |05.5| Adding a plugin |05.6| Adding a help file |05.7| The option window |05.8| Often used options |usr_06.txt| Using syntax highlighting |06.1| Switching it on |06.2| No or wrong colors? |06.3| Different colors |06.4| With colors or without colors |06.5| Printing with colors |06.6| Further reading |usr_07.txt| Editing more than one file |07.1| Edit another file |07.2| A list of files |07.3| Jumping from file to file |07.4| Backup files |07.5| Copy text between files |07.6| Viewing a file |07.7| Changing the file name |usr_08.txt| Splitting windows |08.1| Split a window |08.2| Split a window on another file |08.3| Window size |08.4| Vertical splits |08.5| Moving windows |08.6| Commands for all windows |08.7| Viewing differences with diff mode |08.8| Various |usr_09.txt| Using the GUI |09.1| Parts of the GUI |09.2| Using the mouse |09.3| The clipboard |09.4| Select mode |usr_10.txt| Making big changes |10.1| Record and playback commands |10.2| Substitution |10.3| Command ranges |10.4| The global command |10.5| Visual block mode |10.6| Reading and writing part of a file |10.7| Formatting text |10.8| Changing case |10.9| Using an external program |usr_11.txt| Recovering from a crash |11.1| Basic recovery |11.2| Where is the swap file? |11.3| Crashed or not? |11.4| Further reading |usr_12.txt| Clever tricks |12.1| Replace a word |12.2| Change "Last, First" to "First Last" |12.3| Sort a list |12.4| Reverse line order |12.5| Count words |12.6| Find a man page |12.7| Trim blanks |12.8| Find where a word is used ============================================================================== Editing Effectively ~ Subjects that can be read independently. |usr_20.txt| Typing command-line commands quickly |20.1| Command line editing |20.2| Command line abbreviations |20.3| Command line completion |20.4| Command line history |20.5| Command line window |usr_21.txt| Go away and come back |21.1| Suspend and resume |21.2| Executing shell commands |21.3| Remembering information; ShaDa |21.4| Sessions |21.5| Views |21.6| Modelines |usr_22.txt| Finding the file to edit |22.1| The file explorer |22.2| The current directory |22.3| Finding a file |22.4| The buffer list |usr_23.txt| Editing other files |23.1| DOS, Mac and Unix files |23.2| Files on the internet |23.3| Binary files |23.4| Compressed files |usr_24.txt| Inserting quickly |24.1| Making corrections |24.2| Showing matches |24.3| Completion |24.4| Repeating an insert |24.5| Copying from another line |24.6| Inserting a register |24.7| Abbreviations |24.8| Entering special characters |24.9| Digraphs |24.10| Normal mode commands |usr_25.txt| Editing formatted text |25.1| Breaking lines |25.2| Aligning text |25.3| Indents and tabs |25.4| Dealing with long lines |25.5| Editing tables |usr_26.txt| Repeating |26.1| Repeating with Visual mode |26.2| Add and subtract |26.3| Making a change in many files |26.4| Using Vim from a shell script |usr_27.txt| Search commands and patterns |27.1| Ignoring case |27.2| Wrapping around the file end |27.3| Offsets |27.4| Matching multiple times |27.5| Alternatives |27.6| Character ranges |27.7| Character classes |27.8| Matching a line break |27.9| Examples |usr_28.txt| Folding |28.1| What is folding? |28.2| Manual folding |28.3| Working with folds |28.4| Saving and restoring folds |28.5| Folding by indent |28.6| Folding with markers |28.7| Folding by syntax |28.8| Folding by expression |28.9| Folding unchanged lines |28.10| Which fold method to use? |usr_29.txt| Moving through programs |29.1| Using tags |29.2| The preview window |29.3| Moving through a program |29.4| Finding global identifiers |29.5| Finding local identifiers |usr_30.txt| Editing programs |30.1| Compiling |30.2| Indenting C files |30.3| Automatic indenting |30.4| Other indenting |30.5| Tabs and spaces |30.6| Formatting comments |usr_31.txt| Exploiting the GUI |31.1| The file browser |31.2| Confirmation |31.3| Menu shortcuts |31.4| Vim window position and size |31.5| Various |usr_32.txt| The undo tree |32.1| Undo up to a file write |32.2| Numbering changes |32.3| Jumping around the tree |32.4| Time travelling ============================================================================== Tuning Vim ~ Make Vim work as you like it. |usr_40.txt| Make new commands |40.1| Key mapping |40.2| Defining command-line commands |40.3| Autocommands |usr_41.txt| Write a Vim script |41.1| Introduction |41.2| Variables |41.3| Expressions |41.4| Conditionals |41.5| Executing an expression |41.6| Using functions |41.7| Defining a function |41.8| Lists and Dictionaries |41.9| Exceptions |41.10| Various remarks |41.11| Writing a plugin |41.12| Writing a filetype plugin |41.13| Writing a compiler plugin |41.14| Writing a plugin that loads quickly |41.15| Writing library scripts |41.16| Distributing Vim scripts |usr_42.txt| Add new menus |42.1| Introduction |42.2| Menu commands |42.3| Various |42.4| Toolbar and popup menus |usr_43.txt| Using filetypes |43.1| Plugins for a filetype |43.2| Adding a filetype |usr_44.txt| Your own syntax highlighted |44.1| Basic syntax commands |44.2| Keywords |44.3| Matches |44.4| Regions |44.5| Nested items |44.6| Following groups |44.7| Other arguments |44.8| Clusters |44.9| Including another syntax file |44.10| Synchronizing |44.11| Installing a syntax file |44.12| Portable syntax file layout |usr_45.txt| Select your language |45.1| Language for Messages |45.2| Language for Menus |45.3| Using another encoding |45.4| Editing files with a different encoding |45.5| Entering language text ============================================================================== Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/various.txt����������������������������������������������������������������0000664�0000000�0000000�00000061423�13204015742�0017475�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*various.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar Various commands *various* Type |gO| to see the table of contents. ============================================================================== 1. Various commands *various-cmds* *CTRL-L* CTRL-L Clear and redraw the screen. The redraw may happen later, after processing typeahead. *:redr* *:redraw* :redr[aw][!] Redraw the screen right now. When ! is included it is cleared first. Useful to update the screen halfway through executing a script or function (or a mapping if 'lazyredraw' set). *:redraws* *:redrawstatus* :redraws[tatus][!] Redraw the status line of the current window. When ! is included all status lines are redrawn. Useful to update the status line(s) when 'statusline' includes an item that doesn't cause automatic updating. *N<Del>* <Del> When entering a number: Remove the last digit. Note: if you like to use <BS> for this, add this mapping to your vimrc: > :map CTRL-V <BS> CTRL-V <Del> < :as[cii] or *ga* *:as* *:ascii* ga Print the ascii value of the character under the cursor in decimal, hexadecimal and octal. For example, when the cursor is on a 'R': <R> 82, Hex 52, Octal 122 ~ When the character is a non-standard ASCII character, but printable according to the 'isprint' option, the non-printable version is also given. When the character is larger than 127, the <M-x> form is also printed. For example: <~A> <M-^A> 129, Hex 81, Octal 201 ~ <p> <|~> <M-~> 254, Hex fe, Octal 376 ~ (where <p> is a special character) The <Nul> character in a file is stored internally as <NL>, but it will be shown as: <^@> 0, Hex 00, Octal 000 ~ If the character has composing characters these are also shown. The value of 'maxcombine' doesn't matter. Mnemonic: Get ASCII value. *g8* g8 Print the hex values of the bytes used in the character under the cursor, assuming it is in |UTF-8| encoding. This also shows composing characters. The value of 'maxcombine' doesn't matter. Example of a character with two composing characters: e0 b8 81 + e0 b8 b9 + e0 b9 89 ~ *8g8* 8g8 Find an illegal UTF-8 byte sequence at or after the cursor. This works in two situations: 1. when 'encoding' is any 8-bit encoding 2. when 'encoding' is "utf-8" and 'fileencoding' is any 8-bit encoding Thus it can be used when editing a file that was supposed to be UTF-8 but was read as if it is an 8-bit encoding because it contains illegal bytes. Does not wrap around the end of the file. Note that when the cursor is on an illegal byte or the cursor is halfway through a multi-byte character the command won't move the cursor. *:p* *:pr* *:print* *E749* :[range]p[rint] [flags] Print [range] lines (default current line). Note: If you are looking for a way to print your text on paper see |:hardcopy|. In the GUI you can use the File.Print menu entry. See |ex-flags| for [flags]. The |:filter| command can be used to only show lines matching a pattern. :[range]p[rint] {count} [flags] Print {count} lines, starting with [range] (default current line |cmdline-ranges|). See |ex-flags| for [flags]. *:l* *:list* :[range]l[ist] [count] [flags] Same as :print, but display unprintable characters with '^' and put $ after the line. This can be further changed with the 'listchars' option. See |ex-flags| for [flags]. *:nu* *:number* :[range]nu[mber] [count] [flags] Same as :print, but precede each line with its line number. (See also |hl-LineNr| and 'numberwidth'). See |ex-flags| for [flags]. *:#* :[range]# [count] [flags] synonym for :number. *:#!* :#!{anything} Ignored, so that you can start a Vim script with: > #!vim -S echo "this is a Vim script" quit < *:z* *E144* :{range}z[+-^.=]{count} Display several lines of text surrounding the line specified with {range}, or around the current line if there is no {range}. If there is a {count}, that's how many lines you'll see; if there is only one window then twice the value of the 'scroll' option is used, otherwise the current window height minus 3 is used. If there is a {count} the 'window' option is set to its value. :z can be used either alone or followed by any of several punctuation marks. These have the following effect: mark first line last line new cursor line ~ ---- ---------- --------- ------------ + current line 1 scr forward 1 scr forward - 1 scr back current line current line ^ 2 scr back 1 scr back 1 scr back . 1/2 scr back 1/2 scr fwd 1/2 scr fwd = 1/2 scr back 1/2 scr fwd current line Specifying no mark at all is the same as "+". If the mark is "=", a line of dashes is printed around the current line. :{range}z#[+-^.=]{count} *:z#* Like ":z", but number the lines. {not in all versions of Vi, not with these arguments} *:=* := [flags] Print the last line number. See |ex-flags| for [flags]. :{range}= [flags] Prints the last line number in {range}. For example, this prints the current line number: > :.= < See |ex-flags| for [flags]. :norm[al][!] {commands} *:norm* *:normal* Execute Normal mode commands {commands}. This makes it possible to execute Normal mode commands typed on the command-line. {commands} are executed like they are typed. For undo all commands are undone together. Execution stops when an error is encountered. If the [!] is given, mappings will not be used. Without it, when this command is called from a non-remappable mapping (|:noremap|), the argument can be mapped anyway. {commands} should be a complete command. If {commands} does not finish a command, the last one will be aborted as if <Esc> or <C-C> was typed. This implies that an insert command must be completed (to start Insert mode, see |:startinsert|). A ":" command must be completed as well. And you can't use "Q" or "gQ" to start Ex mode. The display is not updated while ":normal" is busy. {commands} cannot start with a space. Put a count of 1 (one) before it, "1 " is one space. The 'insertmode' option is ignored for {commands}. This command cannot be followed by another command, since any '|' is considered part of the command. This command can be used recursively, but the depth is limited by 'maxmapdepth'. An alternative is to use |:execute|, which uses an expression as argument. This allows the use of printable characters to represent special characters. Example: > :exe "normal \<c-w>\<c-w>" < :{range}norm[al][!] {commands} *:normal-range* Execute Normal mode commands {commands} for each line in the {range}. Before executing the {commands}, the cursor is positioned in the first column of the range, for each line. Otherwise it's the same as the ":normal" command without a range. *:sh* *:shell* *E371* *E360* :sh[ell] Removed. |vim-differences| {Nvim} *:terminal* *:te* :te[rminal][!] [{cmd}] Execute {cmd} with 'shell' in a new |terminal| buffer. Equivalent to: > :enew :call termopen('{cmd}') < See |termopen()|. Without {cmd}, start an interactive shell. Creating the terminal buffer fails when changes have been made to the current buffer, unless 'hidden' is set. To enter |Terminal-mode| automatically: > autocmd BufEnter term://* startinsert autocmd BufLeave term://* stopinsert < *:!cmd* *:!* *E34* :!{cmd} Execute {cmd} with 'shell'. See also |:terminal|. Any '!' in {cmd} is replaced with the previous external command (see also 'cpoptions'). But not when there is a backslash before the '!', then that backslash is removed. Example: ":!ls" followed by ":!echo ! \! \\!" executes "echo ls ! \!". A '|' in {cmd} is passed to the shell, you cannot use it to append a Vim command. See |:bar|. If {cmd} contains "%" it is expanded to the current file name. Special characters are not escaped, use quotes to avoid their special meaning: > :!ls "%" < If the file name contains a "$" single quotes might work better (but a single quote causes trouble): > :!ls '%' < This should always work, but it's more typing: > :exe "!ls " . shellescape(expand("%")) < A newline character ends {cmd}, what follows is interpreted as a following ":" command. However, if there is a backslash before the newline it is removed and {cmd} continues. It doesn't matter how many backslashes are before the newline, only one is removed. The command runs in a non-interactive shell connected to a pipe (not a terminal). Use |:terminal| to run an interactive shell connected to a terminal. For Win32 also see |:!start|. After the command has been executed, the timestamp and size of the current file is checked |timestamp|. If the command produces too much output some lines may be skipped so the command can execute quickly. No data is lost, this only affects the display. The last few lines are always displayed (never skipped). Vim redraws the screen after the command is finished, because it may have printed any text. This requires a hit-enter prompt, so that you can read any messages. To avoid this use: > :silent !{cmd} < The screen is not redrawn then, thus you have to use CTRL-L or ":redraw!" if the command did display something. *:!start* :!start {cmd} (Windows only). Special-case of |:!| which works asynchronously, for running a program that does not affect the files you are editing. Optional arguments (can only use one at a time): /min window will be minimized /b no console window will be opened Note: If the process requires input, /b will get an EOF error because its input stream (stdin) would be redirected to \\.\NUL (stdout and stderr too). Programs begun with :!start do not get passed Vim's open file handles, which means they do not have to be closed before Vim. To avoid this special treatment, use ":! start". *:!!* :!! Repeat last ":!{cmd}". *:ve* *:version* :ve[rsion] Print the version number of the editor. The following lines contain information about which features were enabled when Vim was compiled. When there is a preceding '+', the feature is included, when there is a '-' it is excluded. To change this, you have to edit feature.h and recompile Vim. To check for this in an expression, see |has()|. Here is an overview of the features. The first column shows the smallest version in which they are included: T tiny S small N normal B big H huge m manually enabled or depends on other features (none) system dependent Thus if a feature is marked with "N", it is included in the normal, big and huge versions of Vim. *+feature-list* *+acl* |ACL| support included B *+arabic* |Arabic| language support N *+autocmd* |:autocmd|, automatic commands N *+browse* |:browse| command N *+byte_offset* support for 'o' flag in 'statusline' option, "go" and ":goto" commands. N *+cindent* |'cindent'|, C indenting N *+clientserver* Unix and Win32: Remote invocation |clientserver| *+clipboard* |clipboard| support N *+cmdline_compl* command line completion |cmdline-completion| S *+cmdline_hist* command line history |cmdline-history| N *+cmdline_info* |'showcmd'| and |'ruler'| N *+comments* |'comments'| support B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc. B *+cscope* |cscope| support m *+cursorbind* |'cursorbind'| support m *+debug* Compiled for debugging. N *+dialog_gui* Support for |:confirm| with GUI dialog. N *+dialog_con* Support for |:confirm| with console dialog. N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog. N *+digraphs* |digraphs| *E196* N *+eval* expression evaluation |eval.txt| N *+ex_extra* always on now, used to be for Vim's extra Ex commands N *+extra_search* |'hlsearch'| and |'incsearch'| options. B *+farsi* |farsi| language N *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>| N *+find_in_path* include file searches: |[I|, |:isearch|, |CTRL-W_CTRL-I|, |:checkpath|, etc. N *+folding* |folding| N *+gettext* message translations |multi-lang| *+iconv* Compiled with the |iconv()| function *+iconv/dyn* Likewise |iconv-dynamic| |/dyn| N *+insert_expand* |insert_expand| Insert mode completion S *+jumplist* |jumplist| B *+keymap* |'keymap'| N *+lambda* |lambda| and |closure| B *+langmap* |'langmap'| N *+libcall* |libcall()| N *+linebreak* |'linebreak'|, |'breakat'| and |'showbreak'| N *+lispindent* |'lisp'| N *+listcmds* Vim commands for the list of buffers |buffer-hidden| and argument list |:argdelete| N *+localmap* Support for mappings local to a buffer |:map-local| N *+menu* |:menu| N *+mksession* |:mksession| N *+modify_fname* |filename-modifiers| N *+mouse* Mouse handling |mouse-using| N *+mouseshape* |'mouseshape'| N *+multi_byte* 16 and 32 bit characters |multibyte| *+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime| N *+multi_lang* non-English language support |multi-lang| *+num64* 64-bit Number support |Number| N *+path_extra* Up/downwards search in 'path' and 'tags' N *+persistent_undo* Persistent undo |undo-persistence| *+postscript* |:hardcopy| writes a PostScript file N *+printer* |:hardcopy| command H *+profile* |:profile| command m *+python* Python 2 interface |python| m *+python3* Python 3 interface |python| N *+quickfix* |:make| and |quickfix| commands N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout, 'redrawtime' option B *+rightleft* Right to left typing |'rightleft'| N *+scrollbind* |'scrollbind'| N *+shada* |'shada'| B *+signs* |:sign| N *+smartindent* |'smartindent'| N *+startuptime* |--startuptime| argument N *+statusline* Options 'statusline', 'rulerformat' and special formats of 'titlestring' and 'iconstring' N *+syntax* Syntax highlighting |syntax| N *+tablineat* 'tabline' option recognizing %@Func@ items. T *+tag_binary* binary searching in tags file |tag-binary-search| N *+tag_old_static* old method for static tags |tag-old-static| m *+tag_any_white* any white space allowed in tags file |tag-any-white| B *+termguicolors* 24-bit color in xterm-compatible terminals support N *+termresponse* support for |t_RV| and |v:termresponse| N *+textobjects* |text-objects| selection N *+timers* the |timer_start()| function N *+title* Setting the window 'title' and 'icon' N *+toolbar* |gui-toolbar| N *+user_commands* User-defined commands. |user-commands| *+vertsplit* Vertically split windows |:vsplit| N *+virtualedit* |'virtualedit'| S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. N *+visualextra* extra Visual mode commands |blockwise-operators| N *+vreplace* |gR| and |gr| N *+wildignore* |'wildignore'| N *+wildmenu* |'wildmenu'| *+windows* more than one window m *+writebackup* |'writebackup'| is default on m *+xim* X input method |xim| *+xfontset* X fontset support |xfontset| *+xpm* pixmap support m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support| */dyn* *E370* *E448* To some of the features "/dyn" is added when the feature is only available when the related library can be dynamically loaded. :ve[rsion] {nr} Is now ignored. This was previously used to check the version number of a .vimrc file. It was removed, because you can now use the ":if" command for version-dependent behavior. *:redi* *:redir* :redi[r][!] > {file} Redirect messages to file {file}. The messages which are the output of commands are written to that file, until redirection ends. The messages are also still shown on the screen. When [!] is included, an existing file is overwritten. When [!] is omitted, and {file} exists, this command fails. Only one ":redir" can be active at a time. Calls to ":redir" will close any active redirection before starting redirection to the new target. For recursive use check out |execute()|. To stop the messages and commands from being echoed to the screen, put the commands in a function and call it with ":silent call Function()". Alternatives are the 'verbosefile' option or |execute()| function, these can be used in combination with ":redir". :redi[r] >> {file} Redirect messages to file {file}. Append if {file} already exists. :redi[r] @{a-zA-Z} :redi[r] @{a-zA-Z}> Redirect messages to register {a-z}. Append to the contents of the register if its name is given uppercase {A-Z}. The ">" after the register name is optional. :redi[r] @{a-z}>> Append messages to register {a-z}. :redi[r] @*> :redi[r] @+> Redirect messages to the selection or clipboard. For backward compatibility, the ">" after the register name can be omitted. See |quotestar| and |quoteplus|. :redi[r] @*>> :redi[r] @+>> Append messages to the selection or clipboard. :redi[r] @"> Redirect messages to the unnamed register. For backward compatibility, the ">" after the register name can be omitted. :redi[r] @">> Append messages to the unnamed register. :redi[r] => {var} Redirect messages to a variable. If the variable doesn't exist, then it is created. If the variable exists, then it is initialized to an empty string. The variable will remain empty until redirection ends. Only string variables can be used. After the redirection starts, if the variable is removed or locked or the variable type is changed, then further command output messages will cause errors. To get the output of one command the |execute()| function can be used. :redi[r] =>> {var} Append messages to an existing variable. Only string variables can be used. :redi[r] END End redirecting messages. *:filt* *:filter* :filt[er][!] {pat} {command} :filt[er][!] /{pat}/ {command} Restrict the output of {command} to lines matching with {pat}. For example, to list only xml files: > :filter /\.xml$/ oldfiles < If the [!] is given, restrict the output of {command} to lines that do NOT match {pat}. {pat} is a Vim search pattern. Instead of enclosing it in / any non-ID character (see |'isident'|) can be used, so long as it does not appear in {pat}. Without the enclosing character the pattern cannot include the bar character. The pattern is matched against the relevant part of the output, not necessarily the whole line. Only some commands support filtering, try it out to check if it works. Only normal messages are filtered, error messages are not. *:sil* *:silent* *:silent!* :sil[ent][!] {command} Execute {command} silently. Normal messages will not be given or added to the message history. When [!] is added, error messages will also be skipped, and commands and mappings will not be aborted when an error is detected. |v:errmsg| is still set. When [!] is not used, an error message will cause further messages to be displayed normally. Redirection, started with |:redir|, will continue as usual, although there might be small differences. This will allow redirecting the output of a command without seeing it on the screen. Example: > :redir >/tmp/foobar :silent g/Aap/p :redir END < To execute a Normal mode command silently, use the |:normal| command. For example, to search for a string without messages: > :silent exe "normal /path\<CR>" < ":silent!" is useful to execute a command that may fail, but the failure is to be ignored. Example: > :let v:errmsg = "" :silent! /^begin :if v:errmsg != "" : ... pattern was not found < ":silent" will also avoid the hit-enter prompt. When using this for an external command, this may cause the screen to be messed up. Use |CTRL-L| to clean it up then. ":silent menu ..." defines a menu that will not echo a Command-line command. The command will still produce messages though. Use ":silent" in the command itself to avoid that: ":silent menu .... :silent command". *:uns* *:unsilent* :uns[ilent] {command} Execute {command} not silently. Only makes a difference when |:silent| was used to get to this command. Use this for giving a message even when |:silent| was used. In this example |:silent| is used to avoid the message about reading the file and |:unsilent| to be able to list the first line of each file. > :silent argdo unsilent echo expand('%') . ": " . getline(1) < *:verb* *:verbose* :[count]verb[ose] {command} Execute {command} with 'verbose' set to [count]. If [count] is omitted one is used. ":0verbose" can be used to set 'verbose' to zero. The additional use of ":silent" makes messages generated but not displayed. The combination of ":silent" and ":verbose" can be used to generate messages and check them with |v:statusmsg| and friends. For example: > :let v:statusmsg = "" :silent verbose runtime foobar.vim :if v:statusmsg != "" : " foobar.vim could not be found :endif < When concatenating another command, the ":verbose" only applies to the first one: > :4verbose set verbose | set verbose < verbose=4 ~ verbose=0 ~ For logging verbose messages in a file use the 'verbosefile' option. *:verbose-cmd* When 'verbose' is non-zero, listing the value of a Vim option or a key map or an abbreviation or a user-defined function or a command or a highlight group or an autocommand will also display where it was last defined. If it was defined manually then there will be no "Last set" message. When it was defined while executing a function, user command or autocommand, the script in which it was defined is reported. {not available when compiled without the |+eval| feature} *K* [count]K Run a program to lookup the keyword under the cursor. The name of the program is given with the 'keywordprg' (kp) option (default is "man"). The keyword is formed of letters, numbers and the characters in 'iskeyword'. The keyword under or right of the cursor is used. The same can be done with the command > :!{program} {keyword} < Special cases: - If 'keywordprg' begins with ":" it is invoked as a Vim command with [count]. - If 'keywordprg' is empty, the ":help" command is used. It's a good idea to include more characters in 'iskeyword' then, to be able to find more help. - When 'keywordprg' is equal to "man", a [count] before "K" is inserted after the "man" command and before the keyword. For example, using "2K" while the cursor is on "mkdir", results in: > !man 2 mkdir < - When 'keywordprg' is equal to "man -s", a [count] before "K" is inserted after the "-s". If there is no count, the "-s" is removed. *v_K* {Visual}K Like "K", but use the visually highlighted text for the keyword. Only works when the highlighted text is not more than one line. *gO* gO Show a filetype-specific, navigable "outline" of the current buffer. For example, in a |help| buffer this shows the table of contents. Currently works in |help| and |:Man| buffers. [N]gs *gs* *:sl* *:sleep* :[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included, sleep for [N] milliseconds. The count for "gs" always uses seconds. The default is one second. > :sleep "sleep for one second :5sleep "sleep for five seconds :sleep 100m "sleep for a hundred milliseconds 10gs "sleep for ten seconds < Can be interrupted with CTRL-C (CTRL-Break on Windows). "gs" stands for "goto sleep". While sleeping the cursor is positioned in the text, if at a visible position. ============================================================================== 2. Using Vim like less or more *less* If you use the less or more program to view a file, you don't get syntax highlighting. Thus you would like to use Vim instead. You can do this by using the shell script "$VIMRUNTIME/macros/less.sh". This shell script uses the Vim script "$VIMRUNTIME/macros/less.vim". It sets up mappings to simulate the commands that less supports. Otherwise, you can still use the Vim commands. This isn't perfect. For example, when viewing a short file Vim will still use the whole screen. But it works good enough for most uses, and you get syntax highlighting. The "h" key will give you a short overview of the available commands. If you want to set options differently when using less, define the LessInitFunc in your vimrc, for example: > func LessInitFunc() set nocursorcolumn nocursorline endfunc < vim:noet:tw=78:ts=8:ft=help:norl: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/vi_diff.txt����������������������������������������������������������������0000664�0000000�0000000�00000040774�13204015742�0017421�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*vi_diff.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar Differences between Vim and Vi *vi-differences* Type |gO| to see the table of contents. ============================================================================== 1. Limits *limits* Vim has only a few limits for the files that can be edited. *E340* Maximum line length 2147483647 characters Maximum number of lines 2147483647 lines Maximum file size 2147483647 bytes (2 Gbyte) when a long integer is 32 bits. Much more for 64 bit longs. Also limited by available disk space for the |swap-file|. *E75* Length of a file path Unix and Win32: 1024 characters, otherwise 256 characters (or as much as the system supports). Length of an expanded string option Unix and Win32: 1024 characters, otherwise 256 characters Maximum display width Unix and Win32: 1024 characters, otherwise 255 characters Maximum lhs of a mapping 50 characters. Number of different highlighting types: over 30000 Range of a Number variable: -2147483648 to 2147483647 (might be more on 64 bit systems) Maximum length of a line in a tags file: 512 bytes. Information for undo and text in registers is kept in memory, thus when making (big) changes the amount of (virtual) memory available limits the number of undo levels and the text that can be kept in registers. Other things are also kept in memory: Command-line history, error messages for Quickfix mode, etc. Memory usage limits ------------------- The option 'maxmem' ('mm') is used to set the maximum memory used for one buffer (in kilobytes). 'maxmemtot' is used to set the maximum memory used for all buffers (in kilobytes). The defaults depend on the system used. These are not hard limits, but tell Vim when to move text into a swap file. If you don't like Vim to swap to a file, set 'maxmem' and 'maxmemtot' to a very large value. The swap file will then only be used for recovery. If you don't want a swap file at all, set 'updatecount' to 0, or use the "-n" argument when starting Vim. ============================================================================== 2. The most interesting additions *vim-additions* Support for different systems. Vim can be used on: - Modern Unix systems (*BSD, Linux, etc.) - Windows (XP SP 2 or greater) - OS X Multi level persistent undo. |undo| 'u' goes backward in time, 'CTRL-R' goes forward again. Set option 'undolevels' to the number of changes to be remembered (default 1000). Set 'undolevels' to 0 for a Vi-compatible one level undo. Set it to -1 for no undo at all. When all changes in a buffer have been undone, the buffer is not considered changed anymore. You can exit it with :q, without <!>. When undoing a few changes and then making a new change Vim will create a branch in the undo tree. This means you can go back to any state of the text, there is no risk of a change causing text to be lost forever. |undo-tree| The undo information is stored in a file when the 'undofile' option is set. This means you can exit Vim, start Vim on a previously edited file and undo changes that were made before exiting Vim. Graphical User Interface (GUI). |gui| Included support for GUI: menu's, mouse, scrollbars, etc. You can define your own menus. Better support for CTRL/SHIFT/ALT keys in combination with special keys and mouse. Supported for various platforms such as Win32. Multiple windows and buffers. |windows.txt| Vim can split the screen into several windows, each editing a different buffer or the same buffer at a different location. Buffers can still be loaded (and changed) but not displayed in a window. This is called a hidden buffer. Many commands and options have been added for this facility. Vim can also use multiple tab pages, each with one or more windows. A line with tab labels can be used to quickly switch between these pages. |tab-page| Syntax highlighting. |:syntax| Vim can highlight keywords, patterns and other things. This is defined by a number of |:syntax| commands, and can be made to highlight most languages and file types. A number of files are included for highlighting the most common languages, like C, C++, Java, Pascal, Makefiles, shell scripts, etc. The colors used for highlighting can be defined for ordinary terminals, color terminals and the GUI with the |:highlight| command. A convenient way to do this is using a |:colorscheme| command. The highlighted text can be exported as HTML. |convert-to-HTML| Other items that can be highlighted are matches with the search string |'hlsearch'|, matching parens |matchparen| and the cursor line and column |'cursorline'| |'cursorcolumn'|. Spell checking. |spell| When the 'spell' option is set Vim will highlight spelling mistakes. About 50 languages are currently supported, selected with the 'spelllang' option. In source code only comments and strings are checked for spelling. Folding. |folding| A range of lines can be shown as one "folded" line. This allows overviewing a file and moving blocks of text around quickly. Folds can be created manually, from the syntax of the file, by indent, etc. Diff mode. |diff-mode| Vim can show two versions of a file with the differences highlighted. Parts of the text that are equal are folded away. Commands can be used to move text from one version to the other. Plugins. |add-plugin| The functionality can be extended by dropping a plugin file in the right directory. That's an easy way to start using Vim scripts written by others. Plugins can be for all kind of files, or specifically for a filetype. Packages make this even easier. |packages| Asynchronous communication and timers. |job-control| |timer| Vim can exchange messages with other processes in the background. Vim can start a job, communicate with it and stop it. |job-control| Timers can fire once or repeatedly and invoke a function to do any work. |timer| Repeat a series of commands. |q| "q{c}" starts recording typed characters into named register {c}. A subsequent "q" stops recording. The register can then be executed with the "@{c}" command. This is very useful to repeat a complex action. Flexible insert mode. |ins-special-special| The arrow keys can be used in insert mode to move around in the file. This breaks the insert in two parts as far as undo and redo is concerned. CTRL-O can be used to execute a single Normal mode command. This is almost the same as hitting <Esc>, typing the command and doing |a|. Visual mode. |Visual-mode| Visual mode can be used to first highlight a piece of text and then give a command to do something with it. This is an (easy to use) alternative to first giving the operator and then moving to the end of the text to be operated upon. |v| and |V| are used to start Visual mode. |v| works on characters and |V| on lines. Move the cursor to extend the Visual area. It is shown highlighted on the screen. By typing "o" the other end of the Visual area can be moved. The Visual area can be affected by an operator: d delete c change y yank > or < insert or delete indent ! filter through external program = filter through indent : start |:| command for the Visual lines. gq format text to 'textwidth' columns J join lines ~ swap case u make lowercase U make uppercase Block operators. |visual-block| With Visual mode a rectangular block of text can be selected. Start Visual mode with CTRL-V. The block can be deleted ("d"), yanked ("y") or its case can be changed ("~", "u" and "U"). A deleted or yanked block can be put into the text with the "p" and "P" commands. Help system. |:help| Help is displayed in a window. The usual commands can be used to move around, search for a string, etc. Tags can be used to jump around in the help files, just like hypertext links. The |:help| command takes an argument to quickly jump to the info on a subject. <F1> is the quick access to the help system. The name of the help index file can be set with the 'helpfile' option. Command-line editing and history. |cmdline-editing| You can insert or delete at any place in the command-line using the cursor keys. The right/left cursor keys can be used to move forward/backward one character. The shifted right/left cursor keys can be used to move forward/backward one word. CTRL-B/CTRL-E can be used to go to the begin/end of the command-line. |cmdline-history| The command-lines are remembered. The up/down cursor keys can be used to recall previous command-lines. The 'history' option can be set to the number of lines that will be remembered. There is a separate history for commands and for search patterns. Command-line completion. |cmdline-completion| While entering a command-line (on the bottom line of the screen) <Tab> can be typed to complete what example ~ - command :e<Tab> - tag :ta scr<Tab> - option :set sc<Tab> - option value :set hf=<Tab> - file name :e ve<Tab> - etc. If there are multiple matches, CTRL-N (next) and CTRL-P (previous) will walk through the matches. <Tab> works like CTRL-N, but wraps around to the first match. The 'wildchar' option can be set to the character for command-line completion, <Tab> is the default. CTRL-D can be typed after an (incomplete) wildcard; all matches will be listed. CTRL-A will insert all matches. CTRL-L will insert the longest common part of the matches. Insert-mode completion. |ins-completion| In Insert mode the CTRL-N and CTRL-P keys can be used to complete a word that appears elsewhere. |i_CTRL-N| With CTRL-X another mode is entered, through which completion can be done for: |i_CTRL-X_CTRL-F| file names |i_CTRL-X_CTRL-K| words from 'dictionary' files |i_CTRL-X_CTRL-T| words from 'thesaurus' files |i_CTRL-X_CTRL-I| words from included files |i_CTRL-X_CTRL-L| whole lines |i_CTRL-X_CTRL-]| words from the tags file |i_CTRL-X_CTRL-D| definitions or macros |i_CTRL-X_CTRL-O| Omni completion: clever completion specifically for a file type etc. Long line support. |'wrap'| |'linebreak'| If the 'wrap' option is off, long lines will not wrap and only part of them will be shown. When the cursor is moved to a part that is not shown, the screen will scroll horizontally. The minimum number of columns to scroll can be set with the 'sidescroll' option. The |zh| and |zl| commands can be used to scroll sideways. Alternatively, long lines are broken in between words when the 'linebreak' option is set. This allows editing a single-line paragraph conveniently (e.g. when the text is later read into a DTP program). Move the cursor up/down with the |gk| and |gj| commands. Text formatting. |formatting| The 'textwidth' option can be used to automatically limit the line length. This supplements the 'wrapmargin' option of Vi, which was not very useful. The |gq| operator can be used to format a piece of text (for example, |gqap| formats the current paragraph). Commands for text alignment: |:center|, |:left| and |:right|. Extended search patterns. |pattern| There are many extra items to match various text items. Examples: A "\n" can be used in a search pattern to match a line break. "x\{2,4}" matches "x" 2 to 4 times. "\s" matches a white space character. Directory, remote and archive browsing. |netrw| Vim can browse the file system. Simply edit a directory. Move around in the list with the usual commands and press <Enter> to go to the directory or file under the cursor. This also works for remote files over ftp, http, ssh, etc. Zip and tar archives can also be browsed. |tar| |zip| Edit-compile-edit speedup. |quickfix| The |:make| command can be used to run the compilation and jump to the first error. A file with compiler error messages is interpreted. Vim jumps to the first error. Each line in the error file is scanned for the name of a file, line number and error message. The 'errorformat' option can be set to a list of scanf-like strings to handle output from many compilers. The |:cn| command can be used to jump to the next error. |:cl| lists all the error messages. Other commands are available. The 'makeef' option has the name of the file with error messages. The 'makeprg' option contains the name of the program to be executed with the |:make| command. The 'shellpipe' option contains the string to be used to put the output of the compiler into the errorfile. Finding matches in files. |:vimgrep| Vim can search for a pattern in multiple files. This uses the advanced Vim regexp pattern, works on all systems and also works to search in compressed files. Improved indenting for programs. |'cindent'| When the 'cindent' option is on the indent of each line is automatically adjusted. C syntax is mostly recognized. The indent for various styles can be set with 'cinoptions'. The keys to trigger indenting can be set with 'cinkeys'. Comments can be automatically formatted. The 'comments' option can be set to the characters that start and end a comment. This works best for C code, but also works for e-mail (">" at start of the line) and other types of text. The |=| operator can be used to re-indent lines. For many other languages an indent plugin is present to support automatic indenting. |30.3| Searching for words in included files. |include-search| The |[i| command can be used to search for a match of the word under the cursor in the current and included files. The 'include' option can be set to a pattern that describes a command to include a file (the default is for C programs). The |[I| command lists all matches, the |[_CTRL-I| command jumps to a match. The |[d|, |[D| and |[_CTRL-D| commands do the same, but only for lines where the pattern given with the 'define' option matches. Automatic commands. |autocommand| Commands can be automatically executed when reading a file, writing a file, jumping to another buffer, etc., depending on the file name. This is useful to set options and mappings for C programs, documentation, plain text, e-mail, etc. This also makes it possible to edit compressed files. Scripts and Expressions. |expression| Commands have been added to form up a powerful script language. |:if| Conditional execution, which can be used for example to set options depending on the value of $TERM. |:while| Repeat a number of commands. |:for| Loop over a list. |:echo| Print the result of an expression. |:let| Assign a value to an internal variable, option, etc. Variable types are Number, String, List and Dictionary. |:execute| Execute a command formed by an expression. |:try| Catch exceptions. etc., etc. See |eval|. Debugging and profiling are supported. |debug-scripts| |profile| If this is not enough, an interface is provided to |Python|. Viminfo. |viminfo-file| The command-line history, marks and registers can be stored in a file that is read on startup. This can be used to repeat a search command or command-line command after exiting and restarting Vim. It is also possible to jump right back to where the last edit stopped with |'0|. The 'viminfo' option can be set to select which items to store in the .viminfo file. This is off by default. Printing. |printing| The |:hardcopy| command sends text to the printer. This can include syntax highlighting. Mouse support. |mouse-using| The mouse is supported in the GUI version, in an xterm for Unix, for BSDs with sysmouse, for Linux with gpm, and for Win32. It can be used to position the cursor, select the visual area, paste a register, etc. Usage of key names. |<>| |key-notation| Special keys now all have a name like <Up>, <End>, etc. This name can be used in mappings, to make it easy to edit them. Editing binary files. |edit-binary| Vim can edit binary files. You can change a few characters in an executable file, without corrupting it. Vim doesn't remove NUL characters (they are represented as <NL> internally). |-b| command-line argument to start editing a binary file |'binary'| Option set by |-b|. Prevents adding an <EOL> for the last line in the file. Multi-language support. |multi-lang| Files in double-byte or multi-byte encodings can be edited. There is UTF-8 support to be able to edit various languages at the same time, without switching fonts. |UTF-8| Messages and menus are available in different languages. Move cursor beyond lines. When the 'virtualedit' option is set the cursor can move all over the screen, also where there is no text. This is useful to edit tables and figures easily. vim:tw=78:ts=8:ft=help:norl: ����neovim-0.2.2/runtime/doc/vim_diff.txt���������������������������������������������������������������0000664�0000000�0000000�00000036760�13204015742�0017576�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*vim_diff.txt* Nvim NVIM REFERENCE MANUAL Differences between Nvim and Vim *vim-differences* Nvim differs from Vim in many ways, big and small. This document is a complete and centralized reference of those differences. Type |gO| to see the table of contents. ============================================================================== 1. Configuration *nvim-configuration* - Use `$XDG_CONFIG_HOME/nvim/init.vim` instead of `.vimrc` for storing configuration. - Use `$XDG_CONFIG_HOME/nvim` instead of `.vim` to store configuration files. - Use `$XDG_DATA_HOME/nvim/shada/main.shada` instead of `.viminfo` for persistent session information. ============================================================================== 2. Defaults *nvim-defaults* - Syntax highlighting is enabled by default - ":filetype plugin indent on" is enabled by default - 'autoindent' is set by default - 'autoread' is set by default - 'backspace' defaults to "indent,eol,start" - 'backupdir' defaults to .,~/.local/share/nvim/backup (|xdg|) - 'belloff' defaults to "all" - 'complete' doesn't include "i" - 'directory' defaults to ~/.local/share/nvim/swap// (|xdg|), auto-created - 'display' defaults to "lastline" - 'formatoptions' defaults to "tcqj" - 'history' defaults to 10000 (the maximum) - 'hlsearch' is set by default - 'incsearch' is set by default - 'langnoremap' is enabled by default - 'langremap' is disabled by default - 'laststatus' defaults to 2 (statusline is always shown) - 'listchars' defaults to "tab:> ,trail:-,nbsp:+" - 'nocompatible' is always set - 'nrformats' defaults to "bin,hex" - 'ruler' is set by default - 'sessionoptions' doesn't include "options" - 'showcmd' is set by default - 'smarttab' is set by default - 'tabpagemax' defaults to 50 - 'tags' defaults to "./tags;,tags" - 'ttyfast' is always set - 'undodir' defaults to ~/.local/share/nvim/undo (|xdg|), auto-created - 'viminfo' includes "!" - 'wildmenu' is set by default ============================================================================== 3. New Features *nvim-features* MAJOR COMPONENTS ~ API |API| Lua scripting |lua| Job control |job-control| Remote plugins |remote-plugin| Providers Clipboard |provider-clipboard| Python plugins |provider-python| Ruby plugins |provider-ruby| Shared data |shada| Embedded terminal |terminal| XDG base directories |xdg| USER EXPERIENCE ~ Working intuitively and consistently is a major goal of Nvim. *feature-compile* - Nvim always includes ALL features, in contrast to Vim (which ships with various combinations of 100+ optional features). Think of it as a leaner version of Vim's "HUGE" build. This reduces surface area for bugs, and removes a common source of confusion and friction for users. - Nvim avoids features that cannot be provided on all platforms; instead that is delegated to external plugins/extensions. E.g. the `-X` platform-specific option is "sometimes" available in Vim (with potential surprises: http://stackoverflow.com/q/14635295). - Vim's internal test functions (test_autochdir(), test_settime(), etc.) are not exposed (nor implemented); instead Nvim has a robust API. - Behaviors, options, documentation are removed if they cost users more time than they save. Usability details have been improved where the benefit outweighs any backwards-compatibility cost. Some examples: - |K| in help documents can be used like |CTRL-]|. - Directories for 'directory' and 'undodir' are auto-created. - Terminal features such as 'guicursor' are enabled where possible. ARCHITECTURE ~ External plugins run in separate processes. |remote-plugin| This improves stability and allows those plugins to work without blocking the editor. Even "legacy" Python and Ruby plugins which use the old Vim interfaces (|if_py| and |if_ruby|) run out-of-process. Platform and I/O facilities are built upon libuv. Nvim benefits from libuv features and bug fixes, and other projects benefit from improvements to libuv by Nvim developers. FEATURES ~ "Outline": Type |gO| in |:Man| and |:help| pages to see a document outline. |META| (ALT) chords are recognized, even in the terminal. Any |<M-| mapping will work. Some examples: <M-1>, <M-2>, <M-BS>, <M-Del>, <M-Ins>, <M-/>, <M-\>, <M-Space>, <M-Enter>, <M-=>, <M-->, <M-?>, <M-$>, ... META chords are case-sensitive: <M-a> and <M-A> are two different keycodes. Some `CTRL-SHIFT-...` key chords are distinguished from `CTRL-...` variants (even in the terminal). Specifically, the following are known to work: <C-Tab>, <C-S-Tab>, <C-BS>, <C-S-BS>, <C-Enter>, <C-S-Enter> Options: 'cpoptions' flags: |cpo-_| 'guicursor' works in the terminal 'inccommand' shows interactive results for |:substitute|-like commands 'scrollback' 'statusline' supports unlimited alignment sections 'tabline' %@Func@foo%X can call any function on mouse-click 'winhighlight' window-local highlights Variables: |v:event| |v:exiting| |v:progpath| is always absolute ("full") |v:windowid| is always available (for use by external UIs) Commands: |:checkhealth| |:drop| is available on all platforms |:Man| is available by default, with many improvements such as completion |:tchdir| tab-local |current-directory| Functions: |dictwatcheradd()| notifies a callback whenever a |Dict| is modified |dictwatcherdel()| |menu_get()| |msgpackdump()|, |msgpackparse()| provide msgpack de/serialization Events: |DirChanged| |TabNewEntered| |TermClose| |TermOpen| |TextYankPost| Highlight groups: |hl-NormalNC| highlights non-current windows |hl-QuickFixLine| |hl-Substitute| |hl-TermCursor| |hl-TermCursorNC| |hl-Whitespace| highlights 'listchars' whitespace UI: *E5408* *E5409* *g:Nvim_color_expr* *g:Nvim_color_cmdline* Command-line coloring is supported. Only |input()| and |inputdialog()| may be colored. For testing purposes expressions (e.g. |i_CTRL-R_=|) and regular command-line (|:|) are colored by callbacks defined in `g:Nvim_color_expr` and `g:Nvim_color_cmdline` respectively (these callbacks are for testing only, and will be removed in a future version). ============================================================================== 4. Changed features *nvim-features-changed* Nvim always builds with all features, in contrast to Vim which may have certain features removed/added at compile-time. This is like if Vim's "HUGE" build was the only Vim release type (except Nvim is smaller than Vim's "HUGE" build). If a Python interpreter is available on your `$PATH`, |:python| and |:python3| are always available and may be used simultaneously in separate plugins. The `neovim` pip package must be installed to use Python plugins in Nvim (see |provider-python|). Because of general |256-color| usage whereever possible, Nvim will even use 256-colour capability on Linux virtual terminals. Vim uses only 8 colours plus bright foreground on Linux VTs. Vim combines what is in its |builtin-terms| with what it reads from termcap, and has a |ttybuiltin| setting to control how that combination works. Nvim uses either one or the other of an external |terminfo| entry or the built-in one. It does not attempt to mix data from the two. |:!| does not support "interactive" commands. Use |:terminal| instead. (GUI Vim has a similar limitation, see ":help gui-pty" in Vim.) |system()| does not support writing/reading "backgrounded" commands. |E5677| |:redir| nested in |execute()| works. Nvim may throttle (skip) messages from shell commands (|:!|, |:grep|, |:make|) if there is too much output. No data is lost, this only affects display and makes things faster. |:terminal| output is never throttled. |mkdir()| behaviour changed: 1. Assuming /tmp/foo does not exist and /tmp can be written to mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and /tmp/foo/bar with 0700 permissions. Vim mkdir will create /tmp/foo with 0755. 2. If you try to create an existing directory with `'p'` (e.g. mkdir('/', 'p')) mkdir() will silently exit. In Vim this was an error. 3. mkdir() error messages now include strerror() text when mkdir fails. 'encoding' is always "utf-8". |string()| and |:echo| behaviour changed: 1. No maximum recursion depth limit is applied to nested container structures. 2. |string()| fails immediately on nested containers, not when recursion limit was exceeded. 2. When |:echo| encounters duplicate containers like > let l = [] echo [l, l] < it does not use "[...]" (was: "[[], [...]]", now: "[[], []]"). "..." is only used for recursive containers. 3. |:echo| printing nested containers adds "@level" after "..." designating the level at which recursive container was printed: |:echo-self-refer|. Same thing applies to |string()| (though it uses construct like "{E724@level}"), but this is not reliable because |string()| continues to error out. 4. Stringifyed infinite and NaN values now use |str2float()| and can be evaled back. 5. (internal) Trying to print or stringify VAR_UNKNOWN in Vim results in nothing, |E908|, in Neovim it is internal error. |json_decode()| behaviour changed: 1. It may output |msgpack-special-dict|. 2. |msgpack-special-dict| is emitted also in case of duplicate keys, while in Vim it errors out. 3. It accepts only valid JSON. Trailing commas are not accepted. |json_encode()| behaviour slightly changed: now |msgpack-special-dict| values are accepted, but |v:none| is not. *v:none* variable is absent. In Vim it represents “no value” in “js” strings like "[,]" parsed as "[v:none]" by |js_decode()|. *js_encode()* and *js_decode()* functions are also absent. Viminfo text files were replaced with binary (messagepack) ShaDa files. Additional differences: - |shada-c| has no effect. - |shada-s| now limits size of every item and not just registers. - 'viminfo' option got renamed to 'shada'. Old option is kept as an alias for compatibility reasons. - |:wviminfo| was renamed to |:wshada|, |:rviminfo| to |:rshada|. Old commands are still kept. - ShaDa file format was designed with forward and backward compatibility in mind. |shada-compatibility| - Some errors make ShaDa code keep temporary file in-place for user to decide what to do with it. Vim deletes temporary file in these cases. |shada-error-handling| - ShaDa file keeps search direction (|v:searchforward|), viminfo does not. |printf()| returns something meaningful when used with `%p` argument: in Vim it used to return useless address of the string (strings are copied to the newly allocated memory all over the place) and fail on types which cannot be coerced to strings. See |id()| for more details, currently it uses `printf("%p", {expr})` internally. |c_CTRL-R| pasting a non-special register into |cmdline| omits the last <CR>. Lua interface (|if_lua.txt|): - `:lua print("a\0b")` will print `a^@b`, like with `:echomsg "a\nb"` . In Vim that prints `a` and `b` on separate lines, exactly like `:lua print("a\nb")` . - `:lua error('TEST')` will print “TEST” as the error in Vim and “E5105: Error while calling lua chunk: [string "<VimL compiled string>"]:1: TEST” in Neovim. - Lua has direct access to Nvim |API| via `vim.api`. - Lua package.path and package.cpath are automatically updated according to 'runtimepath': |lua-require|. |input()| and |inputdialog()| support for each other’s features (return on cancel and completion respectively) via dictionary argument (replaces all other arguments if used). |input()| and |inputdialog()| support user-defined cmdline highlighting. Highlight groups: |hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other groups The variable name "count" is no fallback for |v:count| anymore. ============================================================================== 5. Missing legacy features *nvim-features-missing* Some legacy Vim features are not implemented: - |if_py|: vim.bindeval() and vim.Function() are not supported - |if_lua|: the `vim` object is missing most legacy methods - *if_perl* - *if_mzscheme* - *if_tcl* ============================================================================== 6. Removed features *nvim-features-removed* These Vim features were intentionally removed from Nvim. *'cp'* *'nocompatible'* *'nocp'* *'compatible'* Nvim is always "non-compatible" with Vi. ":set nocompatible" is ignored ":set compatible" is an error *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'* Ed-compatible mode: ":set noedcompatible" is ignored ":set edcompatible" is an error *t_xx* *:set-termcap* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI* Nvim does not have special `t_XX` options nor <t_XX> keycodes to configure terminal capabilities. Instead Nvim treats the terminal as any other UI. For example, 'guicursor' sets the terminal cursor style if possible. *'term'* *E529* *E530* *E531* The 'term' option has a fixed value, present only for script compatibility and intentionally not the same as any known terminal type name. It should be a rare case in Nvim where one needs |term-dependent-settings|. *termcap* Nvim never uses the termcap database, only |terminfo| and |builtin-terms|. *xterm-8bit* *xterm-8-bit* Xterm can be run in a mode where it uses true 8-bit CSI. Supporting this requires autodetection of whether the terminal is in UTF-8 mode or non-UTF-8 mode, as the 8-bit CSI character has to be written differently in each case. Vim issues a "request version" sequence to the terminal at startup and looks at how the terminal is sending CSI. Nvim does not issue such a sequence and always uses 7-bit control sequences. 'ttyfast': ":set ttyfast" is ignored ":set nottyfast" is an error Encryption support: *'cryptmethod'* *'cm'* *'key'* MS-DOS support: 'bioskey' 'conskey' Test functions: test_alloc_fail() test_autochdir() test_disable_char_avail() test_garbagecollect_now() test_null_channel() test_null_dict() test_null_job() test_null_list() test_null_partial() test_null_string() test_settime() Other options: 'antialias' 'cpoptions' (g j k H w < * - and all POSIX flags were removed) 'encoding' ("utf-8" is always used) 'esckeys' 'guioptions' "t" flag was removed *'guipty'* (Nvim uses pipes and PTYs consistently on all platforms.) 'highlight' (Names of builtin |highlight-groups| cannot be changed.) *'imactivatefunc'* *'imaf'* *'imactivatekey'* *'imak'* *'imstatusfunc'* *'imsf'* *'macatsui'* *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'* 'shelltype' *'shortname'* *'sn'* *'noshortname'* *'nosn'* *'swapsync'* *'sws'* *'termencoding'* *'tenc'* (Vim 7.4.852 also removed this for Windows) 'textauto' 'textmode' *'toolbar'* *'tb'* *'toolbariconsize'* *'tbis'* *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'* *'ttymouse'* *'ttym'* *'ttyscroll'* *'tsl'* *'ttytype'* *'tty'* 'weirdinvert' Other commands: :Print :fixdel :helpfind :mode (no longer accepts an argument) :open :shell :smile :tearoff Other compile-time features: EBCDIC Emacs tags support X11 integration (see |x11-selection|) Nvim does not have a built-in GUI and hence the following aliases have been removed: gvim, gex, gview, rgvim, rgview "Easy mode" (eview, evim, nvim -y) "(g)vimdiff" (alias for "(g)nvim -d" |diff-mode|) "Vi mode" (nvim -v) The ability to start nvim via the following aliases has been removed in favor of just using their command line arguments: ex nvim -e exim nvim -E view nvim -R rvim nvim -Z rview nvim -RZ ============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: ����������������neovim-0.2.2/runtime/doc/visual.txt�����������������������������������������������������������������0000664�0000000�0000000�00000051367�13204015742�0017316�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*visual.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar Visual mode *Visual* *Visual-mode* *visual-mode* Visual mode is a flexible and easy way to select a piece of text for an operator. It is the only way to select a block of text. This is introduced in section |04.4| of the user manual. Type |gO| to see the table of contents. ============================================================================== 1. Using Visual mode *visual-use* Using Visual mode consists of three parts: 1. Mark the start of the text with "v", "V" or CTRL-V. The character under the cursor will be used as the start. 2. Move to the end of the text. The text from the start of the Visual mode up to and including the character under the cursor is highlighted. 3. Type an operator command. The highlighted characters will be operated upon. The |hl-Visual| group determines the highlighting of the visual selection. The 'virtualedit' option can be used to allow positioning the cursor to positions where there is no actual character. The highlighted text normally includes the character under the cursor. However, when the 'selection' option is set to "exclusive" and the cursor is after the Visual area, the character under the cursor is not included. With "v" the text before the start position and after the end position will not be highlighted. However, all uppercase and non-alpha operators, except "~" and "U", will work on whole lines anyway. See the list of operators below. *visual-block* With CTRL-V (blockwise Visual mode) the highlighted text will be a rectangle between start position and the cursor. However, some operators work on whole lines anyway (see the list below). The change and substitute operators will delete the highlighted text and then start insertion at the top left position. ============================================================================== 2. Starting and stopping Visual mode *visual-start* *v* *characterwise-visual* [count]v Start Visual mode per character. With [count] select the same number of characters or lines as used for the last Visual operation, but at the current cursor position, multiplied by [count]. When the previous Visual operation was on a block both the width and height of the block are multiplied by [count]. When there was no previous Visual operation [count] characters are selected. This is like moving the cursor right N * [count] characters. One less when 'selection' is not "exclusive". *V* *linewise-visual* [count]V Start Visual mode linewise. With [count] select the same number of lines as used for the last Visual operation, but at the current cursor position, multiplied by [count]. When there was no previous Visual operation [count] lines are selected. *CTRL-V* *blockwise-visual* [count]CTRL-V Start Visual mode blockwise. Note: Under Windows CTRL-V could be mapped to paste text, it doesn't work to start Visual mode then, see |CTRL-V-alternative|. [count] is used as with `v` above. If you use <Esc>, click the left mouse button or use any command that does a jump to another buffer while in Visual mode, the highlighting stops and no text is affected. Also when you hit "v" in characterwise Visual mode, "CTRL-V" in blockwise Visual mode or "V" in linewise Visual mode. If you hit CTRL-Z the highlighting stops and the editor is suspended or a new shell is started |CTRL-Z|. new mode after typing: *v_v* *v_CTRL-V* *v_V* old mode "v" "CTRL-V" "V" ~ Normal Visual blockwise Visual linewise Visual Visual Normal blockwise Visual linewise Visual blockwise Visual Visual Normal linewise Visual linewise Visual Visual blockwise Visual Normal *gv* *v_gv* *reselect-Visual* gv Start Visual mode with the same area as the previous area and the same mode. In Visual mode the current and the previous Visual area are exchanged. After using "p" or "P" in Visual mode the text that was put will be selected. *gn* *v_gn* gn Search forward for the last used search pattern, like with `n`, and start Visual mode to select the match. If the cursor is on the match, visually selects it. If an operator is pending, operates on the match. E.g., "dgn" deletes the text of the next match. If Visual mode is active, extends the selection until the end of the next match. *gN* *v_gN* gN Like |gn| but searches backward, like with `N`. *<LeftMouse>* <LeftMouse> Set the current cursor position. If Visual mode is active it is stopped. Only when 'mouse' option is contains 'n' or 'a'. If the position is within 'so' lines from the last line on the screen the text is scrolled up. If the position is within 'so' lines from the first line on the screen the text is scrolled down. *<RightMouse>* <RightMouse> Start Visual mode if it is not active. The text from the cursor position to the position of the click is highlighted. If Visual mode was already active move the start or end of the highlighted text, which ever is closest, to the position of the click. Only when 'mouse' option contains 'n' or 'a'. Note: when 'mousemodel' is set to "popup", <S-LeftMouse> has to be used instead of <RightMouse>. *<LeftRelease>* <LeftRelease> This works like a <LeftMouse>, if it is not at the same position as <LeftMouse>. In an older version of xterm you won't see the selected area until the button is released, unless there is access to the display where the xterm is running (via the DISPLAY environment variable or the -display argument). Only when 'mouse' option contains 'n' or 'a'. If Visual mode is not active and the "v", "V" or CTRL-V is preceded with a count, the size of the previously highlighted area is used for a start. You can then move the end of the highlighted area and give an operator. The type of the old area is used (character, line or blockwise). - Linewise Visual mode: The number of lines is multiplied with the count. - Blockwise Visual mode: The number of lines and columns is multiplied with the count. - Normal Visual mode within one line: The number of characters is multiplied with the count. - Normal Visual mode with several lines: The number of lines is multiplied with the count, in the last line the same number of characters is used as in the last line in the previously highlighted area. The start of the text is the Cursor position. If the "$" command was used as one of the last commands to extend the highlighted text, the area will be extended to the rightmost column of the longest line. If you want to highlight exactly the same area as the last time, you can use "gv" |gv| |v_gv|. *v_<Esc>* <Esc> In Visual mode: Stop Visual mode. *v_CTRL-C* CTRL-C In Visual mode: Stop Visual mode. When insert mode is pending (the mode message shows "-- (insert) VISUAL --"), it is also stopped. ============================================================================== 3. Changing the Visual area *visual-change* *v_o* o Go to Other end of highlighted text: The current cursor position becomes the start of the highlighted text and the cursor is moved to the other end of the highlighted text. The highlighted area remains the same. *v_O* O Go to Other end of highlighted text. This is like "o", but in Visual block mode the cursor moves to the other corner in the same line. When the corner is at a character that occupies more than one position on the screen (e.g., a <Tab>), the highlighted text may change. *v_$* When the "$" command is used with blockwise Visual mode, the right end of the highlighted text will be determined by the longest highlighted line. This stops when a motion command is used that does not move straight up or down. For moving the end of the block many commands can be used, but you cannot use Ex commands, commands that make changes or abandon the file. Commands (starting with) ".", "&", CTRL-^, "Z", CTRL-], CTRL-T, CTRL-R, CTRL-I and CTRL-O cause a beep and Visual mode continues. When switching to another window on the same buffer, the cursor position in that window is adjusted, so that the same Visual area is still selected. This is especially useful to view the start of the Visual area in one window, and the end in another. You can then use <RightMouse> (or <S-LeftMouse> when 'mousemodel' is "popup") to drag either end of the Visual area. ============================================================================== 4. Operating on the Visual area *visual-operators* The operators that can be used are: ~ switch case |v_~| d delete |v_d| c change (4) |v_c| y yank |v_y| > shift right (4) |v_>| < shift left (4) |v_<| ! filter through external command (1) |v_!| = filter through 'equalprg' option command (1) |v_=| gq format lines to 'textwidth' length (1) |v_gq| The objects that can be used are: aw a word (with white space) |v_aw| iw inner word |v_iw| aW a WORD (with white space) |v_aW| iW inner WORD |v_iW| as a sentence (with white space) |v_as| is inner sentence |v_is| ap a paragraph (with white space) |v_ap| ip inner paragraph |v_ip| ab a () block (with parenthesis) |v_ab| ib inner () block |v_ib| aB a {} block (with braces) |v_aB| iB inner {} block |v_iB| at a <tag> </tag> block (with tags) |v_at| it inner <tag> </tag> block |v_it| a< a <> block (with <>) |v_a<| i< inner <> block |v_i<| a[ a [] block (with []) |v_a[| i[ inner [] block |v_i[| a" a double quoted string (with quotes) |v_aquote| i" inner double quoted string |v_iquote| a' a single quoted string (with quotes) |v_a'| i' inner simple quoted string |v_i'| a` a string in backticks (with backticks) |v_a`| i` inner string in backticks |v_i`| Additionally the following commands can be used: : start Ex command for highlighted lines (1) |v_:| r change (4) |v_r| s change |v_s| C change (2)(4) |v_C| S change (2) |v_S| R change (2) |v_R| x delete |v_x| D delete (3) |v_D| X delete (2) |v_X| Y yank (2) |v_Y| p put |v_p| J join (1) |v_J| U make uppercase |v_U| u make lowercase |v_u| ^] find tag |v_CTRL-]| I block insert |v_b_I| A block append |v_b_A| (1): Always whole lines, see |:visual_example|. (2): Whole lines when not using CTRL-V. (3): Whole lines when not using CTRL-V, delete until the end of the line when using CTRL-V. (4): When using CTRL-V operates on the block only. Note that the ":vmap" command can be used to specifically map keys in Visual mode. For example, if you would like the "/" command not to extend the Visual area, but instead take the highlighted text and search for that: > :vmap / y/<C-R>"<CR> (In the <> notation |<>|, when typing it you should type it literally; you need to remove the 'B' flag from 'cpoptions'.) If you want to give a register name using the """ command, do this just before typing the operator character: "v{move-around}"xd". If you want to give a count to the command, do this just before typing the operator character: "v{move-around}3>" (move lines 3 indents to the right). *{move-around}* The {move-around} is any sequence of movement commands. Note the difference with {motion}, which is only ONE movement command. Another way to operate on the Visual area is using the |/\%V| item in a pattern. For example, to replace all '(' in the Visual area with '#': > :'<,'>s/\%V(/#/g Note that the "'<,'>" will appear automatically when you press ":" in Visual mode. ============================================================================== 5. Blockwise operators *blockwise-operators* {not available when compiled without the |+visualextra| feature} Reminder: Use 'virtualedit' to be able to select blocks that start or end after the end of a line or halfway through a tab. Visual-block Insert *v_b_I* With a blockwise selection, I{string}<ESC> will insert {string} at the start of block on every line of the block, provided that the line extends into the block. Thus lines that are short will remain unmodified. TABs are split to retain visual columns. See |v_b_I_example|. Visual-block Append *v_b_A* With a blockwise selection, A{string}<ESC> will append {string} to the end of block on every line of the block. There is some differing behavior where the block RHS is not straight, due to different line lengths: 1. Block was created with <C-v>$ In this case the string is appended to the end of each line. 2. Block was created with <C-v>{move-around} In this case the string is appended to the end of the block on each line, and whitespace is inserted to pad to the end-of-block column. See |v_b_A_example|. Note: "I" and "A" behave differently for lines that don't extend into the selected block. This was done intentionally, so that you can do it the way you want. Visual-block change *v_b_c* All selected text in the block will be replaced by the same text string. When using "c" the selected text is deleted and Insert mode started. You can then enter text (without a line break). When you hit <Esc>, the same string is inserted in all previously selected lines. Visual-block Change *v_b_C* Like using "c", but the selection is extended until the end of the line for all lines. *v_b_<* Visual-block Shift *v_b_>* The block is shifted by 'shiftwidth'. The RHS of the block is irrelevant. The LHS of the block determines the point from which to apply a right shift, and padding includes TABs optimally according to 'ts' and 'et'. The LHS of the block determines the point upto which to shift left. See |v_b_>_example|. See |v_b_<_example|. Visual-block Replace *v_b_r* Every screen char in the highlighted region is replaced with the same char, ie TABs are split and the virtual whitespace is replaced, maintaining screen layout. See |v_b_r_example|. ============================================================================== 6. Repeating *visual-repeat* When repeating a Visual mode operator, the operator will be applied to the same amount of text as the last time: - Linewise Visual mode: The same number of lines. - Blockwise Visual mode: The same number of lines and columns. - Normal Visual mode within one line: The same number of characters. - Normal Visual mode with several lines: The same number of lines, in the last line the same number of characters as in the last line the last time. The start of the text is the Cursor position. If the "$" command was used as one of the last commands to extend the highlighted text, the repeating will be applied up to the rightmost column of the longest line. ============================================================================== 7. Examples *visual-examples* *:visual_example* Currently the ":" command works on whole lines only. When you select part of a line, doing something like ":!date" will replace the whole line. If you want only part of the line to be replaced you will have to make a mapping for it. In a future release ":" may work on partial lines. Here is an example, to replace the selected text with the output of "date": > :vmap _a <Esc>`>a<CR><Esc>`<i<CR><Esc>!!date<CR>kJJ (In the <> notation |<>|, when typing it you should type it literally; you need to remove the 'B' flag from 'cpoptions') What this does is: <Esc> stop Visual mode `> go to the end of the Visual area a<CR><Esc> break the line after the Visual area `< jump to the start of the Visual area i<CR><Esc> break the line before the Visual area !!date<CR> filter the Visual text through date kJJ Join the lines back together *visual-search* Here is an idea for a mapping that makes it possible to do a search for the selected text: > :vmap X y/<C-R>"<CR> (In the <> notation |<>|, when typing it you should type it literally; you need to remove the 'B' flag from 'cpoptions') Note that special characters (like '.' and '*') will cause problems. Visual-block Examples *blockwise-examples* With the following text, I will indicate the commands to produce the block and the results below. In all cases, the cursor begins on the 'a' in the first line of the test text. The following modeline settings are assumed ":ts=8:sw=4:". It will be helpful to :set hls /<TAB> where <TAB> is a real TAB. This helps visualise the operations. The test text is: abcdefghijklmnopqrstuvwxyz abc defghijklmnopqrstuvwxyz abcdef ghi jklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz 1. fo<C-v>3jISTRING<ESC> *v_b_I_example* abcdefghijklmnSTRINGopqrstuvwxyz abc STRING defghijklmnopqrstuvwxyz abcdef ghi STRING jklmnopqrstuvwxyz abcdefghijklmnSTRINGopqrstuvwxyz 2. fo<C-v>3j$ASTRING<ESC> *v_b_A_example* abcdefghijklmnopqrstuvwxyzSTRING abc defghijklmnopqrstuvwxyzSTRING abcdef ghi jklmnopqrstuvwxyzSTRING abcdefghijklmnopqrstuvwxyzSTRING 3. fo<C-v>3j3l<.. *v_b_<_example* abcdefghijklmnopqrstuvwxyz abc defghijklmnopqrstuvwxyz abcdef ghi jklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz 4. fo<C-v>3j>.. *v_b_>_example* abcdefghijklmn opqrstuvwxyz abc defghijklmnopqrstuvwxyz abcdef ghi jklmnopqrstuvwxyz abcdefghijklmn opqrstuvwxyz 5. fo<C-v>5l3jrX *v_b_r_example* abcdefghijklmnXXXXXXuvwxyz abc XXXXXXhijklmnopqrstuvwxyz abcdef ghi XXXXXX jklmnopqrstuvwxyz abcdefghijklmnXXXXXXuvwxyz ============================================================================== 8. Select mode *Select* *Select-mode* Select mode looks like Visual mode, but the commands accepted are quite different. This resembles the selection mode in Microsoft Windows. When the 'showmode' option is set, "-- SELECT --" is shown in the last line. Entering Select mode: - Using the mouse to select an area, and 'selectmode' contains "mouse". 'mouse' must also contain a flag for the current mode. - Using a non-printable movement command, with the Shift key pressed, and 'selectmode' contains "key". For example: <S-Left> and <S-End>. 'keymodel' must also contain "startsel". - Using "v", "V" or CTRL-V command, and 'selectmode' contains "cmd". - Using "gh", "gH" or "g_CTRL-H" command in Normal mode. - From Visual mode, press CTRL-G. *v_CTRL-G* Commands in Select mode: - Printable characters, <NL> and <CR> cause the selection to be deleted, and Vim enters Insert mode. The typed character is inserted. - Non-printable movement commands, with the Shift key pressed, extend the selection. 'keymodel' must include "startsel". - Non-printable movement commands, with the Shift key NOT pressed, stop Select mode. 'keymodel' must include "stopsel". - ESC stops Select mode. - CTRL-O switches to Visual mode for the duration of one command. *v_CTRL-O* - CTRL-G switches to Visual mode. Otherwise, typed characters are handled as in Visual mode. When using an operator in Select mode, and the selection is linewise, the selected lines are operated upon, but like in characterwise selection. For example, when a whole line is deleted, it can later be pasted in the middle of a line. Mappings and menus in Select mode. *Select-mode-mapping* When mappings and menus are defined with the |:vmap| or |:vmenu| command they work both in Visual mode and in Select mode. When these are used in Select mode Vim automatically switches to Visual mode, so that the same behavior as in Visual mode is effective. If you don't want this use |:xmap| or |:smap|. Users will expect printable characters to replace the selected area. Therefore avoid mapping printable characters in Select mode. Or use |:sunmap| after |:map| and |:vmap| to remove it for Select mode. After the mapping or menu finishes, the selection is enabled again and Select mode entered, unless the selected area was deleted, another buffer became the current one or the window layout was changed. When a character was typed that causes the selection to be deleted and Insert mode started, Insert mode mappings are applied to this character. This may cause some confusion, because it means Insert mode mappings apply to a character typed in Select mode. Language mappings apply as well. *gV* *v_gV* gV Avoid the automatic reselection of the Visual area after a Select mode mapping or menu has finished. Put this just before the end of the mapping or menu. At least it should be after any operations on the selection. *gh* gh Start Select mode, characterwise. This is like "v", but starts Select mode instead of Visual mode. Mnemonic: "get highlighted". *gH* gH Start Select mode, linewise. This is like "V", but starts Select mode instead of Visual mode. Mnemonic: "get Highlighted". *g_CTRL-H* g CTRL-H Start Select mode, blockwise. This is like CTRL-V, but starts Select mode instead of Visual mode. Mnemonic: "get Highlighted". vim:tw=78:ts=8:ft=help:norl: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/doc/windows.txt����������������������������������������������������������������0000664�0000000�0000000�00000144327�13204015742�0017504�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*windows.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar Editing with multiple windows and buffers. *windows* *buffers* The commands which have been added to use multiple windows and buffers are explained here. Additionally, there are explanations for commands that work differently when used in combination with more than one window. The basics are explained in chapter 7 and 8 of the user manual |usr_07.txt| |usr_08.txt|. Type |gO| to see the table of contents. ============================================================================== 1. Introduction *windows-intro* *window* Summary: A buffer is the in-memory text of a file. A window is a viewport on a buffer. A tab page is a collection of windows. A window is a viewport onto a buffer. You can use multiple windows on one buffer, or several windows on different buffers. A buffer is a file loaded into memory for editing. The original file remains unchanged until you write the buffer to the file. A buffer can be in one of three states: *active-buffer* active: The buffer is displayed in a window. If there is a file for this buffer, it has been read into the buffer. The buffer may have been modified since then and thus be different from the file. *hidden-buffer* hidden: The buffer is not displayed. If there is a file for this buffer, it has been read into the buffer. Otherwise it's the same as an active buffer, you just can't see it. *inactive-buffer* inactive: The buffer is not displayed and does not contain anything. Options for the buffer are remembered if the file was once loaded. It can contain marks from the |shada| file. But the buffer doesn't contain text. In a table: state displayed loaded ":buffers" ~ in window shows ~ active yes yes 'a' hidden no yes 'h' inactive no no ' ' Note: All CTRL-W commands can also be executed with |:wincmd|, for those places where a Normal mode command can't be used or is inconvenient. The main Vim window can hold several split windows. There are also tab pages |tab-page|, each of which can hold multiple windows. *window-ID* *winid* *windowid* Each window has a unique identifier called the window ID. This identifier will not change within a Vim session. The |win_getid()| and |win_id2tabwin()| functions can be used to convert between the window/tab number and the identifier. There is also the window number, which may change whenever windows are opened or closed, see |winnr()|. Each buffer has a unique number and the number will not change within a Vim session. The |bufnr()| and |bufname()| functions can be used to convert between a buffer name and the buffer number. ============================================================================== 2. Starting Vim *windows-starting* By default, Vim starts with one window, just like Vi. The "-o" and "-O" arguments to Vim can be used to open a window for each file in the argument list. The "-o" argument will split the windows horizontally; the "-O" argument will split the windows vertically. If both "-o" and "-O" are given, the last one encountered will be used to determine the split orientation. For example, this will open three windows, split horizontally: > vim -o file1 file2 file3 "-oN", where N is a decimal number, opens N windows split horizontally. If there are more file names than windows, only N windows are opened and some files do not get a window. If there are more windows than file names, the last few windows will be editing empty buffers. Similarly, "-ON" opens N windows split vertically, with the same restrictions. If there are many file names, the windows will become very small. You might want to set the 'winheight' and/or 'winwidth' options to create a workable situation. Buf/Win Enter/Leave |autocommand|s are not executed when opening the new windows and reading the files, that's only done when they are really entered. *status-line* A status line will be used to separate windows. The 'laststatus' option tells when the last window also has a status line: 'laststatus' = 0 never a status line 'laststatus' = 1 status line if there is more than one window 'laststatus' = 2 always a status line You can change the contents of the status line with the 'statusline' option. This option can be local to the window, so that you can have a different status line in each window. Normally, inversion is used to display the status line. This can be changed with the |hl-StatusLine| highlight group. If no highlighting is used for the status line, the '^' character is used for the current window, and '=' for other windows. If 'mouse' is enabled, a status line can be dragged to resize windows. ============================================================================== 3. Opening and closing a window *opening-window* *E36* CTRL-W s *CTRL-W_s* CTRL-W S *CTRL-W_S* CTRL-W CTRL-S *CTRL-W_CTRL-S* :[N]sp[lit] [++opt] [+cmd] [file] *:sp* *:split* Split current window in two. The result is two viewports on the same file. Make the new window N high (default is to use half the height of the current window). Reduces the current window height to create room (and others, if the 'equalalways' option is set, 'eadirection' isn't "hor", and one of them is higher than the current or the new window). If [file] is given it will be edited in the new window. If it is not loaded in any buffer, it will be read. Else the new window will use the already loaded buffer. Note: CTRL-S does not work on all terminals and might block further input, use CTRL-Q to get going again. Also see |++opt| and |+cmd|. CTRL-W CTRL-V *CTRL-W_CTRL-V* CTRL-W v *CTRL-W_v* :[N]vs[plit] [++opt] [+cmd] [file] *:vs* *:vsplit* Like |:split|, but split vertically. The windows will be spread out horizontally if 1. a width was not specified, 2. 'equalalways' is set, 3. 'eadirection' isn't "ver", and 4. one of the other windows is wider than the current or new window. Note: In other places CTRL-Q does the same as CTRL-V, but here it doesn't! CTRL-W n *CTRL-W_n* CTRL-W CTRL_N *CTRL-W_CTRL-N* :[N]new [++opt] [+cmd] *:new* Create a new window and start editing an empty file in it. Make new window N high (default is to use half the existing height). Reduces the current window height to create room (and others, if the 'equalalways' option is set and 'eadirection' isn't "hor"). Also see |++opt| and |+cmd|. If 'fileformats' is not empty, the first format given will be used for the new buffer. If 'fileformats' is empty, the 'fileformat' of the current buffer is used. This can be overridden with the |++opt| argument. Autocommands are executed in this order: 1. WinLeave for the current window 2. WinEnter for the new window 3. BufLeave for the current buffer 4. BufEnter for the new buffer This behaves like a ":split" first, and then an ":enew" command. :[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew* Like |:new|, but split vertically. If 'equalalways' is set and 'eadirection' isn't "ver" the windows will be spread out horizontally, unless a width was specified. :[N]new [++opt] [+cmd] {file} :[N]sp[lit] [++opt] [+cmd] {file} *:split_f* Create a new window and start editing file {file} in it. This behaves like a ":split" first, and then an ":e" command. If [+cmd] is given, execute the command when the file has been loaded |+cmd|. Also see |++opt|. Make new window N high (default is to use half the existing height). Reduces the current window height to create room (and others, if the 'equalalways' option is set). :[N]sv[iew] [++opt] [+cmd] {file} *:sv* *:sview* *splitview* Same as ":split", but set 'readonly' option for this buffer. :[N]sf[ind] [++opt] [+cmd] {file} *:sf* *:sfind* *splitfind* Same as ":split", but search for {file} in 'path' like in |:find|. Doesn't split if {file} is not found. CTRL-W CTRL-^ *CTRL-W_CTRL-^* *CTRL-W_^* CTRL-W ^ Does ":split #", split window in two and edit alternate file. When a count is given, it becomes ":split #N", split window and edit buffer N. Note that the 'splitbelow' and 'splitright' options influence where a new window will appear. *:vert* *:vertical* :vert[ical] {cmd} Execute {cmd}. If it contains a command that splits a window, it will be split vertically. Doesn't work for |:execute| and |:normal|. :lefta[bove] {cmd} *:lefta* *:leftabove* :abo[veleft] {cmd} *:abo* *:aboveleft* Execute {cmd}. If it contains a command that splits a window, it will be opened left (vertical split) or above (horizontal split) the current window. Overrules 'splitbelow' and 'splitright'. Doesn't work for |:execute| and |:normal|. :rightb[elow] {cmd} *:rightb* *:rightbelow* :bel[owright] {cmd} *:bel* *:belowright* Execute {cmd}. If it contains a command that splits a window, it will be opened right (vertical split) or below (horizontal split) the current window. Overrules 'splitbelow' and 'splitright'. Doesn't work for |:execute| and |:normal|. *:topleft* *E442* :to[pleft] {cmd} Execute {cmd}. If it contains a command that splits a window, it will appear at the top and occupy the full width of the Vim window. When the split is vertical the window appears at the far left and occupies the full height of the Vim window. Doesn't work for |:execute| and |:normal|. *:bo* *:botright* :bo[tright] {cmd} Execute {cmd}. If it contains a command that splits a window, it will appear at the bottom and occupy the full width of the Vim window. When the split is vertical the window appears at the far right and occupies the full height of the Vim window. Doesn't work for |:execute| and |:normal|. These command modifiers can be combined to make a vertically split window occupy the full height. Example: > :vertical topleft split tags Opens a vertically split, full-height window on the "tags" file at the far left of the Vim window. Closing a window ---------------- :q[uit] :{count}q[uit] CTRL-W q *CTRL-W_q* CTRL-W CTRL-Q *CTRL-W_CTRL-Q* Without {count}: Quit the current window. If {count} is given quit the {count} window When quitting the last window (not counting a help window), exit Vim. When 'hidden' is set, and there is only one window for the current buffer, it becomes hidden. When 'hidden' is not set, and there is only one window for the current buffer, and the buffer was changed, the command fails. (Note: CTRL-Q does not work on all terminals). If [count] is greater than the last window number the last window will be closed: > :1quit " quit the first window :$quit " quit the last window :9quit " quit the last window " if there are fewer than 9 windows opened :-quit " quit the previous window :+quit " quit the next window :+2quit " quit the second next window < :q[uit]! :{count}q[uit]! Without {count}: Quit the current window. If {count} is given quit the {count} window If this was the last window for a buffer, any changes to that buffer are lost. When quitting the last window (not counting help windows), exit Vim. The contents of the buffer are lost, even when 'hidden' is set. :clo[se][!] :{count}clo[se][!] CTRL-W c *CTRL-W_c* *:clo* *:close* Without {count}: Close the current window. If given close the {count} window. When 'hidden' is set, or when the buffer was changed and the [!] is used, the buffer becomes hidden (unless there is another window editing it). When there is only one window in the current tab page and there is another tab page, this closes the current tab page. |tab-page|. This command fails when: *E444* - There is only one window on the screen. - When 'hidden' is not set, [!] is not used, the buffer has changes, and there is no other window on this buffer. Changes to the buffer are not written and won't get lost, so this is a "safe" command. CTRL-W CTRL-C *CTRL-W_CTRL-C* You might have expected that CTRL-W CTRL-C closes the current window, but that does not work, because the CTRL-C cancels the command. *:hide* :hid[e] :{count}hid[e] Without {count}: Quit the current window, unless it is the last window on the screen. If {count} is given quit the {count} window. The buffer becomes hidden (unless there is another window editing it or 'bufhidden' is `unload`, `delete` or `wipe`). If the window is the last one in the current tab page the tab page is closed. |tab-page| The value of 'hidden' is irrelevant for this command. Changes to the buffer are not written and won't get lost, so this is a "safe" command. :hid[e] {cmd} Execute {cmd} with 'hidden' set. The previous value of 'hidden' is restored after {cmd} has been executed. Example: > :hide edit Makefile < This will edit "Makefile", and hide the current buffer if it has any changes. :on[ly][!] :{count}on[ly][!] CTRL-W o *CTRL-W_o* *E445* CTRL-W CTRL-O *CTRL-W_CTRL-O* *:on* *:only* Make the current window the only one on the screen. All other windows are closed. For {count} see |:quit|. When the 'hidden' option is set, all buffers in closed windows become hidden. When 'hidden' is not set, and the 'autowrite' option is set, modified buffers are written. Otherwise, windows that have buffers that are modified are not removed, unless the [!] is given, then they become hidden. But modified buffers are never abandoned, so changes cannot get lost. ============================================================================== 4. Moving cursor to other windows *window-move-cursor* CTRL-W <Down> *CTRL-W_<Down>* CTRL-W CTRL-J *CTRL-W_CTRL-J* *CTRL-W_j* CTRL-W j Move cursor to Nth window below current one. Uses the cursor position to select between alternatives. CTRL-W <Up> *CTRL-W_<Up>* CTRL-W CTRL-K *CTRL-W_CTRL-K* *CTRL-W_k* CTRL-W k Move cursor to Nth window above current one. Uses the cursor position to select between alternatives. CTRL-W <Left> *CTRL-W_<Left>* CTRL-W CTRL-H *CTRL-W_CTRL-H* CTRL-W <BS> *CTRL-W_<BS>* *CTRL-W_h* CTRL-W h Move cursor to Nth window left of current one. Uses the cursor position to select between alternatives. CTRL-W <Right> *CTRL-W_<Right>* CTRL-W CTRL-L *CTRL-W_CTRL-L* *CTRL-W_l* CTRL-W l Move cursor to Nth window right of current one. Uses the cursor position to select between alternatives. CTRL-W w *CTRL-W_w* *CTRL-W_CTRL-W* CTRL-W CTRL-W Without count: move cursor to window below/right of the current one. If there is no window below or right, go to top-left window. With count: go to Nth window (windows are numbered from top-left to bottom-right). To obtain the window number see |bufwinnr()| and |winnr()|. When N is larger than the number of windows go to the last window. *CTRL-W_W* CTRL-W W Without count: move cursor to window above/left of current one. If there is no window above or left, go to bottom-right window. With count: go to Nth window, like with CTRL-W w. CTRL-W t *CTRL-W_t* *CTRL-W_CTRL-T* CTRL-W CTRL-T Move cursor to top-left window. CTRL-W b *CTRL-W_b* *CTRL-W_CTRL-B* CTRL-W CTRL-B Move cursor to bottom-right window. CTRL-W p *CTRL-W_p* *CTRL-W_CTRL-P* CTRL-W CTRL-P Go to previous (last accessed) window. *CTRL-W_P* *E441* CTRL-W P Go to preview window. When there is no preview window this is an error. {not available when compiled without the |+quickfix| feature} If Visual mode is active and the new window is not for the same buffer, the Visual mode is ended. If the window is on the same buffer, the cursor position is set to keep the same Visual area selected. *:winc* *:wincmd* These commands can also be executed with ":wincmd": :[count]winc[md] {arg} Like executing CTRL-W [count] {arg}. Example: > :wincmd j < Moves to the window below the current one. This command is useful when a Normal mode cannot be used (for the |CursorHold| autocommand event). Or when a Normal mode command is inconvenient. The count can also be a window number. Example: > :exe nr . "wincmd w" < This goes to window "nr". ============================================================================== 5. Moving windows around *window-moving* CTRL-W r *CTRL-W_r* *CTRL-W_CTRL-R* *E443* CTRL-W CTRL-R Rotate windows downwards/rightwards. The first window becomes the second one, the second one becomes the third one, etc. The last window becomes the first window. The cursor remains in the same window. This only works within the row or column of windows that the current window is in. *CTRL-W_R* CTRL-W R Rotate windows upwards/leftwards. The second window becomes the first one, the third one becomes the second one, etc. The first window becomes the last window. The cursor remains in the same window. This only works within the row or column of windows that the current window is in. CTRL-W x *CTRL-W_x* *CTRL-W_CTRL-X* CTRL-W CTRL-X Without count: Exchange current window with next one. If there is no next window, exchange with previous window. With count: Exchange current window with Nth window (first window is 1). The cursor is put in the other window. When vertical and horizontal window splits are mixed, the exchange is only done in the row or column of windows that the current window is in. The following commands can be used to change the window layout. For example, when there are two vertically split windows, CTRL-W K will change that in horizontally split windows. CTRL-W H does it the other way around. *CTRL-W_K* CTRL-W K Move the current window to be at the very top, using the full width of the screen. This works like closing the current window and then creating another one with ":topleft split", except that the current window contents is used for the new window. *CTRL-W_J* CTRL-W J Move the current window to be at the very bottom, using the full width of the screen. This works like closing the current window and then creating another one with ":botright split", except that the current window contents is used for the new window. *CTRL-W_H* CTRL-W H Move the current window to be at the far left, using the full height of the screen. This works like closing the current window and then creating another one with ":vert topleft split", except that the current window contents is used for the new window. *CTRL-W_L* CTRL-W L Move the current window to be at the far right, using the full height of the screen. This works like closing the current window and then creating another one with ":vert botright split", except that the current window contents is used for the new window. *CTRL-W_T* CTRL-W T Move the current window to a new tab page. This fails if there is only one window in the current tab page. When a count is specified the new tab page will be opened before the tab page with this index. Otherwise it comes after the current tab page. ============================================================================== 6. Window resizing *window-resize* *CTRL-W_=* CTRL-W = Make all windows (almost) equally high and wide, but use 'winheight' and 'winwidth' for the current window. Windows with 'winfixheight' set keep their height and windows with 'winfixwidth' set keep their width. :res[ize] -N *:res* *:resize* *CTRL-W_-* CTRL-W - Decrease current window height by N (default 1). If used after |:vertical|: decrease width by N. :res[ize] +N *CTRL-W_+* CTRL-W + Increase current window height by N (default 1). If used after |:vertical|: increase width by N. :res[ize] [N] CTRL-W CTRL-_ *CTRL-W_CTRL-_* *CTRL-W__* CTRL-W _ Set current window height to N (default: highest possible). z{nr}<CR> Set current window height to {nr}. *CTRL-W_<* CTRL-W < Decrease current window width by N (default 1). *CTRL-W_>* CTRL-W > Increase current window width by N (default 1). :vertical res[ize] [N] *:vertical-resize* *CTRL-W_bar* CTRL-W | Set current window width to N (default: widest possible). *:mod* *:mode* :mod[e] Detects the screen size and redraws the screen. You can also resize a window by dragging a status line up or down with the mouse. Or by dragging a vertical separator line left or right. This only works if the version of Vim that is being used supports the mouse and the 'mouse' option has been set to enable it. The option 'winheight' ('wh') is used to set the minimal window height of the current window. This option is used each time another window becomes the current window. If the option is '0', it is disabled. Set 'winheight' to a very large value, e.g., '9999', to make the current window always fill all available space. Set it to a reasonable value, e.g., '10', to make editing in the current window comfortable. The equivalent 'winwidth' ('wiw') option is used to set the minimal width of the current window. When the option 'equalalways' ('ea') is set, all the windows are automatically made the same size after splitting or closing a window. If you don't set this option, splitting a window will reduce the size of the current window and leave the other windows the same. When closing a window, the extra lines are given to the window above it. The 'eadirection' option limits the direction in which the 'equalalways' option is applied. The default "both" resizes in both directions. When the value is "ver" only the heights of windows are equalized. Use this when you have manually resized a vertically split window and want to keep this width. Likewise, "hor" causes only the widths of windows to be equalized. The option 'cmdheight' ('ch') is used to set the height of the command-line. If you are annoyed by the |hit-enter| prompt for long messages, set this option to 2 or 3. If there is only one window, resizing that window will also change the command line height. If there are several windows, resizing the current window will also change the height of the window below it (and sometimes the window above it). The minimal height and width of a window is set with 'winminheight' and 'winminwidth'. These are hard values, a window will never become smaller. ============================================================================== 7. Argument and buffer list commands *buffer-list* args list buffer list meaning ~ 1. :[N]argument [N] 11. :[N]buffer [N] to arg/buf N 2. :[N]next [file ..] 12. :[N]bnext [N] to Nth next arg/buf 3. :[N]Next [N] 13. :[N]bNext [N] to Nth previous arg/buf 4. :[N]previous [N] 14. :[N]bprevious [N] to Nth previous arg/buf 5. :rewind / :first 15. :brewind / :bfirst to first arg/buf 6. :last 16. :blast to last arg/buf 7. :all 17. :ball edit all args/buffers 18. :unhide edit all loaded buffers 19. :[N]bmod [N] to Nth modified buf split & args list split & buffer list meaning ~ 21. :[N]sargument [N] 31. :[N]sbuffer [N] split + to arg/buf N 22. :[N]snext [file ..] 32. :[N]sbnext [N] split + to Nth next arg/buf 23. :[N]sNext [N] 33. :[N]sbNext [N] split + to Nth previous arg/buf 24. :[N]sprevious [N] 34. :[N]sbprevious [N] split + to Nth previous arg/buf 25. :srewind / :sfirst 35. :sbrewind / :sbfirst split + to first arg/buf 26. :slast 36. :sblast split + to last arg/buf 27. :sall 37. :sball edit all args/buffers 38. :sunhide edit all loaded buffers 39. :[N]sbmod [N] split + to Nth modified buf 40. :args list of arguments 41. :buffers list of buffers The meaning of [N] depends on the command: [N] is the number of buffers to go forward/backward on 2/12/22/32, 3/13/23/33, and 4/14/24/34 [N] is an argument number, defaulting to current argument, for 1 and 21 [N] is a buffer number, defaulting to current buffer, for 11 and 31 [N] is a count for 19 and 39 Note: ":next" is an exception, because it must accept a list of file names for compatibility with Vi. The argument list and multiple windows -------------------------------------- The current position in the argument list can be different for each window. Remember that when doing ":e file", the position in the argument list stays the same, but you are not editing the file at that position. To indicate this, the file message (and the title, if you have one) shows "(file (N) of M)", where "(N)" is the current position in the file list, and "M" the number of files in the file list. All the entries in the argument list are added to the buffer list. Thus, you can also get to them with the buffer list commands, like ":bnext". :[N]al[l][!] [N] *:al* *:all* *:sal* *:sall* :[N]sal[l][!] [N] Rearrange the screen to open one window for each argument. All other windows are closed. When a count is given, this is the maximum number of windows to open. With the |:tab| modifier open a tab page for each argument. When there are more arguments than 'tabpagemax' further ones become split windows in the last tab page. When the 'hidden' option is set, all buffers in closed windows become hidden. When 'hidden' is not set, and the 'autowrite' option is set, modified buffers are written. Otherwise, windows that have buffers that are modified are not removed, unless the [!] is given, then they become hidden. But modified buffers are never abandoned, so changes cannot get lost. [N] is the maximum number of windows to open. 'winheight' also limits the number of windows opened ('winwidth' if |:vertical| was prepended). Buf/Win Enter/Leave autocommands are not executed for the new windows here, that's only done when they are really entered. :[N]sa[rgument][!] [++opt] [+cmd] [N] *:sa* *:sargument* Short for ":split | argument [N]": split window and go to Nth argument. But when there is no such argument, the window is not split. Also see |++opt| and |+cmd|. :[N]sn[ext][!] [++opt] [+cmd] [file ..] *:sn* *:snext* Short for ":split | [N]next": split window and go to Nth next argument. But when there is no next file, the window is not split. Also see |++opt| and |+cmd|. :[N]spr[evious][!] [++opt] [+cmd] [N] *:spr* *:sprevious* :[N]sN[ext][!] [++opt] [+cmd] [N] *:sN* *:sNext* Short for ":split | [N]Next": split window and go to Nth previous argument. But when there is no previous file, the window is not split. Also see |++opt| and |+cmd|. *:sre* *:srewind* :sre[wind][!] [++opt] [+cmd] Short for ":split | rewind": split window and go to first argument. But when there is no argument list, the window is not split. Also see |++opt| and |+cmd|. *:sfir* *:sfirst* :sfir[st] [++opt] [+cmd] Same as ":srewind". *:sla* *:slast* :sla[st][!] [++opt] [+cmd] Short for ":split | last": split window and go to last argument. But when there is no argument list, the window is not split. Also see |++opt| and |+cmd|. *:dr* *:drop* :dr[op] [++opt] [+cmd] {file} .. Edit the first {file} in a window. - If the file is already open in a window change to that window. - If the file is not open in a window edit the file in the current window. If the current buffer can't be |abandon|ed, the window is split first. - Windows that are not in the argument list or are not full width will be closed if possible. The |argument-list| is set, like with the |:next| command. The purpose of this command is that it can be used from a program that wants Vim to edit another file, e.g., a debugger. When using the |:tab| modifier each argument is opened in a tab page. The last window is used if it's empty. Also see |++opt| and |+cmd|. ============================================================================== 8. Do a command in all buffers or windows *list-repeat* *:windo* :[range]windo {cmd} Execute {cmd} in each window or if [range] is given only in windows for which the window number lies in the [range]. It works like doing this: > CTRL-W t :{cmd} CTRL-W w :{cmd} etc. < This only operates in the current tab page. When an error is detected on one window, further windows will not be visited. The last window (or where an error occurred) becomes the current window. {cmd} can contain '|' to concatenate several commands. {cmd} must not open or close windows or reorder them. Also see |:tabdo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo| and |:lfdo|. *:bufdo* :[range]bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list or if [range] is given only for buffers for which their buffer number is in the [range]. It works like doing this: > :bfirst :{cmd} :bnext :{cmd} etc. < When the current file can't be |abandon|ed and the [!] is not present, the command fails. When an error is detected on one buffer, further buffers will not be visited. Unlisted buffers are skipped. The last buffer (or where an error occurred) becomes the current buffer. {cmd} can contain '|' to concatenate several commands. {cmd} must not delete buffers or add buffers to the buffer list. Note: While this command is executing, the Syntax autocommand event is disabled by adding it to 'eventignore'. This considerably speeds up editing each buffer. Also see |:tabdo|, |:argdo|, |:windo|, |:cdo|, |:ldo|, |:cfdo| and |:lfdo|. Examples: > :windo set nolist nofoldcolumn | normal zn This resets the 'list' option and disables folding in all windows. > :bufdo set fileencoding= | update This resets the 'fileencoding' in each buffer and writes it if this changed the buffer. The result is that all buffers will use the 'encoding' encoding (if conversion works properly). ============================================================================== 9. Tag or file name under the cursor *window-tag* *:sta* *:stag* :sta[g][!] [tagname] Does ":tag[!] [tagname]" and splits the window for the found tag. See also |:tag|. CTRL-W ] *CTRL-W_]* *CTRL-W_CTRL-]* CTRL-W CTRL-] Split current window in two. Use identifier under cursor as a tag and jump to it in the new upper window. In Visual mode uses the Visually selected text as a tag. Make new window N high. *CTRL-W_g]* CTRL-W g ] Split current window in two. Use identifier under cursor as a tag and perform ":tselect" on it in the new upper window. In Visual mode uses the Visually selected text as a tag. Make new window N high. *CTRL-W_g_CTRL-]* CTRL-W g CTRL-] Split current window in two. Use identifier under cursor as a tag and perform ":tjump" on it in the new upper window. In Visual mode uses the Visually selected text as a tag. Make new window N high. CTRL-W f *CTRL-W_f* *CTRL-W_CTRL-F* CTRL-W CTRL-F Split current window in two. Edit file name under cursor. Like ":split gf", but window isn't split if the file does not exist. Uses the 'path' variable as a list of directory names where to look for the file. Also the path for current file is used to search for the file name. If the name is a hypertext link that looks like "type://machine/path", only "/path" is used. If a count is given, the count'th matching file is edited. {not available when the |+file_in_path| feature was disabled at compile time} CTRL-W F *CTRL-W_F* Split current window in two. Edit file name under cursor and jump to the line number following the file name. See |gF| for details on how the line number is obtained. {not available when the |+file_in_path| feature was disabled at compile time} CTRL-W gf *CTRL-W_gf* Open a new tab page and edit the file name under the cursor. Like "tab split" and "gf", but the new tab page isn't created if the file does not exist. {not available when the |+file_in_path| feature was disabled at compile time} CTRL-W gF *CTRL-W_gF* Open a new tab page and edit the file name under the cursor and jump to the line number following the file name. Like "tab split" and "gF", but the new tab page isn't created if the file does not exist. {not available when the |+file_in_path| feature was disabled at compile time} Also see |CTRL-W_CTRL-I|: open window for an included file that includes the keyword under the cursor. ============================================================================== 10. The preview window *preview-window* The preview window is a special window to show (preview) another file. It is normally a small window used to show an include file or definition of a function. {not available when compiled without the |+quickfix| feature} There can be only one preview window (per tab page). It is created with one of the commands below. The 'previewheight' option can be set to specify the height of the preview window when it's opened. The 'previewwindow' option is set in the preview window to be able to recognize it. The 'winfixheight' option is set to have it keep the same height when opening/closing other windows. *:pta* *:ptag* :pta[g][!] [tagname] Does ":tag[!] [tagname]" and shows the found tag in a "Preview" window without changing the current buffer or cursor position. If a "Preview" window already exists, it is re-used (like a help window is). If a new one is opened, 'previewheight' is used for the height of the window. See also |:tag|. See below for an example. |CursorHold-example| Small difference from |:tag|: When [tagname] is equal to the already displayed tag, the position in the matching tag list is not reset. This makes the CursorHold example work after a |:ptnext|. CTRL-W z *CTRL-W_z* CTRL-W CTRL-Z *CTRL-W_CTRL-Z* *:pc* *:pclose* :pc[lose][!] Close any "Preview" window currently open. When the 'hidden' option is set, or when the buffer was changed and the [!] is used, the buffer becomes hidden (unless there is another window editing it). The command fails if any "Preview" buffer cannot be closed. See also |:close|. *:pp* *:ppop* :[count]pp[op][!] Does ":[count]pop[!]" in the preview window. See |:pop| and |:ptag|. CTRL-W } *CTRL-W_}* Use identifier under cursor as a tag and perform a :ptag on it. Make the new Preview window (if required) N high. If N is not given, 'previewheight' is used. CTRL-W g } *CTRL-W_g}* Use identifier under cursor as a tag and perform a :ptjump on it. Make the new Preview window (if required) N high. If N is not given, 'previewheight' is used. *:ped* *:pedit* :ped[it][!] [++opt] [+cmd] {file} Edit {file} in the preview window. The preview window is opened like with |:ptag|. The current window and cursor position isn't changed. Useful example: > :pedit +/fputc /usr/include/stdio.h < *:ps* *:psearch* :[range]ps[earch][!] [count] [/]pattern[/] Works like |:ijump| but shows the found match in the preview window. The preview window is opened like with |:ptag|. The current window and cursor position isn't changed. Useful example: > :psearch popen < Like with the |:ptag| command, you can use this to automatically show information about the word under the cursor. This is less clever than using |:ptag|, but you don't need a tags file and it will also find matches in system include files. Example: > :au! CursorHold *.[ch] nested exe "silent! psearch " . expand("<cword>") < Warning: This can be slow. Example *CursorHold-example* > :au! CursorHold *.[ch] nested exe "silent! ptag " . expand("<cword>") This will cause a ":ptag" to be executed for the keyword under the cursor, when the cursor hasn't moved for the time set with 'updatetime'. The "nested" makes other autocommands be executed, so that syntax highlighting works in the preview window. The "silent!" avoids an error message when the tag could not be found. Also see |CursorHold|. To disable this again: > :au! CursorHold A nice addition is to highlight the found tag, avoid the ":ptag" when there is no word under the cursor, and a few other things: > :au! CursorHold *.[ch] nested call PreviewWord() :func PreviewWord() : if &previewwindow " don't do this in the preview window : return : endif : let w = expand("<cword>") " get the word under cursor : if w =~ '\a' " if the word contains a letter : : " Delete any existing highlight before showing another tag : silent! wincmd P " jump to preview window : if &previewwindow " if we really get there... : match none " delete existing highlight : wincmd p " back to old window : endif : : " Try displaying a matching tag for the word under the cursor : try : exe "ptag " . w : catch : return : endtry : : silent! wincmd P " jump to preview window : if &previewwindow " if we really get there... : if has("folding") : silent! .foldopen " don't want a closed fold : endif : call search("$", "b") " to end of previous line : let w = substitute(w, '\\', '\\\\', "") : call search('\<\V' . w . '\>') " position cursor on match : " Add a match highlight to the word at this position : hi previewWord term=bold ctermbg=green guibg=green : exe 'match previewWord "\%' . line(".") . 'l\%' . col(".") . 'c\k*"' : wincmd p " back to old window : endif : endif :endfun ============================================================================== 11. Using hidden buffers *buffer-hidden* A hidden buffer is not displayed in a window, but is still loaded into memory. This makes it possible to jump from file to file, without the need to read or write the file every time you get another buffer in a window. {not available when compiled without the |+listcmds| feature} *:buffer-!* If the option 'hidden' ('hid') is set, abandoned buffers are kept for all commands that start editing another file: ":edit", ":next", ":tag", etc. The commands that move through the buffer list sometimes make the current buffer hidden although the 'hidden' option is not set. This happens when a buffer is modified, but is forced (with '!') to be removed from a window, and 'autowrite' is off or the buffer can't be written. You can make a hidden buffer not hidden by starting to edit it with any command. Or by deleting it with the ":bdelete" command. The 'hidden' is global, it is used for all buffers. The 'bufhidden' option can be used to make an exception for a specific buffer. It can take these values: <empty> Use the value of 'hidden'. hide Hide this buffer, also when 'hidden' is not set. unload Don't hide but unload this buffer, also when 'hidden' is set. delete Delete the buffer. *hidden-quit* When you try to quit Vim while there is a hidden, modified buffer, you will get an error message and Vim will make that buffer the current buffer. You can then decide to write this buffer (":wq") or quit without writing (":q!"). Be careful: there may be more hidden, modified buffers! A buffer can also be unlisted. This means it exists, but it is not in the list of buffers. |unlisted-buffer| :files[!] [flags] *:files* :buffers[!] [flags] *:buffers* *:ls* :ls[!] [flags] Show all buffers. Example: 1 #h "/test/text" line 1 ~ 2u "asdf" line 0 ~ 3 %a + "version.c" line 1 ~ When the [!] is included the list will show unlisted buffers (the term "unlisted" is a bit confusing then...). Each buffer has a unique number. That number will not change, thus you can always go to a specific buffer with ":buffer N" or "N CTRL-^", where N is the buffer number. Indicators (chars in the same column are mutually exclusive): u an unlisted buffer (only displayed when [!] is used) |unlisted-buffer| % the buffer in the current window # the alternate buffer for ":e #" and CTRL-^ a an active buffer: it is loaded and visible h a hidden buffer: It is loaded, but currently not displayed in a window |hidden-buffer| - a buffer with 'modifiable' off = a readonly buffer R a terminal buffer with a running job F a terminal buffer with a finished job ? a terminal buffer without a job: `:terminal NONE` + a modified buffer x a buffer with read errors [flags] can be a combination of the following characters, which restrict the buffers to be listed: + modified buffers - buffers with 'modifiable' off = readonly buffers a active buffers u unlisted buffers (overrides the "!") h hidden buffers x buffers with a read error % current buffer # alternate buffer Combining flags means they are "and"ed together, e.g.: h+ hidden buffers which are modified a+ active buffers which are modified When using |:filter| the pattern is matched against the displayed buffer name, e.g.: > filter /\.vim/ ls < *:bad* *:badd* :bad[d] [+lnum] {fname} Add file name {fname} to the buffer list, without loading it. If "lnum" is specified, the cursor will be positioned at that line when the buffer is first entered. Note that other commands after the + will be ignored. :[N]bd[elete][!] *:bd* *:bdel* *:bdelete* *E516* :bd[elete][!] [N] Unload buffer [N] (default: current buffer) and delete it from the buffer list. If the buffer was changed, this fails, unless when [!] is specified, in which case changes are lost. The file remains unaffected. Any windows for this buffer are closed. If buffer [N] is the current buffer, another buffer will be displayed instead. This is the most recent entry in the jump list that points into a loaded buffer. Actually, the buffer isn't completely deleted, it is removed from the buffer list |unlisted-buffer| and option values, variables and mappings/abbreviations for the buffer are cleared. Examples: > :.,$-bdelete "delete buffers from the current one to " last but one :%bdelete " delete all buffers < :bdelete[!] {bufname} *E93* *E94* Like ":bdelete[!] [N]", but buffer given by name. Note that a buffer whose name is a number cannot be referenced by that name; use the buffer number instead. Insert a backslash before a space in a buffer name. :bdelete[!] N1 N2 ... Do ":bdelete[!]" for buffer N1, N2, etc. The arguments can be buffer numbers or buffer names (but not buffer names that are a number). Insert a backslash before a space in a buffer name. :N,Mbdelete[!] Do ":bdelete[!]" for all buffers in the range N to M |inclusive|. :[N]bw[ipeout][!] *:bw* *:bwipe* *:bwipeout* *E517* :bw[ipeout][!] {bufname} :N,Mbw[ipeout][!] :bw[ipeout][!] N1 N2 ... Like |:bdelete|, but really delete the buffer. Everything related to the buffer is lost. All marks in this buffer become invalid, option settings are lost, etc. Don't use this unless you know what you are doing. Examples: > :.+,$bwipeout " wipe out all buffers after the current " one :%bwipeout " wipe out all buffers < :[N]bun[load][!] *:bun* *:bunload* *E515* :bun[load][!] [N] Unload buffer [N] (default: current buffer). The memory allocated for this buffer will be freed. The buffer remains in the buffer list. If the buffer was changed, this fails, unless when [!] is specified, in which case the changes are lost. Any windows for this buffer are closed. If buffer [N] is the current buffer, another buffer will be displayed instead. This is the most recent entry in the jump list that points into a loaded buffer. :bunload[!] {bufname} Like ":bunload[!] [N]", but buffer given by name. Note that a buffer whose name is a number cannot be referenced by that name; use the buffer number instead. Insert a backslash before a space in a buffer name. :N,Mbunload[!] Do ":bunload[!]" for all buffers in the range N to M |inclusive|. :bunload[!] N1 N2 ... Do ":bunload[!]" for buffer N1, N2, etc. The arguments can be buffer numbers or buffer names (but not buffer names that are a number). Insert a backslash before a space in a buffer name. :[N]b[uffer][!] [+cmd] [N] *:b* *:bu* *:buf* *:buffer* *E86* Edit buffer [N] from the buffer list. If [N] is not given, the current buffer remains being edited. See |:buffer-!| for [!]. This will also edit a buffer that is not in the buffer list, without setting the 'buflisted' flag. Also see |+cmd|. :[N]b[uffer][!] [+cmd] {bufname} Edit buffer for {bufname} from the buffer list. See |:buffer-!| for [!]. This will also edit a buffer that is not in the buffer list, without setting the 'buflisted' flag. Also see |+cmd|. :[N]sb[uffer] [+cmd] [N] *:sb* *:sbuffer* Split window and edit buffer [N] from the buffer list. If [N] is not given, the current buffer is edited. Respects the "useopen" setting of 'switchbuf' when splitting. This will also edit a buffer that is not in the buffer list, without setting the 'buflisted' flag. Also see |+cmd|. :[N]sb[uffer] [+cmd] {bufname} Split window and edit buffer for {bufname} from the buffer list. This will also edit a buffer that is not in the buffer list, without setting the 'buflisted' flag. Note: If what you want to do is split the buffer, make a copy under another name, you can do it this way: > :w foobar | sp # < Also see |+cmd|. :[N]bn[ext][!] [+cmd] [N] *:bn* *:bnext* *E87* Go to [N]th next buffer in buffer list. [N] defaults to one. Wraps around the end of the buffer list. See |:buffer-!| for [!]. Also see |+cmd|. If you are in a help buffer, this takes you to the next help buffer (if there is one). Similarly, if you are in a normal (non-help) buffer, this takes you to the next normal buffer. This is so that if you have invoked help, it doesn't get in the way when you're browsing code/text buffers. The next three commands also work like this. *:sbn* *:sbnext* :[N]sbn[ext] [+cmd] [N] Split window and go to [N]th next buffer in buffer list. Wraps around the end of the buffer list. Uses 'switchbuf' Also see |+cmd|. :[N]bN[ext][!] [+cmd] [N] *:bN* *:bNext* *:bp* *:bprevious* *E88* :[N]bp[revious][!] [+cmd] [N] Go to [N]th previous buffer in buffer list. [N] defaults to one. Wraps around the start of the buffer list. See |:buffer-!| for [!] and 'switchbuf'. Also see |+cmd|. :[N]sbN[ext] [+cmd] [N] *:sbN* *:sbNext* *:sbp* *:sbprevious* :[N]sbp[revious] [+cmd] [N] Split window and go to [N]th previous buffer in buffer list. Wraps around the start of the buffer list. Uses 'switchbuf'. Also see |+cmd|. :br[ewind][!] [+cmd] *:br* *:brewind* Go to first buffer in buffer list. If the buffer list is empty, go to the first unlisted buffer. See |:buffer-!| for [!]. :bf[irst] [+cmd] *:bf* *:bfirst* Same as |:brewind|. Also see |+cmd|. :sbr[ewind] [+cmd] *:sbr* *:sbrewind* Split window and go to first buffer in buffer list. If the buffer list is empty, go to the first unlisted buffer. Respects the 'switchbuf' option. Also see |+cmd|. :sbf[irst] [+cmd] *:sbf* *:sbfirst* Same as ":sbrewind". :bl[ast][!] [+cmd] *:bl* *:blast* Go to last buffer in buffer list. If the buffer list is empty, go to the last unlisted buffer. See |:buffer-!| for [!]. :sbl[ast] [+cmd] *:sbl* *:sblast* Split window and go to last buffer in buffer list. If the buffer list is empty, go to the last unlisted buffer. Respects 'switchbuf' option. :[N]bm[odified][!] [+cmd] [N] *:bm* *:bmodified* *E84* Go to [N]th next modified buffer. Note: this command also finds unlisted buffers. If there is no modified buffer the command fails. :[N]sbm[odified] [+cmd] [N] *:sbm* *:sbmodified* Split window and go to [N]th next modified buffer. Respects 'switchbuf' option. Note: this command also finds buffers not in the buffer list. :[N]unh[ide] [N] *:unh* *:unhide* *:sun* *:sunhide* :[N]sun[hide] [N] Rearrange the screen to open one window for each loaded buffer in the buffer list. When a count is given, this is the maximum number of windows to open. :[N]ba[ll] [N] *:ba* *:ball* *:sba* *:sball* :[N]sba[ll] [N] Rearrange the screen to open one window for each buffer in the buffer list. When a count is given, this is the maximum number of windows to open. 'winheight' also limits the number of windows opened ('winwidth' if |:vertical| was prepended). Buf/Win Enter/Leave autocommands are not executed for the new windows here, that's only done when they are really entered. When the |:tab| modifier is used new windows are opened in a new tab, up to 'tabpagemax'. Note: All the commands above that start editing another buffer, keep the 'readonly' flag as it was. This differs from the ":edit" command, which sets the 'readonly' flag each time the file is read. ============================================================================== 12. Special kinds of buffers *special-buffers* Instead of containing the text of a file, buffers can also be used for other purposes. A few options can be set to change the behavior of a buffer: 'bufhidden' what happens when the buffer is no longer displayed in a window. 'buftype' what kind of a buffer this is 'swapfile' whether the buffer will have a swap file 'buflisted' buffer shows up in the buffer list A few useful kinds of a buffer: quickfix Used to contain the error list or the location list. See |:cwindow| and |:lwindow|. This command sets the 'buftype' option to "quickfix". You are not supposed to change this! 'swapfile' is off. help Contains a help file. Will only be created with the |:help| command. The flag that indicates a help buffer is internal and can't be changed. The 'buflisted' option will be reset for a help buffer. terminal A terminal window buffer, see |terminal|. The contents cannot be read or changed until the job ends. directory Displays directory contents. Can be used by a file explorer plugin. The buffer is created with these settings: > :setlocal buftype=nowrite :setlocal bufhidden=delete :setlocal noswapfile < The buffer name is the name of the directory and is adjusted when using the |:cd| command. scratch Contains text that can be discarded at any time. It is kept when closing the window, it must be deleted explicitly. Settings: > :setlocal buftype=nofile :setlocal bufhidden=hide :setlocal noswapfile < The buffer name can be used to identify the buffer, if you give it a meaningful name. *unlisted-buffer* unlisted The buffer is not in the buffer list. It is not used for normal editing, but to show a help file, remember a file name or marks. The ":bdelete" command will also set this option, thus it doesn't completely delete the buffer. Settings: > :setlocal nobuflisted < vim:tw=78:ts=8:ft=help:norl: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/filetype.vim�������������������������������������������������������������������0000664�0000000�0000000�00000215501�13204015742�0017033�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2017 Nov 02 " Listen very carefully, I will say this only once if exists("did_load_filetypes") finish endif let did_load_filetypes = 1 " Line continuation is used here, remove 'C' from 'cpoptions' let s:cpo_save = &cpo set cpo&vim augroup filetypedetect " Ignored extensions if exists("*fnameescape") au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew,?\+.pacsave,?\+.pacnew \ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) au BufNewFile,BufRead *~ \ let s:name = expand("<afile>") | \ let s:short = substitute(s:name, '\~$', '', '') | \ if s:name != s:short && s:short != "" | \ exe "doau filetypedetect BufRead " . fnameescape(s:short) | \ endif | \ unlet! s:name s:short au BufNewFile,BufRead ?\+.in \ if expand("<afile>:t") != "configure.in" | \ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) | \ endif elseif &verbose > 0 echomsg "Warning: some filetypes will not be recognized because this version of Vim does not have fnameescape()" endif " Pattern used to match file names which should not be inspected. " Currently finds compressed files. if !exists("g:ft_ignore_pat") let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$' endif " Function used for patterns that end in a star: don't set the filetype if the " file name matches ft_ignore_pat. func! s:StarSetf(ft) if expand("<amatch>") !~ g:ft_ignore_pat exe 'setf ' . a:ft endif endfunc " Abaqus or Trasys au BufNewFile,BufRead *.inp call s:Check_inp() func! s:Check_inp() if getline(1) =~ '^\*' setf abaqus else let n = 1 if line("$") > 500 let nmax = 500 else let nmax = line("$") endif while n <= nmax if getline(n) =~? "^header surface data" setf trasys break endif let n = n + 1 endwhile endif endfunc " A-A-P recipe au BufNewFile,BufRead *.aap setf aap " A2ps printing utility au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps " ABAB/4 au BufNewFile,BufRead *.abap setf abap " ABC music notation au BufNewFile,BufRead *.abc setf abc " ABEL au BufNewFile,BufRead *.abl setf abel " AceDB au BufNewFile,BufRead *.wrm setf acedb " Ada (83, 9X, 95) au BufNewFile,BufRead *.adb,*.ads,*.ada setf ada au BufNewFile,BufRead *.gpr setf ada " AHDL au BufNewFile,BufRead *.tdf setf ahdl " AMPL au BufNewFile,BufRead *.run setf ampl " Ant au BufNewFile,BufRead build.xml setf ant " Arduino au BufNewFile,BufRead *.ino,*.pde setf arduino " Apache style config file au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle') " Apache config file au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache " XA65 MOS6510 cross assembler au BufNewFile,BufRead *.a65 setf a65 " Applescript au BufNewFile,BufRead *.scpt setf applescript " Applix ELF au BufNewFile,BufRead *.am \ if expand("<afile>") !~? 'Makefile.am\>' | setf elf | endif " ALSA configuration au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf " Arc Macro Language au BufNewFile,BufRead *.aml setf aml " APT config file au BufNewFile,BufRead apt.conf setf aptconf au BufNewFile,BufRead */.aptitude/config setf aptconf au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} setf aptconf " Arch Inventory file au BufNewFile,BufRead .arch-inventory,=tagging-method setf arch " ART*Enterprise (formerly ART-IM) au BufNewFile,BufRead *.art setf art " AsciiDoc au BufNewFile,BufRead *.asciidoc,*.adoc setf asciidoc " ASN.1 au BufNewFile,BufRead *.asn,*.asn1 setf asn " Active Server Pages (with Visual Basic Script) au BufNewFile,BufRead *.asa \ if exists("g:filetype_asa") | \ exe "setf " . g:filetype_asa | \ else | \ setf aspvbs | \ endif " Active Server Pages (with Perl or Visual Basic Script) au BufNewFile,BufRead *.asp \ if exists("g:filetype_asp") | \ exe "setf " . g:filetype_asp | \ elseif getline(1) . getline(2) . getline(3) =~? "perlscript" | \ setf aspperl | \ else | \ setf aspvbs | \ endif " Grub (must be before catch *.lst) au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub " Assembly (all kinds) " *.lst is not pure assembly, it has two extra columns (address, byte codes) au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call s:FTasm() " This function checks for the kind of assembly that is wanted by the user, or " can be detected from the first five lines of the file. func! s:FTasm() " make sure b:asmsyntax exists if !exists("b:asmsyntax") let b:asmsyntax = "" endif if b:asmsyntax == "" call s:FTasmsyntax() endif " if b:asmsyntax still isn't set, default to asmsyntax or GNU if b:asmsyntax == "" if exists("g:asmsyntax") let b:asmsyntax = g:asmsyntax else let b:asmsyntax = "asm" endif endif exe "setf " . fnameescape(b:asmsyntax) endfunc func! s:FTasmsyntax() " see if file contains any asmsyntax=foo overrides. If so, change " b:asmsyntax appropriately let head = " ".getline(1)." ".getline(2)." ".getline(3)." ".getline(4). \" ".getline(5)." " let match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s') if match != '' let b:asmsyntax = match elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library')) let b:asmsyntax = "vmasm" endif endfunc " Macro (VAX) au BufNewFile,BufRead *.mar setf vmasm " Atlas au BufNewFile,BufRead *.atl,*.as setf atlas " Autoit v3 au BufNewFile,BufRead *.au3 setf autoit " Autohotkey au BufNewFile,BufRead *.ahk setf autohotkey " Automake au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake " Autotest .at files are actually m4 au BufNewFile,BufRead *.at setf m4 " Avenue au BufNewFile,BufRead *.ave setf ave " Awk au BufNewFile,BufRead *.awk setf awk " B au BufNewFile,BufRead *.mch,*.ref,*.imp setf b " BASIC or Visual Basic au BufNewFile,BufRead *.bas call s:FTVB("basic") " Check if one of the first five lines contains "VB_Name". In that case it is " probably a Visual Basic file. Otherwise it's assumed to be "alt" filetype. func! s:FTVB(alt) if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)' setf vb else exe "setf " . a:alt endif endfunc " Visual Basic Script (close to Visual Basic) or Visual Basic .NET au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb " IBasic file (similar to QBasic) au BufNewFile,BufRead *.iba,*.ibi setf ibasic " FreeBasic file (similar to QBasic) au BufNewFile,BufRead *.fb,*.bi setf freebasic " Batch file for MSDOS. au BufNewFile,BufRead *.bat,*.sys setf dosbatch " *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd. au BufNewFile,BufRead *.cmd \ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif " Batch file for 4DOS au BufNewFile,BufRead *.btm call s:FTbtm() func! s:FTbtm() if exists("g:dosbatch_syntax_for_btm") && g:dosbatch_syntax_for_btm setf dosbatch else setf btm endif endfunc " BC calculator au BufNewFile,BufRead *.bc setf bc " BDF font au BufNewFile,BufRead *.bdf setf bdf " BibTeX bibliography database file au BufNewFile,BufRead *.bib setf bib " BibTeX Bibliography Style au BufNewFile,BufRead *.bst setf bst " BIND configuration " sudoedit uses namedXXXX.conf au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named " BIND zone au BufNewFile,BufRead named.root setf bindzone au BufNewFile,BufRead *.db call s:BindzoneCheck('') func! s:BindzoneCheck(default) if getline(1).getline(2).getline(3).getline(4) =~ '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA' setf bindzone elseif a:default != '' exe 'setf ' . a:default endif endfunc " Blank au BufNewFile,BufRead *.bl setf blank " Blkid cache file au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml " Bazel (http://bazel.io) autocmd BufRead,BufNewFile *.bzl,WORKSPACE setfiletype bzl if has("fname_case") autocmd BufRead,BufNewFile BUILD setfiletype bzl endif " C or lpc au BufNewFile,BufRead *.c call s:FTlpc() func! s:FTlpc() if exists("g:lpc_syntax_for_c") let lnum = 1 while lnum <= 12 if getline(lnum) =~# '^\(//\|inherit\|private\|protected\|nosave\|string\|object\|mapping\|mixed\)' setf lpc return endif let lnum = lnum + 1 endwhile endif setf c endfunc " Calendar au BufNewFile,BufRead calendar setf calendar " C# au BufNewFile,BufRead *.cs setf cs " CSDL au BufNewFile,BufRead *.csdl setf csdl " Cabal au BufNewFile,BufRead *.cabal setf cabal " Cdrdao TOC au BufNewFile,BufRead *.toc setf cdrtoc " Cdrdao config au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao setf cdrdaoconf " Cfengine au BufNewFile,BufRead cfengine.conf setf cfengine " ChaiScript au BufRead,BufNewFile *.chai setf chaiscript " Comshare Dimension Definition Language au BufNewFile,BufRead *.cdl setf cdl " Conary Recipe au BufNewFile,BufRead *.recipe setf conaryrecipe " Controllable Regex Mutilator au BufNewFile,BufRead *.crm setf crm " Cyn++ au BufNewFile,BufRead *.cyn setf cynpp " Cynlib " .cc and .cpp files can be C++ or Cynlib. au BufNewFile,BufRead *.cc \ if exists("cynlib_syntax_for_cc")|setf cynlib|else|setf cpp|endif au BufNewFile,BufRead *.cpp \ if exists("cynlib_syntax_for_cpp")|setf cynlib|else|setf cpp|endif " C++ au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.ipp,*.moc,*.tcc,*.inl setf cpp if has("fname_case") au BufNewFile,BufRead *.C,*.H setf cpp endif " .h files can be C, Ch C++, ObjC or ObjC++. " Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is " detected automatically. au BufNewFile,BufRead *.h call s:FTheader() func! s:FTheader() if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1 if exists("g:c_syntax_for_h") setf objc else setf objcpp endif elseif exists("g:c_syntax_for_h") setf c elseif exists("g:ch_syntax_for_h") setf ch else setf cpp endif endfunc " Ch (CHscript) au BufNewFile,BufRead *.chf setf ch " TLH files are C++ headers generated by Visual C++'s #import from typelibs au BufNewFile,BufRead *.tlh setf cpp " Cascading Style Sheets au BufNewFile,BufRead *.css setf css " Century Term Command Scripts (*.cmd too) au BufNewFile,BufRead *.con setf cterm " Changelog au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch \ setf debchangelog au BufNewFile,BufRead [cC]hange[lL]og \ if getline(1) =~ '; urgency=' \| setf debchangelog \| else \| setf changelog \| endif au BufNewFile,BufRead NEWS \ if getline(1) =~ '; urgency=' \| setf debchangelog \| endif " CHILL au BufNewFile,BufRead *..ch setf chill " Changes for WEB and CWEB or CHILL au BufNewFile,BufRead *.ch call s:FTchange() " This function checks if one of the first ten lines start with a '@'. In " that case it is probably a change file. " If the first line starts with # or ! it's probably a ch file. " If a line has "main", "include", "//" ir "/*" it's probably ch. " Otherwise CHILL is assumed. func! s:FTchange() let lnum = 1 while lnum <= 10 if getline(lnum)[0] == '@' setf change return endif if lnum == 1 && (getline(1)[0] == '#' || getline(1)[0] == '!') setf ch return endif if getline(lnum) =~ "MODULE" setf chill return endif if getline(lnum) =~ 'main\s*(\|#\s*include\|//' setf ch return endif let lnum = lnum + 1 endwhile setf chill endfunc " ChordPro au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro " Clean au BufNewFile,BufRead *.dcl,*.icl setf clean " Clever au BufNewFile,BufRead *.eni setf cl " Clever or dtd au BufNewFile,BufRead *.ent call s:FTent() func! s:FTent() " This function checks for valid cl syntax in the first five lines. " Look for either an opening comment, '#', or a block start, '{". " If not found, assume SGML. let lnum = 1 while lnum < 6 let line = getline(lnum) if line =~ '^\s*[#{]' setf cl return elseif line !~ '^\s*$' " Not a blank line, not a comment, and not a block start, " so doesn't look like valid cl code. break endif let lnum = lnum + 1 endw setf dtd endfunc " Clipper (or FoxPro; could also be eviews) au BufNewFile,BufRead *.prg \ if exists("g:filetype_prg") | \ exe "setf " . g:filetype_prg | \ else | \ setf clipper | \ endif " Clojure au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure " Cmake au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake " Cmusrc au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme} setf cmusrc au BufNewFile,BufRead */cmus/{rc,*.theme} setf cmusrc " Cobol au BufNewFile,BufRead *.cbl,*.cob,*.lib setf cobol " cobol or zope form controller python script? (heuristic) au BufNewFile,BufRead *.cpy \ if getline(1) =~ '^##' | \ setf python | \ else | \ setf cobol | \ endif " Coco/R au BufNewFile,BufRead *.atg setf coco " Cold Fusion au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf " Configure scripts au BufNewFile,BufRead configure.in,configure.ac setf config " CUDA Cumpute Unified Device Architecture au BufNewFile,BufRead *.cu setf cuda " Dockerfile au BufNewFile,BufRead Dockerfile,*.Dockerfile setf dockerfile " WildPackets EtherPeek Decoder au BufNewFile,BufRead *.dcd setf dcd " Enlightenment configuration files au BufNewFile,BufRead *enlightenment/*.cfg setf c " Eterm au BufNewFile,BufRead *Eterm/*.cfg setf eterm " Euphoria 3 or 4 au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call s:EuphoriaCheck() if has("fname_case") au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call s:EuphoriaCheck() endif func! s:EuphoriaCheck() if exists('g:filetype_euphoria') exe 'setf ' . g:filetype_euphoria else setf euphoria3 endif endfunc " Lynx config files au BufNewFile,BufRead lynx.cfg setf lynx " Quake au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake " Quake C au BufNewFile,BufRead *.qc setf c " Configure files au BufNewFile,BufRead *.cfg setf cfg " Cucumber au BufNewFile,BufRead *.feature setf cucumber " Communicating Sequential Processes au BufNewFile,BufRead *.csp,*.fdr setf csp " CUPL logic description and simulation au BufNewFile,BufRead *.pld setf cupl au BufNewFile,BufRead *.si setf cuplsim " Debian Control au BufNewFile,BufRead */debian/control setf debcontrol au BufNewFile,BufRead control \ if getline(1) =~ '^Source:' \| setf debcontrol \| endif " Debian Sources.list au BufNewFile,BufRead */etc/apt/sources.list setf debsources au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources " Deny hosts au BufNewFile,BufRead denyhosts.conf setf denyhosts " dnsmasq(8) configuration files au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq " ROCKLinux package description au BufNewFile,BufRead *.desc setf desc " the D language or dtrace au BufNewFile,BufRead *.d call s:DtraceCheck() func! s:DtraceCheck() let lines = getline(1, min([line("$"), 100])) if match(lines, '^module\>\|^import\>') > -1 " D files often start with a module and/or import statement. setf d elseif match(lines, '^#!\S\+dtrace\|#pragma\s\+D\s\+option\|:\S\{-}:\S\{-}:') > -1 setf dtrace else setf d endif endfunc " Desktop files au BufNewFile,BufRead *.desktop,.directory setf desktop " Dict config au BufNewFile,BufRead dict.conf,.dictrc setf dictconf " Dictd config au BufNewFile,BufRead dictd.conf setf dictdconf " Diff files au BufNewFile,BufRead *.diff,*.rej setf diff au BufNewFile,BufRead *.patch \ if getline(1) =~ '^From [0-9a-f]\{40\} Mon Sep 17 00:00:00 2001$' | \ setf gitsendemail | \ else | \ setf diff | \ endif " Dircolors au BufNewFile,BufRead .dir_colors,.dircolors,*/etc/DIR_COLORS setf dircolors " Diva (with Skill) or InstallShield au BufNewFile,BufRead *.rul \ if getline(1).getline(2).getline(3).getline(4).getline(5).getline(6) =~? 'InstallShield' | \ setf ishd | \ else | \ setf diva | \ endif " DCL (Digital Command Language - vms) or DNS zone file au BufNewFile,BufRead *.com call s:BindzoneCheck('dcl') " DOT au BufNewFile,BufRead *.dot setf dot " Dylan - lid files au BufNewFile,BufRead *.lid setf dylanlid " Dylan - intr files (melange) au BufNewFile,BufRead *.intr setf dylanintr " Dylan au BufNewFile,BufRead *.dylan setf dylan " Microsoft Module Definition au BufNewFile,BufRead *.def setf def " Dracula au BufNewFile,BufRead *.drac,*.drc,*lvs,*lpe setf dracula " Datascript au BufNewFile,BufRead *.ds setf datascript " dsl au BufNewFile,BufRead *.dsl setf dsl " DTD (Document Type Definition for XML) au BufNewFile,BufRead *.dtd setf dtd " DTS/DSTI (device tree files) au BufNewFile,BufRead *.dts,*.dtsi setf dts " EDIF (*.edf,*.edif,*.edn,*.edo) or edn au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif au BufNewFile,BufRead *.edn \ if getline(1) =~ '^\s*(\s*edif\>' | \ setf edif | \ else | \ setf clojure | \ endif " EditorConfig (close enough to dosini) au BufNewFile,BufRead .editorconfig setf dosini " Embedix Component Description au BufNewFile,BufRead *.ecd setf ecd " Eiffel or Specman or Euphoria au BufNewFile,BufRead *.e,*.E call s:FTe() " Elinks configuration au BufNewFile,BufRead */etc/elinks.conf,*/.elinks/elinks.conf setf elinks func! s:FTe() if exists('g:filetype_euphoria') exe 'setf ' . g:filetype_euphoria else let n = 1 while n < 100 && n < line("$") if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$" setf specman return endif let n = n + 1 endwhile setf eiffel endif endfunc " ERicsson LANGuage; Yaws is erlang too au BufNewFile,BufRead *.erl,*.hrl,*.yaws setf erlang " Elm Filter Rules file au BufNewFile,BufRead filter-rules setf elmfilt " ESMTP rc file au BufNewFile,BufRead *esmtprc setf esmtprc " ESQL-C au BufNewFile,BufRead *.ec,*.EC setf esqlc " Esterel au BufNewFile,BufRead *.strl setf esterel " Essbase script au BufNewFile,BufRead *.csc setf csc " Exim au BufNewFile,BufRead exim.conf setf exim " Expect au BufNewFile,BufRead *.exp setf expect " Exports au BufNewFile,BufRead exports setf exports " Falcon au BufNewFile,BufRead *.fal setf falcon " Fantom au BufNewFile,BufRead *.fan,*.fwt setf fan " Factor au BufNewFile,BufRead *.factor setf factor " Fetchmail RC file au BufNewFile,BufRead .fetchmailrc setf fetchmail " FlexWiki - disabled, because it has side effects when a .wiki file " is not actually FlexWiki "au BufNewFile,BufRead *.wiki setf flexwiki " Focus Executable au BufNewFile,BufRead *.fex,*.focexec setf focexec " Focus Master file (but not for auto.master) au BufNewFile,BufRead auto.master setf conf au BufNewFile,BufRead *.mas,*.master setf master " Forth au BufNewFile,BufRead *.fs,*.ft setf forth " Reva Forth au BufNewFile,BufRead *.frt setf reva " Fortran if has("fname_case") au BufNewFile,BufRead *.F,*.FOR,*.FPP,*.FTN,*.F77,*.F90,*.F95,*.F03,*.F08 setf fortran endif au BufNewFile,BufRead *.f,*.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95,*.f03,*.f08 setf fortran " Framescript au BufNewFile,BufRead *.fsl setf framescript " FStab au BufNewFile,BufRead fstab,mtab setf fstab " GDB command files au BufNewFile,BufRead .gdbinit setf gdb " GDMO au BufNewFile,BufRead *.mo,*.gdmo setf gdmo " Gedcom au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom " Git au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig au BufNewFile,BufRead *.git/modules/*/config setf gitconfig au BufNewFile,BufRead */.config/git/config setf gitconfig if !empty($XDG_CONFIG_HOME) au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig endif au BufNewFile,BufRead git-rebase-todo setf gitrebase au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail au BufNewFile,BufRead .msg.[0-9]* \ if getline(1) =~ '^From.*# This line is ignored.$' | \ setf gitsendemail | \ endif au BufNewFile,BufRead *.git/* \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' | \ setf git | \ endif " Gkrellmrc au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc " GP scripts (2.0 and onward) au BufNewFile,BufRead *.gp,.gprc setf gp " GPG au BufNewFile,BufRead */.gnupg/options setf gpg au BufNewFile,BufRead */.gnupg/gpg.conf setf gpg au BufNewFile,BufRead */usr/*/gnupg/options.skel setf gpg if !empty($GNUPGHOME) au BufNewFile,BufRead $GNUPGHOME/options setf gpg au BufNewFile,BufRead $GNUPGHOME/gpg.conf setf gpg endif " gnash(1) configuration files au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash " Gitolite au BufNewFile,BufRead gitolite.conf setf gitolite au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite') au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl " Gnuplot scripts au BufNewFile,BufRead *.gpi setf gnuplot " Go (Google) au BufNewFile,BufRead *.go setf go " GrADS scripts au BufNewFile,BufRead *.gs setf grads " Gretl au BufNewFile,BufRead *.gretl setf gretl " Groovy au BufNewFile,BufRead *.gradle,*.groovy setf groovy " GNU Server Pages au BufNewFile,BufRead *.gsp setf gsp " Group file au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/etc/gshadow-,*/etc/gshadow.edit,*/var/backups/group.bak,*/var/backups/gshadow.bak setf group " GTK RC au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc " Haml au BufNewFile,BufRead *.haml setf haml " Hamster Classic | Playground files au BufNewFile,BufRead *.hsc,*.hsm setf hamster " Haskell au BufNewFile,BufRead *.hs,*.hs-boot setf haskell au BufNewFile,BufRead *.lhs setf lhaskell au BufNewFile,BufRead *.chs setf chaskell " Haste au BufNewFile,BufRead *.ht setf haste au BufNewFile,BufRead *.htpp setf hastepreproc " Hercules au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules " HEX (Intel) au BufNewFile,BufRead *.hex,*.h32 setf hex " Tilde (must be before HTML) au BufNewFile,BufRead *.t.html setf tilde " HTML (.shtml and .stm for server side) au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call s:FThtml() " Distinguish between HTML, XHTML and Django func! s:FThtml() let n = 1 while n < 10 && n < line("$") if getline(n) =~ '\<DTD\s\+XHTML\s' setf xhtml return endif if getline(n) =~ '{%\s*\(extends\|block\|load\)\>\|{#\s\+' setf htmldjango return endif let n = n + 1 endwhile setf html endfunc " HTML with Ruby - eRuby au BufNewFile,BufRead *.erb,*.rhtml setf eruby " HTML with M4 au BufNewFile,BufRead *.html.m4 setf htmlm4 " HTML Cheetah template au BufNewFile,BufRead *.tmpl setf htmlcheetah " Host config au BufNewFile,BufRead */etc/host.conf setf hostconf " Hosts access au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess " Hyper Builder au BufNewFile,BufRead *.hb setf hb " Httest au BufNewFile,BufRead *.htt,*.htb setf httest " Icon au BufNewFile,BufRead *.icn setf icon " IDL (Interface Description Language) au BufNewFile,BufRead *.idl call s:FTidl() " Distinguish between standard IDL and MS-IDL func! s:FTidl() let n = 1 while n < 50 && n < line("$") if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"' setf msidl return endif let n = n + 1 endwhile setf idl endfunc " Microsoft IDL (Interface Description Language) Also *.idl " MOF = WMI (Windows Management Instrumentation) Managed Object Format au BufNewFile,BufRead *.odl,*.mof setf msidl " Icewm menu au BufNewFile,BufRead */.icewm/menu setf icemenu " Indent profile (must come before IDL *.pro!) au BufNewFile,BufRead .indent.pro setf indent au BufNewFile,BufRead indent.pro call s:ProtoCheck('indent') " IDL (Interactive Data Language) au BufNewFile,BufRead *.pro call s:ProtoCheck('idlang') " Distinguish between "default" and Cproto prototype file. */ func! s:ProtoCheck(default) " Cproto files have a comment in the first line and a function prototype in " the second line, it always ends in ";". Indent files may also have " comments, thus we can't match comments to see the difference. " IDL files can have a single ';' in the second line, require at least one " chacter before the ';'. if getline(2) =~ '.;$' setf cpp else exe 'setf ' . a:default endif endfunc " Indent RC au BufNewFile,BufRead indentrc setf indent " Inform au BufNewFile,BufRead *.inf,*.INF setf inform " Initng au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng " Innovation Data Processing au BufRead,BufNewFile upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat au BufRead,BufNewFile fdrupstream.log,upstream.log\c,upstream.*.log\c,*.upstream.log\c,UPSTREAM-*.log\c setf upstreamlog au BufRead,BufNewFile upstreaminstall.log\c,upstreaminstall.*.log\c,*.upstreaminstall.log\c setf upstreaminstalllog au BufRead,BufNewFile usserver.log\c,usserver.*.log\c,*.usserver.log\c setf usserverlog au BufRead,BufNewFile usw2kagt.log\c,usw2kagt.*.log\c,*.usw2kagt.log\c setf usw2kagtlog " Ipfilter au BufNewFile,BufRead ipf.conf,ipf6.conf,ipf.rules setf ipfilter " Informix 4GL (source - canonical, include file, I4GL+M4 preproc.) au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl setf fgl " .INI file for MSDOS au BufNewFile,BufRead *.ini setf dosini " SysV Inittab au BufNewFile,BufRead inittab setf inittab " Inno Setup au BufNewFile,BufRead *.iss setf iss " J au BufNewFile,BufRead *.ijs setf j " JAL au BufNewFile,BufRead *.jal,*.JAL setf jal " Jam au BufNewFile,BufRead *.jpl,*.jpr setf jam " Java au BufNewFile,BufRead *.java,*.jav setf java " JavaCC au BufNewFile,BufRead *.jj,*.jjt setf javacc " JavaScript, ECMAScript au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript " Java Server Pages au BufNewFile,BufRead *.jsp setf jsp " Java Properties resource file (note: doesn't catch font.properties.pl) au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties') " Jess au BufNewFile,BufRead *.clp setf jess " Jgraph au BufNewFile,BufRead *.jgr setf jgraph " Jovial au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial " JSON au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json " Kixtart au BufNewFile,BufRead *.kix setf kix " Kimwitu[++] au BufNewFile,BufRead *.k setf kwt " Kivy au BufNewFile,BufRead *.kv setf kivy " KDE script au BufNewFile,BufRead *.ks setf kscript " Kconfig au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig " Lace (ISE) au BufNewFile,BufRead *.ace,*.ACE setf lace " Latte au BufNewFile,BufRead *.latte,*.lte setf latte " Limits au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits " LambdaProlog (*.mod too, see Modsim) au BufNewFile,BufRead *.sig setf lprolog " LDAP LDIF au BufNewFile,BufRead *.ldif setf ldif " Ld loader au BufNewFile,BufRead *.ld setf ld " Less au BufNewFile,BufRead *.less setf less " Lex au BufNewFile,BufRead *.lex,*.l,*.lxx,*.l++ setf lex " Libao au BufNewFile,BufRead */etc/libao.conf,*/.libao setf libao " Libsensors au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf setf sensors " LFTP au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp " Lifelines (or Lex for C++!) au BufNewFile,BufRead *.ll setf lifelines " Lilo: Linux loader au BufNewFile,BufRead lilo.conf setf lilo " Lisp (*.el = ELisp, *.cl = Common Lisp, *.jl = librep Lisp) if has("fname_case") au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,*.L,.emacs,.sawfishrc setf lisp else au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,.emacs,.sawfishrc setf lisp endif " SBCL implementation of Common Lisp au BufNewFile,BufRead sbclrc,.sbclrc setf lisp " Liquid au BufNewFile,BufRead *.liquid setf liquid " Lite au BufNewFile,BufRead *.lite,*.lt setf lite " LiteStep RC files au BufNewFile,BufRead */LiteStep/*/*.rc setf litestep " Login access au BufNewFile,BufRead */etc/login.access setf loginaccess " Login defs au BufNewFile,BufRead */etc/login.defs setf logindefs " Logtalk au BufNewFile,BufRead *.lgt setf logtalk " LOTOS au BufNewFile,BufRead *.lot,*.lotos setf lotos " Lout (also: *.lt) au BufNewFile,BufRead *.lou,*.lout setf lout " Lua au BufNewFile,BufRead *.lua setf lua " Luarocks au BufNewFile,BufRead *.rockspec setf lua " Linden Scripting Language (Second Life) au BufNewFile,BufRead *.lsl setf lsl " Lynx style file (or LotusScript!) au BufNewFile,BufRead *.lss setf lss " M4 au BufNewFile,BufRead *.m4 \ if expand("<afile>") !~? 'html.m4$\|fvwm2rc' | setf m4 | endif " MaGic Point au BufNewFile,BufRead *.mgp setf mgp " Mail (for Elm, trn, mutt, muttng, rn, slrn, neomutt) au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail " Mail aliases au BufNewFile,BufRead */etc/mail/aliases,*/etc/aliases setf mailaliases " Mailcap configuration file au BufNewFile,BufRead .mailcap,mailcap setf mailcap " Makefile au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak,*.dsp setf make " MakeIndex au BufNewFile,BufRead *.ist,*.mst setf ist " Mallard au BufNewFile,BufRead *.page setf mallard " Manpage au BufNewFile,BufRead *.man setf nroff " Man config au BufNewFile,BufRead */etc/man.conf,man.config setf manconf " Maple V au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple " Map (UMN mapserver config file) au BufNewFile,BufRead *.map setf map " Markdown au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown " Mason au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason " Matlab or Objective C au BufNewFile,BufRead *.m call s:FTm() func! s:FTm() let n = 1 while n < 10 let line = getline(n) if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\|//\)' setf objc return endif if line =~ '^\s*%' setf matlab return endif if line =~ '^\s*(\*' setf mma return endif let n = n + 1 endwhile if exists("g:filetype_m") exe "setf " . g:filetype_m else setf matlab endif endfunc " Mathematica notebook au BufNewFile,BufRead *.nb setf mma " Maya Extension Language au BufNewFile,BufRead *.mel setf mel " Mercurial (hg) commit file au BufNewFile,BufRead hg-editor-*.txt setf hgcommit " Mercurial config (looks like generic config file) au BufNewFile,BufRead *.hgrc,*hgrc setf cfg " Messages (logs mostly) au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages " Metafont au BufNewFile,BufRead *.mf setf mf " MetaPost au BufNewFile,BufRead *.mp setf mp " MGL au BufNewFile,BufRead *.mgl setf mgl " MIX - Knuth assembly au BufNewFile,BufRead *.mix,*.mixal setf mix " MMIX or VMS makefile au BufNewFile,BufRead *.mms call s:FTmms() " Symbian meta-makefile definition (MMP) au BufNewFile,BufRead *.mmp setf mmp func! s:FTmms() let n = 1 while n < 10 let line = getline(n) if line =~ '^\s*\(%\|//\)' || line =~ '^\*' setf mmix return endif if line =~ '^\s*#' setf make return endif let n = n + 1 endwhile setf mmix endfunc " Modsim III (or LambdaProlog) au BufNewFile,BufRead *.mod \ if getline(1) =~ '\<module\>' | \ setf lprolog | \ else | \ setf modsim3 | \ endif " Modula 2 (.md removed in favor of Markdown) au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2 " Modula 3 (.m3, .i3, .mg, .ig) au BufNewFile,BufRead *.[mi][3g] setf modula3 " Monk au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk " MOO au BufNewFile,BufRead *.moo setf moo " Modconf au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf " Mplayer config au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf " Motorola S record au BufNewFile,BufRead *.s19,*.s28,*.s37,*.mot,*.srec setf srec " Mrxvtrc au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc " Msql au BufNewFile,BufRead *.msql setf msql " Mysql au BufNewFile,BufRead *.mysql setf mysql " Mutt setup files (must be before catch *.rc) au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc') " M$ Resource files au BufNewFile,BufRead *.rc,*.rch setf rc " MuPAD source au BufRead,BufNewFile *.mu setf mupad " Mush au BufNewFile,BufRead *.mush setf mush " Mutt setup file (also for Muttng) au BufNewFile,BufRead Mutt{ng,}rc setf muttrc " Nano au BufNewFile,BufRead */etc/nanorc,*.nanorc setf nanorc " Nastran input/DMAP "au BufNewFile,BufRead *.dat setf nastran " Natural au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural " Noemutt setup file au BufNewFile,BufRead Neomuttrc setf neomuttrc " Netrc au BufNewFile,BufRead .netrc setf netrc " Ninja file au BufNewFile,BufRead *.ninja setf ninja " Novell netware batch files au BufNewFile,BufRead *.ncf setf ncf " Nroff/Troff (*.ms and *.t are checked below) au BufNewFile,BufRead *.me \ if expand("<afile>") != "read.me" && expand("<afile>") != "click.me" | \ setf nroff | \ endif au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff au BufNewFile,BufRead *.[1-9] call s:FTnroff() " This function checks if one of the first five lines start with a dot. In " that case it is probably an nroff file: 'filetype' is set and 1 is returned. func! s:FTnroff() if getline(1)[0] . getline(2)[0] . getline(3)[0] . getline(4)[0] . getline(5)[0] =~ '\.' setf nroff return 1 endif return 0 endfunc " Nroff or Objective C++ au BufNewFile,BufRead *.mm call s:FTmm() func! s:FTmm() let n = 1 while n < 10 let line = getline(n) if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)' setf objcpp return endif let n = n + 1 endwhile setf nroff endfunc " Not Quite C au BufNewFile,BufRead *.nqc setf nqc " NSE - Nmap Script Engine - uses Lua syntax au BufNewFile,BufRead *.nse setf lua " NSIS au BufNewFile,BufRead *.nsi,*.nsh setf nsis " OCAML au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit setf ocaml " Occam au BufNewFile,BufRead *.occ setf occam " Omnimark au BufNewFile,BufRead *.xom,*.xin setf omnimark " OpenROAD au BufNewFile,BufRead *.or setf openroad " OPL au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl " Oracle config file au BufNewFile,BufRead *.ora setf ora " Packet filter conf au BufNewFile,BufRead pf.conf setf pf " Pam conf au BufNewFile,BufRead */etc/pam.conf setf pamconf " PApp au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp " Password file au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd " Pascal (also *.p) au BufNewFile,BufRead *.pas setf pascal " Delphi project file au BufNewFile,BufRead *.dpr setf pascal " PDF au BufNewFile,BufRead *.pdf setf pdf " PCMK - HAE - crm configure edit au BufNewFile,BufRead *.pcmk setf pcmk " Perl if has("fname_case") au BufNewFile,BufRead *.pl,*.PL call s:FTpl() else au BufNewFile,BufRead *.pl call s:FTpl() endif au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6 func! s:FTpl() if exists("g:filetype_pl") exe "setf " . g:filetype_pl else " recognize Prolog by specific text in the first non-empty line " require a blank after the '%' because Perl uses "%list" and "%translate" let l = getline(nextnonblank(1)) if l =~ '\<prolog\>' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-' setf prolog else setf perl endif endif endfunc " Perl, XPM or XPM2 au BufNewFile,BufRead *.pm \ if getline(1) =~ "XPM2" | \ setf xpm2 | \ elseif getline(1) =~ "XPM" | \ setf xpm | \ else | \ setf perl | \ endif " Perl POD au BufNewFile,BufRead *.pod setf pod au BufNewFile,BufRead *.pod6 setf pod6 " Php, php3, php4, etc. " Also Phtml (was used for PHP 2 in the past) " Also .ctp for Cake template file au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php " Pike au BufNewFile,BufRead *.pike,*.lpc,*.ulpc,*.pmod setf pike " Pinfo config au BufNewFile,BufRead */etc/pinforc,*/.pinforc setf pinfo " Palm Resource compiler au BufNewFile,BufRead *.rcp setf pilrc " Pine config au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine " PL/1, PL/I au BufNewFile,BufRead *.pli,*.pl1 setf pli " PL/M (also: *.inp) au BufNewFile,BufRead *.plm,*.p36,*.pac setf plm " PL/SQL au BufNewFile,BufRead *.pls,*.plsql setf plsql " PLP au BufNewFile,BufRead *.plp setf plp " PO and PO template (GNU gettext) au BufNewFile,BufRead *.po,*.pot setf po " Postfix main config au BufNewFile,BufRead main.cf setf pfmain " PostScript (+ font files, encapsulated PostScript, Adobe Illustrator) au BufNewFile,BufRead *.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai setf postscr " PostScript Printer Description au BufNewFile,BufRead *.ppd setf ppd " Povray au BufNewFile,BufRead *.pov setf pov " Povray configuration au BufNewFile,BufRead .povrayrc setf povini " Povray, PHP or assembly au BufNewFile,BufRead *.inc call s:FTinc() func! s:FTinc() if exists("g:filetype_inc") exe "setf " . g:filetype_inc else let lines = getline(1).getline(2).getline(3) if lines =~? "perlscript" setf aspperl elseif lines =~ "<%" setf aspvbs elseif lines =~ "<?" setf php else call s:FTasmsyntax() if exists("b:asmsyntax") exe "setf " . fnameescape(b:asmsyntax) else setf pov endif endif endif endfunc " Printcap and Termcap au BufNewFile,BufRead *printcap \ let b:ptcap_type = "print" | setf ptcap au BufNewFile,BufRead *termcap \ let b:ptcap_type = "term" | setf ptcap " PCCTS / ANTRL "au BufNewFile,BufRead *.g setf antrl au BufNewFile,BufRead *.g setf pccts " PPWizard au BufNewFile,BufRead *.it,*.ih setf ppwiz " Obj 3D file format " TODO: is there a way to avoid MS-Windows Object files? au BufNewFile,BufRead *.obj setf obj " Oracle Pro*C/C++ au BufNewFile,BufRead *.pc setf proc " Privoxy actions file au BufNewFile,BufRead *.action setf privoxy " Procmail au BufNewFile,BufRead .procmail,.procmailrc setf procmail " Progress or CWEB au BufNewFile,BufRead *.w call s:FTprogress_cweb() func! s:FTprogress_cweb() if exists("g:filetype_w") exe "setf " . g:filetype_w return endif if getline(1) =~ '&ANALYZE' || getline(3) =~ '&GLOBAL-DEFINE' setf progress else setf cweb endif endfunc " Progress or assembly au BufNewFile,BufRead *.i call s:FTprogress_asm() func! s:FTprogress_asm() if exists("g:filetype_i") exe "setf " . g:filetype_i return endif " This function checks for an assembly comment the first ten lines. " If not found, assume Progress. let lnum = 1 while lnum <= 10 && lnum < line('$') let line = getline(lnum) if line =~ '^\s*;' || line =~ '^\*' call s:FTasm() return elseif line !~ '^\s*$' || line =~ '^/\*' " Not an empty line: Doesn't look like valid assembly code. " Or it looks like a Progress /* comment break endif let lnum = lnum + 1 endw setf progress endfunc " Progress or Pascal au BufNewFile,BufRead *.p call s:FTprogress_pascal() func! s:FTprogress_pascal() if exists("g:filetype_p") exe "setf " . g:filetype_p return endif " This function checks for valid Pascal syntax in the first ten lines. " Look for either an opening comment or a program start. " If not found, assume Progress. let lnum = 1 while lnum <= 10 && lnum < line('$') let line = getline(lnum) if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>' \ || line =~ '^\s*{' || line =~ '^\s*(\*' setf pascal return elseif line !~ '^\s*$' || line =~ '^/\*' " Not an empty line: Doesn't look like valid Pascal code. " Or it looks like a Progress /* comment break endif let lnum = lnum + 1 endw setf progress endfunc " Software Distributor Product Specification File (POSIX 1387.2-1995) au BufNewFile,BufRead *.psf setf psf au BufNewFile,BufRead INDEX,INFO \ if getline(1) =~ '^\s*\(distribution\|installed_software\|root\|bundle\|product\)\s*$' | \ setf psf | \ endif " Prolog au BufNewFile,BufRead *.pdb setf prolog " Promela au BufNewFile,BufRead *.pml setf promela " Google protocol buffers au BufNewFile,BufRead *.proto setf proto " Protocols au BufNewFile,BufRead */etc/protocols setf protocols " Pyrex au BufNewFile,BufRead *.pyx,*.pxd setf pyrex " Python, Python Shell Startup Files " Quixote (Python-based web framework) au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl setf python " Radiance au BufNewFile,BufRead *.rad,*.mat setf radiance " Ratpoison config/command files au BufNewFile,BufRead .ratpoisonrc,ratpoisonrc setf ratpoison " RCS file au BufNewFile,BufRead *\,v setf rcs " Readline au BufNewFile,BufRead .inputrc,inputrc setf readline " Registry for MS-Windows au BufNewFile,BufRead *.reg \ if getline(1) =~? '^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$' | setf registry | endif " Renderman Interface Bytestream au BufNewFile,BufRead *.rib setf rib " Rexx au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit setf rexx " R (Splus) if has("fname_case") au BufNewFile,BufRead *.s,*.S setf r else au BufNewFile,BufRead *.s setf r endif " R Help file if has("fname_case") au BufNewFile,BufRead *.rd,*.Rd setf rhelp else au BufNewFile,BufRead *.rd setf rhelp endif " R noweb file if has("fname_case") au BufNewFile,BufRead *.Rnw,*.rnw,*.Snw,*.snw setf rnoweb else au BufNewFile,BufRead *.rnw,*.snw setf rnoweb endif " R Markdown file if has("fname_case") au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd setf rmd else au BufNewFile,BufRead *.rmd,*.smd setf rmd endif " R reStructuredText file if has("fname_case") au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst else au BufNewFile,BufRead *.rrst,*.srst setf rrst endif " Rexx, Rebol or R au BufNewFile,BufRead *.r,*.R call s:FTr() func! s:FTr() let max = line("$") > 50 ? 50 : line("$") for n in range(1, max) " Rebol is easy to recognize, check for that first if getline(n) =~? '\<REBOL\>' setf rebol return endif endfor for n in range(1, max) " R has # comments if getline(n) =~ '^\s*#' setf r return endif " Rexx has /* comments */ if getline(n) =~ '^\s*/\*' setf rexx return endif endfor " Nothing recognized, use user default or assume Rexx if exists("g:filetype_r") exe "setf " . g:filetype_r else " Rexx used to be the default, but R appears to be much more popular. setf r endif endfunc " Remind au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind " Resolv.conf au BufNewFile,BufRead resolv.conf setf resolv " Relax NG Compact au BufNewFile,BufRead *.rnc setf rnc " Relax NG XML au BufNewFile,BufRead *.rng setf rng " RPL/2 au BufNewFile,BufRead *.rpl setf rpl " Robots.txt au BufNewFile,BufRead robots.txt setf robots " Rpcgen au BufNewFile,BufRead *.x setf rpcgen " reStructuredText Documentation Format au BufNewFile,BufRead *.rst setf rst " RTF au BufNewFile,BufRead *.rtf setf rtf " Interactive Ruby shell au BufNewFile,BufRead .irbrc,irbrc setf ruby " Ruby au BufNewFile,BufRead *.rb,*.rbw setf ruby " RubyGems au BufNewFile,BufRead *.gemspec setf ruby " Rust au BufNewFile,BufRead *.rs setf rust " Rackup au BufNewFile,BufRead *.ru setf ruby " Bundler au BufNewFile,BufRead Gemfile setf ruby " Ruby on Rails au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby " Rantfile and Rakefile is like Ruby au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby " S-lang (or shader language, or SmallLisp) au BufNewFile,BufRead *.sl setf slang " Samba config au BufNewFile,BufRead smb.conf setf samba " SAS script au BufNewFile,BufRead *.sas setf sas " Sass au BufNewFile,BufRead *.sass setf sass " Sather au BufNewFile,BufRead *.sa setf sather " Scala au BufNewFile,BufRead *.scala setf scala " SBT - Scala Build Tool au BufNewFile,BufRead *.sbt setf sbt " Scilab au BufNewFile,BufRead *.sci,*.sce setf scilab " SCSS au BufNewFile,BufRead *.scss setf scss " SD: Streaming Descriptors au BufNewFile,BufRead *.sd setf sd " SDL au BufNewFile,BufRead *.sdl,*.pr setf sdl " sed au BufNewFile,BufRead *.sed setf sed " Sieve (RFC 3028) au BufNewFile,BufRead *.siv setf sieve " Sendmail au BufNewFile,BufRead sendmail.cf setf sm " Sendmail .mc files are actually m4. Could also be MS Message text file. au BufNewFile,BufRead *.mc call s:McSetf() func! s:McSetf() " Rely on the file to start with a comment. " MS message text files use ';', Sendmail files use '#' or 'dnl' for lnum in range(1, min([line("$"), 20])) let line = getline(lnum) if line =~ '^\s*\(#\|dnl\)' setf m4 " Sendmail .mc file return elseif line =~ '^\s*;' setf msmessages " MS Message text file return endif endfor setf m4 " Default: Sendmail .mc file endfunc " Services au BufNewFile,BufRead */etc/services setf services " Service Location config au BufNewFile,BufRead */etc/slp.conf setf slpconf " Service Location registration au BufNewFile,BufRead */etc/slp.reg setf slpreg " Service Location SPI au BufNewFile,BufRead */etc/slp.spi setf slpspi " Setserial config au BufNewFile,BufRead */etc/serial.conf setf setserial " SGML au BufNewFile,BufRead *.sgm,*.sgml \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'linuxdoc' | \ setf sgmllnx | \ elseif getline(1) =~ '<!DOCTYPE.*DocBook' || getline(2) =~ '<!DOCTYPE.*DocBook' | \ let b:docbk_type = "sgml" | \ let b:docbk_ver = 4 | \ setf docbk | \ else | \ setf sgml | \ endif " SGMLDECL au BufNewFile,BufRead *.decl,*.dcl,*.dec \ if getline(1).getline(2).getline(3) =~? '^<!SGML' | \ setf sgmldecl | \ endif " SGML catalog file au BufNewFile,BufRead catalog setf catalog au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc. " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call SetFileTypeSH("bash") au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh") au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1)) " Shell script (Arch Linux) or PHP file (Drupal) au BufNewFile,BufRead *.install \ if getline(1) =~ '<?php' | \ setf php | \ else | \ call SetFileTypeSH("bash") | \ endif " Also called from scripts.vim. func! SetFileTypeSH(name) if expand("<amatch>") =~ g:ft_ignore_pat return endif if a:name =~ '\<csh\>' " Some .sh scripts contain #!/bin/csh. call SetFileTypeShell("csh") return elseif a:name =~ '\<tcsh\>' " Some .sh scripts contain #!/bin/tcsh. call SetFileTypeShell("tcsh") return elseif a:name =~ '\<zsh\>' " Some .sh scripts contain #!/bin/zsh. call SetFileTypeShell("zsh") return elseif a:name =~ '\<ksh\>' let b:is_kornshell = 1 if exists("b:is_bash") unlet b:is_bash endif if exists("b:is_sh") unlet b:is_sh endif elseif exists("g:bash_is_sh") || a:name =~ '\<bash\>' || a:name =~ '\<bash2\>' let b:is_bash = 1 if exists("b:is_kornshell") unlet b:is_kornshell endif if exists("b:is_sh") unlet b:is_sh endif elseif a:name =~ '\<sh\>' let b:is_sh = 1 if exists("b:is_kornshell") unlet b:is_kornshell endif if exists("b:is_bash") unlet b:is_bash endif endif call SetFileTypeShell("sh") endfunc " For shell-like file types, check for an "exec" command hidden in a comment, " as used for Tcl. " Also called from scripts.vim, thus can't be local to this script. func! SetFileTypeShell(name) if expand("<amatch>") =~ g:ft_ignore_pat return endif let l = 2 while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)' " Skip empty and comment lines. let l = l + 1 endwhile if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$' " Found an "exec" line after a comment with continuation let n = substitute(getline(l),'\s*exec\s\+\([^ ]*/\)\=', '', '') if n =~ '\<tclsh\|\<wish' setf tcl return endif endif exe "setf " . a:name endfunc " tcsh scripts au BufNewFile,BufRead .tcshrc*,*.tcsh,tcsh.tcshrc,tcsh.login call SetFileTypeShell("tcsh") " csh scripts, but might also be tcsh scripts (on some systems csh is tcsh) au BufNewFile,BufRead .login*,.cshrc*,csh.cshrc,csh.login,csh.logout,*.csh,.alias call s:CSH() func! s:CSH() if exists("g:filetype_csh") call SetFileTypeShell(g:filetype_csh) elseif &shell =~ "tcsh" call SetFileTypeShell("tcsh") else call SetFileTypeShell("csh") endif endfunc " Z-Shell script au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh') au BufNewFile,BufRead *.zsh setf zsh " Scheme au BufNewFile,BufRead *.scm,*.ss,*.rkt setf scheme " Screen RC au BufNewFile,BufRead .screenrc,screenrc setf screen " Simula au BufNewFile,BufRead *.sim setf simula " SINDA au BufNewFile,BufRead *.sin,*.s85 setf sinda " SiSU au BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst,*._sst setf sisu au BufNewFile,BufRead *.sst.meta,*.-sst.meta,*._sst.meta setf sisu " SKILL au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill " SLRN au BufNewFile,BufRead .slrnrc setf slrnrc au BufNewFile,BufRead *.score setf slrnsc " Smalltalk (and TeX) au BufNewFile,BufRead *.st setf st au BufNewFile,BufRead *.cls \ if getline(1) =~ '^%' | \ setf tex | \ elseif getline(1)[0] == '#' && getline(1) =~ 'rexx' | \ setf rexx | \ else | \ setf st | \ endif " Smarty templates au BufNewFile,BufRead *.tpl setf smarty " SMIL or XML au BufNewFile,BufRead *.smil \ if getline(1) =~ '<?\s*xml.*?>' | \ setf xml | \ else | \ setf smil | \ endif " SMIL or SNMP MIB file au BufNewFile,BufRead *.smi \ if getline(1) =~ '\<smil\>' | \ setf smil | \ else | \ setf mib | \ endif " SMITH au BufNewFile,BufRead *.smt,*.smith setf smith " Snobol4 and spitbol au BufNewFile,BufRead *.sno,*.spt setf snobol4 " SNMP MIB files au BufNewFile,BufRead *.mib,*.my setf mib " Snort Configuration au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog au BufNewFile,BufRead *.rules call s:FTRules() let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*' func! s:FTRules() let path = expand('<amatch>:p') if path =~ '^/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|lib/udev/\%(rules\.d/\)\=.*\.rules\)$' setf udevrules return endif if path =~ '^/etc/ufw/' setf conf " Better than hog return endif if path =~ '^/\(etc\|usr/share\)/polkit-1/rules\.d' setf javascript return endif try let config_lines = readfile('/etc/udev/udev.conf') catch /^Vim\%((\a\+)\)\=:E484/ setf hog return endtry let dir = expand('<amatch>:p:h') for line in config_lines if line =~ s:ft_rules_udev_rules_pattern let udev_rules = substitute(line, s:ft_rules_udev_rules_pattern, '\1', "") if dir == udev_rules setf udevrules endif break endif endfor setf hog endfunc " Spec (Linux RPM) au BufNewFile,BufRead *.spec setf spec " Speedup (AspenTech plant simulator) au BufNewFile,BufRead *.speedup,*.spdata,*.spd setf spup " Slice au BufNewFile,BufRead *.ice setf slice " Spice au BufNewFile,BufRead *.sp,*.spice setf spice " Spyce au BufNewFile,BufRead *.spy,*.spi setf spyce " Squid au BufNewFile,BufRead squid.conf setf squid " SQL for Oracle Designer au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql " SQL au BufNewFile,BufRead *.sql call s:SQL() func! s:SQL() if exists("g:filetype_sql") exe "setf " . g:filetype_sql else setf sql endif endfunc " SQLJ au BufNewFile,BufRead *.sqlj setf sqlj " SQR au BufNewFile,BufRead *.sqr,*.sqi setf sqr " OpenSSH configuration au BufNewFile,BufRead ssh_config,*/.ssh/config setf sshconfig " OpenSSH server configuration au BufNewFile,BufRead sshd_config setf sshdconfig " Stata au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata setf stata " Also *.class, but not when it's a Java bytecode file au BufNewFile,BufRead *.class \ if getline(1) !~ "^\xca\xfe\xba\xbe" | setf stata | endif " SMCL au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl setf smcl " Stored Procedures au BufNewFile,BufRead *.stp setf stp " Standard ML au BufNewFile,BufRead *.sml setf sml " Sratus VOS command macro au BufNewFile,BufRead *.cm setf voscm " Sysctl au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl " Systemd unit files au BufNewFile,BufRead */systemd/*.{automount,mount,path,service,socket,swap,target,timer} setf systemd " Synopsys Design Constraints au BufNewFile,BufRead *.sdc setf sdc " Sudoers au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers " SVG (Scalable Vector Graphics) au BufNewFile,BufRead *.svg setf svg " If the file has an extension of 't' and is in a directory 't' or 'xt' then " it is almost certainly a Perl test file. " If the first line starts with '#' and contains 'perl' it's probably a Perl " file. " (Slow test) If a file contains a 'use' statement then it is almost certainly " a Perl file. func! s:FTperl() let dirname = expand("%:p:h:t") if expand("%:e") == 't' && (dirname == 't' || dirname == 'xt') setf perl return 1 endif if getline(1)[0] == '#' && getline(1) =~ 'perl' setf perl return 1 endif if search('^use\s\s*\k', 'nc', 30) setf perl return 1 endif return 0 endfunc " Tads (or Nroff or Perl test file) au BufNewFile,BufRead *.t \ if !s:FTnroff() && !s:FTperl() | setf tads | endif " Tags au BufNewFile,BufRead tags setf tags " TAK au BufNewFile,BufRead *.tak setf tak " Task au BufRead,BufNewFile {pending,completed,undo}.data setf taskdata au BufRead,BufNewFile *.task setf taskedit " Tcl (JACL too) au BufNewFile,BufRead *.tcl,*.tk,*.itcl,*.itk,*.jacl setf tcl " TealInfo au BufNewFile,BufRead *.tli setf tli " Telix Salt au BufNewFile,BufRead *.slt setf tsalt " Tera Term Language au BufRead,BufNewFile *.ttl setf teraterm " Terminfo au BufNewFile,BufRead *.ti setf terminfo " TeX au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex au BufNewFile,BufRead *.tex call s:FTtex() " Choose context, plaintex, or tex (LaTeX) based on these rules: " 1. Check the first line of the file for "%&<format>". " 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords. " 3. Default to "latex" or to g:tex_flavor, can be set in user's vimrc. func! s:FTtex() let firstline = getline(1) if firstline =~ '^%&\s*\a\+' let format = tolower(matchstr(firstline, '\a\+')) let format = substitute(format, 'pdf', '', '') if format == 'tex' let format = 'latex' elseif format == 'plaintex' let format = 'plain' endif else " Default value, may be changed later: let format = exists("g:tex_flavor") ? g:tex_flavor : 'plain' " Save position, go to the top of the file, find first non-comment line. let save_cursor = getpos('.') call cursor(1,1) let firstNC = search('^\s*[^[:space:]%]', 'c', 1000) if firstNC " Check the next thousand lines for a LaTeX or ConTeXt keyword. let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>' let cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>' let kwline = search('^\s*\\\%(' . lpat . '\)\|^\s*\\\(' . cpat . '\)', \ 'cnp', firstNC + 1000) if kwline == 1 " lpat matched let format = 'latex' elseif kwline == 2 " cpat matched let format = 'context' endif " If neither matched, keep default set above. " let lline = search('^\s*\\\%(' . lpat . '\)', 'cn', firstNC + 1000) " let cline = search('^\s*\\\%(' . cpat . '\)', 'cn', firstNC + 1000) " if cline > 0 " let format = 'context' " endif " if lline > 0 && (cline == 0 || cline > lline) " let format = 'tex' " endif endif " firstNC call setpos('.', save_cursor) endif " firstline =~ '^%&\s*\a\+' " Translation from formats to file types. TODO: add AMSTeX, RevTex, others? if format == 'plain' setf plaintex elseif format == 'context' setf context else " probably LaTeX setf tex endif return endfunc " ConTeXt au BufNewFile,BufRead tex/context/*/*.tex,*.mkii,*.mkiv,*.mkvi setf context " Texinfo au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo " TeX configuration au BufNewFile,BufRead texmf.cnf setf texmf " Tidy config au BufNewFile,BufRead .tidyrc,tidyrc setf tidy " TF mud client au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf " tmux configuration au BufNewFile,BufRead {.,}tmux*.conf setf tmux " TPP - Text Presentation Program au BufNewFile,BufReadPost *.tpp setf tpp " Treetop au BufRead,BufNewFile *.treetop setf treetop " Trustees au BufNewFile,BufRead trustees.conf setf trustees " TSS - Geometry au BufNewFile,BufReadPost *.tssgm setf tssgm " TSS - Optics au BufNewFile,BufReadPost *.tssop setf tssop " TSS - Command Line (temporary) au BufNewFile,BufReadPost *.tsscl setf tsscl " Tutor mode au BufNewFile,BufReadPost *.tutor setf tutor " TWIG files au BufNewFile,BufReadPost *.twig setf twig " Motif UIT/UIL files au BufNewFile,BufRead *.uit,*.uil setf uil " Udev conf au BufNewFile,BufRead */etc/udev/udev.conf setf udevconf " Udev permissions au BufNewFile,BufRead */etc/udev/permissions.d/*.permissions setf udevperm " " Udev symlinks config au BufNewFile,BufRead */etc/udev/cdsymlinks.conf setf sh " UnrealScript au BufNewFile,BufRead *.uc setf uc " Updatedb au BufNewFile,BufRead */etc/updatedb.conf setf updatedb " Upstart (init(8)) config files au BufNewFile,BufRead */usr/share/upstart/*.conf setf upstart au BufNewFile,BufRead */usr/share/upstart/*.override setf upstart au BufNewFile,BufRead */etc/init/*.conf,*/etc/init/*.override setf upstart au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart au BufNewFile,BufRead */.config/upstart/*.conf setf upstart au BufNewFile,BufRead */.config/upstart/*.override setf upstart " Vera au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera " Verilog HDL au BufNewFile,BufRead *.v setf verilog " Verilog-AMS HDL au BufNewFile,BufRead *.va,*.vams setf verilogams " SystemVerilog au BufNewFile,BufRead *.sv,*.svh setf systemverilog " VHDL au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl') " Vim script au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc setf vim " Viminfo file au BufNewFile,BufRead .viminfo,_viminfo setf viminfo " Virata Config Script File or Drupal module au BufRead,BufNewFile *.hw,*.module,*.pkg \ if getline(1) =~ '<?php' | \ setf php | \ else | \ setf virata | \ endif " Visual Basic (also uses *.bas) or FORM au BufNewFile,BufRead *.frm call s:FTVB("form") " SaxBasic is close to Visual Basic au BufNewFile,BufRead *.sba setf vb " Vgrindefs file au BufNewFile,BufRead vgrindefs setf vgrindefs " VRML V1.0c au BufNewFile,BufRead *.wrl setf vrml " Vroom (vim testing and executable documentation) au BufNewFile,BufRead *.vroom setf vroom " Webmacro au BufNewFile,BufRead *.wm setf webmacro " Wget config au BufNewFile,BufRead .wgetrc,wgetrc setf wget " Website MetaLanguage au BufNewFile,BufRead *.wml setf wml " Winbatch au BufNewFile,BufRead *.wbt setf winbatch " WSML au BufNewFile,BufRead *.wsml setf wsml " WPL au BufNewFile,BufRead *.wpl setf xml " WvDial au BufNewFile,BufRead wvdial.conf,.wvdialrc setf wvdial " CVS RC file au BufNewFile,BufRead .cvsrc setf cvsrc " CVS commit file au BufNewFile,BufRead cvs\d\+ setf cvs " WEB (*.web is also used for Winbatch: Guess, based on expecting "%" comment " lines in a WEB file). au BufNewFile,BufRead *.web \ if getline(1)[0].getline(2)[0].getline(3)[0].getline(4)[0].getline(5)[0] =~ "%" | \ setf web | \ else | \ setf winbatch | \ endif " Windows Scripting Host and Windows Script Component au BufNewFile,BufRead *.ws[fc] setf wsh " XHTML au BufNewFile,BufRead *.xhtml,*.xht setf xhtml " X Pixmap (dynamically sets colors, use BufEnter to make it work better) au BufEnter *.xpm \ if getline(1) =~ "XPM2" | \ setf xpm2 | \ else | \ setf xpm | \ endif au BufEnter *.xpm2 setf xpm2 " XFree86 config au BufNewFile,BufRead XF86Config \ if getline(1) =~ '\<XConfigurator\>' | \ let b:xf86conf_xfree86_version = 3 | \ endif | \ setf xf86conf au BufNewFile,BufRead */xorg.conf.d/*.conf \ let b:xf86conf_xfree86_version = 4 | \ setf xf86conf " Xorg config au BufNewFile,BufRead xorg.conf,xorg.conf-4 let b:xf86conf_xfree86_version = 4 | setf xf86conf " Xinetd conf au BufNewFile,BufRead */etc/xinetd.conf setf xinetd " XS Perl extension interface language au BufNewFile,BufRead *.xs setf xs " X resources file au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults " Xmath au BufNewFile,BufRead *.msc,*.msf setf xmath au BufNewFile,BufRead *.ms \ if !s:FTnroff() | setf xmath | endif " XML specific variants: docbk and xbl au BufNewFile,BufRead *.xml call s:FTxml() func! s:FTxml() let n = 1 while n < 100 && n < line("$") let line = getline(n) " DocBook 4 or DocBook 5. let is_docbook4 = line =~ '<!DOCTYPE.*DocBook' let is_docbook5 = line =~ ' xmlns="http://docbook.org/ns/docbook"' if is_docbook4 || is_docbook5 let b:docbk_type = "xml" if is_docbook5 let b:docbk_ver = 5 else let b:docbk_ver = 4 endif setf docbk return endif if line =~ 'xmlns:xbl="http://www.mozilla.org/xbl"' setf xbl return endif let n += 1 endwhile setf xml endfunc " XMI (holding UML models) is also XML au BufNewFile,BufRead *.xmi setf xml " CSPROJ files are Visual Studio.NET's XML-based project config files au BufNewFile,BufRead *.csproj,*.csproj.user setf xml " Qt Linguist translation source and Qt User Interface Files are XML au BufNewFile,BufRead *.ts,*.ui setf xml " TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull) au BufNewFile,BufRead *.tpm setf xml " Xdg menus au BufNewFile,BufRead */etc/xdg/menus/*.menu setf xml " ATI graphics driver configuration au BufNewFile,BufRead fglrxrc setf xml " XLIFF (XML Localisation Interchange File Format) is also XML au BufNewFile,BufRead *.xlf setf xml au BufNewFile,BufRead *.xliff setf xml " XML User Interface Language au BufNewFile,BufRead *.xul setf xml " X11 xmodmap (also see below) au BufNewFile,BufRead *Xmodmap setf xmodmap " Xquery au BufNewFile,BufRead *.xq,*.xql,*.xqm,*.xquery,*.xqy setf xquery " XSD au BufNewFile,BufRead *.xsd setf xsd " Xslt au BufNewFile,BufRead *.xsl,*.xslt setf xslt " Yacc au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc " Yacc or racc au BufNewFile,BufRead *.y call s:FTy() func! s:FTy() let n = 1 while n < 100 && n < line("$") let line = getline(n) if line =~ '^\s*%' setf yacc return endif if getline(n) =~ '^\s*\(#\|class\>\)' && getline(n) !~ '^\s*#\s*include' setf racc return endif let n = n + 1 endwhile setf yacc endfunc " Yaml au BufNewFile,BufRead *.yaml,*.yml setf yaml " yum conf (close enough to dosini) au BufNewFile,BufRead */etc/yum.conf setf dosini " Zimbu au BufNewFile,BufRead *.zu setf zimbu " Zimbu Templates au BufNewFile,BufRead *.zut setf zimbutempl " Zope " dtml (zope dynamic template markup language), pt (zope page template), " cpt (zope form controller page template) au BufNewFile,BufRead *.dtml,*.pt,*.cpt call s:FThtml() " zsql (zope sql method) au BufNewFile,BufRead *.zsql call s:SQL() " Z80 assembler asz80 au BufNewFile,BufRead *.z8a setf z8a augroup END " Source the user-specified filetype file, for backwards compatibility with " Vim 5.x. if exists("myfiletypefile") && filereadable(expand(myfiletypefile)) execute "source " . myfiletypefile endif " Check for "*" after loading myfiletypefile, so that scripts.vim is only used " when there are no matching file name extensions. " Don't do this for compressed files. augroup filetypedetect au BufNewFile,BufRead * \ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat \ | runtime! scripts.vim | endif au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif " Extra checks for when no filetype has been detected now. Mostly used for " patterns that end in "*". E.g., "zsh*" matches "zsh.vim", but that's a Vim " script file. " Most of these should call s:StarSetf() to avoid names ending in .gz and the " like are used. " More Apache config files au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache') au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache') " Asterisk config file au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk') au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm') " Bazaar version control au BufNewFile,BufRead bzr_log.* setf bzr " BIND zone au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone') " Calendar au BufNewFile,BufRead */.calendar/*, \*/share/calendar/*/calendar.*,*/share/calendar/calendar.* \ call s:StarSetf('calendar') " Changelog au BufNewFile,BufRead [cC]hange[lL]og* \ if getline(1) =~ '; urgency=' \| call s:StarSetf('debchangelog') \|else \| call s:StarSetf('changelog') \|endif " Crontab au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/* call s:StarSetf('crontab') " dnsmasq(8) configuration au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq') " Dracula au BufNewFile,BufRead drac.* call s:StarSetf('dracula') " Fvwm au BufNewFile,BufRead */.fvwm/* call s:StarSetf('fvwm') au BufNewFile,BufRead *fvwmrc*,*fvwm95*.hook \ let b:fvwm_version = 1 | call s:StarSetf('fvwm') au BufNewFile,BufRead *fvwm2rc* \ if expand("<afile>:e") == "m4" \| call s:StarSetf('fvwm2m4') \|else \| let b:fvwm_version = 2 | call s:StarSetf('fvwm') \|endif " Gedcom au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom') " GTK RC au BufNewFile,BufRead .gtkrc*,gtkrc* call s:StarSetf('gtkrc') " Jam au BufNewFile,BufRead Prl*.*,JAM*.* call s:StarSetf('jam') " Jargon au! BufNewFile,BufRead *jarg* \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'THIS IS THE JARGON FILE' \| call s:StarSetf('jargon') \|endif " Kconfig au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig') " Lilo: Linux loader au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo') " Logcheck au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck') " Makefile au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make') " Ruby Makefile au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby') " Mail (also matches muttrc.vim, so this is below the other checks) au BufNewFile,BufRead {neo,}mutt[[:alnum:]._-]\\\{6\} setf mail au BufNewFile,BufRead reportbug-* call s:StarSetf('mail') " Modconf au BufNewFile,BufRead */etc/modutils/* \ if executable(expand("<afile>")) != 1 \| call s:StarSetf('modconf') \|endif au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf') " Mutt setup file au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc') au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc') " Neomutt setup file au BufNewFile,BufRead .neomuttrc*,*/.neomutt/neomuttrc* call s:StarSetf('neomuttrc') au BufNewFile,BufRead neomuttrc*,Neomuttrc* call s:StarSetf('neomuttrc') " Nroff macros au BufNewFile,BufRead tmac.* call s:StarSetf('nroff') " OpenBSD hostname.if au BufNewFile,BufRead /etc/hostname.* call s:StarSetf('config') " Pam conf au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf') " Printcap and Termcap au BufNewFile,BufRead *printcap* \ if !did_filetype() \| let b:ptcap_type = "print" | call s:StarSetf('ptcap') \|endif au BufNewFile,BufRead *termcap* \ if !did_filetype() \| let b:ptcap_type = "term" | call s:StarSetf('ptcap') \|endif " ReDIF " Only used when the .rdf file was not detected to be XML. au BufRead,BufNewFile *.rdf call s:Redif() func! s:Redif() let lnum = 1 while lnum <= 5 && lnum < line('$') if getline(lnum) =~ "^\ctemplate-type:" setf redif return endif let lnum = lnum + 1 endwhile endfunc " Remind au BufNewFile,BufRead .reminders* call s:StarSetf('remind') " Vim script au BufNewFile,BufRead *vimrc* call s:StarSetf('vim') " Subversion commit file au BufNewFile,BufRead svn-commit*.tmp setf svn " X resources file au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults') " XFree86 config au BufNewFile,BufRead XF86Config-4* \ let b:xf86conf_xfree86_version = 4 | call s:StarSetf('xf86conf') au BufNewFile,BufRead XF86Config* \ if getline(1) =~ '\<XConfigurator\>' \| let b:xf86conf_xfree86_version = 3 \|endif \|call s:StarSetf('xf86conf') " X11 xmodmap au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap') " Xinetd conf au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd') " yum conf (close enough to dosini) au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini') " Z-Shell script au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh') " Plain text files, needs to be far down to not override others. This avoids " the "conf" type being used if there is a line starting with '#'. au BufNewFile,BufRead *.txt,*.text,README setf text " Use the filetype detect plugins. They may overrule any of the previously " detected filetypes. runtime! ftdetect/*.vim " NOTE: The above command could have ended the filetypedetect autocmd group " and started another one. Let's make sure it has ended to get to a consistent " state. augroup END " Generic configuration file (check this last, it's just guessing!) au filetypedetect BufNewFile,BufRead,StdinReadPost * \ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat \ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#' \ || getline(4) =~ '^#' || getline(5) =~ '^#') | \ setf conf | \ endif " If the GUI is already running, may still need to install the Syntax menu. " Don't do it when the 'M' flag is included in 'guioptions'. if has("menu") && has("gui_running") \ && !exists("did_install_syntax_menu") && &guioptions !~# "M" source <sfile>:p:h/menu.vim endif " Function called for testing all functions defined here. These are " script-local, thus need to be executed here. " Returns a string with error messages (hopefully empty). func! TestFiletypeFuncs(testlist) let output = '' for f in a:testlist try exe f catch let output = output . "\n" . f . ": " . v:exception endtry endfor return output endfunc " Restore 'cpoptions' let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftoff.vim����������������������������������������������������������������������0000664�0000000�0000000�00000000430�13204015742�0016307�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim support file to switch off detection of file types " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last change: 2001 Jun 11 if exists("did_load_filetypes") unlet did_load_filetypes endif " Remove all autocommands in the filetypedetect group silent! au! filetypedetect * ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin.vim�������������������������������������������������������������������0000664�0000000�0000000�00000001713�13204015742�0017040�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim support file to switch on loading plugins for file types " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last change: 2006 Apr 30 if exists("did_load_ftplugin") finish endif let did_load_ftplugin = 1 augroup filetypeplugin au FileType * call s:LoadFTPlugin() func! s:LoadFTPlugin() if exists("b:undo_ftplugin") exe b:undo_ftplugin unlet! b:undo_ftplugin b:did_ftplugin endif let s = expand("<amatch>") if s != "" if &cpo =~# "S" && exists("b:did_ftplugin") " In compatible mode options are reset to the global values, need to " set the local values also when a plugin was already used. unlet b:did_ftplugin endif " When there is a dot it is used to separate filetype names. Thus for " "aaa.bbb" load "aaa" and then "bbb". for name in split(s, '\.') exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim' endfor endif endfunc augroup END �����������������������������������������������������neovim-0.2.2/runtime/ftplugin/����������������������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0016321�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/README.txt������������������������������������������������������������0000664�0000000�0000000�00000001545�13204015742�0020024�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������The ftplugin directory is for Vim plugin scripts that are only used for a specific filetype. All files ending in .vim in this directory and subdirectories will be sourced by Vim when it detects the filetype that matches the name of the file or subdirectory. For example, these are all loaded for the "c" filetype: c.vim c_extra.vim c/settings.vim Note that the "_" in "c_extra.vim" is required to separate the filetype name from the following arbitrary name. The filetype plugins are only loaded when the ":filetype plugin" command has been used. The default filetype plugin files contain settings that 95% of the users will want to use. They do not contain personal preferences, like the value of 'shiftwidth'. If you want to do additional settings, or overrule the default filetype plugin, you can create your own plugin file. See ":help ftplugin" in Vim. �����������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/a2ps.vim��������������������������������������������������������������0000664�0000000�0000000�00000000726�13204015742�0017710�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: a2ps(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*Include: setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������neovim-0.2.2/runtime/ftplugin/aap.vim���������������������������������������������������������������0000664�0000000�0000000�00000001314�13204015742�0017576�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Aap recipe " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2013 Apr 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Reset 'formatoptions', 'comments' and 'expandtab' to undo this plugin. let b:undo_ftplugin = "setl fo< com< et<" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Set 'comments' to format dashed lists in comments. setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:- " Expand tabs to spaces to avoid trouble. setlocal expandtab ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/abap.vim��������������������������������������������������������������0000664�0000000�0000000�00000001440�13204015742�0017740�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: ABAP " Author: Steven Oliver <oliver.steven@gmail.com> " Copyright: Copyright (c) 2013 Steven Oliver " License: You may redistribute this under the same terms as Vim itself " -------------------------------------------------------------------------- " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim setlocal softtabstop=2 shiftwidth=2 setlocal suffixesadd=.abap " Windows allows you to filter the open file dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "ABAP Source Files (*.abap)\t*.abap\n" . \ "All Files (*.*)\t*.*\n" endif let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 sts=4 et tw=80 : ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/abaqus.vim������������������������������������������������������������0000664�0000000�0000000�00000006477�13204015742�0020330�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Abaqus finite element input file (www.abaqus.com) " Maintainer: Carl Osterwisch <osterwischc@asme.org> " Last Change: 2012 Apr 30 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") | finish | endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Save the compatibility options and temporarily switch to vim defaults let s:cpo_save = &cpoptions set cpoptions&vim " Set the format of the include file specification for Abaqus " Used in :check gf ^wf [i and other commands setlocal include=\\<\\cINPUT\\s*= " Remove characters up to the first = when evaluating filenames setlocal includeexpr=substitute(v:fname,'.\\{-}=','','') " Remove comma from valid filename characters since it is used to " separate keyword parameters setlocal isfname-=, " Define format of comment lines (see 'formatoptions' for uses) setlocal comments=:** setlocal commentstring=**%s " Definitions start with a * and assign a NAME, NSET, or ELSET " Used in [d ^wd and other commands setlocal define=^\\*\\a.*\\c\\(NAME\\\|NSET\\\|ELSET\\)\\s*= " Abaqus keywords and identifiers may include a - character setlocal iskeyword+=- let b:undo_ftplugin = "setlocal include< includeexpr< isfname<" \ . " comments< commentstring< define< iskeyword<" if has("folding") " Fold all lines that do not begin with * setlocal foldexpr=getline(v:lnum)[0]!=\"\*\" setlocal foldmethod=expr let b:undo_ftplugin .= " foldexpr< foldmethod<" endif " Set the file browse filter (currently only supported under Win32 gui) if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Abaqus Input Files (*.inp *.inc)\t*.inp;*.inc\n" . \ "Abaqus Results (*.dat)\t*.dat\n" . \ "Abaqus Messages (*.pre *.msg *.sta)\t*.pre;*.msg;*.sta\n" . \ "All Files (*.*)\t*.*\n" let b:undo_ftplugin .= "|unlet! b:browsefilter" endif " Define patterns for the matchit plugin if exists("loaded_matchit") && !exists("b:match_words") let b:match_ignorecase = 1 let b:match_words = \ '\*part:\*end\s*part,' . \ '\*assembly:\*end\s*assembly,' . \ '\*instance:\*end\s*instance,' . \ '\*step:\*end\s*step' let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words" endif " Define keys used to move [count] keywords backward or forward. noremap <silent><buffer> [[ ?^\*\a<CR>:nohlsearch<CR> noremap <silent><buffer> ]] /^\*\a<CR>:nohlsearch<CR> " Define key to toggle commenting of the current line or range noremap <silent><buffer> <LocalLeader><LocalLeader> \ :call <SID>Abaqus_ToggleComment()<CR>j function! <SID>Abaqus_ToggleComment() range if strpart(getline(a:firstline), 0, 2) == "**" " Un-comment all lines in range silent execute a:firstline . ',' . a:lastline . 's/^\*\*//' else " Comment all lines in range silent execute a:firstline . ',' . a:lastline . 's/^/**/' endif endfunction let b:undo_ftplugin .= "|unmap <buffer> [[|unmap <buffer> ]]" \ . "|unmap <buffer> <LocalLeader><LocalLeader>" " Undo must be done in nocompatible mode for <LocalLeader>. let b:undo_ftplugin = "let s:cpo_save = &cpoptions|" \ . "set cpoptions&vim|" \ . b:undo_ftplugin \ . "|let &cpoptions = s:cpo_save" \ . "|unlet s:cpo_save" " Restore saved compatibility options let &cpoptions = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/ada.vim���������������������������������������������������������������0000664�0000000�0000000�00000014267�13204015742�0017575�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"------------------------------------------------------------------------------ " Description: Perform Ada specific completion & tagging. " Language: Ada (2005) " $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ " Maintainer: Martin Krischik <krischik@users.sourceforge.net> " Taylor Venable <taylor@metasyntax.net> " Neil Bird <neil@fnxweb.com> " $Author: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 with patch from David Bürgin " $Revision: 887 $ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/ada.vim $ " History: 24.05.2006 MK Unified Headers " 26.05.2006 MK ' should not be in iskeyword. " 16.07.2006 MK Ada-Mode as vim-ball " 02.10.2006 MK Better folding. " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces " 08.07.2007 TV fix default compiler problems. " Help Page: ft-ada-plugin "------------------------------------------------------------------------------ " Provides mapping overrides for tag jumping that figure out the current " Ada object and tag jump to that, not the 'simple' vim word. " Similarly allows <Ctrl-N> matching of full-length ada entities from tags. "------------------------------------------------------------------------------ " Only do this when not done yet for this buffer if exists ("b:did_ftplugin") || version < 700 finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 45 " " Temporarily set cpoptions to ensure the script loads OK " let s:cpoptions = &cpoptions set cpoptions-=C " Section: Comments {{{1 " setlocal comments=O:--,:--\ \ setlocal commentstring=--\ \ %s setlocal complete=.,w,b,u,t,i " Section: case {{{1 " setlocal nosmartcase setlocal ignorecase " Section: formatoptions {{{1 " setlocal formatoptions+=ron " Section: Tagging {{{1 " if exists ("g:ada_extended_tagging") " Make local tag mappings for this buffer (if not already set) if g:ada_extended_tagging == 'jump' if mapcheck('<C-]>','n') == '' nnoremap <unique> <buffer> <C-]> :call ada#Jump_Tag ('', 'tjump')<cr> endif if mapcheck('g<C-]>','n') == '' nnoremap <unique> <buffer> g<C-]> :call ada#Jump_Tag ('','stjump')<cr> endif elseif g:ada_extended_tagging == 'list' if mapcheck('<C-]>','n') == '' nnoremap <unique> <buffer> <C-]> :call ada#List_Tag ()<cr> endif if mapcheck('g<C-]>','n') == '' nnoremap <unique> <buffer> g<C-]> :call ada#List_Tag ()<cr> endif endif endif " Section: Completion {{{1 " setlocal completefunc=ada#User_Complete setlocal omnifunc=adacomplete#Complete if exists ("g:ada_extended_completion") if mapcheck ('<C-N>','i') == '' inoremap <unique> <buffer> <C-N> <C-R>=ada#Completion("\<lt>C-N>")<cr> endif if mapcheck ('<C-P>','i') == '' inoremap <unique> <buffer> <C-P> <C-R>=ada#Completion("\<lt>C-P>")<cr> endif if mapcheck ('<C-X><C-]>','i') == '' inoremap <unique> <buffer> <C-X><C-]> <C-R>=<SID>ada#Completion("\<lt>C-X>\<lt>C-]>")<cr> endif if mapcheck ('<bs>','i') == '' inoremap <silent> <unique> <buffer> <bs> <C-R>=ada#Insert_Backspace ()<cr> endif endif " Section: Matchit {{{1 " " Only do this when not done yet for this buffer & matchit is used " if !exists ("b:match_words") && \ exists ("loaded_matchit") " " The following lines enable the macros/matchit.vim plugin for " Ada-specific extended matching with the % key. " let s:notend = '\%(\<end\s\+\)\@<!' let b:match_words = \ s:notend . '\<if\>:\<elsif\>:\<else\>:\<end\>\s\+\<if\>,' . \ s:notend . '\<case\>:\<when\>:\<end\>\s\+\<case\>,' . \ '\%(\<while\>.*\|\<for\>.*\|'.s:notend.'\)\<loop\>:\<end\>\s\+\<loop\>,' . \ '\%(\<do\>\|\<begin\>\):\<exception\>:\<end\>\s*\%($\|[;A-Z]\),' . \ s:notend . '\<record\>:\<end\>\s\+\<record\>' endif " Section: Compiler {{{1 " if ! exists("g:ada_default_compiler") let g:ada_default_compiler = 'gnat' endif if ! exists("current_compiler") || \ current_compiler != g:ada_default_compiler execute "compiler " . g:ada_default_compiler endif " Section: Folding {{{1 " if exists("g:ada_folding") if g:ada_folding[0] == 'i' setlocal foldmethod=indent setlocal foldignore=-- setlocal foldnestmax=5 elseif g:ada_folding[0] == 'g' setlocal foldmethod=expr setlocal foldexpr=ada#Pretty_Print_Folding(v:lnum) elseif g:ada_folding[0] == 's' setlocal foldmethod=syntax endif setlocal tabstop=8 setlocal softtabstop=3 setlocal shiftwidth=3 endif " Section: Abbrev {{{1 " if exists("g:ada_abbrev") iabbrev ret return iabbrev proc procedure iabbrev pack package iabbrev func function endif " Section: Commands, Mapping, Menus {{{1 " call ada#Map_Popup ( \ 'Tag.List', \ 'l', \ 'call ada#List_Tag ()') call ada#Map_Popup ( \'Tag.Jump', \'j', \'call ada#Jump_Tag ()') call ada#Map_Menu ( \'Tag.Create File', \':AdaTagFile', \'call ada#Create_Tags (''file'')') call ada#Map_Menu ( \'Tag.Create Dir', \':AdaTagDir', \'call ada#Create_Tags (''dir'')') call ada#Map_Menu ( \'Highlight.Toggle Space Errors', \ ':AdaSpaces', \'call ada#Switch_Syntax_Option (''space_errors'')') call ada#Map_Menu ( \'Highlight.Toggle Lines Errors', \ ':AdaLines', \'call ada#Switch_Syntax_Option (''line_errors'')') call ada#Map_Menu ( \'Highlight.Toggle Rainbow Color', \ ':AdaRainbow', \'call ada#Switch_Syntax_Option (''rainbow_color'')') call ada#Map_Menu ( \'Highlight.Toggle Standard Types', \ ':AdaTypes', \'call ada#Switch_Syntax_Option (''standard_types'')') " 1}}} " Reset cpoptions let &cpoptions = s:cpoptions unlet s:cpoptions finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=78 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/alsaconf.vim����������������������������������������������������������0000664�0000000�0000000�00000000666�13204015742�0020634�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: alsaconf(8) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/ant.vim���������������������������������������������������������������0000664�0000000�0000000�00000002475�13204015742�0017630�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: ant " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "XML Files (*.xml)\t*.xml\n" . \ "All Files (*.*)\t*.*\n" runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif " Change the :browse e filter to primarily show Ant-related files. if has("gui_win32") let b:browsefilter = "Build Files (build.xml)\tbuild.xml\n" . \ "Java Files (*.java)\t*.java\n" . \ "Properties Files (*.prop*)\t*.prop*\n" . \ "Manifest Files (*.mf)\t*.mf\n" . \ s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/arch.vim��������������������������������������������������������������0000664�0000000�0000000�00000000657�13204015742�0017763�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: GNU Arch inventory file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/art.vim���������������������������������������������������������������0000664�0000000�0000000�00000000632�13204015742�0017625�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: ART-IM and ART*Enterprise " Maintainer: Dorai Sitaram <ds26@gte.com> " URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html " Last Change: Apr 2, 2003 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif run ftplugin/lisp.vim setl lw-=if setl lw+=def-art-fun,deffacts,defglobal,defrule,defschema,for,schema,while ������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/aspvbs.vim������������������������������������������������������������0000664�0000000�0000000�00000003574�13204015742�0020345�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: aspvbs " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "HTML Files (*.html, *.htm)\t*.htm*\n" . \ "All Files (*.*)\t*.*\n" let s:match_words = "" runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words endif " ASP: Active Server Pages (with Visual Basic Script) " thanks to Gontran BAERTS if exists("loaded_matchit") let s:notend = '\%(\<end\s\+\)\@<!' let b:match_ignorecase = 1 let b:match_words = \ s:notend . '\<if\>\%(.\{-}then\s\+\w\)\@!:\<elseif\>:^\s*\<else\>:\<end\s\+\<if\>,' . \ s:notend . '\<select\s\+case\>:\<case\>:\<case\s\+else\>:\<end\s\+select\>,' . \ '^\s*\<sub\>:\<end\s\+sub\>,' . \ '^\s*\<function\>:\<end\s\+function\>,' . \ '\<class\>:\<end\s\+class\>,' . \ '^\s*\<do\>:\<loop\>,' . \ '^\s*\<for\>:\<next\>,' . \ '\<while\>:\<wend\>,' . \ s:match_words endif " Change the :browse e filter to primarily show ASP-related files. if has("gui_win32") let b:browsefilter="ASP Files (*.asp)\t*.asp\n" . s:browsefilter endif let b:undo_ftplugin = "unlet! b:match_words b:match_ignorecase b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/automake.vim����������������������������������������������������������0000664�0000000�0000000�00000000521�13204015742�0020642�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Automake " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let s:cpo_save = &cpo set cpo&vim runtime! ftplugin/make.vim ftplugin/make_*.vim ftplugin/make/*.vim let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/awk.vim���������������������������������������������������������������0000664�0000000�0000000�00000000633�13204015742�0017622�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: awk, nawk, gawk, mawk " Maintainer: Antonio Colombo <azc100@gmail.com> " Last Change: 2017 Feb 17 " This plugin was prepared by Mark Sikora " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let b:undo_ftplugin = "setl commentstring<" setlocal commentstring=#\ %s �����������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/bdf.vim���������������������������������������������������������������0000664�0000000�0000000�00000000701�13204015742�0017567�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: BDF font definition " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=b:COMMENT commentstring=COMMENT\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/bst.vim���������������������������������������������������������������0000664�0000000�0000000�00000000515�13204015742�0017627�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: bst " Author: Tim Pope <vimNOSPAM@tpope.info> " $Id: bst.vim,v 1.1 2007/05/05 17:37:57 vimboss Exp $ if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 setlocal commentstring=%\ %s setlocal comments=:% setlocal fo-=t fo+=croql let b:undo_ftplugin = "setlocal com< cms< fo<" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/btm.vim���������������������������������������������������������������0000664�0000000�0000000�00000000474�13204015742�0017625�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: BTM " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2004 Jul 06 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Behaves just like dosbatch runtime! ftplugin/dosbatch.vim ftplugin/dosbatch_*.vim ftplugin/dosbatch/*.vim ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/bzl.vim���������������������������������������������������������������0000664�0000000�0000000�00000005767�13204015742�0017644�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Bazel (http://bazel.io) " Maintainer: David Barnett (https://github.com/google/vim-ft-bzl) " Last Change: 2015 Aug 11 "" " @section Introduction, intro " Core settings for the bzl filetype, used for BUILD and *.bzl files for the " Bazel build system (http://bazel.io/). if exists('b:did_ftplugin') finish endif " Vim 7.4.051 has opinionated settings in ftplugin/python.vim that try to force " PEP8 conventions on every python file, but these conflict with Google's " indentation guidelines. As a workaround, we explicitly source the system " ftplugin, but save indentation settings beforehand and restore them after. let s:save_expandtab = &l:expandtab let s:save_shiftwidth = &l:shiftwidth let s:save_softtabstop = &l:softtabstop let s:save_tabstop = &l:tabstop " NOTE: Vim versions before 7.3.511 had a ftplugin/python.vim that was broken " for compatible mode. let s:save_cpo = &cpo set cpo&vim " Load base python ftplugin (also defines b:did_ftplugin). source $VIMRUNTIME/ftplugin/python.vim " NOTE: Vim versions before 7.4.104 and later set this in ftplugin/python.vim. setlocal comments=b:#,fb:- " Restore pre-existing indentation settings. let &l:expandtab = s:save_expandtab let &l:shiftwidth = s:save_shiftwidth let &l:softtabstop = s:save_softtabstop let &l:tabstop = s:save_tabstop setlocal formatoptions-=t " Make gf work with imports in BUILD files. setlocal includeexpr=substitute(v:fname,'//','','') " Enable syntax-based folding, if specified. if get(g:, 'ft_bzl_fold', 0) setlocal foldmethod=syntax setlocal foldtext=BzlFoldText() endif if exists('*BzlFoldText') finish endif function BzlFoldText() abort let l:start_num = nextnonblank(v:foldstart) let l:end_num = prevnonblank(v:foldend) if l:end_num <= l:start_num + 1 " If the fold is empty, don't print anything for the contents. let l:content = '' else " Otherwise look for something matching the content regex. " And if nothing matches, print an ellipsis. let l:content = '...' for l:line in getline(l:start_num + 1, l:end_num - 1) let l:content_match = matchstr(l:line, '\m\C^\s*name = \zs.*\ze,$') if !empty(l:content_match) let l:content = l:content_match break endif endfor endif " Enclose content with start and end let l:start_text = getline(l:start_num) let l:end_text = substitute(getline(l:end_num), '^\s*', '', '') let l:text = l:start_text . ' ' . l:content . ' ' . l:end_text " Compute the available width for the displayed text. let l:width = winwidth(0) - &foldcolumn - (&number ? &numberwidth : 0) let l:lines_folded = ' ' . string(1 + v:foldend - v:foldstart) . ' lines' " Expand tabs, truncate, pad, and concatenate let l:text = substitute(l:text, '\t', repeat(' ', &tabstop), 'g') let l:text = strpart(l:text, 0, l:width - len(l:lines_folded)) let l:padding = repeat(' ', l:width - len(l:lines_folded) - len(l:text)) return l:text . l:padding . l:lines_folded endfunction let &cpo = s:save_cpo unlet s:save_cpo ���������neovim-0.2.2/runtime/ftplugin/c.vim�����������������������������������������������������������������0000664�0000000�0000000�00000003523�13204015742�0017263�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2017 Sep 28 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Using line continuation here. let s:cpo_save = &cpo set cpo-=C let b:undo_ftplugin = "setl fo< com< ofu<" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Set completion with CTRL-X CTRL-O to autoloaded function. if exists('&ofu') setlocal ofu=ccomplete#Complete endif " Set 'comments' to format dashed lists in comments. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// " When the matchit plugin is loaded, this makes the % command skip parens and " braces in comments properly. let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>' let b:match_skip = 's:comment\|string\|character\|special' " Win32 can filter files in the browse dialog if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") if &ft == "cpp" let b:browsefilter = "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" . \ "C Header Files (*.h)\t*.h\n" . \ "C Source Files (*.c)\t*.c\n" . \ "All Files (*.*)\t*.*\n" elseif &ft == "ch" let b:browsefilter = "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" . \ "C Header Files (*.h)\t*.h\n" . \ "C Source Files (*.c)\t*.c\n" . \ "All Files (*.*)\t*.*\n" else let b:browsefilter = "C Source Files (*.c)\t*.c\n" . \ "C Header Files (*.h)\t*.h\n" . \ "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" . \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" . \ "All Files (*.*)\t*.*\n" endif endif let b:man_default_sects = '3,2' let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/calendar.vim����������������������������������������������������������0000664�0000000�0000000�00000000716�13204015742�0020613�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: calendar(1) input file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring& include& setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������neovim-0.2.2/runtime/ftplugin/cdrdaoconf.vim��������������������������������������������������������0000664�0000000�0000000�00000000577�13204015742�0021151�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2007-12-04 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/ch.vim����������������������������������������������������������������0000664�0000000�0000000�00000000730�13204015742�0017430�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Ch " Maintainer: SoftIntegration, Inc. <info@softintegration.com> " URL: http://www.softintegration.com/download/vim/ftplugin/ch.vim " Last change: 2004 May 16 " Created based on cpp.vim " " Ch is a C/C++ interpreter with many high level extensions " " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Behaves just like C runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim ����������������������������������������neovim-0.2.2/runtime/ftplugin/changelog.vim���������������������������������������������������������0000664�0000000�0000000�00000021273�13204015742�0020772�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: generic Changelog file " Maintainer: Martin Florian <marfl@posteo.de> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2015-10-25 " Variables: " g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) - " description: the timeformat used in ChangeLog entries. " default: "%Y-%m-%d". " g:changelog_dateformat - " description: the format sent to strftime() to generate a date string. " default: "%Y-%m-%d". " g:changelog_username - " description: the username to use in ChangeLog entries " default: try to deduce it from environment variables and system files. " Local Mappings: " <Leader>o - " adds a new changelog entry for the current user for the current date. " Global Mappings: " <Leader>o - " switches to the ChangeLog buffer opened for the current directory, or " opens it in a new buffer if it exists in the current directory. Then " it does the same as the local <Leader>o described above. " Notes: " run 'runtime ftplugin/changelog.vim' to enable the global mapping for " changelog files. " TODO: " should we perhaps open the ChangeLog file even if it doesn't exist already? " Problem is that you might end up with ChangeLog files all over the place. " If 'filetype' isn't "changelog", we must have been to add ChangeLog opener if &filetype == 'changelog' if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim " Set up the format used for dates. if !exists('g:changelog_dateformat') if exists('g:changelog_timeformat') let g:changelog_dateformat = g:changelog_timeformat else let g:changelog_dateformat = "%Y-%m-%d" endif endif function! s:username() if exists('g:changelog_username') return g:changelog_username elseif $EMAIL != "" return $EMAIL elseif $EMAIL_ADDRESS != "" return $EMAIL_ADDRESS endif let login = s:login() return printf('%s <%s@%s>', s:name(login), login, s:hostname()) endfunction function! s:login() return s:trimmed_system_with_default('whoami', 'unknown') endfunction function! s:trimmed_system_with_default(command, default) return s:first_line(s:system_with_default(a:command, a:default)) endfunction function! s:system_with_default(command, default) let output = system(a:command) if v:shell_error return default endif return output endfunction function! s:first_line(string) return substitute(a:string, '\n.*$', "", "") endfunction function! s:name(login) for name in [s:gecos_name(a:login), $NAME, s:capitalize(a:login)] if name != "" return name endif endfor endfunction function! s:gecos_name(login) for line in s:try_reading_file('/etc/passwd') if line =~ '^' . a:login . ':' return substitute(s:passwd_field(line, 5), '&', s:capitalize(a:login), "") endif endfor return "" endfunction function! s:try_reading_file(path) try return readfile(a:path) catch return [] endtry endfunction function! s:passwd_field(line, field) let fields = split(a:line, ':', 1) if len(fields) < a:field return "" endif return fields[a:field - 1] endfunction function! s:capitalize(word) return toupper(a:word[0]) . strpart(a:word, 1) endfunction function! s:hostname() return s:trimmed_system_with_default('hostname', 'localhost') endfunction " Format used for new date entries. if !exists('g:changelog_new_date_format') let g:changelog_new_date_format = "%d %u\n\n\t* %p%c\n\n" endif " Format used for new entries to current date entry. if !exists('g:changelog_new_entry_format') let g:changelog_new_entry_format = "\t* %p%c" endif " Regular expression used to find a given date entry. if !exists('g:changelog_date_entry_search') let g:changelog_date_entry_search = '^\s*%d\_s*%u' endif " Regular expression used to find the end of a date entry if !exists('g:changelog_date_end_entry_search') let g:changelog_date_end_entry_search = '^\s*$' endif " Substitutes specific items in new date-entry formats and search strings. " Can be done with substitute of course, but unclean, and need \@! then. function! s:substitute_items(str, date, user, prefix) let str = a:str let middles = {'%': '%', 'd': a:date, 'u': a:user, 'p': a:prefix, 'c': '{cursor}'} let i = stridx(str, '%') while i != -1 let inc = 0 if has_key(middles, str[i + 1]) let mid = middles[str[i + 1]] let str = strpart(str, 0, i) . mid . strpart(str, i + 2) let inc = strlen(mid) - 1 endif let i = stridx(str, '%', i + 1 + inc) endwhile return str endfunction " Position the cursor once we've done all the funky substitution. function! s:position_cursor() if search('{cursor}') > 0 let lnum = line('.') let line = getline(lnum) let cursor = stridx(line, '{cursor}') call setline(lnum, substitute(line, '{cursor}', '', '')) endif startinsert endfunction " Internal function to create a new entry in the ChangeLog. function! s:new_changelog_entry(prefix) " Deal with 'paste' option. let save_paste = &paste let &paste = 1 call cursor(1, 1) " Look for an entry for today by our user. let date = strftime(g:changelog_dateformat) let search = s:substitute_items(g:changelog_date_entry_search, date, \ s:username(), a:prefix) if search(search) > 0 " Ok, now we look for the end of the date entry, and add an entry. call cursor(nextnonblank(line('.') + 1), 1) if search(g:changelog_date_end_entry_search, 'W') > 0 let p = (line('.') == line('$')) ? line('.') : line('.') - 1 else let p = line('.') endif let ls = split(s:substitute_items(g:changelog_new_entry_format, '', '', a:prefix), \ '\n') call append(p, ls) call cursor(p + 1, 1) else " Flag for removing empty lines at end of new ChangeLogs. let remove_empty = line('$') == 1 " No entry today, so create a date-user header and insert an entry. let todays_entry = s:substitute_items(g:changelog_new_date_format, \ date, s:username(), a:prefix) " Make sure we have a cursor positioning. if stridx(todays_entry, '{cursor}') == -1 let todays_entry = todays_entry . '{cursor}' endif " Now do the work. call append(0, split(todays_entry, '\n')) " Remove empty lines at end of file. if remove_empty $-/^\s*$/-1,$delete endif " Reposition cursor once we're done. call cursor(1, 1) endif call s:position_cursor() " And reset 'paste' option let &paste = save_paste endfunction if exists(":NewChangelogEntry") != 2 nnoremap <buffer> <silent> <Leader>o :<C-u>call <SID>new_changelog_entry('')<CR> xnoremap <buffer> <silent> <Leader>o :<C-u>call <SID>new_changelog_entry('')<CR> command! -nargs=0 NewChangelogEntry call s:new_changelog_entry('') endif let b:undo_ftplugin = "setl com< fo< et< ai<" setlocal comments= setlocal formatoptions+=t setlocal noexpandtab setlocal autoindent if &textwidth == 0 setlocal textwidth=78 let b:undo_ftplugin .= " tw<" endif let &cpo = s:cpo_save unlet s:cpo_save else let s:cpo_save = &cpo set cpo&vim " Add the Changelog opening mapping nnoremap <silent> <Leader>o :call <SID>open_changelog()<CR> function! s:open_changelog() let path = expand('%:p:h') if exists('b:changelog_path') let changelog = b:changelog_path else if exists('b:changelog_name') let name = b:changelog_name else let name = 'ChangeLog' endif while isdirectory(path) let changelog = path . '/' . name if filereadable(changelog) break endif let parent = substitute(path, '/\+[^/]*$', "", "") if path == parent break endif let path = parent endwhile endif if !filereadable(changelog) return endif if exists('b:changelog_entry_prefix') let prefix = call(b:changelog_entry_prefix, []) else let prefix = substitute(strpart(expand('%:p'), strlen(path)), '^/\+', "", "") endif let buf = bufnr(changelog) if buf != -1 if bufwinnr(buf) != -1 execute bufwinnr(buf) . 'wincmd w' else execute 'sbuffer' buf endif else execute 'split' fnameescape(changelog) endif call s:new_changelog_entry(prefix) endfunction let &cpo = s:cpo_save unlet s:cpo_save endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/clojure.vim�����������������������������������������������������������0000664�0000000�0000000�00000007371�13204015742�0020511�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Clojure " Author: Meikel Brandmeyer <mb@kotka.de> " " Maintainer: Sung Pae <self@sungpae.com> " URL: https://github.com/guns/vim-clojure-static " License: Same as Vim " Last Change: 18 July 2016 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = 'setlocal iskeyword< define< formatoptions< comments< commentstring< lispwords<' setlocal iskeyword+=?,-,*,!,+,/,=,<,>,.,:,$ " There will be false positives, but this is better than missing the whole set " of user-defined def* definitions. setlocal define=\\v[(/]def(ault)@!\\S* " Remove 't' from 'formatoptions' to avoid auto-wrapping code. setlocal formatoptions-=t " Lisp comments are routinely nested (e.g. ;;; SECTION HEADING) setlocal comments=n:; setlocal commentstring=;\ %s " Specially indented symbols from clojure.core and clojure.test. " " Clojure symbols are indented in the defn style when they: " " * Define vars and anonymous functions " * Create new lexical scopes or scopes with altered environments " * Create conditional branches from a predicate function or value " " The arglists for these functions are generally in the form of [x & body]; " Functions that accept a flat list of forms do not treat the first argument " specially and hence are not indented specially. " " -*- LISPWORDS -*- " Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-011/clj/src/vim_clojure_static/generate.clj setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test " Provide insert mode completions for special forms and clojure.core. As " 'omnifunc' is set by popular Clojure REPL client plugins, we also set " 'completefunc' so that the user has some form of completion available when " 'omnifunc' is set and no REPL connection exists. for s:setting in ['omnifunc', 'completefunc'] if exists('&' . s:setting) && empty(eval('&' . s:setting)) execute 'setlocal ' . s:setting . '=clojurecomplete#Complete' let b:undo_ftplugin .= ' | setlocal ' . s:setting . '<' endif endfor " Take all directories of the CLOJURE_SOURCE_DIRS environment variable " and add them to the path option. " " This is a legacy option for VimClojure users. if exists('$CLOJURE_SOURCE_DIRS') for s:dir in split($CLOJURE_SOURCE_DIRS, (has("win32") || has("win64")) ? ';' : ':') let s:dir = fnameescape(s:dir) " Whitespace escaping for Windows let s:dir = substitute(s:dir, '\', '\\\\', 'g') let s:dir = substitute(s:dir, '\ ', '\\ ', 'g') execute "setlocal path+=" . s:dir . "/**" endfor let b:undo_ftplugin .= ' | setlocal path<' endif " Skip brackets in ignored syntax regions when using the % command if exists('loaded_matchit') let b:match_words = &matchpairs let b:match_skip = 's:comment\|string\|regex\|character' let b:undo_ftplugin .= ' | unlet! b:match_words b:match_skip' endif " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" . \ "ClojureScript Source Files (*.cljs)\t*.cljs\n" . \ "Java Source Files (*.java)\t*.java\n" . \ "All Files (*.*)\t*.*\n" let b:undo_ftplugin .= ' | unlet! b:browsefilter' endif let &cpo = s:cpo_save unlet! s:cpo_save s:setting s:dir " vim:sts=8:sw=8:ts=8:noet �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/cobol.vim�������������������������������������������������������������0000664�0000000�0000000�00000022362�13204015742�0020141�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: cobol " Author: Tim Pope <vimNOSPAM@tpope.info> " Last Update: By ZyX: use shiftwidth() " Insert mode mappings: <C-T> <C-D> <Tab> " Normal mode mappings: < > << >> [[ ]] [] ][ " Visual mode mappings: < > if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim setlocal commentstring=\ \ \ \ \ \ *%s setlocal comments=:* setlocal fo+=croqlt setlocal expandtab setlocal textwidth=72 " matchit support if exists("loaded_matchit") let s:ordot = '\|\ze\.\%( \@=\|$\)' let b:match_ignorecase=1 "let b:match_skip = 'getline(".") =~ "^.\\{6\\}[*/C]"' let b:match_words= \ '\$if\>:$else\>:\$endif\>,' . \ '[$-]\@<!\<if\>:\<\%(then\|else\)\>:\<end-if\>'.s:ordot.',' . \ '-\@<!\<perform\s\+\%(\d\+\s\+times\|until\|varying\|with\s\+test\)\>:\<end-perform\>'.s:ordot . ',' . \ '-\@<!\<\%(search\|evaluate\)\>:\<\%(when\)\>:\<end-\%(search\|evaluate\)\>' .s:ordot . ',' . \ '-\@<!\<\%(add\|compute\|divide\|multiply\|subtract\)\>\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(not\s\+\)\=on\s\+size\s\+error\>\)\)\@=:\%(\<not\s\+\)\@<!\<\%(not\s\+\)\=on\s\+size\s\+error\>:\<end-\%(add\|compute\|divide\|multiply\|subtract\)\>' .s:ordot . ',' . \ '-\@<!\<\%(string\|unstring\|accept\|display\|call\)\>\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(not\s\+\)\=on\s\+\%(overflow\|exception\)\>\)\)\@=:\%(\<not\s\+\)\@<!\<\%(not\s\+\)\=on\s\+\%(overflow\|exception\)\>:\<end-\%(string\|unstring\|accept\|display\|call\)\>' .s:ordot . ',' . \ '-\@<!\<\%(delete\|rewrite\|start\|write\|read\)\>\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>\)\)\@=:\%(\<not\s\+\)\@<!\<\%(not\s\+\)\=\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>:\<end-\%(delete\|rewrite\|start\|write\|read\)\>' .s:ordot endif if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "COBOL Source Files (*.cbl, *.cob)\t*.cbl;*.cob;*.lib\n". \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setlocal com< cms< fo< et< tw<" . \ " | unlet! b:browsefilter b:match_words b:match_ignorecase b:match_skip" if !exists("g:no_plugin_maps") && !exists("g:no_cobol_maps") let b:undo_ftplugin = b:undo_ftplugin . \ " | sil! exe 'nunmap <buffer> <'" . \ " | sil! exe 'nunmap <buffer> >'" . \ " | sil! exe 'nunmap <buffer> <<'" . \ " | sil! exe 'nunmap <buffer> >>'" . \ " | sil! exe 'vunmap <buffer> <'" . \ " | sil! exe 'vunmap <buffer> >'" . \ " | sil! exe 'iunmap <buffer> <C-D>'" . \ " | sil! exe 'iunmap <buffer> <C-T>'" . \ " | sil! exe 'iunmap <buffer> <Tab>'" . \ " | sil! exe 'nunmap <buffer> <Plug>Traditional'" . \ " | sil! exe 'nunmap <buffer> <Plug>Comment'" . \ " | sil! exe 'nunmap <buffer> <Plug>DeComment'" . \ " | sil! exe 'vunmap <buffer> <Plug>VisualTraditional'" . \ " | sil! exe 'vunmap <buffer> <Plug>VisualComment'" . \ " | sil! exe 'iunmap <buffer> <Plug>VisualDeComment'" . \ " | sil! exe 'unmap <buffer> [['" . \ " | sil! exe 'unmap <buffer> ]]'" . \ " | sil! exe 'unmap <buffer> []'" . \ " | sil! exe 'unmap <buffer> ]['" endif if !exists("g:no_plugin_maps") && !exists("g:no_cobol_maps") if version >= 700 nnoremap <silent> <buffer> > :set opfunc=<SID>IncreaseFunc<CR>g@ nnoremap <silent> <buffer> < :set opfunc=<SID>DecreaseFunc<CR>g@ endif nnoremap <silent> <buffer> >> :call CobolIndentBlock(1)<CR> nnoremap <silent> <buffer> << :call CobolIndentBlock(-1)<CR> vnoremap <silent> <buffer> > :call CobolIndentBlock(v:count1)<CR> vnoremap <silent> <buffer> < :call CobolIndentBlock(-v:count1)<CR> inoremap <silent> <buffer> <C-T> <C-R>=<SID>IncreaseIndent()<CR><C-R>=<SID>RestoreShiftwidth()<CR> inoremap <silent> <buffer> <C-D> <C-R>=<SID>DecreaseIndent()<CR><C-R>=<SID>RestoreShiftwidth()<CR> if !maparg("<Tab>","i") inoremap <silent> <buffer> <Tab> <C-R>=<SID>Tab()<CR><C-R>=<SID>RestoreShiftwidth()<CR> endif noremap <silent> <buffer> [[ m':call search('\c^\%(\s*\<Bar>.\{6\}\s\+\)\zs[A-Za-z0-9-]\+\s\+\%(division\<Bar>section\)\s*\.','bW')<CR> noremap <silent> <buffer> ]] m':call search('\c^\%(\s*\<Bar>.\{6\}\s\+\)\zs[A-Za-z0-9-]\+\s\+\%(division\<Bar>section\)\.','W')<CR> noremap <silent> <buffer> [] m':call <SID>toend('b')<CR> noremap <silent> <buffer> ][ m':call <SID>toend('')<CR> " For EnhancedCommentify noremap <silent> <buffer> <Plug>Traditional :call <SID>Comment('t')<CR> noremap <silent> <buffer> <Plug>Comment :call <SID>Comment('c')<CR> noremap <silent> <buffer> <Plug>DeComment :call <SID>Comment('u')<CR> noremap <silent> <buffer> <Plug>VisualTraditional :'<,'>call <SID>Comment('t')<CR> noremap <silent> <buffer> <Plug>VisualComment :'<,'>call <SID>Comment('c')<CR> noremap <silent> <buffer> <Plug>VisualDeComment :'<,'>call <SID>Comment('u')<CR> endif let &cpo = s:cpo_save unlet s:cpo_save if exists("g:did_cobol_ftplugin_functions") finish endif let g:did_cobol_ftplugin_functions = 1 function! s:repeat(str,count) let i = 0 let ret = "" while i < a:count let ret = ret . a:str let i = i + 1 endwhile return ret endfunction function! s:increase(...) let lnum = '.' let sw = shiftwidth() let i = a:0 ? a:1 : indent(lnum) if i >= 11 return sw - (i - 11) % sw elseif i >= 7 return 11-i elseif i == 6 return 1 else return 6-i endif endfunction function! s:decrease(...) let lnum = '.' let sw = shiftwidth() let i = indent(a:0 ? a:1 : lnum) if i >= 11 + sw return 1 + (i + 12) % sw elseif i > 11 return i-11 elseif i > 7 return i-7 elseif i == 7 return 1 else return i endif endfunction function! CobolIndentBlock(shift) let head = strpart(getline('.'),0,7) let tail = strpart(getline('.'),7) let indent = match(tail,'[^ ]') let sw = shiftwidth() let shift = a:shift if shift > 0 if indent < 4 let tail = s:repeat(" ",4-indent).tail let shift = shift - 1 endif let tail = s:repeat(" ",shift*sw).tail let shift = 0 elseif shift < 0 if (indent-4) > -shift * sw let tail = strpart(tail,-shift * sw) elseif (indent-4) > (-shift-1) * sw let tail = strpart(tail,indent - 4) else let tail = strpart(tail,indent) endif endif call setline('.',head.tail) endfunction function! s:IncreaseFunc(type) '[,']call CobolIndentBlock(1) endfunction function! s:DecreaseFunc(type) '[,']call CobolIndentBlock(-1) endfunction function! s:IncreaseIndent() let c = "\<C-T>" if exists("*InsertCtrlTWrapper") let key = InsertCtrlTWrapper() if key != c return key endif endif let interval = s:increase() let b:cobol_shiftwidth = &shiftwidth let &shiftwidth = 1 let lastchar = strpart(getline('.'),col('.')-2,1) if lastchar == '0' || lastchar == '^' return "\<BS>".lastchar.c else return s:repeat(c,interval) endif endfunction function! s:DecreaseIndent() let c = "\<C-D>" if exists("*InsertCtrlDWrapper") " I hack Ctrl-D to delete when not at the end of the line. let key = InsertCtrlDWrapper() if key != c return key endif endif let interval = s:decrease() let b:cobol_shiftwidth = &shiftwidth let &shiftwidth = 1 return s:repeat(c,interval) endfunction function! s:RestoreShiftwidth() if exists("b:cobol_shiftwidth") let &shiftwidth=b:cobol_shiftwidth unlet b:cobol_shiftwidth endif return "" endfunction function! s:Tab() if (strpart(getline('.'),0,col('.')-1) =~ '^\s*$' && &sta) return s:IncreaseIndent() " &softtabstop < 0: &softtabstop follows &shiftwidth elseif (&sts < 0 || &sts == shiftwidth()) && &sts != 8 && &et return s:repeat(" ",s:increase(col('.')-1)) else return "\<Tab>" endif endfunction function! s:Comment(arg) " For EnhancedCommentify let line = getline('.') if (line =~ '^.\{6\}[*/C]' || a:arg == 'c') && a:arg != 'u' let line = substitute(line,'^.\{6\}\zs.',' ','') else let line = substitute(line,'^.\{6\}\zs.','*','') endif call setline('.',line) endfunction function! s:toend(direction) let ignore = '^\(\s*\|.\{6\}\)\%([*/]\|\s*$\)' let keep = line('.') keepjumps + while line('.') < line('$') && getline('.') =~ ignore keepjumps + endwhile let res = search('\c^\%(\s*\|.\{6\}\s\+\)\zs[A-Za-z0-9-]\+\s\+\%(division\|section\)\s*\.',a:direction.'W') if a:direction != 'b' && !res let res = line('$') keepjumps $ elseif res keepjumps - endif if res while line('.') > 1 && getline('.') =~ ignore keepjumps - endwhile if line('.') == 1 && getline('.') =~ ignore exe "keepjumps ".keep endif else exe "keepjumps ".keep endif endfunction ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/conf.vim��������������������������������������������������������������0000664�0000000�0000000�00000000662�13204015742�0017767�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: generic configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/config.vim������������������������������������������������������������0000664�0000000�0000000�00000002372�13204015742�0020307�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: config " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "Bourne Shell Files (*.sh)\t*.sh\n" . \ "All Files (*.*)\t*.*\n" let s:match_words = "" runtime! ftplugin/sh.vim ftplugin/sh_*.vim ftplugin/sh/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif " Change the :browse e filter to primarily show configure-related files. if has("gui_win32") let b:browsefilter="Configure Scripts (configure.*, config.*)\tconfigure*;config.*\n" . \ s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter | " . b:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/context.vim�����������������������������������������������������������0000664�0000000�0000000�00000010414�13204015742�0020522�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: ConTeXt typesetting engine " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> " Former Maintainers: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2016 Oct 30 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim if !exists('current_compiler') compiler context endif let b:undo_ftplugin = "setl com< cms< def< inc< sua< fo< ofu<" \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" setlocal comments=b:%D,b:%C,b:%M,:% commentstring=%\ %s formatoptions+=tjcroql2 if get(b:, 'context_metapost', get(g:, 'context_metapost', 1)) setlocal omnifunc=contextcomplete#Complete let g:omni_syntax_group_include_context = 'mf\w\+,mp\w\+' let g:omni_syntax_group_exclude_context = 'mfTodoComment' endif let &l:define='\\\%([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\=' \ . 'def\|\\font\|\\\%(future\)\=let' \ . '\|\\new\%(count\|dimen\|skip\|muskip\|box\|toks\|read\|write' \ . '\|fam\|insert\|if\)' let &l:include = '^\s*\\\%(input\|component\|product\|project\|environment\)' setlocal suffixesadd=.tex if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_skip = 'r:\\\@<!\%(\\\\\)*%' let b:match_words = '(:),\[:],{:},\\(:\\),\\\[:\\],' . \ '\\start\(\a\+\):\\stop\1' endif let s:context_regex = { \ 'beginsection' : '\\\%(start\)\=\%(\%(sub\)*section\|\%(sub\)*subject\|chapter\|part\|component\|product\|title\)\>', \ 'endsection' : '\\\%(stop\)\=\%(\%(sub\)*section\|\%(sub\)*subject\|chapter\|part\|component\|product\|title\)\>', \ 'beginblock' : '\\\%(start\|setup\|define\)', \ 'endblock' : '\\\%(stop\|setup\|define\)' \ } function! s:move_around(count, what, flags, visual) if a:visual exe "normal! gv" endif call search(s:context_regex[a:what], a:flags.'s') " 's' sets previous context mark call map(range(2, a:count), 'search(s:context_regex[a:what], a:flags)') endfunction " Move around macros. nnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:false) <CR> vnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:true) <CR> nnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:false) <CR> vnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:true) <CR> nnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:false) <CR> vnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:true) <CR> nnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:false) <CR> vnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:true) <CR> nnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:false) <CR> vnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:true) <CR> nnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:false) <CR> vnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:true) <CR> " Other useful mappings if get(g:, 'context_mappings', 1) let s:tp_regex = '?^$\|^\s*\\\(item\|start\|stop\|blank\|\%(sub\)*section\|chapter\|\%(sub\)*subject\|title\|part\)' fun! s:tp() call cursor(search(s:tp_regex, 'bcW') + 1, 1) normal! V call cursor(search(s:tp_regex, 'W') - 1, 1) endf " Reflow paragraphs with commands like gqtp ("gq TeX paragraph") onoremap <silent><buffer> tp :<c-u>call <sid>tp()<cr> " Select TeX paragraph vnoremap <silent><buffer> tp <esc>:<c-u>call <sid>tp()<cr> " $...$ text object onoremap <silent><buffer> i$ :<c-u>normal! T$vt$<cr> onoremap <silent><buffer> a$ :<c-u>normal! F$vf$<cr> vnoremap <buffer> i$ T$ot$ vnoremap <buffer> a$ F$of$ endif " Commands for asynchronous typesetting command! -buffer -nargs=? -complete=file ConTeXt call context#typeset(<q-args>) command! -nargs=0 ConTeXtJobStatus call context#job_status() command! -nargs=0 ConTeXtStopJobs call context#stop_jobs() let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/cpp.vim���������������������������������������������������������������0000664�0000000�0000000�00000000440�13204015742�0017616�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: C++ " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2001 Jan 15 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Behaves just like C runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/crm.vim���������������������������������������������������������������0000664�0000000�0000000�00000000636�13204015742�0017624�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: CRM114 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/cs.vim����������������������������������������������������������������0000664�0000000�0000000�00000001442�13204015742�0017444�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: C# " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Tue, 09 Mar 2004 14:09:33 CET " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:keepcpo= &cpo set cpo&vim " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Set 'comments' to format dashed lists in comments. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "C# Source Files (*.cs)\t*.cs\n" . \ "All Files (*.*)\t*.*\n" endif let &cpo = s:keepcpo unlet s:keepcpo ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/csc.vim���������������������������������������������������������������0000664�0000000�0000000�00000001336�13204015742�0017611�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: csc " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C if exists("loaded_matchit") let b:match_words= \ '\<fix\>:\<endfix\>,' . \ '\<if\>:\<else\%(if\)\=\>:\<endif\>,' . \ '\<!loopondimensions\>\|\<!looponselected\>:\<!endloop\>' endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:match_words" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/csh.vim���������������������������������������������������������������0000664�0000000�0000000�00000003141�13204015742�0017612�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: csh " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C setlocal commentstring=#%s setlocal formatoptions-=t setlocal formatoptions+=crql " Csh: thanks to Johannes Zellner " - Both foreach and end must appear alone on separate lines. " - The words else and endif must appear at the beginning of input lines; " the if must appear alone on its input line or after an else. " - Each case label and the default label must appear at the start of a " line. " - while and end must appear alone on their input lines. if exists("loaded_matchit") let b:match_words = \ '^\s*\<if\>.*(.*).*\<then\>:'. \ '^\s*\<else\>\s\+\<if\>.*(.*).*\<then\>:^\s*\<else\>:'. \ '^\s*\<endif\>,'. \ '\%(^\s*\<foreach\>\s\+\S\+\|^s*\<while\>\).*(.*):'. \ '\<break\>:\<continue\>:^\s*\<end\>,'. \ '^\s*\<switch\>.*(.*):^\s*\<case\>\s\+:^\s*\<default\>:^\s*\<endsw\>' endif " Change the :browse e filter to primarily show csh-related files. if has("gui_win32") let b:browsefilter="csh Scripts (*.csh)\t*.csh\n" . \ "All Files (*.*)\t*.*\n" endif " Undo the stuff we changed. let b:undo_ftplugin = "setlocal commentstring< formatoptions<" . \ " | unlet! b:match_words b:browsefilter" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/css.vim���������������������������������������������������������������0000664�0000000�0000000�00000001020�13204015742�0017617�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: CSS " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo< ofu<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring& setlocal formatoptions-=t formatoptions+=croql setlocal omnifunc=csscomplete#CompleteCSS let &l:include = '^\s*@import\s\+\%(url(\)\=' let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/cucumber.vim����������������������������������������������������������0000664�0000000�0000000�00000011773�13204015742�0020654�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Cucumber " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif let b:did_ftplugin = 1 let s:keepcpo= &cpo set cpo&vim setlocal formatoptions-=t formatoptions+=croql setlocal comments=:# commentstring=#\ %s setlocal omnifunc=CucumberComplete let b:undo_ftplugin = "setl fo< com< cms< ofu<" let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') if !exists("b:cucumber_steps_glob") let b:cucumber_steps_glob = b:cucumber_root.'/**/*.rb' endif if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps") cnoremap <SID>foldopen <Bar>if &foldopen =~# 'tag'<Bar>exe 'norm! zv'<Bar>endif nnoremap <silent> <script> <buffer> [<C-D> :<C-U>exe <SID>jump('edit',v:count)<SID>foldopen<CR> nnoremap <silent> <script> <buffer> ]<C-D> :<C-U>exe <SID>jump('edit',v:count)<SID>foldopen<CR> nnoremap <silent> <script> <buffer> <C-W>d :<C-U>exe <SID>jump('split',v:count)<SID>foldopen<CR> nnoremap <silent> <script> <buffer> <C-W><C-D> :<C-U>exe <SID>jump('split',v:count)<SID>foldopen<CR> nnoremap <silent> <script> <buffer> [d :<C-U>exe <SID>jump('pedit',v:count)<CR> nnoremap <silent> <script> <buffer> ]d :<C-U>exe <SID>jump('pedit',v:count)<CR> let b:undo_ftplugin .= \ "|sil! nunmap <buffer> [<C-D>" . \ "|sil! nunmap <buffer> ]<C-D>" . \ "|sil! nunmap <buffer> <C-W>d" . \ "|sil! nunmap <buffer> <C-W><C-D>" . \ "|sil! nunmap <buffer> [d" . \ "|sil! nunmap <buffer> ]d" endif function! s:jump(command,count) let steps = s:steps('.') if len(steps) == 0 || len(steps) < a:count return 'echoerr "No matching step found"' elseif len(steps) > 1 && !a:count return 'echoerr "Multiple matching steps found"' else let c = a:count ? a:count-1 : 0 return a:command.' +'.steps[c][1].' '.escape(steps[c][0],' %#') endif endfunction function! s:allsteps() let step_pattern = '\C^\s*\K\k*\>\s*(\=\s*\zs\S.\{-\}\ze\s*)\=\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)' let steps = [] for file in split(glob(b:cucumber_steps_glob),"\n") let lines = readfile(file) let num = 0 for line in lines let num += 1 if line =~ step_pattern let type = matchstr(line,'\w\+') let steps += [[file,num,type,matchstr(line,step_pattern)]] endif endfor endfor return steps endfunction function! s:steps(lnum) let c = match(getline(a:lnum), '\S') + 1 while synIDattr(synID(a:lnum,c,1),'name') !~# '^$\|Region$' let c = c + 1 endwhile let step = matchstr(getline(a:lnum)[c-1 : -1],'^\s*\zs.\{-\}\ze\s*$') return filter(s:allsteps(),'s:stepmatch(v:val[3],step)') endfunction function! s:stepmatch(receiver,target) if a:receiver =~ '^[''"].*[''"]$' let pattern = '^'.escape(substitute(a:receiver[1:-2],'$\w\+','(.*)','g'),'/').'$' elseif a:receiver =~ '^/.*/$' let pattern = a:receiver[1:-2] elseif a:receiver =~ '^%r..*.$' let pattern = escape(a:receiver[3:-2],'/') else return 0 endif try let vimpattern = substitute(substitute(pattern,'\\\@<!(?:','%(','g'),'\\\@<!\*?','{-}','g') if a:target =~# '\v'.vimpattern return 1 endif catch endtry if has("ruby") && pattern !~ '\\\@<!#{' ruby VIM.command("return #{if (begin; Kernel.eval('/'+VIM.evaluate('pattern')+'/'); rescue SyntaxError; end) === VIM.evaluate('a:target') then 1 else 0 end}") else return 0 endif endfunction function! s:bsub(target,pattern,replacement) return substitute(a:target,'\C\\\@<!'.a:pattern,a:replacement,'g') endfunction function! CucumberComplete(findstart,base) abort let indent = indent('.') let group = synIDattr(synID(line('.'),indent+1,1),'name') let type = matchstr(group,'\Ccucumber\zs\%(Given\|When\|Then\)') let e = matchend(getline('.'),'^\s*\S\+\s') if type == '' || col('.') < col('$') || e < 0 return -1 endif if a:findstart return e endif let steps = [] for step in s:allsteps() if step[2] ==# type if step[3] =~ '^[''"]' let steps += [step[3][1:-2]] elseif step[3] =~ '^/\^.*\$/$' let pattern = step[3][2:-3] let pattern = substitute(pattern,'\C^(?:|I )','I ','') let pattern = s:bsub(pattern,'\\[Sw]','w') let pattern = s:bsub(pattern,'\\d','1') let pattern = s:bsub(pattern,'\\[sWD]',' ') let pattern = s:bsub(pattern,'\[\^\\\="\]','_') let pattern = s:bsub(pattern,'[[:alnum:]. _-][?*]?\=','') let pattern = s:bsub(pattern,'\[\([^^]\).\{-\}\]','\1') let pattern = s:bsub(pattern,'+?\=','') let pattern = s:bsub(pattern,'(\([[:alnum:]. -]\{-\}\))','\1') let pattern = s:bsub(pattern,'\\\([[:punct:]]\)','\1') if pattern !~ '[\\()*?]' let steps += [pattern] endif endif endif endfor call filter(steps,'strpart(v:val,0,strlen(a:base)) ==# a:base') return sort(steps) endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim:set sts=2 sw=2: �����neovim-0.2.2/runtime/ftplugin/cvsrc.vim�������������������������������������������������������������0000664�0000000�0000000�00000000617�13204015742�0020162�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: cvs(1) RC file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroql let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/debchangelog.vim������������������������������������������������������0000664�0000000�0000000�00000026426�13204015742�0021452�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file (GUI menu, folding and completion) " Language: Debian Changelog " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainers: Michael Piefel <piefel@informatik.hu-berlin.de> " Stefano Zacchiroli <zack@debian.org> " Last Change: 2014-01-31 " License: Vim License " URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/debchangelog.vim " Bug completion requires apt-listbugs installed for Debian packages or " python-launchpadlib installed for Ubuntu packages if exists("b:did_ftplugin") finish endif let b:did_ftplugin=1 " {{{1 Local settings (do on every load) if exists("g:debchangelog_fold_enable") setlocal foldmethod=expr setlocal foldexpr=DebGetChangelogFold(v:lnum) setlocal foldtext=DebChangelogFoldText() endif " Debian changelogs are not supposed to have any other text width, " so the user cannot override this setting setlocal tw=78 setlocal comments=f:* " Clean unloading let b:undo_ftplugin = "setlocal tw< comments< foldmethod< foldexpr< foldtext<" " }}}1 if exists("g:did_changelog_ftplugin") finish endif " Don't load another plugin (this is global) let g:did_changelog_ftplugin = 1 " {{{1 GUI menu " Helper functions returning various data. " Returns full name, either from $DEBFULLNAME or debianfullname. " TODO Is there a way to determine name from anywhere else? function <SID>FullName() if exists("$DEBFULLNAME") return $DEBFULLNAME elseif exists("g:debianfullname") return g:debianfullname else return "Your Name" endif endfunction " Returns email address, from $DEBEMAIL, $EMAIL or debianemail. function <SID>Email() if exists("$DEBEMAIL") return $DEBEMAIL elseif exists("$EMAIL") return $EMAIL elseif exists("g:debianemail") return g:debianemail else return "your@email.address" endif endfunction " Returns date in RFC822 format. function <SID>Date() let savelang = v:lc_time execute "language time C" let dateandtime = strftime("%a, %d %b %Y %X %z") execute "language time " . savelang return dateandtime endfunction function <SID>WarnIfNotUnfinalised() if match(getline("."), " -- [[:alpha:]][[:alnum:].]")!=-1 echohl WarningMsg echo "The entry has not been unfinalised before editing." echohl None return 1 endif return 0 endfunction function <SID>Finalised() let savelinenum = line(".") normal 1G call search("^ -- ") if match(getline("."), " -- [[:alpha:]][[:alnum:].]")!=-1 let returnvalue = 1 else let returnvalue = 0 endif execute savelinenum return returnvalue endfunction " These functions implement the menus function NewVersion() " The new entry is unfinalised and shall be changed amenu disable Changelog.New\ Version amenu enable Changelog.Add\ Entry amenu enable Changelog.Close\ Bug amenu enable Changelog.Set\ Distribution amenu enable Changelog.Set\ Urgency amenu disable Changelog.Unfinalise amenu enable Changelog.Finalise call append(0, substitute(getline(1), '-\([[:digit:]]\+\))', '-$$\1)', '')) call append(1, "") call append(2, "") call append(3, " -- ") call append(4, "") call Urgency("low") normal 1G0 call search(")") normal h normal  call setline(1, substitute(getline(1), '-\$\$', '-', '')) if exists("g:debchangelog_fold_enable") foldopen endif call AddEntry() endfunction function AddEntry() normal 1G call search("^ -- ") normal kk call append(".", " * ") normal jjj let warn=<SID>WarnIfNotUnfinalised() normal kk if warn echohl MoreMsg call input("Hit ENTER") echohl None endif startinsert! endfunction function CloseBug() normal 1G call search("^ -- ") let warn=<SID>WarnIfNotUnfinalised() normal kk call append(".", " * (closes: #" . input("Bug number to close: ") . ")") normal j^ll startinsert endfunction function Distribution(dist) call setline(1, substitute(getline(1), ') *\%(UNRELEASED\|\l\+\);', ") " . a:dist . ";", "")) endfunction function Urgency(urg) call setline(1, substitute(getline(1), "urgency=.*$", "urgency=" . a:urg, "")) endfunction function <SID>UnfinaliseMenu() " This means the entry shall be changed amenu disable Changelog.New\ Version amenu enable Changelog.Add\ Entry amenu enable Changelog.Close\ Bug amenu enable Changelog.Set\ Distribution amenu enable Changelog.Set\ Urgency amenu disable Changelog.Unfinalise amenu enable Changelog.Finalise endfunction function Unfinalise() call <SID>UnfinaliseMenu() normal 1G call search("^ -- ") call setline(".", " -- ") endfunction function <SID>FinaliseMenu() " This means the entry should not be changed anymore amenu enable Changelog.New\ Version amenu disable Changelog.Add\ Entry amenu disable Changelog.Close\ Bug amenu disable Changelog.Set\ Distribution amenu disable Changelog.Set\ Urgency amenu enable Changelog.Unfinalise amenu disable Changelog.Finalise endfunction function Finalise() call <SID>FinaliseMenu() normal 1G call search("^ -- ") call setline(".", " -- " . <SID>FullName() . " <" . <SID>Email() . "> " . <SID>Date()) endfunction function <SID>MakeMenu() amenu &Changelog.&New\ Version :call NewVersion()<CR> amenu Changelog.&Add\ Entry :call AddEntry()<CR> amenu Changelog.&Close\ Bug :call CloseBug()<CR> menu Changelog.-sep- <nul> amenu Changelog.Set\ &Distribution.&unstable :call Distribution("unstable")<CR> amenu Changelog.Set\ Distribution.&frozen :call Distribution("frozen")<CR> amenu Changelog.Set\ Distribution.&stable :call Distribution("stable")<CR> menu Changelog.Set\ Distribution.-sep- <nul> amenu Changelog.Set\ Distribution.frozen\ unstable :call Distribution("frozen unstable")<CR> amenu Changelog.Set\ Distribution.stable\ unstable :call Distribution("stable unstable")<CR> amenu Changelog.Set\ Distribution.stable\ frozen :call Distribution("stable frozen")<CR> amenu Changelog.Set\ Distribution.stable\ frozen\ unstable :call Distribution("stable frozen unstable")<CR> amenu Changelog.Set\ &Urgency.&low :call Urgency("low")<CR> amenu Changelog.Set\ Urgency.&medium :call Urgency("medium")<CR> amenu Changelog.Set\ Urgency.&high :call Urgency("high")<CR> menu Changelog.-sep- <nul> amenu Changelog.U&nfinalise :call Unfinalise()<CR> amenu Changelog.&Finalise :call Finalise()<CR> if <SID>Finalised() call <SID>FinaliseMenu() else call <SID>UnfinaliseMenu() endif endfunction augroup changelogMenu au BufEnter * if &filetype == "debchangelog" | call <SID>MakeMenu() | endif au BufLeave * if &filetype == "debchangelog" | silent! aunmenu Changelog | endif augroup END " }}} " {{{1 folding " look for an author name in the [zonestart zoneend] lines searching backward function! s:getAuthor(zonestart, zoneend) let linepos = a:zoneend while linepos >= a:zonestart let line = getline(linepos) if line =~ '^ --' return substitute(line, '^ --\s*\([^<]\+\)\s*.*', '\1', '') endif let linepos -= 1 endwhile return '[unknown]' endfunction " Look for a package source name searching backward from the givenline and " returns it. Return the empty string if the package name can't be found function! DebGetPkgSrcName(lineno) let lineidx = a:lineno let pkgname = '' while lineidx > 0 let curline = getline(lineidx) if curline =~ '^\S' let pkgname = matchlist(curline, '^\(\S\+\).*$')[1] break endif let lineidx = lineidx - 1 endwhile return pkgname endfunction function! DebChangelogFoldText() if v:folddashes == '-' " changelog entry fold return foldtext() . ' -- ' . s:getAuthor(v:foldstart, v:foldend) . ' ' endif return foldtext() endfunction function! DebGetChangelogFold(lnum) let line = getline(a:lnum) if line =~ '^\w\+' return '>1' " beginning of a changelog entry endif if line =~ '^\s\+\[.*\]' return '>2' " beginning of an author-specific chunk endif if line =~ '^ --' return '1' endif return '=' endfunction if exists("g:debchangelog_fold_enable") silent! foldopen! " unfold the entry the cursor is on (usually the first one) endif " }}} " {{{1 omnicompletion for Closes: # if !exists('g:debchangelog_listbugs_severities') let g:debchangelog_listbugs_severities = 'critical,grave,serious,important,normal,minor,wishlist' endif fun! DebCompleteBugs(findstart, base) if a:findstart let line = getline('.') " try to detect whether this is closes: or lp: let g:debchangelog_complete_mode = 'debbugs' let try_colidx = col('.') - 1 let colidx = -1 " default to no-completion-possible while try_colidx > 0 && line[try_colidx - 1] =~ '\s\|\d\|#\|,\|:' let try_colidx = try_colidx - 1 if line[try_colidx] == '#' && colidx == -1 " found hash, where we complete from: let colidx = try_colidx elseif line[try_colidx] == ':' if try_colidx > 1 && strpart(line, try_colidx - 2, 3) =~ '\clp:' let g:debchangelog_complete_mode = 'lp' endif break endif endwhile return colidx else " return matches: let bug_lines = [] if g:debchangelog_complete_mode == 'lp' if ! has('python') echoerr 'vim must be built with Python support to use LP bug completion' return endif let pkgsrc = DebGetPkgSrcName(line('.')) python << EOF import vim try: from launchpadlib.launchpad import Launchpad from lazr.restfulclient.errors import HTTPError # login anonymously lp = Launchpad.login_anonymously('debchangelog.vim', 'production') ubuntu = lp.distributions['ubuntu'] try: sp = ubuntu.getSourcePackage(name=vim.eval('pkgsrc')) status = ('New', 'Incomplete', 'Confirmed', 'Triaged', 'In Progress', 'Fix Committed') tasklist = sp.searchTasks(status=status, order_by='id') liststr = '[' for task in tasklist: bug = task.bug liststr += "'#%d - %s'," % (bug.id, bug.title.replace('\'', '\'\'')) liststr += ']' vim.command('silent let bug_lines = %s' % liststr.encode('utf-8')) except HTTPError: pass except ImportError: vim.command('echoerr \'python-launchpadlib >= 1.5.4 needs to be installed to use Launchpad bug completion\'') EOF else if ! filereadable('/usr/sbin/apt-listbugs') echoerr 'apt-listbugs not found, you should install it to use Closes bug completion' return endif let pkgsrc = DebGetPkgSrcName(line('.')) let listbugs_output = system('/usr/sbin/apt-listbugs -s ' . g:debchangelog_listbugs_severities . ' list ' . pkgsrc . ' | grep "^ #" 2> /dev/null') let bug_lines = split(listbugs_output, '\n') endif let completions = [] for line in bug_lines let parts = matchlist(line, '^\s*\(#\S\+\)\s*-\s*\(.*\)$') " filter only those which match a:base: if parts[1] !~ "^" . a:base continue endif let completion = {} let completion['word'] = parts[1] let completion['menu'] = parts[2] let completion['info'] = parts[0] let completions += [completion] endfor return completions endif endfun setlocal omnifunc=DebCompleteBugs " }}} " vim: set foldmethod=marker: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/debcontrol.vim��������������������������������������������������������0000664�0000000�0000000�00000003536�13204015742�0021200�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file (GUI menu and folding) " Language: Debian control files " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainer: Pierre Habouzit <madcoder@debian.org> " Last Change: 2008-03-08 " URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/ftplugin/debcontrol.vim " Do these settings once per buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin=1 " {{{1 Local settings (do on every load) if exists("g:debcontrol_fold_enable") setlocal foldmethod=expr setlocal foldexpr=DebControlFold(v:lnum) setlocal foldtext=DebControlFoldText() endif setlocal textwidth=0 " Clean unloading let b:undo_ftplugin = "setlocal tw< foldmethod< foldexpr< foldtext<" " }}}1 " {{{1 folding function! s:getField(f, lnum) let line = getline(a:lnum) let fwdsteps = 0 while line !~ '^'.a:f.':' let fwdsteps += 1 let line = getline(a:lnum + fwdsteps) if line == '' return 'unknown' endif endwhile return substitute(line, '^'.a:f.': *', '', '') endfunction function! DebControlFoldText() if v:folddashes == '-' " debcontrol entry fold let type = substitute(getline(v:foldstart), ':.*', '', '') if type == 'Source' let ftext = substitute(foldtext(), ' *Source: *', ' ', '') return ftext . ' -- ' . s:getField('Maintainer', v:foldstart) . ' ' endif let arch = s:getField('Architecture', v:foldstart) let ftext = substitute(foldtext(), ' *Package: *', ' [' . arch . '] ', '') return ftext . ': ' . s:getField('Description', v:foldstart) . ' ' endif return foldtext() endfunction function! DebControlFold(l) " This is for not merging blank lines around folds to them if getline(a:l) =~ '^Source:' return '>1' endif if getline(a:l) =~ '^Package:' return '>1' endif return '=' endfunction " }}}1 ������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/denyhosts.vim���������������������������������������������������������0000664�0000000�0000000�00000000577�13204015742�0021067�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2007-12-04 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/dictconf.vim����������������������������������������������������������0000664�0000000�0000000�00000000662�13204015742�0020633�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: dict(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/dictdconf.vim���������������������������������������������������������0000664�0000000�0000000�00000000663�13204015742�0021000�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: dictd(8) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/diff.vim��������������������������������������������������������������0000664�0000000�0000000�00000000543�13204015742�0017750�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Diff " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2005 Jul 27 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl modeline<" " Don't use modelines in a diff, they apply to the diffed file setlocal nomodeline �������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/dircolors.vim���������������������������������������������������������0000664�0000000�0000000�00000000657�13204015742�0021046�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: dircolors(1) input file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/docbk.vim�������������������������������������������������������������0000664�0000000�0000000�00000001022�13204015742�0020113�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: DocBook " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2012-04-25 if exists('b:did_ftplugin') finish endif if !exists('b:docbk_type') if expand('%:e') == 'sgml' let b:docbk_type = 'sgml' else let b:docbk_type = 'xml' endif endif if b:docbk_type == 'sgml' runtime! ftplugin/sgml.vim ftplugin/sgml_*.vim ftplugin/sgml/*.vim else runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim endif let b:undo_ftplugin = "unlet! b:docbk_type" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/dockerfile.vim��������������������������������������������������������0000664�0000000�0000000�00000000544�13204015742�0021150�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Dockerfile " Maintainer: Honza Pokorny <http://honza.ca> " Last Change: 2014 Aug 29 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let b:undo_ftplugin = "setl commentstring<" setlocal commentstring=#\ %s ������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/dosbatch.vim����������������������������������������������������������0000664�0000000�0000000�00000001411�13204015742�0020622�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: MS-DOS .bat files " Maintainer: Mike Williams <mrw@eandem.co.uk> " Last Change: 8th May 2012 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim " BAT comment formatting setlocal comments=b:rem,b:@rem,b:REM,b:@REM,::: setlocal formatoptions-=t formatoptions+=rol " Define patterns for the browse file filter if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setlocal comments< formatoptions<" \ . "| unlet! b:browsefiler" let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/dosini.vim������������������������������������������������������������0000664�0000000�0000000�00000000712�13204015742�0020323�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Configuration File (ini file) for MSDOS/MS Windows " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:; commentstring=;\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������neovim-0.2.2/runtime/ftplugin/dtd.vim���������������������������������������������������������������0000664�0000000�0000000�00000002143�13204015742�0017611�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: dtd " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C setlocal commentstring=<!--%s--> setlocal comments=s:<!--,m:\ \ \ \ \ ,e:--> setlocal formatoptions-=t if !exists("g:ft_dtd_autocomment") || (g:ft_dtd_autocomment == 1) setlocal formatoptions+=croql endif if exists("loaded_matchit") let b:match_words = '<!--:-->,<!:>' endif " Change the :browse e filter to primarily show Java-related files. if has("gui_win32") let b:browsefilter="DTD Files (*.dtd)\t*.dtd\n" . \ "XML Files (*.xml)\t*.xml\n" . \ "All Files (*.*)\t*.*\n" endif " Undo the stuff we changed. let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" . \ " | unlet! b:matchwords b:browsefilter" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/dtrace.vim������������������������������������������������������������0000664�0000000�0000000�00000002177�13204015742�0020307�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Language: D script as described in "Solaris Dynamic Tracing Guide", " http://docs.sun.com/app/docs/doc/817-6223 " Last Change: 2008/03/20 " Version: 1.2 " Maintainer: Nicolas Weber <nicolasweber@gmx.de> " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Using line continuation here. let s:cpo_save = &cpo set cpo-=C let b:undo_ftplugin = "setl fo< com< cms< isk<" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Set 'comments' to format dashed lists in comments. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/ " dtrace uses /* */ comments. Set this explicitly, just in case the user " changed this (/*%s*/ is the default) setlocal commentstring=/*%s*/ setlocal iskeyword+=@,$ " When the matchit plugin is loaded, this makes the % command skip parens and " braces in comments. let b:match_words = &matchpairs let b:match_skip = 's:comment\|string\|character' let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/eiffel.vim������������������������������������������������������������0000664�0000000�0000000�00000007770�13204015742�0020303�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Eiffel " Maintainer: Doug Kearns <dougkearns@gmail.com> " Last Change: 2010 Aug 29 if (exists("b:did_ftplugin")) finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim setlocal comments=:-- setlocal commentstring=--\ %s setlocal formatoptions-=t formatoptions+=croql if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "Eiffel Source Files (*.e)\t*.e\n" . \ "Eiffel Control Files (*.ecf, *.ace, *.xace)\t*.ecf;*.ace;*.xace\n" . \ "All Files (*.*)\t*.*\n" endif if exists("loaded_matchit") && !exists("b:match_words") let b:match_ignorecase = 0 " Silly \%^ trick to match note at head of pair and in middle prevents " 'g%' wrapping from 'note' to 'end' let b:match_words = '\%^:' . \ '\<\%(^note\|indexing\|class\|^obsolete\|inherit\|insert\|^create\|convert\|feature\|^invariant\)\>:' . \ '^end\>,' . \ '\<\%(do\|deferred\|external\|once\%(\s\+"\)\@!\|check\|debug\|if\|inspect\|from\|across\)\>:' . \ '\%(\%(^\s\+\)\@<=\%(then\|until\|loop\)\|\%(then\|until\|loop\)\s\+[^ -]\|' . \ '\<\%(ensure\%(\s\+then\)\=\|rescue\|_then\|elseif\|else\|when\|\s\@<=invariant\|_until\|_loop\|variant\|_as\|alias\)\>\):' . \ '\s\@<=end\>' let b:match_skip = 's:\<eiffel\%(Comment\|String\|Operator\)\>' noremap [% <Nop> noremap ]% <Nop> vnoremap a% <Nop> endif let b:undo_ftplugin = "setl fo< com< cms<" . \ "| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip" if !exists("g:no_plugin_maps") && !exists("g:no_eiffel_maps") function! s:DoMotion(pattern, count, flags) abort normal! m' for i in range(a:count) call search(a:pattern, a:flags) endfor endfunction let sections = '^\%(note\|indexing\|' . \ '\%(\%(deferred\|expanded\|external\|frozen\)\s\+\)*class\|' . \ 'obsolete\|inherit\|insert\|create\|convert\|feature\|' . \ 'invariant\|end\)\>' nnoremap <silent> <buffer> ]] :<C-U>call <SID>DoMotion(sections, v:count1, 'W')<CR> xnoremap <silent> <buffer> ]] :<C-U>exe "normal! gv"<Bar>call <SID>DoMotion(sections, v:count1, 'W')<CR> nnoremap <silent> <buffer> [[ :<C-U>call <SID>DoMotion(sections, v:count1, 'Wb')<CR> xnoremap <silent> <buffer> [[ :<C-U>exe "normal! gv"<Bar>call <SID>DoMotion(sections, v:count1, 'Wb')<CR> function! s:DoFeatureMotion(count, flags) let view = winsaveview() call cursor(1, 1) let [features_start, _] = searchpos('^feature\>') call search('^\s\+\a') " find the first feature let spaces = indent(line('.')) let [features_end, _] = searchpos('^\%(invariant\|note\|end\)\>') call winrestview(view) call s:DoMotion('\%>' . features_start . 'l\%<' . features_end . 'l^\s*\%' . (spaces + 1) . 'v\zs\a', a:count, a:flags) endfunction nnoremap <silent> <buffer> ]m :<C-U>call <SID>DoFeatureMotion(v:count1, 'W')<CR> xnoremap <silent> <buffer> ]m :<C-U>exe "normal! gv"<Bar>call <SID>DoFeatureMotion(v:count1, 'W')<CR> nnoremap <silent> <buffer> [m :<C-U>call <SID>DoFeatureMotion(v:count1, 'Wb')<CR> xnoremap <silent> <buffer> [m :<C-U>exe "normal! gv"<Bar>call <SID>DoFeatureMotion(v:count1, 'Wb')<CR> let comment_block_start = '^\%(\s\+--.*\n\)\@<!\s\+--' let comment_block_end = '^\s\+--.*\n\%(\s\+--\)\@!' nnoremap <silent> <buffer> ]- :<C-U>call <SID>DoMotion(comment_block_start, 1, 'W')<CR> xnoremap <silent> <buffer> ]- :<C-U>exe "normal! gv"<Bar>call <SID>DoMotion(comment_block_start, 1, 'W')<CR> nnoremap <silent> <buffer> [- :<C-U>call <SID>DoMotion(comment_block_end, 1, 'Wb')<CR> xnoremap <silent> <buffer> [- :<C-U>exe "normal! gv"<Bar>call <SID>DoMotion(comment_block_end, 1, 'Wb')<CR> let b:undo_ftplugin = b:undo_ftplugin . \ "| silent! execute 'unmap <buffer> [[' | silent! execute 'unmap <buffer> ]]'" . \ "| silent! execute 'unmap <buffer> [m' | silent! execute 'unmap <buffer> ]m'" . \ "| silent! execute 'unmap <buffer> [-' | silent! execute 'unmap <buffer> ]-'" endif let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8 ��������neovim-0.2.2/runtime/ftplugin/elinks.vim������������������������������������������������������������0000664�0000000�0000000�00000000664�13204015742�0020331�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: elinks(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/erlang.vim������������������������������������������������������������0000664�0000000�0000000�00000003423�13204015742�0020310�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim ftplugin file " Language: Erlang " Author: Oscar Hellstrm <oscar@oscarh.net> " Contributors: Ricardo Catalinas Jimnez <jimenezrick@gmail.com> " Eduardo Lopez (http://github.com/tapichu) " License: Vim license " Version: 2012/01/25 if exists('b:did_ftplugin') finish else let b:did_ftplugin = 1 endif if exists('s:did_function_definitions') call s:SetErlangOptions() finish else let s:did_function_definitions = 1 endif let s:cpo_save = &cpo set cpo&vim if !exists('g:erlang_keywordprg') let g:erlang_keywordprg = 'erl -man' endif if !exists('g:erlang_folding') let g:erlang_folding = 0 endif let s:erlang_fun_begin = '^\a\w*(.*$' let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$' function s:SetErlangOptions() if g:erlang_folding setlocal foldmethod=expr setlocal foldexpr=GetErlangFold(v:lnum) setlocal foldtext=ErlangFoldText() endif setlocal comments=:%%%,:%%,:% setlocal commentstring=%%s setlocal formatoptions+=ro let &l:keywordprg = g:erlang_keywordprg endfunction function GetErlangFold(lnum) let lnum = a:lnum let line = getline(lnum) if line =~ s:erlang_fun_end return '<1' endif if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1 return '1' endif if line =~ s:erlang_fun_begin return '>1' endif return '=' endfunction function ErlangFoldText() let line = getline(v:foldstart) let foldlen = v:foldend - v:foldstart + 1 let lines = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '') if foldlen < 10 let lines = ' ' . lines endif let retval = '+' . v:folddashes . lines return retval endfunction call s:SetErlangOptions() let b:undo_ftplugin = "setlocal foldmethod< foldexpr< foldtext<" \ . " comments< commentstring< formatoptions<" let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/eruby.vim�������������������������������������������������������������0000664�0000000�0000000�00000006135�13204015742�0020171�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: eRuby " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "All Files (*.*)\t*.*\n" let s:match_words = "" if !exists("g:eruby_default_subtype") let g:eruby_default_subtype = "html" endif if &filetype =~ '^eruby\.' let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+') elseif !exists("b:eruby_subtype") let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') if b:eruby_subtype == '' let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$') endif if b:eruby_subtype == 'rhtml' let b:eruby_subtype = 'html' elseif b:eruby_subtype == 'rb' let b:eruby_subtype = 'ruby' elseif b:eruby_subtype == 'yml' let b:eruby_subtype = 'yaml' elseif b:eruby_subtype == 'js' let b:eruby_subtype = 'javascript' elseif b:eruby_subtype == 'txt' " Conventional; not a real file type let b:eruby_subtype = 'text' elseif b:eruby_subtype == '' let b:eruby_subtype = g:eruby_default_subtype endif endif if exists("b:eruby_subtype") && b:eruby_subtype != '' exe "runtime! ftplugin/".b:eruby_subtype.".vim ftplugin/".b:eruby_subtype."_*.vim ftplugin/".b:eruby_subtype."/*.vim" else runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim endif unlet! b:did_ftplugin " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin unlet b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter unlet b:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words unlet b:match_words endif runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim let b:did_ftplugin = 1 " Combine the new set of values with those previously included. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin endif if exists ("b:browsefilter") let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words . ',' . s:match_words endif " Change the browse dialog on Win32 to show mainly eRuby-related files if has("gui_win32") let b:browsefilter="eRuby Files (*.erb, *.rhtml)\t*.erb;*.rhtml\n" . s:browsefilter endif " Load the combined list of match_words for matchit.vim if exists("loaded_matchit") let b:match_words = s:match_words endif " TODO: comments= setlocal commentstring=<%#%s%> let b:undo_ftplugin = "setl cms< " \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin let &cpo = s:save_cpo unlet s:save_cpo " vim: nowrap sw=2 sts=2 ts=8: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/eterm.vim�������������������������������������������������������������0000664�0000000�0000000�00000000726�13204015742�0020157�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: eterm(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*include setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������neovim-0.2.2/runtime/ftplugin/falcon.vim������������������������������������������������������������0000664�0000000�0000000�00000002500�13204015742�0020275�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Falcon " Author: Steven Oliver <oliver.steven@gmail.com> " Copyright: Copyright (c) 2009-2013 Steven Oliver " License: You may redistribute this under the same terms as Vim itself " -------------------------------------------------------------------------- " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim setlocal softtabstop=4 shiftwidth=4 fileencoding=utf-8 setlocal suffixesadd=.fal,.ftd " Matchit support if exists("loaded_matchit") && !exists("b:match_words") let b:match_ignorecase = 0 let b:match_words = \ '\<\%(if\|case\|while\|until\|for\|do\|class\)\>=\@!' . \ ':' . \ '\<\%(else\|elsif\|when\)\>' . \ ':' . \ '\<end\>' . \ ',{:},\[:\],(:)' endif setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// " Windows allows you to filter the open file dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Falcon Source Files (*.fal *.ftd)\t*.fal;*.ftd\n" . \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setlocal tabstop< shiftwidth< expandtab< fileencoding<" \ . " suffixesadd< comments<" \ . "| unlet! b:browsefiler" let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 sts=4 et tw=80 : ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/fetchmail.vim���������������������������������������������������������0000664�0000000�0000000�00000000654�13204015742�0020777�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: fetchmail(1) RC File " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/flexwiki.vim����������������������������������������������������������0000664�0000000�0000000�00000003524�13204015742�0020664�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: FlexWiki, http://www.flexwiki.com/ " Maintainer: George V. Reilly <george@reilly.org> " Home: http://www.georgevreilly.com/vim/flexwiki/ " Other Home: http://www.vim.org/scripts/script.php?script_id=1529 " Author: George V. Reilly " Filenames: *.wiki " Last Change: Wed Apr 26 11:00 PM 2006 P " Version: 0.3 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 " Don't load another plugin for this buffer " Reset the following options to undo this plugin. let b:undo_ftplugin = "setl tw< wrap< lbr< et< ts< fenc< bomb< ff<" " Allow lines of unlimited length. Do NOT want automatic linebreaks, " as a newline starts a new paragraph in FlexWiki. setlocal textwidth=0 " Wrap long lines, rather than using horizontal scrolling. setlocal wrap " Wrap at a character in 'breakat' rather than at last char on screen setlocal linebreak " Don't transform <TAB> characters into spaces, as they are significant " at the beginning of the line for numbered and bulleted lists. setlocal noexpandtab " 4-char tabstops, per flexwiki.el setlocal tabstop=4 " Save *.wiki files in UTF-8 setlocal fileencoding=utf-8 " Add the UTF-8 Byte Order Mark to the beginning of the file setlocal bomb " Save <EOL>s as \n, not \r\n setlocal fileformat=unix if exists("g:flexwiki_maps") " Move up and down by display lines, to account for screen wrapping " of very long lines nmap <buffer> <Up> gk nmap <buffer> k gk vmap <buffer> <Up> gk vmap <buffer> k gk nmap <buffer> <Down> gj nmap <buffer> j gj vmap <buffer> <Down> gj vmap <buffer> j gj " for earlier versions - for when 'wrap' is set imap <buffer> <S-Down> <C-o>gj imap <buffer> <S-Up> <C-o>gk if v:version >= 700 imap <buffer> <Down> <C-o>gj imap <buffer> <Up> <C-o>gk endif endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/fortran.vim�����������������������������������������������������������0000664�0000000�0000000�00000011124�13204015742�0020510�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim settings file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) " Version: 0.50 " Last Change: 2015 Nov. 30 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> " Usage: For instructions, do :help fortran-plugin from Vim " Credits: " Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, Ben " Fritz, and David Barnett. " Only do these settings when not done yet for this buffer if exists("b:did_ftplugin") finish endif let s:cposet=&cpoptions set cpoptions&vim " Don't do other file type settings for this buffer let b:did_ftplugin = 1 " Determine whether this is a fixed or free format source file " if this hasn't been done yet using the priority: " buffer-local value " > global value " > file extension as in Intel ifort, gcc (gfortran), NAG, Pathscale, and Cray compilers if !exists("b:fortran_fixed_source") if exists("fortran_free_source") " User guarantees free source form let b:fortran_fixed_source = 0 elseif exists("fortran_fixed_source") " User guarantees fixed source form let b:fortran_fixed_source = 1 elseif expand("%:e") ==? "f\<90\|95\|03\|08\>" " Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers let b:fortran_fixed_source = 0 elseif expand("%:e") ==? "f\|f77\|for" " Fixed-form file extension defaults let b:fortran_fixed_source = 1 else " Modern fortran still allows both fixed and free source form " Assume fixed source form unless signs of free source form " are detected in the first five columns of the first s:lmax lines. " Detection becomes more accurate and time-consuming if more lines " are checked. Increase the limit below if you keep lots of comments at " the very top of each file and you have a fast computer. let s:lmax = 500 if ( s:lmax > line("$") ) let s:lmax = line("$") endif let b:fortran_fixed_source = 1 let s:ln=1 while s:ln <= s:lmax let s:test = strpart(getline(s:ln),0,5) if s:test !~ '^[Cc*]' && s:test !~ '^ *[!#]' && s:test =~ '[^ 0-9\t]' && s:test !~ '^[ 0-9]*\t' let b:fortran_fixed_source = 0 break endif let s:ln = s:ln + 1 endwhile unlet! s:lmax s:ln s:test endif endif " Set comments and textwidth according to source type if (b:fortran_fixed_source == 1) setlocal comments=:!,:*,:C " Fixed format requires a textwidth of 72 for code setlocal tw=72 " If you need to add "&" on continued lines so that the code is " compatible with both free and fixed format, then you should do so " in column 73 and uncomment the next line " setlocal tw=73 else setlocal comments=:! " Free format allows a textwidth of 132 setlocal tw=132 endif " Set commentstring for foldmethod=marker setlocal cms=!%s " Tabs are not a good idea in Fortran so the default is to expand tabs if !exists("fortran_have_tabs") setlocal expandtab endif " Set 'formatoptions' to break text lines setlocal fo+=t setlocal include=^\\c#\\=\\s*include\\s\\+ setlocal suffixesadd+=.f08,.f03,.f95,.f90,.for,.f,.F,.f77,.ftn,.fpp " Define patterns for the matchit plugin if !exists("b:match_words") let s:notend = '\%(\<end\s\+\)\@<!' let s:notselect = '\%(\<select\s\+\)\@<!' let s:notelse = '\%(\<end\s\+\|\<else\s\+\)\@<!' let s:notprocedure = '\%(\s\+procedure\>\)\@!' let b:match_ignorecase = 1 let b:match_words = \ '(:),' . \ '\<select\s*case\>:' . s:notselect. '\<case\>:\<end\s*select\>,' . \ s:notelse . '\<if\s*(.\+)\s*then\>:' . \ '\<else\s*\%(if\s*(.\+)\s*then\)\=\>:\<end\s*if\>,'. \ 'do\s\+\(\d\+\):\%(^\s*\)\@<=\1\s,'. \ s:notend . '\<do\>:\<end\s*do\>,'. \ s:notelse . '\<where\>:\<elsewhere\>:\<end\s*where\>,'. \ s:notend . '\<type\s*[^(]:\<end\s*type\>,'. \ s:notend . '\<forall\>:\<end\s*forall\>,'. \ s:notend . '\<associate\>:\<end\s*associate\>,'. \ s:notend . '\<enum\>:\<end\s*enum\>,'. \ s:notend . '\<interface\>:\<end\s*interface\>,'. \ s:notend . '\<subroutine\>:\<end\s*subroutine\>,'. \ s:notend . '\<function\>:\<end\s*function\>,'. \ s:notend . '\<module\>' . s:notprocedure . ':\<end\s*module\>,'. \ s:notend . '\<program\>:\<end\s*program\>' endif " File filters for :browse e if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" . \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setl fo< com< tw< cms< et< inc< sua<" \ . "| unlet! b:match_ignorecase b:match_words b:browsefilter" let &cpoptions=s:cposet unlet s:cposet " vim:sw=2 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/framescript.vim�������������������������������������������������������0000664�0000000�0000000�00000001414�13204015742�0021355�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim ftplugin file " Language: FrameScript " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-19 let s:cpo_save = &cpo set cpo&vim if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< fo< inc< | unlet! b:matchwords" setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=/*\ %s\ */ setlocal formatoptions-=t formatoptions+=croql setlocal include=^\\s*<#Include if exists("loaded_matchit") let s:not_end = '\c\%(\<End\)\@<!' let b:match_words = \ s:not_end . '\<If\>:\c\<ElseIf\>:\c\<Else\>:\c\<EndIf\>,' . \ s:not_end . '\<Loop\>:\c\<EndLoop\>' . \ s:not_end . '\<Sub\>:\c\<EndSub\>' unlet s:not_end endif let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/fvwm.vim��������������������������������������������������������������0000664�0000000�0000000�00000000606�13204015742�0020017�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Created : Tue 09 May 2006 02:07:31 PM CDT " Modified : Tue 09 May 2006 02:07:31 PM CDT " Author : Gautam Iyer <gi1242@users.sourceforge.net> " Description : ftplugin for fvwm config files if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql ��������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/gdb.vim���������������������������������������������������������������0000664�0000000�0000000�00000000445�13204015742�0017575�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: gdb " Maintainer: Michaël Peeters <NOSPAMm.vim@noekeon.org> " Last Changed: 26 Oct 2017 if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 setlocal commentstring=#%s " Undo the stuff we changed. let b:undo_ftplugin = "setlocal cms<" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/git.vim���������������������������������������������������������������0000664�0000000�0000000�00000002506�13204015742�0017624�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: generic git output " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif let b:did_ftplugin = 1 if !exists('b:git_dir') if expand('%:p') =~# '[\/]\.git[\/]modules[\/]' " Stay out of the way elseif expand('%:p') =~# '[\/]\.git[\/]worktrees' let b:git_dir = matchstr(expand('%:p'),'.*\.git[\/]worktrees[\/][^\/]\+\>') elseif expand('%:p') =~# '\.git\>' let b:git_dir = matchstr(expand('%:p'),'.*\.git\>') elseif $GIT_DIR != '' let b:git_dir = $GIT_DIR endif if (has('win32') || has('win64')) && exists('b:git_dir') let b:git_dir = substitute(b:git_dir,'\\','/','g') endif endif if exists('*shellescape') && exists('b:git_dir') && b:git_dir != '' if b:git_dir =~# '/\.git$' " Not a bare repository let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path endif let &l:path = escape(b:git_dir,'\, ').','.&l:path let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show' else setlocal keywordprg=git\ show endif if has('gui_running') let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','') endif setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','') let b:undo_ftplugin = "setl keywordprg< path< includeexpr<" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/gitcommit.vim���������������������������������������������������������0000664�0000000�0000000�00000004274�13204015742�0021041�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: git commit file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif runtime! ftplugin/git.vim let b:did_ftplugin = 1 setlocal comments=:# commentstring=#\ %s setlocal nomodeline tabstop=8 formatoptions+=tl textwidth=72 setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms<' if exists("g:no_gitcommit_commands") || v:version < 700 finish endif if !exists("b:git_dir") let b:git_dir = expand("%:p:h") endif command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>) let b:undo_ftplugin = b:undo_ftplugin . "|delc DiffGitCached" function! s:diffcomplete(A,L,P) let args = "" if a:P <= match(a:L." -- "," -- ")+3 let args = args . "-p\n--stat\n--shortstat\n--summary\n--patch-with-stat\n--no-renames\n-B\n-M\n-C\n" end if exists("b:git_dir") && a:A !~ '^-' let tree = fnamemodify(b:git_dir,':h') if strpart(getcwd(),0,strlen(tree)) == tree let args = args."\n".system("git diff --cached --name-only") endif endif return args endfunction function! s:gitdiffcached(bang,gitdir,...) let tree = fnamemodify(a:gitdir,':h') let name = tempname() let git = "git" if strpart(getcwd(),0,strlen(tree)) != tree let git .= " --git-dir=".(exists("*shellescape") ? shellescape(a:gitdir) : '"'.a:gitdir.'"') endif if a:0 let extra = join(map(copy(a:000),exists("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'")) else let extra = "-p --stat=".&columns endif call system(git." diff --cached --no-color --no-ext-diff ".extra." > ".(exists("*shellescape") ? shellescape(name) : name)) exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : name) wincmd P let b:git_dir = a:gitdir command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>) nnoremap <buffer> <silent> q :q<CR> setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git endfunction ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/gitconfig.vim���������������������������������������������������������0000664�0000000�0000000�00000000570�13204015742�0021011�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: git config file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2009 Dec 24 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif let b:did_ftplugin = 1 setlocal formatoptions-=t formatoptions+=croql setlocal comments=:#,:; commentstring=;\ %s let b:undo_ftplugin = "setl fo< com< cms<" ����������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/gitrebase.vim���������������������������������������������������������0000664�0000000�0000000�00000002662�13204015742�0021011�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: git rebase --interactive " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif runtime! ftplugin/git.vim let b:did_ftplugin = 1 setlocal comments=:# commentstring=#\ %s formatoptions-=t setlocal nomodeline if !exists("b:undo_ftplugin") let b:undo_ftplugin = "" endif let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo< ml<" function! s:choose(word) s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e endfunction function! s:cycle() call s:choose(get({'s':'edit','p':'squash','e':'reword','r':'fixup'},getline('.')[0],'pick')) endfunction command! -buffer -bar Pick :call s:choose('pick') command! -buffer -bar Squash :call s:choose('squash') command! -buffer -bar Edit :call s:choose('edit') command! -buffer -bar Reword :call s:choose('reword') command! -buffer -bar Fixup :call s:choose('fixup') command! -buffer -bar Cycle :call s:cycle() " The above are more useful when they are mapped; for example: "nnoremap <buffer> <silent> S :Cycle<CR> if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps") finish endif nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K' let b:undo_ftplugin = b:undo_ftplugin . "|nunmap <buffer> K" ������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/gitsendemail.vim������������������������������������������������������0000664�0000000�0000000�00000000235�13204015742�0021503�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: git send-email message " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2009 Dec 24 runtime! ftplugin/mail.vim �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/go.vim����������������������������������������������������������������0000664�0000000�0000000�00000000555�13204015742�0017450�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Go " Maintainer: David Barnett (https://github.com/google/vim-ft-go) " Last Change: 2014 Aug 16 if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 setlocal formatoptions-=t setlocal comments=s1:/*,mb:*,ex:*/,:// setlocal commentstring=//\ %s let b:undo_ftplugin = 'setl fo< com< cms<' " vim: sw=2 sts=2 et ���������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/gpg.vim���������������������������������������������������������������0000664�0000000�0000000�00000000661�13204015742�0017616�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: gpg(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/gprof.vim�������������������������������������������������������������0000664�0000000�0000000�00000001653�13204015742�0020160�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Language: gprof " Maintainer: Dominique Pelle <dominique.pelle@gmail.com> " Last Change: 2013 Jun 09 " When cursor is on one line of the gprof call graph, " calling this function jumps to this function in the call graph. if exists("b:did_ftplugin") finish endif let b:did_ftplugin=1 fun! <SID>GprofJumpToFunctionIndex() let l:line = getline('.') if l:line =~ '[\d\+\]$' " We're in a line in the call graph. norm! $y% call search('^' . escape(@", '[]'), 'sw') norm! zz elseif l:line =~ '^\(\s\+[0-9\.]\+\)\{3}\s\+' " We're in line in the flat profile. norm! 55|eby$ call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW') norm! zz endif endfun " Pressing <C-]> on a line in the gprof flat profile or in " the call graph, jumps to the corresponding function inside " the flat profile. map <buffer> <silent> <C-]> :call <SID>GprofJumpToFunctionIndex()<CR> " vim:sw=2 fdm=indent �������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/groovy.vim������������������������������������������������������������0000664�0000000�0000000�00000000527�13204015742�0020367�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: groovy " Maintainer: Justin M. Keyes <justinkz@gmail.com> " Last Change: 2016 May 22 if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo-=C let b:undo_ftplugin = 'setlocal commentstring<' setlocal commentstring=//%s let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/group.vim�������������������������������������������������������������0000664�0000000�0000000�00000000651�13204015742�0020174�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: group(5) user group file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/grub.vim��������������������������������������������������������������0000664�0000000�0000000�00000000662�13204015742�0020001�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: grub(8) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/haml.vim��������������������������������������������������������������0000664�0000000�0000000�00000003537�13204015742�0017767�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Haml " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "All Files (*.*)\t*.*\n" let s:match_words = "" runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim unlet! b:did_ftplugin set matchpairs-=<:> " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin unlet b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter unlet b:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words unlet b:match_words endif runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim let b:did_ftplugin = 1 " Combine the new set of values with those previously included. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin endif if exists ("b:browsefilter") let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words . ',' . s:match_words endif " Change the browse dialog on Win32 to show mainly Haml-related files if has("gui_win32") let b:browsefilter="Haml Files (*.haml)\t*.haml\nSass Files (*.sass)\t*.sass\n" . s:browsefilter endif " Load the combined list of match_words for matchit.vim if exists("loaded_matchit") let b:match_words = s:match_words endif setlocal comments= commentstring=-#\ %s let b:undo_ftplugin = "setl cms< com< " \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin let &cpo = s:save_cpo unlet s:save_cpo " vim:set sw=2: �����������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/hamster.vim�����������������������������������������������������������0000664�0000000�0000000�00000003600�13204015742�0020500�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Hamster Script " Version: 2.0.6.0 " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> " Last Change: 2017 Mar 18 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl fo< com< tw< commentstring<" \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Use the # sign for comments setlocal comments=:# " Format comments to be up to 78 characters long if &tw == 0 setlocal tw=78 endif " Comments start with a double quote setlocal commentstring=#%s " Move around functions. noremap <silent><buffer> [[ :call search('^\s*sub\>', "bW")<CR> noremap <silent><buffer> ]] :call search('^\s*sub\>', "W")<CR> noremap <silent><buffer> [] :call search('^\s*endsub\>', "bW")<CR> noremap <silent><buffer> ][ :call search('^\s*endsub\>', "W")<CR> " Move around comments noremap <silent><buffer> ]# :call search('^\s*#\@!', "W")<CR> noremap <silent><buffer> [# :call search('^\s*#\@!', "bW")<CR> " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = \ '\<sub\>:\<return\>:\<endsub\>,' . \ '\<do\|while\|repeat\|for\>:\<break\>:\<continue\>:\<loop\|endwhile\|until\|endfor\>,' . \ '\<if\>:\<else\%[if]\>:\<endif\>' " Ignore ":syntax region" commands, the 'end' argument clobbers if-endif " let b:match_skip = 'getline(".") =~ "^\\s*sy\\%[ntax]\\s\\+region" || " \ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"' endif setlocal ignorecase let &cpo = s:cpo_save unlet s:cpo_save setlocal cpo+=M " makes \%( match \) ��������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/haskell.vim�����������������������������������������������������������0000664�0000000�0000000�00000000675�13204015742�0020471�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Haskell " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1fl:{-,mb:-,ex:-},:-- commentstring=--\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/help.vim��������������������������������������������������������������0000664�0000000�0000000�00000005546�13204015742�0020000�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Vim help file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl fo< tw< cole< cocu< keywordprg<" setlocal formatoptions+=tcroql textwidth=78 if has("conceal") setlocal cole=2 cocu=nc endif " Prefer Vim help instead of manpages. setlocal keywordprg=:help if !exists('g:no_plugin_maps') function! s:show_toc() abort let bufname = bufname('%') let info = getloclist(0, {'winid': 1}) if !empty(info) && getwinvar(info.winid, 'qf_toc') ==# bufname lopen return endif let toc = [] let lnum = 2 let last_line = line('$') - 1 let last_added = 0 let has_section = 0 let has_sub_section = 0 while lnum && lnum <= last_line let level = 0 let add_text = '' let text = getline(lnum) if text =~# '^=\+$' && lnum + 1 < last_line " A de-facto section heading. Other headings are inferred. let has_section = 1 let has_sub_section = 0 let lnum = nextnonblank(lnum + 1) let text = getline(lnum) let add_text = text while add_text =~# '\*[^*]\+\*\s*$' let add_text = matchstr(add_text, '.*\ze\*[^*]\+\*\s*$') endwhile elseif text =~# '^[A-Z0-9][-A-ZA-Z0-9 .][-A-Z0-9 .():]*\%([ \t]\+\*.\+\*\)\?$' " Any line that's yelling is important. let has_sub_section = 1 let level = has_section let add_text = matchstr(text, '.\{-}\ze\s*\%([ \t]\+\*.\+\*\)\?$') elseif text =~# '\~$' \ && matchstr(text, '^\s*\zs.\{-}\ze\s*\~$') !~# '\t\|\s\{2,}' \ && getline(lnum - 1) =~# '^\s*<\?$\|^\s*\*.*\*$' \ && getline(lnum + 1) =~# '^\s*>\?$\|^\s*\*.*\*$' " These lines could be headers or code examples. We only want the " ones that have subsequent lines at the same indent or more. let l = nextnonblank(lnum + 1) if getline(l) =~# '\*[^*]\+\*$' " Ignore tag lines let l = nextnonblank(l + 1) endif if indent(lnum) <= indent(l) let level = has_section + has_sub_section let add_text = matchstr(text, '\S.*') endif endif let add_text = substitute(add_text, '\s\+$', '', 'g') if !empty(add_text) && last_added != lnum let last_added = lnum call add(toc, {'bufnr': bufnr('%'), 'lnum': lnum, \ 'text': repeat(' ', level) . add_text}) endif let lnum = nextnonblank(lnum + 1) endwhile call setloclist(0, toc, ' ') call setloclist(0, [], 'a', {'title': 'Help TOC'}) lopen let w:qf_toc = bufname endfunction nnoremap <silent><buffer> gO :call <sid>show_toc()<cr> endif let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/hgcommit.vim����������������������������������������������������������0000664�0000000�0000000�00000000553�13204015742�0020650�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: hg (Mercurial) commit file " Maintainer: Ken Takata <kentkt at csc dot jp> " Last Change: 2016 Jan 6 " Filenames: hg-editor-*.txt " License: VIM License " URL: https://github.com/k-takata/hg-vim if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 setlocal nomodeline let b:undo_ftplugin = 'setl modeline<' �����������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/hog.vim���������������������������������������������������������������0000664�0000000�0000000�00000002562�13204015742�0017620�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: hog (snort.conf) " Maintainer: . Victor Roemer, <vroemer@badsec.org>. " Last Change: Mar 1, 2013 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:undo_ftplugin = "setl fo< com< cms< def< inc<" let s:cpo_save = &cpo set cpo&vim setlocal formatoptions=croq setlocal comments=:# setlocal commentstring=\c#\ %s setlocal define=\c^\s\{-}var setlocal include=\c^\s\{-}include " Move around configurations let s:hog_keyword_match = '\c^\s*\<\(preprocessor\\|config\\|output\\|include\\|ipvar\\|portvar\\|var\\|dynamicpreprocessor\\|' . \ 'dynamicengine\\|dynamicdetection\\|activate\\|alert\\|drop\\|block\\|dynamic\\|log\\|pass\\|reject\\|sdrop\\|sblock\)\>' exec "nnoremap <buffer><silent> ]] :call search('" . s:hog_keyword_match . "', 'W' )<CR>" exec "nnoremap <buffer><silent> [[ :call search('" . s:hog_keyword_match . "', 'bW' )<CR>" if exists("loaded_matchit") let b:match_words = \ '^\s*\<\%(preprocessor\|config\|output\|include\|ipvar\|portvar' . \ '\|var\|dynamicpreprocessor\|dynamicengine\|dynamicdetection' . \ '\|activate\|alert\|drop\|block\|dynamic\|log\|pass\|reject' . \ '\|sdrop\|sblock\>\):$,\::\,:;' let b:match_skip = 'r:\\.\{-}$\|^\s*#.\{-}$\|^\s*$' endif let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/hostconf.vim����������������������������������������������������������0000664�0000000�0000000�00000000577�13204015742�0020672�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2007-12-04 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/hostsaccess.vim�������������������������������������������������������0000664�0000000�0000000�00000000664�13204015742�0021366�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: hosts_access(5) control file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/html.vim��������������������������������������������������������������0000664�0000000�0000000�00000003131�13204015742�0020000�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: html " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C setlocal matchpairs+=<:> setlocal commentstring=<!--%s--> setlocal comments=s:<!--,m:\ \ \ \ ,e:--> if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1) setlocal formatoptions-=t formatoptions+=croql endif if exists('&omnifunc') setlocal omnifunc=htmlcomplete#CompleteTags call htmlcomplete#DetectOmniFlavor() endif " HTML: thanks to Johannes Zellner and Benji Fisher. if exists("loaded_matchit") let b:match_ignorecase = 1 let b:match_words = '<:>,' . \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' endif " Change the :browse e filter to primarily show HTML-related files. if has("gui_win32") let b:browsefilter="HTML Files (*.html,*.htm)\t*.htm;*.html\n" . \ "JavaScript Files (*.js)\t*.js\n" . \ "Cascading StyleSheets (*.css)\t*.css\n" . \ "All Files (*.*)\t*.*\n" endif " Undo the stuff we changed. let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< formatoptions<" . \ " | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/htmldjango.vim��������������������������������������������������������0000664�0000000�0000000�00000000513�13204015742�0021164�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Django HTML template " Maintainer: Dave Hodder <dmh@dmh.org.uk> " Last Change: 2007 Jan 25 " Only use this filetype plugin when no other was loaded. if exists("b:did_ftplugin") finish endif " Use HTML and Django template ftplugins. runtime! ftplugin/html.vim runtime! ftplugin/django.vim �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/indent.vim������������������������������������������������������������0000664�0000000�0000000�00000000706�13204015742�0020322�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: indent(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring& setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������neovim-0.2.2/runtime/ftplugin/initex.vim������������������������������������������������������������0000664�0000000�0000000�00000001755�13204015742�0020346�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" filetype plugin for TeX and variants " Language: TeX (ft=initex) " Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org> " Version: 1.0 " Last Change: Wed 19 Apr 2006 " Only do this when not done yet for this buffer. if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer. let b:did_ftplugin = 1 " Avoid problems if running in 'compatible' mode. let s:save_cpo = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< define< include< sua<" " Set 'comments' to format dashed lists in comments setlocal com=sO:%\ -,mO:%\ \ ,eO:%%,:% " Set 'commentstring' to recognize the % comment character: " (Thanks to Ajit Thakkar.) setlocal cms=%%s " Allow "[d" to be used to find a macro definition: let &l:define='\\\([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\=' \ . 'def\|\\font\|\\\(future\)\=let' " Tell Vim to recognize \input bar : let &l:include = '\\input' setlocal suffixesadd=.tex let &cpo = s:save_cpo unlet s:save_cpo " vim:sts=2:sw=2: �������������������neovim-0.2.2/runtime/ftplugin/ishd.vim��������������������������������������������������������������0000664�0000000�0000000�00000002360�13204015742�0017766�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: InstallShield (ft=ishd) " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Sat, 24 May 2003 11:55:36 CEST if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 setlocal foldmethod=syntax " Using line continuation here. let s:cpo_save = &cpo set cpo-=C " matchit support if exists("loaded_matchit") let b:match_ignorecase=0 let b:match_words= \ '\%(^\s*\)\@<=\<function\>\s\+[^()]\+\s*(:\%(^\s*\)\@<=\<begin\>\s*$:\%(^\s*\)\@<=\<return\>:\%(^\s*\)\@<=\<end\>\s*;\s*$,' . \ '\%(^\s*\)\@<=\<repeat\>\s*$:\%(^\s*\)\@<=\<until\>\s\+.\{-}\s*;\s*$,' . \ '\%(^\s*\)\@<=\<switch\>\s*(.\{-}):\%(^\s*\)\@<=\<\%(case\|default\)\>:\%(^\s*\)\@<=\<endswitch\>\s*;\s*$,' . \ '\%(^\s*\)\@<=\<while\>\s*(.\{-}):\%(^\s*\)\@<=\<endwhile\>\s*;\s*$,' . \ '\%(^\s*\)\@<=\<for\>.\{-}\<\%(to\|downto\)\>:\%(^\s*\)\@<=\<endfor\>\s*;\s*$,' . \ '\%(^\s*\)\@<=\<if\>\s*(.\{-})\s*then:\%(^\s*\)\@<=\<else\s*if\>\s*([^)]*)\s*then:\%(^\s*\)\@<=\<else\>:\%(^\s*\)\@<=\<endif\>\s*;\s*$' endif if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "InstallShield Files (*.rul)\t*.rul\n" . \ "All Files (*.*)\t*.*\n" endif let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/j.vim�����������������������������������������������������������������0000664�0000000�0000000�00000006502�13204015742�0017272�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: J " Maintainer: David Bürgin <676c7473@gmail.com> " URL: https://github.com/glts/vim-j " Last Change: 2015-09-27 if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 let s:save_cpo = &cpo set cpo&vim setlocal iskeyword=48-57,A-Z,a-z,_ setlocal comments=:NB. setlocal commentstring=NB.\ %s setlocal formatoptions-=t setlocal matchpairs=(:) setlocal path-=/usr/include " Includes. To make the shorthand form "require 'web/cgi'" work, double the " last path component. Also strip off leading folder names like "~addons/". setlocal include=\\v^\\s*(load\|require)\\s*'\\zs\\f+\\ze' setlocal includeexpr=substitute(substitute(tr(v:fname,'\\','/'),'\\v^[^~][^/.]*(/[^/.]+)$','&\\1',''),'\\v^\\~[^/]+/','','') setlocal suffixesadd=.ijs let b:undo_ftplugin = 'setlocal matchpairs< formatoptions< commentstring< comments< iskeyword< path< include< includeexpr< suffixesadd<' " Section movement with ]] ][ [[ []. The start/end patterns below are amended " inside the function in order to avoid matching on the current cursor line. let s:sectionstart = '\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\)\>.*' let s:sectionend = '\s*)\s*' function! s:SearchSection(end, backwards, visualmode) abort if a:visualmode !=# '' normal! gv endif let l:flags = a:backwards ? 'bsW' : 'sW' if a:end call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags) else call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags) endif endfunction noremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR> xnoremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR> sunmap <buffer> ]] noremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR> xnoremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR> sunmap <buffer> ][ noremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR> xnoremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR> sunmap <buffer> [[ noremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR> xnoremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR> sunmap <buffer> [] let b:undo_ftplugin .= ' | silent! execute "unmap <buffer> ]]"' \ . ' | silent! execute "unmap <buffer> ]["' \ . ' | silent! execute "unmap <buffer> [["' \ . ' | silent! execute "unmap <buffer> []"' " Browse dialog filter on Windows (see ":help browsefilter") if has('gui_win32') && !exists('b:browsefilter') let b:browsefilter = "J Script Files (*.ijs)\t*.ijs\n" \ . "All Files (*.*)\t*.*\n" let b:undo_ftplugin .= ' | unlet! b:browsefilter' endif " Enhanced "%" matching (see ":help matchit") if exists('loaded_matchit') && !exists('b:match_words') let b:match_ignorecase = 0 let b:match_words = '^\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>:^\s*\:\s*$:^\s*)\s*$' \ . ',\<\%(for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.:\<\%(case\|catch[dt]\=\|else\%(if\)\=\|fcase\)\.:\<end\.' let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words' endif let &cpo = s:save_cpo unlet s:save_cpo ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/java.vim��������������������������������������������������������������0000664�0000000�0000000�00000003226�13204015742�0017762�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Java " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Change: 2012 Mar 11 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " For filename completion, prefer the .java extension over the .class " extension. set suffixes+=.class " Enable gf on import statements. Convert . in the package " name to / and append .java to the name, then search the path. setlocal includeexpr=substitute(v:fname,'\\.','/','g') setlocal suffixesadd=.java if exists("g:ftplugin_java_source_path") let &l:path=g:ftplugin_java_source_path . ',' . &l:path endif " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal formatoptions-=t formatoptions+=croql " Set 'comments' to format dashed lists in comments. Behaves just like C. setlocal comments& comments^=sO:*\ -,mO:*\ \ ,exO:*/ setlocal commentstring=//%s " Change the :browse e filter to primarily show Java-related files. if has("gui_win32") let b:browsefilter="Java Files (*.java)\t*.java\n" . \ "Properties Files (*.prop*)\t*.prop*\n" . \ "Manifest Files (*.mf)\t*.mf\n" . \ "All Files (*.*)\t*.*\n" endif " Undo the stuff we changed. let b:undo_ftplugin = "setlocal suffixes< suffixesadd<" . \ " formatoptions< comments< commentstring< path< includeexpr<" . \ " | unlet! b:browsefilter" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/javascript.vim��������������������������������������������������������0000664�0000000�0000000�00000002027�13204015742�0021205�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Javascript " Maintainer: Doug Kearns <dougkearns@gmail.com> " Last Change: 2008 Jun 15 " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/ftplugin/javascript.vim if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo-=C " Set 'formatoptions' to break comment lines but not other lines, " " and insert the comment leader when hitting <CR> or using "o". setlocal formatoptions-=t formatoptions+=croql " Set completion with CTRL-X CTRL-O to autoloaded function. if exists('&ofu') setlocal omnifunc=javascriptcomplete#CompleteJS endif " Set 'comments' to format dashed lists in comments. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// setlocal commentstring=//%s " Change the :browse e filter to primarily show Java-related files. if has("gui_win32") let b:browsefilter="Javascript Files (*.js)\t*.js\n" . \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setl fo< ofu< com< cms<" let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/jproperties.vim�������������������������������������������������������0000664�0000000�0000000�00000000501�13204015742�0021400�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Java properties file " Maintainer: David Bürgin <676c7473@gmail.com> " Last Change: 2013-11-19 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 setlocal formatoptions-=t setlocal comments=:#,:! setlocal commentstring=#\ %s let b:undo_ftplugin = "setl cms< com< fo<" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/json.vim��������������������������������������������������������������0000664�0000000�0000000�00000000550�13204015742�0020007�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: JSON " Maintainer: David Barnett <daviebdawg+vim@gmail.com> " Last Change: 2014 Jul 16 if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = 'setlocal formatoptions< comments< commentstring<' setlocal formatoptions-=t " JSON has no comments. setlocal comments= setlocal commentstring= ��������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/jsp.vim���������������������������������������������������������������0000664�0000000�0000000�00000003733�13204015742�0017640�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: jsp " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "Java Files (*.java)\t*.java\n" . \ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" . \ "All Files (*.*)\t*.*\n" let s:match_words = "" runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim unlet b:did_ftplugin " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin unlet b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter unlet b:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words unlet b:match_words endif runtime! ftplugin/java.vim ftplugin/java_*.vim ftplugin/java/*.vim let b:did_ftplugin = 1 " Combine the new set of values with those previously included. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin endif if exists ("b:browsefilter") let s:browsefilter = b:browsefilter . s:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words . ',' . s:match_words endif " Load the combined list of match_words for matchit.vim if exists("loaded_matchit") let b:match_words = s:match_words endif " Change the :browse e filter to primarily show JSP-related files. if has("gui_win32") let b:browsefilter="JSP Files (*.jsp)\t*.jsp\n" . s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo �������������������������������������neovim-0.2.2/runtime/ftplugin/kconfig.vim�����������������������������������������������������������0000664�0000000�0000000�00000001277�13204015742�0020465�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Vim syntax file " Maintainer: Christian Brabandt <cb@256bit.org> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2015-05-29 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-kconfig if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql " For matchit.vim if exists("loaded_matchit") let b:match_words = '^\<menu\>:\<endmenu\>,^\<if\>:\<endif\>,^\<choice\>:\<endchoice\>' endif let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/kwt.vim���������������������������������������������������������������0000664�0000000�0000000�00000001523�13204015742�0017644�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Kimwitu++ " Maintainer: Michael Piefel <entwurf@piefel.de> " Last Change: 10 March 2012 " Behaves almost like C++ runtime! ftplugin/cpp.vim ftplugin/cpp_*.vim ftplugin/cpp/*.vim let s:cpo_save = &cpo set cpo&vim " Limit the browser to related files if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Kimwitu/Kimwitu++ Files (*.k)\t*.k\n" . \ "Lex/Flex Files (*.l)\t*.l\n" . \ "Yacc/Bison Files (*.y)\t*.y\n" . \ "All Files (*.*)\t*.*\n" endif " Set the errorformat for the Kimwitu++ compiler set efm+=kc%.%#:\ error\ at\ %f:%l:\ %m if exists("b:undo_ftplugin") let b:undo_ftplugin = b:undo_ftplugin . " | setlocal efm<" \ . "| unlet! b:browsefiler" else let b:undo_ftplugin = "setlocal efm<" \ . "| unlet! b:browsefiler" endif let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/ld.vim����������������������������������������������������������������0000664�0000000�0000000�00000000726�13204015742�0017442�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: ld(1) script " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*%s*/ include=^\\s*INCLUDE setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������neovim-0.2.2/runtime/ftplugin/less.vim��������������������������������������������������������������0000664�0000000�0000000�00000000766�13204015742�0020015�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: less " Maintainer: Alessandro Vioni <jenoma@gmail.com> " URL: https://github.com/genoma/vim-less " Last Change: 2014 November 24 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl cms< def< inc< inex< ofu< sua<" setlocal formatoptions-=t formatoptions+=croql setlocal comments=:// commentstring=//\ %s setlocal omnifunc=csscomplete#CompleteCSS setlocal suffixesadd=.less ����������neovim-0.2.2/runtime/ftplugin/lftp.vim��������������������������������������������������������������0000664�0000000�0000000�00000000662�13204015742�0020007�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: lftp(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/libao.vim�������������������������������������������������������������0000664�0000000�0000000�00000000670�13204015742�0020127�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: libao.conf(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/limits.vim������������������������������������������������������������0000664�0000000�0000000�00000000664�13204015742�0020345�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: limits(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/liquid.vim������������������������������������������������������������0000664�0000000�0000000�00000003551�13204015742�0020331�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Liquid " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2010 May 21 if exists('b:did_ftplugin') finish endif if !exists('g:liquid_default_subtype') let g:liquid_default_subtype = 'html' endif if !exists('b:liquid_subtype') let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:liquid_subtype = matchstr(s:lines,'liquid_subtype=\zs\w\+') if b:liquid_subtype == '' let b:liquid_subtype = matchstr(&filetype,'^liquid\.\zs\w\+') endif if b:liquid_subtype == '' let b:liquid_subtype = matchstr(substitute(expand('%:t'),'\c\%(\.liquid\)\+$','',''),'\.\zs\w\+$') endif if b:liquid_subtype == '' let b:liquid_subtype = g:liquid_default_subtype endif endif if exists('b:liquid_subtype') && b:liquid_subtype != '' exe 'runtime! ftplugin/'.b:liquid_subtype.'.vim ftplugin/'.b:liquid_subtype.'_*.vim ftplugin/'.b:liquid_subtype.'/*.vim' else runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim endif let b:did_ftplugin = 1 if exists('b:undo_ftplugin') let b:undo_ftplugin .= '|' else let b:undo_ftplugin = '' endif if exists('b:browsefilter') let b:browsefilter = "\n".b:browsefilter else let b:browsefilter = '' endif if exists('b:match_words') let b:match_words .= ',' elseif exists('loaded_matchit') let b:match_words = '' endif if has('gui_win32') let b:browsefilter="Liquid Files (*.liquid)\t*.liquid" . b:browsefilter endif if exists('loaded_matchit') let b:match_words .= '\<\%(if\w*\|unless\|case\)\>:\<\%(elsif\|else\|when\)\>:\<end\%(if\w*\|unless\|case\)\>,\<\%(for\|tablerow\)\>:\%({%\s*\)\@<=empty\>:\<end\%(for\|tablerow\)\>,<\(capture\|comment\|highlight\)\>:\<end\1\>' endif setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %} let b:undo_ftplugin .= 'setl cms< | unlet! b:browsefilter b:match_words' �������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/lisp.vim��������������������������������������������������������������0000664�0000000�0000000�00000001401�13204015742�0020001�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Lisp " Maintainer: Sergey Khorev <sergey.khorev@gmail.com> " URL: http://sites.google.com/site/khorser/opensource/vim " Original author: Dorai Sitaram <ds26@gte.com> " Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html " Last Change: Oct 23, 2013 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 setl comments=:; setl define=^\\s*(def\\k* setl formatoptions-=t setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94 setl lisp setl commentstring=;%s setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|# let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/logcheck.vim����������������������������������������������������������0000664�0000000�0000000�00000000764�13204015742�0020624�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Logcheck " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Last Change: 2012 Jan 15 " License: Vim License " URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/logcheck.vim if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl fo<" " Do not hard-wrap non-comment lines since each line is a self-contained " regular expression setlocal formatoptions-=t ������������neovim-0.2.2/runtime/ftplugin/loginaccess.vim�������������������������������������������������������0000664�0000000�0000000�00000000672�13204015742�0021335�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: login.access(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/logindefs.vim���������������������������������������������������������0000664�0000000�0000000�00000000670�13204015742�0021013�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: login.defs(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/logtalk.dict����������������������������������������������������������0000664�0000000�0000000�00000003376�13204015742�0020634�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������encoding calls category dynamic end_category end_object end_protocol info initialization object protocol synchronized threaded uses alias discontiguous meta_predicate mode op private protected public current_object current_protocol current_category object_property protocol_property category_property create_object create_protocol create_category abolish_object abolish_protocol abolish_category complements complements_object extends extends_object extends_protocol extends_category implements implements_protocol imports imports_category instantiates instantiates_class specializes specializes_class abolish_events current_event define_events logtalk_load logtalk_compile logtalk_library_path current_logtalk_flag set_logtalk_flag threaded_call threaded_once threaded_ignore threaded_exit threaded_peek threaded_wait threaded_notify self this sender parameter before after phrase expand_term goal_expansion term_expansion true fail call catch throw unify_with_occurs_check var atom integer float atomic compound nonvar number arg copy_term functor current_predicate predicate_property abolish assertz asserta clause retract retractall bagof findall forall setof current_input current_output set_input set_output open close flush_output stream_property at_end_of_stream set_stream_position get_char get_code peek_char peek_code put_char put_code nl get_byte peek_byte put_byte read read_term write writeq write_canonical atom_chars atom_codes atom_concat number_chars number_codes current_op char_conversion current_char_conversion once repeat atom_length atom_concat sub_atom atom_chars atom_codes char_code number_chars number_codes set_prolog_flag current_prolog_flag halt abs atan ceiling cos exp float_fractional_part float_integer_part floor log mod rem round sign sin sqrt truncate ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/logtalk.vim�����������������������������������������������������������0000664�0000000�0000000�00000000621�13204015742�0020472�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Logtalk filetype plugin file " Language: Logtalk " Maintainer: Paulo Moura <pmoura@logtalk.org> " Latest Revision: 2007-07-06 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl ts< sw< fdm< fdc< ai< dict<" "setlocal ts=4 setlocal sw=4 setlocal fdm=syntax setlocal fdc=2 setlocal autoindent setlocal dict=$VIMRUNTIME/ftplugin/logtalk.dict ���������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/lprolog.vim�����������������������������������������������������������0000664�0000000�0000000�00000002377�13204015742�0020525�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim settings file " Language: LambdaProlog (Teyjus) " Maintainer: Markus Mottl <markus.mottl@gmail.com> " URL: http://www.ocaml.info/vim/ftplugin/lprolog.vim " Last Change: 2006 Feb 05 " 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM) " 2001 Sep 02 - initial release (MM) " Only do these settings when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't do other file type settings for this buffer let b:did_ftplugin = 1 " Error format setlocal efm=%+A./%f:%l.%c:\ %m formatprg=fmt\ -w75\ -p\\% " Formatting of comments setlocal formatprg=fmt\ -w75\ -p\\% " Add mappings, unless the user didn't want this. if !exists("no_plugin_maps") && !exists("no_lprolog_maps") " Uncommenting if !hasmapto('<Plug>Comment') nmap <buffer> <LocalLeader>c <Plug>LUncomOn vmap <buffer> <LocalLeader>c <Plug>BUncomOn nmap <buffer> <LocalLeader>C <Plug>LUncomOff vmap <buffer> <LocalLeader>C <Plug>BUncomOff endif nnoremap <buffer> <Plug>LUncomOn mz0i/* <ESC>$A */<ESC>`z nnoremap <buffer> <Plug>LUncomOff <ESC>:s/^\/\* \(.*\) \*\//\1/<CR> vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i/*<ESC>`>o<ESC>0i*/<ESC>`< vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`< endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/lua.vim���������������������������������������������������������������0000664�0000000�0000000�00000001715�13204015742�0017623�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file. " Language: Lua 4.0+ " Maintainer: Max Ischenko <mfi@ukr.net> " Last Change: 2012 Mar 07 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim " Set 'formatoptions' to break comment lines but not other lines, and insert " the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql setlocal com=:-- setlocal cms=--%s setlocal suffixesadd=.lua " The following lines enable the macros/matchit.vim plugin for " extended matching with the % key. if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = \ '\<\%(do\|function\|if\)\>:' . \ '\<\%(return\|else\|elseif\)\>:' . \ '\<end\>,' . \ '\<repeat\>:\<until\>' endif " exists("loaded_matchit") let &cpo = s:cpo_save unlet s:cpo_save let b:undo_ftplugin = "setlocal fo< com< cms< suffixesadd<" ���������������������������������������������������neovim-0.2.2/runtime/ftplugin/m4.vim����������������������������������������������������������������0000664�0000000�0000000�00000000652�13204015742�0017361�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: m4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:#,:dnl commentstring=dnl\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/mail.vim��������������������������������������������������������������0000664�0000000�0000000�00000002123�13204015742�0017756�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Mail " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2012 Nov 20 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl modeline< tw< fo< comments<" " Don't use modelines in e-mail messages, avoid trojan horses and nasty " "jokes" (e.g., setting 'textwidth' to 5). setlocal nomodeline " many people recommend keeping e-mail messages 72 chars wide if &tw == 0 setlocal tw=72 endif " Set 'formatoptions' to break text lines and keep the comment leader ">". setlocal fo+=tcql " Add n:> to 'comments, in case it was removed elsewhere setlocal comments+=n:> " Add mappings, unless the user doesn't want this. if !exists("no_plugin_maps") && !exists("no_mail_maps") " Quote text by inserting "> " if !hasmapto('<Plug>MailQuote') vmap <buffer> <LocalLeader>q <Plug>MailQuote nmap <buffer> <LocalLeader>q <Plug>MailQuote endif vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR>:noh<CR>`` nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR>:noh<CR>`` endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/mailaliases.vim�������������������������������������������������������0000664�0000000�0000000�00000000577�13204015742�0021333�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/mailcap.vim�����������������������������������������������������������0000664�0000000�0000000�00000000662�13204015742�0020450�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Mailcap configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/make.vim��������������������������������������������������������������0000664�0000000�0000000�00000001647�13204015742�0017763�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Make " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2013 Apr 22 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl et< sts< fo< com< cms< inc<" " Make sure a hard tab is used, required for most make programs setlocal noexpandtab softtabstop=0 " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Set 'comments' to format dashed lists in comments setlocal com=sO:#\ -,mO:#\ \ ,b:# " Set 'commentstring' to put the marker after a #. setlocal commentstring=#\ %s " Including files. let &l:include = '^\s*include' " For matchit.vim, suggested by Albert Netymk. if exists("loaded_matchit") let b:match_words = '\<if\(n\)\=\(eq\|def\)\>:\<else\>:\<endif\>,\<define\>:\<endef\>' endif �����������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/man.vim���������������������������������������������������������������0000664�0000000�0000000�00000002312�13204015742�0017607�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Anmol Sethi <anmol@aubble.com> " Previous Maintainer: SungHyun Nam <goweol@gmail.com> if exists('b:did_ftplugin') || &filetype !=# 'man' finish endif let b:did_ftplugin = 1 let s:pager = !exists('b:man_sect') if s:pager call man#init_pager() endif setlocal buftype=nofile setlocal noswapfile setlocal bufhidden=hide setlocal nomodified setlocal readonly setlocal nomodifiable setlocal noexpandtab setlocal tabstop=8 setlocal softtabstop=8 setlocal shiftwidth=8 setlocal nonumber setlocal norelativenumber setlocal foldcolumn=0 setlocal colorcolumn=0 setlocal nolist setlocal nofoldenable if !exists('g:no_plugin_maps') && !exists('g:no_man_maps') nnoremap <silent> <buffer> gO :call man#show_toc()<CR> nnoremap <silent> <buffer> <C-]> :Man<CR> nnoremap <silent> <buffer> K :Man<CR> nnoremap <silent> <buffer> <C-T> :call man#pop_tag()<CR> if s:pager nnoremap <silent> <buffer> <nowait> q :lclose<CR>:q<CR> else nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>c endif endif if get(g:, 'ft_man_folding_enable', 0) setlocal foldenable setlocal foldmethod=indent setlocal foldnestmax=1 endif let b:undo_ftplugin = '' " vim: set sw=2: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/manconf.vim�����������������������������������������������������������0000664�0000000�0000000�00000000674�13204015742�0020466�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: man.conf(5) - man configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/markdown.vim����������������������������������������������������������0000664�0000000�0000000�00000002231�13204015742�0020656�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Markdown " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2016 Aug 29 if exists("b:did_ftplugin") finish endif runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]: if exists('b:undo_ftplugin') let b:undo_ftplugin .= "|setl cms< com< fo< flp<" else let b:undo_ftplugin = "setl cms< com< fo< flp<" endif function! MarkdownFold() let line = getline(v:lnum) " Regular headers let depth = match(line, '\(^#\+\)\@<=\( .*$\)\@=') if depth > 0 return ">" . depth endif " Setext style headings let nextline = getline(v:lnum + 1) if (line =~ '^.\+$') && (nextline =~ '^=\+$') return ">1" endif if (line =~ '^.\+$') && (nextline =~ '^-\+$') return ">2" endif return "=" endfunction if has("folding") && exists("g:markdown_folding") setlocal foldexpr=MarkdownFold() setlocal foldmethod=expr let b:undo_ftplugin .= " foldexpr< foldmethod<" endif " vim:set sw=2: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/matlab.vim������������������������������������������������������������0000664�0000000�0000000�00000001362�13204015742�0020300�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: matlab " Maintainer: Jake Wasserman <jwasserman at gmail dot com> " Last Changed: 2014 Dec 30 " Contributors: " Charles Campbell if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:save_cpo = &cpo set cpo-=C if exists("loaded_matchit") let s:conditionalEnd = '\%(([^()]*\)\@!\<end\>\%([^()]*)\)\@!' let b:match_words= \ '\<\%(if\|switch\|for\|while\)\>:\<\%(elseif\|case\|break\|continue\|else\|otherwise\)\>:'.s:conditionalEnd.','. \ '\<function\>:\<return\>:\<endfunction\>' unlet s:conditionalEnd endif setlocal suffixesadd=.m setlocal suffixes+=.asv let b:undo_ftplugin = "setlocal suffixesadd< suffixes< " \ . "| unlet! b:match_words" let &cpo = s:save_cpo unlet s:save_cpo ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/mf.vim����������������������������������������������������������������0000664�0000000�0000000�00000006261�13204015742�0017445�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: METAFONT " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> " Former Maintainers: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2016 Oct 2 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo< sua< inc< def< ofu<" \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=cjroql2 setlocal suffixesadd=.mf let &l:include = '\<input\>' let &l:define = '\<\%(let\|newinternal\|interim\|def\|vardef\)\>\|\<\%(primary\|secondary\|tertiary\)def\>\s*[^ .]\+' setlocal omnifunc=syntaxcomplete#Complete let g:omni_syntax_group_include_mf = 'mf\w\+' let g:omni_syntax_group_exclude_mf = 'mfTodoComment' let s:mp_regex = { \ 'beginsection' : '^\s*\%(\%(\|var\|primary\|secondary\|tertiary\)def\|beginchar\|beginlogochar\)\>', \ 'endsection' : '^\s*\%(enddef\|endchar\)\>', \ 'beginblock' : '^\s*\%(begingroup\|if\|for\%(\|suffixes\|ever\)\)\>', \ 'endblock' : '^\s*\%(endgroup\|fi\|endfor\)\>' \ } function! s:move_around(count, what, flags, visual) if a:visual exe "normal! gv" endif call search(s:mp_regex[a:what], a:flags.'s') " 's' sets previous context mark call map(range(2, a:count), 'search(s:mp_regex[a:what], a:flags)') endfunction " Move around macros. nnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:false) <CR> vnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:true) <CR> nnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:false) <CR> vnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:true) <CR> nnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:false) <CR> vnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:true) <CR> nnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:false) <CR> vnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:true) <CR> nnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:false) <CR> vnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:true) <CR> nnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:false) <CR> vnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:true) <CR> if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = \ '\<if\>:\<else\%[if]\>:\<fi\>,' . \ '\<for\%(\|suffixes\|ever\)\>:\<exit\%(if\|unless\)\>:\<endfor\>,' . \ '\<\%(\|var\|primary\|secondary\|tertiary\)def\>:\<enddef\>,' . \ '\<begingroup\>:\<endgroup\>,' . \ '\<begin\%(logo\)\?char\>:\<endchar\>' " Ignore comments and strings let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name") \ =~# "mf\\(Comment\\|String\\)$"' endif let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/modconf.vim�����������������������������������������������������������0000664�0000000�0000000�00000000735�13204015742�0020470�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: modules.conf(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*include setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������neovim-0.2.2/runtime/ftplugin/mp.vim����������������������������������������������������������������0000664�0000000�0000000�00000007200�13204015742�0017451�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: MetaPost " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> " Former Maintainers: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2016 Oct 2 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo< sua< inc< def< ofu<" \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=cjroql2 setlocal suffixesadd=.mp,.mpiv let &l:include = '\<\%(input\|loadmodule\)\>' " loadmodule is in MetaFun let &l:define = '\<\%(let\|newinternal\|interim\|def\|vardef\)\>\|\<\%(primary\|secondary\|tertiary\)def\>\s*[^ .]\+' setlocal omnifunc=syntaxcomplete#Complete let g:omni_syntax_group_include_mp = 'mf\w\+,mp\w\+' let g:omni_syntax_group_exclude_mp = 'mfTodoComment' if exists(":FixBeginfigs") != 2 command -nargs=0 FixBeginfigs call s:fix_beginfigs() function! s:fix_beginfigs() let i = 1 g/^beginfig(\d*);$/s//\='beginfig('.i.');'/ | let i = i + 1 endfunction endif let s:mp_regex = { \ 'beginsection' : '^\s*\%(\%(\|var\|primary\|secondary\|tertiary\)def\|begin\%(fig\|char\|logochar\|glyph\|graph\)\)\>', \ 'endsection' : '^\s*\%(enddef\|end\%(fig\|char\|glyph\|graph\)\)\>', \ 'beginblock' : '^\s*\%(begingroup\|if\|for\%(\|suffixes\|ever\)\)\>', \ 'endblock' : '^\s*\%(endgroup\|fi\|endfor\)\>' \ } function! s:move_around(count, what, flags, visual) if a:visual exe "normal! gv" endif call search(s:mp_regex[a:what], a:flags.'s') " 's' sets previous context mark call map(range(2, a:count), 'search(s:mp_regex[a:what], a:flags)') endfunction " Move around macros. nnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:false) <CR> vnoremap <silent><buffer> [[ :<C-U>call <SID>move_around(v:count1, "beginsection", "bW", v:true) <CR> nnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:false) <CR> vnoremap <silent><buffer> ]] :<C-U>call <SID>move_around(v:count1, "beginsection", "W", v:true) <CR> nnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:false) <CR> vnoremap <silent><buffer> [] :<C-U>call <SID>move_around(v:count1, "endsection", "bW", v:true) <CR> nnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:false) <CR> vnoremap <silent><buffer> ][ :<C-U>call <SID>move_around(v:count1, "endsection", "W", v:true) <CR> nnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:false) <CR> vnoremap <silent><buffer> [{ :<C-U>call <SID>move_around(v:count1, "beginblock", "bW", v:true) <CR> nnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:false) <CR> vnoremap <silent><buffer> ]} :<C-U>call <SID>move_around(v:count1, "endblock", "W", v:true) <CR> if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = \ '\<if\>:\<else\%[if]\>:\<fi\>,' . \ '\<for\%(\|suffixes\|ever\)\>:\<exit\%(if\|unless\)\>:\<endfor\>,' . \ '\<\%(\|var\|primary\|secondary\|tertiary\)def\>:\<enddef\>,' . \ '\<beginfig\>:\<endfig\>,' . \ '\<begingroup\>:\<endgroup\>,' . \ '\<begin\%(logo\)\?char\>:\<endchar\>,' . \ '\<beginglyph\>:\<endglyph\>,' . \ '\<begingraph\>:\<endgraph\>' " Ignore comments and strings let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name") \ =~# "^mf\\%(Comment\\|String\\|\\)$\\|^mpTeXinsert$"' endif let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/mplayerconf.vim�������������������������������������������������������0000664�0000000�0000000�00000000730�13204015742�0021355�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: mplayer(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*include setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������neovim-0.2.2/runtime/ftplugin/mrxvtrc.vim�����������������������������������������������������������0000664�0000000�0000000�00000001436�13204015742�0020547�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Created : Wed 26 Apr 2006 01:20:53 AM CDT " Modified : Fri 28 Apr 2006 03:24:01 AM CDT " Author : Gautam Iyer <gi1242@users.sourceforge.net> " Description : ftplugin for mrxvtrc if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< fo<" " Really any line that does not match an option is a comment. But use '!' for " compatibility with x-defaults files, and "#" (preferred) for compatibility " with all other config files. " " Comments beginning with "#" are preferred because Vim will not flag the " first word as a spelling error if it is not capitalised. The '!' used as " comment leaders makes Vim think that every comment line is a new sentence. setlocal comments=:!,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/msmessages.vim��������������������������������������������������������0000664�0000000�0000000�00000002165�13204015742�0021211�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: MS Message files (*.mc) " Maintainer: Kevin Locke <kwl7@cornell.edu> " Last Change: 2008 April 09 " Location: http://kevinlocke.name/programs/vim/syntax/msmessages.vim " Based on c.vim " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Using line continuation here. let s:cpo_save = &cpo set cpo-=C let b:undo_ftplugin = "setl fo< com< cms< | unlet! b:browsefilter" " Set 'formatoptions' to format all lines, including comments setlocal fo-=ct fo+=roql " Comments includes both ";" which describes a "comment" which will be " converted to C code and variants on "; //" which will remain comments " in the generated C code setlocal comments=:;,:;//,:;\ //,s:;\ /*\ ,m:;\ \ *\ ,e:;\ \ */ setlocal commentstring=;\ //\ %s " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "MS Message Files (*.mc)\t*.mc\n" . \ "Resource Files (*.rc)\t*.rc\n" . \ "All Files (*.*)\t*.*\n" endif let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/muttrc.vim������������������������������������������������������������0000664�0000000�0000000�00000000723�13204015742�0020356�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: mutt RC File " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &l:include = '^\s*source\>' let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������neovim-0.2.2/runtime/ftplugin/nanorc.vim������������������������������������������������������������0000664�0000000�0000000�00000000677�13204015742�0020330�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: nanorc(5) - GNU nano configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/neomuttrc.vim���������������������������������������������������������0000664�0000000�0000000�00000001024�13204015742�0021053�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: NeoMutt RC File " Previous Maintainer: Guillaume Brogi <gui-gui@netcourrier.com> " Latest Revision: 2017-09-17 " Original version copied from ftplugin/muttrc.vim if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &l:include = '^\s*source\>' let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/netrc.vim�������������������������������������������������������������0000664�0000000�0000000�00000000654�13204015742�0020156�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: netrc(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/nsis.vim��������������������������������������������������������������0000664�0000000�0000000�00000001065�13204015742�0020014�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim ftplugin file " Language: NSIS script " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 let s:cpo_save = &cpo set cpo&vim if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< fo< def< inc<" setlocal comments=s1:/*,mb:*,ex:*/,b:#,:; commentstring=;\ %s setlocal formatoptions-=t formatoptions+=croql setlocal define=^\\s*!define\\%(\\%(utc\\)\\=date\\|math\\)\\= setlocal include=^\\s*!include\\%(/NONFATAL\\)\\= let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/objc.vim��������������������������������������������������������������0000664�0000000�0000000�00000000450�13204015742�0017752�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Objective C " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2003 Jan 15 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Behaves just like C runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/ocaml.vim�������������������������������������������������������������0000664�0000000�0000000�00000055001�13204015742�0020132�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Language: OCaml " Maintainer: David Baelde <firstname.name@ens-lyon.org> " Mike Leary <leary@nwlink.com> " Markus Mottl <markus.mottl@gmail.com> " Pierre Vittet <pierre-vittet@pvittet.com> " Stefano Zacchiroli <zack@bononia.it> " Vincent Aravantinos <firstname.name@imag.fr> " URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim " Last Change: " 2013 Jul 26 - load default compiler settings (MM) " 2013 Jul 24 - removed superfluous efm-setting (MM) " 2013 Jul 22 - applied fixes supplied by Hirotaka Hamada (MM) " 2013 Mar 15 - Improved error format (MM) if exists("b:did_ftplugin") finish endif let b:did_ftplugin=1 " Use standard compiler settings unless user wants otherwise if !exists("current_compiler") :compiler ocaml endif " some macro if exists('*fnameescape') function! s:Fnameescape(s) return fnameescape(a:s) endfun else function! s:Fnameescape(s) return escape(a:s," \t\n*?[{`$\\%#'\"|!<") endfun endif " Error handling -- helps moving where the compiler wants you to go let s:cposet=&cpoptions set cpo&vim " Add mappings, unless the user didn't want this. if !exists("no_plugin_maps") && !exists("no_ocaml_maps") " (un)commenting if !hasmapto('<Plug>Comment') nmap <buffer> <LocalLeader>c <Plug>LUncomOn xmap <buffer> <LocalLeader>c <Plug>BUncomOn nmap <buffer> <LocalLeader>C <Plug>LUncomOff xmap <buffer> <LocalLeader>C <Plug>BUncomOff endif nnoremap <buffer> <Plug>LUncomOn gI(* <End> *)<ESC> nnoremap <buffer> <Plug>LUncomOff :s/^(\* \(.*\) \*)/\1/<CR>:noh<CR> xnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i(*<ESC>`>o<ESC>0i*)<ESC>`< xnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`< nmap <buffer> <LocalLeader>s <Plug>OCamlSwitchEdit nmap <buffer> <LocalLeader>S <Plug>OCamlSwitchNewWin nmap <buffer> <LocalLeader>t <Plug>OCamlPrintType xmap <buffer> <LocalLeader>t <Plug>OCamlPrintType endif " Let % jump between structure elements (due to Issac Trotts) let b:mw = '' let b:mw = b:mw . ',\<let\>:\<and\>:\(\<in\>\|;;\)' let b:mw = b:mw . ',\<if\>:\<then\>:\<else\>' let b:mw = b:mw . ',\<\(for\|while\)\>:\<do\>:\<done\>,' let b:mw = b:mw . ',\<\(object\|sig\|struct\|begin\)\>:\<end\>' let b:mw = b:mw . ',\<\(match\|try\)\>:\<with\>' let b:match_words = b:mw let b:match_ignorecase=0 " switching between interfaces (.mli) and implementations (.ml) if !exists("g:did_ocaml_switch") let g:did_ocaml_switch = 1 nnoremap <Plug>OCamlSwitchEdit :<C-u>call OCaml_switch(0)<CR> nnoremap <Plug>OCamlSwitchNewWin :<C-u>call OCaml_switch(1)<CR> fun OCaml_switch(newwin) if (match(bufname(""), "\\.mli$") >= 0) let fname = s:Fnameescape(substitute(bufname(""), "\\.mli$", ".ml", "")) if (a:newwin == 1) exec "new " . fname else exec "arge " . fname endif elseif (match(bufname(""), "\\.ml$") >= 0) let fname = s:Fnameescape(bufname("")) . "i" if (a:newwin == 1) exec "new " . fname else exec "arge " . fname endif endif endfun endif " Folding support " Get the modeline because folding depends on indentation let s:s = line2byte(line('.'))+col('.')-1 if search('^\s*(\*:o\?caml:') let s:modeline = getline(".") else let s:modeline = "" endif if s:s > 0 exe 'goto' s:s endif " Get the indentation params let s:m = matchstr(s:modeline,'default\s*=\s*\d\+') if s:m != "" let s:idef = matchstr(s:m,'\d\+') elseif exists("g:omlet_indent") let s:idef = g:omlet_indent else let s:idef = 2 endif let s:m = matchstr(s:modeline,'struct\s*=\s*\d\+') if s:m != "" let s:i = matchstr(s:m,'\d\+') elseif exists("g:omlet_indent_struct") let s:i = g:omlet_indent_struct else let s:i = s:idef endif " Set the folding method if exists("g:ocaml_folding") setlocal foldmethod=expr setlocal foldexpr=OMLetFoldLevel(v:lnum) endif let b:undo_ftplugin = "setlocal efm< foldmethod< foldexpr<" \ . "| unlet! b:mw b:match_words b:match_ignorecase" " - Only definitions below, executed once ------------------------------------- if exists("*OMLetFoldLevel") finish endif function s:topindent(lnum) let l = a:lnum while l > 0 if getline(l) =~ '\s*\%(\<struct\>\|\<sig\>\|\<object\>\)' return indent(l) endif let l = l-1 endwhile return -s:i endfunction function OMLetFoldLevel(l) " This is for not merging blank lines around folds to them if getline(a:l) !~ '\S' return -1 endif " We start folds for modules, classes, and every toplevel definition if getline(a:l) =~ '^\s*\%(\<val\>\|\<module\>\|\<class\>\|\<type\>\|\<method\>\|\<initializer\>\|\<inherit\>\|\<exception\>\|\<external\>\)' exe 'return ">' (indent(a:l)/s:i)+1 '"' endif " Toplevel let are detected thanks to the indentation if getline(a:l) =~ '^\s*let\>' && indent(a:l) == s:i+s:topindent(a:l) exe 'return ">' (indent(a:l)/s:i)+1 '"' endif " We close fold on end which are associated to struct, sig or object. " We use syntax information to do that. if getline(a:l) =~ '^\s*end\>' && synIDattr(synID(a:l, indent(a:l)+1, 0), "name") != "ocamlKeyword" return (indent(a:l)/s:i)+1 endif " Folds end on ;; if getline(a:l) =~ '^\s*;;' exe 'return "<' (indent(a:l)/s:i)+1 '"' endif " Comments around folds aren't merged to them. if synIDattr(synID(a:l, indent(a:l)+1, 0), "name") == "ocamlComment" return -1 endif return '=' endfunction " Vim support for OCaml .annot files " " Last Change: 2007 Jul 17 " Maintainer: Vincent Aravantinos <vincent.aravantinos@gmail.com> " License: public domain " " Originally inspired by 'ocaml-dtypes.vim' by Stefano Zacchiroli. " The source code is quite radically different for we not use python anymore. " However this plugin should have the exact same behaviour, that's why the " following lines are the quite exact copy of Stefano's original plugin : " " << " Executing Ocaml_print_type(<mode>) function will display in the Vim bottom " line(s) the type of an ocaml value getting it from the corresponding .annot " file (if any). If Vim is in visual mode, <mode> should be "visual" and the " selected ocaml value correspond to the highlighted text, otherwise (<mode> " can be anything else) it corresponds to the literal found at the current " cursor position. " " Typing '<LocalLeader>t' (LocalLeader defaults to '\', see :h LocalLeader) " will cause " Ocaml_print_type function to be invoked with the right " argument depending on the current mode (visual or not). " >> " " If you find something not matching this behaviour, please signal it. " " Differences are: " - no need for python support " + plus : more portable " + minus: no more lazy parsing, it looks very fast however " " - ocamlbuild support, ie. " + the plugin finds the _build directory and looks for the " corresponding file inside; " + if the user decides to change the name of the _build directory thanks " to the '-build-dir' option of ocamlbuild, the plugin will manage in " most cases to find it out (most cases = if the source file has a unique " name among your whole project); " + if ocamlbuild is not used, the usual behaviour holds; ie. the .annot " file should be in the same directory as the source file; " + for vim plugin programmers: " the variable 'b:_build_dir' contains the inferred path to the build " directory, even if this one is not named '_build'. " " Bonus : " - latin1 accents are handled " - lists are handled, even on multiple lines, you don't need the visual mode " (the cursor must be on the first bracket) " - parenthesized expressions, arrays, and structures (ie. '(...)', '[|...|]', " and '{...}') are handled the same way " Copied from Stefano's original plugin : " << " .annot ocaml file representation " " File format (copied verbatim from caml-types.el) " " file ::= block * " block ::= position <SP> position <LF> annotation * " position ::= filename <SP> num <SP> num <SP> num " annotation ::= keyword open-paren <LF> <SP> <SP> data <LF> close-paren " " <SP> is a space character (ASCII 0x20) " <LF> is a line-feed character (ASCII 0x0A) " num is a sequence of decimal digits " filename is a string with the lexical conventions of O'Caml " open-paren is an open parenthesis (ASCII 0x28) " close-paren is a closed parenthesis (ASCII 0x29) " data is any sequence of characters where <LF> is always followed by " at least two space characters. " " - in each block, the two positions are respectively the start and the " end of the range described by the block. " - in a position, the filename is the name of the file, the first num " is the line number, the second num is the offset of the beginning " of the line, the third num is the offset of the position itself. " - the char number within the line is the difference between the third " and second nums. " " For the moment, the only possible keyword is \"type\"." " >> " 1. Finding the annotation file even if we use ocamlbuild " In: two strings representing paths " Out: one string representing the common prefix between the two paths function! s:Find_common_path (p1,p2) let temp = a:p2 while matchstr(a:p1,temp) == '' let temp = substitute(temp,'/[^/]*$','','') endwhile return temp endfun " After call: " " Following information have been put in s:annot_file_list, using " annot_file_name name as key: " - annot_file_path : " path to the .annot file corresponding to the " source file (dealing with ocamlbuild stuff) " - _build_path: " path to the build directory even if this one is " not named '_build' " - date_of_last annot: " Set to 0 until we load the file. It contains the " date at which the file has been loaded. function! s:Locate_annotation() let annot_file_name = s:Fnameescape(expand('%:t:r')).'.annot' if !exists ("s:annot_file_list[annot_file_name]") silent exe 'cd' s:Fnameescape(expand('%:p:h')) " 1st case : the annot file is in the same directory as the buffer (no ocamlbuild) let annot_file_path = findfile(annot_file_name,'.') if annot_file_path != '' let annot_file_path = getcwd().'/'.annot_file_path let _build_path = '' else " 2nd case : the buffer and the _build directory are in the same directory " .. " / \ " / \ " _build .ml " let _build_path = finddir('_build','.') if _build_path != '' let _build_path = getcwd().'/'._build_path let annot_file_path = findfile(annot_file_name,'_build') if annot_file_path != '' let annot_file_path = getcwd().'/'.annot_file_path endif else " 3rd case : the _build directory is in a directory higher in the file hierarchy " (it can't be deeper by ocamlbuild requirements) " .. " / \ " / \ " _build ... " \ " \ " .ml " let _build_path = finddir('_build',';') if _build_path != '' let project_path = substitute(_build_path,'/_build$','','') let path_relative_to_project = s:Fnameescape(substitute(expand('%:p:h'),project_path.'/','','')) let annot_file_path = findfile(annot_file_name,project_path.'/_build/'.path_relative_to_project) else let annot_file_path = findfile(annot_file_name,'**') "4th case : what if the user decided to change the name of the _build directory ? " -> we relax the constraints, it should work in most cases if annot_file_path != '' " 4a. we suppose the renamed _build directory is in the current directory let _build_path = matchstr(annot_file_path,'^[^/]*') if annot_file_path != '' let annot_file_path = getcwd().'/'.annot_file_path let _build_path = getcwd().'/'._build_path endif else let annot_file_name = '' "(Pierre Vittet: I have commented 4b because this was chrashing "my vim (it produced infinite loop)) " " 4b. anarchy : the renamed _build directory may be higher in the hierarchy " this will work if the file for which we are looking annotations has a unique name in the whole project " if this is not the case, it may still work, but no warranty here "let annot_file_path = findfile(annot_file_name,'**;') "let project_path = s:Find_common_path(annot_file_path,expand('%:p:h')) "let _build_path = matchstr(annot_file_path,project_path.'/[^/]*') endif endif endif endif if annot_file_path == '' throw 'E484: no annotation file found' endif silent exe 'cd' '-' let s:annot_file_list[annot_file_name]= [annot_file_path, _build_path, 0] endif endfun " This variable contain a dictionnary of list. Each element of the dictionnary " represent an annotation system. An annotation system is a list with : " - annotation file name as it's key " - annotation file path as first element of the contained list " - build path as second element of the contained list " - annot_file_last_mod (contain the date of .annot file) as third element let s:annot_file_list = {} " 2. Finding the type information in the annotation file " a. The annotation file is opened in vim as a buffer that " should be (almost) invisible to the user. " After call: " The current buffer is now the one containing the .annot file. " We manage to keep all this hidden to the user's eye. function! s:Enter_annotation_buffer(annot_file_path) let s:current_pos = getpos('.') let s:current_hidden = &l:hidden set hidden let s:current_buf = bufname('%') if bufloaded(a:annot_file_path) silent exe 'keepj keepalt' 'buffer' s:Fnameescape(a:annot_file_path) else silent exe 'keepj keepalt' 'view' s:Fnameescape(a:annot_file_path) endif call setpos(".", [0, 0 , 0 , 0]) endfun " After call: " The original buffer has been restored in the exact same state as before. function! s:Exit_annotation_buffer() silent exe 'keepj keepalt' 'buffer' s:Fnameescape(s:current_buf) let &l:hidden = s:current_hidden call setpos('.',s:current_pos) endfun " After call: " The annot file is loaded and assigned to a buffer. " This also handles the modification date of the .annot file, eg. after a " compilation (return an updated annot_file_list). function! s:Load_annotation(annot_file_name) let annot = s:annot_file_list[a:annot_file_name] let annot_file_path = annot[0] let annot_file_last_mod = 0 if exists("annot[2]") let annot_file_last_mod = annot[2] endif if bufloaded(annot_file_path) && annot_file_last_mod < getftime(annot_file_path) " if there is a more recent file let nr = bufnr(annot_file_path) silent exe 'keepj keepalt' 'bunload' nr endif if !bufloaded(annot_file_path) call s:Enter_annotation_buffer(annot_file_path) setlocal nobuflisted setlocal bufhidden=hide setlocal noswapfile setlocal buftype=nowrite call s:Exit_annotation_buffer() let annot[2] = getftime(annot_file_path) " List updated with the new date let s:annot_file_list[a:annot_file_name] = annot endif endfun "b. 'search' and 'match' work to find the type information "In: - lin1,col1: postion of expression first char " - lin2,col2: postion of expression last char "Out: - the pattern to be looked for to find the block " Must be called in the source buffer (use of line2byte) function! s:Block_pattern(lin1,lin2,col1,col2) let start_num1 = a:lin1 let start_num2 = line2byte(a:lin1) - 1 let start_num3 = start_num2 + a:col1 let path = '"\(\\"\|[^"]\)\+"' let start_pos = path.' '.start_num1.' '.start_num2.' '.start_num3 let end_num1 = a:lin2 let end_num2 = line2byte(a:lin2) - 1 let end_num3 = end_num2 + a:col2 let end_pos = path.' '.end_num1.' '.end_num2.' '.end_num3 return '^'.start_pos.' '.end_pos."$" " rq: the '^' here is not totally correct regarding the annot file "grammar" " but currently the annotation file respects this, and it's a little bit faster with the '^'; " can be removed safely. endfun "In: (the cursor position should be at the start of an annotation) "Out: the type information " Must be called in the annotation buffer (use of search) function! s:Match_data() " rq: idem as previously, in the following, the '^' at start of patterns is not necessary keepj while search('^type($','ce',line(".")) == 0 keepj if search('^.\{-}($','e') == 0 throw "no_annotation" endif keepj if searchpair('(','',')') == 0 throw "malformed_annot_file" endif endwhile let begin = line(".") + 1 keepj if searchpair('(','',')') == 0 throw "malformed_annot_file" endif let end = line(".") - 1 return join(getline(begin,end),"\n") endfun "In: the pattern to look for in order to match the block "Out: the type information (calls s:Match_data) " Should be called in the annotation buffer function! s:Extract_type_data(block_pattern, annot_file_name) let annot_file_path = s:annot_file_list[a:annot_file_name][0] call s:Enter_annotation_buffer(annot_file_path) try if search(a:block_pattern,'e') == 0 throw "no_annotation" endif call cursor(line(".") + 1,1) let annotation = s:Match_data() finally call s:Exit_annotation_buffer() endtry return annotation endfun "c. link this stuff with what the user wants " ie. get the expression selected/under the cursor let s:ocaml_word_char = '\w|[-]|''' "In: the current mode (eg. "visual", "normal", etc.) "Out: the borders of the expression we are looking for the type function! s:Match_borders(mode) if a:mode == "visual" let cur = getpos(".") normal `< let col1 = col(".") let lin1 = line(".") normal `> let col2 = col(".") let lin2 = line(".") call cursor(cur[1],cur[2]) return [lin1,lin2,col1-1,col2] else let cursor_line = line(".") let cursor_col = col(".") let line = getline('.') if line[cursor_col-1:cursor_col] == '[|' let [lin2,col2] = searchpairpos('\[|','','|\]','n') return [cursor_line,lin2,cursor_col-1,col2+1] elseif line[cursor_col-1] == '[' let [lin2,col2] = searchpairpos('\[','','\]','n') return [cursor_line,lin2,cursor_col-1,col2] elseif line[cursor_col-1] == '(' let [lin2,col2] = searchpairpos('(','',')','n') return [cursor_line,lin2,cursor_col-1,col2] elseif line[cursor_col-1] == '{' let [lin2,col2] = searchpairpos('{','','}','n') return [cursor_line,lin2,cursor_col-1,col2] else let [lin1,col1] = searchpos('\v%('.s:ocaml_word_char.'|\.)*','ncb') let [lin2,col2] = searchpos('\v%('.s:ocaml_word_char.'|\.)*','nce') if col1 == 0 || col2 == 0 throw "no_expression" endif return [cursor_line,cursor_line,col1-1,col2] endif endif endfun "In: the current mode (eg. "visual", "normal", etc.) "Out: the type information (calls s:Extract_type_data) function! s:Get_type(mode, annot_file_name) let [lin1,lin2,col1,col2] = s:Match_borders(a:mode) return s:Extract_type_data(s:Block_pattern(lin1,lin2,col1,col2), a:annot_file_name) endfun "In: A string destined to be printed in the 'echo buffer'. It has line "break and 2 space at each line beginning. "Out: A string destined to be yanked, without space and double space. function s:unformat_ocaml_type(res) "Remove end of line. let res = substitute (a:res, "\n", "", "g" ) "remove double space let res =substitute(res , " ", " ", "g") "remove space at begining of string. let res = substitute(res, "^ *", "", "g") return res endfunction "d. main "In: the current mode (eg. "visual", "normal", etc.) "After call: the type information is displayed if !exists("*Ocaml_get_type") function Ocaml_get_type(mode) let annot_file_name = s:Fnameescape(expand('%:t:r')).'.annot' call s:Locate_annotation() call s:Load_annotation(annot_file_name) let res = s:Get_type(a:mode, annot_file_name) " Copy result in the unnamed buffer let @" = s:unformat_ocaml_type(res) return res endfun endif if !exists("*Ocaml_get_type_or_not") function Ocaml_get_type_or_not(mode) let t=reltime() try let res = Ocaml_get_type(a:mode) return res catch return "" endtry endfun endif if !exists("*Ocaml_print_type") function Ocaml_print_type(mode) if expand("%:e") == "mli" echohl ErrorMsg | echo "No annotations for interface (.mli) files" | echohl None return endif try echo Ocaml_get_type(a:mode) catch /E484:/ echohl ErrorMsg | echo "No type annotations (.annot) file found" | echohl None catch /no_expression/ echohl ErrorMsg | echo "No expression found under the cursor" | echohl None catch /no_annotation/ echohl ErrorMsg | echo "No type annotation found for the given text" | echohl None catch /malformed_annot_file/ echohl ErrorMsg | echo "Malformed .annot file" | echohl None endtry endfun endif " Maps nnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("normal")<CR> xnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("visual")<CR>`< let &cpoptions=s:cposet unlet s:cposet " vim:sw=2 fdm=indent �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/occam.vim�������������������������������������������������������������0000664�0000000�0000000�00000002421�13204015742�0020117�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: occam " Copyright: Christian Jacobsen <clj3@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk> " Maintainer: Mario Schweigler <ms44@kent.ac.uk> " Last Change: 23 April 2003 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:keepcpo= &cpo set cpo&vim "{{{ Indent settings " Set shift width for indent setlocal shiftwidth=2 " Set the tab key size to two spaces setlocal softtabstop=2 " Let tab keys always be expanded to spaces setlocal expandtab "}}} "{{{ Formatting " Break comment lines and insert comment leader in this case setlocal formatoptions-=t formatoptions+=cql setlocal comments+=:-- " Maximum length of comments is 78 setlocal textwidth=78 "}}} "{{{ File browsing filters " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "All Occam Files (*.occ *.inc)\t*.occ;*.inc\n" . \ "Occam Include Files (*.inc)\t*.inc\n" . \ "Occam Source Files (*.occ)\t*.occ\n" . \ "All Files (*.*)\t*.*\n" endif "}}} "{{{ Undo settings let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<" \ . " formatoptions< comments< textwidth<" \ . "| unlet! b:browsefiler" "}}} let &cpo = s:keepcpo unlet s:keepcpo �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/pamconf.vim�����������������������������������������������������������0000664�0000000�0000000�00000000661�13204015742�0020464�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: pam(8) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/pascal.vim������������������������������������������������������������0000664�0000000�0000000�00000001233�13204015742�0020300�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: pascal " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 11 Apr 2011 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 if exists("loaded_matchit") let b:match_ignorecase = 1 " (pascal is case-insensitive) let b:match_words = '\<\%(begin\|case\|record\|object\|try\)\>' let b:match_words .= ':\<^\s*\%(except\|finally\)\>:\<end\>' let b:match_words .= ',\<repeat\>:\<until\>' let b:match_words .= ',\<if\>:\<else\>' endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:match_words" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/passwd.vim������������������������������������������������������������0000664�0000000�0000000�00000000650�13204015742�0020340�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: passwd(5) password file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/pdf.vim���������������������������������������������������������������0000664�0000000�0000000�00000005065�13204015742�0017615�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: PDF " Maintainer: Tim Pope <vimNOSPAM@tpope.info> " Last Change: 2007 Dec 16 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 setlocal commentstring=%%s setlocal comments=:% let b:undo_ftplugin = "setlocal cms< com< | unlet! b:match_words" if exists("g:loaded_matchit") let b:match_words = '\<\%(\d\+\s\+\d\+\s\+\)obj\>:\<endobj\>,\<stream$:\<endstream\>,\<xref\>:\<trailer\>,<<:>>' endif if exists("g:no_plugin_maps") || exists("g:no_pdf_maps") || v:version < 700 finish endif if !exists("b:pdf_tagstack") let b:pdf_tagstack = [] endif let b:undo_ftplugin .= " | silent! nunmap <buffer> <C-]> | silent! nunmap <buffer> <C-T>" nnoremap <silent><buffer> <C-]> :call <SID>Tag()<CR> " Inline, so the error from an empty tag stack will be simple. nnoremap <silent><buffer> <C-T> :if len(b:pdf_tagstack) > 0 <Bar> call setpos('.',remove(b:pdf_tagstack, -1)) <Bar> else <Bar> exe "norm! \<Lt>C-T>" <Bar> endif<CR> function! s:Tag() call add(b:pdf_tagstack,getpos('.')) if getline('.') =~ '^\d\+$' && getline(line('.')-1) == 'startxref' return s:dodigits(getline('.')) elseif getline('.') =~ '/Prev\s\+\d\+\>\%(\s\+\d\)\@!' && expand("<cword>") =~ '^\d\+$' return s:dodigits(expand("<cword>")) elseif getline('.') =~ '^\d\{10\} \d\{5\} ' return s:dodigits(matchstr(getline('.'),'^\d\+')) else let line = getline(".") let lastend = 0 let pat = '\<\d\+\s\+\d\+\s\+R\>' while lastend >= 0 let beg = match(line,'\C'.pat,lastend) let end = matchend(line,'\C'.pat,lastend) if beg < col(".") && end >= col(".") return s:doobject(matchstr(line,'\C'.pat,lastend)) endif let lastend = end endwhile return s:notag() endif endfunction function! s:doobject(string) let first = matchstr(a:string,'^\s*\zs\d\+') let second = matchstr(a:string,'^\s*\d\+\s\+\zs\d\+') norm! m' if first != '' && second != '' let oldline = line('.') let oldcol = col('.') 1 if !search('^\s*'.first.'\s\+'.second.'\s\+obj\>') exe oldline exe 'norm! '.oldcol.'|' return s:notag() endif endif endfunction function! s:dodigits(digits) let digits = 0 + substitute(a:digits,'^0*','','') norm! m' if digits <= 0 norm! 1go else " Go one character before the destination and advance. This method " lands us after a newline rather than before, if that is our target. exe "goto ".(digits)."|norm! 1 " endif endfunction function! s:notag() silent! call remove(b:pdf_tagstack,-1) echohl ErrorMsg echo "E426: tag not found" echohl NONE endfunction ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/perl.vim��������������������������������������������������������������0000664�0000000�0000000�00000005442�13204015742�0020005�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Perl " Maintainer: vim-perl <vim-perl@googlegroups.com> " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2015-02-09 if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C setlocal formatoptions-=t setlocal formatoptions+=crqol setlocal keywordprg=perldoc\ -f setlocal comments=:# setlocal commentstring=#%s " Change the browse dialog on Win32 to show mainly Perl-related files if has("gui_win32") let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" . \ "Perl Modules (*.pm)\t*.pm\n" . \ "Perl Documentation Files (*.pod)\t*.pod\n" . \ "All Files (*.*)\t*.*\n" endif " Provided by Ned Konz <ned at bike-nomad dot com> "--------------------------------------------- setlocal include=\\<\\(use\\\|require\\)\\> setlocal includeexpr=substitute(substitute(substitute(v:fname,'::','/','g'),'->\*','',''),'$','.pm','') setlocal define=[^A-Za-z_] setlocal iskeyword+=: " The following line changes a global variable but is necessary to make " gf and similar commands work. Thanks to Andrew Pimlott for pointing " out the problem. If this causes a problem for you, add an " after/ftplugin/perl.vim file that contains " set isfname-=: set isfname+=: " Set this once, globally. if !exists("perlpath") if executable("perl") try if &shellxquote != '"' let perlpath = system('perl -e "print join(q/,/,@INC)"') else let perlpath = system("perl -e 'print join(q/,/,@INC)'") endif let perlpath = substitute(perlpath,',.$',',,','') catch /E145:/ let perlpath = ".,," endtry else " If we can't call perl to get its path, just default to using the " current directory and the directory of the current file. let perlpath = ".,," endif endif " Append perlpath to the existing path value, if it is set. Since we don't " use += to do it because of the commas in perlpath, we have to handle the " global / local settings, too. if &l:path == "" if &g:path == "" let &l:path=perlpath else let &l:path=&g:path.",".perlpath endif else let &l:path=&l:path.",".perlpath endif "--------------------------------------------- " Undo the stuff we changed. let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk< isf< kp< path<" . \ " | unlet! b:browsefilter" " proper matching for matchit plugin let b:match_skip = 's:comment\|string\|perlQQ\|perlShellCommand\|perlHereDoc\|perlSubstitution\|perlTranslation\|perlMatch\|perlFormatField' let b:match_words = '\<if\>:\<elsif\>:\<else\>' " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/perl6.vim�������������������������������������������������������������0000664�0000000�0000000�00000004741�13204015742�0020074�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Perl 6 " Maintainer: vim-perl <vim-perl@googlegroups.com> " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2013-07-21 " Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com> " " Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com> if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C setlocal formatoptions-=t setlocal formatoptions+=crqol setlocal keywordprg=p6doc setlocal comments=:# setlocal commentstring=#%s " Change the browse dialog on Win32 to show mainly Perl-related files if has("gui_win32") let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" . \ "Perl Modules (*.pm)\t*.pm\n" . \ "Perl Documentation Files (*.pod)\t*.pod\n" . \ "All Files (*.*)\t*.*\n" endif " Provided by Ned Konz <ned at bike-nomad dot com> "--------------------------------------------- setlocal include=\\<\\(use\\\|require\\)\\> setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','') setlocal define=[^A-Za-z_] " The following line changes a global variable but is necessary to make " gf and similar commands work. Thanks to Andrew Pimlott for pointing out " the problem. If this causes a " problem for you, add an " after/ftplugin/perl6.vim file that contains " set isfname-=: set isfname+=: setlocal iskeyword=48-57,_,A-Z,a-z,:,- " Set this once, globally. if !exists("perlpath") if executable("perl6") try if &shellxquote != '"' let perlpath = system('perl6 -e "@*INC.join(q/,/).say"') else let perlpath = system("perl6 -e '@*INC.join(q/,/).say'") endif let perlpath = substitute(perlpath,',.$',',,','') catch /E145:/ let perlpath = ".,," endtry else " If we can't call perl to get its path, just default to using the " current directory and the directory of the current file. let perlpath = ".,," endif endif let &l:path=perlpath "--------------------------------------------- " Undo the stuff we changed. let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" . \ " | unlet! b:browsefilter" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo �������������������������������neovim-0.2.2/runtime/ftplugin/php.vim���������������������������������������������������������������0000664�0000000�0000000�00000005375�13204015742�0017637�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: php " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:keepcpo= &cpo set cpo&vim " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" . \ "All Files (*.*)\t*.*\n" let s:match_words = "" runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words endif if exists("b:match_skip") unlet b:match_skip endif " Change the :browse e filter to primarily show PHP-related files. if has("gui_win32") let b:browsefilter="PHP Files (*.php)\t*.php\n" . s:browsefilter endif " ### " Provided by Mikolaj Machowski <mikmach at wp dot pl> setlocal include=\\\(require\\\|include\\\)\\\(_once\\\)\\\? " Disabled changing 'iskeyword', it breaks a command such as "*" " setlocal iskeyword+=$ if exists("loaded_matchit") let b:match_words = '<?php:?>,\<switch\>:\<endswitch\>,' . \ '\<if\>:\<elseif\>:\<else\>:\<endif\>,' . \ '\<while\>:\<endwhile\>,' . \ '\<do\>:\<while\>,' . \ '\<for\>:\<endfor\>,' . \ '\<foreach\>:\<endforeach\>,' . \ '(:),[:],{:},' . \ s:match_words endif " ### if exists('&omnifunc') setlocal omnifunc=phpcomplete#CompletePHP endif " Section jumping: [[ and ]] provided by Antony Scriven <adscriven at gmail dot com> let s:function = '\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function' let s:class = '\(abstract\s\+\|final\s\+\)*class' let s:interface = 'interface' let s:section = '\(.*\%#\)\@!\_^\s*\zs\('.s:function.'\|'.s:class.'\|'.s:interface.'\)' exe 'nno <buffer> <silent> [[ ?' . escape(s:section, '|') . '?<CR>:nohls<CR>' exe 'nno <buffer> <silent> ]] /' . escape(s:section, '|') . '/<CR>:nohls<CR>' exe 'ono <buffer> <silent> [[ ?' . escape(s:section, '|') . '?<CR>:nohls<CR>' exe 'ono <buffer> <silent> ]] /' . escape(s:section, '|') . '/<CR>:nohls<CR>' setlocal commentstring=/*%s*/ " Undo the stuff we changed. let b:undo_ftplugin = "setlocal commentstring< include< omnifunc<" . \ " | unlet! b:browsefilter b:match_words | " . \ s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:keepcpo unlet s:keepcpo �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/pinfo.vim�������������������������������������������������������������0000664�0000000�0000000�00000000663�13204015742�0020156�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: pinfo(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/plaintex.vim����������������������������������������������������������0000664�0000000�0000000�00000002176�13204015742�0020670�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" plain TeX filetype plugin " Language: plain TeX (ft=plaintex) " Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org> " Version: 1.1 " Last Change: Wed 19 Apr 2006 " Only do this when not done yet for this buffer. if exists("b:did_ftplugin") finish endif " Start with initex. This will also define b:did_ftplugin and b:undo_ftplugin . source $VIMRUNTIME/ftplugin/initex.vim " Avoid problems if running in 'compatible' mode. let s:save_cpo = &cpo set cpo&vim let b:undo_ftplugin .= "| unlet! b:match_ignorecase b:match_skip b:match_words" " Allow "[d" to be used to find a macro definition: let &l:define .= '\|\\new\(count\|dimen\|skip\|muskip\|box\|toks\|read\|write' \ . '\|fam\|insert\)' " The following lines enable the macros/matchit.vim plugin for " extended matching with the % key. " There is no default meaning for \(...\) etc., but many users define one. if exists("loaded_matchit") let b:match_ignorecase = 0 \ | let b:match_skip = 'r:\\\@<!\%(\\\\\)*%' \ | let b:match_words = '(:),\[:],{:},\\(:\\),\\\[:\\],\\{:\\}' endif " exists("loaded_matchit") let &cpo = s:save_cpo unlet s:save_cpo " vim:sts=2:sw=2: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/postscr.vim�����������������������������������������������������������0000664�0000000�0000000�00000001756�13204015742�0020544�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: PostScript " Maintainer: Mike Williams <mrw@eandem.co.uk> " Last Change: 24th April 2012 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim " PS comment formatting setlocal comments=b:% setlocal formatoptions-=t formatoptions+=rol " Define patterns for the matchit macro if !exists("b:match_words") let b:match_ignorecase = 0 let b:match_words = '<<:>>,\<begin\>:\<end\>,\<save\>:\<restore\>,\<gsave\>:\<grestore\>' endif " Define patterns for the browse file filter if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "PostScript Files (*.ps)\t*.ps\n" . \ "EPS Files (*.eps)\t*.eps\n" . \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setlocal comments< formatoptions<" \ . "| unlet! b:browsefiler b:match_ignorecase b:match_words" let &cpo = s:cpo_save unlet s:cpo_save ������������������neovim-0.2.2/runtime/ftplugin/procmail.vim����������������������������������������������������������0000664�0000000�0000000�00000000737�13204015742�0020653�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: procmail(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &l:include = '^\s*INCLUDERC\>' let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������neovim-0.2.2/runtime/ftplugin/prolog.vim������������������������������������������������������������0000664�0000000�0000000�00000000670�13204015742�0020343�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Prolog " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1:/*,mb:*,ex:*/,:% commentstring=%\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/protocols.vim���������������������������������������������������������0000664�0000000�0000000�00000000711�13204015742�0021061�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: protocols(5) - Internet protocols definition file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������neovim-0.2.2/runtime/ftplugin/pyrex.vim�������������������������������������������������������������0000664�0000000�0000000�00000001376�13204015742�0020214�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Pyrex " Maintainer: Marco Barisione <marco.bari@people.it> " URL: http://marcobari.altervista.org/pyrex_vim.html " Last Change: 2012 May 18 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let s:keepcpo= &cpo set cpo&vim " Behaves just like Python runtime! ftplugin/python.vim ftplugin/python_*.vim ftplugin/python/*.vim if has("gui_win32") && exists("b:browsefilter") let b:browsefilter = "Pyrex files (*.pyx,*.pxd)\t*.pyx;*.pxd\n" . \ "Python Files (*.py)\t*.py\n" . \ "C Source Files (*.c)\t*.c\n" . \ "C Header Files (*.h)\t*.h\n" . \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" . \ "All Files (*.*)\t*.*\n" endif let &cpo = s:keepcpo unlet s:keepcpo ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/python.vim������������������������������������������������������������0000664�0000000�0000000�00000011050�13204015742�0020354�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: python " Maintainer: Tom Picton <tom@tompicton.co.uk> " Previous Maintainer: James Sully <sullyj3@gmail.com> " Previous Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Fri, 20 October 2017 " https://github.com/tpict/vim-ftplugin-python if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 let s:keepcpo= &cpo set cpo&vim setlocal cinkeys-=0# setlocal indentkeys-=0# setlocal include=^\\s*\\(from\\\|import\\) setlocal includeexpr=substitute(v:fname,'\\.','/','g') setlocal suffixesadd=.py setlocal comments=b:#,fb:- setlocal commentstring=#\ %s setlocal omnifunc=pythoncomplete#Complete set wildignore+=*.pyc let b:next_toplevel='\v%$\|^(class\|def\|async def)>' let b:prev_toplevel='\v^(class\|def\|async def)>' let b:next_endtoplevel='\v%$\|\S.*\n+(def\|class)' let b:prev_endtoplevel='\v\S.*\n+(def\|class)' let b:next='\v%$\|^\s*(class\|def\|async def)>' let b:prev='\v^\s*(class\|def\|async def)>' let b:next_end='\v\S\n*(%$\|^\s*(class\|def\|async def)\|^\S)' let b:prev_end='\v\S\n*(^\s*(class\|def\|async def)\|^\S)' execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W')<cr>" execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb')<cr>" execute "nnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0)<cr>" execute "nnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0)<cr>" execute "nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '". b:next."', 'W')<cr>" execute "nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '". b:prev."', 'Wb')<cr>" execute "nnoremap <silent> <buffer> ]M :call <SID>Python_jump('n', '". b:next_end."', 'W', 0)<cr>" execute "nnoremap <silent> <buffer> [M :call <SID>Python_jump('n', '". b:prev_end."', 'Wb', 0)<cr>" execute "onoremap <silent> <buffer> ]] :call <SID>Python_jump('o', '". b:next_toplevel."', 'W')<cr>" execute "onoremap <silent> <buffer> [[ :call <SID>Python_jump('o', '". b:prev_toplevel."', 'Wb')<cr>" execute "onoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0)<cr>" execute "onoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0)<cr>" execute "onoremap <silent> <buffer> ]m :call <SID>Python_jump('o', '". b:next."', 'W')<cr>" execute "onoremap <silent> <buffer> [m :call <SID>Python_jump('o', '". b:prev."', 'Wb')<cr>" execute "onoremap <silent> <buffer> ]M :call <SID>Python_jump('o', '". b:next_end."', 'W', 0)<cr>" execute "onoremap <silent> <buffer> [M :call <SID>Python_jump('o', '". b:prev_end."', 'Wb', 0)<cr>" execute "xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '". b:next_toplevel."', 'W')<cr>" execute "xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '". b:prev_toplevel."', 'Wb')<cr>" execute "xnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0)<cr>" execute "xnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0)<cr>" execute "xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '". b:next."', 'W')<cr>" execute "xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '". b:prev."', 'Wb')<cr>" execute "xnoremap <silent> <buffer> ]M :call <SID>Python_jump('x', '". b:next_end."', 'W', 0)<cr>" execute "xnoremap <silent> <buffer> [M :call <SID>Python_jump('x', '". b:prev_end."', 'Wb', 0)<cr>" if !exists('*<SID>Python_jump') fun! <SID>Python_jump(mode, motion, flags, ...) range let l:startofline = (a:0 >= 1) ? a:1 : 1 if a:mode == 'x' normal! gv endif if l:startofline == 1 normal! 0 endif let cnt = v:count1 mark ' while cnt > 0 call search(a:motion, a:flags) let cnt = cnt - 1 endwhile if l:startofline == 1 normal! ^ endif endfun endif if has("browsefilter") && !exists("b:browsefilter") let b:browsefilter = "Python Files (*.py)\t*.py\n" . \ "All Files (*.*)\t*.*\n" endif if !exists("g:python_recommended_style") || g:python_recommended_style != 0 " As suggested by PEP8. setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8 endif " First time: try finding "pydoc". if !exists('g:pydoc_executable') if executable('pydoc') let g:pydoc_executable = 1 else let g:pydoc_executable = 0 endif endif " If "pydoc" was found use it for keywordprg. if g:pydoc_executable setlocal keywordprg=pydoc endif let &cpo = s:keepcpo unlet s:keepcpo ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/qf.vim����������������������������������������������������������������0000664�0000000�0000000�00000001634�13204015742�0017450�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Vim's quickfix window " Maintainer: Lech Lorens <Lech.Lorens@gmail.com> " Last Changed: 30 Apr 2012 if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let b:undo_ftplugin = "set stl<" " Display the command that produced the list in the quickfix window: setlocal stl=%t%{exists('w:quickfix_title')?\ '\ '.w:quickfix_title\ :\ ''}\ %=%-15(%l,%c%V%)\ %P function! s:setup_toc() abort if get(w:, 'quickfix_title') !~# '\<TOC$' || &syntax != 'qf' return endif let list = getloclist(0) if empty(list) return endif let bufnr = list[0].bufnr setlocal modifiable silent %delete _ call setline(1, map(list, 'v:val.text')) setlocal nomodifiable nomodified let &syntax = getbufvar(bufnr, '&syntax') endfunction augroup qf_toc autocmd! autocmd Syntax <buffer> call s:setup_toc() augroup END ����������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/quake.vim�������������������������������������������������������������0000664�0000000�0000000�00000000667�13204015742�0020155�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Quake[1-3] configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:// commentstring=//\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/r.vim�����������������������������������������������������������������0000664�0000000�0000000�00000001532�13204015742�0017300�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: R " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Tue Apr 07, 2015 04:38PM " Only do this when not yet done for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim setlocal iskeyword=@,48-57,_,. setlocal formatoptions-=t setlocal commentstring=#\ %s setlocal comments=:#',:###,:##,:# if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R)\t*.R\n" . \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter" let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/racc.vim��������������������������������������������������������������0000664�0000000�0000000�00000000701�13204015742�0017744�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Racc input file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1:/*,mb:*,ex:*/,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/readline.vim����������������������������������������������������������0000664�0000000�0000000�00000000666�13204015742�0020631�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: readline(3) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/registry.vim����������������������������������������������������������0000664�0000000�0000000�00000001344�13204015742�0020710�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Windows Registry export with regedit (*.reg) " Maintainer: Cade Forester <ahx2323@gmail.com> " Latest Revision: 2014-01-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = \ 'let b:browsefilter = "" | ' . \ 'setlocal ' . \ 'comments< '. \ 'commentstring< ' . \ 'formatoptions< ' if has( 'gui_win32' ) \ && !exists( 'b:browsefilter' ) let b:browsefilter = \ 'registry files (*.reg)\t*.reg\n' . \ 'All files (*.*)\t*.*\n' endif setlocal comments=:; setlocal commentstring=;\ %s setlocal formatoptions-=t setlocal formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/reva.vim��������������������������������������������������������������0000664�0000000�0000000�00000001305�13204015742�0017772�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim ftplugin file " Language: Reva Forth " Version: 7.1 " Last Change: 2008/01/11 " Maintainer: Ron Aaron <ron@ronware.org> " URL: http://ronware.org/reva/ " Filetypes: *.rf *.frt " NOTE: Forth allows any non-whitespace in a name, so you need to do: " setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 " " This goes with the syntax/reva.vim file. " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 setlocal sts=4 sw=4 setlocal com=s1:/*,mb:*,ex:*/,:\|,:\\ setlocal fo=tcrqol setlocal matchpairs+=\::; setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/rhelp.vim�������������������������������������������������������������0000664�0000000�0000000�00000001342�13204015742�0020150�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: R help file " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Tue Apr 07, 2015 04:37PM " Only do this when not yet done for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim setlocal iskeyword=@,48-57,_,. if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setl isk< | unlet! b:browsefilter" let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/rmd.vim���������������������������������������������������������������0000664�0000000�0000000�00000002713�13204015742�0017623�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: R Markdown file " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Mon Jun 06, 2016 09:41PM " Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann) " Only do this when not yet done for this buffer if exists("b:did_ftplugin") finish endif runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim " Nvim-R plugin needs this if exists("*CompleteR") if &omnifunc == "CompleteR" let b:rplugin_nonr_omnifunc = "" else let b:rplugin_nonr_omnifunc = &omnifunc endif set omnifunc=CompleteR endif setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s setlocal formatoptions+=tcqln setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+ setlocal iskeyword=@,48-57,_,. let s:cpo_save = &cpo set cpo&vim " Enables pandoc if it is installed unlet! b:did_ftplugin runtime ftplugin/pandoc.vim " Don't load another plugin for this buffer let b:did_ftplugin = 1 if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . \ "All Files (*.*)\t*.*\n" endif if exists('b:undo_ftplugin') let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter" else let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter" endif let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 �����������������������������������������������������neovim-0.2.2/runtime/ftplugin/rnc.vim���������������������������������������������������������������0000664�0000000�0000000�00000000657�13204015742�0017630�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Relax NG compact syntax " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/rnoweb.vim������������������������������������������������������������0000664�0000000�0000000�00000002015�13204015742�0020330�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Rnoweb " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Tue Apr 07, 2015 04:37PM " Only do this when not yet done for this buffer if exists("b:did_ftplugin") finish endif let s:cpo_save = &cpo set cpo&vim runtime! ftplugin/tex.vim " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Enables Vim-Latex-Suite, LaTeX-Box if installed runtime ftplugin/tex_*.vim setlocal iskeyword=@,48-57,_,. setlocal suffixesadd=.bib,.tex setlocal comments=b:%,b:#,b:##,b:###,b:#' if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . \ "All Files (*.*)\t*.*\n" endif if exists('b:undo_ftplugin') let b:undo_ftplugin .= " | setl isk< sua< com< | unlet! b:browsefilter" else let b:undo_ftplugin = "setl isk< sua< com< | unlet! b:browsefilter" endif let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/rpl.vim���������������������������������������������������������������0000664�0000000�0000000�00000001154�13204015742�0017634�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: RPL/2 " Maintainer: Jol BERTRAND <rpl2@free.fr> " Last Change: 2012 Mar 07 " Version: 0.1 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Set 'comments' to format dashed lists in comments. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// let b:undo_ftplugin = "setlocal fo< comments<" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/rrst.vim��������������������������������������������������������������0000664�0000000�0000000�00000002117�13204015742�0020031�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: reStructuredText documentation format with R code " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Tue Apr 07, 2015 04:38PM " Original work by Alex Zvoleff " Only do this when not yet done for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s setlocal formatoptions+=tcqln setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+ setlocal iskeyword=@,48-57,_,. if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . \ "All Files (*.*)\t*.*\n" endif if exists('b:undo_ftplugin') let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter" else let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter" endif let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/rst.vim���������������������������������������������������������������0000664�0000000�0000000�00000000710�13204015742�0017644�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: reStructuredText documentation format " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=fb:.. commentstring=..\ %s expandtab setlocal formatoptions+=tcroql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������neovim-0.2.2/runtime/ftplugin/ruby.vim��������������������������������������������������������������0000664�0000000�0000000�00000041160�13204015742�0020021�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Ruby " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> " ---------------------------------------------------------------------------- if (exists("b:did_ftplugin")) finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim if has("gui_running") && !has("gui_win32") setlocal keywordprg=ri\ -T\ -f\ bs else setlocal keywordprg=ri endif " Matchit support if exists("loaded_matchit") && !exists("b:match_words") let b:match_ignorecase = 0 let b:match_words = \ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|def\|begin\)\>=\@!' . \ ':' . \ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' . \ ':' . \ '\%(^\|[^.\:@$]\)\@<=\<end\:\@!\>' . \ ',{:},\[:\],(:)' let b:match_skip = \ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" . \ "\\<ruby\\%(String\\|StringDelimiter\\|ASCIICode\\|Escape\\|" . \ "Regexp\\|RegexpDelimiter\\|" . \ "Interpolation\\|NoInterpolation\\|Comment\\|Documentation\\|" . \ "ConditionalModifier\\|RepeatModifier\\|OptionalDo\\|" . \ "Function\\|BlockArgument\\|KeywordAsMethod\\|ClassVariable\\|" . \ "InstanceVariable\\|GlobalVariable\\|Symbol\\)\\>'" endif setlocal formatoptions-=t formatoptions+=croql setlocal include=^\\s*\\<\\(load\\>\\\|require\\>\\\|autoload\\s*:\\=[\"']\\=\\h\\w*[\"']\\=,\\) setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'\%(\.rb\)\=$','.rb','') setlocal suffixesadd=.rb if exists("&ofu") && has("ruby") setlocal omnifunc=rubycomplete#Complete endif " To activate, :set ballooneval if has('balloon_eval') && exists('+balloonexpr') setlocal balloonexpr=RubyBalloonexpr() endif " TODO: "setlocal define=^\\s*def setlocal comments=:# setlocal commentstring=#\ %s if !exists('g:ruby_version_paths') let g:ruby_version_paths = {} endif function! s:query_path(root) abort let code = "print $:.join %q{,}" if &shell =~# 'sh' let prefix = 'env PATH='.shellescape($PATH).' ' else let prefix = '' endif if &shellxquote == "'" let path_check = prefix.'ruby --disable-gems -e "' . code . '"' else let path_check = prefix."ruby --disable-gems -e '" . code . "'" endif let cd = haslocaldir() ? 'lcd' : 'cd' let cwd = fnameescape(getcwd()) try exe cd fnameescape(a:root) let path = split(system(path_check),',') exe cd cwd return path finally exe cd cwd endtry endfunction function! s:build_path(path) abort let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',') if &g:path !~# '\v^\.%(,/%(usr|emx)/include)=,,$' let path = substitute(&g:path,',,$',',','') . ',' . path endif return path endfunction if !exists('b:ruby_version') && !exists('g:ruby_path') && isdirectory(expand('%:p:h')) let s:version_file = findfile('.ruby-version', '.;') if !empty(s:version_file) && filereadable(s:version_file) let b:ruby_version = get(readfile(s:version_file, '', 1), '') if !has_key(g:ruby_version_paths, b:ruby_version) let g:ruby_version_paths[b:ruby_version] = s:query_path(fnamemodify(s:version_file, ':p:h')) endif endif endif if exists("g:ruby_path") let s:ruby_path = type(g:ruby_path) == type([]) ? join(g:ruby_path, ',') : g:ruby_path elseif has_key(g:ruby_version_paths, get(b:, 'ruby_version', '')) let s:ruby_paths = g:ruby_version_paths[b:ruby_version] let s:ruby_path = s:build_path(s:ruby_paths) else if !exists('g:ruby_default_path') if has("ruby") && has("win32") ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) ) elseif executable('ruby') let g:ruby_default_path = s:query_path($HOME) else let g:ruby_default_path = map(split($RUBYLIB,':'), 'v:val ==# "." ? "" : v:val') endif endif let s:ruby_paths = g:ruby_default_path let s:ruby_path = s:build_path(s:ruby_paths) endif if stridx(&l:path, s:ruby_path) == -1 let &l:path = s:ruby_path endif if exists('s:ruby_paths') && stridx(&l:tags, join(map(copy(s:ruby_paths),'v:val."/tags"'),',')) == -1 let &l:tags = &tags . ',' . join(map(copy(s:ruby_paths),'v:val."/tags"'),',') endif if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n" . \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< tags< kp<" \."| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip" \."| if exists('&ofu') && has('ruby') | setl ofu< | endif" \."| if has('balloon_eval') && exists('+bexpr') | setl bexpr< | endif" function! s:map(mode, flags, map) abort let from = matchstr(a:map, '\S\+') if empty(mapcheck(from, a:mode)) exe a:mode.'map' '<buffer>'.(a:0 ? a:1 : '') a:map let b:undo_ftplugin .= '|sil! '.a:mode.'unmap <buffer> '.from endif endfunction cmap <buffer><script><expr> <Plug><cword> substitute(RubyCursorIdentifier(),'^$',"\022\027",'') cmap <buffer><script><expr> <Plug><cfile> substitute(RubyCursorFile(),'^$',"\022\006",'') let b:undo_ftplugin .= "| sil! cunmap <buffer> <Plug><cword>| sil! cunmap <buffer> <Plug><cfile>" if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps") nmap <buffer><script> <SID>: :<C-U> nmap <buffer><script> <SID>c: :<C-U><C-R>=v:count ? v:count : ''<CR> nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','b','n')<CR> nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','','n')<CR> nnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','b','n')<CR> nnoremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','','n')<CR> xnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','b','v')<CR> xnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','','v')<CR> xnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','b','v')<CR> xnoremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','','v')<CR> nnoremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','b','n')<CR> nnoremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','','n')<CR> nnoremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','b','n')<CR> nnoremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','','n')<CR> xnoremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','b','v')<CR> xnoremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','','v')<CR> xnoremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','b','v')<CR> xnoremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','','v')<CR> let b:undo_ftplugin = b:undo_ftplugin \."| sil! exe 'unmap <buffer> [[' | sil! exe 'unmap <buffer> ]]' | sil! exe 'unmap <buffer> []' | sil! exe 'unmap <buffer> ]['" \."| sil! exe 'unmap <buffer> [m' | sil! exe 'unmap <buffer> ]m' | sil! exe 'unmap <buffer> [M' | sil! exe 'unmap <buffer> ]M'" if maparg('im','x') == '' && maparg('im','o') == '' && maparg('am','x') == '' && maparg('am','o') == '' onoremap <silent> <buffer> im :<C-U>call <SID>wrap_i('[m',']M')<CR> onoremap <silent> <buffer> am :<C-U>call <SID>wrap_a('[m',']M')<CR> xnoremap <silent> <buffer> im :<C-U>call <SID>wrap_i('[m',']M')<CR> xnoremap <silent> <buffer> am :<C-U>call <SID>wrap_a('[m',']M')<CR> let b:undo_ftplugin = b:undo_ftplugin \."| sil! exe 'ounmap <buffer> im' | sil! exe 'ounmap <buffer> am'" \."| sil! exe 'xunmap <buffer> im' | sil! exe 'xunmap <buffer> am'" endif if maparg('iM','x') == '' && maparg('iM','o') == '' && maparg('aM','x') == '' && maparg('aM','o') == '' onoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<CR> onoremap <silent> <buffer> aM :<C-U>call <SID>wrap_a('[[','][')<CR> xnoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<CR> xnoremap <silent> <buffer> aM :<C-U>call <SID>wrap_a('[[','][')<CR> let b:undo_ftplugin = b:undo_ftplugin \."| sil! exe 'ounmap <buffer> iM' | sil! exe 'ounmap <buffer> aM'" \."| sil! exe 'xunmap <buffer> iM' | sil! exe 'xunmap <buffer> aM'" endif call s:map('c', '', '<C-R><C-W> <Plug><cword>') call s:map('c', '', '<C-R><C-F> <Plug><cfile>') cmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? '<Bar>norm! zv' : '' call s:map('n', '<silent>', '<C-]> <SID>:exe v:count1."tag <Plug><cword>"<SID>tagzv<CR>') call s:map('n', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><cword>"<SID>tagzv<CR>') call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><cword>"<SID>tagzv<CR>') call s:map('n', '<silent>', '<C-W>] <SID>:exe v:count1."stag <Plug><cword>"<SID>tagzv<CR>') call s:map('n', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><cword>"<SID>tagzv<CR>') call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:exe "stjump <Plug><cword>"<SID>tagzv<CR>') call s:map('n', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><cword>"<SID>tagzv<CR>') call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><cword>"<CR>') call s:map('n', '<silent>', '<C-W>g} <SID>:exe "ptjump <Plug><cword>"<CR>') call s:map('n', '<silent>', 'gf <SID>c:find <Plug><cfile><CR>') call s:map('n', '<silent>', '<C-W>f <SID>c:sfind <Plug><cfile><CR>') call s:map('n', '<silent>', '<C-W><C-F> <SID>c:sfind <Plug><cfile><CR>') call s:map('n', '<silent>', '<C-W>gf <SID>c:tabfind <Plug><cfile><CR>') endif let &cpo = s:cpo_save unlet s:cpo_save if exists("g:did_ruby_ftplugin_functions") finish endif let g:did_ruby_ftplugin_functions = 1 function! RubyBalloonexpr() abort if !exists('s:ri_found') let s:ri_found = executable('ri') endif if s:ri_found let line = getline(v:beval_lnum) let b = matchstr(strpart(line,0,v:beval_col),'\%(\w\|[:.]\)*$') let a = substitute(matchstr(strpart(line,v:beval_col),'^\w*\%([?!]\|\s*=\)\?'),'\s\+','','g') let str = b.a let before = strpart(line,0,v:beval_col-strlen(b)) let after = strpart(line,v:beval_col+strlen(a)) if str =~ '^\.' let str = substitute(str,'^\.','#','g') if before =~ '\]\s*$' let str = 'Array'.str elseif before =~ '}\s*$' " False positives from blocks here let str = 'Hash'.str elseif before =~ "[\"'`]\\s*$" || before =~ '\$\d\+\s*$' let str = 'String'.str elseif before =~ '\$\d\+\.\d\+\s*$' let str = 'Float'.str elseif before =~ '\$\d\+\s*$' let str = 'Integer'.str elseif before =~ '/\s*$' let str = 'Regexp'.str else let str = substitute(str,'^#','.','') endif endif let str = substitute(str,'.*\.\s*to_f\s*\.\s*','Float#','') let str = substitute(str,'.*\.\s*to_i\%(nt\)\=\s*\.\s*','Integer#','') let str = substitute(str,'.*\.\s*to_s\%(tr\)\=\s*\.\s*','String#','') let str = substitute(str,'.*\.\s*to_sym\s*\.\s*','Symbol#','') let str = substitute(str,'.*\.\s*to_a\%(ry\)\=\s*\.\s*','Array#','') let str = substitute(str,'.*\.\s*to_proc\s*\.\s*','Proc#','') if str !~ '^\w' return '' endif silent! let res = substitute(system("ri -f rdoc -T \"".str.'"'),'\n$','','') if res =~ '^Nothing known about' || res =~ '^Bad argument:' || res =~ '^More than one method' return '' endif return res else return "" endif endfunction function! s:searchsyn(pattern, syn, flags, mode) abort let cnt = v:count1 norm! m' if a:mode ==# 'v' norm! gv endif let i = 0 while i < cnt let i = i + 1 let line = line('.') let col = col('.') let pos = search(a:pattern,'W'.a:flags) while pos != 0 && s:synname() !~# a:syn let pos = search(a:pattern,'W'.a:flags) endwhile if pos == 0 call cursor(line,col) return endif endwhile endfunction function! s:synname() abort return synIDattr(synID(line('.'),col('.'),0),'name') endfunction function! s:wrap_i(back,forward) abort execute 'norm k'.a:forward let line = line('.') execute 'norm '.a:back if line('.') == line - 1 return s:wrap_a(a:back,a:forward) endif execute 'norm jV'.a:forward.'k' endfunction function! s:wrap_a(back,forward) abort execute 'norm '.a:forward if line('.') < line('$') && getline(line('.')+1) ==# '' let after = 1 endif execute 'norm '.a:back while getline(line('.')-1) =~# '^\s*#' && line('.') - endwhile if exists('after') execute 'norm V'.a:forward.'j' elseif line('.') > 1 && getline(line('.')-1) =~# '^\s*$' execute 'norm kV'.a:forward else execute 'norm V'.a:forward endif endfunction function! RubyCursorIdentifier() abort let asciicode = '\%(\w\|[]})\"'."'".']\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)' let number = '\%(\%(\w\|[]})\"'."'".']\s*\)\@<!-\)\=\%(\<[[:digit:]_]\+\%(\.[[:digit:]_]\+\)\=\%([Ee][[:digit:]_]\+\)\=\>\|\<0[xXbBoOdD][[:xdigit:]_]\+\>\)\|'.asciicode let operator = '\%(\[\]\|<<\|<=>\|[!<>]=\=\|===\=\|[!=]\~\|>>\|\*\*\|\.\.\.\=\|=>\|[~^&|*/%+-]\)' let method = '\%(\.[_a-zA-Z]\w*\s*=>\@!\|\<[_a-zA-Z]\w*\>[?!]\=\)' let global = '$\%([!$&"'."'".'*+,./:;<=>?@\`~]\|-\=\w\+\>\)' let symbolizable = '\%(\%(@@\=\)\w\+\>\|'.global.'\|'.method.'\|'.operator.'\)' let pattern = '\C\s*\%('.number.'\|\%(:\@<!:\)\='.symbolizable.'\)' let [lnum, col] = searchpos(pattern,'bcn',line('.')) let raw = matchstr(getline('.')[col-1 : ],pattern) let stripped = substitute(substitute(raw,'\s\+=$','=',''),'^\s*[:.]\=','','') return stripped == '' ? expand("<cword>") : stripped endfunction function! RubyCursorFile() abort let isfname = &isfname try set isfname+=: let cfile = expand('<cfile>') finally let isfname = &isfname endtry let pre = matchstr(strpart(getline('.'), 0, col('.')-1), '.*\f\@<!') let post = matchstr(strpart(getline('.'), col('.')), '\f\@!.*') let ext = getline('.') =~# '^\s*\%(require\%(_relative\)\=\|autoload\)\>' && cfile !~# '\.rb$' ? '.rb' : '' if s:synname() ==# 'rubyConstant' let cfile = substitute(cfile,'\.\w\+[?!=]\=$','','') let cfile = substitute(cfile,'::','/','g') let cfile = substitute(cfile,'\(\u\+\)\(\u\l\)','\1_\2', 'g') let cfile = substitute(cfile,'\(\l\|\d\)\(\u\)','\1_\2', 'g') return tolower(cfile) . '.rb' elseif getline('.') =~# '^\s*require_relative\s*\(["'']\).*\1\s*$' let cfile = expand('%:p:h') . '/' . matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') . ext elseif getline('.') =~# '^\s*\%(require[( ]\|load[( ]\|autoload[( ]:\w\+,\)\s*\%(::\)\=File\.expand_path(\(["'']\)\.\./.*\1,\s*__FILE__)\s*$' let target = matchstr(getline('.'),'\(["'']\)\.\.\zs/.\{-\}\ze\1') let cfile = expand('%:p:h') . target . ext elseif getline('.') =~# '^\s*\%(require \|load \|autoload :\w\+,\)\s*\(["'']\).*\1\s*$' let cfile = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') . ext elseif pre.post =~# '\<File.expand_path[( ].*[''"]\{2\}, *__FILE__\>' && cfile =~# '^\.\.' let cfile = expand('%:p:h') . strpart(cfile, 2) else return substitute(cfile, '\C\v^(.*):(\d+)%(:in)=$', '+\2 \1', '') endif let cwdpat = '^\M' . substitute(getcwd(), '[\/]', '\\[\\/]', 'g').'\ze\[\/]' let cfile = substitute(cfile, cwdpat, '.', '') if fnameescape(cfile) !=# cfile return '+ '.fnameescape(cfile) else return cfile endif endfunction " " Instructions for enabling "matchit" support: " " 1. Look for the latest "matchit" plugin at " " http://www.vim.org/scripts/script.php?script_id=39 " " It is also packaged with Vim, in the $VIMRUNTIME/macros directory. " " 2. Copy "matchit.txt" into a "doc" directory (e.g. $HOME/.vim/doc). " " 3. Copy "matchit.vim" into a "plugin" directory (e.g. $HOME/.vim/plugin). " " 4. Ensure this file (ftplugin/ruby.vim) is installed. " " 5. Ensure you have this line in your $HOME/.vimrc: " filetype plugin on " " 6. Restart Vim and create the matchit documentation: " " :helptags ~/.vim/doc " " Now you can do ":help matchit", and you should be able to use "%" on Ruby " keywords. Try ":echo b:match_words" to be sure. " " Thanks to Mark J. Reed for the instructions. See ":help vimrc" for the " locations of plugin directories, etc., as there are several options, and it " differs on Windows. Email gsinclair@soyabean.com.au if you need help. " " vim: nowrap sw=2 sts=2 ts=8: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/rust.vim��������������������������������������������������������������0000664�0000000�0000000�00000014656�13204015742�0020047�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Language: Rust " Description: Vim ftplugin for Rust " Maintainer: Chris Morgan <me@chrismorgan.info> " Maintainer: Kevin Ballard <kevin@sb.org> " Last Change: June 08, 2016 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:save_cpo = &cpo set cpo&vim augroup rust.vim autocmd! " Variables {{{1 " The rust source code at present seems to typically omit a leader on /*! " comments, so we'll use that as our default, but make it easy to switch. " This does not affect indentation at all (I tested it with and without " leader), merely whether a leader is inserted by default or not. if exists("g:rust_bang_comment_leader") && g:rust_bang_comment_leader != 0 " Why is the `,s0:/*,mb:\ ,ex:*/` there, you ask? I don't understand why, " but without it, */ gets indented one space even if there were no " leaders. I'm fairly sure that's a Vim bug. setlocal comments=s1:/*,mb:*,ex:*/,s0:/*,mb:\ ,ex:*/,:///,://!,:// else setlocal comments=s0:/*!,m:\ ,ex:*/,s1:/*,mb:*,ex:*/,:///,://!,:// endif setlocal commentstring=//%s setlocal formatoptions-=t formatoptions+=croqnl " j was only added in 7.3.541, so stop complaints about its nonexistence silent! setlocal formatoptions+=j " smartindent will be overridden by indentexpr if filetype indent is on, but " otherwise it's better than nothing. setlocal smartindent nocindent if !exists("g:rust_recommended_style") || g:rust_recommended_style != 0 setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab setlocal textwidth=99 endif " This includeexpr isn't perfect, but it's a good start setlocal includeexpr=substitute(v:fname,'::','/','g') setlocal suffixesadd=.rs if exists("g:ftplugin_rust_source_path") let &l:path=g:ftplugin_rust_source_path . ',' . &l:path endif if exists("g:loaded_delimitMate") if exists("b:delimitMate_excluded_regions") let b:rust_original_delimitMate_excluded_regions = b:delimitMate_excluded_regions endif let s:delimitMate_extra_excluded_regions = ',rustLifetimeCandidate,rustGenericLifetimeCandidate' " For this buffer, when delimitMate issues the `User delimitMate_map` " event in the autocommand system, add the above-defined extra excluded " regions to delimitMate's state, if they have not already been added. autocmd User <buffer> \ if expand('<afile>') ==# 'delimitMate_map' && match( \ delimitMate#Get("excluded_regions"), \ s:delimitMate_extra_excluded_regions) == -1 \| let b:delimitMate_excluded_regions = \ delimitMate#Get("excluded_regions") \ . s:delimitMate_extra_excluded_regions \|endif " For this buffer, when delimitMate issues the `User delimitMate_unmap` " event in the autocommand system, delete the above-defined extra excluded " regions from delimitMate's state (the deletion being idempotent and " having no effect if the extra excluded regions are not present in the " targeted part of delimitMate's state). autocmd User <buffer> \ if expand('<afile>') ==# 'delimitMate_unmap' \| let b:delimitMate_excluded_regions = substitute( \ delimitMate#Get("excluded_regions"), \ '\C\V' . s:delimitMate_extra_excluded_regions, \ '', 'g') \|endif endif if has("folding") && exists('g:rust_fold') && g:rust_fold != 0 let b:rust_set_foldmethod=1 setlocal foldmethod=syntax if g:rust_fold == 2 setlocal foldlevel< else setlocal foldlevel=99 endif endif if has('conceal') && exists('g:rust_conceal') && g:rust_conceal != 0 let b:rust_set_conceallevel=1 setlocal conceallevel=2 endif " Motion Commands {{{1 " Bind motion commands to support hanging indents nnoremap <silent> <buffer> [[ :call rust#Jump('n', 'Back')<CR> nnoremap <silent> <buffer> ]] :call rust#Jump('n', 'Forward')<CR> xnoremap <silent> <buffer> [[ :call rust#Jump('v', 'Back')<CR> xnoremap <silent> <buffer> ]] :call rust#Jump('v', 'Forward')<CR> onoremap <silent> <buffer> [[ :call rust#Jump('o', 'Back')<CR> onoremap <silent> <buffer> ]] :call rust#Jump('o', 'Forward')<CR> " Commands {{{1 " See |:RustRun| for docs command! -nargs=* -complete=file -bang -buffer RustRun call rust#Run(<bang>0, <q-args>) " See |:RustExpand| for docs command! -nargs=* -complete=customlist,rust#CompleteExpand -bang -buffer RustExpand call rust#Expand(<bang>0, <q-args>) " See |:RustEmitIr| for docs command! -nargs=* -buffer RustEmitIr call rust#Emit("llvm-ir", <q-args>) " See |:RustEmitAsm| for docs command! -nargs=* -buffer RustEmitAsm call rust#Emit("asm", <q-args>) " See |:RustPlay| for docs command! -range=% RustPlay :call rust#Play(<count>, <line1>, <line2>, <f-args>) " See |:RustFmt| for docs command! -buffer RustFmt call rustfmt#Format() " See |:RustFmtRange| for docs command! -range -buffer RustFmtRange call rustfmt#FormatRange(<line1>, <line2>) " Mappings {{{1 " Bind ⌘R in MacVim to :RustRun nnoremap <silent> <buffer> <D-r> :RustRun<CR> " Bind ⌘⇧R in MacVim to :RustRun! pre-filled with the last args nnoremap <buffer> <D-R> :RustRun! <C-r>=join(b:rust_last_rustc_args)<CR><C-\>erust#AppendCmdLine(' -- ' . join(b:rust_last_args))<CR> if !exists("b:rust_last_rustc_args") || !exists("b:rust_last_args") let b:rust_last_rustc_args = [] let b:rust_last_args = [] endif " Cleanup {{{1 let b:undo_ftplugin = " \ setlocal formatoptions< comments< commentstring< includeexpr< suffixesadd< \|setlocal tabstop< shiftwidth< softtabstop< expandtab< textwidth< \|if exists('b:rust_original_delimitMate_excluded_regions') \|let b:delimitMate_excluded_regions = b:rust_original_delimitMate_excluded_regions \|unlet b:rust_original_delimitMate_excluded_regions \|else \|unlet! b:delimitMate_excluded_regions \|endif \|if exists('b:rust_set_foldmethod') \|setlocal foldmethod< foldlevel< \|unlet b:rust_set_foldmethod \|endif \|if exists('b:rust_set_conceallevel') \|setlocal conceallevel< \|unlet b:rust_set_conceallevel \|endif \|unlet! b:rust_last_rustc_args b:rust_last_args \|delcommand RustRun \|delcommand RustExpand \|delcommand RustEmitIr \|delcommand RustEmitAsm \|delcommand RustPlay \|nunmap <buffer> <D-r> \|nunmap <buffer> <D-R> \|nunmap <buffer> [[ \|nunmap <buffer> ]] \|xunmap <buffer> [[ \|xunmap <buffer> ]] \|ounmap <buffer> [[ \|ounmap <buffer> ]] \|set matchpairs-=<:> \" " }}}1 " Code formatting on save if get(g:, "rustfmt_autosave", 0) autocmd BufWritePre *.rs silent! call rustfmt#Format() endif augroup END let &cpo = s:save_cpo unlet s:save_cpo " vim: set noet sw=8 ts=8: ����������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/sass.vim��������������������������������������������������������������0000664�0000000�0000000�00000001137�13204015742�0020011�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< def< inc< inex< ofu< sua<" setlocal comments=:// setlocal commentstring=//\ %s setlocal define=^\\s*\\%(@mixin\\\|=\\) setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','') setlocal omnifunc=csscomplete#CompleteCSS setlocal suffixesadd=.sass,.scss,.css let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\=' " vim:set sw=2: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/sbt.vim���������������������������������������������������������������0000664�0000000�0000000�00000000533�13204015742�0017627�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: sbt " Maintainer: Steven Dobay <stevendobay at protonmail.com> " License: Same as Vim " Last Change: 2017.04.30 " ---------------------------------------------------------------------------- if exists('b:did_ftplugin') || &cp finish endif let b:did_ftplugin = 1 runtime! ftplugin/scala.vim ���������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/scala.vim�������������������������������������������������������������0000664�0000000�0000000�00000002177�13204015742�0020130�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Scala " Maintainer: Derek Wyatt " URL: https://github.com/derekwyatt/vim-scala " License: Same as Vim " Last Change: 02 August 2016 " ---------------------------------------------------------------------------- if exists('b:did_ftplugin') || &cp finish endif let b:did_ftplugin = 1 " j is fairly new in Vim, so don't complain if it's not there setlocal formatoptions-=t formatoptions+=croqnl silent! setlocal formatoptions+=j " Just like c.vim, but additionally doesn't wrap text onto /** line when " formatting. Doesn't bungle bulleted lists when formatting. if get(g:, 'scala_scaladoc_indent', 0) setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s2:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,:// else setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,:// endif setlocal commentstring=//\ %s setlocal shiftwidth=2 softtabstop=2 expandtab setlocal include='^\s*import' setlocal includeexpr='substitute(v:fname,"\\.","/","g")' setlocal path+=src/main/scala,src/test/scala setlocal suffixesadd=.scala " vim:set sw=2 sts=2 ts=8 et: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/scheme.vim������������������������������������������������������������0000664�0000000�0000000�00000003112�13204015742�0020277�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Scheme " Maintainer: Sergey Khorev <sergey.khorev@gmail.com> " URL: http://sites.google.com/site/khorser/opensource/vim " Original author: Dorai Sitaram <ds26@gte.com> " Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html " Last Change: Oct 23, 2013 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Copy-paste from ftplugin/lisp.vim setl comments=:; setl define=^\\s*(def\\k* setl formatoptions-=t setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94 setl lisp setl commentstring=;%s setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|# " Scheme-specific settings if exists("b:is_mzscheme") || exists("is_mzscheme") " improve indenting setl iskeyword+=#,%,^ setl lispwords+=module,parameterize,let-values,let*-values,letrec-values setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case setl lispwords+=define-signature,unit,unit/sig,compund-unit/sig,define-values/invoke-unit/sig endif if exists("b:is_chicken") || exists("is_chicken") " improve indenting setl iskeyword+=#,%,^ setl lispwords+=let-optionals,let-optionals*,declare setl lispwords+=let-values,let*-values,letrec-values setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case setl lispwords+=cond-expand,and-let*,foreign-lambda,foreign-lambda* endif let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lispwords< lisp< commentstring<" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/screen.vim������������������������������������������������������������0000664�0000000�0000000�00000000664�13204015742�0020323�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: screen(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/scss.vim��������������������������������������������������������������0000664�0000000�0000000�00000000357�13204015742�0020016�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: SCSS " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2016 Aug 29 if exists("b:did_ftplugin") finish endif runtime! ftplugin/sass.vim setlocal comments=s1:/*,mb:*,ex:*/,:// " vim:set sw=2: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/sensors.vim�����������������������������������������������������������0000664�0000000�0000000�00000000707�13204015742�0020536�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: sensors.conf(5) - libsensors configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������neovim-0.2.2/runtime/ftplugin/services.vim����������������������������������������������������������0000664�0000000�0000000�00000000704�13204015742�0020662�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: services(5) - Internet network services list " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/setserial.vim���������������������������������������������������������0000664�0000000�0000000�00000000667�13204015742�0021042�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: setserial(8) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/sgml.vim��������������������������������������������������������������0000664�0000000�0000000�00000002272�13204015742�0020003�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: sgml " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "XML Files (*.xml)\t*.xml\n" . \ "All Files (*.*)\t*.*\n" runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif " Change the :browse e filter to primarily show xml-related files. if has("gui_win32") let b:browsefilter="SGML Files (*.sgml,*.sgm)\t*.sgm*\n" . s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/sh.vim����������������������������������������������������������������0000664�0000000�0000000�00000002262�13204015742�0017452�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: sh " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C setlocal commentstring=#%s " Shell: thanks to Johannes Zellner if exists("loaded_matchit") let s:sol = '\%(;\s*\|^\s*\)\@<=' " start of line let b:match_words = \ s:sol.'if\>:' . s:sol.'elif\>:' . s:sol.'else\>:' . s:sol. 'fi\>,' . \ s:sol.'\%(for\|while\)\>:' . s:sol. 'done\>,' . \ s:sol.'case\>:' . s:sol. 'esac\>' endif " Change the :browse e filter to primarily show shell-related files. if has("gui_win32") let b:browsefilter="Bourne Shell Scripts (*.sh)\t*.sh\n" . \ "Korn Shell Scripts (*.ksh)\t*.ksh\n" . \ "Bash Shell Scripts (*.bash)\t*.bash\n" . \ "All Files (*.*)\t*.*\n" endif " Undo the stuff we changed. let b:undo_ftplugin = "setlocal cms< | unlet! b:browsefilter b:match_words" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/shada.vim�������������������������������������������������������������0000664�0000000�0000000�00000000636�13204015742�0020123�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 function! ShaDaIndent(lnum) if a:lnum == 1 || getline(a:lnum) =~# '\mwith timestamp.*:$' return 0 else return shiftwidth() endif endfunction setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2 setlocal indentexpr=ShaDaIndent(v:lnum) indentkeys=<:>,o,O let b:undo_ftplugin = 'setlocal et< ts< sts< sw< indentexpr< indentkeys<' ��������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/sieve.vim�������������������������������������������������������������0000664�0000000�0000000�00000000725�13204015742�0020155�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Sieve filtering language input file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1:/*,mb:*,ex:*/,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������neovim-0.2.2/runtime/ftplugin/slpconf.vim�����������������������������������������������������������0000664�0000000�0000000�00000000735�13204015742�0020507�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: RFC 2614 - An API for Service Location configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:#,:; commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������neovim-0.2.2/runtime/ftplugin/slpreg.vim������������������������������������������������������������0000664�0000000�0000000�00000000734�13204015742�0020336�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: RFC 2614 - An API for Service Location registration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:#,:; commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������neovim-0.2.2/runtime/ftplugin/slpspi.vim������������������������������������������������������������0000664�0000000�0000000�00000000723�13204015742�0020352�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: RFC 2614 - An API for Service Location SPI file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:#,:; commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������neovim-0.2.2/runtime/ftplugin/spec.vim��������������������������������������������������������������0000664�0000000�0000000�00000013332�13204015742�0017772�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Plugin to update the %changelog section of RPM spec files " Filename: spec.vim " Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com " Former Maintainer: Gustavo Niemeyer <niemeyer@conectiva.com> (until March 2014) " Last Change: Mon Jun 01 21:15 MSK 2015 Igor Gnatenko if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim if !exists("no_plugin_maps") && !exists("no_spec_maps") if !hasmapto("<Plug>SpecChangelog") map <buffer> <LocalLeader>c <Plug>SpecChangelog endif endif if !hasmapto("call <SID>SpecChangelog(\"\")<CR>") noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR> endif if !exists("*s:GetRelVer") function! s:GetRelVer() if has('python') python << PYEND import sys, datetime, shutil, tempfile import vim try: import rpm except ImportError: pass else: specfile = vim.current.buffer.name if specfile: rpm.delMacro("dist") spec = rpm.spec(specfile) headers = spec.sourceHeader version = headers["Version"] release = headers["Release"] vim.command("let ver = " + version) vim.command("let rel = " + release) PYEND endif endfunction endif if !exists("*s:SpecChangelog") function s:SpecChangelog(format) if strlen(a:format) == 0 if !exists("g:spec_chglog_format") let email = input("Name <email address>: ") let g:spec_chglog_format = "%a %b %d %Y " . l:email echo "\r" endif let format = g:spec_chglog_format else if !exists("g:spec_chglog_format") let g:spec_chglog_format = a:format endif let format = a:format endif let line = 0 let name = "" let ver = "" let rel = "" let nameline = -1 let verline = -1 let relline = -1 let chgline = -1 while (line <= line("$")) let linestr = getline(line) if (name == "" && linestr =~? '^Name:') let nameline = line let name = substitute(strpart(linestr,5), '^[ ]*\([^ ]\+\)[ ]*$','\1','') elseif (ver == "" && linestr =~? '^Version:') let verline = line let ver = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') elseif (rel == "" && linestr =~? '^Release:') let relline = line let rel = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') elseif (linestr =~? '^%changelog') let chgline = line execute line break endif let line = line+1 endwhile if (nameline != -1 && verline != -1 && relline != -1) let include_release_info = exists("g:spec_chglog_release_info") let name = s:ParseRpmVars(name, nameline) let ver = s:ParseRpmVars(ver, verline) let rel = s:ParseRpmVars(rel, relline) else let include_release_info = 0 endif call s:GetRelVer() if (chgline == -1) let option = confirm("Can't find %changelog. Create one? ","&End of file\n&Here\n&Cancel",3) if (option == 1) call append(line("$"),"") call append(line("$"),"%changelog") execute line("$") let chgline = line(".") elseif (option == 2) call append(line("."),"%changelog") normal j chgline = line(".") endif endif if (chgline != -1) let tmptime = v:lc_time language time C let parsed_format = "* ".strftime(format)." - ".ver."-".rel execute "language time" tmptime let release_info = "+ ".name."-".ver."-".rel let wrong_format = 0 let wrong_release = 0 let insert_line = 0 if (getline(chgline+1) != parsed_format) let wrong_format = 1 endif if (include_release_info && getline(chgline+2) != release_info) let wrong_release = 1 endif if (wrong_format || wrong_release) if (include_release_info && !wrong_release && !exists("g:spec_chglog_never_increase_release")) let option = confirm("Increase release? ","&Yes\n&No",1) if (option == 1) execute relline normal  let rel = substitute(strpart(getline(relline),8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') let release_info = "+ ".name."-".ver."-".rel endif endif let n = 0 call append(chgline+n, parsed_format) if include_release_info let n = n + 1 call append(chgline+n, release_info) endif let n = n + 1 call append(chgline+n,"- ") let n = n + 1 call append(chgline+n,"") let insert_line = chgline+n else let line = chgline if !exists("g:spec_chglog_prepend") while !(getline(line+2) =~ '^\( *\|\*.*\)$') let line = line+1 endwhile endif call append(line+1,"- ") let insert_line = line+2 endif execute insert_line startinsert! endif endfunction endif if !exists("*s:ParseRpmVars") function s:ParseRpmVars(str, strline) let end = -1 let ret = "" while (1) let start = match(a:str, "\%{", end+1) if (start == -1) let ret = ret . strpart(a:str, end+1) break endif let ret = ret . strpart(a:str, end+1, start-(end+1)) let end = match(a:str, "}", start) if (end == -1) let ret = ret . strpart(a:str, start) break endif let varname = strpart(a:str, start+2, end-(start+2)) execute a:strline let definestr = "^[ \t]*%(?:global|define)[ \t]\\+" . varname . "[ \t]\\+\\(.*\\)$" let linenum = search(definestr, "bW") if (linenum != -1) let ret = ret . substitute(getline(linenum), definestr, "\\1", "") else let ret = ret . strpart(str, start, end+1-start) endif endwhile return ret endfunction endif " The following lines, along with the macros/matchit.vim plugin, " make it easy to navigate the different sections of a spec file " with the % key (thanks to Max Ischenko). let b:match_ignorecase = 0 let b:match_words = \ '^Name:^%description:^%clean:^%(?:auto)?setup:^%build:^%install:^%files:' . \ '^%package:^%preun:^%postun:^%changelog' let &cpo = s:cpo_save unlet s:cpo_save let b:undo_ftplugin = "unlet! b:match_ignorecase b:match_words" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/sql.vim���������������������������������������������������������������0000664�0000000�0000000�00000052157�13204015742�0017647�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" SQL filetype plugin file " Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase) " Version: 12.0 " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> " Last Change: 2017 Mar 07 " Download: http://vim.sourceforge.net/script.php?script_id=454 " For more details please use: " :h sql.txt " " This file should only contain values that are common to all SQL languages " Oracle, Microsoft SQL Server, Sybase ASA/ASE, MySQL, and so on " If additional features are required create: " vimfiles/after/ftplugin/sql.vim (Windows) " .vim/after/ftplugin/sql.vim (Unix) " to override and add any of your own settings. " This file also creates a command, SQLSetType, which allows you to change " SQL dialects on the fly. For example, if I open an Oracle SQL file, it " is color highlighted appropriately. If I open an Informix SQL file, it " will still be highlighted according to Oracles settings. By running: " :SQLSetType sqlinformix " " All files called sqlinformix.vim will be loaded from the indent and syntax " directories. This allows you to easily flip SQL dialects on a per file " basis. NOTE: you can also use completion: " :SQLSetType <tab> " " To change the default dialect, add the following to your vimrc: " let g:sql_type_default = 'sqlanywhere' " " This file also creates a command, SQLGetType, which allows you to " determine what the current dialect is in use. " :SQLGetType " " History " " Version 12.0 (April 2013) " " NF: Added support for "BEGIN TRY ... END TRY ... BEGIN CATCH ... END CATCH " BF: This plugin is designed to be used with other plugins to enable the " SQL completion with Perl, Python, Java, ... The loading mechanism " was not checking if the SQL objects were created, which can lead to " the plugin not loading the SQL support. " " Version 11.0 (May 2013) " " NF: Updated to use SyntaxComplete's new regex support for syntax groups. " " Version 10.0 (Dec 2012) " " NF: Changed all maps to use noremap instead of must map " NF: Changed all visual maps to use xnoremap instead of vnoremap as they " should only be used in visual mode and not select mode. " BF: Most of the maps were using doubled up backslashes before they were " changed to using the search() function, which meant they no longer " worked. " " Version 9.0 " " NF: Completes 'b:undo_ftplugin' " BF: Correctly set cpoptions when creating script " " Version 8.0 " " NF: Improved the matchit plugin regex (Talek) " " Version 7.0 " " NF: Calls the sqlcomplete#ResetCacheSyntax() function when calling " SQLSetType. " " Version 6.0 " " NF: Adds the command SQLGetType " " Version 5.0 " " NF: Adds the ability to choose the keys to control SQL completion, just add " the following to your .vimrc: " let g:ftplugin_sql_omni_key = '<C-C>' " let g:ftplugin_sql_omni_key_right = '<Right>' " let g:ftplugin_sql_omni_key_left = '<Left>' " " BF: format-options - Auto-wrap comments using textwidth was turned off " by mistake. " Only do this when not done yet for this buffer " This ftplugin can be used with other ftplugins. So ensure loading " happens if all elements of this plugin have not yet loaded. if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql' finish endif let s:save_cpo = &cpo set cpo&vim " Disable autowrapping for code, but enable for comments " t Auto-wrap text using textwidth " c Auto-wrap comments using textwidth, inserting the current comment " leader automatically. setlocal formatoptions-=t setlocal formatoptions+=c " Functions/Commands to allow the user to change SQL syntax dialects " through the use of :SQLSetType <tab> for completion. " This works with both Vim 6 and 7. if !exists("*SQL_SetType") " NOTE: You cannot use function! since this file can be " sourced from within this function. That will result in " an error reported by Vim. function SQL_GetList(ArgLead, CmdLine, CursorPos) if !exists('s:sql_list') " Grab a list of files that contain "sql" in their names let list_indent = globpath(&runtimepath, 'indent/*sql*') let list_syntax = globpath(&runtimepath, 'syntax/*sql*') let list_ftplugin = globpath(&runtimepath, 'ftplugin/*sql*') let sqls = "\n".list_indent."\n".list_syntax."\n".list_ftplugin."\n" " Strip out everything (path info) but the filename " Regex " From between two newline characters " Non-greedily grab all characters " Followed by a valid filename \w\+\.\w\+ (sql.vim) " Followed by a newline, but do not include the newline " " Replace it with just the filename (get rid of PATH) " " Recursively, since there are many filenames that contain " the word SQL in the indent, syntax and ftplugin directory let sqls = substitute( sqls, \ '[\n]\%(.\{-}\)\(\w\+\.\w\+\)\n\@=', \ '\1\n', \ 'g' \ ) " Remove duplicates, since sqlanywhere.vim can exist in the " sytax, indent and ftplugin directory, yet we only want " to display the option once let index = match(sqls, '.\{-}\ze\n') while index > -1 " Get the first filename let file = matchstr(sqls, '.\{-}\ze\n', index) " Recursively replace any *other* occurrence of that " filename with nothing (ie remove it) let sqls = substitute(sqls, '\%>'.(index+strlen(file)).'c\<'.file.'\>\n', '', 'g') " Move on to the next filename let index = match(sqls, '.\{-}\ze\n', (index+strlen(file)+1)) endwhile " Sort the list if using version 7 if v:version >= 700 let mylist = split(sqls, "\n") let mylist = sort(mylist) let sqls = join(mylist, "\n") endif let s:sql_list = sqls endif return s:sql_list endfunction function SQL_SetType(name) " User has decided to override default SQL scripts and " specify a vendor specific version " (ie Oracle, Informix, SQL Anywhere, ...) " So check for an remove any settings that prevent the " scripts from being executed, and then source the " appropriate Vim scripts. if exists("b:did_ftplugin") unlet b:did_ftplugin endif if exists("b:current_syntax") " echomsg 'SQLSetType - clearing syntax' syntax clear if exists("b:current_syntax") unlet b:current_syntax endif endif if exists("b:did_indent") " echomsg 'SQLSetType - clearing indent' unlet b:did_indent " Set these values to their defaults setlocal indentkeys& setlocal indentexpr& endif " Ensure the name is in the correct format let new_sql_type = substitute(a:name, \ '\s*\([^\.]\+\)\(\.\w\+\)\?', '\L\1', '') " Do not specify a buffer local variable if it is " the default value if new_sql_type == 'sql' let new_sql_type = 'sqloracle' endif let b:sql_type_override = new_sql_type " Remove any cached SQL since a new sytax will have different " items and groups if !exists('g:loaded_sql_completion') || g:loaded_sql_completion >= 100 call sqlcomplete#ResetCacheSyntax() endif " Vim will automatically source the correct files if we " change the filetype. You cannot do this with setfiletype " since that command will only execute if a filetype has " not already been set. In this case we want to override " the existing filetype. let &filetype = 'sql' if b:sql_compl_savefunc != "" " We are changing the filetype to SQL from some other filetype " which had OMNI completion defined. We need to activate the " SQL completion plugin in order to cache some of the syntax items " while the syntax rules for SQL are active. call sqlcomplete#PreCacheSyntax() endif endfunction command! -nargs=* -complete=custom,SQL_GetList SQLSetType :call SQL_SetType(<q-args>) endif " Functions/Commands to allow the user determine current SQL syntax dialect " This works with both Vim 6 and 7. if !exists("*SQL_GetType") function SQL_GetType() if exists('b:sql_type_override') echomsg "Current SQL dialect in use:".b:sql_type_override else echomsg "Current SQL dialect in use:".g:sql_type_default endif endfunction command! -nargs=0 SQLGetType :call SQL_GetType() endif if exists("b:sql_type_override") " echo 'sourcing buffer ftplugin/'.b:sql_type_override.'.vim' if globpath(&runtimepath, 'ftplugin/'.b:sql_type_override.'.vim') != '' exec 'runtime ftplugin/'.b:sql_type_override.'.vim' " else " echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default' endif elseif exists("g:sql_type_default") " echo 'sourcing global ftplugin/'.g:sql_type_default.'.vim' if globpath(&runtimepath, 'ftplugin/'.g:sql_type_default.'.vim') != '' exec 'runtime ftplugin/'.g:sql_type_default.'.vim' " else " echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default' endif endif " If the above runtime command succeeded, do not load the default settings " as they should have already been loaded from a previous run. if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql' finish endif let b:undo_ftplugin = "setl comments< formatoptions< define< omnifunc<" . \ " | unlet! b:browsefilter b:match_words" " Don't load another plugin for this buffer let b:did_ftplugin = 1 let b:current_ftplugin = 'sql' " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "SQL Files (*.sql)\t*.sql\n" . \ "All Files (*.*)\t*.*\n" endif " Some standard expressions for use with the matchit strings let s:notend = '\%(\<end\s\+\)\@<!' let s:when_no_matched_or_others = '\%(\<when\>\%(\s\+\%(\%(\<not\>\s\+\)\?<matched\>\)\|\<others\>\)\@!\)' let s:or_replace = '\%(or\s\+replace\s\+\)\?' " Define patterns for the matchit macro if !exists("b:match_words") " SQL is generally case insensitive let b:match_ignorecase = 1 " Handle the following: " if " elseif | elsif " else [if] " end if " " [while condition] loop " leave " break " continue " exit " end loop " " for " leave " break " continue " exit " end loop " " do " statements " doend " " case " when " when " default " end case " " merge " when not matched " when matched " " EXCEPTION " WHEN column_not_found THEN " WHEN OTHERS THEN " " begin try " end try " begin catch " end catch " " create[ or replace] procedure|function|event " \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'. " For ColdFusion support setlocal matchpairs+=<:> let b:match_words = &matchpairs . \ ',\%(\<begin\)\%(\s\+\%(try\|catch\)\>\)\@!:\<end\>\W*$,'. \ \ '\<begin\s\+try\>:'. \ '\<end\s\+try\>:'. \ '\<begin\s\+catch\>:'. \ '\<end\s\+catch\>,'. \ \ s:notend . '\<if\>:'. \ '\<elsif\>\|\<elseif\>\|\<else\>:'. \ '\<end\s\+if\>,'. \ \ '\(^\s*\)\@<=\(\<\%(do\|for\|while\|loop\)\>.*\):'. \ '\%(\<exit\>\|\<leave\>\|\<break\>\|\<continue\>\):'. \ '\%(\<doend\>\|\%(\<end\s\+\%(for\|while\|loop\>\)\)\),'. \ \ '\%('. s:notend . '\<case\>\):'. \ '\%('.s:when_no_matched_or_others.'\):'. \ '\%(\<when\s\+others\>\|\<end\s\+case\>\),' . \ \ '\<merge\>:' . \ '\<when\s\+not\s\+matched\>:' . \ '\<when\s\+matched\>,' . \ \ '\%(\<create\s\+' . s:or_replace . '\)\?'. \ '\%(function\|procedure\|event\):'. \ '\<returns\?\>' " \ '\<begin\>\|\<returns\?\>:'. " \ '\<end\>\(;\)\?\s*$' " \ '\<exception\>:'.s:when_no_matched_or_others. " \ ':\<when\s\+others\>,'. " " \ '\%(\<exception\>\|\%('. s:notend . '\<case\>\)\):'. " \ '\%(\<default\>\|'.s:when_no_matched_or_others.'\):'. " \ '\%(\%(\<when\s\+others\>\)\|\<end\s\+case\>\),' . endif " Define how to find the macro definition of a variable using the various " [d, [D, [_CTRL_D and so on features " Match these values ignoring case " ie DECLARE varname INTEGER let &l:define = '\c\<\(VARIABLE\|DECLARE\|IN\|OUT\|INOUT\)\>' " Mappings to move to the next BEGIN ... END block " \W - no characters or digits nnoremap <buffer> <silent> ]] :call search('\c^\s*begin\>', 'W' )<CR> nnoremap <buffer> <silent> [[ :call search('\c^\s*begin\>', 'bW' )<CR> nnoremap <buffer> <silent> ][ :call search('\c^\s*end\W*$', 'W' )<CR> nnoremap <buffer> <silent> [] :call search('\c^\s*end\W*$', 'bW' )<CR> xnoremap <buffer> <silent> ]] :<C-U>exec "normal! gv"<Bar>call search('\c^\s*begin\>', 'W' )<CR> xnoremap <buffer> <silent> [[ :<C-U>exec "normal! gv"<Bar>call search('\c^\s*begin\>', 'bW' )<CR> xnoremap <buffer> <silent> ][ :<C-U>exec "normal! gv"<Bar>call search('\c^\s*end\W*$', 'W' )<CR> xnoremap <buffer> <silent> [] :<C-U>exec "normal! gv"<Bar>call search('\c^\s*end\W*$', 'bW' )<CR> " By default only look for CREATE statements, but allow " the user to override if !exists('g:ftplugin_sql_statements') let g:ftplugin_sql_statements = 'create' endif " Predefined SQL objects what are used by the below mappings using " the ]} style maps. " This global variable allows the users to override it's value " from within their vimrc. " Note, you cannot use \?, since these patterns can be used to search " backwards, you must use \{,1} if !exists('g:ftplugin_sql_objects') let g:ftplugin_sql_objects = 'function,procedure,event,' . \ '\(existing\\|global\s\+temporary\s\+\)\{,1}' . \ 'table,trigger' . \ ',schema,service,publication,database,datatype,domain' . \ ',index,subscription,synchronization,view,variable' endif " Key to trigger SQL completion if !exists('g:ftplugin_sql_omni_key') let g:ftplugin_sql_omni_key = '<C-C>' endif " Key to trigger drill into column list if !exists('g:ftplugin_sql_omni_key_right') let g:ftplugin_sql_omni_key_right = '<Right>' endif " Key to trigger drill out of column list if !exists('g:ftplugin_sql_omni_key_left') let g:ftplugin_sql_omni_key_left = '<Left>' endif " Replace all ,'s with bars, except ones with numbers after them. " This will most likely be a \{,1} string. let s:ftplugin_sql_objects = \ '\c^\s*' . \ '\(\(' . \ substitute(g:ftplugin_sql_statements, ',\d\@!', '\\\\|', 'g') . \ '\)\s\+\(or\s\+replace\s\+\)\{,1}\)\{,1}' . \ '\<\(' . \ substitute(g:ftplugin_sql_objects, ',\d\@!', '\\\\|', 'g') . \ '\)\>' " Mappings to move to the next CREATE ... block exec "nnoremap <buffer> <silent> ]} :call search('".s:ftplugin_sql_objects."', 'W')<CR>" exec "nnoremap <buffer> <silent> [{ :call search('".s:ftplugin_sql_objects."', 'bW')<CR>" " Could not figure out how to use a :call search() string in visual mode " without it ending visual mode " Unfortunately, this will add a entry to the search history exec 'xnoremap <buffer> <silent> ]} /'.s:ftplugin_sql_objects.'<CR>' exec 'xnoremap <buffer> <silent> [{ ?'.s:ftplugin_sql_objects.'<CR>' " Mappings to move to the next COMMENT " " Had to double the \ for the \| separator since this has a special " meaning on maps let b:comment_leader = '\(--\\|\/\/\\|\*\\|\/\*\\|\*\/\)' " Find the start of the next comment let b:comment_start = '^\(\s*'.b:comment_leader.'.*\n\)\@<!'. \ '\(\s*'.b:comment_leader.'\)' " Find the end of the previous comment let b:comment_end = '\(^\s*'.b:comment_leader.'.*\n\)'. \ '\(^\s*'.b:comment_leader.'\)\@!' " Skip over the comment let b:comment_jump_over = "call search('". \ '^\(\s*'.b:comment_leader.'.*\n\)\@<!'. \ "', 'W')" let b:comment_skip_back = "call search('". \ '^\(\s*'.b:comment_leader.'.*\n\)\@<!'. \ "', 'bW')" " Move to the start and end of comments exec 'nnoremap <silent><buffer> ]" :call search('."'".b:comment_start."'".', "W" )<CR>' exec 'nnoremap <silent><buffer> [" :call search('."'".b:comment_end."'".', "W" )<CR>' exec 'xnoremap <silent><buffer> ]" :<C-U>exec "normal! gv"<Bar>call search('."'".b:comment_start."'".', "W" )<CR>' exec 'xnoremap <silent><buffer> [" :<C-U>exec "normal! gv"<Bar>call search('."'".b:comment_end."'".', "W" )<CR>' " Comments can be of the form: " /* " * " */ " or " -- " or " // setlocal comments=s1:/*,mb:*,ex:*/,:--,:// " Set completion with CTRL-X CTRL-O to autoloaded function. if exists('&omnifunc') " Since the SQL completion plugin can be used in conjunction " with other completion filetypes it must record the previous " OMNI function prior to setting up the SQL OMNI function let b:sql_compl_savefunc = &omnifunc " Source it to determine it's version runtime autoload/sqlcomplete.vim " This is used by the sqlcomplete.vim plugin " Source it for it's global functions runtime autoload/syntaxcomplete.vim setlocal omnifunc=sqlcomplete#Complete " Prevent the intellisense plugin from loading let b:sql_vis = 1 if !exists('g:omni_sql_no_default_maps') let regex_extra = '' if exists('g:loaded_syntax_completion') && exists('g:loaded_sql_completion') if g:loaded_syntax_completion > 120 && g:loaded_sql_completion > 140 let regex_extra = '\\w*' endif endif " Static maps which use populate the completion list " using Vim's syntax highlighting rules exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'a <C-\><C-O>:call sqlcomplete#Map("syntax")<CR><C-X><C-O>' exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'k <C-\><C-O>:call sqlcomplete#Map("sqlKeyword'.regex_extra.'")<CR><C-X><C-O>' exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'f <C-\><C-O>:call sqlcomplete#Map("sqlFunction'.regex_extra.'")<CR><C-X><C-O>' exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'o <C-\><C-O>:call sqlcomplete#Map("sqlOption'.regex_extra.'")<CR><C-X><C-O>' exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'T <C-\><C-O>:call sqlcomplete#Map("sqlType'.regex_extra.'")<CR><C-X><C-O>' exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'s <C-\><C-O>:call sqlcomplete#Map("sqlStatement'.regex_extra.'")<CR><C-X><C-O>' " Dynamic maps which use populate the completion list " using the dbext.vim plugin exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'t <C-\><C-O>:call sqlcomplete#Map("table")<CR><C-X><C-O>' exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'p <C-\><C-O>:call sqlcomplete#Map("procedure")<CR><C-X><C-O>' exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'v <C-\><C-O>:call sqlcomplete#Map("view")<CR><C-X><C-O>' exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'c <C-\><C-O>:call sqlcomplete#Map("column")<CR><C-X><C-O>' exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'l <C-\><C-O>:call sqlcomplete#Map("column_csv")<CR><C-X><C-O>' " The next 3 maps are only to be used while the completion window is " active due to the <CR> at the beginning of the map exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'L <C-Y><C-\><C-O>:call sqlcomplete#Map("column_csv")<CR><C-X><C-O>' " <C-Right> is not recognized on most Unix systems, so only create " these additional maps on the Windows platform. " If you would like to use these maps, choose a different key and make " the same map in your vimrc. " if has('win32') exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key_right.' <C-R>=sqlcomplete#DrillIntoTable()<CR>' exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key_left.' <C-R>=sqlcomplete#DrillOutOfColumns()<CR>' " endif " Remove any cached items useful for schema changes exec 'inoremap <buffer> '.g:ftplugin_sql_omni_key.'R <C-\><C-O>:call sqlcomplete#Map("resetCache")<CR><C-X><C-O>' endif if b:sql_compl_savefunc != "" " We are changing the filetype to SQL from some other filetype " which had OMNI completion defined. We need to activate the " SQL completion plugin in order to cache some of the syntax items " while the syntax rules for SQL are active. call sqlcomplete#ResetCacheSyntax() call sqlcomplete#PreCacheSyntax() endif endif let &cpo = s:save_cpo unlet s:save_cpo " vim:sw=4: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/sshconfig.vim���������������������������������������������������������0000664�0000000�0000000�00000000671�13204015742�0021025�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: OpenSSH client configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/sudoers.vim�����������������������������������������������������������0000664�0000000�0000000�00000000666�13204015742�0020532�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: sudoers(5) configuration files " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/svg.vim���������������������������������������������������������������0000664�0000000�0000000�00000002260�13204015742�0017635�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: svg " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "XML Files (*.xml)\t*.xml\n" . \ "All Files (*.*)\t*.*\n" runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif " Change the :browse e filter to primarily show xml-related files. if has("gui_win32") let b:browsefilter="SVG Files (*.svg)\t*.svg\n" . s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/sysctl.vim������������������������������������������������������������0000664�0000000�0000000�00000000705�13204015742�0020361�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: sysctl.conf(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:;,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������neovim-0.2.2/runtime/ftplugin/systemd.vim�����������������������������������������������������������0000664�0000000�0000000�00000000236�13204015742�0020527�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: systemd.unit(5) if !exists('b:did_ftplugin') " Looks a lot like dosini files. runtime! ftplugin/dosini.vim endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/systemverilog.vim�����������������������������������������������������0000664�0000000�0000000�00000000357�13204015742�0021757�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: SystemVerilog " Maintainer: kocha <kocha.lsifrontend@gmail.com> " Last Change: 12-Aug-2013. if exists("b:did_ftplugin") finish endif " Behaves just like Verilog runtime! ftplugin/verilog.vim ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/tcl.vim���������������������������������������������������������������0000664�0000000�0000000�00000001752�13204015742�0017625�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Tcl " Maintainer: Robert L Hicks <sigzero@gmail.com> " Latest Revision: 2009-05-01 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:cpo_save = &cpo set cpo-=C setlocal comments=:# setlocal commentstring=#%s setlocal formatoptions+=croql " Change the browse dialog on Windows to show mainly Tcl-related files if has("gui_win32") let b:browsefilter = "Tcl Source Files (.tcl)\t*.tcl\n" . \ "Tcl Test Files (.test)\t*.test\n" . \ "All Files (*.*)\t*.*\n" endif "----------------------------------------------------------------------------- " Undo the stuff we changed. let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp<" . \ " | unlet! b:browsefilter" " Restore the saved compatibility options. let &cpo = s:cpo_save unlet s:cpo_save " vim: set et ts=4 sw=4 tw=78: ����������������������neovim-0.2.2/runtime/ftplugin/tcsh.vim��������������������������������������������������������������0000664�0000000�0000000�00000002267�13204015742�0020006�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: tcsh " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "csh Files (*.csh)\t*.csh\n" . \ "All Files (*.*)\t*.*\n" runtime! ftplugin/csh.vim ftplugin/csh_*.vim ftplugin/csh/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif " Change the :browse e filter to primarily show tcsh-related files. if has("gui_win32") let b:browsefilter="tcsh Scripts (*.tcsh)\t*.tcsh\n" . s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/terminfo.vim����������������������������������������������������������0000664�0000000�0000000�00000000656�13204015742�0020670�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: terminfo(5) definition " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/tex.vim���������������������������������������������������������������0000664�0000000�0000000�00000003151�13204015742�0017636�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" LaTeX filetype plugin " Language: LaTeX (ft=tex) " Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org> " Version: 1.4 " Last Change: Wed 19 Apr 2006 " URL: http://www.vim.org/script.php?script_id=411 " Only do this when not done yet for this buffer. if exists("b:did_ftplugin") finish endif " Start with plain TeX. This will also define b:did_ftplugin . source $VIMRUNTIME/ftplugin/plaintex.vim " Avoid problems if running in 'compatible' mode. let s:save_cpo = &cpo set cpo&vim let b:undo_ftplugin .= "| setl inex<" " Allow "[d" to be used to find a macro definition: " Recognize plain TeX \def as well as LaTeX \newcommand and \renewcommand . " I may as well add the AMS-LaTeX DeclareMathOperator as well. let &l:define .= '\|\\\(re\)\=new\(boolean\|command\|counter\|environment\|font' \ . '\|if\|length\|savebox\|theorem\(style\)\=\)\s*\*\=\s*{\=' \ . '\|DeclareMathOperator\s*{\=\s*' " Tell Vim how to recognize LaTeX \include{foo} and plain \input bar : let &l:include .= '\|\\include{' " On some file systems, "{" and "}" are inluded in 'isfname'. In case the " TeX file has \include{fname} (LaTeX only), strip everything except "fname". let &l:includeexpr = "substitute(v:fname, '^.\\{-}{\\|}.*', '', 'g')" " The following lines enable the macros/matchit.vim plugin for " extended matching with the % key. " ftplugin/plaintex.vim already defines b:match_skip and b:match_ignorecase " and matches \(, \), \[, \], \{, and \} . if exists("loaded_matchit") let b:match_words .= ',\\begin\s*\({\a\+\*\=}\):\\end\s*\1' endif " exists("loaded_matchit") let &cpo = s:save_cpo unlet s:save_cpo " vim:sts=2:sw=2: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/text.vim��������������������������������������������������������������0000664�0000000�0000000�00000000661�13204015742�0020025�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Text " Maintainer: David Barnett <daviebdawg+vim@gmail.com> " Last Change: 2014 Jul 09 if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = 'setlocal comments< commentstring<' " We intentionally don't set formatoptions-=t since text should wrap as text. " Pseudo comment leaders to indent bulleted lists. setlocal comments=fb:-,fb:* setlocal commentstring= �������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/tmux.vim��������������������������������������������������������������0000664�0000000�0000000�00000000444�13204015742�0020035�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: tmux(1) configuration file " URL: https://github.com/ericpruitt/tmux.vim/ " Maintainer: Eric Pruitt <eric.pruitt@gmail.com> " Last Changed: 2017 Mar 10 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 setlocal commentstring=#\ %s ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/treetop.vim�����������������������������������������������������������0000664�0000000�0000000�00000000640�13204015742�0020520�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Treetop " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-03-14 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim setlocal comments=b:# commentstring=#\ %s formatoptions-=tcroq formatoptions+=l let b:undo_ftplugin = "setl com< cms< fo<" let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/tt2html.vim�����������������������������������������������������������0000664�0000000�0000000�00000000662�13204015742�0020440�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Language: TT2 embedded with HTML " Maintainer: vim-perl <vim-perl@googlegroups.com> " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2013-07-21 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Just use the HTML plugin for now. runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim ������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/tutor.vim�������������������������������������������������������������0000664�0000000�0000000�00000002121�13204015742�0020207�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" vim: fdm=marker " Base: {{{1 call tutor#SetupVim() " Buffer Settings: {{{1 setlocal noreadonly if !exists('g:tutor_debug') || g:tutor_debug == 0 setlocal buftype=nofile setlocal concealcursor+=inv setlocal conceallevel=2 else setlocal buftype= setlocal concealcursor& setlocal conceallevel=0 endif setlocal noundofile setlocal keywordprg=:help setlocal iskeyword=@,-,_ " The user will have to enable the folds himself, but we provide the foldexpr " function. setlocal foldmethod=manual setlocal foldexpr=tutor#TutorFolds() setlocal foldlevel=4 setlocal statusline=%{toupper(expand('%:t:r'))}\ tutorial%= setlocal statusline+=%{tutor#InfoText()} " Load metadata if it exists: {{{1 if filereadable(expand('%').'.json') call tutor#LoadMetadata() endif " Mappings: {{{1 call tutor#SetNormalMappings() " Checks: {{{1 sign define tutorok text=✓ texthl=tutorOK sign define tutorbad text=✗ texthl=tutorX if !exists('g:tutor_debug') || g:tutor_debug == 0 call tutor#ApplyMarks() autocmd! TextChanged,TextChangedI <buffer> call tutor#ApplyMarksOnChanged() endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/udevconf.vim����������������������������������������������������������0000664�0000000�0000000�00000000662�13204015742�0020653�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: udev(8) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/udevperm.vim����������������������������������������������������������0000664�0000000�0000000�00000000660�13204015742�0020667�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: udev(8) permissions file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/udevrules.vim���������������������������������������������������������0000664�0000000�0000000�00000000652�13204015742�0021057�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: udev(8) rules file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/updatedb.vim����������������������������������������������������������0000664�0000000�0000000�00000000673�13204015742�0020634�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: updatedb.conf(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/vb.vim����������������������������������������������������������������0000664�0000000�0000000�00000003563�13204015742�0017454�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: VisualBasic (ft=vb) " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Thu, 22 Nov 2001 12:56:14 W. Europe Standard Time if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 setlocal com=sr:'\ -,mb:'\ \ ,el:'\ \ ,:' " we need this wrapper, as call doesn't allow a count fun! <SID>VbSearch(pattern, flags) let cnt = v:count1 while cnt > 0 call search(a:pattern, a:flags) let cnt = cnt - 1 endwhile endfun let s:cpo_save = &cpo set cpo&vim " NOTE the double escaping \\| nnoremap <buffer> <silent> [[ :call <SID>VbSearch('^\s*\(\(private\|public\)\s\+\)\=\(function\\|sub\)', 'bW')<cr> nnoremap <buffer> <silent> ]] :call <SID>VbSearch('^\s*\(\(private\|public\)\s\+\)\=\(function\\|sub\)', 'W')<cr> nnoremap <buffer> <silent> [] :call <SID>VbSearch('^\s*\<end\>\s\+\(function\\|sub\)', 'bW')<cr> nnoremap <buffer> <silent> ][ :call <SID>VbSearch('^\s*\<end\>\s\+\(function\\|sub\)', 'W')<cr> " matchit support if exists("loaded_matchit") let b:match_ignorecase=1 let b:match_words= \ '\%(^\s*\)\@<=\<if\>.*\<then\>\s*$:\%(^\s*\)\@<=\<else\>:\%(^\s*\)\@<=\<elseif\>:\%(^\s*\)\@<=\<end\>\s\+\<if\>,' . \ '\%(^\s*\)\@<=\<for\>:\%(^\s*\)\@<=\<next\>,' . \ '\%(^\s*\)\@<=\<while\>:\%(^\s*\)\@<=\<wend\>,' . \ '\%(^\s*\)\@<=\<do\>:\%(^\s*\)\@<=\<loop\>\s\+\<while\>,' . \ '\%(^\s*\)\@<=\<select\>\s\+\<case\>:\%(^\s*\)\@<=\<case\>:\%(^\s*\)\@<=\<end\>\s\+\<select\>,' . \ '\%(^\s*\)\@<=\<enum\>:\%(^\s*\)\@<=\<end\>\s\<enum\>,' . \ '\%(^\s*\)\@<=\<with\>:\%(^\s*\)\@<=\<end\>\s\<with\>,' . \ '\%(^\s*\)\@<=\%(\<\%(private\|public\)\>\s\+\)\=\<function\>\s\+\([^ \t(]\+\):\%(^\s*\)\@<=\<\1\>\s*=:\%(^\s*\)\@<=\<end\>\s\+\<function\>,' . \ '\%(^\s*\)\@<=\%(\<\%(private\|public\)\>\s\+\)\=\<sub\>\s\+:\%(^\s*\)\@<=\<end\>\s\+\<sub\>' endif let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/verilog.vim�����������������������������������������������������������0000664�0000000�0000000�00000003671�13204015742�0020514�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Verilog HDL " Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw> " Last Change: 2017 Aug 25 by Chih-Tsun Huang " URL: http://www.cs.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim " " Credits: " Suggestions for improvement, bug reports by " Shao <shaominghai2005@163.com> " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Set 'cpoptions' to allow line continuations let s:cpo_save = &cpo set cpo&vim " Undo the plugin effect let b:undo_ftplugin = "setlocal fo< com< tw<" \ . "| unlet! b:browsefilter b:match_ignorecase b:match_words" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croqlm1 " Set 'comments' to format dashed lists in comments. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// " Format comments to be up to 78 characters long if &textwidth == 0 setlocal tw=78 endif " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" . \ "All Files (*.*)\t*.*\n" endif " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") let b:match_ignorecase=0 let b:match_words= \ '\<begin\>:\<end\>,' . \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' . \ '\<module\>:\<endmodule\>,' . \ '\<if\>:`\@<!\<else\>,' . \ '\<function\>:\<endfunction\>,' . \ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' . \ '\<task\>:\<endtask\>,' . \ '\<specify\>:\<endspecify\>,' . \ '\<config\>:\<endconfig\>,' . \ '\<generate\>:\<endgenerate\>,' . \ '\<fork\>:\<join\>,' . \ '\<primitive\>:\<endprimitive\>,' . \ '\<table\>:\<endtable\>' endif " Reset 'cpoptions' back to the user's setting let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/vhdl.vim��������������������������������������������������������������0000664�0000000�0000000�00000006651�13204015742�0020003�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" VHDL filetype plugin " Language: VHDL " Maintainer: R.Shankar <shankar.pec?gmail.com> " Modified By: Gerald Lai <laigera+vim?gmail.com> " Last Change: 2011 Dec 11 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". "setlocal fo-=t fo+=croqlm1 " Set 'comments' to format dashed lists in comments. "setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// " Format comments to be up to 78 characters long "setlocal tw=75 " Win32 can filter files in the browse dialog "if has("gui_win32") && !exists("b:browsefilter") " let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" . " \ "All Files (*.*)\t*.*\n" "endif " Let the matchit plugin know what items can be matched. if ! exists("b:match_words") && exists("loaded_matchit") let b:match_ignorecase=1 let s:notend = '\%(\<end\s\+\)\@<!' let b:match_words = \ s:notend.'\<if\>:\<elsif\>:\<else\>:\<end\s\+if\>,'. \ s:notend.'\<case\>:\<when\>:\<end\s\+case\>,'. \ s:notend.'\<loop\>:\<end\s\+loop\>,'. \ s:notend.'\<for\>:\<end\s\+for\>,'. \ s:notend.'\<generate\>:\<end\s\+generate\>,'. \ s:notend.'\<record\>:\<end\s\+record\>,'. \ s:notend.'\<units\>:\<end\s\+units\>,'. \ s:notend.'\<process\>:\<end\s\+process\>,'. \ s:notend.'\<block\>:\<end\s\+block\>,'. \ s:notend.'\<function\>:\<end\s\+function\>,'. \ s:notend.'\<entity\>:\<end\s\+entity\>,'. \ s:notend.'\<component\>:\<end\s\+component\>,'. \ s:notend.'\<architecture\>:\<end\s\+architecture\>,'. \ s:notend.'\<package\>:\<end\s\+package\>,'. \ s:notend.'\<procedure\>:\<end\s\+procedure\>,'. \ s:notend.'\<configuration\>:\<end\s\+configuration\>' endif " count repeat function! <SID>CountWrapper(cmd) let i = v:count1 if a:cmd[0] == ":" while i > 0 execute a:cmd let i = i - 1 endwhile else execute "normal! gv\<Esc>" execute "normal ".i.a:cmd let curcol = col(".") let curline = line(".") normal! gv call cursor(curline, curcol) endif endfunction " explore motion " keywords: "architecture", "block", "configuration", "component", "entity", "function", "package", "procedure", "process", "record", "units" let b:vhdl_explore = '\%(architecture\|block\|configuration\|component\|entity\|function\|package\|procedure\|process\|record\|units\)' noremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR> noremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR> noremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR> noremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR> vnoremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper('[[')<CR> vnoremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(']]')<CR> vnoremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper('[]')<CR> vnoremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper('][')<CR> let &cpo = s:cpo_save unlet s:cpo_save ���������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/vim.vim���������������������������������������������������������������0000664�0000000�0000000�00000006053�13204015742�0017635�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2014 Sep 07 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo-=C let b:undo_ftplugin = "setl fo< isk< com< tw< commentstring< keywordprg<" \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " To allow tag lookup via CTRL-] for autoload functions, '#' must be a " keyword character. E.g., for netrw#Nread(). setlocal isk+=# " Set 'comments' to format dashed lists in comments setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" " Format comments to be up to 78 characters long if &tw == 0 setlocal tw=78 endif " Comments start with a double quote setlocal commentstring=\"%s " Prefer Vim help instead of manpages. setlocal keywordprg=:help " Move around functions. nnoremap <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR> vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR> nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR> vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR> nnoremap <silent><buffer> [] m':call search('^\s*endf*\%[unction]\>', "bW")<CR> vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "bW")<CR> nnoremap <silent><buffer> ][ m':call search('^\s*endf*\%[unction]\>', "W")<CR> vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "W")<CR> " Move around comments nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = \ '\<fu\%[nction]\>:\<retu\%[rn]\>:\<endf\%[unction]\>,' . \ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' . \ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' . \ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' . \ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' . \ '(:)' " Ignore syntax region commands and settings, any 'en*' would clobber " if-endif. " - set spl=de,en " - au! FileType javascript syntax region foldBraces start=/{/ end=/}/ … let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") \ =~? "comment\\|string\\|vimSynReg\\|vimSet"' endif let &cpo = s:cpo_save unlet s:cpo_save " removed this, because 'cpoptions' is a global option. " setlocal cpo+=M " makes \%( match \) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/vroom.vim�������������������������������������������������������������0000664�0000000�0000000�00000001634�13204015742�0020204�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Vroom (vim testing and executable documentation) " Maintainer: David Barnett (https://github.com/google/vim-ft-vroom) " Last Change: 2014 Jul 23 if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo-=C let b:undo_ftplugin = 'setlocal formatoptions< shiftwidth< softtabstop<' . \ ' expandtab< iskeyword< comments< commentstring<' setlocal formatoptions-=t " The vroom interpreter doesn't accept anything but 2-space indent. setlocal shiftwidth=2 setlocal softtabstop=2 setlocal expandtab " To allow tag lookup and autocomplete for whole autoload functions, '#' must be " a keyword character. This also conforms to the behavior of ftplugin/vim.vim. setlocal iskeyword+=# " Vroom files have no comments (text is inert documentation unless indented). setlocal comments= setlocal commentstring= let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/xdefaults.vim���������������������������������������������������������0000664�0000000�0000000�00000000741�13204015742�0021037�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: X resources files like ~/.Xdefaults (xrdb) " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=s1:/*,mb:*,ex:*/,:! commentstring& inc& setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save �������������������������������neovim-0.2.2/runtime/ftplugin/xf86conf.vim����������������������������������������������������������0000664�0000000�0000000�00000000662�13204015742�0020503�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: XFree86 Configuration File " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/xhtml.vim�������������������������������������������������������������0000664�0000000�0000000�00000003764�13204015742�0020204�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: xhtml " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" . \ "XML Files (*.xml)\t*.xml\n" . \ "All Files (*.*)\t*.*\n" let s:match_words = "" runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim unlet b:did_ftplugin " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin unlet b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter unlet b:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words unlet b:match_words endif runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim let b:did_ftplugin = 1 " Combine the new set of values with those previously included. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter . s:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words . "," . s:match_words endif " Load the combined list of match_words for matchit.vim if exists("loaded_matchit") let b:match_words = s:match_words endif " Change the :browse e filter to primarily show tcsh-related files. if has("gui_win32") let b:browsefilter="XHTML files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" . s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo ������������neovim-0.2.2/runtime/ftplugin/xinetd.vim������������������������������������������������������������0000664�0000000�0000000�00000000734�13204015742�0020335�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: xinetd.conf(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*include setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������neovim-0.2.2/runtime/ftplugin/xml.vim���������������������������������������������������������������0000664�0000000�0000000�00000003567�13204015742�0017651�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: xml " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C setlocal commentstring=<!--%s--> setlocal comments=s:<!--,m:\ \ \ \ \ ,e:--> setlocal formatoptions-=t if !exists("g:ft_xml_autocomment") || (g:ft_xml_autocomment == 1) setlocal formatoptions+=croql endif " XML: thanks to Johannes Zellner and Akbar Ibrahim " - case sensitive " - don't match empty tags <fred/> " - match <!--, --> style comments (but not --, --) " - match <!, > inlined dtd's. This is not perfect, as it " gets confused for example by " <!ENTITY gt ">"> if exists("loaded_matchit") let b:match_ignorecase=0 let b:match_words = \ '<:>,' . \ '<\@<=!\[CDATA\[:]]>,'. \ '<\@<=!--:-->,'. \ '<\@<=?\k\+:?>,'. \ '<\@<=\([^ \t>/]\+\)\%(\s\+[^>]*\%([^/]>\|$\)\|>\|$\):<\@<=/\1>,'. \ '<\@<=\%([^ \t>/]\+\)\%(\s\+[^/>]*\|$\):/>' endif " " For Omni completion, by Mikolaj Machowski. if exists('&ofu') setlocal ofu=xmlcomplete#CompleteTags endif command! -nargs=+ XMLns call xmlcomplete#CreateConnection(<f-args>) command! -nargs=? XMLent call xmlcomplete#CreateEntConnection(<f-args>) " Change the :browse e filter to primarily show xml-related files. if has("gui_win32") let b:browsefilter="XML Files (*.xml)\t*.xml\n" . \ "DTD Files (*.dtd)\t*.dtd\n" . \ "All Files (*.*)\t*.*\n" endif " Undo the stuff we changed. let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" . \ " | unlet! b:match_ignorecase b:match_words b:browsefilter" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo �����������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/xmodmap.vim�����������������������������������������������������������0000664�0000000�0000000�00000000662�13204015742�0020507�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: xmodmap(1) definition file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:! commentstring=!\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/xs.vim����������������������������������������������������������������0000664�0000000�0000000�00000000721�13204015742�0017470�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: XS (Perl extension interface language) " Maintainer: vim-perl <vim-perl@googlegroups.com> " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2013-07-21 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Just use the C plugin for now. runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim �����������������������������������������������neovim-0.2.2/runtime/ftplugin/xsd.vim���������������������������������������������������������������0000664�0000000�0000000�00000002223�13204015742�0017633�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: xsd " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "XML Files (*.xml)\t*.xml\n" . \ "All Files (*.*)\t*.*\n" runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif " Change the :browse e filter to primarily show xsd-related files. if has("gui_win32") let b:browsefilter="XSD Files (*.xsd)\t*.xsd\n" . s:browsefilter endif let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/xslt.vim��������������������������������������������������������������0000664�0000000�0000000�00000001033�13204015742�0020025�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: xslt " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim let b:did_ftplugin = 1 " Change the :browse e filter to primarily show xsd-related files. if has("gui_win32") && exists("b:browsefilter") let b:browsefilter="XSLT Files (*.xsl,*.xslt)\t*.xsl;*.xslt\n" . b:browsefilter endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/yaml.vim��������������������������������������������������������������0000664�0000000�0000000�00000000720�13204015742�0017777�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: YAML (YAML Ain't Markup Language) " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=:# commentstring=#\ %s expandtab setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������neovim-0.2.2/runtime/ftplugin/zimbu.vim�������������������������������������������������������������0000664�0000000�0000000�00000012246�13204015742�0020171�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Zimbu " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2012 Sep 08 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Using line continuation here. let s:cpo_save = &cpo set cpo-=C let b:undo_ftplugin = "setl fo< com< ofu< efm< tw< et< sts< sw<" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Set completion with CTRL-X CTRL-O to autoloaded function. if exists('&ofu') setlocal ofu=ccomplete#Complete endif " Set 'comments' to format dashed lists in comments. " And to keep Zudocu comment characters. setlocal comments=sO:#\ -,mO:#\ \ ,:#=,:#-,:#%,:# setlocal errorformat^=%f\ line\ %l\ col\ %c:\ %m,ERROR:\ %m " When the matchit plugin is loaded, this makes the % command skip parens and " braces in comments. let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=\(}\|\<UNTIL\>\)' let b:match_skip = 's:comment\|string\|zimbuchar' setlocal tw=78 setlocal et sts=2 sw=2 " Does replace when a dot, space or closing brace is typed. func! GCUpperDot(what) if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != '.' && v:char != ')' && v:char != '}' && v:char != ',' " no space or dot after the typed text let g:got_char = v:char return a:what endif return GCUpperCommon(a:what) endfunc " Does not replace when a dot is typed. func! GCUpper(what) if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != ')' && v:char != ',' " no space or other "terminating" character after the typed text let g:got_char = v:char return a:what endif return GCUpperCommon(a:what) endfunc " Only replaces when a space is typed. func! GCUpperSpace(what) if v:char != ' ' " no space after the typed text let g:got_char = v:char return a:what endif return GCUpperCommon(a:what) endfunc func! GCUpperCommon(what) let col = col(".") - strlen(a:what) if col > 1 && getline('.')[col - 2] != ' ' " no space before the typed text let g:got_char = 999 return a:what endif let synName = synIDattr(synID(line("."), col(".") - 2, 1), "name") if synName =~ 'Comment\|String\|zimbuCregion\|\<c' " inside a comment or C code let g:got_char = 777 return a:what endif let g:got_char = 1111 return toupper(a:what) endfunc iabbr <buffer> <expr> alias GCUpperSpace("alias") iabbr <buffer> <expr> arg GCUpperDot("arg") iabbr <buffer> <expr> break GCUpper("break") iabbr <buffer> <expr> case GCUpperSpace("case") iabbr <buffer> <expr> catch GCUpperSpace("catch") iabbr <buffer> <expr> check GCUpperDot("check") iabbr <buffer> <expr> class GCUpperSpace("class") iabbr <buffer> <expr> interface GCUpperSpace("interface") iabbr <buffer> <expr> implements GCUpperSpace("implements") iabbr <buffer> <expr> shared GCUpperSpace("shared") iabbr <buffer> <expr> continue GCUpper("continue") iabbr <buffer> <expr> default GCUpper("default") iabbr <buffer> <expr> extends GCUpper("extends") iabbr <buffer> <expr> do GCUpper("do") iabbr <buffer> <expr> else GCUpper("else") iabbr <buffer> <expr> elseif GCUpperSpace("elseif") iabbr <buffer> <expr> enum GCUpperSpace("enum") iabbr <buffer> <expr> exit GCUpper("exit") iabbr <buffer> <expr> false GCUpper("false") iabbr <buffer> <expr> fail GCUpper("fail") iabbr <buffer> <expr> finally GCUpper("finally") iabbr <buffer> <expr> for GCUpperSpace("for") iabbr <buffer> <expr> func GCUpperSpace("func") iabbr <buffer> <expr> if GCUpperSpace("if") iabbr <buffer> <expr> import GCUpperSpace("import") iabbr <buffer> <expr> in GCUpperSpace("in") iabbr <buffer> <expr> io GCUpperDot("io") iabbr <buffer> <expr> main GCUpper("main") iabbr <buffer> <expr> module GCUpperSpace("module") iabbr <buffer> <expr> new GCUpper("new") iabbr <buffer> <expr> nil GCUpper("nil") iabbr <buffer> <expr> ok GCUpper("ok") iabbr <buffer> <expr> proc GCUpperSpace("proc") iabbr <buffer> <expr> proceed GCUpper("proceed") iabbr <buffer> <expr> return GCUpper("return") iabbr <buffer> <expr> step GCUpperSpace("step") iabbr <buffer> <expr> switch GCUpperSpace("switch") iabbr <buffer> <expr> sys GCUpperDot("sys") iabbr <buffer> <expr> this GCUpperDot("this") iabbr <buffer> <expr> throw GCUpperSpace("throw") iabbr <buffer> <expr> try GCUpper("try") iabbr <buffer> <expr> to GCUpperSpace("to") iabbr <buffer> <expr> true GCUpper("true") iabbr <buffer> <expr> until GCUpperSpace("until") iabbr <buffer> <expr> while GCUpperSpace("while") iabbr <buffer> <expr> repeat GCUpper("repeat") nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR> nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR> " Using a function makes sure the search pattern is restored func! ZimbuGoStartBlock() ?^\s*\(FUNC\|PROC\|MAIN\|ENUM\|CLASS\|INTERFACE\)\> endfunc func! ZimbuGoEndBlock() /^\s*\(FUNC\|PROC\|MAIN\|ENUM\|CLASS\|INTERFACE\)\> endfunc let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugin/zsh.vim���������������������������������������������������������������0000664�0000000�0000000�00000001522�13204015742�0017642�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype plugin file " Language: Zsh shell script " Maintainer: Christian Brabandt <cb@256bit.org> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2015-05-29 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-zsh if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let b:match_words = \ &matchpairs \ . ',\<if\>:\<elif\>:\<else\>:\<fi\>' \ . ',\<case\>:^\s*([^)]*):\<esac\>' \ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>' let b:match_skip = 's:comment\|string\|heredoc\|subst' let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/ftplugof.vim�������������������������������������������������������������������0000664�0000000�0000000�00000000521�13204015742�0017032�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim support file to switch off loading plugins for file types " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2011 Oct 20 if exists("did_load_ftplugin") unlet did_load_ftplugin endif " Remove all autocommands in the filetypeplugin group, if any exist. if exists("#filetypeplugin") silent! au! filetypeplugin * endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent.vim���������������������������������������������������������������������0000664�0000000�0000000�00000001377�13204015742�0016477�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim support file to switch on loading indent files for file types " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2008 Feb 22 if exists("did_indent_on") finish endif let did_indent_on = 1 augroup filetypeindent au FileType * call s:LoadIndent() func! s:LoadIndent() if exists("b:undo_indent") exe b:undo_indent unlet! b:undo_indent b:did_indent endif let s = expand("<amatch>") if s != "" if exists("b:did_indent") unlet b:did_indent endif " When there is a dot it is used to separate filetype names. Thus for " "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim". for name in split(s, '\.') exe 'runtime! indent/' . name . '.vim' endfor endif endfunc augroup END �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0015752�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/README.txt��������������������������������������������������������������0000664�0000000�0000000�00000003147�13204015742�0017455�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This directory contains files to automatically compute the indent for a type of file. If you want to add your own indent file for your personal use, read the docs at ":help indent-expression". Looking at the existing files should give you inspiration. If you make a new indent file which would be useful for others, please send it to Bram@vim.org. Include instructions for detecting the file type for this language, by file name extension or by checking a few lines in the file. And please stick to the rules below. If you have remarks about an existing file, send them to the maintainer of that file. Only when you get no response send a message to Bram@vim.org. If you are the maintainer of an indent file and make improvements, e-mail the new version to Bram@vim.org. Rules for making an indent file: You should use this check for "b:did_indent": " Only load this indent file when no other was loaded yet. if exists("b:did_indent") finish endif let b:did_indent = 1 Always use ":setlocal" to set 'indentexpr'. This avoids it being carried over to other buffers. To trigger the indenting after typing a word like "endif", add the word to the 'cinkeys' option with "+=". You normally set 'indentexpr' to evaluate a function and then define that function. That function only needs to be defined once for as long as Vim is running. Add a test if the function exists and use ":finish", like this: if exists("*GetMyIndent") finish endif The user may have several options set unlike you, try to write the file such that it works with any option settings. Also be aware of certain features not being compiled in. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/aap.vim�����������������������������������������������������������������0000664�0000000�0000000�00000000411�13204015742�0017224�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Aap recipe " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2005 Jun 24 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Works mostly like Python. runtime! indent/python.vim �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/ada.vim�����������������������������������������������������������������0000664�0000000�0000000�00000025743�13204015742�0017227�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"------------------------------------------------------------------------------ " Description: Vim Ada indent file " Language: Ada (2005) " $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ " Copyright: Copyright (C) 2006 Martin Krischik " Maintainer: Martin Krischik <krischik@users.sourceforge.net> " Neil Bird <neil@fnxweb.com> " Ned Okie <nokie@radford.edu> " $Author: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 " $Revision: 887 $ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/indent/ada.vim $ " History: 24.05.2006 MK Unified Headers " 16.07.2006 MK Ada-Mode as vim-ball " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested to save on spaces " 19.09.2007 NO g: missing before ada#Comment " Help Page: ft-vim-indent "------------------------------------------------------------------------------ " ToDo: " Verify handling of multi-line exprs. and recovery upon the final ';'. " Correctly find comments given '"' and "" ==> " syntax. " Combine the two large block-indent functions into one? "------------------------------------------------------------------------------ " Only load this indent file when no other was loaded. if exists("b:did_indent") || version < 700 finish endif let b:did_indent = 45 setlocal indentexpr=GetAdaIndent() setlocal indentkeys-=0{,0} setlocal indentkeys+=0=~then,0=~end,0=~elsif,0=~when,0=~exception,0=~begin,0=~is,0=~record " Only define the functions once. if exists("*GetAdaIndent") finish endif let s:keepcpo= &cpo set cpo&vim if exists("g:ada_with_gnat_project_files") let s:AdaBlockStart = '^\s*\(if\>\|while\>\|else\>\|elsif\>\|loop\>\|for\>.*\<\(loop\|use\)\>\|declare\>\|begin\>\|type\>.*\<is\>[^;]*$\|\(type\>.*\)\=\<record\>\|procedure\>\|function\>\|accept\>\|do\>\|task\>\|package\>\|project\>\|then\>\|when\>\|is\>\)' else let s:AdaBlockStart = '^\s*\(if\>\|while\>\|else\>\|elsif\>\|loop\>\|for\>.*\<\(loop\|use\)\>\|declare\>\|begin\>\|type\>.*\<is\>[^;]*$\|\(type\>.*\)\=\<record\>\|procedure\>\|function\>\|accept\>\|do\>\|task\>\|package\>\|then\>\|when\>\|is\>\)' endif " Section: s:MainBlockIndent {{{1 " " Try to find indent of the block we're in " prev_indent = the previous line's indent " prev_lnum = previous line (to start looking on) " blockstart = expr. that indicates a possible start of this block " stop_at = if non-null, if a matching line is found, gives up! " No recursive previous block analysis: simply look for a valid line " with a lesser or equal indent than we currently (on prev_lnum) have. " This shouldn't work as well as it appears to with lines that are currently " nowhere near the correct indent (e.g., start of line)! " Seems to work OK as it 'starts' with the indent of the /previous/ line. function s:MainBlockIndent (prev_indent, prev_lnum, blockstart, stop_at) let lnum = a:prev_lnum let line = substitute( getline(lnum), g:ada#Comment, '', '' ) while lnum > 1 if a:stop_at != '' && line =~ '^\s*' . a:stop_at && indent(lnum) < a:prev_indent return a:prev_indent elseif line =~ '^\s*' . a:blockstart let ind = indent(lnum) if ind < a:prev_indent return ind endif endif let lnum = prevnonblank(lnum - 1) " Get previous non-blank/non-comment-only line while 1 let line = substitute( getline(lnum), g:ada#Comment, '', '' ) if line !~ '^\s*$' && line !~ '^\s*#' break endif let lnum = prevnonblank(lnum - 1) if lnum <= 0 return a:prev_indent endif endwhile endwhile " Fallback - just move back one return a:prev_indent - shiftwidth() endfunction MainBlockIndent " Section: s:EndBlockIndent {{{1 " " Try to find indent of the block we're in (and about to complete), " including handling of nested blocks. Works on the 'end' of a block. " prev_indent = the previous line's indent " prev_lnum = previous line (to start looking on) " blockstart = expr. that indicates a possible start of this block " blockend = expr. that indicates a possible end of this block function s:EndBlockIndent( prev_indent, prev_lnum, blockstart, blockend ) let lnum = a:prev_lnum let line = getline(lnum) let ends = 0 while lnum > 1 if getline(lnum) =~ '^\s*' . a:blockstart let ind = indent(lnum) if ends <= 0 if ind < a:prev_indent return ind endif else let ends = ends - 1 endif elseif getline(lnum) =~ '^\s*' . a:blockend let ends = ends + 1 endif let lnum = prevnonblank(lnum - 1) " Get previous non-blank/non-comment-only line while 1 let line = getline(lnum) let line = substitute( line, g:ada#Comment, '', '' ) if line !~ '^\s*$' break endif let lnum = prevnonblank(lnum - 1) if lnum <= 0 return a:prev_indent endif endwhile endwhile " Fallback - just move back one return a:prev_indent - shiftwidth() endfunction EndBlockIndent " Section: s:StatementIndent {{{1 " " Return indent of previous statement-start " (after we've indented due to multi-line statements). " This time, we start searching on the line *before* the one given (which is " the end of a statement - we want the previous beginning). function s:StatementIndent( current_indent, prev_lnum ) let lnum = a:prev_lnum while lnum > 0 let prev_lnum = lnum let lnum = prevnonblank(lnum - 1) " Get previous non-blank/non-comment-only line while 1 let line = substitute( getline(lnum), g:ada#Comment, '', '' ) if line !~ '^\s*$' && line !~ '^\s*#' break endif let lnum = prevnonblank(lnum - 1) if lnum <= 0 return a:current_indent endif endwhile " Leave indent alone if our ';' line is part of a ';'-delineated " aggregate (e.g., procedure args.) or first line after a block start. if line =~ s:AdaBlockStart || line =~ '(\s*$' return a:current_indent endif if line !~ '[.=(]\s*$' let ind = indent(prev_lnum) if ind < a:current_indent return ind endif endif endwhile " Fallback - just use current one return a:current_indent endfunction StatementIndent " Section: GetAdaIndent {{{1 " " Find correct indent of a new line based upon what went before " function GetAdaIndent() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) let ind = indent(lnum) let package_line = 0 " Get previous non-blank/non-comment-only/non-cpp line while 1 let line = substitute( getline(lnum), g:ada#Comment, '', '' ) if line !~ '^\s*$' && line !~ '^\s*#' break endif let lnum = prevnonblank(lnum - 1) if lnum <= 0 return ind endif endwhile " Get default indent (from prev. line) let ind = indent(lnum) let initind = ind " Now check what's on the previous line if line =~ s:AdaBlockStart || line =~ '(\s*$' " Check for false matches to AdaBlockStart let false_match = 0 if line =~ '^\s*\(procedure\|function\|package\)\>.*\<is\s*new\>' " Generic instantiation let false_match = 1 elseif line =~ ')\s*;\s*$' || line =~ '^\([^(]*([^)]*)\)*[^(]*;\s*$' " forward declaration let false_match = 1 endif " Move indent in if ! false_match let ind = ind + shiftwidth() endif elseif line =~ '^\s*\(case\|exception\)\>' " Move indent in twice (next 'when' will move back) let ind = ind + 2 * shiftwidth() elseif line =~ '^\s*end\s*record\>' " Move indent back to tallying 'type' preceeding the 'record'. " Allow indent to be equal to 'end record's. let ind = s:MainBlockIndent( ind+shiftwidth(), lnum, 'type\>', '' ) elseif line =~ '\(^\s*new\>.*\)\@<!)\s*[;,]\s*$' " Revert to indent of line that started this parenthesis pair exe lnum exe 'normal! $F)%' if getline('.') =~ '^\s*(' " Dire layout - use previous indent (could check for g:ada#Comment here) let ind = indent( prevnonblank( line('.')-1 ) ) else let ind = indent('.') endif exe v:lnum elseif line =~ '[.=(]\s*$' " A statement continuation - move in one let ind = ind + shiftwidth() elseif line =~ '^\s*new\>' " Multiple line generic instantiation ('package blah is\nnew thingy') let ind = s:StatementIndent( ind - shiftwidth(), lnum ) elseif line =~ ';\s*$' " Statement end (but not 'end' ) - try to find current statement-start indent let ind = s:StatementIndent( ind, lnum ) endif " Check for potential argument list on next line let continuation = (line =~ '[A-Za-z0-9_]\s*$') " Check current line; search for simplistic matching start-of-block let line = getline(v:lnum) if line =~ '^\s*#' " Start of line for ada-pp let ind = 0 elseif continuation && line =~ '^\s*(' " Don't do this if we've already indented due to the previous line if ind == initind let ind = ind + shiftwidth() endif elseif line =~ '^\s*\(begin\|is\)\>' let ind = s:MainBlockIndent( ind, lnum, '\(procedure\|function\|declare\|package\|task\)\>', 'begin\>' ) elseif line =~ '^\s*record\>' let ind = s:MainBlockIndent( ind, lnum, 'type\>\|for\>.*\<use\>', '' ) + shiftwidth() elseif line =~ '^\s*\(else\|elsif\)\>' let ind = s:MainBlockIndent( ind, lnum, 'if\>', '' ) elseif line =~ '^\s*when\>' " Align 'when' one /in/ from matching block start let ind = s:MainBlockIndent( ind, lnum, '\(case\|exception\)\>', '' ) + shiftwidth() elseif line =~ '^\s*end\>\s*\<if\>' " End of if statements let ind = s:EndBlockIndent( ind, lnum, 'if\>', 'end\>\s*\<if\>' ) elseif line =~ '^\s*end\>\s*\<loop\>' " End of loops let ind = s:EndBlockIndent( ind, lnum, '\(\(while\|for\)\>.*\)\?\<loop\>', 'end\>\s*\<loop\>' ) elseif line =~ '^\s*end\>\s*\<record\>' " End of records let ind = s:EndBlockIndent( ind, lnum, '\(type\>.*\)\=\<record\>', 'end\>\s*\<record\>' ) elseif line =~ '^\s*end\>\s*\<procedure\>' " End of procedures let ind = s:EndBlockIndent( ind, lnum, 'procedure\>.*\<is\>', 'end\>\s*\<procedure\>' ) elseif line =~ '^\s*end\>\s*\<case\>' " End of case statement let ind = s:EndBlockIndent( ind, lnum, 'case\>.*\<is\>', 'end\>\s*\<case\>' ) elseif line =~ '^\s*end\>' " General case for end let ind = s:MainBlockIndent( ind, lnum, '\(if\|while\|for\|loop\|accept\|begin\|record\|case\|exception\|package\)\>', '' ) elseif line =~ '^\s*exception\>' let ind = s:MainBlockIndent( ind, lnum, 'begin\>', '' ) elseif line =~ '^\s*then\>' let ind = s:MainBlockIndent( ind, lnum, 'if\>', '' ) endif return ind endfunction GetAdaIndent let &cpo = s:keepcpo unlet s:keepcpo finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker �����������������������������neovim-0.2.2/runtime/indent/ant.vim�����������������������������������������������������������������0000664�0000000�0000000�00000000442�13204015742�0017251�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: ANT files " Maintainer: David Fishburn <fishburn@ianywhere.com> " Last Change: Thu May 15 2003 10:02:54 PM " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Use XML formatting rules runtime! indent/xml.vim ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/automake.vim������������������������������������������������������������0000664�0000000�0000000�00000000363�13204015742�0020277�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: automake " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:did_indent") finish endif " same as makefile indenting for now. runtime! indent/make.vim �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/awk.vim�����������������������������������������������������������������0000664�0000000�0000000�00000017137�13204015742�0017262�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" vim: set sw=3 sts=3: " Awk indent script. It can handle multi-line statements and expressions. " It works up to the point where the distinction between correct/incorrect " and personal taste gets fuzzy. Drop me an e-mail for bug reports and " reasonable style suggestions. " " Bugs: " ===== " - Some syntax errors may cause erratic indentation. " - Same for very unusual but syntacticly correct use of { } " - In some cases it's confused by the use of ( and { in strings constants " - This version likes the closing brace of a multiline pattern-action be on " character position 1 before the following pattern-action combination is " formatted " Author: " ======= " Erik Janssen, ejanssen@itmatters.nl " " History: " ======== " 26-04-2002 Got initial version working reasonably well " 29-04-2002 Fixed problems in function headers and max line width " Added support for two-line if's without curly braces " Fixed hang: 2011 Aug 31 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetAwkIndent() " Mmm, copied from the tcl indent program. Is this okay? setlocal indentkeys-=:,0# " Only define the function once. if exists("*GetAwkIndent") finish endif " This function contains a lot of exit points. It checks for simple cases " first to get out of the function as soon as possible, thereby reducing the " number of possibilities later on in the difficult parts function! GetAwkIndent() " Find previous line and get it's indentation let prev_lineno = s:Get_prev_line( v:lnum ) if prev_lineno == 0 return 0 endif let prev_data = getline( prev_lineno ) let ind = indent( prev_lineno ) " Increase indent if the previous line contains an opening brace. Search " for this brace the hard way to prevent errors if the previous line is a " 'pattern { action }' (simple check match on /{/ increases the indent then) if s:Get_brace_balance( prev_data, '{', '}' ) > 0 return ind + shiftwidth() endif let brace_balance = s:Get_brace_balance( prev_data, '(', ')' ) " If prev line has positive brace_balance and starts with a word (keyword " or function name), align the current line on the first '(' of the prev " line if brace_balance > 0 && s:Starts_with_word( prev_data ) return s:Safe_indent( ind, s:First_word_len(prev_data), getline(v:lnum)) endif " If this line starts with an open brace bail out now before the line " continuation checks. if getline( v:lnum ) =~ '^\s*{' return ind endif " If prev line seems to be part of multiline statement: " 1. Prev line is first line of a multiline statement " -> attempt to indent on first ' ' or '(' of prev line, just like we " indented the positive brace balance case above " 2. Prev line is not first line of a multiline statement " -> copy indent of prev line let continue_mode = s:Seems_continuing( prev_data ) if continue_mode > 0 if s:Seems_continuing( getline(s:Get_prev_line( prev_lineno )) ) " Case 2 return ind else " Case 1 if continue_mode == 1 " Need continuation due to comma, backslash, etc return s:Safe_indent( ind, s:First_word_len(prev_data), getline(v:lnum)) else " if/for/while without '{' return ind + shiftwidth() endif endif endif " If the previous line doesn't need continuation on the current line we are " on the start of a new statement. We have to make sure we align with the " previous statement instead of just the previous line. This is a bit " complicated because the previous statement might be multi-line. " " The start of a multiline statement can be found by: " " 1 If the previous line contains closing braces and has negative brace " balance, search backwards until cumulative brace balance becomes zero, " take indent of that line " 2 If the line before the previous needs continuation search backward " until that's not the case anymore. Take indent of one line down. " Case 1 if prev_data =~ ')' && brace_balance < 0 while brace_balance != 0 && prev_lineno > 0 let prev_lineno = s:Get_prev_line( prev_lineno ) let prev_data = getline( prev_lineno ) let brace_balance=brace_balance+s:Get_brace_balance(prev_data,'(',')' ) endwhile let ind = indent( prev_lineno ) else " Case 2 if s:Seems_continuing( getline( prev_lineno - 1 ) ) let prev_lineno = prev_lineno - 2 let prev_data = getline( prev_lineno ) while prev_lineno > 0 && (s:Seems_continuing( prev_data ) > 0) let prev_lineno = s:Get_prev_line( prev_lineno ) let prev_data = getline( prev_lineno ) endwhile let ind = indent( prev_lineno + 1 ) endif endif " Decrease indent if this line contains a '}'. if getline(v:lnum) =~ '^\s*}' let ind = ind - shiftwidth() endif return ind endfunction " Find the open and close braces in this line and return how many more open- " than close braces there are. It's also used to determine cumulative balance " across multiple lines. function! s:Get_brace_balance( line, b_open, b_close ) let line2 = substitute( a:line, a:b_open, "", "g" ) let openb = strlen( a:line ) - strlen( line2 ) let line3 = substitute( line2, a:b_close, "", "g" ) let closeb = strlen( line2 ) - strlen( line3 ) return openb - closeb endfunction " Find out whether the line starts with a word (i.e. keyword or function " call). Might need enhancements here. function! s:Starts_with_word( line ) if a:line =~ '^\s*[a-zA-Z_0-9]\+\s*(' return 1 endif return 0 endfunction " Find the length of the first word in a line. This is used to be able to " align a line relative to the 'print ' or 'if (' on the previous line in case " such a statement spans multiple lines. " Precondition: only to be used on lines where 'Starts_with_word' returns 1. function! s:First_word_len( line ) let white_end = matchend( a:line, '^\s*' ) if match( a:line, '^\s*func' ) != -1 let word_end = matchend( a:line, '[a-z]\+\s\+[a-zA-Z_0-9]\+[ (]*' ) else let word_end = matchend( a:line, '[a-zA-Z_0-9]\+[ (]*' ) endif return word_end - white_end endfunction " Determine if 'line' completes a statement or is continued on the next line. " This one is far from complete and accepts illegal code. Not important for " indenting, however. function! s:Seems_continuing( line ) " Unfinished lines if a:line =~ '\(--\|++\)\s*$' return 0 endif if a:line =~ '[\\,\|\&\+\-\*\%\^]\s*$' return 1 endif " if/for/while (cond) eol if a:line =~ '^\s*\(if\|while\|for\)\s*(.*)\s*$' || a:line =~ '^\s*else\s*' return 2 endif return 0 endfunction " Get previous relevant line. Search back until a line is that is no " comment or blank and return the line number function! s:Get_prev_line( lineno ) let lnum = a:lineno - 1 let data = getline( lnum ) while lnum > 0 && (data =~ '^\s*#' || data =~ '^\s*$') let lnum = lnum - 1 let data = getline( lnum ) endwhile return lnum endfunction " This function checks whether an indented line exceeds a maximum linewidth " (hardcoded 80). If so and it is possible to stay within 80 positions (or " limit num of characters beyond linewidth) by decreasing the indent (keeping " it > base_indent), do so. function! s:Safe_indent( base, wordlen, this_line ) let line_base = matchend( a:this_line, '^\s*' ) let line_len = strlen( a:this_line ) - line_base let indent = a:base if (indent + a:wordlen + line_len) > 80 " Simple implementation good enough for the time being let indent = indent + 3 endif return indent + a:wordlen endfunction ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/bib.vim�����������������������������������������������������������������0000664�0000000�0000000�00000000532�13204015742�0017223�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: BibTeX " Maintainer: Dorai Sitaram <ds26@gte.com> " URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html " Last Change: 2005 Mar 28 " Only do this when not done yet for this buffer if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal cindent let b:undo_indent = "setl cin<" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/bst.vim�����������������������������������������������������������������0000664�0000000�0000000�00000003621�13204015742�0017261�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: bst " Author: Tim Pope <vimNOSPAM@tpope.info> " $Id: bst.vim,v 1.1 2007/05/05 18:11:12 vimboss Exp $ if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal expandtab setlocal indentexpr=GetBstIndent(v:lnum) "setlocal smartindent setlocal cinkeys& setlocal cinkeys-=0# setlocal indentkeys& "setlocal indentkeys+=0% " Only define the function once. if exists("*GetBstIndent") finish endif function! s:prevgood(lnum) " Find a non-blank line above the current line. " Skip over comments. let lnum = a:lnum while lnum > 0 let lnum = prevnonblank(lnum - 1) if getline(lnum) !~ '^\s*%.*$' break endif endwhile return lnum endfunction function! s:strip(lnum) let line = getline(a:lnum) let line = substitute(line,'"[^"]*"','""','g') let line = substitute(line,'%.*','','') let line = substitute(line,'^\s\+','','') return line endfunction function! s:count(string,char) let str = substitute(a:string,'[^'.a:char.']','','g') return strlen(str) endfunction function! GetBstIndent(lnum) abort if a:lnum == 1 return 0 endif let lnum = s:prevgood(a:lnum) if lnum <= 0 return indent(a:lnum - 1) endif let line = s:strip(lnum) let cline = s:strip(a:lnum) if cline =~ '^}' && exists("b:current_syntax") call cursor(a:lnum,indent(a:lnum)) if searchpair('{','','}','bW',"synIDattr(synID(line('.'),col('.'),1),'name') =~? 'comment\\|string'") if col('.')+1 == col('$') return indent('.') else return virtcol('.')-1 endif endif endif let fakeline = substitute(line,'^}','','').matchstr(cline,'^}') let ind = indent(lnum) let ind = ind + shiftwidth() * s:count(line,'{') let ind = ind - shiftwidth() * s:count(fakeline,'}') return ind endfunction ���������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/bzl.vim�����������������������������������������������������������������0000664�0000000�0000000�00000004664�13204015742�0017270�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Bazel (http://bazel.io) " Maintainer: David Barnett (https://github.com/google/vim-ft-bzl) " Last Change: 2017 Jun 13 if exists('b:did_indent') finish endif " Load base python indent. if !exists('*GetPythonIndent') runtime! indent/python.vim endif let b:did_indent = 1 " Only enable bzl google indent if python google indent is enabled. if !get(g:, 'no_google_python_indent') setlocal indentexpr=GetBzlIndent(v:lnum) endif if exists('*GetBzlIndent') finish endif let s:save_cpo = &cpo set cpo-=C " Maximum number of lines to look backwards. let s:maxoff = 50 "" " Determine the correct indent level given an {lnum} in the current buffer. function GetBzlIndent(lnum) abort let l:use_recursive_indent = !get(g:, 'no_google_python_recursive_indent') if l:use_recursive_indent " Backup and override indent setting variables. if exists('g:pyindent_nested_paren') let l:pyindent_nested_paren = g:pyindent_nested_paren endif if exists('g:pyindent_open_paren') let l:pyindent_open_paren = g:pyindent_open_paren endif let g:pyindent_nested_paren = 'shiftwidth() * 2' let g:pyindent_open_paren = 'shiftwidth() * 2' endif let l:indent = -1 " Indent inside parens. " Align with the open paren unless it is at the end of the line. " E.g. " open_paren_not_at_EOL(100, " (200, " 300), " 400) " open_paren_at_EOL( " 100, 200, 300, 400) call cursor(a:lnum, 1) let [l:par_line, l:par_col] = searchpairpos('(\|{\|\[', '', ')\|}\|\]', 'bW', \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" . \ " synIDattr(synID(line('.'), col('.'), 1), 'name')" . \ " =~ '\\(Comment\\|String\\)$'") if l:par_line > 0 call cursor(l:par_line, 1) if l:par_col != col('$') - 1 let l:indent = l:par_col endif endif " Delegate the rest to the original function. if l:indent == -1 let l:indent = GetPythonIndent(a:lnum) endif if l:use_recursive_indent " Restore global variables. if exists('l:pyindent_nested_paren') let g:pyindent_nested_paren = l:pyindent_nested_paren else unlet g:pyindent_nested_paren endif if exists('l:pyindent_open_paren') let g:pyindent_open_paren = l:pyindent_open_paren else unlet g:pyindent_open_paren endif endif return l:indent endfunction let &cpo = s:save_cpo unlet s:save_cpo ����������������������������������������������������������������������������neovim-0.2.2/runtime/indent/c.vim�������������������������������������������������������������������0000664�0000000�0000000�00000000505�13204015742�0016711�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2005 Mar 27 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " C indenting is built-in, thus this is very simple setlocal cindent let b:undo_indent = "setl cin<" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/cdl.vim�����������������������������������������������������������������0000664�0000000�0000000�00000010235�13204015742�0017232�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Description: Comshare Dimension Definition Language (CDL) " Author: Raul Segura Acevedo <raulseguraaceved@netscape.net> " Last Change: Fri Nov 30 13:35:48 2001 CST if exists("b:did_indent") "finish endif let b:did_indent = 1 setlocal indentexpr=CdlGetIndent(v:lnum) setlocal indentkeys& setlocal indentkeys+==~else,=~endif,=~then,;,),= " Only define the function once. if exists("*CdlGetIndent") "finish endif " find out if an "...=..." expresion is an assignment (or a conditional) " it scans 'line' first, and then the previos lines fun! CdlAsignment(lnum, line) let f = -1 let lnum = a:lnum let line = a:line while lnum > 0 && f == -1 " line without members [a] of [b]:[c]... let inicio = 0 while 1 " keywords that help to decide let inicio = matchend(line, '\c\<\(expr\|\a*if\|and\|or\|not\|else\|then\|memberis\|\k\+of\)\>\|[<>;]', inicio) if inicio < 0 break endif " it's formula if there's a ';', 'elsE', 'theN', 'enDif' or 'expr' " conditional if there's a '<', '>', 'elseif', 'if', 'and', 'or', 'not', " 'memberis', 'childrenof' and other \k\+of funcions let f = line[inicio-1] =~? '[en;]' || strpart(line, inicio-4, 4) =~? 'ndif\|expr' endw let lnum = prevnonblank(lnum-1) let line = substitute(getline(lnum), '\c\(\[[^]]*]\(\s*of\s*\|:\)*\)\+', ' ', 'g') endw " if we hit the start of the file then f = -1, return 1 (formula) return f != 0 endf fun! CdlGetIndent(lnum) let thisline = getline(a:lnum) if match(thisline, '^\s*\(\k\+\|\[[^]]*]\)\s*\(,\|;\s*$\)') >= 0 " it's an attributes line return shiftwidth() elseif match(thisline, '^\c\s*\([{}]\|\/[*/]\|dimension\|schedule\|group\|hierarchy\|class\)') >= 0 " it's a header or '{' or '}' or a comment return 0 end let lnum = prevnonblank(a:lnum-1) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif " PREVIOUS LINE let ind = indent(lnum) let line = getline(lnum) let f = -1 " wether a '=' is a conditional or a asignment, -1 means we don't know yet " one 'closing' element at the beginning of the line has already reduced the " indent, but 'else', 'elseif' & 'then' increment it for the next line " '=' at the beginning has already de right indent (increased for asignments) let inicio = matchend(line, '^\c\s*\(else\a*\|then\|endif\|/[*/]\|[);={]\)') if inicio > 0 let c = line[inicio-1] " ')' and '=' don't change indent and are useless to set 'f' if c == '{' return shiftwidth() elseif c != ')' && c != '=' let f = 1 " all but 'elseif' are followed by a formula if c ==? 'n' || c ==? 'e' " 'then', 'else' let ind = ind + shiftwidth() elseif strpart(line, inicio-6, 6) ==? 'elseif' " elseif, set f to conditional let ind = ind + shiftwidth() let f = 0 end end end " remove members [a] of [b]:[c]... (inicio remainds valid) let line = substitute(line, '\c\(\[[^]]*]\(\s*of\s*\|:\)*\)\+', ' ', 'g') while 1 " search for the next interesting element let inicio=matchend(line, '\c\<if\|endif\|[()=;]', inicio) if inicio < 0 break end let c = line[inicio-1] " 'expr(...)' containing the formula if strpart(line, inicio-5, 5) ==? 'expr(' let ind = 0 let f = 1 elseif c == ')' || c== ';' || strpart(line, inicio-5, 5) ==? 'endif' let ind = ind - shiftwidth() elseif c == '(' || c ==? 'f' " '(' or 'if' let ind = ind + shiftwidth() else " c == '=' " if it is an asignment increase indent if f == -1 " we don't know yet, find out let f = CdlAsignment(lnum, strpart(line, 0, inicio)) end if f == 1 " formula increase it let ind = ind + shiftwidth() end end endw " CURRENT LINE, if it starts with a closing element, decrease indent " or if it starts with '=' (asignment), increase indent if match(thisline, '^\c\s*\(else\|then\|endif\|[);]\)') >= 0 let ind = ind - shiftwidth() elseif match(thisline, '^\s*=') >= 0 if f == -1 " we don't know yet if is an asignment, find out let f = CdlAsignment(lnum, "") end if f == 1 " formula increase it let ind = ind + shiftwidth() end end return ind endfun �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/ch.vim������������������������������������������������������������������0000664�0000000�0000000�00000000726�13204015742�0017066�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Ch " Maintainer: SoftIntegration, Inc. <info@softintegration.com> " URL: http://www.softintegration.com/download/vim/indent/ch.vim " Last change: 2006 Apr 30 " Created based on cpp.vim " " Ch is a C/C++ interpreter with many high level extensions " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Ch indenting is built-in, thus this is very simple setlocal cindent ������������������������������������������neovim-0.2.2/runtime/indent/chaiscript.vim����������������������������������������������������������0000664�0000000�0000000�00000002162�13204015742�0020621�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: ChaiScript " Maintainer: Jason Turner <lefticus 'at' gmail com> " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetChaiScriptIndent() setlocal autoindent " Only define the function once. if exists("*GetChaiScriptIndent") finish endif function! GetChaiScriptIndent() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif " Add a 'shiftwidth' after lines that start a block: " lines containing a { let ind = indent(lnum) let flag = 0 let prevline = getline(lnum) if prevline =~ '^.*{.*' let ind = ind + shiftwidth() let flag = 1 endif " Subtract a 'shiftwidth' after lines containing a { followed by a } " to keep it balanced if flag == 1 && prevline =~ '.*{.*}.*' let ind = ind - shiftwidth() endif " Subtract a 'shiftwidth' on lines ending with } if getline(v:lnum) =~ '^\s*\%(}\)' let ind = ind - shiftwidth() endif return ind endfunction ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/changelog.vim�����������������������������������������������������������0000664�0000000�0000000�00000000410�13204015742�0020411�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: generic Changelog file " Maintainer: noone " Last Change: 2005 Mar 29 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal ai let b:undo_indent = "setl ai<" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/clojure.vim�������������������������������������������������������������0000664�0000000�0000000�00000024310�13204015742�0020132�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Clojure " Author: Meikel Brandmeyer <mb@kotka.de> " URL: http://kotka.de/projects/clojure/vimclojure.html " " Maintainer: Sung Pae <self@sungpae.com> " URL: https://github.com/guns/vim-clojure-static " License: Same as Vim " Last Change: 18 July 2016 if exists("b:did_indent") finish endif let b:did_indent = 1 let s:save_cpo = &cpo set cpo&vim let b:undo_indent = 'setlocal autoindent< smartindent< expandtab< softtabstop< shiftwidth< indentexpr< indentkeys<' setlocal noautoindent nosmartindent setlocal softtabstop=2 shiftwidth=2 expandtab setlocal indentkeys=!,o,O if exists("*searchpairpos") if !exists('g:clojure_maxlines') let g:clojure_maxlines = 100 endif if !exists('g:clojure_fuzzy_indent') let g:clojure_fuzzy_indent = 1 endif if !exists('g:clojure_fuzzy_indent_patterns') let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let'] endif if !exists('g:clojure_fuzzy_indent_blacklist') let g:clojure_fuzzy_indent_blacklist = ['-fn$', '\v^with-%(meta|out-str|loading-context)$'] endif if !exists('g:clojure_special_indent_words') let g:clojure_special_indent_words = 'deftype,defrecord,reify,proxy,extend-type,extend-protocol,letfn' endif if !exists('g:clojure_align_multiline_strings') let g:clojure_align_multiline_strings = 0 endif if !exists('g:clojure_align_subforms') let g:clojure_align_subforms = 0 endif function! s:syn_id_name() return synIDattr(synID(line("."), col("."), 0), "name") endfunction function! s:ignored_region() return s:syn_id_name() =~? '\vstring|regex|comment|character' endfunction function! s:current_char() return getline('.')[col('.')-1] endfunction function! s:current_word() return getline('.')[col('.')-1 : searchpos('\v>', 'n', line('.'))[1]-2] endfunction function! s:is_paren() return s:current_char() =~# '\v[\(\)\[\]\{\}]' && !s:ignored_region() endfunction " Returns 1 if string matches a pattern in 'patterns', which may be a " list of patterns, or a comma-delimited string of implicitly anchored " patterns. function! s:match_one(patterns, string) let list = type(a:patterns) == type([]) \ ? a:patterns \ : map(split(a:patterns, ','), '"^" . v:val . "$"') for pat in list if a:string =~# pat | return 1 | endif endfor endfunction function! s:match_pairs(open, close, stopat) " Stop only on vector and map [ resp. {. Ignore the ones in strings and " comments. if a:stopat == 0 let stopat = max([line(".") - g:clojure_maxlines, 0]) else let stopat = a:stopat endif let pos = searchpairpos(a:open, '', a:close, 'bWn', "!s:is_paren()", stopat) return [pos[0], col(pos)] endfunction function! s:clojure_check_for_string_worker() " Check whether there is the last character of the previous line is " highlighted as a string. If so, we check whether it's a ". In this " case we have to check also the previous character. The " might be the " closing one. In case the we are still in the string, we search for the " opening ". If this is not found we take the indent of the line. let nb = prevnonblank(v:lnum - 1) if nb == 0 return -1 endif call cursor(nb, 0) call cursor(0, col("$") - 1) if s:syn_id_name() !~? "string" return -1 endif " This will not work for a " in the first column... if s:current_char() == '"' call cursor(0, col("$") - 2) if s:syn_id_name() !~? "string" return -1 endif if s:current_char() != '\\' return -1 endif call cursor(0, col("$") - 1) endif let p = searchpos('\(^\|[^\\]\)\zs"', 'bW') if p != [0, 0] return p[1] - 1 endif return indent(".") endfunction function! s:check_for_string() let pos = getpos('.') try let val = s:clojure_check_for_string_worker() finally call setpos('.', pos) endtry return val endfunction function! s:strip_namespace_and_macro_chars(word) return substitute(a:word, "\\v%(.*/|[#'`~@^,]*)(.*)", '\1', '') endfunction function! s:clojure_is_method_special_case_worker(position) " Find the next enclosing form. call search('\S', 'Wb') " Special case: we are at a '(('. if s:current_char() == '(' return 0 endif call cursor(a:position) let next_paren = s:match_pairs('(', ')', 0) " Special case: we are now at toplevel. if next_paren == [0, 0] return 0 endif call cursor(next_paren) call search('\S', 'W') let w = s:strip_namespace_and_macro_chars(s:current_word()) if g:clojure_special_indent_words =~# '\V\<' . w . '\>' return 1 endif return 0 endfunction function! s:is_method_special_case(position) let pos = getpos('.') try let val = s:clojure_is_method_special_case_worker(a:position) finally call setpos('.', pos) endtry return val endfunction " Check if form is a reader conditional, that is, it is prefixed by #? " or @#? function! s:is_reader_conditional_special_case(position) if getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?" return 1 endif return 0 endfunction " Returns 1 for opening brackets, -1 for _anything else_. function! s:bracket_type(char) return stridx('([{', a:char) > -1 ? 1 : -1 endfunction " Returns: [opening-bracket-lnum, indent] function! s:clojure_indent_pos() " Get rid of special case. if line(".") == 1 return [0, 0] endif " We have to apply some heuristics here to figure out, whether to use " normal lisp indenting or not. let i = s:check_for_string() if i > -1 return [0, i + !!g:clojure_align_multiline_strings] endif call cursor(0, 1) " Find the next enclosing [ or {. We can limit the second search " to the line, where the [ was found. If no [ was there this is " zero and we search for an enclosing {. let paren = s:match_pairs('(', ')', 0) let bracket = s:match_pairs('\[', '\]', paren[0]) let curly = s:match_pairs('{', '}', bracket[0]) " In case the curly brace is on a line later then the [ or - in " case they are on the same line - in a higher column, we take the " curly indent. if curly[0] > bracket[0] || curly[1] > bracket[1] if curly[0] > paren[0] || curly[1] > paren[1] return curly endif endif " If the curly was not chosen, we take the bracket indent - if " there was one. if bracket[0] > paren[0] || bracket[1] > paren[1] return bracket endif " There are neither { nor [ nor (, ie. we are at the toplevel. if paren == [0, 0] return paren endif " Now we have to reimplement lispindent. This is surprisingly easy, as " soon as one has access to syntax items. " " - Check whether we are in a special position after a word in " g:clojure_special_indent_words. These are special cases. " - Get the next keyword after the (. " - If its first character is also a (, we have another sexp and align " one column to the right of the unmatched (. " - In case it is in lispwords, we indent the next line to the column of " the ( + sw. " - If not, we check whether it is last word in the line. In that case " we again use ( + sw for indent. " - In any other case we use the column of the end of the word + 2. call cursor(paren) if s:is_method_special_case(paren) return [paren[0], paren[1] + shiftwidth() - 1] endif if s:is_reader_conditional_special_case(paren) return paren endif " In case we are at the last character, we use the paren position. if col("$") - 1 == paren[1] return paren endif " In case after the paren is a whitespace, we search for the next word. call cursor(0, col('.') + 1) if s:current_char() == ' ' call search('\v\S', 'W') endif " If we moved to another line, there is no word after the (. We " use the ( position for indent. if line(".") > paren[0] return paren endif " We still have to check, whether the keyword starts with a (, [ or {. " In that case we use the ( position for indent. let w = s:current_word() if s:bracket_type(w[0]) == 1 return paren endif " Test words without namespace qualifiers and leading reader macro " metacharacters. " " e.g. clojure.core/defn and #'defn should both indent like defn. let ww = s:strip_namespace_and_macro_chars(w) if &lispwords =~# '\V\<' . ww . '\>' return [paren[0], paren[1] + shiftwidth() - 1] endif if g:clojure_fuzzy_indent \ && !s:match_one(g:clojure_fuzzy_indent_blacklist, ww) \ && s:match_one(g:clojure_fuzzy_indent_patterns, ww) return [paren[0], paren[1] + shiftwidth() - 1] endif call search('\v\_s', 'cW') call search('\v\S', 'W') if paren[0] < line(".") return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : shiftwidth() - 1)] endif call search('\v\S', 'bW') return [line('.'), col('.') + 1] endfunction function! GetClojureIndent() let lnum = line('.') let orig_lnum = lnum let orig_col = col('.') let [opening_lnum, indent] = s:clojure_indent_pos() " Account for multibyte characters if opening_lnum > 0 let indent -= indent - virtcol([opening_lnum, indent]) endif " Return if there are no previous lines to inherit from if opening_lnum < 1 || opening_lnum >= lnum - 1 call cursor(orig_lnum, orig_col) return indent endif let bracket_count = 0 " Take the indent of the first previous non-white line that is " at the same sexp level. cf. src/misc1.c:get_lisp_indent() while 1 let lnum = prevnonblank(lnum - 1) let col = 1 if lnum <= opening_lnum break endif call cursor(lnum, col) " Handle bracket counting edge case if s:is_paren() let bracket_count += s:bracket_type(s:current_char()) endif while 1 if search('\v[(\[{}\])]', '', lnum) < 1 break elseif !s:ignored_region() let bracket_count += s:bracket_type(s:current_char()) endif endwhile if bracket_count == 0 " Check if this is part of a multiline string call cursor(lnum, 1) if s:syn_id_name() !~? '\vstring|regex' call cursor(orig_lnum, orig_col) return indent(lnum) endif endif endwhile call cursor(orig_lnum, orig_col) return indent endfunction setlocal indentexpr=GetClojureIndent() else " In case we have searchpairpos not available we fall back to " normal lisp indenting. setlocal indentexpr= setlocal lisp let b:undo_indent .= '| setlocal lisp<' endif let &cpo = s:save_cpo unlet! s:save_cpo " vim:sts=8:sw=8:ts=8:noet ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/cmake.vim���������������������������������������������������������������0000664�0000000�0000000�00000005173�13204015742�0017555�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: CMake (ft=cmake) " Author: Andy Cedilnik <andy.cedilnik@kitware.com> " Maintainer: Dimitri Merejkowsky <d.merej@gmail.com> " Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com> " Last Change: 2017 Sep 24 " " Licence: The CMake license applies to this file. See " https://cmake.org/licensing " This implies that distribution with Vim is allowed if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=CMakeGetIndent(v:lnum) setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE( " Only define the function once. if exists("*CMakeGetIndent") finish endif let s:keepcpo= &cpo set cpo&vim fun! CMakeGetIndent(lnum) let this_line = getline(a:lnum) " Find a non-blank line above the current line. let lnum = a:lnum let lnum = prevnonblank(lnum - 1) let previous_line = getline(lnum) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif let ind = indent(lnum) let or = '\|' " Regular expressions used by line indentation function. let cmake_regex_comment = '#.*' let cmake_regex_identifier = '[A-Za-z][A-Za-z0-9_]*' let cmake_regex_quoted = '"\([^"\\]\|\\.\)*"' let cmake_regex_arguments = '\(' . cmake_regex_quoted . \ or . '\$(' . cmake_regex_identifier . ')' . \ or . '[^()\\#"]' . or . '\\.' . '\)*' let cmake_indent_comment_line = '^\s*' . cmake_regex_comment let cmake_indent_blank_regex = '^\s*$' let cmake_indent_open_regex = '^\s*' . cmake_regex_identifier . \ '\s*(' . cmake_regex_arguments . \ '\(' . cmake_regex_comment . '\)\?$' let cmake_indent_close_regex = '^' . cmake_regex_arguments . \ ')\s*' . \ '\(' . cmake_regex_comment . '\)\?$' let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\|FUNCTION\)\s*(' let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\|ENDFUNCTION\)\s*(' " Add if previous_line =~? cmake_indent_comment_line " Handle comments let ind = ind else if previous_line =~? cmake_indent_begin_regex let ind = ind + shiftwidth() endif if previous_line =~? cmake_indent_open_regex let ind = ind + shiftwidth() endif endif " Subtract if this_line =~? cmake_indent_end_regex let ind = ind - shiftwidth() endif if previous_line =~? cmake_indent_close_regex let ind = ind - shiftwidth() endif return ind endfun let &cpo = s:keepcpo unlet s:keepcpo �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/cobol.vim���������������������������������������������������������������0000664�0000000�0000000�00000020161�13204015742�0017565�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: cobol " Author: Tim Pope <vimNOSPAM@tpope.info> " $Id: cobol.vim,v 1.1 2007/05/05 18:08:19 vimboss Exp $ if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal expandtab setlocal indentexpr=GetCobolIndent(v:lnum) setlocal indentkeys& setlocal indentkeys+=0<*>,0/,0$,0=01,=~division,=~section,0=~end,0=~then,0=~else,0=~when,*<Return>,. " Only define the function once. if exists("*GetCobolIndent") finish endif let s:skip = 'getline(".") =~ "^.\\{6\\}[*/$-]\\|\"[^\"]*\""' function! s:prevgood(lnum) " Find a non-blank line above the current line. " Skip over comments. let lnum = a:lnum while lnum > 0 let lnum = prevnonblank(lnum - 1) let line = getline(lnum) if line !~? '^\s*[*/$-]' && line !~? '^.\{6\}[*/$CD-]' break endif endwhile return lnum endfunction function! s:stripped(lnum) return substitute(strpart(getline(a:lnum),0,72),'^\s*','','') endfunction function! s:optionalblock(lnum,ind,blocks,clauses) let ind = a:ind let clauses = '\c\<\%(\<NOT\s\+\)\@<!\%(NOT\s\+\)\=\%('.a:clauses.'\)' let begin = '\c-\@<!\<\%('.a:blocks.'\)\>' let beginfull = begin.'\ze.*\%(\n\%(\s*\%([*/$-].*\)\=\n\)*\)\=\s*\%('.clauses.'\)' let end = '\c\<end-\%('.a:blocks.'\)\>\|\%(\.\%( \|$\)\)\@=' let cline = s:stripped(a:lnum) let line = s:stripped(s:prevgood(a:lnum)) if cline =~? clauses "&& line !~? '^search\>' call cursor(a:lnum,1) let lastclause = searchpair(beginfull,clauses,end,'bWr',s:skip) if getline(lastclause) =~? clauses && s:stripped(lastclause) !~? '^'.begin let ind = indent(lastclause) elseif lastclause > 0 let ind = indent(lastclause) + shiftwidth() "let ind = ind + shiftwidth() endif elseif line =~? clauses && cline !~? end let ind = ind + shiftwidth() endif return ind endfunction function! GetCobolIndent(lnum) abort let minshft = 6 let ashft = minshft + 1 let bshft = ashft + 4 " (Obsolete) numbered lines if getline(a:lnum) =~? '^\s*\d\{6\}\%($\|[ */$CD-]\)' return 0 endif let cline = s:stripped(a:lnum) " Comments, etc. must start in the 7th column if cline =~? '^[*/$-]' return minshft elseif cline =~# '^[CD]' && indent(a:lnum) == minshft return minshft endif " Divisions, sections, and file descriptions start in area A if cline =~? '\<\(DIVISION\|SECTION\)\%($\|\.\)' || cline =~? '^[FS]D\>' return ashft endif " Fields if cline =~? '^0*\(1\|77\)\>' return ashft endif if cline =~? '^\d\+\>' let cnum = matchstr(cline,'^\d\+\>') let default = 0 let step = -1 while step < 2 let lnum = a:lnum while lnum > 0 && lnum < line('$') && lnum > a:lnum - 500 && lnum < a:lnum + 500 let lnum = step > 0 ? nextnonblank(lnum + step) : prevnonblank(lnum + step) let line = getline(lnum) let lindent = indent(lnum) if line =~? '^\s*\d\+\>' let num = matchstr(line,'^\s*\zs\d\+\>') if 0+cnum == num return lindent elseif 0+cnum > num && default < lindent + shiftwidth() let default = lindent + shiftwidth() endif elseif lindent < bshft && lindent >= ashft break endif endwhile let step = step + 2 endwhile return default ? default : bshft endif let lnum = s:prevgood(a:lnum) " Hit the start of the file, use "zero" indent. if lnum == 0 return ashft endif " Initial spaces are ignored let line = s:stripped(lnum) let ind = indent(lnum) " Paragraphs. There may be some false positives. if cline =~? '^\(\a[A-Z0-9-]*[A-Z0-9]\|\d[A-Z0-9-]*\a\)\.' "\s*$' if cline !~? '^EXIT\s*\.' && line =~? '\.\s*$' return ashft endif endif " Paragraphs in the identification division. "if cline =~? '^\(PROGRAM-ID\|AUTHOR\|INSTALLATION\|' . "\ 'DATE-WRITTEN\|DATE-COMPILED\|SECURITY\)\>' "return ashft "endif if line =~? '\.$' " XXX return bshft endif if line =~? '^PERFORM\>' let perfline = substitute(line, '\c^PERFORM\s*', "", "") if perfline =~? '^\%(\k\+\s\+TIMES\)\=\s*$' let ind = ind + shiftwidth() elseif perfline =~? '^\%(WITH\s\+TEST\|VARYING\|UNTIL\)\>.*[^.]$' let ind = ind + shiftwidth() endif endif if line =~? '^\%(IF\|THEN\|ELSE\|READ\|EVALUATE\|SEARCH\|SELECT\)\>' let ind = ind + shiftwidth() endif let ind = s:optionalblock(a:lnum,ind,'ADD\|COMPUTE\|DIVIDE\|MULTIPLY\|SUBTRACT','ON\s\+SIZE\s\+ERROR') let ind = s:optionalblock(a:lnum,ind,'STRING\|UNSTRING\|ACCEPT\|DISPLAY\|CALL','ON\s\+OVERFLOW\|ON\s\+EXCEPTION') if cline !~? '^AT\s\+END\>' || line !~? '^SEARCH\>' let ind = s:optionalblock(a:lnum,ind,'DELETE\|REWRITE\|START\|WRITE\|READ','INVALID\s\+KEY\|AT\s\+END\|NO\s\+DATA\|AT\s\+END-OF-PAGE') endif if cline =~? '^WHEN\>' call cursor(a:lnum,1) " We also search for READ so that contained AT ENDs are skipped let lastclause = searchpair('\c-\@<!\<\%(SEARCH\|EVALUATE\|READ\)\>','\c\<\%(WHEN\|AT\s\+END\)\>','\c\<END-\%(SEARCH\|EVALUATE\|READ\)\>','bW',s:skip) let g:foo = s:stripped(lastclause) if s:stripped(lastclause) =~? '\c\<\%(WHEN\|AT\s\+END\)\>' "&& s:stripped(lastclause) !~? '^\%(SEARCH\|EVALUATE\|READ\)\>' let ind = indent(lastclause) elseif lastclause > 0 let ind = indent(lastclause) + shiftwidth() endif elseif line =~? '^WHEN\>' let ind = ind + shiftwidth() endif "I'm not sure why I had this "if line =~? '^ELSE\>-\@!' && line !~? '\.$' "let ind = indent(s:prevgood(lnum)) "endif if cline =~? '^\(END\)\>-\@!' " On lines with just END, 'guess' a simple shift left let ind = ind - shiftwidth() elseif cline =~? '^\(END-IF\|THEN\|ELSE\)\>-\@!' call cursor(a:lnum,indent(a:lnum)) let match = searchpair('\c-\@<!\<IF\>','\c-\@<!\%(THEN\|ELSE\)\>','\c-\@<!\<END-IF\>\zs','bnW',s:skip) if match > 0 let ind = indent(match) endif elseif cline =~? '^END-[A-Z]' let beginword = matchstr(cline,'\c\<END-\zs[A-Z0-9-]\+') let endword = 'END-'.beginword let first = 0 let suffix = '.*\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*' if beginword =~? '^\%(ADD\|COMPUTE\|DIVIDE\|MULTIPLY\|SUBTRACT\)$' let beginword = beginword . suffix . '\<\%(NOT\s\+\)\=ON\s\+SIZE\s\+ERROR' let g:beginword = beginword let first = 1 elseif beginword =~? '^\%(STRING\|UNSTRING\)$' let beginword = beginword . suffix . '\<\%(NOT\s\+\)\=ON\s\+OVERFLOW' let first = 1 elseif beginword =~? '^\%(ACCEPT\|DISPLAY\)$' let beginword = beginword . suffix . '\<\%(NOT\s\+\)\=ON\s\+EXCEPTION' let first = 1 elseif beginword ==? 'CALL' let beginword = beginword . suffix . '\<\%(NOT\s\+\)\=ON\s\+\%(EXCEPTION\|OVERFLOW\)' let first = 1 elseif beginword =~? '^\%(DELETE\|REWRITE\|START\|READ\|WRITE\)$' let first = 1 let beginword = beginword . suffix . '\<\%(NOT\s\+\)\=\(INVALID\s\+KEY' if beginword =~? '^READ' let first = 0 let beginword = beginword . '\|AT\s\+END\|NO\s\+DATA' elseif beginword =~? '^WRITE' let beginword = beginword . '\|AT\s\+END-OF-PAGE' endif let beginword = beginword . '\)' endif call cursor(a:lnum,indent(a:lnum)) let match = searchpair('\c-\@<!\<'.beginword.'\>','','\c\<'.endword.'\>\zs','bnW'.(first? 'r' : ''),s:skip) if match > 0 let ind = indent(match) elseif cline =~? '^\(END-\(READ\|EVALUATE\|SEARCH\|PERFORM\)\)\>' let ind = ind - shiftwidth() endif endif return ind < bshft ? bshft : ind endfunction ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/config.vim��������������������������������������������������������������0000664�0000000�0000000�00000004206�13204015742�0017736�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Autoconf configure.{ac,in} file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 " TODO: how about nested [()]'s in one line " what's wrong with '\\\@!'? " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif runtime! indent/sh.vim " will set b:did_indent setlocal indentexpr=GetConfigIndent() setlocal indentkeys=!^F,o,O,=then,=do,=else,=elif,=esac,=fi,=fin,=fil,=done setlocal nosmartindent " Only define the function once. if exists("*GetConfigIndent") finish endif " get the offset (indent) of the end of the match of 'regexp' in 'line' function s:GetOffsetOf(line, regexp) let end = matchend(a:line, a:regexp) let width = 0 let i = 0 while i < end if a:line[i] != "\t" let width = width + 1 else let width = width + &ts - (width % &ts) endif let i = i + 1 endwhile return width endfunction function GetConfigIndent() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif " where to put this let ind = GetShIndent() let line = getline(lnum) " if previous line has unmatched, unescaped opening parentheses, " indent to its position. TODO: not failsafe if multiple ('s if line =~ '\\\@<!([^)]*$' let ind = s:GetOffsetOf(line, '\\\@!(') endif " if previous line has unmatched opening bracket, " indent to its position. TODO: same as above if line =~ '\[[^]]*$' let ind = s:GetOffsetOf(line, '\[') endif " if previous line had an unmatched closing parantheses, " indent to the matching opening parantheses if line =~ '[^(]\+\\\@<!)$' call search(')', 'bW') let lnum = searchpair('\\\@<!(', '', ')', 'bWn') let ind = indent(lnum) endif " if previous line had an unmatched closing bracket, " indent to the matching opening bracket if line =~ '[^[]\+]$' call search(']', 'bW') let lnum = searchpair('\[', '', ']', 'bWn') let ind = indent(lnum) endif return ind endfunction ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/context.vim�������������������������������������������������������������0000664�0000000�0000000�00000001360�13204015742�0020153�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" ConTeXt indent file " Language: ConTeXt typesetting engine " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> " Last Change: 2016 Oct 15 if exists("b:did_indent") finish endif if !get(b:, 'context_metapost', get(g:, 'context_metapost', 1)) finish endif " Load MetaPost indentation script runtime! indent/mp.vim let s:keepcpo= &cpo set cpo&vim setlocal indentexpr=GetConTeXtIndent() let b:undo_indent = "setl indentexpr<" function! GetConTeXtIndent() " Use MetaPost rules inside MetaPost graphic environments if len(synstack(v:lnum, 1)) > 0 && \ synIDattr(synstack(v:lnum, 1)[0], "name") ==# 'contextMPGraphic' return GetMetaPostIndent() endif return -1 endfunc let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/cpp.vim�����������������������������������������������������������������0000664�0000000�0000000�00000000511�13204015742�0017246�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: C++ " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2008 Nov 29 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " C++ indenting is built-in, thus this is very simple setlocal cindent let b:undo_indent = "setl cin<" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/cs.vim������������������������������������������������������������������0000664�0000000�0000000�00000000507�13204015742�0017076�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: C# " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Fri, 15 Mar 2002 07:53:54 CET " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " C# is like indenting C setlocal cindent let b:undo_indent = "setl cin<" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/css.vim�����������������������������������������������������������������0000664�0000000�0000000�00000003376�13204015742�0017270�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: CSS " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2012-05-30 " Use of shiftwidth() added by Oleg Zubchenko. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetCSSIndent() setlocal indentkeys=0{,0},!^F,o,O setlocal nosmartindent let b:undo_indent = "setl smartindent< indentkeys< indentexpr<" if exists("*GetCSSIndent") finish endif let s:keepcpo= &cpo set cpo&vim function s:prevnonblanknoncomment(lnum) let lnum = a:lnum while lnum > 1 let lnum = prevnonblank(lnum) let line = getline(lnum) if line =~ '\*/' while lnum > 1 && line !~ '/\*' let lnum -= 1 endwhile if line =~ '^\s*/\*' let lnum -= 1 else break endif else break endif endwhile return lnum endfunction function s:count_braces(lnum, count_open) let n_open = 0 let n_close = 0 let line = getline(a:lnum) let pattern = '[{}]' let i = match(line, pattern) while i != -1 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'css\%(Comment\|StringQ\{1,2}\)' if line[i] == '{' let n_open += 1 elseif line[i] == '}' if n_open > 0 let n_open -= 1 else let n_close += 1 endif endif endif let i = match(line, pattern, i + 1) endwhile return a:count_open ? n_open : n_close endfunction function GetCSSIndent() let line = getline(v:lnum) if line =~ '^\s*\*' return cindent(v:lnum) endif let pnum = s:prevnonblanknoncomment(v:lnum - 1) if pnum == 0 return 0 endif return indent(pnum) + s:count_braces(pnum, 1) * shiftwidth() \ - s:count_braces(v:lnum, 0) * shiftwidth() endfunction let &cpo = s:keepcpo unlet s:keepcpo ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/cucumber.vim������������������������������������������������������������0000664�0000000�0000000�00000005166�13204015742�0020304�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Cucumber " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2017 Jun 13 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentexpr=GetCucumberIndent() setlocal indentkeys=o,O,*<Return>,<:>,0<Bar>,0#,=,!^F let b:undo_indent = 'setl ai< inde< indk<' " Only define the function once. if exists("*GetCucumberIndent") finish endif function! s:syn(lnum) return synIDattr(synID(a:lnum,1+indent(a:lnum),1),'name') endfunction function! GetCucumberIndent() let line = getline(prevnonblank(v:lnum-1)) let cline = getline(v:lnum) let nline = getline(nextnonblank(v:lnum+1)) let sw = exists('*shiftwidth') ? shiftwidth() : shiftwidth() let syn = s:syn(prevnonblank(v:lnum-1)) let csyn = s:syn(v:lnum) let nsyn = s:syn(nextnonblank(v:lnum+1)) if csyn ==# 'cucumberFeature' || cline =~# '^\s*Feature:' " feature heading return 0 elseif csyn ==# 'cucumberExamples' || cline =~# '^\s*\%(Examples\|Scenarios\):' " examples heading return 2 * sw elseif csyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || cline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):' " background, scenario or outline heading return sw elseif syn ==# 'cucumberFeature' || line =~# '^\s*Feature:' " line after feature heading return sw elseif syn ==# 'cucumberExamples' || line =~# '^\s*\%(Examples\|Scenarios\):' " line after examples heading return 3 * sw elseif syn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || line =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):' " line after background, scenario or outline heading return 2 * sw elseif cline =~# '^\s*[@#]' && (nsyn == 'cucumberFeature' || nline =~# '^\s*Feature:' || indent(prevnonblank(v:lnum-1)) <= 0) " tag or comment before a feature heading return 0 elseif cline =~# '^\s*@' " other tags return sw elseif cline =~# '^\s*[#|]' && line =~# '^\s*|' " mid-table " preserve indent return indent(prevnonblank(v:lnum-1)) elseif cline =~# '^\s*|' && line =~# '^\s*[^|]' " first line of a table, relative indent return indent(prevnonblank(v:lnum-1)) + sw elseif cline =~# '^\s*[^|]' && line =~# '^\s*|' " line after a table, relative unindent return indent(prevnonblank(v:lnum-1)) - sw elseif cline =~# '^\s*#' && getline(v:lnum-1) =~ '^\s*$' && (nsyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || nline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):') " comments on scenarios return sw endif return indent(prevnonblank(v:lnum-1)) endfunction " vim:set sts=2 sw=2: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/cuda.vim����������������������������������������������������������������0000664�0000000�0000000�00000000461�13204015742�0017404�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: CUDA " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2008 Nov 29 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " It's just like C indenting setlocal cindent let b:undo_indent = "setl cin<" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/d.vim�������������������������������������������������������������������0000664�0000000�0000000�00000000776�13204015742�0016724�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file for the D programming language (version 0.137). " " Language: D " Maintainer: Jason Mills<jmills@cs.mun.ca> " Last Change: 2005 Nov 22 " Version: 0.1 " " Please email me with bugs, comments, and suggestion. Put vim in the subject " to ensure the email will not be marked has spam. " " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " D indenting is a lot like the built-in C indenting. setlocal cindent " vim: ts=8 noet ��neovim-0.2.2/runtime/indent/dictconf.vim������������������������������������������������������������0000664�0000000�0000000�00000000521�13204015742�0020256�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: dict(1) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent setlocal nosmartindent inoremap <buffer> # X# �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/dictdconf.vim�����������������������������������������������������������0000664�0000000�0000000�00000000522�13204015742�0020423�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: dictd(8) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent setlocal nosmartindent inoremap <buffer> # X# ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/docbk.vim���������������������������������������������������������������0000664�0000000�0000000�00000000520�13204015742�0017546�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: DocBook Documentation Format " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:did_indent") finish endif " Same as XML indenting for now. runtime! indent/xml.vim if exists('*XmlIndentGet') setlocal indentexpr=XmlIndentGet(v:lnum,0) endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/dtd.vim�����������������������������������������������������������������0000664�0000000�0000000�00000027135�13204015742�0017252�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: DTD (Document Type Definition for XML) " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-07-08 let s:cpo_save = &cpo set cpo&vim setlocal indentexpr=GetDTDIndent() setlocal indentkeys=!^F,o,O,> setlocal nosmartindent if exists("*GetDTDIndent") finish endif " TODO: Needs to be adjusted to stop at [, <, and ]. let s:token_pattern = '^[^[:space:]]\+' function s:lex1(input, start, ...) let pattern = a:0 > 0 ? a:1 : s:token_pattern let start = matchend(a:input, '^\_s*', a:start) if start == -1 return ["", a:start] endif let end = matchend(a:input, pattern, start) if end == -1 return ["", a:start] endif let token = strpart(a:input, start, end - start) return [token, end] endfunction function s:lex(input, start, ...) let pattern = a:0 > 0 ? a:1 : s:token_pattern let info = s:lex1(a:input, a:start, pattern) while info[0] == '--' let info = s:lex1(a:input, info[1], pattern) while info[0] != "" && info[0] != '--' let info = s:lex1(a:input, info[1], pattern) endwhile if info[0] == "" return info endif let info = s:lex1(a:input, info[1], pattern) endwhile return info endfunction function s:indent_to_innermost_parentheses(line, end) let token = '(' let end = a:end let parentheses = [end - 1] while token != "" let [token, end] = s:lex(a:line, end, '^\%([(),|]\|[A-Za-z0-9_-]\+\|#P\=CDATA\|%[A-Za-z0-9_-]\+;\)[?*+]\=') if token[0] == '(' call add(parentheses, end - 1) elseif token[0] == ')' if len(parentheses) == 1 return [-1, end] endif call remove(parentheses, -1) endif endwhile return [parentheses[-1] - strridx(a:line, "\n", parentheses[-1]), end] endfunction " TODO: Line and end could be script global (think OO members). function GetDTDIndent() if v:lnum == 1 return 0 endif " Begin by searching back for a <! that isn’t inside a comment. " From here, depending on what follows immediately after, parse to " where we’re at to determine what to do. if search('<!', 'bceW') == 0 return indent(v:lnum - 1) endif let lnum = line('.') let col = col('.') let indent = indent('.') let line = lnum == v:lnum ? getline(lnum) : join(getline(lnum, v:lnum - 1), "\n") let [declaration, end] = s:lex1(line, col) if declaration == "" return indent + shiftwidth() elseif declaration == '--' " We’re looking at a comment. Now, simply determine if the comment is " terminated or not. If it isn’t, let Vim take care of that using " 'comments' and 'autoindent'. Otherwise, indent to the first lines level. while declaration != "" let [declaration, end] = s:lex(line, end) if declaration == "-->" return indent endif endwhile return -1 elseif declaration == 'ELEMENT' " Check for element name. If none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" return indent + shiftwidth() endif " Check for token following element name. This can be a specification of " whether the start or end tag may be omitted. If nothing is found, indent " one level. let [token, end] = s:lex(line, end, '^\%([-O(]\|ANY\|EMPTY\)') let n = 0 while token =~ '[-O]' && n < 2 let [token, end] = s:lex(line, end, '^\%([-O(]\|ANY\|EMPTY\)') let n += 1 endwhile if token == "" return indent + shiftwidth() endif " Next comes the content model. If the token we’ve found isn’t a " parenthesis it must be either ANY, EMPTY or some random junk. Either " way, we’re done indenting this element, so set it to that of the first " line so that the terminating “>” winds up having the same indention. if token != '(' return indent endif " Now go through the content model. We need to keep track of the nesting " of parentheses. As soon as we hit 0 we’re done. If that happens we must " have a complete content model. Thus set indention to be the same as that " of the first line so that the terminating “>” winds up having the same " indention. Otherwise, we’ll indent to the innermost parentheses not yet " matched. let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end) if indent_of_innermost != -1 return indent_of_innermost endif " Finally, look for any additions and/or exceptions to the content model. " This is defined by a “+” or “-” followed by another content model " declaration. " TODO: Can the “-” be separated by whitespace from the “(”? let seen = { '+(': 0, '-(': 0 } while 1 let [additions_exceptions, end] = s:lex(line, end, '^[+-](') if additions_exceptions != '+(' && additions_exceptions != '-(' let [token, end] = s:lex(line, end) if token == '>' return indent endif " TODO: Should use s:lex here on getline(v:lnum) and check for >. return getline(v:lnum) =~ '^\s*>' || count(values(seen), 0) == 0 ? indent : (indent + shiftwidth()) endif " If we’ve seen an addition or exception already and this is of the same " kind, the user is writing a broken DTD. Time to bail. if seen[additions_exceptions] return indent endif let seen[additions_exceptions] = 1 let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end) if indent_of_innermost != -1 return indent_of_innermost endif endwhile elseif declaration == 'ATTLIST' " Check for element name. If none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" return indent + shiftwidth() endif " Check for any number of attributes. while 1 " Check for attribute name. If none exists, indent one level, unless the " current line is a lone “>”, in which case we indent to the same level " as the first line. Otherwise, if the attribute name is “>”, we have " actually hit the end of the attribute list, in which case we indent to " the same level as the first line. let [name, end] = s:lex(line, end) if name == "" " TODO: Should use s:lex here on getline(v:lnum) and check for >. return getline(v:lnum) =~ '^\s*>' ? indent : (indent + shiftwidth()) elseif name == ">" return indent endif " Check for attribute value declaration. If none exists, indent two " levels. Otherwise, if it’s an enumerated value, check for nested " parentheses and indent to the innermost one if we don’t reach the end " of the listc. Otherwise, just continue with looking for the default " attribute value. " TODO: Do validation of keywords " (CDATA|NMTOKEN|NMTOKENS|ID|IDREF|IDREFS|ENTITY|ENTITIES)? let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)') if value == "" return indent + shiftwidth() * 2 elseif value == 'NOTATION' " If this is a enumerated value based on notations, read another token " for the actual value. If it doesn’t exist, indent three levels. " TODO: If validating according to above, value must be equal to '('. let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)') if value == "" return indent + shiftwidth() * 3 endif endif if value == '(' let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end) if indent_of_innermost != -1 return indent_of_innermost endif endif " Finally look for the attribute’s default value. If non exists, indent " two levels. let [default, end] = s:lex(line, end, '^\%("\_[^"]*"\|#\(REQUIRED\|IMPLIED\|FIXED\)\)') if default == "" return indent + shiftwidth() * 2 elseif default == '#FIXED' " We need to look for the fixed value. If non exists, indent three " levels. let [default, end] = s:lex(line, end, '^"\_[^"]*"') if default == "" return indent + shiftwidth() * 3 endif endif endwhile elseif declaration == 'ENTITY' " Check for entity name. If none exists, indent one level. Otherwise, if " the name actually turns out to be a percent sign, “%”, this is a " parameter entity. Read another token to determine the entity name and, " again, if none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" return indent + shiftwidth() elseif name == '%' let [name, end] = s:lex(line, end) if name == "" return indent + shiftwidth() endif endif " Now check for the entity value. If none exists, indent one level. If it " does exist, indent to same level as first line, as we’re now done with " this entity. " " The entity value can be a string in single or double quotes (no escapes " to worry about, as entities are used instead). However, it can also be " that this is an external unparsed entity. In that case we have to look " further for (possibly) a public ID and an URI followed by the NDATA " keyword and the actual notation name. For the public ID and URI, indent " two levels, if they don’t exist. If the NDATA keyword doesn’t exist, " indent one level. Otherwise, if the actual notation name doesn’t exist, " indent two level. If it does, indent to same level as first line, as " we’re now done with this entity. let [value, end] = s:lex(line, end) if value == "" return indent + shiftwidth() elseif value == 'SYSTEM' || value == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') if quoted_string == "" return indent + shiftwidth() * 2 endif if value == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') if quoted_string == "" return indent + shiftwidth() * 2 endif endif let [ndata, end] = s:lex(line, end) if ndata == "" return indent + shiftwidth() endif let [name, end] = s:lex(line, end) return name == "" ? (indent + shiftwidth() * 2) : indent else return indent endif elseif declaration == 'NOTATION' " Check for notation name. If none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" return indent + shiftwidth() endif " Now check for the external ID. If none exists, indent one level. let [id, end] = s:lex(line, end) if id == "" return indent + shiftwidth() elseif id == 'SYSTEM' || id == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') if quoted_string == "" return indent + shiftwidth() * 2 endif if id == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\|>\)') if quoted_string == "" " TODO: Should use s:lex here on getline(v:lnum) and check for >. return getline(v:lnum) =~ '^\s*>' ? indent : (indent + shiftwidth() * 2) elseif quoted_string == '>' return indent endif endif endif return indent endif " TODO: Processing directives could be indented I suppose. But perhaps it’s " just as well to let the user decide how to indent them (perhaps extending " this function to include proper support for whatever processing directive " language they want to use). " Conditional sections are simply passed along to let Vim decide what to do " (and hence the user). return -1 endfunction let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/dtrace.vim��������������������������������������������������������������0000664�0000000�0000000�00000000703�13204015742�0017731�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: D script as described in "Solaris Dynamic Tracing Guide", " http://docs.sun.com/app/docs/doc/817-6223 " Last Change: 2008/03/20 " Version: 1.2 " Maintainer: Nicolas Weber <nicolasweber@gmx.de> " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Built-in C indenting works nicely for dtrace. setlocal cindent let b:undo_indent = "setl cin<" �������������������������������������������������������������neovim-0.2.2/runtime/indent/dylan.vim���������������������������������������������������������������0000664�0000000�0000000�00000005223�13204015742�0017600�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Dylan " Version: 0.01 " Last Change: 2017 Jun 13 " Maintainer: Brent A. Fulgham <bfulgham@debian.org> " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentkeys+==~begin,=~block,=~case,=~cleanup,=~define,=~end,=~else,=~elseif,=~exception,=~for,=~finally,=~if,=~otherwise,=~select,=~unless,=~while " Define the appropriate indent function but only once setlocal indentexpr=DylanGetIndent() if exists("*DylanGetIndent") finish endif function DylanGetIndent() " Get the line to be indented let cline = getline(v:lnum) " Don't reindent comments on first column if cline =~ '^/\[/\*]' return 0 endif "Find the previous non-blank line let lnum = prevnonblank(v:lnum - 1) "Use zero indent at the top of the file if lnum == 0 return 0 endif let prevline=getline(lnum) let ind = indent(lnum) let chg = 0 " If previous line was a comment, use its indent if prevline =~ '^\s*//' return ind endif " If previous line was a 'define', indent if prevline =~? '\(^\s*\(begin\|block\|case\|define\|else\|elseif\|for\|finally\|if\|select\|unless\|while\)\|\s*\S*\s*=>$\)' let chg = shiftwidth() " local methods indent the shift-width, plus 6 for the 'local' elseif prevline =~? '^\s*local' let chg = shiftwidth() + 6 " If previous line was a let with no closing semicolon, indent elseif prevline =~? '^\s*let.*[^;]\s*$' let chg = shiftwidth() " If previous line opened a parenthesis, and did not close it, indent elseif prevline =~ '^.*(\s*[^)]*\((.*)\)*[^)]*$' return = match( prevline, '(.*\((.*)\|[^)]\)*.*$') + 1 "elseif prevline =~ '^.*(\s*[^)]*\((.*)\)*[^)]*$' elseif prevline =~ '^[^(]*)\s*$' " This line closes a parenthesis. Find opening let curr_line = prevnonblank(lnum - 1) while curr_line >= 0 let str = getline(curr_line) if str !~ '^.*(\s*[^)]*\((.*)\)*[^)]*$' let curr_line = prevnonblank(curr_line - 1) else break endif endwhile if curr_line < 0 return -1 endif let ind = indent(curr_line) " Although we found the closing parenthesis, make sure this " line doesn't start with an indentable command: let curr_str = getline(curr_line) if curr_str =~? '^\s*\(begin\|block\|case\|define\|else\|elseif\|for\|finally\|if\|select\|unless\|while\)' let chg = shiftwidth() endif endif " If a line starts with end, un-indent (even if we just indented!) if cline =~? '^\s*\(cleanup\|end\|else\|elseif\|exception\|finally\|otherwise\)' let chg = chg - shiftwidth() endif return ind + chg endfunction " vim:sw=2 tw=130 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/eiffel.vim��������������������������������������������������������������0000664�0000000�0000000�00000006365�13204015742�0017733�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Eiffel " Maintainer: Jocelyn Fiat <jfiat@eiffel.com> " Previous-Maintainer: David Clarke <gadicath@dishevelled.net> " Contributions from: Takuya Fujiwara " Contributions from: Thilo Six " $Date: 2017/03/08 06:00:00 $ " $Revision: 1.4 $ " URL: https://github.com/eiffelhub/vim-eiffel " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetEiffelIndent() setlocal nolisp setlocal nosmartindent setlocal nocindent setlocal autoindent setlocal comments=:-- setlocal indentkeys+==end,=else,=ensure,=require,=check,=loop,=until setlocal indentkeys+==creation,=feature,=inherit,=class,=is,=redefine,=rename,=variant setlocal indentkeys+==invariant,=do,=local,=export let b:undo_indent = "setl smartindent< indentkeys< indentexpr< autoindent< comments< " " Define some stuff " keywords grouped by indenting let s:trust_user_indent = '\(+\)\(\s*\(--\).*\)\=$' let s:relative_indent = '^\s*\(deferred\|class\|feature\|creation\|inherit\|loop\|from\|across\|until\|if\|else\|elseif\|ensure\|require\|check\|do\|local\|invariant\|variant\|rename\|redefine\|do\|export\)\>' let s:outdent = '^\s*\(else\|invariant\|variant\|do\|require\|until\|loop\|local\)\>' let s:no_indent = '^\s*\(class\|feature\|creation\|inherit\)\>' let s:single_dent = '^[^-]\+[[:alnum:]]\+ is\(\s*\(--\).*\)\=$' let s:inheritance_dent = '\s*\(redefine\|rename\|export\)\>' " Only define the function once. if exists("*GetEiffelIndent") finish endif let s:keepcpo= &cpo set cpo&vim function GetEiffelIndent() " Eiffel Class indenting " " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " At the start of the file use zero indent. if lnum == 0 return 0 endif " trust the user's indenting if getline(lnum) =~ s:trust_user_indent return -1 endif " Add a 'shiftwidth' after lines that start with an indent word let ind = indent(lnum) if getline(lnum) =~ s:relative_indent let ind = ind + shiftwidth() endif " Indent to single indent if getline(v:lnum) =~ s:single_dent && getline(v:lnum) !~ s:relative_indent \ && getline(v:lnum) !~ '\s*\<\(and\|or\|implies\)\>' let ind = shiftwidth() endif " Indent to double indent if getline(v:lnum) =~ s:inheritance_dent let ind = 2 * shiftwidth() endif " Indent line after the first line of the function definition if getline(lnum) =~ s:single_dent let ind = ind + shiftwidth() endif " The following should always be at the start of a line, no indenting if getline(v:lnum) =~ s:no_indent let ind = 0 endif " Subtract a 'shiftwidth', if this isn't the first thing after the 'is' " or first thing after the 'do' if getline(v:lnum) =~ s:outdent && getline(v:lnum - 1) !~ s:single_dent \ && getline(v:lnum - 1) !~ '^\s*do\>' let ind = ind - shiftwidth() endif " Subtract a shiftwidth for end statements if getline(v:lnum) =~ '^\s*end\>' let ind = ind - shiftwidth() endif " set indent of zero end statements that are at an indent of 3, this should " only ever be the class's end. if getline(v:lnum) =~ '^\s*end\>' && ind == shiftwidth() let ind = 0 endif return ind endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/erlang.vim��������������������������������������������������������������0000664�0000000�0000000�00000132453�13204015742�0017747�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Erlang (http://www.erlang.org) " Author: Csaba Hoch <csaba.hoch@gmail.com> " Contributors: Edwin Fine <efine145_nospam01 at usa dot net> " Pawel 'kTT' Salata <rockplayer.pl@gmail.com> " Ricardo Catalinas Jiménez <jimenezrick@gmail.com> " Last Update: 2013-Jul-21 " License: Vim license " URL: https://github.com/hcs42/vim-erlang " Note About Usage: " This indentation script works best with the Erlang syntax file created by " Kreąimir Marľić (Kresimir Marzic) and maintained by Csaba Hoch. " Notes About Implementation: " " - LTI = Line to indent. " - The index of the first line is 1, but the index of the first column is 0. " Initialization {{{1 " ============== " Only load this indent file when no other was loaded " Vim 7 or later is needed if exists("b:did_indent") || version < 700 finish else let b:did_indent = 1 endif setlocal indentexpr=ErlangIndent() setlocal indentkeys+=0=end,0=of,0=catch,0=after,0=when,0=),0=],0=},0=>> " Only define the functions once if exists("*ErlangIndent") finish endif let s:cpo_save = &cpo set cpo&vim " Logging library {{{1 " =============== " Purpose: " Logs the given string using the ErlangIndentLog function if it exists. " Parameters: " s: string function! s:Log(s) if exists("*ErlangIndentLog") call ErlangIndentLog(a:s) endif endfunction " Line tokenizer library {{{1 " ====================== " Indtokens are "indentation tokens". " Purpose: " Calculate the new virtual column after the given segment of a line. " Parameters: " line: string " first_index: integer -- the index of the first character of the segment " last_index: integer -- the index of the last character of the segment " vcol: integer -- the virtual column of the first character of the token " tabstop: integer -- the value of the 'tabstop' option to be used " Returns: " vcol: integer " Example: " " index: 0 12 34567 " " vcol: 0 45 89 " s:CalcVCol("\t'\tx', b", 1, 4, 4) -> 10 function! s:CalcVCol(line, first_index, last_index, vcol, tabstop) " We copy the relevent segment of the line, otherwise if the line were " e.g. `"\t", term` then the else branch below would consume the `", term` " part at once. let line = a:line[a:first_index : a:last_index] let i = 0 let last_index = a:last_index - a:first_index let vcol = a:vcol while 0 <= i && i <= last_index if line[i] ==# "\t" " Example (when tabstop == 4): " " vcol + tab -> next_vcol " 0 + tab -> 4 " 1 + tab -> 4 " 2 + tab -> 4 " 3 + tab -> 4 " 4 + tab -> 8 " " next_i - i == the number of tabs let next_i = matchend(line, '\t*', i + 1) let vcol = (vcol / a:tabstop + (next_i - i)) * a:tabstop call s:Log('new vcol after tab: '. vcol) else let next_i = matchend(line, '[^\t]*', i + 1) let vcol += next_i - i call s:Log('new vcol after other: '. vcol) endif let i = next_i endwhile return vcol endfunction " Purpose: " Go through the whole line and return the tokens in the line. " Parameters: " line: string -- the line to be examined " string_continuation: bool " atom_continuation: bool " Returns: " indtokens = [indtoken] " indtoken = [token, vcol, col] " token = string (examples: 'begin', '<variable>', '}') " vcol = integer (the virtual column of the first character of the token) " col = integer function! s:GetTokensFromLine(line, string_continuation, atom_continuation, \tabstop) let linelen = strlen(a:line) " The length of the line let i = 0 " The index of the current character in the line let vcol = 0 " The virtual column of the current character let indtokens = [] if a:string_continuation let i = matchend(a:line, '^\%([^"\\]\|\\.\)*"', 0) if i ==# -1 call s:Log(' Whole line is string continuation -> ignore') return [] else let vcol = s:CalcVCol(a:line, 0, i - 1, 0, a:tabstop) call add(indtokens, ['<string_end>', vcol, i]) endif elseif a:atom_continuation let i = matchend(a:line, "^\\%([^'\\\\]\\|\\\\.\\)*'", 0) if i ==# -1 call s:Log(' Whole line is quoted atom continuation -> ignore') return [] else let vcol = s:CalcVCol(a:line, 0, i - 1, 0, a:tabstop) call add(indtokens, ['<quoted_atom_end>', vcol, i]) endif endif while 0 <= i && i < linelen let next_vcol = '' " Spaces if a:line[i] ==# ' ' let next_i = matchend(a:line, ' *', i + 1) " Tabs elseif a:line[i] ==# "\t" let next_i = matchend(a:line, '\t*', i + 1) " See example in s:CalcVCol let next_vcol = (vcol / a:tabstop + (next_i - i)) * a:tabstop " Comment elseif a:line[i] ==# '%' let next_i = linelen " String token: "..." elseif a:line[i] ==# '"' let next_i = matchend(a:line, '\%([^"\\]\|\\.\)*"', i + 1) if next_i ==# -1 call add(indtokens, ['<string_start>', vcol, i]) else let next_vcol = s:CalcVCol(a:line, i, next_i - 1, vcol, a:tabstop) call add(indtokens, ['<string>', vcol, i]) endif " Quoted atom token: '...' elseif a:line[i] ==# "'" let next_i = matchend(a:line, "\\%([^'\\\\]\\|\\\\.\\)*'", i + 1) if next_i ==# -1 call add(indtokens, ['<quoted_atom_start>', vcol, i]) else let next_vcol = s:CalcVCol(a:line, i, next_i - 1, vcol, a:tabstop) call add(indtokens, ['<quoted_atom>', vcol, i]) endif " Keyword or atom or variable token or number elseif a:line[i] =~# '[a-zA-Z_@0-9]' let next_i = matchend(a:line, \'[[:alnum:]_@:]*\%(\s*#\s*[[:alnum:]_@:]*\)\=', \i + 1) call add(indtokens, [a:line[(i):(next_i - 1)], vcol, i]) " Character token: $<char> (as in: $a) elseif a:line[i] ==# '$' call add(indtokens, ['$.', vcol, i]) let next_i = i + 2 " Dot token: . elseif a:line[i] ==# '.' let next_i = i + 1 if i + 1 ==# linelen || a:line[i + 1] =~# '[[:blank:]%]' " End of clause token: . (as in: f() -> ok.) call add(indtokens, ['<end_of_clause>', vcol, i]) else " Possibilities: " - Dot token in float: . (as in: 3.14) " - Dot token in record: . (as in: #myrec.myfield) call add(indtokens, ['.', vcol, i]) endif " Equal sign elseif a:line[i] ==# '=' " This is handled separately so that "=<<" will be parsed as " ['=', '<<'] instead of ['=<', '<']. Although Erlang parses it " currently in the latter way, that may be fixed some day. call add(indtokens, [a:line[i], vcol, i]) let next_i = i + 1 " Three-character tokens elseif i + 1 < linelen && \ index(['=:=', '=/='], a:line[i : i + 1]) != -1 call add(indtokens, [a:line[i : i + 1], vcol, i]) let next_i = i + 2 " Two-character tokens elseif i + 1 < linelen && \ index(['->', '<<', '>>', '||', '==', '/=', '=<', '>=', '++', '--', \ '::'], \ a:line[i : i + 1]) != -1 call add(indtokens, [a:line[i : i + 1], vcol, i]) let next_i = i + 2 " Other character: , ; < > ( ) [ ] { } # + - * / : ? = ! | else call add(indtokens, [a:line[i], vcol, i]) let next_i = i + 1 endif if next_vcol ==# '' let vcol += next_i - i else let vcol = next_vcol endif let i = next_i endwhile return indtokens endfunction " TODO: doc, handle "not found" case function! s:GetIndtokenAtCol(indtokens, col) let i = 0 while i < len(a:indtokens) if a:indtokens[i][2] ==# a:col return [1, i] elseif a:indtokens[i][2] > a:col return [0, s:IndentError('No token at col ' . a:col . ', ' . \'indtokens = ' . string(a:indtokens), \'', '')] endif let i += 1 endwhile return [0, s:IndentError('No token at col ' . a:col . ', ' . \'indtokens = ' . string(a:indtokens), \'', '')] endfunction " Stack library {{{1 " ============= " Purpose: " Push a token onto the parser's stack. " Parameters: " stack: [token] " token: string function! s:Push(stack, token) call s:Log(' Stack Push: "' . a:token . '" into ' . string(a:stack)) call insert(a:stack, a:token) endfunction " Purpose: " Pop a token from the parser's stack. " Parameters: " stack: [token] " token: string " Returns: " token: string -- the removed element function! s:Pop(stack) let head = remove(a:stack, 0) call s:Log(' Stack Pop: "' . head . '" from ' . string(a:stack)) return head endfunction " Library for accessing and storing tokenized lines {{{1 " ================================================= " The Erlang token cache: an `lnum -> indtokens` dictionary that stores the " tokenized lines. let s:all_tokens = {} let s:file_name = '' let s:last_changedtick = -1 " Purpose: " Clear the Erlang token cache if we have a different file or the file has " been changed since the last indentation. function! s:ClearTokenCacheIfNeeded() let file_name = expand('%:p') if file_name != s:file_name || \ b:changedtick != s:last_changedtick let s:file_name = file_name let s:last_changedtick = b:changedtick let s:all_tokens = {} endif endfunction " Purpose: " Return the tokens of line `lnum`, if that line is not empty. If it is " empty, find the first non-empty line in the given `direction` and return " the tokens of that line. " Parameters: " lnum: integer " direction: 'up' | 'down' " Returns: " result: [] -- the result is an empty list if we hit the beginning or end " of the file " | [lnum, indtokens] " lnum: integer -- the index of the non-empty line that was found and " tokenized " indtokens: [indtoken] -- the tokens of line `lnum` function! s:TokenizeLine(lnum, direction) call s:Log('Tokenizing starts from line ' . a:lnum) if a:direction ==# 'up' let lnum = prevnonblank(a:lnum) else " a:direction ==# 'down' let lnum = nextnonblank(a:lnum) endif " We hit the beginning or end of the file if lnum ==# 0 let indtokens = [] call s:Log(' We hit the beginning or end of the file.') " The line has already been parsed elseif has_key(s:all_tokens, lnum) let indtokens = s:all_tokens[lnum] call s:Log('Cached line ' . lnum . ': ' . getline(lnum)) call s:Log(" Tokens in the line:\n - " . join(indtokens, "\n - ")) " The line should be parsed now else " Parse the line let line = getline(lnum) let string_continuation = s:IsLineStringContinuation(lnum) let atom_continuation = s:IsLineAtomContinuation(lnum) let indtokens = s:GetTokensFromLine(line, string_continuation, \atom_continuation, &tabstop) let s:all_tokens[lnum] = indtokens call s:Log('Tokenizing line ' . lnum . ': ' . line) call s:Log(" Tokens in the line:\n - " . join(indtokens, "\n - ")) endif return [lnum, indtokens] endfunction " Purpose: " As a helper function for PrevIndToken and NextIndToken, the FindIndToken " function finds the first line with at least one token in the given " direction. " Parameters: " lnum: integer " direction: 'up' | 'down' " Returns: " result: [] -- the result is an empty list if we hit the beginning or end " of the file " | indtoken function! s:FindIndToken(lnum, dir) let lnum = a:lnum while 1 let lnum += (a:dir ==# 'up' ? -1 : 1) let [lnum, indtokens] = s:TokenizeLine(lnum, a:dir) if lnum ==# 0 " We hit the beginning or end of the file return [] elseif !empty(indtokens) return indtokens[a:dir ==# 'up' ? -1 : 0] endif endwhile endfunction " Purpose: " Find the token that directly precedes the given token. " Parameters: " lnum: integer -- the line of the given token " i: the index of the given token within line `lnum` " Returns: " result = [] -- the result is an empty list if the given token is the first " token of the file " | indtoken function! s:PrevIndToken(lnum, i) call s:Log(' PrevIndToken called: lnum=' . a:lnum . ', i =' . a:i) " If the current line has a previous token, return that if a:i > 0 return s:all_tokens[a:lnum][a:i - 1] else return s:FindIndToken(a:lnum, 'up') endif endfunction " Purpose: " Find the token that directly succeeds the given token. " Parameters: " lnum: integer -- the line of the given token " i: the index of the given token within line `lnum` " Returns: " result = [] -- the result is an empty list if the given token is the last " token of the file " | indtoken function! s:NextIndToken(lnum, i) call s:Log(' NextIndToken called: lnum=' . a:lnum . ', i =' . a:i) " If the current line has a next token, return that if len(s:all_tokens[a:lnum]) > a:i + 1 return s:all_tokens[a:lnum][a:i + 1] else return s:FindIndToken(a:lnum, 'down') endif endfunction " ErlangCalcIndent helper functions {{{1 " ================================= " Purpose: " This function is called when the parser encounters a syntax error. " " If we encounter a syntax error, we return " g:erlang_unexpected_token_indent, which is -1 by default. This means that " the indentation of the LTI will not be changed. " Parameter: " msg: string " token: string " stack: [token] " Returns: " indent: integer function! s:IndentError(msg, token, stack) call s:Log('Indent error: ' . a:msg . ' -> return') call s:Log(' Token = ' . a:token . ', ' . \' stack = ' . string(a:stack)) return g:erlang_unexpected_token_indent endfunction " Purpose: " This function is called when the parser encounters an unexpected token, " and the parser will return the number given back by UnexpectedToken. " " If we encounter an unexpected token, we return " g:erlang_unexpected_token_indent, which is -1 by default. This means that " the indentation of the LTI will not be changed. " Parameter: " token: string " stack: [token] " Returns: " indent: integer function! s:UnexpectedToken(token, stack) call s:Log(' Unexpected token ' . a:token . ', stack = ' . \string(a:stack) . ' -> return') return g:erlang_unexpected_token_indent endfunction if !exists('g:erlang_unexpected_token_indent') let g:erlang_unexpected_token_indent = -1 endif " Purpose: " Return whether the given line starts with a string continuation. " Parameter: " lnum: integer " Returns: " result: bool " Example: " f() -> % IsLineStringContinuation = false " "This is a % IsLineStringContinuation = false " multiline % IsLineStringContinuation = true " string". % IsLineStringContinuation = true function! s:IsLineStringContinuation(lnum) if has('syntax_items') return synIDattr(synID(a:lnum, 1, 0), 'name') =~# '^erlangString' else return 0 endif endfunction " Purpose: " Return whether the given line starts with an atom continuation. " Parameter: " lnum: integer " Returns: " result: bool " Example: " 'function with % IsLineAtomContinuation = true, but should be false " weird name'() -> % IsLineAtomContinuation = true " ok. % IsLineAtomContinuation = false function! s:IsLineAtomContinuation(lnum) if has('syntax_items') return synIDattr(synID(a:lnum, 1, 0), 'name') =~# '^erlangQuotedAtom' else return 0 endif endfunction " Purpose: " Return whether the 'catch' token (which should be the `i`th token in line " `lnum`) is standalone or part of a try-catch block, based on the preceding " token. " Parameters: " lnum: integer " i: integer " Return: " is_standalone: bool function! s:IsCatchStandalone(lnum, i) call s:Log(' IsCatchStandalone called: lnum=' . a:lnum . ', i=' . a:i) let prev_indtoken = s:PrevIndToken(a:lnum, a:i) " If we hit the beginning of the file, it is not a catch in a try block if prev_indtoken == [] return 1 endif let prev_token = prev_indtoken[0] if prev_token =~# '[A-Z_@0-9]' let is_standalone = 0 elseif prev_token =~# '[a-z]' if index(['after', 'and', 'andalso', 'band', 'begin', 'bnot', 'bor', 'bsl', \ 'bsr', 'bxor', 'case', 'catch', 'div', 'not', 'or', 'orelse', \ 'rem', 'try', 'xor'], prev_token) != -1 " If catch is after these keywords, it is standalone let is_standalone = 1 else " If catch is after another keyword (e.g. 'end') or an atom, it is " part of try-catch. " " Keywords: " - may precede 'catch': end " - may not precede 'catch': fun if of receive when " - unused: cond let query let is_standalone = 0 endif elseif index([')', ']', '}', '<string>', '<string_end>', '<quoted_atom>', \ '<quoted_atom_end>', '$.'], prev_token) != -1 let is_standalone = 0 else " This 'else' branch includes the following tokens: " -> == /= =< < >= > =:= =/= + - * / ++ -- :: < > ; ( [ { ? = ! . | let is_standalone = 1 endif call s:Log(' "catch" preceded by "' . prev_token . '" -> catch ' . \(is_standalone ? 'is standalone' : 'belongs to try-catch')) return is_standalone endfunction " Purpose: " This function is called when a begin-type element ('begin', 'case', " '[', '<<', etc.) is found. It asks the caller to return if the stack " Parameters: " stack: [token] " token: string " curr_vcol: integer " stored_vcol: integer " sw: integer -- number of spaces to be used after the begin element as " indentation " Returns: " result: [should_return, indent] " should_return: bool -- if true, the caller should return `indent` to Vim " indent -- integer function! s:BeginElementFoundIfEmpty(stack, token, curr_vcol, stored_vcol, sw) if empty(a:stack) if a:stored_vcol ==# -1 call s:Log(' "' . a:token . '" directly preceeds LTI -> return') return [1, a:curr_vcol + a:sw] else call s:Log(' "' . a:token . \'" token (whose expression includes LTI) found -> return') return [1, a:stored_vcol] endif else return [0, 0] endif endfunction " Purpose: " This function is called when a begin-type element ('begin', 'case', '[', " '<<', etc.) is found, and in some cases when 'after' and 'when' is found. " It asks the caller to return if the stack is already empty. " Parameters: " stack: [token] " token: string " curr_vcol: integer " stored_vcol: integer " end_token: end token that belongs to the begin element found (e.g. if the " begin element is 'begin', the end token is 'end') " sw: integer -- number of spaces to be used after the begin element as " indentation " Returns: " result: [should_return, indent] " should_return: bool -- if true, the caller should return `indent` to Vim " indent -- integer function! s:BeginElementFound(stack, token, curr_vcol, stored_vcol, end_token, sw) " Return 'return' if the stack is empty let [ret, res] = s:BeginElementFoundIfEmpty(a:stack, a:token, a:curr_vcol, \a:stored_vcol, a:sw) if ret | return [ret, res] | endif if a:stack[0] ==# a:end_token call s:Log(' "' . a:token . '" pops "' . a:end_token . '"') call s:Pop(a:stack) if !empty(a:stack) && a:stack[0] ==# 'align_to_begin_element' call s:Pop(a:stack) if empty(a:stack) return [1, a:curr_vcol] else return [1, s:UnexpectedToken(a:token, a:stack)] endif else return [0, 0] endif else return [1, s:UnexpectedToken(a:token, a:stack)] endif endfunction " Purpose: " This function is called when we hit the beginning of a file or an " end-of-clause token -- i.e. when we found the beginning of the current " clause. " " If the stack contains an '->' or 'when', this means that we can return " now, since we were looking for the beginning of the clause. " Parameters: " stack: [token] " token: string " stored_vcol: integer " Returns: " result: [should_return, indent] " should_return: bool -- if true, the caller should return `indent` to Vim " indent -- integer function! s:BeginningOfClauseFound(stack, token, stored_vcol) if !empty(a:stack) && a:stack[0] ==# 'when' call s:Log(' BeginningOfClauseFound: "when" found in stack') call s:Pop(a:stack) if empty(a:stack) call s:Log(' Stack is ["when"], so LTI is in a guard -> return') return [1, a:stored_vcol + shiftwidth() + 2] else return [1, s:UnexpectedToken(a:token, a:stack)] endif elseif !empty(a:stack) && a:stack[0] ==# '->' call s:Log(' BeginningOfClauseFound: "->" found in stack') call s:Pop(a:stack) if empty(a:stack) call s:Log(' Stack is ["->"], so LTI is in function body -> return') return [1, a:stored_vcol + shiftwidth()] elseif a:stack[0] ==# ';' call s:Pop(a:stack) if empty(a:stack) call s:Log(' Stack is ["->", ";"], so LTI is in a function head ' . \'-> return') return [0, a:stored_vcol] else return [1, s:UnexpectedToken(a:token, a:stack)] endif else return [1, s:UnexpectedToken(a:token, a:stack)] endif else return [0, 0] endif endfunction let g:erlang_indent_searchpair_timeout = 2000 " TODO function! s:SearchPair(lnum, curr_col, start, middle, end) call cursor(a:lnum, a:curr_col + 1) let [lnum_new, col1_new] = \searchpairpos(a:start, a:middle, a:end, 'bW', \'synIDattr(synID(line("."), col("."), 0), "name") ' . \'=~? "string\\|quotedatom\\|todo\\|comment\\|' . \'erlangmodifier"', \0, g:erlang_indent_searchpair_timeout) return [lnum_new, col1_new - 1] endfunction function! s:SearchEndPair(lnum, curr_col) return s:SearchPair( \ a:lnum, a:curr_col, \ '\C\<\%(case\|try\|begin\|receive\|if\)\>\|' . \ '\<fun\>\%(\s\|\n\|%.*$\)*(', \ '', \ '\<end\>') endfunction " ErlangCalcIndent {{{1 " ================ " Purpose: " Calculate the indentation of the given line. " Parameters: " lnum: integer -- index of the line for which the indentation should be " calculated " stack: [token] -- initial stack " Return: " indent: integer -- if -1, that means "don't change the indentation"; " otherwise it means "indent the line with `indent` " number of spaces or equivalent tabs" function! s:ErlangCalcIndent(lnum, stack) let res = s:ErlangCalcIndent2(a:lnum, a:stack) call s:Log("ErlangCalcIndent returned: " . res) return res endfunction function! s:ErlangCalcIndent2(lnum, stack) let lnum = a:lnum let stored_vcol = -1 " Virtual column of the first character of the token that " we currently think we might align to. let mode = 'normal' let stack = a:stack let semicolon_abscol = '' " Walk through the lines of the buffer backwards (starting from the " previous line) until we can decide how to indent the current line. while 1 let [lnum, indtokens] = s:TokenizeLine(lnum, 'up') " Hit the start of the file if lnum ==# 0 let [ret, res] = s:BeginningOfClauseFound(stack, 'beginning_of_file', \stored_vcol) if ret | return res | endif return 0 endif let i = len(indtokens) - 1 let last_token_of_line = 1 while i >= 0 let [token, curr_vcol, curr_col] = indtokens[i] call s:Log(' Analyzing the following token: ' . string(indtokens[i])) if len(stack) > 256 " TODO: magic number return s:IndentError('Stack too long', token, stack) endif if token ==# '<end_of_clause>' let [ret, res] = s:BeginningOfClauseFound(stack, token, stored_vcol) if ret | return res | endif if stored_vcol ==# -1 call s:Log(' End of clause directly preceeds LTI -> return') return 0 else call s:Log(' End of clause (but not end of line) -> return') return stored_vcol endif elseif stack == ['prev_term_plus'] if token =~# '[a-zA-Z_@]' || \ token ==# '<string>' || token ==# '<string_start>' || \ token ==# '<quoted_atom>' || token ==# '<quoted_atom_start>' call s:Log(' previous token found: curr_vcol + plus = ' . \curr_vcol . " + " . plus) return curr_vcol + plus endif elseif token ==# 'begin' let [ret, res] = s:BeginElementFound(stack, token, curr_vcol, \stored_vcol, 'end', shiftwidth()) if ret | return res | endif " case EXPR of BRANCHES end " try EXPR catch BRANCHES end " try EXPR after BODY end " try EXPR catch BRANCHES after BODY end " try EXPR of BRANCHES catch BRANCHES end " try EXPR of BRANCHES after BODY end " try EXPR of BRANCHES catch BRANCHES after BODY end " receive BRANCHES end " receive BRANCHES after BRANCHES end " This branch is not Emacs-compatible elseif (index(['of', 'receive', 'after', 'if'], token) != -1 || \ (token ==# 'catch' && !s:IsCatchStandalone(lnum, i))) && \ !last_token_of_line && \ (empty(stack) || stack ==# ['when'] || stack ==# ['->'] || \ stack ==# ['->', ';']) " If we are after of/receive, but these are not the last " tokens of the line, we want to indent like this: " " % stack == [] " receive stored_vcol, " LTI " " % stack == ['->', ';'] " receive stored_vcol -> " B; " LTI " " % stack == ['->'] " receive stored_vcol -> " LTI " " % stack == ['when'] " receive stored_vcol when " LTI " stack = [] => LTI is a condition " stack = ['->'] => LTI is a branch " stack = ['->', ';'] => LTI is a condition " stack = ['when'] => LTI is a guard if empty(stack) || stack == ['->', ';'] call s:Log(' LTI is in a condition after ' . \'"of/receive/after/if/catch" -> return') return stored_vcol elseif stack == ['->'] call s:Log(' LTI is in a branch after ' . \'"of/receive/after/if/catch" -> return') return stored_vcol + shiftwidth() elseif stack == ['when'] call s:Log(' LTI is in a guard after ' . \'"of/receive/after/if/catch" -> return') return stored_vcol + shiftwidth() else return s:UnexpectedToken(token, stack) endif elseif index(['case', 'if', 'try', 'receive'], token) != -1 " stack = [] => LTI is a condition " stack = ['->'] => LTI is a branch " stack = ['->', ';'] => LTI is a condition " stack = ['when'] => LTI is in a guard if empty(stack) " pass elseif (token ==# 'case' && stack[0] ==# 'of') || \ (token ==# 'if') || \ (token ==# 'try' && (stack[0] ==# 'of' || \ stack[0] ==# 'catch' || \ stack[0] ==# 'after')) || \ (token ==# 'receive') " From the indentation point of view, the keyword " (of/catch/after/end) before the LTI is what counts, so " when we reached these tokens, and the stack already had " a catch/after/end, we didn't modify it. " " This way when we reach case/try/receive (i.e. now), " there is at most one of/catch/after/end token in the " stack. if token ==# 'case' || token ==# 'try' || \ (token ==# 'receive' && stack[0] ==# 'after') call s:Pop(stack) endif if empty(stack) call s:Log(' LTI is in a condition; matching ' . \'"case/if/try/receive" found') let stored_vcol = curr_vcol + shiftwidth() elseif stack[0] ==# 'align_to_begin_element' call s:Pop(stack) let stored_vcol = curr_vcol elseif len(stack) > 1 && stack[0] ==# '->' && stack[1] ==# ';' call s:Log(' LTI is in a condition; matching ' . \'"case/if/try/receive" found') call s:Pop(stack) call s:Pop(stack) let stored_vcol = curr_vcol + shiftwidth() elseif stack[0] ==# '->' call s:Log(' LTI is in a branch; matching ' . \'"case/if/try/receive" found') call s:Pop(stack) let stored_vcol = curr_vcol + 2 * shiftwidth() elseif stack[0] ==# 'when' call s:Log(' LTI is in a guard; matching ' . \'"case/if/try/receive" found') call s:Pop(stack) let stored_vcol = curr_vcol + 2 * shiftwidth() + 2 endif endif let [ret, res] = s:BeginElementFound(stack, token, curr_vcol, \stored_vcol, 'end', shiftwidth()) if ret | return res | endif elseif token ==# 'fun' let next_indtoken = s:NextIndToken(lnum, i) call s:Log(' Next indtoken = ' . string(next_indtoken)) if !empty(next_indtoken) && next_indtoken[0] ==# '(' " We have an anonymous function definition " (e.g. "fun () -> ok end") " stack = [] => LTI is a condition " stack = ['->'] => LTI is a branch " stack = ['->', ';'] => LTI is a condition " stack = ['when'] => LTI is in a guard if empty(stack) call s:Log(' LTI is in a condition; matching "fun" found') let stored_vcol = curr_vcol + shiftwidth() elseif len(stack) > 1 && stack[0] ==# '->' && stack[1] ==# ';' call s:Log(' LTI is in a condition; matching "fun" found') call s:Pop(stack) call s:Pop(stack) elseif stack[0] ==# '->' call s:Log(' LTI is in a branch; matching "fun" found') call s:Pop(stack) let stored_vcol = curr_vcol + 2 * shiftwidth() elseif stack[0] ==# 'when' call s:Log(' LTI is in a guard; matching "fun" found') call s:Pop(stack) let stored_vcol = curr_vcol + 2 * shiftwidth() + 2 endif let [ret, res] = s:BeginElementFound(stack, token, curr_vcol, \stored_vcol, 'end', shiftwidth()) if ret | return res | endif else " Pass: we have a function reference (e.g. "fun f/0") endif elseif token ==# '[' " Emacs compatibility let [ret, res] = s:BeginElementFound(stack, token, curr_vcol, \stored_vcol, ']', 1) if ret | return res | endif elseif token ==# '<<' " Emacs compatibility let [ret, res] = s:BeginElementFound(stack, token, curr_vcol, \stored_vcol, '>>', 2) if ret | return res | endif elseif token ==# '(' || token ==# '{' let end_token = (token ==# '(' ? ')' : \token ==# '{' ? '}' : 'error') if empty(stack) " We found the opening paren whose block contains the LTI. let mode = 'inside' elseif stack[0] ==# end_token call s:Log(' "' . token . '" pops "' . end_token . '"') call s:Pop(stack) if !empty(stack) && stack[0] ==# 'align_to_begin_element' " We found the opening paren whose closing paren " starts LTI let mode = 'align_to_begin_element' else " We found the opening pair for a closing paren that " was already in the stack. let mode = 'outside' endif else return s:UnexpectedToken(token, stack) endif if mode ==# 'inside' || mode ==# 'align_to_begin_element' if last_token_of_line && i != 0 " Examples: {{{ " " mode == 'inside': " " my_func( " LTI " " [Variable, { " LTI " " mode == 'align_to_begin_element': " " my_func( " Params " ) % LTI " " [Variable, { " Terms " } % LTI " }}} let stack = ['prev_term_plus'] let plus = (mode ==# 'inside' ? 2 : 1) call s:Log(' "' . token . \'" token found at end of line -> find previous token') elseif mode ==# 'align_to_begin_element' " Examples: {{{ " " mode == 'align_to_begin_element' && !last_token_of_line " " my_func(stored_vcol " ) % LTI " " [Variable, {stored_vcol " } % LTI " " mode == 'align_to_begin_element' && i == 0 " " ( " stored_vcol " ) % LTI " " { " stored_vcol " } % LTI " }}} call s:Log(' "' . token . '" token (whose closing token ' . \'starts LTI) found -> return') return curr_vcol elseif stored_vcol ==# -1 " Examples: {{{ " " mode == 'inside' && stored_vcol == -1 && !last_token_of_line " " my_func( " LTI " [Variable, { " LTI " " mode == 'inside' && stored_vcol == -1 && i == 0 " " ( " LTI " " { " LTI " }}} call s:Log(' "' . token . \'" token (which directly precedes LTI) found -> return') return curr_vcol + 1 else " Examples: {{{ " " mode == 'inside' && stored_vcol != -1 && !last_token_of_line " " my_func(stored_vcol, " LTI " " [Variable, {stored_vcol, " LTI " " mode == 'inside' && stored_vcol != -1 && i == 0 " " (stored_vcol, " LTI " " {stored_vcol, " LTI " }}} call s:Log(' "' . token . \'" token (whose block contains LTI) found -> return') return stored_vcol endif endif elseif index(['end', ')', ']', '}', '>>'], token) != -1 " If we can be sure that there is synchronization in the Erlang " syntax, we use searchpair to make the script quicker. Otherwise we " just push the token onto the stack and keep parsing. " No synchronization -> no searchpair optimization if !exists('b:erlang_syntax_synced') call s:Push(stack, token) " We don't have searchpair optimization for '>>' elseif token ==# '>>' call s:Push(stack, token) elseif token ==# 'end' let [lnum_new, col_new] = s:SearchEndPair(lnum, curr_col) if lnum_new ==# 0 return s:IndentError('Matching token for "end" not found', \token, stack) else if lnum_new != lnum call s:Log(' Tokenize for "end" <<<<') let [lnum, indtokens] = s:TokenizeLine(lnum_new, 'up') call s:Log(' >>>> Tokenize for "end"') endif let [success, i] = s:GetIndtokenAtCol(indtokens, col_new) if !success | return i | endif let [token, curr_vcol, curr_col] = indtokens[i] call s:Log(' Match for "end" in line ' . lnum_new . ': ' . \string(indtokens[i])) endif else " token is one of the following: ')', ']', '}' call s:Push(stack, token) " We have to escape '[', because this string will be interpreted as a " regexp let open_paren = (token ==# ')' ? '(' : \token ==# ']' ? '\[' : \ '{') let [lnum_new, col_new] = s:SearchPair(lnum, curr_col, \open_paren, '', token) if lnum_new ==# 0 return s:IndentError('Matching token not found', \token, stack) else if lnum_new != lnum call s:Log(' Tokenize the opening paren <<<<') let [lnum, indtokens] = s:TokenizeLine(lnum_new, 'up') call s:Log(' >>>>') endif let [success, i] = s:GetIndtokenAtCol(indtokens, col_new) if !success | return i | endif let [token, curr_vcol, curr_col] = indtokens[i] call s:Log(' Match in line ' . lnum_new . ': ' . \string(indtokens[i])) " Go back to the beginning of the loop and handle the opening paren continue endif endif elseif token ==# ';' if empty(stack) call s:Push(stack, ';') elseif index([';', '->', 'when', 'end', 'after', 'catch'], \stack[0]) != -1 " Pass: " " - If the stack top is another ';', then one ';' is " enough. " - If the stack top is an '->' or a 'when', then we " should keep that, because they signify the type of the " LTI (branch, condition or guard). " - From the indentation point of view, the keyword " (of/catch/after/end) before the LTI is what counts, so " if the stack already has a catch/after/end, we don't " modify it. This way when we reach case/try/receive, " there will be at most one of/catch/after/end token in " the stack. else return s:UnexpectedToken(token, stack) endif elseif token ==# '->' if empty(stack) && !last_token_of_line call s:Log(' LTI is in expression after arrow -> return') return stored_vcol elseif empty(stack) || stack[0] ==# ';' || stack[0] ==# 'end' " stack = [';'] -> LTI is either a branch or in a guard " stack = ['->'] -> LTI is a condition " stack = ['->', ';'] -> LTI is a branch call s:Push(stack, '->') elseif index(['->', 'when', 'end', 'after', 'catch'], stack[0]) != -1 " Pass: " " - If the stack top is another '->', then one '->' is " enough. " - If the stack top is a 'when', then we should keep " that, because this signifies that LTI is a in a guard. " - From the indentation point of view, the keyword " (of/catch/after/end) before the LTI is what counts, so " if the stack already has a catch/after/end, we don't " modify it. This way when we reach case/try/receive, " there will be at most one of/catch/after/end token in " the stack. else return s:UnexpectedToken(token, stack) endif elseif token ==# 'when' " Pop all ';' from the top of the stack while !empty(stack) && stack[0] ==# ';' call s:Pop(stack) endwhile if empty(stack) if semicolon_abscol != '' let stored_vcol = semicolon_abscol endif if !last_token_of_line " Example: " when A, " LTI let [ret, res] = s:BeginElementFoundIfEmpty(stack, token, curr_vcol, \stored_vcol, shiftwidth()) if ret | return res | endif else " Example: " when " LTI call s:Push(stack, token) endif elseif index(['->', 'when', 'end', 'after', 'catch'], stack[0]) != -1 " Pass: " - If the stack top is another 'when', then one 'when' is " enough. " - If the stack top is an '->' or a 'when', then we " should keep that, because they signify the type of the " LTI (branch, condition or guard). " - From the indentation point of view, the keyword " (of/catch/after/end) before the LTI is what counts, so " if the stack already has a catch/after/end, we don't " modify it. This way when we reach case/try/receive, " there will be at most one of/catch/after/end token in " the stack. else return s:UnexpectedToken(token, stack) endif elseif token ==# 'of' || token ==# 'after' || \ (token ==# 'catch' && !s:IsCatchStandalone(lnum, i)) if token ==# 'after' " If LTI is between an 'after' and the corresponding " 'end', then let's return let [ret, res] = s:BeginElementFoundIfEmpty(stack, token, curr_vcol, \stored_vcol, shiftwidth()) if ret | return res | endif endif if empty(stack) || stack[0] ==# '->' || stack[0] ==# 'when' call s:Push(stack, token) elseif stack[0] ==# 'catch' || stack[0] ==# 'after' || stack[0] ==# 'end' " Pass: From the indentation point of view, the keyword " (of/catch/after/end) before the LTI is what counts, so " if the stack already has a catch/after/end, we don't " modify it. This way when we reach case/try/receive, " there will be at most one of/catch/after/end token in " the stack. else return s:UnexpectedToken(token, stack) endif elseif token ==# '||' && empty(stack) && !last_token_of_line call s:Log(' LTI is in expression after "||" -> return') return stored_vcol else call s:Log(' Misc token, stack unchanged = ' . string(stack)) endif if empty(stack) || stack[0] ==# '->' || stack[0] ==# 'when' let stored_vcol = curr_vcol let semicolon_abscol = '' call s:Log(' Misc token when the stack is empty or has "->" ' . \'-> setting stored_vcol to ' . stored_vcol) elseif stack[0] ==# ';' let semicolon_abscol = curr_vcol call s:Log(' Setting semicolon-stored_vcol to ' . stored_vcol) endif let i -= 1 call s:Log(' Token processed. stored_vcol=' . stored_vcol) let last_token_of_line = 0 endwhile " iteration on tokens in a line call s:Log(' Line analyzed. stored_vcol=' . stored_vcol) if empty(stack) && stored_vcol != -1 && \ (!empty(indtokens) && indtokens[0][0] != '<string_end>' && \ indtokens[0][0] != '<quoted_atom_end>') call s:Log(' Empty stack at the beginning of the line -> return') return stored_vcol endif let lnum -= 1 endwhile " iteration on lines endfunction " ErlangIndent function {{{1 " ===================== function! ErlangIndent() call s:ClearTokenCacheIfNeeded() let currline = getline(v:lnum) call s:Log('Indenting line ' . v:lnum . ': ' . currline) if s:IsLineStringContinuation(v:lnum) || s:IsLineAtomContinuation(v:lnum) call s:Log('String or atom continuation found -> ' . \'leaving indentation unchanged') return -1 endif let ml = matchlist(currline, \'^\(\s*\)\(\%(end\|of\|catch\|after\)\>\|[)\]}]\|>>\)') " If the line has a special beginning, but not a standalone catch if !empty(ml) && !(ml[2] ==# 'catch' && s:IsCatchStandalone(v:lnum, 0)) let curr_col = len(ml[1]) " If we can be sure that there is synchronization in the Erlang " syntax, we use searchpair to make the script quicker. if ml[2] ==# 'end' && exists('b:erlang_syntax_synced') let [lnum, col] = s:SearchEndPair(v:lnum, curr_col) if lnum ==# 0 return s:IndentError('Matching token for "end" not found', \'end', []) else call s:Log(' Tokenize for "end" <<<<') let [lnum, indtokens] = s:TokenizeLine(lnum, 'up') call s:Log(' >>>> Tokenize for "end"') let [success, i] = s:GetIndtokenAtCol(indtokens, col) if !success | return i | endif let [token, curr_vcol, curr_col] = indtokens[i] call s:Log(' Match for "end" in line ' . lnum . ': ' . \string(indtokens[i])) return curr_vcol endif else call s:Log(" Line type = 'end'") let new_col = s:ErlangCalcIndent(v:lnum - 1, \[ml[2], 'align_to_begin_element']) endif else call s:Log(" Line type = 'normal'") let new_col = s:ErlangCalcIndent(v:lnum - 1, []) if currline =~# '^\s*when\>' let new_col += 2 endif endif if new_col < -1 call s:Log('WARNING: returning new_col == ' . new_col) return g:erlang_unexpected_token_indent endif return new_col endfunction " Cleanup {{{1 " ======= let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 et fdm=marker ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/eruby.vim���������������������������������������������������������������0000664�0000000�0000000�00000005362�13204015742�0017623�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: eRuby " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> if exists("b:did_indent") finish endif runtime! indent/ruby.vim unlet! b:did_indent setlocal indentexpr= if exists("b:eruby_subtype") exe "runtime! indent/".b:eruby_subtype.".vim" else runtime! indent/html.vim endif unlet! b:did_indent " Force HTML indent to not keep state. let b:html_indent_usestate = 0 if &l:indentexpr == '' if &l:cindent let &l:indentexpr = 'cindent(v:lnum)' else let &l:indentexpr = 'indent(prevnonblank(v:lnum-1))' endif endif let b:eruby_subtype_indentexpr = &l:indentexpr let b:did_indent = 1 setlocal indentexpr=GetErubyIndent() setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],o,O,!^F,=end,=else,=elsif,=rescue,=ensure,=when " Only define the function once. if exists("*GetErubyIndent") finish endif " this file uses line continuations let s:cpo_sav = &cpo set cpo&vim function! GetErubyIndent(...) " The value of a single shift-width let sw = shiftwidth() if a:0 && a:1 == '.' let v:lnum = line('.') elseif a:0 && a:1 =~ '^\d' let v:lnum = a:1 endif let vcol = col('.') call cursor(v:lnum,1) let inruby = searchpair('<%','','%>','W') call cursor(v:lnum,vcol) if inruby && getline(v:lnum) !~ '^<%\|^\s*[-=]\=%>' let ind = GetRubyIndent(v:lnum) else exe "let ind = ".b:eruby_subtype_indentexpr " Workaround for Andy Wokula's HTML indent. This should be removed after " some time, since the newest version is fixed in a different way. if b:eruby_subtype_indentexpr =~# '^HtmlIndent(' \ && exists('b:indent') \ && type(b:indent) == type({}) \ && has_key(b:indent, 'lnum') " Force HTML indent to not keep state let b:indent.lnum = -1 endif endif let lnum = prevnonblank(v:lnum-1) let line = getline(lnum) let cline = getline(v:lnum) if cline =~# '^\s*<%[-=]\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%([-=]\=%>\|$\)' let ind = ind - sw endif if line =~# '\S\s*<%[-=]\=\s*\%(}\|end\).\{-\}\s*\%([-=]\=%>\|$\)' let ind = ind - sw endif if line =~# '\%({\|\<do\)\%(\s*|[^|]*|\)\=\s*[-=]\=%>' let ind = ind + sw elseif line =~# '<%[-=]\=\s*\%(module\|class\|def\|if\|for\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\)\>.*%>' let ind = ind + sw endif if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>' let ind = ind + sw endif if line !~# '^\s*<%' && line =~# '%>\s*$' && line !~# '^\s*end\>' let ind = ind - sw endif if cline =~# '^\s*[-=]\=%>\s*$' let ind = ind - sw endif return ind endfunction let &cpo = s:cpo_sav unlet! s:cpo_sav " vim:set sw=2 sts=2 ts=8 noet: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/eterm.vim���������������������������������������������������������������0000664�0000000�0000000�00000001234�13204015742�0017603�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Eterm configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetEtermIndent() setlocal indentkeys=!^F,o,O,=end setlocal nosmartindent if exists("*GetEtermIndent") finish endif function GetEtermIndent() let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif let ind = indent(lnum) if getline(lnum) =~ '^\s*begin\>' let ind = ind + shiftwidth() endif if getline(v:lnum) =~ '^\s*end\>' let ind = ind - shiftwidth() endif return ind endfunction ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/falcon.vim��������������������������������������������������������������0000664�0000000�0000000�00000033346�13204015742�0017742�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Falcon " Maintainer: Steven Oliver <oliver.steven@gmail.com> " Website: https://steveno@github.com/steveno/falconpl-vim.git " Credits: This is, to a great extent, a copy n' paste of ruby.vim. " 1. Setup {{{1 " ============ " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal nosmartindent " Setup indent function and when to use it setlocal indentexpr=FalconGetIndent(v:lnum) setlocal indentkeys=0{,0},0),0],!^F,o,O,e setlocal indentkeys+==~case,=~catch,=~default,=~elif,=~else,=~end,=~\" " Define the appropriate indent function but only once if exists("*FalconGetIndent") finish endif let s:cpo_save = &cpo set cpo&vim " 2. Variables {{{1 " ============ " Regex of syntax group names that are strings AND comments let s:syng_strcom = '\<falcon\%(String\|StringEscape\|Comment\)\>' " Regex of syntax group names that are strings let s:syng_string = '\<falcon\%(String\|StringEscape\)\>' " Regex that defines blocks. " " Note that there's a slight problem with this regex and s:continuation_regex. " Code like this will be matched by both: " " method_call do |(a, b)| " " The reason is that the pipe matches a hanging "|" operator. " let s:block_regex = \ '\%(\<do:\@!\>\|%\@<!{\)\s*\%(|\s*(*\s*\%([*@&]\=\h\w*,\=\s*\)\%(,\s*(*\s*[*@&]\=\h\w*\s*)*\s*\)*|\)\=\s*\%(#.*\)\=$' let s:block_continuation_regex = '^\s*[^])}\t ].*'.s:block_regex " Regex that defines continuation lines. " TODO: this needs to deal with if ...: and so on let s:continuation_regex = \ '\%(%\@<![({[\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$' " Regex that defines bracket continuations let s:bracket_continuation_regex = '%\@<!\%([({[]\)\s*\%(#.*\)\=$' " Regex that defines continuation lines, not including (, {, or [. let s:non_bracket_continuation_regex = '\%([\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$' " Keywords to indent on let s:falcon_indent_keywords = '^\s*\(case\|catch\|class\|enum\|default\|elif\|else' . \ '\|for\|function\|if.*"[^"]*:.*"\|if \(\(:\)\@!.\)*$\|loop\|object\|select' . \ '\|switch\|try\|while\|\w*\s*=\s*\w*([$\)' " Keywords to deindent on let s:falcon_deindent_keywords = '^\s*\(case\|catch\|default\|elif\|else\|end\)' " 3. Functions {{{1 " ============ " Check if the character at lnum:col is inside a string, comment, or is ascii. function s:IsInStringOrComment(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom endfunction " Check if the character at lnum:col is inside a string. function s:IsInString(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_string endfunction " Check if the character at lnum:col is inside a string delimiter function s:IsInStringDelimiter(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'falconStringDelimiter' endfunction " Find line above 'lnum' that isn't empty, in a comment, or in a string. function s:PrevNonBlankNonString(lnum) let in_block = 0 let lnum = prevnonblank(a:lnum) while lnum > 0 " Go in and out of blocks comments as necessary. " If the line isn't empty (with opt. comment) or in a string, end search. let line = getline(lnum) if line =~ '^=begin' if in_block let in_block = 0 else break endif elseif !in_block && line =~ '^=end' let in_block = 1 elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1) \ && s:IsInStringOrComment(lnum, strlen(line))) break endif let lnum = prevnonblank(lnum - 1) endwhile return lnum endfunction " Find line above 'lnum' that started the continuation 'lnum' may be part of. function s:GetMSL(lnum) " Start on the line we're at and use its indent. let msl = a:lnum let msl_body = getline(msl) let lnum = s:PrevNonBlankNonString(a:lnum - 1) while lnum > 0 " If we have a continuation line, or we're in a string, use line as MSL. " Otherwise, terminate search as we have found our MSL already. let line = getline(lnum) if s:Match(line, s:non_bracket_continuation_regex) && \ s:Match(msl, s:non_bracket_continuation_regex) " If the current line is a non-bracket continuation and so is the " previous one, keep its indent and continue looking for an MSL. " " Example: " method_call one, " two, " three " let msl = lnum elseif s:Match(lnum, s:non_bracket_continuation_regex) && \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) " If the current line is a bracket continuation or a block-starter, but " the previous is a non-bracket one, respect the previous' indentation, " and stop here. " " Example: " method_call one, " two { " three " return lnum elseif s:Match(lnum, s:bracket_continuation_regex) && \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) " If both lines are bracket continuations (the current may also be a " block-starter), use the current one's and stop here " " Example: " method_call( " other_method_call( " foo return msl elseif s:Match(lnum, s:block_regex) && \ !s:Match(msl, s:continuation_regex) && \ !s:Match(msl, s:block_continuation_regex) " If the previous line is a block-starter and the current one is " mostly ordinary, use the current one as the MSL. " " Example: " method_call do " something " something_else return msl else let col = match(line, s:continuation_regex) + 1 if (col > 0 && !s:IsInStringOrComment(lnum, col)) \ || s:IsInString(lnum, strlen(line)) let msl = lnum else break endif endif let msl_body = getline(msl) let lnum = s:PrevNonBlankNonString(lnum - 1) endwhile return msl endfunction " Check if line 'lnum' has more opening brackets than closing ones. function s:ExtraBrackets(lnum) let opening = {'parentheses': [], 'braces': [], 'brackets': []} let closing = {'parentheses': [], 'braces': [], 'brackets': []} let line = getline(a:lnum) let pos = match(line, '[][(){}]', 0) " Save any encountered opening brackets, and remove them once a matching " closing one has been found. If a closing bracket shows up that doesn't " close anything, save it for later. while pos != -1 if !s:IsInStringOrComment(a:lnum, pos + 1) if line[pos] == '(' call add(opening.parentheses, {'type': '(', 'pos': pos}) elseif line[pos] == ')' if empty(opening.parentheses) call add(closing.parentheses, {'type': ')', 'pos': pos}) else let opening.parentheses = opening.parentheses[0:-2] endif elseif line[pos] == '{' call add(opening.braces, {'type': '{', 'pos': pos}) elseif line[pos] == '}' if empty(opening.braces) call add(closing.braces, {'type': '}', 'pos': pos}) else let opening.braces = opening.braces[0:-2] endif elseif line[pos] == '[' call add(opening.brackets, {'type': '[', 'pos': pos}) elseif line[pos] == ']' if empty(opening.brackets) call add(closing.brackets, {'type': ']', 'pos': pos}) else let opening.brackets = opening.brackets[0:-2] endif endif endif let pos = match(line, '[][(){}]', pos + 1) endwhile " Find the rightmost brackets, since they're the ones that are important in " both opening and closing cases let rightmost_opening = {'type': '(', 'pos': -1} let rightmost_closing = {'type': ')', 'pos': -1} for opening in opening.parentheses + opening.braces + opening.brackets if opening.pos > rightmost_opening.pos let rightmost_opening = opening endif endfor for closing in closing.parentheses + closing.braces + closing.brackets if closing.pos > rightmost_closing.pos let rightmost_closing = closing endif endfor return [rightmost_opening, rightmost_closing] endfunction function s:Match(lnum, regex) let col = match(getline(a:lnum), '\C'.a:regex) + 1 return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0 endfunction function s:MatchLast(lnum, regex) let line = getline(a:lnum) let col = match(line, '.*\zs' . a:regex) while col != -1 && s:IsInStringOrComment(a:lnum, col) let line = strpart(line, 0, col) let col = match(line, '.*' . a:regex) endwhile return col + 1 endfunction " 4. FalconGetIndent Routine {{{1 " ============ function FalconGetIndent(...) " For the current line, use the first argument if given, else v:lnum let clnum = a:0 ? a:1 : v:lnum " Use zero indent at the top of the file if clnum == 0 return 0 endif let line = getline(clnum) let ind = -1 " If we got a closing bracket on an empty line, find its match and indent " according to it. For parentheses we indent to its column - 1, for the " others we indent to the containing line's MSL's level. Return -1 if fail. let col = matchend(line, '^\s*[]})]') if col > 0 && !s:IsInStringOrComment(clnum, col) call cursor(clnum, col) let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2) if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0 if line[col-1]==')' && col('.') != col('$') - 1 let ind = virtcol('.') - 1 else let ind = indent(s:GetMSL(line('.'))) endif endif return ind endif " If we have a deindenting keyword, find its match and indent to its level. " TODO: this is messy if s:Match(clnum, s:falcon_deindent_keywords) call cursor(clnum, 1) if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW', \ s:end_skip_expr) > 0 let msl = s:GetMSL(line('.')) let line = getline(line('.')) if strpart(line, 0, col('.') - 1) =~ '=\s*$' && \ strpart(line, col('.') - 1, 2) !~ 'do' let ind = virtcol('.') - 1 elseif getline(msl) =~ '=\s*\(#.*\)\=$' let ind = indent(line('.')) else let ind = indent(msl) endif endif return ind endif " If we are in a multi-line string or line-comment, don't do anything to it. if s:IsInString(clnum, matchend(line, '^\s*') + 1) return indent('.') endif " Find a non-blank, non-multi-line string line above the current line. let lnum = s:PrevNonBlankNonString(clnum - 1) " If the line is empty and inside a string, use the previous line. if line =~ '^\s*$' && lnum != prevnonblank(clnum - 1) return indent(prevnonblank(clnum)) endif " At the start of the file use zero indent. if lnum == 0 return 0 endif " Set up variables for the previous line. let line = getline(lnum) let ind = indent(lnum) " If the previous line ended with a block opening, add a level of indent. if s:Match(lnum, s:block_regex) return indent(s:GetMSL(lnum)) + shiftwidth() endif " If it contained hanging closing brackets, find the rightmost one, find its " match and indent according to that. if line =~ '[[({]' || line =~ '[])}]\s*\%(#.*\)\=$' let [opening, closing] = s:ExtraBrackets(lnum) if opening.pos != -1 if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0 if col('.') + 1 == col('$') return ind + shiftwidth() else return virtcol('.') endif else let nonspace = matchend(line, '\S', opening.pos + 1) - 1 return nonspace > 0 ? nonspace : ind + shiftwidth() endif elseif closing.pos != -1 call cursor(lnum, closing.pos + 1) normal! % if s:Match(line('.'), s:falcon_indent_keywords) return indent('.') + shiftwidth() else return indent('.') endif else call cursor(clnum, vcol) end endif " If the previous line ended with an "end", match that "end"s beginning's " indent. let col = s:Match(lnum, '\%(^\|[^.:@$]\)\<end\>\s*\%(#.*\)\=$') if col > 0 call cursor(lnum, col) if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW', \ s:end_skip_expr) > 0 let n = line('.') let ind = indent('.') let msl = s:GetMSL(n) if msl != n let ind = indent(msl) end return ind endif end let col = s:Match(lnum, s:falcon_indent_keywords) if col > 0 call cursor(lnum, col) let ind = virtcol('.') - 1 + shiftwidth() " TODO: make this better (we need to count them) (or, if a searchpair " fails, we know that something is lacking an end and thus we indent a " level if s:Match(lnum, s:end_end_regex) let ind = indent('.') endif return ind endif " Set up variables to use and search for MSL to the previous line. let p_lnum = lnum let lnum = s:GetMSL(lnum) " If the previous line wasn't a MSL and is continuation return its indent. " TODO: the || s:IsInString() thing worries me a bit. if p_lnum != lnum if s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line)) return ind endif endif " Set up more variables, now that we know we wasn't continuation bound. let line = getline(lnum) let msl_ind = indent(lnum) " If the MSL line had an indenting keyword in it, add a level of indent. " TODO: this does not take into account contrived things such as " module Foo; class Bar; end if s:Match(lnum, s:falcon_indent_keywords) let ind = msl_ind + shiftwidth() if s:Match(lnum, s:end_end_regex) let ind = ind - shiftwidth() endif return ind endif " If the previous line ended with [*+/.,-=], but wasn't a block ending or a " closing bracket, indent one extra level. if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)') if lnum == p_lnum let ind = msl_ind + shiftwidth() else let ind = msl_ind endif return ind endif return ind endfunction " }}}1 let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 sts=4 et tw=80 : ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/fortran.vim�������������������������������������������������������������0000664�0000000�0000000�00000016425�13204015742�0020152�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) " Version: 47 " Last Change: 2016 Oct. 29 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> " Usage: For instructions, do :help fortran-indent from Vim " Credits: " Useful suggestions were made, in chronological order, by: " Albert Oliver Serra, Takuya Fujiwara and Philipp Edelmann. " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 let s:cposet=&cpoptions set cpoptions&vim setlocal indentkeys+==~end,=~case,=~if,=~else,=~do,=~where,=~elsewhere,=~select setlocal indentkeys+==~endif,=~enddo,=~endwhere,=~endselect,=~elseif setlocal indentkeys+==~type,=~interface,=~forall,=~associate,=~block,=~enum setlocal indentkeys+==~endforall,=~endassociate,=~endblock,=~endenum if exists("b:fortran_indent_more") || exists("g:fortran_indent_more") setlocal indentkeys+==~function,=~subroutine,=~module,=~contains,=~program setlocal indentkeys+==~endfunction,=~endsubroutine,=~endmodule setlocal indentkeys+==~endprogram endif " Determine whether this is a fixed or free format source file " if this hasn't been done yet using the priority: " buffer-local value " > global value " > file extension as in Intel ifort, gcc (gfortran), NAG, Pathscale, and Cray compilers if !exists("b:fortran_fixed_source") if exists("fortran_free_source") " User guarantees free source form let b:fortran_fixed_source = 0 elseif exists("fortran_fixed_source") " User guarantees fixed source form let b:fortran_fixed_source = 1 elseif expand("%:e") ==? "f\<90\|95\|03\|08\>" " Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers let b:fortran_fixed_source = 0 elseif expand("%:e") ==? "f\|f77\|for" " Fixed-form file extension defaults let b:fortran_fixed_source = 1 else " Modern fortran still allows both fixed and free source form " Assume fixed source form unless signs of free source form " are detected in the first five columns of the first s:lmax lines. " Detection becomes more accurate and time-consuming if more lines " are checked. Increase the limit below if you keep lots of comments at " the very top of each file and you have a fast computer. let s:lmax = 500 if ( s:lmax > line("$") ) let s:lmax = line("$") endif let b:fortran_fixed_source = 1 let s:ln=1 while s:ln <= s:lmax let s:test = strpart(getline(s:ln),0,5) if s:test !~ '^[Cc*]' && s:test !~ '^ *[!#]' && s:test =~ '[^ 0-9\t]' && s:test !~ '^[ 0-9]*\t' let b:fortran_fixed_source = 0 break endif let s:ln = s:ln + 1 endwhile endif endif " Define the appropriate indent function but only once if (b:fortran_fixed_source == 1) setlocal indentexpr=FortranGetFixedIndent() if exists("*FortranGetFixedIndent") finish endif else setlocal indentexpr=FortranGetFreeIndent() if exists("*FortranGetFreeIndent") finish endif endif function FortranGetIndent(lnum) let ind = indent(a:lnum) let prevline=getline(a:lnum) " Strip tail comment let prevstat=substitute(prevline, '!.*$', '', '') let prev2line=getline(a:lnum-1) let prev2stat=substitute(prev2line, '!.*$', '', '') "Indent do loops only if they are all guaranteed to be of do/end do type if exists("b:fortran_do_enddo") || exists("g:fortran_do_enddo") if prevstat =~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*do\>' let ind = ind + shiftwidth() endif if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*end\s*do\>' let ind = ind - shiftwidth() endif endif "Add a shiftwidth to statements following if, else, else if, case, class, "where, else where, forall, type, interface and associate statements if prevstat =~? '^\s*\(case\|class\|else\|else\s*if\|else\s*where\)\>' \ ||prevstat=~? '^\s*\(type\|interface\|associate\|enum\)\>' \ ||prevstat=~?'^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*\(forall\|where\|block\)\>' \ ||prevstat=~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*if\>' let ind = ind + shiftwidth() " Remove unwanted indent after logical and arithmetic ifs if prevstat =~? '\<if\>' && prevstat !~? '\<then\>' let ind = ind - shiftwidth() endif " Remove unwanted indent after type( statements if prevstat =~? '^\s*type\s*(' let ind = ind - shiftwidth() endif endif "Indent program units unless instructed otherwise if !exists("b:fortran_indent_less") && !exists("g:fortran_indent_less") let prefix='\(\(pure\|impure\|elemental\|recursive\)\s\+\)\{,2}' let type='\(\(integer\|real\|double\s\+precision\|complex\|logical' \.'\|character\|type\|class\)\s*\S*\s\+\)\=' if prevstat =~? '^\s*\(contains\|submodule\|program\)\>' \ ||prevstat =~? '^\s*'.'module\>\(\s*\procedure\)\@!' \ ||prevstat =~? '^\s*'.prefix.'subroutine\>' \ ||prevstat =~? '^\s*'.prefix.type.'function\>' \ ||prevstat =~? '^\s*'.type.prefix.'function\>' let ind = ind + shiftwidth() endif if getline(v:lnum) =~? '^\s*contains\>' \ ||getline(v:lnum)=~? '^\s*end\s*' \ .'\(function\|subroutine\|module\|submodule\|program\)\>' let ind = ind - shiftwidth() endif endif "Subtract a shiftwidth from else, else if, elsewhere, case, class, end if, " end where, end select, end forall, end interface, end associate, " end enum, end type, end block and end type statements if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*' \. '\(else\|else\s*if\|else\s*where\|case\|class\|' \. 'end\s*\(if\|where\|select\|interface\|' \. 'type\|forall\|associate\|enum\|block\)\)\>' let ind = ind - shiftwidth() " Fix indent for case statement immediately after select if prevstat =~? '\<select\s\+\(case\|type\)\>' let ind = ind + shiftwidth() endif endif "First continuation line if prevstat =~ '&\s*$' && prev2stat !~ '&\s*$' let ind = ind + shiftwidth() endif "Line after last continuation line if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$' && prevstat !~? '\<then\>' let ind = ind - shiftwidth() endif return ind endfunction function FortranGetFreeIndent() "Find the previous non-blank line let lnum = prevnonblank(v:lnum - 1) "Use zero indent at the top of the file if lnum == 0 return 0 endif let ind=FortranGetIndent(lnum) return ind endfunction function FortranGetFixedIndent() let currline=getline(v:lnum) "Don't indent comments, continuation lines and labelled lines if strpart(currline,0,6) =~ '[^ \t]' let ind = indent(v:lnum) return ind endif "Find the previous line which is not blank, not a comment, "not a continuation line, and does not have a label let lnum = v:lnum - 1 while lnum > 0 let prevline=getline(lnum) if (prevline =~ "^[C*!]") || (prevline =~ "^\s*$") \ || (strpart(prevline,5,1) !~ "[ 0]") " Skip comments, blank lines and continuation lines let lnum = lnum - 1 else let test=strpart(prevline,0,5) if test =~ "[0-9]" " Skip lines with statement numbers let lnum = lnum - 1 else break endif endif endwhile "First line must begin at column 7 if lnum == 0 return 6 endif let ind=FortranGetIndent(lnum) return ind endfunction let &cpoptions=s:cposet unlet s:cposet " vim:sw=2 tw=130 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/framescript.vim���������������������������������������������������������0000664�0000000�0000000�00000001460�13204015742�0021007�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: FrameScript " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-19 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetFrameScriptIndent() setlocal indentkeys=!^F,o,O,0=~Else,0=~EndIf,0=~EndLoop,0=~EndSub setlocal nosmartindent if exists("*GetFrameScriptIndent") finish endif function GetFrameScriptIndent() let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif if getline(v:lnum) =~ '^\s*\*' return cindent(v:lnum) endif let ind = indent(lnum) if getline(lnum) =~? '^\s*\%(If\|Loop\|Sub\)' let ind = ind + shiftwidth() endif if getline(v:lnum) =~? '^\s*\%(Else\|End\%(If\|Loop\|Sub\)\)' let ind = ind - shiftwidth() endif return ind endfunction ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/gitconfig.vim�����������������������������������������������������������0000664�0000000�0000000�00000001511�13204015742�0020436�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: git config file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2017 Jun 13 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentexpr=GetGitconfigIndent() setlocal indentkeys=o,O,*<Return>,0[,],0;,0#,=,!^F let b:undo_indent = 'setl ai< inde< indk<' " Only define the function once. if exists("*GetGitconfigIndent") finish endif function! GetGitconfigIndent() let sw = shiftwidth() let line = getline(prevnonblank(v:lnum-1)) let cline = getline(v:lnum) if line =~ '\\\@<!\%(\\\\\)*\\$' " odd number of slashes, in a line continuation return 2 * sw elseif cline =~ '^\s*\[' return 0 elseif cline =~ '^\s*\a' return sw elseif cline == '' && line =~ '^\[' return sw else return -1 endif endfunction ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/gitolite.vim������������������������������������������������������������0000664�0000000�0000000�00000002375�13204015742�0020316�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: gitolite configuration " URL: https://github.com/sitaramc/gitolite/blob/master/contrib/vim/indent/gitolite.vim " (https://raw.githubusercontent.com/sitaramc/gitolite/master/contrib/vim/indent/gitolite.vim) " Maintainer: Sitaram Chamarty <sitaramc@gmail.com> " (former Maintainer: Teemu Matilainen <teemu.matilainen@iki.fi>) " Last Change: 2017 Oct 05 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentexpr=GetGitoliteIndent() setlocal indentkeys=o,O,*<Return>,!^F,=repo,\",= " Only define the function once. if exists("*GetGitoliteIndent") finish endif let s:cpo_save = &cpo set cpo&vim function! GetGitoliteIndent() let prevln = prevnonblank(v:lnum-1) let pline = getline(prevln) let cline = getline(v:lnum) if cline =~ '^\s*\(C\|R\|RW\|RW+\|RWC\|RW+C\|RWD\|RW+D\|RWCD\|RW+CD\|-\)[ \t=]' return shiftwidth() elseif cline =~ '^\s*config\s' return shiftwidth() elseif cline =~ '^\s*option\s' return shiftwidth() elseif pline =~ '^\s*repo\s' && cline =~ '^\s*\(#.*\)\?$' return shiftwidth() elseif cline =~ '^\s*#' return indent(prevln) elseif cline =~ '^\s*$' return -1 else return 0 endif endfunction let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/go.vim������������������������������������������������������������������0000664�0000000�0000000�00000003211�13204015742�0017071�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Go " Maintainer: David Barnett (https://github.com/google/vim-ft-go) " Last Change: 2017 Jun 13 " " TODO: " - function invocations split across lines " - general line splits (line ends in an operator) if exists('b:did_indent') finish endif let b:did_indent = 1 " C indentation is too far off useful, mainly due to Go's := operator. " Let's just define our own. setlocal nolisp setlocal autoindent setlocal indentexpr=GoIndent(v:lnum) setlocal indentkeys+=<:>,0=},0=) if exists('*GoIndent') finish endif function! GoIndent(lnum) let l:prevlnum = prevnonblank(a:lnum-1) if l:prevlnum == 0 " top of file return 0 endif " grab the previous and current line, stripping comments. let l:prevl = substitute(getline(l:prevlnum), '//.*$', '', '') let l:thisl = substitute(getline(a:lnum), '//.*$', '', '') let l:previ = indent(l:prevlnum) let l:ind = l:previ if l:prevl =~ '[({]\s*$' " previous line opened a block let l:ind += shiftwidth() endif if l:prevl =~# '^\s*\(case .*\|default\):$' " previous line is part of a switch statement let l:ind += shiftwidth() endif " TODO: handle if the previous line is a label. if l:thisl =~ '^\s*[)}]' " this line closed a block let l:ind -= shiftwidth() endif " Colons are tricky. " We want to outdent if it's part of a switch ("case foo:" or "default:"). " We ignore trying to deal with jump labels because (a) they're rare, and " (b) they're hard to disambiguate from a composite literal key. if l:thisl =~# '^\s*\(case .*\|default\):$' let l:ind -= shiftwidth() endif return l:ind endfunction " vim: sw=2 sts=2 et ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/haml.vim����������������������������������������������������������������0000664�0000000�0000000�00000004243�13204015742�0017413�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Haml " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2017 Jun 13 if exists("b:did_indent") finish endif runtime! indent/ruby.vim unlet! b:did_indent let b:did_indent = 1 setlocal autoindent sw=2 et setlocal indentexpr=GetHamlIndent() setlocal indentkeys=o,O,*<Return>,},],0),!^F,=end,=else,=elsif,=rescue,=ensure,=when " Only define the function once. if exists("*GetHamlIndent") finish endif let s:attributes = '\%({.\{-\}}\|\[.\{-\}\]\)' let s:tag = '\%([%.#][[:alnum:]_-]\+\|'.s:attributes.'\)*[<>]*' if !exists('g:haml_self_closing_tags') let g:haml_self_closing_tags = 'base|link|meta|br|hr|img|input' endif function! GetHamlIndent() let lnum = prevnonblank(v:lnum-1) if lnum == 0 return 0 endif let line = substitute(getline(lnum),'\s\+$','','') let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') let lastcol = strlen(line) let line = substitute(line,'^\s\+','','') let indent = indent(lnum) let cindent = indent(v:lnum) let sw = shiftwidth() if cline =~# '\v^-\s*%(elsif|else|when)>' let indent = cindent < indent ? cindent : indent - sw endif let increase = indent + sw if indent == indent(lnum) let indent = cindent <= indent ? -1 : increase endif let group = synIDattr(synID(lnum,lastcol,1),'name') if line =~ '^!!!' return indent elseif line =~ '^/\%(\[[^]]*\]\)\=$' return increase elseif group == 'hamlFilter' return increase elseif line =~ '^'.s:tag.'[&!]\=[=~-]\s*\%(\%(if\|else\|elsif\|unless\|case\|when\|while\|until\|for\|begin\|module\|class\|def\)\>\%(.*\<end\>\)\@!\|.*do\%(\s*|[^|]*|\)\=\s*$\)' return increase elseif line =~ '^'.s:tag.'[&!]\=[=~-].*,\s*$' return increase elseif line == '-#' return increase elseif group =~? '\v^(hamlSelfCloser)$' || line =~? '^%\v%('.g:haml_self_closing_tags.')>' return indent elseif group =~? '\v^%(hamlTag|hamlAttributesDelimiter|hamlObjectDelimiter|hamlClass|hamlId|htmlTagName|htmlSpecialTagName)$' return increase elseif synIDattr(synID(v:lnum,1,1),'name') ==? 'hamlRubyFilter' return GetRubyIndent() else return indent endif endfunction " vim:set sw=2: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/hamster.vim�������������������������������������������������������������0000664�0000000�0000000�00000002621�13204015742�0020133�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Hamster Script " Version: 2.0.6.0 " Last Change: Wed Nov 08 2006 12:02:42 PM " Maintainer: David Fishburn <fishburn@ianywhere.com> " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentkeys+==~if,=~else,=~endif,=~endfor,=~endwhile setlocal indentkeys+==~do,=~until,=~while,=~repeat,=~for,=~loop setlocal indentkeys+==~sub,=~endsub " Define the appropriate indent function but only once setlocal indentexpr=HamGetFreeIndent() if exists("*HamGetFreeIndent") finish endif function HamGetIndent(lnum) let ind = indent(a:lnum) let prevline=getline(a:lnum) " Add a shiftwidth to statements following if, else, elseif, " case, select, default, do, until, while, for, start if prevline =~? '^\s*\<\(if\|else\%(if\)\?\|for\|repeat\|do\|while\|sub\)\>' let ind = ind + shiftwidth() endif " Subtract a shiftwidth from else, elseif, end(if|while|for), until let line = getline(v:lnum) if line =~? '^\s*\(else\|elseif\|loop\|until\|end\%(if\|while\|for\|sub\)\)\>' let ind = ind - shiftwidth() endif return ind endfunction function HamGetFreeIndent() " Find the previous non-blank line let lnum = prevnonblank(v:lnum - 1) " Use zero indent at the top of the file if lnum == 0 return 0 endif let ind=HamGetIndent(lnum) return ind endfunction " vim:sw=2 tw=80 ���������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/hog.vim�����������������������������������������������������������������0000664�0000000�0000000�00000003544�13204015742�0017252�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: hog (Snort.conf) " Maintainer: Victor Roemer, <vroemer@badsec.org> " Last Change: Mar 7, 2013 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 let b:undo_indent = 'setlocal smartindent< indentexpr< indentkeys<' setlocal nosmartindent setlocal indentexpr=GetHogIndent() setlocal indentkeys+=!^F,o,O,0# " Only define the function once. if exists("*GetHogIndent") finish endif let s:cpo_save = &cpo set cpo&vim let s:syn_blocks = '\<SnortRuleTypeBody\>' function s:IsInBlock(lnum) return synIDattr(synID(a:lnum, 1, 1), 'name') =~ s:syn_blocks endfunction function GetHogIndent() let prevlnum = prevnonblank(v:lnum-1) " Comment blocks have identical indent if getline(v:lnum) =~ '^\s*#' && getline(prevlnum) =~ '^\s*#' return indent(prevlnum) endif " Ignore comment lines when calculating indent while getline(prevlnum) =~ '^\s*#' let prevlnum = prevnonblank(prevlnum-1) if !prevlnum return previndent endif endwhile " Continuation of a line that wasn't indented let prevline = getline(prevlnum) if prevline =~ '^\k\+.*\\\s*$' return shiftwidth() endif " Continuation of a line that was indented if prevline =~ '\k\+.*\\\s*$' return indent(prevlnum) endif " Indent the next line if previous line contained a start of a block " definition ('{' or '('). if prevline =~ '^\k\+[^#]*{}\@!\s*$' " TODO || prevline =~ '^\k\+[^#]*()\@!\s*$' return shiftwidth() endif " Match inside of a block if s:IsInBlock(v:lnum) if prevline =~ "^\k\+.*$" return shiftwidth() else return indent(prevlnum) endif endif return 0 endfunction let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/html.vim����������������������������������������������������������������0000664�0000000�0000000�00000077705�13204015742�0017453�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent script for HTML " Header: "{{{ " Maintainer: Bram Moolenaar " Original Author: Andy Wokula <anwoku@yahoo.de> " Last Change: 2017 Jun 13 " Version: 1.0 " Description: HTML indent script with cached state for faster indenting on a " range of lines. " Supports template systems through hooks. " Supports Closure stylesheets. " " Credits: " indent/html.vim (2006 Jun 05) from J. Zellner " indent/css.vim (2006 Dec 20) from N. Weibull " " History: " 2014 June (v1.0) overhaul (Bram) " 2012 Oct 21 (v0.9) added support for shiftwidth() " 2011 Sep 09 (v0.8) added HTML5 tags (thx to J. Zuckerman) " 2008 Apr 28 (v0.6) revised customization " 2008 Mar 09 (v0.5) fixed 'indk' issue (thx to C.J. Robinson) "}}} " Init Folklore, check user settings (2nd time ++) if exists("b:did_indent") "{{{ finish endif " Load the Javascript indent script first, it defines GetJavascriptIndent(). " Undo the rest. " Load base python indent. if !exists('*GetJavascriptIndent') runtime! indent/javascript.vim endif let b:did_indent = 1 setlocal indentexpr=HtmlIndent() setlocal indentkeys=o,O,<Return>,<>>,{,},!^F " Needed for % to work when finding start/end of a tag. setlocal matchpairs+=<:> let b:undo_indent = "setlocal inde< indk<" " b:hi_indent keeps state to speed up indenting consecutive lines. let b:hi_indent = {"lnum": -1} """""" Code below this is loaded only once. """"" if exists("*HtmlIndent") && !exists('g:force_reload_html') call HtmlIndent_CheckUserSettings() finish endif " Allow for line continuation below. let s:cpo_save = &cpo set cpo-=C "}}} " Check and process settings from b:html_indent and g:html_indent... variables. " Prefer using buffer-local settings over global settings, so that there can " be defaults for all HTML files and exceptions for specific types of HTML " files. func! HtmlIndent_CheckUserSettings() "{{{ let inctags = '' if exists("b:html_indent_inctags") let inctags = b:html_indent_inctags elseif exists("g:html_indent_inctags") let inctags = g:html_indent_inctags endif let b:hi_tags = {} if len(inctags) > 0 call s:AddITags(b:hi_tags, split(inctags, ",")) endif let autotags = '' if exists("b:html_indent_autotags") let autotags = b:html_indent_autotags elseif exists("g:html_indent_autotags") let autotags = g:html_indent_autotags endif let b:hi_removed_tags = {} if len(autotags) > 0 call s:RemoveITags(b:hi_removed_tags, split(autotags, ",")) endif " Syntax names indicating being inside a string of an attribute value. let string_names = [] if exists("b:html_indent_string_names") let string_names = b:html_indent_string_names elseif exists("g:html_indent_string_names") let string_names = g:html_indent_string_names endif let b:hi_insideStringNames = ['htmlString'] if len(string_names) > 0 for s in string_names call add(b:hi_insideStringNames, s) endfor endif " Syntax names indicating being inside a tag. let tag_names = [] if exists("b:html_indent_tag_names") let tag_names = b:html_indent_tag_names elseif exists("g:html_indent_tag_names") let tag_names = g:html_indent_tag_names endif let b:hi_insideTagNames = ['htmlTag', 'htmlScriptTag'] if len(tag_names) > 0 for s in tag_names call add(b:hi_insideTagNames, s) endfor endif let indone = {"zero": 0 \,"auto": "indent(prevnonblank(v:lnum-1))" \,"inc": "b:hi_indent.blocktagind + shiftwidth()"} let script1 = '' if exists("b:html_indent_script1") let script1 = b:html_indent_script1 elseif exists("g:html_indent_script1") let script1 = g:html_indent_script1 endif if len(script1) > 0 let b:hi_js1indent = get(indone, script1, indone.zero) else let b:hi_js1indent = 0 endif let style1 = '' if exists("b:html_indent_style1") let style1 = b:html_indent_style1 elseif exists("g:html_indent_style1") let style1 = g:html_indent_style1 endif if len(style1) > 0 let b:hi_css1indent = get(indone, style1, indone.zero) else let b:hi_css1indent = 0 endif if !exists('b:html_indent_line_limit') if exists('g:html_indent_line_limit') let b:html_indent_line_limit = g:html_indent_line_limit else let b:html_indent_line_limit = 200 endif endif endfunc "}}} " Init Script Vars "{{{ let b:hi_lasttick = 0 let b:hi_newstate = {} let s:countonly = 0 "}}} " Fill the s:indent_tags dict with known tags. " The key is "tagname" or "/tagname". {{{ " The value is: " 1 opening tag " 2 "pre" " 3 "script" " 4 "style" " 5 comment start " 6 conditional comment start " -1 closing tag " -2 "/pre" " -3 "/script" " -4 "/style" " -5 comment end " -6 conditional comment end let s:indent_tags = {} let s:endtags = [0,0,0,0,0,0,0] " long enough for the highest index "}}} " Add a list of tag names for a pair of <tag> </tag> to "tags". func! s:AddITags(tags, taglist) "{{{ for itag in a:taglist let a:tags[itag] = 1 let a:tags['/' . itag] = -1 endfor endfunc "}}} " Take a list of tag name pairs that are not to be used as tag pairs. func! s:RemoveITags(tags, taglist) "{{{ for itag in a:taglist let a:tags[itag] = 1 let a:tags['/' . itag] = 1 endfor endfunc "}}} " Add a block tag, that is a tag with a different kind of indenting. func! s:AddBlockTag(tag, id, ...) "{{{ if !(a:id >= 2 && a:id < len(s:endtags)) echoerr 'AddBlockTag ' . a:id return endif let s:indent_tags[a:tag] = a:id if a:0 == 0 let s:indent_tags['/' . a:tag] = -a:id let s:endtags[a:id] = "</" . a:tag . ">" else let s:indent_tags[a:1] = -a:id let s:endtags[a:id] = a:1 endif endfunc "}}} " Add known tag pairs. " Self-closing tags and tags that are sometimes {{{ " self-closing (e.g., <p>) are not here (when encountering </p> we can find " the matching <p>, but not the other way around). " Old HTML tags: call s:AddITags(s:indent_tags, [ \ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', \ 'blockquote', 'body', 'button', 'caption', 'center', 'cite', 'code', \ 'colgroup', 'del', 'dfn', 'dir', 'div', 'dl', 'em', 'fieldset', 'font', \ 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'html', \ 'i', 'iframe', 'ins', 'kbd', 'label', 'legend', 'li', \ 'map', 'menu', 'noframes', 'noscript', 'object', 'ol', \ 'optgroup', 'q', 's', 'samp', 'select', 'small', 'span', 'strong', 'sub', \ 'sup', 'table', 'textarea', 'title', 'tt', 'u', 'ul', 'var', 'th', 'td', \ 'tr', 'tbody', 'tfoot', 'thead']) " New HTML5 elements: call s:AddITags(s:indent_tags, [ \ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas', \ 'command', 'data', 'datalist', 'details', 'embed', 'figcaption', \ 'figure', 'footer', 'header', 'keygen', 'mark', 'meter', 'nav', 'output', \ 'progress', 'rp', 'rt', 'ruby', 'section', 'source', 'summary', 'svg', \ 'time', 'track', 'video', 'wbr']) " Tags added for web components: call s:AddITags(s:indent_tags, [ \ 'content', 'shadow', 'template']) "}}} " Add Block Tags: these contain alien content "{{{ call s:AddBlockTag('pre', 2) call s:AddBlockTag('script', 3) call s:AddBlockTag('style', 4) call s:AddBlockTag('<!--', 5, '-->') call s:AddBlockTag('<!--[', 6, '![endif]-->') "}}} " Return non-zero when "tagname" is an opening tag, not being a block tag, for " which there should be a closing tag. Can be used by scripts that include " HTML indenting. func! HtmlIndent_IsOpenTag(tagname) "{{{ if get(s:indent_tags, a:tagname) == 1 return 1 endif return get(b:hi_tags, a:tagname) == 1 endfunc "}}} " Get the value for "tagname", taking care of buffer-local tags. func! s:get_tag(tagname) "{{{ let i = get(s:indent_tags, a:tagname) if (i == 1 || i == -1) && get(b:hi_removed_tags, a:tagname) != 0 return 0 endif if i == 0 let i = get(b:hi_tags, a:tagname) endif return i endfunc "}}} " Count the number of start and end tags in "text". func! s:CountITags(text) "{{{ " Store the result in s:curind and s:nextrel. let s:curind = 0 " relative indent steps for current line [unit &sw]: let s:nextrel = 0 " relative indent steps for next line [unit &sw]: let s:block = 0 " assume starting outside of a block let s:countonly = 1 " don't change state call substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g') let s:countonly = 0 endfunc "}}} " Count the number of start and end tags in text. func! s:CountTagsAndState(text) "{{{ " Store the result in s:curind and s:nextrel. Update b:hi_newstate.block. let s:curind = 0 " relative indent steps for current line [unit &sw]: let s:nextrel = 0 " relative indent steps for next line [unit &sw]: let s:block = b:hi_newstate.block let tmp = substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g') if s:block == 3 let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*<SCRIPT\>\zs[^>]*')) endif let b:hi_newstate.block = s:block endfunc "}}} " Used by s:CountITags() and s:CountTagsAndState(). func! s:CheckTag(itag) "{{{ " Returns an empty string or "SCRIPT". " a:itag can be "tag" or "/tag" or "<!--" or "-->" if (s:CheckCustomTag(a:itag)) return "" endif let ind = s:get_tag(a:itag) if ind == -1 " closing tag if s:block != 0 " ignore itag within a block return "" endif if s:nextrel == 0 let s:curind -= 1 else let s:nextrel -= 1 endif elseif ind == 1 " opening tag if s:block != 0 return "" endif let s:nextrel += 1 elseif ind != 0 " block-tag (opening or closing) return s:CheckBlockTag(a:itag, ind) " else ind==0 (other tag found): keep indent endif return "" endfunc "}}} " Used by s:CheckTag(). Returns an empty string or "SCRIPT". func! s:CheckBlockTag(blocktag, ind) "{{{ if a:ind > 0 " a block starts here if s:block != 0 " already in a block (nesting) - ignore " especially ignore comments after other blocktags return "" endif let s:block = a:ind " block type if s:countonly return "" endif let b:hi_newstate.blocklnr = v:lnum " save allover indent for the endtag let b:hi_newstate.blocktagind = b:hi_indent.baseindent + (s:nextrel + s:curind) * shiftwidth() if a:ind == 3 return "SCRIPT" " all except this must be lowercase " line is to be checked again for the type attribute endif else let s:block = 0 " we get here if starting and closing a block-tag on the same line endif return "" endfunc "}}} " Used by s:CheckTag(). func! s:CheckCustomTag(ctag) "{{{ " Returns 1 if ctag is the tag for a custom element, 0 otherwise. " a:ctag can be "tag" or "/tag" or "<!--" or "-->" let pattern = '\%\(\w\+-\)\+\w\+' if match(a:ctag, pattern) == -1 return 0 endif if matchstr(a:ctag, '\/\ze.\+') == "/" " closing tag if s:block != 0 " ignore ctag within a block return 1 endif if s:nextrel == 0 let s:curind -= 1 else let s:nextrel -= 1 endif else " opening tag if s:block != 0 return 1 endif let s:nextrel += 1 endif return 1 endfunc "}}} " Return the <script> type: either "javascript" or "" func! s:GetScriptType(str) "{{{ if a:str == "" || a:str =~ "java" return "javascript" else return "" endif endfunc "}}} " Look back in the file, starting at a:lnum - 1, to compute a state for the " start of line a:lnum. Return the new state. func! s:FreshState(lnum) "{{{ " A state is to know ALL relevant details about the " lines 1..a:lnum-1, initial calculating (here!) can be slow, but updating is " fast (incremental). " TODO: this should be split up in detecting the block type and computing the " indent for the block type, so that when we do not know the indent we do " not need to clear the whole state and re-detect the block type again. " State: " lnum last indented line == prevnonblank(a:lnum - 1) " block = 0 a:lnum located within special tag: 0:none, 2:<pre>, " 3:<script>, 4:<style>, 5:<!--, 6:<!--[ " baseindent use this indent for line a:lnum as a start - kind of " autoindent (if block==0) " scripttype = '' type attribute of a script tag (if block==3) " blocktagind indent for current opening (get) and closing (set) " blocktag (if block!=0) " blocklnr lnum of starting blocktag (if block!=0) " inattr line {lnum} starts with attributes of a tag let state = {} let state.lnum = prevnonblank(a:lnum - 1) let state.scripttype = "" let state.blocktagind = -1 let state.block = 0 let state.baseindent = 0 let state.blocklnr = 0 let state.inattr = 0 if state.lnum == 0 return state endif " Heuristic: " remember startline state.lnum " look back for <pre, </pre, <script, </script, <style, </style tags " remember stopline " if opening tag found, " assume a:lnum within block " else " look back in result range (stopline, startline) for comment " \ delimiters (<!--, -->) " if comment opener found, " assume a:lnum within comment " else " assume usual html for a:lnum " if a:lnum-1 has a closing comment " look back to get indent of comment opener " FI " look back for a blocktag let stopline2 = v:lnum + 1 if has_key(b:hi_indent, 'block') && b:hi_indent.block > 5 let [stopline2, stopcol2] = searchpos('<!--', 'bnW') endif let [stopline, stopcol] = searchpos('\c<\zs\/\=\%(pre\>\|script\>\|style\>\)', "bnW") if stopline > 0 && stopline < stopline2 " ugly ... why isn't there searchstr() let tagline = tolower(getline(stopline)) let blocktag = matchstr(tagline, '\/\=\%(pre\>\|script\>\|style\>\)', stopcol - 1) if blocktag[0] != "/" " opening tag found, assume a:lnum within block let state.block = s:indent_tags[blocktag] if state.block == 3 let state.scripttype = s:GetScriptType(matchstr(tagline, '\>[^>]*', stopcol)) endif let state.blocklnr = stopline " check preceding tags in the line: call s:CountITags(tagline[: stopcol-2]) let state.blocktagind = indent(stopline) + (s:curind + s:nextrel) * shiftwidth() return state elseif stopline == state.lnum " handle special case: previous line (= state.lnum) contains a " closing blocktag which is preceded by line-noise; " blocktag == "/..." let swendtag = match(tagline, '^\s*</') >= 0 if !swendtag let [bline, bcol] = searchpos('<'.blocktag[1:].'\>', "bnW") call s:CountITags(tolower(getline(bline)[: bcol-2])) let state.baseindent = indent(bline) + (s:curind + s:nextrel) * shiftwidth() return state endif endif endif if stopline > stopline2 let stopline = stopline2 let stopcol = stopcol2 endif " else look back for comment let [comlnum, comcol, found] = searchpos('\(<!--\[\)\|\(<!--\)\|-->', 'bpnW', stopline) if found == 2 || found == 3 " comment opener found, assume a:lnum within comment let state.block = (found == 3 ? 5 : 6) let state.blocklnr = comlnum " check preceding tags in the line: call s:CountITags(tolower(getline(comlnum)[: comcol-2])) if found == 2 let state.baseindent = b:hi_indent.baseindent endif let state.blocktagind = indent(comlnum) + (s:curind + s:nextrel) * shiftwidth() return state endif " else within usual HTML let text = tolower(getline(state.lnum)) " Check a:lnum-1 for closing comment (we need indent from the opening line). " Not when other tags follow (might be --> inside a string). let comcol = stridx(text, '-->') if comcol >= 0 && match(text, '[<>]', comcol) <= 0 call cursor(state.lnum, comcol + 1) let [comlnum, comcol] = searchpos('<!--', 'bW') if comlnum == state.lnum let text = text[: comcol-2] else let text = tolower(getline(comlnum)[: comcol-2]) endif call s:CountITags(text) let state.baseindent = indent(comlnum) + (s:curind + s:nextrel) * shiftwidth() " TODO check tags that follow "-->" return state endif " Check if the previous line starts with end tag. let swendtag = match(text, '^\s*</') >= 0 " If previous line ended in a closing tag, line up with the opening tag. if !swendtag && text =~ '</\w\+\s*>\s*$' call cursor(state.lnum, 99999) normal! F< let start_lnum = HtmlIndent_FindStartTag() if start_lnum > 0 let state.baseindent = indent(start_lnum) if col('.') > 2 " check for tags before the matching opening tag. let text = getline(start_lnum) let swendtag = match(text, '^\s*</') >= 0 call s:CountITags(text[: col('.') - 2]) let state.baseindent += s:nextrel * shiftwidth() if !swendtag let state.baseindent += s:curind * shiftwidth() endif endif return state endif endif " Else: no comments. Skip backwards to find the tag we're inside. let [state.lnum, found] = HtmlIndent_FindTagStart(state.lnum) " Check if that line starts with end tag. let text = getline(state.lnum) let swendtag = match(text, '^\s*</') >= 0 call s:CountITags(tolower(text)) let state.baseindent = indent(state.lnum) + s:nextrel * shiftwidth() if !swendtag let state.baseindent += s:curind * shiftwidth() endif return state endfunc "}}} " Indent inside a <pre> block: Keep indent as-is. func! s:Alien2() "{{{ return -1 endfunc "}}} " Return the indent inside a <script> block for javascript. func! s:Alien3() "{{{ let lnum = prevnonblank(v:lnum - 1) while lnum > 1 && getline(lnum) =~ '^\s*/[/*]' " Skip over comments to avoid that cindent() aligns with the <script> tag let lnum = prevnonblank(lnum - 1) endwhile if lnum == b:hi_indent.blocklnr " indent for the first line after <script> return eval(b:hi_js1indent) endif if b:hi_indent.scripttype == "javascript" return GetJavascriptIndent() else return -1 endif endfunc "}}} " Return the indent inside a <style> block. func! s:Alien4() "{{{ if prevnonblank(v:lnum-1) == b:hi_indent.blocklnr " indent for first content line return eval(b:hi_css1indent) endif return s:CSSIndent() endfunc "}}} " Indending inside a <style> block. Returns the indent. func! s:CSSIndent() "{{{ " This handles standard CSS and also Closure stylesheets where special lines " start with @. " When the line starts with '*' or the previous line starts with "/*" " and does not end in "*/", use C indenting to format the comment. " Adopted $VIMRUNTIME/indent/css.vim let curtext = getline(v:lnum) if curtext =~ '^\s*[*]' \ || (v:lnum > 1 && getline(v:lnum - 1) =~ '\s*/\*' \ && getline(v:lnum - 1) !~ '\*/\s*$') return cindent(v:lnum) endif let min_lnum = b:hi_indent.blocklnr let prev_lnum = s:CssPrevNonComment(v:lnum - 1, min_lnum) let [prev_lnum, found] = HtmlIndent_FindTagStart(prev_lnum) if prev_lnum <= min_lnum " Just below the <style> tag, indent for first content line after comments. return eval(b:hi_css1indent) endif " If the current line starts with "}" align with it's match. if curtext =~ '^\s*}' call cursor(v:lnum, 1) try normal! % " Found the matching "{", align with it after skipping unfinished lines. let align_lnum = s:CssFirstUnfinished(line('.'), min_lnum) return indent(align_lnum) catch " can't find it, try something else, but it's most likely going to be " wrong endtry endif " add indent after { let brace_counts = HtmlIndent_CountBraces(prev_lnum) let extra = brace_counts.c_open * shiftwidth() let prev_text = getline(prev_lnum) let below_end_brace = prev_text =~ '}\s*$' " Search back to align with the first line that's unfinished. let align_lnum = s:CssFirstUnfinished(prev_lnum, min_lnum) " Handle continuation lines if aligning with previous line and not after a " "}". if extra == 0 && align_lnum == prev_lnum && !below_end_brace let prev_hasfield = prev_text =~ '^\s*[a-zA-Z0-9-]\+:' let prev_special = prev_text =~ '^\s*\(/\*\|@\)' if curtext =~ '^\s*\(/\*\|@\)' " if the current line is not a comment or starts with @ (used by template " systems) reduce indent if previous line is a continuation line if !prev_hasfield && !prev_special let extra = -shiftwidth() endif else let cur_hasfield = curtext =~ '^\s*[a-zA-Z0-9-]\+:' let prev_unfinished = s:CssUnfinished(prev_text) if !cur_hasfield && (prev_hasfield || prev_unfinished) " Continuation line has extra indent if the previous line was not a " continuation line. let extra = shiftwidth() " Align with @if if prev_text =~ '^\s*@if ' let extra = 4 endif elseif cur_hasfield && !prev_hasfield && !prev_special " less indent below a continuation line let extra = -shiftwidth() endif endif endif if below_end_brace " find matching {, if that line starts with @ it's not the start of a rule " but something else from a template system call cursor(prev_lnum, 1) call search('}\s*$') try normal! % " Found the matching "{", align with it. let align_lnum = s:CssFirstUnfinished(line('.'), min_lnum) let special = getline(align_lnum) =~ '^\s*@' catch let special = 0 endtry if special " do not reduce indent below @{ ... } if extra < 0 let extra += shiftwidth() endif else let extra -= (brace_counts.c_close - (prev_text =~ '^\s*}')) * shiftwidth() endif endif " if no extra indent yet... if extra == 0 if brace_counts.p_open > brace_counts.p_close " previous line has more ( than ): add a shiftwidth let extra = shiftwidth() elseif brace_counts.p_open < brace_counts.p_close " previous line has more ) than (: subtract a shiftwidth let extra = -shiftwidth() endif endif return indent(align_lnum) + extra endfunc "}}} " Inside <style>: Whether a line is unfinished. func! s:CssUnfinished(text) "{{{ return a:text =~ '\s\(||\|&&\|:\)\s*$' endfunc "}}} " Search back for the first unfinished line above "lnum". func! s:CssFirstUnfinished(lnum, min_lnum) "{{{ let align_lnum = a:lnum while align_lnum > a:min_lnum && s:CssUnfinished(getline(align_lnum - 1)) let align_lnum -= 1 endwhile return align_lnum endfunc "}}} " Find the non-empty line at or before "lnum" that is not a comment. func! s:CssPrevNonComment(lnum, stopline) "{{{ " caller starts from a line a:lnum + 1 that is not a comment let lnum = prevnonblank(a:lnum) while 1 let ccol = match(getline(lnum), '\*/') if ccol < 0 " No comment end thus it's something else. return lnum endif call cursor(lnum, ccol + 1) " Search back for the /* that starts the comment let lnum = search('/\*', 'bW', a:stopline) if indent(".") == virtcol(".") - 1 " The found /* is at the start of the line. Now go back to the line " above it and again check if it is a comment. let lnum = prevnonblank(lnum - 1) else " /* is after something else, thus it's not a comment line. return lnum endif endwhile endfunc "}}} " Check the number of {} and () in line "lnum". Return a dict with the counts. func! HtmlIndent_CountBraces(lnum) "{{{ let brs = substitute(getline(a:lnum), '[''"].\{-}[''"]\|/\*.\{-}\*/\|/\*.*$\|[^{}()]', '', 'g') let c_open = 0 let c_close = 0 let p_open = 0 let p_close = 0 for brace in split(brs, '\zs') if brace == "{" let c_open += 1 elseif brace == "}" if c_open > 0 let c_open -= 1 else let c_close += 1 endif elseif brace == '(' let p_open += 1 elseif brace == ')' if p_open > 0 let p_open -= 1 else let p_close += 1 endif endif endfor return {'c_open': c_open, \ 'c_close': c_close, \ 'p_open': p_open, \ 'p_close': p_close} endfunc "}}} " Return the indent for a comment: <!-- --> func! s:Alien5() "{{{ let curtext = getline(v:lnum) if curtext =~ '^\s*\zs-->' " current line starts with end of comment, line up with comment start. call cursor(v:lnum, 0) let lnum = search('<!--', 'b') if lnum > 0 " TODO: what if <!-- is not at the start of the line? return indent(lnum) endif " Strange, can't find it. return -1 endif let prevlnum = prevnonblank(v:lnum - 1) let prevtext = getline(prevlnum) let idx = match(prevtext, '^\s*\zs<!--') if idx >= 0 " just below comment start, add a shiftwidth return idx + shiftwidth() endif " Some files add 4 spaces just below a TODO line. It's difficult to detect " the end of the TODO, so let's not do that. " Align with the previous non-blank line. return indent(prevlnum) endfunc "}}} " Return the indent for conditional comment: <!--[ ![endif]--> func! s:Alien6() "{{{ let curtext = getline(v:lnum) if curtext =~ '\s*\zs<!\[endif\]-->' " current line starts with end of comment, line up with comment start. let lnum = search('<!--', 'bn') if lnum > 0 return indent(lnum) endif endif return b:hi_indent.baseindent + shiftwidth() endfunc "}}} " When the "lnum" line ends in ">" find the line containing the matching "<". func! HtmlIndent_FindTagStart(lnum) "{{{ " Avoids using the indent of a continuation line. " Moves the cursor. " Return two values: " - the matching line number or "lnum". " - a flag indicating whether we found the end of a tag. " This method is global so that HTML-like indenters can use it. " To avoid matching " > " or " < " inside a string require that the opening " "<" is followed by a word character and the closing ">" comes after a " non-white character. let idx = match(getline(a:lnum), '\S>\s*$') if idx > 0 call cursor(a:lnum, idx) let lnum = searchpair('<\w', '' , '\S>', 'bW', '', max([a:lnum - b:html_indent_line_limit, 0])) if lnum > 0 return [lnum, 1] endif endif return [a:lnum, 0] endfunc "}}} " Find the unclosed start tag from the current cursor position. func! HtmlIndent_FindStartTag() "{{{ " The cursor must be on or before a closing tag. " If found, positions the cursor at the match and returns the line number. " Otherwise returns 0. let tagname = matchstr(getline('.')[col('.') - 1:], '</\zs\w\+\ze') let start_lnum = searchpair('<' . tagname . '\>', '', '</' . tagname . '\>', 'bW') if start_lnum > 0 return start_lnum endif return 0 endfunc "}}} " Moves the cursor from a "<" to the matching ">". func! HtmlIndent_FindTagEnd() "{{{ " Call this with the cursor on the "<" of a start tag. " This will move the cursor to the ">" of the matching end tag or, when it's " a self-closing tag, to the matching ">". " Limited to look up to b:html_indent_line_limit lines away. let text = getline('.') let tagname = matchstr(text, '\w\+\|!--', col('.')) if tagname == '!--' call search('--\zs>') elseif s:get_tag('/' . tagname) != 0 " tag with a closing tag, find matching "</tag>" call searchpair('<' . tagname, '', '</' . tagname . '\zs>', 'W', '', line('.') + b:html_indent_line_limit) else " self-closing tag, find the ">" call search('\S\zs>') endif endfunc "}}} " Indenting inside a start tag. Return the correct indent or -1 if unknown. func! s:InsideTag(foundHtmlString) "{{{ if a:foundHtmlString " Inside an attribute string. " Align with the previous line or use an external function. let lnum = v:lnum - 1 if lnum > 1 if exists('b:html_indent_tag_string_func') return b:html_indent_tag_string_func(lnum) endif return indent(lnum) endif endif " Should be another attribute: " attr="val". Align with the previous " attribute start. let lnum = v:lnum while lnum > 1 let lnum -= 1 let text = getline(lnum) " Find a match with one of these, align with "attr": " attr= " <tag attr= " text<tag attr= " <tag>text</tag>text<tag attr= " For long lines search for the first match, finding the last match " gets very slow. if len(text) < 300 let idx = match(text, '.*\s\zs[_a-zA-Z0-9-]\+="') else let idx = match(text, '\s\zs[_a-zA-Z0-9-]\+="') endif if idx > 0 " Found the attribute. TODO: assumes spaces, no Tabs. return idx endif endwhile return -1 endfunc "}}} " THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum. func! HtmlIndent() "{{{ if prevnonblank(v:lnum - 1) < 1 " First non-blank line has no indent. return 0 endif let curtext = tolower(getline(v:lnum)) let indentunit = shiftwidth() let b:hi_newstate = {} let b:hi_newstate.lnum = v:lnum " When syntax HL is enabled, detect we are inside a tag. Indenting inside " a tag works very differently. Do not do this when the line starts with " "<", it gets the "htmlTag" ID but we are not inside a tag then. if curtext !~ '^\s*<' normal! ^ let stack = synstack(v:lnum, col('.')) " assumes there are no tabs let foundHtmlString = 0 for synid in reverse(stack) let name = synIDattr(synid, "name") if index(b:hi_insideStringNames, name) >= 0 let foundHtmlString = 1 elseif index(b:hi_insideTagNames, name) >= 0 " Yes, we are inside a tag. let indent = s:InsideTag(foundHtmlString) if indent >= 0 " Do not keep the state. TODO: could keep the block type. let b:hi_indent.lnum = 0 return indent endif endif endfor endif " does the line start with a closing tag? let swendtag = match(curtext, '^\s*</') >= 0 if prevnonblank(v:lnum - 1) == b:hi_indent.lnum && b:hi_lasttick == b:changedtick - 1 " use state (continue from previous line) else " start over (know nothing) let b:hi_indent = s:FreshState(v:lnum) endif if b:hi_indent.block >= 2 " within block let endtag = s:endtags[b:hi_indent.block] let blockend = stridx(curtext, endtag) if blockend >= 0 " block ends here let b:hi_newstate.block = 0 " calc indent for REST OF LINE (may start more blocks): call s:CountTagsAndState(strpart(curtext, blockend + strlen(endtag))) if swendtag && b:hi_indent.block != 5 let indent = b:hi_indent.blocktagind + s:curind * indentunit let b:hi_newstate.baseindent = indent + s:nextrel * indentunit else let indent = s:Alien{b:hi_indent.block}() let b:hi_newstate.baseindent = b:hi_indent.blocktagind + s:nextrel * indentunit endif else " block continues " indent this line with alien method let indent = s:Alien{b:hi_indent.block}() endif else " not within a block - within usual html let b:hi_newstate.block = b:hi_indent.block if swendtag " The current line starts with an end tag, align with its start tag. call cursor(v:lnum, 1) let start_lnum = HtmlIndent_FindStartTag() if start_lnum > 0 " check for the line starting with something inside a tag: " <sometag <- align here " attr=val><open> not here let text = getline(start_lnum) let angle = matchstr(text, '[<>]') if angle == '>' call cursor(start_lnum, 1) normal! f>% let start_lnum = line('.') let text = getline(start_lnum) endif let indent = indent(start_lnum) if col('.') > 2 let swendtag = match(text, '^\s*</') >= 0 call s:CountITags(text[: col('.') - 2]) let indent += s:nextrel * shiftwidth() if !swendtag let indent += s:curind * shiftwidth() endif endif else " not sure what to do let indent = b:hi_indent.baseindent endif let b:hi_newstate.baseindent = indent else call s:CountTagsAndState(curtext) let indent = b:hi_indent.baseindent let b:hi_newstate.baseindent = indent + (s:curind + s:nextrel) * indentunit endif endif let b:hi_lasttick = b:changedtick call extend(b:hi_indent, b:hi_newstate, "force") return indent endfunc "}}} " Check user settings when loading this script the first time. call HtmlIndent_CheckUserSettings() let &cpo = s:cpo_save unlet s:cpo_save " vim: fdm=marker ts=8 sw=2 tw=78 �����������������������������������������������������������neovim-0.2.2/runtime/indent/htmldjango.vim����������������������������������������������������������0000664�0000000�0000000�00000000421�13204015742�0020613�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Django HTML template " Maintainer: Dave Hodder <dmh@dmh.org.uk> " Last Change: 2007 Jan 25 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Use HTML formatting rules. runtime! indent/html.vim �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/idlang.vim��������������������������������������������������������������0000664�0000000�0000000�00000003124�13204015742�0017725�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" IDL (Interactive Data Language) indent file. " Language: IDL (ft=idlang) " Last change: 2017 Jun 13 " Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com> " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentkeys=o,O,0=endif,0=ENDIF,0=endelse,0=ENDELSE,0=endwhile,0=ENDWHILE,0=endfor,0=ENDFOR,0=endrep,0=ENDREP setlocal indentexpr=GetIdlangIndent(v:lnum) " Only define the function once. if exists("*GetIdlangIndent") finish endif function GetIdlangIndent(lnum) " First non-empty line above the current line. let pnum = prevnonblank(v:lnum-1) " v:lnum is the first non-empty line -- zero indent. if pnum == 0 return 0 endif " Second non-empty line above the current line. let pnum2 = prevnonblank(pnum-1) " Current indent. let curind = indent(pnum) " Indenting of continued lines. if getline(pnum) =~ '\$\s*\(;.*\)\=$' if getline(pnum2) !~ '\$\s*\(;.*\)\=$' let curind = curind+shiftwidth() endif else if getline(pnum2) =~ '\$\s*\(;.*\)\=$' let curind = curind-shiftwidth() endif endif " Indenting blocks of statements. if getline(v:lnum) =~? '^\s*\(endif\|endelse\|endwhile\|endfor\|endrep\)\>' if getline(pnum) =~? 'begin\>' elseif indent(v:lnum) > curind-shiftwidth() let curind = curind-shiftwidth() else return -1 endif elseif getline(pnum) =~? 'begin\>' if indent(v:lnum) < curind+shiftwidth() let curind = curind+shiftwidth() else return -1 endif endif return curind endfunction ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/ishd.vim����������������������������������������������������������������0000664�0000000�0000000�00000003525�13204015742�0017423�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Description: InstallShield indenter " Author: Johannes Zellner <johannes@zellner.org> " Last Change: Tue, 27 Apr 2004 14:54:59 CEST " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentexpr=GetIshdIndent(v:lnum) setlocal indentkeys& setlocal indentkeys+==else,=elseif,=endif,=end,=begin,<:> " setlocal indentkeys-=0# let b:undo_indent = "setl ai< indentexpr< indentkeys<" " Only define the function once. if exists("*GetIshdIndent") finish endif fun! GetIshdIndent(lnum) " labels and preprocessor get zero indent immediately let this_line = getline(a:lnum) let LABELS_OR_PREPROC = '^\s*\(\<\k\+\>:\s*$\|#.*\)' let LABELS_OR_PREPROC_EXCEPT = '^\s*\<default\+\>:' if this_line =~ LABELS_OR_PREPROC && this_line !~ LABELS_OR_PREPROC_EXCEPT return 0 endif " Find a non-blank line above the current line. " Skip over labels and preprocessor directives. let lnum = a:lnum while lnum > 0 let lnum = prevnonblank(lnum - 1) let previous_line = getline(lnum) if previous_line !~ LABELS_OR_PREPROC || previous_line =~ LABELS_OR_PREPROC_EXCEPT break endif endwhile " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif let ind = indent(lnum) " Add if previous_line =~ '^\s*\<\(function\|begin\|switch\|case\|default\|if.\{-}then\|else\|elseif\|while\|repeat\)\>' let ind = ind + shiftwidth() endif " Subtract if this_line =~ '^\s*\<endswitch\>' let ind = ind - 2 * shiftwidth() elseif this_line =~ '^\s*\<\(begin\|end\|endif\|endwhile\|else\|elseif\|until\)\>' let ind = ind - shiftwidth() elseif this_line =~ '^\s*\<\(case\|default\)\>' if previous_line !~ '^\s*\<switch\>' let ind = ind - shiftwidth() endif endif return ind endfun ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/j.vim�������������������������������������������������������������������0000664�0000000�0000000�00000003425�13204015742�0016724�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: J " Maintainer: David Bürgin <676c7473@gmail.com> " URL: https://github.com/glts/vim-j " Last Change: 2015-01-11 if exists('b:did_indent') finish endif let b:did_indent = 1 setlocal indentexpr=GetJIndent() setlocal indentkeys-=0{,0},:,0# setlocal indentkeys+=0),0<:>,=case.,=catch.,=catchd.,=catcht.,=do.,=else.,=elseif.,=end.,=fcase. let b:undo_indent = 'setlocal indentkeys< indentexpr<' if exists('*GetJIndent') finish endif " If g:j_indent_definitions is true, the bodies of explicit definitions of " adverbs, conjunctions, and verbs will be indented. Default is false (0). if !exists('g:j_indent_definitions') let g:j_indent_definitions = 0 endif function GetJIndent() abort let l:prevlnum = prevnonblank(v:lnum - 1) if l:prevlnum == 0 return 0 endif let l:indent = indent(l:prevlnum) let l:prevline = getline(l:prevlnum) if l:prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$' " Increase indentation after an initial control word that starts or " continues a block and is not terminated by "end." let l:indent += shiftwidth() elseif g:j_indent_definitions && (l:prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || l:prevline =~# '^\s*:\s*$') " Increase indentation in explicit definitions of adverbs, conjunctions, " and verbs let l:indent += shiftwidth() endif " Decrease indentation in lines that start with either control words that " continue or end a block, or the special items ")" and ":" if getline(v:lnum) =~# '^\s*\%()\|:\|\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.\)' let l:indent -= shiftwidth() endif return l:indent endfunction �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/java.vim����������������������������������������������������������������0000664�0000000�0000000�00000010277�13204015742�0017417�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Java " Previous Maintainer: Toby Allsopp <toby.allsopp@peace.com> " Current Maintainer: Hong Xu <hong@topbug.net> " Homepage: http://www.vim.org/scripts/script.php?script_id=3899 " https://github.com/xuhdev/indent-java.vim " Last Change: 2016 Mar 7 " Version: 1.1 " License: Same as Vim. " Copyright (c) 2012-2016 Hong Xu " Before 2012, this file was maintained by Toby Allsopp. " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Indent Java anonymous classes correctly. setlocal cindent cinoptions& cinoptions+=j1 " The "extends" and "implements" lines start off with the wrong indent. setlocal indentkeys& indentkeys+=0=extends indentkeys+=0=implements " Set the function to do the work. setlocal indentexpr=GetJavaIndent() let b:undo_indent = "set cin< cino< indentkeys< indentexpr<" " Only define the function once. if exists("*GetJavaIndent") finish endif let s:keepcpo= &cpo set cpo&vim function! SkipJavaBlanksAndComments(startline) let lnum = a:startline while lnum > 1 let lnum = prevnonblank(lnum) if getline(lnum) =~ '\*/\s*$' while getline(lnum) !~ '/\*' && lnum > 1 let lnum = lnum - 1 endwhile if getline(lnum) =~ '^\s*/\*' let lnum = lnum - 1 else break endif elseif getline(lnum) =~ '^\s*//' let lnum = lnum - 1 else break endif endwhile return lnum endfunction function GetJavaIndent() " Java is just like C; use the built-in C indenting and then correct a few " specific cases. let theIndent = cindent(v:lnum) " If we're in the middle of a comment then just trust cindent if getline(v:lnum) =~ '^\s*\*' return theIndent endif " find start of previous line, in case it was a continuation line let lnum = SkipJavaBlanksAndComments(v:lnum - 1) " If the previous line starts with '@', we should have the same indent as " the previous one if getline(lnum) =~ '^\s*@.*$' return indent(lnum) endif let prev = lnum while prev > 1 let next_prev = SkipJavaBlanksAndComments(prev - 1) if getline(next_prev) !~ ',\s*$' break endif let prev = next_prev endwhile " Try to align "throws" lines for methods and "extends" and "implements" for " classes. if getline(v:lnum) =~ '^\s*\(throws\|extends\|implements\)\>' \ && getline(lnum) !~ '^\s*\(throws\|extends\|implements\)\>' let theIndent = theIndent + shiftwidth() endif " correct for continuation lines of "throws", "implements" and "extends" let cont_kw = matchstr(getline(prev), \ '^\s*\zs\(throws\|implements\|extends\)\>\ze.*,\s*$') if strlen(cont_kw) > 0 let amount = strlen(cont_kw) + 1 if getline(lnum) !~ ',\s*$' let theIndent = theIndent - (amount + shiftwidth()) if theIndent < 0 let theIndent = 0 endif elseif prev == lnum let theIndent = theIndent + amount if cont_kw ==# 'throws' let theIndent = theIndent + shiftwidth() endif endif elseif getline(prev) =~ '^\s*\(throws\|implements\|extends\)\>' \ && (getline(prev) =~ '{\s*$' \ || getline(v:lnum) =~ '^\s*{\s*$') let theIndent = theIndent - shiftwidth() endif " When the line starts with a }, try aligning it with the matching {, " skipping over "throws", "extends" and "implements" clauses. if getline(v:lnum) =~ '^\s*}\s*\(//.*\|/\*.*\)\=$' call cursor(v:lnum, 1) silent normal! % let lnum = line('.') if lnum < v:lnum while lnum > 1 let next_lnum = SkipJavaBlanksAndComments(lnum - 1) if getline(lnum) !~ '^\s*\(throws\|extends\|implements\)\>' \ && getline(next_lnum) !~ ',\s*$' break endif let lnum = prevnonblank(next_lnum) endwhile return indent(lnum) endif endif " Below a line starting with "}" never indent more. Needed for a method " below a method with an indented "throws" clause. let lnum = SkipJavaBlanksAndComments(v:lnum - 1) if getline(lnum) =~ '^\s*}\s*\(//.*\|/\*.*\)\=$' && indent(lnum) < theIndent let theIndent = indent(lnum) endif return theIndent endfunction let &cpo = s:keepcpo unlet s:keepcpo " vi: sw=2 et ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/javascript.vim����������������������������������������������������������0000664�0000000�0000000�00000034112�13204015742�0020636�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Javascript " Maintainer: Chris Paul ( https://github.com/bounceme ) " URL: https://github.com/pangloss/vim-javascript " Last Change: September 18, 2017 " Only load this indent file when no other was loaded. if exists('b:did_indent') finish endif let b:did_indent = 1 " indent correctly if inside <script> " vim/vim@690afe1 for the switch from cindent let b:html_indent_script1 = 'inc' " Now, set up our indentation expression and keys that trigger it. setlocal indentexpr=GetJavascriptIndent() setlocal autoindent nolisp nosmartindent setlocal indentkeys+=0],0) " Testable with something like: " vim -eNs "+filetype plugin indent on" "+syntax on" "+set ft=javascript" \ " "+norm! gg=G" '+%print' '+:q!' testfile.js \ " | diff -uBZ testfile.js - let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys<' " Regex of syntax group names that are or delimit string or are comments. let b:syng_strcom = get(b:,'syng_strcom','string\|comment\|regex\|special\|doc\|template\%(braces\)\@!') let b:syng_str = get(b:,'syng_str','string\|template\|special') " template strings may want to be excluded when editing graphql: " au! Filetype javascript let b:syng_str = '^\%(.*template\)\@!.*string\|special' " au! Filetype javascript let b:syng_strcom = '^\%(.*template\)\@!.*string\|comment\|regex\|special\|doc' " Only define the function once. if exists('*GetJavascriptIndent') finish endif let s:cpo_save = &cpo set cpo&vim " Get shiftwidth value if exists('*shiftwidth') function s:sw() return shiftwidth() endfunction else function s:sw() return &l:shiftwidth ? &l:shiftwidth : &l:tabstop endfunction endif " Performance for forwards search(): start search at pos rather than masking " matches before pos. let s:z = has('patch-7.4.984') ? 'z' : '' " Expression used to check whether we should skip a match with searchpair(). let s:skip_expr = "s:SynAt(line('.'),col('.')) =~? b:syng_strcom" let s:in_comm = s:skip_expr[:-14] . "'comment\\|doc'" let s:rel = has('reltime') " searchpair() wrapper if s:rel function s:GetPair(start,end,flags,skip) return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,s:l1,a:skip ==# 's:SkipFunc()' ? 2000 : 200) endfunction else function s:GetPair(start,end,flags,skip) return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,s:l1) endfunction endif function s:SynAt(l,c) let byte = line2byte(a:l) + a:c - 1 let pos = index(s:synid_cache[0], byte) if pos == -1 let s:synid_cache[:] += [[byte], [synIDattr(synID(a:l, a:c, 0), 'name')]] endif return s:synid_cache[1][pos] endfunction function s:ParseCino(f) let [divider, n, cstr] = [0] + matchlist(&cino, \ '\%(.*,\)\=\%(\%d'.char2nr(a:f).'\(-\)\=\([.s0-9]*\)\)\=')[1:2] for c in split(cstr,'\zs') if c == '.' && !divider let divider = 1 elseif c ==# 's' if n !~ '\d' return n . s:sw() + 0 endif let n = str2nr(n) * s:sw() break else let [n, divider] .= [c, 0] endif endfor return str2nr(n) / max([str2nr(divider),1]) endfunction " Optimized {skip} expr, only callable from the search loop which " GetJavascriptIndent does to find the containing [[{(] (side-effects) function s:SkipFunc() if s:top_col == 1 throw 'out of bounds' endif let s:top_col = 0 if s:check_in if eval(s:skip_expr) return 1 endif let s:check_in = 0 elseif getline('.') =~ '\%<'.col('.').'c\/.\{-}\/\|\%>'.col('.').'c[''"]\|\\$' if eval(s:skip_expr) let s:looksyn = a:firstline return 1 endif elseif search('\m`\|\${\|\*\/','nW'.s:z,s:looksyn) && eval(s:skip_expr) let s:check_in = 1 return 1 endif let [s:looksyn, s:top_col] = getpos('.')[1:2] endfunction function s:AlternatePair() let [pat, l:for] = ['[][(){};]', 2] while s:SearchLoop(pat,'bW','s:SkipFunc()') if s:LookingAt() == ';' if !l:for if s:GetPair('{','}','bW','s:SkipFunc()') return endif break else let [pat, l:for] = ['[{}();]', l:for - 1] endif else let idx = stridx('])}',s:LookingAt()) if idx == -1 return elseif !s:GetPair(['\[','(','{'][idx],'])}'[idx],'bW','s:SkipFunc()') break endif endif endwhile throw 'out of bounds' endfunction function s:Nat(int) return a:int * (a:int > 0) endfunction function s:LookingAt() return getline('.')[col('.')-1] endfunction function s:Token() return s:LookingAt() =~ '\k' ? expand('<cword>') : s:LookingAt() endfunction function s:PreviousToken() let l:col = col('.') if search('\m\k\{1,}\|\S','ebW') if search('\m\*\%#\/\|\/\/\%<'.a:firstline.'l','nbW',line('.')) && eval(s:in_comm) if s:SearchLoop('\S\ze\_s*\/[/*]','bW',s:in_comm) return s:Token() endif call cursor(a:firstline, l:col) else return s:Token() endif endif return '' endfunction function s:Pure(f,...) return eval("[call(a:f,a:000),cursor(a:firstline,".col('.').")][0]") endfunction function s:SearchLoop(pat,flags,expr) return s:GetPair(a:pat,'\_$.',a:flags,a:expr) endfunction function s:ExprCol() let bal = 0 while s:SearchLoop('[{}?]\|\_[^:]\zs::\@!','bW',s:skip_expr) if s:LookingAt() == ':' let bal -= 1 elseif s:LookingAt() == '?' let bal += 1 if bal == 1 break endif elseif s:LookingAt() == '{' let bal = !s:IsBlock() break elseif !s:GetPair('{','}','bW',s:skip_expr) break endif endwhile return s:Nat(bal) endfunction " configurable regexes that define continuation lines, not including (, {, or [. let s:opfirst = '^' . get(g:,'javascript_opfirst', \ '\C\%([<>=,.?^%|/&]\|\([-:+]\)\1\@!\|\*\+\|!=\|in\%(stanceof\)\=\>\)') let s:continuation = get(g:,'javascript_continuation', \ '\C\%([<=,.~!?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<\%(typeof\|new\|delete\|void\|in\|instanceof\|await\)\)') . '$' function s:Continues(ln,con) let tok = matchstr(a:con[-15:],s:continuation) if tok =~ '[a-z:]' call cursor(a:ln, len(a:con)) return tok == ':' ? s:ExprCol() : s:PreviousToken() != '.' elseif tok !~ '[/>]' return tok isnot '' endif return s:SynAt(a:ln, len(a:con)) !~? (tok == '>' ? 'jsflow\|^html' : 'regex') endfunction " Check if line 'lnum' has a balanced amount of parentheses. function s:Balanced(lnum) let [l:open, l:line] = [0, getline(a:lnum)] let pos = match(l:line, '[][(){}]') while pos != -1 if s:SynAt(a:lnum,pos + 1) !~? b:syng_strcom let l:open += match(' ' . l:line[pos],'[[({]') if l:open < 0 return endif endif let pos = match(l:line, !l:open ? '[][(){}]' : '()' =~ l:line[pos] ? \ '[()]' : '{}' =~ l:line[pos] ? '[{}]' : '[][]', pos + 1) endwhile return !l:open endfunction function s:OneScope() if s:LookingAt() == ')' && s:GetPair('(', ')', 'bW', s:skip_expr) let tok = s:PreviousToken() return (count(split('for if let while with'),tok) || \ tok =~# '^await$\|^each$' && s:PreviousToken() ==# 'for') && \ s:Pure('s:PreviousToken') != '.' && !(tok == 'while' && s:DoWhile()) elseif s:Token() =~# '^else$\|^do$' return s:Pure('s:PreviousToken') != '.' endif return strpart(getline('.'),col('.')-2,2) == '=>' endfunction function s:DoWhile() let cpos = searchpos('\m\<','cbW') if s:SearchLoop('\C[{}]\|\<\%(do\|while\)\>','bW',s:skip_expr) if s:{s:LookingAt() == '}' && s:GetPair('{','}','bW',s:skip_expr) ? \ 'Previous' : ''}Token() ==# 'do' && s:IsBlock() return 1 endif call call('cursor',cpos) endif endfunction " returns total offset from braceless contexts. 'num' is the lineNr which " encloses the entire context, 'cont' if whether a:firstline is a continued " expression, which could have started in a braceless context function s:IsContOne(num,cont) let [l:num, b_l] = [a:num + !a:num, 0] let pind = a:num ? indent(a:num) + s:sw() : 0 let ind = indent('.') + !a:cont while line('.') > l:num && ind > pind || line('.') == l:num if indent('.') < ind && s:OneScope() let b_l += 1 elseif !a:cont || b_l || ind < indent(a:firstline) break else call cursor(0,1) endif let ind = min([ind, indent('.')]) if s:PreviousToken() is '' break endif endwhile return b_l endfunction function s:Class() return (s:Token() ==# 'class' || s:PreviousToken() =~# '^class$\|^extends$') && \ s:PreviousToken() != '.' endfunction function s:IsSwitch() return s:PreviousToken() !~ '[.*]' && \ (!s:GetPair('{','}','cbW',s:skip_expr) || s:IsBlock() && !s:Class()) endfunction " https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader function s:IsBlock() let tok = s:PreviousToken() if join(s:stack) =~? 'xml\|jsx' && s:SynAt(line('.'),col('.')-1) =~? 'xml\|jsx' return tok != '{' elseif tok =~ '\k' if tok ==# 'type' return s:Pure('eval',"s:PreviousToken() !~# '^\\%(im\\|ex\\)port$' || s:PreviousToken() == '.'") elseif tok ==# 'of' return s:Pure('eval',"!s:GetPair('[[({]','[])}]','bW',s:skip_expr) || s:LookingAt() != '(' ||" \ ."s:{s:PreviousToken() ==# 'await' ? 'Previous' : ''}Token() !=# 'for' || s:PreviousToken() == '.'") endif return index(split('return const let import export extends yield default delete var await void typeof throw case new in instanceof') \ ,tok) < (line('.') != a:firstline) || s:Pure('s:PreviousToken') == '.' elseif tok == '>' return getline('.')[col('.')-2] == '=' || s:SynAt(line('.'),col('.')) =~? 'jsflow\|^html' elseif tok == '*' return s:Pure('s:PreviousToken') == ':' elseif tok == ':' return s:Pure('eval',"s:PreviousToken() =~ '^\\K\\k*$' && !s:ExprCol()") elseif tok == '/' return s:SynAt(line('.'),col('.')) =~? 'regex' elseif tok !~ '[=~!<,.?^%|&([]' return tok !~ '[-+]' || line('.') != a:firstline && getline('.')[col('.')-2] == tok endif endfunction function GetJavascriptIndent() let b:js_cache = get(b:,'js_cache',[0,0,0]) let s:synid_cache = [[],[]] let l:line = getline(v:lnum) " use synstack as it validates syn state and works in an empty line let s:stack = [''] + map(synstack(v:lnum,1),"synIDattr(v:val,'name')") " start with strings,comments,etc. if s:stack[-1] =~? 'comment\|doc' if l:line =~ '^\s*\*' return cindent(v:lnum) elseif l:line !~ '^\s*\/[/*]' return -1 endif elseif s:stack[-1] =~? b:syng_str if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1) let b:js_cache[0] = v:lnum endif return -1 endif let s:l1 = max([0,prevnonblank(v:lnum) - (s:rel ? 2000 : 1000), \ get(get(b:,'hi_indent',{}),'blocklnr')]) call cursor(v:lnum,1) if s:PreviousToken() is '' return endif let [l:lnum, pline] = [line('.'), getline('.')[:col('.')-1]] let l:line = substitute(l:line,'^\s*','','') let l:line_raw = l:line if l:line[:1] == '/*' let l:line = substitute(l:line,'^\%(\/\*.\{-}\*\/\s*\)*','','') endif if l:line =~ '^\/[/*]' let l:line = '' endif " the containing paren, bracket, or curly. Many hacks for performance call cursor(v:lnum,1) let idx = index([']',')','}'],l:line[0]) if b:js_cache[0] > l:lnum && b:js_cache[0] < v:lnum || \ b:js_cache[0] == l:lnum && s:Balanced(l:lnum) call call('cursor',b:js_cache[1:]) else let [s:looksyn, s:top_col, s:check_in, s:l1] = [v:lnum - 1,0,0, \ max([s:l1, &smc ? search('\m^.\{'.&smc.',}','nbW',s:l1 + 1) + 1 : 0])] try if idx != -1 call s:GetPair(['\[','(','{'][idx],'])}'[idx],'bW','s:SkipFunc()') elseif getline(v:lnum) !~ '^\S' && s:stack[-1] =~? 'block\|^jsobject$' call s:GetPair('{','}','bW','s:SkipFunc()') else call s:AlternatePair() endif catch /^\Cout of bounds$/ call cursor(v:lnum,1) endtry let b:js_cache[1:] = line('.') == v:lnum ? [0,0] : getpos('.')[1:2] endif let [b:js_cache[0], num] = [v:lnum, b:js_cache[1]] let [num_ind, is_op, b_l, l:switch_offset] = [s:Nat(indent(num)),0,0,0] if !num || s:LookingAt() == '{' && s:IsBlock() let ilnum = line('.') if num && s:LookingAt() == ')' && s:GetPair('(',')','bW',s:skip_expr) if ilnum == num let [num, num_ind] = [line('.'), indent('.')] endif if idx == -1 && s:PreviousToken() ==# 'switch' && s:IsSwitch() let l:switch_offset = &cino !~ ':' ? s:sw() : s:ParseCino(':') if pline[-1:] != '.' && l:line =~# '^\%(default\|case\)\>' return s:Nat(num_ind + l:switch_offset) elseif &cino =~ '=' let l:case_offset = s:ParseCino('=') endif endif endif if idx == -1 && pline[-1:] !~ '[{;]' let sol = matchstr(l:line,s:opfirst) if sol is '' || sol == '/' && s:SynAt(v:lnum, \ 1 + len(getline(v:lnum)) - len(l:line)) =~? 'regex' if s:Continues(l:lnum,pline) let is_op = s:sw() endif elseif num && sol =~# '^\%(in\%(stanceof\)\=\|\*\)$' call call('cursor',b:js_cache[1:]) if s:PreviousToken() =~ '\k' && s:Class() return num_ind + s:sw() endif let is_op = s:sw() else let is_op = s:sw() endif call cursor(l:lnum, len(pline)) let b_l = s:Nat(s:IsContOne(b:js_cache[1],is_op) - (!is_op && l:line =~ '^{')) * s:sw() endif elseif idx.s:LookingAt().&cino =~ '^-1(.*(' && (search('\m\S','nbW',num) || s:ParseCino('U')) let pval = s:ParseCino('(') if !pval let [Wval, vcol] = [s:ParseCino('W'), virtcol('.')] if search('\m\S','W',num) return s:ParseCino('w') ? vcol : virtcol('.')-1 endif return Wval ? s:Nat(num_ind + Wval) : vcol endif return s:Nat(num_ind + pval + searchpair('\m(','','\m)','nbrmW',s:skip_expr,num) * s:sw()) endif " main return if l:line =~ '^[])}]\|^|}' if l:line_raw[0] == ')' && getline(num)[b:js_cache[2]-1] == '(' if s:ParseCino('M') return indent(l:lnum) elseif &cino =~# 'm' && !s:ParseCino('m') return virtcol('.') - 1 endif endif return num_ind elseif num return s:Nat(num_ind + get(l:,'case_offset',s:sw()) + l:switch_offset + b_l + is_op) endif return b_l + is_op endfunction let &cpo = s:cpo_save unlet s:cpo_save ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/json.vim����������������������������������������������������������������0000664�0000000�0000000�00000010505�13204015742�0017441�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: JSON " Mantainer: Eli Parra <eli@elzr.com> https://github.com/elzr/vim-json " Last Change: 2017 Jun 13 " https://github.com/jakar/vim-json/commit/20b650e22aa750c4ab6a66aa646bdd95d7cd548a#diff-e81fc111b2052e306d126bd9989f7b7c " Original Author: Rogerz Zhang <rogerz.zhang at gmail.com> http://github.com/rogerz/vim-json " Acknowledgement: Based off of vim-javascript maintained by Darrick Wiebe " http://www.vim.org/scripts/script.php?script_id=2765 " 0. Initialization {{{1 " ================= " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal nosmartindent " Now, set up our indentation expression and keys that trigger it. setlocal indentexpr=GetJSONIndent() setlocal indentkeys=0{,0},0),0[,0],!^F,o,O,e " Only define the function once. if exists("*GetJSONIndent") finish endif let s:cpo_save = &cpo set cpo&vim " 1. Variables {{{1 " ============ let s:line_term = '\s*\%(\%(\/\/\).*\)\=$' " Regex that defines blocks. let s:block_regex = '\%({\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term " 2. Auxiliary Functions {{{1 " ====================== " Check if the character at lnum:col is inside a string. function s:IsInString(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'jsonString' endfunction " Find line above 'lnum' that isn't empty, or in a string. function s:PrevNonBlankNonString(lnum) let lnum = prevnonblank(a:lnum) while lnum > 0 " If the line isn't empty or in a string, end search. let line = getline(lnum) if !(s:IsInString(lnum, 1) && s:IsInString(lnum, strlen(line))) break endif let lnum = prevnonblank(lnum - 1) endwhile return lnum endfunction " Check if line 'lnum' has more opening brackets than closing ones. function s:LineHasOpeningBrackets(lnum) let open_0 = 0 let open_2 = 0 let open_4 = 0 let line = getline(a:lnum) let pos = match(line, '[][(){}]', 0) while pos != -1 let idx = stridx('(){}[]', line[pos]) if idx % 2 == 0 let open_{idx} = open_{idx} + 1 else let open_{idx - 1} = open_{idx - 1} - 1 endif let pos = match(line, '[][(){}]', pos + 1) endwhile return (open_0 > 0) . (open_2 > 0) . (open_4 > 0) endfunction function s:Match(lnum, regex) let col = match(getline(a:lnum), a:regex) + 1 return col > 0 && !s:IsInString(a:lnum, col) ? col : 0 endfunction " 3. GetJSONIndent Function {{{1 " ========================= function GetJSONIndent() " 3.1. Setup {{{2 " ---------- " Set up variables for restoring position in file. Could use v:lnum here. let vcol = col('.') " 3.2. Work on the current line {{{2 " ----------------------------- " Get the current line. let line = getline(v:lnum) let ind = -1 " If we got a closing bracket on an empty line, find its match and indent " according to it. let col = matchend(line, '^\s*[]}]') if col > 0 && !s:IsInString(v:lnum, col) call cursor(v:lnum, col) let bs = strpart('{}[]', stridx('}]', line[col - 1]) * 2, 2) let pairstart = escape(bs[0], '[') let pairend = escape(bs[1], ']') let pairline = searchpair(pairstart, '', pairend, 'bW') if pairline > 0 let ind = indent(pairline) else let ind = virtcol('.') - 1 endif return ind endif " If we are in a multi-line string, don't do anything to it. if s:IsInString(v:lnum, matchend(line, '^\s*') + 1) return indent('.') endif " 3.3. Work on the previous line. {{{2 " ------------------------------- let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif " Set up variables for current line. let line = getline(lnum) let ind = indent(lnum) " If the previous line ended with a block opening, add a level of indent. " if s:Match(lnum, s:block_regex) " return indent(lnum) + shiftwidth() " endif " If the previous line contained an opening bracket, and we are still in it, " add indent depending on the bracket type. if line =~ '[[({]' let counts = s:LineHasOpeningBrackets(lnum) if counts[0] == '1' || counts[1] == '1' || counts[2] == '1' return ind + shiftwidth() else call cursor(v:lnum, vcol) end endif " }}}2 return ind endfunction " }}}1 let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2 ts=8 noet: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/jsp.vim�����������������������������������������������������������������0000664�0000000�0000000�00000000716�13204015742�0017267�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim filetype indent file " Language: JSP files " Maintainer: David Fishburn <fishburn@ianywhere.com> " Version: 1.0 " Last Change: Wed Nov 08 2006 11:08:05 AM " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " If there has been no specific JSP indent script created, " use the default html indent script which will handle " html, javascript and most of the JSP constructs. runtime! indent/html.vim ��������������������������������������������������neovim-0.2.2/runtime/indent/ld.vim������������������������������������������������������������������0000664�0000000�0000000�00000003400�13204015742�0017063�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: ld(1) script " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetLDIndent() setlocal indentkeys=0{,0},!^F,o,O setlocal nosmartindent if exists("*GetLDIndent") finish endif function s:prevnonblanknoncomment(lnum) let lnum = a:lnum while lnum > 1 let lnum = prevnonblank(lnum) let line = getline(lnum) if line =~ '\*/' while lnum > 1 && line !~ '/\*' let lnum -= 1 endwhile if line =~ '^\s*/\*' let lnum -= 1 else break endif else break endif endwhile return lnum endfunction function s:count_braces(lnum, count_open) let n_open = 0 let n_close = 0 let line = getline(a:lnum) let pattern = '[{}]' let i = match(line, pattern) while i != -1 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'ld\%(Comment\|String\)' if line[i] == '{' let n_open += 1 elseif line[i] == '}' if n_open > 0 let n_open -= 1 else let n_close += 1 endif endif endif let i = match(line, pattern, i + 1) endwhile return a:count_open ? n_open : n_close endfunction function GetLDIndent() let line = getline(v:lnum) if line =~ '^\s*\*' return cindent(v:lnum) elseif line =~ '^\s*}' return indent(v:lnum) - shiftwidth() endif let pnum = s:prevnonblanknoncomment(v:lnum - 1) if pnum == 0 return 0 endif let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth() let pline = getline(pnum) if pline =~ '}\s*$' let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth() endif return ind endfunction ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/less.vim����������������������������������������������������������������0000664�0000000�0000000�00000000363�13204015742�0017437�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: less " Maintainer: Alessandro Vioni <jenoma@gmail.com> " URL: https://github.com/genoma/vim-less " Last Change: 2014 November 24 if exists("b:did_indent") finish endif runtime! indent/css.vim " vim:set sw=2: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/lifelines.vim�����������������������������������������������������������0000664�0000000�0000000�00000001175�13204015742�0020445�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: LifeLines " Maintainer: Patrick Texier <p.texier@orsennes.com> " Location: <http://patrick.texier.free.fr/vim/indent/lifelines.vim> " Last Change: 2010 May 7 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " LifeLines uses cindent without ; line terminator, C functions " declarations, C keywords, C++ formating setlocal cindent setlocal cinwords="" setlocal cinoptions+=+0 setlocal cinoptions+=p0 setlocal cinoptions+=i0 setlocal cinoptions+=t0 setlocal cinoptions+=*500 let b:undo_indent = "setl cin< cino< cinw<" " vim: ts=8 sw=4 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/liquid.vim��������������������������������������������������������������0000664�0000000�0000000�00000003553�13204015742�0017764�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Liquid " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2017 Jun 13 if exists('b:did_indent') finish endif set indentexpr= if exists('b:liquid_subtype') exe 'runtime! indent/'.b:liquid_subtype.'.vim' else runtime! indent/html.vim endif unlet! b:did_indent if &l:indentexpr == '' if &l:cindent let &l:indentexpr = 'cindent(v:lnum)' else let &l:indentexpr = 'indent(prevnonblank(v:lnum-1))' endif endif let b:liquid_subtype_indentexpr = &l:indentexpr let b:did_indent = 1 setlocal indentexpr=GetLiquidIndent() setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],o,O,!^F,=end,=endif,=endunless,=endifchanged,=endcase,=endfor,=endtablerow,=endcapture,=else,=elsif,=when,=empty " Only define the function once. if exists('*GetLiquidIndent') finish endif function! s:count(string,pattern) let string = substitute(a:string,'\C'.a:pattern,"\n",'g') return strlen(substitute(string,"[^\n]",'','g')) endfunction function! GetLiquidIndent(...) if a:0 && a:1 == '.' let v:lnum = line('.') elseif a:0 && a:1 =~ '^\d' let v:lnum = a:1 endif let vcol = col('.') call cursor(v:lnum,1) exe "let ind = ".b:liquid_subtype_indentexpr let lnum = prevnonblank(v:lnum-1) let line = getline(lnum) let cline = getline(v:lnum) let line = substitute(line,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','') let line .= matchstr(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+') let cline = substitute(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','') let sw = shiftwidth() let ind += sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>') let ind -= sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>') let ind -= sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>') let ind -= sw * s:count(cline,'{%\s*end\w*$') return ind endfunction �����������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/lisp.vim����������������������������������������������������������������0000664�0000000�0000000�00000000541�13204015742�0017436�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Lisp " Maintainer: Sergey Khorev <sergey.khorev@gmail.com> " URL: http://sites.google.com/site/khorser/opensource/vim " Last Change: 2012 Jan 10 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal ai nosi let b:undo_indent = "setl ai< si<" ���������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/logtalk.vim�������������������������������������������������������������0000664�0000000�0000000�00000003320�13204015742�0020122�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Paulo Moura <pmoura@logtalk.org> " Revised on: 2008.06.02 " Language: Logtalk " This Logtalk indent file is a modified version of the Prolog " indent file written by Gergely Kontra " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetLogtalkIndent() setlocal indentkeys-=:,0# setlocal indentkeys+=0%,-,0;,>,0) " Only define the function once. if exists("*GetLogtalkIndent") finish endif function! GetLogtalkIndent() " Find a non-blank line above the current line. let pnum = prevnonblank(v:lnum - 1) " Hit the start of the file, use zero indent. if pnum == 0 return 0 endif let line = getline(v:lnum) let pline = getline(pnum) let ind = indent(pnum) " Previous line was comment -> use previous line's indent if pline =~ '^\s*%' retu ind endif " Check for entity opening directive on previous line if pline =~ '^\s*:-\s\(object\|protocol\|category\)\ze(.*,$' let ind = ind + shiftwidth() " Check for clause head on previous line elseif pline =~ ':-\s*\(%.*\)\?$' let ind = ind + shiftwidth() " Check for entity closing directive on previous line elseif pline =~ '^\s*:-\send_\(object\|protocol\|category\)\.\(%.*\)\?$' let ind = ind - shiftwidth() " Check for end of clause on previous line elseif pline =~ '\.\s*\(%.*\)\?$' let ind = ind - shiftwidth() endif " Check for opening conditional on previous line if pline =~ '^\s*\([(;]\|->\)' && pline !~ '\.\s*\(%.*\)\?$' && pline !~ '^.*\([)][,]\s*\(%.*\)\?$\)' let ind = ind + shiftwidth() endif " Check for closing an unclosed paren, or middle ; or -> if line =~ '^\s*\([);]\|->\)' let ind = ind - shiftwidth() endif return ind endfunction ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/lua.vim�����������������������������������������������������������������0000664�0000000�0000000�00000003607�13204015742�0017256�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Lua script " Maintainer: Marcus Aurelius Farias <marcus.cf 'at' bol.com.br> " First Author: Max Ischenko <mfi 'at' ukr.net> " Last Change: 2017 Jun 13 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetLuaIndent() " To make Vim call GetLuaIndent() when it finds '\s*end' or '\s*until' " on the current line ('else' is default and includes 'elseif'). setlocal indentkeys+=0=end,0=until setlocal autoindent " Only define the function once. if exists("*GetLuaIndent") finish endif function! GetLuaIndent() " Find a non-blank line above the current line. let prevlnum = prevnonblank(v:lnum - 1) " Hit the start of the file, use zero indent. if prevlnum == 0 return 0 endif " Add a 'shiftwidth' after lines that start a block: " 'function', 'if', 'for', 'while', 'repeat', 'else', 'elseif', '{' let ind = indent(prevlnum) let prevline = getline(prevlnum) let midx = match(prevline, '^\s*\%(if\>\|for\>\|while\>\|repeat\>\|else\>\|elseif\>\|do\>\|then\>\)') if midx == -1 let midx = match(prevline, '{\s*$') if midx == -1 let midx = match(prevline, '\<function\>\s*\%(\k\|[.:]\)\{-}\s*(') endif endif if midx != -1 " Add 'shiftwidth' if what we found previously is not in a comment and " an "end" or "until" is not present on the same line. if synIDattr(synID(prevlnum, midx + 1, 1), "name") != "luaComment" && prevline !~ '\<end\>\|\<until\>' let ind = ind + shiftwidth() endif endif " Subtract a 'shiftwidth' on end, else, elseif, until and '}' " This is the part that requires 'indentkeys'. let midx = match(getline(v:lnum), '^\s*\%(end\>\|else\>\|elseif\>\|until\>\|}\)') if midx != -1 && synIDattr(synID(v:lnum, midx + 1, 1), "name") != "luaComment" let ind = ind - shiftwidth() endif return ind endfunction �������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/mail.vim����������������������������������������������������������������0000664�0000000�0000000�00000000464�13204015742�0017415�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Mail " Maintainer: Bram Moolenaar " Last Change: 2009 Jun 03 if exists("b:did_indent") finish endif let b:did_indent = 1 " What works best is auto-indenting, disable other indenting. " For formatting see the ftplugin. setlocal autoindent nosmartindent nocindent indentexpr= ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/make.vim����������������������������������������������������������������0000664�0000000�0000000�00000006640�13204015742�0017412�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Makefile " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2007-05-07 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetMakeIndent() setlocal indentkeys=!^F,o,O,<:>,=else,=endif setlocal nosmartindent if exists("*GetMakeIndent") finish endif let s:comment_rx = '^\s*#' let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)' let s:continued_rule_rx = '^[^#:]*:\{1,2}\%([^=:]\|$\)' let s:continuation_rx = '\\$' let s:assignment_rx = '^\s*\h\w*\s*[+?]\==\s*\zs.*\\$' let s:folded_assignment_rx = '^\s*\h\w*\s*[+?]\==' " TODO: This needs to be a lot more restrictive in what it matches. let s:just_inserted_rule_rx = '^\s*[^#:]\+:\{1,2}$' let s:conditional_directive_rx = '^ *\%(ifn\=\%(eq\|def\)\|else\)\>' let s:end_conditional_directive_rx = '^\s*\%(else\|endif\)\>' function s:remove_continuation(line) return substitute(a:line, s:continuation_rx, "", "") endfunction function GetMakeIndent() " TODO: Should this perhaps be v:lnum -1? " let prev_lnum = prevnonblank(v:lnum - 1) let prev_lnum = v:lnum - 1 if prev_lnum == 0 return 0 endif let prev_line = getline(prev_lnum) let prev_prev_lnum = prev_lnum - 1 let prev_prev_line = prev_prev_lnum != 0 ? getline(prev_prev_lnum) : "" " TODO: Deal with comments. In comments, continuations aren't interesting. if prev_line =~ s:continuation_rx if prev_prev_line =~ s:continuation_rx return indent(prev_lnum) elseif prev_line =~ s:rule_rx return shiftwidth() elseif prev_line =~ s:assignment_rx call cursor(prev_lnum, 1) if search(s:assignment_rx, 'W') != 0 return virtcol('.') - 1 else " TODO: ? return shiftwidth() endif else " TODO: OK, this might be a continued shell command, so perhaps indent " properly here? Leave this out for now, but in the next release this " should be using indent/sh.vim somehow. "if prev_line =~ '^\t' " s:rule_command_rx " if prev_line =~ '^\s\+[@-]\%(if\)\>' " return indent(prev_lnum) + 2 " endif "endif return indent(prev_lnum) + shiftwidth() endif elseif prev_prev_line =~ s:continuation_rx let folded_line = s:remove_continuation(prev_prev_line) . ' ' . s:remove_continuation(prev_line) let lnum = prev_prev_lnum - 1 let line = getline(lnum) while line =~ s:continuation_rx let folded_line = s:remove_continuation(line) . ' ' . folded_line let lnum -= 1 let line = getline(lnum) endwhile let folded_lnum = lnum + 1 if folded_line =~ s:rule_rx if getline(v:lnum) =~ s:rule_rx return 0 else return &ts endif else " elseif folded_line =~ s:folded_assignment_rx if getline(v:lnum) =~ s:rule_rx return 0 else return indent(folded_lnum) endif " else " " TODO: ? " return indent(prev_lnum) endif elseif prev_line =~ s:rule_rx if getline(v:lnum) =~ s:rule_rx return 0 else return &ts endif elseif prev_line =~ s:conditional_directive_rx return shiftwidth() else let line = getline(v:lnum) if line =~ s:just_inserted_rule_rx return 0 elseif line =~ s:end_conditional_directive_rx return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - shiftwidth() else return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) endif endif endfunction ������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/matlab.vim��������������������������������������������������������������0000664�0000000�0000000�00000003654�13204015742�0017737�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Matlab indent file " Language: Matlab " Maintainer: Christophe Poucet <christophe.poucet@pandora.be> " Last Change: 6 January, 2001 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Some preliminary setting setlocal indentkeys=!,o,O=end,=case,=else,=elseif,=otherwise,=catch setlocal indentexpr=GetMatlabIndent(v:lnum) " Only define the function once. if exists("*GetMatlabIndent") finish endif function GetMatlabIndent(lnum) " Give up if this line is explicitly joined. if getline(a:lnum - 1) =~ '\\$' return -1 endif " Search backwards for the first non-empty line. let plnum = a:lnum - 1 while plnum > 0 && getline(plnum) =~ '^\s*$' let plnum = plnum - 1 endwhile if plnum == 0 " This is the first non-empty line, use zero indent. return 0 endif let curind = indent(plnum) " If the current line is a stop-block statement... if getline(v:lnum) =~ '^\s*\(end\|else\|elseif\|case\|otherwise\|catch\)\>' " See if this line does not follow the line right after an openblock if getline(plnum) =~ '^\s*\(for\|if\|else\|elseif\|case\|while\|switch\|try\|otherwise\|catch\)\>' " See if the user has already dedented elseif indent(v:lnum) > curind - shiftwidth() " If not, recommend one dedent let curind = curind - shiftwidth() else " Otherwise, trust the user return -1 endif " endif " If the previous line opened a block elseif getline(plnum) =~ '^\s*\(for\|if\|else\|elseif\|case\|while\|switch\|try\|otherwise\|catch\)\>' " See if the user has already indented if indent(v:lnum) < curind + shiftwidth() "If not, recommend indent let curind = curind + shiftwidth() else " Otherwise, trust the user return -1 endif endif " If we got to here, it means that the user takes the standardversion, so we return it return curind endfunction " vim:sw=2 ������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/mf.vim������������������������������������������������������������������0000664�0000000�0000000�00000000234�13204015742�0017070�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" METAFONT indent file " Language: METAFONT " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> " Last Change: 2016 Oct 1 runtime! indent/mp.vim ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/mma.vim�����������������������������������������������������������������0000664�0000000�0000000�00000004274�13204015742�0017250�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Mathematica " Author: steve layland <layland@wolfram.com> " Last Change: Sat May 10 18:56:22 CDT 2005 " Source: http://vim.sourceforge.net/scripts/script.php?script_id=1274 " http://members.wolfram.com/layland/vim/indent/mma.vim " " NOTE: " Empty .m files will automatically be presumed to be Matlab files " unless you have the following in your .vimrc: " " let filetype_m="mma" " " Credits: " o steve hacked this out of a random indent file in the Vim 6.1 " distribution that he no longer remembers...sh.vim? Thanks! " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetMmaIndent() setlocal indentkeys+=0[,0],0(,0) setlocal nosi "turn off smart indent so we don't over analyze } blocks if exists("*GetMmaIndent") finish endif function GetMmaIndent() " Hit the start of the file, use zero indent. if v:lnum == 0 return 0 endif " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " use indenting as a base let ind = indent(v:lnum) let lnum = v:lnum " if previous line has an unmatched bracket, or ( indent. " doesn't do multiple parens/blocks/etc... " also, indent only if this line if this line isn't starting a new " block... TODO - fix this with indentkeys? if getline(v:lnum-1) =~ '\\\@<!\%(\[[^\]]*\|([^)]*\|{[^}]*\)$' && getline(v:lnum) !~ '\s\+[\[({]' let ind = ind+shiftwidth() endif " if this line had unmatched closing block, " indent to the matching opening block if getline(v:lnum) =~ '[^[]*]\s*$' " move to the closing bracket call search(']','bW') " and find it's partner's indent let ind = indent(searchpair('\[','',']','bWn')) " same for ( blocks elseif getline(v:lnum) =~ '[^(]*)$' call search(')','bW') let ind = indent(searchpair('(','',')','bWn')) " and finally, close { blocks if si ain't already set elseif getline(v:lnum) =~ '[^{]*}' call search('}','bW') let ind = indent(searchpair('{','','}','bWn')) endif return ind endfunction ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/mp.vim������������������������������������������������������������������0000664�0000000�0000000�00000026071�13204015742�0017111�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" MetaPost indent file " Language: MetaPost " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> " Former Maintainers: Eugene Minkovskii <emin@mccme.ru> " Last Change: 2016 Oct 2, 4:13pm " Version: 0.2 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetMetaPostIndent() setlocal indentkeys+==end,=else,=fi,=fill,0),0] let b:undo_indent = "setl indentkeys< indentexpr<" " Only define the function once. if exists("*GetMetaPostIndent") finish endif let s:keepcpo= &cpo set cpo&vim function GetMetaPostIndent() let ignorecase_save = &ignorecase try let &ignorecase = 0 return GetMetaPostIndentIntern() finally let &ignorecase = ignorecase_save endtry endfunc " Regexps {{{ " Note: the next three variables are made global so that a user may add " further keywords. " " Example: " " Put these in ~/.vim/after/indent/mp.vim " " let g:mp_open_tag .= '\|\<begintest\>' " let g:mp_close_tag .= '\|\<endtest\>' " Expressions starting indented blocks let g:mp_open_tag = '' \ . '\<if\>' \ . '\|\<else\%[if]\>' \ . '\|\<for\%(\|ever\|suffixes\)\>' \ . '\|\<begingroup\>' \ . '\|\<\%(\|var\|primary\|secondary\|tertiary\)def\>' \ . '\|^\s*\<begin\%(fig\|graph\|glyph\|char\|logochar\)\>' \ . '\|[([{]' " Expressions ending indented blocks let g:mp_close_tag = '' \ . '\<fi\>' \ . '\|\<else\%[if]\>' \ . '\|\<end\%(\|for\|group\|def\|fig\|char\|glyph\|graph\)\>' \ . '\|[)\]}]' " Statements that may span multiple lines and are ended by a semicolon. To " keep this list short, statements that are unlikely to be very long or are " not very common (e.g., keywords like `interim` or `showtoken`) are not " included. " " The regex for assignments and equations (the last branch) is tricky, because " it must not match things like `for i :=`, `if a=b`, `def...=`, etc... It is " not perfect, but it works reasonably well. let g:mp_statement = '' \ . '\<\%(\|un\|cut\)draw\>' \ . '\|\<\%(\|un\)fill\%[draw]\>' \ . '\|\<draw\%(dbl\)\=arrow\>' \ . '\|\<clip\>' \ . '\|\<addto\>' \ . '\|\<save\>' \ . '\|\<setbounds\>' \ . '\|\<message\>' \ . '\|\<errmessage\>' \ . '\|\<errhelp\>' \ . '\|\<fontmapline\>' \ . '\|\<pickup\>' \ . '\|\<show\>' \ . '\|\<special\>' \ . '\|\<write\>' \ . '\|\%(^\|;\)\%([^;=]*\%('.g:mp_open_tag.'\)\)\@!.\{-}:\==' " A line ends with zero or more spaces, possibly followed by a comment. let s:eol = '\s*\%($\|%\)' " }}} " Auxiliary functions {{{ " Returns 1 if (0-based) position immediately preceding `pos` in `line` is " inside a string or a comment; returns 0 otherwise. " This is the function that is called more often when indenting, so it is " critical that it is efficient. The method we use is significantly faster " than using syntax attributes, and more general (it does not require " syntax_items). It is also faster than using a single regex matching an even " number of quotes. It helps that MetaPost strings cannot span more than one " line and cannot contain escaped quotes. function! s:CommentOrString(line, pos) let in_string = 0 let q = stridx(a:line, '"') let c = stridx(a:line, '%') while q >= 0 && q < a:pos if c >= 0 && c < q if in_string " Find next percent symbol let c = stridx(a:line, '%', q + 1) else " Inside comment return 1 endif endif let in_string = 1 - in_string let q = stridx(a:line, '"', q + 1) " Find next quote endwhile return in_string || (c >= 0 && c <= a:pos) endfunction " Find the first non-comment non-blank line before the current line. function! s:PrevNonBlankNonComment(lnum) let l:lnum = prevnonblank(a:lnum - 1) while getline(l:lnum) =~# '^\s*%' let l:lnum = prevnonblank(l:lnum - 1) endwhile return l:lnum endfunction " Returns true if the last tag appearing in the line is an open tag; returns " false otherwise. function! s:LastTagIsOpen(line) let o = s:LastValidMatchEnd(a:line, g:mp_open_tag, 0) if o == - 1 | return v:false | endif return s:LastValidMatchEnd(a:line, g:mp_close_tag, o) < 0 endfunction " A simple, efficient and quite effective heuristics is used to test whether " a line should cause the next line to be indented: count the "opening tags" " (if, for, def, ...) in the line, count the "closing tags" (endif, endfor, " ...) in the line, and compute the difference. We call the result the " "weight" of the line. If the weight is positive, then the next line should " most likely be indented. Note that `else` and `elseif` are both opening and " closing tags, so they "cancel out" in almost all cases, the only exception " being a leading `else[if]`, which is counted as an opening tag, but not as " a closing tag (so that, for instance, a line containing a single `else:` " will have weight equal to one, not zero). We do not treat a trailing " `else[if]` in any special way, because lines ending with an open tag are " dealt with separately before this function is called (see " GetMetaPostIndentIntern()). " " Example: " " forsuffixes $=a,b: if x.$ = y.$ : draw else: fill fi " % This line will be indented because |{forsuffixes,if,else}| > |{else,fi}| (3 > 2) " endfor function! s:Weight(line) let [o, i] = [0, s:ValidMatchEnd(a:line, g:mp_open_tag, 0)] while i > 0 let o += 1 let i = s:ValidMatchEnd(a:line, g:mp_open_tag, i) endwhile let [c, i] = [0, matchend(a:line, '^\s*\<else\%[if]\>')] " Skip a leading else[if] let i = s:ValidMatchEnd(a:line, g:mp_close_tag, i) while i > 0 let c += 1 let i = s:ValidMatchEnd(a:line, g:mp_close_tag, i) endwhile return o - c endfunction " Similar to matchend(), but skips strings and comments. " line: a String function! s:ValidMatchEnd(line, pat, start) let i = matchend(a:line, a:pat, a:start) while i > 0 && s:CommentOrString(a:line, i) let i = matchend(a:line, a:pat, i) endwhile return i endfunction " Like s:ValidMatchEnd(), but returns the end position of the last (i.e., " rightmost) match. function! s:LastValidMatchEnd(line, pat, start) let last_found = -1 let i = matchend(a:line, a:pat, a:start) while i > 0 if !s:CommentOrString(a:line, i) let last_found = i endif let i = matchend(a:line, a:pat, i) endwhile return last_found endfunction function! s:DecreaseIndentOnClosingTag(curr_indent) let cur_text = getline(v:lnum) if cur_text =~# '^\s*\%('.g:mp_close_tag.'\)' return max([a:curr_indent - shiftwidth(), 0]) endif return a:curr_indent endfunction " }}} " Main function {{{ " " Note: Every rule of indentation in MetaPost is very subjective. We might get " creative, but things get murky very soon (there are too many corner cases). " So, we provide a means for the user to decide what to do when this script " doesn't get it. We use a simple idea: use '%>', '%<' and '%=' to explicitly " control indentation. The '<' and '>' symbols may be repeated many times " (e.g., '%>>' will cause the next line to be indented twice). " " By using '%>...', '%<...' and '%=', the indentation the user wants is " preserved by commands like gg=G, even if it does not follow the rules of " this script. " " Example: " " def foo = " makepen( " subpath(T-n,t) of r %> " shifted .5down %> " --subpath(t,T) of r shifted .5up -- cycle %<<< " ) " withcolor black " enddef " " The default indentation of the previous example would be: " " def foo = " makepen( " subpath(T-n,t) of r " shifted .5down " --subpath(t,T) of r shifted .5up -- cycle " ) " withcolor black " enddef " " Personally, I prefer the latter, but anyway... function! GetMetaPostIndentIntern() " Do not touch indentation inside verbatimtex/btex.. etex blocks. if synIDattr(synID(v:lnum, 1, 1), "name") =~# '^mpTeXinsert$\|^tex\|^Delimiter' return -1 endif " This is the reference line relative to which the current line is indented " (but see below). let lnum = s:PrevNonBlankNonComment(v:lnum) " At the start of the file use zero indent. if lnum == 0 return 0 endif let prev_text = getline(lnum) " User-defined overrides take precedence over anything else. " See above for an example. let j = match(prev_text, '%[<>=]') if j > 0 let i = strlen(matchstr(prev_text, '%>\+', j)) - 1 if i > 0 return indent(lnum) + i * shiftwidth() endif let i = strlen(matchstr(prev_text, '%<\+', j)) - 1 if i > 0 return max([indent(lnum) - i * shiftwidth(), 0]) endif if match(prev_text, '%=', j) return indent(lnum) endif endif " If the reference line ends with an open tag, indent. " " Example: " " if c: " 0 " else: " 1 " fi if c2: % Note that this line has weight equal to zero. " ... % This line will be indented if s:LastTagIsOpen(prev_text) return s:DecreaseIndentOnClosingTag(indent(lnum) + shiftwidth()) endif " Lines with a positive weight are unbalanced and should likely be indented. " " Example: " " def f = enddef for i = 1 upto 5: if x[i] > 0: 1 else: 2 fi " ... % This line will be indented (because of the unterminated `for`) if s:Weight(prev_text) > 0 return s:DecreaseIndentOnClosingTag(indent(lnum) + shiftwidth()) endif " Unterminated statements cause indentation to kick in. " " Example: " " draw unitsquare " withcolor black; % This line is indented because of `draw`. " x := a + b + c " + d + e; % This line is indented because of `:=`. " let i = s:LastValidMatchEnd(prev_text, g:mp_statement, 0) if i >= 0 " Does the line contain a statement? if s:ValidMatchEnd(prev_text, ';', i) < 0 " Is the statement unterminated? return indent(lnum) + shiftwidth() else return s:DecreaseIndentOnClosingTag(indent(lnum)) endif endif " Deal with the special case of a statement spanning multiple lines. If the " current reference line L ends with a semicolon, search backwards for " another semicolon or a statement keyword. If the latter is found first, " its line is used as the reference line for indenting the current line " instead of L. " " Example: " " if cond: " draw if a: z0 else: z1 fi " shifted S " scaled T; % L " " for i = 1 upto 3: % <-- Current line: this gets the same indent as `draw ...` " " NOTE: we get here only if L does not contain a statement (among those " listed in g:mp_statement). if s:ValidMatchEnd(prev_text, ';'.s:eol, 0) >= 0 " L ends with a semicolon let stm_lnum = s:PrevNonBlankNonComment(lnum) while stm_lnum > 0 let prev_text = getline(stm_lnum) let sc_pos = s:LastValidMatchEnd(prev_text, ';', 0) let stm_pos = s:ValidMatchEnd(prev_text, g:mp_statement, sc_pos) if stm_pos > sc_pos let lnum = stm_lnum break elseif sc_pos > stm_pos break endif let stm_lnum = s:PrevNonBlankNonComment(stm_lnum) endwhile endif return s:DecreaseIndentOnClosingTag(indent(lnum)) endfunction " }}} let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2:fdm=marker �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/objc.vim����������������������������������������������������������������0000664�0000000�0000000�00000003155�13204015742�0017410�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Objective-C " Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com> " Last Change: 2004 May 16 " " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal cindent " Set the function to do the work. setlocal indentexpr=GetObjCIndent() " To make a colon (:) suggest an indentation other than a goto/swich label, setlocal indentkeys-=: setlocal indentkeys+=<:> " Only define the function once. if exists("*GetObjCIndent") finish endif function s:GetWidth(line, regexp) let end = matchend(a:line, a:regexp) let width = 0 let i = 0 while i < end if a:line[i] != "\t" let width = width + 1 else let width = width + &ts - (width % &ts) endif let i = i + 1 endwhile return width endfunction function s:LeadingWhiteSpace(line) let end = strlen(a:line) let width = 0 let i = 0 while i < end let char = a:line[i] if char != " " && char != "\t" break endif if char != "\t" let width = width + 1 else let width = width + &ts - (width % &ts) endif let i = i + 1 endwhile return width endfunction function GetObjCIndent() let theIndent = cindent(v:lnum) let prev_line = getline(v:lnum - 1) let cur_line = getline(v:lnum) if prev_line !~# ":" || cur_line !~# ":" return theIndent endif if prev_line !~# ";" let prev_colon_pos = s:GetWidth(prev_line, ":") let delta = s:GetWidth(cur_line, ":") - s:LeadingWhiteSpace(cur_line) let theIndent = prev_colon_pos - delta endif return theIndent endfunction �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/ocaml.vim���������������������������������������������������������������0000664�0000000�0000000�00000021701�13204015742�0017563�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: OCaml " Maintainers: Jean-Francois Yuen <jfyuen@happycoders.org> " Mike Leary <leary@nwlink.com> " Markus Mottl <markus.mottl@gmail.com> " URL: http://www.ocaml.info/vim/indent/ocaml.vim " Last Change: 2017 Jun 13 " 2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working " 2005 May 09 - Added an option to not indent OCaml-indents specially (MM) " 2013 June - commented textwidth (Marc Weber) " " Marc Weber's comment: This file may contain a lot of (very custom) stuff " which eventually should be moved somewhere else .. " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal expandtab setlocal indentexpr=GetOCamlIndent() setlocal indentkeys+=0=and,0=class,0=constraint,0=done,0=else,0=end,0=exception,0=external,0=if,0=in,0=include,0=inherit,0=initializer,0=let,0=method,0=open,0=then,0=type,0=val,0=with,0;;,0>\],0\|\],0>},0\|,0},0\],0) setlocal nolisp setlocal nosmartindent " At least Marc Weber and Markus Mottl do not like this: " setlocal textwidth=80 " Comment formatting if !exists("no_ocaml_comments") if (has("comments")) setlocal comments=sr:(*,mb:*,ex:*) setlocal fo=cqort endif endif " Only define the function once. if exists("*GetOCamlIndent") finish endif " Define some patterns: let s:beflet = '^\s*\(initializer\|method\|try\)\|\(\<\(begin\|do\|else\|in\|then\|try\)\|->\|<-\|=\|;\|(\)\s*$' let s:letpat = '^\s*\(let\|type\|module\|class\|open\|exception\|val\|include\|external\)\>' let s:letlim = '\(\<\(sig\|struct\)\|;;\)\s*$' let s:lim = '^\s*\(exception\|external\|include\|let\|module\|open\|type\|val\)\>' let s:module = '\<\%(begin\|sig\|struct\|object\)\>' let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object\|object\s*(.*)\)\s*$' let s:type = '^\s*\%(class\|let\|type\)\>.*=' " Skipping pattern, for comments function! s:GetLineWithoutFullComment(lnum) let lnum = prevnonblank(a:lnum - 1) let lline = substitute(getline(lnum), '(\*.*\*)\s*$', '', '') while lline =~ '^\s*$' && lnum > 0 let lnum = prevnonblank(lnum - 1) let lline = substitute(getline(lnum), '(\*.*\*)\s*$', '', '') endwhile return lnum endfunction " Indent for ';;' to match multiple 'let' function! s:GetInd(lnum, pat, lim) let llet = search(a:pat, 'bW') let old = indent(a:lnum) while llet > 0 let old = indent(llet) let nb = s:GetLineWithoutFullComment(llet) if getline(nb) =~ a:lim return old endif let llet = search(a:pat, 'bW') endwhile return old endfunction " Indent pairs function! s:FindPair(pstart, pmid, pend) call search(a:pend, 'bW') return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) endfunction " Indent 'let' function! s:FindLet(pstart, pmid, pend) call search(a:pend, 'bW') return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\<in\\s*$" || getline(prevnonblank(".") - 1) =~ s:beflet')) endfunction function! GetOCamlIndent() " Find a non-commented line above the current line. let lnum = s:GetLineWithoutFullComment(v:lnum) " At the start of the file use zero indent. if lnum == 0 return 0 endif let ind = indent(lnum) let lline = substitute(getline(lnum), '(\*.*\*)\s*$', '', '') " Return double 'shiftwidth' after lines matching: if lline =~ '^\s*|.*->\s*$' return ind + 2 * shiftwidth() endif let line = getline(v:lnum) " Indent if current line begins with 'end': if line =~ '^\s*end\>' return s:FindPair(s:module, '','\<end\>') " Indent if current line begins with 'done' for 'do': elseif line =~ '^\s*done\>' return s:FindPair('\<do\>', '','\<done\>') " Indent if current line begins with '}' or '>}': elseif line =~ '^\s*\(\|>\)}' return s:FindPair('{', '','}') " Indent if current line begins with ']', '|]' or '>]': elseif line =~ '^\s*\(\||\|>\)\]' return s:FindPair('\[', '','\]') " Indent if current line begins with ')': elseif line =~ '^\s*)' return s:FindPair('(', '',')') " Indent if current line begins with 'let': elseif line =~ '^\s*let\>' if lline !~ s:lim . '\|' . s:letlim . '\|' . s:beflet return s:FindLet(s:type, '','\<let\s*$') endif " Indent if current line begins with 'class' or 'type': elseif line =~ '^\s*\(class\|type\)\>' if lline !~ s:lim . '\|\<and\s*$\|' . s:letlim return s:FindLet(s:type, '','\<\(class\|type\)\s*$') endif " Indent for pattern matching: elseif line =~ '^\s*|' if lline !~ '^\s*\(|[^\]]\|\(match\|type\|with\)\>\)\|\<\(function\|parser\|private\|with\)\s*$' call search('|', 'bW') return indent(searchpair('^\s*\(match\|type\)\>\|\<\(function\|parser\|private\|with\)\s*$', '', '^\s*|', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") !~ "^\\s*|.*->"')) endif " Indent if current line begins with ';;': elseif line =~ '^\s*;;' if lline !~ ';;\s*$' return s:GetInd(v:lnum, s:letpat, s:letlim) endif " Indent if current line begins with 'in': elseif line =~ '^\s*in\>' if lline !~ '^\s*\(let\|and\)\>' return s:FindPair('\<let\>', '', '\<in\>') endif " Indent if current line begins with 'else': elseif line =~ '^\s*else\>' if lline !~ '^\s*\(if\|then\)\>' return s:FindPair('\<if\>', '', '\<else\>') endif " Indent if current line begins with 'then': elseif line =~ '^\s*then\>' if lline !~ '^\s*\(if\|else\)\>' return s:FindPair('\<if\>', '', '\<then\>') endif " Indent if current line begins with 'and': elseif line =~ '^\s*and\>' if lline !~ '^\s*\(and\|let\|type\)\>\|\<end\s*$' return ind - shiftwidth() endif " Indent if current line begins with 'with': elseif line =~ '^\s*with\>' if lline !~ '^\s*\(match\|try\)\>' return s:FindPair('\<\%(match\|try\)\>', '','\<with\>') endif " Indent if current line begins with 'exception', 'external', 'include' or " 'open': elseif line =~ '^\s*\(exception\|external\|include\|open\)\>' if lline !~ s:lim . '\|' . s:letlim call search(line) return indent(search('^\s*\(\(exception\|external\|include\|open\|type\)\>\|val\>.*:\)', 'bW')) endif " Indent if current line begins with 'val': elseif line =~ '^\s*val\>' if lline !~ '^\s*\(exception\|external\|include\|open\)\>\|' . s:obj . '\|' . s:letlim return indent(search('^\s*\(\(exception\|include\|initializer\|method\|open\|type\|val\)\>\|external\>.*:\)', 'bW')) endif " Indent if current line begins with 'constraint', 'inherit', 'initializer' " or 'method': elseif line =~ '^\s*\(constraint\|inherit\|initializer\|method\)\>' if lline !~ s:obj return indent(search('\<\(object\|object\s*(.*)\)\s*$', 'bW')) + shiftwidth() endif endif " Add a 'shiftwidth' after lines ending with: if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|parser\|private\|sig\|struct\|then\|try\)\|\<object\s*(.*)\)\s*$' let ind = ind + shiftwidth() " Back to normal indent after lines ending with ';;': elseif lline =~ ';;\s*$' && lline !~ '^\s*;;' let ind = s:GetInd(v:lnum, s:letpat, s:letlim) " Back to normal indent after lines ending with 'end': elseif lline =~ '\<end\s*$' let ind = s:FindPair(s:module, '','\<end\>') " Back to normal indent after lines ending with 'in': elseif lline =~ '\<in\s*$' && lline !~ '^\s*in\>' let ind = s:FindPair('\<let\>', '', '\<in\>') " Back to normal indent after lines ending with 'done': elseif lline =~ '\<done\s*$' let ind = s:FindPair('\<do\>', '','\<done\>') " Back to normal indent after lines ending with '}' or '>}': elseif lline =~ '\(\|>\)}\s*$' let ind = s:FindPair('{', '','}') " Back to normal indent after lines ending with ']', '|]' or '>]': elseif lline =~ '\(\||\|>\)\]\s*$' let ind = s:FindPair('\[', '','\]') " Back to normal indent after comments: elseif lline =~ '\*)\s*$' call search('\*)', 'bW') let ind = indent(searchpair('(\*', '', '\*)', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"')) " Back to normal indent after lines ending with ')': elseif lline =~ ')\s*$' let ind = s:FindPair('(', '',')') " If this is a multiline comment then align '*': elseif lline =~ '^\s*(\*' && line =~ '^\s*\*' let ind = ind + 1 else " Don't change indentation of this line " for new lines (indent==0) use indentation of previous line " This is for preventing removing indentation of these args: " let f x = " let y = x + 1 in " Printf.printf " "o" << here " "oeuth" << don't touch indentation let i = indent(v:lnum) return i == 0 ? ind : i endif " Subtract a 'shiftwidth' after lines matching 'match ... with parser': if lline =~ '\<match\>.*\<with\>\s*\<parser\s*$' let ind = ind - shiftwidth() endif return ind endfunction " vim:sw=2 ���������������������������������������������������������������neovim-0.2.2/runtime/indent/occam.vim���������������������������������������������������������������0000664�0000000�0000000�00000011035�13204015742�0017551�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: occam " Maintainer: Mario Schweigler <ms44@kent.ac.uk> " Last Change: 23 April 2003 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 "{{{ Settings " Set the occam indent function setlocal indentexpr=GetOccamIndent() " Indent after new line and after initial colon setlocal indentkeys=o,O,0=: "}}} " Only define the function once if exists("*GetOccamIndent") finish endif let s:keepcpo= &cpo set cpo&vim "{{{ Indent definitions " Define carriage return indent let s:FirstLevelIndent = '^\C\s*\(IF\|ALT\|PRI\s\+ALT\|PAR\|SEQ\|PRI\s\+PAR\|WHILE\|VALOF\|CLAIM\|FORKING\)\>\|\(--.*\)\@<!\(\<PROC\>\|??\|\<CASE\>\s*\(--.*\)\=\_$\)' let s:FirstLevelNonColonEndIndent = '^\C\s*PROTOCOL\>\|\(--.*\)\@<!\<\(\(CHAN\|DATA\)\s\+TYPE\|FUNCTION\)\>' let s:SecondLevelIndent = '^\C\s*\(IF\|ALT\|PRI\s\+ALT\)\>\|\(--.*\)\@<!?\s*\<CASE\>\s*\(--.*\)\=\_$' let s:SecondLevelNonColonEndIndent = '\(--.*\)\@<!\<\(CHAN\|DATA\)\s\+TYPE\>' " Define colon indent let s:ColonIndent = '\(--.*\)\@<!\<PROC\>' let s:ColonNonColonEndIndent = '^\C\s*PROTOCOL\>\|\(--.*\)\@<!\<\(\(CHAN\|DATA\)\s\+TYPE\|FUNCTION\)\>' let s:ColonEnd = '\(--.*\)\@<!:\s*\(--.*\)\=$' let s:ColonStart = '^\s*:\s*\(--.*\)\=$' " Define comment let s:CommentLine = '^\s*--' "}}} "{{{ function GetOccamIndent() " Auxiliary function to get the correct indent for a line of occam code function GetOccamIndent() " Ensure magic is on let save_magic = &magic setlocal magic " Get reference line number let linenum = prevnonblank(v:lnum - 1) while linenum > 0 && getline(linenum) =~ s:CommentLine let linenum = prevnonblank(linenum - 1) endwhile " Get current indent let curindent = indent(linenum) " Get current line let line = getline(linenum) " Get previous line number let prevlinenum = prevnonblank(linenum - 1) while prevlinenum > 0 && getline(prevlinenum) =~ s:CommentLine let prevlinenum = prevnonblank(prevlinenum - 1) endwhile " Get previous line let prevline = getline(prevlinenum) " Colon indent if getline(v:lnum) =~ s:ColonStart let found = 0 while found < 1 if line =~ s:ColonStart let found = found - 1 elseif line =~ s:ColonIndent || (line =~ s:ColonNonColonEndIndent && line !~ s:ColonEnd) let found = found + 1 endif if found < 1 let linenum = prevnonblank(linenum - 1) if linenum > 0 let line = getline(linenum) else let found = 1 endif endif endwhile if linenum > 0 let curindent = indent(linenum) else let colonline = getline(v:lnum) let tabstr = '' while strlen(tabstr) < &tabstop let tabstr = ' ' . tabstr endwhile let colonline = substitute(colonline, '\t', tabstr, 'g') let curindent = match(colonline, ':') endif " Restore magic if !save_magic|setlocal nomagic|endif return curindent endif if getline(v:lnum) =~ '^\s*:' let colonline = getline(v:lnum) let tabstr = '' while strlen(tabstr) < &tabstop let tabstr = ' ' . tabstr endwhile let colonline = substitute(colonline, '\t', tabstr, 'g') let curindent = match(colonline, ':') " Restore magic if !save_magic|setlocal nomagic|endif return curindent endif " Carriage return indenat if line =~ s:FirstLevelIndent || (line =~ s:FirstLevelNonColonEndIndent && line !~ s:ColonEnd) \ || (line !~ s:ColonStart && (prevline =~ s:SecondLevelIndent \ || (prevline =~ s:SecondLevelNonColonEndIndent && prevline !~ s:ColonEnd))) let curindent = curindent + shiftwidth() " Restore magic if !save_magic|setlocal nomagic|endif return curindent endif " Commented line if getline(prevnonblank(v:lnum - 1)) =~ s:CommentLine " Restore magic if !save_magic|setlocal nomagic|endif return indent(prevnonblank(v:lnum - 1)) endif " Look for previous second level IF / ALT / PRI ALT let found = 0 while !found if indent(prevlinenum) == curindent - shiftwidth() let found = 1 endif if !found let prevlinenum = prevnonblank(prevlinenum - 1) while prevlinenum > 0 && getline(prevlinenum) =~ s:CommentLine let prevlinenum = prevnonblank(prevlinenum - 1) endwhile if prevlinenum == 0 let found = 1 endif endif endwhile if prevlinenum > 0 if getline(prevlinenum) =~ s:SecondLevelIndent let curindent = curindent + shiftwidth() endif endif " Restore magic if !save_magic|setlocal nomagic|endif return curindent endfunction "}}} let &cpo = s:keepcpo unlet s:keepcpo ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/pascal.vim��������������������������������������������������������������0000664�0000000�0000000�00000013030�13204015742�0017727�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Pascal " Maintainer: Neil Carter <n.carter@swansea.ac.uk> " Created: 2004 Jul 13 " Last Change: 2017 Jun 13 " " This is version 2.0, a complete rewrite. " " For further documentation, see http://psy.swansea.ac.uk/staff/carter/vim/ if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetPascalIndent(v:lnum) setlocal indentkeys& setlocal indentkeys+==end;,==const,==type,==var,==begin,==repeat,==until,==for setlocal indentkeys+==program,==function,==procedure,==object,==private setlocal indentkeys+==record,==if,==else,==case if exists("*GetPascalIndent") finish endif function! s:GetPrevNonCommentLineNum( line_num ) " Skip lines starting with a comment let SKIP_LINES = '^\s*\(\((\*\)\|\(\*\ \)\|\(\*)\)\|{\|}\)' let nline = a:line_num while nline > 0 let nline = prevnonblank(nline-1) if getline(nline) !~? SKIP_LINES break endif endwhile return nline endfunction function! s:PurifyCode( line_num ) " Strip any trailing comments and whitespace let pureline = 'TODO' return pureline endfunction function! GetPascalIndent( line_num ) " Line 0 always goes at column 0 if a:line_num == 0 return 0 endif let this_codeline = getline( a:line_num ) " SAME INDENT " Middle of a three-part comment if this_codeline =~ '^\s*\*' return indent( a:line_num - 1) endif " COLUMN 1 ALWAYS " Last line of the program if this_codeline =~ '^\s*end\.' return 0 endif " Compiler directives, allowing "(*" and "{" "if this_codeline =~ '^\s*\({\|(\*\)$\(IFDEF\|IFNDEF\|ELSE\|ENDIF\)' if this_codeline =~ '^\s*\({\|(\*\)\$' return 0 endif " section headers if this_codeline =~ '^\s*\(program\|procedure\|function\|type\)\>' return 0 endif " Subroutine separators, lines ending with "const" or "var" if this_codeline =~ '^\s*\((\*\ _\+\ \*)\|\(const\|var\)\)$' return 0 endif " OTHERWISE, WE NEED TO LOOK FURTHER BACK... let prev_codeline_num = s:GetPrevNonCommentLineNum( a:line_num ) let prev_codeline = getline( prev_codeline_num ) let indnt = indent( prev_codeline_num ) " INCREASE INDENT " If the PREVIOUS LINE ended in these items, always indent if prev_codeline =~ '\<\(type\|const\|var\)$' return indnt + shiftwidth() endif if prev_codeline =~ '\<repeat$' if this_codeline !~ '^\s*until\>' return indnt + shiftwidth() else return indnt endif endif if prev_codeline =~ '\<\(begin\|record\)$' if this_codeline !~ '^\s*end\>' return indnt + shiftwidth() else return indnt endif endif " If the PREVIOUS LINE ended with these items, indent if not " followed by "begin" if prev_codeline =~ '\<\(\|else\|then\|do\)$' || prev_codeline =~ ':$' if this_codeline !~ '^\s*begin\>' return indnt + shiftwidth() else " If it does start with "begin" then keep the same indent "return indnt + shiftwidth() return indnt endif endif " Inside a parameter list (i.e. a "(" without a ")"). ???? Considers " only the line before the current one. TODO: Get it working for " parameter lists longer than two lines. if prev_codeline =~ '([^)]\+$' return indnt + shiftwidth() endif " DECREASE INDENT " Lines starting with "else", but not following line ending with " "end". if this_codeline =~ '^\s*else\>' && prev_codeline !~ '\<end$' return indnt - shiftwidth() endif " Lines after a single-statement branch/loop. " Two lines before ended in "then", "else", or "do" " Previous line didn't end in "begin" let prev2_codeline_num = s:GetPrevNonCommentLineNum( prev_codeline_num ) let prev2_codeline = getline( prev2_codeline_num ) if prev2_codeline =~ '\<\(then\|else\|do\)$' && prev_codeline !~ '\<begin$' " If the next code line after a single statement branch/loop " starts with "end", "except" or "finally", we need an " additional unindentation. if this_codeline =~ '^\s*\(end;\|except\|finally\|\)$' " Note that we don't return from here. return indnt - 2 * shiftwidth() endif return indnt - shiftwidth() endif " Lines starting with "until" or "end". This rule must be overridden " by the one for "end" after a single-statement branch/loop. In " other words that rule should come before this one. if this_codeline =~ '^\s*\(end\|until\)\>' return indnt - shiftwidth() endif " MISCELLANEOUS THINGS TO CATCH " Most "begin"s will have been handled by now. Any remaining " "begin"s on their own line should go in column 1. if this_codeline =~ '^\s*begin$' return 0 endif " ____________________________________________________________________ " Object/Borland Pascal/Delphi Extensions " " Note that extended-pascal is handled here, unless it is simpler to " handle them in the standard-pascal section above. " COLUMN 1 ALWAYS " section headers at start of line. if this_codeline =~ '^\s*\(interface\|implementation\|uses\|unit\)\>' return 0 endif " INDENT ONCE " If the PREVIOUS LINE ended in these items, always indent. if prev_codeline =~ '^\s*\(unit\|uses\|try\|except\|finally\|private\|protected\|public\|published\)$' return indnt + shiftwidth() endif " ???? Indent "procedure" and "functions" if they appear within an " class/object definition. But that means overriding standard-pascal " rule where these words always go in column 1. " UNINDENT ONCE if this_codeline =~ '^\s*\(except\|finally\)$' return indnt - shiftwidth() endif if this_codeline =~ '^\s*\(private\|protected\|public\|published\)$' return indnt - shiftwidth() endif " ____________________________________________________________________ " If nothing changed, return same indent. return indnt endfunction ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/perl.vim����������������������������������������������������������������0000664�0000000�0000000�00000013416�13204015742�0017436�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Perl 5 " Maintainer: vim-perl <vim-perl@googlegroups.com> " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2017-01-04 " Suggestions and improvements by : " Aaron J. Sherman (use syntax for hints) " Artem Chuprina (play nice with folding) " TODO things that are not or not properly indented (yet) : " - Continued statements " print "foo", " "bar"; " print "foo" " if bar(); " - Multiline regular expressions (m//x) " (The following probably needs modifying the perl syntax file) " - qw() lists " - Heredocs with terminators that don't match \I\i* " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Is syntax highlighting active ? let b:indent_use_syntax = has("syntax") setlocal indentexpr=GetPerlIndent() setlocal indentkeys+=0=,0),0],0=or,0=and if !b:indent_use_syntax setlocal indentkeys+=0=EO endif let s:cpo_save = &cpo set cpo-=C function! GetPerlIndent() " Get the line to be indented let cline = getline(v:lnum) " Indent POD markers to column 0 if cline =~ '^\s*=\L\@!' return 0 endif " Get current syntax item at the line's first char let csynid = '' if b:indent_use_syntax let csynid = synIDattr(synID(v:lnum,1,0),"name") endif " Don't reindent POD and heredocs if csynid == "perlPOD" || csynid == "perlHereDoc" || csynid =~ "^pod" return indent(v:lnum) endif " Indent end-of-heredocs markers to column 0 if b:indent_use_syntax " Assumes that an end-of-heredoc marker matches \I\i* to avoid " confusion with other types of strings if csynid == "perlStringStartEnd" && cline =~ '^\I\i*$' return 0 endif else " Without syntax hints, assume that end-of-heredocs markers begin with EO if cline =~ '^\s*EO' return 0 endif endif " Now get the indent of the previous perl line. " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif let line = getline(lnum) let ind = indent(lnum) " Skip heredocs, POD, and comments on 1st column if b:indent_use_syntax let skippin = 2 while skippin let synid = synIDattr(synID(lnum,1,0),"name") if (synid == "perlStringStartEnd" && line =~ '^\I\i*$') \ || (skippin != 2 && synid == "perlPOD") \ || (skippin != 2 && synid == "perlHereDoc") \ || synid == "perlComment" \ || synid =~ "^pod" let lnum = prevnonblank(lnum - 1) if lnum == 0 return 0 endif let line = getline(lnum) let ind = indent(lnum) let skippin = 1 else let skippin = 0 endif endwhile else if line =~ "^EO" let lnum = search("<<[\"']\\=EO", "bW") let line = getline(lnum) let ind = indent(lnum) endif endif " Indent blocks enclosed by {}, (), or [] if b:indent_use_syntax " Find a real opening brace " NOTE: Unlike Perl character classes, we do NOT need to escape the " closing brackets with a backslash. Doing so just puts a backslash " in the character class and causes sorrow. Instead, put the closing " bracket as the first character in the class. let braceclass = '[][(){}]' let bracepos = match(line, braceclass, matchend(line, '^\s*[])}]')) while bracepos != -1 let synid = synIDattr(synID(lnum, bracepos + 1, 0), "name") " If the brace is highlighted in one of those groups, indent it. " 'perlHereDoc' is here only to handle the case '&foo(<<EOF)'. if synid == "" \ || synid == "perlMatchStartEnd" \ || synid == "perlHereDoc" \ || synid == "perlBraces" \ || synid == "perlStatementIndirObj" \ || synid =~ "^perlFiledescStatement" \ || synid =~ '^perl\(Sub\|Block\|Package\)Fold' let brace = strpart(line, bracepos, 1) if brace == '(' || brace == '{' || brace == '[' let ind = ind + shiftwidth() else let ind = ind - shiftwidth() endif endif let bracepos = match(line, braceclass, bracepos + 1) endwhile let bracepos = matchend(cline, '^\s*[])}]') if bracepos != -1 let synid = synIDattr(synID(v:lnum, bracepos, 0), "name") if synid == "" \ || synid == "perlMatchStartEnd" \ || synid == "perlBraces" \ || synid == "perlStatementIndirObj" \ || synid =~ '^perl\(Sub\|Block\|Package\)Fold' let ind = ind - shiftwidth() endif endif else if line =~ '[{[(]\s*\(#[^])}]*\)\=$' let ind = ind + shiftwidth() endif if cline =~ '^\s*[])}]' let ind = ind - shiftwidth() endif endif " Indent lines that begin with 'or' or 'and' if cline =~ '^\s*\(or\|and\)\>' if line !~ '^\s*\(or\|and\)\>' let ind = ind + shiftwidth() endif elseif line =~ '^\s*\(or\|and\)\>' let ind = ind - shiftwidth() endif return ind endfunction let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8:sts=4:sw=4:expandtab:ft=vim ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/perl6.vim���������������������������������������������������������������0000664�0000000�0000000�00000006724�13204015742�0017530�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Perl 6 " Maintainer: vim-perl <vim-perl@googlegroups.com> " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2017 Jun 13 " Contributors: Andy Lester <andy@petdance.com> " Hinrik Örn Sigurðsson <hinrik.sig@gmail.com> " " Adapted from indent/perl.vim by Rafael Garcia-Suarez <rgarciasuarez@free.fr> " Suggestions and improvements by : " Aaron J. Sherman (use syntax for hints) " Artem Chuprina (play nice with folding) " TODO: " This file still relies on stuff from the Perl 5 syntax file, which Perl 6 " does not use. " " Things that are not or not properly indented (yet) : " - Continued statements " print "foo", " "bar"; " print "foo" " if bar(); " - Multiline regular expressions (m//x) " (The following probably needs modifying the perl syntax file) " - qw() lists " - Heredocs with terminators that don't match \I\i* " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Is syntax highlighting active ? let b:indent_use_syntax = has("syntax") setlocal indentexpr=GetPerl6Indent() " we reset it first because the Perl 5 indent file might have been loaded due " to a .pl/pm file extension, and indent files don't clean up afterwards setlocal indentkeys& setlocal indentkeys+=0=,0),0],0>,0»,0=or,0=and if !b:indent_use_syntax setlocal indentkeys+=0=EO endif let s:cpo_save = &cpo set cpo-=C function! GetPerl6Indent() " Get the line to be indented let cline = getline(v:lnum) " Indent POD markers to column 0 if cline =~ '^\s*=\L\@!' return 0 endif " Don't reindent coments on first column if cline =~ '^#' return 0 endif " Get current syntax item at the line's first char let csynid = '' if b:indent_use_syntax let csynid = synIDattr(synID(v:lnum,1,0),"name") endif " Don't reindent POD and heredocs if csynid =~ "^p6Pod" return indent(v:lnum) endif " Now get the indent of the previous perl line. " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif let line = getline(lnum) let ind = indent(lnum) " Skip heredocs, POD, and comments on 1st column if b:indent_use_syntax let skippin = 2 while skippin let synid = synIDattr(synID(lnum,1,0),"name") if (synid =~ "^p6Pod" || synid =~ "p6Comment") let lnum = prevnonblank(lnum - 1) if lnum == 0 return 0 endif let line = getline(lnum) let ind = indent(lnum) let skippin = 1 else let skippin = 0 endif endwhile endif if line =~ '[<«\[{(]\s*\(#[^)}\]»>]*\)\=$' let ind = ind + shiftwidth() endif if cline =~ '^\s*[)}\]»>]' let ind = ind - shiftwidth() endif " Indent lines that begin with 'or' or 'and' if cline =~ '^\s*\(or\|and\)\>' if line !~ '^\s*\(or\|and\)\>' let ind = ind + shiftwidth() endif elseif line =~ '^\s*\(or\|and\)\>' let ind = ind - shiftwidth() endif return ind endfunction let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8:sts=4:sw=4:expandtab:ft=vim ��������������������������������������������neovim-0.2.2/runtime/indent/php.vim�����������������������������������������������������������������0000664�0000000�0000000�00000053637�13204015742�0017274�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: PHP " Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr> " URL: http://www.2072productions.com/vim/indent/php.vim " Home: https://github.com/2072/PHP-Indenting-for-VIm " Last Change: 2017 Jun 13 " Version: 1.62 " " " Type :help php-indent for available options " " A fully commented version of this file is available on github " " " If you find a bug, please open a ticket on github.org " ( https://github.com/2072/PHP-Indenting-for-VIm/issues ) with an example of " code that breaks the algorithm. " " NOTE: This script must be used with PHP syntax ON and with the php syntax " script by Lutz Eymers (http://www.isp.de/data/php.vim ) or with the " script by Peter Hodge (http://www.vim.org/scripts/script.php?script_id=1571 ) " the later is bunbdled by default with Vim 7. " " " In the case you have syntax errors in your script such as HereDoc end " identifiers not at col 1 you'll have to indent your file 2 times (This " script will automatically put HereDoc end identifiers at col 1 if " they are followed by a ';'). " " NOTE: If you are editing files in Unix file format and that (by accident) " there are '\r' before new lines, this script won't be able to proceed " correctly and will make many mistakes because it won't be able to match " '\s*$' correctly. " So you have to remove those useless characters first with a command like: " " :%s /\r$//g " " or simply 'let' the option PHP_removeCRwhenUnix to 1 and the script will " silently remove them when VIM load this script (at each bufread). if exists("b:did_indent") finish endif let b:did_indent = 1 let g:php_sync_method = 0 if exists("PHP_default_indenting") let b:PHP_default_indenting = PHP_default_indenting * shiftwidth() else let b:PHP_default_indenting = 0 endif if exists("PHP_outdentSLComments") let b:PHP_outdentSLComments = PHP_outdentSLComments * shiftwidth() else let b:PHP_outdentSLComments = 0 endif if exists("PHP_BracesAtCodeLevel") let b:PHP_BracesAtCodeLevel = PHP_BracesAtCodeLevel else let b:PHP_BracesAtCodeLevel = 0 endif if exists("PHP_autoformatcomment") let b:PHP_autoformatcomment = PHP_autoformatcomment else let b:PHP_autoformatcomment = 1 endif if exists("PHP_outdentphpescape") let b:PHP_outdentphpescape = PHP_outdentphpescape else let b:PHP_outdentphpescape = 1 endif if exists("PHP_vintage_case_default_indent") && PHP_vintage_case_default_indent let b:PHP_vintage_case_default_indent = 1 else let b:PHP_vintage_case_default_indent = 0 endif let b:PHP_lastindented = 0 let b:PHP_indentbeforelast = 0 let b:PHP_indentinghuge = 0 let b:PHP_CurrentIndentLevel = b:PHP_default_indenting let b:PHP_LastIndentedWasComment = 0 let b:PHP_InsideMultilineComment = 0 let b:InPHPcode = 0 let b:InPHPcode_checked = 0 let b:InPHPcode_and_script = 0 let b:InPHPcode_tofind = "" let b:PHP_oldchangetick = b:changedtick let b:UserIsTypingComment = 0 let b:optionsset = 0 setlocal nosmartindent setlocal noautoindent setlocal nocindent setlocal nolisp setlocal indentexpr=GetPhpIndent() setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e,*<Return>,=?>,=<?,=*/ let s:searchpairflags = 'bWr' if &fileformat == "unix" && exists("PHP_removeCRwhenUnix") && PHP_removeCRwhenUnix silent! %s/\r$//g endif if exists("*GetPhpIndent") call ResetPhpOptions() finish endif let s:PHP_validVariable = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)' let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)' let s:functionDecl = '\<function\>\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*' let s:endline = '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$' let s:unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.s:endline let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<\s*[''"]\=\a\w*[''"]\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)' let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!' let s:structureHead = '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline . '\|\<new\s\+class\>' let s:escapeDebugStops = 0 function! DebugPrintReturn(scriptLine) if ! s:escapeDebugStops echo "debug:" . a:scriptLine let c = getchar() if c == "\<Del>" let s:escapeDebugStops = 1 end endif endfunction function! GetLastRealCodeLNum(startline) " {{{ let lnum = a:startline if b:GetLastRealCodeLNum_ADD && b:GetLastRealCodeLNum_ADD == lnum + 1 let lnum = b:GetLastRealCodeLNum_ADD endif while lnum > 1 let lnum = prevnonblank(lnum) let lastline = getline(lnum) if b:InPHPcode_and_script && lastline =~ '?>\s*$' let lnum = lnum - 1 elseif lastline =~ '^\s*?>.*<?\%(php\)\=\s*$' let lnum = lnum - 1 elseif lastline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)' let lnum = lnum - 1 elseif lastline =~ '\*/\s*$' call cursor(lnum, 1) if lastline !~ '^\*/' call search('\*/', 'W') endif let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()') let lastline = getline(lnum) if lastline =~ '^\s*/\*' let lnum = lnum - 1 else break endif elseif lastline =~? '\%(//\s*\|?>.*\)\@<!<?\%(php\)\=\s*$\|^\s*<script\>' while lastline !~ '\(<?.*\)\@<!?>' && lnum > 1 let lnum = lnum - 1 let lastline = getline(lnum) endwhile if lastline =~ '^\s*?>' let lnum = lnum - 1 else break endif elseif lastline =~? '^\a\w*;\=$' && lastline !~? s:notPhpHereDoc let tofind=substitute( lastline, '\(\a\w*\);\=', '<<<\\s*[''"]\\=\1[''"]\\=$', '') while getline(lnum) !~? tofind && lnum > 1 let lnum = lnum - 1 endwhile elseif lastline =~ '^[^''"`]*[''"`][;,]'.s:endline let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$\\|^[^\1]\\+[=([]\\s*[\1]', '') let trylnum = lnum while getline(trylnum) !~? tofind && trylnum > 1 let trylnum = trylnum - 1 endwhile if trylnum == 1 break else if lastline =~ ';'.s:endline while getline(trylnum) !~? s:terminated && getline(trylnum) !~? '{'.s:endline && trylnum > 1 let trylnum = prevnonblank(trylnum - 1) endwhile if trylnum == 1 break end end let lnum = trylnum end else break endif endwhile if lnum==1 && getline(lnum) !~ '<?' let lnum=0 endif if b:InPHPcode_and_script && 1 > b:InPHPcode let b:InPHPcode_and_script = 0 endif return lnum endfunction " }}} function! Skippmatch2() let line = getline(".") if line =~ "\\([\"']\\).*/\\*.*\\1" || line =~ '\%(//\|#\).*/\*' return 1 else return 0 endif endfun function! Skippmatch() " {{{ let synname = synIDattr(synID(line("."), col("."), 0), "name") if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# '^php\%(Doc\)\?Comment' && b:UserIsTypingComment return 0 else return 1 endif endfun " }}} function! FindOpenBracket(lnum, blockStarter) " {{{ call cursor(a:lnum, 1) let line = searchpair('{', '', '}', 'bW', 'Skippmatch()') if a:blockStarter == 1 while line > 1 let linec = getline(line) if linec =~ s:terminated || linec =~ s:structureHead break endif let line = GetLastRealCodeLNum(line - 1) endwhile endif return line endfun " }}} let s:blockChars = {'{':1, '[': 1, '(': 1, ')':-1, ']':-1, '}':-1} function! BalanceDirection (str) let balance = 0 for c in split(a:str, '\zs') if has_key(s:blockChars, c) let balance += s:blockChars[c] endif endfor return balance endfun function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{ if getline(a:lnum) =~# '^\s*}\s*else\%(if\)\=\>' let beforeelse = a:lnum else let beforeelse = GetLastRealCodeLNum(a:lnum - 1) endif if !s:level let s:iftoskip = 0 endif if getline(beforeelse) =~# '^\s*\%(}\s*\)\=else\%(\s*if\)\@!\>' let s:iftoskip = s:iftoskip + 1 endif if getline(beforeelse) =~ '^\s*}' let beforeelse = FindOpenBracket(beforeelse, 0) if getline(beforeelse) =~ '^\s*{' let beforeelse = GetLastRealCodeLNum(beforeelse - 1) endif endif if !s:iftoskip && a:StopAfterFirstPrevElse && getline(beforeelse) =~# '^\s*\%([}]\s*\)\=else\%(if\)\=\>' return beforeelse endif if getline(beforeelse) !~# '^\s*if\>' && beforeelse>1 || s:iftoskip && beforeelse>1 if s:iftoskip && getline(beforeelse) =~# '^\s*if\>' let s:iftoskip = s:iftoskip - 1 endif let s:level = s:level + 1 let beforeelse = FindTheIfOfAnElse(beforeelse, a:StopAfterFirstPrevElse) endif return beforeelse endfunction " }}} let s:defaultORcase = '^\s*\%(default\|case\).*:' function! FindTheSwitchIndent (lnum) " {{{ let test = GetLastRealCodeLNum(a:lnum - 1) if test <= 1 return indent(1) - shiftwidth() * b:PHP_vintage_case_default_indent end while getline(test) =~ '^\s*}' && test > 1 let test = GetLastRealCodeLNum(FindOpenBracket(test, 0) - 1) if getline(test) =~ '^\s*switch\>' let test = GetLastRealCodeLNum(test - 1) endif endwhile if getline(test) =~# '^\s*switch\>' return indent(test) elseif getline(test) =~# s:defaultORcase return indent(test) - shiftwidth() * b:PHP_vintage_case_default_indent else return FindTheSwitchIndent(test) endif endfunction "}}} let s:SynPHPMatchGroups = {'phpParent':1, 'Delimiter':1, 'Define':1, 'Storageclass':1, 'StorageClass':1, 'Structure':1, 'Exception':1} function! IslinePHP (lnum, tofind) " {{{ let cline = getline(a:lnum) if a:tofind=="" let tofind = "^\\s*[\"'`]*\\s*\\zs\\S" else let tofind = a:tofind endif let tofind = tofind . '\c' let coltotest = match (cline, tofind) + 1 let synname = synIDattr(synID(a:lnum, coltotest, 0), "name") if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick' if cline !~ '^\s*[''"`]' return "SpecStringEntrails" else return synname end end if get(s:SynPHPMatchGroups, synname) || synname =~ '^php' || synname =~? '^javaScript' return synname else return "" endif endfunction " }}} let s:autoresetoptions = 0 if ! s:autoresetoptions let s:autoresetoptions = 1 endif function! ResetPhpOptions() if ! b:optionsset && &filetype =~ "php" if b:PHP_autoformatcomment setlocal comments=s1:/*,mb:*,ex:*/,://,:# setlocal formatoptions-=t setlocal formatoptions+=q setlocal formatoptions+=r setlocal formatoptions+=o setlocal formatoptions+=c setlocal formatoptions+=b endif let b:optionsset = 1 endif endfunc call ResetPhpOptions() function! GetPhpIndent() let b:GetLastRealCodeLNum_ADD = 0 let UserIsEditing=0 if b:PHP_oldchangetick != b:changedtick let b:PHP_oldchangetick = b:changedtick let UserIsEditing=1 endif if b:PHP_default_indenting let b:PHP_default_indenting = g:PHP_default_indenting * shiftwidth() endif let cline = getline(v:lnum) if !b:PHP_indentinghuge && b:PHP_lastindented > b:PHP_indentbeforelast if b:PHP_indentbeforelast let b:PHP_indentinghuge = 1 endif let b:PHP_indentbeforelast = b:PHP_lastindented endif if b:InPHPcode_checked && prevnonblank(v:lnum - 1) != b:PHP_lastindented if b:PHP_indentinghuge let b:PHP_indentinghuge = 0 let b:PHP_CurrentIndentLevel = b:PHP_default_indenting endif let real_PHP_lastindented = v:lnum let b:PHP_LastIndentedWasComment=0 let b:PHP_InsideMultilineComment=0 let b:PHP_indentbeforelast = 0 let b:InPHPcode = 0 let b:InPHPcode_checked = 0 let b:InPHPcode_and_script = 0 let b:InPHPcode_tofind = "" elseif v:lnum > b:PHP_lastindented let real_PHP_lastindented = b:PHP_lastindented else let real_PHP_lastindented = v:lnum endif let b:PHP_lastindented = v:lnum if !b:InPHPcode_checked " {{{ One time check let b:InPHPcode_checked = 1 let b:UserIsTypingComment = 0 let synname = "" if cline !~ '<?.*?>' let synname = IslinePHP (prevnonblank(v:lnum), "") endif if synname!="" if synname == "SpecStringEntrails" let b:InPHPcode = -1 " thumb down let b:InPHPcode_tofind = "" elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter" let b:InPHPcode = 1 let b:InPHPcode_tofind = "" if synname =~# '^php\%(Doc\)\?Comment' let b:UserIsTypingComment = 1 let b:InPHPcode_checked = 0 endif if synname =~? '^javaScript' let b:InPHPcode_and_script = 1 endif else let b:InPHPcode = 0 let lnum = v:lnum - 1 while getline(lnum) !~? '<<<\s*[''"]\=\a\w*[''"]\=$' && lnum > 1 let lnum = lnum - 1 endwhile let b:InPHPcode_tofind = substitute( getline(lnum), '^.*<<<\s*[''"]\=\(\a\w*\)[''"]\=$', '^\\s*\1;\\=$', '') endif else let b:InPHPcode = 0 let b:InPHPcode_tofind = s:PHP_startindenttag endif endif "!b:InPHPcode_checked }}} " Test if we are indenting PHP code {{{ let lnum = prevnonblank(v:lnum - 1) let last_line = getline(lnum) let endline= s:endline if b:InPHPcode_tofind!="" if cline =~? b:InPHPcode_tofind let b:InPHPcode_tofind = "" let b:UserIsTypingComment = 0 if b:InPHPcode == -1 let b:InPHPcode = 1 return -1 end let b:InPHPcode = 1 if cline =~ '\*/' call cursor(v:lnum, 1) if cline !~ '^\*/' call search('\*/', 'W') endif let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()') let b:PHP_CurrentIndentLevel = b:PHP_default_indenting let b:PHP_LastIndentedWasComment = 0 if cline =~ '^\s*\*/' return indent(lnum) + 1 else return indent(lnum) endif elseif cline =~? '<script\>' let b:InPHPcode_and_script = 1 let b:GetLastRealCodeLNum_ADD = v:lnum endif endif endif if 1 == b:InPHPcode if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~"Delimiter" if cline !~? s:PHP_startindenttag let b:InPHPcode = 0 let b:InPHPcode_tofind = s:PHP_startindenttag elseif cline =~? '<script\>' let b:InPHPcode_and_script = 1 endif elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before let b:InPHPcode = -1 let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '') elseif last_line =~? '<<<\s*[''"]\=\a\w*[''"]\=$' let b:InPHPcode = 0 let b:InPHPcode_tofind = substitute( last_line, '^.*<<<\s*[''"]\=\(\a\w*\)[''"]\=$', '^\\s*\1;\\=$', '') elseif !UserIsEditing && cline =~ '^\s*/\*\%(.*\*/\)\@!' && getline(v:lnum + 1) !~ '^\s*\*' let b:InPHPcode = 0 let b:InPHPcode_tofind = '\*/' elseif cline =~? '^\s*</script>' let b:InPHPcode = 0 let b:InPHPcode_tofind = s:PHP_startindenttag endif endif " }}} if 1 > b:InPHPcode && !b:InPHPcode_and_script return -1 endif " Indent successive // or # comment the same way the first is {{{ let addSpecial = 0 if cline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)' let addSpecial = b:PHP_outdentSLComments if b:PHP_LastIndentedWasComment == 1 return indent(real_PHP_lastindented) endif let b:PHP_LastIndentedWasComment = 1 else let b:PHP_LastIndentedWasComment = 0 endif " }}} " Indent multiline /* comments correctly {{{ if b:PHP_InsideMultilineComment || b:UserIsTypingComment if cline =~ '^\s*\*\%(\/\)\@!' if last_line =~ '^\s*/\*' return indent(lnum) + 1 else return indent(lnum) endif else let b:PHP_InsideMultilineComment = 0 endif endif if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*\%(.*\*/\)\@!' if getline(v:lnum + 1) !~ '^\s*\*' return -1 endif let b:PHP_InsideMultilineComment = 1 endif " }}} " Things always indented at col 1 (PHP delimiter: <?, ?>, Heredoc end) {{{ if cline =~# '^\s*<?' && cline !~ '?>' && b:PHP_outdentphpescape return 0 endif if cline =~ '^\s*?>' && cline !~# '<?' && b:PHP_outdentphpescape return 0 endif if cline =~? '^\s*\a\w*;$\|^\a\w*$\|^\s*[''"`][;,]' && cline !~? s:notPhpHereDoc return 0 endif " }}} let s:level = 0 let lnum = GetLastRealCodeLNum(v:lnum - 1) let last_line = getline(lnum) let ind = indent(lnum) if ind==0 && b:PHP_default_indenting let ind = b:PHP_default_indenting endif if lnum == 0 return b:PHP_default_indenting + addSpecial endif if cline =~ '^\s*}\%(}}\)\@!' let ind = indent(FindOpenBracket(v:lnum, 1)) let b:PHP_CurrentIndentLevel = b:PHP_default_indenting return ind endif if cline =~ '^\s*\*/' call cursor(v:lnum, 1) if cline !~ '^\*/' call search('\*/', 'W') endif let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()') let b:PHP_CurrentIndentLevel = b:PHP_default_indenting if cline =~ '^\s*\*/' return indent(lnum) + 1 else return indent(lnum) endif endif if last_line =~ '[;}]'.endline && last_line !~ '^[)\]]' && last_line !~# s:defaultORcase if ind==b:PHP_default_indenting return b:PHP_default_indenting + addSpecial elseif b:PHP_indentinghuge && ind==b:PHP_CurrentIndentLevel && cline !~# '^\s*\%(else\|\%(case\|default\).*:\|[})];\=\)' && last_line !~# '^\s*\%(\%(}\s*\)\=else\)' && getline(GetLastRealCodeLNum(lnum - 1))=~';'.endline return b:PHP_CurrentIndentLevel + addSpecial endif endif let LastLineClosed = 0 let terminated = s:terminated let unstated = s:unstated if ind != b:PHP_default_indenting && cline =~# '^\s*else\%(if\)\=\>' let b:PHP_CurrentIndentLevel = b:PHP_default_indenting return indent(FindTheIfOfAnElse(v:lnum, 1)) elseif cline =~# s:defaultORcase return FindTheSwitchIndent(v:lnum) + shiftwidth() * b:PHP_vintage_case_default_indent elseif cline =~ '^\s*)\=\s*{' let previous_line = last_line let last_line_num = lnum while last_line_num > 1 if previous_line =~ terminated || previous_line =~ s:structureHead let ind = indent(last_line_num) if b:PHP_BracesAtCodeLevel let ind = ind + shiftwidth() endif return ind endif let last_line_num = GetLastRealCodeLNum(last_line_num - 1) let previous_line = getline(last_line_num) endwhile elseif last_line =~# unstated && cline !~ '^\s*);\='.endline let ind = ind + shiftwidth() " we indent one level further when the preceding line is not stated return ind + addSpecial elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated let previous_line = last_line let last_line_num = lnum let LastLineClosed = 1 let isSingleLineBlock = 0 while 1 if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX call cursor(last_line_num, 1) if previous_line !~ '^}' call search('}\|;\s*}'.endline, 'W') end let oldLastLine = last_line_num let last_line_num = searchpair('{', '', '}', 'bW', 'Skippmatch()') if getline(last_line_num) =~ '^\s*{' let last_line_num = GetLastRealCodeLNum(last_line_num - 1) elseif oldLastLine == last_line_num let isSingleLineBlock = 1 continue endif let previous_line = getline(last_line_num) continue else let isSingleLineBlock = 0 if getline(last_line_num) =~# '^\s*else\%(if\)\=\>' let last_line_num = FindTheIfOfAnElse(last_line_num, 0) continue endif let last_match = last_line_num let one_ahead_indent = indent(last_line_num) let last_line_num = GetLastRealCodeLNum(last_line_num - 1) let two_ahead_indent = indent(last_line_num) let after_previous_line = previous_line let previous_line = getline(last_line_num) if previous_line =~# s:defaultORcase.'\|{'.endline break endif if after_previous_line=~# '^\s*'.s:blockstart.'.*)'.endline && previous_line =~# '[;}]'.endline break endif if one_ahead_indent == two_ahead_indent || last_line_num < 1 if previous_line =~# '\%(;\|^\s*}\)'.endline || last_line_num < 1 break endif endif endif endwhile if indent(last_match) != ind let ind = indent(last_match) let b:PHP_CurrentIndentLevel = b:PHP_default_indenting return ind + addSpecial endif endif if (last_line !~ '^\s*}\%(}}\)\@!') let plinnum = GetLastRealCodeLNum(lnum - 1) else let plinnum = GetLastRealCodeLNum(FindOpenBracket(lnum, 1) - 1) endif let AntepenultimateLine = getline(plinnum) let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','') if ind == b:PHP_default_indenting if last_line =~ terminated && last_line !~# s:defaultORcase let LastLineClosed = 1 endif endif if !LastLineClosed if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline && BalanceDirection(last_line) > 0 let dontIndent = 0 if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*[)\]]\+\s*{'.endline && last_line !~ s:structureHead let dontIndent = 1 endif if !dontIndent && (!b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{') let ind = ind + shiftwidth() endif if b:PHP_BracesAtCodeLevel || b:PHP_vintage_case_default_indent == 1 let b:PHP_CurrentIndentLevel = ind return ind + addSpecial endif elseif last_line =~ '\S\+\s*),'.endline && BalanceDirection(last_line) < 0 call cursor(lnum, 1) call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()') if openedparent != lnum let ind = indent(openedparent) endif elseif last_line =~ '^\s*'.s:blockstart let ind = ind + shiftwidth() elseif AntepenultimateLine =~ '{'.endline && AntepenultimateLine !~? '^\s*use\>' || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase let ind = ind + shiftwidth() endif endif if cline =~ '^\s*[)\]];\=' let ind = ind - shiftwidth() endif let b:PHP_CurrentIndentLevel = ind return ind + addSpecial endfunction �������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/postscr.vim�������������������������������������������������������������0000664�0000000�0000000�00000003161�13204015742�0020165�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" PostScript indent file " Language: PostScript " Maintainer: Mike Williams <mrw@netcomuk.co.uk> " Last Change: 2nd July 2001 " " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=PostscrIndentGet(v:lnum) setlocal indentkeys+=0],0=>>,0=%%,0=end,0=restore,0=grestore indentkeys-=:,0#,e " Catch multiple instantiations if exists("*PostscrIndentGet") finish endif function! PostscrIndentGet(lnum) " Find a non-empty non-comment line above the current line. " Note: ignores DSC comments as well! let lnum = a:lnum - 1 while lnum != 0 let lnum = prevnonblank(lnum) if getline(lnum) !~ '^\s*%.*$' break endif let lnum = lnum - 1 endwhile " Hit the start of the file, use user indent. if lnum == 0 return -1 endif " Start with the indent of the previous line let ind = indent(lnum) let pline = getline(lnum) " Indent for dicts, arrays, and saves with possible trailing comment if pline =~ '\(begin\|<<\|g\=save\|{\|[\)\s*\(%.*\)\=$' let ind = ind + shiftwidth() endif " Remove indent for popped dicts, and restores. if pline =~ '\(end\|g\=restore\)\s*$' let ind = ind - shiftwidth() " Else handle immediate dedents of dicts, restores, and arrays. elseif getline(a:lnum) =~ '\(end\|>>\|g\=restore\|}\|]\)' let ind = ind - shiftwidth() " Else handle DSC comments - always start of line. elseif getline(a:lnum) =~ '^\s*%%' let ind = 0 endif " For now catch excessive left indents if they occur. if ind < 0 let ind = -1 endif return ind endfunction " vim:sw=2 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/pov.vim�����������������������������������������������������������������0000664�0000000�0000000�00000005146�13204015742�0017301�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: PoV-Ray Scene Description Language " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> " Last Change: 2017 Jun 13 " URI: http://trific.ath.cx/Ftp/vim/indent/pov.vim " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Some preliminary settings. setlocal nolisp " Make sure lisp indenting doesn't supersede us. setlocal indentexpr=GetPoVRayIndent() setlocal indentkeys+==else,=end,0] " Only define the function once. if exists("*GetPoVRayIndent") finish endif " Counts matches of a regexp <rexp> in line number <line>. " Doesn't count matches inside strings and comments (as defined by current " syntax). function! s:MatchCount(line, rexp) let str = getline(a:line) let i = 0 let n = 0 while i >= 0 let i = matchend(str, a:rexp, i) if i >= 0 && synIDattr(synID(a:line, i, 0), "name") !~? "string\|comment" let n = n + 1 endif endwhile return n endfunction " The main function. Returns indent amount. function GetPoVRayIndent() " If we are inside a comment (may be nested in obscure ways), give up if synIDattr(synID(v:lnum, indent(v:lnum)+1, 0), "name") =~? "string\|comment" return -1 endif " Search backwards for the frist non-empty, non-comment line. let plnum = prevnonblank(v:lnum - 1) let plind = indent(plnum) while plnum > 0 && synIDattr(synID(plnum, plind+1, 0), "name") =~? "comment" let plnum = prevnonblank(plnum - 1) let plind = indent(plnum) endwhile " Start indenting from zero if plnum == 0 return 0 endif " Analyse previous nonempty line. let chg = 0 let chg = chg + s:MatchCount(plnum, '[[{(]') let chg = chg + s:MatchCount(plnum, '#\s*\%(if\|ifdef\|ifndef\|switch\|while\|macro\|else\)\>') let chg = chg - s:MatchCount(plnum, '#\s*end\>') let chg = chg - s:MatchCount(plnum, '[]})]') " Dirty hack for people writing #if and #else on the same line. let chg = chg - s:MatchCount(plnum, '#\s*\%(if\|ifdef\|ifndef\|switch\)\>.*#\s*else\>') " When chg > 0, then we opened groups and we should indent more, but when " chg < 0, we closed groups and this already affected the previous line, " so we should not dedent. And when everything else fails, scream. let chg = chg > 0 ? chg : 0 " Analyse current line " FIXME: If we have to dedent, we should try to find the indentation of the " opening line. let cur = s:MatchCount(v:lnum, '^\s*\%(#\s*\%(end\|else\)\>\|[]})]\)') if cur > 0 let final = plind + (chg - cur) * shiftwidth() else let final = plind + chg * shiftwidth() endif return final < 0 ? 0 : final endfunction ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/prolog.vim��������������������������������������������������������������0000664�0000000�0000000�00000002722�13204015742�0017774�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" vim: set sw=4 sts=4: " Maintainer : Gergely Kontra <kgergely@mcl.hu> " Revised on : 2002.02.18. 23:34:05 " Language : Prolog " TODO: " checking with respect to syntax highlighting " ignoring multiline comments " detecting multiline strings " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetPrologIndent() setlocal indentkeys-=:,0# setlocal indentkeys+=0%,-,0;,>,0) " Only define the function once. "if exists("*GetPrologIndent") " finish "endif function! GetPrologIndent() " Find a non-blank line above the current line. let pnum = prevnonblank(v:lnum - 1) " Hit the start of the file, use zero indent. if pnum == 0 return 0 endif let line = getline(v:lnum) let pline = getline(pnum) let ind = indent(pnum) " Previous line was comment -> use previous line's indent if pline =~ '^\s*%' retu ind endif " Check for clause head on previous line if pline =~ ':-\s*\(%.*\)\?$' let ind = ind + shiftwidth() " Check for end of clause on previous line elseif pline =~ '\.\s*\(%.*\)\?$' let ind = ind - shiftwidth() endif " Check for opening conditional on previous line if pline =~ '^\s*\([(;]\|->\)' let ind = ind + shiftwidth() endif " Check for closing an unclosed paren, or middle ; or -> if line =~ '^\s*\([);]\|->\)' let ind = ind - shiftwidth() endif return ind endfunction ����������������������������������������������neovim-0.2.2/runtime/indent/pyrex.vim���������������������������������������������������������������0000664�0000000�0000000�00000000506�13204015742�0017637�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Pyrex " Maintainer: Marco Barisione <marco.bari@people.it> " URL: http://marcobari.altervista.org/pyrex_vim.html " Last Change: 2005 Jun 24 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Use Python formatting rules runtime! indent/python.vim ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/python.vim��������������������������������������������������������������0000664�0000000�0000000�00000013160�13204015742�0020011�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Python " Maintainer: Bram Moolenaar <Bram@vim.org> " Original Author: David Bustos <bustos@caltech.edu> " Last Change: 2013 Jul 9 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Some preliminary settings setlocal nolisp " Make sure lisp indenting doesn't supersede us setlocal autoindent " indentexpr isn't much help otherwise setlocal indentexpr=GetPythonIndent(v:lnum) setlocal indentkeys+=<:>,=elif,=except " Only define the function once. if exists("*GetPythonIndent") finish endif let s:keepcpo= &cpo set cpo&vim " Come here when loading the script the first time. let s:maxoff = 50 " maximum number of lines to look backwards for () function GetPythonIndent(lnum) " If this line is explicitly joined: If the previous line was also joined, " line it up with that one, otherwise add two 'shiftwidth' if getline(a:lnum - 1) =~ '\\$' if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$' return indent(a:lnum - 1) endif return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2)) endif " If the start of the line is in a string don't change the indent. if has('syntax_items') \ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$" return -1 endif " Search backwards for the previous non-empty line. let plnum = prevnonblank(v:lnum - 1) if plnum == 0 " This is the first non-empty line, use zero indent. return 0 endif " If the previous line is inside parenthesis, use the indent of the starting " line. " Trick: use the non-existing "dummy" variable to break out of the loop when " going too far back. call cursor(plnum, 1) let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" \ . " =~ '\\(Comment\\|Todo\\|String\\)$'") if parlnum > 0 let plindent = indent(parlnum) let plnumstart = parlnum else let plindent = indent(plnum) let plnumstart = plnum endif " When inside parenthesis: If at the first line below the parenthesis add " two 'shiftwidth', otherwise same as previous line. " i = (a " + b " + c) call cursor(a:lnum, 1) let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" \ . " =~ '\\(Comment\\|Todo\\|String\\)$'") if p > 0 if p == plnum " When the start is inside parenthesis, only indent one 'shiftwidth'. let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" \ . " =~ '\\(Comment\\|Todo\\|String\\)$'") if pp > 0 return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth()) endif return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2)) endif if plnumstart == p return indent(plnum) endif return plindent endif " Get the line and remove a trailing comment. " Use syntax highlighting attributes when possible. let pline = getline(plnum) let pline_len = strlen(pline) if has('syntax_items') " If the last character in the line is a comment, do a binary search for " the start of the comment. synID() is slow, a linear search would take " too long on a long line. if synIDattr(synID(plnum, pline_len, 1), "name") =~ "\\(Comment\\|Todo\\)$" let min = 1 let max = pline_len while min < max let col = (min + max) / 2 if synIDattr(synID(plnum, col, 1), "name") =~ "\\(Comment\\|Todo\\)$" let max = col else let min = col + 1 endif endwhile let pline = strpart(pline, 0, min - 1) endif else let col = 0 while col < pline_len if pline[col] == '#' let pline = strpart(pline, 0, col) break endif let col = col + 1 endwhile endif " If the previous line ended with a colon, indent this line if pline =~ ':\s*$' return plindent + shiftwidth() endif " If the previous line was a stop-execution statement... if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>' " See if the user has already dedented if indent(a:lnum) > indent(plnum) - shiftwidth() " If not, recommend one dedent return indent(plnum) - shiftwidth() endif " Otherwise, trust the user return -1 endif " If the current line begins with a keyword that lines up with "try" if getline(a:lnum) =~ '^\s*\(except\|finally\)\>' let lnum = a:lnum - 1 while lnum >= 1 if getline(lnum) =~ '^\s*\(try\|except\)\>' let ind = indent(lnum) if ind >= indent(a:lnum) return -1 " indent is already less than this endif return ind " line up with previous try or except endif let lnum = lnum - 1 endwhile return -1 " no matching "try"! endif " If the current line begins with a header keyword, dedent if getline(a:lnum) =~ '^\s*\(elif\|else\)\>' " Unless the previous line was a one-liner if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>' return plindent endif " Or the user has already dedented if indent(a:lnum) <= plindent - shiftwidth() return -1 endif return plindent - shiftwidth() endif " When after a () construct we probably want to go back to the start line. " a = (b " + c) " here if parlnum > 0 return plindent endif return -1 endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/r.vim�������������������������������������������������������������������0000664�0000000�0000000�00000033121�13204015742�0016730�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: R " Author: Jakson Alves de Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Thu Feb 18, 2016 06:32AM " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentkeys=0{,0},:,!^F,o,O,e setlocal indentexpr=GetRIndent() " Only define the function once. if exists("*GetRIndent") finish endif " Options to make the indentation more similar to Emacs/ESS: if !exists("g:r_indent_align_args") let g:r_indent_align_args = 1 endif if !exists("g:r_indent_ess_comments") let g:r_indent_ess_comments = 0 endif if !exists("g:r_indent_comment_column") let g:r_indent_comment_column = 40 endif if ! exists("g:r_indent_ess_compatible") let g:r_indent_ess_compatible = 0 endif if ! exists("g:r_indent_op_pattern") let g:r_indent_op_pattern = '\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\)\s*$' endif function s:RDelete_quotes(line) let i = 0 let j = 0 let line1 = "" let llen = strlen(a:line) while i < llen if a:line[i] == '"' let i += 1 let line1 = line1 . 's' while !(a:line[i] == '"' && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen let i += 1 endwhile if a:line[i] == '"' let i += 1 endif else if a:line[i] == "'" let i += 1 let line1 = line1 . 's' while !(a:line[i] == "'" && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen let i += 1 endwhile if a:line[i] == "'" let i += 1 endif else if a:line[i] == "`" let i += 1 let line1 = line1 . 's' while a:line[i] != "`" && i < llen let i += 1 endwhile if a:line[i] == "`" let i += 1 endif endif endif endif if i == llen break endif let line1 = line1 . a:line[i] let j += 1 let i += 1 endwhile return line1 endfunction " Convert foo(bar()) int foo() function s:RDelete_parens(line) if s:Get_paren_balance(a:line, "(", ")") != 0 return a:line endif let i = 0 let j = 0 let line1 = "" let llen = strlen(a:line) while i < llen let line1 = line1 . a:line[i] if a:line[i] == '(' let nop = 1 while nop > 0 && i < llen let i += 1 if a:line[i] == ')' let nop -= 1 else if a:line[i] == '(' let nop += 1 endif endif endwhile let line1 = line1 . a:line[i] endif let i += 1 endwhile return line1 endfunction function! s:Get_paren_balance(line, o, c) let line2 = substitute(a:line, a:o, "", "g") let openp = strlen(a:line) - strlen(line2) let line3 = substitute(line2, a:c, "", "g") let closep = strlen(line2) - strlen(line3) return openp - closep endfunction function! s:Get_matching_brace(linenr, o, c, delbrace) let line = SanitizeRLine(getline(a:linenr)) if a:delbrace == 1 let line = substitute(line, '{$', "", "") endif let pb = s:Get_paren_balance(line, a:o, a:c) let i = a:linenr while pb != 0 && i > 1 let i -= 1 let pb += s:Get_paren_balance(SanitizeRLine(getline(i)), a:o, a:c) endwhile return i endfunction " This function is buggy because there 'if's without 'else' " It must be rewritten relying more on indentation function! s:Get_matching_if(linenr, delif) let line = SanitizeRLine(getline(a:linenr)) if a:delif let line = substitute(line, "if", "", "g") endif let elsenr = 0 let i = a:linenr let ifhere = 0 while i > 0 let line2 = substitute(line, '\<else\>', "xxx", "g") let elsenr += strlen(line) - strlen(line2) if line =~ '.*\s*if\s*()' || line =~ '.*\s*if\s*()' let elsenr -= 1 if elsenr == 0 let ifhere = i break endif endif let i -= 1 let line = SanitizeRLine(getline(i)) endwhile if ifhere return ifhere else return a:linenr endif endfunction function! s:Get_last_paren_idx(line, o, c, pb) let blc = a:pb let line = substitute(a:line, '\t', s:curtabstop, "g") let theidx = -1 let llen = strlen(line) let idx = 0 while idx < llen if line[idx] == a:o let blc -= 1 if blc == 0 let theidx = idx endif else if line[idx] == a:c let blc += 1 endif endif let idx += 1 endwhile return theidx + 1 endfunction " Get previous relevant line. Search back until getting a line that isn't " comment or blank function s:Get_prev_line(lineno) let lnum = a:lineno - 1 let data = getline( lnum ) while lnum > 0 && (data =~ '^\s*#' || data =~ '^\s*$') let lnum = lnum - 1 let data = getline( lnum ) endwhile return lnum endfunction " This function is also used by r-plugin/common_global.vim " Delete from '#' to the end of the line, unless the '#' is inside a string. function SanitizeRLine(line) let newline = s:RDelete_quotes(a:line) let newline = s:RDelete_parens(newline) let newline = substitute(newline, '#.*', "", "") let newline = substitute(newline, '\s*$', "", "") if &filetype == "rhelp" && newline =~ '^\\method{.*}{.*}(.*' let newline = substitute(newline, '^\\method{\(.*\)}{.*}', '\1', "") endif return newline endfunction function GetRIndent() let clnum = line(".") " current line let cline = getline(clnum) if cline =~ '^\s*#' if g:r_indent_ess_comments == 1 if cline =~ '^\s*###' return 0 endif if cline !~ '^\s*##' return g:r_indent_comment_column endif endif endif let cline = SanitizeRLine(cline) if cline =~ '^\s*}' || cline =~ '^\s*}\s*)$' let indline = s:Get_matching_brace(clnum, '{', '}', 1) if indline > 0 && indline != clnum let iline = SanitizeRLine(getline(indline)) if s:Get_paren_balance(iline, "(", ")") == 0 || iline =~ '(\s*{$' return indent(indline) else let indline = s:Get_matching_brace(indline, '(', ')', 1) return indent(indline) endif endif endif " Find the first non blank line above the current line let lnum = s:Get_prev_line(clnum) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif let line = SanitizeRLine(getline(lnum)) if &filetype == "rhelp" if cline =~ '^\\dontshow{' || cline =~ '^\\dontrun{' || cline =~ '^\\donttest{' || cline =~ '^\\testonly{' return 0 endif if line =~ '^\\examples{' || line =~ '^\\usage{' || line =~ '^\\dontshow{' || line =~ '^\\dontrun{' || line =~ '^\\donttest{' || line =~ '^\\testonly{' return 0 endif endif if &filetype == "rnoweb" && line =~ "^<<.*>>=" return 0 endif if cline =~ '^\s*{' && s:Get_paren_balance(cline, '{', '}') > 0 if g:r_indent_ess_compatible && line =~ ')$' let nlnum = lnum let nline = line while s:Get_paren_balance(nline, '(', ')') < 0 let nlnum = s:Get_prev_line(nlnum) let nline = SanitizeRLine(getline(nlnum)) . nline endwhile if nline =~ '^\s*function\s*(' && indent(nlnum) == shiftwidth() return 0 endif endif if s:Get_paren_balance(line, "(", ")") == 0 return indent(lnum) endif endif " line is an incomplete command: if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\<else$' || line =~ '<-$' || line =~ '->$' return indent(lnum) + shiftwidth() endif " Deal with () and [] let pb = s:Get_paren_balance(line, '(', ')') if line =~ '^\s*{$' || line =~ '(\s*{' || (pb == 0 && (line =~ '{$' || line =~ '(\s*{$')) return indent(lnum) + shiftwidth() endif let s:curtabstop = repeat(' ', &tabstop) if g:r_indent_align_args == 1 if pb > 0 && line =~ '{$' return s:Get_last_paren_idx(line, '(', ')', pb) + shiftwidth() endif let bb = s:Get_paren_balance(line, '[', ']') if pb > 0 if &filetype == "rhelp" let ind = s:Get_last_paren_idx(line, '(', ')', pb) else let ind = s:Get_last_paren_idx(getline(lnum), '(', ')', pb) endif return ind endif if pb < 0 && line =~ '.*[,&|\-\*+<>]$' let lnum = s:Get_prev_line(lnum) while pb < 1 && lnum > 0 let line = SanitizeRLine(getline(lnum)) let line = substitute(line, '\t', s:curtabstop, "g") let ind = strlen(line) while ind > 0 if line[ind] == ')' let pb -= 1 else if line[ind] == '(' let pb += 1 endif endif if pb == 1 return ind + 1 endif let ind -= 1 endwhile let lnum -= 1 endwhile return 0 endif if bb > 0 let ind = s:Get_last_paren_idx(getline(lnum), '[', ']', bb) return ind endif endif let post_block = 0 if line =~ '}$' && s:Get_paren_balance(line, '{', '}') < 0 let lnum = s:Get_matching_brace(lnum, '{', '}', 0) let line = SanitizeRLine(getline(lnum)) if lnum > 0 && line =~ '^\s*{' let lnum = s:Get_prev_line(lnum) let line = SanitizeRLine(getline(lnum)) endif let pb = s:Get_paren_balance(line, '(', ')') let post_block = 1 endif " Indent after operator pattern let olnum = s:Get_prev_line(lnum) let oline = getline(olnum) if olnum > 0 if line =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0 if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0 return indent(lnum) else return indent(lnum) + shiftwidth() endif else if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0 return indent(lnum) - shiftwidth() endif endif endif let post_fun = 0 if pb < 0 && line !~ ')\s*[,&|\-\*+<>]$' let post_fun = 1 while pb < 0 && lnum > 0 let lnum -= 1 let linepiece = SanitizeRLine(getline(lnum)) let pb += s:Get_paren_balance(linepiece, "(", ")") let line = linepiece . line endwhile if line =~ '{$' && post_block == 0 return indent(lnum) + shiftwidth() endif " Now we can do some tests again if cline =~ '^\s*{' return indent(lnum) endif if post_block == 0 let newl = SanitizeRLine(line) if newl =~ '\<\(if\|while\|for\|function\)\s*()$' || newl =~ '\<else$' || newl =~ '<-$' return indent(lnum) + shiftwidth() endif endif endif if cline =~ '^\s*else' if line =~ '<-\s*if\s*()' return indent(lnum) + shiftwidth() else if line =~ '\<if\s*()' return indent(lnum) else return indent(lnum) - shiftwidth() endif endif endif let bb = s:Get_paren_balance(line, '[', ']') if bb < 0 && line =~ '.*]' while bb < 0 && lnum > 0 let lnum -= 1 let linepiece = SanitizeRLine(getline(lnum)) let bb += s:Get_paren_balance(linepiece, "[", "]") let line = linepiece . line endwhile let line = s:RDelete_parens(line) endif let plnum = s:Get_prev_line(lnum) let ppost_else = 0 if plnum > 0 let pline = SanitizeRLine(getline(plnum)) let ppost_block = 0 if pline =~ '}$' let ppost_block = 1 let plnum = s:Get_matching_brace(plnum, '{', '}', 0) let pline = SanitizeRLine(getline(plnum)) if pline =~ '^\s*{$' && plnum > 0 let plnum = s:Get_prev_line(plnum) let pline = SanitizeRLine(getline(plnum)) endif endif if pline =~ 'else$' let ppost_else = 1 let plnum = s:Get_matching_if(plnum, 0) let pline = SanitizeRLine(getline(plnum)) endif if pline =~ '^\s*else\s*if\s*(' let pplnum = s:Get_prev_line(plnum) let ppline = SanitizeRLine(getline(pplnum)) while ppline =~ '^\s*else\s*if\s*(' || ppline =~ '^\s*if\s*()\s*\S$' let plnum = pplnum let pline = ppline let pplnum = s:Get_prev_line(plnum) let ppline = SanitizeRLine(getline(pplnum)) endwhile while ppline =~ '\<\(if\|while\|for\|function\)\s*()$' || ppline =~ '\<else$' || ppline =~ '<-$' let plnum = pplnum let pline = ppline let pplnum = s:Get_prev_line(plnum) let ppline = SanitizeRLine(getline(pplnum)) endwhile endif let ppb = s:Get_paren_balance(pline, '(', ')') if ppb < 0 && (pline =~ ')\s*{$' || pline =~ ')$') while ppb < 0 && plnum > 0 let plnum -= 1 let linepiece = SanitizeRLine(getline(plnum)) let ppb += s:Get_paren_balance(linepiece, "(", ")") let pline = linepiece . pline endwhile let pline = s:RDelete_parens(pline) endif endif let ind = indent(lnum) if g:r_indent_align_args == 0 && pb != 0 let ind += pb * shiftwidth() return ind endif if g:r_indent_align_args == 0 && bb != 0 let ind += bb * shiftwidth() return ind endif if plnum > 0 let pind = indent(plnum) else let pind = 0 endif if ind == pind || (ind == (pind + shiftwidth()) && pline =~ '{$' && ppost_else == 0) return ind endif let pline = getline(plnum) let pbb = s:Get_paren_balance(pline, '[', ']') while pind < ind && plnum > 0 && ppb == 0 && pbb == 0 let ind = pind let plnum = s:Get_prev_line(plnum) let pline = getline(plnum) let ppb = s:Get_paren_balance(pline, '(', ')') let pbb = s:Get_paren_balance(pline, '[', ']') while pline =~ '^\s*else' let plnum = s:Get_matching_if(plnum, 1) let pline = getline(plnum) let ppb = s:Get_paren_balance(pline, '(', ')') let pbb = s:Get_paren_balance(pline, '[', ']') endwhile let pind = indent(plnum) if ind == (pind + shiftwidth()) && pline =~ '{$' return ind endif endwhile return ind endfunction " vim: sw=2 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/readline.vim������������������������������������������������������������0000664�0000000�0000000�00000001307�13204015742�0020253�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: readline configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetReadlineIndent() setlocal indentkeys=!^F,o,O,=$else,=$endif setlocal nosmartindent if exists("*GetReadlineIndent") finish endif function GetReadlineIndent() let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif let ind = indent(lnum) if getline(lnum) =~ '^\s*$\(if\|else\)\>' let ind = ind + shiftwidth() endif if getline(v:lnum) =~ '^\s*$\(else\|endif\)\>' let ind = ind - shiftwidth() endif return ind endfunction �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/rhelp.vim���������������������������������������������������������������0000664�0000000�0000000�00000005430�13204015742�0017603�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: R Documentation (Help), *.Rd " Author: Jakson Alves de Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Tue Apr 07, 2015 04:38PM " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif runtime indent/r.vim let s:RIndent = function(substitute(&indentexpr, "()", "", "")) let b:did_indent = 1 setlocal noautoindent setlocal nocindent setlocal nosmartindent setlocal nolisp setlocal indentkeys=0{,0},:,!^F,o,O,e setlocal indentexpr=GetCorrectRHelpIndent() " Only define the functions once. if exists("*GetRHelpIndent") finish endif function s:SanitizeRHelpLine(line) let newline = substitute(a:line, '\\\\', "x", "g") let newline = substitute(newline, '\\{', "x", "g") let newline = substitute(newline, '\\}', "x", "g") let newline = substitute(newline, '\\%', "x", "g") let newline = substitute(newline, '%.*', "", "") let newline = substitute(newline, '\s*$', "", "") return newline endfunction function GetRHelpIndent() let clnum = line(".") " current line if clnum == 1 return 0 endif let cline = getline(clnum) if cline =~ '^\s*}\s*$' let i = clnum let bb = -1 while bb != 0 && i > 1 let i -= 1 let line = s:SanitizeRHelpLine(getline(i)) let line2 = substitute(line, "{", "", "g") let openb = strlen(line) - strlen(line2) let line3 = substitute(line2, "}", "", "g") let closeb = strlen(line2) - strlen(line3) let bb += openb - closeb endwhile return indent(i) endif if cline =~ '^\s*#ifdef\>' || cline =~ '^\s*#endif\>' return 0 endif let lnum = clnum - 1 let line = getline(lnum) if line =~ '^\s*#ifdef\>' || line =~ '^\s*#endif\>' let lnum -= 1 let line = getline(lnum) endif while lnum > 1 && (line =~ '^\s*$' || line =~ '^#ifdef' || line =~ '^#endif') let lnum -= 1 let line = getline(lnum) endwhile if lnum == 1 return 0 endif let line = s:SanitizeRHelpLine(line) let line2 = substitute(line, "{", "", "g") let openb = strlen(line) - strlen(line2) let line3 = substitute(line2, "}", "", "g") let closeb = strlen(line2) - strlen(line3) let bb = openb - closeb let ind = indent(lnum) + (bb * shiftwidth()) if line =~ '^\s*}\s*$' let ind = indent(lnum) endif if ind < 0 return 0 endif return ind endfunction function GetCorrectRHelpIndent() let lastsection = search('^\\[a-z]*{', "bncW") let secname = getline(lastsection) if secname =~ '^\\usage{' || secname =~ '^\\examples{' || secname =~ '^\\dontshow{' || secname =~ '^\\dontrun{' || secname =~ '^\\donttest{' || secname =~ '^\\testonly{' || secname =~ '^\\method{.*}{.*}(' return s:RIndent() else return GetRHelpIndent() endif endfunction " vim: sw=2 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/rmd.vim�����������������������������������������������������������������0000664�0000000�0000000�00000002255�13204015742�0017255�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Rmd " Author: Jakson Alves de Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Tue Apr 07, 2015 04:38PM " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif runtime indent/r.vim let s:RIndent = function(substitute(&indentexpr, "()", "", "")) let b:did_indent = 1 setlocal indentkeys=0{,0},:,!^F,o,O,e setlocal indentexpr=GetRmdIndent() if exists("*GetRmdIndent") finish endif function GetMdIndent() let pline = getline(v:lnum - 1) let cline = getline(v:lnum) if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+' return indent(v:lnum) elseif pline =~ '^\s*[-\+\*]\s' return indent(v:lnum - 1) + 2 elseif pline =~ '^\s*\d\+\.\s\+' return indent(v:lnum - 1) + 3 endif return indent(prevnonblank(v:lnum - 1)) endfunction function GetRmdIndent() if getline(".") =~ '^[ \t]*```{r .*}$' || getline(".") =~ '^[ \t]*```$' return 0 endif if search('^[ \t]*```{r', "bncW") > search('^[ \t]*```$', "bncW") return s:RIndent() else return GetMdIndent() endif endfunction " vim: sw=2 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/rnoweb.vim��������������������������������������������������������������0000664�0000000�0000000�00000002076�13204015742�0017770�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Rnoweb " Author: Jakson Alves de Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Fri Apr 15, 2016 10:58PM " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif runtime indent/tex.vim function! s:NoTeXIndent() return indent(line(".")) endfunction if &indentexpr == "" || &indentexpr == "GetRnowebIndent()" let s:TeXIndent = function("s:NoTeXIndent") else let s:TeXIndent = function(substitute(&indentexpr, "()", "", "")) endif unlet b:did_indent runtime indent/r.vim let s:RIndent = function(substitute(&indentexpr, "()", "", "")) let b:did_indent = 1 setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item setlocal indentexpr=GetRnowebIndent() if exists("*GetRnowebIndent") finish endif function GetRnowebIndent() let curline = getline(".") if curline =~ '^<<.*>>=$' || curline =~ '^\s*@$' return 0 endif if search("^<<", "bncW") > search("^@", "bncW") return s:RIndent() endif return s:TeXIndent() endfunction " vim: sw=2 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/rpl.vim�����������������������������������������������������������������0000664�0000000�0000000�00000003506�13204015742�0017270�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: RPL/2 " Version: 0.2 " Last Change: 2017 Jun 13 " Maintainer: BERTRAND Jol <rpl2@free.fr> " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentkeys+==~end,=~case,=~if,=~then,=~else,=~do,=~until,=~while,=~repeat,=~select,=~default,=~for,=~start,=~next,=~step,<<>,<>> " Define the appropriate indent function but only once setlocal indentexpr=RplGetFreeIndent() if exists("*RplGetFreeIndent") finish endif let b:undo_indent = "set ai< indentkeys< indentexpr<" function RplGetIndent(lnum) let ind = indent(a:lnum) let prevline=getline(a:lnum) " Strip tail comment let prevstat=substitute(prevline, '!.*$', '', '') " Add a shiftwidth to statements following if, iferr, then, else, elseif, " case, select, default, do, until, while, repeat, for, start if prevstat =~? '\<\(if\|iferr\|do\|while\)\>' && prevstat =~? '\<end\>' elseif prevstat =~? '\(^\|\s\+\)<<\($\|\s\+\)' && prevstat =~? '\s\+>>\($\|\s\+\)' elseif prevstat =~? '\<\(if\|iferr\|then\|else\|elseif\|select\|case\|do\|until\|while\|repeat\|for\|start\|default\)\>' || prevstat =~? '\(^\|\s\+\)<<\($\|\s\+\)' let ind = ind + shiftwidth() endif " Subtract a shiftwidth from then, else, elseif, end, until, repeat, next, " step let line = getline(v:lnum) if line =~? '^\s*\(then\|else\|elseif\|until\|repeat\|next\|step\|default\|end\)\>' let ind = ind - shiftwidth() elseif line =~? '^\s*>>\($\|\s\+\)' let ind = ind - shiftwidth() endif return ind endfunction function RplGetFreeIndent() " Find the previous non-blank line let lnum = prevnonblank(v:lnum - 1) " Use zero indent at the top of the file if lnum == 0 return 0 endif let ind=RplGetIndent(lnum) return ind endfunction " vim:sw=2 tw=130 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/rrst.vim����������������������������������������������������������������0000664�0000000�0000000�00000002253�13204015742�0017463�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Rrst " Author: Jakson Alves de Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Tue Apr 07, 2015 04:38PM " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif runtime indent/r.vim let s:RIndent = function(substitute(&indentexpr, "()", "", "")) let b:did_indent = 1 setlocal indentkeys=0{,0},:,!^F,o,O,e setlocal indentexpr=GetRrstIndent() if exists("*GetRrstIndent") finish endif function GetRstIndent() let pline = getline(v:lnum - 1) let cline = getline(v:lnum) if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+' return indent(v:lnum) elseif pline =~ '^\s*[-\+\*]\s' return indent(v:lnum - 1) + 2 elseif pline =~ '^\s*\d\+\.\s\+' return indent(v:lnum - 1) + 3 endif return indent(prevnonblank(v:lnum - 1)) endfunction function GetRrstIndent() if getline(".") =~ '^\.\. {r .*}$' || getline(".") =~ '^\.\. \.\.$' return 0 endif if search('^\.\. {r', "bncW") > search('^\.\. \.\.$', "bncW") return s:RIndent() else return GetRstIndent() endif endfunction " vim: sw=2 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/rst.vim�����������������������������������������������������������������0000664�0000000�0000000�00000002567�13204015742�0017311�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: reStructuredText Documentation Format " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-08-03 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetRSTIndent() setlocal indentkeys=!^F,o,O setlocal nosmartindent if exists("*GetRSTIndent") finish endif let s:itemization_pattern = '^\s*[-*+]\s' let s:enumeration_pattern = '^\s*\%(\d\+\|#\)\.\s\+' function GetRSTIndent() let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif let ind = indent(lnum) let line = getline(lnum) if line =~ s:itemization_pattern let ind += 2 elseif line =~ s:enumeration_pattern let ind += matchend(line, s:enumeration_pattern) endif let line = getline(v:lnum - 1) " Indent :FIELD: lines. Don’t match if there is no text after the field or " if the text ends with a sent-ender. if line =~ '^:.\+:\s\{-1,\}\S.\+[^.!?:]$' return matchend(line, '^:.\{-1,}:\s\+') endif if line =~ '^\s*$' execute lnum call search('^\s*\%([-*+]\s\|\%(\d\+\|#\)\.\s\|\.\.\|$\)', 'bW') let line = getline('.') if line =~ s:itemization_pattern let ind -= 2 elseif line =~ s:enumeration_pattern let ind -= matchend(line, s:enumeration_pattern) elseif line =~ '^\s*\.\.' let ind -= 3 endif endif return ind endfunction �����������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/ruby.vim����������������������������������������������������������������0000664�0000000�0000000�00000054672�13204015742�0017466�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Ruby " Maintainer: Nikolai Weibull <now at bitwi.se> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> " 0. Initialization {{{1 " ================= " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 if !exists('g:ruby_indent_access_modifier_style') " Possible values: "normal", "indent", "outdent" let g:ruby_indent_access_modifier_style = 'normal' endif if !exists('g:ruby_indent_block_style') " Possible values: "expression", "do" let g:ruby_indent_block_style = 'expression' endif setlocal nosmartindent " Now, set up our indentation expression and keys that trigger it. setlocal indentexpr=GetRubyIndent(v:lnum) setlocal indentkeys=0{,0},0),0],!^F,o,O,e,:,. setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end setlocal indentkeys+==private,=protected,=public " Only define the function once. if exists("*GetRubyIndent") finish endif let s:cpo_save = &cpo set cpo&vim " 1. Variables {{{1 " ============ " Regex of syntax group names that are or delimit strings/symbols or are comments. let s:syng_strcom = '\<ruby\%(Regexp\|RegexpDelimiter\|RegexpEscape' . \ '\|Symbol\|String\|StringDelimiter\|StringEscape\|ASCIICode' . \ '\|Interpolation\|InterpolationDelimiter\|NoInterpolation\|Comment\|Documentation\)\>' " Regex of syntax group names that are strings. let s:syng_string = \ '\<ruby\%(String\|Interpolation\|NoInterpolation\|StringEscape\)\>' " Regex of syntax group names that are strings or documentation. let s:syng_stringdoc = \'\<ruby\%(String\|Interpolation\|NoInterpolation\|StringEscape\|Documentation\)\>' " Expression used to check whether we should skip a match with searchpair(). let s:skip_expr = \ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'" " Regex used for words that, at the start of a line, add a level of indent. let s:ruby_indent_keywords = \ '^\s*\zs\<\%(module\|class\|if\|for' . \ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue' . \ '\|\%(public\|protected\|private\)\=\s*def\):\@!\>' . \ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' . \ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>' " Regex used for words that, at the start of a line, remove a level of indent. let s:ruby_deindent_keywords = \ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\):\@!\>' " Regex that defines the start-match for the 'end' keyword. "let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>' " TODO: the do here should be restricted somewhat (only at end of line)? let s:end_start_regex = \ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' . \ '\<\%(module\|class\|if\|for\|while\|until\|case\|unless\|begin' . \ '\|\%(public\|protected\|private\)\=\s*def\):\@!\>' . \ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>' " Regex that defines the middle-match for the 'end' keyword. let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue:\@!\>\|when\|elsif\):\@!\>' " Regex that defines the end-match for the 'end' keyword. let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end:\@!\>' " Expression used for searchpair() call for finding match for 'end' keyword. let s:end_skip_expr = s:skip_expr . \ ' || (expand("<cword>") == "do"' . \ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\):\\@!\\>")' " Regex that defines continuation lines, not including (, {, or [. let s:non_bracket_continuation_regex = \ '\%([\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|:\@<![^[:alnum:]:][|&?]\|||\|&&\)\s*\%(#.*\)\=$' " Regex that defines continuation lines. let s:continuation_regex = \ '\%(%\@<![({[\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|:\@<![^[:alnum:]:][|&?]\|||\|&&\)\s*\%(#.*\)\=$' " Regex that defines continuable keywords let s:continuable_regex = \ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' . \ '\<\%(if\|for\|while\|until\|unless\):\@!\>' " Regex that defines bracket continuations let s:bracket_continuation_regex = '%\@<!\%([({[]\)\s*\%(#.*\)\=$' " Regex that defines dot continuations let s:dot_continuation_regex = '%\@<!\.\s*\%(#.*\)\=$' " Regex that defines backslash continuations let s:backslash_continuation_regex = '%\@<!\\\s*$' " Regex that defines end of bracket continuation followed by another continuation let s:bracket_switch_continuation_regex = '^\([^(]\+\zs).\+\)\+'.s:continuation_regex " Regex that defines the first part of a splat pattern let s:splat_regex = '[[,(]\s*\*\s*\%(#.*\)\=$' " Regex that describes all indent access modifiers let s:access_modifier_regex = '\C^\s*\%(public\|protected\|private\)\s*\%(#.*\)\=$' " Regex that describes the indent access modifiers (excludes public) let s:indent_access_modifier_regex = '\C^\s*\%(protected\|private\)\s*\%(#.*\)\=$' " Regex that defines blocks. " " Note that there's a slight problem with this regex and s:continuation_regex. " Code like this will be matched by both: " " method_call do |(a, b)| " " The reason is that the pipe matches a hanging "|" operator. " let s:block_regex = \ '\%(\<do:\@!\>\|%\@<!{\)\s*\%(|[^|]*|\)\=\s*\%(#.*\)\=$' let s:block_continuation_regex = '^\s*[^])}\t ].*'.s:block_regex " Regex that describes a leading operator (only a method call's dot for now) let s:leading_operator_regex = '^\s*[.]' " 2. Auxiliary Functions {{{1 " ====================== " Check if the character at lnum:col is inside a string, comment, or is ascii. function s:IsInStringOrComment(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom endfunction " Check if the character at lnum:col is inside a string. function s:IsInString(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_string endfunction " Check if the character at lnum:col is inside a string or documentation. function s:IsInStringOrDocumentation(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_stringdoc endfunction " Check if the character at lnum:col is inside a string delimiter function s:IsInStringDelimiter(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'rubyStringDelimiter' endfunction " Find line above 'lnum' that isn't empty, in a comment, or in a string. function s:PrevNonBlankNonString(lnum) let in_block = 0 let lnum = prevnonblank(a:lnum) while lnum > 0 " Go in and out of blocks comments as necessary. " If the line isn't empty (with opt. comment) or in a string, end search. let line = getline(lnum) if line =~ '^=begin' if in_block let in_block = 0 else break endif elseif !in_block && line =~ '^=end' let in_block = 1 elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1) \ && s:IsInStringOrComment(lnum, strlen(line))) break endif let lnum = prevnonblank(lnum - 1) endwhile return lnum endfunction " Find line above 'lnum' that started the continuation 'lnum' may be part of. function s:GetMSL(lnum) " Start on the line we're at and use its indent. let msl = a:lnum let msl_body = getline(msl) let lnum = s:PrevNonBlankNonString(a:lnum - 1) while lnum > 0 " If we have a continuation line, or we're in a string, use line as MSL. " Otherwise, terminate search as we have found our MSL already. let line = getline(lnum) if !s:Match(msl, s:backslash_continuation_regex) && \ s:Match(lnum, s:backslash_continuation_regex) " If the current line doesn't end in a backslash, but the previous one " does, look for that line's msl " " Example: " foo = "bar" \ " "baz" " let msl = lnum elseif s:Match(msl, s:leading_operator_regex) " If the current line starts with a leading operator, keep its indent " and keep looking for an MSL. let msl = lnum elseif s:Match(lnum, s:splat_regex) " If the above line looks like the "*" of a splat, use the current one's " indentation. " " Example: " Hash[* " method_call do " something " return msl elseif s:Match(lnum, s:non_bracket_continuation_regex) && \ s:Match(msl, s:non_bracket_continuation_regex) " If the current line is a non-bracket continuation and so is the " previous one, keep its indent and continue looking for an MSL. " " Example: " method_call one, " two, " three " let msl = lnum elseif s:Match(lnum, s:dot_continuation_regex) && \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) " If the current line is a bracket continuation or a block-starter, but " the previous is a dot, keep going to see if the previous line is the " start of another continuation. " " Example: " parent. " method_call { " three " let msl = lnum elseif s:Match(lnum, s:non_bracket_continuation_regex) && \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) " If the current line is a bracket continuation or a block-starter, but " the previous is a non-bracket one, respect the previous' indentation, " and stop here. " " Example: " method_call one, " two { " three " return lnum elseif s:Match(lnum, s:bracket_continuation_regex) && \ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex)) " If both lines are bracket continuations (the current may also be a " block-starter), use the current one's and stop here " " Example: " method_call( " other_method_call( " foo return msl elseif s:Match(lnum, s:block_regex) && \ !s:Match(msl, s:continuation_regex) && \ !s:Match(msl, s:block_continuation_regex) " If the previous line is a block-starter and the current one is " mostly ordinary, use the current one as the MSL. " " Example: " method_call do " something " something_else return msl else let col = match(line, s:continuation_regex) + 1 if (col > 0 && !s:IsInStringOrComment(lnum, col)) \ || s:IsInString(lnum, strlen(line)) let msl = lnum else break endif endif let msl_body = getline(msl) let lnum = s:PrevNonBlankNonString(lnum - 1) endwhile return msl endfunction " Check if line 'lnum' has more opening brackets than closing ones. function s:ExtraBrackets(lnum) let opening = {'parentheses': [], 'braces': [], 'brackets': []} let closing = {'parentheses': [], 'braces': [], 'brackets': []} let line = getline(a:lnum) let pos = match(line, '[][(){}]', 0) " Save any encountered opening brackets, and remove them once a matching " closing one has been found. If a closing bracket shows up that doesn't " close anything, save it for later. while pos != -1 if !s:IsInStringOrComment(a:lnum, pos + 1) if line[pos] == '(' call add(opening.parentheses, {'type': '(', 'pos': pos}) elseif line[pos] == ')' if empty(opening.parentheses) call add(closing.parentheses, {'type': ')', 'pos': pos}) else let opening.parentheses = opening.parentheses[0:-2] endif elseif line[pos] == '{' call add(opening.braces, {'type': '{', 'pos': pos}) elseif line[pos] == '}' if empty(opening.braces) call add(closing.braces, {'type': '}', 'pos': pos}) else let opening.braces = opening.braces[0:-2] endif elseif line[pos] == '[' call add(opening.brackets, {'type': '[', 'pos': pos}) elseif line[pos] == ']' if empty(opening.brackets) call add(closing.brackets, {'type': ']', 'pos': pos}) else let opening.brackets = opening.brackets[0:-2] endif endif endif let pos = match(line, '[][(){}]', pos + 1) endwhile " Find the rightmost brackets, since they're the ones that are important in " both opening and closing cases let rightmost_opening = {'type': '(', 'pos': -1} let rightmost_closing = {'type': ')', 'pos': -1} for opening in opening.parentheses + opening.braces + opening.brackets if opening.pos > rightmost_opening.pos let rightmost_opening = opening endif endfor for closing in closing.parentheses + closing.braces + closing.brackets if closing.pos > rightmost_closing.pos let rightmost_closing = closing endif endfor return [rightmost_opening, rightmost_closing] endfunction function s:Match(lnum, regex) let line = getline(a:lnum) let offset = match(line, '\C'.a:regex) let col = offset + 1 while offset > -1 && s:IsInStringOrComment(a:lnum, col) let offset = match(line, '\C'.a:regex, offset + 1) let col = offset + 1 endwhile if offset > -1 return col else return 0 endif endfunction " Locates the containing class/module's definition line, ignoring nested classes " along the way. " function! s:FindContainingClass() let saved_position = getpos('.') while searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW', \ s:end_skip_expr) > 0 if expand('<cword>') =~# '\<class\|module\>' let found_lnum = line('.') call setpos('.', saved_position) return found_lnum endif endwhile call setpos('.', saved_position) return 0 endfunction " 3. GetRubyIndent Function {{{1 " ========================= function GetRubyIndent(...) " 3.1. Setup {{{2 " ---------- " The value of a single shift-width let sw = shiftwidth() " For the current line, use the first argument if given, else v:lnum let clnum = a:0 ? a:1 : v:lnum " Set up variables for restoring position in file. Could use clnum here. let vcol = col('.') " 3.2. Work on the current line {{{2 " ----------------------------- " Get the current line. let line = getline(clnum) let ind = -1 " If this line is an access modifier keyword, align according to the closest " class declaration. if g:ruby_indent_access_modifier_style == 'indent' if s:Match(clnum, s:access_modifier_regex) let class_line = s:FindContainingClass() if class_line > 0 return indent(class_line) + sw endif endif elseif g:ruby_indent_access_modifier_style == 'outdent' if s:Match(clnum, s:access_modifier_regex) let class_line = s:FindContainingClass() if class_line > 0 return indent(class_line) endif endif endif " If we got a closing bracket on an empty line, find its match and indent " according to it. For parentheses we indent to its column - 1, for the " others we indent to the containing line's MSL's level. Return -1 if fail. let col = matchend(line, '^\s*[]})]') if col > 0 && !s:IsInStringOrComment(clnum, col) call cursor(clnum, col) let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2) if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0 if line[col-1]==')' && col('.') != col('$') - 1 let ind = virtcol('.') - 1 elseif g:ruby_indent_block_style == 'do' let ind = indent(line('.')) else " g:ruby_indent_block_style == 'expression' let ind = indent(s:GetMSL(line('.'))) endif endif return ind endif " If we have a =begin or =end set indent to first column. if match(line, '^\s*\%(=begin\|=end\)$') != -1 return 0 endif " If we have a deindenting keyword, find its match and indent to its level. " TODO: this is messy if s:Match(clnum, s:ruby_deindent_keywords) call cursor(clnum, 1) if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW', \ s:end_skip_expr) > 0 let msl = s:GetMSL(line('.')) let line = getline(line('.')) if strpart(line, 0, col('.') - 1) =~ '=\s*$' && \ strpart(line, col('.') - 1, 2) !~ 'do' " assignment to case/begin/etc, on the same line, hanging indent let ind = virtcol('.') - 1 elseif g:ruby_indent_block_style == 'do' " align to line of the "do", not to the MSL let ind = indent(line('.')) elseif getline(msl) =~ '=\s*\(#.*\)\=$' " in the case of assignment to the MSL, align to the starting line, " not to the MSL let ind = indent(line('.')) else " align to the MSL let ind = indent(msl) endif endif return ind endif " If we are in a multi-line string or line-comment, don't do anything to it. if s:IsInStringOrDocumentation(clnum, matchend(line, '^\s*') + 1) return indent('.') endif " If we are at the closing delimiter of a "<<" heredoc-style string, set the " indent to 0. if line =~ '^\k\+\s*$' \ && s:IsInStringDelimiter(clnum, 1) \ && search('\V<<'.line, 'nbW') > 0 return 0 endif " If the current line starts with a leading operator, add a level of indent. if s:Match(clnum, s:leading_operator_regex) return indent(s:GetMSL(clnum)) + sw endif " 3.3. Work on the previous line. {{{2 " ------------------------------- " Find a non-blank, non-multi-line string line above the current line. let lnum = s:PrevNonBlankNonString(clnum - 1) " If the line is empty and inside a string, use the previous line. if line =~ '^\s*$' && lnum != prevnonblank(clnum - 1) return indent(prevnonblank(clnum)) endif " At the start of the file use zero indent. if lnum == 0 return 0 endif " Set up variables for the previous line. let line = getline(lnum) let ind = indent(lnum) if g:ruby_indent_access_modifier_style == 'indent' " If the previous line was a private/protected keyword, add a " level of indent. if s:Match(lnum, s:indent_access_modifier_regex) return indent(lnum) + sw endif elseif g:ruby_indent_access_modifier_style == 'outdent' " If the previous line was a private/protected/public keyword, add " a level of indent, since the keyword has been out-dented. if s:Match(lnum, s:access_modifier_regex) return indent(lnum) + sw endif endif if s:Match(lnum, s:continuable_regex) && s:Match(lnum, s:continuation_regex) return indent(s:GetMSL(lnum)) + sw + sw endif " If the previous line ended with a block opening, add a level of indent. if s:Match(lnum, s:block_regex) let msl = s:GetMSL(lnum) if g:ruby_indent_block_style == 'do' " don't align to the msl, align to the "do" let ind = indent(lnum) + sw elseif getline(msl) =~ '=\s*\(#.*\)\=$' " in the case of assignment to the msl, align to the starting line, " not to the msl let ind = indent(lnum) + sw else let ind = indent(msl) + sw endif return ind endif " If the previous line started with a leading operator, use its MSL's level " of indent if s:Match(lnum, s:leading_operator_regex) return indent(s:GetMSL(lnum)) endif " If the previous line ended with the "*" of a splat, add a level of indent if line =~ s:splat_regex return indent(lnum) + sw endif " If the previous line contained unclosed opening brackets and we are still " in them, find the rightmost one and add indent depending on the bracket " type. " " If it contained hanging closing brackets, find the rightmost one, find its " match and indent according to that. if line =~ '[[({]' || line =~ '[])}]\s*\%(#.*\)\=$' let [opening, closing] = s:ExtraBrackets(lnum) if opening.pos != -1 if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0 if col('.') + 1 == col('$') return ind + sw else return virtcol('.') endif else let nonspace = matchend(line, '\S', opening.pos + 1) - 1 return nonspace > 0 ? nonspace : ind + sw endif elseif closing.pos != -1 call cursor(lnum, closing.pos + 1) normal! % if s:Match(line('.'), s:ruby_indent_keywords) return indent('.') + sw else return indent(s:GetMSL(line('.'))) endif else call cursor(clnum, vcol) end endif " If the previous line ended with an "end", match that "end"s beginning's " indent. let col = s:Match(lnum, '\%(^\|[^.:@$]\)\<end\>\s*\%(#.*\)\=$') if col > 0 call cursor(lnum, col) if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW', \ s:end_skip_expr) > 0 let n = line('.') let ind = indent('.') let msl = s:GetMSL(n) if msl != n let ind = indent(msl) end return ind endif end let col = s:Match(lnum, s:ruby_indent_keywords) if col > 0 call cursor(lnum, col) let ind = virtcol('.') - 1 + sw " TODO: make this better (we need to count them) (or, if a searchpair " fails, we know that something is lacking an end and thus we indent a " level if s:Match(lnum, s:end_end_regex) let ind = indent('.') endif return ind endif " 3.4. Work on the MSL line. {{{2 " -------------------------- " Set up variables to use and search for MSL to the previous line. let p_lnum = lnum let lnum = s:GetMSL(lnum) " If the previous line wasn't a MSL. if p_lnum != lnum " If previous line ends bracket and begins non-bracket continuation decrease indent by 1. if s:Match(p_lnum, s:bracket_switch_continuation_regex) return ind - 1 " If previous line is a continuation return its indent. " TODO: the || s:IsInString() thing worries me a bit. elseif s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line)) return ind endif endif " Set up more variables, now that we know we wasn't continuation bound. let line = getline(lnum) let msl_ind = indent(lnum) " If the MSL line had an indenting keyword in it, add a level of indent. " TODO: this does not take into account contrived things such as " module Foo; class Bar; end if s:Match(lnum, s:ruby_indent_keywords) let ind = msl_ind + sw if s:Match(lnum, s:end_end_regex) let ind = ind - sw endif return ind endif " If the previous line ended with [*+/.,-=], but wasn't a block ending or a " closing bracket, indent one extra level. if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)') if lnum == p_lnum let ind = msl_ind + sw else let ind = msl_ind endif return ind endif " }}}2 return ind endfunction " }}}1 let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2 ts=8 et: ����������������������������������������������������������������������neovim-0.2.2/runtime/indent/rust.vim����������������������������������������������������������������0000664�0000000�0000000�00000014542�13204015742�0017472�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Rust " Author: Chris Morgan <me@chrismorgan.info> " Last Change: 2017 Jun 13 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal cindent setlocal cinoptions=L0,(0,Ws,J1,j1 setlocal cinkeys=0{,0},!^F,o,O,0[,0] " Don't think cinwords will actually do anything at all... never mind setlocal cinwords=for,if,else,while,loop,impl,mod,unsafe,trait,struct,enum,fn,extern " Some preliminary settings setlocal nolisp " Make sure lisp indenting doesn't supersede us setlocal autoindent " indentexpr isn't much help otherwise " Also do indentkeys, otherwise # gets shoved to column 0 :-/ setlocal indentkeys=0{,0},!^F,o,O,0[,0] setlocal indentexpr=GetRustIndent(v:lnum) " Only define the function once. if exists("*GetRustIndent") finish endif let s:save_cpo = &cpo set cpo&vim " Come here when loading the script the first time. function! s:get_line_trimmed(lnum) " Get the line and remove a trailing comment. " Use syntax highlighting attributes when possible. " NOTE: this is not accurate; /* */ or a line continuation could trick it let line = getline(a:lnum) let line_len = strlen(line) if has('syntax_items') " If the last character in the line is a comment, do a binary search for " the start of the comment. synID() is slow, a linear search would take " too long on a long line. if synIDattr(synID(a:lnum, line_len, 1), "name") =~ 'Comment\|Todo' let min = 1 let max = line_len while min < max let col = (min + max) / 2 if synIDattr(synID(a:lnum, col, 1), "name") =~ 'Comment\|Todo' let max = col else let min = col + 1 endif endwhile let line = strpart(line, 0, min - 1) endif return substitute(line, "\s*$", "", "") else " Sorry, this is not complete, nor fully correct (e.g. string "//"). " Such is life. return substitute(line, "\s*//.*$", "", "") endif endfunction function! s:is_string_comment(lnum, col) if has('syntax_items') for id in synstack(a:lnum, a:col) let synname = synIDattr(id, "name") if synname == "rustString" || synname =~ "^rustComment" return 1 endif endfor else " without syntax, let's not even try return 0 endif endfunction function GetRustIndent(lnum) " Starting assumption: cindent (called at the end) will do it right " normally. We just want to fix up a few cases. let line = getline(a:lnum) if has('syntax_items') let synname = synIDattr(synID(a:lnum, 1, 1), "name") if synname == "rustString" " If the start of the line is in a string, don't change the indent return -1 elseif synname =~ '\(Comment\|Todo\)' \ && line !~ '^\s*/\*' " not /* opening line if synname =~ "CommentML" " multi-line if line !~ '^\s*\*' && getline(a:lnum - 1) =~ '^\s*/\*' " This is (hopefully) the line after a /*, and it has no " leader, so the correct indentation is that of the " previous line. return GetRustIndent(a:lnum - 1) endif endif " If it's in a comment, let cindent take care of it now. This is " for cases like "/*" where the next line should start " * ", not " "* " as the code below would otherwise cause for module scope " Fun fact: " /*\n*\n*/" takes two calls to get right! return cindent(a:lnum) endif endif " cindent gets second and subsequent match patterns/struct members wrong, " as it treats the comma as indicating an unfinished statement:: " " match a { " b => c, " d => e, " f => g, " }; " Search backwards for the previous non-empty line. let prevlinenum = prevnonblank(a:lnum - 1) let prevline = s:get_line_trimmed(prevlinenum) while prevlinenum > 1 && prevline !~ '[^[:blank:]]' let prevlinenum = prevnonblank(prevlinenum - 1) let prevline = s:get_line_trimmed(prevlinenum) endwhile " Handle where clauses nicely: subsequent values should line up nicely. if prevline[len(prevline) - 1] == "," \ && prevline =~# '^\s*where\s' return indent(prevlinenum) + 6 endif if prevline[len(prevline) - 1] == "," \ && s:get_line_trimmed(a:lnum) !~ '^\s*[\[\]{}]' \ && prevline !~ '^\s*fn\s' \ && prevline !~ '([^()]\+,$' \ && s:get_line_trimmed(a:lnum) !~ '^\s*\S\+\s*=>' " Oh ho! The previous line ended in a comma! I bet cindent will try to " take this too far... For now, let's normally use the previous line's " indent. " One case where this doesn't work out is where *this* line contains " square or curly brackets; then we normally *do* want to be indenting " further. " " Another case where we don't want to is one like a function " definition with arguments spread over multiple lines: " " fn foo(baz: Baz, " baz: Baz) // <-- cindent gets this right by itself " " Another case is similar to the previous, except calling a function " instead of defining it, or any conditional expression that leaves " an open paren: " " foo(baz, " baz); " " if baz && (foo || " bar) { " " Another case is when the current line is a new match arm. " " There are probably other cases where we don't want to do this as " well. Add them as needed. return indent(prevlinenum) endif if !has("patch-7.4.355") " cindent before 7.4.355 doesn't do the module scope well at all; e.g.:: " " static FOO : &'static [bool] = [ " true, " false, " false, " true, " ]; " " uh oh, next statement is indented further! " Note that this does *not* apply the line continuation pattern properly; " that's too hard to do correctly for my liking at present, so I'll just " start with these two main cases (square brackets and not returning to " column zero) call cursor(a:lnum, 1) if searchpair('{\|(', '', '}\|)', 'nbW', \ 's:is_string_comment(line("."), col("."))') == 0 if searchpair('\[', '', '\]', 'nbW', \ 's:is_string_comment(line("."), col("."))') == 0 " Global scope, should be zero return 0 else " At the module scope, inside square brackets only "if getline(a:lnum)[0] == ']' || search('\[', '', '\]', 'nW') == a:lnum if line =~ "^\\s*]" " It's the closing line, dedent it return 0 else return shiftwidth() endif endif endif endif " Fall back on cindent, which does it mostly right return cindent(a:lnum) endfunction let &cpo = s:save_cpo unlet s:save_cpo ��������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/sas.vim�����������������������������������������������������������������0000664�0000000�0000000�00000012007�13204015742�0017255�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: SAS " Maintainer: Zhen-Huan Hu <wildkeny@gmail.com> " Version: 3.0.1 " Last Change: Mar 13, 2017 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetSASIndent() setlocal indentkeys+=;,=~data,=~proc,=~macro if exists("*GetSASIndent") finish endif let s:cpo_save = &cpo set cpo&vim " Regex that captures the start of a data/proc section let s:section_str = '\v%(^|;)\s*%(data|proc)>' " Regex that captures the end of a run-processing section let s:section_run = '\v%(^|;)\s*run\s*;' " Regex that captures the end of a data/proc section let s:section_end = '\v%(^|;)\s*%(quit|enddata)\s*;' " Regex that captures the start of a control block (anything inside a section) let s:block_str = '\v<%(do>%([^;]+<%(to|over)>[^;]+)=|%(define|layout|method|select)>[^;]+|begingraph)\s*;' " Regex that captures the end of a control block (anything inside a section) let s:block_end = '\v<%(end|endlayout|endgraph)\s*;' " Regex that captures the start of a macro let s:macro_str = '\v%(^|;)\s*\%macro>' " Regex that captures the end of a macro let s:macro_end = '\v%(^|;)\s*\%mend\s*;' " Regex that defines the end of the program let s:program_end = '\v%(^|;)\s*endsas\s*;' " List of procs supporting run-processing let s:run_processing_procs = [ \ 'catalog', 'chart', 'datasets', 'document', 'ds2', 'plot', 'sql', \ 'gareabar', 'gbarline', 'gchart', 'gkpi', 'gmap', 'gplot', 'gradar', 'greplay', 'gslide', 'gtile', \ 'anova', 'arima', 'catmod', 'factex', 'glm', 'model', 'optex', 'plan', 'reg', \ 'iml', \ ] " Find the line number of previous keyword defined by the regex function! s:PrevMatch(lnum, regex) let prev_lnum = prevnonblank(a:lnum - 1) while prev_lnum > 0 let prev_line = getline(prev_lnum) if prev_line =~ a:regex break else let prev_lnum = prevnonblank(prev_lnum - 1) endif endwhile return prev_lnum endfunction " Main function function! GetSASIndent() let prev_lnum = prevnonblank(v:lnum - 1) if prev_lnum ==# 0 " Leave the indentation of the first line unchanged return indent(1) else let prev_line = getline(prev_lnum) " Previous non-blank line contains the start of a macro/section/block " while not the end of a macro/section/block (at the same line) if (prev_line =~ s:section_str && prev_line !~ s:section_run && prev_line !~ s:section_end) || \ (prev_line =~ s:block_str && prev_line !~ s:block_end) || \ (prev_line =~ s:macro_str && prev_line !~ s:macro_end) let ind = indent(prev_lnum) + &sts elseif prev_line =~ s:section_run && prev_line !~ s:section_end let prev_section_str_lnum = s:PrevMatch(v:lnum, s:section_str) let prev_section_end_lnum = max([ \ s:PrevMatch(v:lnum, s:section_end), \ s:PrevMatch(v:lnum, s:macro_end ), \ s:PrevMatch(v:lnum, s:program_end)]) " Check if the section supports run-processing if prev_section_end_lnum < prev_section_str_lnum && \ getline(prev_section_str_lnum) =~ '\v%(^|;)\s*proc\s+%(' . \ join(s:run_processing_procs, '|') . ')>' let ind = indent(prev_lnum) + &sts else let ind = indent(prev_lnum) endif else let ind = indent(prev_lnum) endif endif " Re-adjustments based on the inputs of the current line let curr_line = getline(v:lnum) if curr_line =~ s:program_end " End of the program " Same indentation as the first non-blank line return indent(nextnonblank(1)) elseif curr_line =~ s:macro_end " Current line is the end of a macro " Match the indentation of the start of the macro return indent(s:PrevMatch(v:lnum, s:macro_str)) elseif curr_line =~ s:block_end && curr_line !~ s:block_str " Re-adjust if current line is the end of a block " while not the beginning of a block (at the same line) " Returning the indent of previous block start directly " would not work due to nesting let ind = ind - &sts elseif curr_line =~ s:section_str || curr_line =~ s:section_run || curr_line =~ s:section_end " Re-adjust if current line is the start/end of a section " since the end of a section could be inexplicit let prev_section_str_lnum = s:PrevMatch(v:lnum, s:section_str) " Check if the previous section supports run-processing if getline(prev_section_str_lnum) =~ '\v%(^|;)\s*proc\s+%(' . \ join(s:run_processing_procs, '|') . ')>' let prev_section_end_lnum = max([ \ s:PrevMatch(v:lnum, s:section_end), \ s:PrevMatch(v:lnum, s:macro_end ), \ s:PrevMatch(v:lnum, s:program_end)]) else let prev_section_end_lnum = max([ \ s:PrevMatch(v:lnum, s:section_end), \ s:PrevMatch(v:lnum, s:section_run), \ s:PrevMatch(v:lnum, s:macro_end ), \ s:PrevMatch(v:lnum, s:program_end)]) endif if prev_section_end_lnum < prev_section_str_lnum let ind = ind - &sts endif endif return ind endfunction let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/sass.vim����������������������������������������������������������������0000664�0000000�0000000�00000001666�13204015742�0017451�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2017 Jun 13 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent sw=2 et setlocal indentexpr=GetSassIndent() setlocal indentkeys=o,O,*<Return>,<:>,!^F " Only define the function once. if exists("*GetSassIndent") finish endif let s:property = '^\s*:\|^\s*[[:alnum:]#{}-]\+\%(:\|\s*=\)' let s:extend = '^\s*\%(@extend\|@include\|+\)' function! GetSassIndent() let lnum = prevnonblank(v:lnum-1) let line = substitute(getline(lnum),'\s\+$','','') let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') let lastcol = strlen(line) let line = substitute(line,'^\s\+','','') let indent = indent(lnum) let cindent = indent(v:lnum) if line !~ s:property && line !~ s:extend && cline =~ s:property return indent + shiftwidth() else return -1 endif endfunction " vim:set sw=2: ��������������������������������������������������������������������������neovim-0.2.2/runtime/indent/scala.vim���������������������������������������������������������������0000664�0000000�0000000�00000045746�13204015742�0017572�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Scala (http://scala-lang.org/) " Original Author: Stefan Matthias Aust " Modifications By: Derek Wyatt " URL: https://github.com/derekwyatt/vim-scala " Last Change: 2016 Aug 26 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentexpr=GetScalaIndent() setlocal indentkeys=0{,0},0),!^F,<>>,o,O,e,=case,<CR> if exists("*GetScalaIndent") finish endif let s:keepcpo= &cpo set cpo&vim let s:defMatcher = '\%(\%(private\|protected\)\%(\[[^\]]*\]\)\?\s\+\|abstract\s\+\|override\s\+\)*\<def\>' let s:funcNameMatcher = '\w\+' let s:typeSpecMatcher = '\%(\s*\[\_[^\]]*\]\)' let s:defArgMatcher = '\%((\_.\{-})\)' let s:returnTypeMatcher = '\%(:\s*\w\+' . s:typeSpecMatcher . '\?\)' let g:fullDefMatcher = '^\s*' . s:defMatcher . '\s\+' . s:funcNameMatcher . '\s*' . s:typeSpecMatcher . '\?\s*' . s:defArgMatcher . '\?\s*' . s:returnTypeMatcher . '\?\s*[={]' function! scala#ConditionalConfirm(msg) if 0 call confirm(a:msg) endif endfunction function! scala#GetLine(lnum) let line = substitute(getline(a:lnum), '//.*$', '', '') let line = substitute(line, '"\(.\|\\"\)\{-}"', '""', 'g') return line endfunction function! scala#CountBrackets(line, openBracket, closedBracket) let line = substitute(a:line, '"\(.\|\\"\)\{-}"', '', 'g') let open = substitute(line, '[^' . a:openBracket . ']', '', 'g') let close = substitute(line, '[^' . a:closedBracket . ']', '', 'g') return strlen(open) - strlen(close) endfunction function! scala#CountParens(line) return scala#CountBrackets(a:line, '(', ')') endfunction function! scala#CountCurlies(line) return scala#CountBrackets(a:line, '{', '}') endfunction function! scala#LineEndsInIncomplete(line) if a:line =~ '[.,]\s*$' return 1 else return 0 endif endfunction function! scala#LineIsAClosingXML(line) if a:line =~ '^\s*</\w' return 1 else return 0 endif endfunction function! scala#LineCompletesXML(lnum, line) let savedpos = getpos('.') call setpos('.', [savedpos[0], a:lnum, 0, savedpos[3]]) let tag = substitute(a:line, '^.*</\([^>]*\)>.*$', '\1', '') let [lineNum, colnum] = searchpairpos('<' . tag . '>', '', '</' . tag . '>', 'Wbn') call setpos('.', savedpos) let pline = scala#GetLine(prevnonblank(lineNum - 1)) if pline =~ '=\s*$' return 1 else return 0 endif endfunction function! scala#IsParentCase() let savedpos = getpos('.') call setpos('.', [savedpos[0], savedpos[1], 0, savedpos[3]]) let [l, c] = searchpos('^\s*\%(' . s:defMatcher . '\|\%(\<case\>\)\)', 'bnW') let retvalue = -1 if l != 0 && search('\%' . l . 'l\s*\<case\>', 'bnW') let retvalue = l endif call setpos('.', savedpos) return retvalue endfunction function! scala#CurlyMatcher() let matchline = scala#GetLineThatMatchesBracket('{', '}') if scala#CountParens(scala#GetLine(matchline)) < 0 let savedpos = getpos('.') call setpos('.', [savedpos[0], matchline, 9999, savedpos[3]]) call searchpos('{', 'Wbc') call searchpos(')', 'Wb') let [lnum, colnum] = searchpairpos('(', '', ')', 'Wbn') call setpos('.', savedpos) let line = scala#GetLine(lnum) if line =~ '^\s*' . s:defMatcher return lnum else return matchline endif else return matchline endif endfunction function! scala#GetLineAndColumnThatMatchesCurly() return scala#GetLineAndColumnThatMatchesBracket('{', '}') endfunction function! scala#GetLineAndColumnThatMatchesParen() return scala#GetLineAndColumnThatMatchesBracket('(', ')') endfunction function! scala#GetLineAndColumnThatMatchesBracket(openBracket, closedBracket) let savedpos = getpos('.') let curline = scala#GetLine(line('.')) if curline =~ a:closedBracket . '.*' . a:openBracket . '.*' . a:closedBracket call setpos('.', [savedpos[0], savedpos[1], 0, savedpos[3]]) call searchpos(a:closedBracket . '\ze[^' . a:closedBracket . a:openBracket . ']*' . a:openBracket, 'W') else call setpos('.', [savedpos[0], savedpos[1], 9999, savedpos[3]]) call searchpos(a:closedBracket, 'Wbc') endif let [lnum, colnum] = searchpairpos(a:openBracket, '', a:closedBracket, 'Wbn') call setpos('.', savedpos) return [lnum, colnum] endfunction function! scala#GetLineThatMatchesCurly() return scala#GetLineThatMatchesBracket('{', '}') endfunction function! scala#GetLineThatMatchesParen() return scala#GetLineThatMatchesBracket('(', ')') endfunction function! scala#GetLineThatMatchesBracket(openBracket, closedBracket) let [lnum, colnum] = scala#GetLineAndColumnThatMatchesBracket(a:openBracket, a:closedBracket) return lnum endfunction function! scala#NumberOfBraceGroups(line) let line = substitute(a:line, '[^()]', '', 'g') if strlen(line) == 0 return 0 endif let line = substitute(line, '^)*', '', 'g') if strlen(line) == 0 return 0 endif let line = substitute(line, '^(', '', 'g') if strlen(line) == 0 return 0 endif let c = 1 let counter = 0 let groupCount = 0 while counter < strlen(line) let char = strpart(line, counter, 1) if char == '(' let c = c + 1 elseif char == ')' let c = c - 1 endif if c == 0 let groupCount = groupCount + 1 endif let counter = counter + 1 endwhile return groupCount endfunction function! scala#MatchesIncompleteDefValr(line) if a:line =~ '^\s*\%(' . s:defMatcher . '\|\<va[lr]\>\).*[=({]\s*$' return 1 else return 0 endif endfunction function! scala#LineIsCompleteIf(line) if scala#CountBrackets(a:line, '{', '}') == 0 && \ scala#CountBrackets(a:line, '(', ')') == 0 && \ a:line =~ '^\s*\<if\>\s*([^)]*)\s*\S.*$' return 1 else return 0 endif endfunction function! scala#LineCompletesIfElse(lnum, line) if a:line =~ '^\s*\%(\<if\>\|\%(}\s*\)\?\<else\>\)' return 0 endif let result = search('^\%(\s*\<if\>\s*(.*).*\n\|\s*\<if\>\s*(.*)\s*\n.*\n\)\%(\s*\<else\>\s*\<if\>\s*(.*)\s*\n.*\n\)*\%(\s*\<else\>\s*\n\|\s*\<else\>[^{]*\n\)\?\%' . a:lnum . 'l', 'Wbn') if result != 0 && scala#GetLine(prevnonblank(a:lnum - 1)) !~ '{\s*$' return result endif return 0 endfunction function! scala#GetPrevCodeLine(lnum) " This needs to skip comment lines return prevnonblank(a:lnum - 1) endfunction function! scala#InvertBracketType(openBracket, closedBracket) if a:openBracket == '(' return [ '{', '}' ] else return [ '(', ')' ] endif endfunction function! scala#Testhelper(lnum, line, openBracket, closedBracket, iteration) let bracketCount = scala#CountBrackets(a:line, a:openBracket, a:closedBracket) " There are more '}' braces than '{' on this line so it may be completing the function definition if bracketCount < 0 let [matchedLNum, matchedColNum] = scala#GetLineAndColumnThatMatchesBracket(a:openBracket, a:closedBracket) if matchedLNum == a:lnum return -1 endif let matchedLine = scala#GetLine(matchedLNum) if ! scala#MatchesIncompleteDefValr(matchedLine) let bracketLine = substitute(substitute(matchedLine, '\%' . matchedColNum . 'c.*$', '', ''), '[^{}()]', '', 'g') if bracketLine =~ '}$' return scala#Testhelper(matchedLNum, matchedLine, '{', '}', a:iteration + 1) elseif bracketLine =~ ')$' return scala#Testhelper(matchedLNum, matchedLine, '(', ')', a:iteration + 1) else let prevCodeLNum = scala#GetPrevCodeLine(matchedLNum) if scala#MatchesIncompleteDefValr(scala#GetLine(prevCodeLNum)) return prevCodeLNum else return -1 endif endif else " return indent value instead return matchedLNum endif " There's an equal number of '{' and '}' on this line so it may be a single line function definition elseif bracketCount == 0 if a:iteration == 0 let otherBracketType = scala#InvertBracketType(a:openBracket, a:closedBracket) return scala#Testhelper(a:lnum, a:line, otherBracketType[0], otherBracketType[1], a:iteration + 1) else let prevCodeLNum = scala#GetPrevCodeLine(a:lnum) let prevCodeLine = scala#GetLine(prevCodeLNum) if scala#MatchesIncompleteDefValr(prevCodeLine) && prevCodeLine !~ '{\s*$' return prevCodeLNum else let possibleIfElse = scala#LineCompletesIfElse(a:lnum, a:line) if possibleIfElse != 0 let defValrLine = prevnonblank(possibleIfElse - 1) let possibleDefValr = scala#GetLine(defValrLine) if scala#MatchesIncompleteDefValr(possibleDefValr) && possibleDefValr =~ '^.*=\s*$' return possibleDefValr else return -1 endif else return -1 endif endif endif else return -1 endif endfunction function! scala#Test(lnum, line, openBracket, closedBracket) return scala#Testhelper(a:lnum, a:line, a:openBracket, a:closedBracket, 0) endfunction function! scala#LineCompletesDefValr(lnum, line) let bracketCount = scala#CountBrackets(a:line, '{', '}') if bracketCount < 0 let matchedBracket = scala#GetLineThatMatchesBracket('{', '}') if ! scala#MatchesIncompleteDefValr(scala#GetLine(matchedBracket)) let possibleDefValr = scala#GetLine(prevnonblank(matchedBracket - 1)) if matchedBracket != -1 && scala#MatchesIncompleteDefValr(possibleDefValr) return 1 else return 0 endif else return 0 endif elseif bracketCount == 0 let bracketCount = scala#CountBrackets(a:line, '(', ')') if bracketCount < 0 let matchedBracket = scala#GetLineThatMatchesBracket('(', ')') if ! scala#MatchesIncompleteDefValr(scala#GetLine(matchedBracket)) let possibleDefValr = scala#GetLine(prevnonblank(matchedBracket - 1)) if matchedBracket != -1 && scala#MatchesIncompleteDefValr(possibleDefValr) return 1 else return 0 endif else return 0 endif elseif bracketCount == 0 let possibleDefValr = scala#GetLine(prevnonblank(a:lnum - 1)) if scala#MatchesIncompleteDefValr(possibleDefValr) && possibleDefValr =~ '^.*=\s*$' return 1 else let possibleIfElse = scala#LineCompletesIfElse(a:lnum, a:line) if possibleIfElse != 0 let possibleDefValr = scala#GetLine(prevnonblank(possibleIfElse - 1)) if scala#MatchesIncompleteDefValr(possibleDefValr) && possibleDefValr =~ '^.*=\s*$' return 2 else return 0 endif else return 0 endif endif else return 0 endif endif endfunction function! scala#SpecificLineCompletesBrackets(lnum, openBracket, closedBracket) let savedpos = getpos('.') call setpos('.', [savedpos[0], a:lnum, 9999, savedpos[3]]) let retv = scala#LineCompletesBrackets(a:openBracket, a:closedBracket) call setpos('.', savedpos) return retv endfunction function! scala#LineCompletesBrackets(openBracket, closedBracket) let savedpos = getpos('.') let offline = 0 while offline == 0 let [lnum, colnum] = searchpos(a:closedBracket, 'Wb') let [lnumA, colnumA] = searchpairpos(a:openBracket, '', a:closedBracket, 'Wbn') if lnum != lnumA let [lnumB, colnumB] = searchpairpos(a:openBracket, '', a:closedBracket, 'Wbnr') let offline = 1 endif endwhile call setpos('.', savedpos) if lnumA == lnumB && colnumA == colnumB return lnumA else return -1 endif endfunction function! GetScalaIndent() " Find a non-blank line above the current line. let prevlnum = prevnonblank(v:lnum - 1) " Hit the start of the file, use zero indent. if prevlnum == 0 return 0 endif let ind = indent(prevlnum) let originalIndentValue = ind let prevline = scala#GetLine(prevlnum) let curlnum = v:lnum let curline = scala#GetLine(curlnum) if get(g:, 'scala_scaladoc_indent', 0) let star_indent = 2 else let star_indent = 1 end if prevline =~ '^\s*/\*\*' if prevline =~ '\*/\s*$' return ind else return ind + star_indent endif endif if curline =~ '^\s*\*' return cindent(curlnum) endif " If this line starts with a { then make it indent the same as the previous line if curline =~ '^\s*{' call scala#ConditionalConfirm("1") " Unless, of course, the previous one is a { as well if prevline !~ '^\s*{' call scala#ConditionalConfirm("2") return indent(prevlnum) endif endif " '.' continuations if curline =~ '^\s*\.' if prevline =~ '^\s*\.' return ind else return ind + shiftwidth() endif endif " Indent html literals if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$' call scala#ConditionalConfirm("3") return ind + shiftwidth() endif " assumes curly braces around try-block if curline =~ '^\s*}\s*\<catch\>' return ind - shiftwidth() elseif curline =~ '^\s*\<catch\>' return ind endif " Add a shiftwidth()' after lines that start a block " If 'if', 'for' or 'while' end with ), this is a one-line block " If 'val', 'var', 'def' end with =, this is a one-line block if (prevline =~ '^\s*\<\%(\%(}\?\s*else\s\+\)\?if\|for\|while\)\>.*[)=]\s*$' && scala#NumberOfBraceGroups(prevline) <= 1) \ || prevline =~ '^\s*' . s:defMatcher . '.*=\s*$' \ || prevline =~ '^\s*\<va[lr]\>.*[=]\s*$' \ || prevline =~ '^\s*\%(}\s*\)\?\<else\>\s*$' \ || prevline =~ '=\s*$' call scala#ConditionalConfirm("4") let ind = ind + shiftwidth() elseif prevline =~ '^\s*\<\%(}\?\s*else\s\+\)\?if\>' && curline =~ '^\s*}\?\s*\<else\>' return ind endif let lineCompletedBrackets = 0 let bracketCount = scala#CountBrackets(prevline, '{', '}') if bracketCount > 0 || prevline =~ '.*{\s*$' call scala#ConditionalConfirm("5b") let ind = ind + shiftwidth() elseif bracketCount < 0 call scala#ConditionalConfirm("6b") " if the closing brace actually completes the braces entirely, then we " have to indent to line that started the whole thing let completeLine = scala#LineCompletesBrackets('{', '}') if completeLine != -1 call scala#ConditionalConfirm("8b") let prevCompleteLine = scala#GetLine(prevnonblank(completeLine - 1)) " However, what actually started this part looks like it was a function " definition, so we need to indent to that line instead. This is " actually pretty weak at the moment. if prevCompleteLine =~ '=\s*$' call scala#ConditionalConfirm("9b") let ind = indent(prevnonblank(completeLine - 1)) else call scala#ConditionalConfirm("10b") let ind = indent(completeLine) endif else let lineCompletedBrackets = 1 endif endif if ind == originalIndentValue let bracketCount = scala#CountBrackets(prevline, '(', ')') if bracketCount > 0 || prevline =~ '.*(\s*$' call scala#ConditionalConfirm("5a") let ind = ind + shiftwidth() elseif bracketCount < 0 call scala#ConditionalConfirm("6a") " if the closing brace actually completes the braces entirely, then we " have to indent to line that started the whole thing let completeLine = scala#LineCompletesBrackets('(', ')') if completeLine != -1 && prevline !~ '^.*{\s*$' call scala#ConditionalConfirm("8a") let prevCompleteLine = scala#GetLine(prevnonblank(completeLine - 1)) " However, what actually started this part looks like it was a function " definition, so we need to indent to that line instead. This is " actually pretty weak at the moment. if prevCompleteLine =~ '=\s*$' call scala#ConditionalConfirm("9a") let ind = indent(prevnonblank(completeLine - 1)) else call scala#ConditionalConfirm("10a") let ind = indent(completeLine) endif else " This is the only part that's different from from the '{', '}' one below " Yup... some refactoring is necessary at some point. let ind = ind + (bracketCount * shiftwidth()) let lineCompletedBrackets = 1 endif endif endif if curline =~ '^\s*}\?\s*\<else\>\%(\s\+\<if\>\s*(.*)\)\?\s*{\?\s*$' && \ ! scala#LineIsCompleteIf(prevline) && \ prevline !~ '^.*}\s*$' let ind = ind - shiftwidth() endif " Subtract a shiftwidth()' on '}' or html let curCurlyCount = scala#CountCurlies(curline) if curCurlyCount < 0 call scala#ConditionalConfirm("14a") let matchline = scala#CurlyMatcher() return indent(matchline) elseif curline =~ '^\s*</[a-zA-Z][^>]*>' call scala#ConditionalConfirm("14c") return ind - shiftwidth() endif let prevParenCount = scala#CountParens(prevline) if prevline =~ '^\s*\<for\>.*$' && prevParenCount > 0 call scala#ConditionalConfirm("15") let ind = indent(prevlnum) + 5 endif let prevCurlyCount = scala#CountCurlies(prevline) if prevCurlyCount == 0 && prevline =~ '^.*\%(=>\|⇒\)\s*$' && prevline !~ '^\s*this\s*:.*\%(=>\|⇒\)\s*$' && curline !~ '^\s*\<case\>' call scala#ConditionalConfirm("16") let ind = ind + shiftwidth() endif if ind == originalIndentValue && curline =~ '^\s*\<case\>' call scala#ConditionalConfirm("17") let parentCase = scala#IsParentCase() if parentCase != -1 call scala#ConditionalConfirm("17a") return indent(parentCase) endif endif if prevline =~ '^\s*\*/' \ || prevline =~ '*/\s*$' call scala#ConditionalConfirm("18") let ind = ind - star_indent endif if scala#LineEndsInIncomplete(prevline) call scala#ConditionalConfirm("19") return ind endif if scala#LineIsAClosingXML(prevline) if scala#LineCompletesXML(prevlnum, prevline) call scala#ConditionalConfirm("20a") return ind - shiftwidth() else call scala#ConditionalConfirm("20b") return ind endif endif if ind == originalIndentValue "let indentMultiplier = scala#LineCompletesDefValr(prevlnum, prevline) "if indentMultiplier != 0 " call scala#ConditionalConfirm("19a") " let ind = ind - (indentMultiplier * shiftwidth()) let defValrLine = scala#Test(prevlnum, prevline, '{', '}') if defValrLine != -1 call scala#ConditionalConfirm("21a") let ind = indent(defValrLine) elseif lineCompletedBrackets == 0 call scala#ConditionalConfirm("21b") if scala#GetLine(prevnonblank(prevlnum - 1)) =~ '^.*\<else\>\s*\%(//.*\)\?$' call scala#ConditionalConfirm("21c") let ind = ind - shiftwidth() elseif scala#LineCompletesIfElse(prevlnum, prevline) call scala#ConditionalConfirm("21d") let ind = ind - shiftwidth() elseif scala#CountParens(curline) < 0 && curline =~ '^\s*)' && scala#GetLine(scala#GetLineThatMatchesBracket('(', ')')) =~ '.*(\s*$' " Handles situations that look like this: " " val a = func( " 10 " ) " " or " " val a = func( " 10 " ).somethingHere() call scala#ConditionalConfirm("21e") let ind = ind - shiftwidth() endif endif endif call scala#ConditionalConfirm("returning " . ind) return ind endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim:set sw=2 sts=2 ts=8 et: " vim600:fdm=marker fdl=1 fdc=0: ��������������������������neovim-0.2.2/runtime/indent/scheme.vim��������������������������������������������������������������0000664�0000000�0000000�00000000361�13204015742�0017733�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Scheme " Maintainer: Sergey Khorev <sergey.khorev@gmail.com> " Last Change: 2005 Jun 24 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif runtime! indent/lisp.vim �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/scss.vim����������������������������������������������������������������0000664�0000000�0000000�00000000277�13204015742�0017450�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: SCSS " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2010 Jul 26 if exists("b:did_indent") finish endif runtime! indent/css.vim " vim:set sw=2: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/sdl.vim�����������������������������������������������������������������0000664�0000000�0000000�00000005352�13204015742�0017256�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: SDL " Maintainer: Michael Piefel <entwurf@piefel.de> " Last Change: 10 December 2011 " Shamelessly stolen from the Vim-Script indent file " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetSDLIndent() setlocal indentkeys+==~end,=~state,*<Return> " Only define the function once. if exists("*GetSDLIndent") " finish endif let s:cpo_save = &cpo set cpo&vim function! GetSDLIndent() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " At the start of the file use zero indent. if lnum == 0 return 0 endif let ind = indent(lnum) let virtuality = '^\s*\(\(virtual\|redefined\|finalized\)\s\+\)\=\s*' " Add a single space to comments which use asterisks if getline(lnum) =~ '^\s*\*' let ind = ind - 1 endif if getline(v:lnum) =~ '^\s*\*' let ind = ind + 1 endif " Add a 'shiftwidth' after states, different blocks, decision (and alternatives), inputs if (getline(lnum) =~? '^\s*\(start\|state\|system\|package\|connection\|channel\|alternative\|macro\|operator\|newtype\|select\|substructure\|decision\|generator\|refinement\|service\|method\|exceptionhandler\|asntype\|syntype\|value\|(.*):\|\(priority\s\+\)\=input\|provided\)' \ || getline(lnum) =~? virtuality . '\(process\|procedure\|block\|object\)') \ && getline(lnum) !~? 'end[[:alpha:]]\+;$' let ind = ind + shiftwidth() endif " Subtract a 'shiftwidth' after states if getline(lnum) =~? '^\s*\(stop\|return\>\|nextstate\)' let ind = ind - shiftwidth() endif " Subtract a 'shiftwidth' on on end (uncompleted line) if getline(v:lnum) =~? '^\s*end\>' let ind = ind - shiftwidth() endif " Put each alternatives where the corresponding decision was if getline(v:lnum) =~? '^\s*\((.*)\|else\):' normal k let ind = indent(searchpair('^\s*decision', '', '^\s*enddecision', 'bW', \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "sdlString"')) endif " Put each state where the preceding state was if getline(v:lnum) =~? '^\s*state\>' let ind = indent(search('^\s*start', 'bW')) endif " Systems and packages are always in column 0 if getline(v:lnum) =~? '^\s*\(\(end\)\=system\|\(end\)\=package\)' return 0 endif " Put each end* where the corresponding begin was if getline(v:lnum) =~? '^\s*end[[:alpha:]]' normal k let partner=matchstr(getline(v:lnum), '\(' . virtuality . 'end\)\@<=[[:alpha:]]\+') let ind = indent(searchpair(virtuality . partner, '', '^\s*end' . partner, 'bW', \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "sdlString"')) endif return ind endfunction let &cpo = s:cpo_save unlet s:cpo_save " vim:sw=2 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/sh.vim������������������������������������������������������������������0000664�0000000�0000000�00000013124�13204015742�0017102�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Shell Script " Maintainer: Christian Brabandt <cb@256bit.org> " Previous Maintainer: Peter Aronoff <telemachus@arpinum.org> " Original Author: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2017-08-08 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-sh-indent " Changelog: " 20170808: - better indent of line continuation " 20170502: - get rid of buffer-shiftwidth function " 20160912: - preserve indentation of here-doc blocks " 20160627: - detect heredocs correctly " 20160213: - detect function definition correctly " 20160202: - use shiftwidth() function " 20151215: - set b:undo_indent variable " 20150728: - add foreach detection for zsh if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetShIndent() setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,0=end,),0=;;,0=;& setlocal indentkeys+=0=fin,0=fil,0=fip,0=fir,0=fix setlocal indentkeys-=:,0# setlocal nosmartindent let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<' if exists("*GetShIndent") finish endif let s:cpo_save = &cpo set cpo&vim let s:sh_indent_defaults = { \ 'default': function('shiftwidth'), \ 'continuation-line': function('shiftwidth'), \ 'case-labels': function('shiftwidth'), \ 'case-statements': function('shiftwidth'), \ 'case-breaks': 0 } function! s:indent_value(option) let Value = exists('b:sh_indent_options') \ && has_key(b:sh_indent_options, a:option) ? \ b:sh_indent_options[a:option] : \ s:sh_indent_defaults[a:option] if type(Value) == type(function('type')) return Value() endif return Value endfunction function! GetShIndent() let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif let pnum = prevnonblank(lnum - 1) let ind = indent(lnum) let line = getline(lnum) if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>' if line !~ '\<\%(fi\|esac\|done\|end\)\>\s*\%(#.*\)\=$' let ind += s:indent_value('default') endif elseif s:is_case_label(line, pnum) if !s:is_case_ended(line) let ind += s:indent_value('case-statements') endif elseif line =~ '^\s*\<\k\+\>\s*()\s*{' || line =~ '^\s*{' || line =~ '^\s*function\s*\w\S\+\s*\%(()\)\?\s*{' if line !~ '}\s*\%(#.*\)\=$' let ind += s:indent_value('default') endif elseif s:is_continuation_line(line) if pnum == 0 || !s:is_continuation_line(getline(pnum)) let ind += s:indent_value('continuation-line') endif elseif pnum != 0 && s:is_continuation_line(getline(pnum)) let ind = indent(s:find_continued_lnum(pnum)) endif let pine = line let line = getline(v:lnum) if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\|end\)\>' || line =~ '^\s*}' let ind -= s:indent_value('default') elseif line =~ '^\s*esac\>' && s:is_case_empty(getline(v:lnum - 1)) let ind -= s:indent_value('default') elseif line =~ '^\s*esac\>' let ind -= (s:is_case_label(pine, lnum) && s:is_case_ended(pine) ? \ 0 : s:indent_value('case-statements')) + \ s:indent_value('case-labels') if s:is_case_break(pine) let ind += s:indent_value('case-breaks') endif elseif s:is_case_label(line, lnum) if s:is_case(pine) let ind = indent(lnum) + s:indent_value('case-labels') else let ind -= (s:is_case_label(pine, lnum) && s:is_case_ended(pine) ? \ 0 : s:indent_value('case-statements')) - \ s:indent_value('case-breaks') endif elseif s:is_case_break(line) let ind -= s:indent_value('case-breaks') elseif s:is_here_doc(line) let ind = 0 " statements, executed within a here document. Keep the current indent elseif match(map(synstack(v:lnum, 1), 'synIDattr(v:val, "name")'), '\c\mheredoc') > -1 return indent(v:lnum) endif return ind endfunction function! s:is_continuation_line(line) return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\||\)' . \ '\s*\({\s*\)\=\(#.*\)\=$' endfunction function! s:find_continued_lnum(lnum) let i = a:lnum while i > 1 && s:is_continuation_line(getline(i - 1)) let i -= 1 endwhile return i endfunction function! s:is_case_label(line, pnum) if a:line !~ '^\s*(\=.*)' return 0 endif if a:pnum > 0 let pine = getline(a:pnum) if !(s:is_case(pine) || s:is_case_ended(pine)) return 0 endif endif let suffix = substitute(a:line, '^\s*(\=', "", "") let nesting = 0 let i = 0 let n = strlen(suffix) while i < n let c = suffix[i] let i += 1 if c == '\\' let i += 1 elseif c == '(' let nesting += 1 elseif c == ')' if nesting == 0 return 1 endif let nesting -= 1 endif endwhile return 0 endfunction function! s:is_case(line) return a:line =~ '^\s*case\>' endfunction function! s:is_case_break(line) return a:line =~ '^\s*;[;&]' endfunction function! s:is_here_doc(line) if a:line =~ '^\w\+$' let here_pat = '<<-\?'. s:escape(a:line). '\$' return search(here_pat, 'bnW') > 0 endif return 0 endfunction function! s:is_case_ended(line) return s:is_case_break(a:line) || a:line =~ ';[;&]\s*\%(#.*\)\=$' endfunction function! s:is_case_empty(line) if a:line =~ '^\s*$' || a:line =~ '^\s*#' return s:is_case_empty(getline(v:lnum - 1)) else return a:line =~ '^\s*case\>' endif endfunction function! s:escape(pattern) return '\V'. escape(a:pattern, '\\') endfunction let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/sml.vim�����������������������������������������������������������������0000664�0000000�0000000�00000014516�13204015742�0017271�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: SML " Maintainer: Saikat Guha <sg266@cornell.edu> " Hubert Chao <hc85@cornell.edu> " Original OCaml Version: " Jean-Francois Yuen <jfyuen@ifrance.com> " Mike Leary <leary@nwlink.com> " Markus Mottl <markus@oefai.at> " OCaml URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim " Last Change: 2003 Jan 04 - Adapted to SML " 2002 Nov 06 - Some fixes (JY) " 2002 Oct 28 - Fixed bug with indentation of ']' (MM) " 2002 Oct 22 - Major rewrite (JY) " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal expandtab setlocal indentexpr=GetSMLIndent() setlocal indentkeys+=0=and,0=else,0=end,0=handle,0=if,0=in,0=let,0=then,0=val,0=fun,0=\|,0=*),0) setlocal nolisp setlocal nosmartindent setlocal textwidth=80 setlocal shiftwidth=2 " Comment formatting if (has("comments")) set comments=sr:(*,mb:*,ex:*) set fo=cqort endif " Only define the function once. "if exists("*GetSMLIndent") "finish "endif " Define some patterns: let s:beflet = '^\s*\(initializer\|method\|try\)\|\(\<\(begin\|do\|else\|in\|then\|try\)\|->\|;\)\s*$' let s:letpat = '^\s*\(let\|type\|module\|class\|open\|exception\|val\|include\|external\)\>' let s:letlim = '\(\<\(sig\|struct\)\|;;\)\s*$' let s:lim = '^\s*\(exception\|external\|include\|let\|module\|open\|type\|val\)\>' let s:module = '\<\%(let\|sig\|struct\)\>' let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object\|object\s*(.*)\)\s*$' let s:type = '^\s*\%(let\|type\)\>.*=' let s:val = '^\s*\(val\|external\)\>.*:' " Skipping pattern, for comments function! s:SkipPattern(lnum, pat) let def = prevnonblank(a:lnum - 1) while def > 0 && getline(def) =~ a:pat let def = prevnonblank(def - 1) endwhile return def endfunction " Indent for ';;' to match multiple 'let' function! s:GetInd(lnum, pat, lim) let llet = search(a:pat, 'bW') let old = indent(a:lnum) while llet > 0 let old = indent(llet) let nb = s:SkipPattern(llet, '^\s*(\*.*\*)\s*$') if getline(nb) =~ a:lim return old endif let llet = search(a:pat, 'bW') endwhile return old endfunction " Indent pairs function! s:FindPair(pstart, pmid, pend) call search(a:pend, 'bW') " return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) let lno = searchpair(a:pstart, a:pmid, a:pend, 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"') if lno == -1 return indent(lno) else return col(".") - 1 endif endfunction function! s:FindLet(pstart, pmid, pend) call search(a:pend, 'bW') " return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) let lno = searchpair(a:pstart, a:pmid, a:pend, 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"') let moduleLine = getline(lno) if lno == -1 || moduleLine =~ '^\s*\(fun\|structure\|signature\)\>' return indent(lno) else return col(".") - 1 endif endfunction " Indent 'let' "function! s:FindLet(pstart, pmid, pend) " call search(a:pend, 'bW') " return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\<in\\s*$" || getline(prevnonblank(".") - 1) =~ "^\\s*let\\>.*=\\s*$\\|" . s:beflet')) "endfunction function! GetSMLIndent() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " At the start of the file use zero indent. if lnum == 0 return 0 endif let ind = indent(lnum) let lline = getline(lnum) " Return double 'shiftwidth' after lines matching: if lline =~ '^\s*|.*=>\s*$' return ind + 2 *shiftwidth() elseif lline =~ '^\s*val\>.*=\s*$' return ind + shiftwidth() endif let line = getline(v:lnum) " Indent lines starting with 'end' to matching module if line =~ '^\s*end\>' return s:FindLet(s:module, '', '\<end\>') " Match 'else' with 'if' elseif line =~ '^\s*else\>' if lline !~ '^\s*\(if\|else\|then\)\>' return s:FindPair('\<if\>', '', '\<then\>') else return ind endif " Match 'then' with 'if' elseif line =~ '^\s*then\>' if lline !~ '^\s*\(if\|else\|then\)\>' return s:FindPair('\<if\>', '', '\<then\>') else return ind endif " Indent if current line begins with ']' elseif line =~ '^\s*\]' return s:FindPair('\[','','\]') " Indent current line starting with 'in' to last matching 'let' elseif line =~ '^\s*in\>' let ind = s:FindLet('\<let\>','','\<in\>') " Indent from last matching module if line matches: elseif line =~ '^\s*\(fun\|val\|open\|structure\|and\|datatype\|type\|exception\)\>' cursor(lnum,1) let lastModule = indent(searchpair(s:module, '', '\<end\>', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) if lastModule == -1 return 0 else return lastModule + shiftwidth() endif " Indent lines starting with '|' from matching 'case', 'handle' elseif line =~ '^\s*|' " cursor(lnum,1) let lastSwitch = search('\<\(case\|handle\|fun\|datatype\)\>','bW') let switchLine = getline(lastSwitch) let switchLineIndent = indent(lastSwitch) if lline =~ '^\s*|' return ind endif if switchLine =~ '\<case\>' return col(".") + 2 elseif switchLine =~ '\<handle\>' return switchLineIndent + shiftwidth() elseif switchLine =~ '\<datatype\>' call search('=') return col(".") - 1 else return switchLineIndent + 2 endif " Indent if last line ends with 'sig', 'struct', 'let', 'then', 'else', " 'in' elseif lline =~ '\<\(sig\|struct\|let\|in\|then\|else\)\s*$' let ind = ind + shiftwidth() " Indent if last line ends with 'of', align from 'case' elseif lline =~ '\<\(of\)\s*$' call search('\<case\>',"bW") let ind = col(".")+4 " Indent if current line starts with 'of' elseif line =~ '^\s*of\>' call search('\<case\>',"bW") let ind = col(".")+1 " Indent if last line starts with 'fun', 'case', 'fn' elseif lline =~ '^\s*\(fun\|fn\|case\)\>' let ind = ind + shiftwidth() endif " Don't indent 'let' if last line started with 'fun', 'fn' if line =~ '^\s*let\>' if lline =~ '^\s*\(fun\|fn\)' let ind = ind - shiftwidth() endif endif return ind endfunction " vim:sw=2 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/sql.vim�����������������������������������������������������������������0000664�0000000�0000000�00000002264�13204015742�0017272�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file loader " Language: SQL " Maintainer: David Fishburn <fishburn at ianywhere dot com> " Last Change: Thu Sep 15 2005 10:27:51 AM " Version: 1.0 " Download: http://vim.sourceforge.net/script.php?script_id=495 " Description: Checks for a: " buffer local variable, " global variable, " If the above exist, it will source the type specified. " If none exist, it will source the default sqlanywhere.vim file. " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Default to the standard Vim distribution file let filename = 'sqlanywhere' " Check for overrides. Buffer variables have the highest priority. if exists("b:sql_type_override") " Check the runtimepath to see if the file exists if globpath(&runtimepath, 'indent/'.b:sql_type_override.'.vim') != '' let filename = b:sql_type_override endif elseif exists("g:sql_type_default") if globpath(&runtimepath, 'indent/'.g:sql_type_default.'.vim') != '' let filename = g:sql_type_default endif endif " Source the appropriate file exec 'runtime indent/'.filename.'.vim' " vim:sw=4: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/sqlanywhere.vim���������������������������������������������������������0000664�0000000�0000000�00000031556�13204015742�0021043�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: SQL " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> " Last Change: 2017 Jun 13 " Version: 3.0 " Download: http://vim.sourceforge.net/script.php?script_id=495 " Notes: " Indenting keywords are based on Oracle and Sybase Adaptive Server " Anywhere (ASA). Test indenting was done with ASA stored procedures and " fuctions and Oracle packages which contain stored procedures and " functions. " This has not been tested against Microsoft SQL Server or " Sybase Adaptive Server Enterprise (ASE) which use the Transact-SQL " syntax. That syntax does not have end tags for IF's, which makes " indenting more difficult. " " Known Issues: " The Oracle MERGE statement does not have an end tag associated with " it, this can leave the indent hanging to the right one too many. " " History: " 3.0 (Dec 2012) " Added cpo check " " 2.0 " Added the FOR keyword to SQLBlockStart to handle (Alec Tica): " for i in 1..100 loop " |<-- I expect to have indentation here " end loop; " " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 let b:current_indent = "sqlanywhere" setlocal indentkeys-=0{ setlocal indentkeys-=0} setlocal indentkeys-=: setlocal indentkeys-=0# setlocal indentkeys-=e " This indicates formatting should take place when one of these " expressions is used. These expressions would normally be something " you would type at the BEGINNING of a line " SQL is generally case insensitive, so this files assumes that " These keywords are something that would trigger an indent LEFT, not " an indent right, since the SQLBlockStart is used for those keywords setlocal indentkeys+==~end,=~else,=~elseif,=~elsif,0=~when,0=) " GetSQLIndent is executed whenever one of the expressions " in the indentkeys is typed setlocal indentexpr=GetSQLIndent() " Only define the functions once. if exists("*GetSQLIndent") finish endif let s:keepcpo= &cpo set cpo&vim " List of all the statements that start a new block. " These are typically words that start a line. " IS is excluded, since it is difficult to determine when the " ending block is (especially for procedures/functions). let s:SQLBlockStart = '^\s*\%('. \ 'if\|else\|elseif\|elsif\|'. \ 'while\|loop\|do\|for\|'. \ 'begin\|'. \ 'case\|when\|merge\|exception'. \ '\)\>' let s:SQLBlockEnd = '^\s*\(end\)\>' " The indent level is also based on unmatched paranethesis " If a line has an extra "(" increase the indent " If a line has an extra ")" decrease the indent function! s:CountUnbalancedParan( line, paran_to_check ) let l = a:line let lp = substitute(l, '[^(]', '', 'g') let l = a:line let rp = substitute(l, '[^)]', '', 'g') if a:paran_to_check =~ ')' " echom 'CountUnbalancedParan ) returning: ' . " \ (strlen(rp) - strlen(lp)) return (strlen(rp) - strlen(lp)) elseif a:paran_to_check =~ '(' " echom 'CountUnbalancedParan ( returning: ' . " \ (strlen(lp) - strlen(rp)) return (strlen(lp) - strlen(rp)) else " echom 'CountUnbalancedParan unknown paran to check: ' . " \ a:paran_to_check return 0 endif endfunction " Unindent commands based on previous indent level function! s:CheckToIgnoreRightParan( prev_lnum, num_levels ) let lnum = a:prev_lnum let line = getline(lnum) let ends = 0 let num_right_paran = a:num_levels let ignore_paran = 0 let vircol = 1 while num_right_paran > 0 silent! exec 'norm! '.lnum."G\<bar>".vircol."\<bar>" let right_paran = search( ')', 'W' ) if right_paran != lnum " This should not happen since there should be at least " num_right_paran matches for this line break endif let vircol = virtcol(".") " if getline(".") =~ '^)' let matching_paran = searchpair('(', '', ')', 'bW', \ 's:IsColComment(line("."), col("."))') if matching_paran < 1 " No match found " echom 'CTIRP - no match found, ignoring' break endif if matching_paran == lnum " This was not an unmatched parantenses, start the search again " again after this column " echom 'CTIRP - same line match, ignoring' continue endif " echom 'CTIRP - match: ' . line(".") . ' ' . getline(".") if getline(matching_paran) =~? '\(if\|while\)\>' " echom 'CTIRP - if/while ignored: ' . line(".") . ' ' . getline(".") let ignore_paran = ignore_paran + 1 endif " One match found, decrease and check for further matches let num_right_paran = num_right_paran - 1 endwhile " Fallback - just move back one " return a:prev_indent - shiftwidth() return ignore_paran endfunction " Based on the keyword provided, loop through previous non empty " non comment lines to find the statement that initated the keyword. " Return its indent level " CASE .. " WHEN ... " Should return indent level of CASE " EXCEPTION .. " WHEN ... " something; " WHEN ... " Should return indent level of exception. function! s:GetStmtStarterIndent( keyword, curr_lnum ) let lnum = a:curr_lnum " Default - reduce indent by 1 let ind = indent(a:curr_lnum) - shiftwidth() if a:keyword =~? 'end' exec 'normal! ^' let stmts = '^\s*\%('. \ '\<begin\>\|' . \ '\%(\%(\<end\s\+\)\@<!\<loop\>\)\|' . \ '\%(\%(\<end\s\+\)\@<!\<case\>\)\|' . \ '\%(\%(\<end\s\+\)\@<!\<for\>\)\|' . \ '\%(\%(\<end\s\+\)\@<!\<if\>\)'. \ '\)' let matching_lnum = searchpair(stmts, '', '\<end\>\zs', 'bW', \ 's:IsColComment(line("."), col(".")) == 1') exec 'normal! $' if matching_lnum > 0 && matching_lnum < a:curr_lnum let ind = indent(matching_lnum) endif elseif a:keyword =~? 'when' exec 'normal! ^' let matching_lnum = searchpair( \ '\%(\<end\s\+\)\@<!\<case\>\|\<exception\>\|\<merge\>', \ '', \ '\%(\%(\<when\s\+others\>\)\|\%(\<end\s\+case\>\)\)', \ 'bW', \ 's:IsColComment(line("."), col(".")) == 1') exec 'normal! $' if matching_lnum > 0 && matching_lnum < a:curr_lnum let ind = indent(matching_lnum) else let ind = indent(a:curr_lnum) endif endif return ind endfunction " Check if the line is a comment function! s:IsLineComment(lnum) let rc = synIDattr( \ synID(a:lnum, \ match(getline(a:lnum), '\S')+1, 0) \ , "name") \ =~? "comment" return rc endfunction " Check if the column is a comment function! s:IsColComment(lnum, cnum) let rc = synIDattr(synID(a:lnum, a:cnum, 0), "name") \ =~? "comment" return rc endfunction " Instead of returning a column position, return " an appropriate value as a factor of shiftwidth. function! s:ModuloIndent(ind) let ind = a:ind if ind > 0 let modulo = ind % shiftwidth() if modulo > 0 let ind = ind - modulo endif endif return ind endfunction " Find correct indent of a new line based upon the previous line function! GetSQLIndent() let lnum = v:lnum let ind = indent(lnum) " If the current line is a comment, leave the indent as is " Comment out this additional check since it affects the " indenting of =, and will not reindent comments as it should " if s:IsLineComment(lnum) == 1 " return ind " endif " Get previous non-blank line let prevlnum = prevnonblank(lnum - 1) if prevlnum <= 0 return ind endif if s:IsLineComment(prevlnum) == 1 if getline(v:lnum) =~ '^\s*\*' let ind = s:ModuloIndent(indent(prevlnum)) return ind + 1 endif " If the previous line is a comment, then return -1 " to tell Vim to use the formatoptions setting to determine " the indent to use " But only if the next line is blank. This would be true if " the user is typing, but it would not be true if the user " is reindenting the file if getline(v:lnum) =~ '^\s*$' return -1 endif endif " echom 'PREVIOUS INDENT: ' . indent(prevlnum) . ' LINE: ' . getline(prevlnum) " This is the line you just hit return on, it is not the current line " which is new and empty " Based on this line, we can determine how much to indent the new " line " Get default indent (from prev. line) let ind = indent(prevlnum) let prevline = getline(prevlnum) " Now check what's on the previous line to determine if the indent " should be changed, for example IF, BEGIN, should increase the indent " where END IF, END, should decrease the indent. if prevline =~? s:SQLBlockStart " Move indent in let ind = ind + shiftwidth() " echom 'prevl - SQLBlockStart - indent ' . ind . ' line: ' . prevline elseif prevline =~ '[()]' if prevline =~ '(' let num_unmatched_left = s:CountUnbalancedParan( prevline, '(' ) else let num_unmatched_left = 0 endif if prevline =~ ')' let num_unmatched_right = s:CountUnbalancedParan( prevline, ')' ) else let num_unmatched_right = 0 " let num_unmatched_right = s:CountUnbalancedParan( prevline, ')' ) endif if num_unmatched_left > 0 " There is a open left paranethesis " increase indent let ind = ind + ( shiftwidth() * num_unmatched_left ) elseif num_unmatched_right > 0 " if it is an unbalanced paranethesis only unindent if " it was part of a command (ie create table(..) ) " instead of part of an if (ie if (....) then) which should " maintain the indent level let ignore = s:CheckToIgnoreRightParan( prevlnum, num_unmatched_right ) " echom 'prevl - ) unbalanced - CTIRP - ignore: ' . ignore if prevline =~ '^\s*)' let ignore = ignore + 1 " echom 'prevl - begins ) unbalanced ignore: ' . ignore endif if (num_unmatched_right - ignore) > 0 let ind = ind - ( shiftwidth() * (num_unmatched_right - ignore) ) endif endif endif " echom 'CURRENT INDENT: ' . ind . ' LINE: ' . getline(v:lnum) " This is a new blank line since we just typed a carriage return " Check current line; search for simplistic matching start-of-block let line = getline(v:lnum) if line =~? '^\s*els' " Any line when you type else will automatically back up one " ident level (ie else, elseif, elsif) let ind = ind - shiftwidth() " echom 'curr - else - indent ' . ind elseif line =~? '^\s*end\>' let ind = s:GetStmtStarterIndent('end', v:lnum) " General case for end " let ind = ind - shiftwidth() " echom 'curr - end - indent ' . ind elseif line =~? '^\s*when\>' let ind = s:GetStmtStarterIndent('when', v:lnum) " If the WHEN clause is used with a MERGE or EXCEPTION " clause, do not change the indent level, since these " statements do not have a corresponding END statement. " if stmt_starter =~? 'case' " let ind = ind - shiftwidth() " endif " elseif line =~ '^\s*)\s*;\?\s*$' " elseif line =~ '^\s*)' elseif line =~ '^\s*)' let num_unmatched_right = s:CountUnbalancedParan( line, ')' ) let ignore = s:CheckToIgnoreRightParan( v:lnum, num_unmatched_right ) " If the line ends in a ), then reduce the indent " This catches items like: " CREATE TABLE T1( " c1 int, " c2 int " ); " But we do not want to unindent a line like: " IF ( c1 = 1 " AND c2 = 3 ) THEN " let num_unmatched_right = s:CountUnbalancedParan( line, ')' ) " if num_unmatched_right > 0 " elseif strpart( line, strlen(line)-1, 1 ) =~ ')' " let ind = ind - shiftwidth() if line =~ '^\s*)' " let ignore = ignore + 1 " echom 'curr - begins ) unbalanced ignore: ' . ignore endif if (num_unmatched_right - ignore) > 0 let ind = ind - ( shiftwidth() * (num_unmatched_right - ignore) ) endif " endif endif " echom 'final - indent ' . ind return s:ModuloIndent(ind) endfunction " Restore: let &cpo= s:keepcpo unlet s:keepcpo " vim: ts=4 fdm=marker sw=4 ��������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/systemd.vim�������������������������������������������������������������0000664�0000000�0000000�00000000315�13204015742�0020156�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: systemd.unit(5) " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Looks a lot like dosini files. runtime! indent/dosini.vim �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/systemverilog.vim�������������������������������������������������������0000664�0000000�0000000�00000020601�13204015742�0021402�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: SystemVerilog " Maintainer: kocha <kocha.lsifrontend@gmail.com> " Last Change: 12-Aug-2013. " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=SystemVerilogIndent() setlocal indentkeys=!^F,o,O,0),0},=begin,=end,=join,=endcase,=join_any,=join_none setlocal indentkeys+==endmodule,=endfunction,=endtask,=endspecify setlocal indentkeys+==endclass,=endpackage,=endsequence,=endclocking setlocal indentkeys+==endinterface,=endgroup,=endprogram,=endproperty,=endchecker setlocal indentkeys+==`else,=`endif " Only define the function once. if exists("*SystemVerilogIndent") finish endif let s:cpo_save = &cpo set cpo&vim function SystemVerilogIndent() if exists('b:systemverilog_indent_width') let offset = b:systemverilog_indent_width else let offset = shiftwidth() endif if exists('b:systemverilog_indent_modules') let indent_modules = offset else let indent_modules = 0 endif " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " At the start of the file use zero indent. if lnum == 0 return 0 endif let lnum2 = prevnonblank(lnum - 1) let curr_line = getline(v:lnum) let last_line = getline(lnum) let last_line2 = getline(lnum2) let ind = indent(lnum) let ind2 = indent(lnum - 1) let offset_comment1 = 1 " Define the condition of an open statement " Exclude the match of //, /* or */ let sv_openstat = '\(\<or\>\|\([*/]\)\@<![*(,{><+-/%^&|!=?:]\([*/]\)\@!\)' " Define the condition when the statement ends with a one-line comment let sv_comment = '\(//.*\|/\*.*\*/\s*\)' if exists('b:verilog_indent_verbose') let vverb_str = 'INDENT VERBOSE:' let vverb = 1 else let vverb = 0 endif " Indent accoding to last line " End of multiple-line comment if last_line =~ '\*/\s*$' && last_line !~ '/\*.\{-}\*/' let ind = ind - offset_comment1 if vverb echo vverb_str "De-indent after a multiple-line comment." endif " Indent after if/else/for/case/always/initial/specify/fork blocks elseif last_line =~ '`\@<!\<\(if\|else\)\>' || \ last_line =~ '^\s*\<\(for\|case\%[[zx]]\|do\|foreach\|randcase\)\>' || \ last_line =~ '^\s*\<\(always\|always_comb\|always_ff\|always_latch\)\>' || \ last_line =~ '^\s*\<\(initial\|specify\|fork\|final\)\>' if last_line !~ '\(;\|\<end\>\)\s*' . sv_comment . '*$' || \ last_line =~ '\(//\|/\*\).*\(;\|\<end\>\)\s*' . sv_comment . '*$' let ind = ind + offset if vverb | echo vverb_str "Indent after a block statement." | endif endif " Indent after function/task/class/package/sequence/clocking/ " interface/covergroup/property/checkerprogram blocks elseif last_line =~ '^\s*\<\(function\|task\|class\|package\)\>' || \ last_line =~ '^\s*\<\(sequence\|clocking\|interface\)\>' || \ last_line =~ '^\s*\(\w\+\s*:\)\=\s*\<covergroup\>' || \ last_line =~ '^\s*\<\(property\|checker\|program\)\>' if last_line !~ '\<end\>\s*' . sv_comment . '*$' || \ last_line =~ '\(//\|/\*\).*\(;\|\<end\>\)\s*' . sv_comment . '*$' let ind = ind + offset if vverb echo vverb_str "Indent after function/task/class block statement." endif endif " Indent after module/function/task/specify/fork blocks elseif last_line =~ '^\s*\(\<extern\>\s*\)\=\<module\>' let ind = ind + indent_modules if vverb && indent_modules echo vverb_str "Indent after module statement." endif if last_line =~ '[(,]\s*' . sv_comment . '*$' && \ last_line !~ '\(//\|/\*\).*[(,]\s*' . sv_comment . '*$' let ind = ind + offset if vverb echo vverb_str "Indent after a multiple-line module statement." endif endif " Indent after a 'begin' statement elseif last_line =~ '\(\<begin\>\)\(\s*:\s*\w\+\)*' . sv_comment . '*$' && \ last_line !~ '\(//\|/\*\).*\(\<begin\>\)' && \ ( last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' || \ last_line2 =~ '^\s*[^=!]\+\s*:\s*' . sv_comment . '*$' ) let ind = ind + offset if vverb | echo vverb_str "Indent after begin statement." | endif " Indent after a '{' or a '(' elseif last_line =~ '[{(]' . sv_comment . '*$' && \ last_line !~ '\(//\|/\*\).*[{(]' && \ ( last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' || \ last_line2 =~ '^\s*[^=!]\+\s*:\s*' . sv_comment . '*$' ) let ind = ind + offset if vverb | echo vverb_str "Indent after begin statement." | endif " De-indent for the end of one-line block elseif ( last_line !~ '\<begin\>' || \ last_line =~ '\(//\|/\*\).*\<begin\>' ) && \ last_line2 =~ '\<\(`\@<!if\|`\@<!else\|for\|always\|initial\|do\|foreach\|final\)\>.*' . \ sv_comment . '*$' && \ last_line2 !~ '\(//\|/\*\).*\<\(`\@<!if\|`\@<!else\|for\|always\|initial\|do\|foreach\|final\)\>' && \ last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' && \ ( last_line2 !~ '\<begin\>' || \ last_line2 =~ '\(//\|/\*\).*\<begin\>' ) let ind = ind - offset if vverb echo vverb_str "De-indent after the end of one-line statement." endif " Multiple-line statement (including case statement) " Open statement " Ident the first open line elseif last_line =~ sv_openstat . '\s*' . sv_comment . '*$' && \ last_line !~ '\(//\|/\*\).*' . sv_openstat . '\s*$' && \ last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' let ind = ind + offset if vverb | echo vverb_str "Indent after an open statement." | endif " Close statement " De-indent for an optional close parenthesis and a semicolon, and only " if there exists precedent non-whitespace char elseif last_line =~ ')*\s*;\s*' . sv_comment . '*$' && \ last_line !~ '^\s*)*\s*;\s*' . sv_comment . '*$' && \ last_line !~ '\(//\|/\*\).*\S)*\s*;\s*' . sv_comment . '*$' && \ ( last_line2 =~ sv_openstat . '\s*' . sv_comment . '*$' && \ last_line2 !~ ';\s*//.*$') && \ last_line2 !~ '^\s*' . sv_comment . '$' let ind = ind - offset if vverb | echo vverb_str "De-indent after a close statement." | endif " `ifdef and `else elseif last_line =~ '^\s*`\<\(ifdef\|else\)\>' let ind = ind + offset if vverb echo vverb_str "Indent after a `ifdef or `else statement." endif endif " Re-indent current line " De-indent on the end of the block " join/end/endcase/endfunction/endtask/endspecify if curr_line =~ '^\s*\<\(join\|join_any\|join_none\|\|end\|endcase\|while\)\>' || \ curr_line =~ '^\s*\<\(endfunction\|endtask\|endspecify\|endclass\)\>' || \ curr_line =~ '^\s*\<\(endpackage\|endsequence\|endclocking\|endinterface\)\>' || \ curr_line =~ '^\s*\<\(endgroup\|endproperty\|endchecker\|endprogram\)\>' || \ curr_line =~ '^\s*}' let ind = ind - offset if vverb | echo vverb_str "De-indent the end of a block." | endif elseif curr_line =~ '^\s*\<endmodule\>' let ind = ind - indent_modules if vverb && indent_modules echo vverb_str "De-indent the end of a module." endif " De-indent on a stand-alone 'begin' elseif curr_line =~ '^\s*\<begin\>' if last_line !~ '^\s*\<\(function\|task\|specify\|module\|class\|package\)\>' || \ last_line !~ '^\s*\<\(sequence\|clocking\|interface\|covergroup\)\>' || \ last_line !~ '^\s*\<\(property\|checker\|program\)\>' && \ last_line !~ '^\s*\()*\s*;\|)\+\)\s*' . sv_comment . '*$' && \ ( last_line =~ \ '\<\(`\@<!if\|`\@<!else\|for\|case\%[[zx]]\|always\|initial\|do\|foreach\|randcase\|final\)\>' || \ last_line =~ ')\s*' . sv_comment . '*$' || \ last_line =~ sv_openstat . '\s*' . sv_comment . '*$' ) let ind = ind - offset if vverb echo vverb_str "De-indent a stand alone begin statement." endif endif " De-indent after the end of multiple-line statement elseif curr_line =~ '^\s*)' && \ ( last_line =~ sv_openstat . '\s*' . sv_comment . '*$' || \ last_line !~ sv_openstat . '\s*' . sv_comment . '*$' && \ last_line2 =~ sv_openstat . '\s*' . sv_comment . '*$' ) let ind = ind - offset if vverb echo vverb_str "De-indent the end of a multiple statement." endif " De-indent `else and `endif elseif curr_line =~ '^\s*`\<\(else\|endif\)\>' let ind = ind - offset if vverb | echo vverb_str "De-indent `else and `endif statement." | endif endif " Return the indention return ind endfunction let &cpo = s:cpo_save unlet s:cpo_save " vim:sw=2 �������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/tcl.vim�����������������������������������������������������������������0000664�0000000�0000000�00000003135�13204015742�0017253�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Tcl " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetTclIndent() setlocal indentkeys=0{,0},!^F,o,O,0] setlocal nosmartindent if exists("*GetTclIndent") finish endif function s:prevnonblanknoncomment(lnum) let lnum = prevnonblank(a:lnum) while lnum > 0 let line = getline(lnum) if line !~ '^\s*\(#\|$\)' break endif let lnum = prevnonblank(lnum - 1) endwhile return lnum endfunction function s:count_braces(lnum, count_open) let n_open = 0 let n_close = 0 let line = getline(a:lnum) let pattern = '[{}]' let i = match(line, pattern) while i != -1 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'tcl\%(Comment\|String\)' if line[i] == '{' let n_open += 1 elseif line[i] == '}' if n_open > 0 let n_open -= 1 else let n_close += 1 endif endif endif let i = match(line, pattern, i + 1) endwhile return a:count_open ? n_open : n_close endfunction function GetTclIndent() let line = getline(v:lnum) if line =~ '^\s*\*' return cindent(v:lnum) elseif line =~ '^\s*}' return indent(v:lnum) - shiftwidth() endif let pnum = s:prevnonblanknoncomment(v:lnum - 1) if pnum == 0 return 0 endif let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth() let pline = getline(pnum) if pline =~ '}\s*$' let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth() endif return ind endfunction �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/tcsh.vim����������������������������������������������������������������0000664�0000000�0000000�00000002366�13204015742�0017437�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: C-shell (tcsh) " Maintainer: GI <a@b.c>, where a='gi1242+vim', b='gmail', c='com' " Last Modified: Sat 10 Dec 2011 09:23:00 AM EST " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=TcshGetIndent() setlocal indentkeys+=e,0=end,0=endsw indentkeys-=0{,0},0),:,0# " Only define the function once. if exists("*TcshGetIndent") finish endif function TcshGetIndent() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif " Add indent if previous line begins with while or foreach " OR line ends with case <str>:, default:, else, then or \ let ind = indent(lnum) let line = getline(lnum) if line =~ '\v^\s*%(while|foreach)>|^\s*%(case\s.*:|default:|else)\s*$|%(<then|\\)$' let ind = ind + shiftwidth() endif if line =~ '\v^\s*breaksw>' let ind = ind - shiftwidth() endif " Subtract indent if current line has on end, endif, case commands let line = getline(v:lnum) if line =~ '\v^\s*%(else|end|endif)\s*$' let ind = ind - shiftwidth() endif return ind endfunction ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/teraterm.vim������������������������������������������������������������0000664�0000000�0000000�00000002525�13204015742�0020316�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Tera Term Language (TTL) " Based on Tera Term Version 4.92 " Maintainer: Ken Takata " URL: https://github.com/k-takata/vim-teraterm " Last Change: 2017 Jun 13 " Filenames: *.ttl " License: VIM License if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal nosmartindent setlocal noautoindent setlocal indentexpr=GetTeraTermIndent(v:lnum) setlocal indentkeys=!^F,o,O,e setlocal indentkeys+==elseif,=endif,=loop,=next,=enduntil,=endwhile if exists("*GetTeraTermIndent") finish endif function! GetTeraTermIndent(lnum) let l:prevlnum = prevnonblank(a:lnum-1) if l:prevlnum == 0 " top of file return 0 endif " grab the previous and current line, stripping comments. let l:prevl = substitute(getline(l:prevlnum), ';.*$', '', '') let l:thisl = substitute(getline(a:lnum), ';.*$', '', '') let l:previ = indent(l:prevlnum) let l:ind = l:previ if l:prevl =~ '^\s*if\>.*\<then\>' " previous line opened a block let l:ind += shiftwidth() endif if l:prevl =~ '^\s*\%(elseif\|else\|do\|until\|while\|for\)\>' " previous line opened a block let l:ind += shiftwidth() endif if l:thisl =~ '^\s*\%(elseif\|else\|endif\|enduntil\|endwhile\|loop\|next\)\>' " this line closed a block let l:ind -= shiftwidth() endif return l:ind endfunction " vim: ts=8 sw=2 sts=2 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/tex.vim�����������������������������������������������������������������0000664�0000000�0000000�00000032317�13204015742�0017275�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: LaTeX " Maintainer: Yichao Zhou <broken.zhou AT gmail.com> " Created: Sat, 16 Feb 2002 16:50:19 +0100 " Version: 0.9.4 " Please email me if you found something I can do. Comments, bug report and " feature request are welcome. " Last Update: {{{ " 25th Sep 2002, by LH : " (*) better support for the option " (*) use some regex instead of several '||'. " Oct 9th, 2003, by JT: " (*) don't change indentation of lines starting with '%' " 2005/06/15, Moshe Kaminsky <kaminsky AT math.huji.ac.il> " (*) New variables: " g:tex_items, g:tex_itemize_env, g:tex_noindent_env " 2011/3/6, by Yichao Zhou <broken.zhou AT gmail.com> " (*) Don't change indentation of lines starting with '%' " I don't see any code with '%' and it doesn't work properly " so I add some code. " (*) New features: Add smartindent-like indent for "{}" and "[]". " (*) New variables: g:tex_indent_brace " 2011/9/25, by Yichao Zhou <broken.zhou AT gmail.com> " (*) Bug fix: smartindent-like indent for "[]" " (*) New features: Align with "&". " (*) New variable: g:tex_indent_and. " 2011/10/23 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Bug fix: improve the smartindent-like indent for "{}" and " "[]". " 2012/02/27 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Bug fix: support default folding marker. " (*) Indent with "&" is not very handy. Make it not enable by " default. " 2012/03/06 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Modify "&" behavior and make it default again. Now "&" " won't align when there are more then one "&" in the previous " line. " (*) Add indent "\left(" and "\right)" " (*) Trust user when in "verbatim" and "lstlisting" " 2012/03/11 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Modify "&" so that only indent when current line start with " "&". " 2012/03/12 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Modify indentkeys. " 2012/03/18 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Add &cpo " 2013/05/02 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Fix problem about GetTeXIndent checker. Thank Albert Netymk " for reporting this. " 2014/06/23 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Remove the feature g:tex_indent_and because it is buggy. " (*) If there is not any obvious indentation hints, we do not " alert our user's current indentation. " (*) g:tex_indent_brace now only works if the open brace is the " last character of that line. " 2014/08/03 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Indent current line if last line has larger indentation " 2016/11/08 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Fix problems for \[ and \]. Thanks Bruno for reporting. " 2017/04/30 by Yichao Zhou <broken.zhou AT gmail.com> " (*) Fix a bug between g:tex_noindent_env and g:tex_indent_items " Now g:tex_noindent_env='document\|verbatim\|itemize' (Emacs " style) is supported. Thanks Miles Wheeler for reporting. " " }}} " Document: {{{ " " To set the following options (ok, currently it's just one), add a line like " let g:tex_indent_items = 1 " to your ~/.vimrc. " " * g:tex_indent_brace " " If this variable is unset or non-zero, it will use smartindent-like style " for "{}" and "[]". Now this only works if the open brace is the last " character of that line. " " % Example 1 " \usetikzlibrary{ " external " } " " % Example 2 " \tikzexternalize[ " prefix=tikz] " " * g:tex_indent_items " " If this variable is set, item-environments are indented like Emacs does " it, i.e., continuation lines are indented with a shiftwidth. " " NOTE: I've already set the variable below; delete the corresponding line " if you don't like this behaviour. " " Per default, it is unset. " " set unset " ---------------------------------------------------------------- " \begin{itemize} \begin{itemize} " \item blablabla \item blablabla " bla bla bla bla bla bla " \item blablabla \item blablabla " bla bla bla bla bla bla " \end{itemize} \end{itemize} " " " * g:tex_items " " A list of tokens to be considered as commands for the beginning of an item " command. The tokens should be separated with '\|'. The initial '\' should " be escaped. The default is '\\bibitem\|\\item'. " " * g:tex_itemize_env " " A list of environment names, separated with '\|', where the items (item " commands matching g:tex_items) may appear. The default is " 'itemize\|description\|enumerate\|thebibliography'. " " * g:tex_noindent_env " " A list of environment names. separated with '\|', where no indentation is " required. The default is 'document\|verbatim'. " }}} " Only define the function once if exists("b:did_indent") finish endif let s:cpo_save = &cpo set cpo&vim " Define global variable {{{ let b:did_indent = 1 if !exists("g:tex_indent_items") let g:tex_indent_items = 1 endif if !exists("g:tex_indent_brace") let g:tex_indent_brace = 1 endif if !exists("g:tex_max_scan_line") let g:tex_max_scan_line = 60 endif if g:tex_indent_items if !exists("g:tex_itemize_env") let g:tex_itemize_env = 'itemize\|description\|enumerate\|thebibliography' endif if !exists('g:tex_items') let g:tex_items = '\\bibitem\|\\item' endif else let g:tex_items = '' endif if !exists("g:tex_noindent_env") let g:tex_noindent_env = 'document\|verbatim\|lstlisting' endif "}}} " VIM Setting " {{{ setlocal autoindent setlocal nosmartindent setlocal indentexpr=GetTeXIndent() setlocal indentkeys& exec 'setlocal indentkeys+=[,(,{,),},],\&' . substitute(g:tex_items, '^\|\(\\|\)', ',=', 'g') let g:tex_items = '^\s*' . substitute(g:tex_items, '^\(\^\\s\*\)*', '', '') " }}} function! GetTeXIndent() " {{{ " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) let cnum = v:lnum " Comment line is not what we need. while lnum != 0 && getline(lnum) =~ '^\s*%' let lnum = prevnonblank(lnum - 1) endwhile " At the start of the file use zero indent. if lnum == 0 return 0 endif let line = substitute(getline(lnum), '\s*%.*', '','g') " last line let cline = substitute(getline(v:lnum), '\s*%.*', '', 'g') " current line " We are in verbatim, so do what our user what. if synIDattr(synID(v:lnum, indent(v:lnum), 1), "name") == "texZone" if empty(cline) return indent(lnum) else return indent(v:lnum) end endif if lnum == 0 return 0 endif let ind = indent(lnum) let stay = 1 " New code for comment: retain the indent of current line if cline =~ '^\s*%' return indent(v:lnum) endif " Add a 'shiftwidth' after beginning of environments. " Don't add it for \begin{document} and \begin{verbatim} " if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim' " LH modification : \begin does not always start a line " ZYC modification : \end after \begin won't cause wrong indent anymore if line =~ '\\begin{.*}' if line !~ g:tex_noindent_env let ind = ind + shiftwidth() let stay = 0 endif if g:tex_indent_items " Add another sw for item-environments if line =~ g:tex_itemize_env let ind = ind + shiftwidth() let stay = 0 endif endif endif if cline =~ '\\end{.*}' let retn = s:GetEndIndentation(v:lnum) if retn != -1 return retn endif end " Subtract a 'shiftwidth' when an environment ends if cline =~ '\\end{.*}' \ && cline !~ g:tex_noindent_env \ && cline !~ '\\begin{.*}.*\\end{.*}' if g:tex_indent_items " Remove another sw for item-environments if cline =~ g:tex_itemize_env let ind = ind - shiftwidth() let stay = 0 endif endif let ind = ind - shiftwidth() let stay = 0 endif if g:tex_indent_brace if line =~ '[[{]$' let ind += shiftwidth() let stay = 0 endif if cline =~ '^\s*\\\?[\]}]' && s:CheckPairedIsLastCharacter(v:lnum, indent(v:lnum)) let ind -= shiftwidth() let stay = 0 endif if line !~ '^\s*\\\?[\]}]' for i in range(indent(lnum)+1, strlen(line)-1) let char = line[i] if char == ']' || char == '}' if s:CheckPairedIsLastCharacter(lnum, i) let ind -= shiftwidth() let stay = 0 endif endif endfor endif endif " Special treatment for 'item' " ---------------------------- if g:tex_indent_items " '\item' or '\bibitem' itself: if cline =~ g:tex_items let ind = ind - shiftwidth() let stay = 0 endif " lines following to '\item' are intented once again: if line =~ g:tex_items let ind = ind + shiftwidth() let stay = 0 endif endif if stay " If there is no obvious indentation hint, we trust our user. if empty(cline) return ind else return max([indent(v:lnum), s:GetLastBeginIndentation(v:lnum)]) endif else return ind endif endfunction "}}} function! s:GetLastBeginIndentation(lnum) " {{{ let matchend = 1 for lnum in range(a:lnum-1, max([a:lnum - g:tex_max_scan_line, 1]), -1) let line = getline(lnum) if line =~ '\\end{.*}' let matchend += 1 endif if line =~ '\\begin{.*}' let matchend -= 1 endif if matchend == 0 if line =~ g:tex_noindent_env return indent(lnum) endif if line =~ g:tex_itemize_env return indent(lnum) + 2 * shiftwidth() endif return indent(lnum) + shiftwidth() endif endfor return -1 endfunction function! s:GetEndIndentation(lnum) " {{{ if getline(a:lnum) =~ '\\begin{.*}.*\\end{.*}' return -1 endif let min_indent = 100 let matchend = 1 for lnum in range(a:lnum-1, max([a:lnum-g:tex_max_scan_line, 1]), -1) let line = getline(lnum) if line =~ '\\end{.*}' let matchend += 1 endif if line =~ '\\begin{.*}' let matchend -= 1 endif if matchend == 0 return indent(lnum) endif if !empty(line) let min_indent = min([min_indent, indent(lnum)]) endif endfor return min_indent - shiftwidth() endfunction " Most of the code is from matchparen.vim function! s:CheckPairedIsLastCharacter(lnum, col) "{{{ let c_lnum = a:lnum let c_col = a:col+1 let line = getline(c_lnum) if line[c_col-1] == '\' let c_col = c_col + 1 endif let c = line[c_col-1] let plist = split(&matchpairs, '.\zs[:,]') let i = index(plist, c) if i < 0 return 0 endif " Figure out the arguments for searchpairpos(). if i % 2 == 0 let s_flags = 'nW' let c2 = plist[i + 1] else let s_flags = 'nbW' let c2 = c let c = plist[i - 1] endif if c == '[' let c = '\[' let c2 = '\]' endif " Find the match. When it was just before the cursor move it there for a " moment. let save_cursor = winsaveview() call cursor(c_lnum, c_col) " When not in a string or comment ignore matches inside them. " We match "escape" for special items, such as lispEscapeSpecial. let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . \ '=~? "string\\|character\\|singlequote\\|escape\\|comment"' execute 'if' s_skip '| let s_skip = 0 | endif' let stopline = max([0, c_lnum - g:tex_max_scan_line]) " Limit the search time to 300 msec to avoid a hang on very long lines. " This fails when a timeout is not supported. try let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, 100) catch /E118/ endtry call winrestview(save_cursor) if m_lnum > 0 let line = getline(m_lnum) return strlen(line) == m_col endif return 0 endfunction "}}} let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 textwidth=80: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/tf.vim������������������������������������������������������������������0000664�0000000�0000000�00000003015�13204015742�0017077�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: tf (TinyFugue) " Maintainer: Christian J. Robinson <heptite@gmail.com> " URL: http://www.vim.org/scripts/script.php?script_id=174 " Last Change: 2017 Feb 25 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetTFIndent() setlocal indentkeys-=0{,0} indentkeys-=0# indentkeys-=: setlocal indentkeys+==/endif,=/then,=/else,=/done,0; " Only define the function once: if exists("*GetTFIndent") finish endif function GetTFIndent() " Find a non-blank line above the current line: let lnum = prevnonblank(v:lnum - 1) " No indent for the start of the file: if lnum == 0 return 0 endif let ind = indent(lnum) let line = getline(lnum) " No indentation if the previous line didn't end with "\": " (Could be annoying, but it lets you know if you made a mistake.) if line !~ '\\$' return 0 endif if line =~ '\(/def.*\\\|/for.*\(%;\s*\)\@\<!\\\)$' let ind = ind + shiftwidth() elseif line =~ '\(/if\|/else\|/then\)' if line !~ '/endif' let ind = ind + shiftwidth() endif elseif line =~ '/while' if line !~ '/done' let ind = ind + shiftwidth() endif endif let line = getline(v:lnum) if line =~ '\(/else\|/endif\|/then\)' if line !~ '/if' let ind = ind - shiftwidth() endif elseif line =~ '/done' if line !~ '/while' let ind = ind - shiftwidth() endif endif " Comments at the beginning of a line: if line =~ '^\s*;' let ind = 0 endif return ind endfunction �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/tilde.vim���������������������������������������������������������������0000664�0000000�0000000�00000001764�13204015742�0017600�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"Description: Indent scheme for the tilde weblanguage "Author: Tobias Rundstrm <tobi@tobi.nu> "URL: http://tilde.tildesoftware.net "Last Change: May 8 09:15:09 CEST 2002 if exists ("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentexpr=GetTildeIndent(v:lnum) setlocal indentkeys=o,O,) if exists("*GetTildeIndent") finish endif function GetTildeIndent(lnum) let plnum = prevnonblank(v:lnum-1) if plnum == 0 return 0 endif if getline(v:lnum) =~ '^\s*\~\(endif\|else\|elseif\|end\)\>' return indent(v:lnum) - shiftwidth() endif if getline(plnum) =~ '^\s*\~\(if\|foreach\|foreach_row\|xml_loop\|file_loop\|file_write\|file_append\|imap_loopsections\|imap_index\|imap_list\|ldap_search\|post_loopall\|post_loop\|file_loop\|sql_loop_num\|sql_dbmsselect\|search\|sql_loop\|post\|for\|function_define\|silent\|while\|setvalbig\|mail_create\|systempipe\|mail_send\|dual\|elseif\|else\)\>' return indent(plnum) + shiftwidth() else return -1 endif endfunction ������������neovim-0.2.2/runtime/indent/treetop.vim�������������������������������������������������������������0000664�0000000�0000000�00000001303�13204015742�0020146�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Treetop " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-03-14 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetTreetopIndent() setlocal indentkeys=0{,0},!^F,o,O,=end setlocal nosmartindent if exists("*GetTreetopIndent") finish endif function GetTreetopIndent() let pnum = prevnonblank(v:lnum - 1) if pnum == 0 return 0 endif let ind = indent(pnum) let line = getline(pnum) if line =~ '^\s*\%(grammar\|module\|rule\)\>' let ind += shiftwidth() endif let line = getline(v:lnum) if line =~ '^\s*end\>' let ind -= shiftwidth() end retur ind endfunction �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/vb.vim������������������������������������������������������������������0000664�0000000�0000000�00000004051�13204015742�0017076�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb) " Author: Johannes Zellner <johannes@zellner.org> " Last Change: Fri, 18 Jun 2004 07:22:42 CEST " Small update 2010 Jul 28 by Maxim Kim if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentexpr=VbGetIndent(v:lnum) setlocal indentkeys& setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop,<:> let b:undo_indent = "set ai< indentexpr< indentkeys<" " Only define the function once. if exists("*VbGetIndent") finish endif fun! VbGetIndent(lnum) " labels and preprocessor get zero indent immediately let this_line = getline(a:lnum) let LABELS_OR_PREPROC = '^\s*\(\<\k\+\>:\s*$\|#.*\)' if this_line =~? LABELS_OR_PREPROC return 0 endif " Find a non-blank line above the current line. " Skip over labels and preprocessor directives. let lnum = a:lnum while lnum > 0 let lnum = prevnonblank(lnum - 1) let previous_line = getline(lnum) if previous_line !~? LABELS_OR_PREPROC break endif endwhile " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif let ind = indent(lnum) " Add if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|enum\|with\)\>' let ind = ind + shiftwidth() endif " Subtract if this_line =~? '^\s*\<end\>\s\+\<select\>' if previous_line !~? '^\s*\<select\>' let ind = ind - 2 * shiftwidth() else " this case is for an empty 'select' -- 'end select' " (w/o any case statements) like: " " select case readwrite " end select let ind = ind - shiftwidth() endif elseif this_line =~? '^\s*\<\(end\|else\|elseif\|until\|loop\|next\|wend\)\>' let ind = ind - shiftwidth() elseif this_line =~? '^\s*\<\(case\|default\)\>' if previous_line !~? '^\s*\<select\>' let ind = ind - shiftwidth() endif endif return ind endfun " vim:sw=4 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/verilog.vim�������������������������������������������������������������0000664�0000000�0000000�00000017745�13204015742�0020154�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Language: Verilog HDL " Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw> " Last Change: 2017 Aug 25 by Chih-Tsun Huang " URL: http://www.cs.nthu.edu.tw/~cthuang/vim/indent/verilog.vim " " Credits: " Suggestions for improvement, bug reports by " Takuya Fujiwara <tyru.exe@gmail.com> " Thilo Six <debian@Xk2c.de> " Leo Butlero <lbutler@brocade.com> " " Buffer Variables: " b:verilog_indent_modules : indenting after the declaration " of module blocks " b:verilog_indent_width : indenting width " b:verilog_indent_verbose : verbose to each indenting " " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetVerilogIndent() setlocal indentkeys=!^F,o,O,0),=begin,=end,=join,=endcase setlocal indentkeys+==endmodule,=endfunction,=endtask,=endspecify setlocal indentkeys+==endconfig,=endgenerate,=endprimitive,=endtable setlocal indentkeys+==`else,=`elsif,=`endif " Only define the function once. if exists("*GetVerilogIndent") finish endif let s:cpo_save = &cpo set cpo&vim function GetVerilogIndent() if exists('b:verilog_indent_width') let offset = b:verilog_indent_width else let offset = shiftwidth() endif if exists('b:verilog_indent_modules') let indent_modules = offset else let indent_modules = 0 endif " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " At the start of the file use zero indent. if lnum == 0 return 0 endif let lnum2 = prevnonblank(lnum - 1) let curr_line = getline(v:lnum) let last_line = getline(lnum) let last_line2 = getline(lnum2) let ind = indent(lnum) let ind2 = indent(lnum - 1) let offset_comment1 = 1 " Define the condition of an open statement " Exclude the match of //, /* or */ let vlog_openstat = '\(\<or\>\|\([*/]\)\@<![*(,{><+-/%^&|!=?:]\([*/]\)\@!\)' " Define the condition when the statement ends with a one-line comment let vlog_comment = '\(//.*\|/\*.*\*/\s*\)' if exists('b:verilog_indent_verbose') let vverb_str = 'INDENT VERBOSE:' let vverb = 1 else let vverb = 0 endif " Indent accoding to last line " End of multiple-line comment if last_line =~ '\*/\s*$' && last_line !~ '/\*.\{-}\*/' let ind = ind - offset_comment1 if vverb echo vverb_str "De-indent after a multiple-line comment." endif " Indent after if/else/for/case/always/initial/specify/fork blocks " Note: We exclude '`if' or '`else' and consider 'end else' " 'end if' is redundant here elseif last_line =~ '^\s*\(end\)\=\s*`\@<!\<\(if\|else\)\>' || \ last_line =~ '^\s*\<\(for\|case\%[[zx]]\)\>' || \ last_line =~ '^\s*\<\(always\|initial\)\>' || \ last_line =~ '^\s*\<\(specify\|fork\)\>' if last_line !~ '\(;\|\<end\>\)\s*' . vlog_comment . '*$' || \ last_line =~ '\(//\|/\*\).*\(;\|\<end\>\)\s*' . vlog_comment . '*$' let ind = ind + offset if vverb | echo vverb_str "Indent after a block statement." | endif endif " Indent after function/task/config/generate/primitive/table blocks elseif last_line =~ '^\s*\<\(function\|task\|config\|generate\|primitive\|table\)\>' if last_line !~ '\<end\>\s*' . vlog_comment . '*$' || \ last_line =~ '\(//\|/\*\).*\(;\|\<end\>\)\s*' . vlog_comment . '*$' let ind = ind + offset if vverb echo vverb_str "Indent after function/task block statement." endif endif " Indent after module/function/task/specify/fork blocks elseif last_line =~ '^\s*\<module\>' let ind = ind + indent_modules if vverb && indent_modules echo vverb_str "Indent after module statement." endif if last_line =~ '[(,]\s*' . vlog_comment . '*$' && \ last_line !~ '\(//\|/\*\).*[(,]\s*' . vlog_comment . '*$' let ind = ind + offset if vverb echo vverb_str "Indent after a multiple-line module statement." endif endif " Indent after a 'begin' statement elseif last_line =~ '\(\<begin\>\)\(\s*:\s*\w\+\)*' . vlog_comment . '*$' && \ last_line !~ '\(//\|/\*\).*\(\<begin\>\)' && \ ( last_line2 !~ vlog_openstat . '\s*' . vlog_comment . '*$' || \ last_line2 =~ '^\s*[^=!]\+\s*:\s*' . vlog_comment . '*$' ) let ind = ind + offset if vverb | echo vverb_str "Indent after begin statement." | endif " De-indent for the end of one-line block elseif ( last_line !~ '\<begin\>' || \ last_line =~ '\(//\|/\*\).*\<begin\>' ) && \ last_line2 =~ '\<\(`\@<!if\|`\@<!else\|for\|always\|initial\)\>.*' . \ vlog_comment . '*$' && \ last_line2 !~ \ '\(//\|/\*\).*\<\(`\@<!if\|`\@<!else\|for\|always\|initial\)\>' && \ last_line2 !~ vlog_openstat . '\s*' . vlog_comment . '*$' && \ ( last_line2 !~ '\<begin\>' || \ last_line2 =~ '\(//\|/\*\).*\<begin\>' ) let ind = ind - offset if vverb echo vverb_str "De-indent after the end of one-line statement." endif " Multiple-line statement (including case statement) " Open statement " Ident the first open line elseif last_line =~ vlog_openstat . '\s*' . vlog_comment . '*$' && \ last_line !~ '\(//\|/\*\).*' . vlog_openstat . '\s*$' && \ last_line2 !~ vlog_openstat . '\s*' . vlog_comment . '*$' let ind = ind + offset if vverb | echo vverb_str "Indent after an open statement." | endif " Close statement " De-indent for an optional close parenthesis and a semicolon, and only " if there exists precedent non-whitespace char elseif last_line =~ ')*\s*;\s*' . vlog_comment . '*$' && \ last_line !~ '^\s*)*\s*;\s*' . vlog_comment . '*$' && \ last_line !~ '\(//\|/\*\).*\S)*\s*;\s*' . vlog_comment . '*$' && \ ( last_line2 =~ vlog_openstat . '\s*' . vlog_comment . '*$' && \ last_line2 !~ ';\s*//.*$') && \ last_line2 !~ '^\s*' . vlog_comment . '$' let ind = ind - offset if vverb | echo vverb_str "De-indent after a close statement." | endif " `ifdef or `ifndef or `elsif or `else elseif last_line =~ '^\s*`\<\(ifn\?def\|elsif\|else\)\>' let ind = ind + offset if vverb echo vverb_str "Indent after a `ifdef or `ifndef or `elsif or `else statement." endif endif " Re-indent current line " De-indent on the end of the block " join/end/endcase/endfunction/endtask/endspecify if curr_line =~ '^\s*\<\(join\|end\|endcase\)\>' || \ curr_line =~ '^\s*\<\(endfunction\|endtask\|endspecify\)\>' || \ curr_line =~ '^\s*\<\(endconfig\|endgenerate\|endprimitive\|endtable\)\>' let ind = ind - offset if vverb | echo vverb_str "De-indent the end of a block." | endif elseif curr_line =~ '^\s*\<endmodule\>' let ind = ind - indent_modules if vverb && indent_modules echo vverb_str "De-indent the end of a module." endif " De-indent on a stand-alone 'begin' elseif curr_line =~ '^\s*\<begin\>' if last_line !~ '^\s*\<\(function\|task\|specify\|module\|config\|generate\|primitive\|table\)\>' && \ last_line !~ '^\s*\()*\s*;\|)\+\)\s*' . vlog_comment . '*$' && \ ( last_line =~ \ '\<\(`\@<!if\|`\@<!else\|for\|case\%[[zx]]\|always\|initial\)\>' || \ last_line =~ ')\s*' . vlog_comment . '*$' || \ last_line =~ vlog_openstat . '\s*' . vlog_comment . '*$' ) let ind = ind - offset if vverb echo vverb_str "De-indent a stand alone begin statement." endif endif " De-indent after the end of multiple-line statement elseif curr_line =~ '^\s*)' && \ ( last_line =~ vlog_openstat . '\s*' . vlog_comment . '*$' || \ last_line !~ vlog_openstat . '\s*' . vlog_comment . '*$' && \ last_line2 =~ vlog_openstat . '\s*' . vlog_comment . '*$' ) let ind = ind - offset if vverb echo vverb_str "De-indent the end of a multiple statement." endif " De-indent `elsif or `else or `endif elseif curr_line =~ '^\s*`\<\(elsif\|else\|endif\)\>' let ind = ind - offset if vverb | echo vverb_str "De-indent `elsif or `else or `endif statement." | endif endif " Return the indention return ind endfunction let &cpo = s:cpo_save unlet s:cpo_save " vim:sw=2 ���������������������������neovim-0.2.2/runtime/indent/vhdl.vim����������������������������������������������������������������0000664�0000000�0000000�00000034512�13204015742�0017431�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" VHDL indent ('93 syntax) " Language: VHDL " Maintainer: Gerald Lai <laigera+vim?gmail.com> " Version: 1.62 " Last Change: 2017 Oct 17 " URL: http://www.vim.org/scripts/script.php?script_id=1450 " only load this indent file when no other was loaded if exists("b:did_indent") finish endif let b:did_indent = 1 " setup indent options for local VHDL buffer setlocal indentexpr=GetVHDLindent() setlocal indentkeys=!^F,o,O,0(,0) setlocal indentkeys+==~begin,=~end\ ,=~end\ ,=~is,=~select,=~when setlocal indentkeys+==~if,=~then,=~elsif,=~else setlocal indentkeys+==~case,=~loop,=~for,=~generate,=~record,=~units,=~process,=~block,=~function,=~component,=~procedure setlocal indentkeys+==~architecture,=~configuration,=~entity,=~package " constants " not a comment let s:NC = '\%(--.*\)\@<!' " end of string let s:ES = '\s*\%(--.*\)\=$' " no "end" keyword in front let s:NE = '\%(\<end\s\+\)\@<!' " option to disable alignment of generic/port mappings if !exists("g:vhdl_indent_genportmap") let g:vhdl_indent_genportmap = 1 endif " option to disable alignment of right-hand side assignment "<=" statements if !exists("g:vhdl_indent_rhsassign") let g:vhdl_indent_rhsassign = 1 endif " only define indent function once if exists("*GetVHDLindent") finish endif function GetVHDLindent() " store current line & string let curn = v:lnum let curs = getline(curn) " find previous line that is not a comment let prevn = prevnonblank(curn - 1) let prevs = getline(prevn) while prevn > 0 && prevs =~ '^\s*--' let prevn = prevnonblank(prevn - 1) let prevs = getline(prevn) endwhile let prevs_noi = substitute(prevs, '^\s*', '', '') " default indent starts as previous non-comment line's indent let ind = prevn > 0 ? indent(prevn) : 0 " backup default let ind2 = ind " indent: special; kill string so it would not affect other filters " keywords: "report" + string " where: anywhere in current or previous line let s0 = s:NC.'\<report\>\s*".*"' if curs =~? s0 let curs = "" endif if prevs =~? s0 let prevs = "" endif " indent: previous line's comment position, otherwise follow next non-comment line if possible " keyword: "--" " where: start of current line if curs =~ '^\s*--' let pn = curn - 1 let ps = getline(pn) if curs =~ '^\s*--\s' && ps =~ '--' return indent(pn) + stridx(substitute(ps, '^\s*', '', ''), '--') else " find nextnonblank line that is not a comment let nn = nextnonblank(curn + 1) let ns = getline(nn) while nn > 0 && ns =~ '^\s*--' let nn = nextnonblank(nn + 1) let ns = getline(nn) endwhile let n = indent(nn) return n != -1 ? n : ind endif endif " **************************************************************************************** " indent: align generic variables & port names " keywords: "procedure" + name, "generic", "map", "port" + "(", provided current line is part of mapping " where: anywhere in previous 2 lines " find following previous non-comment line let pn = prevnonblank(prevn - 1) let ps = getline(pn) while pn > 0 && ps =~ '^\s*--' let pn = prevnonblank(pn - 1) let ps = getline(pn) endwhile if (curs =~ '^\s*)' || curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*\((.*)\)*\s*\%(=>\s*\S\+\|:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\s\+\)\)') && (prevs =~? s:NC.'\<\%(procedure\s\+\S\+\|generic\|map\|port\)\s*(\%(\s*\w\)\=' || (ps =~? s:NC.'\<\%(procedure\|generic\|map\|port\)'.s:ES && prevs =~ '^\s*(')) " align closing ")" with opening "(" if curs =~ '^\s*)' return ind2 + stridx(prevs_noi, '(') endif let m = matchend(prevs_noi, '(\s*\ze\w') if m != -1 return ind2 + m else if g:vhdl_indent_genportmap return ind2 + stridx(prevs_noi, '(') + shiftwidth() else return ind2 + shiftwidth() endif endif endif " indent: align conditional/select statement " keywords: variable + "<=" without ";" ending " where: start of previous line if prevs =~? '^\s*\S\+\s*<=[^;]*'.s:ES if g:vhdl_indent_rhsassign return ind2 + matchend(prevs_noi, '<=\s*\ze.') else return ind2 + shiftwidth() endif endif " indent: backtrace previous non-comment lines for next smaller or equal size indent " keywords: "end" + "record", "units" " where: start of previous line " keyword: ")" " where: start of previous line " keyword: without "<=" + ";" ending " where: anywhere in previous line " keyword: "=>" + ")" ending, provided current line does not begin with ")" " where: anywhere in previous line " _note_: indent allowed to leave this filter let m = 0 if prevs =~? '^\s*end\s\+\%(record\|units\)\>' let m = 3 elseif prevs =~ '^\s*)' let m = 1 elseif prevs =~ s:NC.'\%(<=.*\)\@<!;'.s:ES || (curs !~ '^\s*)' && prevs =~ s:NC.'=>.*'.s:NC.')'.s:ES) let m = 2 endif if m > 0 let pn = prevnonblank(prevn - 1) let ps = getline(pn) while pn > 0 let t = indent(pn) if ps !~ '^\s*--' && (t < ind || (t == ind && m == 3)) " make sure one of these is true " keywords: variable + "<=" without ";" ending " where: start of previous non-comment line " keywords: "procedure", "generic", "map", "port" " where: anywhere in previous non-comment line " keyword: "(" " where: start of previous non-comment line if m < 3 && ps !~? '^\s*\S\+\s*<=[^;]*'.s:ES if ps =~? s:NC.'\<\%(procedure\|generic\|map\|port\)\>' || ps =~ '^\s*(' let ind = t endif break endif let ind = t if m > 1 " find following previous non-comment line let ppn = prevnonblank(pn - 1) let pps = getline(ppn) while ppn > 0 && pps =~ '^\s*--' let ppn = prevnonblank(ppn - 1) let pps = getline(ppn) endwhile " indent: follow " keyword: "select" " where: end of following previous non-comment line " keyword: "type" " where: start of following previous non-comment line if m == 2 let s1 = s:NC.'\<select'.s:ES if ps !~? s1 && pps =~? s1 let ind = indent(ppn) endif elseif m == 3 let s1 = '^\s*type\>' if ps !~? s1 && pps =~? s1 let ind = indent(ppn) endif endif endif break endif let pn = prevnonblank(pn - 1) let ps = getline(pn) endwhile endif " indent: follow indent of previous opening statement, otherwise -sw " keyword: "begin" " where: anywhere in current line if curs =~? s:NC.'\<begin\>' " find previous opening statement of " keywords: "architecture", "block", "entity", "function", "generate", "procedure", "process" let s2 = s:NC.s:NE.'\<\%(architecture\|block\|entity\|function\|generate\|procedure\|process\)\>' let pn = prevnonblank(curn - 1) let ps = getline(pn) while pn > 0 && (ps =~ '^\s*--' || ps !~? s2) let pn = prevnonblank(pn - 1) let ps = getline(pn) if (ps =~? s:NC.'\<begin\>') return indent(pn) - shiftwidth() endif endwhile if (pn == 0) return ind - shiftwidth() else return indent(pn) endif endif " indent: +sw if previous line is previous opening statement " keywords: "record", "units" " where: anywhere in current line if curs =~? s:NC.s:NE.'\<\%(record\|units\)\>' " find previous opening statement of " keyword: "type" let s3 = s:NC.s:NE.'\<type\>' if curs !~? s3.'.*'.s:NC.'\<\%(record\|units\)\>.*'.s:ES && prevs =~? s3 let ind = ind + shiftwidth() endif return ind endif " **************************************************************************************** " indent: 0 " keywords: "architecture", "configuration", "entity", "library", "package" " where: start of current line if curs =~? '^\s*\%(architecture\|configuration\|entity\|library\|package\)\>' return 0 endif " indent: maintain indent of previous opening statement " keyword: "is" " where: start of current line " find previous opening statement of " keywords: "architecture", "block", "configuration", "entity", "function", "package", "procedure", "process", "type" if curs =~? '^\s*\<is\>' && prevs =~? s:NC.s:NE.'\<\%(architecture\|block\|configuration\|entity\|function\|package\|procedure\|process\|type\)\>' return ind2 endif " indent: maintain indent of previous opening statement " keyword: "then" " where: start of current line " find previous opening statement of " keywords: "elsif", "if" if curs =~? '^\s*\<then\>' && prevs =~? s:NC.'\%(\<elsif\>\|'.s:NE.'\<if\>\)' return ind2 endif " indent: maintain indent of previous opening statement " keyword: "generate" " where: start of current line " find previous opening statement of " keywords: "for", "if" if curs =~? '^\s*\<generate\>' && prevs =~? s:NC.s:NE.'\%(\%(\<wait\s\+\)\@<!\<for\|\<if\)\>' return ind2 endif " indent: +sw " keywords: "block", "process" " removed: "begin", "case", "elsif", "if", "loop", "record", "units", "while" " where: anywhere in previous line if prevs =~? s:NC.s:NE.'\<\%(block\|process\)\>' return ind + shiftwidth() endif " indent: +sw " keywords: "architecture", "configuration", "entity", "package" " removed: "component", "for", "when", "with" " where: start of previous line if prevs =~? '^\s*\%(architecture\|configuration\|entity\|package\)\>' return ind + shiftwidth() endif " indent: +sw " keyword: "select" " removed: "generate", "is", "=>" " where: end of previous line if prevs =~? s:NC.'\<select'.s:ES return ind + shiftwidth() endif " indent: +sw " keyword: "begin", "loop", "record", "units" " where: anywhere in previous line " keyword: "component", "else", "for" " where: start of previous line " keyword: "generate", "is", "then", "=>" " where: end of previous line " _note_: indent allowed to leave this filter if prevs =~? s:NC.'\%(\<begin\>\|'.s:NE.'\<\%(loop\|record\|units\)\>\)' || prevs =~? '^\s*\%(component\|else\|for\)\>' || prevs =~? s:NC.'\%('.s:NE.'\<generate\|\<\%(is\|then\)\|=>\)'.s:ES let ind = ind + shiftwidth() endif " **************************************************************************************** " indent: -sw " keywords: "when", provided previous line does not begin with "when", does not end with "is" " where: start of current line let s4 = '^\s*when\>' if curs =~? s4 if prevs =~? s:NC.'\<is'.s:ES return ind elseif prevs !~? s4 return ind - shiftwidth() else return ind2 endif endif " indent: -sw " keywords: "else", "elsif", "end" + "block", "for", "function", "generate", "if", "loop", "procedure", "process", "record", "units" " where: start of current line let s5 = 'block\|for\|function\|generate\|if\|loop\|procedure\|process\|record\|units' if curs =~? '^\s*\%(else\|elsif\|end\s\+\%('.s5.'\)\)\>' if prevs =~? '^\s*\%(elsif\|'.s5.'\)' return ind else return ind - shiftwidth() endif endif " indent: backtrace previous non-comment lines " keyword: "end" + "case", "component" " where: start of current line let m = 0 if curs =~? '^\s*end\s\+case\>' let m = 1 elseif curs =~? '^\s*end\s\+component\>' let m = 2 endif if m > 0 " find following previous non-comment line let pn = prevn let ps = getline(pn) while pn > 0 if ps !~ '^\s*--' "indent: -2sw "keywords: "end" + "case" "where: start of previous non-comment line "indent: -sw "keywords: "when" "where: start of previous non-comment line "indent: follow "keywords: "case" "where: start of previous non-comment line if m == 1 if ps =~? '^\s*end\s\+case\>' return indent(pn) - 2 * shiftwidth() elseif ps =~? '^\s*when\>' return indent(pn) - shiftwidth() elseif ps =~? '^\s*case\>' return indent(pn) endif "indent: follow "keyword: "component" "where: start of previous non-comment line elseif m == 2 if ps =~? '^\s*component\>' return indent(pn) endif endif endif let pn = prevnonblank(pn - 1) let ps = getline(pn) endwhile return ind - shiftwidth() endif " indent: -sw " keyword: ")" " where: start of current line if curs =~ '^\s*)' return ind - shiftwidth() endif " indent: 0 " keywords: "end" + "architecture", "configuration", "entity", "package" " where: start of current line if curs =~? '^\s*end\s\+\%(architecture\|configuration\|entity\|package\)\>' return 0 endif " indent: -sw " keywords: "end" + identifier, ";" " where: start of current line "if curs =~? '^\s*end\s\+\w\+\>' if curs =~? '^\s*end\%(\s\|;'.s:ES.'\)' return ind - shiftwidth() endif " **************************************************************************************** " indent: maintain indent of previous opening statement " keywords: without "procedure", "generic", "map", "port" + ":" but not ":=" + "in", "out", "inout", "buffer", "linkage", variable & ":=" " where: start of current line if curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)' return ind2 endif " **************************************************************************************** " indent: maintain indent of previous opening statement, corner case which " does not end in ;, but is part of a mapping " keywords: without "procedure", "generic", "map", "port" + ":" but not ":=", never + ;$ and " prevline without "procedure", "generic", "map", "port" + ":" but not ":=" + eventually ;$ " where: start of current line if curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*:[^=].*[^;].*$' if prevs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*:[^=].*;.*$' return ind2 endif endif " return leftover filtered indent return ind endfunction ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/vim.vim�����������������������������������������������������������������0000664�0000000�0000000�00000005655�13204015742�0017275�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Vim script " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2016 Jun 27 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetVimIndent() setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\ let b:undo_indent = "setl indentkeys< indentexpr<" " Only define the function once. if exists("*GetVimIndent") finish endif let s:keepcpo= &cpo set cpo&vim function GetVimIndent() let ignorecase_save = &ignorecase try let &ignorecase = 0 return GetVimIndentIntern() finally let &ignorecase = ignorecase_save endtry endfunc function GetVimIndentIntern() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " If the current line doesn't start with '\' and below a line that starts " with '\', use the indent of the line above it. let cur_text = getline(v:lnum) if cur_text !~ '^\s*\\' while lnum > 0 && getline(lnum) =~ '^\s*\\' let lnum = lnum - 1 endwhile endif " At the start of the file use zero indent. if lnum == 0 return 0 endif let prev_text = getline(lnum) " Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function " and :else. Add it three times for a line that starts with '\' after " a line that doesn't (or g:vim_indent_cont if it exists). let ind = indent(lnum) if cur_text =~ '^\s*\\' && v:lnum > 1 && prev_text !~ '^\s*\\' if exists("g:vim_indent_cont") let ind = ind + g:vim_indent_cont else let ind = ind + shiftwidth() * 3 endif elseif prev_text =~ '^\s*aug\%[roup]\s\+' && prev_text !~ '^\s*aug\%[roup]\s\+[eE][nN][dD]\>' let ind = ind + shiftwidth() else " A line starting with :au does not increment/decrement indent. if prev_text !~ '^\s*au\%[tocmd]' let i = match(prev_text, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>') if i >= 0 let ind += shiftwidth() if strpart(prev_text, i, 1) == '|' && has('syntax_items') \ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$' let ind -= shiftwidth() endif endif endif endif " If the previous line contains an "end" after a pipe, but not in an ":au" " command. And not when there is a backslash before the pipe. " And when syntax HL is enabled avoid a match inside a string. let i = match(prev_text, '[^\\]|\s*\(ene\@!\)') if i > 0 && prev_text !~ '^\s*au\%[tocmd]' if !has('syntax_items') || synIDattr(synID(lnum, i + 2, 1), "name") !~ '\(Comment\|String\)$' let ind = ind - shiftwidth() endif endif " Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry, " :endfun, :else and :augroup END. if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s\+[eE][nN][dD]\)' let ind = ind - shiftwidth() endif return ind endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2 �����������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/vroom.vim���������������������������������������������������������������0000664�0000000�0000000�00000000573�13204015742�0017636�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Vroom (vim testing and executable documentation) " Maintainer: David Barnett (https://github.com/google/vim-ft-vroom) " Last Change: 2014 Jul 23 if exists('b:did_indent') finish endif let b:did_indent = 1 let s:cpo_save = &cpo set cpo-=C let b:undo_indent = 'setlocal autoindent<' setlocal autoindent let &cpo = s:cpo_save unlet s:cpo_save �������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/xf86conf.vim������������������������������������������������������������0000664�0000000�0000000�00000001305�13204015742�0020127�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: XFree86 Configuration File " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetXF86ConfIndent() setlocal indentkeys=!^F,o,O,=End setlocal nosmartindent if exists("*GetXF86ConfIndent") finish endif function GetXF86ConfIndent() let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif let ind = indent(lnum) if getline(lnum) =~? '^\s*\(Sub\)\=Section\>' let ind = ind + shiftwidth() endif if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>' let ind = ind - shiftwidth() endif return ind endfunction ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/xhtml.vim���������������������������������������������������������������0000664�0000000�0000000�00000000415�13204015742�0017623�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: XHTML " Maintainer: Bram Moolenaar <Bram@vim.org> (for now) " Last Change: 2005 Jun 24 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Handled like HTML for now. runtime! indent/html.vim ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/xinetd.vim��������������������������������������������������������������0000664�0000000�0000000�00000002317�13204015742�0017765�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: xinetd.conf(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetXinetdIndent() setlocal indentkeys=0{,0},!^F,o,O setlocal nosmartindent if exists("*GetXinetdIndent") finish endif let s:keepcpo= &cpo set cpo&vim function s:count_braces(lnum, count_open) let n_open = 0 let n_close = 0 let line = getline(a:lnum) let pattern = '[{}]' let i = match(line, pattern) while i != -1 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'ld\%(Comment\|String\)' if line[i] == '{' let n_open += 1 elseif line[i] == '}' if n_open > 0 let n_open -= 1 else let n_close += 1 endif endif endif let i = match(line, pattern, i + 1) endwhile return a:count_open ? n_open : n_close endfunction function GetXinetdIndent() let pnum = prevnonblank(v:lnum - 1) if pnum == 0 return 0 endif return indent(pnum) + s:count_braces(pnum, 1) * shiftwidth() \ - s:count_braces(v:lnum, 0) * shiftwidth() endfunction let &cpo = s:keepcpo unlet s:keepcpo �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/xml.vim�����������������������������������������������������������������0000664�0000000�0000000�00000005441�13204015742�0017273�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Language: xml " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: 2017 Jun 13 " Notes: 1) does not indent pure non-xml code (e.g. embedded scripts) " 2) will be confused by unbalanced tags in comments " or CDATA sections. " 2009-05-26 patch by Nikolai Weibull " TODO: implement pre-like tags, see xml_indent_open / xml_indent_close " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 let s:keepcpo= &cpo set cpo&vim " [-- local settings (must come before aborting the script) --] setlocal indentexpr=XmlIndentGet(v:lnum,1) setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,} if !exists('b:xml_indent_open') let b:xml_indent_open = '.\{-}<\a' " pre tag, e.g. <address> " let b:xml_indent_open = '.\{-}<[/]\@!\(address\)\@!' endif if !exists('b:xml_indent_close') let b:xml_indent_close = '.\{-}</' " end pre tag, e.g. </address> " let b:xml_indent_close = '.\{-}</\(address\)\@!' endif let &cpo = s:keepcpo unlet s:keepcpo " [-- finish, if the function already exists --] if exists('*XmlIndentGet') finish endif let s:keepcpo= &cpo set cpo&vim fun! <SID>XmlIndentWithPattern(line, pat) let s = substitute('x'.a:line, a:pat, "\1", 'g') return strlen(substitute(s, "[^\1].*$", '', '')) endfun " [-- check if it's xml --] fun! <SID>XmlIndentSynCheck(lnum) if '' != &syntax let syn1 = synIDattr(synID(a:lnum, 1, 1), 'name') let syn2 = synIDattr(synID(a:lnum, strlen(getline(a:lnum)) - 1, 1), 'name') if '' != syn1 && syn1 !~ 'xml' && '' != syn2 && syn2 !~ 'xml' " don't indent pure non-xml code return 0 elseif syn1 =~ '^xmlComment' && syn2 =~ '^xmlComment' " indent comments specially return -1 endif endif return 1 endfun " [-- return the sum of indents of a:lnum --] fun! <SID>XmlIndentSum(lnum, style, add) let line = getline(a:lnum) if a:style == match(line, '^\s*</') return (shiftwidth() * \ (<SID>XmlIndentWithPattern(line, b:xml_indent_open) \ - <SID>XmlIndentWithPattern(line, b:xml_indent_close) \ - <SID>XmlIndentWithPattern(line, '.\{-}/>'))) + a:add else return a:add endif endfun fun! XmlIndentGet(lnum, use_syntax_check) " Find a non-empty line above the current line. let lnum = prevnonblank(a:lnum - 1) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif if a:use_syntax_check let check_lnum = <SID>XmlIndentSynCheck(lnum) let check_alnum = <SID>XmlIndentSynCheck(a:lnum) if 0 == check_lnum || 0 == check_alnum return indent(a:lnum) elseif -1 == check_lnum || -1 == check_alnum return -1 endif endif let ind = <SID>XmlIndentSum(lnum, -1, indent(lnum)) let ind = <SID>XmlIndentSum(a:lnum, 0, ind) return ind endfun let &cpo = s:keepcpo unlet s:keepcpo " vim:ts=8 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/xsd.vim�����������������������������������������������������������������0000664�0000000�0000000�00000000375�13204015742�0017272�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: .xsd files (XML Schema) " Maintainer: Nobody " Last Change: 2005 Jun 09 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Use XML formatting rules runtime! indent/xml.vim �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/xslt.vim����������������������������������������������������������������0000664�0000000�0000000�00000000451�13204015742�0017461�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: XSLT .xslt files " Maintainer: David Fishburn <fishburn@ianywhere.com> " Last Change: Wed May 14 2003 8:48:41 PM " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Use XML formatting rules runtime! indent/xml.vim �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/yacc.vim����������������������������������������������������������������0000664�0000000�0000000�00000001415�13204015742�0017407�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: YACC input file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetYaccIndent() setlocal indentkeys=!^F,o,O setlocal nosmartindent " Only define the function once. if exists("*GetYaccIndent") finish endif function GetYaccIndent() if v:lnum == 1 return 0 endif let ind = indent(v:lnum - 1) let line = getline(v:lnum - 1) if line == '' let ind = 0 elseif line =~ '^\w\+\s*:' let ind = ind + matchend(line, '^\w\+\s*') elseif line =~ '^\s*;' let ind = 0 else let ind = indent(v:lnum) endif return ind endfunction ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/yaml.vim����������������������������������������������������������������0000664�0000000�0000000�00000012540�13204015742�0017433�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: YAML " Maintainer: Nikolai Pavlov <zyx.vim@gmail.com> " Last Change: 2017 Jun 13 " Only load this indent file when no other was loaded. if exists('b:did_indent') finish endif let s:save_cpo = &cpo set cpo&vim let b:did_indent = 1 setlocal indentexpr=GetYAMLIndent(v:lnum) setlocal indentkeys=!^F,o,O,0#,0},0],<:>,0- setlocal nosmartindent let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<' " Only define the function once. if exists('*GetYAMLIndent') finish endif function s:FindPrevLessIndentedLine(lnum, ...) let prevlnum = prevnonblank(a:lnum-1) let curindent = a:0 ? a:1 : indent(a:lnum) while prevlnum \&& indent(prevlnum) >= curindent \&& getline(prevlnum) =~# '^\s*#' let prevlnum = prevnonblank(prevlnum-1) endwhile return prevlnum endfunction function s:FindPrevLEIndentedLineMatchingRegex(lnum, regex) let plilnum = s:FindPrevLessIndentedLine(a:lnum, indent(a:lnum)+1) while plilnum && getline(plilnum) !~# a:regex let plilnum = s:FindPrevLessIndentedLine(plilnum) endwhile return plilnum endfunction let s:mapkeyregex='\v^\s*\#@!\S@=%(\''%([^'']|\''\'')*\'''. \ '|\"%([^"\\]|\\.)*\"'. \ '|%(%(\:\ )@!.)*)\:%(\ |$)' let s:liststartregex='\v^\s*%(\-%(\ |$))' let s:c_ns_anchor_char = '\v%([\n\r\uFEFF \t,[\]{}]@!\p)' let s:c_ns_anchor_name = s:c_ns_anchor_char.'+' let s:c_ns_anchor_property = '\v\&'.s:c_ns_anchor_name let s:ns_word_char = '\v[[:alnum:]_\-]' let s:ns_tag_char = '\v%(%\x\x|'.s:ns_word_char.'|[#/;?:@&=+$.~*''()])' let s:c_named_tag_handle = '\v\!'.s:ns_word_char.'+\!' let s:c_secondary_tag_handle = '\v\!\!' let s:c_primary_tag_handle = '\v\!' let s:c_tag_handle = '\v%('.s:c_named_tag_handle. \ '|'.s:c_secondary_tag_handle. \ '|'.s:c_primary_tag_handle.')' let s:c_ns_shorthand_tag = '\v'.s:c_tag_handle . s:ns_tag_char.'+' let s:c_non_specific_tag = '\v\!' let s:ns_uri_char = '\v%(%\x\x|'.s:ns_word_char.'\v|[#/;?:@&=+$,.!~*''()[\]])' let s:c_verbatim_tag = '\v\!\<'.s:ns_uri_char.'+\>' let s:c_ns_tag_property = '\v'.s:c_verbatim_tag. \ '\v|'.s:c_ns_shorthand_tag. \ '\v|'.s:c_non_specific_tag let s:block_scalar_header = '\v[|>]%([+-]?[1-9]|[1-9]?[+-])?' function GetYAMLIndent(lnum) if a:lnum == 1 || !prevnonblank(a:lnum-1) return 0 endif let prevlnum = prevnonblank(a:lnum-1) let previndent = indent(prevlnum) let line = getline(a:lnum) if line =~# '^\s*#' && getline(a:lnum-1) =~# '^\s*#' " Comment blocks should have identical indent return previndent elseif line =~# '^\s*[\]}]' " Lines containing only closing braces should have previous indent return indent(s:FindPrevLessIndentedLine(a:lnum)) endif " Ignore comment lines when calculating indent while getline(prevlnum) =~# '^\s*#' let prevlnum = prevnonblank(prevlnum-1) if !prevlnum return previndent endif endwhile let prevline = getline(prevlnum) let previndent = indent(prevlnum) " Any examples below assume that shiftwidth=2 if prevline =~# '\v[{[:]$|[:-]\ [|>][+\-]?%(\s+\#.*|\s*)$' " Mapping key: " nested mapping: ... " " - { " key: [ " list value " ] " } " " - |- " Block scalar without indentation indicator return previndent+shiftwidth() elseif prevline =~# '\v[:-]\ [|>]%(\d+[+\-]?|[+\-]?\d+)%(\#.*|\s*)$' " - |+2 " block scalar with indentation indicator "#^^ indent+2, not indent+shiftwidth return previndent + str2nr(matchstr(prevline, \'\v([:-]\ [|>])@<=[+\-]?\d+%([+\-]?%(\s+\#.*|\s*)$)@=')) elseif prevline =~# '\v\"%([^"\\]|\\.)*\\$' " "Multiline string \ " with escaped end" let qidx = match(prevline, '\v\"%([^"\\]|\\.)*\\') return virtcol([prevlnum, qidx+1]) elseif line =~# s:liststartregex " List line should have indent equal to previous list line unless it was " caught by one of the previous rules return indent(s:FindPrevLEIndentedLineMatchingRegex(a:lnum, \ s:liststartregex)) elseif line =~# s:mapkeyregex " Same for line containing mapping key let prevmapline = s:FindPrevLEIndentedLineMatchingRegex(a:lnum, \ s:mapkeyregex) if getline(prevmapline) =~# '^\s*- ' return indent(prevmapline) + 2 else return indent(prevmapline) endif elseif prevline =~# '^\s*- ' " - List with " multiline scalar return previndent+2 elseif prevline =~# s:mapkeyregex . '\v\s*%(%('.s:c_ns_tag_property. \ '\v|'.s:c_ns_anchor_property. \ '\v|'.s:block_scalar_header. \ '\v)%(\s+|\s*%(\#.*)?$))*' " Mapping with: value " that is multiline scalar return previndent+shiftwidth() endif return previndent endfunction let &cpo = s:save_cpo ����������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/zimbu.vim���������������������������������������������������������������0000664�0000000�0000000�00000007540�13204015742�0017623�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Zimbu " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2016 Jan 25 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal ai nolisp nocin setlocal indentexpr=GetZimbuIndent(v:lnum) setlocal indentkeys=0{,0},!^F,o,O,0=ELSE,0=ELSEIF,0=CASE,0=DEFAULT,0=FINALLY " We impose recommended defaults: no Tabs, 'shiftwidth' = 2 setlocal sw=2 et let b:undo_indent = "setl et< sw< ai< indentkeys< indentexpr=" " Only define the function once. if exists("*GetZimbuIndent") finish endif let s:cpo_save = &cpo set cpo&vim " Come here when loading the script the first time. let s:maxoff = 50 " maximum number of lines to look backwards for () func GetZimbuIndent(lnum) let prevLnum = prevnonblank(a:lnum - 1) if prevLnum == 0 " This is the first non-empty line, use zero indent. return 0 endif " Taken from Python indenting: " If the previous line is inside parenthesis, use the indent of the starting " line. " Trick: use the non-existing "dummy" variable to break out of the loop when " going too far back. call cursor(prevLnum, 1) let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', \ "line('.') < " . (prevLnum - s:maxoff) . " ? dummy :" \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" \ . " =~ '\\(Comment\\|String\\|Char\\)$'") if parlnum > 0 let plindent = indent(parlnum) let plnumstart = parlnum else let plindent = indent(prevLnum) let plnumstart = prevLnum endif " When inside parenthesis: If at the first line below the parenthesis add " two 'shiftwidth', otherwise same as previous line. " i = (a " + b " + c) call cursor(a:lnum, 1) let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" \ . " =~ '\\(Comment\\|String\\|Char\\)$'") if p > 0 if p == prevLnum " When the start is inside parenthesis, only indent one 'shiftwidth'. let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" \ . " =~ '\\(Comment\\|String\\|Char\\)$'") if pp > 0 return indent(prevLnum) + shiftwidth() endif return indent(prevLnum) + shiftwidth() * 2 endif if plnumstart == p return indent(prevLnum) endif return plindent endif let prevline = getline(prevLnum) let thisline = getline(a:lnum) " If this line is not a comment and the previous one is then move the " previous line further back. if thisline !~ '^\s*#' while prevline =~ '^\s*#' let prevLnum = prevnonblank(prevLnum - 1) if prevLnum == 0 " Only comment lines before this, no indent return 0 endif let prevline = getline(prevLnum) let plindent = indent(prevLnum) endwhile endif if prevline =~ '^\s*\(IF\|\|ELSEIF\|ELSE\|GENERATE_IF\|\|GENERATE_ELSEIF\|GENERATE_ELSE\|WHILE\|REPEAT\|TRY\|CATCH\|FINALLY\|FOR\|DO\|SWITCH\|CASE\|DEFAULT\|FUNC\|VIRTUAL\|ABSTRACT\|DEFINE\|REPLACE\|FINAL\|PROC\|MAIN\|NEW\|ENUM\|CLASS\|INTERFACE\|BITS\|MODULE\|SHARED\)\>' let plindent += shiftwidth() endif if thisline =~ '^\s*\(}\|ELSEIF\>\|ELSE\>\|CATCH\|FINALLY\|GENERATE_ELSEIF\>\|GENERATE_ELSE\>\|UNTIL\>\)' let plindent -= shiftwidth() endif if thisline =~ '^\s*\(CASE\>\|DEFAULT\>\)' && prevline !~ '^\s*SWITCH\>' let plindent -= shiftwidth() endif " line up continued comment that started after some code " String something # comment comment " # comment if a:lnum == prevLnum + 1 && thisline =~ '^\s*#' && prevline !~ '^\s*#' let n = match(prevline, '#') if n > 1 let plindent = n endif endif return plindent endfunc let &cpo = s:cpo_save unlet s:cpo_save ����������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indent/zsh.vim�����������������������������������������������������������������0000664�0000000�0000000�00000000633�13204015742�0017275�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim indent file " Language: Zsh shell script " Maintainer: Christian Brabandt <cb@256bit.org> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2015-05-29 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-zsh if exists("b:did_indent") finish endif " Same as sh indenting for now. runtime! indent/sh.vim �����������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/indoff.vim���������������������������������������������������������������������0000664�0000000�0000000�00000000432�13204015742�0016452�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim support file to switch off loading indent files for file types " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2001 Jun 11 if exists("did_indent_on") unlet did_indent_on endif " Remove all autocommands in the filetypeindent group silent! au! filetypeindent * ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0015757�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/README.txt��������������������������������������������������������������0000664�0000000�0000000�00000001673�13204015742�0017464�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������keymap files for Vim One of these files is loaded when the 'keymap' option is set. The name of the file consists of these parts: {language}[-{layout}][_{encoding}].vim {language} Name of the language (e.g., "hebrew", "greek") {layout} Optional: name of the keyboard layout (e.g., "spanish", "russian3"). When omitted the layout of the standard US-english keyboard is assumed. {encoding} Optional: character encoding for which this keymap works. When omitted the "normal" encoding for the language is assumed. Use the value the 'encoding' option: lower case only, use '-' instead of '_'. Each file starts with a header, naming the maintainer and the date when it was last changed. If you find a problem in a keymap file, check if you have the most recent version. If necessary, report a problem to the maintainer. The format of the keymap lines below "loadkeymap" is explained in the Vim help files, see ":help keymap-file-format". ���������������������������������������������������������������������neovim-0.2.2/runtime/keymap/accents.vim�������������������������������������������������������������0000664�0000000�0000000�00000001211�13204015742�0020107�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for latin1 accents through dead characters " Maintainer: Bram Moolenaar " Last Change: 2006 Mar 29 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding latin1 " Use this short name in the status line. let b:keymap_name = "acc" loadkeymap `A 'A A ^A ~A :A 'C C `E 'E E ^E `I 'I I ^I ~N `O 'O O ^O ~O :O `U 'U U ^U :U 'Y Y `a 'a a ^a ~a :a 'c c `e 'e e ^e `i 'i i ^i ~n `o 'o o ^o ~o :o `u 'u u ^u :u 'y y '' ' `` ` ^^ ^ ~~ ~ :: : ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/arabic.vim��������������������������������������������������������������0000664�0000000�0000000�00000000155�13204015742�0017716�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Assume 'encoding' is set to "latin1" while actually iso-8859-6 is used source <sfile>:p:h/arabic_utf-8.vim �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/arabic_utf-8.vim��������������������������������������������������������0000664�0000000�0000000�00000006473�13204015742�0020752�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Arabic " Maintainer : Arabic Support group <support-at-arabeyes.org> " Created by : Nadim Shaikli <nadim-at-arabeyes.org> " Last Updated : 2003 Apr 26 " This is for a standard Microsoft Arabic keyboard layout. " Use this short name in the status line. let b:keymap_name = "arab" loadkeymap q <char-0x0636> " (1590) - DAD w <char-0x0635> " (1589) - SAD e <char-0x062b> " (1579) - THEH r <char-0x0642> " (1602) - QAF t <char-0x0641> " (1601) - FEH y <char-0x063a> " (1594) - GHAIN u <char-0x0639> " (1593) - AIN i <char-0x0647> " (1607) - HEH o <char-0x062e> " (1582) - KHAH p <char-0x062d> " (1581) - HAH [ <char-0x062c> " (1580) - JEEM ] <char-0x062f> " (1583) - DAL a <char-0x0634> " (1588) - SHEEN s <char-0x0633> " (1587) - SEEN d <char-0x064a> " (1610) - YEH f <char-0x0628> " (1576) - BEH g <char-0x0644> " (1604) - LAM h <char-0x0627> " (1575) - ALEF j <char-0x062a> " (1578) - TEH k <char-0x0646> " (1606) - NOON l <char-0x0645> " (1605) - MEEM ; <char-0x0643> " (1603) - KAF ' <char-0x0637> " (1591) - TAH z <char-0x0626> " (1574) - YEH with HAMZA ABOVE x <char-0x0621> " (1569) - HAMZA c <char-0x0624> " (1572) - WAW with HAMZA ABOVE v <char-0x0631> " (1585) - REH b <char-0x0644><char-0x0627> " (1604/1575) - LAA (lam alef) n <char-0x0649> " (1609) - ALEF MAKSURA m <char-0x0629> " (1577) - TEH MARBUTA , <char-0x0648> " (1608) - WAW . <char-0x0632> " (1586) - ZAIN / <char-0x0638> " (1592) - ZAH 0 <char-0x0660> " (1632) - Arabic 0 1 <char-0x0661> " (1633) - Arabic 1 2 <char-0x0662> " (1634) - Arabic 2 3 <char-0x0663> " (1635) - Arabic 3 4 <char-0x0664> " (1636) - Arabic 4 5 <char-0x0665> " (1637) - Arabic 5 6 <char-0x0666> " (1638) - Arabic 6 7 <char-0x0667> " (1639) - Arabic 7 8 <char-0x0668> " (1640) - Arabic 8 9 <char-0x0669> " (1641) - Arabic 9 ` <char-0x0630> " (1584) - THAL ~ <char-0x0651> " (1617) - Tanween -- SHADDA Q <char-0x064e> " (1614) - Tanween -- FATHA W <char-0x064b> " (1611) - Tanween -- FATHATAN E <char-0x064f> " (1615) - Tanween -- DAMMA R <char-0x064c> " (1612) - Tanween -- DAMMATAN T <char-0x0644><char-0x0625> " (1604/1573) - LAA with HAMZA BELOW Y <char-0x0625> " (1573) - ALEF with HAMZA BELOW U <char-0x0060> " (96) - ASCII -- ` I <char-0x00f7> " (247) - ASCII suppl -- div O <char-0x00d7> " (215) - ASCII suppl -- mul P <char-0x061b> " (1563) - Arabic Semicolon { <char-0x003c> " (60) - ASCII -- < } <char-0x003e> " (62) - ASCII -- > A <char-0x0650> " (1616) - Tanween -- KASRA S <char-0x064d> " (1613) - Tanween -- KASRATAN D <char-0x005b> " (91) - ASCII -- [ F <char-0x005d> " (93) - ASCII -- ] G <char-0x0644><char-0x0623> " (1604/1571) - LAA with HAMZA ABOVE H <char-0x0623> " (1571) - ALEF with HAMZA ABOVE J <char-0x0640> " (1600) - TATWEEL K <char-0x060c> " (1548) - Arabic Comma L <char-0x002f> " (47) - ASCII -- / Z <char-0x007e> " (126) - ASCII -- ~ X <char-0x0652> " (1618) - Tanween -- SUKUN C <char-0x007b> " (123) - ASCII -- { V <char-0x007d> " (125) - ASCII -- } B <char-0x0644><char-0x0622> " (1604/1570) - LAA with MADDA ABOVE N <char-0x0622> " (1570) - ALEF with MADDA ABOVE M <char-0x0027> " (39) - ASCII -- ' < <char-0x002c> " (44) - ASCII -- , > <char-0x002e> " (46) - ASCII -- . ? <char-0x061f> " (1567) - Arabic Question Mark �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/armenian-eastern_utf-8.vim����������������������������������������������0000664�0000000�0000000�00000001575�13204015742�0022760�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Benjamin Linskey <vim@benlinskey.com> " Last Changed: 2016 December 5 " URL: https://github.com/blinskey/vim-armenian-keymaps let b:keymap_name = "hy" loadkeymap " Capital letters A Ա B Բ C Գ D Դ Y Ե Z Զ E Է U Ը : Թ + Ժ I Ի L Լ Q Խ ? Ծ K Կ H Հ @ Ձ > Ղ J Ճ M Մ # Յ N Ն < Շ O Ո { Չ P Պ } Ջ _ Ռ S Ս V Վ T Տ R Ր X Ց W Ւ \" Փ G Ք ) Օ F Ֆ " Lowercase letters a ա b բ c գ d դ y ե z զ e է u ը ; թ = ժ i ի l լ q խ / ծ k կ h հ 2 ձ . ղ j ճ m մ 3 յ n ն , շ o ո [ չ p պ ] ջ - ռ s ս v վ t տ r ր x ց w ւ ' փ g ք 0 օ f ֆ & և " Punctuation ` ՝ ~ ՜ 1 ։ 4 ՛ 5 , 6 - 7 . 8 « 9 » * ( ( ) \\ ' | ՞ " Numbers ! 1 $ 3 % 4 ^ 9 �����������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/armenian-western_utf-8.vim����������������������������������������������0000664�0000000�0000000�00000001575�13204015742�0023006�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Benjamin Linskey <vim@benlinskey.com> " Last Changed: 2016 December 5 " URL: https://github.com/blinskey/vim-armenian-keymaps let b:keymap_name = "hy" loadkeymap " Capital letters A Ա P Բ C Գ T Դ Y Ե Z Զ E Է U Ը : Թ + Ժ I Ի L Լ Q Խ ? Ծ G Կ H Հ @ Ձ > Ղ J Ճ M Մ # Յ N Ն < Շ O Ո { Չ B Պ } Ջ _ Ռ S Ս W Վ D Տ R Ր X Ց V Ւ \" Փ K Ք ) Օ F Ֆ " Lowercase letters a ա p բ c գ t դ y ե z զ e է u ը ; թ = ժ i ի l լ q խ / ծ g կ h հ 2 ձ . ղ j ճ m մ 3 յ n ն , շ o ո [ չ b պ ] ջ - ռ s ս w վ d տ r ր x ց v ւ ' փ k ք 0 օ f ֆ & և " Punctuation ` ՝ ~ ՜ 1 ։ 4 ՛ 5 , 6 - 7 . 8 « 9 » * ( ( ) \\ ' | ՞ " Numbers ! 1 $ 3 % 4 ^ 9 �����������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/belarusian-jcuken.vim���������������������������������������������������0000664�0000000�0000000�00000004726�13204015742�0022107�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Belarusian characters, layout 'jcuken', classical variant " Useful mainly with UTF-8, but may work with other encodings. " Derived From: russian-jcuken.vim " Maintainer: Aliaksei Nestserau <aliaksei@screencustoms.com> " Last Changed: 2012 Jul 23 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "by" loadkeymap ~ Ё CYRILLIC CAPITAL LETTER IO ` ё CYRILLIC SMALL LETTER IO F А CYRILLIC CAPITAL LETTER A < Б CYRILLIC CAPITAL LETTER BE D В CYRILLIC CAPITAL LETTER VE U Г CYRILLIC CAPITAL LETTER GHE L Д CYRILLIC CAPITAL LETTER DE T Е CYRILLIC CAPITAL LETTER IE : Ж CYRILLIC CAPITAL LETTER ZHE P З CYRILLIC CAPITAL LETTER ZE B І CYRILLIC CAPITAL LETTER I Q Й CYRILLIC CAPITAL LETTER SHORT I R К CYRILLIC CAPITAL LETTER KA K Л CYRILLIC CAPITAL LETTER EL V М CYRILLIC CAPITAL LETTER EM Y Н CYRILLIC CAPITAL LETTER EN J О CYRILLIC CAPITAL LETTER O G П CYRILLIC CAPITAL LETTER PE H Р CYRILLIC CAPITAL LETTER ER C С CYRILLIC CAPITAL LETTER ES N Т CYRILLIC CAPITAL LETTER TE E У CYRILLIC CAPITAL LETTER U A Ф CYRILLIC CAPITAL LETTER EF { Х CYRILLIC CAPITAL LETTER HA W Ц CYRILLIC CAPITAL LETTER TSE X Ч CYRILLIC CAPITAL LETTER CHE I Ш CYRILLIC CAPITAL LETTER SHA O Ў CYRILLIC CAPITAL LETTER ASYLLABIC U } ' APOSTROPHE S Ы CYRILLIC CAPITAL LETTER YERU M Ь CYRILLIC CAPITAL LETTER SOFT SIGN \" Э CYRILLIC CAPITAL LETTER E > Ю CYRILLIC CAPITAL LETTER YU Z Я CYRILLIC CAPITAL LETTER YA f а CYRILLIC SMALL LETTER A , б CYRILLIC SMALL LETTER BE d в CYRILLIC SMALL LETTER VE u г CYRILLIC SMALL LETTER GHE l д CYRILLIC SMALL LETTER DE t е CYRILLIC SMALL LETTER IE ; ж CYRILLIC SMALL LETTER ZHE p з CYRILLIC SMALL LETTER ZE b і CYRILLIC SMALL LETTER I q й CYRILLIC SMALL LETTER SHORT I r к CYRILLIC SMALL LETTER KA k л CYRILLIC SMALL LETTER EL v м CYRILLIC SMALL LETTER EM y н CYRILLIC SMALL LETTER EN j о CYRILLIC SMALL LETTER O g п CYRILLIC SMALL LETTER PE h р CYRILLIC SMALL LETTER ER c с CYRILLIC SMALL LETTER ES n т CYRILLIC SMALL LETTER TE e у CYRILLIC SMALL LETTER U a ф CYRILLIC SMALL LETTER EF [ х CYRILLIC SMALL LETTER HA w ц CYRILLIC SMALL LETTER TSE x ч CYRILLIC SMALL LETTER CHE i ш CYRILLIC SMALL LETTER SHA o ў CYRILLIC SMALL LETTER ASYLLABIC U ] ' APOSTROPHE s ы CYRILLIC SMALL LETTER YERU m ь CYRILLIC SMALL LETTER SOFT SIGN ' э CYRILLIC SMALL LETTER E . ю CYRILLIC SMALL LETTER YU z я CYRILLIC SMALL LETTER YA @ " # ' $ * % : ^ , & . * ; ������������������������������������������neovim-0.2.2/runtime/keymap/bulgarian-bds.vim�������������������������������������������������������0000664�0000000�0000000�00000014545�13204015742�0021217�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim keymap file for Bulgarian and Russian characters, "bds" layout. " Most of it can be used with both utf-8 and cp1251 file encodings, except " the accented characters which can only be stored in utf-8. " This file itself is in utf-8. " Maintainer: Boyko Bantchev <boykobb@gmail.com> " URI: http://www.math.bas.bg/bantchev/vim/bulgarian-bds.vim " Last Changed: 2010 May 4 " This keymap corresponds to what is called Bulgarian standard typewriter " keyboard layout, or "БДС". " " Note that, in addition to the Bulgarian alphabet, the BDS layout prescribes " the presence of the following characters: " — The Russian letters ы (small), and Э and э (capital and small). " — The latin capital letters I and V – used to type Roman numerals " without having to leave Cyrillic mode. " " Some punctuation characters present in ascii are mapped in BDS to keys " different from the ones they occupy in the QWERTY layout, because the latter " keys are used to type other characters. " " In this keymap, also defined (besides BDS) are: " — The Russian letters Ё and ё (capital and small), as well as the " Russian capital letter Ы (see above for the small counterpart). " This way, using the bulgarian-bds keymap, one can access both " the Bulgarian and the Russian alphabets. " — The quotation marks „ “ ” ‘ ’ (used in the Bulgarian and English " quotation styles), as well as « » (Russian quotation style). " — The characters §, №, – (en-dash), — (em-dash), …, •, ·, ±, °, ¬, " ¤, €, ‰, †, ‡, and ¶. " " The keymap also defines key combinations for grave and acute accents. " (Grave accent is used in Bulgarian, acute in Russian, but both accents " apply to other languages as well.) " " For details of what key or key combination maps to what character, please " see below the map itself. " " See also http://www.math.bas.bg/bantchev/vim/kbdbul.html (in Bulgarian). scriptencoding utf-8 let b:keymap_name = "bds" loadkeymap D А CYRILLIC CAPITAL LETTER A ? Б CYRILLIC CAPITAL LETTER BE L В CYRILLIC CAPITAL LETTER VE H Г CYRILLIC CAPITAL LETTER GHE O Д CYRILLIC CAPITAL LETTER DE E Е CYRILLIC CAPITAL LETTER IE E:: Ё CYRILLIC CAPITAL LETTER IO G Ж CYRILLIC CAPITAL LETTER ZHE P З CYRILLIC CAPITAL LETTER ZE R И CYRILLIC CAPITAL LETTER I X Й CYRILLIC CAPITAL LETTER SHORT I U К CYRILLIC CAPITAL LETTER KA > Л CYRILLIC CAPITAL LETTER EL : М CYRILLIC CAPITAL LETTER EM K Н CYRILLIC CAPITAL LETTER EN F О CYRILLIC CAPITAL LETTER O M П CYRILLIC CAPITAL LETTER PE < Р CYRILLIC CAPITAL LETTER ER I С CYRILLIC CAPITAL LETTER ES J Т CYRILLIC CAPITAL LETTER TE W У CYRILLIC CAPITAL LETTER U B Ф CYRILLIC CAPITAL LETTER EF N Х CYRILLIC CAPITAL LETTER HA { Ц CYRILLIC CAPITAL LETTER TSE \" Ч CYRILLIC CAPITAL LETTER CHE T Ш CYRILLIC CAPITAL LETTER SHA Y Щ CYRILLIC CAPITAL LETTER SHCHA C Ъ CYRILLIC CAPITAL LETTER HARD SIGN CX Ы CYRILLIC CAPITAL LETTER YERU A Ь CYRILLIC CAPITAL LETTER SOFT SIGN V Э CYRILLIC CAPITAL LETTER REVERSED E Z Ю CYRILLIC CAPITAL LETTER YU S Я CYRILLIC CAPITAL LETTER YA d а CYRILLIC SMALL LETTER A \/ б CYRILLIC SMALL LETTER BE l в CYRILLIC SMALL LETTER VE h г CYRILLIC SMALL LETTER GHE o д CYRILLIC SMALL LETTER DE e е CYRILLIC SMALL LETTER IE e:: ё CYRILLIC SMALL LETTER IO g ж CYRILLIC SMALL LETTER ZHE p з CYRILLIC SMALL LETTER ZE r и CYRILLIC SMALL LETTER I x й CYRILLIC SMALL LETTER SHORT I u к CYRILLIC SMALL LETTER KA \. л CYRILLIC SMALL LETTER EL ; м CYRILLIC SMALL LETTER EM k н CYRILLIC SMALL LETTER EN f о CYRILLIC SMALL LETTER O m п CYRILLIC SMALL LETTER PE , р CYRILLIC SMALL LETTER ER i с CYRILLIC SMALL LETTER ES j т CYRILLIC SMALL LETTER TE w у CYRILLIC SMALL LETTER U b ф CYRILLIC SMALL LETTER EF n х CYRILLIC SMALL LETTER HA [ ц CYRILLIC SMALL LETTER TSE ' ч CYRILLIC SMALL LETTER CHE t ш CYRILLIC SMALL LETTER SHA y щ CYRILLIC SMALL LETTER SHCHA c ъ CYRILLIC SMALL LETTER HARD SIGN Q ы CYRILLIC SMALL LETTER YERU a ь CYRILLIC SMALL LETTER SOFT SIGN v э CYRILLIC SMALL LETTER REVERSED E z ю CYRILLIC SMALL LETTER YU s я CYRILLIC SMALL LETTER YA _ I LATIN CAPITAL LETTER I + V LATIN CAPITAL LETTER V $ " QUOTATION MARK \\ ( LEFT PARENTHESIS | ) RIGHT PARENTHESIS # + PLUS SIGN q , COMMA ( - HYPHEN-MINUS = . FULL STOP (PERIOD) * / SOLIDUS (SLASH) & : COLON ] ; SEMICOLON ^ = EQUALS SIGN @ ? QUESTION MARK } § SECTION SIGN (PARAGRAPH SIGN) ) № NUMERO SIGN -- – EN DASH --- — EM DASH .. … HORIZONTAL ELLIPSIS `` “ LEFT DOUBLE QUOTATION MARK '' ” RIGHT DOUBLE QUOTATION MARK ,, „ DOUBLE LOW-9 QUOTATION MARK `. ‘ LEFT SINGLE QUOTATION MARK '. ’ RIGHT SINGLE QUOTATION MARK << « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK >> » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK ** • BULLET ,. · MIDDLE DOT +- ± PLUS-MINUS SIGN ^o ° DEGREE SIGN ~~ ¬ NOT SIGN @@ ¤ CURRENCY SIGN $$ € EURO SIGN %% ‰ PER MILLE SIGN +| † DAGGER ++ ‡ DOUBLE DAGGER || ¶ PILCROW SIGN " Accented characters cannot map onto cp1251 – use utf-8 file encoding. " To apply an accent to a letter, type the corresponding key combination " to the immediate right of that letter. ^` <char-0x300> COMBINING GRAVE ACCENT ^' <char-0x301> COMBINING ACUTE ACCENT �����������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/bulgarian-phonetic.vim��������������������������������������������������0000664�0000000�0000000�00000013256�13204015742�0022256�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim keymap file for Bulgarian and Russian characters, "phonetic" layout. " Most of it can be used with both utf-8 and cp1251 file encodings, except " the accented vowels which can only be stored in utf-8. " This file itself is in utf-8. " Maintainer: Boyko Bantchev <boykobb@gmail.com> " URI: http://www.math.bas.bg/bantchev/vim/bulgarian-phonetic.vim " Last Changed: 2010 May 4 " This keymap corresponds to what is called "phonetic layout" in Bulgaria: " Cyrillic letters tend to be mapped to their Latin homophones wherever " there are ones. Most keys corresponding to punctuation characters are " left unmapped, so they retain their usual (QWERTY) meanings when typing " Cyrillic. " " In addition to the Bulgarian alphabet, the keymap makes accessible the " following characters: " — The letters Ё and ё, Э and э, and Ы and ы (in pairs of capital and " small). These are the letters in the Russian alphabet that are not " present in Bulgarian, so using the bulgarian-phonetic keymap one can " type in Russian, too. " — The quotation marks „ “ ” ‘ ’ (used in the Bulgarian and English " quotation styles), as well as « » (Russian quotation style). " — The characters §, №, – (en-dash), — (em-dash), …, •, ·, ±, °, ¬, " ¤, €, ‰, †, ‡, and ¶. " " The keymap also defines key combinations for grave and acute accents. " (Grave accent is used in Bulgarian, acute in Russian, but both accents " apply to other languages as well.) " " For details of what key or key combination maps to what character, please " see below the map itself. " " See also http://www.math.bas.bg/bantchev/vim/kbdbul.html (in Bulgarian). scriptencoding utf-8 let b:keymap_name = "pho" loadkeymap A А CYRILLIC CAPITAL LETTER A B Б CYRILLIC CAPITAL LETTER BE W В CYRILLIC CAPITAL LETTER VE G Г CYRILLIC CAPITAL LETTER GHE D Д CYRILLIC CAPITAL LETTER DE E Е CYRILLIC CAPITAL LETTER IE E:: Ё CYRILLIC CAPITAL LETTER IO V Ж CYRILLIC CAPITAL LETTER ZHE Z З CYRILLIC CAPITAL LETTER ZE I И CYRILLIC CAPITAL LETTER I J Й CYRILLIC CAPITAL LETTER SHORT I K К CYRILLIC CAPITAL LETTER KA L Л CYRILLIC CAPITAL LETTER EL M М CYRILLIC CAPITAL LETTER EM N Н CYRILLIC CAPITAL LETTER EN O О CYRILLIC CAPITAL LETTER O P П CYRILLIC CAPITAL LETTER PE R Р CYRILLIC CAPITAL LETTER ER S С CYRILLIC CAPITAL LETTER ES T Т CYRILLIC CAPITAL LETTER TE U У CYRILLIC CAPITAL LETTER U F Ф CYRILLIC CAPITAL LETTER EF H Х CYRILLIC CAPITAL LETTER HA C Ц CYRILLIC CAPITAL LETTER TSE ~ Ч CYRILLIC CAPITAL LETTER CHE { Ш CYRILLIC CAPITAL LETTER SHA } Щ CYRILLIC CAPITAL LETTER SHCHA Y Ъ CYRILLIC CAPITAL LETTER HARD SIGN YI Ы CYRILLIC CAPITAL LETTER YERU X Ь CYRILLIC CAPITAL LETTER SOFT SIGN YE Э CYRILLIC CAPITAL LETTER REVERSED E | Ю CYRILLIC CAPITAL LETTER YU Q Я CYRILLIC CAPITAL LETTER YA a а CYRILLIC SMALL LETTER A b б CYRILLIC SMALL LETTER BE w в CYRILLIC SMALL LETTER VE g г CYRILLIC SMALL LETTER GHE d д CYRILLIC SMALL LETTER DE e е CYRILLIC SMALL LETTER IE e:: ё CYRILLIC SMALL LETTER IO v ж CYRILLIC SMALL LETTER ZHE z з CYRILLIC SMALL LETTER ZE i и CYRILLIC SMALL LETTER I j й CYRILLIC SMALL LETTER SHORT I k к CYRILLIC SMALL LETTER KA l л CYRILLIC SMALL LETTER EL m м CYRILLIC SMALL LETTER EM n н CYRILLIC SMALL LETTER EN o о CYRILLIC SMALL LETTER O p п CYRILLIC SMALL LETTER PE r р CYRILLIC SMALL LETTER ER s с CYRILLIC SMALL LETTER ES t т CYRILLIC SMALL LETTER TE u у CYRILLIC SMALL LETTER U f ф CYRILLIC SMALL LETTER EF h х CYRILLIC SMALL LETTER HA c ц CYRILLIC SMALL LETTER TSE ` ч CYRILLIC SMALL LETTER CHE [ ш CYRILLIC SMALL LETTER SHA ] щ CYRILLIC SMALL LETTER SHCHA y ъ CYRILLIC SMALL LETTER HARD SIGN yi ы CYRILLIC SMALL LETTER YERU x ь CYRILLIC SMALL LETTER SOFT SIGN ye э CYRILLIC SMALL LETTER REVERSED E \\ ю CYRILLIC SMALL LETTER YU q я CYRILLIC SMALL LETTER YA !! § SECTION SIGN (PARAGRAPH SIGN) ## № NUMERO SIGN -- – EN DASH --- — EM DASH .. … HORIZONTAL ELLIPSIS `` “ LEFT DOUBLE QUOTATION MARK '' ” RIGHT DOUBLE QUOTATION MARK ,, „ DOUBLE LOW-9 QUOTATION MARK `. ‘ LEFT SINGLE QUOTATION MARK '. ’ RIGHT SINGLE QUOTATION MARK << « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK >> » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK ** • BULLET ,. · MIDDLE DOT +- ± PLUS-MINUS SIGN ^o ° DEGREE SIGN ~~ ¬ NOT SIGN @@ ¤ CURRENCY SIGN $$ € EURO SIGN %% ‰ PER MILLE SIGN +| † DAGGER ++ ‡ DOUBLE DAGGER || ¶ PILCROW SIGN " Accented characters cannot map onto cp1251 – use utf-8 file encoding. " To apply an accent to a letter, type the corresponding key combination " to the immediate right of that letter. ^` <char-0x300> COMBINING GRAVE ACCENT ^' <char-0x301> COMBINING ACUTE ACCENT ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/canfr-win.vim�����������������������������������������������������������0000664�0000000�0000000�00000002216�13204015742�0020361�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for the normalized Canadian multilingual keyboard " CAN/CSA Z243.200-92 using the latin1 encoding. " This mapping is limited in scope, as it assumes that the AltGr " key works as it typically does in a Windows system with a multilingual " English keyboard. It probably won't work with the US keyboard on US " English versions of Windows, because those don't provide the AltGr keys. " The mapping was tested with Win2k and WinXP. " Maintainer: Eric Joanis <joanis@cs.toronto.edu> " Last Change: 2004 Jan 13 " 2003 Dec 04 " Initial Revision " 2004 Jan 13 " Added the upper case accented characters, forgotten in the initial version. " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding latin1 " Use this short name in the status line. let b:keymap_name = "canfr" loadkeymap < ' > " / ? ' \" \\ | [a [e [i [o [u [A [E [I [O [U [[ ^ {a {e {i {o {u {y {A {E {I {O {U ] } ` / ~ \\ ^ ? < > a e i o u A E I O U ` a o n s A O N S ~ | { } [ ] ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/croatian.vim������������������������������������������������������������0000664�0000000�0000000�00000000524�13204015742�0020275�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������let s:encoding = &enc if s:encoding == 'latin1' if has("unix") let s:encoding = 'iso-8859-2' else let s:encoding = 'cp1250' endif endif if s:encoding == 'utf-8' source <sfile>:p:h/croatian_utf-8.vim elseif s:encoding == 'cp1250' source <sfile>:p:h/croatian_cp1250.vim else source <sfile>:p:h/croatian_iso-8859-2.vim endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/croatian_cp1250.vim�����������������������������������������������������0000664�0000000�0000000�00000001050�13204015742�0021262�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Croatian characters, classical variant, cp1250 encoding " " Maintainer: Paul B. Mahol <onemda@gmail.com> " Last Changed: 2007 Oct 15 scriptencoding cp1250 let b:keymap_name = "croatian-cp1250" " Uncomment line below if you prefer short name "let b:keymap_name = "hr-cp1250" loadkeymap z y Z Y y z Y Z [ { ] } ; : ' " \ | / - ? _ > : < ; < > { } [ ] \ | = + + * - ' _ ? @ " ^ & & / * ( ( ) ) = ~ @ ^ ` ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/croatian_iso-8859-2.vim�������������������������������������������������0000664�0000000�0000000�00000001301�13204015742�0021713�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Croatian characters, classical variant, iso-8859-2 encoding " " Maintainer: Paul B. Mahol <onemda@gmail.com> " Last Changed: 2007 Oct 14 scriptencoding iso-8859-2 let b:keymap_name = "croatian-iso-8859-2" " Uncomment line below if you prefer short name "let b:keymap_name = "hr-iso-8859-2" loadkeymap " swap y and z, not important z y Z Y y z Y Z " s< [ " S< { " D/ } " d/ ] " c< ; " c' ' " C< : " C' " " z< \ " Z< | | @ \ { } [ ] @ " ^ & & / * ( ( ) ) = _ ? - ' = + + * / - < ; > : ? _ ~ ^ ` " you still want to be able to type <, > < > ` �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/croatian_utf-8.vim������������������������������������������������������0000664�0000000�0000000�00000001142�13204015742�0021315�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Croatian characters, classical variant, UTF-8 encoding " " Maintainer: Paul B. Mahol <onemda@gmail.com> " Last Changed: 2007 Oct 14 scriptencoding UTF-8 let b:keymap_name = "croatian-UTF-8" " Uncomment line below if you prefer short name "let b:keymap_name = "hr-UTF-8" loadkeymap z y Z Y y z Y Z [ š { Š ] đ } Đ ; č : Č ' ć " Ć \ ž | Ž @ " ^ & & / * ( ( ) ) = _ ? + * = + - ' æ [ ç ] â { î } < ; > : / - ? _ ö @ ñ \ ÷ | å € ¬ < ® > ± ~ ² ˇ ³ ^ ´ ˘ µ ° · ` ¹ ´ í § Û ÷ Ü ¤ Ý × § ß ì ł Ì Ł ° ˝ ` ¸ ½ ¸ ­ ¨ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/czech.vim���������������������������������������������������������������0000664�0000000�0000000�00000000043�13204015742�0017565�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source <sfile>:p:h/czech_utf-8.vim ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/czech_utf-8.vim���������������������������������������������������������0000664�0000000�0000000�00000001064�13204015742�0020614�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Štěpán Němec <stepnem@gmail.com> " Last Changed: Fri 25 Jun 2010 22:08:43 CEST let b:keymap_name = "czech" loadkey 0 é 9 í 8 á 7 ý 6 ž 5 ř 4 č 3 š 2 ě 1 + ` ; ) 0 ( 9 * 8 & 7 ^ 6 % 5 $ 4 # 3 @ 2 ! 1 ] ) } ( [ ú { / ' § \" ! ; ů : " / - ? _ > : < ? | ' ~u ů ~U Ů \\a ä \\e ë \\i ï \\o ö \\u ü \\z ÿ \\A Ä \\E Ë \\I Ï \\O Ö \\U Ü \\Z Ÿ =a á =e é =i í =o ó =u ú =z ý =A Á =E É =I Í =O Ó =U Ú =Z Ý +c č +d ď +e ě +n ň +r ř +s š +t ť +y ž +C Č +D Ď +E Ě +N Ň +R Ř +S Š +T Ť +Y Ž y z Y Z z y Z Y ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/dvorak.vim��������������������������������������������������������������0000664�0000000�0000000�00000000773�13204015742�0017771�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Ashish SHUKLA <wahjava@members.fsf.org> " Last Changed: 2009 Jul 04 " " All characters are ASCII, conversion to another encoding (e.g., UTF-8) " should work. let b:keymap_name = "en-dv" loadkeymap q ' w , e . r p t y y f u g i c o r p l [ / ] = \\ \\ a a s o d e f u g i h d j h k t l n ; s ' - z ; x q c j v k b x n b m m , w . v / z Z : X Q C J V K B X N B M M < W > V ? Z A A S O D E F U G I H D J H K T L N : S \" _ Q " W < E > R P T Y Y F U G I C O R P L { ? } + | | - [ _ { = ] + } �����neovim-0.2.2/runtime/keymap/esperanto.vim�����������������������������������������������������������0000664�0000000�0000000�00000000047�13204015742�0020475�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source <sfile>:p:h/esperanto_utf-8.vim �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/esperanto_utf-8.vim�����������������������������������������������������0000664�0000000�0000000�00000004537�13204015742�0021530�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Esperanto keymap for utf-8 " Maintainer: A.J.Mechelynck <antoine.mechelynck@skynet.be> " Last Changed: Sat 2003 Mar 15 05:23 " This keymap adds the special consonants of Esperanto to an existing Latin " keyboard. " " All keys same as usual, except: " ^ followed by any of CcGgHhJjSs adds a circumflex on top of the letter " and replaces the grave accent by a breve " any of CcGgHhJjSsUu followed by X or x maps to consonant with ^ or Uu with " breve. " short keymap name for statusline let b:keymap_name = "Eo" " make cursor bright green when keymap is active "highlight lCursor guifg=NONE guibg=#00E000 " The following digraphs are already defined " digraph C> 0x0108 c> 0x0109 G> 0x011C g> 0x011D H> 0x0124 h> 0x0125 " digraph J> 0x0134 j> 0x0135 S> 0x015C s> 0x015D U( 0x016C u( 0x016D scriptencoding latin1 loadkeymap ^C <Char-0x0108> " (264) UPPERCASE C WITH CIRCUMFLEX ^c <Char-0x0109> " (265) LOWERCASE c WITH CIRCUMFLEX ^G <Char-0x011C> " (284) UPPERCASE G WITH CIRCUMFLEX ^g <Char-0x011D> " (285) LOWERCASE g WITH CIRCUMFLEX ^H <Char-0x0124> " (292) UPPERCASE H WITH CIRCUMFLEX ^h <Char-0x0125> " (293) LOWERCASE h WITH CIRCUMFLEX ^J <Char-0x0134> " (308) UPPERCASE J WITH CIRCUMFLEX ^j <Char-0x0135> " (309) LOWERCASE j WITH CIRCUMFLEX ^S <Char-0x015C> " (348) UPPERCASE S WITH CIRCUMFLEX ^s <Char-0x015D> " (349) LOWERCASE s WITH CIRCUMFLEX <Char-0x016C> " (364) UPPERCASE U WITH BREVE <Char-0x016D> " (365) LOWERCASE u WITH BREVE CX <Char-0x0108> " (264) UPPERCASE C WITH CIRCUMFLEX Cx <Char-0x0108> " (264) UPPERCASE C WITH CIRCUMFLEX cx <Char-0x0109> " (265) LOWERCASE c WITH CIRCUMFLEX GX <Char-0x011C> " (284) UPPERCASE G WITH CIRCUMFLEX Gx <Char-0x011C> " (284) UPPERCASE G WITH CIRCUMFLEX gx <Char-0x011D> " (285) LOWERCASE g WITH CIRCUMFLEX HX <Char-0x0124> " (292) UPPERCASE H WITH CIRCUMFLEX Hx <Char-0x0124> " (292) UPPERCASE H WITH CIRCUMFLEX hx <Char-0x0125> " (293) LOWERCASE h WITH CIRCUMFLEX JX <Char-0x0134> " (308) UPPERCASE J WITH CIRCUMFLEX Jx <Char-0x0134> " (308) UPPERCASE J WITH CIRCUMFLEX jx <Char-0x0135> " (309) LOWERCASE j WITH CIRCUMFLEX SX <Char-0x015C> " (348) UPPERCASE S WITH CIRCUMFLEX Sx <Char-0x015C> " (348) UPPERCASE S WITH CIRCUMFLEX sx <Char-0x015D> " (349) LOWERCASE s WITH CIRCUMFLEX UX <Char-0x016C> " (364) UPPERCASE U WITH BREVE Ux <Char-0x016C> " (364) UPPERCASE U WITH BREVE ux <Char-0x016D> " (365) LOWERCASE u WITH BREVE �����������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/greek.vim���������������������������������������������������������������0000664�0000000�0000000�00000000352�13204015742�0017571�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Assume 'encoding' is set to "latin1" while actually cp1253 or iso-8859-7 is " being used if has("win16") || has("win32") || has("win32unix") source <sfile>:p:h/greek_cp1253.vim else source <sfile>:p:h/greek_iso-8859-7.vim endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/greek_cp1253.vim��������������������������������������������������������0000664�0000000�0000000�00000004234�13204015742�0020571�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for greek " Maintainer: Grigorios Magklis <maglis@cs.rochester.edu> " Patched for MS-Windows CP1253: Panagiotis Louridas <louridas@acm.org> " Last Updated: Fri 13 Feb 2004 13:01:33 " " This keyboard layout allows all Greek symbols to be typed, " including accented capitals, diaeresis & accent on the same " vowel, and the Greek semicolon sign. " " accent ";" + letter " diaeresis ":" + letter " diaeresis + accent ";" + ":" (or ":" + ";") + letter " semicolon "q" " colon "Q" " greek semicolon "W" " sigma at end of word "w" " greek left double-quote "<" twice " greek right double-quote ">" twice " Use this short name in the status line. let b:keymap_name = "greek" loadkeymap " capital A <char-193> " B <char-194> " G <char-195> " D <char-196> " E <char-197> " Z <char-198> " H <char-199> " U <char-200> " I <char-201> " K <char-202> " L <char-203> " M <char-204> " N <char-205> " J <char-206> " O <char-207> " P <char-208> " R <char-209> " S <char-211> " T <char-212> " Y <char-213> " F <char-214> " X <char-215> " C <char-216> " V <char-217> " " small a <char-225> " b <char-226> " g <char-227> " d <char-228> " e <char-229> " z <char-230> " h <char-231> " u <char-232> " i <char-233> " k <char-234> " l <char-235> " m <char-236> " n <char-237> " j <char-238> " o <char-239> " p <char-240> " r <char-241> " w <char-242> " s <char-243> " t <char-244> " y <char-245> " f <char-246> " x <char-247> " c <char-248> " v <char-249> " " accented capital ;A <char-162> " ;E <char-184> " ;H <char-185> " ;I <char-186> " ;Y <char-190> " ;O <char-188> " ;V <char-191> " " :I <char-218> " :Y <char-219> " " accented small ;a <char-220> " ;e <char-221> " ;h <char-222> " ;i <char-223> " ;y <char-253> " ;o <char-252> " ;v <char-254> " " :i <char-250> " :y <char-251> " " ;:i <char-192> " :;i <char-192> " ;:y <char-224> " :;y <char-224> " " symbols q ; " ; Q : " : W <char-183> " ; <char-180> " : <char-168> " ;: <char-181> " :; <char-181> " " quotes << <char-171> " >> <char-187> " " <char-161> " " <char-162> " ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/greek_cp737.vim���������������������������������������������������������0000664�0000000�0000000�00000003643�13204015742�0020522�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for greek DOS cp737 " Maintainer: Panagiotis Louridas <louridas@acm.org> " Last Updated: Thu Mar 23 14:05:45 EET 2006 " This keyboard layout allows all Greek symbols to be typed, " including accented capitals and diaeresis. It does not " include diaeresis and accent on the same vowel, nor " the greek quotes, as these were not included in the codepage. " It includes the Greek semicolon sign. " " accent ";" + letter " diaeresis ":" + letter " diaeresis + accent ";" + ":" (or ":" + ";") + letter " semicolon "q" " colon "Q" " greek semicolon "W" " sigma at end of word "w" " Use this short name in the status line. let b:keymap_name = "greek" loadkeymap " capital A <char-128> " B <char-129> " G <char-130> " D <char-131> " E <char-132> " Z <char-133> " H <char-134> " U <char-135> " I <char-136> " K <char-137> " L <char-138> " M <char-139> " N <char-140> " J <char-141> " O <char-142> " P <char-143> " R <char-144> " S <char-145> " T <char-146> " Y <char-147> " F <char-148> " X <char-149> " C <char-150> " V <char-151> " " small a <char-152> " b <char-153> " g <char-154> " d <char-155> " e <char-156> " z <char-157> " h <char-158> " u <char-159> " i <char-160> " k <char-161> " l <char-162> " m <char-163> " n <char-164> " j <char-165> " o <char-166> " p <char-167> " r <char-168> " s <char-169> " w <char-170> " t <char-171> " y <char-172> " f <char-173> " x <char-174> " c <char-175> " v <char-224> " " accented capital ;A <char-234> " ;E <char-235> " ;H <char-236> " ;I <char-237> " ;O <char-238> " ;Y <char-239> " ;V <char-240> " " :I <char-244> " :Y <char-245> " " accented small ;a <char-225> " ;e <char-226> " ;h <char-227> " ;i <char-229> " ;o <char-230> " ;y <char-231> " ;v <char-233> " " :i <char-228> " :y <char-232> " " " symbols q ; " ; Q : " : W <char-250> " ���������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/greek_iso-8859-7.vim����������������������������������������������������0000664�0000000�0000000�00000004124�13204015742�0021223�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for greek " Maintainer: Grigorios Magklis <maglis@cs.rochester.edu> " Last Updated: Tue 10 Jul 2001 16:50:50 " " This keyboard layout allows all Greek symbols to be typed, " including accented capitals, diaeresis & accent on the same " vowel, and the Greek semicolon sign. " " accent ";" + letter " diaeresis ":" + letter " diaeresis + accent ";" + ":" (or ":" + ";") + letter " semicolon "q" " colon "Q" " greek semicolon "W" " sigma at end of word "w" " greek left double-quote "<" twice " greek right double-quote ">" twice " Use this short name in the status line. let b:keymap_name = "greek" loadkeymap " capital A <char-193> " B <char-194> " G <char-195> " D <char-196> " E <char-197> " Z <char-198> " H <char-199> " U <char-200> " I <char-201> " K <char-202> " L <char-203> " M <char-204> " N <char-205> " J <char-206> " O <char-207> " P <char-208> " R <char-209> " S <char-211> " T <char-212> " Y <char-213> " F <char-214> " X <char-215> " C <char-216> " V <char-217> " " small a <char-225> " b <char-226> " g <char-227> " d <char-228> " e <char-229> " z <char-230> " h <char-231> " u <char-232> " i <char-233> " k <char-234> " l <char-235> " m <char-236> " n <char-237> " j <char-238> " o <char-239> " p <char-240> " r <char-241> " w <char-242> " s <char-243> " t <char-244> " y <char-245> " f <char-246> " x <char-247> " c <char-248> " v <char-249> " " accented capital ;A <char-182> " ;E <char-184> " ;H <char-185> " ;I <char-186> " ;Y <char-190> " ;O <char-188> " ;V <char-191> " " :I <char-218> " :Y <char-219> " " accented small ;a <char-220> " ;e <char-221> " ;h <char-222> " ;i <char-223> " ;y <char-253> " ;o <char-252> " ;v <char-254> " " :i <char-250> " :y <char-251> " " ;:i <char-192> " :;i <char-192> " ;:y <char-224> " :;y <char-224> " " symbols q ; " ; Q : " : W <char-183> " ; <char-180> " : <char-168> " ;: <char-181> " :; <char-181> " " quotes << <char-171> " >> <char-187> " " <char-161> " " <char-162> " ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/greek_utf-8.vim���������������������������������������������������������0000664�0000000�0000000�00000063271�13204015742�0020625�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for greek " Maintainer: Panagiotis Louridas <louridas@acm.org> " Last Updated: Thu Mar 23 23:45:02 EET 2006 " This file was corrected for Vim after the version adapted for Vim 6 from " the yudit distribution by Robert Goulding <goulding@princeton.edu> " " The monotonic part of this kmap was made by Constantine Stathopoulos " <cstath@irismedia.gr>. " The polytonic part was made by <birger.langkjer@image.dk> 04/11-1999, " Aarhus, Denmark. " It was modified and completed by A. Tsolomitis <atsol@aegean.gr> " The licence allows modifications but redistribution of modifications " should be with another name. " The keymap now conforms with the " LaTeX's-Babel Standard by A. Syropoulos <apostolo@ocean1.ee.duth.gr> " The conventions are as follows: " EURO SIGN is E$ (0x20AC), " Drachma sign is D$ (0x20AF) " RIGHT an LEFT QUOTATION MARKS (0x00BB), (0x00AB), " follow the kikbd conventions (;< abd ;>) AND << and >> " Apostrofos is corrected in order to agree with the Greek grammar rules " of Triantafilidis who requires the PSILI (or Koronis) symbol for an " apostrophe. " The Greek ANO TELEIA (0x0387), follows again the kikbd conventions as " well as the Emacs conventions. So it is produced by both ;. and W " All greek accents are added so they can be produced by scholars " without having to combine them with letters (usufull for grammarians " in particular) (especially for dasia and psiln we use ' for psili " (that is apostrophe) and ;' for dasia. This is done in order to " preserve the posibility to write a plain < or >. " Ypogegrammeni is | following the character (the originally proposed " i after the character is problematic: can't write easily ai or vi) : " > dasia " an oxia or baria *always* should follow dasia " < psili " an oxia or baria *always* should follow psili " ; tonos " / oxia " ` varia " ~ perispomeni " : dialytika " :; or ;: dialytika oxia " :` or `: dialytika baria " || a single ypogegrammeni " vowel followed by | gives ypogegrammeni to the vowel " -vowel gives vowel with macron " ^vowel gives vowel with braxy " -- endash " --- emdash " ;b ;p ;f ;u ;r ;k give alternative forms " && give the Greek kai symbol " #Q and #q give archaic Qoppa and qoppa " ;U is capital Theta symbol " !e and !E are lunate epsilon and Epsilon " #ST stigma " #SP sampi " #G digamma " #Q qoppa " ;# avw tovos (for numerals) " ;## katw tovos (for numerals) " All accents are supported. Even rho with < and > and Rho with < " Also :~i and :~u and macron and braxy a,i,u and their capitals. let b:keymap_name = "grk" loadkeymap " PUNCTUATION MARKS - SYMBOLS (GREEK SPECIFIC) " E$ <char-0x20AC> " EURO SIGN >> <char-0x00BB> " RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK [GREEK " EISAGOGIKA/OMOIOMATIKA - DEFINITION " MISSING FROM UNICODE] ;> <char-0x00BB> " << <char-0x00AB> " LEFT-POINTING DOUBLE ANGLE QUOTATION MARK [GREEK " EISAGOGIKA - DEFINITION MISSING FROM UNICODE] ;< <char-0x00AB> " Q <char-0x003A> " COLON [GREEK EPEXIGIMATIKA OR ANO & KATO TELEIA - " DEFINITION MISSING FROM UNICODE] q <char-0x037E> " GREEK QUESTION MARK (EROTIMATIKO) ;. <char-0x0387> " GREEK ANO TELEIA (KDE/kikbd/Xinput standard) W <char-0x0387> " GREEK ANO TELEIA (Emacs standard) ' <char-0x1FBD> " GREEK APOSTROFOS -- <char-0x2013> " endash --- <char-0x2014> " emdash " " GREEK DIACRITICS " : <char-0x00A8> " DIAERESIS [GREEK DIALYTIKA - DEFINITION MISSING FROM " UNICODE] ; <char-0x0384> " GREEK TONOS :; <char-0x0385> " GREEK DIALYTIKA Oxia ;: <char-0x0385> " GREEK DIALYTIKA Oxia :` <char-0x1FED> " GREEK DIALYTIKA VARIA `: <char-0x1FED> " GREEK DIALYTIKA VARIA / <char-0x1FFD> " GREEK OXIA ` <char-0x1FEF> " GREEK VARIA ~ <char-0x1FC0> " PERISPOMENI >` <char-0x1FCD> " PSILI VARIA <` <char-0x1FDD> " DASIA VARIA >; <char-0x1FCE> " PSILI OXIA <; <char-0x1FDE> " DASIA OXIA <~ <char-0x1FDF> " DASIA PERISPOMENI >~ <char-0x1FCF> " PSILI PERISPOMENI "For plain psili use apostrophe ;' <char-0x1FFE> " (Plain) dasia " " " " GREEK LETTERS " A <char-0x0391> " GREEK CAPITAL LETTER ALPHA B <char-0x0392> " GREEK CAPITAL LETTER BETA G <char-0x0393> " GREEK CAPITAL LETTER GAMMA D <char-0x0394> " GREEK CAPITAL LETTER DELTA E <char-0x0395> " GREEK CAPITAL LETTER EPSILON Z <char-0x0396> " GREEK CAPITAL LETTER ZETA H <char-0x0397> " GREEK CAPITAL LETTER ETA U <char-0x0398> " GREEK CAPITAL LETTER THETA I <char-0x0399> " GREEK CAPITAL LETTER IOTA K <char-0x039A> " GREEK CAPITAL LETTER KAPPA L <char-0x039B> " GREEK CAPITAL LETTER LAMDA M <char-0x039C> " GREEK CAPITAL LETTER MU N <char-0x039D> " GREEK CAPITAL LETTER NU J <char-0x039E> " GREEK CAPITAL LETTER XI O <char-0x039F> " GREEK CAPITAL LETTER OMIKRON P <char-0x03A0> " GREEK CAPITAL LETTER PI R <char-0x03A1> " GREEK CAPITAL LETTER RHO S <char-0x03A3> " GREEK CAPITAL LETTER SIGMA T <char-0x03A4> " GREEK CAPITAL LETTER TAU Y <char-0x03A5> " GREEK CAPITAL LETTER UPSILON F <char-0x03A6> " GREEK CAPITAL LETTER PHI X <char-0x03A7> " GREEK CAPITAL LETTER CHI C <char-0x03A8> " GREEK CAPITAL LETTER PSI V <char-0x03A9> " GREEK CAPITAL LETTER OMEGA a <char-0x03B1> " GREEK SMALL LETTER ALPHA b <char-0x03B2> " GREEK SMALL LETTER BETA g <char-0x03B3> " GREEK SMALL LETTER GAMMA d <char-0x03B4> " GREEK SMALL LETTER DELTA e <char-0x03B5> " GREEK SMALL LETTER EPSILON z <char-0x03B6> " GREEK SMALL LETTER ZETA h <char-0x03B7> " GREEK SMALL LETTER ETA u <char-0x03B8> " GREEK SMALL LETTER THETA i <char-0x03B9> " GREEK SMALL LETTER IOTA k <char-0x03BA> " GREEK SMALL LETTER KAPPA l <char-0x03BB> " GREEK SMALL LETTER LAMDA m <char-0x03BC> " GREEK SMALL LETTER MU n <char-0x03BD> " GREEK SMALL LETTER NU j <char-0x03BE> " GREEK SMALL LETTER XI o <char-0x03BF> " GREEK SMALL LETTER OMICRON p <char-0x03C0> " GREEK SMALL LETTER PI r <char-0x03C1> " GREEK SMALL LETTER RHO w <char-0x03C2> " GREEK SMALL LETTER FINAL SIGMA s <char-0x03C3> " GREEK SMALL LETTER SIGMA t <char-0x03C4> " GREEK SMALL LETTER TAU y <char-0x03C5> " GREEK SMALL LETTER UPSILON f <char-0x03C6> " GREEK SMALL LETTER PHI x <char-0x03C7> " GREEK SMALL LETTER CHI c <char-0x03C8> " GREEK SMALL LETTER PSI v <char-0x03C9> " GREEK SMALL LETTER OMEGA " "COMBINED GREEK LETTERS WITH DIACRITICS " ;A <char-0x0386> " GREEK CAPITAL LETTER ALPHA WITH TONOS ;E <char-0x0388> " GREEK CAPITAL LETTER EPSILON WITH TONOS ;H <char-0x0389> " GREEK CAPITAL LETTER ETA WITH TONOS ;I <char-0x038A> " GREEK CAPITAL LETTER IOTA WITH TONOS ;O <char-0x038C> " GREEK CAPITAL LETTER OMICRON WITH TONOS ;Y <char-0x038E> " GREEK CAPITAL LETTER UPSILON WITH TONOS ;V <char-0x038F> " GREEK CAPITAL LETTER OMEGA WITH TONOS :;i <char-0x0390> " GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS ;:i <char-0x0390> " GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS :`i <char-0x1FD2> " GREEK SMALL LETTER IOTA WITH DIALYTIKA AND baria `:i <char-0x1FD2> " GREEK SMALL LETTER IOTA WITH DIALYTIKA AND baria :I <char-0x03AA> " GREEK CAPITAL LETTER IOTA WITH DIALYTIKA :Y <char-0x03AB> " GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA ;a <char-0x03AC> " GREEK SMALL LETTER ALPHA WITH TONOS ;e <char-0x03AD> " GREEK SMALL LETTER EPSILON WITH TONOS ;h <char-0x03AE> " GREEK SMALL LETTER ETA WITH TONOS ;i <char-0x03AF> " GREEK SMALL LETTER IOTA WITH TONOS :;y <char-0x03B0> " GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS ;:y <char-0x03B0> " GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS :`y <char-0x1FE2> " GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND baria `:y <char-0x1FE2> " GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND baria :i <char-0x03CA> " GREEK SMALL LETTER IOTA WITH DIALYTIKA :y <char-0x03CB> " GREEK SMALL LETTER UPSILON WITH DIALYTIKA ;o <char-0x03CC> " GREEK SMALL LETTER OMICRON WITH TONOS ;y <char-0x03CD> " GREEK SMALL LETTER UPSILON WITH TONOS ;v <char-0x03CE> " GREEK SMALL LETTER OMEGA WITH TONOS " " This area covers 0x1F00-0x1FFF " " " letters with Varia: " `A <char-0x1FBA> " GREEK CAPITAL LETTER ALPHA WITH VARIA `E <char-0x1FC8> " GREEK CAPITAL LETTER ALPHA WITH VARIA `H <char-0x1FCA> " GREEK CAPITAL LETTER ETA WITH VARIA `I <char-0x1FDA> " GREEK CAPITAL LETTER IOTA WITH VARIA `O <char-0x1FF8> " GREEK CAPITAL LETTER ALPHA WITH VARIA `Y <char-0x1FEA> " GREEK CAPITAL LETTER ALPHA WITH VARIA `V <char-0x1FFA> " GREEK CAPITAL LETTER OMEGA WITH VARIA `a <char-0x1F70> " GREEK SMALL LETTER ALPHA WITH VARIA `e <char-0x1F72> " GREEK SMALL LETTER ALPHA WITH VARIA `h <char-0x1F74> " GREEK SMALL LETTER ETA WITH VARIA `i <char-0x1F76> " GREEK SMALL LETTER IOTA WITH VARIA `o <char-0x1F78> " GREEK SMALL LETTER ALPHA WITH VARIA `y <char-0x1F7A> " GREEK SMALL LETTER ALPHA WITH VARIA `v <char-0x1F7C> " GREEK SMALL LETTER OMEGA WITH VARIA " " letters with Oxia: " /A <char-0x1FBB> " GREEK CAPITAL LETTER ALPHA WITH OXIA /E <char-0x1FC9> " GREEK CAPITAL LETTER EPSILON WITH OXIA /H <char-0x1FCB> " GREEK CAPITAL LETTER ETA WITH OXIA /I <char-0x1FDB> " GREEK CAPITAL LETTER IOTA WITH OXIA /O <char-0x1FF9> " GREEK CAPITAL LETTER OMICRON WITH OXIA /Y <char-0x1FEB> " GREEK CAPITAL LETTER UPSILON WITH OXIA /V <char-0x1FFB> " GREEK CAPITAL LETTER OMEGA WITH OXIA /a <char-0x1F71> " GREEK SMALL LETTER ALPHA WITH OXIA /e <char-0x1F73> " GREEK SMALL LETTER EPSILON WITH OXIA /h <char-0x1F75> " GREEK SMALL LETTER ETA WITH OXIA /i <char-0x1F77> " GREEK SMALL LETTER IOTA WITH OXIA /o <char-0x1F79> " GREEK SMALL LETTER OMICRON WITH OXIA /y <char-0x1F7B> " GREEK SMALL LETTER UPSILON WITH OXIA /v <char-0x1F7D> " GREEK SMALL LETTER OMEGA WITH OXIA " " letters with Psili: " >A <char-0x1F08> " GREEK CAPITAL LETTER ALPHA WITH PSILI >E <char-0x1F18> " GREEK CAPITAL LETTER EPSILON WITH PSILI >H <char-0x1F28> " GREEK CAPITAL LETTER ETA WITH PSILI >I <char-0x1F38> " GREEK CAPITAL LETTER IOTA WITH PSILI >O <char-0x1F48> " GREEK CAPITAL LETTER OMICRON WITH PSILI >Y <char-0x1F58> " GREEK CAPITAL LETTER UPSILON WITH PSILI >V <char-0x1F68> " GREEK CAPITAL LETTER OMEGA WITH PSILI >a <char-0x1F00> " GREEK SMALL LETTER ALPHA WITH PSILI >e <char-0x1F10> " GREEK SMALL LETTER EPSILON WITH PSILI >h <char-0x1F20> " GREEK SMALL LETTER ETA WITH PSILI >i <char-0x1F30> " GREEK SMALL LETTER IOTA WITH PSILI >o <char-0x1F40> " GREEK SMALL LETTER OMICRON WITH PSILI >y <char-0x1F50> " GREEK SMALL LETTER UPSILON WITH PSILI >v <char-0x1F60> " GREEK SMALL LETTER OMEGA WITH PSILI " " Letters with Dasia: " <A <char-0x1F09> " GREEK CAPITAL LETTER ALPHA WITH DASIA <E <char-0x1F19> " GREEK CAPITAL LETTER EPSILON WITH DASIA <H <char-0x1F29> " GREEK CAPITAL LETTER ETA WITH DASIA <I <char-0x1F39> " GREEK CAPITAL LETTER IOTA WITH DASIA <O <char-0x1F49> " GREEK CAPITAL LETTER OMICRON WITH DASIA <Y <char-0x1F59> " GREEK CAPITAL LETTER UPSILON WITH DASIA <V <char-0x1F69> " GREEK CAPITAL LETTER OMEGA WITH DASIA <a <char-0x1F01> " GREEK SMALL LETTER ALPHA WITH DASIA <e <char-0x1F11> " GREEK SMALL LETTER EPSILON WITH DASIA <h <char-0x1F21> " GREEK SMALL LETTER ETA WITH DASIA <i <char-0x1F31> " GREEK SMALL LETTER IOTA WITH DASIA <o <char-0x1F41> " GREEK SMALL LETTER OMICRON WITH DASIA <y <char-0x1F51> " GREEK SMALL LETTER UPSILON WITH DASIA <v <char-0x1F61> " GREEK SMALL LETTER OMEGA WITH DASIA " " letters with Psili and Varia: " >`A <char-0x1F0A> " GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA >`E <char-0x1F1A> " GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA >`H <char-0x1F2A> " GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA >`I <char-0x1F3A> " GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA >`O <char-0x1F4A> " GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA >`Y <char-0x1F5A> " GREEK CAPITAL LETTER UPSILON WITH PSILI AND VARIA >`V <char-0x1F6A> " GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA >`a <char-0x1F02> " GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA >`e <char-0x1F12> " GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA >`h <char-0x1F22> " GREEK SMALL LETTER ETA WITH PSILI AND VARIA >`i <char-0x1F32> " GREEK SMALL LETTER IOTA WITH PSILI AND VARIA >`o <char-0x1F42> " GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA >`y <char-0x1F52> " GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA >`v <char-0x1F62> " GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA " " Letters with Dasia and Varia: " <`A <char-0x1F0B> " GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA <`E <char-0x1F1B> " GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA <`H <char-0x1F2B> " GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA <`I <char-0x1F3B> " GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA <`O <char-0x1F4B> " GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA <`Y <char-0x1F5B> " GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA <`V <char-0x1F6B> " GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA <`a <char-0x1F03> " GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA <`e <char-0x1F13> " GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA <`h <char-0x1F23> " GREEK SMALL LETTER ETA WITH DASIA AND VARIA <`i <char-0x1F33> " GREEK SMALL LETTER IOTA WITH DASIA AND VARIA <`o <char-0x1F43> " GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA <`y <char-0x1F53> " GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA <`v <char-0x1F63> " GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA " " letters with Psili and Oxia: " >;A <char-0x1F0C> " GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA >;E <char-0x1F1C> " GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA >;H <char-0x1F2C> " GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA >;I <char-0x1F3C> " GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA >;O <char-0x1F4C> " GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA >;Y <char-0x1F5C> " GREEK CAPITAL LETTER UPSILON WITH PSILI AND OXIA >;V <char-0x1F6C> " GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA >;a <char-0x1F04> " GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA >;e <char-0x1F14> " GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA >;h <char-0x1F24> " GREEK SMALL LETTER ETA WITH PSILI AND OXIA >;i <char-0x1F34> " GREEK SMALL LETTER IOTA WITH PSILI AND OXIA >;o <char-0x1F44> " GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA >;y <char-0x1F54> " GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA >;v <char-0x1F64> " GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA " " Letters with Dasia and Oxia: " <;A <char-0x1F0D> " GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA <;E <char-0x1F1D> " GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA <;H <char-0x1F2D> " GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA <;I <char-0x1F3D> " GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA <;O <char-0x1F4D> " GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA <;Y <char-0x1F5D> " GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA <;V <char-0x1F6D> " GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA <;a <char-0x1F05> " GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA <;e <char-0x1F15> " GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA <;h <char-0x1F25> " GREEK SMALL LETTER ETA WITH DASIA AND OXIA <;i <char-0x1F35> " GREEK SMALL LETTER IOTA WITH DASIA AND OXIA <;o <char-0x1F45> " GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA <;y <char-0x1F55> " GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA <;v <char-0x1F65> " GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA " " letters with Psili and Perispomeni: " >~A <char-0x1F0E> " GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI >~E <char-0x1F1E> " GREEK CAPITAL LETTER EPSILON WITH PSILI AND PERISPOMENI >~H <char-0x1F2E> " GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI >~I <char-0x1F3E> " GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI >~O <char-0x1F4E> " GREEK CAPITAL LETTER OMICRON WITH PSILI AND PERISPOMENI >~Y <char-0x1F5E> " GREEK CAPITAL LETTER UPSILON WITH PSILI AND PERISPOMENI >~V <char-0x1F6E> " GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI >~a <char-0x1F06> " GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI >~e <char-0x1F16> " GREEK SMALL LETTER EPSILON WITH PSILI AND PERISPOMENI >~h <char-0x1F26> " GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI >~i <char-0x1F36> " GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI >~o <char-0x1F46> " GREEK SMALL LETTER OMICRON WITH PSILI AND PERISPOMENI >~y <char-0x1F56> " GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI >~v <char-0x1F66> " GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI " " Letters with Dasia and Perispomeni: " <~A <char-0x1F0F> " GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI <~E <char-0x1F1F> " GREEK CAPITAL LETTER EPSILON WITH DASIA AND PERISPOMENI <~H <char-0x1F2F> " GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI <~I <char-0x1F3F> " GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI <~O <char-0x1F4F> " GREEK CAPITAL LETTER OMICRON WITH DASIA AND PERISPOMENI <~Y <char-0x1F5F> " GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI <~V <char-0x1F6F> " GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI <~a <char-0x1F07> " GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI <~e <char-0x1F17> " GREEK SMALL LETTER EPSILON WITH DASIA AND PERISPOMENI <~h <char-0x1F27> " GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI <~i <char-0x1F37> " GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI <~o <char-0x1F47> " GREEK SMALL LETTER OMICRON WITH DASIA AND PERISPOMENI <~y <char-0x1F57> " GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI <~v <char-0x1F67> " GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI " " " " letters with Ypogegrammeni/Prosgegrammeni: " A| <char-0x1FBC> " GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI H| <char-0x1FCC> " GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI V| <char-0x1FFC> " GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI a| <char-0x1FB3> " GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI h| <char-0x1FC3> " GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI v| <char-0x1FF3> " GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI " " " " letters with Psili and Ypogegrammeni/Prosgegrammeni: " >A| <char-0x1F88> " GREEK CAPITAL LETTER ALPHA WITH PSILI AND " PROSGEGRAMMENI >H| <char-0x1F98> " GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI >V| <char-0x1FA8> " GREEK CAPITAL LETTER OMEGA WITH PSILI AND " PROSGEGRAMMENI >a| <char-0x1F80> " GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI >h| <char-0x1F90> " GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI >v| <char-0x1FA0> " GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI " " " " letters with Dasia and Ypogegrammeni/Prosgegrammeni: " <A| <char-0x1F89> " GREEK CAPITAL LETTER ALPHA WITH DASIA AND " PROSGEGRAMMENI <H| <char-0x1F99> " GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI <V| <char-0x1FA9> " GREEK CAPITAL LETTER OMEGA WITH DASIA AND " PROSGEGRAMMENI <a| <char-0x1F81> " GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI <h| <char-0x1F91> " GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI <v| <char-0x1FA1> " GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI " " " " letters with Psili and Varia and Ypogegrammeni/Prosgegrammeni: " >`A| <char-0x1F8A> " GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND " PROSGEGRAMMENI >`H| <char-0x1F9A> " GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND " PROSGEGRAMMENI >`V| <char-0x1FAA> " GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND " PROSGEGRAMMENI >`a| <char-0x1F82> " GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND " YPOGEGRAMMENI >`h| <char-0x1F92> " GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND " YPOGEGRAMMENI >`v| <char-0x1FA2> " GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND " YPOGEGRAMMENI " " " " letters with Dasia and Varia and Ypogegrammeni/Prosgegrammeni: " <`A| <char-0x1F8B> " GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND " PROSGEGRAMMENI <`H| <char-0x1F9B> " GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND " PROSGEGRAMMENI <`V| <char-0x1FAB> " GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND " PROSGEGRAMMENI <`a| <char-0x1F83> " GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND " YPOGEGRAMMENI <`h| <char-0x1F93> " GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND " YPOGEGRAMMENI <`v| <char-0x1FA3> " GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND " YPOGEGRAMMENI " " letters with Psili and Oxia and Ypogegrammeni/Prosgegrammeni: " " " >;A| <char-0x1F8C> " GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND " PROSGEGRAMMENI >;H| <char-0x1F9C> " GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND " PROSGEGRAMMENI >;V| <char-0x1FAC> " GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND " PROSGEGRAMMENI >;a| <char-0x1F84> " GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND " YPOGEGRAMMENI >;h| <char-0x1F94> " GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND " YPOGEGRAMMENI >;v| <char-0x1FA4> " GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND " YPOGEGRAMMENI " " letters with Dasia and Oxia and Ypogegrammeni/Prosgegrammeni: " " " <;A| <char-0x1F8D> " GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND " PROSGEGRAMMENI <;H| <char-0x1F9D> " GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND " PROSGEGRAMMENI <;V| <char-0x1FAD> " GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND " PROSGEGRAMMENI <;a| <char-0x1F85> " GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND " YPOGEGRAMMENI <;h| <char-0x1F95> " GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND " YPOGEGRAMMENI <;v| <char-0x1FA5> " GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND " YPOGEGRAMMENI " " letters with Psili and Perispomeni and Ypogegrammeni/Prosgegrammeni: " " " >~A| <char-0x1F8E> " GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI " AND PROSGEGRAMMENI >~H| <char-0x1F9E> " GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA " PERISPOMENI PROSGEGRAMMENI >~V| <char-0x1FAE> " GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI " AND PROSGEGRAMMENI >~a| <char-0x1F86> " GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI " AND YPOGEGRAMMENI >~h| <char-0x1F96> " GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND " YPOGEGRAMMENI >~v| <char-0x1FA6> " GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI " AND YPOGEGRAMMENI " " letters with Dasia and Perispomeni and Ypogegrammeni/Prosgegrammeni: " " " <~A| <char-0x1F8F> " GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI " AND PROSGEGRAMMENI <~H| <char-0x1F9F> " GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI " AND PROSGEGRAMMENI <~V| <char-0x1FAF> " GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI " AND PROSGEGRAMMENI <~a| <char-0x1F87> " GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI " AND YPOGEGRAMMENI <~h| <char-0x1F97> " GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND " YPOGEGRAMMENI <~v| <char-0x1FA7> " GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI " AND YPOGEGRAMMENI " " letters with Perispomeni: " " " ~a <char-0x1FB6> " GREEK SMALL LETTER ALPHA WITH PERISPOMENI ~h <char-0x1FC6> " GREEK SMALL LETTER ETA WITH PERISPOMENI ~i <char-0x1FD6> " GREEK SMALL LETTER IOTA WITH PERISPOMENI ~y <char-0x1FE6> " GREEK SMALL LETTER UPSILON WITH PERISPOMENI ~v <char-0x1FF6> " GREEK SMALL LETTER OMEGA WITH PERISPOMENI " " letters with Perispomeni and Ypogegrammeni: " " " ~a| <char-0x1FB7> " GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND " YPOGEGRAMMENI ~h| <char-0x1FC7> " GREEK SMALL LETTER ETA WITH PERISPOMENI AND " YPOGEGRAMMENI ~v| <char-0x1FF7> " GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND " YPOGEGRAMMENI " " " letters with Varia and Ypogegrammeni: " " " `a| <char-0x1FB2> " GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI `h| <char-0x1FC2> " GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI `v| <char-0x1FF2> " GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI " " letters with Oxia and Ypogegrammeni: " " " ;a| <char-0x1FB4> " GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI ;h| <char-0x1FC4> " GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI ;v| <char-0x1FF4> " GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI " " " Combining/Nonspacing comma above (0x0313) instead of Psili: " >, <char-0x0313> " COMBINING COMMA ABOVE " " Combining/Nonspacing reversed comma above (0x0314) instead of Dasia: " <, <char-0x0314> " COMBINING REVERSED COMMA ABOVE " " " Greek Quotes if your keyboard supports them <char-0x201C> " QUOTEDBLLEFT <char-0x201D> " QUOTEDBLRIGHT " " " " APPENDIX A - Additional characters " " ;# <char-0x0374> " GREEK NUMERAL SIGN ;## <char-0x0375> " GREEK LOWER NUMERAL SIGN || <char-0x037A> " GREEK YPOGEGRAMMENI ;b <char-0x03D0> " GREEK BETA SYMBOL ;u <char-0x03D1> " GREEK THETA SYMBOL " <char-0x03D2> " GREEK UPSILON WITH HOOK SYMBOL " <char-0x03D3> " GREEK UPSILON WITH ACUTE AND HOOK SYMBOL " <char-0x03D4> " GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL ;f <char-0x03D5> " GREEK PHI SYMBOL ;p <char-0x03D6> " GREEK PI SYMBOL #ST <char-0x03DA> " GREEK LETTER STIGMA #G <char-0x03DC> " GREEK LETTER DIGAMMA #Q <char-0x03DE> " GREEK LETTER KOPPA #SP <char-0x03E0> " GREEK LETTER SAMPI ;k <char-0x03F0> " GREEK KAPPA SYMBOL ;r <char-0x03F1> " GREEK RHO SYMBOL " <char-0x03F2> " GREEK LUNATE SIGMA SYMBOL " <char-0x03F3> " GREEK LETTER YOT :~ <char-0x1FC1> "dialytika peripswmevn ~: <char-0x1FC1> "dialytika peripswmevn :~i <char-0x1FD7> "iota dialytika perispomeni ~:i <char-0x1FD7> "iota dialytika perispomeni :~y <char-0x1FE7> "upsilon dialytika perispomeni ~:y <char-0x1FE7> "upsilon dialytika perispomeni -a <char-0x1FB1> "alpha macron -i <char-0x1FD1> "iota macron -y <char-0x1FE1> "upsilon macron -A <char-0x1FB9> "Alpha macron -I <char-0x1FD9> "Iota macron -Y <char-0x1FE9> "Upsilon macron ^a <char-0x1FB0> "alpha braxy ^i <char-0x1FD0> "iota braxy ^y <char-0x1FE0> "upsilon braxy ^A <char-0x1FB8> "alpha braxy ^I <char-0x1FD8> "iota braxy ^Y <char-0x1FE8> "upsilon braxy >r <char-0x1FE4> "rho psili <r <char-0x1FE5> "rho dasia <R <char-0x1FEC> "Rho dasia " More Symbols && <char-0x03D7> "Greek kai D$ <char-0x20AF> "Drachma symbol #Q <char-0x03D8> "Archaic Qoppa #q <char-0x03D9> "Archaic qoppa ;U <char-0x03F4> "Capital Theta symbol "!e <char-0x03F5> "Lunate epsilon "!E <char-0x03F6> "Lunate Epsilon ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/hebrew.vim��������������������������������������������������������������0000664�0000000�0000000�00000000502�13204015742�0017745�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������let encoding = &enc if encoding == 'latin1' if has("unix") let encoding = 'iso-8859-8' else let encoding = 'cp1255' endif endif if encoding == 'utf-8' source <sfile>:p:h/hebrew_utf-8.vim elseif encoding == 'cp1255' source <sfile>:p:h/hebrew_cp1255.vim else source <sfile>:p:h/hebrew_iso-8859-8.vim endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/hebrew_cp1255.vim�������������������������������������������������������0000664�0000000�0000000�00000003315�13204015742�0020751�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" add in the vowel points, known as 'niqud', which are present in " CP1255: Note: there are several 'standards' for placement of the vowel " points, and I ignored all of them. Since we can input English by simply " pressing Ctrl-^ and eliminating this map, I saw no reason to try to use " exotic key locations. If you don't like it, that's just too bad :-) let b:keymap_name = "heb" loadkeymap a <char-249> " ש - shin b <char-240> " נ - nun c <char-225> " ב - bet d <char-226> " ג - gimel e <char-247> " ק - qof f <char-235> " כ - kaf g <char-242> " ע - ayin h <char-233> " י - yod i <char-239> " ן - final nun j <char-231> " ח - het k <char-236> " ל - lamed l <char-234> " ך - final kaf m <char-246> " צ - tsadi n <char-238> " מ - mem o <char-237> " ם - final mem p <char-244> " פ - pe q / " / - slash r <char-248> " ר - resh s <char-227> " ד - dalet t <char-224> " א - alef u <char-229> " ו - vav v <char-228> " ה - he w ' " ' - single-quote x <char-241> " ס - samekh y <char-232> " ט - tet z <char-230> " ז - zayin , <char-250> " ת - tav . <char-245> " ץ - final tsadi ; <char-243> " ף - final pe ' , " , - comma / . " . - period ` ; " ; - semicolon " vowels: A: <Char-192> " sheva HE <Char-193> " hataf segol HA <Char-194> " hataf patah HO <Char-195> " hataf qamats I <Char-196> " hiriq AY <Char-197> " tsere E <Char-198> " segol AA <Char-199> " patah AO <Char-200> " qamats O <Char-201> " holam U <Char-203> " qubuts D <Char-204> " dagesh ]T <Char-205> " meteg ]Q <Char-206> " maqaf ]R <ּChar-207> " rafe ]p <Char-208> " paseq SR <Char-209> " shin-dot SL <Char-210> " sin-dot ]P <Char-211> " sof-pasuq VV <Char-212> " double-vav VY <Char-213> " vav-yod YY <Char-214> " yod-yod �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/hebrew_iso-8859-8.vim���������������������������������������������������0000664�0000000�0000000�00000001756�13204015742�0021413�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for hebrew " Maintainer : Ron Aaron <ron@ronware.org> " Last Updated: Wed 28 Feb 2001 21:28:51 " This is the standard Israeli keyboard layout " Use this short name in the status line. let b:keymap_name = "heb" loadkeymap a <char-249> " - shin b <char-240> " - nun c <char-225> " - bet d <char-226> " - gimel e <char-247> " - qof f <char-235> " - kaf g <char-242> " - ayin h <char-233> " - yod i <char-239> " - final nun j <char-231> " - het k <char-236> " - lamed l <char-234> " - final kaf m <char-246> " - tsadi n <char-238> " - mem o <char-237> " - final mem p <char-244> " - pe q / " / - slash r <char-248> " - resh s <char-227> " - dalet t <char-224> " - alef u <char-229> " - vav v <char-228> " - he w ' " ' - single-quote x <char-241> " - samekh y <char-232> " - tet z <char-230> " - zayin , <char-250> " - tav . <char-245> " - final tsadi ; <char-243> " - final pe ' , " , - comma / . " . - period ` ; " ; - semicolon ������������������neovim-0.2.2/runtime/keymap/hebrew_utf-8.vim��������������������������������������������������������0000664�0000000�0000000�00000007350�13204015742�0021000�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for hebrew " Maintainer : Ron Aaron <ron@ronware.org> " Last Updated: Wed 28 Feb 2001 21:28:51 " This is the standard Israeli keyboard layout with (my nonstandard locations " for) niqud, for utf: " Use this short name in the status line. let b:keymap_name = "heb" loadkeymap a <char-0x5e9> " ש - shin b <char-0x5e0> " נ - nun c <char-0x5d1> " ב - bet d <char-0x5d2> " ג - gimel e <char-0x5e7> " ק - qof f <char-0x5db> " כ - kaf g <char-0x5e2> " ע - ayin h <char-0x5d9> " י - yod i <char-0x5df> " ן - final nun j <char-0x5d7> " ח - het k <char-0x5dc> " ל - lamed l <char-0x5da> " ך - final kaf m <char-0x5e6> " צ - tsadi n <char-0x5de> " מ - mem o <char-0x5dd> " ם - final mem p <char-0x5e4> " פ - pe q / " / - slash r <char-0x5e8> " ר - resh s <char-0x5d3> " ד - dalet t <char-0x5d0> " א - alef u <char-0x5d5> " ו - vav v <char-0x5d4> " ה - he w ' " ' - single-quote x <char-0x5e1> " ס - samekh y <char-0x5d8> " ט - tet z <char-0x5d6> " ז - zayin , <char-0x5ea> " ת - tav . <char-0x5e5> " ץ - final tsadi ; <char-0x5e3> " ף - final pe ' , " , - comma / . " . - period ` ; " ; - semicolon A: <Char-0x5b0> " sheva HE <Char-0x5b1> " hataf segol HA <Char-0x5b2> " hataf patah HO <Char-0x5b3> " hataf qamats I <Char-0x5b4> " hiriq AY <Char-0x5b5> " tsere E <Char-0x5b6> " segol AA <Char-0x5b7> " patah AO <Char-0x5b8> " qamats O <Char-0x5b9> " holam U <Char-0x5bb> " qubuts D <Char-0x5bc> " dagesh ]T <Char-0x5bd> " meteg ]Q <Char-0x5be> " maqaf ]R <Char-0x5bf> " rafe ]p <Char-0x5c0> " paseq SR <Char-0x5c1> " shin-dot SL <Char-0x5c2> " sin-dot ]P <Char-0x5c3> " sof-pasuq VV <Char-0x5f0> " double-vav VY <Char-0x5f1> " vav-yod YY <Char-0x5f2> " yod-yod " cantillation: C: <Char-0x591> " etnahta Cs <Char-0x592> " segol CS <Char-0x593> " shalshelet Cz <Char-0x594> " zaqef qatan CZ <Char-0x595> " zaqef gadol Ct <Char-0x596> " tipeha Cr <Char-0x597> " revia Cq <Char-0x598> " zarqa Cp <Char-0x599> " pashta C! <Char-0x59a> " yetiv Cv <Char-0x59b> " tevir Cg <Char-0x59c> " geresh C* <Char-0x59d> " geresh qadim CG <Char-0x59e> " gershayim CP <Char-0x59f> " qarnei-parah Cy <Char-0x5aa> " yerach-ben-yomo Co <Char-0x5ab> " ole Ci <Char-0x5ac> " iluy Cd <Char-0x5ad> " dehi Cn <Char-0x5ae> " zinor CC <Char-0x5af> " masora circle X` <Char-0xfb20> " Alternative `ayin X' <Char-0xfb21> " Alternative 'alef X-d <Char-0xfb22> " Alternative dalet X-h <Char-0xfb23> " Alternative he X-k <Char-0xfb24> " Alternative kaf X-l <Char-0xfb25> " Alternative lamed X-m <Char-0xfb26> " Alternative mem-sofit X-r <Char-0xfb27> " Alternative resh X-t <Char-0xfb28> " Alternative tav X-+ <Char-0xfb29> " Alternative plus XW <Char-0xfb2a> " shin+shin-dot Xw <Char-0xfb2b> " shin+sin-dot X..W <Char-0xfb2c> " shin+shin-dot+dagesh X..w <Char-0xfb2d> " shin+sin-dot+dagesh XA <Char-0xfb2e> " alef+patah XO <Char-0xfb2f> " alef+qamats XI <Char-0xfb30> " alef+hiriq (mapiq) X.b <Char-0xfb31> " bet+dagesh X.g <Char-0xfb32> " gimel+dagesh X.d <Char-0xfb33> " dalet+dagesh X.h <Char-0xfb34> " he+dagesh Xu <Char-0xfb35> " vav+dagesh X.z <Char-0xfb36> " zayin+dagesh X.T <Char-0xfb38> " tet+dagesh X.y <Char-0xfb39> " yud+dagesh X.K <Char-0xfb3a> " kaf sofit+dagesh X.k <Char-0xfb3b> " kaf+dagesh X.l <Char-0xfb3c> " lamed+dagesh X.m <Char-0xfb3e> " mem+dagesh X.n <Char-0xfb40> " nun+dagesh X.s <Char-0xfb41> " samech+dagesh X.P <Char-0xfb43> " pe sofit+dagesh X.p <Char-0xfb44> " pe+dagesh X.x <Char-0xfb46> " tsadi+dagesh X.q <Char-0xfb47> " qof+dagesh X.r <Char-0xfb48> " resh+dagesh X.w <Char-0xfb49> " shin+dagesh X.t <Char-0xfb4a> " tav+dagesh Xo <Char-0xfb4b> " vav+holam XRb <Char-0xfb4c> " bet+rafe XRk <Char-0xfb4d> " kaf+rafe XRp <Char-0xfb4e> " pe+rafe Xal <Char-0xfb4f> " alef-lamed ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/hebrewp.vim�������������������������������������������������������������0000664�0000000�0000000�00000000505�13204015742�0020130�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������let encoding = &enc if encoding == 'latin1' if has("unix") let encoding = 'iso-8859-8' else let encoding = 'cp1255' endif endif if encoding == 'utf-8' source <sfile>:p:h/hebrewp_utf-8.vim elseif encoding == 'cp1255' source <sfile>:p:h/hebrewp_cp1255.vim else source <sfile>:p:h/hebrewp_iso-8859-8.vim endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/hebrewp_cp1255.vim������������������������������������������������������0000664�0000000�0000000�00000003043�13204015742�0021127�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" codepage 1255 on Windows is equal to ISO 8859-8 but it " adds in the vowel points, known as 'niqud', which are present in " CP1255: Note: there are several 'standards' for placement of the vowel " points, and I ignored all of them. Since we can input English by simply " pressing Ctrl-^ and eliminating this map, I saw no reason to try to use " exotic key locations. If you don't like it, that's just too bad :-) let b:keymap_name = "hebp" loadkeymap K <char-234> " final kaf M <char-237> " final mem N <char-239> " final nun P <char-243> " final pe T <char-232> " tet X <char-245> " final tsadi a <char-224> " alef b <char-225> " bet d <char-227> " dalet g <char-226> " gimel h <char-228> " he j <char-231> " het k <char-235> " kaf l <char-236> " lamed m <char-238> " mem n <char-240> " nun s <char-241> " samekh p <char-244> " pe q <char-247> " qof r <char-248> " resh t <char-250> " tav u <char-242> " ayin v <char-229> " vav w <char-249> " shin x <char-246> " tsadi y <char-233> " yod z <char-230> " zayin " vowels: A: <Char-192> " sheva HE <Char-193> " hataf segol HA <Char-194> " hataf patah HO <Char-195> " hataf qamats I <Char-196> " hiriq AY <Char-197> " tsere E <Char-198> " segol AA <Char-199> " patah AO <Char-200> " qamats O <Char-201> " holam U <Char-203> " qubuts D <Char-204> " dagesh ]T <Char-205> " meteg ]Q <Char-206> " maqaf ]R <Char-207> " rafe ]p <Char-208> " paseq SR <Char-209> " shin-dot SL <Char-210> " sin-dot ]P <Char-211> " sof-pasuq VV <Char-212> " double-vav VY <Char-213> " vav-yod YY <Char-214> " yod-yod ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/hebrewp_iso-8859-8.vim��������������������������������������������������0000664�0000000�0000000�00000001435�13204015742�0021565�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for hebrew " Maintainer : Ron Aaron <ron@ronware.org> " Last Updated: Sun 10 Feb 2002 11:50:56 " This is my version of a phonetic Hebrew " Use this short name in the status line. let b:keymap_name = "hebp" loadkeymap K <char-234> " final kaf M <char-237> " final mem N <char-239> " final nun P <char-243> " final pe T <char-232> " tet X <char-245> " final tsadi a <char-224> " alef b <char-225> " bet d <char-227> " dalet g <char-226> " gimel h <char-228> " he j <char-231> " het k <char-235> " kaf l <char-236> " lamed m <char-238> " mem n <char-240> " nun s <char-241> " samekh p <char-244> " pe q <char-247> " qof r <char-248> " resh t <char-250> " tav u <char-242> " ayin v <char-229> " vav w <char-249> " shin x <char-246> " tsadi y <char-233> " yod z <char-230> " zayin �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/hebrewp_utf-8.vim�������������������������������������������������������0000664�0000000�0000000�00000007063�13204015742�0021161�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for hebrew " Maintainer : Ron Aaron <ron@ronware.org> " Last Updated: Thu 08 Mar 2001 13:49:01 " This is my version of a phonetic Hebrew " Use this short name in the status line. let b:keymap_name = "hebp" loadkeymap w <char-0x5e9> " - shin n <char-0x5e0> " - nun b <char-0x5d1> " - bet g <char-0x5d2> " - gimel q <char-0x5e7> " - qof k <char-0x5db> " - kaf g <char-0x5e2> " - ayin y <char-0x5d9> " - yod N <char-0x5df> " - final nun j <char-0x5d7> " - het l <char-0x5dc> " - lamed K <char-0x5da> " - final kaf x <char-0x5e6> " - tsadi m <char-0x5de> " - mem M <char-0x5dd> " - final mem p <char-0x5e4> " - pe r <char-0x5e8> " - resh d <char-0x5d3> " - dalet a <char-0x5d0> " - alef v <char-0x5d5> " - vav h <char-0x5d4> " - he s <char-0x5e1> " - samekh T <char-0x5d8> " - tet z <char-0x5d6> " - zayin t <char-0x5ea> " - tav X <char-0x5e5> " - final tsadi P <char-0x5e3> " - final pe A: <Char-0x5b0> " sheva HE <Char-0x5b1> " hataf segol HA <Char-0x5b2> " hataf patah HO <Char-0x5b3> " hataf qamats I <Char-0x5b4> " hiriq AY <Char-0x5b5> " tsere E <Char-0x5b6> " segol AA <Char-0x5b7> " patah AO <Char-0x5b8> " qamats O <Char-0x5b9> " holam U <Char-0x5bb> " qubuts D <Char-0x5bc> " dagesh ]T <Char-0x5bd> " meteg ]Q <Char-0x5be> " maqaf ]R <Char-0x5bf> " rafe ]p <Char-0x5c0> " paseq SR <Char-0x5c1> " shin-dot SL <Char-0x5c2> " sin-dot ]P <Char-0x5c3> " sof-pasuq VV <Char-0x5f0> " double-vav VY <Char-0x5f1> " vav-yod YY <Char-0x5f2> " yod-yod " cantillation: C: <Char-0x591> " etnahta Cs <Char-0x592> " segol CS <Char-0x593> " shalshelet Cz <Char-0x594> " zaqef qatan CZ <Char-0x595> " zaqef gadol Ct <Char-0x596> " tipeha Cr <Char-0x597> " revia Cq <Char-0x598> " zarqa Cp <Char-0x599> " pashta C! <Char-0x59a> " yetiv Cv <Char-0x59b> " tevir Cg <Char-0x59c> " geresh C* <Char-0x59d> " geresh qadim CG <Char-0x59e> " gershayim CP <Char-0x59f> " qarnei-parah Cy <Char-0x5aa> " yerach-ben-yomo Co <Char-0x5ab> " ole Ci <Char-0x5ac> " iluy Cd <Char-0x5ad> " dehi Cn <Char-0x5ae> " zinor CC <Char-0x5af> " masora circle X` <Char-0xfb20> " Alternative `ayin X' <Char-0xfb21> " Alternative 'alef X-d <Char-0xfb22> " Alternative dalet X-h <Char-0xfb23> " Alternative he X-k <Char-0xfb24> " Alternative kaf X-l <Char-0xfb25> " Alternative lamed X-m <Char-0xfb26> " Alternative mem-sofit X-r <Char-0xfb27> " Alternative resh X-t <Char-0xfb28> " Alternative tav X-+ <Char-0xfb29> " Alternative plus XW <Char-0xfb2a> " shin+shin-dot Xw <Char-0xfb2b> " shin+sin-dot X..W <Char-0xfb2c> " shin+shin-dot+dagesh X..w <Char-0xfb2d> " shin+sin-dot+dagesh XA <Char-0xfb2e> " alef+patah XO <Char-0xfb2f> " alef+qamats XI <Char-0xfb30> " alef+hiriq (mapiq) X.b <Char-0xfb31> " bet+dagesh X.g <Char-0xfb32> " gimel+dagesh X.d <Char-0xfb33> " dalet+dagesh X.h <Char-0xfb34> " he+dagesh Xu <Char-0xfb35> " vav+dagesh X.z <Char-0xfb36> " zayin+dagesh X.T <Char-0xfb38> " tet+dagesh X.y <Char-0xfb39> " yud+dagesh X.K <Char-0xfb3a> " kaf sofit+dagesh X.k <Char-0xfb3b> " kaf+dagesh X.l <Char-0xfb3c> " lamed+dagesh X.m <Char-0xfb3e> " mem+dagesh X.n <Char-0xfb40> " nun+dagesh X.s <Char-0xfb41> " samech+dagesh X.P <Char-0xfb43> " pe sofit+dagesh X.p <Char-0xfb44> " pe+dagesh X.x <Char-0xfb46> " tsadi+dagesh X.q <Char-0xfb47> " qof+dagesh X.r <Char-0xfb48> " resh+dagesh X.w <Char-0xfb49> " shin+dagesh X.t <Char-0xfb4a> " tav+dagesh Xo <Char-0xfb4b> " vav+holam XRb <Char-0xfb4c> " bet+rafe XRk <Char-0xfb4d> " kaf+rafe XRp <Char-0xfb4e> " pe+rafe Xal <Char-0xfb4f> " alef-lamed �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/kana.vim����������������������������������������������������������������0000664�0000000�0000000�00000021467�13204015742�0017420�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" This script was originally created by Rory McCann <ebelular at gmail dot com>. " Dan Kenigsberg noticed some deficiencies and suggested this one instead. " " Maintainer: Rory McCann <ebelular at gmail dot com> " Modified by: Edward L. Fox <edyfox at gmail dot com> " Last Change: 2006 Apr 30 " " " " Kana.kmap (Japanese Phonograms) " " Converted from Gaspar Sinai's yudit 2.7.6 " GNU (C) Gaspar Sinai <gsinai@yudit.org> " " WARNING " ------- " This version of Kana.kmap is different from the one that has been used " with yudit-2.7.2 or earlier. The main difference is that this kmap is " arranged in such a way that it complies with an authorized Japanese " transliteration. As a result, backward compatibility is not guaranteed. " " NOTE " ---- " 1. In general, the transliteration is based on Japanese Government's " Cabinet Notification 1 (Dec. 9, 1954). " " Summary: " " (1) To transliterate Japanese language, Table 1 should be used " primarily. " (2) Table 2 may be used only when existing conventions such as " international relationship should be respected. " (3) Other transliteration is acceptable only when neither Table 1 " nor Table 2 gives any specification of the sound in question " " For details, refer to " " http://xembho.tripod.com/siryo/naikaku_kokuzi.html " " 2. The specification instructed by the Cabinet Notification is rather " inadequate even for daily use. At the present time there are thus " many unauthorized but widely accepted conventions used together with " the authorized transliteration. This kmap contains some of them for " user's convenience (cf. Hiragana 3 and Katakana 3). " " 3. For the unicode mapping relevant to this kmap, refer to 3075--30F5 of " " http://www.macchiato.com/unicode/charts.html " " HISTORY " ------- " 2005-01-11 <danken@cs.technion.ac.il> " * Converted to Vim format. " 2003-01-22 <kazunobu.kuriyama@nifty.com> " " * Submitted to gsinai@yudit.org " " ============================================================================ scriptencoding utf-8 " ---------------------------------------------------------------------------- " Kigou (Punctuation etc.) " ---------------------------------------------------------------------------- let b:keymap_name = "kana" loadkeymap "0x20 0x3000 , 、 . 。 ,, 〃 xx 〆 @ 〇 < 〈 > 〉 << 《 >> 》 { 「 } 」 {{ 『 }} 』 [.( 【 ).] 】 [ 〔 ] 〕 [( 〖 )] 〗 [[ 〚 ]] 〛 .. ・ - ー " ---------------------------------------------------------------------------- " Hiragana 1 --- Table 1, Cabinet Notification No. 1 (Dec. 9, 1954) " ---------------------------------------------------------------------------- a あ i い u う e え o お ka か ki き ku く ke け ko こ sa さ si し su す se せ so そ ta た ti ち tu つ te て to と na な ni に nu ぬ ne ね no の ha は hi ひ hu ふ he へ ho ほ ma ま mi み mu む me め mo も ya や yu ゆ yo よ ra ら ri り ru る re れ ro ろ wa わ ga が gi ぎ gu ぐ ge げ go ご za ざ zi じ zu ず ze ぜ zo ぞ da だ de で do ど ba ば bi び bu ぶ be べ bo ぼ pa ぱ pi ぴ pu ぷ pe ぺ po ぽ kya きゃ kyu きゅ kyo きょ sya しゃ syu しゅ syo しょ tya ちゃ tyu ちゅ tyo ちょ nya にゃ nyu にゅ nyo にょ hya ひゃ hyu ひゅ hyo ひょ mya みゃ myu みゅ myo みょ rya りゃ ryu りゅ ryo りょ gya ぎゃ gyu ぎゅ gyo ぎょ zya じゃ zyu じゅ zyo じょ bya びゃ byu びゅ byo びょ pya ぴゃ pyu ぴゅ pyo ぴょ n ん n' ん " ---------------------------------------------------------------------------- " Hiragana 2 --- Table 2, Cabinet Notification No. 1 (Dec. 9, 1954) " ---------------------------------------------------------------------------- sha しゃ shi し shu しゅ sho しょ tsu つ cha ちゃ chi ち chu ちゅ cho ちょ fu ふ ja じゃ ji じ ju じゅ jo じょ di ぢ du づ dya ぢゃ dyu ぢゅ dyo ぢょ kwa くゎ gwa ぐゎ wo を " ---------------------------------------------------------------------------- " Hiragana 3 --- Conventional transliterations " ---------------------------------------------------------------------------- " Small Hiragana: The prefix X is never pronounced. It is used as something " like an escape character. xa ぁ xi ぃ xu ぅ xe ぇ xo ぉ xtu っ xya ゃ xyu ゅ xyo ょ xwa ゎ " Historic `wi' and `we' wi ゐ we ゑ " Preceded by a small `tu' kka っか kki っき kku っく kke っけ kko っこ ssa っさ ssi っし ssu っす sse っせ sso っそ tta った tti っち ttu っつ tte って tto っと hha っは hhi っひ hhu っふ hhe っへ hho っほ mma っま mmi っみ mmu っむ mme っめ mmo っも yya っや yyu っゆ yyo っよ rra っら rri っり rru っる rre っれ rro っろ wwa っわ gga っが ggi っぎ ggu っぐ gge っげ ggo っご zza っざ zzi っじ zzu っず zze っぜ zzo っぞ dda っだ ddi っぢ ddu っづ dde っで ddo っど bba っば bbi っび bbu っぶ bbe っべ bbo っぼ ppa っぱ ppi っぴ ppu っぷ ppe っぺ ppo っぽ " Proceded by a small `tu' and followed by a small 'ya', 'yu' or 'yo' kkya っきゃ kkyu っきゅ kkyo っきょ ssya っしゃ ssyu っしゅ ssyo っしょ ttya っちゃ ttyu っちゅ ttyo っちょ hhya っひゃ hhyu っひゅ hhyo っひょ mmya っみゃ mmyu っみゅ mmyo っみょ rrya っりゃ rryu っりゅ rryo っりょ ggya っぎゃ ggyu っぎゅ ggyo っぎょ zzya っじゃ zzyu っじゅ zzyo っじょ bbya っびゃ bbyu っびゅ bbyo っびょ ppya っぴゃ ppyu っぴゅ ppyo っぴょ " ---------------------------------------------------------------------------- " Katakana 1 --- Table 1, Cabinet Notification No. 1 (Dec. 9, 1954) " ---------------------------------------------------------------------------- A ア I イ U ウ E エ O オ KA カ KI キ KU ク KE ケ KO コ SA サ SI シ SU ス SE セ SO ソ TA タ TI チ TU ツ TE テ TO ト NA ナ NI ニ NU ヌ NE ネ NO ノ HA ハ HI ヒ HU フ HE ヘ HO ホ MA マ MI ミ MU ム ME メ MO モ YA ヤ YU ユ YO ヨ RA ラ RI リ RU ル RE レ RO ロ WA ワ GA ガ GI ギ GU グ GE ゲ GO ゴ ZA ザ ZI ジ ZU ズ ZE ゼ ZO ゾ DA ダ DE デ DO ド BA バ BI ビ BU ブ BE ベ BO ボ PA パ PI ピ PU プ PE ペ PO ポ KYA キャ KYU キュ KYO キョ SYA シャ SYU シュ SYO ショ TYA チャ TYU チュ TYO チョ NYA ニャ NYU ニュ NYO ニョ HYA ヒャ HYU ヒュ HYO ヒョ MYA ミャ MYU ミュ MYO ミョ RYA リャ RYU リュ RYO リョ GYA ギャ GYU ギュ GYO ギョ ZYA ジャ ZYU ジュ ZYO ジョ BYA ビャ BYU ビュ BYO ビョ PYA ピャ PYU ピュ PYO ピョ N ン N' ン " ---------------------------------------------------------------------------- " Katakana 2 --- Table 2, Cabinet Notification No. 1 (Dec. 9, 1954) " ---------------------------------------------------------------------------- SHA シャ SHI シ SHU シュ SHO ショ TSU ツ CHA チャ CHI チ CHU チュ CHO チョ FU フ JA ジャ JI ジ JU ジュ JO ジョ DI ヂ DU ヅ DYA ヂャ DYU ヂュ DYO ヂョ KWA クヮ GWA グヮ WO ヲ " ---------------------------------------------------------------------------- " Katakana 3 --- Conventional transliterations " ---------------------------------------------------------------------------- " Small Katakana: The prefix X is never pronounced. It is used as something " like an escape character. XA ァ XI ィ XU ゥ XE ェ XO ォ XTU ッ XYA ャ XYU ュ XYO ョ XWA ヮ " Used only for counting someone or something XKA ヵ XKE ヶ " Historic `wi' and `we' WI ヰ WE ヱ " Used for the sound `v' of European languages VA ヴァ VI ヴィ VU ヴ VE ヴェ VO ヴォ VYU ヴュ " Preceded by a small `tu' KKA ッカ KKI ッキ KKU ック KKE ッケ KKO ッコ SSA ッサ SSI ッシ SSU ッス SSE ッセ SSO ッソ TTA ッタ TTI ッチ TTU ッツ TTE ッテ TTO ット HHA ッハ HHI ッヒ HHU ッフ HHE ッヘ HHO ッホ MMA ッマ MMI ッミ MMU ッム MME ッメ MMO ッモ YYA ッヤ YYU ッユ YYO ッヨ RRA ッラ RRI ッリ RRU ッル RRE ッレ RRO ッロ WWA ッワ GGA ッガ GGI ッギ GGU ッグ GGE ッゲ GGO ッゴ ZZA ッザ ZZI ッジ ZZU ッズ ZZE ッゼ ZZO ッゾ DDA ッダ DDI ッヂ DDU ッヅ DDE ッデ DDO ッド BBA ッバ BBI ッビ BBU ッブ BBE ッベ BBO ッボ PPA ッパ PPI ッピ PPU ップ PPE ッペ PPO ッポ " Proceded by a small `tu' and followed by a small 'ya', 'yu' or 'yo' KKYA ッキャ KKYU ッキュ KKYO ッキョ SSYA ッシャ SSYU ッシュ SSYO ッショ TTYA ッチャ TTYU ッチュ TTYO ッチョ HHYA ッヒャ HHYU ッヒュ HHYO ッヒョ MMYA ッミャ MMYU ッミュ MMYO ッミョ RRYA ッリャ RRYU ッリュ RRYO ッリョ GGYA ッギャ GGYU ッギュ GGYO ッギョ ZZYA ッジャ ZZYU ッジュ ZZYO ッジョ BBYA ッビャ BBYU ッビュ BBYO ッビョ PPYA ッピャ PPYU ッピュ PPYO ッピョ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/kazakh-jcuken.vim�������������������������������������������������������0000664�0000000�0000000�00000006301�13204015742�0021222�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for kazakh characters, layout 'jcuken', classical variant " Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru> " Maintainer: Darkhan Kubigenov <darkhanu@gmail.com> " Last Changed: 2016 Oct 25 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "kk" loadkeymap ~ ) CYRILLIC CAPITAL LETTER IO ` ( CYRILLIC SMALL LETTER IO F А CYRILLIC CAPITAL LETTER A < Б CYRILLIC CAPITAL LETTER BE D В CYRILLIC CAPITAL LETTER VE U Г CYRILLIC CAPITAL LETTER GHE L Д CYRILLIC CAPITAL LETTER DE T Е CYRILLIC CAPITAL LETTER IE : Ж CYRILLIC CAPITAL LETTER ZHE P З CYRILLIC CAPITAL LETTER ZE B И CYRILLIC CAPITAL LETTER I Q Й CYRILLIC CAPITAL LETTER SHORT I R К CYRILLIC CAPITAL LETTER KA K Л CYRILLIC CAPITAL LETTER EL V М CYRILLIC CAPITAL LETTER EM Y Н CYRILLIC CAPITAL LETTER EN J О CYRILLIC CAPITAL LETTER O G П CYRILLIC CAPITAL LETTER PE H Р CYRILLIC CAPITAL LETTER ER C С CYRILLIC CAPITAL LETTER ES N Т CYRILLIC CAPITAL LETTER TE E У CYRILLIC CAPITAL LETTER U A Ф CYRILLIC CAPITAL LETTER EF { Х CYRILLIC CAPITAL LETTER HA W Ц CYRILLIC CAPITAL LETTER TSE X Ч CYRILLIC CAPITAL LETTER CHE I Ш CYRILLIC CAPITAL LETTER SHA O Щ CYRILLIC CAPITAL LETTER SHCHA } Ъ CYRILLIC CAPITAL LETTER HARD SIGN S Ы CYRILLIC CAPITAL LETTER YERU M Ь CYRILLIC CAPITAL LETTER SOFT SIGN \" Э CYRILLIC CAPITAL LETTER E > Ю CYRILLIC CAPITAL LETTER YU Z Я CYRILLIC CAPITAL LETTER YA f а CYRILLIC SMALL LETTER A , б CYRILLIC SMALL LETTER BE d в CYRILLIC SMALL LETTER VE u г CYRILLIC SMALL LETTER GHE l д CYRILLIC SMALL LETTER DE t е CYRILLIC SMALL LETTER IE ; ж CYRILLIC SMALL LETTER ZHE p з CYRILLIC SMALL LETTER ZE b и CYRILLIC SMALL LETTER I q й CYRILLIC SMALL LETTER SHORT I r к CYRILLIC SMALL LETTER KA k л CYRILLIC SMALL LETTER EL v м CYRILLIC SMALL LETTER EM y н CYRILLIC SMALL LETTER EN j о CYRILLIC SMALL LETTER O g п CYRILLIC SMALL LETTER PE h р CYRILLIC SMALL LETTER ER c с CYRILLIC SMALL LETTER ES n т CYRILLIC SMALL LETTER TE e у CYRILLIC SMALL LETTER U a ф CYRILLIC SMALL LETTER EF [ х CYRILLIC SMALL LETTER HA w ц CYRILLIC SMALL LETTER TSE x ч CYRILLIC SMALL LETTER CHE i ш CYRILLIC SMALL LETTER SHA o щ CYRILLIC SMALL LETTER SHCHA ] ъ CYRILLIC SMALL LETTER HARD SIGN s ы CYRILLIC SMALL LETTER YERU m ь CYRILLIC SMALL LETTER SOFT SIGN ' э CYRILLIC SMALL LETTER E . ю CYRILLIC SMALL LETTER YU z я CYRILLIC SMALL LETTER YA @ Ә CYRILLIC CAPITAL LETTER SCHWA # І CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I $ Ң CYRILLIC CAPITAL LETTER EN WITH DESCENDER % Ғ CYRILLIC CAPITAL LETTER GHE WITH STROKE ^ ; & : * Ү CYRILLIC CAPITAL LETTER STRAIGHT U ( Ұ CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE ) Қ CYRILLIC CAPITAL LETTER KA WITH DESCENDER _ Ө CYRILLIC CAPITAL LETTER BARRED O + Һ CYRILLIC CAPITAL LETTER SHHA 1 " 2 ә CYRILLIC SMALL LETTER SCHWA 3 і CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I 4 ң CYRILLIC SMALL LETTER EN WITH DESCENDER 5 ғ CYRILLIC SMALL LETTER GHE WITH STROKE 6 , 7 . 8 ү CYRILLIC SMALL LETTER STRAIGHT U 9 ұ CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE 0 қ CYRILLIC SMALL LETTER KA WITH DESCENDER - ө CYRILLIC SMALL LETTER BARRED O = һ CYRILLIC SMALL LETTER SHHA �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/lithuanian-baltic.vim���������������������������������������������������0000664�0000000�0000000�00000001703�13204015742�0022065�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for lithuanian characters, phonetic layout 'Baltic' " Useful mainly with utf-8 but may work with other encodings " Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt> " Last Changed: 2002 Apr 12 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "lt" loadkeymap ! Ą LITHUANIAN CAPITAL A NOSINE @ Č LITHUANIAN CAPITAL CH # Ę LITHUANIAN CAPITAL E NOSINE $ Ė LITHUANIAN CAPITAL E SU TASKU % Į LITHUANIAN CAPITAL I NOSINE ^ Š LITHUANIAN CAPITAL SH & Ų LITHUANIAN CAPITAL U NOSINE * Ū LITHUANIAN CAPITAL U SU BRUKSNIU + Ž LITHUANIAN CAPITAL ZH 1 ą LITHUANIAN LOWERCASE A NOSINE 2 č LITHUANIAN LOWERCASE CH 3 ę LITHUANIAN LOWERCASE E NOSINE 4 ė LITHUANIAN LOWERCASE E SU TASKU 5 į LITHUANIAN LOWERCASE I NOSINE 6 š LITHUANIAN LOWERCASE SH 7 ų LITHUANIAN LOWERCASE U NOSINE 8 ū LITHUANIAN LOWERCASE U SU BRUKSNIU = ž LITHUANIAN LOWERCASE ZH �������������������������������������������������������������neovim-0.2.2/runtime/keymap/magyar_utf-8.vim��������������������������������������������������������0000664�0000000�0000000�00000000506�13204015742�0021000�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Laszlo Zavaleta <zavaleta@smartchat.net.au> " Last Changed: 2003 Aug 08 " it has all the accents and a few of the character alterations let b:keymap = "magyar" loadkey ` í ~ Í ! ' @ " # + $ ! ^ / & = * ( ( ) 0 ö ) Ö - ü _ Ü = ó + Ó \\ ű | Ű [ ő { Ő ] ú } Ú ; é : É ' á \" Á / - < ? > : ? _ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/mongolian_utf-8.vim�����������������������������������������������������0000664�0000000�0000000�00000005002�13204015742�0021477�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Natsagdorj Shagdar <natsag2000@yahoo.com> " Last Changed: 2007 Jun 26 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "mn" loadkeymap C Ё CYRILLIC CAPITAL LETTER IO c ё CYRILLIC SMALL LETTER IO G А CYRILLIC CAPITAL LETTER A D Б CYRILLIC CAPITAL LETTER BE > В CYRILLIC CAPITAL LETTER VE U Г CYRILLIC CAPITAL LETTER GHE : Д CYRILLIC CAPITAL LETTER DE _ Е CYRILLIC CAPITAL LETTER IE R Ж CYRILLIC CAPITAL LETTER ZHE P З CYRILLIC CAPITAL LETTER ZE N И CYRILLIC CAPITAL LETTER I A Й CYRILLIC CAPITAL LETTER SHORT I { К CYRILLIC CAPITAL LETTER KA L Л CYRILLIC CAPITAL LETTER EL B М CYRILLIC CAPITAL LETTER EM Y Н CYRILLIC CAPITAL LETTER EN K О CYRILLIC CAPITAL LETTER O \" П CYRILLIC CAPITAL LETTER PE J Р CYRILLIC CAPITAL LETTER ER V С CYRILLIC CAPITAL LETTER ES M Т CYRILLIC CAPITAL LETTER TE E У CYRILLIC CAPITAL LETTER U Q Ф CYRILLIC CAPITAL LETTER EF H Х CYRILLIC CAPITAL LETTER HA W Ц CYRILLIC CAPITAL LETTER TSE X Ч CYRILLIC CAPITAL LETTER CHE I Ш CYRILLIC CAPITAL LETTER SHA + Щ CYRILLIC CAPITAL LETTER SHCHA } Ъ CYRILLIC CAPITAL LETTER HARD SIGN S Ы CYRILLIC CAPITAL LETTER YERU < Ь CYRILLIC CAPITAL LETTER SOFT SIGN T Э CYRILLIC CAPITAL LETTER E ? Ю CYRILLIC CAPITAL LETTER YU Z Я CYRILLIC CAPITAL LETTER YA g а CYRILLIC SMALL LETTER A d б CYRILLIC SMALL LETTER BE . в CYRILLIC SMALL LETTER VE u г CYRILLIC SMALL LETTER GHE ; д CYRILLIC SMALL LETTER DE - е CYRILLIC SMALL LETTER IE r ж CYRILLIC SMALL LETTER ZHE p з CYRILLIC SMALL LETTER ZE n и CYRILLIC SMALL LETTER I a й CYRILLIC SMALL LETTER SHORT I [ к CYRILLIC SMALL LETTER KA l л CYRILLIC SMALL LETTER EL b м CYRILLIC SMALL LETTER EM y н CYRILLIC SMALL LETTER EN k о CYRILLIC SMALL LETTER O ' п CYRILLIC SMALL LETTER PE j р CYRILLIC SMALL LETTER ER v с CYRILLIC SMALL LETTER ES m т CYRILLIC SMALL LETTER TE e у CYRILLIC SMALL LETTER U q ф CYRILLIC SMALL LETTER EF h х CYRILLIC SMALL LETTER HA w ц CYRILLIC SMALL LETTER TSE x ч CYRILLIC SMALL LETTER CHE i ш CYRILLIC SMALL LETTER SHA = щ CYRILLIC SMALL LETTER SHCHA ] ъ CYRILLIC SMALL LETTER HARD SIGN s ы CYRILLIC SMALL LETTER YERU , ь CYRILLIC SMALL LETTER SOFT SIGN t э CYRILLIC SMALL LETTER E / ю CYRILLIC SMALL LETTER YU z я CYRILLIC SMALL LETTER YA f ө CYRILLIC SMALL LETTER Oе F Ө CYRILLIC SMALL LETTER Oе o ү CYRILLIC SMALL LETTER Ге O Ү CYRILLIC SMALL LETTER Oе ` = 1 № NUMERO SIGN 2 - 3 " 4 T 5 : 7 ? 6 . 8 , 9 ( 0 ) ! 1 @ 2 # 3 $ 4 % 5 ^ 6 & 7 * 8 ( 9 ) 0 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/persian-iranian_utf-8.vim�����������������������������������������������0000664�0000000�0000000�00000001360�13204015742�0022577�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Persian Standard Keyboard Layout " Maintainers: Behnam 'ZWNJ' Esfahbod <behnam@zwnj.org>, " Amir Hedayaty <hedayaty@gmail.com> " Last Change: 2006 Apr 21 scriptencoding utf-8 " Use this short name in the status line. let b:keymap_name = "per" loadkeymap ` ‍ 1 ۱ 2 ۲ 3 ۳ 4 ۴ 5 ۵ 6 ۶ 7 ۷ 8 ۸ 9 ۹ 0 ۰ - - = = q ض w ص e ث r ق t ف y غ u ع i ه o خ p ح [ ج ] چ a ش s س d ی f ب g ل h ا j ت k ن l م ; ک ' گ z ظ x ط c ز v ر b ذ n د m پ , و . . / / \\ \\ ~ ÷ ! ! @ ٬ # ٫ $ ﷼ % ٪ ^ × & ، * * ( ) ) ( _ ـ + + Q ْ W ٌ E ٍ R ً T ُ Y ِ U َ I ّ O ] P [ { } } { A ؤ S ئ D ي F إ G أ H آ J ة K » L « : : \" ؛ Z ك X ٓ C ژ V ٰ B ‌ N ٔ M ء < > > < ? ؟ | | ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/persian.vim�������������������������������������������������������������0000664�0000000�0000000�00000000220�13204015742�0020127�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������let encoding = &enc if encoding == '' let encoding = 'utf-8' endif if encoding == 'utf-8' source <sfile>:p:h/persian-iranian_utf-8.vim endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/pinyin.vim��������������������������������������������������������������0000664�0000000�0000000�00000001033�13204015742�0017777�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Hanyu Pinyin tone marks through numbers. " Maintainer: Fredrik Roubert <fredrik@roubert.name> " Last Changed: February 15, 2004 " All characters are given literally. scriptencoding utf-8 " Use this short name in the status line. let b:keymap_name = "py" loadkeymap a0 a a1 ā a2 á a3 ǎ a4 à a5 a e0 e e1 ē e2 é e3 ě e4 è e5 e i0 i i1 ī i2 í i3 ǐ i4 ì i5 i o0 o o1 ō o2 ó o3 ǒ o4 ò o5 o u0 u u1 ū u2 ú u3 ǔ u4 ù u5 u ü0 ü ü1 ǖ ü2 ǘ ü3 ǚ ü4 ǜ ü5 ü v0 ü v1 ǖ v2 ǘ v3 ǚ v4 ǜ v5 ü �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/polish-slash.vim��������������������������������������������������������0000664�0000000�0000000�00000001305�13204015742�0021101�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Polish letters under VIM >= 6 " Maintainer: HS6_06 <hs6_06@o2.pl> " Last changed: 2005 Jan 12 " Current version: 1.0.2 " History: " 2005.01.12 1.0.2 keymap_name shortened, added Current version, History " 2005.01.10 1.0.1 un*x line ends for all files " 2005.01.09 1.0.0 Initial release let encoding = &enc if encoding == 'latin1' if has("unix") let encoding = 'iso-8859-2' else let encoding = 'cp1250' endif endif if encoding == 'utf-8' source <sfile>:p:h/polish-slash_utf-8.vim elseif encoding == 'cp1250' source <sfile>:p:h/polish-slash_cp1250.vim elseif encoding == 'iso-8859-2' source <sfile>:p:h/polish-slash_iso-8859-2.vim else source <sfile>:p:h/polish-slash_cp852.vim endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/polish-slash_cp1250.vim�������������������������������������������������0000664�0000000�0000000�00000002534�13204015742�0022100�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Polish letters keymap for cp1250 " Maintainer: HS6_06 <hs6_06@o2.pl> " Last Changed: 2005 Jan 12 " Current version: 1.0.2 " History: see polish-slash.vim " This keymap adds the special Polish letters " to an existing Latin keyboard. " All chars as usual except: " Polish: " instead of AltGr+{acelnosxz} you ve to use "/" followed by {acelnosxz} " short keymap name for statusline let b:keymap_name = "PL-slash-WIN" scriptencoding latin1 loadkeymap " Polish letters /a <Char-185> " LATIN SMALL LETTER A WITH OGONEK /c <Char-230> " LATIN SMALL LETTER C WITH ACUTE /e <Char-234> " LATIN SMALL LETTER E WITH OGONEK /l <Char-179> " LATIN SMALL LETTER L WITH STROKE /n <Char-241> " LATIN SMALL LETTER N WITH ACUTE /o <Char-243> " LATIN SMALL LETTER O WITH ACUTE /s <Char-156> " LATIN SMALL LETTER S WITH ACUTE /x <Char-159> " LATIN SMALL LETTER Z WITH ACUTE /z <Char-191> " LATIN SMALL LETTER Z WITH DOT ABOVE /A <Char-165> " LATIN CAPITAL LETTER A WITH OGONEK /C <Char-198> " LATIN CAPITAL LETTER C WITH ACUTE /E <Char-202> " LATIN CAPITAL LETTER E WITH OGONEK /L <Char-163> " LATIN CAPITAL LETTER L WITH STROKE /N <Char-209> " LATIN CAPITAL LETTER N WITH ACUTE /O <Char-211> " LATIN CAPITAL LETTER O WITH ACUTE /S <Char-140> " LATIN CAPITAL LETTER S WITH ACUTE /X <Char-143> " LATIN CAPITAL LETTER Z WITH ACUTE /Z <Char-175> " LATIN CAPITAL LETTER Z WITH DOT ABOVE ��������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/polish-slash_cp852.vim��������������������������������������������������0000664�0000000�0000000�00000002533�13204015742�0022026�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Polish letters keymap for cp852 " Maintainer: HS6_06 <hs6_06@o2.pl> " Last Changed: 2005 Jan 12 " Current version: 1.0.2 " History: see polish-slash.vim " This keymap adds the special Polish letters " to an existing Latin keyboard. " All chars as usual except: " Polish: " instead of AltGr+{acelnosxz} you ve to use "/" followed by {acelnosxz} " short keymap name for statusline let b:keymap_name = "PL-slash-DOS" scriptencoding latin1 loadkeymap " Polish letters /a <Char-165> " LATIN SMALL LETTER A WITH OGONEK /c <Char-134> " LATIN SMALL LETTER C WITH ACUTE /e <Char-169> " LATIN SMALL LETTER E WITH OGONEK /l <Char-136> " LATIN SMALL LETTER L WITH STROKE /n <Char-228> " LATIN SMALL LETTER N WITH ACUTE /o <Char-162> " LATIN SMALL LETTER O WITH ACUTE /s <Char-152> " LATIN SMALL LETTER S WITH ACUTE /x <Char-171> " LATIN SMALL LETTER Z WITH ACUTE /z <Char-190> " LATIN SMALL LETTER Z WITH DOT ABOVE /A <Char-164> " LATIN CAPITAL LETTER A WITH OGONEK /C <Char-143> " LATIN CAPITAL LETTER C WITH ACUTE /E <Char-168> " LATIN CAPITAL LETTER E WITH OGONEK /L <Char-157> " LATIN CAPITAL LETTER L WITH STROKE /N <Char-227> " LATIN CAPITAL LETTER N WITH ACUTE /O <Char-224> " LATIN CAPITAL LETTER O WITH ACUTE /S <Char-151> " LATIN CAPITAL LETTER S WITH ACUTE /X <Char-141> " LATIN CAPITAL LETTER Z WITH ACUTE /Z <Char-189> " LATIN CAPITAL LETTER Z WITH DOT ABOVE ���������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/polish-slash_iso-8859-2.vim���������������������������������������������0000664�0000000�0000000�00000002534�13204015742�0022532�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Polish letters keymap for iso-8859-2 " Maintainer: HS6_06 <hs6_06@o2.pl> " Last Changed: 2005 Jan 12 " Current version: 1.0.2 " History: polish-slash.vim " This keymap adds the special Polish letters " to an existing Latin keyboard. " All chars as usual except: " Polish: " instead of AltGr+{acelnosxz} you ve to use "/" followed by {acelnosxz} " short keymap name for statusline let b:keymap_name = "PL-slash-ISO" scriptencoding latin1 loadkeymap " Polish letters /a <Char-177> " LATIN SMALL LETTER A WITH OGONEK /c <Char-230> " LATIN SMALL LETTER C WITH ACUTE /e <Char-234> " LATIN SMALL LETTER E WITH OGONEK /l <Char-179> " LATIN SMALL LETTER L WITH STROKE /n <Char-241> " LATIN SMALL LETTER N WITH ACUTE /o <Char-243> " LATIN SMALL LETTER O WITH ACUTE /s <Char-182> " LATIN SMALL LETTER S WITH ACUTE /x <Char-188> " LATIN SMALL LETTER Z WITH ACUTE /z <Char-191> " LATIN SMALL LETTER Z WITH DOT ABOVE /A <Char-161> " LATIN CAPITAL LETTER A WITH OGONEK /C <Char-198> " LATIN CAPITAL LETTER C WITH ACUTE /E <Char-202> " LATIN CAPITAL LETTER E WITH OGONEK /L <Char-163> " LATIN CAPITAL LETTER L WITH STROKE /N <Char-209> " LATIN CAPITAL LETTER N WITH ACUTE /O <Char-211> " LATIN CAPITAL LETTER O WITH ACUTE /S <Char-166> " LATIN CAPITAL LETTER S WITH ACUTE /X <Char-172> " LATIN CAPITAL LETTER Z WITH ACUTE /Z <Char-175> " LATIN CAPITAL LETTER Z WITH DOT ABOVE ��������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/polish-slash_utf-8.vim��������������������������������������������������0000664�0000000�0000000�00000002621�13204015742�0022126�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Polish letters keymap for utf-8 " Maintainer: HS6_06 <hs6_06@o2.pl> " Last Changed: 2005 Jan 12 " Current version: 1.0.2 " History: see polish-slash.vim " This keymap adds the special Polish letters " to an existing Latin keyboard. " All chars as usual except: " Polish: " instead of AltGr+{acelnosxz} you ve to use "/" followed by {acelnosxz} " short keymap name for statusline let b:keymap_name = "PL-slash-UTF" scriptencoding latin1 loadkeymap " Polish letters /a <Char-0x0105> " LATIN SMALL LETTER A WITH OGONEK /c <Char-0x0107> " LATIN SMALL LETTER C WITH ACUTE /e <Char-0x0119> " LATIN SMALL LETTER E WITH OGONEK /l <Char-0x0142> " LATIN SMALL LETTER L WITH STROKE /n <Char-0x0144> " LATIN SMALL LETTER N WITH ACUTE /o <Char-0x00f3> " LATIN SMALL LETTER O WITH ACUTE /s <Char-0x015b> " LATIN SMALL LETTER S WITH ACUTE /x <Char-0x017a> " LATIN SMALL LETTER Z WITH ACUTE /z <Char-0x017c> " LATIN SMALL LETTER Z WITH DOT ABOVE /A <Char-0x0104> " LATIN CAPITAL LETTER A WITH OGONEK /C <Char-0x0106> " LATIN CAPITAL LETTER C WITH ACUTE /E <Char-0x0118> " LATIN CAPITAL LETTER E WITH OGONEK /L <Char-0x0141> " LATIN CAPITAL LETTER L WITH STROKE /N <Char-0x0143> " LATIN CAPITAL LETTER N WITH ACUTE /O <Char-0x00d3> " LATIN CAPITAL LETTER O WITH ACUTE /S <Char-0x015a> " LATIN CAPITAL LETTER S WITH ACUTE /X <Char-0x0179> " LATIN CAPITAL LETTER Z WITH ACUTE /Z <Char-0x017b> " LATIN CAPITAL LETTER Z WITH DOT ABOVE ���������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/russian-dvorak.vim������������������������������������������������������0000664�0000000�0000000�00000005042�13204015742�0021445�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for russian characters, layout 'dvorak', MS Windows variant " Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru> " Useful mainly with utf-8 but may work with other encodings " Maintainer: Serhiy Boiko <cris.kiev@gmail.com> " Last Changed: 2007 Jun 29 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "ru" loadkeymap ~ Ё CYRILLIC CAPITAL LETTER IO ` ё CYRILLIC SMALL LETTER IO U А CYRILLIC CAPITAL LETTER A W Б CYRILLIC CAPITAL LETTER BE E В CYRILLIC CAPITAL LETTER VE G Г CYRILLIC CAPITAL LETTER GHE N Д CYRILLIC CAPITAL LETTER DE Y Е CYRILLIC CAPITAL LETTER IE S Ж CYRILLIC CAPITAL LETTER ZHE L З CYRILLIC CAPITAL LETTER ZE X И CYRILLIC CAPITAL LETTER I \" Й CYRILLIC CAPITAL LETTER SHORT I P К CYRILLIC CAPITAL LETTER KA T Л CYRILLIC CAPITAL LETTER EL K М CYRILLIC CAPITAL LETTER EM F Н CYRILLIC CAPITAL LETTER EN H О CYRILLIC CAPITAL LETTER O I П CYRILLIC CAPITAL LETTER PE D Р CYRILLIC CAPITAL LETTER ER J С CYRILLIC CAPITAL LETTER ES B Т CYRILLIC CAPITAL LETTER TE > У CYRILLIC CAPITAL LETTER U A Ф CYRILLIC CAPITAL LETTER EF ? Х CYRILLIC CAPITAL LETTER HA < Ц CYRILLIC CAPITAL LETTER TSE Q Ч CYRILLIC CAPITAL LETTER CHE C Ш CYRILLIC CAPITAL LETTER SHA R Щ CYRILLIC CAPITAL LETTER SHCHA + Ъ CYRILLIC CAPITAL LETTER HARD SIGN O Ы CYRILLIC CAPITAL LETTER YERU M Ь CYRILLIC CAPITAL LETTER SOFT SIGN _ Э CYRILLIC CAPITAL LETTER E V Ю CYRILLIC CAPITAL LETTER YU : Я CYRILLIC CAPITAL LETTER YA u а CYRILLIC SMALL LETTER A w б CYRILLIC SMALL LETTER BE e в CYRILLIC SMALL LETTER VE g г CYRILLIC SMALL LETTER GHE n д CYRILLIC SMALL LETTER DE y е CYRILLIC SMALL LETTER IE s ж CYRILLIC SMALL LETTER ZHE l з CYRILLIC SMALL LETTER ZE x и CYRILLIC SMALL LETTER I ' й CYRILLIC SMALL LETTER SHORT I p к CYRILLIC SMALL LETTER KA t л CYRILLIC SMALL LETTER EL k м CYRILLIC SMALL LETTER EM f н CYRILLIC SMALL LETTER EN h о CYRILLIC SMALL LETTER O i п CYRILLIC SMALL LETTER PE d р CYRILLIC SMALL LETTER ER j с CYRILLIC SMALL LETTER ES b т CYRILLIC SMALL LETTER TE . у CYRILLIC SMALL LETTER U a ф CYRILLIC SMALL LETTER EF / х CYRILLIC SMALL LETTER HA , ц CYRILLIC SMALL LETTER TSE q ч CYRILLIC SMALL LETTER CHE c ш CYRILLIC SMALL LETTER SHA r щ CYRILLIC SMALL LETTER SHCHA = ъ CYRILLIC SMALL LETTER HARD SIGN o ы CYRILLIC SMALL LETTER YERU m ь CYRILLIC SMALL LETTER SOFT SIGN - э CYRILLIC SMALL LETTER E v ю CYRILLIC SMALL LETTER YU ; я CYRILLIC SMALL LETTER YA @ " # № NUMERO SIGN $ ; ^ : & ? z . Z , [ - ] = ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/russian-jcuken.vim������������������������������������������������������0000664�0000000�0000000�00000004747�13204015742�0021451�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for russian characters, layout 'jcuken', classical variant " (compatible with XFree86 'ru' keymap) " Useful mainly with utf-8 but may work with other encodings " Maintainer: Artem Chuprina <ran@ran.pp.ru> " Last Changed: 2001 Jun 23 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "ru" loadkeymap ~ Ё CYRILLIC CAPITAL LETTER IO ` ё CYRILLIC SMALL LETTER IO F А CYRILLIC CAPITAL LETTER A < Б CYRILLIC CAPITAL LETTER BE D В CYRILLIC CAPITAL LETTER VE U Г CYRILLIC CAPITAL LETTER GHE L Д CYRILLIC CAPITAL LETTER DE T Е CYRILLIC CAPITAL LETTER IE : Ж CYRILLIC CAPITAL LETTER ZHE P З CYRILLIC CAPITAL LETTER ZE B И CYRILLIC CAPITAL LETTER I Q Й CYRILLIC CAPITAL LETTER SHORT I R К CYRILLIC CAPITAL LETTER KA K Л CYRILLIC CAPITAL LETTER EL V М CYRILLIC CAPITAL LETTER EM Y Н CYRILLIC CAPITAL LETTER EN J О CYRILLIC CAPITAL LETTER O G П CYRILLIC CAPITAL LETTER PE H Р CYRILLIC CAPITAL LETTER ER C С CYRILLIC CAPITAL LETTER ES N Т CYRILLIC CAPITAL LETTER TE E У CYRILLIC CAPITAL LETTER U A Ф CYRILLIC CAPITAL LETTER EF { Х CYRILLIC CAPITAL LETTER HA W Ц CYRILLIC CAPITAL LETTER TSE X Ч CYRILLIC CAPITAL LETTER CHE I Ш CYRILLIC CAPITAL LETTER SHA O Щ CYRILLIC CAPITAL LETTER SHCHA } Ъ CYRILLIC CAPITAL LETTER HARD SIGN S Ы CYRILLIC CAPITAL LETTER YERU M Ь CYRILLIC CAPITAL LETTER SOFT SIGN \" Э CYRILLIC CAPITAL LETTER E > Ю CYRILLIC CAPITAL LETTER YU Z Я CYRILLIC CAPITAL LETTER YA f а CYRILLIC SMALL LETTER A , б CYRILLIC SMALL LETTER BE d в CYRILLIC SMALL LETTER VE u г CYRILLIC SMALL LETTER GHE l д CYRILLIC SMALL LETTER DE t е CYRILLIC SMALL LETTER IE ; ж CYRILLIC SMALL LETTER ZHE p з CYRILLIC SMALL LETTER ZE b и CYRILLIC SMALL LETTER I q й CYRILLIC SMALL LETTER SHORT I r к CYRILLIC SMALL LETTER KA k л CYRILLIC SMALL LETTER EL v м CYRILLIC SMALL LETTER EM y н CYRILLIC SMALL LETTER EN j о CYRILLIC SMALL LETTER O g п CYRILLIC SMALL LETTER PE h р CYRILLIC SMALL LETTER ER c с CYRILLIC SMALL LETTER ES n т CYRILLIC SMALL LETTER TE e у CYRILLIC SMALL LETTER U a ф CYRILLIC SMALL LETTER EF [ х CYRILLIC SMALL LETTER HA w ц CYRILLIC SMALL LETTER TSE x ч CYRILLIC SMALL LETTER CHE i ш CYRILLIC SMALL LETTER SHA o щ CYRILLIC SMALL LETTER SHCHA ] ъ CYRILLIC SMALL LETTER HARD SIGN s ы CYRILLIC SMALL LETTER YERU m ь CYRILLIC SMALL LETTER SOFT SIGN ' э CYRILLIC SMALL LETTER E . ю CYRILLIC SMALL LETTER YU z я CYRILLIC SMALL LETTER YA @ " # ' $ * % : ^ , & . * ; �������������������������neovim-0.2.2/runtime/keymap/russian-jcukenmac.vim���������������������������������������������������0000664�0000000�0000000�00000005375�13204015742�0022130�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for russian characters, layout 'jcuken', Mac variant " Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru> " Maintainer: Anton Fonarev <avfonarev@gmail.com> " Last Changed: 2016 August 17 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "ru" loadkeymap \| Ё CYRILLIC CAPITAL LETTER IO \\ ё CYRILLIC SMALL LETTER IO F А CYRILLIC CAPITAL LETTER A < Б CYRILLIC CAPITAL LETTER BE D В CYRILLIC CAPITAL LETTER VE U Г CYRILLIC CAPITAL LETTER GHE L Д CYRILLIC CAPITAL LETTER DE T Е CYRILLIC CAPITAL LETTER IE : Ж CYRILLIC CAPITAL LETTER ZHE P З CYRILLIC CAPITAL LETTER ZE B И CYRILLIC CAPITAL LETTER I Q Й CYRILLIC CAPITAL LETTER SHORT I R К CYRILLIC CAPITAL LETTER KA K Л CYRILLIC CAPITAL LETTER EL V М CYRILLIC CAPITAL LETTER EM Y Н CYRILLIC CAPITAL LETTER EN J О CYRILLIC CAPITAL LETTER O G П CYRILLIC CAPITAL LETTER PE H Р CYRILLIC CAPITAL LETTER ER C С CYRILLIC CAPITAL LETTER ES N Т CYRILLIC CAPITAL LETTER TE E У CYRILLIC CAPITAL LETTER U A Ф CYRILLIC CAPITAL LETTER EF { Х CYRILLIC CAPITAL LETTER HA W Ц CYRILLIC CAPITAL LETTER TSE X Ч CYRILLIC CAPITAL LETTER CHE I Ш CYRILLIC CAPITAL LETTER SHA O Щ CYRILLIC CAPITAL LETTER SHCHA } Ъ CYRILLIC CAPITAL LETTER HARD SIGN S Ы CYRILLIC CAPITAL LETTER YERU M Ь CYRILLIC CAPITAL LETTER SOFT SIGN \" Э CYRILLIC CAPITAL LETTER E > Ю CYRILLIC CAPITAL LETTER YU Z Я CYRILLIC CAPITAL LETTER YA f а CYRILLIC SMALL LETTER A , б CYRILLIC SMALL LETTER BE d в CYRILLIC SMALL LETTER VE u г CYRILLIC SMALL LETTER GHE l д CYRILLIC SMALL LETTER DE t е CYRILLIC SMALL LETTER IE ; ж CYRILLIC SMALL LETTER ZHE p з CYRILLIC SMALL LETTER ZE b и CYRILLIC SMALL LETTER I q й CYRILLIC SMALL LETTER SHORT I r к CYRILLIC SMALL LETTER KA k л CYRILLIC SMALL LETTER EL v м CYRILLIC SMALL LETTER EM y н CYRILLIC SMALL LETTER EN j о CYRILLIC SMALL LETTER O g п CYRILLIC SMALL LETTER PE h р CYRILLIC SMALL LETTER ER c с CYRILLIC SMALL LETTER ES n т CYRILLIC SMALL LETTER TE e у CYRILLIC SMALL LETTER U a ф CYRILLIC SMALL LETTER EF [ х CYRILLIC SMALL LETTER HA w ц CYRILLIC SMALL LETTER TSE x ч CYRILLIC SMALL LETTER CHE i ш CYRILLIC SMALL LETTER SHA o щ CYRILLIC SMALL LETTER SHCHA ] ъ CYRILLIC SMALL LETTER HARD SIGN s ы CYRILLIC SMALL LETTER YERU m ь CYRILLIC SMALL LETTER SOFT SIGN ' э CYRILLIC SMALL LETTER E . ю CYRILLIC SMALL LETTER YU z я CYRILLIC SMALL LETTER YA § > ± < @ " # № $ % % : ^ , & . * ; ` ] ~ [ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/russian-jcukenwin.vim���������������������������������������������������0000664�0000000�0000000�00000005034�13204015742�0022155�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for russian characters, layout 'jcuken', MS Windows variant " (slightly incompatible with XFree86 'ru' keymap - makes use of NUMERO SIGN) " Useful mainly with utf-8 but may work with other encodings " Maintainer: Artem Chuprina <ran@ran.pp.ru> " Last Changed: 2001 Jun 23 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "ru" loadkeymap ~ Ё CYRILLIC CAPITAL LETTER IO ` ё CYRILLIC SMALL LETTER IO F А CYRILLIC CAPITAL LETTER A < Б CYRILLIC CAPITAL LETTER BE D В CYRILLIC CAPITAL LETTER VE U Г CYRILLIC CAPITAL LETTER GHE L Д CYRILLIC CAPITAL LETTER DE T Е CYRILLIC CAPITAL LETTER IE : Ж CYRILLIC CAPITAL LETTER ZHE P З CYRILLIC CAPITAL LETTER ZE B И CYRILLIC CAPITAL LETTER I Q Й CYRILLIC CAPITAL LETTER SHORT I R К CYRILLIC CAPITAL LETTER KA K Л CYRILLIC CAPITAL LETTER EL V М CYRILLIC CAPITAL LETTER EM Y Н CYRILLIC CAPITAL LETTER EN J О CYRILLIC CAPITAL LETTER O G П CYRILLIC CAPITAL LETTER PE H Р CYRILLIC CAPITAL LETTER ER C С CYRILLIC CAPITAL LETTER ES N Т CYRILLIC CAPITAL LETTER TE E У CYRILLIC CAPITAL LETTER U A Ф CYRILLIC CAPITAL LETTER EF { Х CYRILLIC CAPITAL LETTER HA W Ц CYRILLIC CAPITAL LETTER TSE X Ч CYRILLIC CAPITAL LETTER CHE I Ш CYRILLIC CAPITAL LETTER SHA O Щ CYRILLIC CAPITAL LETTER SHCHA } Ъ CYRILLIC CAPITAL LETTER HARD SIGN S Ы CYRILLIC CAPITAL LETTER YERU M Ь CYRILLIC CAPITAL LETTER SOFT SIGN \" Э CYRILLIC CAPITAL LETTER E > Ю CYRILLIC CAPITAL LETTER YU Z Я CYRILLIC CAPITAL LETTER YA f а CYRILLIC SMALL LETTER A , б CYRILLIC SMALL LETTER BE d в CYRILLIC SMALL LETTER VE u г CYRILLIC SMALL LETTER GHE l д CYRILLIC SMALL LETTER DE t е CYRILLIC SMALL LETTER IE ; ж CYRILLIC SMALL LETTER ZHE p з CYRILLIC SMALL LETTER ZE b и CYRILLIC SMALL LETTER I q й CYRILLIC SMALL LETTER SHORT I r к CYRILLIC SMALL LETTER KA k л CYRILLIC SMALL LETTER EL v м CYRILLIC SMALL LETTER EM y н CYRILLIC SMALL LETTER EN j о CYRILLIC SMALL LETTER O g п CYRILLIC SMALL LETTER PE h р CYRILLIC SMALL LETTER ER c с CYRILLIC SMALL LETTER ES n т CYRILLIC SMALL LETTER TE e у CYRILLIC SMALL LETTER U a ф CYRILLIC SMALL LETTER EF [ х CYRILLIC SMALL LETTER HA w ц CYRILLIC SMALL LETTER TSE x ч CYRILLIC SMALL LETTER CHE i ш CYRILLIC SMALL LETTER SHA o щ CYRILLIC SMALL LETTER SHCHA ] ъ CYRILLIC SMALL LETTER HARD SIGN s ы CYRILLIC SMALL LETTER YERU m ь CYRILLIC SMALL LETTER SOFT SIGN ' э CYRILLIC SMALL LETTER E . ю CYRILLIC SMALL LETTER YU z я CYRILLIC SMALL LETTER YA @ " # № NUMERO SIGN $ ; ^ : & ? / . ? , ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/russian-yawerty.vim�����������������������������������������������������0000664�0000000�0000000�00000004637�13204015742�0021674�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for russian characters, phonetic layout 'yawerty' " Useful mainly with utf-8 but may work with other encodings " Maintainer: Igor Goldenberg <igogold@gmail.com> " Last Changed: 2007 Aug 15 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "ru" loadkeymap A А CYRILLIC CAPITAL LETTER A B Б CYRILLIC CAPITAL LETTER BE W В CYRILLIC CAPITAL LETTER VE G Г CYRILLIC CAPITAL LETTER GHE D Д CYRILLIC CAPITAL LETTER DE E Е CYRILLIC CAPITAL LETTER IE $ Ё CYRILLIC CAPITAL LETTER IO V Ж CYRILLIC CAPITAL LETTER ZHE Z З CYRILLIC CAPITAL LETTER ZE I И CYRILLIC CAPITAL LETTER I J Й CYRILLIC CAPITAL LETTER SHORT I K К CYRILLIC CAPITAL LETTER KA L Л CYRILLIC CAPITAL LETTER EL M М CYRILLIC CAPITAL LETTER EM N Н CYRILLIC CAPITAL LETTER EN O О CYRILLIC CAPITAL LETTER O P П CYRILLIC CAPITAL LETTER PE R Р CYRILLIC CAPITAL LETTER ER S С CYRILLIC CAPITAL LETTER ES T Т CYRILLIC CAPITAL LETTER TE U У CYRILLIC CAPITAL LETTER U F Ф CYRILLIC CAPITAL LETTER EF H Х CYRILLIC CAPITAL LETTER HA C Ц CYRILLIC CAPITAL LETTER TSE + Ч CYRILLIC CAPITAL LETTER CHE { Ш CYRILLIC CAPITAL LETTER SHA } Щ CYRILLIC CAPITAL LETTER SHCHA ^ Ъ CYRILLIC CAPITAL LETTER HARD SIGN Y Ы CYRILLIC CAPITAL LETTER YERU X Ь CYRILLIC CAPITAL LETTER SOFT SIGN | Э CYRILLIC CAPITAL LETTER E ~ Ю CYRILLIC CAPITAL LETTER YU Q Я CYRILLIC CAPITAL LETTER YA a а CYRILLIC SMALL LETTER A b б CYRILLIC SMALL LETTER BE w в CYRILLIC SMALL LETTER VE g г CYRILLIC SMALL LETTER GHE d д CYRILLIC SMALL LETTER DE e е CYRILLIC SMALL LETTER IE # ё CYRILLIC SMALL LETTER IO v ж CYRILLIC SMALL LETTER ZHE z з CYRILLIC SMALL LETTER ZE i и CYRILLIC SMALL LETTER I j й CYRILLIC SMALL LETTER SHORT I k к CYRILLIC SMALL LETTER KA l л CYRILLIC SMALL LETTER EL m м CYRILLIC SMALL LETTER EM n н CYRILLIC SMALL LETTER EN o о CYRILLIC SMALL LETTER O p п CYRILLIC SMALL LETTER PE r р CYRILLIC SMALL LETTER ER s с CYRILLIC SMALL LETTER ES t т CYRILLIC SMALL LETTER TE u у CYRILLIC SMALL LETTER U f ф CYRILLIC SMALL LETTER EF h х CYRILLIC SMALL LETTER HA c ц CYRILLIC SMALL LETTER TSE = ч CYRILLIC SMALL LETTER CHE [ ш CYRILLIC SMALL LETTER SHA ] щ CYRILLIC SMALL LETTER SHCHA % ъ CYRILLIC SMALL LETTER HARD SIGN y ы CYRILLIC SMALL LETTER YERU x ь CYRILLIC SMALL LETTER SOFT SIGN \\ э CYRILLIC SMALL LETTER E ` ю CYRILLIC SMALL LETTER YU q я CYRILLIC SMALL LETTER YA �������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/serbian-latin.vim�������������������������������������������������������0000664�0000000�0000000�00000000053�13204015742�0021222�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source <sfile>:p:h/serbian-latin_utf-8.vim �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/serbian-latin_utf-8.vim�������������������������������������������������0000664�0000000�0000000�00000001054�13204015742�0022247�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Serbian characters, classical variant, UTF-8 encoding " " Maintainer: Aleksandar Veselinovic <aleksa@cs.cmu.edu> " URL: http://www.cs.cmu.edu/~aleksa/personal/vim/keymap/serbian-latin-UTF-8.vim " Last Changed: 2002 Mar 29 scriptencoding UTF-8 let b:keymap_name = "serbian-UTF-8" loadkeymap Y Z { Š } Đ y z [ š ] đ : Č \" Ć \| Ž ; č ' ć \\ ž "Z Y "z y < ; > : / - _ ? ,, „ '' ” E$ <char-0x20AC> " EURO SIGN -- <char-0x2013> " endash --- <char-0x2014> " emdash " @ " " # ' " $ * " % : " ^ , " & . " * ; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/serbian.vim�������������������������������������������������������������0000664�0000000�0000000�00000000723�13204015742�0020121�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������let encoding = &enc if encoding == 'latin1' if has("unix") let encoding = 'iso-8859-2' else let encoding = 'cp1250' endif endif if encoding == 'utf-8' source <sfile>:p:h/serbian_utf-8.vim elseif encoding == 'cp1250' source <sfile>:p:h/serbian_cp1250.vim elseif encoding == 'cp1251' source <sfile>:p:h/serbian_cp1251.vim elseif encoding == 'iso-8859-2' source <sfile>:p:h/serbian_iso-8859-2.vim else source <sfile>:p:h/serbian_iso-8859-5.vim endif ���������������������������������������������neovim-0.2.2/runtime/keymap/serbian_cp1250.vim������������������������������������������������������0000664�0000000�0000000�00000000703�13204015742�0021111�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Serbian characters, classical variant, cp1250 encoding " " Maintainer: Aleksandar Veselinovic <aleksa@cs.cmu.edu> " URL: http://galeb.etf.bg.ac.yu/~alexa/vim/keymap/serbian-cp1250.vim " Last Changed: 2002 Mar 29 scriptencoding cp1250 let b:keymap_name = "serbian-cp1250" loadkeymap Y Z { } y z [ ] : \" \| ; ' \\ "Z Y "z y < ; > : / - _ ? ,, '' " @ " " # ' " $ * " % : " ^ , " & . " * ; �������������������������������������������������������������neovim-0.2.2/runtime/keymap/serbian_cp1251.vim������������������������������������������������������0000664�0000000�0000000�00000001216�13204015742�0021112�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Serbian characters, classical variant, win cp1251 " encoding " " Maintainer: Aleksandar Veselinovic <aleksa@cs.cmu.edu> " URL: http://www.cs.cmu.edu/~aleksa/personal/vim/keymap/serbian-cp1251.vim " Last Changed: 2002 Mar 29 scriptencoding cp1251 let b:keymap_name = "serbian-cp1251" loadkeymap Q W E R T Y U I O P { } q w e r t y u i o p [ ] A S D F G H J K L : \" \| a s d f g h j k l ; ' \\ "Z X C V B N M "z x c v b n m < ; > : / - _ ? ,, '' " @ " " # ' " $ * " % : " ^ , " & . " * ; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/serbian_iso-8859-2.vim��������������������������������������������������0000664�0000000�0000000�00000000731�13204015742�0021544�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Serbian characters, classical variant, iso-8859-2 encoding " " Maintainer: Aleksandar Veselinovic <aleksa@cs.cmu.edu> " URL: http://www.cs.cmu.edu/~aleksa/personal/vim/keymap/serbian-iso-8859-2.vim " Last Changed: 2002 Mar 29 scriptencoding iso-8859-2 let b:keymap_name = "serbian-iso-8859-2" loadkeymap Y Z { } y z [ ] : \" \| ; ' \\ "Z Y "z y < ; > : / - _ ? ,, ? '' ? " @ " " # ' " $ * " % : " ^ , " & . " * ; ���������������������������������������neovim-0.2.2/runtime/keymap/serbian_iso-8859-5.vim��������������������������������������������������0000664�0000000�0000000�00000001224�13204015742�0021545�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Serbian characters, classical variant, iso-8859-5 encoding " " Maintainer: Aleksandar Veselinovic <aleksa@cs.cmu.edu> " URL: http://www.cs.cmu.edu/~aleksa/personal/vim/keymap/serbian-iso-8859-5.vim " Last Changed: 2002 Mar 29 scriptencoding iso-8859-5 let b:keymap_name = "serbian-iso-8859-5" loadkeymap Q W E R T Y U I O P { } q w e r t y u i o p [ ] A S D F G H J K L : \" \| a s d f g h j k l ; ' \\ "Z X C V B N M "z x c v b n m < ; > : / - _ ? ,, ? '' ? " @ " " # ' " $ * " % : " ^ , " & . " * ; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/serbian_utf-8.vim�������������������������������������������������������0000664�0000000�0000000�00000001431�13204015742�0021141�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Serbian characters, classical variant, UTF-8 encoding " " Maintainer: Aleksandar Veselinovic <aleksa@cs.cmu.edu> " URL: http://www.cs.cmu.edu/~aleksa/personal/vim/keymap/serbian-UTF-8.vim " Last Changed: 2002 Mar 29 scriptencoding UTF-8 let b:keymap_name = "serbian-UTF-8" loadkeymap Q Љ W Њ E Е R Р T Т Y З U У I И O О P П { Ш } Ђ q љ w њ e е r р t т y з u у i и o о p п [ ш ] ђ A А S С D Д F Ф G Г H Х J Ј K К L Л : Ч \" Ћ \| Ж a а s с d д f ф g г h х j ј k к l л ; ч ' ћ \\ ж "Z З X Џ C Ц V В B Б N Н M М "z з x џ c ц v в b б n н m м < ; > : / - _ ? ,, „ '' ” E$ <char-0x20AC> " EURO SIGN -- <char-0x2013> " endash --- <char-0x2014> " emdash " @ " " # ' " $ * " % : " ^ , " & . " * ; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/sinhala-phonetic_utf-8.vim����������������������������������������������0000664�0000000�0000000�00000011101�13204015742�0022737�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Sinhala (Sri Lanka) (2003-11-02) " Maintainer : Harshula Jayasuriya <harshula@gmail.com> " Last Updated: 2007-06-30 " This is a phonetic static mapping for a standard US-English keyboard " (qwerty) " http://www.nongnu.org/sinhala/doc/keymaps/sinhala-keyboard_3.html " Copy the keymap to ~/.vim/keymap/ " Start gvim " Need to disable the menu so that you can use the 'alt' key. " set guioptions-=m " Select the new keymap " set keymap=sinhala-phonetic_utf-8 let b:keymap_name = "sinhala" loadkeymap <A-n> <char-0x0d82> " ං - anusvaraya (anusvara) H <char-0x0d83> " ඃ - visargaya (visarga) a <char-0x0d85> " අ - ayanna (a) A <char-0x0d86> " ආ - aayanna (aa) w <char-0x0d87> " ඇ - aeyanna (ae) W <char-0x0d88> " ඈ - aeeyanna (aee) i <char-0x0d89> " ඉ - iyanna (i) I <char-0x0d8a> " ඊ - iiyanna (ii) u <char-0x0d8b> " උ - uyanna (u) U <char-0x0d8c> " ඌ - uuyanna (uu) q <char-0x0d8d> " ඍ - iruyanna (iru) Q <char-0x0d8e> " ඎ - iruuyanna (iruu) <A-k> <char-0x0d8f> " ඏ - iluyanna (ilu) <A-K> <char-0x0d90> " ඐ - iluuyanna (iluu) e <char-0x0d91> " එ - eyanna (e) E <char-0x0d92> " ඒ - eeyanna (ee) <A-F> <char-0x0d93> " ඓ - aiyanna (ai) o <char-0x0d94> " ඔ - oyanna (o) O <char-0x0d95> " ඕ - ooyanna (oo) <A-H> <char-0x0d96> " ඖ - auyanna (au) k <char-0x0d9a> " ක - alpapraana kayanna (ka) K <char-0x0d9b> " ඛ - mahaapraana kayanna (kha) g <char-0x0d9c> " ග - alpapraana gayanna (ga) G <char-0x0d9d> " ඝ - mahaapraana gayanna (gha) <A-N> <char-0x0d9e> " ඞ - kantaja naasikyaya (nga) <A-g> <char-0x0d9f> " ඟ - sanyaka gayanna (nnga) c <char-0x0da0> " ච - alpapraana cayanna (ca) C <char-0x0da1> " ඡ - mahaapraana cayanna (cha) j <char-0x0da2> " ජ - alpapraana jayanna (ja) J <char-0x0da3> " ඣ - mahaapraana jayanna (jha) z <char-0x0da4> " ඤ - taaluja naasikyaya (nya) Z <char-0x0da5> " ඥ - taaluja sanyooga naasikyaya (jnya) <A-j> <char-0x0da6> " ඦ - sanyaka jayanna (nyja) <A-t> <char-0x0da7> " ට - alpapraana ttayanna (tta) <A-T> <char-0x0da8> " ඨ - mahaapraana ttayanna (ttha) <A-d> <char-0x0da9> " ඩ - alpapraana ddayanna (dda) <A-D> <char-0x0daa> " ඪ - mahaapraana ddayanna (ddha) N <char-0x0dab> " ණ - muurdhaja nayanna (nna) X <char-0x0dac> " ඬ - sanyaka ddayanna (nndda) t <char-0x0dad> " ත - alpapraana tayanna (ta) T <char-0x0dae> " ථ - mahaapraana tayanna (tha) d <char-0x0daf> " ද - alpapraana dayanna (da) D <char-0x0db0> " ධ - mahaapraana dayanna (dha) n <char-0x0db1> " න - dantaja nayanna (na) x <char-0x0db3> " ඳ - sanyaka dayanna (nda) p <char-0x0db4> " ප - alpapraana payanna (pa) P <char-0x0db5> " ඵ - mahaapraana payanna (pha) b <char-0x0db6> " බ - alpapraana bayanna (ba) B <char-0x0db7> " භ - mahaapraana bayanna (bha) m <char-0x0db8> " ම - mayanna (ma) M <char-0x0db9> " ඹ - amba bayanna (mba) y <char-0x0dba> " ය - yayanna (ya) r <char-0x0dbb> " ර - rayanna (ra) l <char-0x0dbd> " ල - dantaja layanna (la) v <char-0x0dc0> " ව - vayanna (va) S <char-0x0dc1> " ශ - taaluja sayanna (sha) <A-s> <char-0x0dc2> " ෂ - muurdhaja sayanna (ssa) s <char-0x0dc3> " ස - dantaja sayanna (sa) h <char-0x0dc4> " හ - hayanna (ha) L <char-0x0dc5> " ළ - muurdhaja layanna (lla) f <char-0x0dc6> " ෆ - fayanna (fa) <A-a> <char-0x0dca> " ් - al-lakuna <A-A> <char-0x0dcf> " ා - aela-pilla (aa) <A-w> <char-0x0dd0> " ැ - ketti aeda-pilla (ae) <A-W> <char-0x0dd1> " ෑ - diga aeda-pilla (aae) <A-i> <char-0x0dd2> " ි - ketti is-pilla (i) <A-I> <char-0x0dd3> " ී - diga is-pilla (ii) <A-u> <char-0x0dd4> " ු - ketti paa-pilla (u) <A-U> <char-0x0dd6> " ූ - diga paa-pilla (uu) <A-q> <char-0x0dd8> " ෘ - gaetta-pilla (r) <A-e> <char-0x0dd9> " ෙ - kombuva (e) <A-E> <char-0x0dda> " ේ - diga kombuva (ee) <A-f> <char-0x0ddb> " ෛ - kombu deka (ai) <A-o> <char-0x0ddc> " ො - kombuva haa aela-pilla (o) <A-O> <char-0x0ddd> " ෝ - kombuva haa diga aela-pilla (oo) <A-h> <char-0x0dde> " ෞ - kombuva haa gayanukitta (au) <A-l> <char-0x0ddf> " ෟ - gayanukitta (l) <A-Q> <char-0x0df2> " ෲ - diga gaetta-pilla (rr) <A-L> <char-0x0df3> " ෳ - diga gayanukitta (ll) <A-.> <char-0x0df4> " ෴ - kunddaliya (punctuation) R <char-0x0dca><char-0x200d><char-0x0dbb> " ්‍ර - rakaaranshaya Y <char-0x0dca><char-0x200d><char-0x0dba> " ්‍ය - yansaya <A-r> <char-0x0dbb><char-0x0dca><char-0x200d> " ර්‍ - repaya <A-,> <char-0x0dca><char-0x200d> " join - conjunct letters cons 0DCA ZWJ cons <A-/> <char-0x200d><char-0x0dca> " touch - cons ZWJ 0DCA cons <C-space> <char-0x00a0> " - no-break space. <S-space> didn't work. <A-space> <char-0x200c> " - ZWNJ. <A-space> doesn't work! ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/sinhala.vim�������������������������������������������������������������0000664�0000000�0000000�00000000132�13204015742�0020107�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Sinhala (Sri Lanka) " source <sfile>:p:h/sinhala-phonetic_utf-8.vim ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/slovak.vim��������������������������������������������������������������0000664�0000000�0000000�00000000502�13204015742�0017770�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������let encoding = &enc if encoding == 'latin1' if has("unix") let encoding = 'iso-8859-2' else let encoding = 'cp1250' endif endif if encoding == 'utf-8' source <sfile>:p:h/slovak_utf-8.vim elseif encoding == 'cp1250' source <sfile>:p:h/slovak_cp1250.vim else source <sfile>:p:h/slovak_iso-8859-2.vim endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/slovak_cp1250.vim�������������������������������������������������������0000664�0000000�0000000�00000001370�13204015742�0020766�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Peter Valach <pvalach@gmx.net> " Last Changed: 2002 Feb 3 " URL: http://www.pv2c.sk/free/sk_vimkeymap/ let b:keymap_name = "sk" loadkeymap " Z a Y - ak chcete slovensku qwerty, zakomentujte tieto styri riadky y z z y Y Z Z Y " Horny riadok ` ; 1 + ! 1 2 @ 2 3 # 3 4 $ 4 5 % 5 6 ^ 6 7 & 7 8 * 8 9 ( 9 0 ) 0 - = _ % " Klavesy okolo Enteru :) [ { / ] } ( \\ <Bar> ) ; : " ' \" ! ", , ;-) < ? ". . ;-) > : / - ? _ " Dlzne =a =A =e =E =i =I =l =L =o =O =r =R =u =U =z =Z " pre pripad omylu :) alebo slovenskej QWERTY =y =Y " Makcene +a +A +c +C +d +D +l +L +n +N +o +O +s +S +t +T +y +Y " pre pripad omylu :) alebo slovenskej QWERTY +z +Z ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/slovak_iso-8859-2.vim���������������������������������������������������0000664�0000000�0000000�00000001370�13204015742�0021420�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Peter Valach <pvalach@gmx.net> " Last Changed: 2002 Feb 3 " URL: http://www.pv2c.sk/free/sk_vimkeymap/ let b:keymap_name = "sk" loadkeymap " Z a Y - ak chcete slovensku qwerty, zakomentujte tieto styri riadky y z z y Y Z Z Y " Horny riadok ` ; 1 + ! 1 2 @ 2 3 # 3 4 $ 4 5 % 5 6 ^ 6 7 & 7 8 * 8 9 ( 9 0 ) 0 - = _ % " Klavesy okolo Enteru :) [ { / ] } ( \\ <Bar> ) ; : " ' \" ! ", , ;-) < ? ". . ;-) > : / - ? _ " Dlzne =a =A =e =E =i =I =l =L =o =O =r =R =u =U =z =Z " pre pripad omylu :) alebo slovenskej QWERTY =y =Y " Makcene +a +A +c +C +d +D +l +L +n +N +o +O +s +S +t +T +y +Y " pre pripad omylu :) alebo slovenskej QWERTY +z +Z ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/slovak_utf-8.vim��������������������������������������������������������0000664�0000000�0000000�00000001454�13204015742�0021022�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Peter Valach <pvalach@gmx.net> " Last Changed: 2002 Nov 5 " URL: http://www.pv2c.sk/free/sk_vimkeymap/ let b:keymap_name = "sk" loadkeymap " Z a Y - ak chcete slovensku qwerty, zakomentujte tieto styri riadky y z z y Y Z Z Y " Horny riadok ` ; 1 + ! 1 2 ľ @ 2 3 š # 3 4 č $ 4 5 ť % 5 6 ž ^ 6 7 ý & 7 8 á * 8 9 í ( 9 0 é ) 0 - = _ % " Klavesy okolo Enteru :) [ ú { / ] ä } ( \\ ň <Bar> ) ; ô : " ' § \" ! ", , ;-) < ? ". . ;-) > : / - ? _ " Dlzne =a á =A Á =e é =E É =i í =I Í =l ĺ =L Ĺ =o ó =O Ó =r ŕ =R Ŕ =u ú =U Ú =z ý =Z Ý " pre pripad omylu :) alebo slovenskej QWERTY =y ý =Y Ý " Makcene +a ä +A Ä +c č +C Č +d ď +D Ď +l ľ +L Ľ +n ň +N Ň +o ô +O Ô +s š +S Š +t ť +T Ť +y ž +Y Ž " pre pripad omylu :) alebo slovenskej QWERTY +z ž +Z Ž ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/tamil_tscii.vim���������������������������������������������������������0000664�0000000�0000000�00000034733�13204015742�0021007�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Keymap file for the editing Tamil language files in TSCII encoding. " " Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com) " Last updated: 2006 June 17 " " You will need a fixed width TSCII font to use this encoding. The " Avarangal TSCII fixed width font (TSC_AvarangalFxd) is used to test " this keymap. " " Visit http://www.tscii.org for more information about the TSCII " encoding. " let b:keymap_name = "tamil_tscii" loadkeymap " Uyir (Vowels) letters a <char-171> aa <char-172> A <char-172> i <char-173> ii <char-174> I <char-174> u <char-175> uu <char-176> U <char-176> e <char-177> ee <char-178> E <char-178> ai <char-179> o <char-180> oo <char-181> O <char-181> au <char-182> q <char-183> " mey (Consonants) letters k <char-236> ka <char-184> kaa <char-184><char-161> kA <char-184><char-161> ki <char-184><char-162> kii <char-184><char-163> kI <char-184><char-163> ku <char-204> kuu <char-220> kU <char-220> ke <char-166><char-184> kee <char-167><char-184> kE <char-167><char-184> kai <char-168><char-184> ko <char-166><char-184><char-161> koo <char-167><char-184><char-161> kO <char-167><char-184><char-161> kau <char-166><char-184><char-199> g <char-236> ga <char-184> gaa <char-184><char-161> gA <char-184><char-161> gi <char-184><char-162> gii <char-184><char-163> gI <char-184><char-163> gu <char-204> guu <char-220> gU <char-220> ge <char-166><char-184> gee <char-167><char-184> gE <char-167><char-184> gai <char-168><char-184> go <char-166><char-184><char-161> goo <char-167><char-184><char-161> gO <char-167><char-184><char-161> gau <char-166><char-184><char-199> ng <char-237> nga <char-185> ngaa <char-185><char-161> ngA <char-185><char-161> ngi <char-185><char-162> ngii <char-185><char-163> ngI <char-185><char-163> ngu <char-153> nguu <char-155> ngU <char-155> nge <char-166><char-185> ngee <char-167><char-185> ngE <char-167><char-185> ngai <char-168><char-185> ngo <char-166><char-185><char-161> ngoo <char-167><char-185><char-161> ngO <char-167><char-185><char-161> ngau <char-166><char-185><char-199> ch <char-238> cha <char-186> chaa <char-186><char-161> chA <char-186><char-161> chi <char-186><char-162> chii <char-186><char-163> chI <char-186><char-163> chu <char-204> chuu <char-221> chU <char-221> che <char-166><char-186> chee <char-167><char-186> chE <char-167><char-186> chai <char-168><char-186> cho <char-166><char-186><char-161> choo <char-167><char-186><char-161> chO <char-167><char-186><char-161> chau <char-166><char-186><char-199> s <char-238> sa <char-186> saa <char-186><char-161> sA <char-186><char-161> si <char-186><char-162> sii <char-186><char-163> sI <char-186><char-163> su <char-205> suu <char-221> sU <char-221> se <char-166><char-186> see <char-167><char-186> sE <char-167><char-186> sai <char-168><char-186> so <char-166><char-186><char-161> soo <char-167><char-186><char-161> sO <char-167><char-186><char-161> sau <char-166><char-186><char-199> nj <char-239> nja <char-187> njaa <char-187><char-161> njA <char-187><char-161> nji <char-187><char-162> njii <char-187><char-163> njI <char-187><char-163> nju <char-154> njuu <char-156> njU <char-156> nje <char-166><char-187> njee <char-167><char-187> njE <char-167><char-187> njai <char-168><char-187> njo <char-166><char-187><char-161> njoo <char-167><char-187><char-161> njO <char-167><char-187><char-161> njau <char-166><char-187><char-199> t <char-240> ta <char-188> taa <char-188><char-161> tA <char-188><char-161> ti <char-202> tii <char-203> tI <char-203> tu <char-206> tuu <char-222> tU <char-222> te <char-166><char-188> tee <char-167><char-188> tE <char-167><char-188> tai <char-168><char-188> to <char-166><char-188><char-161> too <char-167><char-188><char-161> tO <char-167><char-188><char-161> tau <char-166><char-188><char-199> d <char-240> da <char-188> daa <char-188><char-161> dA <char-188><char-161> di <char-202> dii <char-203> dI <char-203> du <char-206> duu <char-222> dU <char-222> de <char-166><char-188> dee <char-167><char-188> dE <char-167><char-188> dai <char-168><char-188> do <char-166><char-188><char-161> doo <char-167><char-188><char-161> dO <char-167><char-188><char-161> dau <char-166><char-188><char-199> N <char-241> Na <char-189> Naa <char-189><char-161> NA <char-189><char-161> Ni <char-189><char-162> Nii <char-189><char-163> NI <char-189><char-163> Nu <char-207> Nuu <char-223> NU <char-223> Ne <char-166><char-189> Nee <char-167><char-189> NE <char-167><char-189> Nai <char-168><char-189> No <char-166><char-189><char-161> Noo <char-167><char-189><char-161> NO <char-167><char-189><char-161> Nau <char-166><char-189><char-199> th <char-242> tha <char-190> thaa <char-190><char-161> thA <char-190><char-161> thi <char-190><char-162> thii <char-190><char-163> thI <char-190><char-163> thu <char-208> thuu <char-224> thU <char-224> the <char-166><char-190> thee <char-167><char-190> thE <char-167><char-190> thai <char-168><char-190> tho <char-166><char-190><char-161> thoo <char-167><char-190><char-161> thO <char-167><char-190><char-161> thau <char-166><char-190><char-199> w <char-243> wa <char-191> waa <char-191><char-161> wA <char-191><char-161> wi <char-191><char-162> wii <char-191><char-163> wI <char-191><char-163> wu <char-209> wuu <char-225> wU <char-225> we <char-166><char-191> wee <char-167><char-191> wE <char-167><char-191> wai <char-168><char-191> wo <char-166><char-191><char-161> woo <char-167><char-191><char-161> wO <char-167><char-191><char-161> wau <char-166><char-191><char-199> n- <char-243> n-a <char-191> n-aa <char-191><char-161> n-A <char-191><char-161> n-i <char-191><char-162> n-ii <char-191><char-163> n-I <char-191><char-163> n-u <char-209> n-uu <char-225> n-U <char-225> n-e <char-166><char-191> n-ee <char-167><char-191> n-E <char-167><char-191> n-ai <char-168><char-191> n-o <char-166><char-191><char-161> n-oo <char-167><char-191><char-161> n-O <char-167><char-191><char-161> n-au <char-166><char-191><char-199> p <char-244> pa <char-192> paa <char-192><char-161> pA <char-192><char-161> pi <char-192><char-162> pii <char-192><char-163> pI <char-192><char-163> pu <char-210> puu <char-226> pU <char-226> pe <char-166><char-192> pee <char-167><char-192> pE <char-167><char-192> pai <char-168><char-192> po <char-166><char-192><char-161> poo <char-167><char-192><char-161> pO <char-167><char-192><char-161> pau <char-166><char-192><char-199> b <char-244> ba <char-192> baa <char-192><char-161> bA <char-192><char-161> bi <char-192><char-162> bii <char-192><char-163> bI <char-192><char-163> bu <char-210> buu <char-226> bU <char-226> be <char-166><char-192> bee <char-167><char-192> bE <char-167><char-192> bai <char-168><char-192> bo <char-166><char-192><char-161> boo <char-167><char-192><char-161> bO <char-167><char-192><char-161> bau <char-166><char-192><char-199> m <char-245> ma <char-193> maa <char-193><char-161> mA <char-193><char-161> mi <char-193><char-162> mii <char-193><char-163> mI <char-193><char-163> mu <char-211> muu <char-227> mU <char-227> me <char-166><char-193> mee <char-167><char-193> mE <char-167><char-193> mai <char-168><char-193> mo <char-166><char-193><char-161> moo <char-167><char-193><char-161> mO <char-167><char-193><char-161> mau <char-166><char-193><char-199> y <char-246> ya <char-194> yaa <char-194><char-161> yA <char-194><char-161> yi <char-194><char-162> yii <char-194><char-163> yI <char-194><char-163> yu <char-212> yuu <char-228> yU <char-228> ye <char-166><char-194> yee <char-167><char-194> yE <char-167><char-194> yai <char-168><char-194> yo <char-166><char-194><char-161> yoo <char-167><char-194><char-161> yO <char-167><char-194><char-161> yau <char-166><char-194><char-199> r <char-247> ra <char-195> raa <char-195><char-161> rA <char-195><char-161> ri <char-195><char-162> rii <char-195><char-163> rI <char-195><char-163> ru <char-213> ruu <char-229> rU <char-229> re <char-166><char-195> ree <char-167><char-195> rE <char-167><char-195> rai <char-168><char-195> ro <char-166><char-195><char-161> roo <char-167><char-195><char-161> rO <char-167><char-195><char-161> rau <char-166><char-195><char-199> l <char-248> la <char-196> laa <char-196><char-161> lA <char-196><char-161> li <char-196><char-162> lii <char-196><char-163> lI <char-196><char-163> lu <char-214> luu <char-230> lU <char-230> le <char-166><char-196> lee <char-167><char-196> lE <char-167><char-196> lai <char-168><char-196> lo <char-166><char-196><char-161> loo <char-167><char-196><char-161> lO <char-167><char-196><char-161> lau <char-166><char-196><char-199> v <char-249> va <char-197> vaa <char-197><char-161> vA <char-197><char-161> vi <char-197><char-162> vii <char-197><char-163> vI <char-197><char-163> vu <char-215> vuu <char-231> vU <char-231> ve <char-166><char-197> vee <char-167><char-197> vE <char-167><char-197> vai <char-168><char-197> vo <char-166><char-197><char-161> voo <char-167><char-197><char-161> vO <char-167><char-197><char-161> vau <char-166><char-197><char-199> z <char-250> za <char-198> zaa <char-198><char-161> zA <char-198><char-161> zi <char-198><char-162> zii <char-198><char-163> zI <char-198><char-163> zu <char-216> zuu <char-232> zU <char-232> ze <char-166><char-198> zee <char-167><char-198> zE <char-167><char-198> zai <char-168><char-198> zo <char-166><char-198><char-161> zoo <char-167><char-198><char-161> zO <char-167><char-198><char-161> zau <char-166><char-198><char-199> L <char-251> La <char-199> Laa <char-199><char-161> LA <char-199><char-161> Li <char-199><char-162> Lii <char-199><char-163> LI <char-199><char-163> Lu <char-217> Luu <char-233> LU <char-233> Le <char-166><char-199> Lee <char-167><char-199> LE <char-167><char-199> Lai <char-168><char-199> Lo <char-166><char-199><char-161> Loo <char-167><char-199><char-161> LO <char-167><char-199><char-161> Lau <char-166><char-199><char-199> R <char-252> Ra <char-200> Raa <char-200><char-161> RA <char-200><char-161> Ri <char-200><char-162> Rii <char-200><char-163> RI <char-200><char-163> Ru <char-218> Ruu <char-234> RU <char-234> Re <char-166><char-200> Ree <char-167><char-200> RE <char-167><char-200> Rai <char-168><char-200> Ro <char-166><char-200><char-161> Roo <char-167><char-200><char-161> RO <char-167><char-200><char-161> Rau <char-166><char-200><char-199> n <char-253> na <char-201> naa <char-201><char-161> nA <char-201><char-161> ni <char-201><char-162> nii <char-201><char-163> nI <char-201><char-163> nu <char-219> nuu <char-235> nU <char-235> ne <char-166><char-201> nee <char-167><char-201> nE <char-167><char-201> nai <char-168><char-201> no <char-166><char-201><char-161> noo <char-167><char-201><char-161> nO <char-167><char-201><char-161> nau <char-166><char-201><char-199> " Grantha letters j <char-136> ja <char-131> jaa <char-131><char-161> jA <char-131><char-161> ji <char-131><char-162> jii <char-131><char-163> jI <char-131><char-163> ju <char-131><char-164> juu <char-131><char-164> jU <char-131><char-165> je <char-166><char-131> jee <char-167><char-131> jE <char-167><char-131> jai <char-168><char-131> jo <char-166><char-131><char-161> joo <char-167><char-131><char-161> jO <char-167><char-131><char-161> jau <char-166><char-131><char-199> sh <char-137> sha <char-132> shaa <char-132><char-161> shA <char-132><char-161> shi <char-132><char-162> shii <char-132><char-163> shI <char-132><char-163> shu <char-131><char-164> shuu <char-131><char-164> shU <char-131><char-165> she <char-166><char-132> shee <char-167><char-132> shE <char-167><char-132> shai <char-168><char-132> sho <char-166><char-132><char-161> shoo <char-167><char-132><char-161> shO <char-167><char-132><char-161> shau <char-166><char-132><char-199> S <char-138> Sa <char-133> Saa <char-133><char-161> SA <char-133><char-161> Si <char-133><char-162> Sii <char-133><char-163> SI <char-133><char-163> Su <char-133><char-164> Suu <char-133><char-165> SU <char-133><char-165> Se <char-166><char-133> See <char-167><char-133> SE <char-167><char-133> Sai <char-168><char-133> So <char-166><char-133><char-161> Soo <char-167><char-133><char-161> SO <char-167><char-133><char-161> Sau <char-166><char-133><char-199> h <char-139> ha <char-134> haa <char-134><char-161> hA <char-134><char-161> hi <char-134><char-162> hii <char-134><char-163> hI <char-134><char-163> hu <char-134><char-164> huu <char-134><char-165> hU <char-134><char-165> he <char-166><char-134> hee <char-167><char-134> hE <char-167><char-134> hai <char-168><char-134> ho <char-166><char-134><char-161> hoo <char-167><char-134><char-161> hO <char-167><char-134><char-161> hau <char-166><char-134><char-199> x <char-140> xa <char-135> xaa <char-135><char-161> xA <char-135><char-161> xi <char-135><char-162> xii <char-135><char-163> xI <char-135><char-163> xu <char-135><char-164> xuu <char-135><char-165> xU <char-135><char-165> xe <char-166><char-135> xee <char-167><char-135> xE <char-167><char-135> xai <char-168><char-135> xo <char-166><char-135><char-161> xoo <char-167><char-135><char-161> xO <char-167><char-135><char-161> xau <char-166><char-135><char-199> sri <char-130> �������������������������������������neovim-0.2.2/runtime/keymap/thaana-phonetic_utf-8.vim�����������������������������������������������0000664�0000000�0000000�00000005406�13204015742�0022567�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" thaana keymap " Maintainer: Ibrahim fayaz <p h a y a x at gmail dot com> " please set enc to utf-8 " thaana phonetic keyboard is used as a reference " http://www.mcst.gov.mv/News_and_Events/xpfonts.htm " changelog: 18th Feb 2006 - came up the initial idea of writing the keymap.. " 13th May 2006 - made some few corrections regarding < and >.. let b:keymap_name= "thaana" " THAANA NORMAL LETTERS loadkeymap h <char-0x0780> "letter haa S <char-0x0781> "shaviani n <char-0x0782> "noonu r <char-0x0783> "raa b <char-0x0784> "baa L <char-0x0785> "lhaviani k <char-0x0786> "kaafu w <char-0x0787> "alifu v <char-0x0788> "vaavu m <char-0x0789> "meemu f <char-0x078A> "faafu d <char-0x078B> "dhaalu t <char-0x078C> "thaa l <char-0x078D> "laamu g <char-0x078E> "gaafu N <char-0x078F> "gnaviani s <char-0x0790> "seenu D <char-0x0791> "daviani z <char-0x0792> "zaviani T <char-0x0793> "taviani y <char-0x0794> "yaa p <char-0x0795> "paviani j <char-0x0796> "javiani c <char-0x0797> "chaviani "THAANA DOTTED LETTERS X <char-0x0798> "TTAA (thaa mathee thin thiki) H <char-0x0799> "HHAA (haa thiree ehthiki) K <char-0x079A> "KHAA (haa mathee ehthiki) J <char-0x079B> "THAALU (dhaa mathee ehthiki) R <char-0x079C> "ZAA (raa mathee ehthiki) C <char-0x079D> "SHEENU (seenu mathee thinthiki) M <char-0x079E> "SAADHU (seenu thiree ehthiki) B <char-0x079F> "DHAADHU(seenu mathee ehthiki) Y <char-0x07A0> "TO (thaa thiree ehthiki) Z <char-0x07A1> "ZO (thaa mathee ehthiki) W <char-0x07A2> "AINU (alifu thiree ehthiki) G <char-0x07A3> "GHAINU (alifu mathee ehthiki) Q <char-0x07A4> "QAAFU (gaafu mathee dhethkiki) V <char-0x07A5> "VAAVU (vaavu mathee ehthiki) "THAANA FILI (combining characters) a <char-0x07A6> "abafili A <char-0x07A7> "aabaafili i <char-0x07A8> "ibifili I <char-0x07A9> "eebeefili u <char-0x07AA> "ubufili U <char-0x07AB> "ooboofili e <char-0x07AC> "ebefili E <char-0x07AD> "ebeyfili o <char-0x07AE> "obofili O <char-0x07AF> "oaboafili q <char-0x07B0> "sukun "OTHER THAANA RELATED F <char-0xFDF2> "arabic ligature allah isolated form ? <char-0x061F> "arabic question mark "~ <char-0xFDFD> "arabic -bismillah ahrahman araheem- not in phonetic keyboard, thats why commented [ <char-0x005D> "english open bracket is thaana closing bracket ] <char-0x005B> "english close bracket = thaana open bracket { <char-0x007B> "braces reversed } <char-0x007D> x <char-0x00D7> " x for multiplication sign.. P <char-0x00F7> " division symbol mapped to 'p' > <char-0x003C> < <char-0x003E> <M-v> <char-0x200D> "zwj - ZERO WIDTH JOINER i dont know how to use these yet.. <M-b> <char-0x200C> "zwnj - ZERO WIDTH NON JOINER <M-n> <char-0x200E> "lrm - LEFT TO RIGHT MARK <M-m> <char-0x200F> "rlm - RIGHT TO LEFT MARK ; <char-0x061B> "arabic semicolon , <char-0x060C> "arabic coma <M-;> ; <M-,> , ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/thaana.vim��������������������������������������������������������������0000664�0000000�0000000�00000000107�13204015742�0017726�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������if &enc == 'utf-8' source <sfile>:p:h/thaana-phonetic_utf-8.vim endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/ukrainian-dvorak.vim����������������������������������������������������0000664�0000000�0000000�00000005264�13204015742�0021750�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for ukrainian characters, layout 'dvorak', " MS Windows variant " Derived from ukrainian-jcuken.vim by Anatoli Sakhnik <sakhnik@gmail.com> " Useful mainly with utf-8 but may work with other encodings " Maintainer: Serhiy Boiko <cris.kiev@gmail.com> " Last Changed: 2007 Jun 29 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "uk" loadkeymap ~ ~ CYRILLIC CAPITAL LETTER IO ` ' CYRILLIC SMALL LETTER IO U А CYRILLIC CAPITAL LETTER A W Б CYRILLIC CAPITAL LETTER BE E В CYRILLIC CAPITAL LETTER VE G Г CYRILLIC CAPITAL LETTER GHE N Д CYRILLIC CAPITAL LETTER DE Y Е CYRILLIC CAPITAL LETTER IE S Ж CYRILLIC CAPITAL LETTER ZHE L З CYRILLIC CAPITAL LETTER ZE X И CYRILLIC CAPITAL LETTER I \" Й CYRILLIC CAPITAL LETTER SHORT I P К CYRILLIC CAPITAL LETTER KA T Л CYRILLIC CAPITAL LETTER EL K М CYRILLIC CAPITAL LETTER EM F Н CYRILLIC CAPITAL LETTER EN H О CYRILLIC CAPITAL LETTER O I П CYRILLIC CAPITAL LETTER PE D Р CYRILLIC CAPITAL LETTER ER J С CYRILLIC CAPITAL LETTER ES B Т CYRILLIC CAPITAL LETTER TE > У CYRILLIC CAPITAL LETTER U A Ф CYRILLIC CAPITAL LETTER EF ? Х CYRILLIC CAPITAL LETTER HA < Ц CYRILLIC CAPITAL LETTER TSE Q Ч CYRILLIC CAPITAL LETTER CHE C Ш CYRILLIC CAPITAL LETTER SHA R Щ CYRILLIC CAPITAL LETTER SHCHA + Ї CYRILLIC CAPITAL LETTER YI O І CYRILLIC CAPITAL LETTER BYELORUSSION-UKRAINIAN I M Ь CYRILLIC CAPITAL LETTER SOFT SIGN _ Є CYRILLIC CAPITAL LETTER UKRAINIAN IE V Ю CYRILLIC CAPITAL LETTER YU : Я CYRILLIC CAPITAL LETTER YA | Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN u а CYRILLIC SMALL LETTER A w б CYRILLIC SMALL LETTER BE e в CYRILLIC SMALL LETTER VE g г CYRILLIC SMALL LETTER GHE n д CYRILLIC SMALL LETTER DE y е CYRILLIC SMALL LETTER IE s ж CYRILLIC SMALL LETTER ZHE l з CYRILLIC SMALL LETTER ZE x и CYRILLIC SMALL LETTER I ' й CYRILLIC SMALL LETTER SHORT I p к CYRILLIC SMALL LETTER KA t л CYRILLIC SMALL LETTER EL k м CYRILLIC SMALL LETTER EM f н CYRILLIC SMALL LETTER EN h о CYRILLIC SMALL LETTER O i п CYRILLIC SMALL LETTER PE d р CYRILLIC SMALL LETTER ER j с CYRILLIC SMALL LETTER ES b т CYRILLIC SMALL LETTER TE . у CYRILLIC SMALL LETTER U a ф CYRILLIC SMALL LETTER EF / х CYRILLIC SMALL LETTER HA , ц CYRILLIC SMALL LETTER TSE q ч CYRILLIC SMALL LETTER CHE c ш CYRILLIC SMALL LETTER SHA r щ CYRILLIC SMALL LETTER SHCHA = ї CYRILLIC SMALL LETTER YI o і CYRILLIC SMALL LETTER BYELORUSSION-UKRAINIAN I m ь CYRILLIC SMALL LETTER SOFT SIGN - є CYRILLIC SMALL LETTER UKRAINIAN IE v ю CYRILLIC SMALL LETTER YU ; я CYRILLIC SMALL LETTER YA \\ ґ CYRILLIC SMALL LETTER GHE WITH UPTURN @ " # № NUMERO SIGN $ ; ^ : & ? z . Z , [ - ] = ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/ukrainian-jcuken.vim����������������������������������������������������0000664�0000000�0000000�00000005262�13204015742�0021737�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for ukrainian characters, layout 'jcuken', classical variant " (compatible with XFree86 'uk' keymap) " Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru> " Useful mainly with utf-8 but may work with other encodings " Maintainer: Anatoli Sakhnik <sakhnik@gmail.com> " Last Changed: 2007 Nov 11 " All characters are given literally, conversion to another encoding (e.g., " UTF-8) should work. scriptencoding utf-8 let b:keymap_name = "uk" loadkeymap ~ ~ ` ' F А CYRILLIC CAPITAL LETTER A < Б CYRILLIC CAPITAL LETTER BE D В CYRILLIC CAPITAL LETTER VE U Г CYRILLIC CAPITAL LETTER GHE L Д CYRILLIC CAPITAL LETTER DE T Е CYRILLIC CAPITAL LETTER IE : Ж CYRILLIC CAPITAL LETTER ZHE P З CYRILLIC CAPITAL LETTER ZE B И CYRILLIC CAPITAL LETTER I Q Й CYRILLIC CAPITAL LETTER SHORT I R К CYRILLIC CAPITAL LETTER KA K Л CYRILLIC CAPITAL LETTER EL V М CYRILLIC CAPITAL LETTER EM Y Н CYRILLIC CAPITAL LETTER EN J О CYRILLIC CAPITAL LETTER O G П CYRILLIC CAPITAL LETTER PE H Р CYRILLIC CAPITAL LETTER ER C С CYRILLIC CAPITAL LETTER ES N Т CYRILLIC CAPITAL LETTER TE E У CYRILLIC CAPITAL LETTER U A Ф CYRILLIC CAPITAL LETTER EF { Х CYRILLIC CAPITAL LETTER HA W Ц CYRILLIC CAPITAL LETTER TSE X Ч CYRILLIC CAPITAL LETTER CHE I Ш CYRILLIC CAPITAL LETTER SHA O Щ CYRILLIC CAPITAL LETTER SHCHA } Ї CYRILLIC CAPITAL LETTER YI S І CYRILLIC CAPITAL LETTER BYELORUSSION-UKRAINIAN I M Ь CYRILLIC CAPITAL LETTER SOFT SIGN \" Є CYRILLIC CAPITAL LETTER UKRAINIAN IE > Ю CYRILLIC CAPITAL LETTER YU Z Я CYRILLIC CAPITAL LETTER YA | Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN f а CYRILLIC SMALL LETTER A , б CYRILLIC SMALL LETTER BE d в CYRILLIC SMALL LETTER VE u г CYRILLIC SMALL LETTER GHE l д CYRILLIC SMALL LETTER DE t е CYRILLIC SMALL LETTER IE ; ж CYRILLIC SMALL LETTER ZHE p з CYRILLIC SMALL LETTER ZE b и CYRILLIC SMALL LETTER I q й CYRILLIC SMALL LETTER SHORT I r к CYRILLIC SMALL LETTER KA k л CYRILLIC SMALL LETTER EL v м CYRILLIC SMALL LETTER EM y н CYRILLIC SMALL LETTER EN j о CYRILLIC SMALL LETTER O g п CYRILLIC SMALL LETTER PE h р CYRILLIC SMALL LETTER ER c с CYRILLIC SMALL LETTER ES n т CYRILLIC SMALL LETTER TE e у CYRILLIC SMALL LETTER U a ф CYRILLIC SMALL LETTER EF [ х CYRILLIC SMALL LETTER HA w ц CYRILLIC SMALL LETTER TSE x ч CYRILLIC SMALL LETTER CHE i ш CYRILLIC SMALL LETTER SHA o щ CYRILLIC SMALL LETTER SHCHA ] ї CYRILLIC SMALL LETTER YI s і CYRILLIC SMALL LETTER BYELORUSSION-UKRAINIAN I m ь CYRILLIC SMALL LETTER SOFT SIGN ' є CYRILLIC SMALL LETTER UKRAINIAN IE . ю CYRILLIC SMALL LETTER YU z я CYRILLIC SMALL LETTER YA \\ ґ CYRILLIC SMALL LETTER GHE WITH UPTURN @ " # ' $ * % : ^ , & . * ; ~ ~ ~~ <char-0x301> Stress ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/vietnamese-telex_utf-8.vim����������������������������������������������0000664�0000000�0000000�00000002515�13204015742�0023001�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Vietnamese through Telex method " Maintainer: Raphael McSinyx <vn.mcsinyx@gmail.com> " Last Change: 2016-06-13 scriptencoding utf-8 let b:keymap_name = "vi" loadkeymap A\\ A AF À AS Á AR Ả AX à AJ Ạ AW Ă AW\\ Ă AWF Ằ AWS Ắ AWR Ẳ AWX Ẵ AWJ Ặ AA  AA\\  AAF Ầ AAS Ấ AAR Ẩ AAX Ẫ AAJ Ậ D\\ D DD Đ E E E\\ E EF È ES É ER Ẻ EX Ẽ EJ Ẹ EE Ê EE\\ Ê EEF Ề EES Ế EER Ể EEX Ễ EEJ Ệ I\\ I IF Ì IS Í IR Ỉ IX Ĩ IJ Ị O\\ O OF Ò OS Ó OR Ỏ OX Õ OJ Ọ OO Ô OO\\ Ô OOF Ồ OOS Ố OOR Ổ OOX Ỗ OOJ Ộ OW Ơ OW\\ Ơ OWF Ờ OWS Ớ OWR Ở OWX Ỡ OWJ Ợ U\\ U UF Ù US Ú UR Ủ UX Ũ UJ Ụ UW Ư UW\\ Ư UWF Ừ UWS Ứ UWR Ử UWX Ữ UWJ Ự Y\\ Y YF Ỳ YS Ý YR Ỷ YX Ỹ YJ Ỵ a\\ a af à as á ar ả ax ã aj ạ aw ă aw\\ ă awf ằ aws ắ awr ẳ awx ẵ awj ặ aa â aa\\ â aaf ầ aas ấ aar ẩ aax ẫ aaj ậ d\\ d dd đ e\\ e ef è es é er ẻ ex ẽ ej ẹ ee ê ee\\ ê eef ề ees ế eer ể eex ễ eej ệ i\\ i if ì is í ir ỉ ix ĩ ij ị o\\ o of ò os ó or ỏ ox õ oj ọ oo ô oo\\ ô oof ồ oos ố oor ổ oox ỗ ooj ộ ow ơ ow\\ ơ owf ờ ows ớ owr ở owx ỡ owj ợ u\\ u uf ù us ú ur ủ ux ũ uj ụ uw ư uw\\ ư uwf ừ uws ứ uwr ử uwx ữ uwj ự y\\ y yf ỳ ys ý yr ỷ yx ỹ yj ỵ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/vietnamese-viqr_utf-8.vim�����������������������������������������������0000664�0000000�0000000�00000002337�13204015742�0022643�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for vietnamese through the usual viqr method " Maintainer: Samuel Thibault <samuel.thibault@ens-lyon.org> " Last Change: 2006 Jun 17 scriptencoding utf-8 let b:keymap_name = "vietnamese" loadkeymap a a A A a` à A` À a? ả A? Ả a~ ã A~ à a' á A' Á a. ạ A. Ạ a( ă A( Ă a(` ằ A(` Ằ a(? ẳ A(? Ẳ a(~ ẵ A(~ Ẵ a(' ắ A(' Ắ a(. ặ A(. Ặ a^ â A^  a^` ầ A^` Ầ a^? ẩ A^? Ẩ a^~ ẫ A^~ Ẫ a^' ấ A^' Ấ a^. ậ A^. Ậ d d D D dd đ Dd Đ DD Đ e e E E e` è E` È e? ẻ E? Ẻ e~ ẽ E~ Ẽ e' é E' É e. ẹ E. Ẹ e^ ê E^ Ê e^` ề E^` Ề e^? ể E^? Ể e^~ ễ E^~ Ễ e^' ế E^' Ế e^. ệ E^. Ệ i i I I i` ì I` Ì i? ỉ I? Ỉ i~ ĩ I~ Ĩ i' í I' Í i. ị I. Ị o o O O o` ò O` Ò o? ỏ O? Ỏ o~ õ O~ Õ o' ó O' Ó o. ọ O. Ọ o^ ô O^ Ô o^` ồ O^` Ồ o^? ổ O^? Ổ o^~ ỗ O^~ Ỗ o^' ố O^' Ố o^. ộ O^. Ộ o+ ơ O+ Ơ o+` ờ O+` Ờ o+? ở O+? Ở o+~ ỡ O+~ Ỡ o+' ớ O+' Ớ o+. ợ O+. Ợ u u U U u` ù U` Ù u? ủ U? Ủ u~ ũ U~ Ũ u' ú U' Ú u. ụ U. Ụ u+ ư U+ Ư u+` ừ U+` Ừ u+? ử U+? Ử u+~ ữ U+~ Ữ u+' ứ U+' Ứ u+. ự U+. Ự y y Y Y y` ỳ Y` Ỳ y? ỷ Y? Ỷ y~ ỹ Y~ Ỹ y' ý Y' Ý y. ỵ Y. Ỵ \\d d \\D D �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/keymap/vietnamese-vni_utf-8.vim������������������������������������������������0000664�0000000�0000000�00000002513�13204015742�0022452�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Keymap file for Vietnamese through VNI method " Maintainer: Raphael McSinyx <vn.mcsinyx@gmail.com> " Last Change: 2016-06-13 scriptencoding utf-8 let b:keymap_name = "vi" loadkeymap A\\ A A1 Á A2 À A3 Ả A4 à A5 Ạ A8 Ă A8\\ Ă A81 Ắ A82 Ằ A83 Ẳ A84 Ẵ A85 Ặ A6  A6\\  A61 Ấ A62 Ầ A63 Ẩ A64 Ẫ A65 Ậ D D D\\ D D9 Đ E\\ E E1 É E2 È E3 Ẻ E4 Ẽ E5 Ẹ E6 Ê E6\\ Ê E61 Ế E62 Ề E63 Ể E64 Ễ E65 Ệ I\\ I I1 Í I2 Ì I3 Ỉ I4 Ĩ I5 Ị O\\ O O1 Ó O2 Ò O3 Ỏ O4 Õ O5 Ọ O6 Ô O6\\ Ô O61 Ố O62 Ồ O63 Ổ O64 Ỗ O65 Ộ O7 Ơ O7\\ Ơ O71 Ớ O72 Ờ O73 Ở O74 Ỡ O75 Ợ U\\ U U1 Ú U2 Ù U3 Ủ U4 Ũ U5 Ụ U7 Ư U7\\ Ư U71 Ứ U72 Ừ U73 Ử U74 Ữ U75 Ự Y\\ Y Y1 Ý Y2 Ỳ Y3 Ỷ Y4 Ỹ Y5 Ỵ a\\ a a1 á a2 à a3 ả a4 ã a5 ạ a8 ă a8\\ ă a81 ắ a82 ằ a83 ẳ a84 ẵ a85 ặ a6 â a6\\ â a61 ấ a62 ầ a63 ẩ a64 ẫ a65 ậ d\\ d d9 đ e\\ e e1 é e2 è e3 ẻ e4 ẽ e5 ẹ e6 ê e6\\ ê e61 ế e62 ề e63 ể e64 ễ e65 ệ i\\ i i1 í i2 ì i3 ỉ i4 ĩ i5 ị o\\ o o1 ó o2 ò o3 ỏ o4 õ o5 ọ o6 ô o6\\ ô o61 ố o62 ồ o63 ổ o64 ỗ o65 ộ o7 ơ o7\\ ơ o71 ớ o72 ờ o73 ở o74 ỡ o75 ợ u\\ u u1 ú u2 ù u3 ủ u4 ũ u5 ụ u7 ư u7\\ ư u71 ứ u72 ừ u73 ử u74 ữ u75 ự y\\ y y1 ý y2 ỳ y3 ỷ y4 ỹ y5 ỵ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/macmap.vim���������������������������������������������������������������������0000664�0000000�0000000�00000004576�13204015742�0016460�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" System gvimrc file for Mac OS X " Author: Benji Fisher <benji@member.AMS.org> " Last Change: Thu Mar 09 09:00 AM 2006 EST " " Define Mac-standard keyboard shortcuts. " We don't change 'cpoptions' here, because it would not be set properly when " a .vimrc file is found later. Thus don't use line continuation and use " <special> in mappings. nnoremap <special> <D-n> :confirm enew<CR> vmap <special> <D-n> <Esc><D-n>gv imap <special> <D-n> <C-O><D-n> cmap <special> <D-n> <C-C><D-n> omap <special> <D-n> <Esc><D-n> nnoremap <special> <D-o> :browse confirm e<CR> vmap <special> <D-o> <Esc><D-o>gv imap <special> <D-o> <C-O><D-o> cmap <special> <D-o> <C-C><D-o> omap <special> <D-o> <Esc><D-o> nnoremap <silent> <special> <D-w> :if winheight(2) < 0 <Bar> confirm enew <Bar> else <Bar> confirm close <Bar> endif<CR> vmap <special> <D-w> <Esc><D-w>gv imap <special> <D-w> <C-O><D-w> cmap <special> <D-w> <C-C><D-w> omap <special> <D-w> <Esc><D-w> nnoremap <silent> <special> <D-s> :if expand("%") == ""<Bar>browse confirm w<Bar> else<Bar>confirm w<Bar>endif<CR> vmap <special> <D-s> <Esc><D-s>gv imap <special> <D-s> <C-O><D-s> cmap <special> <D-s> <C-C><D-s> omap <special> <D-s> <Esc><D-s> nnoremap <special> <D-S-s> :browse confirm saveas<CR> vmap <special> <D-S-s> <Esc><D-s>gv imap <special> <D-S-s> <C-O><D-s> cmap <special> <D-S-s> <C-C><D-s> omap <special> <D-S-s> <Esc><D-s> " From the Edit menu of SimpleText: nnoremap <special> <D-z> u vmap <special> <D-z> <Esc><D-z>gv imap <special> <D-z> <C-O><D-z> cmap <special> <D-z> <C-C><D-z> omap <special> <D-z> <Esc><D-z> vnoremap <special> <D-x> "+x vnoremap <special> <D-c> "+y cnoremap <special> <D-c> <C-Y> nnoremap <special> <D-v> "+gP cnoremap <special> <D-v> <C-R>+ execute 'vnoremap <script> <special> <D-v>' paste#paste_cmd['v'] execute 'inoremap <script> <special> <D-v>' paste#paste_cmd['i'] nnoremap <silent> <special> <D-a> :if &slm != ""<Bar>exe ":norm gggH<C-O>G"<Bar> else<Bar>exe ":norm ggVG"<Bar>endif<CR> vmap <special> <D-a> <Esc><D-a> imap <special> <D-a> <Esc><D-a> cmap <special> <D-a> <C-C><D-a> omap <special> <D-a> <Esc><D-a> nnoremap <special> <D-f> / vmap <special> <D-f> <Esc><D-f> imap <special> <D-f> <Esc><D-f> cmap <special> <D-f> <C-C><D-f> omap <special> <D-f> <Esc><D-f> nnoremap <special> <D-g> n vmap <special> <D-g> <Esc><D-g> imap <special> <D-g> <C-O><D-g> cmap <special> <D-g> <C-C><D-g> omap <special> <D-g> <Esc><D-g> ����������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/macros/������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0015755�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/macros/editexisting.vim��������������������������������������������������������0000664�0000000�0000000�00000007172�13204015742�0021201�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim Plugin: Edit the file with an existing Vim if possible " Maintainer: Bram Moolenaar " Last Change: 2014 Dec 06 " This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32) " $VIM/vimfiles/plugin directory. Or make a symbolic link, so that you " automatically use the latest version. " This plugin serves two purposes: " 1. On startup, if we were invoked with one file name argument and the file " is not modified then try to find another Vim instance that is editing " this file. If there is one then bring it to the foreground and exit. " 2. When a file is edited and a swap file exists for it, try finding that " other Vim and bring it to the foreground. Requires Vim 7, because it " uses the SwapExists autocommand event. if v:version < 700 finish endif " Function that finds the Vim instance that is editing "filename" and brings " it to the foreground. func s:EditElsewhere(filename) let fname_esc = substitute(a:filename, "'", "''", "g") let servers = serverlist() while servers != '' " Get next server name in "servername"; remove it from "servers". let i = match(servers, "\n") if i == -1 let servername = servers let servers = '' else let servername = strpart(servers, 0, i) let servers = strpart(servers, i + 1) endif " Skip ourselves. if servername ==? v:servername continue endif " Check if this server is editing our file. if remote_expr(servername, "bufloaded('" . fname_esc . "')") " Yes, bring it to the foreground. if has("win32") call remote_foreground(servername) endif call remote_expr(servername, "foreground()") if remote_expr(servername, "exists('*EditExisting')") " Make sure the file is visible in a window (not hidden). " If v:swapcommand exists and is set, send it to the server. if exists("v:swapcommand") let c = substitute(v:swapcommand, "'", "''", "g") call remote_expr(servername, "EditExisting('" . fname_esc . "', '" . c . "')") else call remote_expr(servername, "EditExisting('" . fname_esc . "', '')") endif endif if !(has('vim_starting') && has('gui_running') && has('gui_win32')) " Tell the user what is happening. Not when the GUI is starting " though, it would result in a message box. echomsg "File is being edited by " . servername sleep 2 endif return 'q' endif endwhile return '' endfunc " When the plugin is loaded and there is one file name argument: Find another " Vim server that is editing this file right now. if argc() == 1 && !&modified if s:EditElsewhere(expand("%:p")) == 'q' quit endif endif " Setup for handling the situation that an existing swap file is found. try au! SwapExists * let v:swapchoice = s:EditElsewhere(expand("<afile>:p")) catch " Without SwapExists we don't do anything for ":edit" commands endtry " Function used on the server to make the file visible and possibly execute a " command. func! EditExisting(fname, command) " Get the window number of the file in the current tab page. let winnr = bufwinnr(a:fname) if winnr <= 0 " Not found, look in other tab pages. let bufnr = bufnr(a:fname) for i in range(tabpagenr('$')) if index(tabpagebuflist(i + 1), bufnr) >= 0 " Make this tab page the current one and find the window number. exe 'tabnext ' . (i + 1) let winnr = bufwinnr(a:fname) break endif endfor endif if winnr > 0 exe winnr . "wincmd w" elseif exists('*fnameescape') exe "split " . fnameescape(a:fname) else exe "split " . escape(a:fname, " \t\n*?[{`$\\%#'\"|!<") endif if a:command != '' exe "normal! " . a:command endif redraw endfunc ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/macros/justify.vim�������������������������������������������������������������0000664�0000000�0000000�00000000155�13204015742�0020170�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Load the justify package. " For those users who were loading the justify plugin from here. packadd justify �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/macros/less.bat����������������������������������������������������������������0000664�0000000�0000000�00000000442�13204015742�0017413�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@echo off rem batch file to start Vim with less.vim. rem Read stdin if no arguments were given. rem Written by Ken Takata. if "%1"=="" ( nvim --cmd "let no_plugin_maps = 1" -c "runtime! macros/less.vim" - ) else ( nvim --cmd "let no_plugin_maps = 1" -c "runtime! macros/less.vim" %* ) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/macros/less.sh�����������������������������������������������������������������0000775�0000000�0000000�00000001116�13204015742�0017261�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Shell script to start Vim with less.vim. # Read stdin if no arguments were given and stdin was redirected. if test -t 1; then if test $# = 0; then if test -t 0; then echo "Missing filename" 1>&2 exit fi nvim --cmd 'let no_plugin_maps = 1' -c 'runtime! macros/less.vim' - else nvim --cmd 'let no_plugin_maps = 1' -c 'runtime! macros/less.vim' "$@" fi else # Output is not a terminal, cat arguments or stdin if test $# = 0; then if test -t 0; then echo "Missing filename" 1>&2 exit fi cat else cat "$@" fi fi ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/macros/less.vim����������������������������������������������������������������0000664�0000000�0000000�00000012675�13204015742�0017453�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim script to work like "less" " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2017 Mar 31 " Avoid loading this file twice, allow the user to define his own script. if exists("loaded_less") finish endif let loaded_less = 1 " If not reading from stdin, skip files that can't be read. " Exit if there is no file at all. if argc() > 0 let s:i = 0 while 1 if filereadable(argv(s:i)) if s:i != 0 sleep 3 endif break endif if isdirectory(argv(s:i)) echomsg "Skipping directory " . argv(s:i) elseif getftime(argv(s:i)) < 0 echomsg "Skipping non-existing file " . argv(s:i) else echomsg "Skipping unreadable file " . argv(s:i) endif echo "\n" let s:i = s:i + 1 if s:i == argc() quit endif next endwhile endif set nocp syntax on set so=0 set hlsearch set incsearch nohlsearch " Don't remember file names and positions set shada= set nows " Inhibit screen updates while searching let s:lz = &lz set lz " Allow the user to define a function, which can set options specifically for " this script. if exists('*LessInitFunc') call LessInitFunc() endif " Used after each command: put cursor at end and display position if &wrap noremap <SID>L L0:redraw<CR>:file<CR> au VimEnter * normal! L0 else noremap <SID>L Lg0:redraw<CR>:file<CR> au VimEnter * normal! Lg0 endif " When reading from stdin don't consider the file modified. au VimEnter * set nomod " Can't modify the text set noma " Give help noremap h :call <SID>Help()<CR> map H h fun! s:Help() echo "<Space> One page forward b One page backward" echo "d Half a page forward u Half a page backward" echo "<Enter> One line forward k One line backward" echo "G End of file g Start of file" echo "N% percentage in file" echo "\n" echo "/pattern Search for pattern ?pattern Search backward for pattern" echo "n next pattern match N Previous pattern match" if &foldmethod != "manual" echo "\n" echo "zR open all folds zm increase fold level" endif echo "\n" echo ":n<Enter> Next file :p<Enter> Previous file" echo "\n" echo "q Quit v Edit file" let i = input("Hit Enter to continue") endfun " Scroll one page forward noremap <script> <Space> :call <SID>NextPage()<CR><SID>L map <C-V> <Space> map f <Space> map <C-F> <Space> map <PageDown> <Space> map <kPageDown> <Space> map <S-Down> <Space> " If 'foldmethod' was changed keep the "z" commands, e.g. "zR" to open all " folds. if &foldmethod == "manual" map z <Space> endif map <Esc><Space> <Space> fun! s:NextPage() if line(".") == line("$") if argidx() + 1 >= argc() " Don't quit at the end of the last file return endif next 1 else exe "normal! \<C-F>" endif endfun " Re-read file and page forward "tail -f" map F :e<CR>G<SID>L:sleep 1<CR>F " Scroll half a page forward noremap <script> d <C-D><SID>L map <C-D> d " Scroll one line forward noremap <script> <CR> <C-E><SID>L map <C-N> <CR> map e <CR> map <C-E> <CR> map j <CR> map <C-J> <CR> map <Down> <CR> " Scroll one page backward noremap <script> b <C-B><SID>L map <C-B> b map <PageUp> b map <kPageUp> b map <S-Up> b map w b map <Esc>v b " Scroll half a page backward noremap <script> u <C-U><SID>L noremap <script> <C-U> <C-U><SID>L " Scroll one line backward noremap <script> k <C-Y><SID>L map y k map <C-Y> k map <C-P> k map <C-K> k map <Up> k " Redraw noremap <script> r <C-L><SID>L noremap <script> <C-R> <C-L><SID>L noremap <script> R <C-L><SID>L " Start of file noremap <script> g gg<SID>L map < g map <Esc>< g map <Home> g map <kHome> g " End of file noremap <script> G G<SID>L map > G map <Esc>> G map <End> G map <kEnd> G " Go to percentage noremap <script> % %<SID>L map p % " Search noremap <script> / H$:call <SID>Forward()<CR>/ if &wrap noremap <script> ? H0:call <SID>Backward()<CR>? else noremap <script> ? Hg0:call <SID>Backward()<CR>? endif fun! s:Forward() " Searching forward noremap <script> n H$nzt<SID>L if &wrap noremap <script> N H0Nzt<SID>L else noremap <script> N Hg0Nzt<SID>L endif cnoremap <silent> <script> <CR> <CR>:cunmap <lt>CR><CR>zt<SID>L endfun fun! s:Backward() " Searching backward if &wrap noremap <script> n H0nzt<SID>L else noremap <script> n Hg0nzt<SID>L endif noremap <script> N H$Nzt<SID>L cnoremap <silent> <script> <CR> <CR>:cunmap <lt>CR><CR>zt<SID>L endfun call s:Forward() cunmap <CR> " Quitting noremap q :q<CR> " Switch to editing (switch off less mode) map v :silent call <SID>End()<CR> fun! s:End() set ma if exists('s:lz') let &lz = s:lz endif unmap h unmap H unmap <Space> unmap <C-V> unmap f unmap <C-F> unmap z unmap <Esc><Space> unmap F unmap d unmap <C-D> unmap <CR> unmap <C-N> unmap e unmap <C-E> unmap j unmap <C-J> unmap b unmap <C-B> unmap w unmap <Esc>v unmap u unmap <C-U> unmap k unmap y unmap <C-Y> unmap <C-P> unmap <C-K> unmap r unmap <C-R> unmap R unmap g unmap < unmap <Esc>< unmap G unmap > unmap <Esc>> unmap % unmap p unmap n unmap N unmap q unmap v unmap / unmap ? unmap <Up> unmap <Down> unmap <PageDown> unmap <kPageDown> unmap <PageUp> unmap <kPageUp> unmap <S-Down> unmap <S-Up> unmap <Home> unmap <kHome> unmap <End> unmap <kEnd> endfun " vim: sw=2 �������������������������������������������������������������������neovim-0.2.2/runtime/macros/matchit.vim�������������������������������������������������������������0000664�0000000�0000000�00000000225�13204015742�0020122�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" This file is a compatibility stub for any plugins which source it. " Nvim already loads the matchit plugin by default; see ':help pi_matchit.txt'. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/macros/shellmenu.vim�����������������������������������������������������������0000664�0000000�0000000�00000000163�13204015742�0020466�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Load the shellmenu package. " For those users who were loading the shellmenu plugin from here. packadd shellmenu �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/macros/swapmous.vim������������������������������������������������������������0000664�0000000�0000000�00000000162�13204015742�0020347�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Load the swapmouse package. " For those users who were loading the swapmous plugin from here. packadd swapmouse ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/makemenu.vim�������������������������������������������������������������������0000664�0000000�0000000�00000045201�13204015742�0017012�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Script to define the syntax menu in synmenu.vim " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2013 Jul 28 " This is used by "make menu" in the src directory. edit <sfile>:p:h/synmenu.vim /The Start Of The Syntax Menu/+1,/The End Of The Syntax Menu/-1d let s:lnum = line(".") - 1 call append(s:lnum, "") let s:lnum = s:lnum + 1 " Use the SynMenu command and function to define all menu entries command! -nargs=* SynMenu call <SID>Syn(<q-args>) let s:cur_menu_name = "" let s:cur_menu_nr = 0 let s:cur_menu_item = 0 let s:cur_menu_char = "" fun! <SID>Syn(arg) " isolate menu name: until the first dot let i = match(a:arg, '\.') let menu_name = strpart(a:arg, 0, i) let r = strpart(a:arg, i + 1, 999) " isolate submenu name: until the colon let i = match(r, ":") let submenu_name = strpart(r, 0, i) " after the colon is the syntax name let syntax_name = strpart(r, i + 1, 999) if s:cur_menu_name != menu_name let s:cur_menu_name = menu_name let s:cur_menu_nr = s:cur_menu_nr + 10 let s:cur_menu_item = 100 let s:cur_menu_char = submenu_name[0] else " When starting a new letter, insert a menu separator. let c = submenu_name[0] if c != s:cur_menu_char exe 'an 50.' . s:cur_menu_nr . '.' . s:cur_menu_item . ' &Syntax.' . menu_name . ".-" . c . '- <nul>' let s:cur_menu_item = s:cur_menu_item + 10 let s:cur_menu_char = c endif endif call append(s:lnum, 'an 50.' . s:cur_menu_nr . '.' . s:cur_menu_item . ' &Syntax.' . menu_name . "." . submenu_name . ' :cal SetSyn("' . syntax_name . '")<CR>') let s:cur_menu_item = s:cur_menu_item + 10 let s:lnum = s:lnum + 1 endfun SynMenu AB.A2ps\ config:a2ps SynMenu AB.Aap:aap SynMenu AB.ABAP/4:abap SynMenu AB.Abaqus:abaqus SynMenu AB.ABC\ music\ notation:abc SynMenu AB.ABEL:abel SynMenu AB.AceDB\ model:acedb SynMenu AB.Ada:ada SynMenu AB.AfLex:aflex SynMenu AB.ALSA\ config:alsaconf SynMenu AB.Altera\ AHDL:ahdl SynMenu AB.Amiga\ DOS:amiga SynMenu AB.AMPL:ampl SynMenu AB.Ant\ build\ file:ant SynMenu AB.ANTLR:antlr SynMenu AB.Apache\ config:apache SynMenu AB.Apache-style\ config:apachestyle SynMenu AB.Applix\ ELF:elf SynMenu AB.APT\ config:aptconf SynMenu AB.Arc\ Macro\ Language:aml SynMenu AB.Arch\ inventory:arch SynMenu AB.ART:art SynMenu AB.Ascii\ Doc:asciidoc SynMenu AB.ASP\ with\ VBScript:aspvbs SynMenu AB.ASP\ with\ Perl:aspperl SynMenu AB.Assembly.680x0:asm68k SynMenu AB.Assembly.Flat:fasm SynMenu AB.Assembly.GNU:asm SynMenu AB.Assembly.GNU\ H-8300:asmh8300 SynMenu AB.Assembly.Intel\ IA-64:ia64 SynMenu AB.Assembly.Microsoft:masm SynMenu AB.Assembly.Netwide:nasm SynMenu AB.Assembly.PIC:pic SynMenu AB.Assembly.Turbo:tasm SynMenu AB.Assembly.VAX\ Macro\ Assembly:vmasm SynMenu AB.Assembly.Z-80:z8a SynMenu AB.Assembly.xa\ 6502\ cross\ assember:a65 SynMenu AB.ASN\.1:asn SynMenu AB.Asterisk\ config:asterisk SynMenu AB.Asterisk\ voicemail\ config:asteriskvm SynMenu AB.Atlas:atlas SynMenu AB.AutoHotKey:autohotkey SynMenu AB.AutoIt:autoit SynMenu AB.Automake:automake SynMenu AB.Avenue:ave SynMenu AB.Awk:awk SynMenu AB.AYacc:ayacc SynMenu AB.B:b SynMenu AB.Baan:baan SynMenu AB.Basic.FreeBasic:freebasic SynMenu AB.Basic.IBasic:ibasic SynMenu AB.Basic.QBasic:basic SynMenu AB.Basic.Visual\ Basic:vb SynMenu AB.Bazaar\ commit\ file:bzr SynMenu AB.BC\ calculator:bc SynMenu AB.BDF\ font:bdf SynMenu AB.BibTeX.Bibliography\ database:bib SynMenu AB.BibTeX.Bibliography\ Style:bst SynMenu AB.BIND.BIND\ config:named SynMenu AB.BIND.BIND\ zone:bindzone SynMenu AB.Blank:blank SynMenu C.C:c SynMenu C.C++:cpp SynMenu C.C#:cs SynMenu C.Cabal\ Haskell\ build\ file:cabal SynMenu C.Calendar:calendar SynMenu C.Cascading\ Style\ Sheets:css SynMenu C.CDL:cdl SynMenu C.Cdrdao\ TOC:cdrtoc SynMenu C.Cdrdao\ config:cdrdaoconf SynMenu C.Century\ Term:cterm SynMenu C.CH\ script:ch SynMenu C.ChaiScript:chaiscript SynMenu C.ChangeLog:changelog SynMenu C.Cheetah\ template:cheetah SynMenu C.CHILL:chill SynMenu C.ChordPro:chordpro SynMenu C.Clean:clean SynMenu C.Clever:cl SynMenu C.Clipper:clipper SynMenu C.Clojure:clojure SynMenu C.Cmake:cmake SynMenu C.Cmusrc:cmusrc SynMenu C.Cobol:cobol SynMenu C.Coco/R:coco SynMenu C.Cold\ Fusion:cf SynMenu C.Conary\ Recipe:conaryrecipe SynMenu C.Config.Cfg\ Config\ file:cfg SynMenu C.Config.Configure\.in:config SynMenu C.Config.Generic\ Config\ file:conf SynMenu C.CRM114:crm SynMenu C.Crontab:crontab SynMenu C.CSDL:csdl SynMenu C.CSP:csp SynMenu C.Ctrl-H:ctrlh SynMenu C.Cucumber:cucumber SynMenu C.CUDA:cuda SynMenu C.CUPL.CUPL:cupl SynMenu C.CUPL.Simulation:cuplsim SynMenu C.CVS.commit\ file:cvs SynMenu C.CVS.cvsrc:cvsrc SynMenu C.Cyn++:cynpp SynMenu C.Cynlib:cynlib SynMenu DE.D:d SynMenu DE.Datascript:datascript SynMenu DE.Debian.Debian\ ChangeLog:debchangelog SynMenu DE.Debian.Debian\ Control:debcontrol SynMenu DE.Debian.Debian\ Sources\.list:debsources SynMenu DE.Denyhosts:denyhosts SynMenu DE.Desktop:desktop SynMenu DE.Dict\ config:dictconf SynMenu DE.Dictd\ config:dictdconf SynMenu DE.Diff:diff SynMenu DE.Digital\ Command\ Lang:dcl SynMenu DE.Dircolors:dircolors SynMenu DE.Django\ template:django SynMenu DE.DNS/BIND\ zone:bindzone SynMenu DE.Dnsmasq\ config:dnsmasq SynMenu DE.DocBook.auto-detect:docbk SynMenu DE.DocBook.SGML:docbksgml SynMenu DE.DocBook.XML:docbkxml SynMenu DE.Dot:dot SynMenu DE.Doxygen.C\ with\ doxygen:c.doxygen SynMenu DE.Doxygen.C++\ with\ doxygen:cpp.doxygen SynMenu DE.Doxygen.IDL\ with\ doxygen:idl.doxygen SynMenu DE.Doxygen.Java\ with\ doxygen:java.doxygen SynMenu DE.Doxygen.DataScript\ with\ doxygen:datascript.doxygen SynMenu DE.Dracula:dracula SynMenu DE.DSSSL:dsl SynMenu DE.DTD:dtd SynMenu DE.DTML\ (Zope):dtml SynMenu DE.DTrace:dtrace SynMenu DE.Dts/dtsi:dts SynMenu DE.Dylan.Dylan:dylan SynMenu DE.Dylan.Dylan\ interface:dylanintr SynMenu DE.Dylan.Dylan\ lid:dylanlid SynMenu DE.EDIF:edif SynMenu DE.Eiffel:eiffel SynMenu DE.Elinks\ config:elinks SynMenu DE.Elm\ filter\ rules:elmfilt SynMenu DE.Embedix\ Component\ Description:ecd SynMenu DE.ERicsson\ LANGuage:erlang SynMenu DE.ESMTP\ rc:esmtprc SynMenu DE.ESQL-C:esqlc SynMenu DE.Essbase\ script:csc SynMenu DE.Esterel:esterel SynMenu DE.Eterm\ config:eterm SynMenu DE.Eviews:eviews SynMenu DE.Exim\ conf:exim SynMenu DE.Expect:expect SynMenu DE.Exports:exports SynMenu FG.Falcon:falcon SynMenu FG.Fantom:fan SynMenu FG.Fetchmail:fetchmail SynMenu FG.FlexWiki:flexwiki SynMenu FG.Focus\ Executable:focexec SynMenu FG.Focus\ Master:master SynMenu FG.FORM:form SynMenu FG.Forth:forth SynMenu FG.Fortran:fortran SynMenu FG.FoxPro:foxpro SynMenu FG.FrameScript:framescript SynMenu FG.Fstab:fstab SynMenu FG.Fvwm.Fvwm\ configuration:fvwm1 SynMenu FG.Fvwm.Fvwm2\ configuration:fvwm2 SynMenu FG.Fvwm.Fvwm2\ configuration\ with\ M4:fvwm2m4 SynMenu FG.GDB\ command\ file:gdb SynMenu FG.GDMO:gdmo SynMenu FG.Gedcom:gedcom SynMenu FG.Git.Output:git SynMenu FG.Git.Commit:gitcommit SynMenu FG.Git.Config:gitconfig SynMenu FG.Git.Rebase:gitrebase SynMenu FG.Git.Send\ Email:gitsendemail SynMenu FG.Gitolite:gitolite SynMenu FG.Gkrellmrc:gkrellmrc SynMenu FG.Gnash:gnash SynMenu FG.GP:gp SynMenu FG.GPG:gpg SynMenu FG.Grof:gprof SynMenu FG.Group\ file:group SynMenu FG.Grub:grub SynMenu FG.GNU\ Server\ Pages:gsp SynMenu FG.GNUplot:gnuplot SynMenu FG.GrADS\ scripts:grads SynMenu FG.Gretl:gretl SynMenu FG.Groff:groff SynMenu FG.Groovy:groovy SynMenu FG.GTKrc:gtkrc SynMenu HIJK.Haml:haml SynMenu HIJK.Hamster:hamster SynMenu HIJK.Haskell.Haskell:haskell SynMenu HIJK.Haskell.Haskell-c2hs:chaskell SynMenu HIJK.Haskell.Haskell-literate:lhaskell SynMenu HIJK.HASTE:haste SynMenu HIJK.HASTE\ preproc:hastepreproc SynMenu HIJK.Hercules:hercules SynMenu HIJK.Hex\ dump.XXD:xxd SynMenu HIJK.Hex\ dump.Intel\ MCS51:hex SynMenu HIJK.Hg\ commit:hgcommit SynMenu HIJK.HTML.HTML:html SynMenu HIJK.HTML.HTML\ with\ M4:htmlm4 SynMenu HIJK.HTML.HTML\ with\ Ruby\ (eRuby):eruby SynMenu HIJK.HTML.Cheetah\ HTML\ template:htmlcheetah SynMenu HIJK.HTML.Django\ HTML\ template:htmldjango SynMenu HIJK.HTML.HTML/OS:htmlos SynMenu HIJK.HTML.XHTML:xhtml SynMenu HIJK.Host\.conf:hostconf SynMenu HIJK.Hosts\ access:hostsaccess SynMenu HIJK.Hyper\ Builder:hb SynMenu HIJK.Icewm\ menu:icemenu SynMenu HIJK.Icon:icon SynMenu HIJK.IDL\Generic\ IDL:idl SynMenu HIJK.IDL\Microsoft\ IDL:msidl SynMenu HIJK.Indent\ profile:indent SynMenu HIJK.Inform:inform SynMenu HIJK.Informix\ 4GL:fgl SynMenu HIJK.Initng:initng SynMenu HIJK.Inittab:inittab SynMenu HIJK.Inno\ setup:iss SynMenu HIJK.Innovation\ Data\ Processing.Upstream\ dat:upstreamdat SynMenu HIJK.Innovation\ Data\ Processing.Upstream\ log:upstreamlog SynMenu HIJK.Innovation\ Data\ Processing.Upstream\ Install\ log:upstreaminstalllog SynMenu HIJK.Innovation\ Data\ Processing.Usserver\ log:usserverlog SynMenu HIJK.Innovation\ Data\ Processing.USW2KAgt\ log:usw2kagtlog SynMenu HIJK.InstallShield\ script:ishd SynMenu HIJK.Interactive\ Data\ Lang:idlang SynMenu HIJK.IPfilter:ipfilter SynMenu HIJK.JAL:jal SynMenu HIJK.JAM:jam SynMenu HIJK.Jargon:jargon SynMenu HIJK.Java.Java:java SynMenu HIJK.Java.JavaCC:javacc SynMenu HIJK.Java.Java\ Server\ Pages:jsp SynMenu HIJK.Java.Java\ Properties:jproperties SynMenu HIJK.JavaScript:javascript SynMenu HIJK.Jess:jess SynMenu HIJK.Jgraph:jgraph SynMenu HIJK.Jovial:jovial SynMenu HIJK.Kconfig:kconfig SynMenu HIJK.KDE\ script:kscript SynMenu HIJK.Kimwitu++:kwt SynMenu HIJK.KixTart:kix SynMenu L.Lace:lace SynMenu L.LamdaProlog:lprolog SynMenu L.Latte:latte SynMenu L.Ld\ script:ld SynMenu L.LDAP.LDIF:ldif SynMenu L.LDAP.Configuration:ldapconf SynMenu L.Lex:lex SynMenu L.LFTP\ config:lftp SynMenu L.Libao:libao SynMenu L.LifeLines\ script:lifelines SynMenu L.Lilo:lilo SynMenu L.Limits\ config:limits SynMenu L.Linden\ scripting:lsl SynMenu L.Liquid:liquid SynMenu L.Lisp:lisp SynMenu L.Lite:lite SynMenu L.LiteStep\ RC:litestep SynMenu L.Locale\ Input:fdcc SynMenu L.Login\.access:loginaccess SynMenu L.Login\.defs:logindefs SynMenu L.Logtalk:logtalk SynMenu L.LOTOS:lotos SynMenu L.LotusScript:lscript SynMenu L.Lout:lout SynMenu L.LPC:lpc SynMenu L.Lua:lua SynMenu L.Lynx\ Style:lss SynMenu L.Lynx\ config:lynx SynMenu M.M4:m4 SynMenu M.MaGic\ Point:mgp SynMenu M.Mail:mail SynMenu M.Mail\ aliases:mailaliases SynMenu M.Mailcap:mailcap SynMenu M.Mallard:mallard SynMenu M.Makefile:make SynMenu M.MakeIndex:ist SynMenu M.Man\ page:man SynMenu M.Man\.conf:manconf SynMenu M.Maple\ V:maple SynMenu M.Markdown:markdown SynMenu M.Mason:mason SynMenu M.Mathematica:mma SynMenu M.Matlab:matlab SynMenu M.Maxima:maxima SynMenu M.MEL\ (for\ Maya):mel SynMenu M.Messages\ (/var/log):messages SynMenu M.Metafont:mf SynMenu M.MetaPost:mp SynMenu M.MGL:mgl SynMenu M.MMIX:mmix SynMenu M.Modconf:modconf SynMenu M.Model:model SynMenu M.Modsim\ III:modsim3 SynMenu M.Modula\ 2:modula2 SynMenu M.Modula\ 3:modula3 SynMenu M.Monk:monk SynMenu M.Mplayer\ config:mplayerconf SynMenu M.MOO:moo SynMenu M.Mrxvtrc:mrxvtrc SynMenu M.MS-DOS/Windows.4DOS\ \.bat\ file:btm SynMenu M.MS-DOS/Windows.\.bat\/\.cmd\ file:dosbatch SynMenu M.MS-DOS/Windows.\.ini\ file:dosini SynMenu M.MS-DOS/Windows.Message\ text:msmessages SynMenu M.MS-DOS/Windows.Module\ Definition:def SynMenu M.MS-DOS/Windows.Registry:registry SynMenu M.MS-DOS/Windows.Resource\ file:rc SynMenu M.Msql:msql SynMenu M.MuPAD:mupad SynMenu M.MUSHcode:mush SynMenu M.Muttrc:muttrc SynMenu NO.Nanorc:nanorc SynMenu NO.Nastran\ input/DMAP:nastran SynMenu NO.Natural:natural SynMenu NO.Netrc:netrc SynMenu NO.Ninja:ninja SynMenu NO.Novell\ NCF\ batch:ncf SynMenu NO.Not\ Quite\ C\ (LEGO):nqc SynMenu NO.Nroff:nroff SynMenu NO.NSIS\ script:nsis SynMenu NO.Obj\ 3D\ wavefront:obj SynMenu NO.Objective\ C:objc SynMenu NO.Objective\ C++:objcpp SynMenu NO.OCAML:ocaml SynMenu NO.Occam:occam SynMenu NO.Omnimark:omnimark SynMenu NO.OpenROAD:openroad SynMenu NO.Open\ Psion\ Lang:opl SynMenu NO.Oracle\ config:ora SynMenu PQ.Packet\ filter\ conf:pf SynMenu PQ.Palm\ resource\ compiler:pilrc SynMenu PQ.Pam\ config:pamconf SynMenu PQ.PApp:papp SynMenu PQ.Pascal:pascal SynMenu PQ.Password\ file:passwd SynMenu PQ.PCCTS:pccts SynMenu PQ.PDF:pdf SynMenu PQ.Perl.Perl:perl SynMenu PQ.Perl.Perl\ 6:perl6 SynMenu PQ.Perl.Perl\ POD:pod SynMenu PQ.Perl.Perl\ XS:xs SynMenu PQ.Perl.Template\ toolkit:tt2 SynMenu PQ.Perl.Template\ toolkit\ Html:tt2html SynMenu PQ.Perl.Template\ toolkit\ JS:tt2js SynMenu PQ.PHP.PHP\ 3-4:php SynMenu PQ.PHP.Phtml\ (PHP\ 2):phtml SynMenu PQ.Pike:pike SynMenu PQ.Pine\ RC:pine SynMenu PQ.Pinfo\ RC:pinfo SynMenu PQ.PL/M:plm SynMenu PQ.PL/SQL:plsql SynMenu PQ.Pli:pli SynMenu PQ.PLP:plp SynMenu PQ.PO\ (GNU\ gettext):po SynMenu PQ.Postfix\ main\ config:pfmain SynMenu PQ.PostScript.PostScript:postscr SynMenu PQ.PostScript.PostScript\ Printer\ Description:ppd SynMenu PQ.Povray.Povray\ scene\ descr:pov SynMenu PQ.Povray.Povray\ configuration:povini SynMenu PQ.PPWizard:ppwiz SynMenu PQ.Prescribe\ (Kyocera):prescribe SynMenu PQ.Printcap:pcap SynMenu PQ.Privoxy:privoxy SynMenu PQ.Procmail:procmail SynMenu PQ.Product\ Spec\ File:psf SynMenu PQ.Progress:progress SynMenu PQ.Prolog:prolog SynMenu PQ.ProMeLa:promela SynMenu PQ.Proto:proto SynMenu PQ.Protocols:protocols SynMenu PQ.Purify\ log:purifylog SynMenu PQ.Pyrex:pyrex SynMenu PQ.Python:python SynMenu PQ.Quake:quake SynMenu PQ.Quickfix\ window:qf SynMenu R.R.R:r SynMenu R.R.R\ help:rhelp SynMenu R.R.R\ noweb:rnoweb SynMenu R.Racc\ input:racc SynMenu R.Radiance:radiance SynMenu R.Ratpoison:ratpoison SynMenu R.RCS.RCS\ log\ output:rcslog SynMenu R.RCS.RCS\ file:rcs SynMenu R.Readline\ config:readline SynMenu R.Rebol:rebol SynMenu R.ReDIF:redif SynMenu R.Relax\ NG:rng SynMenu R.Remind:remind SynMenu R.Relax\ NG\ compact:rnc SynMenu R.Renderman.Renderman\ Shader\ Lang:sl SynMenu R.Renderman.Renderman\ Interface\ Bytestream:rib SynMenu R.Resolv\.conf:resolv SynMenu R.Reva\ Forth:reva SynMenu R.Rexx:rexx SynMenu R.Robots\.txt:robots SynMenu R.RockLinux\ package\ desc\.:desc SynMenu R.Rpcgen:rpcgen SynMenu R.RPL/2:rpl SynMenu R.ReStructuredText:rst SynMenu R.RTF:rtf SynMenu R.Ruby:ruby SynMenu S-Sm.S-Lang:slang SynMenu S-Sm.Samba\ config:samba SynMenu S-Sm.SAS:sas SynMenu S-Sm.Sass:sass SynMenu S-Sm.Sather:sather SynMenu S-Sm.Scheme:scheme SynMenu S-Sm.Scilab:scilab SynMenu S-Sm.Screen\ RC:screen SynMenu S-Sm.SCSS:scss SynMenu S-Sm.SDC\ Synopsys\ Design\ Constraints:sdc SynMenu S-Sm.SDL:sdl SynMenu S-Sm.Sed:sed SynMenu S-Sm.Sendmail\.cf:sm SynMenu S-Sm.Send-pr:sendpr SynMenu S-Sm.Sensors\.conf:sensors SynMenu S-Sm.Service\ Location\ config:slpconf SynMenu S-Sm.Service\ Location\ registration:slpreg SynMenu S-Sm.Service\ Location\ SPI:slpspi SynMenu S-Sm.Services:services SynMenu S-Sm.Setserial\ config:setserial SynMenu S-Sm.SGML.SGML\ catalog:catalog SynMenu S-Sm.SGML.SGML\ DTD:sgml SynMenu S-Sm.SGML.SGML\ Declaration:sgmldecl SynMenu S-Sm.SGML.SGML-linuxdoc:sgmllnx SynMenu S-Sm.Shell\ script.sh\ and\ ksh:sh SynMenu S-Sm.Shell\ script.csh:csh SynMenu S-Sm.Shell\ script.tcsh:tcsh SynMenu S-Sm.Shell\ script.zsh:zsh SynMenu S-Sm.SiCAD:sicad SynMenu S-Sm.Sieve:sieve SynMenu S-Sm.Simula:simula SynMenu S-Sm.Sinda.Sinda\ compare:sindacmp SynMenu S-Sm.Sinda.Sinda\ input:sinda SynMenu S-Sm.Sinda.Sinda\ output:sindaout SynMenu S-Sm.SiSU:sisu SynMenu S-Sm.SKILL.SKILL:skill SynMenu S-Sm.SKILL.SKILL\ for\ Diva:diva SynMenu S-Sm.Slice:slice SynMenu S-Sm.SLRN.Slrn\ rc:slrnrc SynMenu S-Sm.SLRN.Slrn\ score:slrnsc SynMenu S-Sm.SmallTalk:st SynMenu S-Sm.Smarty\ Templates:smarty SynMenu S-Sm.SMIL:smil SynMenu S-Sm.SMITH:smith SynMenu Sn-Sy.SNMP\ MIB:mib SynMenu Sn-Sy.SNNS.SNNS\ network:snnsnet SynMenu Sn-Sy.SNNS.SNNS\ pattern:snnspat SynMenu Sn-Sy.SNNS.SNNS\ result:snnsres SynMenu Sn-Sy.Snobol4:snobol4 SynMenu Sn-Sy.Snort\ Configuration:hog SynMenu Sn-Sy.SPEC\ (Linux\ RPM):spec SynMenu Sn-Sy.Specman:specman SynMenu Sn-Sy.Spice:spice SynMenu Sn-Sy.Spyce:spyce SynMenu Sn-Sy.Speedup:spup SynMenu Sn-Sy.Splint:splint SynMenu Sn-Sy.Squid\ config:squid SynMenu Sn-Sy.SQL.SAP\ HANA:sqlhana SynMenu Sn-Sy.SQL.ESQL-C:esqlc SynMenu Sn-Sy.SQL.MySQL:mysql SynMenu Sn-Sy.SQL.PL/SQL:plsql SynMenu Sn-Sy.SQL.SQL\ Anywhere:sqlanywhere SynMenu Sn-Sy.SQL.SQL\ (automatic):sql SynMenu Sn-Sy.SQL.SQL\ (Oracle):sqloracle SynMenu Sn-Sy.SQL.SQL\ Forms:sqlforms SynMenu Sn-Sy.SQL.SQLJ:sqlj SynMenu Sn-Sy.SQL.SQL-Informix:sqlinformix SynMenu Sn-Sy.SQR:sqr SynMenu Sn-Sy.Ssh.ssh_config:sshconfig SynMenu Sn-Sy.Ssh.sshd_config:sshdconfig SynMenu Sn-Sy.Standard\ ML:sml SynMenu Sn-Sy.Stata.SMCL:smcl SynMenu Sn-Sy.Stata.Stata:stata SynMenu Sn-Sy.Stored\ Procedures:stp SynMenu Sn-Sy.Strace:strace SynMenu Sn-Sy.Streaming\ descriptor\ file:sd SynMenu Sn-Sy.Subversion\ commit:svn SynMenu Sn-Sy.Sudoers:sudoers SynMenu Sn-Sy.SVG:svg SynMenu Sn-Sy.Symbian\ meta-makefile:mmp SynMenu Sn-Sy.Sysctl\.conf:sysctl SynMenu T.TADS:tads SynMenu T.Tags:tags SynMenu T.TAK.TAK\ compare:takcmp SynMenu T.TAK.TAK\ input:tak SynMenu T.TAK.TAK\ output:takout SynMenu T.Tar\ listing:tar SynMenu T.Task\ data:taskdata SynMenu T.Task\ 42\ edit:taskedit SynMenu T.Tcl/Tk:tcl SynMenu T.TealInfo:tli SynMenu T.Telix\ Salt:tsalt SynMenu T.Termcap/Printcap:ptcap SynMenu T.Terminfo:terminfo SynMenu T.TeX.TeX/LaTeX:tex SynMenu T.TeX.plain\ TeX:plaintex SynMenu T.TeX.Initex:initex SynMenu T.TeX.ConTeXt:context SynMenu T.TeX.TeX\ configuration:texmf SynMenu T.TeX.Texinfo:texinfo SynMenu T.TF\ mud\ client:tf SynMenu T.Tidy\ configuration:tidy SynMenu T.Tilde:tilde SynMenu T.TPP:tpp SynMenu T.Trasys\ input:trasys SynMenu T.Treetop:treetop SynMenu T.Trustees:trustees SynMenu T.TSS.Command\ Line:tsscl SynMenu T.TSS.Geometry:tssgm SynMenu T.TSS.Optics:tssop SynMenu UV.Udev\ config:udevconf SynMenu UV.Udev\ permissions:udevperm SynMenu UV.Udev\ rules:udevrules SynMenu UV.UIT/UIL:uil SynMenu UV.UnrealScript:uc SynMenu UV.Updatedb\.conf:updatedb SynMenu UV.Upstart:upstart SynMenu UV.Valgrind:valgrind SynMenu UV.Vera:vera SynMenu UV.Verilog-AMS\ HDL:verilogams SynMenu UV.Verilog\ HDL:verilog SynMenu UV.Vgrindefs:vgrindefs SynMenu UV.VHDL:vhdl SynMenu UV.Vim.Vim\ help\ file:help SynMenu UV.Vim.Vim\ script:vim SynMenu UV.Vim.Viminfo\ file:viminfo SynMenu UV.Virata\ config:virata SynMenu UV.Visual\ Basic:vb SynMenu UV.VOS\ CM\ macro:voscm SynMenu UV.VRML:vrml SynMenu UV.VSE\ JCL:vsejcl SynMenu WXYZ.WEB.CWEB:cweb SynMenu WXYZ.WEB.WEB:web SynMenu WXYZ.WEB.WEB\ Changes:change SynMenu WXYZ.Webmacro:webmacro SynMenu WXYZ.Website\ MetaLanguage:wml SynMenu WXYZ.wDiff:wdiff SynMenu WXYZ.Wget\ config:wget SynMenu WXYZ.Whitespace\ (add):whitespace SynMenu WXYZ.WildPackets\ EtherPeek\ Decoder:dcd SynMenu WXYZ.WinBatch/Webbatch:winbatch SynMenu WXYZ.Windows\ Scripting\ Host:wsh SynMenu WXYZ.WSML:wsml SynMenu WXYZ.WvDial:wvdial SynMenu WXYZ.X\ Keyboard\ Extension:xkb SynMenu WXYZ.X\ Pixmap:xpm SynMenu WXYZ.X\ Pixmap\ (2):xpm2 SynMenu WXYZ.X\ resources:xdefaults SynMenu WXYZ.XBL:xbl SynMenu WXYZ.Xinetd\.conf:xinetd SynMenu WXYZ.Xmodmap:xmodmap SynMenu WXYZ.Xmath:xmath SynMenu WXYZ.XML:xml SynMenu WXYZ.XML\ Schema\ (XSD):xsd SynMenu WXYZ.XQuery:xquery SynMenu WXYZ.Xslt:xslt SynMenu WXYZ.XFree86\ Config:xf86conf SynMenu WXYZ.YAML:yaml SynMenu WXYZ.Yacc:yacc SynMenu WXYZ.Zimbu:zimbu call append(s:lnum, "") wq �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/menu.vim�����������������������������������������������������������������������0000664�0000000�0000000�00000112236�13204015742�0016157�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim support file to define the default menus " You can also use this as a start for your own set of menus. " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2017 Mar 04 " Note that ":an" (short for ":anoremenu") is often used to make a menu work " in all modes and avoid side effects from mappings defined by the user. " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise " <CR> would not be recognized. See ":help 'cpoptions'". let s:cpo_save = &cpo set cpo&vim " Avoid installing the menus twice if !exists("did_install_default_menus") let did_install_default_menus = 1 if exists("v:lang") || &langmenu != "" " Try to find a menu translation file for the current language. if &langmenu != "" if &langmenu =~ "none" let s:lang = "" else let s:lang = &langmenu endif else let s:lang = v:lang endif " A language name must be at least two characters, don't accept "C" if strlen(s:lang) > 1 " When the language does not include the charset add 'encoding' if s:lang =~ '^\a\a$\|^\a\a_\a\a$' let s:lang = s:lang . '.' . &enc endif " We always use a lowercase name. " Change "iso-8859" to "iso_8859" and "iso8859" to "iso_8859", some " systems appear to use this. " Change spaces to underscores. let s:lang = substitute(tolower(s:lang), '\.iso-', ".iso_", "") let s:lang = substitute(s:lang, '\.iso8859', ".iso_8859", "") let s:lang = substitute(s:lang, " ", "_", "g") " Remove "@euro", otherwise "LC_ALL=de_DE@euro gvim" will show English menus let s:lang = substitute(s:lang, "@euro", "", "") " Change "iso_8859-1" and "iso_8859-15" to "latin1", we always use the " same menu file for them. let s:lang = substitute(s:lang, 'iso_8859-15\=$', "latin1", "") menutrans clear exe "runtime! lang/menu_" . s:lang . ".vim" if !exists("did_menu_trans") " There is no exact match, try matching with a wildcard added " (e.g. find menu_de_de.iso_8859-1.vim if s:lang == de_DE). let s:lang = substitute(s:lang, '\.[^.]*', "", "") exe "runtime! lang/menu_" . s:lang . "[^a-z]*vim" if !exists("did_menu_trans") && strlen($LANG) > 1 && s:lang !~ '^en_us' " On windows locale names are complicated, try using $LANG, it might " have been set by set_init_1(). But don't do this for "en" or "en_us". " But don't match "slovak" when $LANG is "sl". exe "runtime! lang/menu_" . tolower($LANG) . "[^a-z]*vim" endif endif endif endif " Help menu an 9999.10 &Help.&Overview<Tab><F1> :help<CR> an 9999.20 &Help.&User\ Manual :help usr_toc<CR> an 9999.30 &Help.&How-To\ Links :help how-to<CR> an <silent> 9999.40 &Help.&Find\.\.\. :call <SID>Helpfind()<CR> an 9999.45 &Help.-sep1- <Nop> an 9999.50 &Help.&Credits :help credits<CR> an 9999.60 &Help.Co&pying :help copying<CR> an 9999.70 &Help.&Sponsor/Register :help sponsor<CR> an 9999.70 &Help.O&rphans :help kcc<CR> an 9999.75 &Help.-sep2- <Nop> an 9999.80 &Help.&Version :version<CR> an 9999.90 &Help.&About :intro<CR> fun! s:Helpfind() if !exists("g:menutrans_help_dialog") let g:menutrans_help_dialog = "Enter a command or word to find help on:\n\nPrepend i_ for Input mode commands (e.g.: i_CTRL-X)\nPrepend c_ for command-line editing commands (e.g.: c_<Del>)\nPrepend ' for an option name (e.g.: 'shiftwidth')" endif let h = inputdialog(g:menutrans_help_dialog) if h != "" let v:errmsg = "" silent! exe "help " . h if v:errmsg != "" echo v:errmsg endif endif endfun " File menu an 10.310 &File.&Open\.\.\.<Tab>:e :browse confirm e<CR> an 10.320 &File.Sp&lit-Open\.\.\.<Tab>:sp :browse sp<CR> an 10.320 &File.Open\ Tab\.\.\.<Tab>:tabnew :browse tabnew<CR> an 10.325 &File.&New<Tab>:enew :confirm enew<CR> an <silent> 10.330 &File.&Close<Tab>:close \ :if winheight(2) < 0 && tabpagewinnr(2) == 0 <Bar> \ confirm enew <Bar> \ else <Bar> \ confirm close <Bar> \ endif<CR> an 10.335 &File.-SEP1- <Nop> an <silent> 10.340 &File.&Save<Tab>:w :if expand("%") == ""<Bar>browse confirm w<Bar>else<Bar>confirm w<Bar>endif<CR> an 10.350 &File.Save\ &As\.\.\.<Tab>:sav :browse confirm saveas<CR> if has("diff") an 10.400 &File.-SEP2- <Nop> an 10.410 &File.Split\ &Diff\ With\.\.\. :browse vert diffsplit<CR> an 10.420 &File.Split\ Patched\ &By\.\.\. :browse vert diffpatch<CR> endif if has("printer") an 10.500 &File.-SEP3- <Nop> an 10.510 &File.&Print :hardcopy<CR> vunmenu &File.&Print vnoremenu &File.&Print :hardcopy<CR> elseif has("unix") an 10.500 &File.-SEP3- <Nop> an 10.510 &File.&Print :w !lpr<CR> vunmenu &File.&Print vnoremenu &File.&Print :w !lpr<CR> endif an 10.600 &File.-SEP4- <Nop> an 10.610 &File.Sa&ve-Exit<Tab>:wqa :confirm wqa<CR> an 10.620 &File.E&xit<Tab>:qa :confirm qa<CR> func! <SID>SelectAll() exe "norm! gg" . (&slm == "" ? "VG" : "gH\<C-O>G") endfunc func! s:FnameEscape(fname) if exists('*fnameescape') return fnameescape(a:fname) endif return escape(a:fname, " \t\n*?[{`$\\%#'\"|!<") endfunc " Edit menu an 20.310 &Edit.&Undo<Tab>u u an 20.320 &Edit.&Redo<Tab>^R <C-R> an 20.330 &Edit.Rep&eat<Tab>\. . an 20.335 &Edit.-SEP1- <Nop> vnoremenu 20.340 &Edit.Cu&t<Tab>"+x "+x vnoremenu 20.350 &Edit.&Copy<Tab>"+y "+y cnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-Y> nnoremenu 20.360 &Edit.&Paste<Tab>"+gP "+gP cnoremenu &Edit.&Paste<Tab>"+gP <C-R>+ exe 'vnoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['v'] exe 'inoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['i'] nnoremenu 20.370 &Edit.Put\ &Before<Tab>[p [p inoremenu &Edit.Put\ &Before<Tab>[p <C-O>[p nnoremenu 20.380 &Edit.Put\ &After<Tab>]p ]p inoremenu &Edit.Put\ &After<Tab>]p <C-O>]p if has("win32") || has("win16") vnoremenu 20.390 &Edit.&Delete<Tab>x x endif noremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG :<C-U>call <SID>SelectAll()<CR> inoremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG <C-O>:call <SID>SelectAll()<CR> cnoremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG <C-U>call <SID>SelectAll()<CR> an 20.405 &Edit.-SEP2- <Nop> if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif") an 20.410 &Edit.&Find\.\.\. :promptfind<CR> vunmenu &Edit.&Find\.\.\. vnoremenu <silent> &Edit.&Find\.\.\. y:promptfind <C-R>=<SID>FixFText()<CR><CR> an 20.420 &Edit.Find\ and\ Rep&lace\.\.\. :promptrepl<CR> vunmenu &Edit.Find\ and\ Rep&lace\.\.\. vnoremenu <silent> &Edit.Find\ and\ Rep&lace\.\.\. y:promptrepl <C-R>=<SID>FixFText()<CR><CR> else an 20.410 &Edit.&Find<Tab>/ / an 20.420 &Edit.Find\ and\ Rep&lace<Tab>:%s :%s/ vunmenu &Edit.Find\ and\ Rep&lace<Tab>:%s vnoremenu &Edit.Find\ and\ Rep&lace<Tab>:s :s/ endif an 20.425 &Edit.-SEP3- <Nop> an 20.430 &Edit.Settings\ &Window :options<CR> an 20.435 &Edit.Startup\ &Settings :call <SID>EditVimrc()<CR> fun! s:EditVimrc() if $MYVIMRC != '' let fname = $MYVIMRC elseif has("win32") if $HOME != '' let fname = $HOME . "/_vimrc" else let fname = $VIM . "/_vimrc" endif else let fname = $HOME . "/.vimrc" endif let fname = s:FnameEscape(fname) if &mod exe "split " . fname else exe "edit " . fname endif endfun fun! s:FixFText() " Fix text in nameless register to be used with :promptfind. return substitute(@", "[\r\n]", '\\n', 'g') endfun " Edit/Global Settings an 20.440.100 &Edit.&Global\ Settings.Toggle\ Pattern\ &Highlight<Tab>:set\ hls! :set hls! hls?<CR> an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Ignoring\ Case<Tab>:set\ ic! :set ic! ic?<CR> an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! :set sm! sm?<CR> an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 1\ :set so=1<CR> an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 2\ :set so=2<CR> an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 3\ :set so=3<CR> an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 4\ :set so=4<CR> an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 5\ :set so=5<CR> an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 7\ :set so=7<CR> an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 10\ :set so=10<CR> an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 100\ :set so=100<CR> an 20.440.130.40 &Edit.&Global\ Settings.&Virtual\ Edit.Never :set ve=<CR> an 20.440.130.50 &Edit.&Global\ Settings.&Virtual\ Edit.Block\ Selection :set ve=block<CR> an 20.440.130.60 &Edit.&Global\ Settings.&Virtual\ Edit.Insert\ Mode :set ve=insert<CR> an 20.440.130.70 &Edit.&Global\ Settings.&Virtual\ Edit.Block\ and\ Insert :set ve=block,insert<CR> an 20.440.130.80 &Edit.&Global\ Settings.&Virtual\ Edit.Always :set ve=all<CR> an 20.440.140 &Edit.&Global\ Settings.Toggle\ Insert\ &Mode<Tab>:set\ im! :set im!<CR> an 20.440.145 &Edit.&Global\ Settings.Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! :set cp!<CR> an <silent> 20.440.150 &Edit.&Global\ Settings.Search\ &Path\.\.\. :call <SID>SearchP()<CR> an <silent> 20.440.160 &Edit.&Global\ Settings.Ta&g\ Files\.\.\. :call <SID>TagFiles()<CR> " " GUI options an 20.440.300 &Edit.&Global\ Settings.-SEP1- <Nop> an <silent> 20.440.310 &Edit.&Global\ Settings.Toggle\ &Toolbar :call <SID>ToggleGuiOption("T")<CR> an <silent> 20.440.320 &Edit.&Global\ Settings.Toggle\ &Bottom\ Scrollbar :call <SID>ToggleGuiOption("b")<CR> an <silent> 20.440.330 &Edit.&Global\ Settings.Toggle\ &Left\ Scrollbar :call <SID>ToggleGuiOption("l")<CR> an <silent> 20.440.340 &Edit.&Global\ Settings.Toggle\ &Right\ Scrollbar :call <SID>ToggleGuiOption("r")<CR> fun! s:SearchP() if !exists("g:menutrans_path_dialog") let g:menutrans_path_dialog = "Enter search path for files.\nSeparate directory names with a comma." endif let n = inputdialog(g:menutrans_path_dialog, substitute(&path, '\\ ', ' ', 'g')) if n != "" let &path = substitute(n, ' ', '\\ ', 'g') endif endfun fun! s:TagFiles() if !exists("g:menutrans_tags_dialog") let g:menutrans_tags_dialog = "Enter names of tag files.\nSeparate the names with a comma." endif let n = inputdialog(g:menutrans_tags_dialog, substitute(&tags, '\\ ', ' ', 'g')) if n != "" let &tags = substitute(n, ' ', '\\ ', 'g') endif endfun fun! s:ToggleGuiOption(option) " If a:option is already set in guioptions, then we want to remove it if match(&guioptions, "\\C" . a:option) > -1 exec "set go-=" . a:option else exec "set go+=" . a:option endif endfun " Edit/File Settings " Boolean options an 20.440.100 &Edit.F&ile\ Settings.Toggle\ Line\ &Numbering<Tab>:set\ nu! :set nu! nu?<CR> an 20.440.105 &Edit.F&ile\ Settings.Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! :set rnu! rnu?<CR> an 20.440.110 &Edit.F&ile\ Settings.Toggle\ &List\ Mode<Tab>:set\ list! :set list! list?<CR> an 20.440.120 &Edit.F&ile\ Settings.Toggle\ Line\ &Wrapping<Tab>:set\ wrap! :set wrap! wrap?<CR> an 20.440.130 &Edit.F&ile\ Settings.Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! :set lbr! lbr?<CR> an 20.440.160 &Edit.F&ile\ Settings.Toggle\ Tab\ &Expanding<Tab>:set\ et! :set et! et?<CR> an 20.440.170 &Edit.F&ile\ Settings.Toggle\ &Auto\ Indenting<Tab>:set\ ai! :set ai! ai?<CR> an 20.440.180 &Edit.F&ile\ Settings.Toggle\ &C-Style\ Indenting<Tab>:set\ cin! :set cin! cin?<CR> " other options an 20.440.600 &Edit.F&ile\ Settings.-SEP2- <Nop> an 20.440.610.20 &Edit.F&ile\ Settings.&Shiftwidth.2 :set sw=2 sw?<CR> an 20.440.610.30 &Edit.F&ile\ Settings.&Shiftwidth.3 :set sw=3 sw?<CR> an 20.440.610.40 &Edit.F&ile\ Settings.&Shiftwidth.4 :set sw=4 sw?<CR> an 20.440.610.50 &Edit.F&ile\ Settings.&Shiftwidth.5 :set sw=5 sw?<CR> an 20.440.610.60 &Edit.F&ile\ Settings.&Shiftwidth.6 :set sw=6 sw?<CR> an 20.440.610.80 &Edit.F&ile\ Settings.&Shiftwidth.8 :set sw=8 sw?<CR> an 20.440.620.20 &Edit.F&ile\ Settings.Soft\ &Tabstop.2 :set sts=2 sts?<CR> an 20.440.620.30 &Edit.F&ile\ Settings.Soft\ &Tabstop.3 :set sts=3 sts?<CR> an 20.440.620.40 &Edit.F&ile\ Settings.Soft\ &Tabstop.4 :set sts=4 sts?<CR> an 20.440.620.50 &Edit.F&ile\ Settings.Soft\ &Tabstop.5 :set sts=5 sts?<CR> an 20.440.620.60 &Edit.F&ile\ Settings.Soft\ &Tabstop.6 :set sts=6 sts?<CR> an 20.440.620.80 &Edit.F&ile\ Settings.Soft\ &Tabstop.8 :set sts=8 sts?<CR> an <silent> 20.440.630 &Edit.F&ile\ Settings.Te&xt\ Width\.\.\. :call <SID>TextWidth()<CR> an <silent> 20.440.640 &Edit.F&ile\ Settings.&File\ Format\.\.\. :call <SID>FileFormat()<CR> fun! s:TextWidth() if !exists("g:menutrans_textwidth_dialog") let g:menutrans_textwidth_dialog = "Enter new text width (0 to disable formatting): " endif let n = inputdialog(g:menutrans_textwidth_dialog, &tw) if n != "" " Remove leading zeros to avoid it being used as an octal number. " But keep a zero by itself. let tw = substitute(n, "^0*", "", "") let &tw = tw == '' ? 0 : tw endif endfun fun! s:FileFormat() if !exists("g:menutrans_fileformat_dialog") let g:menutrans_fileformat_dialog = "Select format for writing the file" endif if !exists("g:menutrans_fileformat_choices") let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n&Cancel" endif if &ff == "dos" let def = 2 elseif &ff == "mac" let def = 3 else let def = 1 endif let n = confirm(g:menutrans_fileformat_dialog, g:menutrans_fileformat_choices, def, "Question") if n == 1 set ff=unix elseif n == 2 set ff=dos elseif n == 3 set ff=mac endif endfun " Setup the Edit.Color Scheme submenu " get NL separated string with file names let s:n = globpath(&runtimepath, "colors/*.vim") " split at NL, ignore case for Windows, sort on name let s:names = sort(map(split(s:n, "\n"), 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1) " define all the submenu entries let s:idx = 100 for s:name in s:names exe "an 20.450." . s:idx . ' &Edit.C&olor\ Scheme.' . s:name . " :colors " . s:name . "<CR>" let s:idx = s:idx + 10 endfor unlet s:name s:names s:n s:idx " Setup the Edit.Keymap submenu if has("keymap") let s:n = globpath(&runtimepath, "keymap/*.vim") if s:n != "" let s:idx = 100 an 20.460.90 &Edit.&Keymap.None :set keymap=<CR> while strlen(s:n) > 0 let s:i = stridx(s:n, "\n") if s:i < 0 let s:name = s:n let s:n = "" else let s:name = strpart(s:n, 0, s:i) let s:n = strpart(s:n, s:i + 1, 19999) endif " Ignore case for Windows let s:name = substitute(s:name, '\c.*[/\\:\]]\([^/\\:_]*\)\(_[0-9a-zA-Z-]*\)\=\.vim', '\1', '') exe "an 20.460." . s:idx . ' &Edit.&Keymap.' . s:name . " :set keymap=" . s:name . "<CR>" unlet s:name unlet s:i let s:idx = s:idx + 10 endwhile unlet s:idx endif unlet s:n endif if has("win32") || has("win16") || has("gui_motif") || has("gui_gtk") || has("gui_kde") || has("gui_mac") an 20.470 &Edit.Select\ Fo&nt\.\.\. :set guifont=*<CR> endif " Programming menu if !exists("g:ctags_command") let g:ctags_command = "ctags -R ." endif an 40.300 &Tools.&Jump\ to\ This\ Tag<Tab>g^] g<C-]> vunmenu &Tools.&Jump\ to\ This\ Tag<Tab>g^] vnoremenu &Tools.&Jump\ to\ This\ Tag<Tab>g^] g<C-]> an 40.310 &Tools.Jump\ &Back<Tab>^T <C-T> an 40.320 &Tools.Build\ &Tags\ File :exe "!" . g:ctags_command<CR> if has("folding") || has("spell") an 40.330 &Tools.-SEP1- <Nop> endif " Tools.Spelling Menu if has("spell") an 40.335.110 &Tools.&Spelling.&Spell\ Check\ On :set spell<CR> an 40.335.120 &Tools.&Spelling.Spell\ Check\ &Off :set nospell<CR> an 40.335.130 &Tools.&Spelling.To\ &Next\ Error<Tab>]s ]s an 40.335.130 &Tools.&Spelling.To\ &Previous\ Error<Tab>[s [s an 40.335.140 &Tools.&Spelling.Suggest\ &Corrections<Tab>z= z= an 40.335.150 &Tools.&Spelling.&Repeat\ Correction<Tab>:spellrepall :spellrepall<CR> an 40.335.200 &Tools.&Spelling.-SEP1- <Nop> an 40.335.210 &Tools.&Spelling.Set\ Language\ to\ "en" :set spl=en spell<CR> an 40.335.220 &Tools.&Spelling.Set\ Language\ to\ "en_au" :set spl=en_au spell<CR> an 40.335.230 &Tools.&Spelling.Set\ Language\ to\ "en_ca" :set spl=en_ca spell<CR> an 40.335.240 &Tools.&Spelling.Set\ Language\ to\ "en_gb" :set spl=en_gb spell<CR> an 40.335.250 &Tools.&Spelling.Set\ Language\ to\ "en_nz" :set spl=en_nz spell<CR> an 40.335.260 &Tools.&Spelling.Set\ Language\ to\ "en_us" :set spl=en_us spell<CR> an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR> let s:undo_spellang = ['aun &Tools.&Spelling.&Find\ More\ Languages'] func! s:SpellLang() for cmd in s:undo_spellang exe "silent! " . cmd endfor let s:undo_spellang = [] if &enc == "iso-8859-15" let enc = "latin1" else let enc = &enc endif if !exists("g:menutrans_set_lang_to") let g:menutrans_set_lang_to = 'Set Language to' endif let found = 0 let s = globpath(&rtp, "spell/*." . enc . ".spl") if s != "" let n = 300 for f in split(s, "\n") let nm = substitute(f, '.*spell[/\\]\(..\)\.[^/\\]*\.spl', '\1', "") if nm != "en" && nm !~ '/' let _nm = nm let found += 1 let menuname = '&Tools.&Spelling.' . escape(g:menutrans_set_lang_to, "\\. \t|") . '\ "' . nm . '"' exe 'an 40.335.' . n . ' ' . menuname . ' :set spl=' . nm . ' spell<CR>' let s:undo_spellang += ['aun ' . menuname] endif let n += 10 endfor endif if found == 0 echomsg "Could not find other spell files" elseif found == 1 echomsg "Found spell file " . _nm else echomsg "Found " . found . " more spell files" endif " Need to redo this when 'encoding' is changed. augroup spellmenu au! EncodingChanged * call <SID>SpellLang() augroup END endfun endif " Tools.Fold Menu if has("folding") " open close folds an 40.340.110 &Tools.&Folding.&Enable/Disable\ Folds<Tab>zi zi an 40.340.120 &Tools.&Folding.&View\ Cursor\ Line<Tab>zv zv an 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ Only<Tab>zMzx zMzx inoremenu 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ Only<Tab>zMzx <C-O>zM<C-O>zx an 40.340.130 &Tools.&Folding.C&lose\ More\ Folds<Tab>zm zm an 40.340.140 &Tools.&Folding.&Close\ All\ Folds<Tab>zM zM an 40.340.150 &Tools.&Folding.O&pen\ More\ Folds<Tab>zr zr an 40.340.160 &Tools.&Folding.&Open\ All\ Folds<Tab>zR zR " fold method an 40.340.200 &Tools.&Folding.-SEP1- <Nop> an 40.340.210 &Tools.&Folding.Fold\ Met&hod.M&anual :set fdm=manual<CR> an 40.340.210 &Tools.&Folding.Fold\ Met&hod.I&ndent :set fdm=indent<CR> an 40.340.210 &Tools.&Folding.Fold\ Met&hod.E&xpression :set fdm=expr<CR> an 40.340.210 &Tools.&Folding.Fold\ Met&hod.S&yntax :set fdm=syntax<CR> an 40.340.210 &Tools.&Folding.Fold\ Met&hod.&Diff :set fdm=diff<CR> an 40.340.210 &Tools.&Folding.Fold\ Met&hod.Ma&rker :set fdm=marker<CR> " create and delete folds vnoremenu 40.340.220 &Tools.&Folding.Create\ &Fold<Tab>zf zf an 40.340.230 &Tools.&Folding.&Delete\ Fold<Tab>zd zd an 40.340.240 &Tools.&Folding.Delete\ &All\ Folds<Tab>zD zD " moving around in folds an 40.340.300 &Tools.&Folding.-SEP2- <Nop> an 40.340.310.10 &Tools.&Folding.Fold\ Col&umn\ Width.\ &0\ :set fdc=0<CR> an 40.340.310.20 &Tools.&Folding.Fold\ Col&umn\ Width.\ &2\ :set fdc=2<CR> an 40.340.310.30 &Tools.&Folding.Fold\ Col&umn\ Width.\ &3\ :set fdc=3<CR> an 40.340.310.40 &Tools.&Folding.Fold\ Col&umn\ Width.\ &4\ :set fdc=4<CR> an 40.340.310.50 &Tools.&Folding.Fold\ Col&umn\ Width.\ &5\ :set fdc=5<CR> an 40.340.310.60 &Tools.&Folding.Fold\ Col&umn\ Width.\ &6\ :set fdc=6<CR> an 40.340.310.70 &Tools.&Folding.Fold\ Col&umn\ Width.\ &7\ :set fdc=7<CR> an 40.340.310.80 &Tools.&Folding.Fold\ Col&umn\ Width.\ &8\ :set fdc=8<CR> endif " has folding if has("diff") an 40.350.100 &Tools.&Diff.&Update :diffupdate<CR> an 40.350.110 &Tools.&Diff.&Get\ Block :diffget<CR> vunmenu &Tools.&Diff.&Get\ Block vnoremenu &Tools.&Diff.&Get\ Block :diffget<CR> an 40.350.120 &Tools.&Diff.&Put\ Block :diffput<CR> vunmenu &Tools.&Diff.&Put\ Block vnoremenu &Tools.&Diff.&Put\ Block :diffput<CR> endif an 40.358 &Tools.-SEP2- <Nop> an 40.360 &Tools.&Make<Tab>:make :make<CR> an 40.370 &Tools.&List\ Errors<Tab>:cl :cl<CR> an 40.380 &Tools.L&ist\ Messages<Tab>:cl! :cl!<CR> an 40.390 &Tools.&Next\ Error<Tab>:cn :cn<CR> an 40.400 &Tools.&Previous\ Error<Tab>:cp :cp<CR> an 40.410 &Tools.&Older\ List<Tab>:cold :colder<CR> an 40.420 &Tools.N&ewer\ List<Tab>:cnew :cnewer<CR> an 40.430.50 &Tools.Error\ &Window.&Update<Tab>:cwin :cwin<CR> an 40.430.60 &Tools.Error\ &Window.&Open<Tab>:copen :copen<CR> an 40.430.70 &Tools.Error\ &Window.&Close<Tab>:cclose :cclose<CR> an 40.520 &Tools.-SEP3- <Nop> an <silent> 40.530 &Tools.&Convert\ to\ HEX<Tab>:%!xxd \ :call <SID>XxdConv()<CR> an <silent> 40.540 &Tools.Conve&rt\ Back<Tab>:%!xxd\ -r \ :call <SID>XxdBack()<CR> " Use a function to do the conversion, so that it also works with 'insertmode' " set. func! s:XxdConv() let mod = &mod call s:XxdFind() exe '%!"' . g:xxdprogram . '"' if getline(1) =~ "^0000000:" " only if it worked set ft=xxd endif let &mod = mod endfun func! s:XxdBack() let mod = &mod call s:XxdFind() exe '%!"' . g:xxdprogram . '" -r' set ft= doautocmd filetypedetect BufReadPost let &mod = mod endfun func! s:XxdFind() if !exists("g:xxdprogram") " On the PC xxd may not be in the path but in the install directory if has("win32") && !executable("xxd") let g:xxdprogram = $VIMRUNTIME . (&shellslash ? '/' : '\') . "xxd.exe" else let g:xxdprogram = "xxd" endif endif endfun " Setup the Tools.Compiler submenu let s:n = globpath(&runtimepath, "compiler/*.vim") let s:idx = 100 while strlen(s:n) > 0 let s:i = stridx(s:n, "\n") if s:i < 0 let s:name = s:n let s:n = "" else let s:name = strpart(s:n, 0, s:i) let s:n = strpart(s:n, s:i + 1, 19999) endif " Ignore case for Windows let s:name = substitute(s:name, '\c.*[/\\:\]]\([^/\\:]*\)\.vim', '\1', '') exe "an 30.440." . s:idx . ' &Tools.Se&t\ Compiler.' . s:name . " :compiler " . s:name . "<CR>" unlet s:name unlet s:i let s:idx = s:idx + 10 endwhile unlet s:n unlet s:idx if !exists("no_buffers_menu") " Buffer list menu -- Setup functions & actions " wait with building the menu until after loading 'session' files. Makes " startup faster. let s:bmenu_wait = 1 if !exists("bmenu_priority") let bmenu_priority = 60 endif func! s:BMAdd() if s:bmenu_wait == 0 " when adding too many buffers, redraw in short format if s:bmenu_count == &menuitems && s:bmenu_short == 0 call s:BMShow() else call <SID>BMFilename(expand("<afile>"), expand("<abuf>")) let s:bmenu_count = s:bmenu_count + 1 endif endif endfunc func! s:BMRemove() if s:bmenu_wait == 0 let name = expand("<afile>") if isdirectory(name) return endif let munge = <SID>BMMunge(name, expand("<abuf>")) if s:bmenu_short == 0 exe 'silent! aun &Buffers.' . munge else exe 'silent! aun &Buffers.' . <SID>BMHash2(munge) . munge endif let s:bmenu_count = s:bmenu_count - 1 endif endfunc " Create the buffer menu (delete an existing one first). func! s:BMShow(...) let s:bmenu_wait = 1 let s:bmenu_short = 1 let s:bmenu_count = 0 " " get new priority, if exists if a:0 == 1 let g:bmenu_priority = a:1 endif " remove old menu, if exists; keep one entry to avoid a torn off menu to " disappear. silent! unmenu &Buffers exe 'noremenu ' . g:bmenu_priority . ".1 &Buffers.Dummy l" silent! unmenu! &Buffers " create new menu; set 'cpo' to include the <CR> let cpo_save = &cpo set cpo&vim exe 'an <silent> ' . g:bmenu_priority . ".2 &Buffers.&Refresh\\ menu :call <SID>BMShow()<CR>" exe 'an ' . g:bmenu_priority . ".4 &Buffers.&Delete :confirm bd<CR>" exe 'an ' . g:bmenu_priority . ".6 &Buffers.&Alternate :confirm b #<CR>" exe 'an ' . g:bmenu_priority . ".7 &Buffers.&Next :confirm bnext<CR>" exe 'an ' . g:bmenu_priority . ".8 &Buffers.&Previous :confirm bprev<CR>" exe 'an ' . g:bmenu_priority . ".9 &Buffers.-SEP- :" let &cpo = cpo_save unmenu &Buffers.Dummy " figure out how many buffers there are let buf = 1 while buf <= bufnr('$') if bufexists(buf) && !isdirectory(bufname(buf)) && buflisted(buf) let s:bmenu_count = s:bmenu_count + 1 endif let buf = buf + 1 endwhile if s:bmenu_count <= &menuitems let s:bmenu_short = 0 endif " iterate through buffer list, adding each buffer to the menu: let buf = 1 while buf <= bufnr('$') if bufexists(buf) && !isdirectory(bufname(buf)) && buflisted(buf) call <SID>BMFilename(bufname(buf), buf) endif let buf = buf + 1 endwhile let s:bmenu_wait = 0 aug buffer_list au! au BufCreate,BufFilePost * call <SID>BMAdd() au BufDelete,BufFilePre * call <SID>BMRemove() aug END endfunc func! s:BMHash(name) " Make name all upper case, so that chars are between 32 and 96 let nm = substitute(a:name, ".*", '\U\0', "") let sp = char2nr(' ') " convert first six chars into a number for sorting: return (char2nr(nm[0]) - sp) * 0x800000 + (char2nr(nm[1]) - sp) * 0x20000 + (char2nr(nm[2]) - sp) * 0x1000 + (char2nr(nm[3]) - sp) * 0x80 + (char2nr(nm[4]) - sp) * 0x20 + (char2nr(nm[5]) - sp) endfunc func! s:BMHash2(name) let nm = substitute(a:name, ".", '\L\0', "") if nm[0] < 'a' || nm[0] > 'z' return '&others.' elseif nm[0] <= 'd' return '&abcd.' elseif nm[0] <= 'h' return '&efgh.' elseif nm[0] <= 'l' return '&ijkl.' elseif nm[0] <= 'p' return '&mnop.' elseif nm[0] <= 't' return '&qrst.' else return '&u-z.' endif endfunc " insert a buffer name into the buffer menu: func! s:BMFilename(name, num) if isdirectory(a:name) return endif let munge = <SID>BMMunge(a:name, a:num) let hash = <SID>BMHash(munge) if s:bmenu_short == 0 let name = 'an ' . g:bmenu_priority . '.' . hash . ' &Buffers.' . munge else let name = 'an ' . g:bmenu_priority . '.' . hash . '.' . hash . ' &Buffers.' . <SID>BMHash2(munge) . munge endif " set 'cpo' to include the <CR> let cpo_save = &cpo set cpo&vim exe name . ' :confirm b' . a:num . '<CR>' let &cpo = cpo_save endfunc " Truncate a long path to fit it in a menu item. if !exists("g:bmenu_max_pathlen") let g:bmenu_max_pathlen = 35 endif func! s:BMTruncName(fname) let name = a:fname if g:bmenu_max_pathlen < 5 let name = "" else let len = strlen(name) if len > g:bmenu_max_pathlen let amountl = (g:bmenu_max_pathlen / 2) - 2 let amountr = g:bmenu_max_pathlen - amountl - 3 let pattern = '^\(.\{,' . amountl . '}\).\{-}\(.\{,' . amountr . '}\)$' let left = substitute(name, pattern, '\1', '') let right = substitute(name, pattern, '\2', '') if strlen(left) + strlen(right) < len let name = left . '...' . right endif endif endif return name endfunc func! s:BMMunge(fname, bnum) let name = a:fname if name == '' if !exists("g:menutrans_no_file") let g:menutrans_no_file = "[No file]" endif let name = g:menutrans_no_file else let name = fnamemodify(name, ':p:~') endif " detach file name and separate it out: let name2 = fnamemodify(name, ':t') if a:bnum >= 0 let name2 = name2 . ' (' . a:bnum . ')' endif let name = name2 . "\t" . <SID>BMTruncName(fnamemodify(name,':h')) let name = escape(name, "\\. \t|") let name = substitute(name, "&", "&&", "g") let name = substitute(name, "\n", "^@", "g") return name endfunc " When just starting Vim, load the buffer menu later if has("vim_starting") augroup LoadBufferMenu au! VimEnter * if !exists("no_buffers_menu") | call <SID>BMShow() | endif au VimEnter * au! LoadBufferMenu augroup END else call <SID>BMShow() endif endif " !exists("no_buffers_menu") " Window menu an 70.300 &Window.&New<Tab>^Wn <C-W>n an 70.310 &Window.S&plit<Tab>^Ws <C-W>s an 70.320 &Window.Sp&lit\ To\ #<Tab>^W^^ <C-W><C-^> an 70.330 &Window.Split\ &Vertically<Tab>^Wv <C-W>v if has("vertsplit") an <silent> 70.332 &Window.Split\ File\ E&xplorer :call MenuExplOpen()<CR> if !exists("*MenuExplOpen") fun MenuExplOpen() if @% == "" 20vsp . else exe "20vsp " . s:FnameEscape(expand("%:p:h")) endif endfun endif endif an 70.335 &Window.-SEP1- <Nop> an 70.340 &Window.&Close<Tab>^Wc :confirm close<CR> an 70.345 &Window.Close\ &Other(s)<Tab>^Wo :confirm only<CR> an 70.350 &Window.-SEP2- <Nop> an 70.355 &Window.Move\ &To.&Top<Tab>^WK <C-W>K an 70.355 &Window.Move\ &To.&Bottom<Tab>^WJ <C-W>J an 70.355 &Window.Move\ &To.&Left\ Side<Tab>^WH <C-W>H an 70.355 &Window.Move\ &To.&Right\ Side<Tab>^WL <C-W>L an 70.360 &Window.Rotate\ &Up<Tab>^WR <C-W>R an 70.362 &Window.Rotate\ &Down<Tab>^Wr <C-W>r an 70.365 &Window.-SEP3- <Nop> an 70.370 &Window.&Equal\ Size<Tab>^W= <C-W>= an 70.380 &Window.&Max\ Height<Tab>^W_ <C-W>_ an 70.390 &Window.M&in\ Height<Tab>^W1_ <C-W>1_ an 70.400 &Window.Max\ &Width<Tab>^W\| <C-W>\| an 70.410 &Window.Min\ Widt&h<Tab>^W1\| <C-W>1\| " The popup menu an 1.10 PopUp.&Undo u an 1.15 PopUp.-SEP1- <Nop> vnoremenu 1.20 PopUp.Cu&t "+x vnoremenu 1.30 PopUp.&Copy "+y cnoremenu 1.30 PopUp.&Copy <C-Y> nnoremenu 1.40 PopUp.&Paste "+gP cnoremenu 1.40 PopUp.&Paste <C-R>+ exe 'vnoremenu <script> 1.40 PopUp.&Paste ' . paste#paste_cmd['v'] exe 'inoremenu <script> 1.40 PopUp.&Paste ' . paste#paste_cmd['i'] vnoremenu 1.50 PopUp.&Delete x an 1.55 PopUp.-SEP2- <Nop> vnoremenu 1.60 PopUp.Select\ Blockwise <C-V> nnoremenu 1.70 PopUp.Select\ &Word vaw onoremenu 1.70 PopUp.Select\ &Word aw vnoremenu 1.70 PopUp.Select\ &Word <C-C>vaw inoremenu 1.70 PopUp.Select\ &Word <C-O>vaw cnoremenu 1.70 PopUp.Select\ &Word <C-C>vaw nnoremenu 1.73 PopUp.Select\ &Sentence vas onoremenu 1.73 PopUp.Select\ &Sentence as vnoremenu 1.73 PopUp.Select\ &Sentence <C-C>vas inoremenu 1.73 PopUp.Select\ &Sentence <C-O>vas cnoremenu 1.73 PopUp.Select\ &Sentence <C-C>vas nnoremenu 1.77 PopUp.Select\ Pa&ragraph vap onoremenu 1.77 PopUp.Select\ Pa&ragraph ap vnoremenu 1.77 PopUp.Select\ Pa&ragraph <C-C>vap inoremenu 1.77 PopUp.Select\ Pa&ragraph <C-O>vap cnoremenu 1.77 PopUp.Select\ Pa&ragraph <C-C>vap nnoremenu 1.80 PopUp.Select\ &Line V onoremenu 1.80 PopUp.Select\ &Line <C-C>V vnoremenu 1.80 PopUp.Select\ &Line <C-C>V inoremenu 1.80 PopUp.Select\ &Line <C-O>V cnoremenu 1.80 PopUp.Select\ &Line <C-C>V nnoremenu 1.90 PopUp.Select\ &Block <C-V> onoremenu 1.90 PopUp.Select\ &Block <C-C><C-V> vnoremenu 1.90 PopUp.Select\ &Block <C-C><C-V> inoremenu 1.90 PopUp.Select\ &Block <C-O><C-V> cnoremenu 1.90 PopUp.Select\ &Block <C-C><C-V> noremenu <script> <silent> 1.100 PopUp.Select\ &All :<C-U>call <SID>SelectAll()<CR> inoremenu <script> <silent> 1.100 PopUp.Select\ &All <C-O>:call <SID>SelectAll()<CR> cnoremenu <script> <silent> 1.100 PopUp.Select\ &All <C-U>call <SID>SelectAll()<CR> if has("spell") " Spell suggestions in the popup menu. Note that this will slow down the " appearance of the menu! func! <SID>SpellPopup() if exists("s:changeitem") && s:changeitem != '' call <SID>SpellDel() endif " Return quickly if spell checking is not enabled. if !&spell || &spelllang == '' return endif let curcol = col('.') let [w, a] = spellbadword() if col('.') > curcol " don't use word after the cursor let w = '' endif if w != '' if a == 'caps' let s:suglist = [substitute(w, '.*', '\u&', '')] else let s:suglist = spellsuggest(w, 10) endif if len(s:suglist) > 0 let s:changeitem = 'Change\ "' . escape(w, ' .'). '"\ to' let s:fromword = w let pri = 1 " set 'cpo' to include the <CR> let cpo_save = &cpo set cpo&vim for sug in s:suglist exe 'anoremenu 1.5.' . pri . ' PopUp.' . s:changeitem . '.' . escape(sug, ' .') \ . ' :call <SID>SpellReplace(' . pri . ')<CR>' let pri += 1 endfor let s:additem = 'Add\ "' . escape(w, ' .') . '"\ to\ Word\ List' exe 'anoremenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '<CR>' let s:ignoreitem = 'Ignore\ "' . escape(w, ' .') . '"' exe 'anoremenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '<CR>' anoremenu 1.8 PopUp.-SpellSep- : let &cpo = cpo_save endif endif call cursor(0, curcol) " put the cursor back where it was endfunc func! <SID>SpellReplace(n) let l = getline('.') " Move the cursor to the start of the word. call spellbadword() call setline('.', strpart(l, 0, col('.') - 1) . s:suglist[a:n - 1] \ . strpart(l, col('.') + len(s:fromword) - 1)) endfunc func! <SID>SpellDel() exe "aunmenu PopUp." . s:changeitem exe "aunmenu PopUp." . s:additem exe "aunmenu PopUp." . s:ignoreitem aunmenu PopUp.-SpellSep- let s:changeitem = '' endfun augroup SpellPopupMenu au! MenuPopup * call <SID>SpellPopup() augroup END endif " The GUI toolbar (for MS-Windows and GTK) if has("toolbar") an 1.10 ToolBar.Open :browse confirm e<CR> an <silent> 1.20 ToolBar.Save :if expand("%") == ""<Bar>browse confirm w<Bar>else<Bar>confirm w<Bar>endif<CR> an 1.30 ToolBar.SaveAll :browse confirm wa<CR> if has("printer") an 1.40 ToolBar.Print :hardcopy<CR> vunmenu ToolBar.Print vnoremenu ToolBar.Print :hardcopy<CR> elseif has("unix") an 1.40 ToolBar.Print :w !lpr<CR> vunmenu ToolBar.Print vnoremenu ToolBar.Print :w !lpr<CR> endif an 1.45 ToolBar.-sep1- <Nop> an 1.50 ToolBar.Undo u an 1.60 ToolBar.Redo <C-R> an 1.65 ToolBar.-sep2- <Nop> vnoremenu 1.70 ToolBar.Cut "+x vnoremenu 1.80 ToolBar.Copy "+y cnoremenu 1.80 ToolBar.Copy <C-Y> nnoremenu 1.90 ToolBar.Paste "+gP cnoremenu ToolBar.Paste <C-R>+ exe 'vnoremenu <script> ToolBar.Paste ' . paste#paste_cmd['v'] exe 'inoremenu <script> ToolBar.Paste ' . paste#paste_cmd['i'] if !has("gui_athena") an 1.95 ToolBar.-sep3- <Nop> an 1.100 ToolBar.Replace :promptrepl<CR> vunmenu ToolBar.Replace vnoremenu ToolBar.Replace y:promptrepl <C-R>=<SID>FixFText()<CR><CR> an 1.110 ToolBar.FindNext n an 1.120 ToolBar.FindPrev N endif an 1.215 ToolBar.-sep5- <Nop> an <silent> 1.220 ToolBar.LoadSesn :call <SID>LoadVimSesn()<CR> an <silent> 1.230 ToolBar.SaveSesn :call <SID>SaveVimSesn()<CR> an 1.240 ToolBar.RunScript :browse so<CR> an 1.245 ToolBar.-sep6- <Nop> an 1.250 ToolBar.Make :make<CR> an 1.270 ToolBar.RunCtags :exe "!" . g:ctags_command<CR> an 1.280 ToolBar.TagJump g<C-]> an 1.295 ToolBar.-sep7- <Nop> an 1.300 ToolBar.Help :help<CR> an <silent> 1.310 ToolBar.FindHelp :call <SID>Helpfind()<CR> " Only set the tooltips here if not done in a language menu file if exists("*Do_toolbar_tmenu") call Do_toolbar_tmenu() else let did_toolbar_tmenu = 1 tmenu ToolBar.Open Open file tmenu ToolBar.Save Save current file tmenu ToolBar.SaveAll Save all files tmenu ToolBar.Print Print tmenu ToolBar.Undo Undo tmenu ToolBar.Redo Redo tmenu ToolBar.Cut Cut to clipboard tmenu ToolBar.Copy Copy to clipboard tmenu ToolBar.Paste Paste from Clipboard if !has("gui_athena") tmenu ToolBar.Replace Find / Replace... tmenu ToolBar.FindNext Find Next tmenu ToolBar.FindPrev Find Previous endif tmenu ToolBar.LoadSesn Choose a session to load tmenu ToolBar.SaveSesn Save current session tmenu ToolBar.RunScript Choose a Vim Script to run tmenu ToolBar.Make Make current project (:make) tmenu ToolBar.RunCtags Build tags in current directory tree (!ctags -R .) tmenu ToolBar.TagJump Jump to tag under cursor tmenu ToolBar.Help Vim Help tmenu ToolBar.FindHelp Search Vim Help endif " Select a session to load; default to current session name if present fun! s:LoadVimSesn() if strlen(v:this_session) > 0 let name = s:FnameEscape(v:this_session) else let name = "Session.vim" endif execute "browse so " . name endfun " Select a session to save; default to current session name if present fun! s:SaveVimSesn() if strlen(v:this_session) == 0 let v:this_session = "Session.vim" endif execute "browse mksession! " . s:FnameEscape(v:this_session) endfun endif endif " !exists("did_install_default_menus") " Define these items always, so that syntax can be switched on when it wasn't. " But skip them when the Syntax menu was disabled by the user. if !exists("did_install_syntax_menu") an 50.212 &Syntax.&Manual :syn manual<CR> an 50.214 &Syntax.A&utomatic :syn on<CR> an <silent> 50.216 &Syntax.On/Off\ for\ &This\ File :call <SID>SynOnOff()<CR> if !exists("*s:SynOnOff") fun s:SynOnOff() if has("syntax_items") syn clear else if !exists("g:syntax_on") syn manual endif set syn=ON endif endfun endif endif " Install the Syntax menu only when filetype.vim has been loaded or when " manual syntax highlighting is enabled. " Avoid installing the Syntax menu twice. if (exists("did_load_filetypes") || exists("syntax_on")) \ && !exists("did_install_syntax_menu") let did_install_syntax_menu = 1 " Skip setting up the individual syntax selection menus unless " do_syntax_sel_menu is defined (it takes quite a bit of time). if exists("do_syntax_sel_menu") runtime! synmenu.vim else an 50.10 &Syntax.&Show\ File\ Types\ in\ Menu :let do_syntax_sel_menu = 1<Bar>runtime! synmenu.vim<Bar>aunmenu &Syntax.&Show\ File\ Types\ in\ Menu<CR> an 50.195 &Syntax.-SEP1- <Nop> endif an 50.210 &Syntax.&Off :syn off<CR> an 50.700 &Syntax.-SEP3- <Nop> an 50.710 &Syntax.Co&lor\ Test :sp $VIMRUNTIME/syntax/colortest.vim<Bar>so %<CR> an 50.720 &Syntax.&Highlight\ Test :runtime syntax/hitest.vim<CR> an 50.730 &Syntax.&Convert\ to\ HTML :runtime syntax/2html.vim<CR> endif " !exists("did_install_syntax_menu") " Restore the previous value of 'cpoptions'. let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=2 : ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/mswin.vim����������������������������������������������������������������������0000664�0000000�0000000�00000005132�13204015742�0016344�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last change: 2012 Jul 25 " bail out if this isn't wanted (mrsvim.vim uses this). if exists("g:skip_loading_mswin") && g:skip_loading_mswin finish endif " set the 'cpoptions' to its Vim default if 1 " only do this when compiled with expression evaluation let s:save_cpo = &cpoptions endif set cpo&vim " set 'selection', 'selectmode', 'mousemodel' and 'keymodel' for MS-Windows behave mswin " backspace and cursor keys wrap to previous/next line set backspace=indent,eol,start whichwrap+=<,>,[,] " backspace in Visual mode deletes selection vnoremap <BS> d " CTRL-X and SHIFT-Del are Cut vnoremap <C-X> "+x vnoremap <S-Del> "+x " CTRL-C and CTRL-Insert are Copy vnoremap <C-C> "+y vnoremap <C-Insert> "+y " CTRL-V and SHIFT-Insert are Paste map <C-V> "+gP map <S-Insert> "+gP cmap <C-V> <C-R>+ cmap <S-Insert> <C-R>+ " Pasting blockwise and linewise selections is not possible in Insert and " Visual mode without the +virtualedit feature. They are pasted as if they " were characterwise instead. " Uses the paste.vim autoload script. " Use CTRL-G u to have CTRL-Z only undo the paste. exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i'] exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v'] imap <S-Insert> <C-V> vmap <S-Insert> <C-V> " Use CTRL-Q to do what CTRL-V used to do noremap <C-Q> <C-V> " Use CTRL-S for saving, also in Insert mode noremap <C-S> :update<CR> vnoremap <C-S> <C-C>:update<CR> inoremap <C-S> <C-O>:update<CR> " For CTRL-V to work autoselect must be off. " On Unix we have two selections, autoselect can be used. if !has("unix") set guioptions-=a endif " CTRL-Z is Undo; not in cmdline though noremap <C-Z> u inoremap <C-Z> <C-O>u " CTRL-Y is Redo (although not repeat); not in cmdline though noremap <C-Y> <C-R> inoremap <C-Y> <C-O><C-R> " Alt-Space is System menu if has("gui") noremap <M-Space> :simalt ~<CR> inoremap <M-Space> <C-O>:simalt ~<CR> cnoremap <M-Space> <C-C>:simalt ~<CR> endif " CTRL-A is Select all noremap <C-A> gggH<C-O>G inoremap <C-A> <C-O>gg<C-O>gH<C-O>G cnoremap <C-A> <C-C>gggH<C-O>G onoremap <C-A> <C-C>gggH<C-O>G snoremap <C-A> <C-C>gggH<C-O>G xnoremap <C-A> <C-C>ggVG " CTRL-Tab is Next window noremap <C-Tab> <C-W>w inoremap <C-Tab> <C-O><C-W>w cnoremap <C-Tab> <C-C><C-W>w onoremap <C-Tab> <C-C><C-W>w " CTRL-F4 is Close window noremap <C-F4> <C-W>c inoremap <C-F4> <C-O><C-W>c cnoremap <C-F4> <C-C><C-W>c onoremap <C-F4> <C-C><C-W>c " restore 'cpoptions' set cpo& if 1 let &cpoptions = s:save_cpo unlet s:save_cpo endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/nvim.desktop�������������������������������������������������������������������0000664�0000000�0000000�00000007046�13204015742�0017044�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Desktop Entry] Name=Neovim GenericName=Text Editor GenericName[de]=Texteditor Comment=Edit text files Comment[af]=Redigeer tekslêers Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ Comment[ar]=حرّر ملفات نصية Comment[az]=Mətn fayllarını redaktə edin Comment[be]=Рэдагаваньне тэкставых файлаў Comment[bg]=Редактиране на текстови файлове Comment[bn]=টেক্স্ট ফাইল এডিট করুন Comment[bs]=Izmijeni tekstualne datoteke Comment[ca]=Edita fitxers de text Comment[cs]=Úprava textových souborů Comment[cy]=Golygu ffeiliau testun Comment[da]=Redigér tekstfiler Comment[de]=Textdateien bearbeiten Comment[el]=Επεξεργασία αρχείων κειμένου Comment[en_CA]=Edit text files Comment[en_GB]=Edit text files Comment[es]=Edita archivos de texto Comment[et]=Redigeeri tekstifaile Comment[eu]=Editatu testu-fitxategiak Comment[fa]=ویرایش پرونده‌های متنی Comment[fi]=Muokkaa tekstitiedostoja Comment[fr]=Édite des fichiers texte Comment[ga]=Eagar comhad Téacs Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો Comment[he]=ערוך קבצי טקסט Comment[hi]=पाठ फ़ाइलें संपादित करें Comment[hr]=Uređivanje tekstualne datoteke Comment[hu]=Szövegfájlok szerkesztése Comment[id]=Edit file teks Comment[it]=Modifica file di testo Comment[ja]=テキストファイルを編集します Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು Comment[ko]=텍스트 파일을 편집합니다 Comment[lt]=Redaguoti tekstines bylas Comment[lv]=Rediģēt teksta failus Comment[mk]=Уреди текстуални фајлови Comment[ml]=വാചക രചനകള് തിരുത്തുക Comment[mn]=Текст файл боловсруулах Comment[mr]=गद्य फाइल संपादित करा Comment[ms]=Edit fail teks Comment[nb]=Rediger tekstfiler Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस् Comment[nl]=Tekstbestanden bewerken Comment[nn]=Rediger tekstfiler Comment[no]=Rediger tekstfiler Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ Comment[pl]=Edytor plików tekstowych Comment[pt]=Editar ficheiros de texto Comment[pt_BR]=Edite arquivos de texto Comment[ro]=Editare fişiere text Comment[ru]=Редактор текстовых файлов Comment[sk]=Úprava textových súborov Comment[sl]=Urejanje datotek z besedili Comment[sq]=Përpuno files teksti Comment[sr]=Измени текстуалне датотеке Comment[sr@Latn]=Izmeni tekstualne datoteke Comment[sv]=Redigera textfiler Comment[ta]=உரை கோப்புகளை தொகுக்கவும் Comment[th]=แก้ไขแฟ้มข้อความ Comment[tk]=Metin faýllary editle Comment[tr]=Metin dosyalarını düzenle Comment[uk]=Редактор текстових файлів Comment[vi]=Soạn thảo tập tin văn bản Comment[wa]=Asspougnî des fitchîs tecses Comment[zh_CN]=编辑文本文件 Comment[zh_TW]=編輯文字檔 TryExec=nvim Exec=nvim %F Terminal=true Type=Application Keywords=Text;editor; Icon=nvim Categories=Utility;TextEditor; StartupNotify=false MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/nvim.png�����������������������������������������������������������������������0000664�0000000�0000000�00000014440�13204015742�0016153�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���h������ ,N���sBIT|d��IDATx]iԕz/}m36ޗI @&6&0d#؆ INL CB$ Ò6qw^KuWwWWutGT*J|}nKuur߽I B<9(rOe�ȏs"WY-wyj0' eu}|ٮ Wiq}kipͨ^dNMW|Mw۝ j7\t]k& lW,ڙ |y7 6 E՛v{~{8o] "\k>}JEA|aA랚0}YU~NъI7ّ[LSaۜ'#;|\gySܭ%H!hsn_nuv$~@�]Q<ɻ8Y -]mB4)n;RYLӗmY ce~)xK|gS(FQ ԺMn,T7Z"3o mUf(=Ei NW⢭\p !T7>sY}9/o1oW9*G@Af[A^!M+`,/1[yE1IKʮj]OY)tšT9+*ohʌUi1q֕%c R(ޯd^^kfyd=X܂[Yy?efNAY5uDR&4 �X|JTl"N!X\LA5x_3fsOe_^奛dv=ky'꼗?PhښO_QRn 8޵տlkeJ~uߵbp ʩ\hϮyq6߸8NKMr 2^*QZ5kyWa.~2:Ըki"%S+y/0X^ 2 7ge狫3VIVgآڛW}nOaPI +ָFb&3 ^`E[kv`$bT[o3 ?1_1ngV>pOj_pW_DɈU;2, BJJڅ%0x7W|Lz(+߰+>M��%o%_ pٚ[ J]sLf+U1oA K _c˔]_`]m7�76nݖsBa郁-a74=mwGa撛�(<kRwf =~D)qX>#$=) 3 5nlҼ$we``߰`͍��1EE^ xaB ߒ$J %* 8xFH|ː/EB&K0I^Hb=C ZvױpcGx@‷x$)Pw$IJ30-SX/0OA{R[@ xƦ[m85<tM$,;*3ck?r)?_?<{$$@S2@EoarB|OOZl4O6|oᖺĝ昂l76A9p{D04쉼}OH́ґP3؂MtyR9-{]l|MY6n�Xz-)d"�@F8pmY0* ůB =oG�W.+;O 6ոSW4nLXâ }^5.Ӿo*o뇧tG^޾1UR_ɛXzmմ«-jhjb�`S\2%`<A@`9Rcn<McMuxwTir'|.�l]_w{$jVA'##+e \sWW9d! 5 1ڴ~S(�IjEI&l:LYRE $-([�\^�Gޫ:ߪ3q[sukЌv vr- 95wE1"VecVv*ԙWW~|sd8@W 0&wK)%y2lղ4X^\c[�Q|%%Pd|y aAZMM*>c1WG{'+XRǚ֦ުei�0 Mro:$A dlN �8tb` (ΝtXv?`;ꢼV$MإcVV}=Ab`\oO�.uO-J B]RwMu?_5A,#Ţ:I 'G3}财pEe7١DoؘA1?EM: '(vcΚۼB]珍AevG/ζO3DOm*z8c*s uWl㩲.Wxأ��$ y@#{B\<lzQ~^ɵV A,#] [<n}/IL]v0\? kM33Փ :Bk{Ŷ9 W_voYZ?�0tY"4YjN�# =0YZQ7dC5TP=VC1؂d}"0D8f> ۂ:~&6Rk1YgGU3jp<C-gU#"ɩ eJ\G"�eW4,tZJfە 04=VoQ m.gCNNBy,@6e\> <WE$?d0'\Q洢o$qfYETxqܨ,ߺ/Rvʊ{9!݂U h2E3&vȓzytcw0.״8yJ ZM9Swu{ N(M>sNWT1uYL+)=wqvܣQI"k]D10}y +=L&w΂`LB�oj\6\Kja7ʋԫ]E d &7\QIIN'>ٮJb[GJ<֮\Ϡ3"kշJ]sאډ7_l FW52sDz<#F8 c ",PD*Z5IVCHĞK"u4Z~~n/[sȂNiL=3ВU OѰ8|ijKgJvꚯ jIThNYkb3iKտ/:rh>ƞ? fLp4uB}5ϨZ^CzVś32ٳ�]LWPդlZE/^f^7*גe`eYZ|_dԂQD'_q](T\Ssb)K5G6 {=ѐ4{JkPwYiS•.%"FYYF;NF"WY%19]_4Y RzD.o0& sDA >O�%+W>"\^{i\8wEG(|m`K' ɐnb֜1i=ZCN5F؜;8^k&=OPAc}Q4d})SWz,I'txUs;(Eb?3j62NSEyi Nr9C&0>f#I1Mw)_ ̿;W27{~1>e 3{Ғo:^dlAE?׾$8VMSW}W(rjUO.N@gM晵n74#,Bz`?r{R*%G)}I1><ȧK`BMARBǟ[@r5J'EV շqnáQZv/ho{ܱ2wq"#ϱHpK"#0r‚4G*Zd-8" |Cu�PDz(?#(g%V[uzdE�B1iIR_JYqzO"C4C�87#Y6%0WXhH-H c<5Cj\c,hk@_:H P(( O|JαhZ8R|2ɪ{xp.P=e%S/v} ^&d]bYz ;LF+t֡7 {{HUp BA^_>gEЩ;v)D�1 o%όˡ�x/&Hټ1685ȅs{;D(}_vuCp..:ڂj>z f  b0;  ;Ĩi,27,'Nvg1;rݿQ*rQ&H~_`mo*x)tܮda\LM䜖Hڷ$ў P q:;^/BGDo)\-Jб.._\|aJOK}T[6%0ۺrgQ$R̋;9RwIVWY(�.~=agڂouncP G@rhC/`sA~F}lA2?t+:P.q8OnQ]jكv4Xξq7y5|wcfdTw,.H3z>} Ѐ z] U9Wx^!R `<1=;7У>+6*uߨ*�ۆT-s)ʕ稡/T0K[M*'5=9HQ RTwSMH g^y'0Cžs{:5?_YW;CRI[8&qD �P}~HP9}N �GN*=s|٥sB_/%!p!֡GOmb+a~nŪ{:3irh1+c0p!S$M�ʧ=ƈ[>x T[_ ,ٜ8,"pa@6FC?MF7v_ZXB{:OR/6n-I,Rd4d1dtݿYk/p;v)(P5z_c UyiP3wz!W|ٿ?Eٔ=:V\ qDG`"+T0W0;-1ב=26w_z;C<rN1'ƾ֤]'|qOV6㓥c{Zqqۥ(-y/yTe7ܶݡ{XiB3Tq1d!OxrU GISι8c!b?q`u1vH{98C/Zb<$e_3HmC}#wY R&sN>jpG5D֗:H|B#:>x)t$2=*\rV2i4Ʈv1y&^{`Ņ#:!9|LyJ80cTt~(Vl?HnN[j&t?\ )|~w iFhp sMCÇ)yD=]XҺrRcɈ Fy_QXKsRw!эCV[hijwmG0ܛov$i:r*<}硣ۃo[Q+Wxf?�HQ)x厝 )P0"CZ6^L7_Xij;~LxVck-O(/j vd(C-M޲2őD'ގLƧrdAd(ڝ) ?k2xa i"It;qũ!Htޛū?k:p~hy۸$:wSفO?@[fW6/%N>:ʑZѐO�"|pu.W`g<F(tVuK-(Zjb-.Vz/s*%u8_����IENDB`��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/optwin.vim���������������������������������������������������������������������0000664�0000000�0000000�00000152125�13204015742�0016534�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" These commands create the option window. " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2017 Oct 19 " If there already is an option window, jump to that one. if bufwinnr("option-window") > 0 let s:thiswin = winnr() while 1 if @% == "option-window" finish endif wincmd w if s:thiswin == winnr() break endif endwhile endif " Make sure the '<' flag is not included in 'cpoptions', otherwise <CR> would " not be recognized. See ":help 'cpoptions'". let s:cpo_save = &cpo set cpo&vim " function to be called when <CR> is hit in the option-window fun! <SID>CR() " If on a continued comment line, go back to the first comment line let lnum = search("^[^\t]", 'bWcn') let line = getline(lnum) " <CR> on a "set" line executes the option line if match(line, "^ \tset ") >= 0 " For a local option: go to the previous window " If this is a help window, go to the window below it let thiswin = winnr() let local = <SID>Find(lnum) if local >= 0 exe line call <SID>Update(lnum, line, local, thiswin) endif " <CR> on a "option" line shows help for that option elseif match(line, "^[a-z]") >= 0 let name = substitute(line, '\([^\t]*\).*', '\1', "") exe "help '" . name . "'" " <CR> on an index line jumps to the group elseif match(line, '^ \=[0-9]') >= 0 exe "norm! /" . line . "\<CR>zt" endif endfun " function to be called when <Space> is hit in the option-window fun! <SID>Space() let lnum = line(".") let line = getline(lnum) " <Space> on a "set" line refreshes the option line if match(line, "^ \tset ") >= 0 " For a local option: go to the previous window " If this is a help window, go to the window below it let thiswin = winnr() let local = <SID>Find(lnum) if local >= 0 call <SID>Update(lnum, line, local, thiswin) endif endif endfun " find the window in which the option applies " returns 0 for global option, 1 for local option, -1 for error fun! <SID>Find(lnum) if getline(a:lnum - 1) =~ "(local to" let local = 1 let thiswin = winnr() wincmd p if exists("b:current_syntax") && b:current_syntax == "help" wincmd j if winnr() == thiswin wincmd j endif endif else let local = 0 endif if local && (winnr() == thiswin || (exists("b:current_syntax") \ && b:current_syntax == "help")) echo "Don't know in which window" let local = -1 endif return local endfun " Update a "set" line in the option window fun! <SID>Update(lnum, line, local, thiswin) " get the new value of the option and update the option window line if match(a:line, "=") >= 0 let name = substitute(a:line, '^ \tset \([^=]*\)=.*', '\1', "") else let name = substitute(a:line, '^ \tset \(no\)\=\([a-z]*\).*', '\2', "") endif if name == "pt" && &pt =~ "\x80" let val = <SID>PTvalue() else let val = escape(eval('&' . name), " \t\\\"|") endif if a:local exe a:thiswin . "wincmd w" endif if match(a:line, "=") >= 0 || (val != "0" && val != "1") call setline(a:lnum, " \tset " . name . "=" . val) else if val call setline(a:lnum, " \tset " . name . "\tno" . name) else call setline(a:lnum, " \tset no" . name . "\t" . name) endif endif set nomodified endfun " Reset 'title' and 'icon' to make it work faster. let s:old_title = &title let s:old_icon = &icon let s:old_sc = &sc let s:old_ru = &ru set notitle noicon nosc noru " If the current window is a help window, try finding a non-help window. " Relies on syntax highlighting to be switched on. let s:thiswin = winnr() while exists("b:current_syntax") && b:current_syntax == "help" wincmd w if s:thiswin == winnr() break endif endwhile " Open the window new option-window setlocal ts=15 tw=0 noro buftype=nofile " Insert help and a "set" command for each option. call append(0, '" Each "set" line shows the current value of an option (on the left).') call append(1, '" Hit <CR> on a "set" line to execute it.') call append(2, '" A boolean option will be toggled.') call append(3, '" For other options you can edit the value before hitting <CR>.') call append(4, '" Hit <CR> on a help line to open a help window on this option.') call append(5, '" Hit <CR> on an index line to jump there.') call append(6, '" Hit <Space> on a "set" line to refresh it.') " These functions are called often below. Keep them fast! " Init a local binary option fun! <SID>BinOptionL(name) let val = getwinvar(winnr('#'), '&' . a:name) call append("$", substitute(substitute(" \tset " . val . a:name . "\t" . \!val . a:name, "0", "no", ""), "1", "", "")) endfun " Init a global binary option fun! <SID>BinOptionG(name, val) call append("$", substitute(substitute(" \tset " . a:val . a:name . "\t" . \!a:val . a:name, "0", "no", ""), "1", "", "")) endfun " Init a local string option fun! <SID>OptionL(name) let val = escape(getwinvar(winnr('#'), '&' . a:name), " \t\\\"|") call append("$", " \tset " . a:name . "=" . val) endfun " Init a global string option fun! <SID>OptionG(name, val) call append("$", " \tset " . a:name . "=" . escape(a:val, " \t\\\"|")) endfun let s:idx = 1 let s:lnum = line("$") call append("$", "") fun! <SID>Header(text) let line = s:idx . " " . a:text if s:idx < 10 let line = " " . line endif call append("$", "") call append("$", line) call append("$", "") call append(s:lnum, line) let s:idx = s:idx + 1 let s:lnum = s:lnum + 1 endfun " Get the value of 'pastetoggle'. It could be a special key. fun! <SID>PTvalue() redir @a silent set pt redir END return substitute(@a, '[^=]*=\(.*\)', '\1', "") endfun " Restore the previous value of 'cpoptions' here, it's used below. let &cpo = s:cpo_save " List of all options, organized by function. " The text should be sufficient to know what the option is used for. call <SID>Header("important") call append("$", "compatible\tbehave very Vi compatible (not advisable)") call <SID>BinOptionG("cp", &cp) call append("$", "cpoptions\tlist of flags to specify Vi compatibility") call <SID>OptionG("cpo", &cpo) call append("$", "insertmode\tuse Insert mode as the default mode") call <SID>BinOptionG("im", &im) call append("$", "paste\tpaste mode, insert typed text literally") call <SID>BinOptionG("paste", &paste) call append("$", "pastetoggle\tkey sequence to toggle paste mode") if &pt =~ "\x80" call append("$", " \tset pt=" . <SID>PTvalue()) else call <SID>OptionG("pt", &pt) endif call append("$", "runtimepath\tlist of directories used for runtime files and plugins") call <SID>OptionG("rtp", &rtp) call append("$", "packpath\tlist of directories used for plugin packages") call <SID>OptionG("pp", &pp) call append("$", "helpfile\tname of the main help file") call <SID>OptionG("hf", &hf) call <SID>Header("moving around, searching and patterns") call append("$", "whichwrap\tlist of flags specifying which commands wrap to another line") call append("$", "\t(local to window)") call <SID>OptionL("ww") call append("$", "startofline\tmany jump commands move the cursor to the first non-blank") call append("$", "\tcharacter of a line") call <SID>BinOptionG("sol", &sol) call append("$", "paragraphs\tnroff macro names that separate paragraphs") call <SID>OptionG("para", ¶) call append("$", "sections\tnroff macro names that separate sections") call <SID>OptionG("sect", §) call append("$", "path\tlist of directory names used for file searching") call append("$", "\t(global or local to buffer)") call <SID>OptionG("pa", &pa) call append("$", "cdpath\tlist of directory names used for :cd") call <SID>OptionG("cd", &cd) if exists("+autochdir") call append("$", "autochdir\tchange to directory of file in buffer") call <SID>BinOptionG("acd", &acd) endif call append("$", "wrapscan\tsearch commands wrap around the end of the buffer") call <SID>BinOptionG("ws", &ws) call append("$", "incsearch\tshow match for partly typed search command") call <SID>BinOptionG("is", &is) call append("$", "magic\tchange the way backslashes are used in search patterns") call <SID>BinOptionG("magic", &magic) call append("$", "regexpengine\tselect the default regexp engine used") call <SID>OptionG("re", &re) call append("$", "ignorecase\tignore case when using a search pattern") call <SID>BinOptionG("ic", &ic) call append("$", "smartcase\toverride 'ignorecase' when pattern has upper case characters") call <SID>BinOptionG("scs", &scs) call append("$", "casemap\twhat method to use for changing case of letters") call <SID>OptionG("cmp", &cmp) call append("$", "maxmempattern\tmaximum amount of memory in Kbyte used for pattern matching") call append("$", " \tset mmp=" . &mmp) call append("$", "define\tpattern for a macro definition line") call append("$", "\t(global or local to buffer)") call <SID>OptionG("def", &def) if has("find_in_path") call append("$", "include\tpattern for an include-file line") call append("$", "\t(local to buffer)") call <SID>OptionL("inc") call append("$", "includeexpr\texpression used to transform an include line to a file name") call append("$", "\t(local to buffer)") call <SID>OptionL("inex") endif call <SID>Header("tags") call append("$", "tagbsearch\tuse binary searching in tags files") call <SID>BinOptionG("tbs", &tbs) call append("$", "taglength\tnumber of significant characters in a tag name or zero") call append("$", " \tset tl=" . &tl) call append("$", "tags\tlist of file names to search for tags") call append("$", "\t(global or local to buffer)") call <SID>OptionG("tag", &tag) call append("$", "tagcase\thow to handle case when searching in tags files:") call append("$", "\t\"followic\" to follow 'ignorecase', \"ignore\" or \"match\"") call append("$", "\t(global or local to buffer)") call <SID>OptionG("tc", &tc) call append("$", "tagrelative\tfile names in a tags file are relative to the tags file") call <SID>BinOptionG("tr", &tr) call append("$", "tagstack\ta :tag command will use the tagstack") call <SID>BinOptionG("tgst", &tgst) call append("$", "showfulltag\twhen completing tags in Insert mode show more info") call <SID>BinOptionG("sft", &sft) if has("cscope") call append("$", "cscopeprg\tcommand for executing cscope") call <SID>OptionG("csprg", &csprg) call append("$", "cscopetag\tuse cscope for tag commands") call <SID>BinOptionG("cst", &cst) call append("$", "cscopetagorder\t0 or 1; the order in which \":cstag\" performs a search") call append("$", " \tset csto=" . &csto) call append("$", "cscopeverbose\tgive messages when adding a cscope database") call <SID>BinOptionG("csverb", &csverb) call append("$", "cscopepathcomp\thow many components of the path to show") call append("$", " \tset cspc=" . &cspc) call append("$", "cscopequickfix\twhen to open a quickfix window for cscope") call <SID>OptionG("csqf", &csqf) call append("$", "cscoperelative\tfile names in a cscope file are relative to that file") call <SID>BinOptionG("csre", &csre) endif call <SID>Header("displaying text") call append("$", "scroll\tnumber of lines to scroll for CTRL-U and CTRL-D") call append("$", "\t(local to window)") call <SID>OptionL("scr") call append("$", "scrolloff\tnumber of screen lines to show around the cursor") call append("$", " \tset so=" . &so) call append("$", "wrap\tlong lines wrap") call <SID>BinOptionG("wrap", &wrap) call append("$", "linebreak\twrap long lines at a character in 'breakat'") call append("$", "\t(local to window)") call <SID>BinOptionL("lbr") call append("$", "breakindent\tpreserve indentation in wrapped text") call append("$", "\t(local to window)") call <SID>BinOptionL("bri") call append("$", "breakindentopt\tadjust breakindent behaviour") call append("$", "\t(local to window)") call <SID>OptionL("briopt") call append("$", "breakat\twhich characters might cause a line break") call <SID>OptionG("brk", &brk) call append("$", "showbreak\tstring to put before wrapped screen lines") call <SID>OptionG("sbr", &sbr) call append("$", "sidescroll\tminimal number of columns to scroll horizontally") call append("$", " \tset ss=" . &ss) call append("$", "sidescrolloff\tminimal number of columns to keep left and right of the cursor") call append("$", " \tset siso=" . &siso) call append("$", "display\tinclude \"lastline\" to show the last line even if it doesn't fit") call append("$", "\tinclude \"uhex\" to show unprintable characters as a hex number") call <SID>OptionG("dy", &dy) call append("$", "fillchars\tcharacters to use for the status line, folds and filler lines") call <SID>OptionG("fcs", &fcs) call append("$", "cmdheight\tnumber of lines used for the command-line") call append("$", " \tset ch=" . &ch) call append("$", "columns\twidth of the display") call append("$", " \tset co=" . &co) call append("$", "lines\tnumber of lines in the display") call append("$", " \tset lines=" . &lines) call append("$", "window\tnumber of lines to scroll for CTRL-F and CTRL-B") call append("$", " \tset window=" . &window) call append("$", "lazyredraw\tdon't redraw while executing macros") call <SID>BinOptionG("lz", &lz) if has("reltime") call append("$", "redrawtime\ttimeout for 'hlsearch' and :match highlighting in msec") call append("$", " \tset rdt=" . &rdt) endif call append("$", "writedelay\tdelay in msec for each char written to the display") call append("$", "\t(for debugging)") call append("$", " \tset wd=" . &wd) call append("$", "list\tshow <Tab> as ^I and end-of-line as $") call append("$", "\t(local to window)") call <SID>BinOptionL("list") call append("$", "listchars\tlist of strings used for list mode") call <SID>OptionG("lcs", &lcs) call append("$", "number\tshow the line number for each line") call append("$", "\t(local to window)") call <SID>BinOptionL("nu") call append("$", "relativenumber\tshow the relative line number for each line") call append("$", "\t(local to window)") call <SID>BinOptionL("rnu") if has("linebreak") call append("$", "numberwidth\tnumber of columns to use for the line number") call append("$", "\t(local to window)") call <SID>OptionL("nuw") endif if has("conceal") call append("$", "conceallevel\tcontrols whether concealable text is hidden") call append("$", "\t(local to window)") call <SID>OptionL("cole") call append("$", "concealcursor\tmodes in which text in the cursor line can be concealed") call append("$", "\t(local to window)") call <SID>OptionL("cocu") endif call <SID>Header("syntax, highlighting and spelling") call append("$", "background\t\"dark\" or \"light\"; the background color brightness") call <SID>OptionG("bg", &bg) if has("autocmd") call append("$", "filetype\ttype of file; triggers the FileType event when set") call append("$", "\t(local to buffer)") call <SID>OptionL("ft") endif if has("syntax") call append("$", "syntax\tname of syntax highlighting used") call append("$", "\t(local to buffer)") call <SID>OptionL("syn") call append("$", "synmaxcol\tmaximum column to look for syntax items") call append("$", "\t(local to buffer)") call <SID>OptionL("smc") endif call append("$", "highlight\twhich highlighting to use for various occasions") call <SID>OptionG("hl", &hl) call append("$", "hlsearch\thighlight all matches for the last used search pattern") call <SID>BinOptionG("hls", &hls) if has("termguicolors") call append("$", "termguicolors\tuse GUI colors for the terminal") call <SID>BinOptionG("tgc", &tgc) endif if has("syntax") call append("$", "cursorcolumn\thighlight the screen column of the cursor") call append("$", "\t(local to window)") call <SID>BinOptionL("cuc") call append("$", "cursorline\thighlight the screen line of the cursor") call append("$", "\t(local to window)") call <SID>BinOptionL("cul") call append("$", "colorcolumn\tcolumns to highlight") call append("$", "\t(local to window)") call <SID>OptionL("cc") call append("$", "spell\thighlight spelling mistakes") call append("$", "\t(local to window)") call <SID>BinOptionL("spell") call append("$", "spelllang\tlist of accepted languages") call append("$", "\t(local to buffer)") call <SID>OptionL("spl") call append("$", "spellfile\tfile that \"zg\" adds good words to") call append("$", "\t(local to buffer)") call <SID>OptionL("spf") call append("$", "spellcapcheck\tpattern to locate the end of a sentence") call append("$", "\t(local to buffer)") call <SID>OptionL("spc") call append("$", "spellsuggest\tmethods used to suggest corrections") call <SID>OptionG("sps", &sps) call append("$", "mkspellmem\tamount of memory used by :mkspell before compressing") call <SID>OptionG("msm", &msm) endif call <SID>Header("multiple windows") call append("$", "laststatus\t0, 1 or 2; when to use a status line for the last window") call append("$", " \tset ls=" . &ls) if has("statusline") call append("$", "statusline\talternate format to be used for a status line") call <SID>OptionG("stl", &stl) endif call append("$", "equalalways\tmake all windows the same size when adding/removing windows") call <SID>BinOptionG("ea", &ea) if has("vertsplit") call append("$", "eadirection\tin which direction 'equalalways' works: \"ver\", \"hor\" or \"both\"") call <SID>OptionG("ead", &ead) endif call append("$", "winheight\tminimal number of lines used for the current window") call append("$", " \tset wh=" . &wh) call append("$", "winminheight\tminimal number of lines used for any window") call append("$", " \tset wmh=" . &wmh) call append("$", "winfixheight\tkeep the height of the window") call append("$", "\t(local to window)") call <SID>BinOptionL("wfh") if has("vertsplit") call append("$", "winfixwidth\tkeep the width of the window") call append("$", "\t(local to window)") call <SID>BinOptionL("wfw") call append("$", "winwidth\tminimal number of columns used for the current window") call append("$", " \tset wiw=" . &wiw) call append("$", "winminwidth\tminimal number of columns used for any window") call append("$", " \tset wmw=" . &wmw) endif call append("$", "helpheight\tinitial height of the help window") call append("$", " \tset hh=" . &hh) if has("quickfix") call append("$", "previewheight\tdefault height for the preview window") call append("$", " \tset pvh=" . &pvh) call append("$", "previewwindow\tidentifies the preview window") call append("$", "\t(local to window)") call <SID>BinOptionL("pvw") endif call append("$", "hidden\tdon't unload a buffer when no longer shown in a window") call <SID>BinOptionG("hid", &hid) call append("$", "switchbuf\t\"useopen\" and/or \"split\"; which window to use when jumping") call append("$", "\tto a buffer") call <SID>OptionG("swb", &swb) call append("$", "splitbelow\ta new window is put below the current one") call <SID>BinOptionG("sb", &sb) if has("vertsplit") call append("$", "splitright\ta new window is put right of the current one") call <SID>BinOptionG("spr", &spr) endif if has("scrollbind") call append("$", "scrollbind\tthis window scrolls together with other bound windows") call append("$", "\t(local to window)") call <SID>BinOptionL("scb") call append("$", "scrollopt\t\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'") call <SID>OptionG("sbo", &sbo) endif if has("cursorbind") call append("$", "cursorbind\tthis window's cursor moves together with other bound windows") call append("$", "\t(local to window)") call <SID>BinOptionL("crb") endif if has("terminal") call append("$", "termsize\tsize of a terminal window") call append("$", "\t(local to window)") call <SID>OptionL("tms") call append("$", "termkey\tkey that precedes Vim commands in a terminal window") call append("$", "\t(local to window)") call <SID>OptionL("tk") endif call <SID>Header("multiple tab pages") call append("$", "showtabline\t0, 1 or 2; when to use a tab pages line") call append("$", " \tset stal=" . &stal) call append("$", "tabpagemax\tmaximum number of tab pages to open for -p and \"tab all\"") call append("$", " \tset tpm=" . &tpm) call append("$", "tabline\tcustom tab pages line") call <SID>OptionG("tal", &tal) if has("gui") call append("$", "guitablabel\tcustom tab page label for the GUI") call <SID>OptionG("gtl", >l) call append("$", "guitabtooltip\tcustom tab page tooltip for the GUI") call <SID>OptionG("gtt", >t) endif call <SID>Header("terminal") call append("$", "scrolljump\tminimal number of lines to scroll at a time") call append("$", " \tset sj=" . &sj) if has("gui") || has("msdos") || has("win32") call append("$", "guicursor\tspecifies what the cursor looks like in different modes") call <SID>OptionG("gcr", &gcr) endif if has("title") let &title = s:old_title call append("$", "title\tshow info in the window title") call <SID>BinOptionG("title", &title) set notitle call append("$", "titlelen\tpercentage of 'columns' used for the window title") call append("$", " \tset titlelen=" . &titlelen) call append("$", "titlestring\twhen not empty, string to be used for the window title") call <SID>OptionG("titlestring", &titlestring) call append("$", "titleold\tstring to restore the title to when exiting Vim") call <SID>OptionG("titleold", &titleold) let &icon = s:old_icon call append("$", "icon\tset the text of the icon for this window") call <SID>BinOptionG("icon", &icon) set noicon call append("$", "iconstring\twhen not empty, text for the icon of this window") call <SID>OptionG("iconstring", &iconstring) endif call <SID>Header("using the mouse") call append("$", "mouse\tlist of flags for using the mouse") call <SID>OptionG("mouse", &mouse) if has("gui") call append("$", "mousefocus\tthe window with the mouse pointer becomes the current one") call <SID>BinOptionG("mousef", &mousef) call append("$", "mousehide\thide the mouse pointer while typing") call <SID>BinOptionG("mh", &mh) endif call append("$", "mousemodel\t\"extend\", \"popup\" or \"popup_setpos\"; what the right") call append("$", "\tmouse button is used for") call <SID>OptionG("mousem", &mousem) call append("$", "mousetime\tmaximum time in msec to recognize a double-click") call append("$", " \tset mouset=" . &mouset) if has("mouseshape") call append("$", "mouseshape\twhat the mouse pointer looks like in different modes") call <SID>OptionG("mouses", &mouses) endif if has("gui") call <SID>Header("GUI") call append("$", "guifont\tlist of font names to be used in the GUI") call <SID>OptionG("gfn", &gfn) if has("xfontset") call append("$", "guifontset\tpair of fonts to be used, for multibyte editing") call <SID>OptionG("gfs", &gfs) endif call append("$", "guifontwide\tlist of font names to be used for double-wide characters") call <SID>OptionG("gfw", &gfw) call append("$", "guioptions\tlist of flags that specify how the GUI works") call <SID>OptionG("go", &go) if has("gui_gtk") call append("$", "toolbar\t\"icons\", \"text\" and/or \"tooltips\"; how to show the toolbar") call <SID>OptionG("tb", &tb) if has("gui_gtk2") call append("$", "toolbariconsize\tsize of toolbar icons") call <SID>OptionG("tbis", &tbis) endif endif if has("browse") call append("$", "browsedir\t\"last\", \"buffer\" or \"current\": which directory used for the file browser") call <SID>OptionG("bsdir", &bsdir) endif if has("multi_lang") call append("$", "langmenu\tlanguage to be used for the menus") call <SID>OptionG("langmenu", &lm) endif call append("$", "menuitems\tmaximum number of items in one menu") call append("$", " \tset mis=" . &mis) if has("winaltkeys") call append("$", "winaltkeys\t\"no\", \"yes\" or \"menu\"; how to use the ALT key") call <SID>OptionG("wak", &wak) endif call append("$", "linespace\tnumber of pixel lines to use between characters") call append("$", " \tset lsp=" . &lsp) if has("balloon_eval") call append("$", "balloondelay\tdelay in milliseconds before a balloon may pop up") call append("$", " \tset bdlay=" . &bdlay) call append("$", "ballooneval\twhether the balloon evaluation is to be used") call <SID>BinOptionG("beval", &beval) if has("eval") call append("$", "balloonexpr\texpression to show in balloon eval") call append("$", " \tset bexpr=" . &bexpr) endif endif endif if has("printer") call <SID>Header("printing") call append("$", "printoptions\tlist of items that control the format of :hardcopy output") call <SID>OptionG("popt", &popt) call append("$", "printdevice\tname of the printer to be used for :hardcopy") call <SID>OptionG("pdev", &pdev) if has("postscript") call append("$", "printexpr\texpression used to print the PostScript file for :hardcopy") call <SID>OptionG("pexpr", &pexpr) endif call append("$", "printfont\tname of the font to be used for :hardcopy") call <SID>OptionG("pfn", &pfn) call append("$", "printheader\tformat of the header used for :hardcopy") call <SID>OptionG("pheader", &pheader) if has("postscript") call append("$", "printencoding\tencoding used to print the PostScript file for :hardcopy") call <SID>OptionG("penc", &penc) endif if has("multi_byte") call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy") call <SID>OptionG("pmbcs", &pmbcs) call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy") call <SID>OptionG("pmbfn", &pmbfn) endif endif call <SID>Header("messages and info") call append("$", "terse\tadd 's' flag in 'shortmess' (don't show search message)") call <SID>BinOptionG("terse", &terse) call append("$", "shortmess\tlist of flags to make messages shorter") call <SID>OptionG("shm", &shm) call append("$", "showcmd\tshow (partial) command keys in the status line") let &sc = s:old_sc call <SID>BinOptionG("sc", &sc) set nosc call append("$", "showmode\tdisplay the current mode in the status line") call <SID>BinOptionG("smd", &smd) call append("$", "ruler\tshow cursor position below each window") let &ru = s:old_ru call <SID>BinOptionG("ru", &ru) set noru if has("statusline") call append("$", "rulerformat\talternate format to be used for the ruler") call <SID>OptionG("ruf", &ruf) endif call append("$", "report\tthreshold for reporting number of changed lines") call append("$", " \tset report=" . &report) call append("$", "verbose\tthe higher the more messages are given") call append("$", " \tset vbs=" . &vbs) call append("$", "verbosefile\tfile to write messages in") call <SID>OptionG("vfile", &vfile) call append("$", "more\tpause listings when the screen is full") call <SID>BinOptionG("more", &more) if has("dialog_con") || has("dialog_gui") call append("$", "confirm\tstart a dialog when a command fails") call <SID>BinOptionG("cf", &cf) endif call append("$", "errorbells\tring the bell for error messages") call <SID>BinOptionG("eb", &eb) call append("$", "visualbell\tuse a visual bell instead of beeping") call <SID>BinOptionG("vb", &vb) call append("$", "belloff\tdo not ring the bell for these reasons") call <SID>OptionG("belloff", &belloff) if has("multi_lang") call append("$", "helplang\tlist of preferred languages for finding help") call <SID>OptionG("hlg", &hlg) endif call <SID>Header("selecting text") call append("$", "selection\t\"old\", \"inclusive\" or \"exclusive\"; how selecting text behaves") call <SID>OptionG("sel", &sel) call append("$", "selectmode\t\"mouse\", \"key\" and/or \"cmd\"; when to start Select mode") call append("$", "\tinstead of Visual mode") call <SID>OptionG("slm", &slm) if has("clipboard") call append("$", "clipboard\t\"unnamed\" to use the * register like unnamed register") call append("$", "\t\"autoselect\" to always put selected text on the clipboard") call <SID>OptionG("cb", &cb) endif call append("$", "keymodel\t\"startsel\" and/or \"stopsel\"; what special keys can do") call <SID>OptionG("km", &km) call <SID>Header("editing text") call append("$", "undolevels\tmaximum number of changes that can be undone") call append("$", "\t(global or local to buffer)") call append("$", " \tset ul=" . &ul) call append("$", "undofile\tautomatically save and restore undo history") call <SID>BinOptionG("udf", &udf) call append("$", "undodir\tlist of directories for undo files") call <SID>OptionG("udir", &udir) call append("$", "undoreload\tmaximum number lines to save for undo on a buffer reload") call append("$", " \tset ur=" . &ur) call append("$", "modified\tchanges have been made and not written to a file") call append("$", "\t(local to buffer)") call <SID>BinOptionL("mod") call append("$", "readonly\tbuffer is not to be written") call append("$", "\t(local to buffer)") call <SID>BinOptionL("ro") call append("$", "modifiable\tchanges to the text are not possible") call append("$", "\t(local to buffer)") call <SID>BinOptionL("ma") call append("$", "textwidth\tline length above which to break a line") call append("$", "\t(local to buffer)") call <SID>OptionL("tw") call append("$", "wrapmargin\tmargin from the right in which to break a line") call append("$", "\t(local to buffer)") call <SID>OptionL("wm") call append("$", "backspace\tspecifies what <BS>, CTRL-W, etc. can do in Insert mode") call append("$", " \tset bs=" . &bs) call append("$", "comments\tdefinition of what comment lines look like") call append("$", "\t(local to buffer)") call <SID>OptionL("com") call append("$", "formatoptions\tlist of flags that tell how automatic formatting works") call append("$", "\t(local to buffer)") call <SID>OptionL("fo") call append("$", "formatlistpat\tpattern to recognize a numbered list") call append("$", "\t(local to buffer)") call <SID>OptionL("flp") if has("eval") call append("$", "formatexpr\texpression used for \"gq\" to format lines") call append("$", "\t(local to buffer)") call <SID>OptionL("fex") endif if has("insert_expand") call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P") call append("$", "\t(local to buffer)") call <SID>OptionL("cpt") call append("$", "completeopt\twhether to use a popup menu for Insert mode completion") call <SID>OptionG("cot", &cot) call append("$", "pumheight\tmaximum height of the popup menu") call <SID>OptionG("ph", &ph) call append("$", "completefunc\tuser defined function for Insert mode completion") call append("$", "\t(local to buffer)") call <SID>OptionL("cfu") call append("$", "omnifunc\tfunction for filetype-specific Insert mode completion") call append("$", "\t(local to buffer)") call <SID>OptionL("ofu") call append("$", "dictionary\tlist of dictionary files for keyword completion") call append("$", "\t(global or local to buffer)") call <SID>OptionG("dict", &dict) call append("$", "thesaurus\tlist of thesaurus files for keyword completion") call append("$", "\t(global or local to buffer)") call <SID>OptionG("tsr", &tsr) endif call append("$", "infercase\tadjust case of a keyword completion match") call append("$", "\t(local to buffer)") call <SID>BinOptionL("inf") if has("digraphs") call append("$", "digraph\tenable entering digraphs with c1 <BS> c2") call <SID>BinOptionG("dg", &dg) endif call append("$", "tildeop\tthe \"~\" command behaves like an operator") call <SID>BinOptionG("top", &top) call append("$", "operatorfunc\tfunction called for the\"g@\" operator") call <SID>OptionG("opfunc", &opfunc) call append("$", "showmatch\twhen inserting a bracket, briefly jump to its match") call <SID>BinOptionG("sm", &sm) call append("$", "matchtime\ttenth of a second to show a match for 'showmatch'") call append("$", " \tset mat=" . &mat) call append("$", "matchpairs\tlist of pairs that match for the \"%\" command") call append("$", "\t(local to buffer)") call <SID>OptionL("mps") call append("$", "joinspaces\tuse two spaces after '.' when joining a line") call <SID>BinOptionG("js", &js) call append("$", "nrformats\t\"alpha\", \"octal\" and/or \"hex\"; number formats recognized for") call append("$", "\tCTRL-A and CTRL-X commands") call append("$", "\t(local to buffer)") call <SID>OptionL("nf") call <SID>Header("tabs and indenting") call append("$", "tabstop\tnumber of spaces a <Tab> in the text stands for") call append("$", "\t(local to buffer)") call <SID>OptionL("ts") call append("$", "shiftwidth\tnumber of spaces used for each step of (auto)indent") call append("$", "\t(local to buffer)") call <SID>OptionL("sw") call append("$", "smarttab\ta <Tab> in an indent inserts 'shiftwidth' spaces") call <SID>BinOptionG("sta", &sta) call append("$", "softtabstop\tif non-zero, number of spaces to insert for a <Tab>") call append("$", "\t(local to buffer)") call <SID>OptionL("sts") call append("$", "shiftround\tround to 'shiftwidth' for \"<<\" and \">>\"") call <SID>BinOptionG("sr", &sr) call append("$", "expandtab\texpand <Tab> to spaces in Insert mode") call append("$", "\t(local to buffer)") call <SID>BinOptionL("et") call append("$", "autoindent\tautomatically set the indent of a new line") call append("$", "\t(local to buffer)") call <SID>BinOptionL("ai") if has("smartindent") call append("$", "smartindent\tdo clever autoindenting") call append("$", "\t(local to buffer)") call <SID>BinOptionL("si") endif if has("cindent") call append("$", "cindent\tenable specific indenting for C code") call append("$", "\t(local to buffer)") call <SID>BinOptionL("cin") call append("$", "cinoptions\toptions for C-indenting") call append("$", "\t(local to buffer)") call <SID>OptionL("cino") call append("$", "cinkeys\tkeys that trigger C-indenting in Insert mode") call append("$", "\t(local to buffer)") call <SID>OptionL("cink") call append("$", "cinwords\tlist of words that cause more C-indent") call append("$", "\t(local to buffer)") call <SID>OptionL("cinw") call append("$", "indentexpr\texpression used to obtain the indent of a line") call append("$", "\t(local to buffer)") call <SID>OptionL("inde") call append("$", "indentkeys\tkeys that trigger indenting with 'indentexpr' in Insert mode") call append("$", "\t(local to buffer)") call <SID>OptionL("indk") endif call append("$", "copyindent\tcopy whitespace for indenting from previous line") call append("$", "\t(local to buffer)") call <SID>BinOptionL("ci") call append("$", "preserveindent\tpreserve kind of whitespace when changing indent") call append("$", "\t(local to buffer)") call <SID>BinOptionL("pi") if has("lispindent") call append("$", "lisp\tenable lisp mode") call append("$", "\t(local to buffer)") call <SID>BinOptionL("lisp") call append("$", "lispwords\twords that change how lisp indenting works") call <SID>OptionL("lw") endif if has("folding") call <SID>Header("folding") call append("$", "foldenable\tset to display all folds open") call append("$", "\t(local to window)") call <SID>BinOptionL("fen") call append("$", "foldlevel\tfolds with a level higher than this number will be closed") call append("$", "\t(local to window)") call <SID>OptionL("fdl") call append("$", "foldlevelstart\tvalue for 'foldlevel' when starting to edit a file") call append("$", " \tset fdls=" . &fdls) call append("$", "foldcolumn\twidth of the column used to indicate folds") call append("$", "\t(local to window)") call <SID>OptionL("fdc") call append("$", "foldtext\texpression used to display the text of a closed fold") call append("$", "\t(local to window)") call <SID>OptionL("fdt") call append("$", "foldclose\tset to \"all\" to close a fold when the cursor leaves it") call <SID>OptionG("fcl", &fcl) call append("$", "foldopen\tspecifies for which commands a fold will be opened") call <SID>OptionG("fdo", &fdo) call append("$", "foldminlines\tminimum number of screen lines for a fold to be closed") call append("$", "\t(local to window)") call <SID>OptionL("fml") call append("$", "commentstring\ttemplate for comments; used to put the marker in") call <SID>OptionL("cms") call append("$", "foldmethod\tfolding type: \"manual\", \"indent\", \"expr\", \"marker\" or \"syntax\"") call append("$", "\t(local to window)") call <SID>OptionL("fdm") call append("$", "foldexpr\texpression used when 'foldmethod' is \"expr\"") call append("$", "\t(local to window)") call <SID>OptionL("fde") call append("$", "foldignore\tused to ignore lines when 'foldmethod' is \"indent\"") call append("$", "\t(local to window)") call <SID>OptionL("fdi") call append("$", "foldmarker\tmarkers used when 'foldmethod' is \"marker\"") call append("$", "\t(local to window)") call <SID>OptionL("fmr") call append("$", "foldnestmax\tmaximum fold depth for when 'foldmethod is \"indent\" or \"syntax\"") call append("$", "\t(local to window)") call <SID>OptionL("fdn") endif if has("diff") call <SID>Header("diff mode") call append("$", "diff\tuse diff mode for the current window") call append("$", "\t(local to window)") call <SID>BinOptionL("diff") call append("$", "diffopt\toptions for using diff mode") call <SID>OptionG("dip", &dip) call append("$", "diffexpr\texpression used to obtain a diff file") call <SID>OptionG("dex", &dex) call append("$", "patchexpr\texpression used to patch a file") call <SID>OptionG("pex", &pex) endif call <SID>Header("mapping") call append("$", "maxmapdepth\tmaximum depth of mapping") call append("$", " \tset mmd=" . &mmd) call append("$", "remap\trecognize mappings in mapped keys") call <SID>BinOptionG("remap", &remap) call append("$", "timeout\tallow timing out halfway into a mapping") call <SID>BinOptionG("to", &to) call append("$", "ttimeout\tallow timing out halfway into a key code") call <SID>BinOptionG("ttimeout", &ttimeout) call append("$", "timeoutlen\ttime in msec for 'timeout'") call append("$", " \tset tm=" . &tm) call append("$", "ttimeoutlen\ttime in msec for 'ttimeout'") call append("$", " \tset ttm=" . &ttm) call <SID>Header("reading and writing files") call append("$", "modeline\tenable using settings from modelines when reading a file") call append("$", "\t(local to buffer)") call <SID>BinOptionL("ml") call append("$", "modelines\tnumber of lines to check for modelines") call append("$", " \tset mls=" . &mls) call append("$", "binary\tbinary file editing") call append("$", "\t(local to buffer)") call <SID>BinOptionL("bin") call append("$", "endofline\tlast line in the file has an end-of-line") call append("$", "\t(local to buffer)") call <SID>BinOptionL("eol") call append("$", "fixendofline\tfixes missing end-of-line at end of text file") call append("$", "\t(local to buffer)") call <SID>BinOptionL("fixeol") if has("multi_byte") call append("$", "bomb\tprepend a Byte Order Mark to the file") call append("$", "\t(local to buffer)") call <SID>BinOptionL("bomb") endif call append("$", "fileformat\tend-of-line format: \"dos\", \"unix\" or \"mac\"") call append("$", "\t(local to buffer)") call <SID>OptionL("ff") call append("$", "fileformats\tlist of file formats to look for when editing a file") call <SID>OptionG("ffs", &ffs) call append("$", "\t(local to buffer)") call append("$", "write\twriting files is allowed") call <SID>BinOptionG("write", &write) call append("$", "writebackup\twrite a backup file before overwriting a file") call <SID>BinOptionG("wb", &wb) call append("$", "backup\tkeep a backup after overwriting a file") call <SID>BinOptionG("bk", &bk) call append("$", "backupskip\tpatterns that specify for which files a backup is not made") call append("$", " \tset bsk=" . &bsk) call append("$", "backupcopy\twhether to make the backup as a copy or rename the existing file") call append("$", "\t(global or local to buffer)") call append("$", " \tset bkc=" . &bkc) call append("$", "backupdir\tlist of directories to put backup files in") call <SID>OptionG("bdir", &bdir) call append("$", "backupext\tfile name extension for the backup file") call <SID>OptionG("bex", &bex) call append("$", "autowrite\tautomatically write a file when leaving a modified buffer") call <SID>BinOptionG("aw", &aw) call append("$", "autowriteall\tas 'autowrite', but works with more commands") call <SID>BinOptionG("awa", &awa) call append("$", "writeany\talways write without asking for confirmation") call <SID>BinOptionG("wa", &wa) call append("$", "autoread\tautomatically read a file when it was modified outside of Vim") call append("$", "\t(global or local to buffer)") call <SID>BinOptionG("ar", &ar) call append("$", "patchmode\tkeep oldest version of a file; specifies file name extension") call <SID>OptionG("pm", &pm) call append("$", "fsync\tforcibly sync the file to disk after writing it") call <SID>BinOptionG("fs", &fs) call <SID>Header("the swap file") call append("$", "directory\tlist of directories for the swap file") call <SID>OptionG("dir", &dir) call append("$", "swapfile\tuse a swap file for this buffer") call append("$", "\t(local to buffer)") call <SID>BinOptionL("swf") call append("$", "updatecount\tnumber of characters typed to cause a swap file update") call append("$", " \tset uc=" . &uc) call append("$", "updatetime\ttime in msec after which the swap file will be updated") call append("$", " \tset ut=" . &ut) call append("$", "maxmem\tmaximum amount of memory in Kbyte used for one buffer") call append("$", " \tset mm=" . &mm) call append("$", "maxmemtot\tmaximum amount of memory in Kbyte used for all buffers") call append("$", " \tset mmt=" . &mmt) call <SID>Header("command line editing") call append("$", "history\thow many command lines are remembered ") call append("$", " \tset hi=" . &hi) call append("$", "wildchar\tkey that triggers command-line expansion") call append("$", " \tset wc=" . &wc) call append("$", "wildcharm\tlike 'wildchar' but can also be used in a mapping") call append("$", " \tset wcm=" . &wcm) call append("$", "wildmode\tspecifies how command line completion works") call <SID>OptionG("wim", &wim) if has("wildoptions") call append("$", "wildoptions\tempty or \"tagfile\" to list file name of matching tags") call <SID>OptionG("wop", &wop) endif call append("$", "suffixes\tlist of file name extensions that have a lower priority") call <SID>OptionG("su", &su) if has("file_in_path") call append("$", "suffixesadd\tlist of file name extensions added when searching for a file") call append("$", "\t(local to buffer)") call <SID>OptionL("sua") endif if has("wildignore") call append("$", "wildignore\tlist of patterns to ignore files for file name completion") call <SID>OptionG("wig", &wig) endif call append("$", "fileignorecase\tignore case when using file names") call <SID>BinOptionG("fic", &fic) call append("$", "wildignorecase\tignore case when completing file names") call <SID>BinOptionG("wic", &wic) if has("wildmenu") call append("$", "wildmenu\tcommand-line completion shows a list of matches") call <SID>BinOptionG("wmnu", &wmnu) endif if has("vertsplit") call append("$", "cedit\tkey used to open the command-line window") call <SID>OptionG("cedit", &cedit) call append("$", "cmdwinheight\theight of the command-line window") call <SID>OptionG("cwh", &cwh) endif call <SID>Header("executing external commands") call append("$", "shell\tname of the shell program used for external commands") call <SID>OptionG("sh", &sh) call append("$", "shellquote\tcharacter(s) to enclose a shell command in") call <SID>OptionG("shq", &shq) call append("$", "shellxquote\tlike 'shellquote' but include the redirection") call <SID>OptionG("sxq", &sxq) call append("$", "shellxescape\tcharacters to escape when 'shellxquote' is (") call <SID>OptionG("sxe", &sxe) call append("$", "shellcmdflag\targument for 'shell' to execute a command") call <SID>OptionG("shcf", &shcf) call append("$", "shellredir\tused to redirect command output to a file") call <SID>OptionG("srr", &srr) call append("$", "shelltemp\tuse a temp file for shell commands instead of using a pipe") call <SID>BinOptionG("stmp", &stmp) call append("$", "equalprg\tprogram used for \"=\" command") call append("$", "\t(global or local to buffer)") call <SID>OptionG("ep", &ep) call append("$", "formatprg\tprogram used to format lines with \"gq\" command") call <SID>OptionG("fp", &fp) call append("$", "keywordprg\tprogram used for the \"K\" command") call <SID>OptionG("kp", &kp) call append("$", "warn\twarn when using a shell command and a buffer has changes") call <SID>BinOptionG("warn", &warn) if has("quickfix") call <SID>Header("running make and jumping to errors") call append("$", "errorfile\tname of the file that contains error messages") call <SID>OptionG("ef", &ef) call append("$", "errorformat\tlist of formats for error messages") call append("$", "\t(global or local to buffer)") call <SID>OptionG("efm", &efm) call append("$", "makeprg\tprogram used for the \":make\" command") call append("$", "\t(global or local to buffer)") call <SID>OptionG("mp", &mp) call append("$", "shellpipe\tstring used to put the output of \":make\" in the error file") call <SID>OptionG("sp", &sp) call append("$", "makeef\tname of the errorfile for the 'makeprg' command") call <SID>OptionG("mef", &mef) call append("$", "grepprg\tprogram used for the \":grep\" command") call append("$", "\t(global or local to buffer)") call <SID>OptionG("gp", &gp) call append("$", "grepformat\tlist of formats for output of 'grepprg'") call <SID>OptionG("gfm", &gfm) endif if has("msdos") || has("win16") || has("win32") call <SID>Header("system specific") if has("msdos") || has("win16") || has("win32") call append("$", "shellslash\tuse forward slashes in file names; for Unix-like shells") call <SID>BinOptionG("ssl", &ssl) endif endif call <SID>Header("language specific") call append("$", "isfname\tspecifies the characters in a file name") call <SID>OptionG("isf", &isf) call append("$", "isident\tspecifies the characters in an identifier") call <SID>OptionG("isi", &isi) call append("$", "iskeyword\tspecifies the characters in a keyword") call append("$", "\t(local to buffer)") call <SID>OptionL("isk") call append("$", "isprint\tspecifies printable characters") call <SID>OptionG("isp", &isp) if has("textobjects") call append("$", "quoteescape\tspecifies escape characters in a string") call append("$", "\t(local to buffer)") call <SID>OptionL("qe") endif if has("rightleft") call append("$", "rightleft\tdisplay the buffer right-to-left") call append("$", "\t(local to window)") call <SID>BinOptionL("rl") call append("$", "rightleftcmd\twhen to edit the command-line right-to-left") call append("$", "\t(local to window)") call <SID>OptionL("rlc") call append("$", "revins\tinsert characters backwards") call <SID>BinOptionG("ri", &ri) call append("$", "allowrevins\tallow CTRL-_ in Insert and Command-line mode to toggle 'revins'") call <SID>BinOptionG("ari", &ari) call append("$", "aleph\tthe ASCII code for the first letter of the Hebrew alphabet") call append("$", " \tset al=" . &al) call append("$", "hkmap\tuse Hebrew keyboard mapping") call <SID>BinOptionG("hk", &hk) call append("$", "hkmapp\tuse phonetic Hebrew keyboard mapping") call <SID>BinOptionG("hkp", &hkp) endif if has("farsi") call append("$", "altkeymap\tuse Farsi as the second language when 'revins' is set") call <SID>BinOptionG("akm", &akm) call append("$", "fkmap\tuse Farsi keyboard mapping") call <SID>BinOptionG("fk", &fk) endif if has("arabic") call append("$", "arabic\tprepare for editing Arabic text") call append("$", "\t(local to window)") call <SID>BinOptionL("arab") call append("$", "arabicshape\tperform shaping of Arabic characters") call <SID>BinOptionG("arshape", &arshape) call append("$", "termbidi\tterminal will perform bidi handling") call <SID>BinOptionG("tbidi", &tbidi) endif if has("keymap") call append("$", "keymap\tname of a keyboard mapping") call <SID>OptionL("kmp") endif if has("langmap") call append("$", "langmap\tlist of characters that are translated in Normal mode") call <SID>OptionG("lmap", &lmap) call append("$", "langremap\tapply 'langmap' to mapped characters") call <SID>BinOptionG("lrm", &lrm) endif if has("xim") call append("$", "imdisable\twhen set never use IM; overrules following IM options") call <SID>BinOptionG("imd", &imd) endif call append("$", "iminsert\tin Insert mode: 1: use :lmap; 2: use IM; 0: neither") call append("$", "\t(local to window)") call <SID>OptionL("imi") call append("$", "imsearch\tentering a search pattern: 1: use :lmap; 2: use IM; 0: neither") call append("$", "\t(local to window)") call <SID>OptionL("ims") if has("xim") call append("$", "imcmdline\twhen set always use IM when starting to edit a command line") call <SID>BinOptionG("imc", &imc) call append("$", "imstatusfunc\tfunction to obtain IME status") call <SID>OptionG("imsf", &imsf) call append("$", "imactivatefunc\tfunction to enable/disable IME") call <SID>OptionG("imaf", &imaf) endif if has("multi_byte") call <SID>Header("multi-byte characters") call append("$", "encoding\tcharacter encoding used in Vim: \"latin1\", \"utf-8\"") call append("$", "\t\"euc-jp\", \"big5\", etc.") call <SID>OptionG("enc", &enc) call append("$", "fileencoding\tcharacter encoding for the current file") call append("$", "\t(local to buffer)") call <SID>OptionL("fenc") call append("$", "fileencodings\tautomatically detected character encodings") call <SID>OptionG("fencs", &fencs) call append("$", "charconvert\texpression used for character encoding conversion") call <SID>OptionG("ccv", &ccv) call append("$", "delcombine\tdelete combining (composing) characters on their own") call <SID>BinOptionG("deco", &deco) call append("$", "maxcombine\tmaximum number of combining (composing) characters displayed") call <SID>OptionG("mco", &mco) if has("xim") && has("gui_gtk") call append("$", "imactivatekey\tkey that activates the X input method") call <SID>OptionG("imak", &imak) endif call append("$", "ambiwidth\twidth of ambiguous width characters") call <SID>OptionG("ambw", &ambw) call append("$", "emoji\temoji characters are full width") call <SID>BinOptionG("emo", &emo) endif call <SID>Header("various") if has("virtualedit") call append("$", "virtualedit\twhen to use virtual editing: \"block\", \"insert\" and/or \"all\"") call <SID>OptionG("ve", &ve) endif if has("autocmd") call append("$", "eventignore\tlist of autocommand events which are to be ignored") call <SID>OptionG("ei", &ei) endif call append("$", "loadplugins\tload plugin scripts when starting up") call <SID>BinOptionG("lpl", &lpl) call append("$", "exrc\tenable reading .vimrc/.exrc/.gvimrc in the current directory") call <SID>BinOptionG("ex", &ex) call append("$", "secure\tsafer working with script files in the current directory") call <SID>BinOptionG("secure", &secure) call append("$", "gdefault\tuse the 'g' flag for \":substitute\"") call <SID>BinOptionG("gd", &gd) if exists("+opendevice") call append("$", "opendevice\tallow reading/writing devices") call <SID>BinOptionG("odev", &odev) endif if exists("+maxfuncdepth") call append("$", "maxfuncdepth\tmaximum depth of function calls") call append("$", " \tset mfd=" . &mfd) endif if has("mksession") call append("$", "sessionoptions\tlist of words that specifies what to put in a session file") call <SID>OptionG("ssop", &ssop) call append("$", "viewoptions\tlist of words that specifies what to save for :mkview") call <SID>OptionG("vop", &vop) call append("$", "viewdir\tdirectory where to store files with :mkview") call <SID>OptionG("vdir", &vdir) endif if has("shada") call append("$", "viminfo\tlist that specifies what to write in the ShaDa file") call <SID>OptionG("vi", &vi) endif if has("quickfix") call append("$", "bufhidden\twhat happens with a buffer when it's no longer in a window") call append("$", "\t(local to buffer)") call <SID>OptionL("bh") call append("$", "buftype\t\"\", \"nofile\", \"nowrite\" or \"quickfix\": type of buffer") call append("$", "\t(local to buffer)") call <SID>OptionL("bt") endif call append("$", "buflisted\twhether the buffer shows up in the buffer list") call append("$", "\t(local to buffer)") call <SID>BinOptionL("bl") call append("$", "debug\tset to \"msg\" to see all error messages") call append("$", " \tset debug=" . &debug) call append("$", "signcolumn\twhether to show the signcolumn") call append("$", "\t(local to window)") call <SID>OptionL("scl") set cpo&vim " go to first line 1 " reset 'modified', so that ":q" can be used to close the window setlocal nomodified if has("syntax") " Use Vim highlighting, with some additional stuff setlocal ft=vim syn match optwinHeader "^ \=[0-9].*" syn match optwinName "^[a-z]*\t" nextgroup=optwinComment syn match optwinComment ".*" contained syn match optwinComment "^\t.*" if !exists("did_optwin_syntax_inits") let did_optwin_syntax_inits = 1 hi link optwinHeader Title hi link optwinName Identifier hi link optwinComment Comment endif endif if exists("&mzschemedll") call append("$", "mzschemedll\tname of the Tcl dynamic library") call <SID>OptionG("mzschemedll", &mzschemedll) call append("$", "mzschemegcdll\tname of the Tcl GC dynamic library") call <SID>OptionG("mzschemegcdll", &mzschemegcdll) endif " Install autocommands to enable mappings in option-window noremap <silent> <buffer> <CR> <C-\><C-N>:call <SID>CR()<CR> inoremap <silent> <buffer> <CR> <Esc>:call <SID>CR()<CR> noremap <silent> <buffer> <Space> :call <SID>Space()<CR> " Make the buffer be deleted when the window is closed. setlocal buftype=nofile bufhidden=delete noswapfile augroup optwin au! BufUnload,BufHidden option-window nested \ call <SID>unload() | delfun <SID>unload augroup END fun! <SID>unload() delfun <SID>CR delfun <SID>Space delfun <SID>Find delfun <SID>Update delfun <SID>OptionL delfun <SID>OptionG delfun <SID>BinOptionL delfun <SID>BinOptionG delfun <SID>Header au! optwin endfun " Restore the previous value of 'title' and 'icon'. let &title = s:old_title let &icon = s:old_icon let &ru = s:old_ru let &sc = s:old_sc let &cpo = s:cpo_save unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum " vim: ts=8 sw=2 sts=2 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/��������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0015407�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/���������������������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0016352�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/�����������������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0017154�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/justify/���������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0020651�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/justify/plugin/��������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0022147�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/justify/plugin/justify.vim���������������������������������������0000664�0000000�0000000�00000021710�13204015742�0024362�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Function to left and right align text. " " Written by: Preben "Peppe" Guldberg <c928400@student.dtu.dk> " Created: 980806 14:13 (or around that time anyway) " Revised: 001103 00:36 (See "Revisions" below) " function Justify( [ textwidth [, maxspaces [, indent] ] ] ) " " Justify() will left and right align a line by filling in an " appropriate amount of spaces. Extra spaces are added to existing " spaces starting from the right side of the line. As an example, the " following documentation has been justified. " " The function takes the following arguments: " textwidth argument " ------------------ " If not specified, the value of the 'textwidth' option is used. If " 'textwidth' is zero a value of 80 is used. " " Additionally the arguments 'tw' and '' are accepted. The value of " 'textwidth' will be used. These are handy, if you just want to specify " the maxspaces argument. " maxspaces argument " ------------------ " If specified, alignment will only be done, if the longest space run " after alignment is no longer than maxspaces. " " An argument of '' is accepted, should the user like to specify all " arguments. " " To aid user defined commands, negative values are accepted aswell. " Using a negative value specifies the default behaviour: any length of " space runs will be used to justify the text. " indent argument " --------------- " This argument specifies how a line should be indented. The default is " to keep the current indentation. " " Negative values: Keep current amount of leading whitespace. " Positive values: Indent all lines with leading whitespace using this " amount of whitespace. " " Note that the value 0, needs to be quoted as a string. This value " leads to a left flushed text. " " Additionally units of 'shiftwidth'/'sw' and 'tabstop'/'ts' may be " added. In this case, if the value of indent is positive, the amount of " whitespace to be added will be multiplied by the value of the " 'shiftwidth' and 'tabstop' settings. If these units are used, the " argument must be given as a string, eg. Justify('','','2sw'). " " If the values of 'sw' or 'tw' are negative, they are treated as if " they were 0, which means that the text is flushed left. There is no " check if a negative number prefix is used to change the sign of a " negative 'sw' or 'ts' value. " " As with the other arguments, '' may be used to get the default " behaviour. " Notes: " " If the line, adjusted for space runs and leading/trailing whitespace, " is wider than the used textwidth, the line will be left untouched (no " whitespace removed). This should be equivalent to the behaviour of " :left, :right and :center. " " If the resulting line is shorter than the used textwidth it is left " untouched. " " All space runs in the line are truncated before the alignment is " carried out. " " If you have set 'noexpandtab', :retab! is used to replace space runs " with whitespace using the value of 'tabstop'. This should be " conformant with :left, :right and :center. " " If joinspaces is set, an extra space is added after '.', '?' and '!'. " If 'cpooptions' include 'j', extra space is only added after '.'. " (This may on occasion conflict with maxspaces.) " Related mappings: " " Mappings that will align text using the current text width, using at " most four spaces in a space run and keeping current indentation. nmap _j :%call Justify('tw',4)<CR> vmap _j :call Justify('tw',4)<CR> " " Mappings that will remove space runs and format lines (might be useful " prior to aligning the text). nmap ,gq :%s/\s\+/ /g<CR>gq1G vmap ,gq :s/\s\+/ /g<CR>gvgq " User defined command: " " The following is an ex command that works as a shortcut to the Justify " function. Arguments to Justify() can be added after the command. com! -range -nargs=* Justify <line1>,<line2>call Justify(<f-args>) " " The following commands are all equivalent: " " 1. Simplest use of Justify(): " :call Justify() " :Justify " " 2. The _j mapping above via the ex command: " :%Justify tw 4 " " 3. Justify visualised text at 72nd column while indenting all " previously indented text two shiftwidths " :'<,'>call Justify(72,'','2sw') " :'<,'>Justify 72 -1 2sw " " This documentation has been justified using the following command: ":se et|kz|1;/^" function Justify(/+,'z-g/^" /s/^" //|call Justify(70,3)|s/^/" / " Revisions: " 001103: If 'joinspaces' was set, calculations could be wrong. " Tabs at start of line could also lead to errors. " Use setline() instead of "exec 's/foo/bar/' - safer. " Cleaned up the code a bit. " " Todo: Convert maps to the new script specific form " Error function function! Justify_error(message) echohl Error echo "Justify([tw, [maxspaces [, indent]]]): " . a:message echohl None endfunction " Now for the real thing function! Justify(...) range if a:0 > 3 call Justify_error("Too many arguments (max 3)") return 1 endif " Set textwidth (accept 'tw' and '' as arguments) if a:0 >= 1 if a:1 =~ '^\(tw\)\=$' let tw = &tw elseif a:1 =~ '^\d\+$' let tw = a:1 else call Justify_error("tw must be a number (>0), '' or 'tw'") return 2 endif else let tw = &tw endif if tw == 0 let tw = 80 endif " Set maximum number of spaces between WORDs if a:0 >= 2 if a:2 == '' let maxspaces = tw elseif a:2 =~ '^-\d\+$' let maxspaces = tw elseif a:2 =~ '^\d\+$' let maxspaces = a:2 else call Justify_error("maxspaces must be a number or ''") return 3 endif else let maxspaces = tw endif if maxspaces <= 1 call Justify_error("maxspaces should be larger than 1") return 4 endif " Set the indentation style (accept sw and ts units) let indent_fix = '' if a:0 >= 3 if (a:3 == '') || a:3 =~ '^-[1-9]\d*\(shiftwidth\|sw\|tabstop\|ts\)\=$' let indent = -1 elseif a:3 =~ '^-\=0\(shiftwidth\|sw\|tabstop\|ts\)\=$' let indent = 0 elseif a:3 =~ '^\d\+\(shiftwidth\|sw\|tabstop\|ts\)\=$' let indent = substitute(a:3, '\D', '', 'g') elseif a:3 =~ '^\(shiftwidth\|sw\|tabstop\|ts\)$' let indent = 1 else call Justify_error("indent: a number with 'sw'/'ts' unit") return 5 endif if indent >= 0 while indent > 0 let indent_fix = indent_fix . ' ' let indent = indent - 1 endwhile let indent_sw = 0 if a:3 =~ '\(shiftwidth\|sw\)' let indent_sw = &sw elseif a:3 =~ '\(tabstop\|ts\)' let indent_sw = &ts endif let indent_fix2 = '' while indent_sw > 0 let indent_fix2 = indent_fix2 . indent_fix let indent_sw = indent_sw - 1 endwhile let indent_fix = indent_fix2 endif else let indent = -1 endif " Avoid substitution reports let save_report = &report set report=1000000 " Check 'joinspaces' and 'cpo' if &js == 1 if &cpo =~ 'j' let join_str = '\(\. \)' else let join_str = '\([.!?!] \)' endif endif let cur = a:firstline while cur <= a:lastline let str_orig = getline(cur) let save_et = &et set et exec cur . "retab" let &et = save_et let str = getline(cur) let indent_str = indent_fix let indent_n = strlen(indent_str) " Shall we remember the current indentation if indent < 0 let indent_orig = matchstr(str_orig, '^\s*') if strlen(indent_orig) > 0 let indent_str = indent_orig let indent_n = strlen(matchstr(str, '^\s*')) endif endif " Trim trailing, leading and running whitespace let str = substitute(str, '\s\+$', '', '') let str = substitute(str, '^\s\+', '', '') let str = substitute(str, '\s\+', ' ', 'g') let str_n = strdisplaywidth(str) " Possible addition of space after punctuation if exists("join_str") let str = substitute(str, join_str, '\1 ', 'g') endif let join_n = strdisplaywidth(str) - str_n " Can extraspaces be added? " Note that str_n may be less than strlen(str) [joinspaces above] if strdisplaywidth(str) <= tw - indent_n && str_n > 0 " How many spaces should be added let s_add = tw - str_n - indent_n - join_n let s_nr = strlen(substitute(str, '\S', '', 'g') ) - join_n let s_dup = s_add / s_nr let s_mod = s_add % s_nr " Test if the changed line fits with tw if 0 <= (str_n + (maxspaces - 1)*s_nr + indent_n) - tw " Duplicate spaces while s_dup > 0 let str = substitute(str, '\( \+\)', ' \1', 'g') let s_dup = s_dup - 1 endwhile " Add extra spaces from the end while s_mod > 0 let str = substitute(str, '\(\(\s\+\S\+\)\{' . s_mod . '}\)$', ' \1', '') let s_mod = s_mod - 1 endwhile " Indent the line if indent_n > 0 let str = substitute(str, '^', indent_str, '' ) endif " Replace the line call setline(cur, str) " Convert to whitespace if &et == 0 exec cur . 'retab!' endif endif " Change of line endif " Possible change let cur = cur + 1 endwhile norm ^ let &report = save_report endfunction " EOF vim: tw=78 ts=8 sw=4 sts=4 noet ai ��������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/shellmenu/�������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0021150�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/shellmenu/plugin/������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0022446�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/shellmenu/plugin/shellmenu.vim�����������������������������������0000664�0000000�0000000�00000007522�13204015742�0025165�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" When you're writing shell scripts and you are in doubt which test to use, " which shell environment variables are defined, what the syntax of the case " statement is, and you need to invoke 'man sh'? " " Your problems are over now! " " Attached is a Vim script file for turning gvim into a shell script editor. " It may also be used as an example how to use menus in Vim. " " Written by: Lennart Schultz <les@dmi.min.dk> imenu Stmts.for for in do doneki kk0elli imenu Stmts.case case in ) ;; esacbki k0elli imenu Stmts.if if then fiki kk0elli imenu Stmts.if-else if then else fiki kki kk0elli imenu Stmts.elif elif then ki kk0elli imenu Stmts.while while do doneki kk0elli imenu Stmts.break break imenu Stmts.continue continue imenu Stmts.function () { }ki k0i imenu Stmts.return return imenu Stmts.return-true return 0 imenu Stmts.return-false return 1 imenu Stmts.exit exit imenu Stmts.shift shift imenu Stmts.trap trap imenu Test.existence [ -e ]hi imenu Test.existence - file [ -f ]hi imenu Test.existence - file (not empty) [ -s ]hi imenu Test.existence - directory [ -d ]hi imenu Test.existence - executable [ -x ]hi imenu Test.existence - readable [ -r ]hi imenu Test.existence - writable [ -w ]hi imenu Test.String is empty [ x = "x$" ]hhi imenu Test.String is not empty [ x != "x$" ]hhi imenu Test.Strings is equal [ "" = "" ]hhhhhhhi imenu Test.Strings is not equal [ "" != "" ]hhhhhhhhi imenu Test.Values is greater than [ -gt ]hhhhhhi imenu Test.Values is greater equal [ -ge ]hhhhhhi imenu Test.Values is equal [ -eq ]hhhhhhi imenu Test.Values is not equal [ -ne ]hhhhhhi imenu Test.Values is less than [ -lt ]hhhhhhi imenu Test.Values is less equal [ -le ]hhhhhhi imenu ParmSub.Substitute word if parm not set ${:-}hhi imenu ParmSub.Set parm to word if not set ${:=}hhi imenu ParmSub.Substitute word if parm set else nothing ${:+}hhi imenu ParmSub.If parm not set print word and exit ${:?}hhi imenu SpShVars.Number of positional parameters ${#} imenu SpShVars.All positional parameters (quoted spaces) ${*} imenu SpShVars.All positional parameters (unquoted spaces) ${@} imenu SpShVars.Flags set ${-} imenu SpShVars.Return code of last command ${?} imenu SpShVars.Process number of this shell ${$} imenu SpShVars.Process number of last background command ${!} imenu Environ.HOME ${HOME} imenu Environ.PATH ${PATH} imenu Environ.CDPATH ${CDPATH} imenu Environ.MAIL ${MAIL} imenu Environ.MAILCHECK ${MAILCHECK} imenu Environ.PS1 ${PS1} imenu Environ.PS2 ${PS2} imenu Environ.IFS ${IFS} imenu Environ.SHACCT ${SHACCT} imenu Environ.SHELL ${SHELL} imenu Environ.LC_CTYPE ${LC_CTYPE} imenu Environ.LC_MESSAGES ${LC_MESSAGES} imenu Builtins.cd cd imenu Builtins.echo echo imenu Builtins.eval eval imenu Builtins.exec exec imenu Builtins.export export imenu Builtins.getopts getopts imenu Builtins.hash hash imenu Builtins.newgrp newgrp imenu Builtins.pwd pwd imenu Builtins.read read imenu Builtins.readonly readonly imenu Builtins.return return imenu Builtins.times times imenu Builtins.type type imenu Builtins.umask umask imenu Builtins.wait wait imenu Set.set set imenu Set.unset unset imenu Set.mark modified or modified variables set -a imenu Set.exit when command returns non-zero exit code set -e imenu Set.Disable file name generation set -f imenu Set.remember function commands set -h imenu Set.All keyword arguments are placed in the environment set -k imenu Set.Read commands but do not execute them set -n imenu Set.Exit after reading and executing one command set -t imenu Set.Treat unset variables as an error when substituting set -u imenu Set.Print shell input lines as they are read set -v imenu Set.Print commands and their arguments as they are executed set -x ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/swapmouse/�������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0021177�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/swapmouse/plugin/������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0022475�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim�����������������������������������0000664�0000000�0000000�00000001530�13204015742�0025234�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" These macros swap the left and right mouse buttons (for left handed) " Don't forget to do ":set mouse=a" or the mouse won't work at all noremap <LeftMouse> <RightMouse> noremap <2-LeftMouse> <2-RightMouse> noremap <3-LeftMouse> <3-RightMouse> noremap <4-LeftMouse> <4-RightMouse> noremap <LeftDrag> <RightDrag> noremap <LeftRelease> <RightRelease> noremap <RightMouse> <LeftMouse> noremap <2-RightMouse> <2-LeftMouse> noremap <3-RightMouse> <3-LeftMouse> noremap <4-RightMouse> <4-LeftMouse> noremap <RightDrag> <LeftDrag> noremap <RightRelease> <LeftRelease> noremap g<LeftMouse> <C-RightMouse> noremap g<RightMouse> <C-LeftMouse> noremap! <LeftMouse> <RightMouse> noremap! <LeftDrag> <RightDrag> noremap! <LeftRelease> <RightRelease> noremap! <RightMouse> <LeftMouse> noremap! <RightDrag> <LeftDrag> noremap! <RightRelease> <LeftRelease> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/termdebug/�������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0021132�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/termdebug/plugin/������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0022430�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim�����������������������������������0000664�0000000�0000000�00000001732�13204015742�0025126�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Debugger commands. " " WORK IN PROGRESS - much doesn't work yet " " Open two terminal windows: " 1. run a pty, as with ":term NONE" " 2. run gdb, passing the pty " The current window is used to edit source code and follows gdb. " " Author: Bram Moolenaar " Copyright: Vim license applies " In case this gets loaded twice. if exists(':Termdebug') finish endif command -nargs=* -complete=file Termdebug call s:StartDebug(<q-args>) if !exists('debugger') let debugger = 'gdb' endif func s:StartDebug(cmd) " Open a terminal window without a job, to run the debugged program let s:ptybuf = term_start('NONE', {}) let pty = job_info(term_getjob(s:ptybuf))['tty'] " Open a terminal window to run the debugger. let cmd = [g:debugger, '-tty', pty, a:cmd] echomsg 'executing "' . join(cmd) . '"' let gdbbuf = term_start(cmd, { \ 'exit_cb': function('s:EndDebug'), \ 'term_finish': 'close' \ }) endfunc func s:EndDebug(job, status) exe 'bwipe! ' . s:ptybuf endfunc ��������������������������������������neovim-0.2.2/runtime/pack/dist/opt/vimball/���������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0020602�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/vimball/autoload/������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0022412�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/vimball/autoload/vimball.vim�������������������������������������0000664�0000000�0000000�00000057413�13204015742�0024567�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" vimball.vim : construct a file containing both paths and files " Author: Charles E. Campbell " Date: Apr 11, 2016 " Version: 37 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " Copyright: (c) 2004-2011 by Charles E. Campbell " The VIM LICENSE applies to Vimball.vim, and Vimball.txt " (see |copyright|) except use "Vimball" instead of "Vim". " No warranty, express or implied. " *** *** Use At-Your-Own-Risk! *** *** " --------------------------------------------------------------------- " Load Once: {{{1 if &cp || exists("g:loaded_vimball") finish endif let g:loaded_vimball = "v37" if v:version < 702 echohl WarningMsg echo "***warning*** this version of vimball needs vim 7.2" echohl Normal finish endif let s:keepcpo= &cpo set cpo&vim "DechoTabOn " ===================================================================== " Constants: {{{1 if !exists("s:USAGE") let s:USAGE = 0 let s:WARNING = 1 let s:ERROR = 2 " determine if cygwin is in use or not if !exists("g:netrw_cygwin") if has("win32") || has("win95") || has("win64") || has("win16") if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$' let g:netrw_cygwin= 1 else let g:netrw_cygwin= 0 endif else let g:netrw_cygwin= 0 endif endif " set up g:vimball_mkdir if the mkdir() call isn't defined if !exists("*mkdir") if exists("g:netrw_local_mkdir") let g:vimball_mkdir= g:netrw_local_mkdir elseif executable("mkdir") let g:vimball_mkdir= "mkdir" elseif executable("makedir") let g:vimball_mkdir= "makedir" endif if !exists(g:vimball_mkdir) call vimball#ShowMesg(s:WARNING,"(vimball) g:vimball_mkdir undefined") endif endif endif " ===================================================================== " Functions: {{{1 " --------------------------------------------------------------------- " vimball#MkVimball: creates a vimball given a list of paths to files {{{2 " Input: " line1,line2: a range of lines containing paths to files to be included in the vimball " writelevel : if true, force a write to filename.vmb, even if it exists " (usually accomplished with :MkVimball! ... " filename : base name of file to be created (ie. filename.vmb) " Output: a filename.vmb using vimball format: " path " filesize " [file] " path " filesize " [file] fun! vimball#MkVimball(line1,line2,writelevel,...) range " call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0) if a:1 =~ '\.vim$' || a:1 =~ '\.txt$' let vbname= substitute(a:1,'\.\a\{3}$','.vmb','') else let vbname= a:1 endif if vbname !~ '\.vmb$' let vbname= vbname.'.vmb' endif " call Decho("vbname<".vbname.">") if !a:writelevel && a:1 =~ '[\/]' call vimball#ShowMesg(s:ERROR,"(MkVimball) vimball name<".a:1."> should not include slashes; use ! to insist") " call Dret("MkVimball : vimball name<".a:1."> should not include slashes") return endif if !a:writelevel && filereadable(vbname) call vimball#ShowMesg(s:ERROR,"(MkVimball) file<".vbname."> exists; use ! to insist") " call Dret("MkVimball : file<".vbname."> already exists; use ! to insist") return endif " user option bypass call vimball#SaveSettings() if a:0 >= 2 " allow user to specify where to get the files let home= expand(a:2) else " use first existing directory from rtp let home= vimball#VimballHome() endif " save current directory let curdir = getcwd() call s:ChgDir(home) " record current tab, initialize while loop index let curtabnr = tabpagenr() let linenr = a:line1 " call Decho("curtabnr=".curtabnr) while linenr <= a:line2 let svfile = getline(linenr) " call Decho("svfile<".svfile.">") if !filereadable(svfile) call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">") call s:ChgDir(curdir) call vimball#RestoreSettings() " call Dret("MkVimball") return endif " create/switch to mkvimball tab if !exists("vbtabnr") tabnew sil! file Vimball let vbtabnr= tabpagenr() else exe "tabn ".vbtabnr endif let lastline= line("$") + 1 if lastline == 2 && getline("$") == "" call setline(1,'" Vimball Archiver by Charles E. Campbell') call setline(2,'UseVimball') call setline(3,'finish') let lastline= line("$") + 1 endif call setline(lastline ,substitute(svfile,'$',' [[[1','')) call setline(lastline+1,0) " write the file from the tab " call Decho("exe $r ".fnameescape(svfile)) exe "$r ".fnameescape(svfile) call setline(lastline+1,line("$") - lastline - 1) " call Decho("lastline=".lastline." line$=".line("$")) " restore to normal tab exe "tabn ".curtabnr let linenr= linenr + 1 endwhile " write the vimball exe "tabn ".vbtabnr call s:ChgDir(curdir) setlocal ff=unix if a:writelevel " call Decho("exe w! ".fnameescape(vbname)) exe "w! ".fnameescape(vbname) else " call Decho("exe w ".fnameescape(vbname)) exe "w ".fnameescape(vbname) endif " call Decho("Vimball<".vbname."> created") echo "Vimball<".vbname."> created" " remove the evidence setlocal nomod bh=wipe exe "tabn ".curtabnr exe "tabc! ".vbtabnr " restore options call vimball#RestoreSettings() " call Dret("MkVimball") endfun " --------------------------------------------------------------------- " vimball#Vimball: extract and distribute contents from a vimball {{{2 " (invoked the the UseVimball command embedded in " vimballs' prologue) fun! vimball#Vimball(really,...) " call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0) if v:version < 701 || (v:version == 701 && !exists('*fnameescape')) echoerr "your vim is missing the fnameescape() function (pls upgrade to vim 7.2 or later)" " call Dret("vimball#Vimball : needs 7.1 with patch 299 or later") return endif if getline(1) !~ '^" Vimball Archiver' echoerr "(Vimball) The current file does not appear to be a Vimball!" " call Dret("vimball#Vimball") return endif " set up standard settings call vimball#SaveSettings() let curtabnr = tabpagenr() let vimballfile = expand("%:tr") " set up vimball tab " call Decho("setting up vimball tab") tabnew sil! file Vimball let vbtabnr= tabpagenr() let didhelp= "" " go to vim plugin home if a:0 > 0 " let user specify the directory where the vimball is to be unpacked. " If, however, the user did not specify a full path, set the home to be below the current directory let home= expand(a:1) if has("win32") || has("win95") || has("win64") || has("win16") if home !~ '^\a:[/\\]' let home= getcwd().'/'.a:1 endif elseif home !~ '^/' let home= getcwd().'/'.a:1 endif else let home= vimball#VimballHome() endif " call Decho("home<".home.">") " save current directory and remove older same-named vimball, if any let curdir = getcwd() " call Decho("home<".home.">") " call Decho("curdir<".curdir.">") call s:ChgDir(home) let s:ok_unablefind= 1 call vimball#RmVimball(vimballfile) unlet s:ok_unablefind let linenr = 4 let filecnt = 0 " give title to listing of (extracted) files from Vimball Archive if a:really echohl Title | echomsg "Vimball Archive" | echohl None else echohl Title | echomsg "Vimball Archive Listing" | echohl None echohl Statement | echomsg "files would be placed under: ".home | echohl None endif " apportion vimball contents to various files " call Decho("exe tabn ".curtabnr) exe "tabn ".curtabnr " call Decho("linenr=".linenr." line$=".line("$")) while 1 < linenr && linenr < line("$") let fname = substitute(getline(linenr),'\t\[\[\[1$','','') let fname = substitute(fname,'\\','/','g') let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0 let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','') let filecnt = filecnt + 1 " call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc) if a:really echomsg "extracted <".fname.">: ".fsize." lines" else echomsg "would extract <".fname.">: ".fsize." lines" endif " call Decho("using L#".linenr.": will extract file<".fname.">") " call Decho("using L#".(linenr+1).": fsize=".fsize) " Allow AsNeeded/ directory to take place of plugin/ directory " when AsNeeded/filename is filereadable or was present in VimballRecord if fname =~ '\<plugin/' let anfname= substitute(fname,'\<plugin/','AsNeeded/','') if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~# anfname) " call Decho("using anfname<".anfname."> instead of <".fname.">") let fname= anfname endif endif " make directories if they don't exist yet if a:really " call Decho("making directories if they don't exist yet (fname<".fname.">)") let fnamebuf= substitute(fname,'\\','/','g') let dirpath = substitute(home,'\\','/','g') " call Decho("init: fnamebuf<".fnamebuf.">") " call Decho("init: dirpath <".dirpath.">") while fnamebuf =~ '/' let dirname = dirpath."/".substitute(fnamebuf,'/.*$','','') let dirpath = dirname let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','') " call Decho("dirname<".dirname.">") " call Decho("dirpath<".dirpath.">") if !isdirectory(dirname) " call Decho("making <".dirname.">") if exists("g:vimball_mkdir") call system(g:vimball_mkdir." ".shellescape(dirname)) else call mkdir(dirname) endif call s:RecordInVar(home,"rmdir('".dirname."')") endif endwhile endif call s:ChgDir(home) " grab specified qty of lines and place into "a" buffer " (skip over path/filename and qty-lines) let linenr = linenr + 2 let lastline = linenr + fsize - 1 " call Decho("exe ".linenr.",".lastline."yank a") " no point in handling a zero-length file if lastline >= linenr exe "silent ".linenr.",".lastline."yank a" " copy "a" buffer into tab " call Decho('copy "a buffer into tab#'.vbtabnr) exe "tabn ".vbtabnr setlocal ma sil! %d silent put a 1 sil! d " write tab to file if a:really let fnamepath= home."/".fname " call Decho("exe w! ".fnameescape(fnamepath)) if fenc != "" exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath) else exe "silent w! ".fnameescape(fnamepath) endif echo "wrote ".fnameescape(fnamepath) call s:RecordInVar(home,"call delete('".fnamepath."')") endif " return to tab with vimball " call Decho("exe tabn ".curtabnr) exe "tabn ".curtabnr " set up help if it's a doc/*.txt file " call Decho("didhelp<".didhelp."> fname<".fname.">") if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$' let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','') " call Decho("didhelp<".didhelp.">") endif endif " update for next file " call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize)) let linenr= linenr + fsize endwhile " set up help " call Decho("about to set up help: didhelp<".didhelp.">") if didhelp != "" let htpath= home."/".didhelp " call Decho("exe helptags ".htpath) exe "helptags ".fnameescape(htpath) echo "did helptags" endif " make sure a "Press ENTER..." prompt appears to keep the messages showing! while filecnt <= &ch echomsg " " let filecnt= filecnt + 1 endwhile " record actions in <.VimballRecord> call s:RecordInFile(home) " restore events, delete tab and buffer exe "sil! tabn ".vbtabnr setlocal nomod bh=wipe exe "sil! tabn ".curtabnr exe "sil! tabc! ".vbtabnr call vimball#RestoreSettings() call s:ChgDir(curdir) " call Dret("vimball#Vimball") endfun " --------------------------------------------------------------------- " vimball#RmVimball: remove any files, remove any directories made by any {{{2 " previous vimball extraction based on a file of the current " name. " Usage: RmVimball (assume current file is a vimball; remove) " RmVimball vimballname fun! vimball#RmVimball(...) " call Dfunc("vimball#RmVimball() a:0=".a:0) if exists("g:vimball_norecord") " call Dret("vimball#RmVimball : (g:vimball_norecord)") return endif if a:0 == 0 let curfile= expand("%:tr") " call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))") else if a:1 =~ '[\/]' call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]") " call Dret("vimball#RmVimball : suspect a:1<".a:1.">") return endif let curfile= a:1 " call Decho("case a:0=".a:0.": curfile<".curfile.">") endif if curfile =~ '\.vmb$' let curfile= substitute(curfile,'\.vmb','','') elseif curfile =~ '\.vba$' let curfile= substitute(curfile,'\.vba','','') endif if a:0 >= 2 let home= expand(a:2) else let home= vimball#VimballHome() endif let curdir = getcwd() " call Decho("home <".home.">") " call Decho("curfile<".curfile.">") " call Decho("curdir <".curdir.">") call s:ChgDir(home) if filereadable(".VimballRecord") " call Decho(".VimballRecord is readable") " call Decho("curfile<".curfile.">") keepalt keepjumps 1split sil! keepalt keepjumps e .VimballRecord let keepsrch= @/ " call Decho('search for ^\M'.curfile.'.\m: ') " call Decho('search for ^\M'.curfile.'.\m{vba|vmb}: ') " call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.{vba|vmb}: ') if search('^\M'.curfile."\m: ".'cw') let foundit= 1 elseif search('^\M'.curfile.".\mvmb: ",'cw') let foundit= 2 elseif search('^\M'.curfile.'\m[-0-9.]*\.vmb: ','cw') let foundit= 2 elseif search('^\M'.curfile.".\mvba: ",'cw') let foundit= 1 elseif search('^\M'.curfile.'\m[-0-9.]*\.vba: ','cw') let foundit= 1 else let foundit = 0 endif if foundit if foundit == 1 let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','') else let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','') endif let s:VBRstring= substitute(exestring,'call delete(','','g') let s:VBRstring= substitute(s:VBRstring,"[')]",'','g') " call Decho("exe ".exestring) sil! keepalt keepjumps exe exestring sil! keepalt keepjumps d let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g")) " call Decho("exestring<".exestring.">") echomsg "removed ".exestring." files" else let s:VBRstring= '' let curfile = substitute(curfile,'\.vmb','','') " call Decho("unable to find <".curfile."> in .VimballRecord") if !exists("s:ok_unablefind") call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord") endif endif sil! keepalt keepjumps g/^\s*$/d sil! keepalt keepjumps wq! let @/= keepsrch endif call s:ChgDir(curdir) " call Dret("vimball#RmVimball") endfun " --------------------------------------------------------------------- " vimball#Decompress: attempts to automatically decompress vimballs {{{2 fun! vimball#Decompress(fname,...) " call Dfunc("Decompress(fname<".a:fname.">) a:0=".a:0) " decompression: if expand("%") =~ '.*\.gz' && executable("gunzip") " handle *.gz with gunzip silent exe "!gunzip ".shellescape(a:fname) if v:shell_error != 0 call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">") endif let fname= substitute(a:fname,'\.gz$','','') exe "e ".escape(fname,' \') if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.gz' && executable("gzip") " handle *.gz with gzip -d silent exe "!gzip -d ".shellescape(a:fname) if v:shell_error != 0 call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">") endif let fname= substitute(a:fname,'\.gz$','','') exe "e ".escape(fname,' \') if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.bz2' && executable("bunzip2") " handle *.bz2 with bunzip2 silent exe "!bunzip2 ".shellescape(a:fname) if v:shell_error != 0 call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">") endif let fname= substitute(a:fname,'\.bz2$','','') exe "e ".escape(fname,' \') if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.bz2' && executable("bzip2") " handle *.bz2 with bzip2 -d silent exe "!bzip2 -d ".shellescape(a:fname) if v:shell_error != 0 call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">") endif let fname= substitute(a:fname,'\.bz2$','','') exe "e ".escape(fname,' \') if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.zip' && executable("unzip") " handle *.zip with unzip silent exe "!unzip ".shellescape(a:fname) if v:shell_error != 0 call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">") endif let fname= substitute(a:fname,'\.zip$','','') exe "e ".escape(fname,' \') if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif endif if a:0 == 0| setlocal noma bt=nofile fmr=[[[,]]] fdm=marker | endif " call Dret("Decompress") endfun " --------------------------------------------------------------------- " vimball#ShowMesg: {{{2 fun! vimball#ShowMesg(level,msg) " call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)") let rulerkeep = &ruler let showcmdkeep = &showcmd set noruler noshowcmd redraw! if &fo =~# '[ta]' echomsg "***vimball*** ".a:msg else if a:level == s:WARNING || a:level == s:USAGE echohl WarningMsg elseif a:level == s:ERROR echohl Error endif echomsg "***vimball*** ".a:msg echohl None endif if a:level != s:USAGE call inputsave()|let ok= input("Press <cr> to continue")|call inputrestore() endif let &ruler = rulerkeep let &showcmd = showcmdkeep " call Dret("vimball#ShowMesg") endfun " ===================================================================== " s:ChgDir: change directory (in spite of Windoze) {{{2 fun! s:ChgDir(newdir) " call Dfunc("ChgDir(newdir<".a:newdir.">)") if (has("win32") || has("win95") || has("win64") || has("win16")) try exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g')) catch /^Vim\%((\a\+)\)\=:E/ call mkdir(fnameescape(substitute(a:newdir,'/','\\','g'))) exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g')) endtry else try exe 'silent cd '.fnameescape(a:newdir) catch /^Vim\%((\a\+)\)\=:E/ call mkdir(fnameescape(a:newdir)) exe 'silent cd '.fnameescape(a:newdir) endtry endif " call Dret("ChgDir : curdir<".getcwd().">") endfun " --------------------------------------------------------------------- " s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2 fun! s:RecordInVar(home,cmd) " call Dfunc("RecordInVar(home<".a:home."> cmd<".a:cmd.">)") if a:cmd =~ '^rmdir' " if !exists("s:recorddir") " let s:recorddir= substitute(a:cmd,'^rmdir',"call s:Rmdir",'') " else " let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'') " endif elseif !exists("s:recordfile") let s:recordfile= a:cmd else let s:recordfile= s:recordfile."|".a:cmd endif " call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">") endfun " --------------------------------------------------------------------- " s:RecordInFile: {{{2 fun! s:RecordInFile(home) " call Dfunc("s:RecordInFile()") if exists("g:vimball_norecord") " call Dret("s:RecordInFile : g:vimball_norecord") return endif if exists("s:recordfile") || exists("s:recorddir") let curdir= getcwd() call s:ChgDir(a:home) keepalt keepjumps 1split let cmd= expand("%:tr").": " " call Decho("cmd<".cmd.">") sil! keepalt keepjumps e .VimballRecord setlocal ma $ if exists("s:recordfile") && exists("s:recorddir") let cmd= cmd.s:recordfile."|".s:recorddir elseif exists("s:recorddir") let cmd= cmd.s:recorddir elseif exists("s:recordfile") let cmd= cmd.s:recordfile else " call Dret("s:RecordInFile : neither recordfile nor recorddir exist") return endif " call Decho("cmd<".cmd.">") " put command into buffer, write .VimballRecord `file keepalt keepjumps put=cmd sil! keepalt keepjumps g/^\s*$/d sil! keepalt keepjumps wq! call s:ChgDir(curdir) if exists("s:recorddir") " call Decho("unlet s:recorddir<".s:recorddir.">") unlet s:recorddir endif if exists("s:recordfile") " call Decho("unlet s:recordfile<".s:recordfile.">") unlet s:recordfile endif else " call Decho("s:record[file|dir] doesn't exist") endif " call Dret("s:RecordInFile") endfun " --------------------------------------------------------------------- " vimball#VimballHome: determine/get home directory path (usually from rtp) {{{2 fun! vimball#VimballHome() " call Dfunc("vimball#VimballHome()") if exists("g:vimball_home") let home= g:vimball_home else " go to vim plugin home for home in split(&rtp,',') + [''] if isdirectory(home) && filewritable(home) | break | endif let basehome= substitute(home,'[/\\]\.vim$','','') if isdirectory(basehome) && filewritable(basehome) let home= basehome."/.vim" break endif endfor if home == "" " just pick the first directory let home= substitute(&rtp,',.*$','','') endif if (has("win32") || has("win95") || has("win64") || has("win16")) let home= substitute(home,'/','\\','g') endif endif " insure that the home directory exists " call Decho("picked home<".home.">") if !isdirectory(home) if exists("g:vimball_mkdir") " call Decho("home<".home."> isn't a directory -- making it now with g:vimball_mkdir<".g:vimball_mkdir.">") " call Decho("system(".g:vimball_mkdir." ".shellescape(home).")") call system(g:vimball_mkdir." ".shellescape(home)) else " call Decho("home<".home."> isn't a directory -- making it now with mkdir()") call mkdir(home) endif endif " call Dret("vimball#VimballHome <".home.">") return home endfun " --------------------------------------------------------------------- " vimball#SaveSettings: {{{2 fun! vimball#SaveSettings() " call Dfunc("SaveSettings()") let s:makeep = getpos("'a") let s:regakeep= @a if exists("+acd") let s:acdkeep = &acd endif let s:eikeep = &ei let s:fenkeep = &l:fen let s:hidkeep = &hidden let s:ickeep = &ic let s:lzkeep = &lz let s:pmkeep = &pm let s:repkeep = &report let s:vekeep = &ve let s:ffkeep = &l:ff let s:swfkeep = &l:swf if exists("+acd") setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf else setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf endif " vimballs should be in unix format setlocal ff=unix " call Dret("SaveSettings") endfun " --------------------------------------------------------------------- " vimball#RestoreSettings: {{{2 fun! vimball#RestoreSettings() " call Dfunc("RestoreSettings()") let @a = s:regakeep if exists("+acd") let &acd = s:acdkeep endif let &l:fen = s:fenkeep let &hidden = s:hidkeep let &ic = s:ickeep let &lz = s:lzkeep let &pm = s:pmkeep let &report = s:repkeep let &ve = s:vekeep let &ei = s:eikeep let &l:ff = s:ffkeep if s:makeep[0] != 0 " restore mark a " call Decho("restore mark-a: makeep=".string(makeep)) call setpos("'a",s:makeep) endif if exists("+acd") unlet s:acdkeep endif unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep " call Dret("RestoreSettings") endfun let &cpo = s:keepcpo unlet s:keepcpo " --------------------------------------------------------------------- " Modelines: {{{1 " vim: fdm=marker �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/vimball/doc/�����������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0021347�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/vimball/doc/vimball.txt������������������������������������������0000664�0000000�0000000�00000026572�13204015742�0023552�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*vimball.txt* For Vim version 7.4. Last change: 2012 Jan 17 ---------------- Vimball Archiver ---------------- Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM> (remove NOSPAM from Campbell's email first) Copyright: (c) 2004-2012 by Charles E. Campbell, Jr. *Vimball-copyright* The VIM LICENSE (see |copyright|) applies to the files in this package, including vimballPlugin.vim, vimball.vim, and pi_vimball.txt. except use "vimball" instead of "VIM". Like anything else that's free, vimball.vim and its associated files are provided *as is* and comes with no warranty of any kind, either expressed or implied. No guarantees of merchantability. No guarantees of suitability for any purpose. By using this plugin, you agree that in no event will the copyright holder be liable for any damages resulting from the use of this software. Use at your own risk! ============================================================================== 1. Contents *vba* *vimball* *vimball-contents* 1. Contents......................................: |vimball-contents| 2. Vimball Introduction..........................: |vimball-intro| 3. Vimball Manual................................: |vimball-manual| MkVimball.....................................: |:MkVimball| UseVimball....................................: |:UseVimball| RmVimball.....................................: |:RmVimball| 4. Vimball History...............................: |vimball-history| ============================================================================== 2. Vimball Introduction *vimball-intro* Vimball is intended to make life simpler for users of plugins. All a user needs to do with a vimball is: > vim someplugin.vba :so % :q < and the plugin and all its components will be installed into their appropriate directories. Note that one doesn't need to be in any particular directory when one does this. Plus, any help for the plugin will also be automatically installed. If a user has decided to use the AsNeeded plugin, vimball is smart enough to put scripts nominally intended for .vim/plugin/ into .vim/AsNeeded/ instead. Removing a plugin that was installed with vimball is really easy: > vim :RmVimball someplugin < This operation is not at all easy for zips and tarballs, for example. Vimball examines the user's |'runtimepath'| to determine where to put the scripts. The first directory mentioned on the runtimepath is usually used if possible. Use > :echo &rtp < to see that directory. ============================================================================== 3. Vimball Manual *vimball-manual* MAKING A VIMBALL *:MkVimball* :[range]MkVimball[!] filename [path] The range is composed of lines holding paths to files to be included in your new vimball, omitting the portion of the paths that is normally specified by the runtimepath (|'rtp'|). As an example: > plugin/something.vim doc/something.txt < using > :[range]MkVimball filename < on this range of lines will create a file called "filename.vba" which can be used by Vimball.vim to re-create these files. If the "filename.vba" file already exists, then MkVimball will issue a warning and not create the file. Note that these paths are relative to your .vim (vimfiles) directory, and the files should be in that directory. The vimball plugin normally uses the first |'runtimepath'| directory that exists as a prefix; don't use absolute paths, unless the user has specified such a path. If you use the exclamation point (!), then MkVimball will create the "filename.vba" file, overwriting it if it already exists. This behavior resembles that for |:w|. If you wish to force slashes into the filename, that can also be done by using the exclamation mark (ie. :MkVimball! path/filename). The tip at http://vim.wikia.com/wiki/Using_VimBall_with_%27Make%27 has a good idea on how to automate the production of vimballs using make. MAKING DIRECTORIES VIA VIMBALLS *g:vimball_mkdir* First, the |mkdir()| command is tried (not all systems support it). If it doesn't exist, then if g:vimball_mkdir doesn't exist, it is set as follows: > |g:netrw_local_mkdir|, if it exists "mkdir" , if it is executable "makedir" , if it is executable Otherwise , it is undefined. < One may explicitly specify the directory making command using g:vimball_mkdir. This command is used to make directories that are needed as indicated by the vimball. CONTROLLING THE VIMBALL EXTRACTION DIRECTORY *g:vimball_home* You may override the use of the |'runtimepath'| by specifying a variable, g:vimball_home. *vimball-extract* vim filename.vba Simply editing a Vimball will cause Vimball.vim to tell the user to source the file to extract its contents. Extraction will only proceed if the first line of a putative vimball file holds the "Vimball Archiver by Charles E. Campbell, Jr., Ph.D." line. LISTING FILES IN A VIMBALL *:VimballList* :VimballList This command will tell Vimball to list the files in the archive, along with their lengths in lines. MANUALLY INVOKING VIMBALL EXTRACTION *:UseVimball* :UseVimball [path] This command is contained within the vimball itself; it invokes the vimball#Vimball() routine which is responsible for unpacking the vimball. One may choose to execute it by hand instead of sourcing the vimball; one may also choose to specify a path for the installation, thereby overriding the automatic choice of the first existing directory on the |'runtimepath'|. REMOVING A VIMBALL *:RmVimball* :RmVimball vimballfile [path] This command removes all files generated by the specified vimball (but not any directories it may have made). One may choose a path for de-installation, too (see |'runtimepath'|); otherwise, the default is the first existing directory on the |'runtimepath'|. To implement this, a file (.VimballRecord) is made in that directory containing a record of what files need to be removed for all vimballs used thus far. PREVENTING LOADING If for some reason you don't want to be able to extract plugins using vimballs: you may prevent the loading of vimball.vim by putting the following two variables in your <.vimrc>: > let g:loaded_vimballPlugin= 1 let g:loaded_vimball = 1 < WINDOWS *vimball-windows* Many vimball files are compressed with gzip. Windows, unfortunately, does not come provided with a tool to decompress gzip'ped files. Fortunately, there are a number of tools available for Windows users to un-gzip files: > Item Tool/Suite Free Website ---- ---------- ---- ------- 7zip tool y http://www.7-zip.org/ Winzip tool n http://www.winzip.com/downwz.htm unxutils suite y http://unxutils.sourceforge.net/ cygwin suite y http://www.cygwin.com/ GnuWin32 suite y http://gnuwin32.sourceforge.net/ MinGW suite y http://www.mingw.org/ < ============================================================================== 4. Vimball History *vimball-history* {{{1 34 : Sep 22, 2011 * "UseVimball path" now supports a non-full path by prepending the current directory to it. 33 : Apr 02, 2011 * Gave priority to *.vmb over *.vba * Changed silent! to sil! (shorter) * Safed |'swf'| setting (during vimball extraction, its now turned off) 32 : May 19, 2010 * (Christian Brabandt) :so someplugin.vba and :so someplugin.vba.gz (and the other supported compression types) now works * (Jan Steffens) added support for xz compression * fenc extraction was erroneously picking up the end of the line number when no file encoding was present. Fixed. * By request, beginning the switchover from the vba extension to vmb. Currently both are supported; MkVimball, however, now will create *.vmb files. Feb 11, 2011 * motoyakurotsu reported an error with vimball's handling of zero-length files 30 : Dec 08, 2008 * fnameescape() inserted to protect error messaging using corrupted filenames from causing problems * RmVimball supports filenames that would otherwise be considered to have "magic" characters (ie. Abc[1].vba) Feb 18, 2009 * s:Escape(), g:vimball_shq, and g:netrw_shq removed (shellescape() used directly) Oct 05, 2009 * (Nikolai Weibull) suggested that MkVimball be allowed to use slashes in the filename. 26 : May 27, 2008 * g:vimball_mkdir usage installed. Makes the $HOME/.vim (or $HOME\vimfiles) directory if necessary. May 30, 2008 * (tnx to Bill McCarthy) found and fixed a bug: vimball wasn't updating plugins to AsNeeded/ when it should 25 : Mar 24, 2008 * changed vimball#Vimball() to recognize doc/*.??x files as help files, too. Apr 18, 2008 * RmVimball command is now protected by saving and restoring settings -- in particular, acd was causing problems as reported by Zhang Shuhan 24 : Nov 15, 2007 * g:vimball_path_escape used by s:Path() to prevent certain characters from causing trouble (defunct: |fnameescape()| and |shellescape()| now used instead) 22 : Mar 21, 2007 * uses setlocal instead of set during BufEnter 21 : Nov 27, 2006 * (tnx to Bill McCarthy) vimball had a header handling problem and it now changes \s to /s 20 : Nov 20, 2006 * substitute() calls have all had the 'e' flag removed. 18 : Aug 01, 2006 * vimballs now use folding to easily display their contents. * if a user has AsNeeded/somefile, then vimball will extract plugin/somefile to the AsNeeded/ directory 17 : Jun 28, 2006 * changes all \s to /s internally for Windows 16 : Jun 15, 2006 * A. Mechelynck's idea to allow users to specify installation root paths implemented for UseVimball, MkVimball, and RmVimball. * RmVimball implemented 15 : Jun 13, 2006 * bugfix 14 : May 26, 2006 * bugfixes 13 : May 01, 2006 * exists("&acd") used to determine if the acd option exists 12 : May 01, 2006 * bugfix - the |'acd'| option is not always defined 11 : Apr 27, 2006 * VimballList would create missing subdirectories that the vimball specified were needed. Fixed. 10 : Apr 27, 2006 * moved all setting saving/restoration to a pair of functions. Included some more settings in them which frequently cause trouble. 9 : Apr 26, 2006 * various changes to support Windows' predilection for backslashes and spaces in file and directory names. 7 : Apr 25, 2006 * bypasses foldenable * uses more exe and less norm! (:yank :put etc) * does better at insuring a "Press ENTER" prompt appears to keep its messages visible 4 : Mar 31, 2006 * BufReadPost seems to fire twice; BufReadEnter only fires once, so the "Source this file..." message is now issued only once. 3 : Mar 20, 2006 * removed query, now requires sourcing to be extracted (:so %). Message to that effect included. * :VimballList now shows files that would be extracted. 2 : Mar 20, 2006 * query, :UseVimball included 1 : Mar 20, 2006 * initial release ============================================================================== vim:tw=78:ts=8:ft=help:fdm=marker ��������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/vimball/plugin/��������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0022100�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/pack/dist/opt/vimball/plugin/vimballPlugin.vim���������������������������������0000664�0000000�0000000�00000005522�13204015742�0025426�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" vimballPlugin : construct a file containing both paths and files " Author: Charles E. Campbell " Copyright: (c) 2004-2014 by Charles E. Campbell " The VIM LICENSE applies to Vimball.vim, and Vimball.txt " (see |copyright|) except use "Vimball" instead of "Vim". " No warranty, express or implied. " *** *** Use At-Your-Own-Risk! *** *** " " (Rom 2:1 WEB) Therefore you are without excuse, O man, whoever you are who " judge. For in that which you judge another, you condemn yourself. For " you who judge practice the same things. " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " --------------------------------------------------------------------- " Load Once: {{{1 if &cp || exists("g:loaded_vimballPlugin") finish endif let g:loaded_vimballPlugin = "v37" let s:keepcpo = &cpo set cpo&vim " ------------------------------------------------------------------------------ " Public Interface: {{{1 com! -range -complete=file -nargs=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>) com! -nargs=? -complete=dir UseVimball call vimball#Vimball(1,<f-args>) com! -nargs=0 VimballList call vimball#Vimball(0) com! -nargs=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings() augroup Vimball au! au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")|endif au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif au SourceCmd *.vba if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")|endif au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif au SourceCmd *.vmb if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif augroup END " ===================================================================== " Restoration And Modelines: {{{1 " vim: fdm=marker let &cpo= s:keepcpo unlet s:keepcpo ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0015767�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/README.txt��������������������������������������������������������������0000664�0000000�0000000�00000001571�13204015742�0017471�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������The plugin directory is for standard Vim plugin scripts. All files here ending in .vim will be sourced by Vim when it starts up. Look in the file for hints on how it can be disabled without deleting it. getscriptPlugin.vim get latest version of Vim scripts gzip.vim edit compressed files matchparen.vim highlight paren matching the one under the cursor netrwPlugin.vim edit files over a network and browse (remote) directories rrhelper.vim used for --remote-wait editing spellfile.vim download a spellfile when it's missing tarPlugin.vim edit (compressed) tar files tohtml.vim convert a file with syntax highlighting to HTML vimballPlugin.vim create and unpack .vba files zipPlugin.vim edit zip archives Note: the explorer.vim plugin is no longer here, the netrw.vim plugin has taken over browsing directories (also for remote directories). ���������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/gui_shim.vim������������������������������������������������������������0000664�0000000�0000000�00000004332�13204015742�0020312�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" A Neovim plugin that implements GUI helper commands if !has('win32') || !has('nvim') || exists('g:GuiLoaded') finish endif let g:GuiLoaded = 1 " Close the GUI function! GuiClose() abort call rpcnotify(0, 'Gui', 'Close') endfunction " Notify the GUI when exiting Neovim autocmd VimLeave * call GuiClose() " A replacement for foreground() function! GuiForeground() abort call rpcnotify(0, 'Gui', 'Foreground') endfunction " Set maximized state for GUI window (1 is enabled, 0 disabled) function! GuiWindowMaximized(enabled) abort call rpcnotify(0, 'Gui', 'WindowMaximized', a:enabled) endfunction " Set fullscreen state for GUI window (1 is enabled, 0 disabled) function! GuiWindowFullScreen(enabled) abort call rpcnotify(0, 'Gui', 'WindowFullScreen', a:enabled) endfunction " Set GUI font function! GuiFont(fname, ...) abort let force = get(a:000, 0, 0) call rpcnotify(0, 'Gui', 'Font', a:fname, force) endfunction " Set additional linespace function! GuiLinespace(height) abort call rpcnotify(0, 'Gui', 'Linespace', a:height) endfunction " Configure mouse hide behaviour (1 is enabled, 0 disabled) function! GuiMousehide(enabled) abort call rpcnotify(0, 'Gui', 'Mousehide', a:enabled) endfunction " The GuiFont command. For compatibility there is also Guifont function s:GuiFontCommand(fname, bang) abort if a:fname ==# '' if exists('g:GuiFont') echo g:GuiFont else echo 'No GuiFont is set' endif else call GuiFont(a:fname, a:bang ==# '!') endif endfunction command! -nargs=? -bang Guifont call s:GuiFontCommand("<args>", "<bang>") command! -nargs=? -bang GuiFont call s:GuiFontCommand("<args>", "<bang>") function s:GuiLinespaceCommand(height) abort if a:height ==# '' if exists('g:GuiLinespace') echo g:GuiLinespace else echo 'No GuiLinespace is set' endif else call GuiLinespace(a:height) endif endfunction command! -nargs=? GuiLinespace call s:GuiLinespaceCommand("<args>") " GuiDrop('file1', 'file2', ...) is similar to :drop file1 file2 ... " but it calls fnameescape() over all arguments function GuiDrop(...) let l:fnames = deepcopy(a:000) let l:args = map(l:fnames, 'fnameescape(v:val)') exec 'drop '.join(l:args, ' ') doautocmd BufEnter endfunction ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/gzip.vim����������������������������������������������������������������0000664�0000000�0000000�00000004703�13204015742�0017461�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim plugin for editing compressed files. " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2016 Oct 30 " Exit quickly when: " - this plugin was already loaded " - when 'compatible' is set " - some autocommands are already taking care of compressed files if exists("loaded_gzip") || &cp || exists("#BufReadPre#*.gz") finish endif let loaded_gzip = 1 augroup gzip " Remove all gzip autocommands au! " Enable editing of gzipped files. " The functions are defined in autoload/gzip.vim. " " Set binary mode before reading the file. " Use "gzip -d", gunzip isn't always available. autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst setlocal bin autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d") autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d") autocmd BufReadPost,FileReadPost *.lz call gzip#read("lzip -d") autocmd BufReadPost,FileReadPost *.zst call gzip#read("zstd -d --rm") autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z") autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z") autocmd BufWritePost,FileWritePost *.lz call gzip#write("lzip") autocmd BufWritePost,FileWritePost *.zst call gzip#write("zstd --rm") autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") autocmd FileAppendPre *.Z call gzip#appre("uncompress") autocmd FileAppendPre *.lzma call gzip#appre("lzma -d") autocmd FileAppendPre *.xz call gzip#appre("xz -d") autocmd FileAppendPre *.lz call gzip#appre("lzip -d") autocmd FileAppendPre *.zst call gzip#appre("zstd -d --rm") autocmd FileAppendPost *.gz call gzip#write("gzip") autocmd FileAppendPost *.bz2 call gzip#write("bzip2") autocmd FileAppendPost *.Z call gzip#write("compress -f") autocmd FileAppendPost *.lzma call gzip#write("lzma -z") autocmd FileAppendPost *.xz call gzip#write("xz -z") autocmd FileAppendPost *.lz call gzip#write("lzip") autocmd FileAppendPost *.zst call gzip#write("zstd --rm") augroup END �������������������������������������������������������������neovim-0.2.2/runtime/plugin/health.vim��������������������������������������������������������������0000664�0000000�0000000�00000000527�13204015742�0017755�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������function! s:complete(lead, _line, _pos) abort return sort(filter(map(globpath(&runtimepath, 'autoload/health/*', 1, 1), \ 'fnamemodify(v:val, ":t:r")'), \ 'empty(a:lead) || v:val[:strlen(a:lead)-1] ==# a:lead')) endfunction command! -nargs=* -complete=customlist,s:complete CheckHealth \ call health#check([<f-args>]) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/man.vim�����������������������������������������������������������������0000664�0000000�0000000�00000000556�13204015742�0017265�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Maintainer: Anmol Sethi <anmol@aubble.com> if exists('g:loaded_man') finish endif let g:loaded_man = 1 command! -bar -range=0 -complete=customlist,man#complete -nargs=* Man call man#open_page(v:count, v:count1, <q-mods>, <f-args>) augroup man autocmd! autocmd BufReadCmd man://* call man#read_page(matchstr(expand('<amatch>'), 'man://\zs.*')) augroup END ��������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/matchit.vim�������������������������������������������������������������0000664�0000000�0000000�00000073512�13204015742�0020145�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" matchit.vim: (global plugin) Extended "%" matching " Last Change: 2017 Sep 15 " Maintainer: Benji Fisher PhD <benji@member.AMS.org> " Version: 1.13.3, for Vim 6.3+ " Fix from Tommy Allen included. " Fix from Fernando Torres included. " Improvement from Ken Takata included. " URL: http://www.vim.org/script.php?script_id=39 " Documentation: " The documentation is in a separate file, matchit.txt . " Credits: " Vim editor by Bram Moolenaar (Thanks, Bram!) " Original script and design by Raul Segura Acevedo " Support for comments by Douglas Potts " Support for back references and other improvements by Benji Fisher " Support for many languages by Johannes Zellner " Suggestions for improvement, bug reports, and support for additional " languages by Jordi-Albert Batalla, Neil Bird, Servatius Brandt, Mark " Collett, Stephen Wall, Dany St-Amant, Yuheng Xie, and Johannes Zellner. " Debugging: " If you'd like to try the built-in debugging commands... " :MatchDebug to activate debugging for the current buffer " This saves the values of several key script variables as buffer-local " variables. See the MatchDebug() function, below, for details. " TODO: I should think about multi-line patterns for b:match_words. " This would require an option: how many lines to scan (default 1). " This would be useful for Python, maybe also for *ML. " TODO: Maybe I should add a menu so that people will actually use some of " the features that I have implemented. " TODO: Eliminate the MultiMatch function. Add yet another argument to " Match_wrapper() instead. " TODO: Allow :let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1' " TODO: Make backrefs safer by using '\V' (very no-magic). " TODO: Add a level of indirection, so that custom % scripts can use my " work but extend it. " allow user to prevent loading " and prevent duplicate loading if exists("loaded_matchit") || &cp finish endif let loaded_matchit = 1 let s:last_mps = "" let s:last_words = ":" let s:patBR = "" let s:save_cpo = &cpo set cpo&vim nnoremap <silent> % :<C-U>call <SID>Match_wrapper('',1,'n') <CR> nnoremap <silent> g% :<C-U>call <SID>Match_wrapper('',0,'n') <CR> vnoremap <silent> % :<C-U>call <SID>Match_wrapper('',1,'v') <CR>m'gv`` vnoremap <silent> g% :<C-U>call <SID>Match_wrapper('',0,'v') <CR>m'gv`` onoremap <silent> % v:<C-U>call <SID>Match_wrapper('',1,'o') <CR> onoremap <silent> g% v:<C-U>call <SID>Match_wrapper('',0,'o') <CR> " Analogues of [{ and ]} using matching patterns: nnoremap <silent> [% :<C-U>call <SID>MultiMatch("bW", "n") <CR> nnoremap <silent> ]% :<C-U>call <SID>MultiMatch("W", "n") <CR> vmap [% <Esc>[%m'gv`` vmap ]% <Esc>]%m'gv`` " vnoremap <silent> [% :<C-U>call <SID>MultiMatch("bW", "v") <CR>m'gv`` " vnoremap <silent> ]% :<C-U>call <SID>MultiMatch("W", "v") <CR>m'gv`` onoremap <silent> [% v:<C-U>call <SID>MultiMatch("bW", "o") <CR> onoremap <silent> ]% v:<C-U>call <SID>MultiMatch("W", "o") <CR> " text object: vmap a% <Esc>[%v]% " Auto-complete mappings: (not yet "ready for prime time") " TODO Read :help write-plugin for the "right" way to let the user " specify a key binding. " let g:match_auto = '<C-]>' " let g:match_autoCR = '<C-CR>' " if exists("g:match_auto") " execute "inoremap " . g:match_auto . ' x<Esc>"=<SID>Autocomplete()<CR>Pls' " endif " if exists("g:match_autoCR") " execute "inoremap " . g:match_autoCR . ' <CR><C-R>=<SID>Autocomplete()<CR>' " endif " if exists("g:match_gthhoh") " execute "inoremap " . g:match_gthhoh . ' <C-O>:call <SID>Gthhoh()<CR>' " endif " gthhoh = "Get the heck out of here!" let s:notslash = '\\\@<!\%(\\\\\)*' function! s:Match_wrapper(word, forward, mode) range " In s:CleanUp(), :execute "set" restore_options . let restore_options = "" if exists("b:match_ignorecase") && b:match_ignorecase != &ic let restore_options .= (&ic ? " " : " no") . "ignorecase" let &ignorecase = b:match_ignorecase endif if &ve != '' let restore_options = " ve=" . &ve . restore_options set ve= endif " If this function was called from Visual mode, make sure that the cursor " is at the correct end of the Visual range: if a:mode == "v" execute "normal! gv\<Esc>" endif " In s:CleanUp(), we may need to check whether the cursor moved forward. let startline = line(".") let startcol = col(".") " Use default behavior if called with a count. if v:count exe "normal! " . v:count . "%" return s:CleanUp(restore_options, a:mode, startline, startcol) end " First step: if not already done, set the script variables " s:do_BR flag for whether there are backrefs " s:pat parsed version of b:match_words " s:all regexp based on s:pat and the default groups " if !exists("b:match_words") || b:match_words == "" let match_words = "" " Allow b:match_words = "GetVimMatchWords()" . elseif b:match_words =~ ":" let match_words = b:match_words else execute "let match_words =" b:match_words endif " Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion! if (match_words != s:last_words) || (&mps != s:last_mps) \ || exists("b:match_debug") let s:last_mps = &mps " The next several lines were here before " BF started messing with this script. " quote the special chars in 'matchpairs', replace [,:] with \| and then " append the builtin pairs (/*, */, #if, #ifdef, #else, #elif, #endif) " let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+', " \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>' let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") . \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>' " s:all = pattern with all the keywords let match_words = match_words . (strlen(match_words) ? "," : "") . default let s:last_words = match_words if match_words !~ s:notslash . '\\\d' let s:do_BR = 0 let s:pat = match_words else let s:do_BR = 1 let s:pat = s:ParseWords(match_words) endif let s:all = substitute(s:pat, s:notslash . '\zs[,:]\+', '\\|', 'g') let s:all = '\%(' . s:all . '\)' " let s:all = '\%(' . substitute(s:all, '\\\ze[,:]', '', 'g') . '\)' if exists("b:match_debug") let b:match_pat = s:pat endif " Reconstruct the version with unresolved backrefs. let s:patBR = substitute(match_words.',', \ s:notslash.'\zs[,:]*,[,:]*', ',', 'g') let s:patBR = substitute(s:patBR, s:notslash.'\zs:\{2,}', ':', 'g') endif " Second step: set the following local variables: " matchline = line on which the cursor started " curcol = number of characters before match " prefix = regexp for start of line to start of match " suffix = regexp for end of match to end of line " Require match to end on or after the cursor and prefer it to " start on or before the cursor. let matchline = getline(startline) if a:word != '' " word given if a:word !~ s:all echohl WarningMsg|echo 'Missing rule for word:"'.a:word.'"'|echohl NONE return s:CleanUp(restore_options, a:mode, startline, startcol) endif let matchline = a:word let curcol = 0 let prefix = '^\%(' let suffix = '\)$' " Now the case when "word" is not given else " Find the match that ends on or after the cursor and set curcol. let regexp = s:Wholematch(matchline, s:all, startcol-1) let curcol = match(matchline, regexp) " If there is no match, give up. if curcol == -1 return s:CleanUp(restore_options, a:mode, startline, startcol) endif let endcol = matchend(matchline, regexp) let suf = strlen(matchline) - endcol let prefix = (curcol ? '^.*\%' . (curcol + 1) . 'c\%(' : '^\%(') let suffix = (suf ? '\)\%' . (endcol + 1) . 'c.*$' : '\)$') endif if exists("b:match_debug") let b:match_match = matchstr(matchline, regexp) let b:match_col = curcol+1 endif " Third step: Find the group and single word that match, and the original " (backref) versions of these. Then, resolve the backrefs. " Set the following local variable: " group = colon-separated list of patterns, one of which matches " = ini:mid:fin or ini:fin " " Now, set group and groupBR to the matching group: 'if:endif' or " 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns " group . "," . groupBR, and we pick it apart. let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, s:patBR) let i = matchend(group, s:notslash . ",") let groupBR = strpart(group, i) let group = strpart(group, 0, i-1) " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix if s:do_BR " Do the hard part: resolve those backrefs! let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline) endif if exists("b:match_debug") let b:match_wholeBR = groupBR let i = matchend(groupBR, s:notslash . ":") let b:match_iniBR = strpart(groupBR, 0, i-1) endif " Fourth step: Set the arguments for searchpair(). let i = matchend(group, s:notslash . ":") let j = matchend(group, '.*' . s:notslash . ":") let ini = strpart(group, 0, i-1) let mid = substitute(strpart(group, i,j-i-1), s:notslash.'\zs:', '\\|', 'g') let fin = strpart(group, j) "Un-escape the remaining , and : characters. let ini = substitute(ini, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') let mid = substitute(mid, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') let fin = substitute(fin, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') " searchpair() requires that these patterns avoid \(\) groups. let ini = substitute(ini, s:notslash . '\zs\\(', '\\%(', 'g') let mid = substitute(mid, s:notslash . '\zs\\(', '\\%(', 'g') let fin = substitute(fin, s:notslash . '\zs\\(', '\\%(', 'g') " Set mid. This is optimized for readability, not micro-efficiency! if a:forward && matchline =~ prefix . fin . suffix \ || !a:forward && matchline =~ prefix . ini . suffix let mid = "" endif " Set flag. This is optimized for readability, not micro-efficiency! if a:forward && matchline =~ prefix . fin . suffix \ || !a:forward && matchline !~ prefix . ini . suffix let flag = "bW" else let flag = "W" endif " Set skip. if exists("b:match_skip") let skip = b:match_skip elseif exists("b:match_comment") " backwards compatibility and testing! let skip = "r:" . b:match_comment else let skip = 's:comment\|string' endif let skip = s:ParseSkip(skip) if exists("b:match_debug") let b:match_ini = ini let b:match_tail = (strlen(mid) ? mid.'\|' : '') . fin endif " Fifth step: actually start moving the cursor and call searchpair(). " Later, :execute restore_cursor to get to the original screen. let view = winsaveview() call cursor(0, curcol + 1) " normal! 0 " if curcol " execute "normal!" . curcol . "l" " endif if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on")) let skip = "0" else execute "if " . skip . "| let skip = '0' | endif" endif let sp_return = searchpair(ini, mid, fin, flag, skip) let final_position = "call cursor(" . line(".") . "," . col(".") . ")" " Restore cursor position and original screen. call winrestview(view) normal! m' if sp_return > 0 execute final_position endif return s:CleanUp(restore_options, a:mode, startline, startcol, mid.'\|'.fin) endfun " Restore options and do some special handling for Operator-pending mode. " The optional argument is the tail of the matching group. fun! s:CleanUp(options, mode, startline, startcol, ...) if strlen(a:options) execute "set" a:options endif " Open folds, if appropriate. if a:mode != "o" if &foldopen =~ "percent" normal! zv endif " In Operator-pending mode, we want to include the whole match " (for example, d%). " This is only a problem if we end up moving in the forward direction. elseif (a:startline < line(".")) || \ (a:startline == line(".") && a:startcol < col(".")) if a:0 " Check whether the match is a single character. If not, move to the " end of the match. let matchline = getline(".") let currcol = col(".") let regexp = s:Wholematch(matchline, a:1, currcol-1) let endcol = matchend(matchline, regexp) if endcol > currcol " This is NOT off by one! call cursor(0, endcol) endif endif " a:0 endif " a:mode != "o" && etc. return 0 endfun " Example (simplified HTML patterns): if " a:groupBR = '<\(\k\+\)>:</\1>' " a:prefix = '^.\{3}\(' " a:group = '<\(\k\+\)>:</\(\k\+\)>' " a:suffix = '\).\{2}$' " a:matchline = "123<tag>12" or "123</tag>12" " then extract "tag" from a:matchline and return "<tag>:</tag>" . fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline) if a:matchline !~ a:prefix . \ substitute(a:group, s:notslash . '\zs:', '\\|', 'g') . a:suffix return a:group endif let i = matchend(a:groupBR, s:notslash . ':') let ini = strpart(a:groupBR, 0, i-1) let tailBR = strpart(a:groupBR, i) let word = s:Choose(a:group, a:matchline, ":", "", a:prefix, a:suffix, \ a:groupBR) let i = matchend(word, s:notslash . ":") let wordBR = strpart(word, i) let word = strpart(word, 0, i-1) " Now, a:matchline =~ a:prefix . word . a:suffix if wordBR != ini let table = s:Resolve(ini, wordBR, "table") else " let table = "----------" let table = "" let d = 0 while d < 10 if tailBR =~ s:notslash . '\\' . d " let table[d] = d let table = table . d else let table = table . "-" endif let d = d + 1 endwhile endif let d = 9 while d if table[d] != "-" let backref = substitute(a:matchline, a:prefix.word.a:suffix, \ '\'.table[d], "") " Are there any other characters that should be escaped? let backref = escape(backref, '*,:') execute s:Ref(ini, d, "start", "len") let ini = strpart(ini, 0, start) . backref . strpart(ini, start+len) let tailBR = substitute(tailBR, s:notslash . '\zs\\' . d, \ escape(backref, '\\&'), 'g') endif let d = d-1 endwhile if exists("b:match_debug") if s:do_BR let b:match_table = table let b:match_word = word else let b:match_table = "" let b:match_word = "" endif endif return ini . ":" . tailBR endfun " Input a comma-separated list of groups with backrefs, such as " a:groups = '\(foo\):end\1,\(bar\):end\1' " and return a comma-separated list of groups with backrefs replaced: " return '\(foo\):end\(foo\),\(bar\):end\(bar\)' fun! s:ParseWords(groups) let groups = substitute(a:groups.",", s:notslash.'\zs[,:]*,[,:]*', ',', 'g') let groups = substitute(groups, s:notslash . '\zs:\{2,}', ':', 'g') let parsed = "" while groups =~ '[^,:]' let i = matchend(groups, s:notslash . ':') let j = matchend(groups, s:notslash . ',') let ini = strpart(groups, 0, i-1) let tail = strpart(groups, i, j-i-1) . ":" let groups = strpart(groups, j) let parsed = parsed . ini let i = matchend(tail, s:notslash . ':') while i != -1 " In 'if:else:endif', ini='if' and word='else' and then word='endif'. let word = strpart(tail, 0, i-1) let tail = strpart(tail, i) let i = matchend(tail, s:notslash . ':') let parsed = parsed . ":" . s:Resolve(ini, word, "word") endwhile " Now, tail has been used up. let parsed = parsed . "," endwhile " groups =~ '[^,:]' let parsed = substitute(parsed, ',$', '', '') return parsed endfun " TODO I think this can be simplified and/or made more efficient. " TODO What should I do if a:start is out of range? " Return a regexp that matches all of a:string, such that " matchstr(a:string, regexp) represents the match for a:pat that starts " as close to a:start as possible, before being preferred to after, and " ends after a:start . " Usage: " let regexp = s:Wholematch(getline("."), 'foo\|bar', col(".")-1) " let i = match(getline("."), regexp) " let j = matchend(getline("."), regexp) " let match = matchstr(getline("."), regexp) fun! s:Wholematch(string, pat, start) let group = '\%(' . a:pat . '\)' let prefix = (a:start ? '\(^.*\%<' . (a:start + 2) . 'c\)\zs' : '^') let len = strlen(a:string) let suffix = (a:start+1 < len ? '\(\%>'.(a:start+1).'c.*$\)\@=' : '$') if a:string !~ prefix . group . suffix let prefix = '' endif return prefix . group . suffix endfun " No extra arguments: s:Ref(string, d) will " find the d'th occurrence of '\(' and return it, along with everything up " to and including the matching '\)'. " One argument: s:Ref(string, d, "start") returns the index of the start " of the d'th '\(' and any other argument returns the length of the group. " Two arguments: s:Ref(string, d, "foo", "bar") returns a string to be " executed, having the effect of " :let foo = s:Ref(string, d, "start") " :let bar = s:Ref(string, d, "len") fun! s:Ref(string, d, ...) let len = strlen(a:string) if a:d == 0 let start = 0 else let cnt = a:d let match = a:string while cnt let cnt = cnt - 1 let index = matchend(match, s:notslash . '\\(') if index == -1 return "" endif let match = strpart(match, index) endwhile let start = len - strlen(match) if a:0 == 1 && a:1 == "start" return start - 2 endif let cnt = 1 while cnt let index = matchend(match, s:notslash . '\\(\|\\)') - 1 if index == -2 return "" endif " Increment if an open, decrement if a ')': let cnt = cnt + (match[index]=="(" ? 1 : -1) " ')' " let cnt = stridx('0(', match[index]) + cnt let match = strpart(match, index+1) endwhile let start = start - 2 let len = len - start - strlen(match) endif if a:0 == 1 return len elseif a:0 == 2 return "let " . a:1 . "=" . start . "| let " . a:2 . "=" . len else return strpart(a:string, start, len) endif endfun " Count the number of disjoint copies of pattern in string. " If the pattern is a literal string and contains no '0' or '1' characters " then s:Count(string, pattern, '0', '1') should be faster than " s:Count(string, pattern). fun! s:Count(string, pattern, ...) let pat = escape(a:pattern, '\\') if a:0 > 1 let foo = substitute(a:string, '[^'.a:pattern.']', "a:1", "g") let foo = substitute(a:string, pat, a:2, "g") let foo = substitute(foo, '[^' . a:2 . ']', "", "g") return strlen(foo) endif let result = 0 let foo = a:string let index = matchend(foo, pat) while index != -1 let result = result + 1 let foo = strpart(foo, index) let index = matchend(foo, pat) endwhile return result endfun " s:Resolve('\(a\)\(b\)', '\(c\)\2\1\1\2') should return table.word, where " word = '\(c\)\(b\)\(a\)\3\2' and table = '-32-------'. That is, the first " '\1' in target is replaced by '\(a\)' in word, table[1] = 3, and this " indicates that all other instances of '\1' in target are to be replaced " by '\3'. The hard part is dealing with nesting... " Note that ":" is an illegal character for source and target, " unless it is preceded by "\". fun! s:Resolve(source, target, output) let word = a:target let i = matchend(word, s:notslash . '\\\d') - 1 let table = "----------" while i != -2 " There are back references to be replaced. let d = word[i] let backref = s:Ref(a:source, d) " The idea is to replace '\d' with backref. Before we do this, " replace any \(\) groups in backref with :1, :2, ... if they " correspond to the first, second, ... group already inserted " into backref. Later, replace :1 with \1 and so on. The group " number w+b within backref corresponds to the group number " s within a:source. " w = number of '\(' in word before the current one let w = s:Count( \ substitute(strpart(word, 0, i-1), '\\\\', '', 'g'), '\(', '1') let b = 1 " number of the current '\(' in backref let s = d " number of the current '\(' in a:source while b <= s:Count(substitute(backref, '\\\\', '', 'g'), '\(', '1') \ && s < 10 if table[s] == "-" if w + b < 10 " let table[s] = w + b let table = strpart(table, 0, s) . (w+b) . strpart(table, s+1) endif let b = b + 1 let s = s + 1 else execute s:Ref(backref, b, "start", "len") let ref = strpart(backref, start, len) let backref = strpart(backref, 0, start) . ":". table[s] \ . strpart(backref, start+len) let s = s + s:Count(substitute(ref, '\\\\', '', 'g'), '\(', '1') endif endwhile let word = strpart(word, 0, i-1) . backref . strpart(word, i+1) let i = matchend(word, s:notslash . '\\\d') - 1 endwhile let word = substitute(word, s:notslash . '\zs:', '\\', 'g') if a:output == "table" return table elseif a:output == "word" return word else return table . word endif endfun " Assume a:comma = ",". Then the format for a:patterns and a:1 is " a:patterns = "<pat1>,<pat2>,..." " a:1 = "<alt1>,<alt2>,..." " If <patn> is the first pattern that matches a:string then return <patn> " if no optional arguments are given; return <patn>,<altn> if a:1 is given. fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...) let tail = (a:patterns =~ a:comma."$" ? a:patterns : a:patterns . a:comma) let i = matchend(tail, s:notslash . a:comma) if a:0 let alttail = (a:1 =~ a:comma."$" ? a:1 : a:1 . a:comma) let j = matchend(alttail, s:notslash . a:comma) endif let current = strpart(tail, 0, i-1) if a:branch == "" let currpat = current else let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g') endif while a:string !~ a:prefix . currpat . a:suffix let tail = strpart(tail, i) let i = matchend(tail, s:notslash . a:comma) if i == -1 return -1 endif let current = strpart(tail, 0, i-1) if a:branch == "" let currpat = current else let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g') endif if a:0 let alttail = strpart(alttail, j) let j = matchend(alttail, s:notslash . a:comma) endif endwhile if a:0 let current = current . a:comma . strpart(alttail, 0, j-1) endif return current endfun " Call this function to turn on debugging information. Every time the main " script is run, buffer variables will be saved. These can be used directly " or viewed using the menu items below. if !exists(":MatchDebug") command! -nargs=0 MatchDebug call s:Match_debug() endif fun! s:Match_debug() let b:match_debug = 1 " Save debugging information. " pat = all of b:match_words with backrefs parsed amenu &Matchit.&pat :echo b:match_pat<CR> " match = bit of text that is recognized as a match amenu &Matchit.&match :echo b:match_match<CR> " curcol = cursor column of the start of the matching text amenu &Matchit.&curcol :echo b:match_col<CR> " wholeBR = matching group, original version amenu &Matchit.wh&oleBR :echo b:match_wholeBR<CR> " iniBR = 'if' piece, original version amenu &Matchit.ini&BR :echo b:match_iniBR<CR> " ini = 'if' piece, with all backrefs resolved from match amenu &Matchit.&ini :echo b:match_ini<CR> " tail = 'else\|endif' piece, with all backrefs resolved from match amenu &Matchit.&tail :echo b:match_tail<CR> " fin = 'endif' piece, with all backrefs resolved from match amenu &Matchit.&word :echo b:match_word<CR> " '\'.d in ini refers to the same thing as '\'.table[d] in word. amenu &Matchit.t&able :echo '0:' . b:match_table . ':9'<CR> endfun " Jump to the nearest unmatched "(" or "if" or "<tag>" if a:spflag == "bW" " or the nearest unmatched "</tag>" or "endif" or ")" if a:spflag == "W". " Return a "mark" for the original position, so that " let m = MultiMatch("bW", "n") ... execute m " will return to the original position. If there is a problem, do not " move the cursor and return "", unless a count is given, in which case " go up or down as many levels as possible and again return "". " TODO This relies on the same patterns as % matching. It might be a good " idea to give it its own matching patterns. fun! s:MultiMatch(spflag, mode) if !exists("b:match_words") || b:match_words == "" return {} end let restore_options = "" if exists("b:match_ignorecase") && b:match_ignorecase != &ic let restore_options .= (&ic ? " " : " no") . "ignorecase" let &ignorecase = b:match_ignorecase endif let startline = line(".") let startcol = col(".") " First step: if not already done, set the script variables " s:do_BR flag for whether there are backrefs " s:pat parsed version of b:match_words " s:all regexp based on s:pat and the default groups " This part is copied and slightly modified from s:Match_wrapper(). let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") . \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>' " Allow b:match_words = "GetVimMatchWords()" . if b:match_words =~ ":" let match_words = b:match_words else execute "let match_words =" b:match_words endif if (match_words != s:last_words) || (&mps != s:last_mps) || \ exists("b:match_debug") let s:last_words = match_words let s:last_mps = &mps let match_words = match_words . (strlen(match_words) ? "," : "") . default if match_words !~ s:notslash . '\\\d' let s:do_BR = 0 let s:pat = match_words else let s:do_BR = 1 let s:pat = s:ParseWords(match_words) endif let s:all = '\%(' . substitute(s:pat . (strlen(s:pat) ? "," : "") . default, \ '[,:]\+', '\\|', 'g') . '\)' if exists("b:match_debug") let b:match_pat = s:pat endif endif " Second step: figure out the patterns for searchpair() " and save the screen, cursor position, and 'ignorecase'. " - TODO: A lot of this is copied from s:Match_wrapper(). " - maybe even more functionality should be split off " - into separate functions! let cdefault = (s:pat =~ '[^,]$' ? "," : "") . default let open = substitute(s:pat . cdefault, \ s:notslash . '\zs:.\{-}' . s:notslash . ',', '\\),\\(', 'g') let open = '\(' . substitute(open, s:notslash . '\zs:.*$', '\\)', '') let close = substitute(s:pat . cdefault, \ s:notslash . '\zs,.\{-}' . s:notslash . ':', '\\),\\(', 'g') let close = substitute(close, '^.\{-}' . s:notslash . ':', '\\(', '') . '\)' if exists("b:match_skip") let skip = b:match_skip elseif exists("b:match_comment") " backwards compatibility and testing! let skip = "r:" . b:match_comment else let skip = 's:comment\|string' endif let skip = s:ParseSkip(skip) let view = winsaveview() " Third step: call searchpair(). " Replace '\('--but not '\\('--with '\%(' and ',' with '\|'. let openpat = substitute(open, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g') let openpat = substitute(openpat, ',', '\\|', 'g') let closepat = substitute(close, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g') let closepat = substitute(closepat, ',', '\\|', 'g') if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on")) let skip = '0' else execute "if " . skip . "| let skip = '0' | endif" endif mark ' let level = v:count1 while level if searchpair(openpat, '', closepat, a:spflag, skip) < 1 call s:CleanUp(restore_options, a:mode, startline, startcol) return {} endif let level = level - 1 endwhile " Restore options and return view dict to restore the original position. call s:CleanUp(restore_options, a:mode, startline, startcol) return view endfun " Search backwards for "if" or "while" or "<tag>" or ... " and return "endif" or "endwhile" or "</tag>" or ... . " For now, this uses b:match_words and the same script variables " as s:Match_wrapper() . Later, it may get its own patterns, " either from a buffer variable or passed as arguments. " fun! s:Autocomplete() " echo "autocomplete not yet implemented :-(" " if !exists("b:match_words") || b:match_words == "" " return "" " end " let startpos = s:MultiMatch("bW") " " if startpos == "" " return "" " endif " " - TODO: figure out whether 'if' or '<tag>' matched, and construct " " - the appropriate closing. " let matchline = getline(".") " let curcol = col(".") - 1 " " - TODO: Change the s:all argument if there is a new set of match pats. " let regexp = s:Wholematch(matchline, s:all, curcol) " let suf = strlen(matchline) - matchend(matchline, regexp) " let prefix = (curcol ? '^.\{' . curcol . '}\%(' : '^\%(') " let suffix = (suf ? '\).\{' . suf . '}$' : '\)$') " " Reconstruct the version with unresolved backrefs. " let patBR = substitute(b:match_words.',', '[,:]*,[,:]*', ',', 'g') " let patBR = substitute(patBR, ':\{2,}', ':', "g") " " Now, set group and groupBR to the matching group: 'if:endif' or " " 'while:endwhile' or whatever. " let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR) " let i = matchend(group, s:notslash . ",") " let groupBR = strpart(group, i) " let group = strpart(group, 0, i-1) " " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix " if s:do_BR " let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline) " endif " " let g:group = group " " " - TODO: Construct the closing from group. " let fake = "end" . expand("<cword>") " execute startpos " return fake " endfun " Close all open structures. "Get the heck out of here!" " fun! s:Gthhoh() " let close = s:Autocomplete() " while strlen(close) " put=close " let close = s:Autocomplete() " endwhile " endfun " Parse special strings as typical skip arguments for searchpair(): " s:foo becomes (current syntax item) =~ foo " S:foo becomes (current syntax item) !~ foo " r:foo becomes (line before cursor) =~ foo " R:foo becomes (line before cursor) !~ foo fun! s:ParseSkip(str) let skip = a:str if skip[1] == ":" if skip[0] == "s" let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" . \ strpart(skip,2) . "'" elseif skip[0] == "S" let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" . \ strpart(skip,2) . "'" elseif skip[0] == "r" let skip = "strpart(getline('.'),0,col('.'))=~'" . strpart(skip,2). "'" elseif skip[0] == "R" let skip = "strpart(getline('.'),0,col('.'))!~'" . strpart(skip,2). "'" endif endif return skip endfun let &cpo = s:save_cpo unlet s:save_cpo " vim:sts=2:sw=2: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/matchparen.vim����������������������������������������������������������0000664�0000000�0000000�00000015132�13204015742�0020630�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim plugin for showing matching parens " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2017 Sep 30 " Exit quickly when: " - this plugin was already loaded (or disabled) " - when 'compatible' is set " - the "CursorMoved" autocmd event is not available. if exists("g:loaded_matchparen") || &cp || !exists("##CursorMoved") finish endif let g:loaded_matchparen = 1 if !exists("g:matchparen_timeout") let g:matchparen_timeout = 300 endif if !exists("g:matchparen_insert_timeout") let g:matchparen_insert_timeout = 60 endif augroup matchparen " Replace all matchparen autocommands autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair() if exists('##TextChanged') autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair() endif augroup END " Skip the rest if it was already done. if exists("*s:Highlight_Matching_Pair") finish endif let s:cpo_save = &cpo set cpo-=C " The function that is invoked (very often) to define a ":match" highlighting " for any matching paren. function! s:Highlight_Matching_Pair() " Remove any previous match. if exists('w:paren_hl_on') && w:paren_hl_on silent! call matchdelete(3) let w:paren_hl_on = 0 endif " Avoid that we remove the popup menu. " Return when there are no colors (looks like the cursor jumps). if pumvisible() || (&t_Co < 8 && !has("gui_running")) return endif " Get the character under the cursor and check if it's in 'matchpairs'. let c_lnum = line('.') let c_col = col('.') let before = 0 let text = getline(c_lnum) let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') if empty(matches) let [c_before, c] = ['', ''] else let [c_before, c] = matches[1:2] endif let plist = split(&matchpairs, '.\zs[:,]') let i = index(plist, c) if i < 0 " not found, in Insert mode try character before the cursor if c_col > 1 && (mode() == 'i' || mode() == 'R') let before = strlen(c_before) let c = c_before let i = index(plist, c) endif if i < 0 " not found, nothing to do return endif endif " Figure out the arguments for searchpairpos(). if i % 2 == 0 let s_flags = 'nW' let c2 = plist[i + 1] else let s_flags = 'nbW' let c2 = c let c = plist[i - 1] endif if c == '[' let c = '\[' let c2 = '\]' endif " Find the match. When it was just before the cursor move it there for a " moment. if before > 0 let has_getcurpos = exists("*getcurpos") if has_getcurpos " getcurpos() is more efficient but doesn't exist before 7.4.313. let save_cursor = getcurpos() else let save_cursor = winsaveview() endif call cursor(c_lnum, c_col - before) endif " Build an expression that detects whether the current cursor position is in " certain syntax types (string, comment, etc.), for use as searchpairpos()'s " skip argument. " We match "escape" for special items, such as lispEscapeSpecial. let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . \ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' " If executing the expression determines that the cursor is currently in " one of the syntax types, then we want searchpairpos() to find the pair " within those syntax types (i.e., not skip). Otherwise, the cursor is " outside of the syntax types and s_skip should keep its value so we skip any " matching pair inside the syntax types. execute 'if' s_skip '| let s_skip = 0 | endif' " Limit the search to lines visible in the window. let stoplinebottom = line('w$') let stoplinetop = line('w0') if i % 2 == 0 let stopline = stoplinebottom else let stopline = stoplinetop endif " Limit the search time to 300 msec to avoid a hang on very long lines. " This fails when a timeout is not supported. if mode() == 'i' || mode() == 'R' let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout else let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout endif try let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) catch /E118/ " Can't use the timeout, restrict the stopline a bit more to avoid taking " a long time on closed folds and long lines. " The "viewable" variables give a range in which we can scroll while " keeping the cursor at the same position. " adjustedScrolloff accounts for very large numbers of scrolloff. let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) " one of these stoplines will be adjusted below, but the current values are " minimal boundaries within the current window if i % 2 == 0 if has("byte_offset") && has("syntax_items") && &smc > 0 let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) let stopline = min([bottom_viewable, byte2line(stopbyte)]) else let stopline = min([bottom_viewable, c_lnum + 100]) endif let stoplinebottom = stopline else if has("byte_offset") && has("syntax_items") && &smc > 0 let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) let stopline = max([top_viewable, byte2line(stopbyte)]) else let stopline = max([top_viewable, c_lnum - 100]) endif let stoplinetop = stopline endif let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) endtry if before > 0 if has_getcurpos call setpos('.', save_cursor) else call winrestview(save_cursor) endif endif " If a match is found setup match highlighting. if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom if exists('*matchaddpos') call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) else exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' endif let w:paren_hl_on = 1 endif endfunction " Define commands that will disable and enable the plugin. command! DoMatchParen call s:DoMatchParen() command! NoMatchParen call s:NoMatchParen() func! s:NoMatchParen() let w = winnr() noau windo silent! call matchdelete(3) unlet! g:loaded_matchparen exe "noau ". w . "wincmd w" au! matchparen endfunc func! s:DoMatchParen() runtime plugin/matchparen.vim let w = winnr() silent windo doau CursorMoved exe "noau ". w . "wincmd w" endfunc let &cpo = s:cpo_save unlet s:cpo_save ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/netrwPlugin.vim���������������������������������������������������������0000664�0000000�0000000�00000024310�13204015742�0021022�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" netrwPlugin.vim: Handles file transfer and remote directory listing across a network " PLUGIN SECTION " Date: Feb 08, 2016 " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, " netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided " *as is* and comes with no warranty of any kind, either " expressed or implied. By using this plugin, you agree that " in no event will the copyright holder be liable for any damages " resulting from the use of this software. " " But be doers of the Word, and not only hearers, deluding your own selves {{{1 " (James 1:22 RSV) " =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- " Load Once: {{{1 if &cp || exists("g:loaded_netrwPlugin") finish endif let g:loaded_netrwPlugin = "v156" let s:keepcpo = &cpo set cpo&vim "DechoRemOn " --------------------------------------------------------------------- " Public Interface: {{{1 " Local Browsing Autocmds: {{{2 augroup FileExplorer au! au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif au BufEnter * sil call s:LocalBrowse(expand("<amatch>")) au VimEnter * sil call s:VimEnter(expand("<amatch>")) if has("win32") || has("win95") || has("win64") || has("win16") au BufEnter .* sil call s:LocalBrowse(expand("<amatch>")) endif augroup END " Network Browsing Reading Writing: {{{2 augroup Network au! au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>")) au BufReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>")) au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>")) au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>")) au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>")) try au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>")) catch /^Vim\%((\a\+)\)\=:E216/ au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>")) endtry augroup END " Commands: :Nread, :Nwrite, :NetUserPass {{{2 com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos) com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos) com! -nargs=* NetUserPass call NetUserPass(<f-args>) com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos) com! -nargs=? Ntree call netrw#SetTreetop(<q-args>) " Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2 com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>) com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(<count>,1,0+<bang>0,<q-args>) com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(<count>,1,2+<bang>0,<q-args>) com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(<count>,1,4+<bang>0,<q-args>) com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(<count>,0,6 ,<q-args>) com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>) com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>) com! -nargs=* -bar -bang -count=0 -complete=dir Lexplore call netrw#Lexplore(<count>,<bang>0,<q-args>) " Commands: NetrwSettings {{{2 com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings() com! -bang NetrwClean call netrw#Clean(<bang>0) " Maps: if !exists("g:netrw_nogx") if maparg('gx','n') == "" if !hasmapto('<Plug>NetrwBrowseX') nmap <unique> gx <Plug>NetrwBrowseX endif nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr> endif if maparg('gx','v') == "" if !hasmapto('<Plug>NetrwBrowseXVis') vmap <unique> gx <Plug>NetrwBrowseXVis endif vno <silent> <Plug>NetrwBrowseXVis :<c-u>call netrw#BrowseXVis()<cr> endif endif if exists("g:netrw_usetab") && g:netrw_usetab if maparg('<c-tab>','n') == "" nmap <unique> <c-tab> <Plug>NetrwShrink endif nno <silent> <Plug>NetrwShrink :call netrw#Shrink()<cr> endif " --------------------------------------------------------------------- " LocalBrowse: invokes netrw#LocalBrowseCheck() on directory buffers {{{2 fun! s:LocalBrowse(dirname) " Unfortunate interaction -- only DechoMsg debugging calls can be safely used here. " Otherwise, the BufEnter event gets triggered when attempts to write to " the DBG buffer are made. if !exists("s:vimentered") " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will, " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined. " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)") " call Dret("s:LocalBrowse") return endif " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")") if has("amiga") " The check against '' is made for the Amiga, where the empty " string is the current directory and not checking would break " things such as the help command. " call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)") if a:dirname != '' && isdirectory(a:dirname) sil! call netrw#LocalBrowseCheck(a:dirname) if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt exe w:netrw_bannercnt endif endif elseif isdirectory(a:dirname) " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)") " call Dredir("LocalBrowse ft last set: ","verbose set ft") " call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) sil! call netrw#LocalBrowseCheck(a:dirname) " call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt exe w:netrw_bannercnt " call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) endif else " not a directory, ignore it " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") endif " call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) " call Dret("s:LocalBrowse") endfun " --------------------------------------------------------------------- " s:VimEnter: after all vim startup stuff is done, this function is called. {{{2 " Its purpose: to look over all windows and run s:LocalBrowse() on " them, which checks if they're directories and will create a directory " listing when appropriate. " It also sets s:vimentered, letting s:LocalBrowse() know that s:VimEnter() " has already been called. fun! s:VimEnter(dirname) " call Dfunc("s:VimEnter(dirname<".a:dirname.">) expand(%)<".expand("%").">") let curwin = winnr() let s:vimentered = 1 windo call s:LocalBrowse(expand("%:p")) exe curwin."wincmd w" " call Dret("s:VimEnter") endfun " --------------------------------------------------------------------- " NetrwStatusLine: {{{1 fun! NetrwStatusLine() " let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".") if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list") let &stl= s:netrw_explore_stl if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif return "" else return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen endif endfun " ------------------------------------------------------------------------ " NetUserPass: set username and password for subsequent ftp transfer {{{1 " Usage: :call NetUserPass() -- will prompt for userid and password " :call NetUserPass("uid") -- will prompt for password " :call NetUserPass("uid","password") -- sets global userid and password fun! NetUserPass(...) " get/set userid if a:0 == 0 " call Dfunc("NetUserPass(a:0<".a:0.">)") if !exists("g:netrw_uid") || g:netrw_uid == "" " via prompt let g:netrw_uid= input('Enter username: ') endif else " from command line " call Dfunc("NetUserPass(a:1<".a:1.">) {") let g:netrw_uid= a:1 endif " get password if a:0 <= 1 " via prompt " call Decho("a:0=".a:0." case <=1:") let g:netrw_passwd= inputsecret("Enter Password: ") else " from command line " call Decho("a:0=".a:0." case >1: a:2<".a:2.">") let g:netrw_passwd=a:2 endif " call Dret("NetUserPass") endfun " ------------------------------------------------------------------------ " Modelines And Restoration: {{{1 let &cpo= s:keepcpo unlet s:keepcpo " vim:ts=8 fdm=marker ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/rplugin.vim�������������������������������������������������������������0000664�0000000�0000000�00000003305�13204015742�0020165�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������if exists('g:loaded_remote_plugins') finish endif let g:loaded_remote_plugins = '/path/to/manifest' " Get the path to the rplugin manifest file. function! s:GetManifestPath() abort let manifest_base = '' if exists('$NVIM_RPLUGIN_MANIFEST') return fnamemodify($NVIM_RPLUGIN_MANIFEST, ':p') endif let dest = has('win32') ? '$LOCALAPPDATA' : '$XDG_DATA_HOME' if !exists(dest) let dest = has('win32') ? '~/AppData/Local' : '~/.local/share' endif let dest = fnamemodify(expand(dest), ':p') if !empty(dest) let dest .= ('/' ==# dest[-1:] ? '' : '/') . 'nvim' if !isdirectory(dest) call mkdir(dest, 'p', 0700) endif let manifest_base = dest endif return manifest_base.'/rplugin.vim' endfunction " Old manifest file based on known script locations. function! s:GetOldManifestPath() abort let prefix = exists('$MYVIMRC') \ ? $MYVIMRC \ : matchstr(get(split(execute('scriptnames'), '\n'), 0, ''), '\f\+$') return fnamemodify(expand(prefix, 1), ':h') \.'/.'.fnamemodify(prefix, ':t').'-rplugin~' endfunction function! s:GetManifest() abort let manifest = s:GetManifestPath() if !filereadable(manifest) " Check if an old manifest file exists and move it to the new location. let old_manifest = s:GetOldManifestPath() if filereadable(old_manifest) call rename(old_manifest, manifest) endif endif return manifest endfunction function! s:LoadRemotePlugins() abort let g:loaded_remote_plugins = s:GetManifest() if filereadable(g:loaded_remote_plugins) execute 'source' fnameescape(g:loaded_remote_plugins) endif endfunction command! UpdateRemotePlugins call remote#host#UpdateRemotePlugins() call s:LoadRemotePlugins() ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/rrhelper.vim������������������������������������������������������������0000664�0000000�0000000�00000002606�13204015742�0020333�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim plugin with helper function(s) for --remote-wait " Maintainer: Flemming Madsen <fma@cci.dk> " Last Change: 2008 May 29 " Has this already been loaded? if exists("loaded_rrhelper") || !has("clientserver") finish endif let loaded_rrhelper = 1 " Setup answers for a --remote-wait client who will assume " a SetupRemoteReplies() function in the command server function SetupRemoteReplies() let cnt = 0 let max = argc() let id = expand("<client>") if id == 0 return endif while cnt < max " Handle same file from more clients and file being more than once " on the command line by encoding this stuff in the group name let uniqueGroup = "RemoteReply_".id."_".cnt " Path separators are always forward slashes for the autocommand pattern. " Escape special characters with a backslash. let f = substitute(argv(cnt), '\\', '/', "g") if exists('*fnameescape') let f = fnameescape(f) else let f = escape(f, " \t\n*?[{`$\\%#'\"|!<") endif execute "augroup ".uniqueGroup execute "autocmd ".uniqueGroup." BufUnload ". f ." call DoRemoteReply('".id."', '".cnt."', '".uniqueGroup."', '". f ."')" let cnt = cnt + 1 endwhile augroup END endfunc function DoRemoteReply(id, cnt, group, file) call server2client(a:id, a:cnt) execute 'autocmd! '.a:group.' BufUnload '.a:file execute 'augroup! '.a:group endfunc " vim: set sw=2 sts=2 : ��������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/shada.vim���������������������������������������������������������������0000664�0000000�0000000�00000003362�13204015742�0017570�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������if exists('g:loaded_shada_plugin') finish endif let g:loaded_shada_plugin = 1 augroup ShaDaCommands autocmd! autocmd BufReadCmd *.shada,*.shada.tmp.[a-z] \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif \ |call setline('.', shada#get_strings(readfile(expand('<afile>'),'b'))) \ |setlocal filetype=shada autocmd FileReadCmd *.shada,*.shada.tmp.[a-z] \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif \ |call append("'[", shada#get_strings(readfile(expand('<afile>'), 'b'))) autocmd BufWriteCmd *.shada,*.shada.tmp.[a-z] \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif \ |if writefile(shada#get_binstrings(getline(1, '$')), \expand('<afile>'), 'b') == 0 \ | let &l:modified = (expand('<afile>') is# bufname(+expand('<abuf>')) \? 0 \: stridx(&cpoptions, '+') != -1) \ |endif autocmd FileWriteCmd *.shada,*.shada.tmp.[a-z] \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif \ |call writefile( \shada#get_binstrings(getline(min([line("'["), line("']")]), \max([line("'["), line("']")]))), \expand('<afile>'), \'b') autocmd FileAppendCmd *.shada,*.shada.tmp.[a-z] \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif \ |call writefile( \shada#get_binstrings(getline(min([line("'["), line("']")]), \max([line("'["), line("']")]))), \expand('<afile>'), \'ab') autocmd SourceCmd *.shada,*.shada.tmp.[a-z] \ :execute 'rshada' fnameescape(expand('<afile>')) augroup END ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/spellfile.vim�����������������������������������������������������������0000664�0000000�0000000�00000000354�13204015742�0020465�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim plugin for downloading spell files if exists("loaded_spellfile_plugin") || &cp || exists("#SpellFileMissing") finish endif let loaded_spellfile_plugin = 1 autocmd SpellFileMissing * call spellfile#LoadFile(expand('<amatch>')) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/tarPlugin.vim�����������������������������������������������������������0000664�0000000�0000000�00000004337�13204015742�0020460�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" tarPlugin.vim -- a Vim plugin for browsing tarfiles " Original was copyright (c) 2002, Michael C. Toren <mct@toren.net> " Modified by Charles E. Campbell " Distributed under the GNU General Public License. " " Updates are available from <http://michael.toren.net/code/>. If you " find this script useful, or have suggestions for improvements, please " let me know. " Also look there for further comments and documentation. " " This part only sets the autocommands. The functions are in autoload/tar.vim. " --------------------------------------------------------------------- " Load Once: {{{1 if &cp || exists("g:loaded_tarPlugin") finish endif let g:loaded_tarPlugin = "v29" let s:keepcpo = &cpo set cpo&vim " --------------------------------------------------------------------- " Public Interface: {{{1 augroup tar au! au BufReadCmd tarfile::* call tar#Read(expand("<amatch>"), 1) au FileReadCmd tarfile::* call tar#Read(expand("<amatch>"), 0) au BufWriteCmd tarfile::* call tar#Write(expand("<amatch>")) au FileWriteCmd tarfile::* call tar#Write(expand("<amatch>")) if has("unix") au BufReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 1) au FileReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 0) au BufWriteCmd tarfile::*/* call tar#Write(expand("<amatch>")) au FileWriteCmd tarfile::*/* call tar#Write(expand("<amatch>")) endif au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>")) au BufReadCmd *.tar call tar#Browse(expand("<amatch>")) au BufReadCmd *.lrp call tar#Browse(expand("<amatch>")) au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>")) au BufReadCmd *.tar.Z call tar#Browse(expand("<amatch>")) au BufReadCmd *.tgz call tar#Browse(expand("<amatch>")) au BufReadCmd *.tbz call tar#Browse(expand("<amatch>")) au BufReadCmd *.tar.lzma call tar#Browse(expand("<amatch>")) au BufReadCmd *.tar.xz call tar#Browse(expand("<amatch>")) au BufReadCmd *.txz call tar#Browse(expand("<amatch>")) augroup END com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>) " --------------------------------------------------------------------- " Restoration And Modelines: {{{1 " vim: fdm=marker let &cpo= s:keepcpo unlet s:keepcpo �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/tohtml.vim��������������������������������������������������������������0000664�0000000�0000000�00000023304�13204015742�0020015�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim plugin for converting a syntax highlighted file to HTML. " Maintainer: Ben Fritz <fritzophrenic@gmail.com> " Last Change: 2015 Sep 08 " " The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and " $VIMRUNTIME/syntax/2html.vim " " TODO: {{{ " * Options for generating the CSS in external style sheets. New :TOcss " command to convert the current color scheme into a (mostly) generic CSS " stylesheet which can be re-used. Alternate stylesheet support? Good start " by Erik Falor " ( https://groups.google.com/d/topic/vim_use/7XTmC4D22dU/discussion ). " * Add optional argument to :TOhtml command to specify mode (gui, cterm, " term) to use for the styling. Suggestion by "nacitar". " * Add way to override or specify which RGB colors map to the color numbers " in cterm. Get better defaults than just guessing? Suggestion by "nacitar". " * Disable filetype detection until after all processing is done. " * Add option for not generating the hyperlink on stuff that looks like a " URL? Or just color the link to fit with the colorscheme (and only special " when hovering)? " * Bug: Opera does not allow printing more than one page if uncopyable " regions is turned on. Possible solution: Add normal text line numbers with " display:none, set to display:inline for print style sheets, and hide " <input> elements for print, to allow Opera printing multiple pages (and " other uncopyable areas?). May need to make the new text invisible to IE " with conditional comments to prevent copying it, IE for some reason likes " to copy hidden text. Other browsers too? " * Bug: still a 1px gap throughout the fold column when html_prevent_copy is " "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome " on Windows). Perhaps it is font related? " * Bug: still some gaps in the fold column when html_prevent_copy contains " 'd' and showing the whole diff (observed in multiple browsers). Only gaps " on diff lines though. " * Undercurl support via CSS3, with fallback to dotted or something: " https://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion " * Redo updates for modified default foldtext (v11) when/if the patch is " accepted to modify it. " * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold " +ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress " +number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml " does not show the whole diff filler as it is supposed to? " * Bug: when 'isprint' is wrong for the current encoding, will generate " invalid content. Can/should anything be done about this? Maybe a separate " plugin to correct 'isprint' based on encoding? " * Check to see if the windows-125\d encodings actually work in Unix without " the 8bit- prefix. Add prefix to autoload dictionaries for Unix if not. " * Font auto-detection similar to " http://www.vim.org/scripts/script.php?script_id=2384 but for a variety of " platforms. " * Error thrown when sourcing 2html.vim directly when plugins are not loaded. " * Pull in code from http://www.vim.org/scripts/script.php?script_id=3113 : " - listchars support " - full-line background highlight " - other? " * Make it so deleted lines in a diff don't create side-scrolling (get it " free with full-line background highlight above). " * Restore open/closed folds and cursor position after processing each file " with option not to restore for speed increase. " * Add extra meta info (generation time, etc.)? " * Tidy up so we can use strict doctype in even more situations " * Implementation detail: add threshold for writing the lines to the html " buffer before we're done (5000 or so lines should do it) " * TODO comments for code cleanup scattered throughout "}}} if exists('g:loaded_2html_plugin') finish endif let g:loaded_2html_plugin = 'vim7.4_v2' " " Changelog: {{{ " 7.4_v2 (this version): Fix error raised when converting a diff containing " an empty buffer. Jan Stocker: allow g:html_font to " take a list so it is easier to specfiy fallback " fonts in the generated CSS. " 7.4_v1 (Vim 7.4.0000): Fix modeline mangling for new "Vim:" format, and " also for version-specific modelines like "vim>703:". " " 7.3 updates: {{{ " 7.3_v14 (Vim 7.3.1246): Allow suppressing line number anchors using " g:html_line_ids=0. Allow customizing " important IDs (like line IDs and fold IDs) using " g:html_id_expr evalutated when the buffer conversion " is started. " 7.3_v13 (Vim 7.3.1088): Keep foldmethod at manual in the generated file and " insert modeline to set it to manual. " Fix bug: diff mode with 2 unsaved buffers creates a " duplicate of one buffer instead of including both. " Add anchors to each line so you can put '#L123' " or '#123' at the end of the URL to jump to line 123 " (idea by Andy Spencer). Add javascript to open folds " to show the anchor being jumped to if it is hidden. " Fix XML validation error: &nsbp; not part of XML. " Allow TOhtml to chain together with other commands " using |. " 7.3_v12 (Vim 7.3.0616): Fix modeline mangling to also work for when multiple " highlight groups make up the start-of-modeline text. " Improve render time of page with uncopyable regions " by not using one-input-per-char. Change name of " uncopyable option from html_unselectable to " html_prevent_copy. Added html_no_invalid option and " default to inserting invalid markup for uncopyable " regions to prevent MS Word from pasting undeletable " <input> elements. Fix 'cpo' handling (Thilo Six). " 7.3_v12b1: Add html_unselectable option. Rework logic to " eliminate post-processing substitute commands in " favor of doing the work up front. Remove unnecessary " special treatment of 'LineNr' highlight group. Minor " speed improvements. Fix modeline mangling in " generated output so it works for text in the first " column. Fix missing line number and fold column in " diff filler lines. Fix that some fonts have a 1px " gap (using a dirty hack, improvements welcome). Add " "colorscheme" meta tag. Does NOT include support for " the new default foldtext added in v11, as the patch " adding it has not yet been included in Vim. " 7.3_v11 ( unreleased ): Support new default foldtext from patch by Christian " Brabandt in " http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion. " This patch has not yet been included in Vim, thus " these changes are removed in the next version. " 7.3_v10 (Vim 7.3.0227): Fix error E684 when converting a range wholly inside " multiple nested folds with dynamic folding on. " Also fix problem with foldtext in this situation. " 7.3_v9 (Vim 7.3.0170): Add html_pre_wrap option active with html_use_css " and without html_no_pre, default value same as " 'wrap' option, (Andy Spencer). Don't use " 'fileencoding' for converted document encoding if " 'buftype' indicates a special buffer which isn't " written. " 7.3_v8 (Vim 7.3.0100): Add html_expand_tabs option to allow leaving tab " characters in generated output (Andy Spencer). " Escape text that looks like a modeline so Vim " doesn't use anything in the converted HTML as a " modeline. Bugfixes: Fix folding when a fold starts " before the conversion range. Remove fold column when " there are no folds. " 7.3_v7 (Vim 7-3-0063): see betas released on vim_dev below: " 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way. " 7.3_v7b2: Remove automatic detection of encodings that are not " supported by all major browsers according to " http://wiki.whatwg.org/wiki/Web_Encodings and " convert to UTF-8 for all Unicode encodings. Make " HTML encoding to Vim encoding detection be " case-insensitive for built-in pairs. " 7.3_v7b1: Remove use of setwinvar() function which cannot be " called in restricted mode (Andy Spencer). Use " 'fencoding' instead of 'encoding' to determine by " charset, and make sure the 'fenc' of the generated " file matches its indicated charset. Add charsets for " all of Vim's natively supported encodings. " 7.3_v6 (Vim 7.3.0000): Really fix bug with 'nowrapscan', 'magic' and other " user settings interfering with diff mode generation, " trailing whitespace (e.g. line number column) when " using html_no_pre, and bugs when using " html_hover_unfold. " 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync " folds in diff mode when first line was folded. " 7.3_v4 (Vim 7.3.0000): Bugfixes, especially for xhtml markup, and diff mode " 7.3_v3 (Vim 7.3.0000): Refactor option handling and make html_use_css " default to true when not set to anything. Use strict " doctypes where possible. Rename use_xhtml option to " html_use_xhtml for consistency. Use .xhtml extension " when using this option. Add meta tag for settings. " 7.3_v2 (Vim 7.3.0000): Fix syntax highlighting in diff mode to use both the " diff colors and the normal syntax colors " 7.3_v1 (Vim 7.3.0000): Add conceal support and meta tags in output "}}} "}}} " Define the :TOhtml command when: " - 'compatible' is not set " - this plugin was not already loaded " - user commands are available. {{{ if !&cp && !exists(":TOhtml") && has("user_commands") command -range=% -bar TOhtml :call tohtml#Convert2HTML(<line1>, <line2>) endif "}}} " Make sure any patches will probably use consistent indent " vim: ts=8 sw=2 sts=2 noet fdm=marker ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/tutor.vim���������������������������������������������������������������0000664�0000000�0000000�00000000312�13204015742�0017655�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������if exists('g:loaded_tutor_mode_plugin') || &compatible finish endif let g:loaded_tutor_mode_plugin = 1 command! -nargs=? -complete=custom,tutor#TutorCmdComplete Tutor call tutor#TutorCmd(<q-args>) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/plugin/zipPlugin.vim�����������������������������������������������������������0000664�0000000�0000000�00000004716�13204015742�0020475�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" zipPlugin.vim: Handles browsing zipfiles " PLUGIN PORTION " Date: Sep 13, 2016 " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> " License: Vim License (see vim's :help license) " Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, " zipPlugin.vim is provided *as is* and comes with no warranty " of any kind, either expressed or implied. By using this " plugin, you agree that in no event will the copyright " holder be liable for any damages resulting from the use " of this software. " " (James 4:8 WEB) Draw near to God, and he will draw near to you. " Cleanse your hands, you sinners; and purify your hearts, you double-minded. " --------------------------------------------------------------------- " Load Once: {{{1 if &cp || exists("g:loaded_zipPlugin") finish endif let g:loaded_zipPlugin = "v28" let s:keepcpo = &cpo set cpo&vim " --------------------------------------------------------------------- " Options: {{{1 if !exists("g:zipPlugin_ext") let g:zipPlugin_ext='*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip' endif " --------------------------------------------------------------------- " Public Interface: {{{1 augroup zip au! au BufReadCmd zipfile:* call zip#Read(expand("<amatch>"), 1) au FileReadCmd zipfile:* call zip#Read(expand("<amatch>"), 0) au BufWriteCmd zipfile:* call zip#Write(expand("<amatch>")) au FileWriteCmd zipfile:* call zip#Write(expand("<amatch>")) if has("unix") au BufReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 1) au FileReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 0) au BufWriteCmd zipfile:*/* call zip#Write(expand("<amatch>")) au FileWriteCmd zipfile:*/* call zip#Write(expand("<amatch>")) endif exe "au BufReadCmd ".g:zipPlugin_ext.' call zip#Browse(expand("<amatch>"))' augroup END " --------------------------------------------------------------------- " Restoration And Modelines: {{{1 " vim: fdm=marker let &cpo= s:keepcpo unlet s:keepcpo ��������������������������������������������������neovim-0.2.2/runtime/print/�������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0015625�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/ascii.ps�����������������������������������������������������������������0000664�0000000�0000000�00000001320�13204015742�0017255�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-ascii %%Version: 1.0 0 %%EndComments /VIM-ascii[ 32{/.notdef}repeat /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef 128{/.notdef}repeat] /Encoding defineresource pop % vim:ff=unix: %%EOF ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/cidfont.ps���������������������������������������������������������������0000664�0000000�0000000�00000002075�13204015742�0017623�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-ProcSet %%Title: VIM-CIDFont %%Version: 1.0 0 %%EndComments % Editing of this file is NOT RECOMMENDED. You run a very good risk of causing % all PostScript printing from VIM failing if you do. PostScript is not called % a write-only language for nothing! /CP currentpacking d T setpacking /SB 256 string d /CIDN? systemdict/composefont known d /GS? systemdict/.makeoperator known d CIDN?{ GS?{/vim_findresource{2 copy resourcestatus not{1 index SB cvs runlibfile}{ pop pop}ifelse findresource}bd/vim_composefont{0 get/CIDFont vim_findresource exch/CMap vim_findresource exch[exch]composefont pop}bd}{/vim_findresource /findresource ld/vim_composefont{composefont pop}bd}ifelse }{ /vim_fontname{0 get SB cvs length dup SB exch(-)putinterval 1 add dup SB exch dup 256 exch sub getinterval 3 -1 roll exch cvs length add SB exch 0 exch getinterval cvn}bd/vim_composefont{vim_fontname findfont d}bd } ifelse /cfs{exch scalefont d}bd /sffs{findfont 3 1 roll 1 index mul exch 2 index/FontMatrix get matrix copy scale makefont d}bd CP setpacking % vim:ff=unix: %%EOF �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/cns_roman.ps�������������������������������������������������������������0000664�0000000�0000000�00000001375�13204015742�0020156�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-cns_roman %%Version: 1.0 0 %%EndComments % Different to ASCII at code point 126 /VIM-cns_roman[ 32{/.notdef}repeat /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /overline /.notdef 128{/.notdef}repeat] /Encoding defineresource pop % vim:ff=unix: %%EOF �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/cp1250.ps����������������������������������������������������������������0000664�0000000�0000000�00000004247�13204015742�0017112�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-cp1250 %%Version: 1.0 0 %%EndComments /VIM-cp1250[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /tilde /.notdef /Euro /.notdef /quotesinglbase /.notdef /quotedblbase /ellipsis /dagger /daggerdbl /.notdef /perthousand /Scaron /guilsinglleft /Sacute /Tcaron /Zcaron /Zacute /.notdef /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /.notdef /trademark /scaron /guilsinglright /sacute /tcaron /zcaron /zacute /space /caron /breve /Lslash /currency /Aogonek /brokenbar /section /dieresis /copyright /Scedilla /guillemotleft /logicalnot /hyphen /registered /Zdotaccent /degree /plusminus /ogonek /lslash /acute /mu /paragraph /periodcentered /cedilla /aogonek /scedilla /guillemotright /Lcaron /hungarumlaut /lcaron /zdotaccent /Racute /Aacute /Acircumflex /Abreve /Adieresis /Lacute /Cacute /Ccedilla /Ccaron /Eacute /Eogonek /Edieresis /Ecaron /Iacute /Icircumflex /Dcaron /Dcroat /Nacute /Ncaron /Oacute /Ocircumflex /Ohungarumlaut /Odieresis /multiply /Rcaron /Uring /Uacute /Uhungarumlaut /Udieresis /Yacute /Tcedilla /germandbls /racute /aacute /acircumflex /abreve /adieresis /lacute /cacute /ccedilla /ccaron /eacute /eogonek /edieresis /ecaron /iacute /icircumflex /dcaron /dcroat /nacute /ncaron /oacute /ocircumflex /ohungarumlaut /odieresis /divide /rcaron /uring /uacute /uhungarumlaut /udieresis /yacute /tcedilla /dotaccent] /Encoding defineresource pop % vim:ff=unix: %%EOF ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/cp1251.ps����������������������������������������������������������������0000664�0000000�0000000�00000004516�13204015742�0017112�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-cp1251 %%Version: 1.0 0 %%EndComments /VIM-cp1251[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /afii10051 /afii10052 /quotesinglbase /afii10100 /quotedblbase /ellipsis /dagger /daggerdbl /Euro /perthousand /afii10058 /guilsinglleft /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /.notdef /trademark /afii10106 /guilsinglright /afii10107 /afii10109 /afii10108 /afii10193 /space /afii10062 /afii10110 /afii10057 /currency /afii10050 /brokenbar /section /afii10023 /copyright /afii10053 /guillemotleft /logicalnot /hyphen /registered /afii10056 /degree /plusminus /afii10055 /afii10103 /afii10098 /mu /paragraph /periodcentered /afii10071 /afii61352 /afii10101 /guillemotright /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097] /Encoding defineresource pop % vim:ff=unix: %%EOF ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/cp1252.ps����������������������������������������������������������������0000664�0000000�0000000�00000004257�13204015742�0017115�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-cp1252 %%Version: 1.0 0 %%EndComments /VIM-cp1252[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /Euro /.notdef /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /.notdef /Zcaron /.notdef /.notdef /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe /.notdef /zcaron /Ydieresis /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /Encoding defineresource pop % vim:ff=unix: %%EOF �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/cp1253.ps����������������������������������������������������������������0000664�0000000�0000000�00000004171�13204015742�0017111�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-cp1253 %%Version: 1.0 0 %%EndComments /VIM-cp1253[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /.notdef /perthousand /.notdef /guilsinglleft /.notdef /.notdef /.notdef /.notdef /.notdef /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /.notdef /trademark /.notdef /guilsinglright /.notdef /.notdef /.notdef /.notdef /space /dieresistonos /Alphatonos /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /emdash /degree /plusminus /twosuperior /threesuperior /tonos /mu /paragraph /periodcentered /Epsilontonos /Etatonos /Iotatonos /guillemotright /Omicrontonos /onehalf /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef] /Encoding defineresource pop % vim:ff=unix: %%EOF �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/cp1254.ps����������������������������������������������������������������0000664�0000000�0000000�00000004301�13204015742�0017105�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-cp1254 %%Version: 1.0 0 %%EndComments /VIM-cp1254[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /Euro /.notdef /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /.notdef /Zcaron /.notdef /.notdef /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe /.notdef /zcaron /Ydieresis /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Gbreve /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Idotaccent /Scedilla /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /gbreve /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /dotlessi /scedilla /ydieresis] /Encoding defineresource pop % vim:ff=unix: %%EOF �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/cp1255.ps����������������������������������������������������������������0000664�0000000�0000000�00000004131�13204015742�0017107�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-cp1255 %%Version: 1.0 0 %%EndComments /VIM-cp1255[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /.notdef /guilsinglleft /.notdef /.notdef /.notdef /.notdef /.notdef /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /.notdef /guilsinglright /.notdef /.notdef /.notdef /.notdef /space /.notdef /cent /sterling /newsheqelsign /yen /brokenbar /section /dieresis /copyright /.notdef /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /.notdef /onesuperior /.notdef /guillemotright /onequarter /onehalf /threequarters /.notdef /sheva /hatafsegol /hatafpatah /hatafqamats /hiriq /tsere /segol /patah /qamats /holam /.notdef /qubuts /dagesh /meteg /maqaf /rafe /paseq /shindot /sindot /sofpasuq /doublevav /vavyod /doubleyod /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /alef /bet /gimel /dalet /he /vav /zayin /het /tet /yod /finalkaf /kaf /lamed /finalmem /mem /finalnun /nun /samekh /ayin /finalpe /pe /finaltsadi /tsadi /qof /resh /shin /tav /.notdef /.notdef /.notdef /.notdef /.notdef] /Encoding defineresource pop % vim:ff=unix: %%EOF ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/cp1257.ps����������������������������������������������������������������0000664�0000000�0000000�00000004230�13204015742�0017111�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-cp1257 %%Version: 1.0 0 %%EndComments /VIM-cp1257[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /quotesinglbase /.notdef /quotedblbase /ellipsis /dagger /daggerdbl /.notdef /perthousand /.notdef /guilsinglleft /.notdef /.notdef /.notdef /.notdef /.notdef /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /.notdef /trademark /.notdef /guilsinglright /.notdef /.notdef /.notdef /.notdef /space /caron /breve /sterling /currency /.notdef /brokenbar /section /dieresis /copyright /Rcedilla /guillemotleft /logicalnot /hyphen /registered /AE /degree /plusminus /ogonek /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /rcedilla /guillemotright /onequarter /onehalf /threequarters /ae /Aogonek /Iogonek /Amacron /Cacute /Adieresis /Aring /Eogonek /Emacron /Ccaron /Eacute /Zacute /Edot /Gcedilla /Kcedilla /Imacron /Lcedilla /Scaron /Nacute /Ncedilla /Oacute /Omacron /Otilde /Odieresis /multiply /Uogonek /Lslash /Sacute /Umacron /Udieresis /Zdotaccent /Zcaron /germandbls /aogonek /iogonek /amacron /cacute /adieresis /aring /eogonek /emacron /ccaron /eacute /zacute /edot /gcedilla /kcedilla /imacron /lcedilla /scaron /nacute /ncedilla /oacute /omacron /otilde /odieresis /divide /uogonek /lslash /sacute /umacron /udieresis /zdotaccent /zcaron /dotaccent] /Encoding defineresource pop % vim:ff=unix: %%EOF ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/gb_roman.ps��������������������������������������������������������������0000664�0000000�0000000�00000001401�13204015742�0017751�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-gb_roman %%Version: 1.0 0 %%EndComments % Different to ASCII at code points 36 and 126 /VIM-gb_roman[ 32{/.notdef}repeat /space /exclam /quotedbl /numbersign /yuan /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /overline /.notdef 128{/.notdef}repeat] /Encoding defineresource pop % vim:ff=unix: %%EOF ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/hp-roman8.ps�������������������������������������������������������������0000664�0000000�0000000�00000004173�13204015742�0020007�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-hp-roman8 %%Version: 1.0 0 %%EndComments /VIM-hp-roman8[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /Agrave /Acircumflex /Egrave /Ecircumflex /Edieresis /Icircumflex /Idieresis /acute /grave /circumflex /dieresis /tilde /Ugrave /Ucircumflex /lira /macron /Yacute /yacute /degree /Ccedilla /ccedilla /Ntilde /ntilde /exclamdown /questiondown /currency /sterling /yen /section /florin /cent /acircumflex /ecircumflex /ocircumflex /ucircumflex /aacute /eacute /oacute /uacute /agrave /egrave /ograve /ugrave /adieresis /edieresis /odieresis /udieresis /Aring /icircumflex /Oslash /AE /aring /iacute /oslash /ae /Adieresis /igrave /Odieresis /Udieresis /Eacute /idieresis /germandbls /Ocircumflex /Aacute /Atilde /atilde /Eth /eth /Iacute /Igrave /Oacute /Ograve /Otilde /otilde /Scaron /scaron /Uacute /Ydieresis /ydieresis /Thorn /thorn /periodcentered /mu /paragraph /threequarters /hyphen /onequarter /onehalf /ordfeminine /ordmasculine /guillemotleft /filledbox /guillemotright /plusminus /.notdef] /Encoding defineresource pop % vim:ff=unix: %%EOF �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-10.ps�����������������������������������������������������������0000664�0000000�0000000�00000004120�13204015742�0017611�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-10 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-10[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /Aogonek /Emacron /Gcedilla /Imacron /Itilde /Kcedilla /section /Lcedilla /Dcroat /Scaron /Tbar /Zcaron /endash /Umacron /Eng /degree /aogonek /emacron /gcedilla /imacron /itilde /kcedilla /periodcentered /lcedilla /dcroat /scaron /tbar /zcaron /emdash /umacron /eng /Amacron /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Iogonek /Ccaron /Eacute /Eogonek /Edieresis /Edot /Iacute /Icircumflex /Idieresis /Eth /Ncedilla /Omacron /Oacute /Ocircumflex /Otilde /Odieresis /Utilde /Oslash /Uogonek /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /amacron /aacute /acircumflex /atilde /adieresis /aring /ae /iogonek /ccaron /eacute /eogonek /edieresis /edot /iacute /icircumflex /idieresis /eth /ncedilla /omacron /oacute /ocircumflex /otilde /odieresis /utilde /oslash /uogonek /uacute /ucircumflex /udieresis /yacute /thorn /kgreenlandic] /Encoding defineresource pop % vim:ff=unix: %%EOF ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-11.ps�����������������������������������������������������������0000664�0000000�0000000�00000004122�13204015742�0017614�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-11 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-11[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /uni0E01 /uni0E02 /uni0E03 /uni0E04 /uni0E05 /uni0E06 /uni0E07 /uni0E08 /uni0E09 /uni0E0A /uni0E0B /uni0E0C /uni0E0D /uni0E0E /uni0E0F /uni0E10 /uni0E11 /uni0E12 /uni0E13 /uni0E14 /uni0E15 /uni0E16 /uni0E17 /uni0E18 /uni0E19 /uni0E1A /uni0E1B /uni0E1C /uni0E1D /uni0E1E /uni0E1F /uni0E20 /uni0E21 /uni0E22 /uni0E23 /uni0E24 /uni0E25 /uni0E26 /uni0E27 /uni0E28 /uni0E29 /uni0E2A /uni0E2B /uni0E2C /uni0E2D /uni0E2E /uni0E2F /uni0E30 /uni0E31 /uni0E32 /uni0E33 /uni0E34 /uni0E35 /uni0E36 /uni0E37 /uni0E38 /uni0E39 /uni0E3A /.notdef /space /.notdef /.notdef /uni0E3F /uni0E40 /uni0E41 /uni0E42 /uni0E43 /uni0E44 /uni0E45 /uni0E46 /uni0E47 /uni0E48 /uni0E49 /uni0E4A /uni0E4B /uni0E4C /uni0E4D /uni0E4E /uni0E4F /uni0E50 /uni0E51 /uni0E52 /uni0E53 /uni0E54 /uni0E55 /uni0E56 /uni0E57 /uni0E58 /uni0E59 /uni0E5A /.notdef /.notdef /.notdef /.notdef /.notdef] /Encoding defineresource pop % vim:ff=unix: %%EOF ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-13.ps�����������������������������������������������������������0000664�0000000�0000000�00000004212�13204015742�0017616�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-13 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-13[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /quotedblright /cent /sterling /currency /quotedblbase /brokenbar /section /Oslash /copyright /Rcedilla /guillemotleft /logicalnot /hyphen /registered /AE /degree /plusminus /twosuperior /threesuperior /quotedblleft /mu /paragraph /periodcentered /oslash /onesuperior /rcedilla /guillemotright /onequarter /onehalf /threequarters /ae /Aogonek /Iogonek /Amacron /Cacute /Adieresis /Aring /Eogonek /Emacron /Ccaron /Eacute /Zacute /Edot /Gcedilla /Kcedilla /Imacron /Lcedilla /Scaron /Nacute /Ncedilla /Oacute /Omacron /Otilde /Odieresis /multiply /Uogonek /Lslash /Sacute /Umacron /Udieresis /Zdotaccent /Zcaron /germandbls /aogonek /iogonek /amacron /cacute /adieresis /aring /eogonek /emacron /ccaron /eacute /zacute /edot /gcedilla /kcedilla /imacron /lcedilla /scaron /nacute /ncedilla /oacute /omacron /otilde /odieresis /divide /uogonek /lslash /sacute /umacron /udieresis /zdotaccent /zcaron /quoteright] /Encoding defineresource pop % vim:ff=unix: %%EOF ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-14.ps�����������������������������������������������������������0000664�0000000�0000000�00000004215�13204015742�0017622�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-14 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-14[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /uni1E02 /uni1E03 /sterling /Cdotaccent /cdotaccent /uni1E0A /section /Wgrave /copyright /Wacute /uni1E0B /Ygrave /hyphen /registered /Ydieresis /uni1E1E /uni1E1F /Gdotaccent /gdotaccent /uni1E40 /uni1E41 /paragraph /uni1E56 /wgrave /uni1E57 /wacute /uni1E60 /ygrave /Wdieresis /wdieresis /uni1E61 /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Wcircumflex /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /uni1E6A /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Ycircumflex /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /wcircumflex /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /uni1E6B /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /ycircumflex /ydieresis] /Encoding defineresource pop % vim:ff=unix: %%EOF �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-15.ps�����������������������������������������������������������0000664�0000000�0000000�00000004200�13204015742�0017615�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-15 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-15[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclamdown /cent /sterling /Euro /yen /Scaron /section /scaron /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /Zcaron /mu /paragraph /periodcentered /zcaron /onesuperior /ordmasculine /guillemotright /OE /oe /Ydieresis /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /Encoding defineresource pop % vim:ff=unix: %%EOF ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-2.ps������������������������������������������������������������0000664�0000000�0000000�00000004154�13204015742�0017541�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-2 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-2[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /Aogonek /breve /Lslash /currency /Lcaron /Sacute /section /dieresis /Scaron /Scedilla /Tcaron /Zacute /hyphen /Zcaron /Zdotaccent /degree /aogonek /ogonek /lslash /acute /lcaron /sacute /caron /cedilla /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute /Aacute /Acircumflex /Abreve /Adieresis /Lacute /Cacute /Ccedilla /Ccaron /Eacute /Eogonek /Edieresis /Ecaron /Iacute /Icircumflex /Dcaron /Dcroat /Nacute /Ncaron /Oacute /Ocircumflex /Ohungarumlaut /Odieresis /multiply /Rcaron /Uring /Uacute /Uhungarumlaut /Udieresis /Yacute /Tcedilla /germandbls /racute /aacute /acircumflex /abreve /adieresis /lacute /cacute /ccedilla /ccaron /eacute /eogonek /edieresis /ecaron /iacute /icircumflex /dcaron /dcroat /nacute /ncaron /oacute /ocircumflex /ohungarumlaut /odieresis /divide /rcaron /uring /uacute /uhungarumlaut /udieresis /yacute /tcedilla /dotaccent] /Encoding defineresource pop % vim:ff=unix: %%EOF ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-3.ps������������������������������������������������������������0000664�0000000�0000000�00000004267�13204015742�0017547�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-3 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-3[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /Hbar /breve /sterling /currency /.notdef /Hcircumflex /section /dieresis /Idot /Scedilla /Gbreve /Jcircumflex /hyphen /.notdef /Zdotaccent /degree /hbar /twosuperior /threesuperior /acute /mu /hcircumflex /periodcentered /cedilla /dotlessi /scedilla /gbreve /jcircumflex /onehalf /.notdef /zdotaccent /Agrave /Aacute /Acircumflex /.notdef /Adieresis /Cdotaccent /Ccircumflex /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /.notdef /Ntilde /Ograve /Oacute /Ocircumflex /Gdotaccent /Odieresis /multiply /Gcircumflex /Ugrave /Uacute /Ucircumflex /Udieresis /Ubreve /Scircumflex /germandbls /agrave /aacute /acircumflex /.notdef /adieresis /cdotaccent /ccircumflex /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /.notdef /ntilde /ograve /oacute /ocircumflex /gdotaccent /odieresis /divide /gcircumflex /ugrave /uacute /ucircumflex /udieresis /ubreve /scircumflex /dotaccent] /Encoding defineresource pop % vim:ff=unix: %%EOF �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-4.ps������������������������������������������������������������0000664�0000000�0000000�00000004124�13204015742�0017540�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-4 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-4[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /Aogonek /kgreenlandic /Rcedilla /currency /Itilde /Lcedilla /section /dieresis /Scaron /Emacron /Gcedilla /Tbar /.notdef /Zcaron /macron /degree /aogonek /ogonek /rcedilla /acute /itilde /lcedilla /caron /cedilla /scaron /emacron /gcedilla /tbar /Eng /zcaron /eng /Amacron /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Iogonek /Ccaron /Eacute /Eogonek /Edieresis /Edot /Iacute /Icircumflex /Imacron /Dcroat /Ncedilla /Omacron /Kcedilla /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Uogonek /Uacute /Ucircumflex /Udieresis /Utilde /Umacron /germandbls /amacron /aacute /acircumflex /atilde /adieresis /aring /ae /iogonek /ccaron /eacute /eogonek /edieresis /edot /iacute /icircumflex /imacron /dcroat /ncedilla /omacron /kcedilla /ocircumflex /otilde /odieresis /divide /oslash /uogonek /uacute /ucircumflex /udieresis /utilde /umacron /dotaccent] /Encoding defineresource pop % vim:ff=unix: %%EOF ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-5.ps������������������������������������������������������������0000664�0000000�0000000�00000004413�13204015742�0017542�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-5 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-5[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /afii10023 /afii10051 /afii10052 /afii10053 /afii10054 /afii10055 /afii10056 /afii10057 /afii10058 /afii10059 /afii10060 /afii10061 /.notdef /afii10062 /afii10145 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097 /afii61352 /afii10071 /afii10099 /afii10100 /afii10101 /afii10102 /afii10103 /afii10104 /afii10105 /afii10106 /afii10107 /afii10108 /afii10109 /section /afii10110 /afii10193] /Encoding defineresource pop % vim:ff=unix: %%EOF �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-7.ps������������������������������������������������������������0000664�0000000�0000000�00000004135�13204015742�0017545�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-7 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-7[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /quotereversed /quoteright /sterling /.notdef /.notdef /brokenbar /section /dieresis /copyright /.notdef /guillemotleft /logicalnot /.notdef /.notdef /emdash /degree /plusminus /twosuperior /threesuperior /tonos /dieresistonos /Alphatonos /periodcentered /Epsilontonos /Etatonos /Iotatonos /guillemotright /Omicrontonos /onehalf /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef] /Encoding defineresource pop % vim:ff=unix: %%EOF �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-8.ps������������������������������������������������������������0000664�0000000�0000000�00000004077�13204015742�0017553�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-8 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-8[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /.notdef /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /multiply /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /divide /guillemotright /onequarter /onehalf /threequarters /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /underscoredbl /alef /bet /gimel /dalet /he /vav /zayin /het /tet /yod /finalkaf /kaf /lamed /finalmem /mem /finalnun /nun /samekh /ayin /finalpe /pe /finaltsadi /tsadi /qof /resh /shin /tav /.notdef /.notdef /.notdef /.notdef /.notdef] /Encoding defineresource pop % vim:ff=unix: %%EOF �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/iso-8859-9.ps������������������������������������������������������������0000664�0000000�0000000�00000004252�13204015742�0017547�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-iso-8859-9 %%Version: 1.0 0 %%EndComments /VIM-iso-8859-9[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Gbreve /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Idotaccent /Scedilla /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /gbreve /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /dotlessi /scedilla /ydieresis] /Encoding defineresource pop % vim:ff=unix: %%EOF ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/jis_roman.ps�������������������������������������������������������������0000664�0000000�0000000�00000001377�13204015742�0020162�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-jis_roman %%Version: 1.0 0 %%EndComments % Different to ASCII at code points 92 and 126 /VIM-jis_roman[ 32{/.notdef}repeat /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /yen /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /overline /.notdef 128{/.notdef}repeat] /Encoding defineresource pop % vim:ff=unix: %%EOF �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/koi8-r.ps����������������������������������������������������������������0000664�0000000�0000000�00000004416�13204015742�0017307�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-koi8-r %%Version: 1.0 0 %%EndComments /VIM-koi8-r[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /SF100000 /SF110000 /SF010000 /SF030000 /SF020000 /SF040000 /SF080000 /SF090000 /SF060000 /SF070000 /SF050000 /upblock /dnblock /block /lfblock /rtblock /ltshade /shade /dkshade /integraltp /filledbox /bullet /radical /approxequal /lessequal /greaterequal /space /integralbt /degree /twosuperior /periodcentered /divide /SF430000 /SF240000 /SF510000 /afii10071 /SF520000 /SF390000 /SF220000 /SF210000 /SF250000 /SF500000 /SF490000 /SF380000 /SF280000 /SF270000 /SF260000 /SF360000 /SF370000 /SF420000 /SF190000 /afii10023 /SF200000 /SF230000 /SF470000 /SF480000 /SF410000 /SF450000 /SF460000 /SF400000 /SF540000 /SF530000 /SF440000 /copyright /afii10096 /afii10065 /afii10066 /afii10088 /afii10069 /afii10070 /afii10086 /afii10068 /afii10087 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10097 /afii10082 /afii10083 /afii10084 /afii10085 /afii10072 /afii10067 /afii10094 /afii10093 /afii10073 /afii10090 /afii10095 /afii10091 /afii10089 /afii10092 /afii10048 /afii10017 /afii10018 /afii10040 /afii10021 /afii10022 /afii10038 /afii10020 /afii10039 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10049 /afii10034 /afii10035 /afii10036 /afii10037 /afii10024 /afii10019 /afii10046 /afii10045 /afii10025 /afii10042 /afii10047 /afii10043 /afii10041 /afii10044] /Encoding defineresource pop % vim:ff=unix: %%EOF ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/koi8-u.ps����������������������������������������������������������������0000664�0000000�0000000�00000004426�13204015742�0017313�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-koi8-u %%Version: 1.0 0 %%EndComments /VIM-koi8-u[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /SF100000 /SF110000 /SF010000 /SF030000 /SF020000 /SF040000 /SF080000 /SF090000 /SF060000 /SF070000 /SF050000 /upblock /dnblock /block /lfblock /rtblock /ltshade /shade /dkshade /integraltp /filledbox /bullet /radical /approxequal /lessequal /greaterequal /space /integralbt /degree /twosuperior /periodcentered /divide /SF430000 /SF240000 /SF510000 /afii10071 /afii10101 /SF390000 /afii10103 /afii10104 /SF250000 /SF500000 /SF490000 /SF380000 /SF280000 /afii10098 /SF260000 /SF360000 /SF370000 /SF420000 /SF190000 /afii10023 /afii10053 /SF230000 /afii10055 /afii10056 /SF410000 /SF450000 /SF460000 /SF400000 /SF540000 /afii10050 /SF440000 /copyright /afii10096 /afii10065 /afii10066 /afii10088 /afii10069 /afii10070 /afii10086 /afii10068 /afii10087 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10097 /afii10082 /afii10083 /afii10084 /afii10085 /afii10072 /afii10067 /afii10094 /afii10093 /afii10073 /afii10090 /afii10095 /afii10091 /afii10089 /afii10092 /afii10048 /afii10017 /afii10018 /afii10040 /afii10021 /afii10022 /afii10038 /afii10020 /afii10039 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10049 /afii10034 /afii10035 /afii10036 /afii10037 /afii10024 /afii10019 /afii10046 /afii10045 /afii10025 /afii10042 /afii10047 /afii10043 /afii10041 /afii10044] /Encoding defineresource pop % vim:ff=unix: %%EOF ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/ks_roman.ps��������������������������������������������������������������0000664�0000000�0000000�00000001375�13204015742�0020010�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-ks_roman %%Version: 1.0 0 %%EndComments % Different to ASCII at code points 96 and 126 /VIM-ks_roman[ 32{/.notdef}repeat /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /won /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /overline /.notdef 128{/.notdef}repeat] /Encoding defineresource pop % vim:ff=unix: %%EOF �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/latin1.ps����������������������������������������������������������������0000664�0000000�0000000�00000004220�13204015742�0017357�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-latin1 %%Version: 1.0 0 %%EndComments /VIM-latin1[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /Encoding defineresource pop % vim:ff=unix: %%EOF ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/mac-roman.ps�������������������������������������������������������������0000664�0000000�0000000�00000004254�13204015742�0020050�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-mac-roman %%Version: 1.0 0 %%EndComments /VIM-mac-roman[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /Adieresis /Aring /Ccedilla /Eacute /Ntilde /Odieresis /Udieresis /aacute /agrave /acircumflex /adieresis /atilde /aring /ccedilla /eacute /egrave /ecircumflex /edieresis /iacute /igrave /icircumflex /idieresis /ntilde /oacute /ograve /ocircumflex /odieresis /otilde /uacute /ugrave /ucircumflex /udieresis /dagger /degree /cent /sterling /section /bullet /paragraph /germandbls /registered /copyright /trademark /acute /dieresis /notequal /AE /Oslash /infinity /plusminus /lessequal /greaterequal /yen /mu /partialdiff /summation /Pi /pi /integral /ordfeminine /ordmasculine /Omega /ae /oslash /questiondown /exclamdown /logicalnot /radical /florin /approxequal /delta /guillemotleft /guillemotright /ellipsis /space /Agrave /Atilde /Otilde /OE /oe /endash /emdash /quotedblleft /quotedblright /quoteleft /quoteright /divide /lozenge /ydieresis /Ydieresis /fraction /currency /guilsinglleft /guilsinglright /fi /fl /daggerdbl /periodcentered /quotesinglbase /quotedblbase /perthousand /Acircumflex /Ecircumflex /Aacute /Edieresis /Egrave /Iacute /Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex /heart /Ograve /Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde /macron /breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron] /Encoding defineresource pop % vim:ff=unix: %%EOF ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/print/prolog.ps����������������������������������������������������������������0000664�0000000�0000000�00000003670�13204015742�0017501�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 Resource-ProcSet %%Title: VIM-Prolog %%Version: 1.4 1 %%EndComments % Editing of this file is NOT RECOMMENDED. You run a very good risk of causing % all PostScript printing from VIM failing if you do. PostScript is not called % a write-only language for nothing! /packedarray where not{userdict begin/setpacking/pop load def/currentpacking false def end}{pop}ifelse/CP currentpacking def true setpacking /bd{bind def}bind def/ld{load def}bd/ed{exch def}bd/d/def ld /db{dict begin}bd/cde{currentdict end}bd /T true d/F false d /SO null d/sv{/SO save d}bd/re{SO restore}bd /L2 systemdict/languagelevel 2 copy known{get exec}{pop pop 1}ifelse 2 ge d /m/moveto ld/s/show ld /ms{m s}bd /g/setgray ld/r/setrgbcolor ld/sp{showpage}bd /gs/gsave ld/gr/grestore ld/cp/currentpoint ld /ul{gs UW setlinewidth cp UO add 2 copy newpath m 3 1 roll add exch lineto stroke gr}bd /bg{gs r cp BO add 4 -2 roll rectfill gr}bd /sl{90 rotate 0 exch translate}bd L2{ /sspd{mark exch{setpagedevice}stopped cleartomark}bd /nc{1 db/NumCopies ed cde sspd}bd /sps{3 db/Orientation ed[3 1 roll]/PageSize ed/ImagingBBox null d cde sspd}bd /dt{2 db/Tumble ed/Duplex ed cde sspd}bd /c{1 db/Collate ed cde sspd}bd }{ /nc{/#copies ed}bd /sps{statusdict/setpage get exec}bd /dt{statusdict/settumble 2 copy known{get exec}{pop pop pop}ifelse statusdict/setduplexmode 2 copy known{get exec}{pop pop pop}ifelse}bd /c{pop}bd }ifelse /ffs{findfont exch scalefont d}bd/sf{setfont}bd /ref{1 db findfont dup maxlength dict/NFD ed{exch dup/FID ne{exch NFD 3 1 roll put}{pop pop}ifelse}forall/Encoding findresource dup length 256 eq{NFD/Encoding 3 -1 roll put}{pop}ifelse NFD dup/FontType get 3 ne{/CharStrings}{/CharProcs} ifelse 2 copy known{2 copy get dup maxlength dict copy[/questiondown/space]{2 copy known{2 copy get 2 index/.notdef 3 -1 roll put pop exit}if pop}forall put }{pop pop}ifelse dup NFD/FontName 3 -1 roll put NFD definefont pop end}bd CP setpacking (\004)cvn{}bd % vim:ff=unix: %%EOF ������������������������������������������������������������������������neovim-0.2.2/runtime/rgb.txt������������������������������������������������������������������������0000664�0000000�0000000�00000041434�13204015742�0016012�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������! $XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp $ 255 250 250 snow 248 248 255 ghost white 248 248 255 GhostWhite 245 245 245 white smoke 245 245 245 WhiteSmoke 220 220 220 gainsboro 255 250 240 floral white 255 250 240 FloralWhite 253 245 230 old lace 253 245 230 OldLace 250 240 230 linen 250 235 215 antique white 250 235 215 AntiqueWhite 255 239 213 papaya whip 255 239 213 PapayaWhip 255 235 205 blanched almond 255 235 205 BlanchedAlmond 255 228 196 bisque 255 218 185 peach puff 255 218 185 PeachPuff 255 222 173 navajo white 255 222 173 NavajoWhite 255 228 181 moccasin 255 248 220 cornsilk 255 255 240 ivory 255 250 205 lemon chiffon 255 250 205 LemonChiffon 255 245 238 seashell 240 255 240 honeydew 245 255 250 mint cream 245 255 250 MintCream 240 255 255 azure 240 248 255 alice blue 240 248 255 AliceBlue 230 230 250 lavender 255 240 245 lavender blush 255 240 245 LavenderBlush 255 228 225 misty rose 255 228 225 MistyRose 255 255 255 white 0 0 0 black 47 79 79 dark slate gray 47 79 79 DarkSlateGray 47 79 79 dark slate grey 47 79 79 DarkSlateGrey 105 105 105 dim gray 105 105 105 DimGray 105 105 105 dim grey 105 105 105 DimGrey 112 128 144 slate gray 112 128 144 SlateGray 112 128 144 slate grey 112 128 144 SlateGrey 119 136 153 light slate gray 119 136 153 LightSlateGray 119 136 153 light slate grey 119 136 153 LightSlateGrey 190 190 190 gray 190 190 190 grey 211 211 211 light grey 211 211 211 LightGrey 211 211 211 light gray 211 211 211 LightGray 25 25 112 midnight blue 25 25 112 MidnightBlue 0 0 128 navy 0 0 128 navy blue 0 0 128 NavyBlue 100 149 237 cornflower blue 100 149 237 CornflowerBlue 72 61 139 dark slate blue 72 61 139 DarkSlateBlue 106 90 205 slate blue 106 90 205 SlateBlue 123 104 238 medium slate blue 123 104 238 MediumSlateBlue 132 112 255 light slate blue 132 112 255 LightSlateBlue 0 0 205 medium blue 0 0 205 MediumBlue 65 105 225 royal blue 65 105 225 RoyalBlue 0 0 255 blue 30 144 255 dodger blue 30 144 255 DodgerBlue 0 191 255 deep sky blue 0 191 255 DeepSkyBlue 135 206 235 sky blue 135 206 235 SkyBlue 135 206 250 light sky blue 135 206 250 LightSkyBlue 70 130 180 steel blue 70 130 180 SteelBlue 176 196 222 light steel blue 176 196 222 LightSteelBlue 173 216 230 light blue 173 216 230 LightBlue 176 224 230 powder blue 176 224 230 PowderBlue 175 238 238 pale turquoise 175 238 238 PaleTurquoise 0 206 209 dark turquoise 0 206 209 DarkTurquoise 72 209 204 medium turquoise 72 209 204 MediumTurquoise 64 224 208 turquoise 0 255 255 cyan 224 255 255 light cyan 224 255 255 LightCyan 95 158 160 cadet blue 95 158 160 CadetBlue 102 205 170 medium aquamarine 102 205 170 MediumAquamarine 127 255 212 aquamarine 0 100 0 dark green 0 100 0 DarkGreen 85 107 47 dark olive green 85 107 47 DarkOliveGreen 143 188 143 dark sea green 143 188 143 DarkSeaGreen 46 139 87 sea green 46 139 87 SeaGreen 60 179 113 medium sea green 60 179 113 MediumSeaGreen 32 178 170 light sea green 32 178 170 LightSeaGreen 152 251 152 pale green 152 251 152 PaleGreen 0 255 127 spring green 0 255 127 SpringGreen 124 252 0 lawn green 124 252 0 LawnGreen 0 255 0 green 127 255 0 chartreuse 0 250 154 medium spring green 0 250 154 MediumSpringGreen 173 255 47 green yellow 173 255 47 GreenYellow 50 205 50 lime green 50 205 50 LimeGreen 154 205 50 yellow green 154 205 50 YellowGreen 34 139 34 forest green 34 139 34 ForestGreen 107 142 35 olive drab 107 142 35 OliveDrab 189 183 107 dark khaki 189 183 107 DarkKhaki 240 230 140 khaki 238 232 170 pale goldenrod 238 232 170 PaleGoldenrod 250 250 210 light goldenrod yellow 250 250 210 LightGoldenrodYellow 255 255 224 light yellow 255 255 224 LightYellow 255 255 0 yellow 255 215 0 gold 238 221 130 light goldenrod 238 221 130 LightGoldenrod 218 165 32 goldenrod 184 134 11 dark goldenrod 184 134 11 DarkGoldenrod 188 143 143 rosy brown 188 143 143 RosyBrown 205 92 92 indian red 205 92 92 IndianRed 139 69 19 saddle brown 139 69 19 SaddleBrown 160 82 45 sienna 205 133 63 peru 222 184 135 burlywood 245 245 220 beige 245 222 179 wheat 244 164 96 sandy brown 244 164 96 SandyBrown 210 180 140 tan 210 105 30 chocolate 178 34 34 firebrick 165 42 42 brown 233 150 122 dark salmon 233 150 122 DarkSalmon 250 128 114 salmon 255 160 122 light salmon 255 160 122 LightSalmon 255 165 0 orange 255 140 0 dark orange 255 140 0 DarkOrange 255 127 80 coral 240 128 128 light coral 240 128 128 LightCoral 255 99 71 tomato 255 69 0 orange red 255 69 0 OrangeRed 255 0 0 red 255 105 180 hot pink 255 105 180 HotPink 255 20 147 deep pink 255 20 147 DeepPink 255 192 203 pink 255 182 193 light pink 255 182 193 LightPink 219 112 147 pale violet red 219 112 147 PaleVioletRed 176 48 96 maroon 199 21 133 medium violet red 199 21 133 MediumVioletRed 208 32 144 violet red 208 32 144 VioletRed 255 0 255 magenta 238 130 238 violet 221 160 221 plum 218 112 214 orchid 186 85 211 medium orchid 186 85 211 MediumOrchid 153 50 204 dark orchid 153 50 204 DarkOrchid 148 0 211 dark violet 148 0 211 DarkViolet 138 43 226 blue violet 138 43 226 BlueViolet 160 32 240 purple 147 112 219 medium purple 147 112 219 MediumPurple 216 191 216 thistle 255 250 250 snow1 238 233 233 snow2 205 201 201 snow3 139 137 137 snow4 255 245 238 seashell1 238 229 222 seashell2 205 197 191 seashell3 139 134 130 seashell4 255 239 219 AntiqueWhite1 238 223 204 AntiqueWhite2 205 192 176 AntiqueWhite3 139 131 120 AntiqueWhite4 255 228 196 bisque1 238 213 183 bisque2 205 183 158 bisque3 139 125 107 bisque4 255 218 185 PeachPuff1 238 203 173 PeachPuff2 205 175 149 PeachPuff3 139 119 101 PeachPuff4 255 222 173 NavajoWhite1 238 207 161 NavajoWhite2 205 179 139 NavajoWhite3 139 121 94 NavajoWhite4 255 250 205 LemonChiffon1 238 233 191 LemonChiffon2 205 201 165 LemonChiffon3 139 137 112 LemonChiffon4 255 248 220 cornsilk1 238 232 205 cornsilk2 205 200 177 cornsilk3 139 136 120 cornsilk4 255 255 240 ivory1 238 238 224 ivory2 205 205 193 ivory3 139 139 131 ivory4 240 255 240 honeydew1 224 238 224 honeydew2 193 205 193 honeydew3 131 139 131 honeydew4 255 240 245 LavenderBlush1 238 224 229 LavenderBlush2 205 193 197 LavenderBlush3 139 131 134 LavenderBlush4 255 228 225 MistyRose1 238 213 210 MistyRose2 205 183 181 MistyRose3 139 125 123 MistyRose4 240 255 255 azure1 224 238 238 azure2 193 205 205 azure3 131 139 139 azure4 131 111 255 SlateBlue1 122 103 238 SlateBlue2 105 89 205 SlateBlue3 71 60 139 SlateBlue4 72 118 255 RoyalBlue1 67 110 238 RoyalBlue2 58 95 205 RoyalBlue3 39 64 139 RoyalBlue4 0 0 255 blue1 0 0 238 blue2 0 0 205 blue3 0 0 139 blue4 30 144 255 DodgerBlue1 28 134 238 DodgerBlue2 24 116 205 DodgerBlue3 16 78 139 DodgerBlue4 99 184 255 SteelBlue1 92 172 238 SteelBlue2 79 148 205 SteelBlue3 54 100 139 SteelBlue4 0 191 255 DeepSkyBlue1 0 178 238 DeepSkyBlue2 0 154 205 DeepSkyBlue3 0 104 139 DeepSkyBlue4 135 206 255 SkyBlue1 126 192 238 SkyBlue2 108 166 205 SkyBlue3 74 112 139 SkyBlue4 176 226 255 LightSkyBlue1 164 211 238 LightSkyBlue2 141 182 205 LightSkyBlue3 96 123 139 LightSkyBlue4 198 226 255 SlateGray1 185 211 238 SlateGray2 159 182 205 SlateGray3 108 123 139 SlateGray4 202 225 255 LightSteelBlue1 188 210 238 LightSteelBlue2 162 181 205 LightSteelBlue3 110 123 139 LightSteelBlue4 191 239 255 LightBlue1 178 223 238 LightBlue2 154 192 205 LightBlue3 104 131 139 LightBlue4 224 255 255 LightCyan1 209 238 238 LightCyan2 180 205 205 LightCyan3 122 139 139 LightCyan4 187 255 255 PaleTurquoise1 174 238 238 PaleTurquoise2 150 205 205 PaleTurquoise3 102 139 139 PaleTurquoise4 152 245 255 CadetBlue1 142 229 238 CadetBlue2 122 197 205 CadetBlue3 83 134 139 CadetBlue4 0 245 255 turquoise1 0 229 238 turquoise2 0 197 205 turquoise3 0 134 139 turquoise4 0 255 255 cyan1 0 238 238 cyan2 0 205 205 cyan3 0 139 139 cyan4 151 255 255 DarkSlateGray1 141 238 238 DarkSlateGray2 121 205 205 DarkSlateGray3 82 139 139 DarkSlateGray4 127 255 212 aquamarine1 118 238 198 aquamarine2 102 205 170 aquamarine3 69 139 116 aquamarine4 193 255 193 DarkSeaGreen1 180 238 180 DarkSeaGreen2 155 205 155 DarkSeaGreen3 105 139 105 DarkSeaGreen4 84 255 159 SeaGreen1 78 238 148 SeaGreen2 67 205 128 SeaGreen3 46 139 87 SeaGreen4 154 255 154 PaleGreen1 144 238 144 PaleGreen2 124 205 124 PaleGreen3 84 139 84 PaleGreen4 0 255 127 SpringGreen1 0 238 118 SpringGreen2 0 205 102 SpringGreen3 0 139 69 SpringGreen4 0 255 0 green1 0 238 0 green2 0 205 0 green3 0 139 0 green4 127 255 0 chartreuse1 118 238 0 chartreuse2 102 205 0 chartreuse3 69 139 0 chartreuse4 192 255 62 OliveDrab1 179 238 58 OliveDrab2 154 205 50 OliveDrab3 105 139 34 OliveDrab4 202 255 112 DarkOliveGreen1 188 238 104 DarkOliveGreen2 162 205 90 DarkOliveGreen3 110 139 61 DarkOliveGreen4 255 246 143 khaki1 238 230 133 khaki2 205 198 115 khaki3 139 134 78 khaki4 255 236 139 LightGoldenrod1 238 220 130 LightGoldenrod2 205 190 112 LightGoldenrod3 139 129 76 LightGoldenrod4 255 255 224 LightYellow1 238 238 209 LightYellow2 205 205 180 LightYellow3 139 139 122 LightYellow4 255 255 0 yellow1 238 238 0 yellow2 205 205 0 yellow3 139 139 0 yellow4 255 215 0 gold1 238 201 0 gold2 205 173 0 gold3 139 117 0 gold4 255 193 37 goldenrod1 238 180 34 goldenrod2 205 155 29 goldenrod3 139 105 20 goldenrod4 255 185 15 DarkGoldenrod1 238 173 14 DarkGoldenrod2 205 149 12 DarkGoldenrod3 139 101 8 DarkGoldenrod4 255 193 193 RosyBrown1 238 180 180 RosyBrown2 205 155 155 RosyBrown3 139 105 105 RosyBrown4 255 106 106 IndianRed1 238 99 99 IndianRed2 205 85 85 IndianRed3 139 58 58 IndianRed4 255 130 71 sienna1 238 121 66 sienna2 205 104 57 sienna3 139 71 38 sienna4 255 211 155 burlywood1 238 197 145 burlywood2 205 170 125 burlywood3 139 115 85 burlywood4 255 231 186 wheat1 238 216 174 wheat2 205 186 150 wheat3 139 126 102 wheat4 255 165 79 tan1 238 154 73 tan2 205 133 63 tan3 139 90 43 tan4 255 127 36 chocolate1 238 118 33 chocolate2 205 102 29 chocolate3 139 69 19 chocolate4 255 48 48 firebrick1 238 44 44 firebrick2 205 38 38 firebrick3 139 26 26 firebrick4 255 64 64 brown1 238 59 59 brown2 205 51 51 brown3 139 35 35 brown4 255 140 105 salmon1 238 130 98 salmon2 205 112 84 salmon3 139 76 57 salmon4 255 160 122 LightSalmon1 238 149 114 LightSalmon2 205 129 98 LightSalmon3 139 87 66 LightSalmon4 255 165 0 orange1 238 154 0 orange2 205 133 0 orange3 139 90 0 orange4 255 127 0 DarkOrange1 238 118 0 DarkOrange2 205 102 0 DarkOrange3 139 69 0 DarkOrange4 255 114 86 coral1 238 106 80 coral2 205 91 69 coral3 139 62 47 coral4 255 99 71 tomato1 238 92 66 tomato2 205 79 57 tomato3 139 54 38 tomato4 255 69 0 OrangeRed1 238 64 0 OrangeRed2 205 55 0 OrangeRed3 139 37 0 OrangeRed4 255 0 0 red1 238 0 0 red2 205 0 0 red3 139 0 0 red4 255 20 147 DeepPink1 238 18 137 DeepPink2 205 16 118 DeepPink3 139 10 80 DeepPink4 255 110 180 HotPink1 238 106 167 HotPink2 205 96 144 HotPink3 139 58 98 HotPink4 255 181 197 pink1 238 169 184 pink2 205 145 158 pink3 139 99 108 pink4 255 174 185 LightPink1 238 162 173 LightPink2 205 140 149 LightPink3 139 95 101 LightPink4 255 130 171 PaleVioletRed1 238 121 159 PaleVioletRed2 205 104 137 PaleVioletRed3 139 71 93 PaleVioletRed4 255 52 179 maroon1 238 48 167 maroon2 205 41 144 maroon3 139 28 98 maroon4 255 62 150 VioletRed1 238 58 140 VioletRed2 205 50 120 VioletRed3 139 34 82 VioletRed4 255 0 255 magenta1 238 0 238 magenta2 205 0 205 magenta3 139 0 139 magenta4 255 131 250 orchid1 238 122 233 orchid2 205 105 201 orchid3 139 71 137 orchid4 255 187 255 plum1 238 174 238 plum2 205 150 205 plum3 139 102 139 plum4 224 102 255 MediumOrchid1 209 95 238 MediumOrchid2 180 82 205 MediumOrchid3 122 55 139 MediumOrchid4 191 62 255 DarkOrchid1 178 58 238 DarkOrchid2 154 50 205 DarkOrchid3 104 34 139 DarkOrchid4 155 48 255 purple1 145 44 238 purple2 125 38 205 purple3 85 26 139 purple4 171 130 255 MediumPurple1 159 121 238 MediumPurple2 137 104 205 MediumPurple3 93 71 139 MediumPurple4 255 225 255 thistle1 238 210 238 thistle2 205 181 205 thistle3 139 123 139 thistle4 0 0 0 gray0 0 0 0 grey0 3 3 3 gray1 3 3 3 grey1 5 5 5 gray2 5 5 5 grey2 8 8 8 gray3 8 8 8 grey3 10 10 10 gray4 10 10 10 grey4 13 13 13 gray5 13 13 13 grey5 15 15 15 gray6 15 15 15 grey6 18 18 18 gray7 18 18 18 grey7 20 20 20 gray8 20 20 20 grey8 23 23 23 gray9 23 23 23 grey9 26 26 26 gray10 26 26 26 grey10 28 28 28 gray11 28 28 28 grey11 31 31 31 gray12 31 31 31 grey12 33 33 33 gray13 33 33 33 grey13 36 36 36 gray14 36 36 36 grey14 38 38 38 gray15 38 38 38 grey15 41 41 41 gray16 41 41 41 grey16 43 43 43 gray17 43 43 43 grey17 46 46 46 gray18 46 46 46 grey18 48 48 48 gray19 48 48 48 grey19 51 51 51 gray20 51 51 51 grey20 54 54 54 gray21 54 54 54 grey21 56 56 56 gray22 56 56 56 grey22 59 59 59 gray23 59 59 59 grey23 61 61 61 gray24 61 61 61 grey24 64 64 64 gray25 64 64 64 grey25 66 66 66 gray26 66 66 66 grey26 69 69 69 gray27 69 69 69 grey27 71 71 71 gray28 71 71 71 grey28 74 74 74 gray29 74 74 74 grey29 77 77 77 gray30 77 77 77 grey30 79 79 79 gray31 79 79 79 grey31 82 82 82 gray32 82 82 82 grey32 84 84 84 gray33 84 84 84 grey33 87 87 87 gray34 87 87 87 grey34 89 89 89 gray35 89 89 89 grey35 92 92 92 gray36 92 92 92 grey36 94 94 94 gray37 94 94 94 grey37 97 97 97 gray38 97 97 97 grey38 99 99 99 gray39 99 99 99 grey39 102 102 102 gray40 102 102 102 grey40 105 105 105 gray41 105 105 105 grey41 107 107 107 gray42 107 107 107 grey42 110 110 110 gray43 110 110 110 grey43 112 112 112 gray44 112 112 112 grey44 115 115 115 gray45 115 115 115 grey45 117 117 117 gray46 117 117 117 grey46 120 120 120 gray47 120 120 120 grey47 122 122 122 gray48 122 122 122 grey48 125 125 125 gray49 125 125 125 grey49 127 127 127 gray50 127 127 127 grey50 130 130 130 gray51 130 130 130 grey51 133 133 133 gray52 133 133 133 grey52 135 135 135 gray53 135 135 135 grey53 138 138 138 gray54 138 138 138 grey54 140 140 140 gray55 140 140 140 grey55 143 143 143 gray56 143 143 143 grey56 145 145 145 gray57 145 145 145 grey57 148 148 148 gray58 148 148 148 grey58 150 150 150 gray59 150 150 150 grey59 153 153 153 gray60 153 153 153 grey60 156 156 156 gray61 156 156 156 grey61 158 158 158 gray62 158 158 158 grey62 161 161 161 gray63 161 161 161 grey63 163 163 163 gray64 163 163 163 grey64 166 166 166 gray65 166 166 166 grey65 168 168 168 gray66 168 168 168 grey66 171 171 171 gray67 171 171 171 grey67 173 173 173 gray68 173 173 173 grey68 176 176 176 gray69 176 176 176 grey69 179 179 179 gray70 179 179 179 grey70 181 181 181 gray71 181 181 181 grey71 184 184 184 gray72 184 184 184 grey72 186 186 186 gray73 186 186 186 grey73 189 189 189 gray74 189 189 189 grey74 191 191 191 gray75 191 191 191 grey75 194 194 194 gray76 194 194 194 grey76 196 196 196 gray77 196 196 196 grey77 199 199 199 gray78 199 199 199 grey78 201 201 201 gray79 201 201 201 grey79 204 204 204 gray80 204 204 204 grey80 207 207 207 gray81 207 207 207 grey81 209 209 209 gray82 209 209 209 grey82 212 212 212 gray83 212 212 212 grey83 214 214 214 gray84 214 214 214 grey84 217 217 217 gray85 217 217 217 grey85 219 219 219 gray86 219 219 219 grey86 222 222 222 gray87 222 222 222 grey87 224 224 224 gray88 224 224 224 grey88 227 227 227 gray89 227 227 227 grey89 229 229 229 gray90 229 229 229 grey90 232 232 232 gray91 232 232 232 grey91 235 235 235 gray92 235 235 235 grey92 237 237 237 gray93 237 237 237 grey93 240 240 240 gray94 240 240 240 grey94 242 242 242 gray95 242 242 242 grey95 245 245 245 gray96 245 245 245 grey96 247 247 247 gray97 247 247 247 grey97 250 250 250 gray98 250 250 250 grey98 252 252 252 gray99 252 252 252 grey99 255 255 255 gray100 255 255 255 grey100 169 169 169 dark grey 169 169 169 DarkGrey 169 169 169 dark gray 169 169 169 DarkGray 0 0 139 dark blue 0 0 139 DarkBlue 0 139 139 dark cyan 0 139 139 DarkCyan 139 0 139 dark magenta 139 0 139 DarkMagenta 139 0 0 dark red 139 0 0 DarkRed 144 238 144 light green 144 238 144 LightGreen ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/scripts.vim��������������������������������������������������������������������0000664�0000000�0000000�00000024525�13204015742�0016705�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last change: 2017 Aug 27 " This file is called by an autocommand for every file that has just been " loaded into a buffer. It checks if the type of file can be recognized by " the file contents. The autocommand is in $VIMRUNTIME/filetype.vim. " Only do the rest when the FileType autocommand has not been triggered yet. if did_filetype() finish endif " Load the user defined scripts file first " Only do this when the FileType autocommand has not been triggered yet if exists("myscriptsfile") && filereadable(expand(myscriptsfile)) execute "source " . myscriptsfile if did_filetype() finish endif endif " Line continuation is used here, remove 'C' from 'cpoptions' let s:cpo_save = &cpo set cpo&vim let s:line1 = getline(1) if s:line1 =~ "^#!" " A script that starts with "#!". " Check for a line like "#!/usr/bin/env VAR=val bash". Turn it into " "#!/usr/bin/bash" to make matching easier. if s:line1 =~ '^#!\s*\S*\<env\s' let s:line1 = substitute(s:line1, '\S\+=\S\+', '', 'g') let s:line1 = substitute(s:line1, '\<env\s\+', '', '') endif " Get the program name. " Only accept spaces in PC style paths: "#!c:/program files/perl [args]". " If the word env is used, use the first word after the space: " "#!/usr/bin/env perl [path/args]" " If there is no path use the first word: "#!perl [path/args]". " Otherwise get the last word after a slash: "#!/usr/bin/perl [path/args]". if s:line1 =~ '^#!\s*\a:[/\\]' let s:name = substitute(s:line1, '^#!.*[/\\]\(\i\+\).*', '\1', '') elseif s:line1 =~ '^#!.*\<env\>' let s:name = substitute(s:line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '') elseif s:line1 =~ '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)' let s:name = substitute(s:line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '') else let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '') endif " tcl scripts may have #!/bin/sh in the first line and "exec wish" in the " third line. Suggested by Steven Atkinson. if getline(3) =~ '^exec wish' let s:name = 'wish' endif " Bourne-like shell scripts: bash bash2 ksh ksh93 sh if s:name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>' call SetFileTypeSH(s:line1) " defined in filetype.vim " csh scripts elseif s:name =~ '^csh\>' if exists("g:filetype_csh") call SetFileTypeShell(g:filetype_csh) else call SetFileTypeShell("csh") endif " tcsh scripts elseif s:name =~ '^tcsh\>' call SetFileTypeShell("tcsh") " Z shell scripts elseif s:name =~ '^zsh\>' set ft=zsh " TCL scripts elseif s:name =~ '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>' set ft=tcl " Expect scripts elseif s:name =~ '^expect\>' set ft=expect " Gnuplot scripts elseif s:name =~ '^gnuplot\>' set ft=gnuplot " Makefiles elseif s:name =~ 'make\>' set ft=make " Lua elseif s:name =~ 'lua' set ft=lua " Perl 6 elseif s:name =~ 'perl6' set ft=perl6 " Perl elseif s:name =~ 'perl' set ft=perl " PHP elseif s:name =~ 'php' set ft=php " Python elseif s:name =~ 'python' set ft=python " Groovy elseif s:name =~ '^groovy\>' set ft=groovy " Ruby elseif s:name =~ 'ruby' set ft=ruby " JavaScript elseif s:name =~ 'node\(js\)\=\>' || s:name =~ 'rhino\>' set ft=javascript " BC calculator elseif s:name =~ '^bc\>' set ft=bc " sed elseif s:name =~ 'sed\>' set ft=sed " OCaml-scripts elseif s:name =~ 'ocaml' set ft=ocaml " Awk scripts elseif s:name =~ 'awk\>' set ft=awk " Website MetaLanguage elseif s:name =~ 'wml' set ft=wml " Scheme scripts elseif s:name =~ 'scheme' set ft=scheme " CFEngine scripts elseif s:name =~ 'cfengine' set ft=cfengine " Erlang scripts elseif s:name =~ 'escript' set ft=erlang " Haskell elseif s:name =~ 'haskell' set ft=haskell " Scala elseif s:name =~ 'scala\>' set ft=scala endif unlet s:name else " File does not start with "#!". let s:line2 = getline(2) let s:line3 = getline(3) let s:line4 = getline(4) let s:line5 = getline(5) " Bourne-like shell scripts: sh ksh bash bash2 if s:line1 =~ '^:$' call SetFileTypeSH(s:line1) " defined in filetype.vim " Z shell scripts elseif s:line1 =~ '^#compdef\>' || s:line1 =~ '^#autoload\>' || \ "\n".s:line1."\n".s:line2."\n".s:line3."\n".s:line4."\n".s:line5 =~ '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>' set ft=zsh " ELM Mail files elseif s:line1 =~ '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$' set ft=mail " Mason elseif s:line1 =~ '^<[%&].*>' set ft=mason " Vim scripts (must have '" vim' as the first line to trigger this) elseif s:line1 =~ '^" *[vV]im$' set ft=vim " MOO elseif s:line1 =~ '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$' set ft=moo " Diff file: " - "diff" in first line (context diff) " - "Only in " in first line " - "--- " in first line and "+++ " in second line (unified diff). " - "*** " in first line and "--- " in second line (context diff). " - "# It was generated by makepatch " in the second line (makepatch diff). " - "Index: <filename>" in the first line (CVS file) " - "=== ", line of "=", "---", "+++ " (SVK diff) " - "=== ", "--- ", "+++ " (bzr diff, common case) " - "=== (removed|added|renamed|modified)" (bzr diff, alternative) " - "# HG changeset patch" in first line (Mercurial export format) elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)' \ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ') \ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ') \ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ') \ || (s:line1 =~ '^=== ' && ((s:line2 =~ '^=\{66\}' && s:line3 =~ '^--- ' && s:line4 =~ '^+++') || (s:line2 =~ '^--- ' && s:line3 =~ '^+++ '))) \ || (s:line1 =~ '^=== \(removed\|added\|renamed\|modified\)') set ft=diff " PostScript Files (must have %!PS as the first line, like a2ps output) elseif s:line1 =~ '^%![ \t]*PS' set ft=postscr " M4 scripts: Guess there is a line that starts with "dnl". elseif s:line1 =~ '^\s*dnl\>' \ || s:line2 =~ '^\s*dnl\>' \ || s:line3 =~ '^\s*dnl\>' \ || s:line4 =~ '^\s*dnl\>' \ || s:line5 =~ '^\s*dnl\>' set ft=m4 " SiCAD scripts (must have procn or procd as the first line to trigger this) elseif s:line1 =~? '^ *proc[nd] *$' set ft=sicad " Purify log files start with "**** Purify" elseif s:line1 =~ '^\*\*\*\* Purify' set ft=purifylog " XML elseif s:line1 =~ '<?\s*xml.*?>' set ft=xml " XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN") elseif s:line1 =~ '\<DTD\s\+XHTML\s' set ft=xhtml " HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN") " Avoid "doctype html", used by slim. elseif s:line1 =~? '<!DOCTYPE\s\+html\>' set ft=html " PDF elseif s:line1 =~ '^%PDF-' set ft=pdf " XXD output elseif s:line1 =~ '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} ' set ft=xxd " RCS/CVS log output elseif s:line1 =~ '^RCS file:' || s:line2 =~ '^RCS file:' set ft=rcslog " CVS commit elseif s:line2 =~ '^CVS:' || getline("$") =~ '^CVS: ' set ft=cvs " Prescribe elseif s:line1 =~ '^!R!' set ft=prescribe " Send-pr elseif s:line1 =~ '^SEND-PR:' set ft=sendpr " SNNS files elseif s:line1 =~ '^SNNS network definition file' set ft=snnsnet elseif s:line1 =~ '^SNNS pattern definition file' set ft=snnspat elseif s:line1 =~ '^SNNS result file' set ft=snnsres " Virata elseif s:line1 =~ '^%.\{-}[Vv]irata' \ || s:line2 =~ '^%.\{-}[Vv]irata' \ || s:line3 =~ '^%.\{-}[Vv]irata' \ || s:line4 =~ '^%.\{-}[Vv]irata' \ || s:line5 =~ '^%.\{-}[Vv]irata' set ft=virata " Strace elseif s:line1 =~# '[0-9:.]* *execve(' || s:line1 =~# '^__libc_start_main' set ft=strace " VSE JCL elseif s:line1 =~ '^\* $$ JOB\>' || s:line1 =~ '^// *JOB\>' set ft=vsejcl " TAK and SINDA elseif s:line4 =~ 'K & K Associates' || s:line2 =~ 'TAK 2000' set ft=takout elseif s:line3 =~ 'S Y S T E M S I M P R O V E D ' set ft=sindaout elseif getline(6) =~ 'Run Date: ' set ft=takcmp elseif getline(9) =~ 'Node File 1' set ft=sindacmp " DNS zone files elseif s:line1.s:line2.s:line3.s:line4 =~# '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA' set ft=bindzone " BAAN elseif s:line1 =~ '|\*\{1,80}' && s:line2 =~ 'VRC ' \ || s:line2 =~ '|\*\{1,80}' && s:line3 =~ 'VRC ' set ft=baan " Valgrind elseif s:line1 =~ '^==\d\+== valgrind' || s:line3 =~ '^==\d\+== Using valgrind' set ft=valgrind " Go docs elseif s:line1 =~ '^PACKAGE DOCUMENTATION$' set ft=godoc " Renderman Interface Bytestream elseif s:line1 =~ '^##RenderMan' set ft=rib " Scheme scripts elseif s:line1 =~ 'exec\s\+\S*scheme' || s:line2 =~ 'exec\s\+\S*scheme' set ft=scheme " Git output elseif s:line1 =~ '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$' set ft=git " Gprof (gnu profiler) elseif s:line1 == 'Flat profile:' \ && s:line2 == '' \ && s:line3 =~ '^Each sample counts as .* seconds.$' set ft=gprof " Erlang terms " (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes) elseif s:line1 =~? '-\*-.*erlang.*-\*-' set ft=erlang " CVS diff else let s:lnum = 1 while getline(s:lnum) =~ "^? " && s:lnum < line("$") let s:lnum += 1 endwhile if getline(s:lnum) =~ '^Index:\s\+\f\+$' set ft=diff " locale input files: Formal Definitions of Cultural Conventions " filename must be like en_US, fr_FR@euro or en_US.UTF-8 elseif expand("%") =~ '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_' let s:lnum = 1 while s:lnum < 100 && s:lnum < line("$") if getline(s:lnum) =~ '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$' setf fdcc break endif let s:lnum += 1 endwhile endif unlet s:lnum endif unlet s:line2 s:line3 s:line4 s:line5 endif " Restore 'cpoptions' let &cpo = s:cpo_save unlet s:cpo_save s:line1 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/synmenu.vim��������������������������������������������������������������������0000664�0000000�0000000�00000110157�13204015742�0016711�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim support file to define the syntax selection menu " This file is normally sourced from menu.vim. " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2017 Oct 28 " Define the SetSyn function, used for the Syntax menu entries. " Set 'filetype' and also 'syntax' if it is manually selected. fun! SetSyn(name) if a:name == "fvwm1" let use_fvwm_1 = 1 let use_fvwm_2 = 0 let name = "fvwm" elseif a:name == "fvwm2" let use_fvwm_2 = 1 let use_fvwm_1 = 0 let name = "fvwm" else let name = a:name endif if !exists("s:syntax_menu_synonly") exe "set ft=" . name if exists("g:syntax_manual") exe "set syn=" . name endif else exe "set syn=" . name endif endfun " <> notation is used here, remove '<' from 'cpoptions' let s:cpo_save = &cpo set cpo&vim " The following menu items are generated by makemenu.vim. " The Start Of The Syntax Menu an 50.10.100 &Syntax.AB.A2ps\ config :cal SetSyn("a2ps")<CR> an 50.10.110 &Syntax.AB.Aap :cal SetSyn("aap")<CR> an 50.10.120 &Syntax.AB.ABAP/4 :cal SetSyn("abap")<CR> an 50.10.130 &Syntax.AB.Abaqus :cal SetSyn("abaqus")<CR> an 50.10.140 &Syntax.AB.ABC\ music\ notation :cal SetSyn("abc")<CR> an 50.10.150 &Syntax.AB.ABEL :cal SetSyn("abel")<CR> an 50.10.160 &Syntax.AB.AceDB\ model :cal SetSyn("acedb")<CR> an 50.10.170 &Syntax.AB.Ada :cal SetSyn("ada")<CR> an 50.10.180 &Syntax.AB.AfLex :cal SetSyn("aflex")<CR> an 50.10.190 &Syntax.AB.ALSA\ config :cal SetSyn("alsaconf")<CR> an 50.10.200 &Syntax.AB.Altera\ AHDL :cal SetSyn("ahdl")<CR> an 50.10.210 &Syntax.AB.Amiga\ DOS :cal SetSyn("amiga")<CR> an 50.10.220 &Syntax.AB.AMPL :cal SetSyn("ampl")<CR> an 50.10.230 &Syntax.AB.Ant\ build\ file :cal SetSyn("ant")<CR> an 50.10.240 &Syntax.AB.ANTLR :cal SetSyn("antlr")<CR> an 50.10.250 &Syntax.AB.Apache\ config :cal SetSyn("apache")<CR> an 50.10.260 &Syntax.AB.Apache-style\ config :cal SetSyn("apachestyle")<CR> an 50.10.270 &Syntax.AB.Applix\ ELF :cal SetSyn("elf")<CR> an 50.10.280 &Syntax.AB.APT\ config :cal SetSyn("aptconf")<CR> an 50.10.290 &Syntax.AB.Arc\ Macro\ Language :cal SetSyn("aml")<CR> an 50.10.300 &Syntax.AB.Arch\ inventory :cal SetSyn("arch")<CR> an 50.10.310 &Syntax.AB.ART :cal SetSyn("art")<CR> an 50.10.320 &Syntax.AB.Ascii\ Doc :cal SetSyn("asciidoc")<CR> an 50.10.330 &Syntax.AB.ASP\ with\ VBScript :cal SetSyn("aspvbs")<CR> an 50.10.340 &Syntax.AB.ASP\ with\ Perl :cal SetSyn("aspperl")<CR> an 50.10.350 &Syntax.AB.Assembly.680x0 :cal SetSyn("asm68k")<CR> an 50.10.360 &Syntax.AB.Assembly.Flat :cal SetSyn("fasm")<CR> an 50.10.370 &Syntax.AB.Assembly.GNU :cal SetSyn("asm")<CR> an 50.10.380 &Syntax.AB.Assembly.GNU\ H-8300 :cal SetSyn("asmh8300")<CR> an 50.10.390 &Syntax.AB.Assembly.Intel\ IA-64 :cal SetSyn("ia64")<CR> an 50.10.400 &Syntax.AB.Assembly.Microsoft :cal SetSyn("masm")<CR> an 50.10.410 &Syntax.AB.Assembly.Netwide :cal SetSyn("nasm")<CR> an 50.10.420 &Syntax.AB.Assembly.PIC :cal SetSyn("pic")<CR> an 50.10.430 &Syntax.AB.Assembly.Turbo :cal SetSyn("tasm")<CR> an 50.10.440 &Syntax.AB.Assembly.VAX\ Macro\ Assembly :cal SetSyn("vmasm")<CR> an 50.10.450 &Syntax.AB.Assembly.Z-80 :cal SetSyn("z8a")<CR> an 50.10.460 &Syntax.AB.Assembly.xa\ 6502\ cross\ assember :cal SetSyn("a65")<CR> an 50.10.470 &Syntax.AB.ASN\.1 :cal SetSyn("asn")<CR> an 50.10.480 &Syntax.AB.Asterisk\ config :cal SetSyn("asterisk")<CR> an 50.10.490 &Syntax.AB.Asterisk\ voicemail\ config :cal SetSyn("asteriskvm")<CR> an 50.10.500 &Syntax.AB.Atlas :cal SetSyn("atlas")<CR> an 50.10.510 &Syntax.AB.AutoHotKey :cal SetSyn("autohotkey")<CR> an 50.10.520 &Syntax.AB.AutoIt :cal SetSyn("autoit")<CR> an 50.10.530 &Syntax.AB.Automake :cal SetSyn("automake")<CR> an 50.10.540 &Syntax.AB.Avenue :cal SetSyn("ave")<CR> an 50.10.550 &Syntax.AB.Awk :cal SetSyn("awk")<CR> an 50.10.560 &Syntax.AB.AYacc :cal SetSyn("ayacc")<CR> an 50.10.580 &Syntax.AB.B :cal SetSyn("b")<CR> an 50.10.590 &Syntax.AB.Baan :cal SetSyn("baan")<CR> an 50.10.600 &Syntax.AB.Basic.FreeBasic :cal SetSyn("freebasic")<CR> an 50.10.610 &Syntax.AB.Basic.IBasic :cal SetSyn("ibasic")<CR> an 50.10.620 &Syntax.AB.Basic.QBasic :cal SetSyn("basic")<CR> an 50.10.630 &Syntax.AB.Basic.Visual\ Basic :cal SetSyn("vb")<CR> an 50.10.640 &Syntax.AB.Bazaar\ commit\ file :cal SetSyn("bzr")<CR> an 50.10.650 &Syntax.AB.BC\ calculator :cal SetSyn("bc")<CR> an 50.10.660 &Syntax.AB.BDF\ font :cal SetSyn("bdf")<CR> an 50.10.670 &Syntax.AB.BibTeX.Bibliography\ database :cal SetSyn("bib")<CR> an 50.10.680 &Syntax.AB.BibTeX.Bibliography\ Style :cal SetSyn("bst")<CR> an 50.10.690 &Syntax.AB.BIND.BIND\ config :cal SetSyn("named")<CR> an 50.10.700 &Syntax.AB.BIND.BIND\ zone :cal SetSyn("bindzone")<CR> an 50.10.710 &Syntax.AB.Blank :cal SetSyn("blank")<CR> an 50.20.100 &Syntax.C.C :cal SetSyn("c")<CR> an 50.20.110 &Syntax.C.C++ :cal SetSyn("cpp")<CR> an 50.20.120 &Syntax.C.C# :cal SetSyn("cs")<CR> an 50.20.130 &Syntax.C.Cabal\ Haskell\ build\ file :cal SetSyn("cabal")<CR> an 50.20.140 &Syntax.C.Calendar :cal SetSyn("calendar")<CR> an 50.20.150 &Syntax.C.Cascading\ Style\ Sheets :cal SetSyn("css")<CR> an 50.20.160 &Syntax.C.CDL :cal SetSyn("cdl")<CR> an 50.20.170 &Syntax.C.Cdrdao\ TOC :cal SetSyn("cdrtoc")<CR> an 50.20.180 &Syntax.C.Cdrdao\ config :cal SetSyn("cdrdaoconf")<CR> an 50.20.190 &Syntax.C.Century\ Term :cal SetSyn("cterm")<CR> an 50.20.200 &Syntax.C.CH\ script :cal SetSyn("ch")<CR> an 50.20.210 &Syntax.C.ChaiScript :cal SetSyn("chaiscript")<CR> an 50.20.220 &Syntax.C.ChangeLog :cal SetSyn("changelog")<CR> an 50.20.230 &Syntax.C.Cheetah\ template :cal SetSyn("cheetah")<CR> an 50.20.240 &Syntax.C.CHILL :cal SetSyn("chill")<CR> an 50.20.250 &Syntax.C.ChordPro :cal SetSyn("chordpro")<CR> an 50.20.260 &Syntax.C.Clean :cal SetSyn("clean")<CR> an 50.20.270 &Syntax.C.Clever :cal SetSyn("cl")<CR> an 50.20.280 &Syntax.C.Clipper :cal SetSyn("clipper")<CR> an 50.20.290 &Syntax.C.Clojure :cal SetSyn("clojure")<CR> an 50.20.300 &Syntax.C.Cmake :cal SetSyn("cmake")<CR> an 50.20.310 &Syntax.C.Cmusrc :cal SetSyn("cmusrc")<CR> an 50.20.320 &Syntax.C.Cobol :cal SetSyn("cobol")<CR> an 50.20.330 &Syntax.C.Coco/R :cal SetSyn("coco")<CR> an 50.20.340 &Syntax.C.Cold\ Fusion :cal SetSyn("cf")<CR> an 50.20.350 &Syntax.C.Conary\ Recipe :cal SetSyn("conaryrecipe")<CR> an 50.20.360 &Syntax.C.Config.Cfg\ Config\ file :cal SetSyn("cfg")<CR> an 50.20.370 &Syntax.C.Config.Configure\.in :cal SetSyn("config")<CR> an 50.20.380 &Syntax.C.Config.Generic\ Config\ file :cal SetSyn("conf")<CR> an 50.20.390 &Syntax.C.CRM114 :cal SetSyn("crm")<CR> an 50.20.400 &Syntax.C.Crontab :cal SetSyn("crontab")<CR> an 50.20.410 &Syntax.C.CSDL :cal SetSyn("csdl")<CR> an 50.20.420 &Syntax.C.CSP :cal SetSyn("csp")<CR> an 50.20.430 &Syntax.C.Ctrl-H :cal SetSyn("ctrlh")<CR> an 50.20.440 &Syntax.C.Cucumber :cal SetSyn("cucumber")<CR> an 50.20.450 &Syntax.C.CUDA :cal SetSyn("cuda")<CR> an 50.20.460 &Syntax.C.CUPL.CUPL :cal SetSyn("cupl")<CR> an 50.20.470 &Syntax.C.CUPL.Simulation :cal SetSyn("cuplsim")<CR> an 50.20.480 &Syntax.C.CVS.commit\ file :cal SetSyn("cvs")<CR> an 50.20.490 &Syntax.C.CVS.cvsrc :cal SetSyn("cvsrc")<CR> an 50.20.500 &Syntax.C.Cyn++ :cal SetSyn("cynpp")<CR> an 50.20.510 &Syntax.C.Cynlib :cal SetSyn("cynlib")<CR> an 50.30.100 &Syntax.DE.D :cal SetSyn("d")<CR> an 50.30.110 &Syntax.DE.Datascript :cal SetSyn("datascript")<CR> an 50.30.120 &Syntax.DE.Debian.Debian\ ChangeLog :cal SetSyn("debchangelog")<CR> an 50.30.130 &Syntax.DE.Debian.Debian\ Control :cal SetSyn("debcontrol")<CR> an 50.30.140 &Syntax.DE.Debian.Debian\ Sources\.list :cal SetSyn("debsources")<CR> an 50.30.150 &Syntax.DE.Denyhosts :cal SetSyn("denyhosts")<CR> an 50.30.160 &Syntax.DE.Desktop :cal SetSyn("desktop")<CR> an 50.30.170 &Syntax.DE.Dict\ config :cal SetSyn("dictconf")<CR> an 50.30.180 &Syntax.DE.Dictd\ config :cal SetSyn("dictdconf")<CR> an 50.30.190 &Syntax.DE.Diff :cal SetSyn("diff")<CR> an 50.30.200 &Syntax.DE.Digital\ Command\ Lang :cal SetSyn("dcl")<CR> an 50.30.210 &Syntax.DE.Dircolors :cal SetSyn("dircolors")<CR> an 50.30.220 &Syntax.DE.Django\ template :cal SetSyn("django")<CR> an 50.30.230 &Syntax.DE.DNS/BIND\ zone :cal SetSyn("bindzone")<CR> an 50.30.240 &Syntax.DE.Dnsmasq\ config :cal SetSyn("dnsmasq")<CR> an 50.30.250 &Syntax.DE.DocBook.auto-detect :cal SetSyn("docbk")<CR> an 50.30.260 &Syntax.DE.DocBook.SGML :cal SetSyn("docbksgml")<CR> an 50.30.270 &Syntax.DE.DocBook.XML :cal SetSyn("docbkxml")<CR> an 50.30.280 &Syntax.DE.Dot :cal SetSyn("dot")<CR> an 50.30.290 &Syntax.DE.Doxygen.C\ with\ doxygen :cal SetSyn("c.doxygen")<CR> an 50.30.300 &Syntax.DE.Doxygen.C++\ with\ doxygen :cal SetSyn("cpp.doxygen")<CR> an 50.30.310 &Syntax.DE.Doxygen.IDL\ with\ doxygen :cal SetSyn("idl.doxygen")<CR> an 50.30.320 &Syntax.DE.Doxygen.Java\ with\ doxygen :cal SetSyn("java.doxygen")<CR> an 50.30.330 &Syntax.DE.Doxygen.DataScript\ with\ doxygen :cal SetSyn("datascript.doxygen")<CR> an 50.30.340 &Syntax.DE.Dracula :cal SetSyn("dracula")<CR> an 50.30.350 &Syntax.DE.DSSSL :cal SetSyn("dsl")<CR> an 50.30.360 &Syntax.DE.DTD :cal SetSyn("dtd")<CR> an 50.30.370 &Syntax.DE.DTML\ (Zope) :cal SetSyn("dtml")<CR> an 50.30.380 &Syntax.DE.DTrace :cal SetSyn("dtrace")<CR> an 50.30.390 &Syntax.DE.Dts/dtsi :cal SetSyn("dts")<CR> an 50.30.400 &Syntax.DE.Dylan.Dylan :cal SetSyn("dylan")<CR> an 50.30.410 &Syntax.DE.Dylan.Dylan\ interface :cal SetSyn("dylanintr")<CR> an 50.30.420 &Syntax.DE.Dylan.Dylan\ lid :cal SetSyn("dylanlid")<CR> an 50.30.440 &Syntax.DE.EDIF :cal SetSyn("edif")<CR> an 50.30.450 &Syntax.DE.Eiffel :cal SetSyn("eiffel")<CR> an 50.30.460 &Syntax.DE.Elinks\ config :cal SetSyn("elinks")<CR> an 50.30.470 &Syntax.DE.Elm\ filter\ rules :cal SetSyn("elmfilt")<CR> an 50.30.480 &Syntax.DE.Embedix\ Component\ Description :cal SetSyn("ecd")<CR> an 50.30.490 &Syntax.DE.ERicsson\ LANGuage :cal SetSyn("erlang")<CR> an 50.30.500 &Syntax.DE.ESMTP\ rc :cal SetSyn("esmtprc")<CR> an 50.30.510 &Syntax.DE.ESQL-C :cal SetSyn("esqlc")<CR> an 50.30.520 &Syntax.DE.Essbase\ script :cal SetSyn("csc")<CR> an 50.30.530 &Syntax.DE.Esterel :cal SetSyn("esterel")<CR> an 50.30.540 &Syntax.DE.Eterm\ config :cal SetSyn("eterm")<CR> an 50.30.550 &Syntax.DE.Eviews :cal SetSyn("eviews")<CR> an 50.30.560 &Syntax.DE.Exim\ conf :cal SetSyn("exim")<CR> an 50.30.570 &Syntax.DE.Expect :cal SetSyn("expect")<CR> an 50.30.580 &Syntax.DE.Exports :cal SetSyn("exports")<CR> an 50.40.100 &Syntax.FG.Falcon :cal SetSyn("falcon")<CR> an 50.40.110 &Syntax.FG.Fantom :cal SetSyn("fan")<CR> an 50.40.120 &Syntax.FG.Fetchmail :cal SetSyn("fetchmail")<CR> an 50.40.130 &Syntax.FG.FlexWiki :cal SetSyn("flexwiki")<CR> an 50.40.140 &Syntax.FG.Focus\ Executable :cal SetSyn("focexec")<CR> an 50.40.150 &Syntax.FG.Focus\ Master :cal SetSyn("master")<CR> an 50.40.160 &Syntax.FG.FORM :cal SetSyn("form")<CR> an 50.40.170 &Syntax.FG.Forth :cal SetSyn("forth")<CR> an 50.40.180 &Syntax.FG.Fortran :cal SetSyn("fortran")<CR> an 50.40.190 &Syntax.FG.FoxPro :cal SetSyn("foxpro")<CR> an 50.40.200 &Syntax.FG.FrameScript :cal SetSyn("framescript")<CR> an 50.40.210 &Syntax.FG.Fstab :cal SetSyn("fstab")<CR> an 50.40.220 &Syntax.FG.Fvwm.Fvwm\ configuration :cal SetSyn("fvwm1")<CR> an 50.40.230 &Syntax.FG.Fvwm.Fvwm2\ configuration :cal SetSyn("fvwm2")<CR> an 50.40.240 &Syntax.FG.Fvwm.Fvwm2\ configuration\ with\ M4 :cal SetSyn("fvwm2m4")<CR> an 50.40.260 &Syntax.FG.GDB\ command\ file :cal SetSyn("gdb")<CR> an 50.40.270 &Syntax.FG.GDMO :cal SetSyn("gdmo")<CR> an 50.40.280 &Syntax.FG.Gedcom :cal SetSyn("gedcom")<CR> an 50.40.290 &Syntax.FG.Git.Output :cal SetSyn("git")<CR> an 50.40.300 &Syntax.FG.Git.Commit :cal SetSyn("gitcommit")<CR> an 50.40.310 &Syntax.FG.Git.Config :cal SetSyn("gitconfig")<CR> an 50.40.320 &Syntax.FG.Git.Rebase :cal SetSyn("gitrebase")<CR> an 50.40.330 &Syntax.FG.Git.Send\ Email :cal SetSyn("gitsendemail")<CR> an 50.40.340 &Syntax.FG.Gitolite :cal SetSyn("gitolite")<CR> an 50.40.350 &Syntax.FG.Gkrellmrc :cal SetSyn("gkrellmrc")<CR> an 50.40.360 &Syntax.FG.Gnash :cal SetSyn("gnash")<CR> an 50.40.370 &Syntax.FG.GP :cal SetSyn("gp")<CR> an 50.40.380 &Syntax.FG.GPG :cal SetSyn("gpg")<CR> an 50.40.390 &Syntax.FG.Grof :cal SetSyn("gprof")<CR> an 50.40.400 &Syntax.FG.Group\ file :cal SetSyn("group")<CR> an 50.40.410 &Syntax.FG.Grub :cal SetSyn("grub")<CR> an 50.40.420 &Syntax.FG.GNU\ Server\ Pages :cal SetSyn("gsp")<CR> an 50.40.430 &Syntax.FG.GNUplot :cal SetSyn("gnuplot")<CR> an 50.40.440 &Syntax.FG.GrADS\ scripts :cal SetSyn("grads")<CR> an 50.40.450 &Syntax.FG.Gretl :cal SetSyn("gretl")<CR> an 50.40.460 &Syntax.FG.Groff :cal SetSyn("groff")<CR> an 50.40.470 &Syntax.FG.Groovy :cal SetSyn("groovy")<CR> an 50.40.480 &Syntax.FG.GTKrc :cal SetSyn("gtkrc")<CR> an 50.50.100 &Syntax.HIJK.Haml :cal SetSyn("haml")<CR> an 50.50.110 &Syntax.HIJK.Hamster :cal SetSyn("hamster")<CR> an 50.50.120 &Syntax.HIJK.Haskell.Haskell :cal SetSyn("haskell")<CR> an 50.50.130 &Syntax.HIJK.Haskell.Haskell-c2hs :cal SetSyn("chaskell")<CR> an 50.50.140 &Syntax.HIJK.Haskell.Haskell-literate :cal SetSyn("lhaskell")<CR> an 50.50.150 &Syntax.HIJK.HASTE :cal SetSyn("haste")<CR> an 50.50.160 &Syntax.HIJK.HASTE\ preproc :cal SetSyn("hastepreproc")<CR> an 50.50.170 &Syntax.HIJK.Hercules :cal SetSyn("hercules")<CR> an 50.50.180 &Syntax.HIJK.Hex\ dump.XXD :cal SetSyn("xxd")<CR> an 50.50.190 &Syntax.HIJK.Hex\ dump.Intel\ MCS51 :cal SetSyn("hex")<CR> an 50.50.200 &Syntax.HIJK.Hg\ commit :cal SetSyn("hgcommit")<CR> an 50.50.210 &Syntax.HIJK.HTML.HTML :cal SetSyn("html")<CR> an 50.50.220 &Syntax.HIJK.HTML.HTML\ with\ M4 :cal SetSyn("htmlm4")<CR> an 50.50.230 &Syntax.HIJK.HTML.HTML\ with\ Ruby\ (eRuby) :cal SetSyn("eruby")<CR> an 50.50.240 &Syntax.HIJK.HTML.Cheetah\ HTML\ template :cal SetSyn("htmlcheetah")<CR> an 50.50.250 &Syntax.HIJK.HTML.Django\ HTML\ template :cal SetSyn("htmldjango")<CR> an 50.50.260 &Syntax.HIJK.HTML.HTML/OS :cal SetSyn("htmlos")<CR> an 50.50.270 &Syntax.HIJK.HTML.XHTML :cal SetSyn("xhtml")<CR> an 50.50.280 &Syntax.HIJK.Host\.conf :cal SetSyn("hostconf")<CR> an 50.50.290 &Syntax.HIJK.Hosts\ access :cal SetSyn("hostsaccess")<CR> an 50.50.300 &Syntax.HIJK.Hyper\ Builder :cal SetSyn("hb")<CR> an 50.50.320 &Syntax.HIJK.Icewm\ menu :cal SetSyn("icemenu")<CR> an 50.50.330 &Syntax.HIJK.Icon :cal SetSyn("icon")<CR> an 50.50.340 &Syntax.HIJK.IDL\Generic\ IDL :cal SetSyn("idl")<CR> an 50.50.350 &Syntax.HIJK.IDL\Microsoft\ IDL :cal SetSyn("msidl")<CR> an 50.50.360 &Syntax.HIJK.Indent\ profile :cal SetSyn("indent")<CR> an 50.50.370 &Syntax.HIJK.Inform :cal SetSyn("inform")<CR> an 50.50.380 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl")<CR> an 50.50.390 &Syntax.HIJK.Initng :cal SetSyn("initng")<CR> an 50.50.400 &Syntax.HIJK.Inittab :cal SetSyn("inittab")<CR> an 50.50.410 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss")<CR> an 50.50.420 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ dat :cal SetSyn("upstreamdat")<CR> an 50.50.430 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ log :cal SetSyn("upstreamlog")<CR> an 50.50.440 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ Install\ log :cal SetSyn("upstreaminstalllog")<CR> an 50.50.450 &Syntax.HIJK.Innovation\ Data\ Processing.Usserver\ log :cal SetSyn("usserverlog")<CR> an 50.50.460 &Syntax.HIJK.Innovation\ Data\ Processing.USW2KAgt\ log :cal SetSyn("usw2kagtlog")<CR> an 50.50.470 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd")<CR> an 50.50.480 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang")<CR> an 50.50.490 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter")<CR> an 50.50.510 &Syntax.HIJK.JAL :cal SetSyn("jal")<CR> an 50.50.520 &Syntax.HIJK.JAM :cal SetSyn("jam")<CR> an 50.50.530 &Syntax.HIJK.Jargon :cal SetSyn("jargon")<CR> an 50.50.540 &Syntax.HIJK.Java.Java :cal SetSyn("java")<CR> an 50.50.550 &Syntax.HIJK.Java.JavaCC :cal SetSyn("javacc")<CR> an 50.50.560 &Syntax.HIJK.Java.Java\ Server\ Pages :cal SetSyn("jsp")<CR> an 50.50.570 &Syntax.HIJK.Java.Java\ Properties :cal SetSyn("jproperties")<CR> an 50.50.580 &Syntax.HIJK.JavaScript :cal SetSyn("javascript")<CR> an 50.50.590 &Syntax.HIJK.Jess :cal SetSyn("jess")<CR> an 50.50.600 &Syntax.HIJK.Jgraph :cal SetSyn("jgraph")<CR> an 50.50.610 &Syntax.HIJK.Jovial :cal SetSyn("jovial")<CR> an 50.50.630 &Syntax.HIJK.Kconfig :cal SetSyn("kconfig")<CR> an 50.50.640 &Syntax.HIJK.KDE\ script :cal SetSyn("kscript")<CR> an 50.50.650 &Syntax.HIJK.Kimwitu++ :cal SetSyn("kwt")<CR> an 50.50.660 &Syntax.HIJK.KixTart :cal SetSyn("kix")<CR> an 50.60.100 &Syntax.L.Lace :cal SetSyn("lace")<CR> an 50.60.110 &Syntax.L.LamdaProlog :cal SetSyn("lprolog")<CR> an 50.60.120 &Syntax.L.Latte :cal SetSyn("latte")<CR> an 50.60.130 &Syntax.L.Ld\ script :cal SetSyn("ld")<CR> an 50.60.140 &Syntax.L.LDAP.LDIF :cal SetSyn("ldif")<CR> an 50.60.150 &Syntax.L.LDAP.Configuration :cal SetSyn("ldapconf")<CR> an 50.60.160 &Syntax.L.Lex :cal SetSyn("lex")<CR> an 50.60.170 &Syntax.L.LFTP\ config :cal SetSyn("lftp")<CR> an 50.60.180 &Syntax.L.Libao :cal SetSyn("libao")<CR> an 50.60.190 &Syntax.L.LifeLines\ script :cal SetSyn("lifelines")<CR> an 50.60.200 &Syntax.L.Lilo :cal SetSyn("lilo")<CR> an 50.60.210 &Syntax.L.Limits\ config :cal SetSyn("limits")<CR> an 50.60.220 &Syntax.L.Linden\ scripting :cal SetSyn("lsl")<CR> an 50.60.230 &Syntax.L.Liquid :cal SetSyn("liquid")<CR> an 50.60.240 &Syntax.L.Lisp :cal SetSyn("lisp")<CR> an 50.60.250 &Syntax.L.Lite :cal SetSyn("lite")<CR> an 50.60.260 &Syntax.L.LiteStep\ RC :cal SetSyn("litestep")<CR> an 50.60.270 &Syntax.L.Locale\ Input :cal SetSyn("fdcc")<CR> an 50.60.280 &Syntax.L.Login\.access :cal SetSyn("loginaccess")<CR> an 50.60.290 &Syntax.L.Login\.defs :cal SetSyn("logindefs")<CR> an 50.60.300 &Syntax.L.Logtalk :cal SetSyn("logtalk")<CR> an 50.60.310 &Syntax.L.LOTOS :cal SetSyn("lotos")<CR> an 50.60.320 &Syntax.L.LotusScript :cal SetSyn("lscript")<CR> an 50.60.330 &Syntax.L.Lout :cal SetSyn("lout")<CR> an 50.60.340 &Syntax.L.LPC :cal SetSyn("lpc")<CR> an 50.60.350 &Syntax.L.Lua :cal SetSyn("lua")<CR> an 50.60.360 &Syntax.L.Lynx\ Style :cal SetSyn("lss")<CR> an 50.60.370 &Syntax.L.Lynx\ config :cal SetSyn("lynx")<CR> an 50.70.100 &Syntax.M.M4 :cal SetSyn("m4")<CR> an 50.70.110 &Syntax.M.MaGic\ Point :cal SetSyn("mgp")<CR> an 50.70.120 &Syntax.M.Mail :cal SetSyn("mail")<CR> an 50.70.130 &Syntax.M.Mail\ aliases :cal SetSyn("mailaliases")<CR> an 50.70.140 &Syntax.M.Mailcap :cal SetSyn("mailcap")<CR> an 50.70.150 &Syntax.M.Mallard :cal SetSyn("mallard")<CR> an 50.70.160 &Syntax.M.Makefile :cal SetSyn("make")<CR> an 50.70.170 &Syntax.M.MakeIndex :cal SetSyn("ist")<CR> an 50.70.180 &Syntax.M.Man\ page :cal SetSyn("man")<CR> an 50.70.190 &Syntax.M.Man\.conf :cal SetSyn("manconf")<CR> an 50.70.200 &Syntax.M.Maple\ V :cal SetSyn("maple")<CR> an 50.70.210 &Syntax.M.Markdown :cal SetSyn("markdown")<CR> an 50.70.220 &Syntax.M.Mason :cal SetSyn("mason")<CR> an 50.70.230 &Syntax.M.Mathematica :cal SetSyn("mma")<CR> an 50.70.240 &Syntax.M.Matlab :cal SetSyn("matlab")<CR> an 50.70.250 &Syntax.M.Maxima :cal SetSyn("maxima")<CR> an 50.70.260 &Syntax.M.MEL\ (for\ Maya) :cal SetSyn("mel")<CR> an 50.70.270 &Syntax.M.Messages\ (/var/log) :cal SetSyn("messages")<CR> an 50.70.280 &Syntax.M.Metafont :cal SetSyn("mf")<CR> an 50.70.290 &Syntax.M.MetaPost :cal SetSyn("mp")<CR> an 50.70.300 &Syntax.M.MGL :cal SetSyn("mgl")<CR> an 50.70.310 &Syntax.M.MMIX :cal SetSyn("mmix")<CR> an 50.70.320 &Syntax.M.Modconf :cal SetSyn("modconf")<CR> an 50.70.330 &Syntax.M.Model :cal SetSyn("model")<CR> an 50.70.340 &Syntax.M.Modsim\ III :cal SetSyn("modsim3")<CR> an 50.70.350 &Syntax.M.Modula\ 2 :cal SetSyn("modula2")<CR> an 50.70.360 &Syntax.M.Modula\ 3 :cal SetSyn("modula3")<CR> an 50.70.370 &Syntax.M.Monk :cal SetSyn("monk")<CR> an 50.70.380 &Syntax.M.Mplayer\ config :cal SetSyn("mplayerconf")<CR> an 50.70.390 &Syntax.M.MOO :cal SetSyn("moo")<CR> an 50.70.400 &Syntax.M.Mrxvtrc :cal SetSyn("mrxvtrc")<CR> an 50.70.410 &Syntax.M.MS-DOS/Windows.4DOS\ \.bat\ file :cal SetSyn("btm")<CR> an 50.70.420 &Syntax.M.MS-DOS/Windows.\.bat\/\.cmd\ file :cal SetSyn("dosbatch")<CR> an 50.70.430 &Syntax.M.MS-DOS/Windows.\.ini\ file :cal SetSyn("dosini")<CR> an 50.70.440 &Syntax.M.MS-DOS/Windows.Message\ text :cal SetSyn("msmessages")<CR> an 50.70.450 &Syntax.M.MS-DOS/Windows.Module\ Definition :cal SetSyn("def")<CR> an 50.70.460 &Syntax.M.MS-DOS/Windows.Registry :cal SetSyn("registry")<CR> an 50.70.470 &Syntax.M.MS-DOS/Windows.Resource\ file :cal SetSyn("rc")<CR> an 50.70.480 &Syntax.M.Msql :cal SetSyn("msql")<CR> an 50.70.490 &Syntax.M.MuPAD :cal SetSyn("mupad")<CR> an 50.70.500 &Syntax.M.MUSHcode :cal SetSyn("mush")<CR> an 50.70.510 &Syntax.M.Muttrc :cal SetSyn("muttrc")<CR> an 50.80.100 &Syntax.NO.Nanorc :cal SetSyn("nanorc")<CR> an 50.80.110 &Syntax.NO.Nastran\ input/DMAP :cal SetSyn("nastran")<CR> an 50.80.120 &Syntax.NO.Natural :cal SetSyn("natural")<CR> an 50.80.130 &Syntax.NO.Neomuttrc :cal SetSyn("neomuttrc")<CR> an 50.80.140 &Syntax.NO.Netrc :cal SetSyn("netrc")<CR> an 50.80.150 &Syntax.NO.Ninja :cal SetSyn("ninja")<CR> an 50.80.160 &Syntax.NO.Novell\ NCF\ batch :cal SetSyn("ncf")<CR> an 50.80.170 &Syntax.NO.Not\ Quite\ C\ (LEGO) :cal SetSyn("nqc")<CR> an 50.80.180 &Syntax.NO.Nroff :cal SetSyn("nroff")<CR> an 50.80.190 &Syntax.NO.NSIS\ script :cal SetSyn("nsis")<CR> an 50.80.200 &Syntax.NO.Obj\ 3D\ wavefront :cal SetSyn("obj")<CR> an 50.80.210 &Syntax.NO.Objective\ C :cal SetSyn("objc")<CR> an 50.80.220 &Syntax.NO.Objective\ C++ :cal SetSyn("objcpp")<CR> an 50.80.230 &Syntax.NO.OCAML :cal SetSyn("ocaml")<CR> an 50.80.240 &Syntax.NO.Occam :cal SetSyn("occam")<CR> an 50.80.250 &Syntax.NO.Omnimark :cal SetSyn("omnimark")<CR> an 50.80.260 &Syntax.NO.OpenROAD :cal SetSyn("openroad")<CR> an 50.80.270 &Syntax.NO.Open\ Psion\ Lang :cal SetSyn("opl")<CR> an 50.80.280 &Syntax.NO.Oracle\ config :cal SetSyn("ora")<CR> an 50.90.100 &Syntax.PQ.Packet\ filter\ conf :cal SetSyn("pf")<CR> an 50.90.110 &Syntax.PQ.Palm\ resource\ compiler :cal SetSyn("pilrc")<CR> an 50.90.120 &Syntax.PQ.Pam\ config :cal SetSyn("pamconf")<CR> an 50.90.130 &Syntax.PQ.PApp :cal SetSyn("papp")<CR> an 50.90.140 &Syntax.PQ.Pascal :cal SetSyn("pascal")<CR> an 50.90.150 &Syntax.PQ.Password\ file :cal SetSyn("passwd")<CR> an 50.90.160 &Syntax.PQ.PCCTS :cal SetSyn("pccts")<CR> an 50.90.170 &Syntax.PQ.PDF :cal SetSyn("pdf")<CR> an 50.90.180 &Syntax.PQ.Perl.Perl :cal SetSyn("perl")<CR> an 50.90.190 &Syntax.PQ.Perl.Perl\ 6 :cal SetSyn("perl6")<CR> an 50.90.200 &Syntax.PQ.Perl.Perl\ POD :cal SetSyn("pod")<CR> an 50.90.210 &Syntax.PQ.Perl.Perl\ XS :cal SetSyn("xs")<CR> an 50.90.220 &Syntax.PQ.Perl.Template\ toolkit :cal SetSyn("tt2")<CR> an 50.90.230 &Syntax.PQ.Perl.Template\ toolkit\ Html :cal SetSyn("tt2html")<CR> an 50.90.240 &Syntax.PQ.Perl.Template\ toolkit\ JS :cal SetSyn("tt2js")<CR> an 50.90.250 &Syntax.PQ.PHP.PHP\ 3-4 :cal SetSyn("php")<CR> an 50.90.260 &Syntax.PQ.PHP.Phtml\ (PHP\ 2) :cal SetSyn("phtml")<CR> an 50.90.270 &Syntax.PQ.Pike :cal SetSyn("pike")<CR> an 50.90.280 &Syntax.PQ.Pine\ RC :cal SetSyn("pine")<CR> an 50.90.290 &Syntax.PQ.Pinfo\ RC :cal SetSyn("pinfo")<CR> an 50.90.300 &Syntax.PQ.PL/M :cal SetSyn("plm")<CR> an 50.90.310 &Syntax.PQ.PL/SQL :cal SetSyn("plsql")<CR> an 50.90.320 &Syntax.PQ.Pli :cal SetSyn("pli")<CR> an 50.90.330 &Syntax.PQ.PLP :cal SetSyn("plp")<CR> an 50.90.340 &Syntax.PQ.PO\ (GNU\ gettext) :cal SetSyn("po")<CR> an 50.90.350 &Syntax.PQ.Postfix\ main\ config :cal SetSyn("pfmain")<CR> an 50.90.360 &Syntax.PQ.PostScript.PostScript :cal SetSyn("postscr")<CR> an 50.90.370 &Syntax.PQ.PostScript.PostScript\ Printer\ Description :cal SetSyn("ppd")<CR> an 50.90.380 &Syntax.PQ.Povray.Povray\ scene\ descr :cal SetSyn("pov")<CR> an 50.90.390 &Syntax.PQ.Povray.Povray\ configuration :cal SetSyn("povini")<CR> an 50.90.400 &Syntax.PQ.PPWizard :cal SetSyn("ppwiz")<CR> an 50.90.410 &Syntax.PQ.Prescribe\ (Kyocera) :cal SetSyn("prescribe")<CR> an 50.90.420 &Syntax.PQ.Printcap :cal SetSyn("pcap")<CR> an 50.90.430 &Syntax.PQ.Privoxy :cal SetSyn("privoxy")<CR> an 50.90.440 &Syntax.PQ.Procmail :cal SetSyn("procmail")<CR> an 50.90.450 &Syntax.PQ.Product\ Spec\ File :cal SetSyn("psf")<CR> an 50.90.460 &Syntax.PQ.Progress :cal SetSyn("progress")<CR> an 50.90.470 &Syntax.PQ.Prolog :cal SetSyn("prolog")<CR> an 50.90.480 &Syntax.PQ.ProMeLa :cal SetSyn("promela")<CR> an 50.90.490 &Syntax.PQ.Proto :cal SetSyn("proto")<CR> an 50.90.500 &Syntax.PQ.Protocols :cal SetSyn("protocols")<CR> an 50.90.510 &Syntax.PQ.Purify\ log :cal SetSyn("purifylog")<CR> an 50.90.520 &Syntax.PQ.Pyrex :cal SetSyn("pyrex")<CR> an 50.90.530 &Syntax.PQ.Python :cal SetSyn("python")<CR> an 50.90.550 &Syntax.PQ.Quake :cal SetSyn("quake")<CR> an 50.90.560 &Syntax.PQ.Quickfix\ window :cal SetSyn("qf")<CR> an 50.100.100 &Syntax.R.R.R :cal SetSyn("r")<CR> an 50.100.110 &Syntax.R.R.R\ help :cal SetSyn("rhelp")<CR> an 50.100.120 &Syntax.R.R.R\ noweb :cal SetSyn("rnoweb")<CR> an 50.100.130 &Syntax.R.Racc\ input :cal SetSyn("racc")<CR> an 50.100.140 &Syntax.R.Radiance :cal SetSyn("radiance")<CR> an 50.100.150 &Syntax.R.Ratpoison :cal SetSyn("ratpoison")<CR> an 50.100.160 &Syntax.R.RCS.RCS\ log\ output :cal SetSyn("rcslog")<CR> an 50.100.170 &Syntax.R.RCS.RCS\ file :cal SetSyn("rcs")<CR> an 50.100.180 &Syntax.R.Readline\ config :cal SetSyn("readline")<CR> an 50.100.190 &Syntax.R.Rebol :cal SetSyn("rebol")<CR> an 50.100.200 &Syntax.R.ReDIF :cal SetSyn("redif")<CR> an 50.100.210 &Syntax.R.Relax\ NG :cal SetSyn("rng")<CR> an 50.100.220 &Syntax.R.Remind :cal SetSyn("remind")<CR> an 50.100.230 &Syntax.R.Relax\ NG\ compact :cal SetSyn("rnc")<CR> an 50.100.240 &Syntax.R.Renderman.Renderman\ Shader\ Lang :cal SetSyn("sl")<CR> an 50.100.250 &Syntax.R.Renderman.Renderman\ Interface\ Bytestream :cal SetSyn("rib")<CR> an 50.100.260 &Syntax.R.Resolv\.conf :cal SetSyn("resolv")<CR> an 50.100.270 &Syntax.R.Reva\ Forth :cal SetSyn("reva")<CR> an 50.100.280 &Syntax.R.Rexx :cal SetSyn("rexx")<CR> an 50.100.290 &Syntax.R.Robots\.txt :cal SetSyn("robots")<CR> an 50.100.300 &Syntax.R.RockLinux\ package\ desc\. :cal SetSyn("desc")<CR> an 50.100.310 &Syntax.R.Rpcgen :cal SetSyn("rpcgen")<CR> an 50.100.320 &Syntax.R.RPL/2 :cal SetSyn("rpl")<CR> an 50.100.330 &Syntax.R.ReStructuredText :cal SetSyn("rst")<CR> an 50.100.340 &Syntax.R.RTF :cal SetSyn("rtf")<CR> an 50.100.350 &Syntax.R.Ruby :cal SetSyn("ruby")<CR> an 50.110.100 &Syntax.S-Sm.S-Lang :cal SetSyn("slang")<CR> an 50.110.110 &Syntax.S-Sm.Samba\ config :cal SetSyn("samba")<CR> an 50.110.120 &Syntax.S-Sm.SAS :cal SetSyn("sas")<CR> an 50.110.130 &Syntax.S-Sm.Sass :cal SetSyn("sass")<CR> an 50.110.140 &Syntax.S-Sm.Sather :cal SetSyn("sather")<CR> an 50.110.150 &Syntax.S-Sm.Scheme :cal SetSyn("scheme")<CR> an 50.110.160 &Syntax.S-Sm.Scilab :cal SetSyn("scilab")<CR> an 50.110.170 &Syntax.S-Sm.Screen\ RC :cal SetSyn("screen")<CR> an 50.110.180 &Syntax.S-Sm.SCSS :cal SetSyn("scss")<CR> an 50.110.190 &Syntax.S-Sm.SDC\ Synopsys\ Design\ Constraints :cal SetSyn("sdc")<CR> an 50.110.200 &Syntax.S-Sm.SDL :cal SetSyn("sdl")<CR> an 50.110.210 &Syntax.S-Sm.Sed :cal SetSyn("sed")<CR> an 50.110.220 &Syntax.S-Sm.Sendmail\.cf :cal SetSyn("sm")<CR> an 50.110.230 &Syntax.S-Sm.Send-pr :cal SetSyn("sendpr")<CR> an 50.110.240 &Syntax.S-Sm.Sensors\.conf :cal SetSyn("sensors")<CR> an 50.110.250 &Syntax.S-Sm.Service\ Location\ config :cal SetSyn("slpconf")<CR> an 50.110.260 &Syntax.S-Sm.Service\ Location\ registration :cal SetSyn("slpreg")<CR> an 50.110.270 &Syntax.S-Sm.Service\ Location\ SPI :cal SetSyn("slpspi")<CR> an 50.110.280 &Syntax.S-Sm.Services :cal SetSyn("services")<CR> an 50.110.290 &Syntax.S-Sm.Setserial\ config :cal SetSyn("setserial")<CR> an 50.110.300 &Syntax.S-Sm.SGML.SGML\ catalog :cal SetSyn("catalog")<CR> an 50.110.310 &Syntax.S-Sm.SGML.SGML\ DTD :cal SetSyn("sgml")<CR> an 50.110.320 &Syntax.S-Sm.SGML.SGML\ Declaration :cal SetSyn("sgmldecl")<CR> an 50.110.330 &Syntax.S-Sm.SGML.SGML-linuxdoc :cal SetSyn("sgmllnx")<CR> an 50.110.340 &Syntax.S-Sm.Shell\ script.sh\ and\ ksh :cal SetSyn("sh")<CR> an 50.110.350 &Syntax.S-Sm.Shell\ script.csh :cal SetSyn("csh")<CR> an 50.110.360 &Syntax.S-Sm.Shell\ script.tcsh :cal SetSyn("tcsh")<CR> an 50.110.370 &Syntax.S-Sm.Shell\ script.zsh :cal SetSyn("zsh")<CR> an 50.110.380 &Syntax.S-Sm.SiCAD :cal SetSyn("sicad")<CR> an 50.110.390 &Syntax.S-Sm.Sieve :cal SetSyn("sieve")<CR> an 50.110.400 &Syntax.S-Sm.Simula :cal SetSyn("simula")<CR> an 50.110.410 &Syntax.S-Sm.Sinda.Sinda\ compare :cal SetSyn("sindacmp")<CR> an 50.110.420 &Syntax.S-Sm.Sinda.Sinda\ input :cal SetSyn("sinda")<CR> an 50.110.430 &Syntax.S-Sm.Sinda.Sinda\ output :cal SetSyn("sindaout")<CR> an 50.110.440 &Syntax.S-Sm.SiSU :cal SetSyn("sisu")<CR> an 50.110.450 &Syntax.S-Sm.SKILL.SKILL :cal SetSyn("skill")<CR> an 50.110.460 &Syntax.S-Sm.SKILL.SKILL\ for\ Diva :cal SetSyn("diva")<CR> an 50.110.470 &Syntax.S-Sm.Slice :cal SetSyn("slice")<CR> an 50.110.480 &Syntax.S-Sm.SLRN.Slrn\ rc :cal SetSyn("slrnrc")<CR> an 50.110.490 &Syntax.S-Sm.SLRN.Slrn\ score :cal SetSyn("slrnsc")<CR> an 50.110.500 &Syntax.S-Sm.SmallTalk :cal SetSyn("st")<CR> an 50.110.510 &Syntax.S-Sm.Smarty\ Templates :cal SetSyn("smarty")<CR> an 50.110.520 &Syntax.S-Sm.SMIL :cal SetSyn("smil")<CR> an 50.110.530 &Syntax.S-Sm.SMITH :cal SetSyn("smith")<CR> an 50.120.100 &Syntax.Sn-Sy.SNMP\ MIB :cal SetSyn("mib")<CR> an 50.120.110 &Syntax.Sn-Sy.SNNS.SNNS\ network :cal SetSyn("snnsnet")<CR> an 50.120.120 &Syntax.Sn-Sy.SNNS.SNNS\ pattern :cal SetSyn("snnspat")<CR> an 50.120.130 &Syntax.Sn-Sy.SNNS.SNNS\ result :cal SetSyn("snnsres")<CR> an 50.120.140 &Syntax.Sn-Sy.Snobol4 :cal SetSyn("snobol4")<CR> an 50.120.150 &Syntax.Sn-Sy.Snort\ Configuration :cal SetSyn("hog")<CR> an 50.120.160 &Syntax.Sn-Sy.SPEC\ (Linux\ RPM) :cal SetSyn("spec")<CR> an 50.120.170 &Syntax.Sn-Sy.Specman :cal SetSyn("specman")<CR> an 50.120.180 &Syntax.Sn-Sy.Spice :cal SetSyn("spice")<CR> an 50.120.190 &Syntax.Sn-Sy.Spyce :cal SetSyn("spyce")<CR> an 50.120.200 &Syntax.Sn-Sy.Speedup :cal SetSyn("spup")<CR> an 50.120.210 &Syntax.Sn-Sy.Splint :cal SetSyn("splint")<CR> an 50.120.220 &Syntax.Sn-Sy.Squid\ config :cal SetSyn("squid")<CR> an 50.120.230 &Syntax.Sn-Sy.SQL.SAP\ HANA :cal SetSyn("sqlhana")<CR> an 50.120.240 &Syntax.Sn-Sy.SQL.ESQL-C :cal SetSyn("esqlc")<CR> an 50.120.250 &Syntax.Sn-Sy.SQL.MySQL :cal SetSyn("mysql")<CR> an 50.120.260 &Syntax.Sn-Sy.SQL.PL/SQL :cal SetSyn("plsql")<CR> an 50.120.270 &Syntax.Sn-Sy.SQL.SQL\ Anywhere :cal SetSyn("sqlanywhere")<CR> an 50.120.280 &Syntax.Sn-Sy.SQL.SQL\ (automatic) :cal SetSyn("sql")<CR> an 50.120.290 &Syntax.Sn-Sy.SQL.SQL\ (Oracle) :cal SetSyn("sqloracle")<CR> an 50.120.300 &Syntax.Sn-Sy.SQL.SQL\ Forms :cal SetSyn("sqlforms")<CR> an 50.120.310 &Syntax.Sn-Sy.SQL.SQLJ :cal SetSyn("sqlj")<CR> an 50.120.320 &Syntax.Sn-Sy.SQL.SQL-Informix :cal SetSyn("sqlinformix")<CR> an 50.120.330 &Syntax.Sn-Sy.SQR :cal SetSyn("sqr")<CR> an 50.120.340 &Syntax.Sn-Sy.Ssh.ssh_config :cal SetSyn("sshconfig")<CR> an 50.120.350 &Syntax.Sn-Sy.Ssh.sshd_config :cal SetSyn("sshdconfig")<CR> an 50.120.360 &Syntax.Sn-Sy.Standard\ ML :cal SetSyn("sml")<CR> an 50.120.370 &Syntax.Sn-Sy.Stata.SMCL :cal SetSyn("smcl")<CR> an 50.120.380 &Syntax.Sn-Sy.Stata.Stata :cal SetSyn("stata")<CR> an 50.120.390 &Syntax.Sn-Sy.Stored\ Procedures :cal SetSyn("stp")<CR> an 50.120.400 &Syntax.Sn-Sy.Strace :cal SetSyn("strace")<CR> an 50.120.410 &Syntax.Sn-Sy.Streaming\ descriptor\ file :cal SetSyn("sd")<CR> an 50.120.420 &Syntax.Sn-Sy.Subversion\ commit :cal SetSyn("svn")<CR> an 50.120.430 &Syntax.Sn-Sy.Sudoers :cal SetSyn("sudoers")<CR> an 50.120.440 &Syntax.Sn-Sy.SVG :cal SetSyn("svg")<CR> an 50.120.450 &Syntax.Sn-Sy.Symbian\ meta-makefile :cal SetSyn("mmp")<CR> an 50.120.460 &Syntax.Sn-Sy.Sysctl\.conf :cal SetSyn("sysctl")<CR> an 50.130.100 &Syntax.T.TADS :cal SetSyn("tads")<CR> an 50.130.110 &Syntax.T.Tags :cal SetSyn("tags")<CR> an 50.130.120 &Syntax.T.TAK.TAK\ compare :cal SetSyn("takcmp")<CR> an 50.130.130 &Syntax.T.TAK.TAK\ input :cal SetSyn("tak")<CR> an 50.130.140 &Syntax.T.TAK.TAK\ output :cal SetSyn("takout")<CR> an 50.130.150 &Syntax.T.Tar\ listing :cal SetSyn("tar")<CR> an 50.130.160 &Syntax.T.Task\ data :cal SetSyn("taskdata")<CR> an 50.130.170 &Syntax.T.Task\ 42\ edit :cal SetSyn("taskedit")<CR> an 50.130.180 &Syntax.T.Tcl/Tk :cal SetSyn("tcl")<CR> an 50.130.190 &Syntax.T.TealInfo :cal SetSyn("tli")<CR> an 50.130.200 &Syntax.T.Telix\ Salt :cal SetSyn("tsalt")<CR> an 50.130.210 &Syntax.T.Termcap/Printcap :cal SetSyn("ptcap")<CR> an 50.130.220 &Syntax.T.Terminfo :cal SetSyn("terminfo")<CR> an 50.130.230 &Syntax.T.TeX.TeX/LaTeX :cal SetSyn("tex")<CR> an 50.130.240 &Syntax.T.TeX.plain\ TeX :cal SetSyn("plaintex")<CR> an 50.130.250 &Syntax.T.TeX.Initex :cal SetSyn("initex")<CR> an 50.130.260 &Syntax.T.TeX.ConTeXt :cal SetSyn("context")<CR> an 50.130.270 &Syntax.T.TeX.TeX\ configuration :cal SetSyn("texmf")<CR> an 50.130.280 &Syntax.T.TeX.Texinfo :cal SetSyn("texinfo")<CR> an 50.130.290 &Syntax.T.TF\ mud\ client :cal SetSyn("tf")<CR> an 50.130.300 &Syntax.T.Tidy\ configuration :cal SetSyn("tidy")<CR> an 50.130.310 &Syntax.T.Tilde :cal SetSyn("tilde")<CR> an 50.130.320 &Syntax.T.TPP :cal SetSyn("tpp")<CR> an 50.130.330 &Syntax.T.Trasys\ input :cal SetSyn("trasys")<CR> an 50.130.340 &Syntax.T.Treetop :cal SetSyn("treetop")<CR> an 50.130.350 &Syntax.T.Trustees :cal SetSyn("trustees")<CR> an 50.130.360 &Syntax.T.TSS.Command\ Line :cal SetSyn("tsscl")<CR> an 50.130.370 &Syntax.T.TSS.Geometry :cal SetSyn("tssgm")<CR> an 50.130.380 &Syntax.T.TSS.Optics :cal SetSyn("tssop")<CR> an 50.140.100 &Syntax.UV.Udev\ config :cal SetSyn("udevconf")<CR> an 50.140.110 &Syntax.UV.Udev\ permissions :cal SetSyn("udevperm")<CR> an 50.140.120 &Syntax.UV.Udev\ rules :cal SetSyn("udevrules")<CR> an 50.140.130 &Syntax.UV.UIT/UIL :cal SetSyn("uil")<CR> an 50.140.140 &Syntax.UV.UnrealScript :cal SetSyn("uc")<CR> an 50.140.150 &Syntax.UV.Updatedb\.conf :cal SetSyn("updatedb")<CR> an 50.140.160 &Syntax.UV.Upstart :cal SetSyn("upstart")<CR> an 50.140.180 &Syntax.UV.Valgrind :cal SetSyn("valgrind")<CR> an 50.140.190 &Syntax.UV.Vera :cal SetSyn("vera")<CR> an 50.140.200 &Syntax.UV.Verilog-AMS\ HDL :cal SetSyn("verilogams")<CR> an 50.140.210 &Syntax.UV.Verilog\ HDL :cal SetSyn("verilog")<CR> an 50.140.220 &Syntax.UV.Vgrindefs :cal SetSyn("vgrindefs")<CR> an 50.140.230 &Syntax.UV.VHDL :cal SetSyn("vhdl")<CR> an 50.140.240 &Syntax.UV.Vim.Vim\ help\ file :cal SetSyn("help")<CR> an 50.140.250 &Syntax.UV.Vim.Vim\ script :cal SetSyn("vim")<CR> an 50.140.260 &Syntax.UV.Vim.Viminfo\ file :cal SetSyn("viminfo")<CR> an 50.140.270 &Syntax.UV.Virata\ config :cal SetSyn("virata")<CR> an 50.140.280 &Syntax.UV.Visual\ Basic :cal SetSyn("vb")<CR> an 50.140.290 &Syntax.UV.VOS\ CM\ macro :cal SetSyn("voscm")<CR> an 50.140.300 &Syntax.UV.VRML :cal SetSyn("vrml")<CR> an 50.140.310 &Syntax.UV.VSE\ JCL :cal SetSyn("vsejcl")<CR> an 50.150.100 &Syntax.WXYZ.WEB.CWEB :cal SetSyn("cweb")<CR> an 50.150.110 &Syntax.WXYZ.WEB.WEB :cal SetSyn("web")<CR> an 50.150.120 &Syntax.WXYZ.WEB.WEB\ Changes :cal SetSyn("change")<CR> an 50.150.130 &Syntax.WXYZ.Webmacro :cal SetSyn("webmacro")<CR> an 50.150.140 &Syntax.WXYZ.Website\ MetaLanguage :cal SetSyn("wml")<CR> an 50.150.160 &Syntax.WXYZ.wDiff :cal SetSyn("wdiff")<CR> an 50.150.180 &Syntax.WXYZ.Wget\ config :cal SetSyn("wget")<CR> an 50.150.190 &Syntax.WXYZ.Whitespace\ (add) :cal SetSyn("whitespace")<CR> an 50.150.200 &Syntax.WXYZ.WildPackets\ EtherPeek\ Decoder :cal SetSyn("dcd")<CR> an 50.150.210 &Syntax.WXYZ.WinBatch/Webbatch :cal SetSyn("winbatch")<CR> an 50.150.220 &Syntax.WXYZ.Windows\ Scripting\ Host :cal SetSyn("wsh")<CR> an 50.150.230 &Syntax.WXYZ.WSML :cal SetSyn("wsml")<CR> an 50.150.240 &Syntax.WXYZ.WvDial :cal SetSyn("wvdial")<CR> an 50.150.260 &Syntax.WXYZ.X\ Keyboard\ Extension :cal SetSyn("xkb")<CR> an 50.150.270 &Syntax.WXYZ.X\ Pixmap :cal SetSyn("xpm")<CR> an 50.150.280 &Syntax.WXYZ.X\ Pixmap\ (2) :cal SetSyn("xpm2")<CR> an 50.150.290 &Syntax.WXYZ.X\ resources :cal SetSyn("xdefaults")<CR> an 50.150.300 &Syntax.WXYZ.XBL :cal SetSyn("xbl")<CR> an 50.150.310 &Syntax.WXYZ.Xinetd\.conf :cal SetSyn("xinetd")<CR> an 50.150.320 &Syntax.WXYZ.Xmodmap :cal SetSyn("xmodmap")<CR> an 50.150.330 &Syntax.WXYZ.Xmath :cal SetSyn("xmath")<CR> an 50.150.340 &Syntax.WXYZ.XML :cal SetSyn("xml")<CR> an 50.150.350 &Syntax.WXYZ.XML\ Schema\ (XSD) :cal SetSyn("xsd")<CR> an 50.150.360 &Syntax.WXYZ.XQuery :cal SetSyn("xquery")<CR> an 50.150.370 &Syntax.WXYZ.Xslt :cal SetSyn("xslt")<CR> an 50.150.380 &Syntax.WXYZ.XFree86\ Config :cal SetSyn("xf86conf")<CR> an 50.150.400 &Syntax.WXYZ.YAML :cal SetSyn("yaml")<CR> an 50.150.410 &Syntax.WXYZ.Yacc :cal SetSyn("yacc")<CR> an 50.150.430 &Syntax.WXYZ.Zimbu :cal SetSyn("zimbu")<CR> " The End Of The Syntax Menu an 50.195 &Syntax.-SEP1- <Nop> an <silent> 50.200 &Syntax.Set\ '&syntax'\ Only :call <SID>Setsynonly()<CR> fun! s:Setsynonly() let s:syntax_menu_synonly = 1 endfun an <silent> 50.202 &Syntax.Set\ '&filetype'\ Too :call <SID>Nosynonly()<CR> fun! s:Nosynonly() if exists("s:syntax_menu_synonly") unlet s:syntax_menu_synonly endif endfun " Restore 'cpoptions' let &cpo = s:cpo_save unlet s:cpo_save �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/syntax/������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13204015742�0016017�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������neovim-0.2.2/runtime/syntax/2html.vim���������������������������������������������������������������0000664�0000000�0000000�00000207067�13204015742�0017576�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������" Vim syntax support file " Maintainer: Ben Fritz <fritzophrenic@gmail.com> " Last Change: 2015 Sep 08 " " Additional contributors: " " Original by Bram Moolenaar <Bram@vim.org> " Modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> " XHTML support by Panagiotis Issaris <takis@lumumba.luc.ac.be> " Made w3 compliant by Edd Barrett <vext01@gmail.com> " Added html_font. Edd Barrett <vext01@gmail.com> " Progress bar based off code from "progressbar widget" plugin by " Andreas Politz, heavily modified: " http://www.vim.org/scripts/script.php?script_id=2006 " " See Mercurial change logs for more! " Transform a file into HTML, using the current syntax highlighting. " this file uses line continuations let s:cpo_sav = &cpo let s:ls = &ls set cpo&vim let s:end=line('$') " Font if exists("g:html_font") if type(g:html_font) == type([]) let s:htmlfont = "'". join(g:html_font,"','") . "', monospace" else let s:htmlfont = "'". g:html_font . "', monospace" endif else let s:htmlfont = "monospace" endif let s:settings = tohtml#GetUserSettings() if !exists('s:FOLDED_ID') let s:FOLDED_ID = hlID("Folded") | lockvar s:FOLDED_ID let s:FOLD_C_ID = hlID("FoldColumn") | lockvar s:FOLD_C_ID let s:LINENR_ID = hlID('LineNr') | lockvar s:LINENR_ID let s:DIFF_D_ID = hlID("DiffDelete") | lockvar s:DIFF_D_ID let s:DIFF_A_ID = hlID("DiffAdd") | lockvar s:DIFF_A_ID let s:DIFF_C_ID = hlID("DiffChange") | lockvar s:DIFF_C_ID let s:DIFF_T_ID = hlID("DiffText") | lockvar s:DIFF_T_ID let s:CONCEAL_ID = hlID('Conceal') | lockvar s:CONCEAL_ID endif " Whitespace if s:settings.pre_wrap let s:whitespace = "white-space: pre-wrap; " else let s:whitespace = "" endif if !empty(s:settings.prevent_copy) if s:settings.no_invalid " User has decided they don't want invalid markup. Still works in " OpenOffice, and for text editors, but when pasting into Microsoft Word the " input elements get pasted too and they cannot be deleted (at least not " easily). let s:unselInputType = "" else " Prevent from copy-pasting the input elements into Microsoft Word where " they cannot be deleted easily by deliberately inserting invalid markup. let s:unselInputType = " type='invalid_input_type'" endif endif " When not in gui we can only guess the colors. " TODO - is this true anymore? if has("gui_running") let s:whatterm = "gui" else let s:whatterm = "cterm" if &t_Co == 8 let s:cterm_color = { \ 0: "#808080", 1: "#ff6060", 2: "#00ff00", 3: "#ffff00", \ 4: "#8080ff", 5: "#ff40ff", 6: "#00ffff", 7: "#ffffff" \ } else let s:cterm_color = { \ 0: "#000000", 1: "#c00000", 2: "#008000", 3: "#804000", \ 4: "#0000c0", 5: "#c000c0", 6: "#008080", 7: "#c0c0c0", \ 8: "#808080", 9: "#ff6060", 10: "#00ff00", 11: "#ffff00", \ 12: "#8080ff", 13: "#ff40ff", 14: "#00ffff", 15: "#ffffff" \ } " Colors for 88 and 256 come from xterm. if &t_Co == 88 call extend(s:cterm_color, { \ 16: "#000000", 17: "#00008b", 18: "#0000cd", 19: "#0000ff", \ 20: "#008b00", 21: "#008b8b", 22: "#008bcd", 23: "#008bff", \ 24: "#00cd00", 25: "#00cd8b", 26: "#00cdcd", 27: "#00cdff", \ 28: "#00ff00", 29: "#00ff8b", 30: "#00ffcd", 31: "#00ffff", \ 32: "#8b0000", 33: "#8b008b", 34: "#8b00cd", 35: "#8b00ff", \ 36: "#8b8b00", 37: "#8b8b8b", 38: "#8b8bcd", 39: "#8b8bff", \ 40: "#8bcd00", 41: "#8bcd8b", 42: "#8bcdcd", 43: "#8bcdff", \ 44: "#8bff00", 45: "#8bff8b", 46: "#8bffcd", 47: "#8bffff", \ 48: "#cd0000", 49: "#cd008b", 50: "#cd00cd", 51: "#cd00ff", \ 52: "#cd8b00", 53: "#cd8b8b", 54: "#cd8bcd", 55: "#cd8bff", \ 56: "#cdcd00", 57: "#cdcd8b", 58: "#cdcdcd", 59: "#cdcdff", \ 60: "#cdff00", 61: "#cdff8b", 62: "#cdffcd", 63: "#cdffff", \ 64: "#ff0000" \ }) call extend(s:cterm_color, { \ 65: "#ff008b", 66: "#ff00cd", 67: "#ff00ff", 68: "#ff8b00", \ 69: "#ff8b8b", 70: "#ff8bcd", 71: "#ff8bff", 72: "#ffcd00", \ 73: "#ffcd8b", 74: "#ffcdcd", 75: "#ffcdff", 76: "#ffff00", \ 77: "#ffff8b", 78: "#ffffcd", 79: "#ffffff", 80: "#2e2e2e", \ 81: "#5c5c5c", 82: "#737373", 83: "#8b8b8b", 84: "#a2a2a2", \ 85: "#b9b9b9", 86: "#d0d0d0", 87: "#e7e7e7" \ }) elseif &t_Co == 256 call extend(s:cterm_color, { \ 16: "#000000", 17: "#00005f", 18: "#000087", 19: "#0000af", \ 20: "#0000d7", 21: "#0000ff", 22: "#005f00", 23: "#005f5f", \ 24: "#005f87", 25: "#005faf", 26: "#005fd7", 27: "#005fff", \ 28: "#008700", 29: "#00875f", 30: "#008787", 31: "#0087af", \ 32: "#0087d7", 33: "#0087ff", 34: "#00af00", 35: "#00af5f", \ 36: "#00af87", 37: "#00afaf", 38: "#00afd7", 39: "#00afff", \ 40: "#00d700", 41: "#00d75f", 42: "#00d787", 43: "#00d7af", \ 44: "#00d7d7", 45: "#00d7ff", 46: "#00ff00", 47: "#00ff5f", \ 48: "#00ff87", 49: "#00ffaf", 50: "#00ffd7", 51: "#00ffff", \ 52: "#5f0000", 53: "#5f005f", 54: "#5f0087", 55: "#5f00af", \ 56: "#5f00d7", 57: "#5f00ff", 58: "#5f5f00", 59: "#5f5f5f", \ 60: "#5f5f87", 61: "#5f5faf", 62: "#5f5fd7", 63: "#5f5fff", \ 64: "#5f8700" \ }) call extend(s:cterm_color, { \ 65: "#5f875f", 66: "#5f8787", 67: "#5f87af", 68: "#5f87d7", \ 69: "#5f87ff", 70: "#5faf00", 71: "#5faf5f", 72: "#5faf87", \ 73: "#5fafaf", 74: "#5fafd7", 75: "#5fafff", 76: "#5fd700", \ 77: "#5fd75f", 78: "#5fd787", 79: "#5fd7af", 80: "#5fd7d7", \ 81: "#5fd7ff", 82: "#5fff00", 83: "#5fff5f", 84: "#5fff87", \ 85: "#5fffaf", 86: "#5fffd7", 87: "#5fffff", 88: "#870000", \ 89: "#87005f", 90: "#870087", 91: "#8700af", 92: "#8700d7", \ 93: "#8700ff", 94: "#875f00", 95: "#875f5f", 96: "#875f87", \ 97: "#875faf", 98: "#875fd7", 99: "#875fff", 100: "#878700", \ 101: "#87875f", 102: "#878787", 103: "#8787af", 104: "#8787d7", \ 105: "#8787ff", 106: "#87af00", 107: "#87af5f", 108: "#87af87", \ 109: "#87afaf", 110: "#87afd7", 111: "#87afff", 112: "#87d700" \ }) call extend(s:cterm_color, { \ 113: "#87d75f", 114: "#87d787", 115: "#87d7af", 116: "#87d7d7", \ 117: "#87d7ff", 118: "#87ff00", 119: "#87ff5f", 120: "#87ff87", \ 121: "#87ffaf", 122: "#87ffd7", 123: "#87ffff", 124: "#af0000", \ 125: "#af005f", 126: "#af0087", 127: "#af00af", 128: "#af00d7", \ 129: "#af00ff", 130: "#af5f00", 131: "#af5f5f", 132: "#af5f87", \ 133: "#af5faf", 134: "#af5fd7", 135: "#af5fff", 136: "#af8700", \ 137: "#af875f", 138: "#af8787", 139: "#af87af", 140: "#af87d7", \ 141: "#af87ff", 142: "#afaf00", 143: "#afaf5f", 144: "#afaf87", \ 145: "#afafaf", 146: "#afafd7", 147: "#afafff", 148: "#afd700", \ 149: "#afd75f", 150: "#afd787", 151: "#afd7af", 152: "#afd7d7", \ 153: "#afd7ff", 154: "#afff00", 155: "#afff5f", 156: "#afff87", \ 157: "#afffaf", 158: "#afffd7" \ }) call extend(s:cterm_color, { \ 159: "#afffff", 160: "#d70000", 161: "#d7005f", 162: "#d70087", \ 163: "#d700af", 164: "#d700d7", 165: "#d700ff", 166: "#d75f00", \ 167: "#d75f5f", 168: "#d75f87", 169: "#d75faf", 170: "#d75fd7", \ 171: "#d75fff", 172: "#d78700", 173: "#d7875f", 174: "#d78787", \ 175: "#d787af", 176: "#d787d7", 177: "#d787ff", 178: "#d7af00", \ 179: "#d7af5f", 180: "#d7af87", 181: "#d7afaf", 182: "#d7afd7", \ 183: "#d7afff", 184: "#d7d700", 185: "#d7d75f", 186: "#d7d787", \ 187: "#d7d7af", 188: "#d7d7d7", 189: "#d7d7ff", 190: "#d7ff00", \ 191: "#d7ff5f", 192: "#d7ff87", 193: "#d7ffaf", 194: "#d7ffd7", \ 195: "#d7ffff", 196: "#ff0000", 197: "#ff005f", 198: "#ff0087", \ 199: "#ff00af", 200: "#ff00d7", 201: "#ff00ff", 202: "#ff5f00", \ 203: "#ff5f5f", 204: "#ff5f87" \ }) call extend(s:cterm_color, { \ 205: "#ff5faf", 206: "#ff5fd7", 207: "#ff5fff", 208: "#ff8700", \ 209: "#ff875f", 210: "#ff8787", 211: "#ff87af", 212: "#ff87d7", \ 213: "#ff87ff", 214: "#ffaf00", 215: "#ffaf5f", 216: "#ffaf87", \ 217: "#ffafaf", 218: "#ffafd7", 219: "#ffafff", 220: "#ffd700", \ 221: "#ffd75f", 222: "#ffd787", 223: "#ffd7af", 224: "#ffd7d7", \ 225: "#ffd7ff", 226: "#ffff00", 227: "#ffff5f", 228: "#ffff87", \ 229: "#ffffaf", 230: "#ffffd7", 231: "#ffffff", 232: "#080808", \ 233: "#121212", 234: "#1c1c1c", 235: "#262626", 236: "#303030", \ 237: "#3a3a3a", 238: "#444444", 239: "#4e4e4e", 240: "#585858", \ 241: "#626262", 242: "#6c6c6c", 243: "#767676", 244: "#808080", \ 245: "#8a8a8a", 246: "#949494", 247: "#9e9e9e", 248: "#a8a8a8", \ 249: "#b2b2b2", 250: "#bcbcbc", 251: "#c6c6c6", 252: "#d0d0d0", \ 253: "#dadada", 254: "#e4e4e4", 255: "#eeeeee" \ }) endif endif endif " Return good color specification: in GUI no transformation is done, in " terminal return RGB values of known colors and empty string for unknown if s:whatterm == "gui" function! s:HtmlColor(color) return a:color endfun else function! s:HtmlColor(color) if has_key(s:cterm_color, a:color) return s:cterm_color[a:color] else return "" endif endfun endif " Find out the background and foreground color for use later let s:fgc = s:HtmlColor(synIDattr(hlID("Normal"), "fg#", s:whatterm)) let s:bgc = s:HtmlColor(synIDattr(hlID("Normal"), "bg#", s:whatterm)) if s:fgc == "" let s:fgc = ( &background == "dark" ? "#ffffff" : "#000000" ) endif if s:bgc == "" let s:bgc = ( &background == "dark" ? "#000000" : "#ffffff" ) endif if !s:settings.use_css " Return opening HTML tag for given highlight id function! s:HtmlOpening(id, extra_attrs) let a = "" if synIDattr(a:id, "inverse") " For inverse, we always must set both colors (and exchange them) let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm)) let a = a . '<span '.a:extra_attrs.'style="background-color: ' . ( x != "" ? x : s:fgc ) . '">' let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) let a = a . '<font color="' . ( x != "" ? x : s:bgc ) . '">' else let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) if x != "" let a = a . '<span '.a:extra_attrs.'style="background-color: ' . x . '">' elseif !empty(a:extra_attrs) let a = a . '<span '.a:extra_attrs.'>' endif let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm)) if x != "" | let a = a . '<font color="' . x . '">' | endif endif if synIDattr(a:id, "bold") | let a = a . "<b>" | endif if synIDattr(a:id, "italic") | let a = a . "<i>" | endif if synIDattr(a:id, "underline") | let a = a . "<u>" | endif return a endfun " Return closing HTML tag for given highlight id function! s:HtmlClosing(id, has_extra_attrs) let a = "" if synIDattr(a:id, "underline") | let a = a . "</u>" | endif if synIDattr(a:id, "italic") | let a = a . "</i>" | endif if synIDattr(a:id, "bold") | let a = a . "</b>" | endif if synIDattr(a:id, "inverse") let a = a . '</font></span>' else let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm)) if x != "" | let a = a . '</font>' | endif let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) if x != "" || a:has_extra_attrs | let a = a . '</span>' | endif endif return a endfun endif " Use a different function for formatting based on user options. This way we " can avoid a lot of logic during the actual execution. " " Build the function line by line containing only what is needed for the options " in use for maximum code sharing with minimal branch logic for greater speed. " " Note, 'exec' commands do not recognize line continuations, so must concatenate " lines rather than continue them. if s:settings.use_css " save CSS to a list of rules to add to the output at the end of processing " first, get the style names we need let wrapperfunc_lines = [ \ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, make_unselectable, unformatted)', \ '', \ ' let l:style_name = synIDattr(a:style_id, "name", s:whatterm)' \ ] if &diff let wrapperfunc_lines += [ \ ' let l:diff_style_name = synIDattr(a:diff_style_id, "name", s:whatterm)'] " Add normal groups and diff groups to separate lists so we can order them to " allow diff highlight to override normal highlight " if primary style IS a diff style, grab it from the diff cache instead " (always succeeds because we pre-populate it) let wrapperfunc_lines += [ \ '', \ ' if a:style_id == s:DIFF_D_ID || a:style_id == s:DIFF_A_ID ||'. \ ' a:style_id == s:DIFF_C_ID || a:style_id == s:DIFF_T_ID', \ ' let l:saved_style = get(s:diffstylelist,a:style_id)', \ ' else' \ ] endif " get primary style info from cache or build it on the fly if not found let wrapperfunc_lines += [ \ ' let l:saved_style = get(s:stylelist,a:style_id)', \ ' if type(l:saved_style) == type(0)', \ ' unlet l:saved_style', \ ' let l:saved_style = s:CSS1(a:style_id)', \ ' if l:saved_style != ""', \ ' let l:saved_style = "." . l:style_name . " { " . l:saved_style . "}"', \ ' endif', \ ' let s:stylelist[a:style_id]= l:saved_style', \ ' endif' \ ] if &diff let wrapperfunc_lines += [ ' endif' ] endif " Build the wrapper tags around the text. It turns out that caching these " gives pretty much zero performance gain and adds a lot of logic. let wrapperfunc_lines += [ \ '', \ ' if l:saved_style == "" && empty(a:extra_attrs)' \ ] if &diff let wrapperfunc_lines += [ \ ' if a:diff_style_id <= 0' \ ] endif " no surroundings if neither primary nor diff style has any info let wrapperfunc_lines += [ \ ' return a:text' \ ] if &diff " no primary style, but diff style let wrapperfunc_lines += [ \ ' else', \ ' return "<span class=\"" .l:diff_style_name . "\">".a:text."</span>"', \ ' endif' \ ] endif " open tag for non-empty primary style let wrapperfunc_lines += [ \ ' else'] " non-empty primary style. handle either empty or non-empty diff style. " " separate the two classes by a space to apply them both if there is a diff " style name, unless the primary style is empty, then just use the diff style " name let diffstyle = \ (&diff ? '(a:diff_style_id <= 0 ? "" : " ". l:diff_style_name) .' \ : "") if s:settings.prevent_copy == "" let wrapperfunc_lines += [ \ ' return "<span ".a:extra_attrs."class=\"" . l:style_name .'.diffstyle.'"\">".a:text."</span>"' \ ] else " " Wrap the <input> in a <span> to allow fixing the stupid bug in some fonts " which cause browsers to display a 1px gap between lines when these " <input>s have a background color (maybe not really a bug, this isn't " well-defined) " " use strwidth, because we care only about how many character boxes are " needed to size the input, we don't care how many characters (including " separately counted composing chars, from strchars()) or bytes (from " len())the string contains. strdisplaywidth() is not needed because none of " the unselectable groups can contain tab characters (fold column, fold " text, line number). " " Note, if maxlength property needs to be added in the future, it will need " to use strchars(), because HTML specifies that the maxlength parameter " uses the number of unique codepoints for its limit. let wrapperfunc_lines += [ \ ' if a:make_unselectable', \ ' return "<span ".a:extra_attrs."class=\"" . l:style_name .'.diffstyle.'"\">'. \ '<input'.s:unselInputType.' class=\"" . l:style_name .'.diffstyle.'"\"'. \ ' value=\"".substitute(a:unformatted,''\s\+$'',"","")."\"'. \ ' onselect=''this.blur(); return false;'''. \ ' onmousedown=''this.blur(); return false;'''. \ ' onclick=''this.blur(); return false;'''. \ ' readonly=''readonly'''. \ ' size=\"".strwidth(a:unformatted)."\"'. \ (s:settings.use_xhtml ? '/' : '').'></span>"', \ ' else', \ ' return "<span ".a:extra_attrs."class=\"" . l:style_name .'. diffstyle .'"\">".a:text."</span>"' \ ] endif let wrapperfunc_lines += [ \ ' endif', \ 'endfun' \ ] else " Non-CSS method just needs the wrapper. " " Functions used to get opening/closing automatically return null strings if " no styles exist. if &diff let wrapperfunc_lines = [ \ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, unusedarg, unusedarg2)', \ ' return s:HtmlOpening(a:style_id, a:extra_attrs).(a:diff_style_id <= 0 ? "" :'. \ 's:HtmlOpening(a:diff_style_id, "")).a:text.'. \ '(a:diff_style_id <= 0 ? "" : s:HtmlClosing(a:diff_style_id, 0)).s:HtmlClosing(a:style_id, !empty(a:extra_attrs))', \ 'endfun' \ ] else let wrapperfunc_lines = [ \ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, unusedarg, unusedarg2)', \ ' return s:HtmlOpening(a:style_id, a:extra_attrs).a:text.s:HtmlClosing(a:style_id, !empty(a:extra_attrs))', \ 'endfun' \ ] endif endif " create the function we built line by line above exec join(wrapperfunc_lines, "\n") let s:diff_mode = &diff " Return HTML valid characters enclosed in a span of class style_name with " unprintable characters expanded and double spaces replaced as necessary. " " TODO: eliminate unneeded logic like done for BuildStyleWrapper function! s:HtmlFormat(text, style_id, diff_style_id, extra_attrs, make_unselectable) " Replace unprintable characters let unformatted = strtrans(a:text) let formatted = unformatted " Replace the reserved html characters let formatted = substitute(formatted, '&', '\&', 'g') let formatted = substitute(formatted, '<', '\<', 'g') let formatted = substitute(formatted, '>', '\>', 'g') let formatted = substitute(formatted, '"', '\"', 'g') " ' is not valid in HTML but it is in XHTML, so just use the numeric " reference for it instead. Needed because it could appear in quotes " especially if unselectable regions is turned on. let formatted = substitute(formatted, '"', '\'', 'g') " Replace a "form feed" character with HTML to do a page break " TODO: need to prevent this in unselectable areas? Probably it should never " BE in an unselectable area... let formatted = substitute(formatted, "\x0c", '<hr class="PAGE-BREAK">', 'g') " Replace double spaces, leading spaces, and trailing spaces if needed if ' ' != s:HtmlSpace let formatted = substitute(formatted, ' ', s:HtmlSpace . s:HtmlSpace, 'g') let formatted = substitute(formatted, '^ ', s:HtmlSpace, 'g') let formatted = substitute(formatted, ' \+$', s:HtmlSpace, 'g') endif " Enclose in the correct format return s:BuildStyleWrapper(a:style_id, a:diff_style_id, a:extra_attrs, formatted, a:make_unselectable, unformatted) endfun " set up functions to call HtmlFormat in certain ways based on whether the " element is supposed to be unselectable or not if s:settings.prevent_copy =~# 'n' if s:settings.number_lines if s:settings.line_ids function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr) if a:lnr > 0 return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 1) else return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1) endif endfun else function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr) return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1) endfun endif elseif s:settings.line_ids " if lines are not being numbered the only reason this function gets called " is to put the line IDs on each line; "text" will be emtpy but lnr will " always be non-zero, however we don't want to use the <input> because that " won't work as nice for empty text function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr) return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 0) endfun endif else if s:settings.line_ids function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr) if a:lnr > 0 return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 0) else return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0) endif endfun else function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr) return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0) endfun endif endif if s:settings.prevent_copy =~# 'd' function! s:HtmlFormat_d(text, style_id, diff_style_id) return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1) endfun else function! s:HtmlFormat_d(text, style_id, diff_style_id) return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0) endfun endif if s:settings.prevent_copy =~# 'f' " Note the <input> elements for fill spaces will have a single space for " content, to allow active cursor CSS selection to work. " " Wrap the whole thing in a span for the 1px padding workaround for gaps. function! s:FoldColumn_build(char, len, numfill, char2, class, click) let l:input_open = "<input readonly='readonly'".s:unselInputType. \ " onselect='this.blur(); return false;'". \ " onmousedown='this.blur(); ".a:click." return false;'". \ " onclick='return false;' size='". \ string(a:len + (empty(a:char2) ? 0 : 1) + a:numfill) . \ "' " let l:common_attrs = "class='FoldColumn' value='" let l:input_close = (s:settings.use_xhtml ? "' />" : "'>") return "<span class='".a:class."'>". \ l:input_open.l:common_attrs.repeat(a:char, a:len). \ (!empty(a:char2) ? a:char2 : ""). \ l:input_close . "</span>" endfun function! s:FoldColumn_fill() return s:FoldColumn_build('', s:foldcolumn, 0, '', 'FoldColumn', '') endfun else " For normal fold columns, simply space-pad to the desired width (note that " the FoldColumn definition includes a whitespace:pre rule) function! s:FoldColumn_build(char, len, numfill, char2, class, click) return "<a href='#' class='".a:class."' onclick='".a:click."'>". \ repeat(a:char, a:len).a:char2.repeat(' ', a:numfill). \ "</a>" endfun function! s:FoldColumn_fill() return s:HtmlFormat(repeat(' ', s:foldcolumn), s:FOLD_C_ID, 0, "", 0) endfun endif if s:settings.prevent_copy =~# 't' " put an extra empty span at the end for dynamic folds, so the linebreak can " be surrounded. Otherwise do it as normal. " " TODO: isn't there a better way to do this, than placing it here and using a " substitute later? if s:settings.dynamic_folds function! s:HtmlFormat_t(text, style_id, diff_style_id) return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1) . \ s:HtmlFormat("", a:style_id, 0, "", 0) endfun else function! s:HtmlFormat_t(text, style_id, diff_style_id) return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1) endfun endif else function! s:HtmlFormat_t(text, style_id, diff_style_id) return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0) endfun endif " Return CSS style describing given highlight id (can be empty) function! s:CSS1(id) let a = "" if synIDattr(a:id, "inverse") " For inverse, we always must set both colors (and exchange them) let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) let a = a . "color: " . ( x != "" ? x : s:bgc ) . "; " let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm)) let a = a . "background-color: " . ( x != "" ? x : s:fgc ) . "; " else let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm)) if x != "" | let a = a . "color: " . x . "; " | endif let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) if x != "" let a = a . "background-color: " . x . "; " " stupid hack because almost every browser seems to have at least one font " which shows 1px gaps between lines which have background let a = a . "padding-bottom: 1px; " elseif (a:id == s:FOLDED_ID || a:id == s:LINENR_ID || a:id == s:FOLD_C_ID) && !empty(s:settings.prevent_copy) " input elements default to a different color than the rest of the page let a = a . "background-color: " . s:bgc . "; " endif endif if synIDattr(a:id, "bold") | let a = a . "font-weight: bold; " | endif if synIDattr(a:id, "italic") | let a = a . "font-style: italic; " | endif if synIDattr(a:id, "underline") | let a = a . "text-decoration: underline; " | endif return a endfun if s:settings.dynamic_folds " compares two folds as stored in our list of folds " A fold is "less" than another if it starts at an earlier line number, " or ends at a later line number, ties broken by fold level function! s:FoldCompare(f1, f2) if a:f1.firstline != a:f2.firstline " put it before if it starts earlier return a:f1.firstline - a:f2.firstline elseif a:f1.lastline != a:f2.lastline " put it before if it ends later return a:f2.lastline - a:f1.lastline else " if folds begin and end on the same lines, put lowest fold level first return a:f1.level - a:f2.level endif endfunction endif " Set some options to make it work faster. " Don't report changes for :substitute, there will be many of them. " Don't change other windows; turn off scroll bind temporarily let s:old_title = &title let s:old_icon = &icon let s:old_et = &l:et let s:old_bind = &l:scrollbind let s:old_report = &report let s:old_search = @/ let s:old_more = &more set notitle noicon setlocal et set nomore set report=1000000 setlocal noscrollbind if exists(':ownsyntax') && exists('w:current_syntax') let s:current_syntax = w:current_syntax elseif exists('b:current_syntax') let s:current_syntax = b:current_syntax else let s:current_syntax = 'none' endif if s:current_syntax == '' let s:current_syntax = 'none' endif " Split window to create a buffer with the HTML file. let s:orgbufnr = winbufnr(0) let s:origwin_stl = &l:stl if expand("%") == "" if exists('g:html_diff_win_num') exec 'new Untitled_win'.g:html_diff_win_num.'.'.(s:settings.use_xhtml ? 'x' : '').'html' else exec 'new Untitled.'.(s:settings.use_xhtml ? 'x' : '').'html' endif else exec 'new %.'.(s:settings.use_xhtml ? 'x' : '').'html' endif " Resize the new window to very small in order to make it draw faster let s:old_winheight = winheight(0) let s:old_winfixheight = &l:winfixheight if s:old_winheight > 2 resize 1 " leave enough room to view one line at a time norm! G norm! zt endif setlocal winfixheight let s:newwin_stl = &l:stl " on the new window, set the least time-consuming fold method let s:old_fen = &foldenable setlocal foldmethod=manual setlocal nofoldenable let s:newwin = winnr() let s:orgwin = bufwinnr(s:orgbufnr) setlocal modifiable %d let s:old_paste = &paste set paste let s:old_magic = &magic set magic " set the fileencoding to match the charset we'll be using let &l:fileencoding=s:settings.vim_encoding " According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte " order mark is highly recommend on the web when using multibyte encodings. But, " it is not a good idea to include it on UTF-8 files. Otherwise, let Vim " determine when it is actually inserted. if s:settings.vim_encoding == 'utf-8' setlocal nobomb else setlocal bomb endif let s:lines = [] if s:settings.use_xhtml if s:settings.encoding != "" call add(s:lines, "<?xml version=\"1.0\" encoding=\"" . s:settings.encoding . "\"?>") else call add(s:lines, "<?xml version=\"1.0\"?>") endif let s:tag_close = ' />' else let s:tag_close = '>' endif let s:HtmlSpace = ' ' let s:LeadingSpace = ' ' let s:HtmlEndline = '' if s:settings.no_pre let s:HtmlEndline = '<br' . s:tag_close let s:LeadingSpace = s:settings.use_xhtml ? ' ' : ' ' let s:HtmlSpace = '\' . s:LeadingSpace endif " HTML header, with the title and generator ;-). Left free space for the CSS, " to be filled at the end. call extend(s:lines, [ \ "<html>", \ "<head>"]) " include encoding as close to the top as possible, but only if not already " contained in XML information (to avoid haggling over content type) if s:settings.encoding != "" && !s:settings.use_xhtml call add(s:lines, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . s:tag_close) endif call extend(s:lines, [ \ ("<title>".expand("%:p:~").""), \ ("", \ s:settings.use_xhtml ? "" : "', \ '']) " TODO: IE7 doesn't *actually* support XHTML, maybe we should remove this. " But if it's served up as tag soup, maybe the following will work, so " leave it in for now. call extend(s:lines, [ \ "", \]) else " if we aren't doing hover_unfold, use CSS 1 only call extend(s:lines, [ \ "' \]) endif else " if we aren't doing any dynamic folding, no need for any special rules call extend(s:lines, [ \ "", \]) endif endif " insert script tag; javascript is always needed for the line number " normalization for URL hashes call extend(s:lines, [ \ "", \ "" \ ]) call extend(s:lines, [""]) if !empty(s:settings.prevent_copy) call extend(s:lines, \ ["", \ "", \ "
0
", \ "
", \ "
" \ ]) else call extend(s:lines, [""]) endif if s:settings.no_pre " if we're not using CSS we use a font tag which can't have a div inside if s:settings.use_css call extend(s:lines, ["
"]) endif else call extend(s:lines, ["
"])
endif

exe s:orgwin . "wincmd w"

" caches of style data
" initialize to include line numbers if using them
if s:settings.number_lines
  let s:stylelist = { s:LINENR_ID : ".LineNr { " . s:CSS1( s:LINENR_ID ) . "}" }
else
  let s:stylelist = {}
endif
let s:diffstylelist = {
      \   s:DIFF_A_ID : ".DiffAdd { " . s:CSS1( s:DIFF_A_ID ) . "}",
      \   s:DIFF_C_ID : ".DiffChange { " . s:CSS1( s:DIFF_C_ID ) . "}",
      \   s:DIFF_D_ID : ".DiffDelete { " . s:CSS1( s:DIFF_D_ID ) . "}",
      \   s:DIFF_T_ID : ".DiffText { " . s:CSS1( s:DIFF_T_ID ) . "}"
      \ }

" set up progress bar in the status line
if !s:settings.no_progress
  " ProgressBar Indicator
  let s:progressbar={}

  " Progessbar specific functions
  func! s:ProgressBar(title, max_value, winnr)
    let pgb=copy(s:progressbar)
    let pgb.title = a:title.' '
    let pgb.max_value = a:max_value
    let pgb.winnr = a:winnr
    let pgb.cur_value = 0
    let pgb.items = { 'title'   : { 'color' : 'Statusline' },
	  \'bar'     : { 'color' : 'Statusline' , 'fillcolor' : 'DiffDelete' , 'bg' : 'Statusline' } ,
	  \'counter' : { 'color' : 'Statusline' } }
    let pgb.last_value = 0
    let pgb.needs_redraw = 0
    " Note that you must use len(split) instead of len() if you want to use 
    " unicode in title.
    "
    " Subtract 3 for spacing around the title.
    " Subtract 4 for the percentage display.
    " Subtract 2 for spacing before this.
    " Subtract 2 more for the '|' on either side of the progress bar
    let pgb.subtractedlen=len(split(pgb.title, '\zs'))+3+4+2+2
    let pgb.max_len = 0
    set laststatus=2
    return pgb
  endfun

  " Function: progressbar.calculate_ticks() {{{1
  func! s:progressbar.calculate_ticks(pb_len)
    if a:pb_len<=0
      let pb_len = 100
    else
      let pb_len = a:pb_len
    endif
    let self.progress_ticks = map(range(pb_len+1), "v:val * self.max_value / pb_len")
  endfun

  "Function: progressbar.paint()
  func! s:progressbar.paint()
    " Recalculate widths.
    let max_len = winwidth(self.winnr)
    let pb_len = 0
    " always true on first call because of initial value of self.max_len
    if max_len != self.max_len
      let self.max_len = max_len

      " Progressbar length
      let pb_len = max_len - self.subtractedlen

      call self.calculate_ticks(pb_len)

      let self.needs_redraw = 1
      let cur_value = 0
      let self.pb_len = pb_len
    else
      " start searching at the last found index to make the search for the
      " appropriate tick value normally take 0 or 1 comparisons
      let cur_value = self.last_value
      let pb_len = self.pb_len
    endif

    let cur_val_max = pb_len > 0 ? pb_len : 100

    " find the current progress bar position based on precalculated thresholds
    while cur_value < cur_val_max && self.cur_value > self.progress_ticks[cur_value]
      let cur_value += 1
    endwhile

    " update progress bar
    if self.last_value != cur_value || self.needs_redraw || self.cur_value == self.max_value
      let self.needs_redraw = 1
      let self.last_value = cur_value

      let t_color  = self.items.title.color
      let b_fcolor = self.items.bar.fillcolor
      let b_color  = self.items.bar.color
      let c_color  = self.items.counter.color

      let stl =  "%#".t_color."#%-( ".self.title." %)".
	    \"%#".b_color."#".
	    \(pb_len>0 ?
	    \	('|%#'.b_fcolor."#%-(".repeat(" ",cur_value)."%)".
	    \	 '%#'.b_color."#".repeat(" ",pb_len-cur_value)."|"):
	    \	('')).
	    \"%=%#".c_color."#%( ".printf("%3.d ",100*self.cur_value/self.max_value)."%% %)"
      call setwinvar(self.winnr, '&stl', stl)
    endif
  endfun

  func! s:progressbar.incr( ... )
    let self.cur_value += (a:0 ? a:1 : 1)
    " if we were making a general-purpose progress bar, we'd need to limit to a
    " lower limit as well, but since we always increment with a positive value
    " in this script, we only need limit the upper value
    let self.cur_value = (self.cur_value > self.max_value ? self.max_value : self.cur_value)
    call self.paint()
  endfun
  " }}}
  if s:settings.dynamic_folds
    " to process folds we make two passes through each line
    let s:pgb = s:ProgressBar("Processing folds:", line('$')*2, s:orgwin)
  endif
endif

" First do some preprocessing for dynamic folding. Do this for the entire file
" so we don't accidentally start within a closed fold or something.
let s:allfolds = []

if s:settings.dynamic_folds
  let s:lnum = 1
  let s:end = line('$')
  " save the fold text and set it to the default so we can find fold levels
  let s:foldtext_save = &foldtext
  setlocal foldtext&

  " we will set the foldcolumn in the html to the greater of the maximum fold
  " level and the current foldcolumn setting
  let s:foldcolumn = &foldcolumn

  " get all info needed to describe currently closed folds
  while s:lnum <= s:end
    if foldclosed(s:lnum) == s:lnum
      " default fold text has '+-' and then a number of dashes equal to fold
      " level, so subtract 2 from index of first non-dash after the dashes
      " in order to get the fold level of the current fold
      let s:level = match(foldtextresult(s:lnum), '+-*\zs[^-]') - 2
      " store fold info for later use
      let s:newfold = {'firstline': s:lnum, 'lastline': foldclosedend(s:lnum), 'level': s:level,'type': "closed-fold"}
      call add(s:allfolds, s:newfold)
      " open the fold so we can find any contained folds
      execute s:lnum."foldopen"
    else
      if !s:settings.no_progress
	call s:pgb.incr()
	if s:pgb.needs_redraw
	  redrawstatus
	  let s:pgb.needs_redraw = 0
	endif
      endif
      let s:lnum = s:lnum + 1
    endif
  endwhile

  " close all folds to get info for originally open folds
  silent! %foldclose!
  let s:lnum = 1

  " the originally open folds will be all folds we encounter that aren't
  " already in the list of closed folds
  while s:lnum <= s:end
    if foldclosed(s:lnum) == s:lnum
      " default fold text has '+-' and then a number of dashes equal to fold
      " level, so subtract 2 from index of first non-dash after the dashes
      " in order to get the fold level of the current fold
      let s:level = match(foldtextresult(s:lnum), '+-*\zs[^-]') - 2
      let s:newfold = {'firstline': s:lnum, 'lastline': foldclosedend(s:lnum), 'level': s:level,'type': "closed-fold"}
      " only add the fold if we don't already have it
      if empty(s:allfolds) || index(s:allfolds, s:newfold) == -1
	let s:newfold.type = "open-fold"
	call add(s:allfolds, s:newfold)
      endif
      " open the fold so we can find any contained folds
      execute s:lnum."foldopen"
    else
      if !s:settings.no_progress
	call s:pgb.incr()
	if s:pgb.needs_redraw
	  redrawstatus
	  let s:pgb.needs_redraw = 0
	endif
      endif
      let s:lnum = s:lnum + 1
    endif
  endwhile

  " sort the folds so that we only ever need to look at the first item in the
  " list of folds
  call sort(s:allfolds, "s:FoldCompare")

  let &l:foldtext = s:foldtext_save
  unlet s:foldtext_save

  " close all folds again so we can get the fold text as we go
  silent! %foldclose!

  " Go through and remove folds we don't need to (or cannot) process in the
  " current conversion range
  "
  " If a fold is removed which contains other folds, which are included, we need
  " to adjust the level of the included folds as used by the conversion logic
  " (avoiding special cases is good)
  "
  " Note any time we remove a fold, either all of the included folds are in it,
  " or none of them, because we only remove a fold if neither its start nor its
  " end are within the conversion range.
  let leveladjust = 0
  for afold in s:allfolds
    let removed = 0
    if exists("g:html_start_line") && exists("g:html_end_line")
      if afold.firstline < g:html_start_line
	if afold.lastline <= g:html_end_line && afold.lastline >= g:html_start_line
	  " if a fold starts before the range to convert but stops within the
	  " range, we need to include it. Make it start on the first converted
	  " line.
	  let afold.firstline = g:html_start_line
	else
	  " if the fold lies outside the range or the start and stop enclose
	  " the entire range, don't bother parsing it
	  call remove(s:allfolds, index(s:allfolds, afold))
	  let removed = 1
	  if afold.lastline > g:html_end_line
	    let leveladjust += 1
	  endif
	endif
      elseif afold.firstline > g:html_end_line
	" If the entire fold lies outside the range we need to remove it.
	call remove(s:allfolds, index(s:allfolds, afold))
	let removed = 1
      endif
    elseif exists("g:html_start_line")
      if afold.firstline < g:html_start_line
	" if there is no last line, but there is a first line, the end of the
	" fold will always lie within the region of interest, so keep it
	let afold.firstline = g:html_start_line
      endif
    elseif exists("g:html_end_line")
      " if there is no first line we default to the first line in the buffer so
      " the fold start will always be included if the fold itself is included.
      " If however the entire fold lies outside the range we need to remove it.
      if afold.firstline > g:html_end_line
	call remove(s:allfolds, index(s:allfolds, afold))
	let removed = 1
      endif
    endif
    if !removed
      let afold.level -= leveladjust
      if afold.level+1 > s:foldcolumn
	let s:foldcolumn = afold.level+1
      endif
    endif
  endfor

  " if we've removed folds containing the conversion range from processing,
  " getting foldtext as we go won't know to open the removed folds, so the
  " foldtext would be wrong; open them now.
  "
  " Note that only when a start and an end line is specified will a fold
  " containing the current range ever be removed.
  while leveladjust > 0
    exe g:html_start_line."foldopen"
    let leveladjust -= 1
  endwhile
endif

" Now loop over all lines in the original text to convert to html.
" Use html_start_line and html_end_line if they are set.
if exists("g:html_start_line")
  let s:lnum = html_start_line
  if s:lnum < 1 || s:lnum > line("$")
    let s:lnum = 1
  endif
else
  let s:lnum = 1
endif
if exists("g:html_end_line")
  let s:end = html_end_line
  if s:end < s:lnum || s:end > line("$")
    let s:end = line("$")
  endif
else
  let s:end = line("$")
endif

" stack to keep track of all the folds containing the current line
let s:foldstack = []

if !s:settings.no_progress
  let s:pgb = s:ProgressBar("Processing lines:", s:end - s:lnum + 1, s:orgwin)
endif

if s:settings.number_lines
  let s:margin = strlen(s:end) + 1
else
  let s:margin = 0
endif

if has('folding') && !s:settings.ignore_folding
  let s:foldfillchar = &fillchars[matchend(&fillchars, 'fold:')]
  if s:foldfillchar == ''
    let s:foldfillchar = '-'
  endif
endif
let s:difffillchar = &fillchars[matchend(&fillchars, 'diff:')]
if s:difffillchar == ''
  let s:difffillchar = '-'
endif

let s:foldId = 0

if !s:settings.expand_tabs
  " If keeping tabs, add them to printable characters so we keep them when
  " formatting text (strtrans() doesn't replace printable chars)
  let s:old_isprint = &isprint
  setlocal isprint+=9
endif

while s:lnum <= s:end

  " If there are filler lines for diff mode, show these above the line.
  let s:filler = diff_filler(s:lnum)
  if s:filler > 0
    let s:n = s:filler
    while s:n > 0
      let s:new = repeat(s:difffillchar, 3)

      if s:n > 2 && s:n < s:filler && !s:settings.whole_filler
	let s:new = s:new . " " . s:filler . " inserted lines "
	let s:n = 2
      endif

      if !s:settings.no_pre
	" HTML line wrapping is off--go ahead and fill to the margin
	" TODO: what about when CSS wrapping is turned on?
	let s:new = s:new . repeat(s:difffillchar, &columns - strlen(s:new) - s:margin)
      else
	let s:new = s:new . repeat(s:difffillchar, 3)
      endif

      let s:new = s:HtmlFormat_d(s:new, s:DIFF_D_ID, 0)
      if s:settings.number_lines
	" Indent if line numbering is on. Indent gets style of line number
	" column.
	let s:new = s:HtmlFormat_n(repeat(' ', s:margin), s:LINENR_ID, 0, 0) . s:new
      endif
      if s:settings.dynamic_folds && !s:settings.no_foldcolumn && s:foldcolumn > 0
	" Indent for foldcolumn if there is one. Assume it's empty, there should
	" not be a fold for deleted lines in diff mode.
	let s:new = s:FoldColumn_fill() . s:new
      endif
      call add(s:lines, s:new.s:HtmlEndline)

      let s:n = s:n - 1
    endwhile
    unlet s:n
  endif
  unlet s:filler

  " Start the line with the line number.
  if s:settings.number_lines
    let s:numcol = repeat(' ', s:margin - 1 - strlen(s:lnum)) . s:lnum . ' '
  endif

  let s:new = ""

  if has('folding') && !s:settings.ignore_folding && foldclosed(s:lnum) > -1 && !s:settings.dynamic_folds
    "
    " This is the beginning of a folded block (with no dynamic folding)
    let s:new = foldtextresult(s:lnum)
    if !s:settings.no_pre
      " HTML line wrapping is off--go ahead and fill to the margin
      let s:new = s:new . repeat(s:foldfillchar, &columns - strlen(s:new))
    endif

    " put numcol in a separate group for sake of unselectable text
    let s:new = (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, s:lnum): "") . s:HtmlFormat_t(s:new, s:FOLDED_ID, 0)

    " Skip to the end of the fold
    let s:new_lnum = foldclosedend(s:lnum)

    if !s:settings.no_progress
      call s:pgb.incr(s:new_lnum - s:lnum)
    endif

    let s:lnum = s:new_lnum

  else
    "
    " A line that is not folded, or doing dynamic folding.
    "
    let s:line = getline(s:lnum)
    let s:len = strlen(s:line)

    if s:settings.dynamic_folds
      " First insert a closing for any open folds that end on this line
      while !empty(s:foldstack) && get(s:foldstack,0).lastline == s:lnum-1
	let s:new = s:new.""
	call remove(s:foldstack, 0)
      endwhile

      " Now insert an opening for any new folds that start on this line
      let s:firstfold = 1
      while !empty(s:allfolds) && get(s:allfolds,0).firstline == s:lnum
	let s:foldId = s:foldId + 1
	let s:new .= ""


	" Unless disabled, add a fold column for the opening line of a fold.
	"
	" Note that dynamic folds require using css so we just use css to take
	" care of the leading spaces rather than using   in the case of
	" html_no_pre to make it easier
	if !s:settings.no_foldcolumn
	  " add fold column that can open the new fold
	  if s:allfolds[0].level > 1 && s:firstfold
	    let s:new = s:new . s:FoldColumn_build('|', s:allfolds[0].level - 1, 0, "",
		  \ 'toggle-open FoldColumn','javascript:toggleFold("fold'.s:foldstack[0].id.s:settings.id_suffix.'");')
	  endif
	  " add the filler spaces separately from the '+' char so that it can be
	  " shown/hidden separately during a hover unfold
	  let s:new = s:new . s:FoldColumn_build("+", 1, 0, "",
		\ 'toggle-open FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
	  " If this is not the last fold we're opening on this line, we need
	  " to keep the filler spaces hidden if the fold is opened by mouse
	  " hover. If it is the last fold to open in the line, we shouldn't hide
	  " them, so don't apply the toggle-filler class.
	  let s:new = s:new . s:FoldColumn_build(" ", 1, s:foldcolumn - s:allfolds[0].level - 1, "",
		\ 'toggle-open FoldColumn'. (get(s:allfolds, 1, {'firstline': 0}).firstline == s:lnum ?" toggle-filler" :""),
		\ 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')

	  " add fold column that can close the new fold
	  " only add extra blank space if we aren't opening another fold on the
	  " same line
	  if get(s:allfolds, 1, {'firstline': 0}).firstline != s:lnum
	    let s:extra_space = s:foldcolumn - s:allfolds[0].level
	  else
	    let s:extra_space = 0
	  endif
	  if s:firstfold
	    " the first fold in a line has '|' characters from folds opened in
	    " previous lines, before the '-' for this fold
	    let s:new .= s:FoldColumn_build('|', s:allfolds[0].level - 1, s:extra_space, '-',
		  \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
	  else
	    " any subsequent folds in the line only add a single '-'
	    let s:new = s:new . s:FoldColumn_build("-", 1, s:extra_space, "",
		  \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
	  endif
	  let s:firstfold = 0
	endif

	" Add fold text, moving the span ending to the next line so collapsing
	" of folds works correctly.
	" Put numcol in a separate group for sake of unselectable text.
	let s:new = s:new . (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, 0) : "") . substitute(s:HtmlFormat_t(foldtextresult(s:lnum), s:FOLDED_ID, 0), '', s:HtmlEndline.'\n\0', '')
	let s:new = s:new . ""

	" open the fold now that we have the fold text to allow retrieval of
	" fold text for subsequent folds
	execute s:lnum."foldopen"
	call insert(s:foldstack, remove(s:allfolds,0))
	let s:foldstack[0].id = s:foldId
      endwhile

      " Unless disabled, add a fold column for other lines.
      "
      " Note that dynamic folds require using css so we just use css to take
      " care of the leading spaces rather than using   in the case of
      " html_no_pre to make it easier
      if !s:settings.no_foldcolumn
	if empty(s:foldstack)
	  " add the empty foldcolumn for unfolded lines if there is a fold
	  " column at all
	  if s:foldcolumn > 0
	    let s:new = s:new . s:FoldColumn_fill()
	  endif
	else
	  " add the fold column for folds not on the opening line
	  if get(s:foldstack, 0).firstline < s:lnum
	    let s:new = s:new . s:FoldColumn_build('|', s:foldstack[0].level, s:foldcolumn - s:foldstack[0].level, "",
		  \ 'FoldColumn', 'javascript:toggleFold("fold'.s:foldstack[0].id.s:settings.id_suffix.'");')
	  endif
	endif
      endif
    endif

    " Now continue with the unfolded line text
    if s:settings.number_lines
      let s:new = s:new . s:HtmlFormat_n(s:numcol, s:LINENR_ID, 0, s:lnum)
    elseif s:settings.line_ids
      let s:new = s:new . s:HtmlFormat_n("", s:LINENR_ID, 0, s:lnum)
    endif

    " Get the diff attribute, if any.
    let s:diffattr = diff_hlID(s:lnum, 1)

    " initialize conceal info to act like not concealed, just in case
    let s:concealinfo = [0, '']

    " Loop over each character in the line
    let s:col = 1

    " most of the time we won't use the diff_id, initialize to zero
    let s:diff_id = 0

    while s:col <= s:len || (s:col == 1 && s:diffattr)
      let s:startcol = s:col " The start column for processing text
      if !s:settings.ignore_conceal && has('conceal')
	let s:concealinfo = synconcealed(s:lnum, s:col)
      endif
      if !s:settings.ignore_conceal && s:concealinfo[0]
	let s:col = s:col + 1
	" Speed loop (it's small - that's the trick)
	" Go along till we find a change in the match sequence number (ending
	" the specific concealed region) or until there are no more concealed
	" characters.
	while s:col <= s:len && s:concealinfo == synconcealed(s:lnum, s:col) | let s:col = s:col + 1 | endwhile
      elseif s:diffattr
	let s:diff_id = diff_hlID(s:lnum, s:col)
	let s:id = synID(s:lnum, s:col, 1)
	let s:col = s:col + 1
	" Speed loop (it's small - that's the trick)
	" Go along till we find a change in hlID
	while s:col <= s:len && s:id == synID(s:lnum, s:col, 1)
	      \   && s:diff_id == diff_hlID(s:lnum, s:col) |
	      \     let s:col = s:col + 1 |
	      \ endwhile
	if s:len < &columns && !s:settings.no_pre
	  " Add spaces at the end of the raw text line to extend the changed
	  " line to the full width.
	  let s:line = s:line . repeat(' ', &columns - virtcol([s:lnum, s:len]) - s:margin)
	  let s:len = &columns
	endif
      else
	let s:id = synID(s:lnum, s:col, 1)
	let s:col = s:col + 1
	" Speed loop (it's small - that's the trick)
	" Go along till we find a change in synID
	while s:col <= s:len && s:id == synID(s:lnum, s:col, 1) | let s:col = s:col + 1 | endwhile
      endif

      if s:settings.ignore_conceal || !s:concealinfo[0]
	" Expand tabs if needed
	let s:expandedtab = strpart(s:line, s:startcol - 1, s:col - s:startcol)
	if s:settings.expand_tabs
	  let s:offset = 0
	  let s:idx = stridx(s:expandedtab, "\t")
	  while s:idx >= 0
	    if has("multi_byte_encoding")
	      if s:startcol + s:idx == 1
		let s:i = &ts
	      else
		if s:idx == 0
		  let s:prevc = matchstr(s:line, '.\%' . (s:startcol + s:idx + s:offset) . 'c')
		else
		  let s:prevc = matchstr(s:expandedtab, '.\%' . (s:idx + 1) . 'c')
		endif
		let s:vcol = virtcol([s:lnum, s:startcol + s:idx + s:offset - len(s:prevc)])
		let s:i = &ts - (s:vcol % &ts)
	      endif
	      let s:offset -= s:i - 1
	    else
	      let s:i = &ts - ((s:idx + s:startcol - 1) % &ts)
	    endif
	    let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', s:i), '')
	    let s:idx = stridx(s:expandedtab, "\t")
	  endwhile
	end

	" get the highlight group name to use
	let s:id = synIDtrans(s:id)
      else
	" use Conceal highlighting for concealed text
	let s:id = s:CONCEAL_ID
	let s:expandedtab = s:concealinfo[1]
      endif

      " Output the text with the same synID, with class set to the highlight ID
      " name, unless it has been concealed completely.
      if strlen(s:expandedtab) > 0
	let s:new = s:new . s:HtmlFormat(s:expandedtab,  s:id, s:diff_id, "", 0)
      endif
    endwhile
  endif

  call extend(s:lines, split(s:new.s:HtmlEndline, '\n', 1))
  if !s:settings.no_progress && s:pgb.needs_redraw
    redrawstatus
    let s:pgb.needs_redraw = 0
  endif
  let s:lnum = s:lnum + 1

  if !s:settings.no_progress
    call s:pgb.incr()
  endif
endwhile

if s:settings.dynamic_folds
  " finish off any open folds
  while !empty(s:foldstack)
    let s:lines[-1].=""
    call remove(s:foldstack, 0)
  endwhile

  " add fold column to the style list if not already there
  let s:id = s:FOLD_C_ID
  if !has_key(s:stylelist, s:id)
    let s:stylelist[s:id] = '.FoldColumn { ' . s:CSS1(s:id) . '}'
  endif
endif

if s:settings.no_pre
  if !s:settings.use_css
    " Close off the font tag that encapsulates the whole 
    call extend(s:lines, ["", "", ""])
  else
    call extend(s:lines, ["
", "", ""]) endif else call extend(s:lines, ["", "", ""]) endif exe s:newwin . "wincmd w" call setline(1, s:lines) unlet s:lines " Mangle modelines so Vim doesn't try to use HTML text as a modeline if editing " this file in the future; need to do this after generating all the text in case " the modeline text has different highlight groups which all turn out to be " stripped from the final output. %s!\v(%(^|\s+)%([Vv]i%(m%([<=>]?\d+)?)?|ex)):!\1\:!ge " The generated HTML is admittedly ugly and takes a LONG time to fold. " Make sure the user doesn't do syntax folding when loading a generated file, " using a modeline. call append(line('$'), "") " Now, when we finally know which, we define the colors and styles if s:settings.use_css 1;/+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc syn match htmlCssStyleComment contained "\(\)" syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc hi def link htmlStyleArg htmlString endif if main_syntax == "html" " synchronizing (does not always work if a comment includes legal " html tags, but doing it right would mean to always start " at the first line, which is too slow) syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]" syn sync match htmlHighlight groupthere javaScript " 800 || v:version == 800 && has("patch1038") hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough else hi def htmlStrike term=underline cterm=underline gui=underline endif endif endif hi def link htmlPreStmt PreProc hi def link htmlPreError Error hi def link htmlPreProc PreProc hi def link htmlPreAttr String hi def link htmlPreProcAttrName PreProc hi def link htmlPreProcAttrError Error hi def link htmlSpecial Special hi def link htmlSpecialChar Special hi def link htmlString String hi def link htmlStatement Statement hi def link htmlComment Comment hi def link htmlCommentPart Comment hi def link htmlValue String hi def link htmlCommentError htmlError hi def link htmlTagError htmlError hi def link htmlEvent javaScript hi def link htmlError Error hi def link javaScript Special hi def link javaScriptExpression javaScript hi def link htmlCssStyleComment Comment hi def link htmlCssDefinition Special let b:current_syntax = "html" if main_syntax == 'html' unlet main_syntax endif let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/htmlcheetah.vim000066400000000000000000000007501320401574200210240ustar00rootroot00000000000000" Vim syntax file " Language: HTML with Cheetah tags " Maintainer: Max Ischenko " Last Change: 2003-05-11 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'html' endif runtime! syntax/cheetah.vim runtime! syntax/html.vim unlet b:current_syntax syntax cluster htmlPreproc add=cheetahPlaceHolder syntax cluster htmlString add=cheetahPlaceHolder let b:current_syntax = "htmlcheetah" neovim-0.2.2/runtime/syntax/htmldjango.vim000066400000000000000000000017631320401574200206720ustar00rootroot00000000000000" Vim syntax file " Language: Django HTML template " Maintainer: Dave Hodder " Last Change: 2014 Jul 13 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'html' endif runtime! syntax/django.vim runtime! syntax/html.vim unlet b:current_syntax syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display containedin=ALLBUT,@djangoBlocks syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks let b:current_syntax = "htmldjango" neovim-0.2.2/runtime/syntax/htmlm4.vim000066400000000000000000000012361320401574200177430ustar00rootroot00000000000000" Vim syntax file " Language: HTML and M4 " Maintainer: Claudio Fleiner " URL: http://www.fleiner.com/vim/syntax/htmlm4.vim " Last Change: 2001 Apr 30 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " we define it here so that included files can test for it if !exists("main_syntax") let main_syntax='htmlm4' endif runtime! syntax/html.vim unlet b:current_syntax syn case match runtime! syntax/m4.vim unlet b:current_syntax syn cluster htmlPreproc add=@m4Top syn cluster m4StringContents add=htmlTag,htmlEndTag let b:current_syntax = "htmlm4" if main_syntax == 'htmlm4' unlet main_syntax endif neovim-0.2.2/runtime/syntax/htmlos.vim000066400000000000000000000201711320401574200200430ustar00rootroot00000000000000" Vim syntax file " Language: HTML/OS by Aestiva " Maintainer: Jason Rust " URL: http://www.rustyparts.com/vim/syntax/htmlos.vim " Info: http://www.rustyparts.com/scripts.php " Last Change: 2003 May 11 " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'htmlos' endif runtime! syntax/html.vim unlet b:current_syntax syn cluster htmlPreproc add=htmlosRegion syn case ignore " Function names syn keyword htmlosFunctions expand sleep getlink version system ascii getascii syslock sysunlock cr lf clean postprep listtorow split listtocol coltolist rowtolist tabletolist contained syn keyword htmlosFunctions cut \display cutall cutx cutallx length reverse lower upper proper repeat left right middle trim trimleft trimright count countx locate locatex replace replacex replaceall replaceallx paste pasteleft pasteleftx pasteleftall pasteleftallx pasteright pasterightall pasterightallx chopleft chopleftx chopright choprightx format concat contained syn keyword htmlosFunctions goto exitgoto contained syn keyword htmlosFunctions layout cols rows row items getitem putitem switchitems gettable delrow delrows delcol delcols append merge fillcol fillrow filltable pastetable getcol getrow fillindexcol insindexcol dups nodups maxtable mintable maxcol mincol maxrow minrow avetable avecol averow mediantable mediancol medianrow producttable productcol productrow sumtable sumcol sumrow sumsqrtable sumsqrcol sumsqrrow reversecols reverserows switchcols switchrows inscols insrows insfillcol sortcol reversesortcol sortcoln reversesortcoln sortrow sortrown reversesortrow reversesortrown getcoleq getcoleqn getcolnoteq getcolany getcolbegin getcolnotany getcolnotbegin getcolge getcolgt getcolle getcollt getcolgen getcolgtn getcollen getcoltn getcolend getcolnotend getrowend getrownotend getcolin getcolnotin getcolinbegin getcolnotinbegin getcolinend getcolnotinend getrowin getrownotin getrowinbegin getrownotinbegin getrowinend getrownotinend contained syn keyword htmlosFunctions dbcreate dbadd dbedit dbdelete dbsearch dbsearchsort dbget dbgetsort dbstatus dbindex dbimport dbfill dbexport dbsort dbgetrec dbremove dbpurge dbfind dbfindsort dbunique dbcopy dbmove dbkill dbtransfer dbpoke dbsearchx dbgetx contained syn keyword htmlosFunctions syshtmlosname sysstartname sysfixfile fileinfo filelist fileindex domainname page browser regdomain username usernum getenv httpheader copy file ts row sysls syscp sysmv sysmd sysrd filepush filepushlink dirname contained syn keyword htmlosFunctions mail to address subject netmail netmailopen netmailclose mailfilelist netweb netwebresults webpush netsockopen netsockread netsockwrite netsockclose contained syn keyword htmlosFunctions today time systime now yesterday tomorrow getday getmonth getyear getminute getweekday getweeknum getyearday getdate gettime getamorpm gethour addhours addminutes adddays timebetween timetill timefrom datetill datefrom mixedtimebetween mixeddatetill mixedtimetill mixedtimefrom mixeddatefrom nextdaybyweekfromdate nextdaybyweekfromtoday nextdaybymonthfromdate nextdaybymonthfromtoday nextdaybyyearfromdate nextdaybyyearfromtoday offsetdaybyweekfromdate offsetdaybyweekfromtoday offsetdaybymonthfromdate offsetdaybymonthfromtoday contained syn keyword htmlosFunctions isprivate ispublic isfile isdir isblank iserror iserror iseven isodd istrue isfalse islogical istext istag isnumber isinteger isdate istableeq istableeqx istableeqn isfuture ispast istoday isweekday isweekend issamedate iseq isnoteq isge isle ismod10 isvalidstring contained syn keyword htmlosFunctions celtof celtokel ftocel ftokel keltocel keltof cmtoin intocm fttom mtoft fttomile miletoft kmtomile miletokm mtoyd ydtom galtoltr ltrtogal ltrtoqt qttoltr gtooz oztog kgtolb lbtokg mttoton tontomt contained syn keyword htmlosFunctions max min abs sign inverse square sqrt cube roundsig round ceiling roundup floor rounddown roundeven rounddowneven roundupeven roundodd roundupodd rounddownodd random factorial summand fibonacci remainder mod radians degrees cos sin tan cotan secant cosecant acos asin atan exp power power10 ln log10 log sinh cosh tanh contained syn keyword htmlosFunctions xmldelete xmldeletex xmldeleteattr xmldeleteattrx xmledit xmleditx xmleditvalue xmleditvaluex xmleditattr xmleditattrx xmlinsertbefore xmlinsertbeforex smlinsertafter xmlinsertafterx xmlinsertattr xmlinsertattrx smlget xmlgetx xmlgetvalue xmlgetvaluex xmlgetattrvalue xmlgetattrvaluex xmlgetrec xmlgetrecx xmlgetrecattrvalue xmlgetrecattrvaluex xmlchopleftbefore xmlchopleftbeforex xmlchoprightbefore xmlchoprightbeforex xmlchopleftafter xmlchopleftafterx xmlchoprightafter xmlchoprightafterx xmllocatebefore xmllocatebeforex xmllocateafter xmllocateafterx contained " Type syn keyword htmlosType int str dol flt dat grp contained " StorageClass syn keyword htmlosStorageClass locals contained " Operator syn match htmlosOperator "[-=+/\*!]" contained syn match htmlosRelation "[~]" contained syn match htmlosRelation "[=~][&!]" contained syn match htmlosRelation "[!=<>]=" contained syn match htmlosRelation "[<>]" contained " Comment syn region htmlosComment start="#" end="/#" contained " Conditional syn keyword htmlosConditional if then /if to else elif contained syn keyword htmlosConditional and or nand nor xor not contained " Repeat syn keyword htmlosRepeat while do /while for /for contained " Keyword syn keyword htmlosKeyword name value step do rowname colname rownum contained " Repeat syn keyword htmlosLabel case matched /case switch contained " Statement syn keyword htmlosStatement break exit return continue contained " Identifier syn match htmlosIdentifier "\h\w*[\.]*\w*" contained " Special identifier syn match htmlosSpecialIdentifier "[\$@]" contained " Define syn keyword htmlosDefine function overlay contained " Boolean syn keyword htmlosBoolean true false contained " String syn region htmlosStringDouble keepend matchgroup=None start=+"+ end=+"+ contained syn region htmlosStringSingle keepend matchgroup=None start=+'+ end=+'+ contained " Number syn match htmlosNumber "-\=\<\d\+\>" contained " Float syn match htmlosFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained " Error syn match htmlosError "ERROR" contained " Parent syn match htmlosParent "[({[\]})]" contained " Todo syn keyword htmlosTodo TODO Todo todo contained syn cluster htmlosInside contains=htmlosComment,htmlosFunctions,htmlosIdentifier,htmlosSpecialIdentifier,htmlosConditional,htmlosRepeat,htmlosLabel,htmlosStatement,htmlosOperator,htmlosRelation,htmlosStringSingle,htmlosStringDouble,htmlosNumber,htmlosFloat,htmlosError,htmlosKeyword,htmlosType,htmlosBoolean,htmlosParent syn cluster htmlosTop contains=@htmlosInside,htmlosDefine,htmlosError,htmlosStorageClass syn region htmlosRegion keepend matchgroup=Delimiter start="<<" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end=">>" contains=@htmlosTop syn region htmlosRegion keepend matchgroup=Delimiter start="\[\[" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end="\]\]" contains=@htmlosTop " sync if exists("htmlos_minlines") exec "syn sync minlines=" . htmlos_minlines else syn sync minlines=100 endif " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later hi def link htmlosSpecialIdentifier Operator hi def link htmlosIdentifier Identifier hi def link htmlosStorageClass StorageClass hi def link htmlosComment Comment hi def link htmlosBoolean Boolean hi def link htmlosStringSingle String hi def link htmlosStringDouble String hi def link htmlosNumber Number hi def link htmlosFloat Float hi def link htmlosFunctions Function hi def link htmlosRepeat Repeat hi def link htmlosConditional Conditional hi def link htmlosLabel Label hi def link htmlosStatement Statement hi def link htmlosKeyword Statement hi def link htmlosType Type hi def link htmlosDefine Define hi def link htmlosParent Delimiter hi def link htmlosError Error hi def link htmlosTodo Todo hi def link htmlosOperator Operator hi def link htmlosRelation Operator let b:current_syntax = "htmlos" if main_syntax == 'htmlos' unlet main_syntax endif " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/ia64.vim000066400000000000000000000244641320401574200173110ustar00rootroot00000000000000" Vim syntax file " Language: IA-64 (Itanium) assembly language " Maintainer: Parth Malwankar " URL: http://www.geocities.com/pmalwankar (Home Page with link to my Vim page) " http://www.geocities.com/pmalwankar/vim.htm (for VIM) " File Version: 0.7 " Last Change: 2006 Sep 08 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif "ignore case for assembly syn case ignore " Identifier Keyword characters (defines \k) setlocal iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ syn sync minlines=5 " Read the MASM syntax to start with " This is needed as both IA-64 as well as IA-32 instructions are supported source :p:h/masm.vim syn region ia64Comment start="//" end="$" contains=ia64Todo syn region ia64Comment start="/\*" end="\*/" contains=ia64Todo syn match ia64Identifier "[a-zA-Z_$][a-zA-Z0-9_$]*" syn match ia64Directive "\.[a-zA-Z_$][a-zA-Z_$.]\+" syn match ia64Label "[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=:\>"he=e-1 syn match ia64Label "[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=::\>"he=e-2 syn match ia64Label "[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=#\>"he=e-1 syn region ia64string start=+L\="+ skip=+\\\\\|\\"+ end=+"+ syn match ia64Octal "0[0-7_]*\>" syn match ia64Binary "0[bB][01_]*\>" syn match ia64Hex "0[xX][0-9a-fA-F_]*\>" syn match ia64Decimal "[1-9_][0-9_]*\>" syn match ia64Float "[0-9_]*\.[0-9_]*\([eE][+-]\=[0-9_]*\)\=\>" "simple instructions syn keyword ia64opcode add adds addl addp4 alloc and andcm cover epc syn keyword ia64opcode fabs fand fandcm fc flushrs fneg fnegabs for syn keyword ia64opcode fpabs fpack fpneg fpnegabs fselect fand fabdcm syn keyword ia64opcode fc fwb fxor loadrs movl mux1 mux2 or padd4 syn keyword ia64opcode pavgsub1 pavgsub2 popcnt psad1 pshl2 pshl4 pshladd2 syn keyword ia64opcode pshradd2 psub4 rfi rsm rum shl shladd shladdp4 syn keyword ia64opcode shrp ssm sub sum sync.i tak thash syn keyword ia64opcode tpa ttag xor "put to override these being recognized as floats. They are originally from masm.vim "put here to avoid confusion with float syn match ia64Directive "\.186" syn match ia64Directive "\.286" syn match ia64Directive "\.286c" syn match ia64Directive "\.286p" syn match ia64Directive "\.287" syn match ia64Directive "\.386" syn match ia64Directive "\.386c" syn match ia64Directive "\.386p" syn match ia64Directive "\.387" syn match ia64Directive "\.486" syn match ia64Directive "\.486c" syn match ia64Directive "\.486p" syn match ia64Directive "\.8086" syn match ia64Directive "\.8087" "delimiters syn match ia64delimiter ";;" "operators syn match ia64operators "[\[\]()#,]" syn match ia64operators "\(+\|-\|=\)" "TODO syn match ia64Todo "\(TODO\|XXX\|FIXME\|NOTE\)" "What follows is a long list of regular expressions for parsing the "ia64 instructions that use many completers "br syn match ia64opcode "br\(\(\.\(cond\|call\|ret\|ia\|cloop\|ctop\|cexit\|wtop\|wexit\)\)\=\(\.\(spnt\|dpnt\|sptk\|dptk\)\)\=\(\.few\|\.many\)\=\(\.clr\)\=\)\=\>" "break syn match ia64opcode "break\(\.[ibmfx]\)\=\>" "brp syn match ia64opcode "brp\(\.\(sptk\|dptk\|loop\|exit\)\)\(\.imp\)\=\>" syn match ia64opcode "brp\.ret\(\.\(sptk\|dptk\)\)\{1}\(\.imp\)\=\>" "bsw syn match ia64opcode "bsw\.[01]\>" "chk syn match ia64opcode "chk\.\(s\(\.[im]\)\=\)\>" syn match ia64opcode "chk\.a\.\(clr\|nc\)\>" "clrrrb syn match ia64opcode "clrrrb\(\.pr\)\=\>" "cmp/cmp4 syn match ia64opcode "cmp4\=\.\(eq\|ne\|l[te]\|g[te]\|[lg]tu\|[lg]eu\)\(\.unc\)\=\>" syn match ia64opcode "cmp4\=\.\(eq\|[lgn]e\|[lg]t\)\.\(\(or\(\.andcm\|cm\)\=\)\|\(and\(\(\.or\)\=cm\)\=\)\)\>" "cmpxchg syn match ia64opcode "cmpxchg[1248]\.\(acq\|rel\)\(\.nt1\|\.nta\)\=\>" "czx syn match ia64opcode "czx[12]\.[lr]\>" "dep syn match ia64opcode "dep\(\.z\)\=\>" "extr syn match ia64opcode "extr\(\.u\)\=\>" "fadd syn match ia64opcode "fadd\(\.[sd]\)\=\(\.s[0-3]\)\=\>" "famax/famin syn match ia64opcode "fa\(max\|min\)\(\.s[0-3]\)\=\>" "fchkf/fmax/fmin syn match ia64opcode "f\(chkf\|max\|min\)\(\.s[0-3]\)\=\>" "fclass syn match ia64opcode "fclass\(\.n\=m\)\(\.unc\)\=\>" "fclrf/fpamax syn match ia64opcode "f\(clrf\|pamax\|pamin\)\(\.s[0-3]\)\=\>" "fcmp syn match ia64opcode "fcmp\.\(n\=[lg][te]\|n\=eq\|\(un\)\=ord\)\(\.unc\)\=\(\.s[0-3]\)\=\>" "fcvt/fcvt.xf/fcvt.xuf.pc.sf syn match ia64opcode "fcvt\.\(\(fxu\=\(\.trunc\)\=\(\.s[0-3]\)\=\)\|\(xf\|xuf\(\.[sd]\)\=\(\.s[0-3]\)\=\)\)\>" "fetchadd syn match ia64opcode "fetchadd[48]\.\(acq\|rel\)\(\.nt1\|\.nta\)\=\>" "fma/fmpy/fms syn match ia64opcode "fm\([as]\|py\)\(\.[sd]\)\=\(\.s[0-3]\)\=\>" "fmerge/fpmerge syn match ia64opcode "fp\=merge\.\(ns\|se\=\)\>" "fmix syn match ia64opcode "fmix\.\(lr\|[lr]\)\>" "fnma/fnorm/fnmpy syn match ia64opcode "fn\(ma\|mpy\|orm\)\(\.[sd]\)\=\(\.s[0-3]\)\=\>" "fpcmp syn match ia64opcode "fpcmp\.\(n\=[lg][te]\|n\=eq\|\(un\)\=ord\)\(\.s[0-3]\)\=\>" "fpcvt syn match ia64opcode "fpcvt\.fxu\=\(\(\.trunc\)\=\(\.s[0-3]\)\=\)\>" "fpma/fpmax/fpmin/fpmpy/fpms/fpnma/fpnmpy/fprcpa/fpsqrta syn match ia64opcode "fp\(max\=\|min\|n\=mpy\|ms\|nma\|rcpa\|sqrta\)\(\.s[0-3]\)\=\>" "frcpa/frsqrta syn match ia64opcode "fr\(cpa\|sqrta\)\(\.s[0-3]\)\=\>" "fsetc/famin/fchkf syn match ia64opcode "f\(setc\|amin\|chkf\)\(\.s[0-3]\)\=\>" "fsub syn match ia64opcode "fsub\(\.[sd]\)\=\(\.s[0-3]\)\=\>" "fswap syn match ia64opcode "fswap\(\.n[lr]\=\)\=\>" "fsxt syn match ia64opcode "fsxt\.[lr]\>" "getf syn match ia64opcode "getf\.\([sd]\|exp\|sig\)\>" "invala syn match ia64opcode "invala\(\.[ae]\)\=\>" "itc/itr syn match ia64opcode "it[cr]\.[id]\>" "ld syn match ia64opcode "ld[1248]\>\|ld[1248]\(\.\(sa\=\|a\|c\.\(nc\|clr\(\.acq\)\=\)\|acq\|bias\)\)\=\(\.nt[1a]\)\=\>" syn match ia64opcode "ld8\.fill\(\.nt[1a]\)\=\>" "ldf syn match ia64opcode "ldf[sde8]\(\(\.\(sa\=\|a\|c\.\(nc\|clr\)\)\)\=\(\.nt[1a]\)\=\)\=\>" syn match ia64opcode "ldf\.fill\(\.nt[1a]\)\=\>" "ldfp syn match ia64opcode "ldfp[sd8]\(\(\.\(sa\=\|a\|c\.\(nc\|clr\)\)\)\=\(\.nt[1a]\)\=\)\=\>" "lfetch syn match ia64opcode "lfetch\(\.fault\(\.excl\)\=\|\.excl\)\=\(\.nt[12a]\)\=\>" "mf syn match ia64opcode "mf\(\.a\)\=\>" "mix syn match ia64opcode "mix[124]\.[lr]\>" "mov syn match ia64opcode "mov\(\.[im]\)\=\>" syn match ia64opcode "mov\(\.ret\)\=\(\(\.sptk\|\.dptk\)\=\(\.imp\)\=\)\=\>" "nop syn match ia64opcode "nop\(\.[ibmfx]\)\=\>" "pack syn match ia64opcode "pack\(2\.[su]ss\|4\.sss\)\>" "padd //padd4 added to keywords syn match ia64opcode "padd[12]\(\.\(sss\|uus\|uuu\)\)\=\>" "pavg syn match ia64opcode "pavg[12]\(\.raz\)\=\>" "pcmp syn match ia64opcode "pcmp[124]\.\(eq\|gt\)\>" "pmax/pmin syn match ia64opcode "pm\(ax\|in\)\(\(1\.u\)\|2\)\>" "pmpy syn match ia64opcode "pmpy2\.[rl]\>" "pmpyshr syn match ia64opcode "pmpyshr2\(\.u\)\=\>" "probe syn match ia64opcode "probe\.[rw]\>" syn match ia64opcode "probe\.\(\(r\|w\|rw\)\.fault\)\>" "pshr syn match ia64opcode "pshr[24]\(\.u\)\=\>" "psub syn match ia64opcode "psub[12]\(\.\(sss\|uu[su]\)\)\=\>" "ptc syn match ia64opcode "ptc\.\(l\|e\|ga\=\)\>" "ptr syn match ia64opcode "ptr\.\(d\|i\)\>" "setf syn match ia64opcode "setf\.\(s\|d\|exp\|sig\)\>" "shr syn match ia64opcode "shr\(\.u\)\=\>" "srlz syn match ia64opcode "srlz\(\.[id]\)\>" "st syn match ia64opcode "st[1248]\(\.rel\)\=\(\.nta\)\=\>" syn match ia64opcode "st8\.spill\(\.nta\)\=\>" "stf syn match ia64opcode "stf[1248]\(\.nta\)\=\>" syn match ia64opcode "stf\.spill\(\.nta\)\=\>" "sxt syn match ia64opcode "sxt[124]\>" "tbit/tnat syn match ia64opcode "t\(bit\|nat\)\(\.nz\|\.z\)\=\(\.\(unc\|or\(\.andcm\|cm\)\=\|and\(\.orcm\|cm\)\=\)\)\=\>" "unpack syn match ia64opcode "unpack[124]\.[lh]\>" "xchq syn match ia64opcode "xchg[1248]\(\.nt[1a]\)\=\>" "xma/xmpy syn match ia64opcode "xm\(a\|py\)\.[lh]u\=\>" "zxt syn match ia64opcode "zxt[124]\>" "The regex for different ia64 registers are given below "limits the rXXX and fXXX and cr suffix in the range 0-127 syn match ia64registers "\([fr]\|cr\)\([0-9]\|[1-9][0-9]\|1[0-1][0-9]\|12[0-7]\)\{1}\>" "branch ia64registers syn match ia64registers "b[0-7]\>" "predicate ia64registers syn match ia64registers "p\([0-9]\|[1-5][0-9]\|6[0-3]\)\>" "application ia64registers syn match ia64registers "ar\.\(fpsr\|mat\|unat\|rnat\|pfs\|bsp\|bspstore\|rsc\|lc\|ec\|ccv\|itc\|k[0-7]\)\>" "ia32 AR's syn match ia64registers "ar\.\(eflag\|fcr\|csd\|ssd\|cflg\|fsr\|fir\|fdr\)\>" "sp/gp/pr/pr.rot/rp syn keyword ia64registers sp gp pr pr.rot rp ip tp "in/out/local syn match ia64registers "\(in\|out\|loc\)\([0-9]\|[1-8][0-9]\|9[0-5]\)\>" "argument ia64registers syn match ia64registers "farg[0-7]\>" "return value ia64registers syn match ia64registers "fret[0-7]\>" "psr syn match ia64registers "psr\(\.\(l\|um\)\)\=\>" "cr syn match ia64registers "cr\.\(dcr\|itm\|iva\|pta\|ipsr\|isr\|ifa\|iip\|itir\|iipa\|ifs\|iim\|iha\|lid\|ivr\|tpr\|eoi\|irr[0-3]\|itv\|pmv\|lrr[01]\|cmcv\)\>" "Indirect registers syn match ia64registers "\(cpuid\|dbr\|ibr\|pkr\|pmc\|pmd\|rr\|itr\|dtr\)\>" "MUX permutations for 8-bit elements syn match ia64registers "\(@rev\|@mix\|@shuf\|@alt\|@brcst\)\>" "floating point classes syn match ia64registers "\(@nat\|@qnan\|@snan\|@pos\|@neg\|@zero\|@unorm\|@norm\|@inf\)\>" "link relocation operators syn match ia64registers "\(@\(\(\(gp\|sec\|seg\|image\)rel\)\|ltoff\|fptr\|ptloff\|ltv\|section\)\)\>" "Data allocation syntax syn match ia64data "data[1248]\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" syn match ia64data "real\([48]\|1[06]\)\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" syn match ia64data "stringz\=\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" " Define the default highlighting. " Only when an item doesn't have highlighting yet "put masm groups with our groups hi def link masmOperator ia64operator hi def link masmDirective ia64Directive hi def link masmOpcode ia64Opcode hi def link masmIdentifier ia64Identifier hi def link masmFloat ia64Float "ia64 specific stuff hi def link ia64Label Define hi def link ia64Comment Comment hi def link ia64Directive Type hi def link ia64opcode Statement hi def link ia64registers Operator hi def link ia64string String hi def link ia64Hex Number hi def link ia64Binary Number hi def link ia64Octal Number hi def link ia64Float Float hi def link ia64Decimal Number hi def link ia64Identifier Identifier hi def link ia64data Type hi def link ia64delimiter Delimiter hi def link ia64operator Operator hi def link ia64Todo Todo let b:current_syntax = "ia64" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/ibasic.vim000066400000000000000000000155741320401574200200020ustar00rootroot00000000000000" Vim syntax file " Language: ibasic " Maintainer: Mark Manning " Originator: Allan Kelly " Created: 10/1/2006 " Updated: 10/21/2006 " Description: A vim file to handle the IBasic file format. " Notes: " Updated by Mark Manning " Applied IBasic support to the already excellent support for standard " basic syntax (like QB). " " First version based on Micro$soft QBASIC circa 1989, as documented in " 'Learn BASIC Now' by Halvorson&Rygmyr. Microsoft Press 1989. " This syntax file not a complete implementation yet. " Send suggestions to the maintainer. " " This version is based upon the commands found in IBasic (www.pyxia.com). " MEM 10/6/2006 " " Quit when a (custom) syntax file was already loaded (Taken from c.vim) " if exists("b:current_syntax") finish endif " " Be sure to turn on the "case ignore" since current versions of basic " support both upper as well as lowercase letters. " syn case ignore " " A bunch of useful BASIC keywords " syn keyword ibasicStatement beep bload bsave call absolute chain chdir circle syn keyword ibasicStatement clear close cls color com common const data syn keyword ibasicStatement loop draw end environ erase error exit field syn keyword ibasicStatement files function get gosub goto syn keyword ibasicStatement input input# ioctl key kill let line locate syn keyword ibasicStatement lock unlock lprint using lset mkdir name syn keyword ibasicStatement on error open option base out paint palette pcopy syn keyword ibasicStatement pen play pmap poke preset print print# using pset syn keyword ibasicStatement put randomize read redim reset restore resume syn keyword ibasicStatement return rmdir rset run seek screen syn keyword ibasicStatement shared shell sleep sound static stop strig sub syn keyword ibasicStatement swap system timer troff tron type unlock syn keyword ibasicStatement view wait width window write syn keyword ibasicStatement date$ mid$ time$ " " Do the basic variables names first. This is because it " is the most inclusive of the tests. Later on we change " this so the identifiers are split up into the various " types of identifiers like functions, basic commands and " such. MEM 9/9/2006 " syn match ibasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" syn match ibasicGenericFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1 " " Function list " syn keyword ibasicBuiltInFunction abs asc atn cdbl cint clng cos csng csrlin cvd cvdmbf syn keyword ibasicBuiltInFunction cvi cvl cvs cvsmbf eof erdev erl err exp fileattr syn keyword ibasicBuiltInFunction fix fre freefile inp instr lbound len loc lof syn keyword ibasicBuiltInFunction log lpos mod peek pen point pos rnd sadd screen seek syn keyword ibasicBuiltInFunction setmem sgn sin spc sqr stick strig tab tan ubound syn keyword ibasicBuiltInFunction val valptr valseg varptr varseg syn keyword ibasicBuiltInFunction chr\$ command$ date$ environ$ erdev$ hex$ inkey$ syn keyword ibasicBuiltInFunction input$ ioctl$ lcases$ laft$ ltrim$ mid$ mkdmbf$ mkd$ syn keyword ibasicBuiltInFunction mki$ mkl$ mksmbf$ mks$ oct$ right$ rtrim$ space$ syn keyword ibasicBuiltInFunction str$ string$ time$ ucase$ varptr$ syn keyword ibasicTodo contained TODO syn cluster ibasicFunctionCluster contains=ibasicBuiltInFunction,ibasicGenericFunction syn keyword Conditional if else then elseif endif select case endselect syn keyword Repeat for do while next enddo endwhile wend syn keyword ibasicTypeSpecifier single double defdbl defsng syn keyword ibasicTypeSpecifier int integer uint uinteger int64 uint64 defint deflng syn keyword ibasicTypeSpecifier byte char string istring defstr syn keyword ibasicDefine dim def declare " "catch errors caused by wrong parenthesis " syn cluster ibasicParenGroup contains=ibasicParenError,ibasicIncluded,ibasicSpecial,ibasicTodo,ibasicUserCont,ibasicUserLabel,ibasicBitField syn region ibasicParen transparent start='(' end=')' contains=ALLBUT,@bParenGroup syn match ibasicParenError ")" syn match ibasicInParen contained "[{}]" " "integer number, or floating point number without a dot and with "f". " syn region ibasicHex start="&h" end="\W" syn region ibasicHexError start="&h\x*[g-zG-Z]" end="\W" syn match ibasicInteger "\<\d\+\(u\=l\=\|lu\|f\)\>" " "floating point number, with dot, optional exponent " syn match ibasicFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" " "floating point number, starting with a dot, optional exponent " syn match ibasicFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" " "floating point number, without dot, with exponent " syn match ibasicFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" " "hex number " syn match ibasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" syn match ibasicFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1 syn case match syn match ibasicOctalError "\<0\o*[89]" " " String and Character contstants " syn region ibasicString start='"' end='"' contains=ibasicSpecial,ibasicTodo syn region ibasicString start="'" end="'" contains=ibasicSpecial,ibasicTodo " " Comments " syn match ibasicSpecial contained "\\." syn region ibasicComment start="^rem" end="$" contains=ibasicSpecial,ibasicTodo syn region ibasicComment start=":\s*rem" end="$" contains=ibasicSpecial,ibasicTodo syn region ibasicComment start="\s*'" end="$" contains=ibasicSpecial,ibasicTodo syn region ibasicComment start="^'" end="$" contains=ibasicSpecial,ibasicTodo " " Now do the comments and labels " syn match ibasicLabel "^\d" syn region ibasicLineNumber start="^\d" end="\s" " " Pre-compiler options : FreeBasic " syn region ibasicPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=ibasicString,ibasicCharacter,ibasicNumber,ibasicCommentError,ibasicSpaceError syn match ibasicInclude "^\s*#\s*include\s*" " " Create the clusters " syn cluster ibasicNumber contains=ibasicHex,ibasicInteger,ibasicFloat syn cluster ibasicError contains=ibasicHexError " " Used with OPEN statement " syn match ibasicFilenumber "#\d\+" " "syn sync ccomment ibasicComment " syn match ibasicMathOperator "[\+\-\=\|\*\/\>\<\%\()[\]]" contains=ibasicParen " " The default methods for highlighting. Can be overridden later " hi def link ibasicLabel Label hi def link ibasicConditional Conditional hi def link ibasicRepeat Repeat hi def link ibasicHex Number hi def link ibasicInteger Number hi def link ibasicFloat Number hi def link ibasicError Error hi def link ibasicHexError Error hi def link ibasicStatement Statement hi def link ibasicString String hi def link ibasicComment Comment hi def link ibasicLineNumber Comment hi def link ibasicSpecial Special hi def link ibasicTodo Todo hi def link ibasicGenericFunction Function hi def link ibasicBuiltInFunction Function hi def link ibasicTypeSpecifier Type hi def link ibasicDefine Type hi def link ibasicInclude Include hi def link ibasicIdentifier Identifier hi def link ibasicFilenumber ibasicTypeSpecifier hi def link ibasicMathOperator Operator let b:current_syntax = "ibasic" " vim: ts=8 neovim-0.2.2/runtime/syntax/icemenu.vim000066400000000000000000000014701320401574200201630ustar00rootroot00000000000000" Vim syntax file " Language: Icewm Menu " Maintainer: James Mahler " Last Change: Fri Apr 1 15:13:48 EST 2005 " Extensions: ~/.icewm/menu " Comment: Icewm is a lightweight window manager. This adds syntax " highlighting when editing your user's menu file (~/.icewm/menu). " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " not case sensitive syntax case ignore " icons .xpm .png and .gif syntax match _icon /"\=\/.*\.xpm"\=/ syntax match _icon /"\=\/.*\.png"\=/ syntax match _icon /"\=\/.*\.gif"\=/ syntax match _icon /"\-"/ " separator syntax keyword _rules separator " prog and menu syntax keyword _ids menu prog " highlights highlight link _rules Underlined highlight link _ids Type highlight link _icon Special let b:current_syntax = "IceMenu" neovim-0.2.2/runtime/syntax/icon.vim000066400000000000000000000155001320401574200174650ustar00rootroot00000000000000" Vim syntax file " Language: Icon " Maintainer: Wendell Turner " URL: ftp://ftp.halcyon.com/pub/users/wturner/icon.vim " Last Change: 2003 May 11 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn keyword iconFunction abs acos any args asin atan bal syn keyword iconFunction callout center char chdir close collect copy syn keyword iconFunction cos cset delay delete detab display dtor syn keyword iconFunction entab errorclear exit exp find flush function syn keyword iconFunction get getch getche getenv iand icom image syn keyword iconFunction insert integer ior ishift ixor kbhit key syn keyword iconFunction left list loadfunc log many map match syn keyword iconFunction member move name numeric open ord pop syn keyword iconFunction pos proc pull push put read reads syn keyword iconFunction real remove rename repl reverse right rtod syn keyword iconFunction runerr save seek seq set sin sort syn keyword iconFunction sortf sqrt stop string system tab table syn keyword iconFunction tan trim type upto variable where write writes " Keywords syn match iconKeyword "&allocated" syn match iconKeyword "&ascii" syn match iconKeyword "&clock" syn match iconKeyword "&collections" syn match iconKeyword "&cset" syn match iconKeyword "¤t" syn match iconKeyword "&date" syn match iconKeyword "&dateline" syn match iconKeyword "&digits" syn match iconKeyword "&dump" syn match iconKeyword "&e" syn match iconKeyword "&error" syn match iconKeyword "&errornumber" syn match iconKeyword "&errortext" syn match iconKeyword "&errorvalue" syn match iconKeyword "&errout" syn match iconKeyword "&fail" syn match iconKeyword "&features" syn match iconKeyword "&file" syn match iconKeyword "&host" syn match iconKeyword "&input" syn match iconKeyword "&lcase" syn match iconKeyword "&letters" syn match iconKeyword "&level" syn match iconKeyword "&line" syn match iconKeyword "&main" syn match iconKeyword "&null" syn match iconKeyword "&output" syn match iconKeyword "&phi" syn match iconKeyword "&pi" syn match iconKeyword "&pos" syn match iconKeyword "&progname" syn match iconKeyword "&random" syn match iconKeyword "®ions" syn match iconKeyword "&source" syn match iconKeyword "&storage" syn match iconKeyword "&subject" syn match iconKeyword "&time" syn match iconKeyword "&trace" syn match iconKeyword "&ucase" syn match iconKeyword "&version" " Reserved words syn keyword iconReserved break by case create default do syn keyword iconReserved else end every fail if syn keyword iconReserved initial link next not of syn keyword iconReserved procedure repeat return suspend syn keyword iconReserved then to until while " Storage class reserved words syn keyword iconStorageClass global static local record syn keyword iconTodo contained TODO FIXME XXX BUG " String and Character constants " Highlight special characters (those which have a backslash) differently syn match iconSpecial contained "\\x\x\{2}\|\\\o\{3\}\|\\[bdeflnrtv\"\'\\]\|\\^c[a-zA-Z0-9]\|\\$" syn region iconString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=iconSpecial syn region iconCset start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=iconSpecial syn match iconCharacter "'[^\\]'" " not sure about these "syn match iconSpecialCharacter "'\\[bdeflnrtv]'" "syn match iconSpecialCharacter "'\\\o\{3\}'" "syn match iconSpecialCharacter "'\\x\x\{2}'" "syn match iconSpecialCharacter "'\\^c\[a-zA-Z0-9]'" "when wanted, highlight trailing white space if exists("icon_space_errors") syn match iconSpaceError "\s*$" syn match iconSpaceError " \+\t"me=e-1 endif "catch errors caused by wrong parenthesis syn cluster iconParenGroup contains=iconParenError,iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField syn region iconParen transparent start='(' end=')' contains=ALLBUT,@iconParenGroup syn match iconParenError ")" syn match iconInParen contained "[{}]" syn case ignore "integer number, or floating point number without a dot syn match iconNumber "\<\d\+\>" "floating point number, with dot, optional exponent syn match iconFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\>" "floating point number, starting with a dot, optional exponent syn match iconFloat "\.\d\+\(e[-+]\=\d\+\)\=\>" "floating point number, without dot, with exponent syn match iconFloat "\<\d\+e[-+]\=\d\+\>" "radix number syn match iconRadix "\<\d\{1,2}[rR][a-zA-Z0-9]\+\>" " syn match iconIdentifier "\<[a-z_][a-z0-9_]*\>" syn case match " Comment syn match iconComment "#.*" contains=iconTodo,iconSpaceError syn region iconPreCondit start="^\s*$\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=iconComment,iconString,iconCharacter,iconNumber,iconCommentError,iconSpaceError syn region iconIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match iconIncluded contained "<[^>]*>" syn match iconInclude "^\s*$\s*include\>\s*["<]" contains=iconIncluded "syn match iconLineSkip "\\$" syn cluster iconPreProcGroup contains=iconPreCondit,iconIncluded,iconInclude,iconDefine,iconInParen,iconUserLabel syn region iconDefine start="^\s*$\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,@iconPreProcGroup "wt:syn region iconPreProc "start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" "end="$" contains=ALLBUT,@iconPreProcGroup " Highlight User Labels " syn cluster iconMultiGroup contains=iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField if !exists("icon_minlines") let icon_minlines = 15 endif exec "syn sync ccomment iconComment minlines=" . icon_minlines " Define the default highlighting. " Only when an item doesn't have highlighting " The default methods for highlighting. Can be overridden later " hi def link iconSpecialCharacter iconSpecial hi def link iconOctalError iconError hi def link iconParenError iconError hi def link iconInParen iconError hi def link iconCommentError iconError hi def link iconSpaceError iconError hi def link iconCommentError iconError hi def link iconIncluded iconString hi def link iconCommentString iconString hi def link iconComment2String iconString hi def link iconCommentSkip iconComment hi def link iconUserLabel Label hi def link iconCharacter Character hi def link iconNumber Number hi def link iconRadix Number hi def link iconFloat Float hi def link iconInclude Include hi def link iconPreProc PreProc hi def link iconDefine Macro hi def link iconError Error hi def link iconStatement Statement hi def link iconPreCondit PreCondit hi def link iconString String hi def link iconCset String hi def link iconComment Comment hi def link iconSpecial SpecialChar hi def link iconTodo Todo hi def link iconStorageClass StorageClass hi def link iconFunction Statement hi def link iconReserved Label hi def link iconKeyword Operator "hi def link iconIdentifier Identifier let b:current_syntax = "icon" neovim-0.2.2/runtime/syntax/idl.vim000066400000000000000000000466751320401574200173260ustar00rootroot00000000000000" Vim syntax file " Language: IDL (Interface Description Language) " Created By: Jody Goldberg " Maintainer: Michael Geddes " Last Change: 2012 Jan 11 " This is an experiment. IDL's structure is simple enough to permit a full " grammar based approach to rather than using a few heuristics. The result " is large and somewhat repetative but seems to work. " There are some Microsoft extensions to idl files that are here. Some of " them are disabled by defining idl_no_ms_extensions. " " The more complex of the extensions are disabled by defining idl_no_extensions. " " History: " 2.0: Michael's new version " 2.1: Support for Vim 7 spell (Anduin Withers) " if exists("b:current_syntax") finish endif let s:cpo_save = &cpo try set cpo&vim if exists("idlsyntax_showerror") syn match idlError +\S+ skipwhite skipempty nextgroup=idlError endif syn region idlCppQuote start='\]*>" syn match idlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=idlIncluded,idlString syn region idlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=idlComment,idlCommentError syn region idlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=idlLiteral,idlString " Constants syn keyword idlConst const skipempty skipwhite nextgroup=idlBaseType,idlBaseTypeInt " Attribute syn keyword idlROAttr readonly skipempty skipwhite nextgroup=idlAttr syn keyword idlAttr attribute skipempty skipwhite nextgroup=idlBaseTypeInt,idlBaseType " Types syn region idlD4 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlSeqType,idlBaseTypeInt,idlBaseType,idlLiteral syn keyword idlSeqType contained sequence skipempty skipwhite nextgroup=idlD4 syn keyword idlBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlSimpDecl syn keyword idlBaseTypeInt contained short long skipempty skipwhite nextgroup=idlSimpDecl syn keyword idlBaseType contained unsigned skipempty skipwhite nextgroup=idlBaseTypeInt syn region idlD1 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlString,idlLiteral syn keyword idlBaseType contained string skipempty skipwhite nextgroup=idlD1,idlSimpDecl syn match idlBaseType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlSimpDecl " Modules syn region idlModuleContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=idlUnion,idlStruct,idlEnum,idlInterface,idlComment,idlTypedef,idlConst,idlException,idlModule syn match idlModuleName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlModuleContent,idlError,idlSemiColon syn keyword idlModule module skipempty skipwhite nextgroup=idlModuleName " Interfaces syn cluster idlCommentable contains=idlComment syn cluster idlContentCluster contains=idlUnion,idlStruct,idlEnum,idlROAttr,idlAttr,idlOp,idlOneWayOp,idlException,idlConst,idlTypedef,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlInterfaceSections syn region idlInterfaceContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable syn match idlInheritFrom2 contained "," skipempty skipwhite nextgroup=idlInheritFrom syn match idlInheritFrom contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlInheritFrom2,idlInterfaceContent syn match idlInherit contained ":" skipempty skipwhite nextgroup=idlInheritFrom syn match idlInterfaceName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlInterfaceContent,idlInherit,idlError,idlSemiColon syn keyword idlInterface interface dispinterface skipempty skipwhite nextgroup=idlInterfaceName syn keyword idlInterfaceSections contained properties methods skipempty skipwhite nextgroup=idlSectionColon,idlError syn match idlSectionColon contained ":" syn match idlLibraryName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlLibraryContent,idlError,idlSemiColon syn keyword idlLibrary library skipempty skipwhite nextgroup=idlLibraryName syn region idlLibraryContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlCommentable,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlImportlib,idlCoclass,idlTypedef,idlInterface syn keyword idlImportlib contained importlib skipempty skipwhite nextgroup=idlStringArg syn region idlStringArg contained start="(" end=")" contains=idlString nextgroup=idlError,idlSemiColon,idlErrorBrace,idlErrorSquareBracket syn keyword idlCoclass coclass contained skipempty skipwhite nextgroup=idlCoclassName syn match idlCoclassName "[a-zA-Z0-9_]\+" contained skipempty skipwhite nextgroup=idlCoclassDefinition,idlError,idlSemiColon syn region idlCoclassDefinition contained start="{" end="}" contains=idlCoclassAttributes,idlInterface,idlErrorBracket,idlErrorSquareBracket skipempty skipwhite nextgroup=idlError,idlSemiColon syn region idlCoclassAttributes contained start=+\[+ end=+]+ skipempty skipwhite nextgroup=idlInterface contains=idlErrorBracket,idlErrorBrace,idlCoclassAttribute syn keyword idlCoclassAttribute contained default source "syn keyword idlInterface interface skipempty skipwhite nextgroup=idlInterfaceStubName syn match idlImportString +"\f\+"+ skipempty skipwhite nextgroup=idlError,idlSemiColon syn keyword idlImport import skipempty skipwhite nextgroup=idlImportString syn region idlAttributes start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace,idlComment syn keyword idlAttribute contained propput propget propputref id helpstring object uuid pointer_default if !exists('idl_no_ms_extensions') syn keyword idlAttribute contained nonextensible dual version aggregatable restricted hidden noncreatable oleautomation endif syn region idlAttributeParam contained start="(" end=")" contains=idlString,idlUuid,idlLiteral,idlErrorBrace,idlErrorSquareBracket " skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral syn match idlErrorBrace contained "}" syn match idlErrorBracket contained ")" syn match idlErrorSquareBracket contained "\]" syn match idlUuid contained +[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}+ " Raises syn keyword idlRaises contained raises skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon " Context syn keyword idlContext contained context skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon " Operation syn match idlParmList contained "," skipempty skipwhite nextgroup=idlOpParms syn region idlArraySize contained start="\[" end="\]" skipempty skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral syn match idlParmName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlParmList,idlArraySize syn keyword idlParmInt contained short long skipempty skipwhite nextgroup=idlParmName syn keyword idlParmType contained unsigned skipempty skipwhite nextgroup=idlParmInt syn region idlD3 contained start="<" end=">" skipempty skipwhite nextgroup=idlParmName contains=idlString,idlLiteral syn keyword idlParmType contained string skipempty skipwhite nextgroup=idlD3,idlParmName syn keyword idlParmType contained void float double char boolean octet any skipempty skipwhite nextgroup=idlParmName syn match idlParmType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlParmName syn keyword idlOpParms contained in out inout skipempty skipwhite nextgroup=idlParmType if !exists('idl_no_ms_extensions') syn keyword idlOpParms contained retval optional skipempty skipwhite nextgroup=idlParmType syn match idlOpParms contained +\<\(iid_is\|defaultvalue\)\s*([^)]*)+ skipempty skipwhite nextgroup=idlParamType syn keyword idlVariantType contained BSTR VARIANT VARIANT_BOOL long short unsigned double CURRENCY DATE syn region idlSafeArray contained matchgroup=idlVariantType start=+SAFEARRAY(\s*+ end=+)+ contains=idlVariantType endif syn region idlOpContents contained start="(" end=")" skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon contains=idlOpParms,idlSafeArray,idlVariantType,@idlCommentable syn match idlOpName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlOpContents syn keyword idlOpInt contained short long skipempty skipwhite nextgroup=idlOpName syn region idlD2 contained start="<" end=">" skipempty skipwhite nextgroup=idlOpName contains=idlString,idlLiteral syn keyword idlOp contained unsigned skipempty skipwhite nextgroup=idlOpInt syn keyword idlOp contained string skipempty skipwhite nextgroup=idlD2,idlOpName syn keyword idlOp contained void float double char boolean octet any skipempty skipwhite nextgroup=idlOpName syn match idlOp contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlOpName syn keyword idlOp contained void skipempty skipwhite nextgroup=idlOpName syn keyword idlOneWayOp contained oneway skipempty skipwhite nextgroup=idOp " Enum syn region idlEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlId,idlAttributes,@idlCommentable syn match idlEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlEnumContents syn keyword idlEnum enum skipempty skipwhite nextgroup=idlEnumName,idlEnumContents " Typedef syn keyword idlTypedef typedef skipempty skipwhite nextgroup=idlTypedefOtherTypeQualifier,idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError if !exists('idl_no_extensions') syn keyword idlTypedefOtherTypeQualifier contained struct enum interface nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError skipwhite syn region idlDefAttributes contained start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace skipempty skipwhite nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlError syn keyword idlDefBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlTypedefDecl,idlError syn keyword idlDefBaseTypeInt contained short long skipempty skipwhite nextgroup=idlTypedefDecl,idlError syn match idlDefOtherType contained +\<\k\+\>+ skipempty nextgroup=idlTypedefDecl,idlError " syn keyword idlDefSeqType contained sequence skipempty skipwhite nextgroup=idlD4 " Enum typedef syn keyword idlDefEnum contained enum skipempty skipwhite nextgroup=idlDefEnumName,idlDefEnumContents syn match idlDefEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlDefEnumContents,idlTypedefDecl syn region idlDefEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlTypedefDecl contains=idlId,idlAttributes syn match idlTypedefDecl contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlError,idlSemiColon endif " Struct syn region idlStructContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlBaseType,idlBaseTypeInt,idlSeqType,@idlCommentable,idlEnum,idlUnion syn match idlStructName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlStructContent syn keyword idlStruct struct skipempty skipwhite nextgroup=idlStructName " Exception syn keyword idlException exception skipempty skipwhite nextgroup=idlStructName " Union syn match idlColon contained ":" skipempty skipwhite nextgroup=idlCase,idlSeqType,idlBaseType,idlBaseTypeInt syn region idlCaseLabel contained start="" skip="::" end=":"me=e-1 skipempty skipwhite nextgroup=idlColon contains=idlLiteral,idlString syn keyword idlCase contained case skipempty skipwhite nextgroup=idlCaseLabel syn keyword idlCase contained default skipempty skipwhite nextgroup=idlColon syn region idlUnionContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlCase syn region idlSwitchType contained start="(" end=")" skipempty skipwhite nextgroup=idlUnionContent syn keyword idlUnionSwitch contained switch skipempty skipwhite nextgroup=idlSwitchType syn match idlUnionName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlUnionSwitch syn keyword idlUnion union skipempty skipwhite nextgroup=idlUnionName if !exists('idl_no_extensions') syn sync match idlInterfaceSync grouphere idlInterfaceContent "\<\(disp\)\=interface\>\s\+\k\+\s*:\s*\k\+\_s*{" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable syn sync maxlines=1000 minlines=100 else syn sync lines=200 endif " syn sync fromstart if !exists("did_idl_syntax_inits") let did_idl_syntax_inits = 1 " The default methods for highlighting. Can be overridden later hi def link idlInclude Include hi def link idlPreProc PreProc hi def link idlPreCondit PreCondit hi def link idlDefine Macro hi def link idlIncluded String hi def link idlString String hi def link idlComment Comment hi def link idlTodo Todo hi def link idlLiteral Number hi def link idlUuid Number hi def link idlType Type hi def link idlVariantType idlType hi def link idlModule Keyword hi def link idlInterface Keyword hi def link idlEnum Keyword hi def link idlStruct Keyword hi def link idlUnion Keyword hi def link idlTypedef Keyword hi def link idlException Keyword hi def link idlTypedefOtherTypeQualifier keyword hi def link idlModuleName Typedef hi def link idlInterfaceName Typedef hi def link idlEnumName Typedef hi def link idlStructName Typedef hi def link idlUnionName Typedef hi def link idlBaseTypeInt idlType hi def link idlBaseType idlType hi def link idlSeqType idlType hi def link idlD1 Paren hi def link idlD2 Paren hi def link idlD3 Paren hi def link idlD4 Paren "hi def link idlArraySize Paren "hi def link idlArraySize1 Paren hi def link idlModuleContent Paren hi def link idlUnionContent Paren hi def link idlStructContent Paren hi def link idlEnumContents Paren hi def link idlInterfaceContent Paren hi def link idlSimpDecl Identifier hi def link idlROAttr StorageClass hi def link idlAttr Keyword hi def link idlConst StorageClass hi def link idlOneWayOp StorageClass hi def link idlOp idlType hi def link idlParmType idlType hi def link idlOpName Function hi def link idlOpParms SpecialComment hi def link idlParmName Identifier hi def link idlInheritFrom Identifier hi def link idlAttribute SpecialComment hi def link idlId Constant "hi def link idlCase Keyword hi def link idlCaseLabel Constant hi def link idlErrorBracket Error hi def link idlErrorBrace Error hi def link idlErrorSquareBracket Error hi def link idlImport Keyword hi def link idlImportString idlString hi def link idlCoclassAttribute StorageClass hi def link idlLibrary Keyword hi def link idlImportlib Keyword hi def link idlCoclass Keyword hi def link idlLibraryName Typedef hi def link idlCoclassName Typedef " hi def link idlLibraryContent guifg=red hi def link idlTypedefDecl Typedef hi def link idlDefEnum Keyword hi def link idlDefv1Enum Keyword hi def link idlDefEnumName Typedef hi def link idlDefEnumContents Paren hi def link idlDefBaseTypeInt idlType hi def link idlDefBaseType idlType hi def link idlDefSeqType idlType hi def link idlInterfaceSections Label if exists("idlsyntax_showerror") if exists("idlsyntax_showerror_soft") hi default idlError guibg=#d0ffd0 else hi def link idlError Error endif endif endif let b:current_syntax = "idl" finally let &cpo = s:cpo_save unlet s:cpo_save endtry " vim: sw=2 et neovim-0.2.2/runtime/syntax/idlang.vim000066400000000000000000000322261320401574200177770ustar00rootroot00000000000000" Interactive Data Language syntax file (IDL, too [:-)] " Maintainer: Aleksandar Jelenak " Last change: 2011 Apr 11 " Created by: Hermann Rochholz " Remove any old syntax stuff hanging around " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syntax case ignore syn match idlangStatement "^\s*pro\s" syn match idlangStatement "^\s*function\s" syn keyword idlangStatement return continue mod do break syn keyword idlangStatement compile_opt forward_function goto syn keyword idlangStatement begin common end of syn keyword idlangStatement inherits on_ioerror begin syn keyword idlangConditional if else then for while case switch syn keyword idlangConditional endcase endelse endfor endswitch syn keyword idlangConditional endif endrep endwhile repeat until syn match idlangOperator "\ and\ " syn match idlangOperator "\ eq\ " syn match idlangOperator "\ ge\ " syn match idlangOperator "\ gt\ " syn match idlangOperator "\ le\ " syn match idlangOperator "\ lt\ " syn match idlangOperator "\ ne\ " syn match idlangOperator /\(\ \|(\)not\ /hs=e-3 syn match idlangOperator "\ or\ " syn match idlangOperator "\ xor\ " syn keyword idlangStop stop pause syn match idlangStrucvar "\h\w*\(\.\h\w*\)\+" syn match idlangStrucvar "[),\]]\(\.\h\w*\)\+"hs=s+1 syn match idlangSystem "\!\a\w*\(\.\w*\)\=" syn match idlangKeyword "\([(,]\s*\(\$\_s*\)\=\)\@<=/\h\w*" syn match idlangKeyword "\([(,]\s*\(\$\_s*\)\=\)\@<=\h\w*\s*=" syn keyword idlangTodo contained TODO syn region idlangString start=+"+ end=+"+ syn region idlangString start=+'+ end=+'+ syn match idlangPreCondit "^\s*@\w*\(\.\a\{3}\)\=" syn match idlangRealNumber "\<\d\+\(\.\=\d*e[+-]\=\d\+\|\.\d*d\|\.\d*\|d\)" syn match idlangRealNumber "\.\d\+\(d\|e[+-]\=\d\+\)\=" syn match idlangNumber "\<\.\@!\d\+\.\@!\(b\|u\|us\|s\|l\|ul\|ll\|ull\)\=\>" syn match idlangComment "[\;].*$" contains=idlangTodo syn match idlangContinueLine "\$\s*\($\|;\)"he=s+1 contains=idlangComment syn match idlangContinueLine "&\s*\(\h\|;\)"he=s+1 contains=ALL syn match idlangDblCommaError "\,\s*\," " List of standard routines as of IDL version 5.4. syn match idlangRoutine "EOS_\a*" syn match idlangRoutine "HDF_\a*" syn match idlangRoutine "CDF_\a*" syn match idlangRoutine "NCDF_\a*" syn match idlangRoutine "QUERY_\a*" syn match idlangRoutine "\ " Latest Revision: 2010-01-23 " indent_is_bsd: If exists, will change somewhat to match BSD implementation " " TODO: is the deny-all (a la lilo.vim nice or no?)... " irritating to be wrong to the last char... " would be sweet if right until one char fails if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=-,+ syn match indentError '\S\+' syn keyword indentTodo contained TODO FIXME XXX NOTE syn region indentComment start='/\*' end='\*/' \ contains=indentTodo,@Spell syn region indentComment start='//' skip='\\$' end='$' \ contains=indentTodo,@Spell if !exists("indent_is_bsd") syn match indentOptions '-i\|--indentation-level\|-il\|--indent-level' \ nextgroup=indentNumber skipwhite skipempty endif syn match indentOptions '-\%(bli\|c\%([bl]i\|[dip]\)\=\|di\=\|ip\=\|lc\=\|pp\=i\|sbi\|ts\|-\%(brace-indent\|comment-indentation\|case-brace-indentation\|declaration-comment-column\|continuation-indentation\|case-indentation\|else-endif-column\|line-comments-indentation\|declaration-indentation\|indent-level\|parameter-indentation\|line-length\|comment-line-length\|paren-indentation\|preprocessor-indentation\|struct-brace-indentation\|tab-size\)\)' \ nextgroup=indentNumber skipwhite skipempty syn match indentNumber display contained '\d\+\>' syn match indentOptions '-T' \ nextgroup=indentIdent skipwhite skipempty syn match indentIdent display contained '\h\w*\>' syn keyword indentOptions -bacc --blank-lines-after-ifdefs \ -bad --blank-lines-after-declarations \ -badp --blank-lines-after-procedure-declarations \ -bap --blank-lines-after-procedures \ -bbb --blank-lines-before-block-comments \ -bbo --break-before-boolean-operator \ -bc --blank-lines-after-commas \ -bfda --break-function-decl-args \ -bfde --break-function-decl-args-end \ -bl --braces-after-if-line \ -blf --braces-after-func-def-line \ -bls --braces-after-struct-decl-line \ -br --braces-on-if-line \ -brf --braces-on-func-def-line \ -brs --braces-on-struct-decl-line \ -bs --Bill-Shannon --blank-before-sizeof \ -c++ --c-plus-plus \ -cdb --comment-delimiters-on-blank-lines \ -cdw --cuddle-do-while \ -ce --cuddle-else \ -cs --space-after-cast \ -dj --left-justify-declarations \ -eei --extra-expression-indentation \ -fc1 --format-first-column-comments \ -fca --format-all-comments \ -gnu --gnu-style \ -h --help --usage \ -hnl --honour-newlines \ -kr --k-and-r-style --kernighan-and-ritchie --kernighan-and-ritchie-style \ -lp --continue-at-parentheses \ -lps --leave-preprocessor-space \ -nbacc --no-blank-lines-after-ifdefs \ -nbad --no-blank-lines-after-declarations \ -nbadp --no-blank-lines-after-procedure-declarations \ -nbap --no-blank-lines-after-procedures \ -nbbb --no-blank-lines-before-block-comments \ -nbbo --break-after-boolean-operator \ -nbc --no-blank-lines-after-commas \ -nbfda --dont-break-function-decl-args \ -nbfde --dont-break-function-decl-args-end \ -nbs --no-Bill-Shannon --no-blank-before-sizeof \ -ncdb --no-comment-delimiters-on-blank-lines \ -ncdw --dont-cuddle-do-while \ -nce --dont-cuddle-else \ -ncs --no-space-after-casts \ -ndj --dont-left-justify-declarations \ -neei --no-extra-expression-indentation \ -nfc1 --dont-format-first-column-comments \ -nfca --dont-format-comments \ -nhnl --ignore-newlines \ -nip --dont-indent-parameters --no-parameter-indentation \ -nlp --dont-line-up-parentheses \ -nlps --remove-preprocessor-space \ -npcs --no-space-after-function-call-names \ -npmt \ -npro --ignore-profile \ -nprs --no-space-after-parentheses \ -npsl --dont-break-procedure-type \ -nsaf --no-space-after-for \ -nsai --no-space-after-if \ -nsaw --no-space-after-while \ -nsc --dont-star-comments \ -nsob --leave-optional-blank-lines \ -nss --dont-space-special-semicolon \ -nut --no-tabs \ -nv --no-verbosity \ -o --output \ -o --output-file \ -orig --berkeley --berkeley-style --original --original-style \ -pcs --space-after-procedure-calls \ -pmt --preserve-mtime \ -prs --space-after-parentheses \ -psl --procnames-start-lines \ -saf --space-after-for \ -sai --space-after-if \ -saw --space-after-while \ -sc --start-left-side-of-comments \ -sob --swallow-optional-blank-lines \ -ss --space-special-semicolon \ -st --standard-output \ -ut --use-tabs \ -v --verbose \ -version --version \ -linux --linux-style if exists("indent_is_bsd") syn keyword indentOptions -ip -ei -nei endif if exists("c_minlines") let b:c_minlines = c_minlines else if !exists("c_no_if0") let b:c_minlines = 50 " #if 0 constructs can be long else let b:c_minlines = 15 " mostly for () constructs endif endif hi def link indentError Error hi def link indentComment Comment hi def link indentTodo Todo hi def link indentOptions Keyword hi def link indentNumber Number hi def link indentIdent Identifier let b:current_syntax = "indent" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/inform.vim000066400000000000000000000460331320401574200200340ustar00rootroot00000000000000" Vim syntax file " Language: Inform " Maintainer: Stephen Thomas (stephen@gowarthomas.com) " URL: http://www.gowarthomas.com/informvim " Last Change: 2006 April 20 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " A bunch of useful Inform keywords. First, case insensitive stuff syn case ignore syn keyword informDefine Constant syn keyword informType Array Attribute Class Nearby syn keyword informType Object Property String Routine syn match informType "\" syn keyword informInclude Import Include Link Replace System_file syn keyword informPreCondit End Endif Ifdef Ifndef Iftrue Iffalse Ifv3 Ifv5 syn keyword informPreCondit Ifnot syn keyword informPreProc Abbreviate Default Fake_action Lowstring syn keyword informPreProc Message Release Serial Statusline Stub Switches syn keyword informPreProc Trace Zcharacter syn region informGlobalRegion matchgroup=informType start="\" matchgroup=NONE skip=+!.*$\|".*"\|'.*'+ end=";" contains=ALLBUT,informGramPreProc,informPredicate,informGrammar,informAsm,informAsmObsolete syn keyword informGramPreProc contained Verb Extend if !exists("inform_highlight_simple") syn keyword informLibAttrib absent animate clothing concealed container syn keyword informLibAttrib door edible enterable female general light syn keyword informLibAttrib lockable locked male moved neuter on open syn keyword informLibAttrib openable pluralname proper scenery scored syn keyword informLibAttrib static supporter switchable talkable syn keyword informLibAttrib visited workflag worn syn match informLibAttrib "\" syn keyword informLibProp e_to se_to s_to sw_to w_to nw_to n_to ne_to syn keyword informLibProp u_to d_to in_to out_to before after life syn keyword informLibProp door_to with_key door_dir invent plural syn keyword informLibProp add_to_scope list_together react_before syn keyword informLibProp react_after grammar orders initial when_open syn keyword informLibProp when_closed when_on when_off description syn keyword informLibProp describe article cant_go found_in time_left syn keyword informLibProp number time_out daemon each_turn capacity syn keyword informLibProp name short_name short_name_indef parse_name syn keyword informLibProp articles inside_description if !exists("inform_highlight_old") syn keyword informLibProp compass_look before_implicit syn keyword informLibProp ext_initialise ext_messages endif syn keyword informLibObj e_obj se_obj s_obj sw_obj w_obj nw_obj n_obj syn keyword informLibObj ne_obj u_obj d_obj in_obj out_obj compass syn keyword informLibObj thedark selfobj player location second actor syn keyword informLibObj noun if !exists("inform_highlight_old") syn keyword informLibObj LibraryExtensions endif syn keyword informLibRoutine Achieved AfterRoutines AddToScope syn keyword informLibRoutine AllowPushDir Banner ChangeDefault syn keyword informLibRoutine ChangePlayer CommonAncestor DictionaryLookup syn keyword informLibRoutine DisplayStatus DoMenu DrawStatusLine syn keyword informLibRoutine EnglishNumber HasLightSource GetGNAOfObject syn keyword informLibRoutine IndirectlyContains IsSeeThrough Locale syn keyword informLibRoutine LoopOverScope LTI_Insert MoveFloatingObjects syn keyword informLibRoutine NextWord NextWordStopped NounDomain syn keyword informLibRoutine ObjectIsUntouchable OffersLight ParseToken syn keyword informLibRoutine PlaceInScope PlayerTo PrintShortName syn keyword informLibRoutine PronounNotice ScopeWithin SetPronoun SetTime syn keyword informLibRoutine StartDaemon StartTimer StopDaemon StopTimer syn keyword informLibRoutine TestScope TryNumber UnsignedCompare syn keyword informLibRoutine WordAddress WordInProperty WordLength syn keyword informLibRoutine WriteListFrom YesOrNo ZRegion RunRoutines syn keyword informLibRoutine AfterLife AfterPrompt Amusing BeforeParsing syn keyword informLibRoutine ChooseObjects DarkToDark DeathMessage syn keyword informLibRoutine GamePostRoutine GamePreRoutine Initialise syn keyword informLibRoutine InScope LookRoutine NewRoom ParseNoun syn keyword informLibRoutine ParseNumber ParserError PrintRank PrintVerb syn keyword informLibRoutine PrintTaskName TimePasses UnknownVerb if exists("inform_highlight_glulx") syn keyword informLibRoutine IdentifyGlkObject HandleGlkEvent syn keyword informLibRoutine InitGlkWindow endif if !exists("inform_highlight_old") syn keyword informLibRoutine KeyCharPrimitive KeyDelay ClearScreen syn keyword informLibRoutine MoveCursor MainWindow StatusLineHeight syn keyword informLibRoutine ScreenWidth ScreenHeight SetColour syn keyword informLibRoutine DecimalNumber PrintToBuffer Length syn keyword informLibRoutine UpperCase LowerCase PrintCapitalised syn keyword informLibRoutine Cap Centre if exists("inform_highlight_glulx") syn keyword informLibRoutine PrintAnything PrintAnyToArray endif endif syn keyword informLibAction Quit Restart Restore Verify Save syn keyword informLibAction ScriptOn ScriptOff Pronouns Score syn keyword informLibAction Fullscore LMode1 LMode2 LMode3 syn keyword informLibAction NotifyOn NotifyOff Version Places syn keyword informLibAction Objects TraceOn TraceOff TraceLevel syn keyword informLibAction ActionsOn ActionsOff RoutinesOn syn keyword informLibAction RoutinesOff TimersOn TimersOff syn keyword informLibAction CommandsOn CommandsOff CommandsRead syn keyword informLibAction Predictable XPurloin XAbstract XTree syn keyword informLibAction Scope Goto Gonear Inv InvTall InvWide syn keyword informLibAction Take Drop Remove PutOn Insert Transfer syn keyword informLibAction Empty Enter Exit GetOff Go Goin Look syn keyword informLibAction Examine Search Give Show Unlock Lock syn keyword informLibAction SwitchOn SwitchOff Open Close Disrobe syn keyword informLibAction Wear Eat Yes No Burn Pray Wake syn keyword informLibAction WakeOther Consult Kiss Think Smell syn keyword informLibAction Listen Taste Touch Dig Cut Jump syn keyword informLibAction JumpOver Tie Drink Fill Sorry Strong syn keyword informLibAction Mild Attack Swim Swing Blow Rub Set syn keyword informLibAction SetTo WaveHands Wave Pull Push PushDir syn keyword informLibAction Turn Squeeze LookUnder ThrowAt Tell syn keyword informLibAction Answer Buy Ask AskFor Sing Climb Wait syn keyword informLibAction Sleep LetGo Receive ThrownAt Order syn keyword informLibAction TheSame PluralFound Miscellany Prompt syn keyword informLibAction ChangesOn ChangesOff Showverb Showobj syn keyword informLibAction EmptyT VagueGo if exists("inform_highlight_glulx") syn keyword informLibAction GlkList endif syn keyword informLibVariable keep_silent deadflag action special_number syn keyword informLibVariable consult_from consult_words etype verb_num syn keyword informLibVariable verb_word the_time real_location c_style syn keyword informLibVariable parser_one parser_two listing_together wn syn keyword informLibVariable parser_action scope_stage scope_reason syn keyword informLibVariable action_to_be menu_item item_name item_width syn keyword informLibVariable lm_o lm_n inventory_style task_scores syn keyword informLibVariable inventory_stage syn keyword informLibConst AMUSING_PROVIDED DEBUG Headline MAX_CARRIED syn keyword informLibConst MAX_SCORE MAX_TIMERS NO_PLACES NUMBER_TASKS syn keyword informLibConst OBJECT_SCORE ROOM_SCORE SACK_OBJECT Story syn keyword informLibConst TASKS_PROVIDED WITHOUT_DIRECTIONS syn keyword informLibConst NEWLINE_BIT INDENT_BIT FULLINV_BIT ENGLISH_BIT syn keyword informLibConst RECURSE_BIT ALWAYS_BIT TERSE_BIT PARTINV_BIT syn keyword informLibConst DEFART_BIT WORKFLAG_BIT ISARE_BIT CONCEAL_BIT syn keyword informLibConst PARSING_REASON TALKING_REASON EACHTURN_REASON syn keyword informLibConst REACT_BEFORE_REASON REACT_AFTER_REASON syn keyword informLibConst TESTSCOPE_REASON LOOPOVERSCOPE_REASON syn keyword informLibConst STUCK_PE UPTO_PE NUMBER_PE CANTSEE_PE TOOLIT_PE syn keyword informLibConst NOTHELD_PE MULTI_PE MMULTI_PE VAGUE_PE EXCEPT_PE syn keyword informLibConst ANIMA_PE VERB_PE SCENERY_PE ITGONE_PE syn keyword informLibConst JUNKAFTER_PE TOOFEW_PE NOTHING_PE ASKSCOPE_PE if !exists("inform_highlight_old") syn keyword informLibConst WORDSIZE TARGET_ZCODE TARGET_GLULX syn keyword informLibConst LIBRARY_PARSER LIBRARY_VERBLIB LIBRARY_GRAMMAR syn keyword informLibConst LIBRARY_ENGLISH NO_SCORE START_MOVE syn keyword informLibConst CLR_DEFAULT CLR_BLACK CLR_RED CLR_GREEN syn keyword informLibConst CLR_YELLOW CLR_BLUE CLR_MAGENTA CLR_CYAN syn keyword informLibConst CLR_WHITE CLR_PURPLE CLR_AZURE syn keyword informLibConst WIN_ALL WIN_MAIN WIN_STATUS endif endif " Now the case sensitive stuff. syntax case match syn keyword informSysFunc child children elder indirect parent random syn keyword informSysFunc sibling younger youngest metaclass if exists("inform_highlight_glulx") syn keyword informSysFunc glk endif syn keyword informSysConst adjectives_table actions_table classes_table syn keyword informSysConst identifiers_table preactions_table version_number syn keyword informSysConst largest_object strings_offset code_offset syn keyword informSysConst dict_par1 dict_par2 dict_par3 syn keyword informSysConst actual_largest_object static_memory_offset syn keyword informSysConst array_names_offset readable_memory_offset syn keyword informSysConst cpv__start cpv__end ipv__start ipv__end syn keyword informSysConst array__start array__end lowest_attribute_number syn keyword informSysConst highest_attribute_number attribute_names_array syn keyword informSysConst lowest_property_number highest_property_number syn keyword informSysConst property_names_array lowest_action_number syn keyword informSysConst highest_action_number action_names_array syn keyword informSysConst lowest_fake_action_number highest_fake_action_number syn keyword informSysConst fake_action_names_array lowest_routine_number syn keyword informSysConst highest_routine_number routines_array syn keyword informSysConst routine_names_array routine_flags_array syn keyword informSysConst lowest_global_number highest_global_number globals_array syn keyword informSysConst global_names_array global_flags_array syn keyword informSysConst lowest_array_number highest_array_number arrays_array syn keyword informSysConst array_names_array array_flags_array lowest_constant_number syn keyword informSysConst highest_constant_number constants_array constant_names_array syn keyword informSysConst lowest_class_number highest_class_number class_objects_array syn keyword informSysConst lowest_object_number highest_object_number if !exists("inform_highlight_old") syn keyword informSysConst sys_statusline_flag endif syn keyword informConditional default else if switch syn keyword informRepeat break continue do for objectloop until while syn keyword informStatement box font give inversion jump move new_line syn keyword informStatement print print_ret quit read remove restore return syn keyword informStatement rfalse rtrue save spaces string style syn keyword informOperator roman reverse bold underline fixed on off to syn keyword informOperator near from syn keyword informKeyword dictionary symbols objects verbs assembly syn keyword informKeyword expressions lines tokens linker on off alias long syn keyword informKeyword additive score time string table syn keyword informKeyword with private has class error fatalerror syn keyword informKeyword warning self if !exists("inform_highlight_old") syn keyword informKeyword buffer endif syn keyword informMetaAttrib remaining create destroy recreate copy call syn keyword informMetaAttrib print_to_array syn keyword informPredicate has hasnt in notin ofclass or syn keyword informPredicate provides syn keyword informGrammar contained noun held multi multiheld multiexcept syn keyword informGrammar contained multiinside creature special number syn keyword informGrammar contained scope topic reverse meta only replace syn keyword informGrammar contained first last syn keyword informKeywordObsolete contained initial data initstr syn keyword informTodo contained TODO " Assembly language mnemonics must be preceded by a '@'. syn match informAsmContainer "@\s*\k*" contains=informAsm,informAsmObsolete if exists("inform_highlight_glulx") syn keyword informAsm contained nop add sub mul div mod neg bitand bitor syn keyword informAsm contained bitxor bitnot shiftl sshiftr ushiftr jump jz syn keyword informAsm contained jnz jeq jne jlt jge jgt jle jltu jgeu jgtu syn keyword informAsm contained jleu call return catch throw tailcall copy syn keyword informAsm contained copys copyb sexs sexb aload aloads aloadb syn keyword informAsm contained aloadbit astore astores astoreb astorebit syn keyword informAsm contained stkcount stkpeek stkswap stkroll stkcopy syn keyword informAsm contained streamchar streamnum streamstr gestalt syn keyword informAsm contained debugtrap getmemsize setmemsize jumpabs syn keyword informAsm contained random setrandom quit verify restart save syn keyword informAsm contained restore saveundo restoreundo protect glk syn keyword informAsm contained getstringtbl setstringtbl getiosys setiosys syn keyword informAsm contained linearsearch binarysearch linkedsearch syn keyword informAsm contained callf callfi callfii callfiii else syn keyword informAsm contained je jl jg dec_chk inc_chk jin test or and syn keyword informAsm contained test_attr set_attr clear_attr store syn keyword informAsm contained insert_obj loadw loadb get_prop syn keyword informAsm contained get_prop_addr get_next_prop add sub mul div syn keyword informAsm contained mod call storew storeb put_prop sread syn keyword informAsm contained print_num random push pull syn keyword informAsm contained split_window set_window output_stream syn keyword informAsm contained input_stream sound_effect jz get_sibling syn keyword informAsm contained get_child get_parent get_prop_len inc dec syn keyword informAsm contained remove_obj print_obj ret jump syn keyword informAsm contained load not rtrue rfalse print syn keyword informAsm contained print_ret nop save restore restart syn keyword informAsm contained ret_popped pop quit new_line show_status syn keyword informAsm contained verify call_2s call_vs aread call_vs2 syn keyword informAsm contained erase_window erase_line set_cursor get_cursor syn keyword informAsm contained set_text_style buffer_mode read_char syn keyword informAsm contained scan_table call_1s call_2n set_colour throw syn keyword informAsm contained call_vn call_vn2 tokenise encode_text syn keyword informAsm contained copy_table print_table check_arg_count syn keyword informAsm contained call_1n catch piracy log_shift art_shift syn keyword informAsm contained set_font save_undo restore_undo draw_picture syn keyword informAsm contained picture_data erase_picture set_margins syn keyword informAsm contained move_window window_size window_style syn keyword informAsm contained get_wind_prop scroll_window pop_stack syn keyword informAsm contained read_mouse mouse_window push_stack syn keyword informAsm contained put_wind_prop print_form make_menu syn keyword informAsm contained picture_table if !exists("inform_highlight_old") syn keyword informAsm contained check_unicode print_unicode endif syn keyword informAsmObsolete contained print_paddr print_addr print_char endif " Handling for different versions of VIM. setlocal iskeyword+=$ command -nargs=+ SynDisplay syntax display " Grammar sections. syn region informGrammarSection matchgroup=informGramPreProc start="\" skip=+".*"+ end=";"he=e-1 contains=ALLBUT,informAsm " Special character forms. SynDisplay match informBadAccent contained "@[^{[:digit:]]\D" SynDisplay match informBadAccent contained "@{[^}]*}" SynDisplay match informAccent contained "@:[aouAOUeiyEI]" SynDisplay match informAccent contained "@'[aeiouyAEIOUY]" SynDisplay match informAccent contained "@`[aeiouAEIOU]" SynDisplay match informAccent contained "@\^[aeiouAEIOU]" SynDisplay match informAccent contained "@\~[anoANO]" SynDisplay match informAccent contained "@/[oO]" SynDisplay match informAccent contained "@ss\|@<<\|@>>\|@oa\|@oA\|@ae\|@AE\|@cc\|@cC" SynDisplay match informAccent contained "@th\|@et\|@Th\|@Et\|@LL\|@oe\|@OE\|@!!\|@??" SynDisplay match informAccent contained "@{\x\{1,4}}" SynDisplay match informBadStrUnicode contained "@@\D" SynDisplay match informStringUnicode contained "@@\d\+" SynDisplay match informStringCode contained "@\d\d" " String and Character constants. Ordering is important here. syn region informString start=+"+ skip=+\\\\+ end=+"+ contains=informAccent,informStringUnicode,informStringCode,informBadAccent,informBadStrUnicode syn region informDictString start="'" end="'" contains=informAccent,informBadAccent SynDisplay match informBadDictString "''" SynDisplay match informDictString "'''" " Integer numbers: decimal, hexadecimal and binary. SynDisplay match informNumber "\<\d\+\>" SynDisplay match informNumber "\<\$\x\+\>" SynDisplay match informNumber "\<\$\$[01]\+\>" " Comments syn match informComment "!.*" contains=informTodo " Syncronization syn sync match informSyncStringEnd grouphere NONE /"[;,]\s*$/ syn sync match informSyncRoutineEnd grouphere NONE /][;,]\s*$/ syn sync match informSyncCommentEnd grouphere NONE /^\s*!.*$/ syn sync match informSyncRoutine groupthere informGrammarSection "\" syn sync maxlines=500 delcommand SynDisplay " The default highlighting. hi def link informDefine Define hi def link informType Type hi def link informInclude Include hi def link informPreCondit PreCondit hi def link informPreProc PreProc hi def link informGramPreProc PreProc hi def link informAsm Special if !exists("inform_suppress_obsolete") hi def link informAsmObsolete informError hi def link informKeywordObsolete informError else hi def link informAsmObsolete Special hi def link informKeywordObsolete Keyword endif hi def link informPredicate Operator hi def link informSysFunc Identifier hi def link informSysConst Identifier hi def link informConditional Conditional hi def link informRepeat Repeat hi def link informStatement Statement hi def link informOperator Operator hi def link informKeyword Keyword hi def link informGrammar Keyword hi def link informDictString String hi def link informNumber Number hi def link informError Error hi def link informString String hi def link informComment Comment hi def link informAccent Special hi def link informStringUnicode Special hi def link informStringCode Special hi def link informTodo Todo if !exists("inform_highlight_simple") hi def link informLibAttrib Identifier hi def link informLibProp Identifier hi def link informLibObj Identifier hi def link informLibRoutine Identifier hi def link informLibVariable Identifier hi def link informLibConst Identifier hi def link informLibAction Identifier endif hi def link informBadDictString informError hi def link informBadAccent informError hi def link informBadStrUnicode informError let b:current_syntax = "inform" " vim: ts=8 neovim-0.2.2/runtime/syntax/initex.vim000066400000000000000000000454301320401574200200420ustar00rootroot00000000000000" Vim syntax file " Language: TeX (core definition) " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " This follows the grouping (sort of) found at " http: //www.tug.org/utilities/plain/cseq.html#top-fam syn keyword initexTodo TODO FIXME XXX NOTE syn match initexComment display contains=initexTodo \ '\\\@' syn cluster initexBox \ contains=initexBoxCommand,initexBoxInternalQuantity, \ initexBoxParameterDimen,initexBoxParameterInteger, \ initexBoxParameterToken syn cluster initexCharacter \ contains=initexCharacterCommand,initexCharacterInternalQuantity, \ initexCharacterParameterInteger syn cluster initexDebugging \ contains=initexDebuggingCommand,initexDebuggingParameterInteger, \ initexDebuggingParameterToken syn cluster initexFileIO \ contains=initexFileIOCommand,initexFileIOInternalQuantity, \ initexFileIOParameterToken syn cluster initexFonts \ contains=initexFontsCommand,initexFontsInternalQuantity syn cluster initexGlue \ contains=initexGlueCommand,initexGlueDerivedCommand syn cluster initexHyphenation \ contains=initexHyphenationCommand,initexHyphenationDerivedCommand, \ initexHyphenationInternalQuantity,initexHyphenationParameterInteger syn cluster initexInserts \ contains=initexInsertsCommand,initexInsertsParameterDimen, \ initexInsertsParameterGlue,initexInsertsParameterInteger syn cluster initexJob \ contains=initexJobCommand,initexJobInternalQuantity, \ initexJobParameterInteger syn cluster initexKern \ contains=initexKernCommand,initexKernInternalQuantity syn cluster initexLogic \ contains=initexLogicCommand syn cluster initexMacro \ contains=initexMacroCommand,initexMacroDerivedCommand, \ initexMacroParameterInteger syn cluster initexMarks \ contains=initexMarksCommand syn cluster initexMath \ contains=initexMathCommand,initexMathDerivedCommand, \ initexMathInternalQuantity,initexMathParameterDimen, \ initexMathParameterGlue,initexMathParameterInteger, \ initexMathParameterMuglue,initexMathParameterToken syn cluster initexPage \ contains=initexPageInternalQuantity,initexPageParameterDimen, \ initexPageParameterGlue syn cluster initexParagraph \ contains=initexParagraphCommand,initexParagraphInternalQuantity, \ initexParagraphParameterDimen,initexParagraphParameterGlue, \ initexParagraphParameterInteger,initexParagraphParameterToken syn cluster initexPenalties \ contains=initexPenaltiesCommand,initexPenaltiesInternalQuantity, \ initexPenaltiesParameterInteger syn cluster initexRegisters \ contains=initexRegistersCommand,initexRegistersInternalQuantity syn cluster initexTables \ contains=initexTablesCommand,initexTablesParameterGlue, \ initexTablesParameterToken syn cluster initexCommand \ contains=initexBoxCommand,initexCharacterCommand, \ initexDebuggingCommand,initexFileIOCommand, \ initexFontsCommand,initexGlueCommand, \ initexHyphenationCommand,initexInsertsCommand, \ initexJobCommand,initexKernCommand,initexLogicCommand, \ initexMacroCommand,initexMarksCommand,initexMathCommand, \ initexParagraphCommand,initexPenaltiesCommand,initexRegistersCommand, \ initexTablesCommand syn match initexBoxCommand display contains=@NoSpell \ '\\\%([hv]\=box\|[cx]\=leaders\|copy\|[hv]rule\|lastbox\|setbox\|un[hv]\%(box\|copy\)\|vtop\)\>' syn match initexCharacterCommand display contains=@NoSpell \ '\\\%([] ]\|\%(^^M\|accent\|char\|\%(lower\|upper\)case\|number\|romannumeral\|string\)\>\)' syn match initexDebuggingCommand display contains=@NoSpell \ '\\\%(\%(batch\|\%(non\|error\)stop\|scroll\)mode\|\%(err\)\=message\|meaning\|show\%(box\%(breadth\|depth\)\=\|lists\|the\)\)\>' syn match initexFileIOCommand display contains=@NoSpell \ '\\\%(\%(close\|open\)\%(in\|out\)\|endinput\|immediate\|input\|read\|shipout\|special\|write\)\>' syn match initexFontsCommand display contains=@NoSpell \ '\\\%(/\|fontname\)\>' syn match initexGlueCommand display contains=@NoSpell \ '\\\%([hv]\|un\)skip\>' syn match initexHyphenationCommand display contains=@NoSpell \ '\\\%(discretionary\|hyphenation\|patterns\|setlanguage\)\>' syn match initexInsertsCommand display contains=@NoSpell \ '\\\%(insert\|split\%(bot\|first\)mark\|vsplit\)\>' syn match initexJobCommand display contains=@NoSpell \ '\\\%(dump\|end\|jobname\)\>' syn match initexKernCommand display contains=@NoSpell \ '\\\%(kern\|lower\|move\%(left\|right\)\|raise\|unkern\)\>' syn match initexLogicCommand display contains=@NoSpell \ '\\\%(else\|fi\|if[a-zA-Z@]\+\|or\)\>' " \ '\\\%(else\|fi\|if\%(case\|cat\|dim\|eof\|false\|[hv]box\|[hmv]mode\|inner\|num\|odd\|true\|void\|x\)\=\|or\)\>' syn match initexMacroCommand display contains=@NoSpell \ '\\\%(after\%(assignment\|group\)\|\%(begin\|end\)group\|\%(end\)\=csname\|e\=def\|expandafter\|futurelet\|global\|let\|long\|noexpand\|outer\|relax\|the\)\>' syn match initexMarksCommand display contains=@NoSpell \ '\\\%(bot\|first\|top\)\=mark\>' syn match initexMathCommand display contains=@NoSpell \ '\\\%(abovewithdelims\|delimiter\|display\%(limits\|style\)\|l\=eqno\|left\|\%(no\)\=limits\|math\%(accent\|bin\|char\|choice\|close\|code\|inner\|op\|open\|ord\|punct\|rel\)\|mkern\|mskip\|muskipdef\|nonscript\|\%(over\|under\)line\|radical\|right\|\%(\%(script\)\{1,2}\|text\)style\|vcenter\)\>' syn match initexParagraphCommand display contains=@NoSpell \ '\\\%(ignorespaces\|indent\|no\%(boundary\|indent\)\|par\|vadjust\)\>' syn match initexPenaltiesCommand display contains=@NoSpell \ '\\\%(un\)\=penalty\>' syn match initexRegistersCommand display contains=@NoSpell \ '\\\%(advance\|\%(count\|dimen\|skip\|toks\)def\|divide\|multiply\)\>' syn match initexTablesCommand display contains=@NoSpell \ '\\\%(cr\|crcr\|[hv]align\|noalign\|omit\|span\)\>' syn cluster initexDerivedCommand \ contains=initexGlueDerivedCommand,initexHyphenationDerivedCommand, \ initexMacroDerivedCommand,initexMathDerivedCommand syn match initexGlueDerivedCommand display contains=@NoSpell \ '\\\%([hv]fil\%(l\|neg\)\=\|[hv]ss\)\>' syn match initexHyphenationDerivedCommand display contains=@NoSpell \ '\\-' syn match initexMacroDerivedCommand display contains=@NoSpell \ '\\[gx]def\>' syn match initexMathDerivedCommand display contains=@NoSpell \ '\\\%(above\|atop\%(withdelims\)\=\|mathchardef\|over\|overwithdelims\)\>' syn cluster initexInternalQuantity \ contains=initexBoxInternalQuantity,initexCharacterInternalQuantity, \ initexFileIOInternalQuantity,initexFontsInternalQuantity, \ initexHyphenationInternalQuantity,initexJobInternalQuantity, \ initexKernInternalQuantity,initexMathInternalQuantity, \ initexPageInternalQuantity,initexParagraphInternalQuantity, \ initexPenaltiesInternalQuantity,initexRegistersInternalQuantity syn match initexBoxInternalQuantity display contains=@NoSpell \ '\\\%(badness\|dp\|ht\|prevdepth\|wd\)\>' syn match initexCharacterInternalQuantity display contains=@NoSpell \ '\\\%(catcode\|chardef\|\%([ul]c\|sf\)code\)\>' syn match initexFileIOInternalQuantity display contains=@NoSpell \ '\\inputlineno\>' syn match initexFontsInternalQuantity display contains=@NoSpell \ '\\\%(font\%(dimen\)\=\|nullfont\)\>' syn match initexHyphenationInternalQuantity display contains=@NoSpell \ '\\hyphenchar\>' syn match initexJobInternalQuantity display contains=@NoSpell \ '\\deadcycles\>' syn match initexKernInternalQuantity display contains=@NoSpell \ '\\lastkern\>' syn match initexMathInternalQuantity display contains=@NoSpell \ '\\\%(delcode\|mathcode\|muskip\|\%(\%(script\)\{1,2}\|text\)font\|skewchar\)\>' syn match initexPageInternalQuantity display contains=@NoSpell \ '\\page\%(depth\|fil\{1,3}stretch\|goal\|shrink\|stretch\|total\)\>' syn match initexParagraphInternalQuantity display contains=@NoSpell \ '\\\%(prevgraf\|spacefactor\)\>' syn match initexPenaltiesInternalQuantity display contains=@NoSpell \ '\\lastpenalty\>' syn match initexRegistersInternalQuantity display contains=@NoSpell \ '\\\%(count\|dimen\|skip\|toks\)\d\+\>' syn cluster initexParameterDimen \ contains=initexBoxParameterDimen,initexInsertsParameterDimen, \ initexMathParameterDimen,initexPageParameterDimen, \ initexParagraphParameterDimen syn match initexBoxParameterDimen display contains=@NoSpell \ '\\\%(boxmaxdepth\|[hv]fuzz\|overfullrule\)\>' syn match initexInsertsParameterDimen display contains=@NoSpell \ '\\splitmaxdepth\>' syn match initexMathParameterDimen display contains=@NoSpell \ '\\\%(delimitershortfall\|display\%(indent\|width\)\|mathsurround\|nulldelimiterspace\|predisplaysize\|scriptspace\)\>' syn match initexPageParameterDimen display contains=@NoSpell \ '\\\%([hv]offset\|maxdepth\|vsize\)\>' syn match initexParagraphParameterDimen display contains=@NoSpell \ '\\\%(emergencystretch\|\%(hang\|par\)indent\|hsize\|lineskiplimit\)\>' syn cluster initexParameterGlue \ contains=initexInsertsParameterGlue,initexMathParameterGlue, \ initexPageParameterGlue,initexParagraphParameterGlue, \ initexTablesParameterGlue syn match initexInsertsParameterGlue display contains=@NoSpell \ '\\splittopskip\>' syn match initexMathParameterGlue display contains=@NoSpell \ '\\\%(above\|below\)display\%(short\)\=skip\>' syn match initexPageParameterGlue display contains=@NoSpell \ '\\topskip\>' syn match initexParagraphParameterGlue display contains=@NoSpell \ '\\\%(baseline\|left\|line\|par\%(fill\)\=\|right\|x\=space\)skip\>' syn match initexTablesParameterGlue display contains=@NoSpell \ '\\tabskip\>' syn cluster initexParameterInteger \ contains=initexBoxParameterInteger,initexCharacterParameterInteger, \ initexDebuggingParameterInteger,initexHyphenationParameterInteger, \ initexInsertsParameterInteger,initexJobParameterInteger, \ initexMacroParameterInteger,initexMathParameterInteger, \ initexParagraphParameterInteger,initexPenaltiesParameterInteger, syn match initexBoxParameterInteger display contains=@NoSpell \ '\\[hv]badness\>' syn match initexCharacterParameterInteger display contains=@NoSpell \ '\\\%(\%(endline\|escape\|newline\)char\)\>' syn match initexDebuggingParameterInteger display contains=@NoSpell \ '\\\%(errorcontextlines\|pausing\|tracing\%(commands\|lostchars\|macros\|online\|output\|pages\|paragraphs\|restores|stats\)\)\>' syn match initexHyphenationParameterInteger display contains=@NoSpell \ '\\\%(defaulthyphenchar\|language\|\%(left\|right\)hyphenmin\|uchyph\)\>' syn match initexInsertsParameterInteger display contains=@NoSpell \ '\\\%(holdinginserts\)\>' syn match initexJobParameterInteger display contains=@NoSpell \ '\\\%(day\|mag\|maxdeadcycles\|month\|time\|year\)\>' syn match initexMacroParameterInteger display contains=@NoSpell \ '\\globaldefs\>' syn match initexMathParameterInteger display contains=@NoSpell \ '\\\%(binoppenalty\|defaultskewchar\|delimiterfactor\|displaywidowpenalty\|fam\|\%(post\|pre\)displaypenalty\|relpenalty\)\>' syn match initexParagraphParameterInteger display contains=@NoSpell \ '\\\%(\%(adj\|\%(double\|final\)hyphen\)demerits\|looseness\|\%(pre\)\=tolerance\)\>' syn match initexPenaltiesParameterInteger display contains=@NoSpell \ '\\\%(broken\|club\|exhyphen\|floating\|hyphen\|interline\|line\|output\|widow\)penalty\>' syn cluster initexParameterMuglue \ contains=initexMathParameterMuglue syn match initexMathParameterMuglue display contains=@NoSpell \ '\\\%(med\|thick\|thin\)muskip\>' syn cluster initexParameterDimen \ contains=initexBoxParameterToken,initexDebuggingParameterToken, \ initexFileIOParameterToken,initexMathParameterToken, \ initexParagraphParameterToken,initexTablesParameterToken syn match initexBoxParameterToken display contains=@NoSpell \ '\\every[hv]box\>' syn match initexDebuggingParameterToken display contains=@NoSpell \ '\\errhelp\>' syn match initexFileIOParameterToken display contains=@NoSpell \ '\\output\>' syn match initexMathParameterToken display contains=@NoSpell \ '\\every\%(display\|math\)\>' syn match initexParagraphParameterToken display contains=@NoSpell \ '\\everypar\>' syn match initexTablesParameterToken display contains=@NoSpell \ '\\everycr\>' hi def link initexCharacter Character hi def link initexNumber Number hi def link initexIdentifier Identifier hi def link initexStatement Statement hi def link initexConditional Conditional hi def link initexPreProc PreProc hi def link initexMacro Macro hi def link initexType Type hi def link initexDebug Debug hi def link initexTodo Todo hi def link initexComment Comment hi def link initexDimension initexNumber hi def link initexCommand initexStatement hi def link initexBoxCommand initexCommand hi def link initexCharacterCommand initexCharacter hi def link initexDebuggingCommand initexDebug hi def link initexFileIOCommand initexCommand hi def link initexFontsCommand initexType hi def link initexGlueCommand initexCommand hi def link initexHyphenationCommand initexCommand hi def link initexInsertsCommand initexCommand hi def link initexJobCommand initexPreProc hi def link initexKernCommand initexCommand hi def link initexLogicCommand initexConditional hi def link initexMacroCommand initexMacro hi def link initexMarksCommand initexCommand hi def link initexMathCommand initexCommand hi def link initexParagraphCommand initexCommand hi def link initexPenaltiesCommand initexCommand hi def link initexRegistersCommand initexCommand hi def link initexTablesCommand initexCommand hi def link initexDerivedCommand initexStatement hi def link initexGlueDerivedCommand initexDerivedCommand hi def link initexHyphenationDerivedCommand initexDerivedCommand hi def link initexMacroDerivedCommand initexDerivedCommand hi def link initexMathDerivedCommand initexDerivedCommand hi def link initexInternalQuantity initexIdentifier hi def link initexBoxInternalQuantity initexInternalQuantity hi def link initexCharacterInternalQuantity initexInternalQuantity hi def link initexFileIOInternalQuantity initexInternalQuantity hi def link initexFontsInternalQuantity initexInternalQuantity hi def link initexHyphenationInternalQuantity initexInternalQuantity hi def link initexJobInternalQuantity initexInternalQuantity hi def link initexKernInternalQuantity initexInternalQuantity hi def link initexMathInternalQuantity initexInternalQuantity hi def link initexPageInternalQuantity initexInternalQuantity hi def link initexParagraphInternalQuantity initexInternalQuantity hi def link initexPenaltiesInternalQuantity initexInternalQuantity hi def link initexRegistersInternalQuantity initexInternalQuantity hi def link initexParameterDimen initexNumber hi def link initexBoxParameterDimen initexParameterDimen hi def link initexInsertsParameterDimen initexParameterDimen hi def link initexMathParameterDimen initexParameterDimen hi def link initexPageParameterDimen initexParameterDimen hi def link initexParagraphParameterDimen initexParameterDimen hi def link initexParameterGlue initexNumber hi def link initexInsertsParameterGlue initexParameterGlue hi def link initexMathParameterGlue initexParameterGlue hi def link initexPageParameterGlue initexParameterGlue hi def link initexParagraphParameterGlue initexParameterGlue hi def link initexTablesParameterGlue initexParameterGlue hi def link initexParameterInteger initexNumber hi def link initexBoxParameterInteger initexParameterInteger hi def link initexCharacterParameterInteger initexParameterInteger hi def link initexDebuggingParameterInteger initexParameterInteger hi def link initexHyphenationParameterInteger initexParameterInteger hi def link initexInsertsParameterInteger initexParameterInteger hi def link initexJobParameterInteger initexParameterInteger hi def link initexMacroParameterInteger initexParameterInteger hi def link initexMathParameterInteger initexParameterInteger hi def link initexParagraphParameterInteger initexParameterInteger hi def link initexPenaltiesParameterInteger initexParameterInteger hi def link initexParameterMuglue initexNumber hi def link initexMathParameterMuglue initexParameterMuglue hi def link initexParameterToken initexIdentifier hi def link initexBoxParameterToken initexParameterToken hi def link initexDebuggingParameterToken initexParameterToken hi def link initexFileIOParameterToken initexParameterToken hi def link initexMathParameterToken initexParameterToken hi def link initexParagraphParameterToken initexParameterToken hi def link initexTablesParameterToken initexParameterToken let b:current_syntax = "initex" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/initng.vim000066400000000000000000000065061320401574200200330ustar00rootroot00000000000000" Vim syntax file " Language: initng .i files " Maintainer: Elan Ruusame " URL: http://glen.alkohol.ee/pld/initng/ " License: GPL v2 " Version: 0.13 " Last Change: $Date: 2007/05/05 17:17:40 $ " " Syntax highlighting for initng .i files. Inherits from sh.vim and adds " in the hiliting to start/stop {} blocks. Requires vim 6.3 or later. if &compatible || v:version < 603 finish endif if exists("b:current_syntax") finish endif syn case match let is_bash = 1 unlet! b:current_syntax syn include @shTop syntax/sh.vim syn region initngService matchgroup=initngServiceHeader start="^\s*\(service\|virtual\|daemon\|class\|cron\)\s\+\(\(\w\|[-/*]\)\+\(\s\+:\s\+\(\w\|[-/*]\)\+\)\?\)\s\+{" end="}" contains=@initngServiceCluster syn cluster initngServiceCluster contains=initngComment,initngAction,initngServiceOption,initngServiceHeader,initngDelim,initngVariable syn region initngAction matchgroup=initngActionHeader start="^\s*\(script start\|script stop\|script run\)\s*=\s*{" end="}" contains=@initngActionCluster syn cluster initngActionCluster contains=@shTop syn match initngDelim /[{}]/ contained syn region initngString start=/"/ end=/"/ skip=/\\"/ " option = value syn match initngServiceOption /.\+\s*=.\+;/ contains=initngServiceKeywords,initngSubstMacro contained " option without value syn match initngServiceOption /\w\+;/ contains=initngServiceKeywords,initngSubstMacro contained " options with value syn keyword initngServiceKeywords also_stop need use nice setuid contained syn keyword initngServiceKeywords delay chdir suid sgid start_pause env_file env_parse pid_file pidfile contained syn keyword initngServiceKeywords pid_of up_when_pid_set stdout stderr syncron just_before contained syn keyword initngServiceKeywords provide lockfile daemon_stops_badly contained syn match initngServiceKeywords /\(script\|exec\(_args\)\?\) \(start\|stop\|daemon\)/ contained syn match initngServiceKeywords /env\s\+\w\+/ contained " rlimits syn keyword initngServiceKeywords rlimit_cpu_hard rlimit_core_soft contained " single options syn keyword initngServiceKeywords last respawn network_provider require_network require_file critical forks contained " cron options syn keyword initngServiceKeywords hourly contained syn match initngVariable /\${\?\w\+\}\?/ " Substituted @foo@ macros: " ========== syn match initngSubstMacro /@[^@]\+@/ contained syn cluster initngActionCluster add=initngSubstMacro syn cluster shCommandSubList add=initngSubstMacro " Comments: " ========== syn cluster initngCommentGroup contains=initngTodo,@Spell syn keyword initngTodo TODO FIXME XXX contained syn match initngComment /#.*$/ contains=@initngCommentGroup " install_service #macros " TODO: syntax check for ifd-endd pairs " ========== syn region initngDefine start="^#\(endd\|elsed\|exec\|ifd\|endexec\|endd\)\>" skip="\\$" end="$" end="#"me=s-1 syn cluster shCommentGroup add=initngDefine syn cluster initngCommentGroup add=initngDefine hi def link initngComment Comment hi def link initngTodo Todo hi def link initngString String hi def link initngServiceKeywords Define hi def link initngServiceHeader Keyword hi def link initngActionHeader Type hi def link initngDelim Delimiter hi def link initngVariable PreProc hi def link initngSubstMacro Comment hi def link initngDefine Macro let b:current_syntax = "initng" neovim-0.2.2/runtime/syntax/inittab.vim000066400000000000000000000050731320401574200201730ustar00rootroot00000000000000" Vim syntax file " This is a GENERATED FILE. Please always refer to source file at the URI below. " Language: SysV-compatible init process control file `inittab' " Maintainer: David Ne\v{c}as (Yeti) " Last Change: 2002-09-13 " URL: http://physics.muni.cz/~yeti/download/syntax/inittab.vim " Setup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match " Base constructs syn match inittabError "[^:]\+:"me=e-1 contained syn match inittabError "[^:]\+$" contained syn match inittabComment "^[#:].*$" contains=inittabFixme syn match inittabComment "#.*$" contained contains=inittabFixme syn keyword inittabFixme FIXME TODO XXX NOT " Shell syn region inittabShString start=+"+ end=+"+ skip=+\\\\\|\\\"+ contained syn region inittabShString start=+'+ end=+'+ contained syn match inittabShOption "\s[-+][[:alnum:]]\+"ms=s+1 contained syn match inittabShOption "\s--[:alnum:][-[:alnum:]]*"ms=s+1 contained syn match inittabShCommand "/\S\+" contained syn cluster inittabSh add=inittabShOption,inittabShString,inittabShCommand " Keywords syn keyword inittabActionName respawn wait once boot bootwait off ondemand sysinit powerwait powerfail powerokwait powerfailnow ctrlaltdel kbrequest initdefault contained " Line parser syn match inittabId "^[[:alnum:]~]\{1,4}" nextgroup=inittabColonRunLevels,inittabError syn match inittabColonRunLevels ":" contained nextgroup=inittabRunLevels,inittabColonAction,inittabError syn match inittabRunLevels "[0-6A-Ca-cSs]\+" contained nextgroup=inittabColonAction,inittabError syn match inittabColonAction ":" contained nextgroup=inittabAction,inittabError syn match inittabAction "\w\+" contained nextgroup=inittabColonProcess,inittabError contains=inittabActionName syn match inittabColonProcess ":" contained nextgroup=inittabProcessPlus,inittabProcess,inittabError syn match inittabProcessPlus "+" contained nextgroup=inittabProcess,inittabError syn region inittabProcess start="/" end="$" transparent oneline contained contains=@inittabSh,inittabComment " Define the default highlighting hi def link inittabComment Comment hi def link inittabFixme Todo hi def link inittabActionName Type hi def link inittabError Error hi def link inittabId Identifier hi def link inittabRunLevels Special hi def link inittabColonProcess inittabColon hi def link inittabColonAction inittabColon hi def link inittabColonRunLevels inittabColon hi def link inittabColon PreProc hi def link inittabShString String hi def link inittabShOption Special hi def link inittabShCommand Statement let b:current_syntax = "inittab" neovim-0.2.2/runtime/syntax/ipfilter.vim000066400000000000000000000031261320401574200203540ustar00rootroot00000000000000" ipfilter syntax file " Language: ipfilter configuration file " Maintainer: Hendrik Scholz " Last Change: 2005 Jan 27 " " http://www.wormulon.net/files/misc/ipfilter.vim " " This will also work for OpenBSD pf but there might be some tags that are " not correctly identified. " Please send comments to hendrik@scholz.net " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Comment syn match IPFComment /#.*$/ contains=ipfTodo syn keyword IPFTodo TODO XXX FIXME contained syn keyword IPFActionBlock block syn keyword IPFActionPass pass syn keyword IPFProto tcp udp icmp syn keyword IPFSpecial quick log first " how could we use keyword for words with '-' ? syn match IPFSpecial /return-rst/ syn match IPFSpecial /dup-to/ "syn match IPFSpecial /icmp-type unreach/ syn keyword IPFAny all any syn match IPFIPv4 /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ syn match IPFNetmask /\/\d\+/ " service name constants syn keyword IPFService auth bgp domain finger ftp http https ident syn keyword IPFService imap irc isakmp kerberos mail nameserver nfs syn keyword IPFService nntp ntp pop3 portmap pptp rpcbind rsync smtp syn keyword IPFService snmp snmptrap socks ssh sunrpc syslog telnet syn keyword IPFService tftp www " Comment hi def link IPFComment Comment hi def link IPFTodo Todo hi def link IPFService Constant hi def link IPFAction Type hi def link ipfActionBlock String hi def link ipfActionPass Type hi def link IPFSpecial Statement hi def link IPFIPv4 Label hi def link IPFNetmask String hi def link IPFAny Statement hi def link IPFProto Identifier neovim-0.2.2/runtime/syntax/ishd.vim000066400000000000000000000646611320401574200175000ustar00rootroot00000000000000" Vim syntax file " Language: InstallShield Script " Maintainer: Robert M. Cortopassi " Last Change: 2001 May 09 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn keyword ishdStatement abort begin case default downto else end syn keyword ishdStatement endif endfor endwhile endswitch endprogram exit elseif syn keyword ishdStatement error for function goto if syn keyword ishdStatement program prototype return repeat string step switch syn keyword ishdStatement struct then to typedef until while syn keyword ishdType BOOL BYREF CHAR GDI HWND INT KERNEL LIST LONG syn keyword ishdType NUMBER POINTER SHORT STRING USER syn keyword ishdConstant _MAX_LENGTH _MAX_STRING syn keyword ishdConstant AFTER ALLCONTENTS ALLCONTROLS APPEND ASKDESTPATH syn keyword ishdConstant ASKOPTIONS ASKPATH ASKTEXT BATCH_INSTALL BACK syn keyword ishdConstant BACKBUTTON BACKGROUND BACKGROUNDCAPTION BADPATH syn keyword ishdConstant BADTAGFILE BASEMEMORY BEFORE BILLBOARD BINARY syn keyword ishdConstant BITMAP256COLORS BITMAPFADE BITMAPICON BK_BLUE BK_GREEN syn keyword ishdConstant BK_MAGENTA BK_MAGENTA1 BK_ORANGE BK_PINK BK_RED syn keyword ishdConstant BK_SMOOTH BK_SOLIDBLACK BK_SOLIDBLUE BK_SOLIDGREEN syn keyword ishdConstant BK_SOLIDMAGENTA BK_SOLIDORANGE BK_SOLIDPINK BK_SOLIDRED syn keyword ishdConstant BK_SOLIDWHITE BK_SOLIDYELLOW BK_YELLOW BLACK BLUE syn keyword ishdConstant BOOTUPDRIVE BUTTON_CHECKED BUTTON_ENTER BUTTON_UNCHECKED syn keyword ishdConstant BUTTON_UNKNOWN CMDLINE COMMONFILES CANCEL CANCELBUTTON syn keyword ishdConstant CC_ERR_FILEFORMATERROR CC_ERR_FILEREADERROR syn keyword ishdConstant CC_ERR_NOCOMPONENTLIST CC_ERR_OUTOFMEMORY CDROM syn keyword ishdConstant CDROM_DRIVE CENTERED CHANGEDIR CHECKBOX CHECKBOX95 syn keyword ishdConstant CHECKLINE CHECKMARK CMD_CLOSE CMD_MAXIMIZE CMD_MINIMIZE syn keyword ishdConstant CMD_PUSHDOWN CMD_RESTORE COLORMODE256 COLORS syn keyword ishdConstant COMBOBOX_ENTER COMBOBOX_SELECT COMMAND COMMANDEX syn keyword ishdConstant COMMON COMP_DONE COMP_ERR_CREATEDIR syn keyword ishdConstant COMP_ERR_DESTCONFLICT COMP_ERR_FILENOTINLIB syn keyword ishdConstant COMP_ERR_FILESIZE COMP_ERR_FILETOOLARGE syn keyword ishdConstant COMP_ERR_HEADER COMP_ERR_INCOMPATIBLE syn keyword ishdConstant COMP_ERR_INTPUTNOTCOMPRESSED COMP_ERR_INVALIDLIST syn keyword ishdConstant COMP_ERR_LAUNCHSERVER COMP_ERR_MEMORY syn keyword ishdConstant COMP_ERR_NODISKSPACE COMP_ERR_OPENINPUT syn keyword ishdConstant COMP_ERR_OPENOUTPUT COMP_ERR_OPTIONS syn keyword ishdConstant COMP_ERR_OUTPUTNOTCOMPRESSED COMP_ERR_SPLIT syn keyword ishdConstant COMP_ERR_TARGET COMP_ERR_TARGETREADONLY COMP_ERR_WRITE syn keyword ishdConstant COMP_INFO_ATTRIBUTE COMP_INFO_COMPSIZE COMP_INFO_DATE syn keyword ishdConstant COMP_INFO_INVALIDATEPASSWORD COMP_INFO_ORIGSIZE syn keyword ishdConstant COMP_INFO_SETPASSWORD COMP_INFO_TIME syn keyword ishdConstant COMP_INFO_VERSIONLS COMP_INFO_VERSIONMS COMP_NORMAL syn keyword ishdConstant COMP_UPDATE_DATE COMP_UPDATE_DATE_NEWER syn keyword ishdConstant COMP_UPDATE_SAME COMP_UPDATE_VERSION COMPACT syn keyword ishdConstant COMPARE_DATE COMPARE_SIZE COMPARE_VERSION syn keyword ishdConstant COMPONENT_FIELD_CDROM_FOLDER syn keyword ishdConstant COMPONENT_FIELD_DESCRIPTION COMPONENT_FIELD_DESTINATION syn keyword ishdConstant COMPONENT_FIELD_DISPLAYNAME COMPONENT_FIELD_FILENEED syn keyword ishdConstant COMPONENT_FIELD_FTPLOCATION syn keyword ishdConstant COMPONENT_FIELD_HTTPLOCATION COMPONENT_FIELD_MISC syn keyword ishdConstant COMPONENT_FIELD_OVERWRITE COMPONENT_FIELD_PASSWORD syn keyword ishdConstant COMPONENT_FIELD_SELECTED COMPONENT_FIELD_SIZE syn keyword ishdConstant COMPONENT_FIELD_STATUS COMPONENT_FIELD_VISIBLE syn keyword ishdConstant COMPONENT_FILEINFO_COMPRESSED syn keyword ishdConstant COMPONENT_FILEINFO_COMPRESSENGINE syn keyword ishdConstant COMPONENT_FILEINFO_LANGUAGECOMPONENT_FILEINFO_OS syn keyword ishdConstant COMPONENT_FILEINFO_POTENTIALLYLOCKED syn keyword ishdConstant COMPONENT_FILEINFO_SELFREGISTERING syn keyword ishdConstant COMPONENT_FILEINFO_SHARED COMPONENT_INFO_ATTRIBUTE syn keyword ishdConstant COMPONENT_INFO_COMPSIZE COMPONENT_INFO_DATE syn keyword ishdConstant COMPONENT_INFO_DATE_EX_EX COMPONENT_INFO_LANGUAGE syn keyword ishdConstant COMPONENT_INFO_ORIGSIZE COMPONENT_INFO_OS syn keyword ishdConstant COMPONENT_INFO_TIME COMPONENT_INFO_VERSIONLS syn keyword ishdConstant COMPONENT_INFO_VERSIONMS COMPONENT_INFO_VERSIONSTR syn keyword ishdConstant COMPONENT_VALUE_ALWAYSOVERWRITE syn keyword ishdConstant COMPONENT_VALUE_CRITICAL syn keyword ishdConstant COMPONENT_VALUE_HIGHLYRECOMMENDED syn keyword ishdConstant COMPONENT_FILEINFO_LANGUAGE COMPONENT_FILEINFO_OS syn keyword ishdConstant COMPONENT_VALUE_NEVEROVERWRITE syn keyword ishdConstant COMPONENT_VALUE_NEWERDATE COMPONENT_VALUE_NEWERVERSION syn keyword ishdConstant COMPONENT_VALUE_OLDERDATE COMPONENT_VALUE_OLDERVERSION syn keyword ishdConstant COMPONENT_VALUE_SAMEORNEWDATE syn keyword ishdConstant COMPONENT_VALUE_SAMEORNEWERVERSION syn keyword ishdConstant COMPONENT_VALUE_STANDARD COMPONENT_VIEW_CHANGE syn keyword ishdConstant COMPONENT_INFO_DATE_EX COMPONENT_VIEW_CHILDVIEW syn keyword ishdConstant COMPONENT_VIEW_COMPONENT COMPONENT_VIEW_DESCRIPTION syn keyword ishdConstant COMPONENT_VIEW_MEDIA COMPONENT_VIEW_PARENTVIEW syn keyword ishdConstant COMPONENT_VIEW_SIZEAVAIL COMPONENT_VIEW_SIZETOTAL syn keyword ishdConstant COMPONENT_VIEW_TARGETLOCATION COMPRESSHIGH COMPRESSLOW syn keyword ishdConstant COMPRESSMED COMPRESSNONE CONTIGUOUS CONTINUE syn keyword ishdConstant COPY_ERR_CREATEDIR COPY_ERR_NODISKSPACE syn keyword ishdConstant COPY_ERR_OPENINPUT COPY_ERR_OPENOUTPUT syn keyword ishdConstant COPY_ERR_TARGETREADONLY COPY_ERR_MEMORY syn keyword ishdConstant CORECOMPONENTHANDLING CPU CUSTOM DATA_COMPONENT syn keyword ishdConstant DATA_LIST DATA_NUMBER DATA_STRING DATE DEFAULT syn keyword ishdConstant DEFWINDOWMODE DELETE_EOF DIALOG DIALOGCACHE syn keyword ishdConstant DIALOGTHINFONT DIR_WRITEABLE DIRECTORY DISABLE DISK syn keyword ishdConstant DISK_FREESPACE DISK_TOTALSPACE DISKID DLG_ASK_OPTIONS syn keyword ishdConstant DLG_ASK_PATH DLG_ASK_TEXT DLG_ASK_YESNO DLG_CANCEL syn keyword ishdConstant DLG_CDIR DLG_CDIR_MSG DLG_CENTERED DLG_CLOSE syn keyword ishdConstant DLG_DIR_DIRECTORY DLG_DIR_FILE DLG_ENTER_DISK DLG_ERR syn keyword ishdConstant DLG_ERR_ALREADY_EXISTS DLG_ERR_ENDDLG DLG_INFO_ALTIMAGE syn keyword ishdConstant DLG_INFO_CHECKMETHOD DLG_INFO_CHECKSELECTION syn keyword ishdConstant DLG_INFO_ENABLEIMAGE DLG_INFO_KUNITS syn keyword ishdConstant DLG_INFO_USEDECIMAL DLG_INIT DLG_MSG_ALL syn keyword ishdConstant DLG_MSG_INFORMATION DLG_MSG_NOT_HAND DLG_MSG_SEVERE syn keyword ishdConstant DLG_MSG_STANDARD DLG_MSG_WARNING DLG_OK DLG_STATUS syn keyword ishdConstant DLG_USER_CAPTION DRIVE DRIVEOPEN DLG_DIR_DRIVE syn keyword ishdConstant EDITBOX_CHANGE EFF_BOXSTRIPE EFF_FADE EFF_HORZREVEAL syn keyword ishdConstant EFF_HORZSTRIPE EFF_NONE EFF_REVEAL EFF_VERTSTRIPE syn keyword ishdConstant ENABLE END_OF_FILE END_OF_LIST ENHANCED ENTERDISK syn keyword ishdConstant ENTERDISK_ERRMSG ENTERDISKBEEP ENVSPACE EQUALS syn keyword ishdConstant ERR_BADPATH ERR_BADTAGFILE ERR_BOX_BADPATH syn keyword ishdConstant ERR_BOX_BADTAGFILE ERR_BOX_DISKID ERR_BOX_DRIVEOPEN syn keyword ishdConstant ERR_BOX_EXIT ERR_BOX_HELP ERR_BOX_NOSPACE ERR_BOX_PAUSE syn keyword ishdConstant ERR_BOX_READONLY ERR_DISKID ERR_DRIVEOPEN syn keyword ishdConstant EXCLUDE_SUBDIR EXCLUSIVE EXISTS EXIT EXTENDEDMEMORY syn keyword ishdConstant EXTENSION_ONLY ERRORFILENAME FADE_IN FADE_OUT syn keyword ishdConstant FAILIFEXISTS FALSE FDRIVE_NUM FEEDBACK FEEDBACK_FULL syn keyword ishdConstant FEEDBACK_OPERATION FEEDBACK_SPACE FILE_ATTR_ARCHIVED syn keyword ishdConstant FILE_ATTR_DIRECTORY FILE_ATTR_HIDDEN FILE_ATTR_NORMAL syn keyword ishdConstant FILE_ATTR_READONLY FILE_ATTR_SYSTEM FILE_ATTRIBUTE syn keyword ishdConstant FILE_BIN_CUR FILE_BIN_END FILE_BIN_START FILE_DATE syn keyword ishdConstant FILE_EXISTS FILE_INSTALLED FILE_INVALID FILE_IS_LOCKED syn keyword ishdConstant FILE_LINE_LENGTH FILE_LOCKED FILE_MODE_APPEND syn keyword ishdConstant FILE_MODE_BINARY FILE_MODE_BINARYREADONLY syn keyword ishdConstant FILE_MODE_NORMAL FILE_NO_VERSION FILE_NOT_FOUND syn keyword ishdConstant FILE_RD_ONLY FILE_SIZE FILE_SRC_EQUAL FILE_SRC_OLD syn keyword ishdConstant FILE_TIME FILE_WRITEABLE FILENAME FILENAME_ONLY syn keyword ishdConstant FINISHBUTTON FIXED_DRIVE FONT_TITLE FREEENVSPACE syn keyword ishdConstant FS_CREATEDIR FS_DISKONEREQUIRED FS_DONE FS_FILENOTINLIB syn keyword ishdConstant FS_GENERROR FS_INCORRECTDISK FS_LAUNCHPROCESS syn keyword ishdConstant FS_OPERROR FS_OUTOFSPACE FS_PACKAGING FS_RESETREQUIRED syn keyword ishdConstant FS_TARGETREADONLY FS_TONEXTDISK FULL FULLSCREEN syn keyword ishdConstant FULLSCREENSIZE FULLWINDOWMODE FOLDER_DESKTOP syn keyword ishdConstant FOLDER_PROGRAMS FOLDER_STARTMENU FOLDER_STARTUP syn keyword ishdConstant GREATER_THAN GREEN HELP HKEY_CLASSES_ROOT syn keyword ishdConstant HKEY_CURRENT_CONFIG HKEY_CURRENT_USER HKEY_DYN_DATA syn keyword ishdConstant HKEY_LOCAL_MACHINE HKEY_PERFORMANCE_DATA HKEY_USERS syn keyword ishdConstant HOURGLASS HWND_DESKTOP HWND_INSTALL IGNORE_READONLY syn keyword ishdConstant INCLUDE_SUBDIR INDVFILESTATUS INFO INFO_DESCRIPTION syn keyword ishdConstant INFO_IMAGE INFO_MISC INFO_SIZE INFO_SUBCOMPONENT syn keyword ishdConstant INFO_VISIBLE INFORMATION INVALID_LIST IS_186 IS_286 syn keyword ishdConstant IS_386 IS_486 IS_8514A IS_86 IS_ALPHA IS_CDROM IS_CGA syn keyword ishdConstant IS_DOS IS_EGA IS_FIXED IS_FOLDER IS_ITEM ISLANG_ALL syn keyword ishdConstant ISLANG_ARABIC ISLANG_ARABIC_SAUDIARABIA syn keyword ishdConstant ISLANG_ARABIC_IRAQ ISLANG_ARABIC_EGYPT syn keyword ishdConstant ISLANG_ARABIC_LIBYA ISLANG_ARABIC_ALGERIA syn keyword ishdConstant ISLANG_ARABIC_MOROCCO ISLANG_ARABIC_TUNISIA syn keyword ishdConstant ISLANG_ARABIC_OMAN ISLANG_ARABIC_YEMEN syn keyword ishdConstant ISLANG_ARABIC_SYRIA ISLANG_ARABIC_JORDAN syn keyword ishdConstant ISLANG_ARABIC_LEBANON ISLANG_ARABIC_KUWAIT syn keyword ishdConstant ISLANG_ARABIC_UAE ISLANG_ARABIC_BAHRAIN syn keyword ishdConstant ISLANG_ARABIC_QATAR ISLANG_AFRIKAANS syn keyword ishdConstant ISLANG_AFRIKAANS_STANDARD ISLANG_ALBANIAN syn keyword ishdConstant ISLANG_ENGLISH_TRINIDAD ISLANG_ALBANIAN_STANDARD syn keyword ishdConstant ISLANG_BASQUE ISLANG_BASQUE_STANDARD ISLANG_BULGARIAN syn keyword ishdConstant ISLANG_BULGARIAN_STANDARD ISLANG_BELARUSIAN syn keyword ishdConstant ISLANG_BELARUSIAN_STANDARD ISLANG_CATALAN syn keyword ishdConstant ISLANG_CATALAN_STANDARD ISLANG_CHINESE syn keyword ishdConstant ISLANG_CHINESE_TAIWAN ISLANG_CHINESE_PRC syn keyword ishdConstant ISLANG_SPANISH_PUERTORICO ISLANG_CHINESE_HONGKONG syn keyword ishdConstant ISLANG_CHINESE_SINGAPORE ISLANG_CROATIAN syn keyword ishdConstant ISLANG_CROATIAN_STANDARD ISLANG_CZECH syn keyword ishdConstant ISLANG_CZECH_STANDARD ISLANG_DANISH syn keyword ishdConstant ISLANG_DANISH_STANDARD ISLANG_DUTCH syn keyword ishdConstant ISLANG_DUTCH_STANDARD ISLANG_DUTCH_BELGIAN syn keyword ishdConstant ISLANG_ENGLISH ISLANG_ENGLISH_BELIZE syn keyword ishdConstant ISLANG_ENGLISH_UNITEDSTATES syn keyword ishdConstant ISLANG_ENGLISH_UNITEDKINGDOM ISLANG_ENGLISH_AUSTRALIAN syn keyword ishdConstant ISLANG_ENGLISH_CANADIAN ISLANG_ENGLISH_NEWZEALAND syn keyword ishdConstant ISLANG_ENGLISH_IRELAND ISLANG_ENGLISH_SOUTHAFRICA syn keyword ishdConstant ISLANG_ENGLISH_JAMAICA ISLANG_ENGLISH_CARIBBEAN syn keyword ishdConstant ISLANG_ESTONIAN ISLANG_ESTONIAN_STANDARD syn keyword ishdConstant ISLANG_FAEROESE ISLANG_FAEROESE_STANDARD ISLANG_FARSI syn keyword ishdConstant ISLANG_FINNISH ISLANG_FINNISH_STANDARD ISLANG_FRENCH syn keyword ishdConstant ISLANG_FRENCH_STANDARD ISLANG_FRENCH_BELGIAN syn keyword ishdConstant ISLANG_FRENCH_CANADIAN ISLANG_FRENCH_SWISS syn keyword ishdConstant ISLANG_FRENCH_LUXEMBOURG ISLANG_FARSI_STANDARD syn keyword ishdConstant ISLANG_GERMAN ISLANG_GERMAN_STANDARD syn keyword ishdConstant ISLANG_GERMAN_SWISS ISLANG_GERMAN_AUSTRIAN syn keyword ishdConstant ISLANG_GERMAN_LUXEMBOURG ISLANG_GERMAN_LIECHTENSTEIN syn keyword ishdConstant ISLANG_GREEK ISLANG_GREEK_STANDARD ISLANG_HEBREW syn keyword ishdConstant ISLANG_HEBREW_STANDARD ISLANG_HUNGARIAN syn keyword ishdConstant ISLANG_HUNGARIAN_STANDARD ISLANG_ICELANDIC syn keyword ishdConstant ISLANG_ICELANDIC_STANDARD ISLANG_INDONESIAN syn keyword ishdConstant ISLANG_INDONESIAN_STANDARD ISLANG_ITALIAN syn keyword ishdConstant ISLANG_ITALIAN_STANDARD ISLANG_ITALIAN_SWISS syn keyword ishdConstant ISLANG_JAPANESE ISLANG_JAPANESE_STANDARD ISLANG_KOREAN syn keyword ishdConstant ISLANG_KOREAN_STANDARD ISLANG_KOREAN_JOHAB syn keyword ishdConstant ISLANG_LATVIAN ISLANG_LATVIAN_STANDARD syn keyword ishdConstant ISLANG_LITHUANIAN ISLANG_LITHUANIAN_STANDARD syn keyword ishdConstant ISLANG_NORWEGIAN ISLANG_NORWEGIAN_BOKMAL syn keyword ishdConstant ISLANG_NORWEGIAN_NYNORSK ISLANG_POLISH syn keyword ishdConstant ISLANG_POLISH_STANDARD ISLANG_PORTUGUESE syn keyword ishdConstant ISLANG_PORTUGUESE_BRAZILIAN ISLANG_PORTUGUESE_STANDARD syn keyword ishdConstant ISLANG_ROMANIAN ISLANG_ROMANIAN_STANDARD ISLANG_RUSSIAN syn keyword ishdConstant ISLANG_RUSSIAN_STANDARD ISLANG_SLOVAK syn keyword ishdConstant ISLANG_SLOVAK_STANDARD ISLANG_SLOVENIAN syn keyword ishdConstant ISLANG_SLOVENIAN_STANDARD ISLANG_SERBIAN syn keyword ishdConstant ISLANG_SERBIAN_LATIN ISLANG_SERBIAN_CYRILLIC syn keyword ishdConstant ISLANG_SPANISH ISLANG_SPANISH_ARGENTINA syn keyword ishdConstant ISLANG_SPANISH_BOLIVIA ISLANG_SPANISH_CHILE syn keyword ishdConstant ISLANG_SPANISH_COLOMBIA ISLANG_SPANISH_COSTARICA syn keyword ishdConstant ISLANG_SPANISH_DOMINICANREPUBLIC ISLANG_SPANISH_ECUADOR syn keyword ishdConstant ISLANG_SPANISH_ELSALVADOR ISLANG_SPANISH_GUATEMALA syn keyword ishdConstant ISLANG_SPANISH_HONDURAS ISLANG_SPANISH_MEXICAN syn keyword ishdConstant ISLANG_THAI_STANDARD ISLANG_SPANISH_MODERNSORT syn keyword ishdConstant ISLANG_SPANISH_NICARAGUA ISLANG_SPANISH_PANAMA syn keyword ishdConstant ISLANG_SPANISH_PARAGUAY ISLANG_SPANISH_PERU syn keyword ishdConstant IISLANG_SPANISH_PUERTORICO syn keyword ishdConstant ISLANG_SPANISH_TRADITIONALSORT ISLANG_SPANISH_VENEZUELA syn keyword ishdConstant ISLANG_SPANISH_URUGUAY ISLANG_SWEDISH syn keyword ishdConstant ISLANG_SWEDISH_FINLAND ISLANG_SWEDISH_STANDARD syn keyword ishdConstant ISLANG_THAI ISLANG_THA_STANDARDI ISLANG_TURKISH syn keyword ishdConstant ISLANG_TURKISH_STANDARD ISLANG_UKRAINIAN syn keyword ishdConstant ISLANG_UKRAINIAN_STANDARD ISLANG_VIETNAMESE syn keyword ishdConstant ISLANG_VIETNAMESE_STANDARD IS_MIPS IS_MONO IS_OS2 syn keyword ishdConstant ISOSL_ALL ISOSL_WIN31 ISOSL_WIN95 ISOSL_NT351 syn keyword ishdConstant ISOSL_NT351_ALPHA ISOSL_NT351_MIPS ISOSL_NT351_PPC syn keyword ishdConstant ISOSL_NT40 ISOSL_NT40_ALPHA ISOSL_NT40_MIPS syn keyword ishdConstant ISOSL_NT40_PPC IS_PENTIUM IS_POWERPC IS_RAMDRIVE syn keyword ishdConstant IS_REMOTE IS_REMOVABLE IS_SVGA IS_UNKNOWN IS_UVGA syn keyword ishdConstant IS_VALID_PATH IS_VGA IS_WIN32S IS_WINDOWS IS_WINDOWS95 syn keyword ishdConstant IS_WINDOWSNT IS_WINOS2 IS_XVGA ISTYPE INFOFILENAME syn keyword ishdConstant ISRES ISUSER ISVERSION LANGUAGE LANGUAGE_DRV LESS_THAN syn keyword ishdConstant LINE_NUMBER LISTBOX_ENTER LISTBOX_SELECT LISTFIRST syn keyword ishdConstant LISTLAST LISTNEXT LISTPREV LOCKEDFILE LOGGING syn keyword ishdConstant LOWER_LEFT LOWER_RIGHT LIST_NULL MAGENTA MAINCAPTION syn keyword ishdConstant MATH_COPROCESSOR MAX_STRING MENU METAFILE MMEDIA_AVI syn keyword ishdConstant MMEDIA_MIDI MMEDIA_PLAYASYNCH MMEDIA_PLAYCONTINUOUS syn keyword ishdConstant MMEDIA_PLAYSYNCH MMEDIA_STOP MMEDIA_WAVE MOUSE syn keyword ishdConstant MOUSE_DRV MEDIA MODE NETWORK NETWORK_DRV NEXT syn keyword ishdConstant NEXTBUTTON NO NO_SUBDIR NO_WRITE_ACCESS NONCONTIGUOUS syn keyword ishdConstant NONEXCLUSIVE NORMAL NORMALMODE NOSET NOTEXISTS NOTRESET syn keyword ishdConstant NOWAIT NULL NUMBERLIST OFF OK ON ONLYDIR OS OSMAJOR syn keyword ishdConstant OSMINOR OTHER_FAILURE OUT_OF_DISK_SPACE PARALLEL syn keyword ishdConstant PARTIAL PATH PATH_EXISTS PAUSE PERSONAL PROFSTRING syn keyword ishdConstant PROGMAN PROGRAMFILES RAM_DRIVE REAL RECORDMODE RED syn keyword ishdConstant REGDB_APPPATH REGDB_APPPATH_DEFAULT REGDB_BINARY syn keyword ishdConstant REGDB_ERR_CONNECTIONEXISTS REGDB_ERR_CORRUPTEDREGISTRY syn keyword ishdConstant REGDB_ERR_FILECLOSE REGDB_ERR_FILENOTFOUND syn keyword ishdConstant REGDB_ERR_FILEOPEN REGDB_ERR_FILEREAD syn keyword ishdConstant REGDB_ERR_INITIALIZATION REGDB_ERR_INVALIDFORMAT syn keyword ishdConstant REGDB_ERR_INVALIDHANDLE REGDB_ERR_INVALIDNAME syn keyword ishdConstant REGDB_ERR_INVALIDPLATFORM REGDB_ERR_OUTOFMEMORY syn keyword ishdConstant REGDB_ERR_REGISTRY REGDB_KEYS REGDB_NAMES REGDB_NUMBER syn keyword ishdConstant REGDB_STRING REGDB_STRING_EXPAND REGDB_STRING_MULTI syn keyword ishdConstant REGDB_UNINSTALL_NAME REGKEY_CLASSES_ROOT syn keyword ishdConstant REGKEY_CURRENT_USER REGKEY_LOCAL_MACHINE REGKEY_USERS syn keyword ishdConstant REMOTE_DRIVE REMOVE REMOVEABLE_DRIVE REPLACE syn keyword ishdConstant REPLACE_ITEM RESET RESTART ROOT ROTATE RUN_MAXIMIZED syn keyword ishdConstant RUN_MINIMIZED RUN_SEPARATEMEMORY SELECTFOLDER syn keyword ishdConstant SELFREGISTER SELFREGISTERBATCH SELFREGISTRATIONPROCESS syn keyword ishdConstant SERIAL SET SETUPTYPE SETUPTYPE_INFO_DESCRIPTION syn keyword ishdConstant SETUPTYPE_INFO_DISPLAYNAME SEVERE SHARE SHAREDFILE syn keyword ishdConstant SHELL_OBJECT_FOLDER SILENTMODE SPLITCOMPRESS SPLITCOPY syn keyword ishdConstant SRCTARGETDIR STANDARD STATUS STATUS95 STATUSBAR syn keyword ishdConstant STATUSDLG STATUSEX STATUSOLD STRINGLIST STYLE_BOLD syn keyword ishdConstant STYLE_ITALIC STYLE_NORMAL STYLE_SHADOW STYLE_UNDERLINE syn keyword ishdConstant SW_HIDE SW_MAXIMIZE SW_MINIMIZE SW_NORMAL SW_RESTORE syn keyword ishdConstant SW_SHOW SW_SHOWMAXIMIZED SW_SHOWMINIMIZED syn keyword ishdConstant SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE syn keyword ishdConstant SW_SHOWNORMAL SYS_BOOTMACHINE SYS_BOOTWIN syn keyword ishdConstant SYS_BOOTWIN_INSTALL SYS_RESTART SYS_SHUTDOWN SYS_TODOS syn keyword ishdConstant SELECTED_LANGUAGE SHELL_OBJECT_LANGUAGE SRCDIR SRCDISK syn keyword ishdConstant SUPPORTDIR TEXT TILED TIME TRUE TYPICAL TARGETDIR syn keyword ishdConstant TARGETDISK UPPER_LEFT UPPER_RIGHT USER_ADMINISTRATOR syn keyword ishdConstant UNINST VALID_PATH VARIABLE_LEFT VARIABLE_UNDEFINED syn keyword ishdConstant VER_DLL_NOT_FOUND VER_UPDATE_ALWAYS VER_UPDATE_COND syn keyword ishdConstant VERSION VIDEO VOLUMELABEL WAIT WARNING WELCOME WHITE syn keyword ishdConstant WIN32SINSTALLED WIN32SMAJOR WIN32SMINOR WINDOWS_SHARED syn keyword ishdConstant WINMAJOR WINMINOR WINDIR WINDISK WINSYSDIR WINSYSDISK syn keyword ishdConstant XCOPY_DATETIME YELLOW YES syn keyword ishdFunction AskDestPath AskOptions AskPath AskText AskYesNo syn keyword ishdFunction AppCommand AddProfString AddFolderIcon BatchAdd syn keyword ishdFunction BatchDeleteEx BatchFileLoad BatchFileSave BatchFind syn keyword ishdFunction BatchGetFileName BatchMoveEx BatchSetFileName syn keyword ishdFunction ComponentDialog ComponentAddItem syn keyword ishdFunction ComponentCompareSizeRequired ComponentDialog syn keyword ishdFunction ComponentError ComponentFileEnum ComponentFileInfo syn keyword ishdFunction ComponentFilterLanguage ComponentFilterOS syn keyword ishdFunction ComponentGetData ComponentGetItemSize syn keyword ishdFunction ComponentInitialize ComponentIsItemSelected syn keyword ishdFunction ComponentListItems ComponentMoveData syn keyword ishdFunction ComponentSelectItem ComponentSetData ComponentSetTarget syn keyword ishdFunction ComponentSetupTypeEnum ComponentSetupTypeGetData syn keyword ishdFunction ComponentSetupTypeSet ComponentTotalSize syn keyword ishdFunction ComponentValidate ConfigAdd ConfigDelete ConfigFileLoad syn keyword ishdFunction ConfigFileSave ConfigFind ConfigGetFileName syn keyword ishdFunction ConfigGetInt ConfigMove ConfigSetFileName ConfigSetInt syn keyword ishdFunction CmdGetHwndDlg CtrlClear CtrlDir CtrlGetCurSel syn keyword ishdFunction CtrlGetMLEText CtrlGetMultCurSel CtrlGetState syn keyword ishdFunction CtrlGetSubCommand CtrlGetText CtrlPGroups syn keyword ishdFunction CtrlSelectText CtrlSetCurSel CtrlSetFont CtrlSetList syn keyword ishdFunction CtrlSetMLEText CtrlSetMultCurSel CtrlSetState syn keyword ishdFunction CtrlSetText CallDLLFx ChangeDirectory CloseFile syn keyword ishdFunction CopyFile CreateDir CreateFile CreateRegistrySet syn keyword ishdFunction CommitSharedFiles CreateProgramFolder syn keyword ishdFunction CreateShellObjects CopyBytes DefineDialog Delay syn keyword ishdFunction DeleteDir DeleteFile Do DoInstall DeinstallSetReference syn keyword ishdFunction DeinstallStart DialogSetInfo DeleteFolderIcon syn keyword ishdFunction DeleteProgramFolder Disable EzBatchAddPath syn keyword ishdFunction EzBatchAddString ExBatchReplace EnterDisk syn keyword ishdFunction EzConfigAddDriver EzConfigAddString EzConfigGetValue syn keyword ishdFunction EzConfigSetValue EndDialog EzDefineDialog ExistsDir syn keyword ishdFunction ExistsDisk ExitProgMan Enable EzBatchReplace syn keyword ishdFunction FileCompare FileDeleteLine FileGrep FileInsertLine syn keyword ishdFunction FindAllDirs FindAllFiles FindFile FindWindow syn keyword ishdFunction GetFileInfo GetLine GetFont GetDiskSpace GetEnvVar syn keyword ishdFunction GetExtents GetMemFree GetMode GetSystemInfo syn keyword ishdFunction GetValidDrivesList GetWindowHandle GetProfInt syn keyword ishdFunction GetProfString GetFolderNameList GetGroupNameList syn keyword ishdFunction GetItemNameList GetDir GetDisk HIWORD Handler Is syn keyword ishdFunction ISCompareServicePack InstallationInfo LOWORD LaunchApp syn keyword ishdFunction LaunchAppAndWait ListAddItem ListAddString ListCount syn keyword ishdFunction ListCreate ListCurrentItem ListCurrentString syn keyword ishdFunction ListDeleteItem ListDeleteString ListDestroy syn keyword ishdFunction ListFindItem ListFindString ListGetFirstItem syn keyword ishdFunction ListGetFirstString ListGetNextItem ListGetNextString syn keyword ishdFunction ListReadFromFile ListSetCurrentItem syn keyword ishdFunction ListSetCurrentString ListSetIndex ListWriteToFile syn keyword ishdFunction LongPathFromShortPath LongPathToQuote syn keyword ishdFunction LongPathToShortPath MessageBox MessageBeep NumToStr syn keyword ishdFunction OpenFile OpenFileMode PathAdd PathDelete PathFind syn keyword ishdFunction PathGet PathMove PathSet ProgDefGroupType ParsePath syn keyword ishdFunction PlaceBitmap PlaceWindow PlayMMedia QueryProgGroup syn keyword ishdFunction QueryProgItem QueryShellMgr RebootDialog ReleaseDialog syn keyword ishdFunction ReadBytes RenameFile ReplaceProfString ReloadProgGroup syn keyword ishdFunction ReplaceFolderIcon RGB RegDBConnectRegistry syn keyword ishdFunction RegDBCreateKeyEx RegDBDeleteKey RegDBDeleteValue syn keyword ishdFunction RegDBDisConnectRegistry RegDBGetAppInfo RegDBGetItem syn keyword ishdFunction RegDBGetKeyValueEx RegDBKeyExist RegDBQueryKey syn keyword ishdFunction RegDBSetAppInfo RegDBSetDefaultRoot RegDBSetItem syn keyword ishdFunction RegDBSetKeyValueEx SeekBytes SelectDir SetFileInfo syn keyword ishdFunction SelectDir SelectFolder SetupType SprintfBox SdSetupType syn keyword ishdFunction SdSetupTypeEx SdMakeName SilentReadData SilentWriteData syn keyword ishdFunction SendMessage Sprintf System SdAskDestPath SdAskOptions syn keyword ishdFunction SdAskOptionsList SdBitmap SdComponentDialog syn keyword ishdFunction SdComponentDialog2 SdComponentDialogAdv SdComponentMult syn keyword ishdFunction SdConfirmNewDir SdConfirmRegistration SdDisplayTopics syn keyword ishdFunction SdFinish SdFinishReboot SdInit SdLicense SdMakeName syn keyword ishdFunction SdOptionsButtons SdProductName SdRegisterUser syn keyword ishdFunction SdRegisterUserEx SdSelectFolder SdSetupType syn keyword ishdFunction SdSetupTypeEx SdShowAnyDialog SdShowDlgEdit1 syn keyword ishdFunction SdShowDlgEdit2 SdShowDlgEdit3 SdShowFileMods syn keyword ishdFunction SdShowInfoList SdShowMsg SdStartCopy SdWelcome syn keyword ishdFunction SelectFolder ShowGroup ShowProgamFolder SetColor syn keyword ishdFunction SetDialogTitle SetDisplayEffect SetErrorMsg syn keyword ishdFunction SetErrorTitle SetFont SetStatusWindow SetTitle syn keyword ishdFunction SizeWindow StatusUpdate StrCompare StrFind StrGetTokens syn keyword ishdFunction StrLength StrRemoveLastSlash StrSub StrToLower StrToNum syn keyword ishdFunction StrToUpper ShowProgramFolder UnUseDLL UseDLL VarRestore syn keyword ishdFunction VarSave VerUpdateFile VerCompare VerFindFileVersion syn keyword ishdFunction VerGetFileVersion VerSearchAndUpdateFile VerUpdateFile syn keyword ishdFunction Welcome WaitOnDialog WriteBytes WriteLine syn keyword ishdFunction WriteProfString XCopyFile syn keyword ishdTodo contained TODO "integer number, or floating point number without a dot. syn match ishdNumber "\<\d\+\>" "floating point number, with dot syn match ishdNumber "\<\d\+\.\d*\>" "floating point number, starting with a dot syn match ishdNumber "\.\d\+\>" " String constants syn region ishdString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region ishdComment start="//" end="$" contains=ishdTodo syn region ishdComment start="/\*" end="\*/" contains=ishdTodo " Pre-processor commands syn region ishdPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=ishdComment,ishdString if !exists("ishd_no_if0") syn region ishdHashIf0 start="^\s*#\s*if\s\+0\>" end=".\|$" contains=ishdHashIf0End syn region ishdHashIf0End contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=ishdHashIf0Skip syn region ishdHashIf0Skip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=ishdHashIf0Skip endif syn region ishdIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match ishdInclude +^\s*#\s*include\>\s*"+ contains=ishdIncluded syn cluster ishdPreProcGroup contains=ishdPreCondit,ishdIncluded,ishdInclude,ishdDefine,ishdHashIf0,ishdHashIf0End,ishdHashIf0Skip,ishdNumber syn region ishdDefine start="^\s*#\s*\(define\|undef\)\>" end="$" contains=ALLBUT,@ishdPreProcGroup " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link ishdNumber Number hi def link ishdError Error hi def link ishdStatement Statement hi def link ishdString String hi def link ishdComment Comment hi def link ishdTodo Todo hi def link ishdFunction Identifier hi def link ishdConstant PreProc hi def link ishdType Type hi def link ishdInclude Include hi def link ishdDefine Macro hi def link ishdIncluded String hi def link ishdPreCondit PreCondit hi def link ishdHashIf0Skip ishdHashIf0 hi def link ishdHashIf0End ishdHashIf0 hi def link ishdHashIf0 Comment let b:current_syntax = "ishd" " vim: ts=8 neovim-0.2.2/runtime/syntax/iss.vim000066400000000000000000000115741320401574200173420ustar00rootroot00000000000000" Vim syntax file " Language: Inno Setup File (iss file) and My InnoSetup extension " Maintainer: Jason Mills (jmills@cs.mun.ca) " Previous Maintainer: Dominique Stphan (dominique@mggen.com) " Last Change: 2004 Dec 14 " " Todo: " - The paramter String: is matched as flag string (because of case ignore). " - Pascal scripting syntax is not recognized. " - Embedded double quotes confuse string matches. e.g. "asfd""asfa" " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " shut case off syn case ignore " Preprocessor syn region issPreProc start="^\s*#" end="$" " Section syn region issSection start="\[" end="\]" " Label in the [Setup] Section syn match issDirective "^[^=]\+=" " URL syn match issURL "http[s]\=:\/\/.*$" " Parameters used for any section. " syn match issParam"[^: ]\+:" syn match issParam "Name:" syn match issParam "MinVersion:\|OnlyBelowVersion:\|Languages:" syn match issParam "Source:\|DestDir:\|DestName:\|CopyMode:" syn match issParam "Attribs:\|Permissions:\|FontInstall:\|Flags:" syn match issParam "FileName:\|Parameters:\|WorkingDir:\|HotKey:\|Comment:" syn match issParam "IconFilename:\|IconIndex:" syn match issParam "Section:\|Key:\|String:" syn match issParam "Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:" syn match issParam "RunOnceId:" syn match issParam "Type:\|Excludes:" syn match issParam "Components:\|Description:\|GroupDescription:\|Types:\|ExtraDiskSpaceRequired:" syn match issParam "StatusMsg:\|RunOnceId:\|Tasks:" syn match issParam "MessagesFile:\|LicenseFile:\|InfoBeforeFile:\|InfoAfterFile:" syn match issComment "^\s*;.*$" " folder constant syn match issFolder "{[^{]*}" " string syn region issString start=+"+ end=+"+ contains=issFolder " [Dirs] syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall " [Files] syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder dontcopy syn keyword issFilesAttribs readonly hidden system syn keyword issFilesPermissions full modify readexec syn keyword issFilesFlags allowunsafefiles comparetimestampalso confirmoverwrite deleteafterinstall syn keyword issFilesFlags dontcopy dontverifychecksum external fontisnttruetype ignoreversion syn keyword issFilesFlags isreadme onlyifdestfileexists onlyifdoesntexist overwritereadonly syn keyword issFilesFlags promptifolder recursesubdirs regserver regtypelib restartreplace syn keyword issFilesFlags sharedfile skipifsourcedoesntexist sortfilesbyextension touch syn keyword issFilesFlags uninsremovereadonly uninsrestartdelete uninsneveruninstall syn keyword issFilesFlags replacesameversion nocompression noencryption noregerror " [Icons] syn keyword issIconsFlags closeonexit createonlyiffileexists dontcloseonexit syn keyword issIconsFlags runmaximized runminimized uninsneveruninstall useapppaths " [INI] syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty " [Registry] syn keyword issRegRootKey HKCR HKCU HKLM HKU HKCC syn keyword issRegValueType none string expandsz multisz dword binary syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue dontcreatekey syn keyword issRegFlags preservestringtype noerror uninsclearvalue syn keyword issRegFlags uninsdeletekey uninsdeletekeyifempty uninsdeletevalue " [Run] and [UninstallRun] syn keyword issRunFlags hidewizard nowait postinstall runhidden runmaximized syn keyword issRunFlags runminimized shellexec skipifdoesntexist skipifnotsilent syn keyword issRunFlags skipifsilent unchecked waituntilidle " [Types] syn keyword issTypesFlags iscustom " [Components] syn keyword issComponentsFlags dontinheritcheck exclusive fixed restart disablenouninstallwarning " [UninstallDelete] and [InstallDelete] syn keyword issInstallDeleteType files filesandordirs dirifempty " [Tasks] syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart unchecked " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later hi def link issSection Special hi def link issComment Comment hi def link issDirective Type hi def link issParam Type hi def link issFolder Special hi def link issString String hi def link issURL Include hi def link issPreProc PreProc hi def link issDirsFlags Keyword hi def link issFilesCopyMode Keyword hi def link issFilesAttribs Keyword hi def link issFilesPermissions Keyword hi def link issFilesFlags Keyword hi def link issIconsFlags Keyword hi def link issINIFlags Keyword hi def link issRegRootKey Keyword hi def link issRegValueType Keyword hi def link issRegFlags Keyword hi def link issRunFlags Keyword hi def link issTypesFlags Keyword hi def link issComponentsFlags Keyword hi def link issInstallDeleteType Keyword hi def link issTasksFlags Keyword let b:current_syntax = "iss" " vim:ts=8 neovim-0.2.2/runtime/syntax/ist.vim000066400000000000000000000037201320401574200173350ustar00rootroot00000000000000" Vim syntax file " Language: Makeindex style file, *.ist " Maintainer: Peter Meszaros " Last Change: 2012 Jan 08 by Thilo Six " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword=$,@,48-57,_ syn case ignore syn keyword IstInpSpec actual arg_close arg_open encap escape syn keyword IstInpSpec keyword level quote range_close range_open syn keyword IstInpSpec page_compositor syn keyword IstOutSpec preamble postamble setpage_prefix setpage_suffix group_skip syn keyword IstOutSpec headings_flag heading_prefix heading_suffix syn keyword IstOutSpec lethead_flag lethead_prefix lethead_suffix syn keyword IstOutSpec symhead_positive symhead_negative numhead_positive numhead_negative syn keyword IstOutSpec item_0 item_1 item_2 item_01 syn keyword IstOutSpec item_x1 item_12 item_x2 syn keyword IstOutSpec delim_0 delim_1 delim_2 syn keyword IstOutSpec delim_n delim_r delim_t syn keyword IstOutSpec encap_prefix encap_infix encap_suffix syn keyword IstOutSpec line_max indent_space indent_length syn keyword IstOutSpec suffix_2p suffix_3p suffix_mp syn region IstString matchgroup=IstDoubleQuote start=+"+ skip=+\\"+ end=+"+ contains=IstSpecial syn match IstCharacter "'.'" syn match IstNumber "\d\+" syn match IstComment "^[\t ]*%.*$" contains=IstTodo syn match IstSpecial "\\\\\|{\|}\|#\|\\n" contained syn match IstTodo "DEBUG\|TODO" contained " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link IstInpSpec Type hi def link IstOutSpec Identifier hi def link IstString String hi def link IstNumber Number hi def link IstComment Comment hi def link IstTodo Todo hi def link IstSpecial Special hi def link IstDoubleQuote Label hi def link IstCharacter Label let b:current_syntax = "ist" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/j.vim000066400000000000000000000222371320401574200167730ustar00rootroot00000000000000" Vim syntax file " Language: J " Maintainer: David Bürgin <676c7473@gmail.com> " URL: https://github.com/glts/vim-j " Last Change: 2015-01-11 if exists('b:current_syntax') finish endif let s:save_cpo = &cpo set cpo&vim syntax case match syntax sync minlines=100 syntax cluster jStdlibItems contains=jStdlibNoun,jStdlibAdverb,jStdlibConjunction,jStdlibVerb syntax cluster jPrimitiveItems contains=jNoun,jAdverb,jConjunction,jVerb,jCopula syntax match jControl /\<\%(assert\|break\|case\|catch[dt]\=\|continue\|do\|else\%(if\)\=\|end\|fcase\|for\|if\|return\|select\|throw\|try\|whil\%(e\|st\)\)\./ syntax match jControl /\<\%(for\|goto\|label\)_\a\k*\./ " Standard library names. A few names need to be defined with ":syntax match" " because they would otherwise take precedence over the corresponding jControl " and jDefineExpression items. syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFIOS IFJCDROID IFJHS IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCMPX JFL JINT JPTR JSIZES JSTR JTYPES JVERSION LF LF2 TAB UNAME UNXLIB dbhelp libjqt syntax keyword jStdlibAdverb define each every fapplylines inv inverse items leaf rows rxapply rxmerge table syntax keyword jStdlibConjunction bind cuts def on syntax keyword jStdlibVerb AND Endian IFDEF OR XOR anddf android_exec_am android_exec_host andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring cleartags clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert compare coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dberm dberr dbg dbjmp dblocals dblxq dblxs dbnxt dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcompare fcompares fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getalpha getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf8 jcwdpath joinstring jpath jpathsep jsystemdefs launch list ljust load loadd loadtags mema memf memr memw nameclass namelist names nc nl pick quote require rjust rplc rxE rxall rxcomp rxcut rxeq rxerror rxfirst rxfree rxfrom rxhandles rxin rxindex rxinfo rxmatch rxmatches rxrplc rxutf8 script scriptd scripts setalpha setbreak shell show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid startupconsole startupide stderr stdin stdout stringreplace symdat symget symset ta tagcp tagopen tagselect take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep xedit syntax match jStdlibNoun /\<\%(adverb\|conjunction\|dyad\|monad\|noun\|verb\)\>/ syntax match jStdlibVerb /\<\%(Note\|\%(assert\|break\|do\)\.\@!\)\>/ " Numbers. Matching J numbers is difficult. In fact, the job cannot be done " with regular expressions alone. Below is a sketch of the pattern used. It " accepts most well-formed numbers and rejects most of the ill-formed ones. " See http://www.jsoftware.com/help/dictionary/dcons.htm for reference. " " "double1" and "double2" patterns: " (_?\d+(\.\d*)?|_\.\d+)([eE]_?\d+)? " (_?\d+(\.\d*)?|_\.\d+|\.\d+)([eE]_?\d+)? " " "rational1" and "rational2" patterns: " \k(r\k)?|__? " \k(r\k)?|__? " " "complex1" and "complex2" patterns: " \k((j|a[dr])\k)? " \k((j|a[dr])\k)? " " "basevalue" pattern: " _?[0-9a-z]+(\.[0-9a-z]*)?|_?\.[0-9a-z]+ " " all numbers: " \b\k([px]\k)?(b\k)?(?![0-9A-Za-z_.]) syntax match jNumber /\<_\.[0-9A-Za-z_.]\@!/ syntax match jNumber /\<_\=\d\+x[0-9A-Za-z_.]\@!/ syntax match jNumber /\<\%(__\=r_\=\d\+\|_\=\d\+r__\=\)[0-9A-Za-z_.]\@!/ syntax match jNumber /\<\%(\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\)\%([eE]_\=\d\+\)\=\%(r\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\)\=\|__\=\)\%(\%(j\|a[dr]\)\%(\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\%(r\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\)\=\|__\=\)\)\=\%([px]\%(\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\%(r\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\)\=\|__\=\)\%(\%(j\|a[dr]\)\%(\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\%(r\%(_\=\d\+\%(\.\d*\)\=\|_\.\d\+\|\.\d\+\)\%([eE]_\=\d\+\)\=\)\=\|__\=\)\)\=\)\=\%(b\%(_\=[0-9a-z]\+\%(\.[0-9a-z]*\)\=\|_\=\.[0-9a-z]\+\)\)\=[0-9A-Za-z_.]\@!/ syntax region jString oneline start=/'/ skip=/''/ end=/'/ syntax keyword jArgument contained x y u v m n " Primitives. Order is significant both within the patterns and among " ":syntax match" statements. Refer to "Parts of speech" in the J dictionary. syntax match jNoun /\+*\-%$|,#][.:]\=\|[~}"][.:]\|{\%[::]\|\<\%([ACeEiIjLor]\.\|p\.\.\=\|[ipqsux]:\|0:\|_\=[1-9]:\)/ syntax match jCopula /=[.:]/ syntax match jConjunction /;\.\|\^:\|![.:]/ " Explicit noun definition. The difficulty is that the define expression can " occur in the middle of a line but the jNounDefine region must only start on " the next line. The trick is to split the problem into two regions and link " them with "nextgroup=". The fold wrapper provides syntax folding. syntax region jNounDefineFold \ matchgroup=NONE start=/\%(\%(\%(^\s*Note\)\|\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>\)\@=/ \ keepend matchgroup=NONE end=/^\s*)\s*$/ \ contains=jNounDefineStart \ fold syntax region jNounDefineStart \ matchgroup=jDefineExpression start=/\%(\%(^\s*Note\)\|\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>/ \ keepend matchgroup=NONE end=/$/ \ contains=@jStdlibItems,@jPrimitiveItems,jNumber,jString,jParenGroup,jParen,jComment \ contained oneline skipempty nextgroup=jDefineEnd,jNounDefine " These two items must have "contained", which allows them to match only after " jNounDefineStart thanks to the "nextgroup=" above. syntax region jNounDefine \ matchgroup=NONE start=/^/ \ matchgroup=jDefineEnd end=/^\s*)\s*$/ \ contained " This match is necessary in case of an empty noun definition syntax match jDefineEnd contained /^\s*)\s*$/ " Explicit verb, adverb, and conjunction definition syntax region jDefine \ matchgroup=jDefineExpression start=/\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>/ \ matchgroup=jDefineEnd end=/^\s*)\s*$/ \ contains=jControl,@jStdlibItems,@jPrimitiveItems,jNumber,jString,jArgument,jParenGroup,jParen,jComment,jDefineMonadDyad \ fold syntax match jDefineMonadDyad contained /^\s*:\s*$/ " Paired parentheses. When a jDefineExpression such as "3 : 0" is " parenthesised it will erroneously extend jParenGroup to span over the whole " definition body. This situation receives a special treatment here. syntax match jParen /(\%(\s*\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\s*)\)\@=/ syntax match jParen contained /\%((\s*\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\s*\)\@<=)/ syntax region jParenGroup \ matchgroup=jParen start=/(\%(\s*\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>\)\@!/ \ matchgroup=jParen end=/)/ \ oneline transparent syntax keyword jTodo contained TODO FIXME XXX syntax match jComment /\ " This is a syntax definition for the JAL language. " It is based on the Source Forge compiler source code. " https://sourceforge.net/projects/jal/ " " TODO test. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore syn sync lines=250 syn keyword picTodo NOTE TODO XXX contained syn match picIdentifier "[a-z_$][a-z0-9_$]*" syn match picLabel "^[A-Z_$][A-Z0-9_$]*" syn match picLabel "^[A-Z_$][A-Z0-9_$]*:"me=e-1 syn match picASCII "A\='.'" syn match picBinary "B'[0-1]\+'" syn match picDecimal "D'\d\+'" syn match picDecimal "\d\+" syn match picHexadecimal "0x\x\+" syn match picHexadecimal "H'\x\+'" syn match picHexadecimal "[0-9]\x*h" syn match picOctal "O'[0-7]\o*'" syn match picComment ";.*" contains=picTodo syn region picString start=+"+ end=+"+ syn keyword picRegister indf tmr0 pcl status fsr port_a port_b port_c port_d port_e x84_eedata x84_eeadr pclath intcon syn keyword picRegister f877_tmr1l f877_tmr1h f877_t1con f877_t2con f877_ccpr1l f877_ccpr1h f877_ccp1con syn keyword picRegister f877_pir1 f877_pir2 f877_pie1 f877_adcon1 f877_adcon0 f877_pr2 f877_adresl f877_adresh syn keyword picRegister f877_eeadr f877_eedath f877_eeadrh f877_eedata f877_eecon1 f877_eecon2 f628_EECON2 syn keyword picRegister f877_rcsta f877_txsta f877_spbrg f877_txreg f877_rcreg f628_EEDATA f628_EEADR f628_EECON1 " Register --- bits " STATUS syn keyword picRegisterPart status_c status_dc status_z status_pd syn keyword picRegisterPart status_to status_rp0 status_rp1 status_irp " pins syn keyword picRegisterPart pin_a0 pin_a1 pin_a2 pin_a3 pin_a4 pin_a5 syn keyword picRegisterPart pin_b0 pin_b1 pin_b2 pin_b3 pin_b4 pin_b5 pin_b6 pin_b7 syn keyword picRegisterPart pin_c0 pin_c1 pin_c2 pin_c3 pin_c4 pin_c5 pin_c6 pin_c7 syn keyword picRegisterPart pin_d0 pin_d1 pin_d2 pin_d3 pin_d4 pin_d5 pin_d6 pin_d7 syn keyword picRegisterPart pin_e0 pin_e1 pin_e2 syn keyword picPortDir port_a_direction port_b_direction port_c_direction port_d_direction port_e_direction syn match picPinDir "pin_a[012345]_direction" syn match picPinDir "pin_b[01234567]_direction" syn match picPinDir "pin_c[01234567]_direction" syn match picPinDir "pin_d[01234567]_direction" syn match picPinDir "pin_e[012]_direction" " INTCON syn keyword picRegisterPart intcon_gie intcon_eeie intcon_peie intcon_t0ie intcon_inte syn keyword picRegisterPart intcon_rbie intcon_t0if intcon_intf intcon_rbif " TIMER syn keyword picRegisterPart t1ckps1 t1ckps0 t1oscen t1sync tmr1cs tmr1on tmr1ie tmr1if "cpp bits syn keyword picRegisterPart ccp1x ccp1y " adcon bits syn keyword picRegisterPart adcon0_go adcon0_ch0 adcon0_ch1 adcon0_ch2 " EECON syn keyword picRegisterPart eecon1_rd eecon1_wr eecon1_wren eecon1_wrerr eecon1_eepgd syn keyword picRegisterPart f628_eecon1_rd f628_eecon1_wr f628_eecon1_wren f628_eecon1_wrerr " usart syn keyword picRegisterPart tx9 txen sync brgh tx9d syn keyword picRegisterPart spen rx9 cren ferr oerr rx9d syn keyword picRegisterPart TXIF RCIF " OpCodes... syn keyword picOpcode addlw andlw call clrwdt goto iorlw movlw option retfie retlw return sleep sublw tris syn keyword picOpcode xorlw addwf andwf clrf clrw comf decf decfsz incf incfsz retiw iorwf movf movwf nop syn keyword picOpcode rlf rrf subwf swapf xorwf bcf bsf btfsc btfss skpz skpnz setz clrz skpc skpnc setc clrc syn keyword picOpcode skpdc skpndc setdc clrdc movfw tstf bank page HPAGE mullw mulwf cpfseq cpfsgt cpfslt banka bankb syn keyword jalBoolean true false syn keyword jalBoolean off on syn keyword jalBit high low syn keyword jalConstant Input Output all_input all_output syn keyword jalConditional if else then elsif end if syn keyword jalLabel goto syn keyword jalRepeat for while forever loop syn keyword jalStatement procedure function syn keyword jalStatement return end volatile const var syn keyword jalType bit byte syn keyword jalModifier interrupt assembler asm put get syn keyword jalStatement out in is begin at syn keyword jalDirective pragma jump_table target target_clock target_chip name error test assert syn keyword jalPredefined hs xt rc lp internal 16c84 16f84 16f877 sx18 sx28 12c509a 12c508 syn keyword jalPredefined 12ce674 16f628 18f252 18f242 18f442 18f452 12f629 12f675 16f88 syn keyword jalPredefined 16f876 16f873 sx_12 sx18 sx28 pic_12 pic_14 pic_16 syn keyword jalDirective chip osc clock fuses cpu watchdog powerup protection syn keyword jalFunction bank_0 bank_1 bank_2 bank_3 bank_4 bank_5 bank_6 bank_7 trisa trisb trisc trisd trise syn keyword jalFunction _trisa_flush _trisb_flush _trisc_flush _trisd_flush _trise_flush syn keyword jalPIC local idle_loop syn region jalAsm matchgroup=jalAsmKey start="\" end="\" contains=jalComment,jalPreProc,jalLabel,picIdentifier, picLabel,picASCII,picDecimal,picHexadecimal,picOctal,picComment,picString,picRegister,picRigisterPart,picOpcode,picDirective,jalPIC syn region jalAsm matchgroup=jalAsmKey start="\" end=/$/ contains=jalComment,jalPreProc,jalLabel,picIdentifier, picLabel,picASCII,picDecimal,picHexadecimal,picOctal,picComment,picString,picRegister,picRigisterPart,picOpcode,picDirective,jalPIC syn region jalPsudoVars matchgroup=jalPsudoVarsKey start="\<'put\>" end="/" contains=jalComment syn match jalStringEscape contained "#[12][0-9]\=[0-9]\=" syn match jalIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" syn match jalSymbolOperator "[+\-/*=]" syn match jalSymbolOperator "!" syn match jalSymbolOperator "<" syn match jalSymbolOperator ">" syn match jalSymbolOperator "<=" syn match jalSymbolOperator ">=" syn match jalSymbolOperator "!=" syn match jalSymbolOperator "==" syn match jalSymbolOperator "<<" syn match jalSymbolOperator ">>" syn match jalSymbolOperator "|" syn match jalSymbolOperator "&" syn match jalSymbolOperator "%" syn match jalSymbolOperator "?" syn match jalSymbolOperator "[()]" syn match jalSymbolOperator "[\^.]" syn match jalLabel "[\^]*:" syn match jalNumber "-\=\<\d[0-9_]\+\>" syn match jalHexNumber "0x[0-9A-Fa-f_]\+\>" syn match jalBinNumber "0b[01_]\+\>" " String "wrong strings syn region jalStringError matchgroup=jalStringError start=+"+ end=+"+ end=+$+ contains=jalStringEscape "right strings syn region jalString matchgroup=jalString start=+'+ end=+'+ oneline contains=jalStringEscape " To see the start and end of strings: syn region jalString matchgroup=jalString start=+"+ end=+"+ oneline contains=jalStringEscapeGPC syn keyword jalTodo contained TODO syn region jalComment start=/-- / end=/$/ oneline contains=jalTodo syn region jalComment start=/--\t/ end=/$/ oneline contains=jalTodo syn match jalComment /--\_$/ syn region jalPreProc start="include" end=/$/ contains=JalComment,jalToDo if exists("jal_no_tabs") syn match jalShowTab "\t" endif " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link jalAcces jalStatement hi def link jalBoolean Boolean hi def link jalBit Boolean hi def link jalComment Comment hi def link jalConditional Conditional hi def link jalConstant Constant hi def link jalDelimiter Identifier hi def link jalDirective PreProc hi def link jalException Exception hi def link jalFloat Float hi def link jalFunction Function hi def link jalPsudoVarsKey Function hi def link jalLabel Label hi def link jalMatrixDelimiter Identifier hi def link jalModifier Type hi def link jalNumber Number hi def link jalBinNumber Number hi def link jalHexNumber Number hi def link jalOperator Operator hi def link jalPredefined Constant hi def link jalPreProc PreProc hi def link jalRepeat Repeat hi def link jalStatement Statement hi def link jalString String hi def link jalStringEscape Special hi def link jalStringEscapeGPC Special hi def link jalStringError Error hi def link jalStruct jalStatement hi def link jalSymbolOperator jalOperator hi def link jalTodo Todo hi def link jalType Type hi def link jalUnclassified Statement hi def link jalAsm Assembler hi def link jalError Error hi def link jalAsmKey Statement hi def link jalPIC Statement hi def link jalShowTab Error hi def link picTodo Todo hi def link picComment Comment hi def link picDirective Statement hi def link picLabel Label hi def link picString String hi def link picOpcode Keyword hi def link picRegister Structure hi def link picRegisterPart Special hi def link picPinDir SPecial hi def link picPortDir SPecial hi def link picASCII String hi def link picBinary Number hi def link picDecimal Number hi def link picHexadecimal Number hi def link picOctal Number hi def link picIdentifier Identifier let b:current_syntax = "jal" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/jam.vim000066400000000000000000000641271320401574200173150ustar00rootroot00000000000000" Vim syntax file " Language: JAM " Maintainer: Ralf Lemke (ralflemk@t-online.de) " Last change: 2012 Jan 08 by Thilo Six " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword=@,48-57,_,- " A bunch of useful jam keywords syn keyword jamStatement break call dbms flush global include msg parms proc public receive return send unload vars syn keyword jamConditional if else syn keyword jamRepeat for while next step syn keyword jamTodo contained TODO FIXME XXX syn keyword jamDBState1 alias binary catquery close close_all_connections column_names connection continue continue_bottom continue_down continue_top continue_up syn keyword jamDBState2 cursor declare engine execute format occur onentry onerror onexit sql start store unique with syn keyword jamSQLState1 all alter and any avg between by count create current data database delete distinct drop exists fetch from grant group syn keyword jamSQLState2 having index insert into like load max min of open order revoke rollback runstats select set show stop sum synonym table to union update values view where bundle syn keyword jamLibFunc1 dm_bin_create_occur dm_bin_delete_occur dm_bin_get_dlength dm_bin_get_occur dm_bin_length dm_bin_max_occur dm_bin_set_dlength dm_convert_empty dm_cursor_connection dm_cursor_consistent dm_cursor_engine dm_dbi_init dm_dbms dm_dbms_noexp dm_disable_styles dm_enable_styles dm_exec_sql dm_expand dm_free_sql_info dm_gen_change_execute_using dm_gen_change_select_from dm_gen_change_select_group_by dm_gen_change_select_having dm_gen_change_select_list dm_gen_change_select_order_by dm_gen_change_select_suffix dm_gen_change_select_where dm_gen_get_tv_alias dm_gen_sql_info syn keyword jamLibFunc2 dm_get_db_conn_handle dm_get_db_cursor_handle dm_get_driver_option dm_getdbitext dm_init dm_is_connection dm_is_cursor dm_is_engine dm_odb_preserves_cursor dm_reset dm_set_driver_option dm_set_max_fetches dm_set_max_rows_per_fetch dm_set_tm_clear_fast dm_val_relative sm_adjust_area sm_allget sm_amt_format sm_e_amt_format sm_i_amt_format sm_n_amt_format sm_o_amt_format sm_append_bundle_data sm_append_bundle_done sm_append_bundle_item sm_d_at_cur sm_l_at_cur sm_r_at_cur sm_mw_attach_drawing_func sm_mwn_attach_drawing_func sm_mwe_attach_drawing_func sm_xm_attach_drawing_func sm_xmn_attach_drawing_func sm_xme_attach_drawing_func sm_backtab sm_bel sm_bi_comparesm_bi_copy sm_bi_initialize sm_bkrect sm_c_off sm_c_on sm_c_vis sm_calc sm_cancel sm_ckdigit sm_cl_all_mdts sm_cl_unprot sm_clear_array sm_n_clear_array sm_1clear_array sm_n_1clear_array sm_close_window sm_com_load_picture sm_com_QueryInterface sm_com_result sm_com_result_msg sm_com_set_handler sm_copyarray sm_n_copyarray sm_create_bundle syn keyword jamLibFunc3 sm_d_msg_line sm_dblval sm_e_dblval sm_i_dblval sm_n_dblval sm_o_dblval sm_dd_able sm_dde_client_connect_cold sm_dde_client_connect_hot sm_dde_client_connect_warm sm_dde_client_disconnect sm_dde_client_off sm_dde_client_on sm_dde_client_paste_link_cold sm_dde_client_paste_link_hot sm_dde_client_paste_link_warm sm_dde_client_request sm_dde_execute sm_dde_install_notify sm_dde_poke sm_dde_server_off sm_dde_server_on sm_delay_cursor sm_deselect sm_dicname sm_disp_off sm_dlength sm_e_dlength sm_i_dlength sm_n_dlength sm_o_dlength sm_do_uinstalls sm_i_doccur sm_o_doccur sm_drawingarea sm_xm_drawingarea sm_dtofield sm_e_dtofield sm_i_dtofield sm_n_dtofield sm_o_dtofield sm_femsg sm_ferr_reset sm_fi_path sm_file_copy sm_file_exists sm_file_move sm_file_remove sm_fi_open sm_fi_path sm_filebox sm_filetypes sm_fio_a2f sm_fio_close sm_fio_editor sm_fio_error sm_fio_error_set sm_fio_f2a sm_fio_getc sm_fio_gets sm_fio_handle sm_fio_open sm_fio_putc sm_fio_puts sm_fio_rewind sm_flush sm_d_form sm_l_form syn keyword jamLibFunc4 sm_r_form sm_formlist sm_fptr sm_e_fptr sm_i_fptr sm_n_fptr sm_o_fptr sm_fqui_msg sm_fquiet_err sm_free_bundle sm_ftog sm_e_ftog sm_i_ftog sm_n_ftog sm_o_ftog sm_fval sm_e_fval sm_i_fval sm_n_fval sm_o_fval sm_i_get_bi_data sm_o_get_bi_data sm_get_bundle_data sm_get_bundle_item_count sm_get_bundle_occur_count sm_get_next_bundle_name sm_i_get_tv_bi_data sm_o_get_tv_bi_data sm_getfield sm_e_getfield sm_i_getfield sm_n_getfield sm_o_getfield sm_getkey sm_gofield sm_e_gofield sm_i_gofield sm_n_gofield sm_o_gofield sm_gtof sm_gval sm_i_gtof sm_n_gval sm_hlp_by_name sm_home sm_inimsg sm_initcrt sm_jinitcrt sm_jxinitcrt sm_input sm_inquire sm_install sm_intval sm_e_intval sm_i_intval sm_n_intval sm_o_intval sm_i_ioccur sm_o_ioccur sm_is_bundle sm_is_no sm_e_is_no sm_i_is_no sm_n_is_no sm_o_is_no sm_is_yes sm_e_is_yes sm_i_is_yes sm_n_is_yes sm_o_is_yes sm_isabort sm_iset sm_issv sm_itofield sm_e_itofield sm_i_itofield sm_n_itofield sm_o_itofield sm_jclose sm_jfilebox sm_jform sm_djplcall sm_jplcall syn keyword jamLibFunc5 sm_sjplcall sm_jplpublic sm_jplunload sm_jtop sm_jwindow sm_key_integer sm_keyfilter sm_keyhit sm_keyinit sm_n_keyinit sm_keylabel sm_keyoption sm_l_close sm_l_open sm_l_open_syslib sm_last sm_launch sm_h_ldb_fld_get sm_n_ldb_fld_get sm_h_ldb_n_fld_get sm_n_ldb_n_fld_get sm_h_ldb_fld_store sm_n_ldb_fld_store sm_h_ldb_n_fld_store sm_n_ldb_n_fld_store sm_ldb_get_active sm_ldb_get_inactive sm_ldb_get_next_active sm_ldb_get_next_inactive sm_ldb_getfield sm_i_ldb_getfield sm_n_ldb_getfield sm_o_ldb_getfield sm_ldb_h_getfield sm_i_ldb_h_getfield sm_n_ldb_h_getfield sm_o_ldb_h_getfield sm_ldb_handle sm_ldb_init sm_ldb_is_loaded sm_ldb_load sm_ldb_name sm_ldb_next_handle sm_ldb_pop sm_ldb_push sm_ldb_putfield sm_i_ldb_putfield sm_n_ldb_putfield sm_o_ldb_putfield sm_ldb_h_putfield sm_i_ldb_h_putfield sm_n_ldb_h_putfield sm_o_ldb_h_putfield sm_ldb_state_get sm_ldb_h_state_get sm_ldb_state_set sm_ldb_h_state_set sm_ldb_unload sm_ldb_h_unload sm_leave sm_list_objects_count sm_list_objects_end sm_list_objects_next syn keyword jamLibFunc6 sm_list_objects_start sm_lngval sm_e_lngval sm_i_lngval sm_n_lngval sm_o_lngval sm_load_screen sm_log sm_lstore sm_ltofield sm_e_ltofield sm_i_ltofield sm_n_ltofield sm_o_ltofield sm_m_flush sm_menu_bar_error sm_menu_change sm_menu_create sm_menu_delete sm_menu_get_int sm_menu_get_str sm_menu_install sm_menu_remove sm_message_box sm_mncrinit6 sm_mnitem_change sm_n_mnitem_change sm_mnitem_create sm_n_mnitem_create sm_mnitem_delete sm_n_mnitem_delete sm_mnitem_get_int sm_n_mnitem_get_int sm_mnitem_get_str sm_n_mnitem_get_str sm_mnscript_load sm_mnscript_unload sm_ms_inquire sm_msg sm_msg_del sm_msg_get sm_msg_read sm_d_msg_read sm_n_msg_read sm_msgfind sm_mts_CreateInstance sm_mts_CreateProperty sm_mts_CreatePropertyGroup sm_mts_DisableCommit sm_mts_EnableCommit sm_mts_GetPropertyValue sm_mts_IsCallerInRole sm_mts_IsInTransaction sm_mts_IsSecurityEnabled sm_mts_PutPropertyValue sm_mts_SetAbort sm_mts_SetComplete sm_mus_time sm_mw_get_client_wnd sm_mw_get_cmd_show sm_mw_get_frame_wnd sm_mw_get_instance syn keyword jamLibFunc7 sm_mw_get_prev_instance sm_mw_PrintScreen sm_next_sync sm_nl sm_null sm_e_null sm_i_null sm_n_null sm_o_null sm_obj_call sm_obj_copy sm_obj_copy_id sm_obj_create sm_obj_delete sm_obj_delete_id sm_obj_get_property sm_obj_onerror sm_obj_set_property sm_obj_sort sm_obj_sort_auto sm_occur_no sm_off_gofield sm_e_off_gofield sm_i_off_gofield sm_n_off_gofield sm_o_off_gofield sm_option sm_optmnu_id sm_pinquire sm_popup_at_cur sm_prop_error sm_prop_get_int sm_prop_get_str sm_prop_get_dbl sm_prop_get_x_int sm_prop_get_x_str sm_prop_get_x_dbl sm_prop_get_m_int sm_prop_get_m_str sm_prop_get_m_dbl sm_prop_id sm_prop_name_to_id sm_prop_set_int sm_prop_set_str sm_prop_set_dbl sm_prop_set_x_int sm_prop_set_x_str sm_prop_set_x_dbl sm_prop_set_m_int sm_prop_set_m_str sm_prop_set_m_dbl sm_pset sm_putfield sm_e_putfield sm_i_putfield sm_n_putfield sm_o_putfield sm_raise_exception sm_receive sm_receive_args sm_rescreen sm_resetcrt sm_jresetcrt sm_jxresetcrt sm_resize sm_restore_data sm_return sm_return_args sm_rmformlist sm_rs_data syn keyword jamLibFunc8 sm_rw_error_message sm_rw_play_metafile sm_rw_runreport sm_s_val sm_save_data sm_sdtime sm_select sm_send sm_set_help sm_setbkstat sm_setsibling sm_setstatus sm_sh_off sm_shell sm_shrink_to_fit sm_slib_error sm_slib_install sm_slib_load sm_soption sm_strip_amt_ptr sm_e_strip_amt_ptr sm_i_strip_amt_ptr sm_n_strip_amt_ptr sm_o_strip_amt_ptr sm_sv_data sm_sv_free sm_svscreen sm_tab sm_tm_clear sm_tm_clear_model_events sm_tm_command sm_tm_command_emsgset sm_tm_command_errset sm_tm_continuation_validity sm_tm_dbi_checker sm_tm_error sm_tm_errorlog sm_tm_event sm_tm_event_name sm_tm_failure_message sm_tm_handling sm_tm_inquire sm_tm_iset sm_tm_msg_count_error sm_tm_msg_emsg sm_tm_msg_error sm_tm_old_bi_context sm_tm_pcopy sm_tm_pinquire sm_tm_pop_model_event sm_tm_pset sm_tm_push_model_event sm_tmpnam sm_tp_exec sm_tp_free_arg_buf sm_tp_gen_insert sm_tp_gen_sel_return sm_tp_gen_sel_where sm_tp_gen_val_link sm_tp_gen_val_return sm_tp_get_svc_alias sm_tp_get_tux_callid sm_translatecoords sm_tst_all_mdts syn keyword jamLibFunc9 sm_udtime sm_ungetkey sm_unload_screen sm_unsvscreen sm_upd_select sm_validate sm_n_validate sm_vinit sm_n_vinit sm_wcount sm_wdeselect sm_web_get_cookie sm_web_invoke_url sm_web_log_error sm_web_save_global sm_web_set_cookie sm_web_unsave_all_globals sm_web_unsave_global sm_mw_widget sm_mwe_widget sm_mwn_widget sm_xm_widget sm_xme_widget sm_xmn_widget sm_win_shrink sm_d_window sm_d_at_cur sm_l_window sm_l_at_cur sm_r_window sm_r_at_cur sm_winsize sm_wrotate sm_wselect sm_n_wselect sm_ww_length sm_n_ww_length sm_ww_read sm_n_ww_read sm_ww_write sm_n_ww_write sm_xlate_table sm_xm_get_base_window sm_xm_get_display syn keyword jamVariable1 SM_SCCS_ID SM_ENTERTERM SM_MALLOC SM_CANCEL SM_BADTERM SM_FNUM SM_DZERO SM_EXPONENT SM_INVDATE SM_MATHERR SM_FRMDATA SM_NOFORM SM_FRMERR SM_BADKEY SM_DUPKEY SM_ERROR SM_SP1 SM_SP2 SM_RENTRY SM_MUSTFILL SM_AFOVRFLW SM_TOO_FEW_DIGITS SM_CKDIGIT SM_HITANY SM_NOHELP SM_MAXHELP SM_OUTRANGE SM_ENTERTERM1 SM_SYSDATE SM_DATFRM SM_DATCLR SM_DATINV SM_KSDATA SM_KSERR SM_KSNONE SM_KSMORE SM_DAYA1 SM_DAYA2 SM_DAYA3 SM_DAYA4 SM_DAYA5 SM_DAYA6 SM_DAYA7 SM_DAYL1 SM_DAYL2 SM_DAYL3 SM_DAYL4 SM_DAYL5 SM_DAYL6 SM_DAYL7 SM_MNSCR_LOAD SM_MENU_INSTALL SM_INSTDEFSCRL SM_INSTSCROLL SM_MOREDATA SM_READY SM_WAIT SM_YES SM_NO SM_NOTEMP SM_FRMHELP SM_FILVER SM_ONLYONE SM_WMSMOVE SM_WMSSIZE SM_WMSOFF SM_LPRINT SM_FMODE SM_NOFILE SM_NOSECTN SM_FFORMAT SM_FREAD SM_RX1 SM_RX2 SM_RX3 SM_TABLOOK SM_MISKET SM_ILLKET SM_ILLBRA SM_MISDBLKET SM_ILLDBLKET SM_ILLDBLBRA SM_ILL_RIGHT SM_ILLELSE SM_NUMBER SM_EOT SM_BREAK SM_NOARGS SM_BIGVAR SM_EXCESS SM_EOL SM_FILEIO SM_FOR SM_RCURLY SM_NONAME SM_1JPL_ERR SM_2JPL_ERR SM_3JPL_ERR syn keyword jamVariable2 SM_JPLATCH SM_FORMAT SM_DESTINATION SM_ORAND SM_ORATOR SM_ILL_LEFT SM_MISSPARENS SM_ILLCLOSE_COMM SM_FUNCTION SM_EQUALS SM_MISMATCH SM_QUOTE SM_SYNTAX SM_NEXT SM_VERB_UNKNOWN SM_JPLFORM SM_NOT_LOADED SM_GA_FLG SM_GA_CHAR SM_GA_ARG SM_GA_DIG SM_NOFUNC SM_BADPROTO SM_JPLPUBLIC SM_NOCOMPILE SM_NULLEDIT SM_RP_NULL SM_DBI_NOT_INST SM_NOTJY SM_MAXLIB SM_FL_FLLIB SM_TPI_NOT_INST SM_RW_NOT_INST SM_MONA1 SM_MONA2 SM_MONA3 SM_MONA4 SM_MONA5 SM_MONA6 SM_MONA7 SM_MONA8 SM_MONA9 SM_MONA10 SM_MONA11 SM_MONA12 SM_MONL1 SM_MONL2 SM_MONL3 SM_MONL4 SM_MONL5 SM_MONL6 SM_MONL7 SM_MONL8 SM_MONL9 SM_MONL10 SM_MONL11 SM_MONL12 SM_AM SM_PM SM_0DEF_DTIME SM_1DEF_DTIME SM_2DEF_DTIME SM_3DEF_DTIME SM_4DEF_DTIME SM_5DEF_DTIME SM_6DEF_DTIME SM_7DEF_DTIME SM_8DEF_DTIME SM_9DEF_DTIME SM_CALC_DATE SM_BAD_DIGIT SM_BAD_YN SM_BAD_ALPHA SM_BAD_NUM SM_BAD_ALPHNUM SM_DECIMAL SM_1STATS SM_VERNO SM_DIG_ERR SM_YN_ERR SM_LET_ERR SM_NUM_ERR SM_ANUM_ERR SM_REXP_ERR SM_POSN_ERR SM_FBX_OPEN SM_FBX_WINDOW SM_FBX_SIBLING SM_OPENDIR syn keyword jamVariable3 SM_GETFILES SM_CHDIR SM_GETCWD SM_UNCLOSED_COMM SM_MB_OKLABEL SM_MB_CANCELLABEL SM_MB_YESLABEL SM_MB_NOLABEL SM_MB_RETRYLABEL SM_MB_IGNORELABEL SM_MB_ABORTLABEL SM_MB_HELPLABEL SM_MB_STOP SM_MB_QUESTION SM_MB_WARNING SM_MB_INFORMATION SM_MB_YESALLLABEL SM_0MN_CURRDEF SM_1MN_CURRDEF SM_2MN_CURRDEF SM_0DEF_CURR SM_1DEF_CURR SM_2DEF_CURR SM_3DEF_CURR SM_4DEF_CURR SM_5DEF_CURR SM_6DEF_CURR SM_7DEF_CURR SM_8DEF_CURR SM_9DEF_CURR SM_SEND_SYNTAX SM_SEND_ITEM SM_SEND_INVALID_BUNDLE SM_RECEIVE_SYNTAX SM_RECEIVE_ITEM_NUMBER SM_RECEIVE_OVERFLOW SM_RECEIVE_ITEM SM_SYNCH_RECEIVE SM_EXEC_FAIL SM_DYNA_HELP_NOT_AVAIL SM_DLL_LOAD_ERR SM_DLL_UNRESOLVED SM_DLL_VERSION_ERR SM_DLL_OPTION_ERR SM_DEMOERR SM_MB_OKALLLABEL SM_MB_NOALLLABEL SM_BADPROP SM_BETWEEN SM_ATLEAST SM_ATMOST SM_PR_ERROR SM_PR_OBJID SM_PR_OBJECT SM_PR_ITEM SM_PR_PROP SM_PR_PROP_ITEM SM_PR_PROP_VAL SM_PR_CONVERT SM_PR_OBJ_TYPE SM_PR_RANGE SM_PR_NO_SET SM_PR_BYND_SCRN SM_PR_WW_SCROLL SM_PR_NO_SYNC SM_PR_TOO_BIG SM_PR_BAD_MASK SM_EXEC_MEM_ERR syn keyword jamVariable4 SM_EXEC_NO_PROG SM_PR_NO_KEYSTRUCT SM_REOPEN_AS_SLIB SM_REOPEN_THE_SLIB SM_ERRLIB SM_WARNLIB SM_LIB_DOWNGRADE SM_OLDER SM_NEWER SM_UPGRADE SM_LIB_READONLY SM_LOPEN_ERR SM_LOPEN_WARN SM_MLOPEN_CREAT SM_MLOPEN_INIT SM_LIB_ERR SM_LIB_ISOLATE SM_LIB_NO_ERR SM_LIB_REC_ERR SM_LIB_FATAL_ERR SM_LIB_LERR_FILE SM_LIB_LERR_NOTLIB SM_LIB_LERR_BADVERS SM_LIB_LERR_FORMAT SM_LIB_LERR_BADCM SM_LIB_LERR_LOCK SM_LIB_LERR_RESERVED SM_LIB_LERR_READONLY SM_LIB_LERR_NOENTRY SM_LIB_LERR_BUSY SM_LIB_LERR_ROVERS SM_LIB_LERR_DEFAULT SM_LIB_BADCM SM_LIB_LERR_NEW SM_STANDALONE_MODE SM_FEATURE_RESTRICT FM_CH_LOST FM_JPL_PROMPT FM_YR4 FM_YR2 FM_MON FM_MON2 FM_DATE FM_DATE2 FM_HOUR FM_HOUR2 FM_MIN FM_MIN2 FM_SEC FM_SEC2 FM_YRDAY FM_AMPM FM_DAYA FM_DAYL FM_MONA FM_MONL FM_0MN_DEF_DT FM_1MN_DEF_DT FM_2MN_DEF_DT FM_DAY JM_QTERMINATE JM_HITSPACE JM_HITACK JM_NOJWIN UT_MEMERR UT_P_OPT UT_V_OPT UT_E_BINOPT UT_NO_INPUT UT_SECLONG UT_1FNAME UT_SLINE UT_FILE UT_ERROR UT_WARNING UT_MISSEQ UT_VOPT UT_M2_DESCR syn keyword jamVariable5 UT_M2_PROGNAME UT_M2_USAGE UT_M2_O_OPT UT_M2_COM UT_M2_BADTAG UT_M2_MSSQUOT UT_M2_AFTRQUOT UT_M2_DUPSECT UT_M2_BADUCLSS UT_M2_USECPRFX UT_M2_MPTYUSCT UT_M2_DUPMSGTG UT_M2_TOOLONG UT_M2_LONG UT_K2_DESCR UT_K2_PROGNAME UT_K2_USAGE UT_K2_MNEM UT_K2_NKEYDEF UT_K2_DUPKEY UT_K2_NOTFOUND UT_K2_1FNAME UT_K2_VOPT UT_K2_EXCHAR UT_V2_DESCR UT_V2_PROGNAME UT_V2_USAGE UT_V2_SLINE UT_V2_SEQUAL UT_V2_SVARNAME UT_V2_SNAME UT_V2_VOPT UT_V2_1REQ UT_CB_DESCR UT_CB_PROGNAME UT_CB_USAGE UT_CB_VOPT UT_CB_MIEXT UT_CB_AEXT UT_CB_UNKNOWN UT_CB_ISCHEME UT_CB_BKFGS UT_CB_ABGS UT_CB_REC UT_CB_GUI UT_CB_CONT UT_CB_CONTFG UT_CB_AFILE UT_CB_LEFT_QUOTE UT_CB_NO_EQUAL UT_CB_EXTRA_EQ UT_CB_BAD_LHS UT_CB_BAD_RHS UT_CB_BAD_QUOTED UT_CB_FILE UT_CB_FILE_LINE UT_CB_DUP_ALIAS UT_CB_LINE_LOOP UT_CB_BAD_STYLE UT_CB_DUP_STYLE UT_CB_NO_SECT UT_CB_DUP_SCHEME DM_ERROR DM_NODATABASE DM_NOTLOGGEDON DM_ALREADY_ON DM_ARGS_NEEDED DM_LOGON_DENIED DM_BAD_ARGS DM_BAD_CMD DM_NO_MORE_ROWS DM_ABORTED DM_NO_CURSOR DM_MANY_CURSORS DM_KEYWORD syn keyword jamVariable6 DM_INVALID_DATE DM_COMMIT DM_ROLLBACK DM_PARSE_ERROR DM_BIND_COUNT DM_BIND_VAR DM_DESC_COL DM_FETCH DM_NO_NAME DM_END_OF_PROC DM_NOCONNECTION DM_NOTSUPPORTED DM_TRAN_PEND DM_NO_TRANSACTION DM_ALREADY_INIT DM_INIT_ERROR DM_MAX_DEPTH DM_NO_PARENT DM_NO_CHILD DM_MODALITY_NOT_FOUND DM_NATIVE_NO_SUPPORT DM_NATIVE_CANCEL DM_TM_ALREADY DM_TM_IN_PROGRESS DM_TM_CLOSE_ERROR DM_TM_BAD_MODE DM_TM_BAD_CLOSE_ACTION DM_TM_INTERNAL DM_TM_MODEL_INTERNAL DM_TM_NO_ROOT DM_TM_NO_TRANSACTION DM_TM_INITIAL_MODE DM_TM_PARENT_NAME DM_TM_BAD_MEMBER DM_TM_FLD_NAM_LEN DM_TM_NO_PARENT DM_TM_BAD_REQUEST DM_TM_CANNOT_GEN_SQL DM_TM_CANNOT_EXEC_SQL DM_TM_DBI_ERROR DM_TM_DISCARD_ALL DM_TM_DISCARD_LATEST DM_TM_CALL_ERROR DM_TM_CALL_TYPE DM_TM_HOOK_MODEL DM_TM_ROOT_NAME DM_TM_TV_INVALID DM_TM_COL_NOT_FOUND DM_TM_BAD_LINK DM_TM_HOOK_MODEL_ERROR DM_TM_ONE_ROW DM_TM_SOME_ROWS DM_TM_GENERAL DM_TM_NO_HOOK DM_TM_NOSET DM_TM_TBLNAME DM_TM_PRIMARY_KEY DM_TM_INCOMPLETE_KEY DM_TM_CMD_MODE DM_TM_NO_SUCH_CMD DM_TM_NO_SUCH_SCOPE syn keyword jamVariable7 DM_TM_NO_SUCH_TV DM_TM_EVENT_LOOP DM_TM_UNSUPPORTED DM_TM_NO_MODEL DM_TM_SYNCH_SV DM_TM_WRONG_FORM DM_TM_VC_FIELD DM_TM_VC_DATE DM_TM_VC_TYPE DM_TM_BAD_CONTINUE DM_JDB_OUT_OF_MEMORY DM_JDB_DUPTABLEALIAS DM_JDB_DUPCURSORNAME DM_JDB_NODB DM_JDB_BINDCOUNT DM_JDB_NO_MORE_ROWS DM_JDB_AMBIGUOUS_COLUMN_REF DM_JDB_UNRESOLVED_COLUMN_REF DM_JDB_TABLE_READ_WRITE_CONFLICT DM_JDB_SYNTAX_ERROR DM_JDB_DUP_COLUMN_ASSIGNMENT DM_JDB_NO_MSG_FILE DM_JDB_NO_MSG DM_JDB_NOT_IMPLEMENTED DM_JDB_AGGREGATE_NOT_ALLOWED DM_JDB_TYPE_MISMATCH DM_JDB_NO_CURRENT_ROW DM_JDB_DB_CORRUPT DM_JDB_BUF_OVERFLOW DM_JDB_FILE_IO_ERR DM_JDB_BAD_HANDLE DM_JDB_DUP_TNAME DM_JDB_INVALID_TABLE_OP DM_JDB_TABLE_NOT_FOUND DM_JDB_CONVERSION_FAILED DM_JDB_INVALID_COLUMN_LIST DM_JDB_TABLE_OPEN DM_JDB_BAD_INPUT DM_JDB_DATATYPE_OVERFLOW DM_JDB_DATABASE_EXISTS DM_JDB_DATABASE_OPEN DM_JDB_DUP_CNAME DM_JDB_TMPDATABASE_ERR DM_JDB_INVALID_VALUES_COUNT DM_JDB_INVALID_COLUMN_COUNT DM_JDB_MAX_RECLEN_EXCEEDED DM_JDB_END_OF_GROUP syn keyword jamVariable8 TP_EXC_INVALID_CLIENT_COMMAND TP_EXC_INVALID_CLIENT_OPTION TP_EXC_INVALID_COMMAND TP_EXC_INVALID_COMMAND_SYNTAX TP_EXC_INVALID_CONNECTION TP_EXC_INVALID_CONTEXT TP_EXC_INVALID_FORWARD TP_EXC_INVALID_JAM_VARIABLE_REF TP_EXC_INVALID_MONITOR_COMMAND TP_EXC_INVALID_MONITOR_OPTION TP_EXC_INVALID_OPTION TP_EXC_INVALID_OPTION_VALUE TP_EXC_INVALID_SERVER_COMMAND TP_EXC_INVALID_SERVER_OPTION TP_EXC_INVALID_SERVICE TP_EXC_INVALID_TRANSACTION TP_EXC_JIF_ACCESS_FAILED TP_EXC_JIF_LOWER_VERSION TP_EXC_LOGFILE_ERROR TP_EXC_MONITOR_ERROR TP_EXC_NO_OUTSIDE_TRANSACTION TP_EXC_NO_OUTSTANDING_CALLS TP_EXC_NO_OUTSTANDING_MESSAGE TP_EXC_NO_SERVICES_ADVERTISED TP_EXC_NO_SIGNALS TP_EXC_NONTRANSACTIONAL_SERVICE TP_EXC_NONTRANSACTIONAL_ACTION TP_EXC_OUT_OF_MEMORY TP_EXC_POSTING_FAILED TP_EXC_PERMISSION_DENIED TP_EXC_REQUEST_LIMIT TP_EXC_ROLLBACK_COMMITTED TP_EXC_ROLLBACK_FAILED TP_EXC_SERVICE_FAILED TP_EXC_SERVICE_NOT_IN_JIF TP_EXC_SERVICE_PROTOCOL_ERROR TP_EXC_SUBSCRIPTION_LIMIT syn keyword jamVariable9 TP_EXC_SUBSCRIPTION_MATCH TP_EXC_SVC_ADVERTISE_LIMIT TP_EXC_SVC_WORK_OUTSTANDING TP_EXC_SVCROUTINE_MISSING TP_EXC_SVRINIT_WORK_OUTSTANDING TP_EXC_TIMEOUT TP_EXC_TRANSACTION_LIMIT TP_EXC_UNLOAD_FAILED TP_EXC_UNSUPPORTED_BUFFER TP_EXC_UNSUPPORTED_BUF_W_SUBT TP_EXC_USER_ABORT TP_EXC_WORK_OUTSTANDING TP_EXC_XA_CLOSE_FAILED TP_EXC_XA_OPEN_FAILED TP_EXC_QUEUE_BAD_MSGID TP_EXC_QUEUE_BAD_NAMESPACE TP_EXC_QUEUE_BAD_QUEUE TP_EXC_QUEUE_CANT_START_TRAN TP_EXC_QUEUE_FULL TP_EXC_QUEUE_MSG_IN_USE TP_EXC_QUEUE_NO_MSG TP_EXC_QUEUE_NOT_IN_QSPACE TP_EXC_QUEUE_RSRC_NOT_OPEN TP_EXC_QUEUE_SPACE_NOT_IN_JIF TP_EXC_QUEUE_TRAN_ABORTED TP_EXC_QUEUE_TRAN_ABSENT TP_EXC_QUEUE_UNEXPECTED TP_EXC_DCE_LOGIN_REQUIRED TP_EXC_ENC_CELL_NAME_REQUIRED TP_EXC_ENC_CONN_INFO_DIFFS TP_EXC_ENC_SVC_REGISTRY_ERROR TP_INVALID_START_ROUTINE TP_JIF_NOT_FOUND TP_JIF_OPEN_ERROR TP_NO_JIF TP_NO_MONITORS_ERROR TP_NO_SESSIONS_ERROR TP_NO_START_ROUTINE TP_ADV_SERVICE TP_ADV_SERVICE_IN_GROUP TP_PRE_SVCHDL_WINOPEN_FAILED syn keyword jamVariable10 PV_YES PV_NO TRUE FALSE TM_TRAN_NAME " jamCommentGroup allows adding matches for special things in comments syn cluster jamCommentGroup contains=jamTodo " String and Character constants " Highlight special characters (those which have a backslash) differently syn match jamSpecial contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" if !exists("c_no_utf") syn match jamSpecial contained "\\\(u\x\{4}\|U\x\{8}\)" endif if exists("c_no_cformat") syn region jamString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial else syn match jamFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained syn match jamFormat "%%" contained syn region jamString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat hi link jamFormat jamSpecial endif syn match jamCharacter "L\='[^\\]'" syn match jamCharacter "L'[^']*'" contains=jamSpecial syn match jamSpecialError "L\='\\[^'\"?\\abfnrtv]'" syn match jamSpecialCharacter "L\='\\['\"?\\abfnrtv]'" syn match jamSpecialCharacter "L\='\\\o\{1,3}'" syn match jamSpecialCharacter "'\\x\x\{1,2}'" syn match jamSpecialCharacter "L'\\x\x\+'" "catch errors caused by wrong parenthesis and brackets syn cluster jamParenGroup contains=jamParenError,jamIncluded,jamSpecial,@jamCommentGroup,jamUserCont,jamUserLabel,jamBitField,jamCommentSkip,jamOctalZero,jamCppOut,jamCppOut2,jamCppSkip,jamFormat,jamNumber,jamFloat,jamOctal,jamOctalError,jamNumbersCom syn region jamParen transparent start='(' end=')' contains=ALLBUT,@jamParenGroup,jamErrInBracket syn match jamParenError "[\])]" syn match jamErrInParen contained "[\]{}]" syn region jamBracket transparent start='\[' end=']' contains=ALLBUT,@jamParenGroup,jamErrInParen syn match jamErrInBracket contained "[);{}]" "integer number, or floating point number without a dot and with "f". syn case ignore syn match jamNumbers transparent "\<\d\|\,\d" contains=jamNumber,jamFloat,jamOctalError,jamOctal " Same, but without octal error (for comments) syn match jamNumbersCom contained transparent "\<\d\|\,\d" contains=jamNumber,jamFloat,jamOctal syn match jamNumber contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" "hex number syn match jamNumber contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" " Flag the first zero of an octal number as something special syn match jamOctal contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero syn match jamOctalZero contained "\<0" syn match jamFloat contained "\d\+f" "floating point number, with dot, optional exponent syn match jamFloat contained "\d\+\,\d*\(e[-+]\=\d\+\)\=[fl]\=" "floating point number, starting with a dot, optional exponent syn match jamFloat contained "\,\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match jamFloat contained "\d\+e[-+]\=\d\+[fl]\=\>" " flag an octal number with wrong digits syn match jamOctalError contained "0\o*[89]\d*" syn case match syntax match jamOperator1 "\#\#" syntax match jamOperator6 "/" syntax match jamOperator2 "+" syntax match jamOperator3 "*" syntax match jamOperator4 "-" syntax match jamOperator5 "|" syntax match jamOperator6 "/" syntax match jamOperator7 "&" syntax match jamOperator8 ":" syntax match jamOperator9 "<" syntax match jamOperator10 ">" syntax match jamOperator11 "!" syntax match jamOperator12 "%" syntax match jamOperator13 "^" syntax match jamOperator14 "@" syntax match jamCommentL "//" if exists("jam_comment_strings") " A comment can contain jamString, jamCharacter and jamNumber. " But a "*/" inside a jamString in a jamComment DOES end the comment! So we " need to use a special type of jamString: jamCommentString, which also ends on " "*/", and sees a "*" at the start of the line as comment again. " Unfortunately this doesn't very well work for // type of comments :-( syntax match jamCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region jamCommentString contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=jamSpecial,jamCommentSkip syntax region jamComment2String contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=jamSpecial syntax region jamCommentL start="//" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamComment2String,jamCharacter,jamNumbersCom,jamSpaceError syntax region jamCommentL2 start="^#\|^\s\+\#" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamComment2String,jamCharacter,jamNumbersCom,jamSpaceError syntax region jamComment start="/\*" end="\*/" contains=@jamCommentGroup,jamCommentString,jamCharacter,jamNumbersCom,jamSpaceError else syn region jamCommentL start="//" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamSpaceError syn region jamCommentL2 start="^\#\|^\s\+\#" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamSpaceError syn region jamComment start="/\*" end="\*/" contains=@jamCommentGroup,jamSpaceError endif " keep a // comment separately, it terminates a preproc. conditional syntax match jamCommentError "\*/" syntax match jamOperator3Error "*/" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link jamCommentL jamComment hi def link jamCommentL2 jamComment hi def link jamOperator3Error jamError hi def link jamConditional Conditional hi def link jamRepeat Repeat hi def link jamCharacter Character hi def link jamSpecialCharacter jamSpecial hi def link jamNumber Number hi def link jamParenError jamError hi def link jamErrInParen jamError hi def link jamErrInBracket jamError hi def link jamCommentError jamError hi def link jamSpaceError jamError hi def link jamSpecialError jamError hi def link jamOperator1 jamOperator hi def link jamOperator2 jamOperator hi def link jamOperator3 jamOperator hi def link jamOperator4 jamOperator hi def link jamOperator5 jamOperator hi def link jamOperator6 jamOperator hi def link jamOperator7 jamOperator hi def link jamOperator8 jamOperator hi def link jamOperator9 jamOperator hi def link jamOperator10 jamOperator hi def link jamOperator11 jamOperator hi def link jamOperator12 jamOperator hi def link jamOperator13 jamOperator hi def link jamOperator14 jamOperator hi def link jamError Error hi def link jamStatement Statement hi def link jamPreCondit PreCondit hi def link jamCommentError jamError hi def link jamCommentString jamString hi def link jamComment2String jamString hi def link jamCommentSkip jamComment hi def link jamString String hi def link jamComment Comment hi def link jamSpecial SpecialChar hi def link jamTodo Todo hi def link jamCppSkip jamCppOut hi def link jamCppOut2 jamCppOut hi def link jamCppOut Comment hi def link jamDBState1 Identifier hi def link jamDBState2 Identifier hi def link jamSQLState1 jamSQL hi def link jamSQLState2 jamSQL hi def link jamLibFunc1 jamLibFunc hi def link jamLibFunc2 jamLibFunc hi def link jamLibFunc3 jamLibFunc hi def link jamLibFunc4 jamLibFunc hi def link jamLibFunc5 jamLibFunc hi def link jamLibFunc6 jamLibFunc hi def link jamLibFunc7 jamLibFunc hi def link jamLibFunc8 jamLibFunc hi def link jamLibFunc9 jamLibFunc hi def link jamVariable1 jamVariablen hi def link jamVariable2 jamVariablen hi def link jamVariable3 jamVariablen hi def link jamVariable4 jamVariablen hi def link jamVariable5 jamVariablen hi def link jamVariable6 jamVariablen hi def link jamVariable7 jamVariablen hi def link jamVariable8 jamVariablen hi def link jamVariable9 jamVariablen hi def link jamVariable10 jamVariablen hi def link jamVariablen Constant hi def link jamSQL Type hi def link jamLibFunc PreProc hi def link jamOperator Special let b:current_syntax = "jam" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/jargon.vim000066400000000000000000000011431320401574200200130ustar00rootroot00000000000000" Vim syntax file " Language: Jargon File " Maintainer: " Last Change: 2001 May 26 " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match jargonChaptTitle /:[^:]*:/ syn match jargonEmailAddr /[^<@ ^I]*@[^ ^I>]*/ syn match jargonUrl +\(http\|ftp\)://[^\t )"]*+ syn match jargonMark /{[^}]*}/ " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link jargonChaptTitle Title hi def link jargonEmailAddr Comment hi def link jargonUrl Comment hi def link jargonMark Label let b:current_syntax = "jargon" neovim-0.2.2/runtime/syntax/java.vim000066400000000000000000000430731320401574200174640ustar00rootroot00000000000000" Vim syntax file " Language: Java " Maintainer: Claudio Fleiner " URL: http://www.fleiner.com/vim/syntax/java.vim " Last Change: 2015 March 01 " Please check :help java.vim for comments on some of the options available. " quit when a syntax file was already loaded if !exists("main_syntax") if exists("b:current_syntax") finish endif " we define it here so that included files can test for it let main_syntax='java' syn region javaFold start="{" end="}" transparent fold endif let s:cpo_save = &cpo set cpo&vim " some characters that cannot be in a java program (outside a string) syn match javaError "[\\@`]" syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|\*\/" syn match javaOK "\.\.\." " use separate name so that it can be deleted in javacc.vim syn match javaError2 "#\|=<" hi def link javaError2 javaError " keyword definitions syn keyword javaExternal native package syn match javaExternal "\\(\s\+static\>\)\?" syn keyword javaError goto const syn keyword javaConditional if else switch syn keyword javaRepeat while for do syn keyword javaBoolean true false syn keyword javaConstant null syn keyword javaTypedef this super syn keyword javaOperator new instanceof syn keyword javaType boolean char byte short int long float double syn keyword javaType void syn keyword javaStatement return syn keyword javaStorageClass static synchronized transient volatile final strictfp serializable syn keyword javaExceptions throw try catch finally syn keyword javaAssert assert syn keyword javaMethodDecl synchronized throws syn keyword javaClassDecl extends implements interface " to differentiate the keyword class from MyClass.class we use a match here syn match javaTypedef "\.\s*\"ms=s+1 syn keyword javaClassDecl enum syn match javaClassDecl "^class\>" syn match javaClassDecl "[^.]\s*\"ms=s+1 syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>\(([^)]*)\)\=" contains=javaString syn match javaClassDecl "@interface\>" syn keyword javaBranch break continue nextgroup=javaUserLabelRef skipwhite syn match javaUserLabelRef "\k\+" contained syn match javaVarArg "\.\.\." syn keyword javaScopeDecl public protected private abstract if exists("java_highlight_java_lang_ids") let java_highlight_all=1 endif if exists("java_highlight_all") || exists("java_highlight_java") || exists("java_highlight_java_lang") " java.lang.* syn match javaLangClass "\" syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException syn cluster javaTop add=javaR_JavaLang syn cluster javaClasses add=javaR_JavaLang hi def link javaR_JavaLang javaR_Java syn keyword javaC_JavaLang Process RuntimePermission StringKeySet CharacterData01 Class ThreadLocal ThreadLocalMap CharacterData0E Package Character StringCoding Long ProcessImpl ProcessEnvironment Short AssertionStatusDirectives 1PackageInfoProxy UnicodeBlock InheritableThreadLocal AbstractStringBuilder StringEnvironment ClassLoader ConditionalSpecialCasing CharacterDataPrivateUse StringBuffer StringDecoder Entry StringEntry WrappedHook StringBuilder StrictMath State ThreadGroup Runtime CharacterData02 MethodArray Object CharacterDataUndefined Integer Gate Boolean Enum Variable Subset StringEncoder Void Terminator CharsetSD IntegerCache CharacterCache Byte CharsetSE Thread SystemClassLoaderAction CharacterDataLatin1 StringValues StackTraceElement Shutdown ShortCache String ConverterSD ByteCache Lock EnclosingMethodInfo Math Float Value Double SecurityManager LongCache ProcessBuilder StringEntrySet Compiler Number UNIXProcess ConverterSE ExternalData CaseInsensitiveComparator CharacterData00 NativeLibrary syn cluster javaTop add=javaC_JavaLang syn cluster javaClasses add=javaC_JavaLang hi def link javaC_JavaLang javaC_Java syn keyword javaE_JavaLang IncompatibleClassChangeError InternalError UnknownError ClassCircularityError AssertionError ThreadDeath IllegalAccessError NoClassDefFoundError ClassFormatError UnsupportedClassVersionError NoSuchFieldError VerifyError ExceptionInInitializerError InstantiationError LinkageError NoSuchMethodError Error UnsatisfiedLinkError StackOverflowError AbstractMethodError VirtualMachineError OutOfMemoryError syn cluster javaTop add=javaE_JavaLang syn cluster javaClasses add=javaE_JavaLang hi def link javaE_JavaLang javaE_Java syn keyword javaX_JavaLang CloneNotSupportedException Exception NoSuchMethodException IllegalAccessException NoSuchFieldException Throwable InterruptedException ClassNotFoundException InstantiationException syn cluster javaTop add=javaX_JavaLang syn cluster javaClasses add=javaX_JavaLang hi def link javaX_JavaLang javaX_Java hi def link javaR_Java javaR_ hi def link javaC_Java javaC_ hi def link javaE_Java javaE_ hi def link javaX_Java javaX_ hi def link javaX_ javaExceptions hi def link javaR_ javaExceptions hi def link javaE_ javaExceptions hi def link javaC_ javaConstant syn keyword javaLangObject clone equals finalize getClass hashCode syn keyword javaLangObject notify notifyAll toString wait hi def link javaLangObject javaConstant syn cluster javaTop add=javaLangObject endif if filereadable(expand(":p:h")."/javaid.vim") source :p:h/javaid.vim endif if exists("java_space_errors") if !exists("java_no_trail_space_error") syn match javaSpaceError "\s\+$" endif if !exists("java_no_tab_space_error") syn match javaSpaceError " \+\t"me=e-1 endif endif syn region javaLabelRegion transparent matchgroup=javaLabel start="\" matchgroup=NONE end=":" contains=javaNumber,javaCharacter,javaString syn match javaUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=javaLabel syn keyword javaLabel default " highlighting C++ keywords as errors removed, too many people find it " annoying. Was: if !exists("java_allow_cpp_keywords") " The following cluster contains all java groups except the contained ones syn cluster javaTop add=javaExternal,javaError,javaError,javaBranch,javaLabelRegion,javaLabel,javaConditional,javaRepeat,javaBoolean,javaConstant,javaTypedef,javaOperator,javaType,javaType,javaStatement,javaStorageClass,javaAssert,javaExceptions,javaMethodDecl,javaClassDecl,javaClassDecl,javaClassDecl,javaScopeDecl,javaError,javaError2,javaUserLabel,javaLangObject,javaAnnotation,javaVarArg " Comments syn keyword javaTodo contained TODO FIXME XXX if exists("java_comment_strings") syn region javaCommentString contained start=+"+ end=+"+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=javaSpecial,javaCommentStar,javaSpecialChar,@Spell syn region javaComment2String contained start=+"+ end=+$\|"+ contains=javaSpecial,javaSpecialChar,@Spell syn match javaCommentCharacter contained "'\\[^']\{1,6\}'" contains=javaSpecialChar syn match javaCommentCharacter contained "'\\''" contains=javaSpecialChar syn match javaCommentCharacter contained "'[^\\]'" syn cluster javaCommentSpecial add=javaCommentString,javaCommentCharacter,javaNumber syn cluster javaCommentSpecial2 add=javaComment2String,javaCommentCharacter,javaNumber endif syn region javaComment start="/\*" end="\*/" contains=@javaCommentSpecial,javaTodo,@Spell syn match javaCommentStar contained "^\s*\*[^/]"me=e-1 syn match javaCommentStar contained "^\s*\*$" syn match javaLineComment "//.*" contains=@javaCommentSpecial2,javaTodo,@Spell hi def link javaCommentString javaString hi def link javaComment2String javaString hi def link javaCommentCharacter javaCharacter syn cluster javaTop add=javaComment,javaLineComment if !exists("java_ignore_javadoc") && main_syntax != 'jsp' syntax case ignore " syntax coloring for javadoc comments (HTML) syntax include @javaHtml :p:h/html.vim unlet b:current_syntax " HTML enables spell checking for all text that is not in a syntax item. This " is wrong for Java (all identifiers would be spell-checked), so it's undone " here. syntax spell default syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaTodo,@Spell syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags,javaDocSeeTag syn region javaDocTags contained start="{@\(code\|link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}" syn match javaDocTags contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam syn match javaDocParam contained "\s\S\+" syn match javaDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>" syn region javaDocSeeTag contained matchgroup=javaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=javaDocSeeTagParam syn match javaDocSeeTagParam contained @"\_[^"]\+"\|\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ extend syntax case match endif " match the special comment /**/ syn match javaComment "/\*\*/" " Strings and constants syn match javaSpecialError contained "\\." syn match javaSpecialCharError contained "[^']" syn match javaSpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)" syn region javaString start=+"+ end=+"+ end=+$+ contains=javaSpecialChar,javaSpecialError,@Spell " next line disabled, it can cause a crash for a long line "syn match javaStringError +"\([^"\\]\|\\.\)*$+ syn match javaCharacter "'[^']*'" contains=javaSpecialChar,javaSpecialCharError syn match javaCharacter "'\\''" contains=javaSpecialChar syn match javaCharacter "'[^\\]'" syn match javaNumber "\<\(0[bB][0-1]\+\|0[0-7]*\|0[xX]\x\+\|\d\(\d\|_\d\)*\)[lL]\=\>" syn match javaNumber "\(\<\d\(\d\|_\d\)*\.\(\d\(\d\|_\d\)*\)\=\|\.\d\(\d\|_\d\)*\)\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\=" syn match javaNumber "\<\d\(\d\|_\d\)*[eE][-+]\=\d\(\d\|_\d\)*[fFdD]\=\>" syn match javaNumber "\<\d\(\d\|_\d\)*\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\>" " unicode characters syn match javaSpecial "\\u\d\{4\}" syn cluster javaTop add=javaString,javaCharacter,javaNumber,javaSpecial,javaStringError if exists("java_highlight_functions") if java_highlight_functions == "indent" syn match javaFuncDef "^\(\t\| \{8\}\)[_$a-zA-Z][_$a-zA-Z0-9_. \[\]<>]*([^-+*/]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation syn region javaFuncDef start=+^\(\t\| \{8\}\)[$_a-zA-Z][$_a-zA-Z0-9_. \[\]<>]*([^-+*/]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation syn match javaFuncDef "^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]<>]*([^-+*/]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation syn region javaFuncDef start=+^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]<>]*([^-+*/]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation else " This line catches method declarations at any indentation>0, but it assumes " two things: " 1. class names are always capitalized (ie: Button) " 2. method names are never capitalized (except constructors, of course) "syn region javaFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|final\|native\|synchronized\)\s\+\)*\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(<[^>]*>\)\=\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*([^0-9]+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,javaComment,javaLineComment,@javaClasses syn region javaFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|final\|native\|synchronized\)\s\+\)*\(<.*>\s\+\)\?\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(<[^(){}]*>\)\=\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*(+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,javaComment,javaLineComment,@javaClasses,javaAnnotation endif syn match javaLambdaDef "[a-zA-Z_][a-zA-Z0-9_]*\s*->" syn match javaBraces "[{}]" syn cluster javaTop add=javaFuncDef,javaBraces,javaLambdaDef endif if exists("java_highlight_debug") " Strings and constants syn match javaDebugSpecial contained "\\\d\d\d\|\\." syn region javaDebugString contained start=+"+ end=+"+ contains=javaDebugSpecial syn match javaDebugStringError +"\([^"\\]\|\\.\)*$+ syn match javaDebugCharacter contained "'[^\\]'" syn match javaDebugSpecialCharacter contained "'\\.'" syn match javaDebugSpecialCharacter contained "'\\''" syn match javaDebugNumber contained "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" syn match javaDebugNumber contained "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" syn match javaDebugNumber contained "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" syn match javaDebugNumber contained "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" syn keyword javaDebugBoolean contained true false syn keyword javaDebugType contained null this super syn region javaDebugParen start=+(+ end=+)+ contained contains=javaDebug.*,javaDebugParen " to make this work you must define the highlighting for these groups syn match javaDebug "\\[\], \t]*)\s*->" " needs to be defined after the parenthesis error catcher to work endif if !exists("java_minlines") let java_minlines = 10 endif exec "syn sync ccomment javaComment minlines=" . java_minlines " The default highlighting. hi def link javaLambdaDef Function hi def link javaFuncDef Function hi def link javaVarArg Function hi def link javaBraces Function hi def link javaBranch Conditional hi def link javaUserLabelRef javaUserLabel hi def link javaLabel Label hi def link javaUserLabel Label hi def link javaConditional Conditional hi def link javaRepeat Repeat hi def link javaExceptions Exception hi def link javaAssert Statement hi def link javaStorageClass StorageClass hi def link javaMethodDecl javaStorageClass hi def link javaClassDecl javaStorageClass hi def link javaScopeDecl javaStorageClass hi def link javaBoolean Boolean hi def link javaSpecial Special hi def link javaSpecialError Error hi def link javaSpecialCharError Error hi def link javaString String hi def link javaCharacter Character hi def link javaSpecialChar SpecialChar hi def link javaNumber Number hi def link javaError Error hi def link javaStringError Error hi def link javaStatement Statement hi def link javaOperator Operator hi def link javaComment Comment hi def link javaDocComment Comment hi def link javaLineComment Comment hi def link javaConstant Constant hi def link javaTypedef Typedef hi def link javaTodo Todo hi def link javaAnnotation PreProc hi def link javaCommentTitle SpecialComment hi def link javaDocTags Special hi def link javaDocParam Function hi def link javaDocSeeTagParam Function hi def link javaCommentStar javaComment hi def link javaType Type hi def link javaExternal Include hi def link htmlComment Special hi def link htmlCommentPart Special hi def link javaSpaceError Error let b:current_syntax = "java" if main_syntax == 'java' unlet main_syntax endif let b:spell_options="contained" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/javacc.vim000066400000000000000000000043201320401574200177620ustar00rootroot00000000000000" Vim syntax file " Language: JavaCC, a Java Compiler Compiler written by JavaSoft " Maintainer: Claudio Fleiner " URL: http://www.fleiner.com/vim/syntax/javacc.vim " Last Change: 2012 Oct 05 " Uses java.vim, and adds a few special things for JavaCC Parser files. " Those files usually have the extension *.jj " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " source the java.vim file runtime! syntax/java.vim unlet b:current_syntax "remove catching errors caused by wrong parenthesis (does not work in javacc "files) (first define them in case they have not been defined in java) syn match javaParen "--" syn match javaParenError "--" syn match javaInParen "--" syn match javaError2 "--" syn clear javaParen syn clear javaParenError syn clear javaInParen syn clear javaError2 " remove function definitions (they look different) (first define in " in case it was not defined in java.vim) "syn match javaFuncDef "--" syn clear javaFuncDef syn match javaFuncDef "[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)[ \t]*:" contains=javaType syn keyword javaccPackages options DEBUG_PARSER DEBUG_LOOKAHEAD DEBUG_TOKEN_MANAGER syn keyword javaccPackages COMMON_TOKEN_ACTION IGNORE_CASE CHOICE_AMBIGUITY_CHECK syn keyword javaccPackages OTHER_AMBIGUITY_CHECK STATIC LOOKAHEAD ERROR_REPORTING syn keyword javaccPackages USER_TOKEN_MANAGER USER_CHAR_STREAM JAVA_UNICODE_ESCAPE syn keyword javaccPackages UNICODE_INPUT JDK_VERSION syn match javaccPackages "PARSER_END([^)]*)" syn match javaccPackages "PARSER_BEGIN([^)]*)" syn match javaccSpecToken "" " the dot is necessary as otherwise it will be matched as a keyword. syn match javaccSpecToken ".LOOKAHEAD("ms=s+1,me=e-1 syn match javaccToken "<[^> \t]*>" syn keyword javaccActionToken TOKEN SKIP MORE SPECIAL_TOKEN syn keyword javaccError DEBUG IGNORE_IN_BNF " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link javaccSpecToken Statement hi def link javaccActionToken Type hi def link javaccPackages javaScopeDecl hi def link javaccToken String hi def link javaccError Error let b:current_syntax = "javacc" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/javascript.vim000066400000000000000000000116251320401574200207070ustar00rootroot00000000000000" Vim syntax file " Language: JavaScript " Maintainer: Claudio Fleiner " Updaters: Scott Shattuck (ss) " URL: http://www.fleiner.com/vim/syntax/javascript.vim " Changes: (ss) added keywords, reserved words, and other identifiers " (ss) repaired several quoting and grouping glitches " (ss) fixed regex parsing issue with multiple qualifiers [gi] " (ss) additional factoring of keywords, globals, and members " Last Change: 2012 Oct 05 " 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke) " tuning parameters: " unlet javaScript_fold if !exists("main_syntax") " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let main_syntax = 'javascript' elseif exists("b:current_syntax") && b:current_syntax == "javascript" finish endif let s:cpo_save = &cpo set cpo&vim syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained syn match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo syn match javaScriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" syn region javaScriptComment start="/\*" end="\*/" contains=@Spell,javaScriptCommentTodo syn match javaScriptSpecial "\\\d\d\d\|\\." syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc syn match javaScriptSpecialCharacter "'\\.'" syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gim]\{0,2\}\s*$+ end=+/[gim]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline syn keyword javaScriptConditional if else switch syn keyword javaScriptRepeat while for do in syn keyword javaScriptBranch break continue syn keyword javaScriptOperator new delete instanceof typeof syn keyword javaScriptType Array Boolean Date Function Number Object String RegExp syn keyword javaScriptStatement return with syn keyword javaScriptBoolean true false syn keyword javaScriptNull null undefined syn keyword javaScriptIdentifier arguments this var let syn keyword javaScriptLabel case default syn keyword javaScriptException try catch finally throw syn keyword javaScriptMessage alert confirm prompt status syn keyword javaScriptGlobal self window top parent syn keyword javaScriptMember document event location syn keyword javaScriptDeprecated escape unescape syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile if exists("javaScript_fold") syn match javaScriptFunction "\" syn region javaScriptFunctionFold start="\.*[^};]$" end="^\z1}.*$" transparent fold keepend syn sync match javaScriptSync grouphere javaScriptFunctionFold "\" syn sync match javaScriptSync grouphere NONE "^}" setlocal foldmethod=syntax setlocal foldtext=getline(v:foldstart) else syn keyword javaScriptFunction function syn match javaScriptBraces "[{}\[\]]" syn match javaScriptParens "[()]" endif syn sync fromstart syn sync maxlines=100 if main_syntax == "javascript" syn sync ccomment javaScriptComment endif " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link javaScriptComment Comment hi def link javaScriptLineComment Comment hi def link javaScriptCommentTodo Todo hi def link javaScriptSpecial Special hi def link javaScriptStringS String hi def link javaScriptStringD String hi def link javaScriptCharacter Character hi def link javaScriptSpecialCharacter javaScriptSpecial hi def link javaScriptNumber javaScriptValue hi def link javaScriptConditional Conditional hi def link javaScriptRepeat Repeat hi def link javaScriptBranch Conditional hi def link javaScriptOperator Operator hi def link javaScriptType Type hi def link javaScriptStatement Statement hi def link javaScriptFunction Function hi def link javaScriptBraces Function hi def link javaScriptError Error hi def link javaScrParenError javaScriptError hi def link javaScriptNull Keyword hi def link javaScriptBoolean Boolean hi def link javaScriptRegexpString String hi def link javaScriptIdentifier Identifier hi def link javaScriptLabel Label hi def link javaScriptException Exception hi def link javaScriptMessage Keyword hi def link javaScriptGlobal Keyword hi def link javaScriptMember Keyword hi def link javaScriptDeprecated Exception hi def link javaScriptReserved Keyword hi def link javaScriptDebug Debug hi def link javaScriptConstant Label let b:current_syntax = "javascript" if main_syntax == 'javascript' unlet main_syntax endif let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/jess.vim000066400000000000000000000141261320401574200175040ustar00rootroot00000000000000" Vim syntax file " Language: Jess " Maintainer: Paul Baleme " Last change: September 14, 2000 " Based on lisp.vim by : Dr. Charles E. Campbell, Jr. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ " Lists syn match jessSymbol ![^()'`,"; \t]\+! contained syn match jessBarSymbol !|..\{-}|! contained syn region jessList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSymbol,jessSpecial,jessFunc,jessKey,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol,jessVar syn region jessBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSpecial,jessSymbol,jessFunc,jessKey,jessVar,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol " Atoms syn match jessAtomMark "'" syn match jessAtom "'("me=e-1 contains=jessAtomMark nextgroup=jessAtomList syn match jessAtom "'[^ \t()]\+" contains=jessAtomMark syn match jessAtomBarSymbol !'|..\{-}|! contains=jessAtomMark syn region jessAtom start=+'"+ skip=+\\"+ end=+"+ syn region jessAtomList matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contained contains=jessAtomList,jessAtomNmbr0,jessString,jessComment,jessAtomBarSymbol syn match jessAtomNmbr "\<[0-9]\+" contained " Standard jess Functions and Macros syn keyword jessFunc * + ** - / < > <= >= <> = syn keyword jessFunc long longp syn keyword jessFunc abs agenda and syn keyword jessFunc assert assert-string bag syn keyword jessFunc batch bind bit-and syn keyword jessFunc bit-not bit-or bload syn keyword jessFunc bsave build call syn keyword jessFunc clear clear-storage close syn keyword jessFunc complement$ context count-query-results syn keyword jessFunc create$ syn keyword jessFunc delete$ div syn keyword jessFunc do-backward-chaining e syn keyword jessFunc engine eq eq* syn keyword jessFunc eval evenp exit syn keyword jessFunc exp explode$ external-addressp syn keyword jessFunc fact-slot-value facts fetch syn keyword jessFunc first$ float floatp syn keyword jessFunc foreach format gensym* syn keyword jessFunc get get-fact-duplication syn keyword jessFunc get-member get-multithreaded-io syn keyword jessFunc get-reset-globals get-salience-evaluation syn keyword jessFunc halt if implode$ syn keyword jessFunc import insert$ integer syn keyword jessFunc integerp intersection$ jess-version-number syn keyword jessFunc jess-version-string length$ syn keyword jessFunc lexemep list-function$ load-facts syn keyword jessFunc load-function load-package log syn keyword jessFunc log10 lowcase matches syn keyword jessFunc max member$ min syn keyword jessFunc mod modify multifieldp syn keyword jessFunc neq new not syn keyword jessFunc nth$ numberp oddp syn keyword jessFunc open or pi syn keyword jessFunc ppdeffunction ppdefglobal ddpefrule syn keyword jessFunc printout random read syn keyword jessFunc readline replace$ reset syn keyword jessFunc rest$ retract retract-string syn keyword jessFunc return round rules syn keyword jessFunc run run-query run-until-halt syn keyword jessFunc save-facts set set-fact-duplication syn keyword jessFunc set-factory set-member set-multithreaded-io syn keyword jessFunc set-node-index-hash set-reset-globals syn keyword jessFunc set-salience-evaluation set-strategy syn keyword jessFunc setgen show-deffacts show-deftemplates syn keyword jessFunc show-jess-listeners socket syn keyword jessFunc sqrt store str-cat syn keyword jessFunc str-compare str-index str-length syn keyword jessFunc stringp sub-string subseq$ syn keyword jessFunc subsetp sym-cat symbolp syn keyword jessFunc system throw time syn keyword jessFunc try undefadvice undefinstance syn keyword jessFunc undefrule union$ unwatch syn keyword jessFunc upcase view watch syn keyword jessFunc while syn match jessFunc "\" " jess Keywords (modifiers) syn keyword jessKey defglobal deffunction defrule syn keyword jessKey deffacts syn keyword jessKey defadvice defclass definstance " Standard jess Variables syn region jessVar start="?" end="[^a-zA-Z0-9]"me=e-1 " Strings syn region jessString start=+"+ skip=+\\"+ end=+"+ " Shared with Declarations, Macros, Functions "syn keyword jessDeclaration syn match jessNumber "[0-9]\+" syn match jessSpecial "\*[a-zA-Z_][a-zA-Z_0-9-]*\*" syn match jessSpecial !#|[^()'`,"; \t]\+|#! syn match jessSpecial !#x[0-9a-fA-F]\+! syn match jessSpecial !#o[0-7]\+! syn match jessSpecial !#b[01]\+! syn match jessSpecial !#\\[ -\~]! syn match jessSpecial !#[':][^()'`,"; \t]\+! syn match jessSpecial !#([^()'`,"; \t]\+)! syn match jessConcat "\s\.\s" syntax match jessParenError ")" " Comments syn match jessComment ";.*$" " synchronization syn sync lines=100 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link jessAtomNmbr jessNumber hi def link jessAtomMark jessMark hi def link jessAtom Identifier hi def link jessAtomBarSymbol Special hi def link jessBarSymbol Special hi def link jessComment Comment hi def link jessConcat Statement hi def link jessDeclaration Statement hi def link jessFunc Statement hi def link jessKey Type hi def link jessMark Delimiter hi def link jessNumber Number hi def link jessParenError Error hi def link jessSpecial Type hi def link jessString String hi def link jessVar Identifier let b:current_syntax = "jess" " vim: ts=18 neovim-0.2.2/runtime/syntax/jgraph.vim000066400000000000000000000022741320401574200200140ustar00rootroot00000000000000" Vim syntax file " Language: jgraph (graph plotting utility) " Maintainer: Jonas Munsin jmunsin@iki.fi " Last Change: 2003 May 04 " this syntax file is not yet complete " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match " comments syn region jgraphComment start="(\* " end=" \*)" syn keyword jgraphCmd newcurve newgraph marktype syn keyword jgraphType xaxis yaxis syn keyword jgraphType circle box diamond triangle x cross ellipse syn keyword jgraphType xbar ybar text postscript eps none general syn keyword jgraphType solid dotted dashed longdash dotdash dodotdash syn keyword jgraphType dotdotdashdash pts "integer number, or floating point number without a dot. - or no - syn match jgraphNumber "\<-\=\d\+\>" "floating point number, with dot - or no - syn match jgraphNumber "\<-\=\d\+\.\d*\>" "floating point number, starting with a dot - or no - syn match jgraphNumber "\-\=\.\d\+\>" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link jgraphComment Comment hi def link jgraphCmd Identifier hi def link jgraphType Type hi def link jgraphNumber Number let b:current_syntax = "jgraph" neovim-0.2.2/runtime/syntax/jovial.vim000066400000000000000000000100131320401574200200130ustar00rootroot00000000000000" Vim syntax file " Language: JOVIAL J73 " Version: 1.2 " Maintainer: Paul McGinnis " Last Change: 2011/06/17 " Remark: Based on MIL-STD-1589C for JOVIAL J73 language " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore syn keyword jovialTodo TODO FIXME XXX contained " JOVIAL beads - first digit is number of bits, [0-9A-V] is the bit value " representing 0-31 (for 5 bits on the bead) syn match jovialBitConstant "[1-5]B'[0-9A-V]'" syn match jovialNumber "\<\d\+\>" syn match jovialFloat "\d\+E[-+]\=\d\+" syn match jovialFloat "\d\+\.\d*\(E[-+]\=\d\+\)\=" syn match jovialFloat "\.\d\+\(E[-+]\=\d\+\)\=" syn region jovialComment start=/"/ end=/"/ contains=jovialTodo syn region jovialComment start=/%/ end=/%/ contains=jovialTodo " JOVIAL variable names. This rule is to prevent conflicts with strings. " Handle special case where ' character can be part of a JOVIAL variable name. syn match jovialIdentifier "[A-Z\$][A-Z0-9'\$]\+" syn region jovialString start="\s*'" skip=/''/ end=/'/ oneline " JOVIAL compiler directives -- see Section 9 in MIL-STD-1589C syn region jovialPreProc start="\s*![A-Z]\+" end=/;/ syn keyword jovialOperator AND OR NOT XOR EQV MOD " See Section 2.1 in MIL-STD-1589C for data types syn keyword jovialType ITEM B C P V syn match jovialType "\" syn match jovialType "\" syn match jovialType "\" syn match jovialType "\" syn keyword jovialStorageClass STATIC CONSTANT PARALLEL BLOCK N M D W syn keyword jovialStructure TABLE STATUS syn keyword jovialConstant NULL syn keyword jovialBoolean FALSE TRUE syn keyword jovialTypedef TYPE syn keyword jovialStatement ABORT BEGIN BY BYREF BYRES BYVAL CASE COMPOOL syn keyword jovialStatement DEF DEFAULT DEFINE ELSE END EXIT FALLTHRU FOR syn keyword jovialStatement GOTO IF INLINE INSTANCE LABEL LIKE OVERLAY POS syn keyword jovialStatement PROC PROGRAM REC REF RENT REP RETURN START STOP syn keyword jovialStatement TERM THEN WHILE " JOVIAL extensions, see section 8.2.2 in MIL-STD-1589C syn keyword jovialStatement CONDITION ENCAPSULATION EXPORTS FREE HANDLER IN INTERRUPT NEW syn keyword jovialStatement PROTECTED READONLY REGISTER SIGNAL TO UPDATE WITH WRITEONLY ZONE " implementation specific constants and functions, see section 1.4 in MIL-STD-1589C syn keyword jovialConstant BITSINBYTE BITSINWORD LOCSINWORD syn keyword jovialConstant BYTESINWORD BITSINPOINTER INTPRECISION syn keyword jovialConstant FLOATPRECISION FIXEDPRECISION FLOATRADIX syn keyword jovialConstant MAXFLOATPRECISION MAXFIXEDPRECISION syn keyword jovialConstant MAXINTSIZE MAXBYTES MAXBITS syn keyword jovialConstant MAXTABLESIZE MAXSTOP MINSTOP MAXSIGDIGITS syn keyword jovialFunction BYTEPOS MAXINT MININT syn keyword jovialFunction IMPLFLOATPRECISION IMPLFIXEDPRECISION IMPLINTSIZE syn keyword jovialFunction MINSIZE MINFRACTION MINSCALE MINRELPRECISION syn keyword jovialFunction MAXFLOAT MINFLOAT FLOATRELPRECISION syn keyword jovialFunction FLOATUNDERFLOW MAXFIXED MINFIXED " JOVIAL built-in functions syn keyword jovialFunction LOC NEXT BIT BYTE SHIFTL SHIFTR ABS SGN BITSIZE syn keyword jovialFunction BYTESIZE WORDSIZE LBOUND UBOUND NWDSEN FIRST syn keyword jovialFunction LAST NENT " Define the default highlighting. hi def link jovialBitConstant Number hi def link jovialBoolean Boolean hi def link jovialComment Comment hi def link jovialConstant Constant hi def link jovialFloat Float hi def link jovialFunction Function " No color highlighting for JOVIAL identifiers. See above, " this is to prevent confusion with JOVIAL strings "hi def link jovialIdentifier Identifier hi def link jovialNumber Number hi def link jovialOperator Operator hi def link jovialPreProc PreProc hi def link jovialStatement Statement hi def link jovialStorageClass StorageClass hi def link jovialString String hi def link jovialStructure Structure hi def link jovialTodo Todo hi def link jovialType Type hi def link jovialTypedef Typedef let b:current_syntax = "jovial" " vim: ts=8 neovim-0.2.2/runtime/syntax/jproperties.vim000066400000000000000000000125701320401574200211070ustar00rootroot00000000000000" Vim syntax file " Language: Java Properties resource file (*.properties[_*]) " Maintainer: Simon Baldwin " Last change: 26th Mar 2000 " ============================================================================= " Optional and tuning variables: " jproperties_lines " ----------------- " Set a value for the sync block that we use to find long continuation lines " in properties; the value is already large - if you have larger continuation " sets you may need to increase it further - if not, and you find editing is " slow, reduce the value of jproperties_lines. if !exists("jproperties_lines") let jproperties_lines = 256 endif " jproperties_strict_syntax " ------------------------- " Most properties files assign values with "id=value" or "id:value". But, " strictly, the Java properties parser also allows "id value", "id", and " even more bizarrely "=value", ":value", " value", and so on. These latter " ones, however, are rarely used, if ever, and handling them in the high- " lighting can obscure errors in the more normal forms. So, in practice " we take special efforts to pick out only "id=value" and "id:value" forms " by default. If you want strict compliance, set jproperties_strict_syntax " to non-zero (and good luck). if !exists("jproperties_strict_syntax") let jproperties_strict_syntax = 0 endif " jproperties_show_messages " ------------------------- " If this properties file contains messages for use with MessageFormat, " setting a non-zero value will highlight them. Messages are of the form " "{...}". Highlighting doesn't go to the pains of picking apart what is " in the format itself - just the basics for now. if !exists("jproperties_show_messages") let jproperties_show_messages = 0 endif " ============================================================================= " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " switch case sensitivity off syn case ignore " set the block exec "syn sync lines=" . jproperties_lines " switch between 'normal' and 'strict' syntax if jproperties_strict_syntax != 0 " an assignment is pretty much any non-empty line at this point, " trying to not think about continuation lines syn match jpropertiesAssignment "^\s*[^[:space:]]\+.*$" contains=jpropertiesIdentifier " an identifier is anything not a space character, pretty much; it's " followed by = or :, or space or tab. Or end-of-line. syn match jpropertiesIdentifier "[^=:[:space:]]*" contained nextgroup=jpropertiesDelimiter " treat the delimiter specially to get colours right syn match jpropertiesDelimiter "\s*[=:[:space:]]\s*" contained nextgroup=jpropertiesString " catch the bizarre case of no identifier; a special case of delimiter syn match jpropertiesEmptyIdentifier "^\s*[=:]\s*" nextgroup=jpropertiesString else " here an assignment is id=value or id:value, and we conveniently " ignore continuation lines for the present syn match jpropertiesAssignment "^\s*[^=:[:space:]]\+\s*[=:].*$" contains=jpropertiesIdentifier " an identifier is anything not a space character, pretty much; it's " always followed by = or :, and we find it in an assignment syn match jpropertiesIdentifier "[^=:[:space:]]\+" contained nextgroup=jpropertiesDelimiter " treat the delimiter specially to get colours right; this time the " delimiter must contain = or : syn match jpropertiesDelimiter "\s*[=:]\s*" contained nextgroup=jpropertiesString endif " a definition is all up to the last non-\-terminated line; strictly, Java " properties tend to ignore leading whitespace on all lines of a multi-line " definition, but we don't look for that here (because it's a major hassle) syn region jpropertiesString start="" skip="\\$" end="$" contained contains=jpropertiesSpecialChar,jpropertiesError,jpropertiesSpecial " {...} is a Java Message formatter - add a minimal recognition of these " if required if jproperties_show_messages != 0 syn match jpropertiesSpecial "{[^}]*}\{-1,\}" contained syn match jpropertiesSpecial "'{" contained syn match jpropertiesSpecial "''" contained endif " \uABCD are unicode special characters syn match jpropertiesSpecialChar "\\u\x\{1,4}" contained " ...and \u not followed by a hex digit is an error, though the properties " file parser won't issue an error on it, just set something wacky like zero syn match jpropertiesError "\\u\X\{1,4}" contained syn match jpropertiesError "\\u$"me=e-1 contained " other things of note are the \t,r,n,\, and the \ preceding line end syn match jpropertiesSpecial "\\[trn\\]" contained syn match jpropertiesSpecial "\\\s" contained syn match jpropertiesSpecial "\\$" contained " comments begin with # or !, and persist to end of line; put here since " they may have been caught by patterns above us syn match jpropertiesComment "^\s*[#!].*$" contains=jpropertiesTODO syn keyword jpropertiesTodo TODO FIXME XXX contained " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link jpropertiesComment Comment hi def link jpropertiesTodo Todo hi def link jpropertiesIdentifier Identifier hi def link jpropertiesString String hi def link jpropertiesExtendString String hi def link jpropertiesCharacter Character hi def link jpropertiesSpecial Special hi def link jpropertiesSpecialChar SpecialChar hi def link jpropertiesError Error let b:current_syntax = "jproperties" " vim:ts=8 neovim-0.2.2/runtime/syntax/json.vim000066400000000000000000000136021320401574200175070ustar00rootroot00000000000000" Vim syntax file " Language: JSON " Maintainer: Eli Parra " Last Change: 2014 Aug 23 " Version: 0.12 if !exists("main_syntax") " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let main_syntax = 'json' endif syntax match jsonNoise /\%(:\|,\)/ " NOTE that for the concealing to work your conceallevel should be set to 2 " Syntax: Strings " Separated into a match and region because a region by itself is always greedy syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString if has('conceal') syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained else syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=jsonEscape contained endif " Syntax: JSON does not allow strings with single quotes, unlike JavaScript. syn region jsonStringSQError oneline start=+'+ skip=+\\\\\|\\"+ end=+'+ " Syntax: JSON Keywords " Separated into a match and region because a region by itself is always greedy syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword if has('conceal') syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained else syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained endif " Syntax: Escape sequences syn match jsonEscape "\\["\\/bfnrt]" contained syn match jsonEscape "\\u\x\{4}" contained " Syntax: Numbers syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>\ze[[:blank:]\r\n]*[,}\]]" " ERROR WARNINGS ********************************************** if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1) " Syntax: Strings should always be enclosed with quotes. syn match jsonNoQuotesError "\<[[:alpha:]][[:alnum:]]*\>" syn match jsonTripleQuotesError /"""/ " Syntax: An integer part of 0 followed by other digits is not allowed. syn match jsonNumError "-\=\<0\d\.\d*\>" " Syntax: Decimals smaller than one should begin with 0 (so .1 should be 0.1). syn match jsonNumError "\:\@<=[[:blank:]\r\n]*\zs\.\d\+" " Syntax: No comments in JSON, see http://stackoverflow.com/questions/244777/can-i-comment-a-json-file syn match jsonCommentError "//.*" syn match jsonCommentError "\(/\*\)\|\(\*/\)" " Syntax: No semicolons in JSON syn match jsonSemicolonError ";" " Syntax: No trailing comma after the last element of arrays or objects syn match jsonTrailingCommaError ",\_s*[}\]]" " Syntax: Watch out for missing commas between elements syn match jsonMissingCommaError /\("\|\]\|\d\)\zs\_s\+\ze"/ syn match jsonMissingCommaError /\(\]\|\}\)\_s\+\ze"/ "arrays/objects as values syn match jsonMissingCommaError /}\_s\+\ze{/ "objects as elements in an array syn match jsonMissingCommaError /\(true\|false\)\_s\+\ze"/ "true/false as value endif " ********************************************** END OF ERROR WARNINGS " Allowances for JSONP: function call at the beginning of the file, " parenthesis and semicolon at the end. " Function name validation based on " http://stackoverflow.com/questions/2008279/validate-a-javascript-function-name/2008444#2008444 syn match jsonPadding "\%^[[:blank:]\r\n]*[_$[:alpha:]][_$[:alnum:]]*[[:blank:]\r\n]*(" syn match jsonPadding ");[[:blank:]\r\n]*\%$" " Syntax: Boolean syn match jsonBoolean /\(true\|false\)\(\_s\+\ze"\)\@!/ " Syntax: Null syn keyword jsonNull null " Syntax: Braces syn region jsonFold matchgroup=jsonBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\@!/ transparent fold syn region jsonFold matchgroup=jsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent fold " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link jsonPadding Operator hi def link jsonString String hi def link jsonTest Label hi def link jsonEscape Special hi def link jsonNumber Number hi def link jsonBraces Delimiter hi def link jsonNull Function hi def link jsonBoolean Boolean hi def link jsonKeyword Label if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1) hi def link jsonNumError Error hi def link jsonCommentError Error hi def link jsonSemicolonError Error hi def link jsonTrailingCommaError Error hi def link jsonMissingCommaError Error hi def link jsonStringSQError Error hi def link jsonNoQuotesError Error hi def link jsonTripleQuotesError Error endif hi def link jsonQuote Quote hi def link jsonNoise Noise let b:current_syntax = "json" if main_syntax == 'json' unlet main_syntax endif " Vim settings " vim: ts=8 fdm=marker " MIT License " Copyright (c) 2013, Jeroen Ruigrok van der Werven, Eli Parra "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. "THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. "See https://twitter.com/elzr/status/294964017926119424 neovim-0.2.2/runtime/syntax/jsp.vim000066400000000000000000000051661320401574200173400ustar00rootroot00000000000000" Vim syntax file " Language: JSP (Java Server Pages) " Maintainer: Rafael Garcia-Suarez " URL: http://rgarciasuarez.free.fr/vim/syntax/jsp.vim " Last change: 2004 Feb 02 " Credits : Patch by Darren Greaves (recognizes tags) " Patch by Thomas Kimpton (recognizes jspExpr inside HTML tags) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'jsp' endif " Source HTML syntax runtime! syntax/html.vim unlet b:current_syntax " Next syntax items are case-sensitive syn case match " Include Java syntax syn include @jspJava syntax/java.vim syn region jspScriptlet matchgroup=jspTag start=/<%/ keepend end=/%>/ contains=@jspJava syn region jspComment start=/<%--/ end=/--%>/ syn region jspDecl matchgroup=jspTag start=/<%!/ keepend end=/%>/ contains=@jspJava syn region jspExpr matchgroup=jspTag start=/<%=/ keepend end=/%>/ contains=@jspJava syn region jspDirective start=/<%@/ end=/%>/ contains=htmlString,jspDirName,jspDirArg syn keyword jspDirName contained include page taglib syn keyword jspDirArg contained file uri prefix language extends import session buffer autoFlush syn keyword jspDirArg contained isThreadSafe info errorPage contentType isErrorPage syn region jspCommand start=// end=/\/>/ contains=htmlString,jspCommandName,jspCommandArg syn keyword jspCommandName contained include forward getProperty plugin setProperty useBean param params fallback syn keyword jspCommandArg contained id scope class type beanName page flush name value property syn keyword jspCommandArg contained code codebase name archive align height syn keyword jspCommandArg contained width hspace vspace jreversion nspluginurl iepluginurl " Redefine htmlTag so that it can contain jspExpr syn clear htmlTag syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr,javaScript " Define the default highlighting. " Only when an item doesn't have highlighting yet " java.vim has redefined htmlComment highlighting hi def link htmlComment Comment hi def link htmlCommentPart Comment " Be consistent with html highlight settings hi def link jspComment htmlComment hi def link jspTag htmlTag hi def link jspDirective jspTag hi def link jspDirName htmlTagName hi def link jspDirArg htmlArg hi def link jspCommand jspTag hi def link jspCommandName htmlTagName hi def link jspCommandArg htmlArg if main_syntax == 'jsp' unlet main_syntax endif let b:current_syntax = "jsp" " vim: ts=8 neovim-0.2.2/runtime/syntax/kconfig.vim000066400000000000000000001067201320401574200201620ustar00rootroot00000000000000" Vim syntax file " Maintainer: Christian Brabandt " Previous Maintainer: Nikolai Weibull " Latest Revision: 2015-05-29 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-kconfig if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim if exists("g:kconfig_syntax_heavy") syn match kconfigBegin '^' nextgroup=kconfigKeyword \ skipwhite syn keyword kconfigTodo contained TODO FIXME XXX NOTE syn match kconfigComment display '#.*$' contains=kconfigTodo syn keyword kconfigKeyword config nextgroup=kconfigSymbol \ skipwhite syn keyword kconfigKeyword menuconfig nextgroup=kconfigSymbol \ skipwhite syn keyword kconfigKeyword comment menu mainmenu \ nextgroup=kconfigKeywordPrompt \ skipwhite syn keyword kconfigKeyword choice \ nextgroup=@kconfigConfigOptions \ skipwhite skipnl syn keyword kconfigKeyword endmenu endchoice syn keyword kconfigPreProc source \ nextgroup=kconfigPath \ skipwhite " TODO: This is a hack. The who .*Expr stuff should really be generated so " that we can reuse it for various nextgroups. syn keyword kconfigConditional if endif \ nextgroup=@kconfigConfigOptionIfExpr \ skipwhite syn match kconfigKeywordPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=@kconfigConfigOptions \ skipwhite skipnl syn match kconfigPath '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+' \ contained syn match kconfigSymbol '\<\k\+\>' \ contained \ nextgroup=@kconfigConfigOptions \ skipwhite skipnl " FIXME: There is – probably – no reason to cluster these instead of just " defining them in the same group. syn cluster kconfigConfigOptions contains=kconfigTypeDefinition, \ kconfigInputPrompt, \ kconfigDefaultValue, \ kconfigDependencies, \ kconfigReverseDependencies, \ kconfigNumericalRanges, \ kconfigHelpText, \ kconfigDefBool, \ kconfigOptional syn keyword kconfigTypeDefinition bool boolean tristate string hex int \ contained \ nextgroup=kconfigTypeDefPrompt, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigTypeDefPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigTypeDefPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn keyword kconfigInputPrompt prompt \ contained \ nextgroup=kconfigPromptPrompt \ skipwhite syn match kconfigPromptPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigPromptPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn keyword kconfigDefaultValue default \ contained \ nextgroup=@kconfigConfigOptionExpr \ skipwhite syn match kconfigDependencies 'depends on\|requires' \ contained \ nextgroup=@kconfigConfigOptionIfExpr \ skipwhite syn keyword kconfigReverseDependencies select \ contained \ nextgroup=@kconfigRevDepSymbol \ skipwhite syn cluster kconfigRevDepSymbol contains=kconfigRevDepCSymbol, \ kconfigRevDepNCSymbol syn match kconfigRevDepCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigRevDepCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigRevDepNCSymbol '\<\k\+\>' \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn keyword kconfigNumericalRanges range \ contained \ nextgroup=@kconfigRangeSymbol \ skipwhite syn cluster kconfigRangeSymbol contains=kconfigRangeCSymbol, \ kconfigRangeNCSymbol syn match kconfigRangeCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=@kconfigRangeSymbol2 \ skipwhite skipnl syn match kconfigRangeCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=@kconfigRangeSymbol2 \ skipwhite skipnl syn match kconfigRangeNCSymbol '\<\k\+\>' \ contained \ nextgroup=@kconfigRangeSymbol2 \ skipwhite skipnl syn cluster kconfigRangeSymbol2 contains=kconfigRangeCSymbol2, \ kconfigRangeNCSymbol2 syn match kconfigRangeCSymbol2 "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigRangeNCSymbol2 '\<\k\+\>' \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn region kconfigHelpText contained \ matchgroup=kconfigConfigOption \ start='\%(help\|---help---\)\ze\s*\n\z(\s\+\)' \ skip='^$' \ end='^\z1\@!' \ nextgroup=@kconfigConfigOptions \ skipwhite skipnl " XXX: Undocumented syn keyword kconfigDefBool def_bool \ contained \ nextgroup=@kconfigDefBoolSymbol \ skipwhite syn cluster kconfigDefBoolSymbol contains=kconfigDefBoolCSymbol, \ kconfigDefBoolNCSymbol syn match kconfigDefBoolCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigDefBoolCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigDefBoolNCSymbol '\<\k\+\>' \ contained \ nextgroup=kconfigConfigOptionIf, \ @kconfigConfigOptions \ skipwhite skipnl " XXX: This is actually only a valid option for “choice”, but treating it " specially would require a lot of extra groups. syn keyword kconfigOptional optional \ contained \ nextgroup=@kconfigConfigOptions \ skipwhite skipnl syn keyword kconfigConfigOptionIf if \ contained \ nextgroup=@kconfigConfigOptionIfExpr \ skipwhite syn cluster kconfigConfigOptionIfExpr contains=@kconfigConfOptIfExprSym, \ kconfigConfOptIfExprNeg, \ kconfigConfOptIfExprGroup syn cluster kconfigConfOptIfExprSym contains=kconfigConfOptIfExprCSym, \ kconfigConfOptIfExprNCSym syn match kconfigConfOptIfExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=@kconfigConfigOptions, \ kconfigConfOptIfExprAnd, \ kconfigConfOptIfExprOr, \ kconfigConfOptIfExprEq, \ kconfigConfOptIfExprNEq \ skipwhite skipnl syn match kconfigConfOptIfExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=@kconfigConfigOptions, \ kconfigConfOptIfExprAnd, \ kconfigConfOptIfExprOr, \ kconfigConfOptIfExprEq, \ kconfigConfOptIfExprNEq \ skipwhite skipnl syn match kconfigConfOptIfExprNCSym '\<\k\+\>' \ contained \ nextgroup=@kconfigConfigOptions, \ kconfigConfOptIfExprAnd, \ kconfigConfOptIfExprOr, \ kconfigConfOptIfExprEq, \ kconfigConfOptIfExprNEq \ skipwhite skipnl syn cluster kconfigConfOptIfExprSym2 contains=kconfigConfOptIfExprCSym2, \ kconfigConfOptIfExprNCSym2 syn match kconfigConfOptIfExprEq '=' \ contained \ nextgroup=@kconfigConfOptIfExprSym2 \ skipwhite syn match kconfigConfOptIfExprNEq '!=' \ contained \ nextgroup=@kconfigConfOptIfExprSym2 \ skipwhite syn match kconfigConfOptIfExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=@kconfigConfigOptions, \ kconfigConfOptIfExprAnd, \ kconfigConfOptIfExprOr \ skipwhite skipnl syn match kconfigConfOptIfExprNCSym2 '\<\k\+\>' \ contained \ nextgroup=@kconfigConfigOptions, \ kconfigConfOptIfExprAnd, \ kconfigConfOptIfExprOr \ skipwhite skipnl syn match kconfigConfOptIfExprNeg '!' \ contained \ nextgroup=@kconfigConfigOptionIfExpr \ skipwhite syn match kconfigConfOptIfExprAnd '&&' \ contained \ nextgroup=@kconfigConfigOptionIfExpr \ skipwhite syn match kconfigConfOptIfExprOr '||' \ contained \ nextgroup=@kconfigConfigOptionIfExpr \ skipwhite syn match kconfigConfOptIfExprGroup '(' \ contained \ nextgroup=@kconfigConfigOptionIfGExp \ skipwhite " TODO: hm, this kind of recursion doesn't work right. We need another set of " expressions that have kconfigConfigOPtionIfGExp as nextgroup and a matcher " for '(' that sets it all off. syn cluster kconfigConfigOptionIfGExp contains=@kconfigConfOptIfGExpSym, \ kconfigConfOptIfGExpNeg, \ kconfigConfOptIfExprGroup syn cluster kconfigConfOptIfGExpSym contains=kconfigConfOptIfGExpCSym, \ kconfigConfOptIfGExpNCSym syn match kconfigConfOptIfGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=@kconfigConfigIf, \ kconfigConfOptIfGExpAnd, \ kconfigConfOptIfGExpOr, \ kconfigConfOptIfGExpEq, \ kconfigConfOptIfGExpNEq \ skipwhite skipnl syn match kconfigConfOptIfGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=@kconfigConfigIf, \ kconfigConfOptIfGExpAnd, \ kconfigConfOptIfGExpOr, \ kconfigConfOptIfGExpEq, \ kconfigConfOptIfGExpNEq \ skipwhite skipnl syn match kconfigConfOptIfGExpNCSym '\<\k\+\>' \ contained \ nextgroup=kconfigConfOptIfExprGrpE, \ kconfigConfOptIfGExpAnd, \ kconfigConfOptIfGExpOr, \ kconfigConfOptIfGExpEq, \ kconfigConfOptIfGExpNEq \ skipwhite skipnl syn cluster kconfigConfOptIfGExpSym2 contains=kconfigConfOptIfGExpCSym2, \ kconfigConfOptIfGExpNCSym2 syn match kconfigConfOptIfGExpEq '=' \ contained \ nextgroup=@kconfigConfOptIfGExpSym2 \ skipwhite syn match kconfigConfOptIfGExpNEq '!=' \ contained \ nextgroup=@kconfigConfOptIfGExpSym2 \ skipwhite syn match kconfigConfOptIfGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=kconfigConfOptIfExprGrpE, \ kconfigConfOptIfGExpAnd, \ kconfigConfOptIfGExpOr \ skipwhite skipnl syn match kconfigConfOptIfGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=kconfigConfOptIfExprGrpE, \ kconfigConfOptIfGExpAnd, \ kconfigConfOptIfGExpOr \ skipwhite skipnl syn match kconfigConfOptIfGExpNCSym2 '\<\k\+\>' \ contained \ nextgroup=kconfigConfOptIfExprGrpE, \ kconfigConfOptIfGExpAnd, \ kconfigConfOptIfGExpOr \ skipwhite skipnl syn match kconfigConfOptIfGExpNeg '!' \ contained \ nextgroup=@kconfigConfigOptionIfGExp \ skipwhite syn match kconfigConfOptIfGExpAnd '&&' \ contained \ nextgroup=@kconfigConfigOptionIfGExp \ skipwhite syn match kconfigConfOptIfGExpOr '||' \ contained \ nextgroup=@kconfigConfigOptionIfGExp \ skipwhite syn match kconfigConfOptIfExprGrpE ')' \ contained \ nextgroup=@kconfigConfigOptions, \ kconfigConfOptIfExprAnd, \ kconfigConfOptIfExprOr \ skipwhite skipnl syn cluster kconfigConfigOptionExpr contains=@kconfigConfOptExprSym, \ kconfigConfOptExprNeg, \ kconfigConfOptExprGroup syn cluster kconfigConfOptExprSym contains=kconfigConfOptExprCSym, \ kconfigConfOptExprNCSym syn match kconfigConfOptExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=kconfigConfigOptionIf, \ kconfigConfOptExprAnd, \ kconfigConfOptExprOr, \ kconfigConfOptExprEq, \ kconfigConfOptExprNEq, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigConfOptExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=kconfigConfigOptionIf, \ kconfigConfOptExprAnd, \ kconfigConfOptExprOr, \ kconfigConfOptExprEq, \ kconfigConfOptExprNEq, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigConfOptExprNCSym '\<\k\+\>' \ contained \ nextgroup=kconfigConfigOptionIf, \ kconfigConfOptExprAnd, \ kconfigConfOptExprOr, \ kconfigConfOptExprEq, \ kconfigConfOptExprNEq, \ @kconfigConfigOptions \ skipwhite skipnl syn cluster kconfigConfOptExprSym2 contains=kconfigConfOptExprCSym2, \ kconfigConfOptExprNCSym2 syn match kconfigConfOptExprEq '=' \ contained \ nextgroup=@kconfigConfOptExprSym2 \ skipwhite syn match kconfigConfOptExprNEq '!=' \ contained \ nextgroup=@kconfigConfOptExprSym2 \ skipwhite syn match kconfigConfOptExprCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=kconfigConfigOptionIf, \ kconfigConfOptExprAnd, \ kconfigConfOptExprOr, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigConfOptExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=kconfigConfigOptionIf, \ kconfigConfOptExprAnd, \ kconfigConfOptExprOr, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigConfOptExprNCSym2 '\<\k\+\>' \ contained \ nextgroup=kconfigConfigOptionIf, \ kconfigConfOptExprAnd, \ kconfigConfOptExprOr, \ @kconfigConfigOptions \ skipwhite skipnl syn match kconfigConfOptExprNeg '!' \ contained \ nextgroup=@kconfigConfigOptionExpr \ skipwhite syn match kconfigConfOptExprAnd '&&' \ contained \ nextgroup=@kconfigConfigOptionExpr \ skipwhite syn match kconfigConfOptExprOr '||' \ contained \ nextgroup=@kconfigConfigOptionExpr \ skipwhite syn match kconfigConfOptExprGroup '(' \ contained \ nextgroup=@kconfigConfigOptionGExp \ skipwhite syn cluster kconfigConfigOptionGExp contains=@kconfigConfOptGExpSym, \ kconfigConfOptGExpNeg, \ kconfigConfOptGExpGroup syn cluster kconfigConfOptGExpSym contains=kconfigConfOptGExpCSym, \ kconfigConfOptGExpNCSym syn match kconfigConfOptGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=kconfigConfOptExprGrpE, \ kconfigConfOptGExpAnd, \ kconfigConfOptGExpOr, \ kconfigConfOptGExpEq, \ kconfigConfOptGExpNEq \ skipwhite skipnl syn match kconfigConfOptGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=kconfigConfOptExprGrpE, \ kconfigConfOptGExpAnd, \ kconfigConfOptGExpOr, \ kconfigConfOptGExpEq, \ kconfigConfOptGExpNEq \ skipwhite skipnl syn match kconfigConfOptGExpNCSym '\<\k\+\>' \ contained \ nextgroup=kconfigConfOptExprGrpE, \ kconfigConfOptGExpAnd, \ kconfigConfOptGExpOr, \ kconfigConfOptGExpEq, \ kconfigConfOptGExpNEq \ skipwhite skipnl syn cluster kconfigConfOptGExpSym2 contains=kconfigConfOptGExpCSym2, \ kconfigConfOptGExpNCSym2 syn match kconfigConfOptGExpEq '=' \ contained \ nextgroup=@kconfigConfOptGExpSym2 \ skipwhite syn match kconfigConfOptGExpNEq '!=' \ contained \ nextgroup=@kconfigConfOptGExpSym2 \ skipwhite syn match kconfigConfOptGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"' \ contained \ nextgroup=kconfigConfOptExprGrpE, \ kconfigConfOptGExpAnd, \ kconfigConfOptGExpOr \ skipwhite skipnl syn match kconfigConfOptGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'" \ contained \ nextgroup=kconfigConfOptExprGrpE, \ kconfigConfOptGExpAnd, \ kconfigConfOptGExpOr \ skipwhite skipnl syn match kconfigConfOptGExpNCSym2 '\<\k\+\>' \ contained \ nextgroup=kconfigConfOptExprGrpE, \ kconfigConfOptGExpAnd, \ kconfigConfOptGExpOr \ skipwhite skipnl syn match kconfigConfOptGExpNeg '!' \ contained \ nextgroup=@kconfigConfigOptionGExp \ skipwhite syn match kconfigConfOptGExpAnd '&&' \ contained \ nextgroup=@kconfigConfigOptionGExp \ skipwhite syn match kconfigConfOptGExpOr '||' \ contained \ nextgroup=@kconfigConfigOptionGExp \ skipwhite syn match kconfigConfOptExprGrpE ')' \ contained \ nextgroup=kconfigConfigOptionIf, \ kconfigConfOptExprAnd, \ kconfigConfOptExprOr \ skipwhite skipnl syn sync minlines=50 hi def link kconfigTodo Todo hi def link kconfigComment Comment hi def link kconfigKeyword Keyword hi def link kconfigPreProc PreProc hi def link kconfigConditional Conditional hi def link kconfigPrompt String hi def link kconfigKeywordPrompt kconfigPrompt hi def link kconfigPath String hi def link kconfigSymbol String hi def link kconfigConstantSymbol Constant hi def link kconfigConfigOption Type hi def link kconfigTypeDefinition kconfigConfigOption hi def link kconfigTypeDefPrompt kconfigPrompt hi def link kconfigInputPrompt kconfigConfigOption hi def link kconfigPromptPrompt kconfigPrompt hi def link kconfigDefaultValue kconfigConfigOption hi def link kconfigDependencies kconfigConfigOption hi def link kconfigReverseDependencies kconfigConfigOption hi def link kconfigRevDepCSymbol kconfigConstantSymbol hi def link kconfigRevDepNCSymbol kconfigSymbol hi def link kconfigNumericalRanges kconfigConfigOption hi def link kconfigRangeCSymbol kconfigConstantSymbol hi def link kconfigRangeNCSymbol kconfigSymbol hi def link kconfigRangeCSymbol2 kconfigConstantSymbol hi def link kconfigRangeNCSymbol2 kconfigSymbol hi def link kconfigHelpText Normal hi def link kconfigDefBool kconfigConfigOption hi def link kconfigDefBoolCSymbol kconfigConstantSymbol hi def link kconfigDefBoolNCSymbol kconfigSymbol hi def link kconfigOptional kconfigConfigOption hi def link kconfigConfigOptionIf Conditional hi def link kconfigConfOptIfExprCSym kconfigConstantSymbol hi def link kconfigConfOptIfExprNCSym kconfigSymbol hi def link kconfigOperator Operator hi def link kconfigConfOptIfExprEq kconfigOperator hi def link kconfigConfOptIfExprNEq kconfigOperator hi def link kconfigConfOptIfExprCSym2 kconfigConstantSymbol hi def link kconfigConfOptIfExprNCSym2 kconfigSymbol hi def link kconfigConfOptIfExprNeg kconfigOperator hi def link kconfigConfOptIfExprAnd kconfigOperator hi def link kconfigConfOptIfExprOr kconfigOperator hi def link kconfigDelimiter Delimiter hi def link kconfigConfOptIfExprGroup kconfigDelimiter hi def link kconfigConfOptIfGExpCSym kconfigConstantSymbol hi def link kconfigConfOptIfGExpNCSym kconfigSymbol hi def link kconfigConfOptIfGExpEq kconfigOperator hi def link kconfigConfOptIfGExpNEq kconfigOperator hi def link kconfigConfOptIfGExpCSym2 kconfigConstantSymbol hi def link kconfigConfOptIfGExpNCSym2 kconfigSymbol hi def link kconfigConfOptIfGExpNeg kconfigOperator hi def link kconfigConfOptIfGExpAnd kconfigOperator hi def link kconfigConfOptIfGExpOr kconfigOperator hi def link kconfigConfOptIfExprGrpE kconfigDelimiter hi def link kconfigConfOptExprCSym kconfigConstantSymbol hi def link kconfigConfOptExprNCSym kconfigSymbol hi def link kconfigConfOptExprEq kconfigOperator hi def link kconfigConfOptExprNEq kconfigOperator hi def link kconfigConfOptExprCSym2 kconfigConstantSymbol hi def link kconfigConfOptExprNCSym2 kconfigSymbol hi def link kconfigConfOptExprNeg kconfigOperator hi def link kconfigConfOptExprAnd kconfigOperator hi def link kconfigConfOptExprOr kconfigOperator hi def link kconfigConfOptExprGroup kconfigDelimiter hi def link kconfigConfOptGExpCSym kconfigConstantSymbol hi def link kconfigConfOptGExpNCSym kconfigSymbol hi def link kconfigConfOptGExpEq kconfigOperator hi def link kconfigConfOptGExpNEq kconfigOperator hi def link kconfigConfOptGExpCSym2 kconfigConstantSymbol hi def link kconfigConfOptGExpNCSym2 kconfigSymbol hi def link kconfigConfOptGExpNeg kconfigOperator hi def link kconfigConfOptGExpAnd kconfigOperator hi def link kconfigConfOptGExpOr kconfigOperator hi def link kconfigConfOptExprGrpE kconfigConfOptIfExprGroup else syn keyword kconfigTodo contained TODO FIXME XXX NOTE syn match kconfigComment display '#.*$' contains=kconfigTodo syn keyword kconfigKeyword config menuconfig comment mainmenu syn keyword kconfigConditional menu endmenu choice endchoice if endif syn keyword kconfigPreProc source \ nextgroup=kconfigPath \ skipwhite syn keyword kconfigTriState y m n syn match kconfigSpecialChar contained '\\.' syn match kconfigSpecialChar '\\$' syn region kconfigPath matchgroup=kconfigPath \ start=+"+ skip=+\\\\\|\\\"+ end=+"+ \ contains=kconfigSpecialChar syn region kconfigPath matchgroup=kconfigPath \ start=+'+ skip=+\\\\\|\\\'+ end=+'+ \ contains=kconfigSpecialChar syn match kconfigPath '\S\+' \ contained syn region kconfigString matchgroup=kconfigString \ start=+"+ skip=+\\\\\|\\\"+ end=+"+ \ contains=kconfigSpecialChar syn region kconfigString matchgroup=kconfigString \ start=+'+ skip=+\\\\\|\\\'+ end=+'+ \ contains=kconfigSpecialChar syn keyword kconfigType bool boolean tristate string hex int syn keyword kconfigOption prompt default requires select range \ optional syn match kconfigOption 'depends\%( on\)\=' syn keyword kconfigMacro def_bool def_tristate syn region kconfigHelpText \ matchgroup=kconfigOption \ start='\%(help\|---help---\)\ze\s*\n\z(\s\+\)' \ skip='^$' \ end='^\z1\@!' syn sync match kconfigSyncHelp grouphere kconfigHelpText 'help\|---help---' hi def link kconfigTodo Todo hi def link kconfigComment Comment hi def link kconfigKeyword Keyword hi def link kconfigConditional Conditional hi def link kconfigPreProc PreProc hi def link kconfigTriState Boolean hi def link kconfigSpecialChar SpecialChar hi def link kconfigPath String hi def link kconfigString String hi def link kconfigType Type hi def link kconfigOption Identifier hi def link kconfigHelpText Normal hi def link kconfigmacro Macro endif let b:current_syntax = "kconfig" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/kivy.vim000066400000000000000000000017321320401574200175210ustar00rootroot00000000000000" Vim syntax file " Language: Kivy " Maintainer: Corey Prophitt " Last Change: May 29th, 2014 " Version: 1 " URL: http://kivy.org/ if exists("b:current_syntax") finish endif " Load Python syntax first (Python can be used within Kivy) syn include @pyth $VIMRUNTIME/syntax/python.vim " Kivy language rules can be found here " http://kivy.org/docs/guide/lang.html " Define Kivy syntax syn match kivyPreProc /#:.*/ syn match kivyComment /#.*/ syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/ syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite hi def link kivyPreproc PreProc hi def link kivyComment Comment hi def link kivyRule Function hi def link kivyIdent Statement hi def link kivyAttribute Label let b:current_syntax = "kivy" " vim: ts=8 neovim-0.2.2/runtime/syntax/kix.vim000066400000000000000000000142711320401574200173340ustar00rootroot00000000000000" Vim syntax file " Language: KixTart 95, Kix2001 Windows script language http://kixtart.org/ " Maintainer: Richard Howarth " Last Change: 2003 May 11 " URL: http://www.howsoft.demon.co.uk/ " KixTart files identified by *.kix extension. " Amendment History: " 26 April 2001: RMH " Removed development comments from distro version " Renamed "Kix*" to "kix*" for consistancy " Changes made in preparation for VIM version 5.8/6.00 " TODO: " Handle arrays highlighting " Handle object highlighting " The next two may not be possible: " Work out how to error too many "(", i.e. (() should be an error. " Similarly, "if" without "endif" and similar constructs should error. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match syn keyword kixTODO TODO FIX XXX contained " Case insensitive language. syn case ignore " Kix statements syn match kixStatement "?" syn keyword kixStatement beep big break syn keyword kixStatement call cd cls color cookie1 copy syn keyword kixStatement del dim display syn keyword kixStatement exit syn keyword kixStatement flushkb syn keyword kixStatement get gets global go gosub goto syn keyword kixStatement md syn keyword kixStatement password play syn keyword kixStatement quit syn keyword kixStatement rd return run syn keyword kixStatement set setl setm settime shell sleep small syn keyword kixStatement use " Kix2001 syn keyword kixStatement debug function endfunction redim " Simple variables syn match kixNotVar "\$\$\|@@\|%%" transparent contains=NONE syn match kixLocalVar "\$\w\+" syn match kixMacro "@\w\+" syn match kixEnvVar "%\w\+" " Destination labels syn match kixLabel ":\w\+\>" " Identify strings, trap unterminated strings syn match kixStringError +".*\|'.*+ syn region kixDoubleString oneline start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=kixLocalVar,kixMacro,kixEnvVar,kixNotVar syn region kixSingleString oneline start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=kixLocalVar,kixMacro,kixEnvVar,kixNotVar " Operators syn match kixOperator "+\|-\|\*\|/\|=\|&\||" syn keyword kixOperator and or " Kix2001 syn match kixOperator "==" syn keyword kixOperator not " Numeric constants syn match kixInteger "-\=\<\d\+\>" contains=NONE syn match kixFloat "-\=\.\d\+\>\|-\=\<\d\+\.\d\+\>" contains=NONE " Hex numeric constants syn match kixHex "\&\x\+\>" contains=NONE " Other contants " Kix2001 syn keyword kixConstant on off " Comments syn match kixComment ";.*$" contains=kixTODO " Trap unmatched parenthesis syn match kixParenCloseError ")" syn region kixParen oneline transparent start="(" end=")" contains=ALLBUT,kixParenCloseError " Functions (Builtin + UDF) syn match kixFunction "\w\+("he=e-1,me=e-1 contains=ALL " Trap unmatched brackets syn match kixBrackCloseError "\]" syn region kixBrack transparent start="\[" end="\]" contains=ALLBUT,kixBrackCloseError " Clusters for ALLBUT shorthand syn cluster kixIfBut contains=kixIfError,kixSelectOK,kixDoOK,kixWhileOK,kixForEachOK,kixForNextOK syn cluster kixSelectBut contains=kixSelectError,kixIfOK,kixDoOK,kixWhileOK,kixForEachOK,kixForNextOK syn cluster kixDoBut contains=kixDoError,kixSelectOK,kixIfOK,kixWhileOK,kixForEachOK,kixForNextOK syn cluster kixWhileBut contains=kixWhileError,kixSelectOK,kixIfOK,kixDoOK,kixForEachOK,kixForNextOK syn cluster kixForEachBut contains=kixForEachError,kixSelectOK,kixIfOK,kixDoOK,kixForNextOK,kixWhileOK syn cluster kixForNextBut contains=kixForNextError,kixSelectOK,kixIfOK,kixDoOK,kixForEachOK,kixWhileOK " Condtional construct errors. syn match kixIfError "\\|\\|\" syn match kixIfOK contained "\\|\\|\" syn region kixIf transparent matchgroup=kixIfOK start="\" end="\" contains=ALLBUT,@kixIfBut syn match kixSelectError "\\|\\|\" syn match kixSelectOK contained "\\|\\|\" syn region kixSelect transparent matchgroup=kixSelectOK start="\" end="\" contains=ALLBUT,@kixSelectBut " Program control constructs. syn match kixDoError "\\|\" syn match kixDoOK contained "\\|\" syn region kixDo transparent matchgroup=kixDoOK start="\" end="\" contains=ALLBUT,@kixDoBut syn match kixWhileError "\\|\" syn match kixWhileOK contained "\\|\" syn region kixWhile transparent matchgroup=kixWhileOK start="\" end="\" contains=ALLBUT,@kixWhileBut syn match kixForNextError "\\|\\|\\|\" syn match kixForNextOK contained "\\|\\|\\|\" syn region kixForNext transparent matchgroup=kixForNextOK start="\" end="\" contains=ALLBUT,@kixForBut syn match kixForEachError "\\|\\|\" syn match kixForEachOK contained "\\|\\|\" syn region kixForEach transparent matchgroup=kixForEachOK start="\" end="\" contains=ALLBUT,@kixForEachBut " Expressions syn match kixExpression "<\|>\|<=\|>=\|<>" " Default highlighting. " Set default highlight only if it doesn't already have a value. hi def link kixDoubleString String hi def link kixSingleString String hi def link kixStatement Statement hi def link kixRepeat Repeat hi def link kixComment Comment hi def link kixBuiltin Function hi def link kixLocalVar Special hi def link kixMacro Special hi def link kixEnvVar Special hi def link kixLabel Type hi def link kixFunction Function hi def link kixInteger Number hi def link kixHex Number hi def link kixFloat Number hi def link kixOperator Operator hi def link kixExpression Operator hi def link kixParenCloseError Error hi def link kixBrackCloseError Error hi def link kixStringError Error hi def link kixWhileError Error hi def link kixWhileOK Conditional hi def link kixDoError Error hi def link kixDoOK Conditional hi def link kixIfError Error hi def link kixIfOK Conditional hi def link kixSelectError Error hi def link kixSelectOK Conditional hi def link kixForNextError Error hi def link kixForNextOK Conditional hi def link kixForEachError Error hi def link kixForEachOK Conditional let b:current_syntax = "kix" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/kscript.vim000066400000000000000000000037011320401574200202140ustar00rootroot00000000000000" Vim syntax file " Language: kscript " Maintainer: Thomas Capricelli " URL: http://aquila.rezel.enst.fr/thomas/vim/kscript.vim " CVS: $Id: kscript.vim,v 1.1 2004/06/13 17:40:02 vimboss Exp $ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn keyword kscriptPreCondit import from syn keyword kscriptHardCoded print println connect length arg mid upper lower isEmpty toInt toFloat findApplication syn keyword kscriptConditional if else switch syn keyword kscriptRepeat while for do foreach syn keyword kscriptExceptions emit catch raise try signal syn keyword kscriptFunction class struct enum syn keyword kscriptConst FALSE TRUE false true syn keyword kscriptStatement return delete syn keyword kscriptLabel case default syn keyword kscriptStorageClass const syn keyword kscriptType in out inout var syn keyword kscriptTodo contained TODO FIXME XXX syn region kscriptComment start="/\*" end="\*/" contains=kscriptTodo syn match kscriptComment "//.*" contains=kscriptTodo syn match kscriptComment "#.*$" contains=kscriptTodo syn region kscriptString start=+'+ end=+'+ skip=+\\\\\|\\'+ syn region kscriptString start=+"+ end=+"+ skip=+\\\\\|\\"+ syn region kscriptString start=+"""+ end=+"""+ syn region kscriptString start=+'''+ end=+'''+ " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link kscriptConditional Conditional hi def link kscriptRepeat Repeat hi def link kscriptExceptions Statement hi def link kscriptFunction Function hi def link kscriptConst Constant hi def link kscriptStatement Statement hi def link kscriptLabel Label hi def link kscriptStorageClass StorageClass hi def link kscriptType Type hi def link kscriptTodo Todo hi def link kscriptComment Comment hi def link kscriptString String hi def link kscriptPreCondit PreCondit hi def link kscriptHardCoded Statement let b:current_syntax = "kscript" " vim: ts=8 neovim-0.2.2/runtime/syntax/kwt.vim000066400000000000000000000046261320401574200173510ustar00rootroot00000000000000" Vim syntax file " Language: kimwitu++ " Maintainer: Michael Piefel " Last Change: 2 May 2001 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Read the C++ syntax to start with runtime! syntax/cpp.vim unlet b:current_syntax " kimwitu++ extentions " Don't stop at eol, messes around with CPP mode, but gives line spanning " strings in unparse rules syn region cCppString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat syn keyword cType integer real casestring nocasestring voidptr list syn keyword cType uview rview uview_enum rview_enum " avoid unparsing rule sth:view being scanned as label syn clear cUserCont syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel contained syn match cUserCont ";\s*\I\i*\s*:$" contains=cUserLabel contained syn match cUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained syn match cUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained " highlight phylum decls syn match kwtPhylum "^\I\i*:$" syn match kwtPhylum "^\I\i*\s*{\s*\(!\|\I\)\i*\s*}\s*:$" syn keyword kwtStatement with foreach afterforeach provided syn match kwtDecl "%\(uviewvar\|rviewvar\)" syn match kwtDecl "^%\(uview\|rview\|ctor\|dtor\|base\|storageclass\|list\|attr\|member\|option\)" syn match kwtOption "no-csgio\|no-unparse\|no-rewrite\|no-printdot\|no-hashtables\|smart-pointer\|weak-pointer" syn match kwtSep "^%}$" syn match kwtSep "^%{\(\s\+\I\i*\)*$" syn match kwtCast "\ " Last Change: 2001 May 09 " Copyright Interactive Software Engineering, 1998 " You are free to use this file as you please, but " if you make a change or improvement you must send " it to the maintainer at " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " LACE is case insensitive, but the style guide lines are not. if !exists("lace_case_insensitive") syn case match else syn case ignore endif " A bunch of useful LACE keywords syn keyword laceTopStruct system root default option visible cluster syn keyword laceTopStruct external generate end syn keyword laceOptionClause collect assertion debug optimize trace syn keyword laceOptionClause profile inline precompiled multithreaded syn keyword laceOptionClause exception_trace dead_code_removal syn keyword laceOptionClause array_optimization syn keyword laceOptionClause inlining_size inlining syn keyword laceOptionClause console_application dynamic_runtime syn keyword laceOptionClause line_generation syn keyword laceOptionMark yes no all syn keyword laceOptionMark require ensure invariant loop check syn keyword laceClusterProp use include exclude syn keyword laceAdaptClassName adapt ignore rename as syn keyword laceAdaptClassName creation export visible syn keyword laceExternal include_path object makefile " Operators syn match laceOperator "\$" syn match laceBrackets "[[\]]" syn match laceExport "[{}]" " Constants syn keyword laceBool true false syn keyword laceBool True False syn region laceString start=+"+ skip=+%"+ end=+"+ contains=laceEscape,laceStringError syn match laceEscape contained "%[^/]" syn match laceEscape contained "%/\d\+/" syn match laceEscape contained "^[ \t]*%" syn match laceEscape contained "%[ \t]*$" syn match laceStringError contained "%/[^0-9]" syn match laceStringError contained "%/\d\+[^0-9/]" syn match laceStringError "'\(%[^/]\|%/\d\+/\|[^'%]\)\+'" syn match laceCharacter "'\(%[^/]\|%/\d\+/\|[^'%]\)'" contains=laceEscape syn match laceNumber "-\=\<\d\+\(_\d\+\)*\>" syn match laceNumber "\<[01]\+[bB]\>" syn match laceNumber "-\=\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\)\=\([eE][-+]\=\d\+\(_\d\+\)*\)\=" syn match laceNumber "-\=\.\d\+\(_\d\+\)*\([eE][-+]\=\d\+\(_\d\+\)*\)\=" syn match laceComment "--.*" contains=laceTodo syn case match " Case sensitive stuff syn keyword laceTodo TODO XXX FIXME syn match laceClassName "\<[A-Z][A-Z0-9_]*\>" syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*:" syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*(\s*[a-zA-Z][a-zA-Z0-9_]*\s*)\s*:" " Catch mismatched parentheses syn match laceParenError ")" syn match laceBracketError "\]" syn region laceGeneric transparent matchgroup=laceBrackets start="\[" end="\]" contains=ALLBUT,laceBracketError syn region laceParen transparent start="(" end=")" contains=ALLBUT,laceParenError " Should suffice for even very long strings and expressions syn sync lines=40 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link laceTopStruct PreProc hi def link laceOptionClause Statement hi def link laceOptionMark Constant hi def link laceClusterProp Label hi def link laceAdaptClassName Label hi def link laceExternal Statement hi def link laceCluster ModeMsg hi def link laceEscape Special hi def link laceBool Boolean hi def link laceString String hi def link laceCharacter Character hi def link laceClassName Type hi def link laceNumber Number hi def link laceOperator Special hi def link laceArray Special hi def link laceExport Special hi def link laceCreation Special hi def link laceBrackets Special hi def link laceConstraint Special hi def link laceComment Comment hi def link laceError Error hi def link laceStringError Error hi def link laceParenError Error hi def link laceBracketError Error hi def link laceTodo Todo let b:current_syntax = "lace" " vim: ts=4 neovim-0.2.2/runtime/syntax/latte.vim000066400000000000000000000066671320401574200176640ustar00rootroot00000000000000" Vim syntax file " Language: Latte " Maintainer: Nick Moffitt, " Last Change: 14 June, 2000 " " Notes: " I based this on the TeX and Scheme syntax files (but mostly scheme). " See http://www.latte.org for info on the language. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match latteError "[{}\\]" syn match latteOther "\\{" syn match latteOther "\\}" syn match latteOther "\\\\" setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ syn region latteVar matchgroup=SpecialChar start=!\\[A-Za-z_]!rs=s+1 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther syn region latteVar matchgroup=SpecialChar start=!\\[=\&][A-Za-z_]!rs=s+2 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther syn region latteString start=+\\"+ skip=+\\\\"+ end=+\\"+ syn region latteGroup matchgroup=Delimiter start="{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax syn region latteUnquote matchgroup=Delimiter start="\\,{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax syn region latteSplice matchgroup=Delimiter start="\\,@{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax syn region latteQuote matchgroup=Delimiter start="\\'{" skip="\\[{}]" matchgroup=Delimiter end="}" syn region latteQuote matchgroup=Delimiter start="\\`{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=latteUnquote,latteSplice syn match latteOperator '\\/' syn match latteOperator '=' syn match latteComment "\\;.*$" " This was gathered by slurping in the index. syn keyword latteSyntax __FILE__ __latte-version__ contained syn keyword latteSyntax _bal-tag _pre _tag add and append apply back contained syn keyword latteSyntax caar cadr car cdar cddr cdr ceil compose contained syn keyword latteSyntax concat cons def defmacro divide downcase contained syn keyword latteSyntax empty? equal? error explode file-contents contained syn keyword latteSyntax floor foreach front funcall ge? getenv contained syn keyword latteSyntax greater-equal? greater? group group? gt? html contained syn keyword latteSyntax if include lambda le? length less-equal? contained syn keyword latteSyntax less? let lmap load-file load-library lt? macro contained syn keyword latteSyntax member? modulo multiply not nth operator? contained syn keyword latteSyntax or ordinary quote process-output push-back contained syn keyword latteSyntax push-front quasiquote quote random rdc reverse contained syn keyword latteSyntax set! snoc splicing unquote strict-html4 contained syn keyword latteSyntax string-append string-ge? string-greater-equal? contained syn keyword latteSyntax string-greater? string-gt? string-le? contained syn keyword latteSyntax string-less-equal? string-less? string-lt? contained syn keyword latteSyntax string? subseq substr subtract contained syn keyword latteSyntax upcase useless warn while zero? contained " If it's good enough for scheme... syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link latteSyntax Statement hi def link latteVar Function hi def link latteString String hi def link latteQuote String hi def link latteDelimiter Delimiter hi def link latteOperator Operator hi def link latteComment Comment hi def link latteError Error let b:current_syntax = "latte" neovim-0.2.2/runtime/syntax/ld.vim000066400000000000000000000055261320401574200171430ustar00rootroot00000000000000" Vim syntax file " Language: ld(1) script " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword ldTodo contained TODO FIXME XXX NOTE syn region ldComment start='/\*' end='\*/' contains=ldTodo,@Spell syn region ldFileName start=+"+ end=+"+ syn keyword ldPreProc SECTIONS MEMORY OVERLAY PHDRS VERSION INCLUDE syn match ldPreProc '\' syn match ldNumber display '\<0[xX]\x\+\>' syn match ldNumber display '\d\+[KM]\>' contains=ldNumberMult syn match ldNumberMult display '[KM]\>' syn match ldOctal contained display '\<0\o\+\>' \ contains=ldOctalZero syn match ldOctalZero contained display '\<0' syn match ldOctalError contained display '\<0\o*[89]\d*\>' hi def link ldTodo Todo hi def link ldComment Comment hi def link ldFileName String hi def link ldPreProc PreProc hi def link ldFunction Identifier hi def link ldKeyword Keyword hi def link ldType Type hi def link ldDataType ldType hi def link ldOutputType ldType hi def link ldPTType ldType hi def link ldSpecial Special hi def link ldIdentifier Identifier hi def link ldSections Constant hi def link ldSpecSections Special hi def link ldNumber Number hi def link ldNumberMult PreProc hi def link ldOctal ldNumber hi def link ldOctalZero PreProc hi def link ldOctalError Error let b:current_syntax = "ld" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/ldapconf.vim000066400000000000000000000317661320401574200203370ustar00rootroot00000000000000" Vim syntax file " Language: ldap.conf(5) configuration file. " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-12-11 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword ldapconfTodo contained TODO FIXME XXX NOTE syn region ldapconfComment display oneline start='^\s*#' end='$' \ contains=ldapconfTodo, \ @Spell syn match ldapconfBegin display '^' \ nextgroup=ldapconfOption, \ ldapconfDeprOption, \ ldapconfComment syn case ignore syn keyword ldapconfOption contained URI \ nextgroup=ldapconfURI \ skipwhite syn keyword ldapconfOption contained \ BASE \ BINDDN \ nextgroup=ldapconfDNAttrType \ skipwhite syn keyword ldapconfDeprOption contained \ HOST \ nextgroup=ldapconfHost \ skipwhite syn keyword ldapconfDeprOption contained \ PORT \ nextgroup=ldapconfPort \ skipwhite syn keyword ldapconfOption contained \ REFERRALS \ nextgroup=ldapconfBoolean \ skipwhite syn keyword ldapconfOption contained \ SIZELIMIT \ TIMELIMIT \ nextgroup=ldapconfInteger \ skipwhite syn keyword ldapconfOption contained \ DEREF \ nextgroup=ldapconfDerefWhen \ skipwhite syn keyword ldapconfOption contained \ SASL_MECH \ nextgroup=ldapconfSASLMechanism \ skipwhite syn keyword ldapconfOption contained \ SASL_REALM \ nextgroup=ldapconfSASLRealm \ skipwhite syn keyword ldapconfOption contained \ SASL_AUTHCID \ SASL_AUTHZID \ nextgroup=ldapconfSASLAuthID \ skipwhite syn keyword ldapconfOption contained \ SASL_SECPROPS \ nextgroup=ldapconfSASLSecProps \ skipwhite syn keyword ldapconfOption contained \ TLS_CACERT \ TLS_CERT \ TLS_KEY \ TLS_RANDFILE \ nextgroup=ldapconfFilename \ skipwhite syn keyword ldapconfOption contained \ TLS_CACERTDIR \ nextgroup=ldapconfPath \ skipwhite syn keyword ldapconfOption contained \ TLS_CIPHER_SUITE \ nextgroup=@ldapconfTLSCipher \ skipwhite syn keyword ldapconfOption contained \ TLS_REQCERT \ nextgroup=ldapconfTLSCertCheck \ skipwhite syn keyword ldapconfOption contained \ TLS_CRLCHECK \ nextgroup=ldapconfTLSCRLCheck \ skipwhite syn case match syn match ldapconfURI contained display \ 'ldaps\=://[^[:space:]:]\+\%(:\d\+\)\=' \ nextgroup=ldapconfURI \ skipwhite " LDAP Distinguished Names are defined in Section 3 of RFC 2253: " http://www.ietf.org/rfc/rfc2253.txt. syn match ldapconfDNAttrType contained display \ '\a[a-zA-Z0-9-]\+\|\d\+\%(\.\d\+\)*' \ nextgroup=ldapconfDNAttrTypeEq syn match ldapconfDNAttrTypeEq contained display \ '=' \ nextgroup=ldapconfDNAttrValue syn match ldapconfDNAttrValue contained display \ '\%([^,=+<>#;\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*\|#\%(\x\x\)\+\|"\%([^\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*"' \ nextgroup=ldapconfDNSeparator syn match ldapconfDNSeparator contained display \ '[+,]' \ nextgroup=ldapconfDNAttrType syn match ldapconfHost contained display \ '[^[:space:]:]\+\%(:\d\+\)\=' \ nextgroup=ldapconfHost \ skipwhite syn match ldapconfPort contained display \ '\d\+' syn keyword ldapconfBoolean contained \ on \ true \ yes \ off \ false \ no syn match ldapconfInteger contained display \ '\d\+' syn keyword ldapconfDerefWhen contained \ never \ searching \ finding \ always " Taken from http://www.iana.org/assignments/sasl-mechanisms. syn keyword ldapconfSASLMechanism contained \ KERBEROS_V4 \ GSSAPI \ SKEY \ EXTERNAL \ ANONYMOUS \ OTP \ PLAIN \ SECURID \ NTLM \ NMAS_LOGIN \ NMAS_AUTHEN \ KERBEROS_V5 syn match ldapconfSASLMechanism contained display \ 'CRAM-MD5\|GSS-SPNEGO\|DIGEST-MD5\|9798-[UM]-\%(RSA-SHA1-ENC\|\%(EC\)\=DSA-SHA1\)\|NMAS-SAMBA-AUTH' " TODO: I have been unable to find a definition for a SASL realm, " authentication identity, and proxy authorization identity. syn match ldapconfSASLRealm contained display \ '\S\+' syn match ldapconfSASLAuthID contained display \ '\S\+' syn keyword ldapconfSASLSecProps contained \ none \ noplain \ noactive \ nodict \ noanonymous \ forwardsec \ passcred \ nextgroup=ldapconfSASLSecPSep syn keyword ldapconfSASLSecProps contained \ minssf \ maxssf \ maxbufsize \ nextgroup=ldapconfSASLSecPEq syn match ldapconfSASLSecPEq contained display \ '=' \ nextgroup=ldapconfSASLSecFactor syn match ldapconfSASLSecFactor contained display \ '\d\+' \ nextgroup=ldapconfSASLSecPSep syn match ldapconfSASLSecPSep contained display \ ',' \ nextgroup=ldapconfSASLSecProps syn match ldapconfFilename contained display \ '.\+' syn match ldapconfPath contained display \ '.\+' " Defined in openssl-ciphers(1). " TODO: Should we include the stuff under CIPHER SUITE NAMES? syn cluster ldapconfTLSCipher contains=ldapconfTLSCipherOp, \ ldapconfTLSCipherName, \ ldapconfTLSCipherSort syn match ldapconfTLSCipherOp contained display \ '[+!-]' \ nextgroup=ldapconfTLSCipherName syn keyword ldapconfTLSCipherName contained \ DEFAULT \ COMPLEMENTOFDEFAULT \ ALL \ COMPLEMENTOFALL \ HIGH \ MEDIUM \ LOW \ EXP \ EXPORT \ EXPORT40 \ EXPORT56 \ eNULL \ NULL \ aNULL \ kRSA \ RSA \ kEDH \ kDHr \ kDHd \ aRSA \ aDSS \ DSS \ aDH \ kFZA \ aFZA \ eFZA \ FZA \ TLSv1 \ SSLv3 \ SSLv2 \ DH \ ADH \ AES \ 3DES \ DES \ RC4 \ RC2 \ IDEA \ MD5 \ SHA1 \ SHA \ Camellia \ nextgroup=ldapconfTLSCipherSep syn match ldapconfTLSCipherSort contained display \ '@STRENGTH' \ nextgroup=ldapconfTLSCipherSep syn match ldapconfTLSCipherSep contained display \ '[:, ]' \ nextgroup=@ldapconfTLSCipher syn keyword ldapconfTLSCertCheck contained \ never \ allow \ try \ demand \ hard syn keyword ldapconfTLSCRLCheck contained \ none \ peer \ all hi def link ldapconfTodo Todo hi def link ldapconfComment Comment hi def link ldapconfOption Keyword hi def link ldapconfDeprOption Error hi def link ldapconfString String hi def link ldapconfURI ldapconfString hi def link ldapconfDNAttrType Identifier hi def link ldapconfOperator Operator hi def link ldapconfEq ldapconfOperator hi def link ldapconfDNAttrTypeEq ldapconfEq hi def link ldapconfValue ldapconfString hi def link ldapconfDNAttrValue ldapconfValue hi def link ldapconfSeparator ldapconfOperator hi def link ldapconfDNSeparator ldapconfSeparator hi def link ldapconfHost ldapconfURI hi def link ldapconfNumber Number hi def link ldapconfPort ldapconfNumber hi def link ldapconfBoolean Boolean hi def link ldapconfInteger ldapconfNumber hi def link ldapconfType Type hi def link ldapconfDerefWhen ldapconfType hi def link ldapconfDefine Define hi def link ldapconfSASLMechanism ldapconfDefine hi def link ldapconfSASLRealm ldapconfURI hi def link ldapconfSASLAuthID ldapconfValue hi def link ldapconfSASLSecProps ldapconfType hi def link ldapconfSASLSecPEq ldapconfEq hi def link ldapconfSASLSecFactor ldapconfNumber hi def link ldapconfSASLSecPSep ldapconfSeparator hi def link ldapconfFilename ldapconfString hi def link ldapconfPath ldapconfFilename hi def link ldapconfTLSCipherOp ldapconfOperator hi def link ldapconfTLSCipherName ldapconfDefine hi def link ldapconfSpecial Special hi def link ldapconfTLSCipherSort ldapconfSpecial hi def link ldapconfTLSCipherSep ldapconfSeparator hi def link ldapconfTLSCertCheck ldapconfType hi def link ldapconfTLSCRLCheck ldapconfType let b:current_syntax = "ldapconf" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/ldif.vim000066400000000000000000000017661320401574200174640ustar00rootroot00000000000000" Vim syntax file " Language: LDAP LDIF " Maintainer: Zak Johnson " Last Change: 2003-12-30 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn sync minlines=10 linebreaks=1 syn match ldifAttribute /^[^ #][^:]*/ contains=ldifOption display syn match ldifOption /;[^:]\+/ contained contains=ldifPunctuation display syn match ldifPunctuation /;/ contained display syn region ldifStringValue matchgroup=ldifPunctuation start=/: / end=/\_$/ skip=/\n / syn region ldifBase64Value matchgroup=ldifPunctuation start=/:: / end=/\_$/ skip=/\n / syn region ldifFileValue matchgroup=ldifPunctuation start=/:< / end=/\_$/ skip=/\n / syn region ldifComment start=/^#/ end=/\_$/ skip=/\n / hi def link ldifAttribute Type hi def link ldifOption Identifier hi def link ldifPunctuation Normal hi def link ldifStringValue String hi def link ldifBase64Value Special hi def link ldifFileValue Special hi def link ldifComment Comment let b:current_syntax = "ldif" neovim-0.2.2/runtime/syntax/less.vim000066400000000000000000000102061320401574200175010ustar00rootroot00000000000000" Vim syntax file " Language: less " Maintainer: Alessandro Vioni " URL: https://github.com/genoma/vim-less " Last Change: 2014 November 24 if exists("b:current_syntax") finish endif runtime! syntax/css.vim runtime! after/syntax/css.vim syn case ignore syn cluster lessCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp syn cluster lessCssAttributes contains=css.*Attr,lessEndOfLineComment,lessComment,cssValue.*,cssColor,cssURL,lessDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp syn region lessDefinition matchgroup=cssBraces start="{" end="}" contains=TOP syn match lessProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:" contains=css.*Prop skipwhite nextgroup=lessCssAttribute contained containedin=lessDefinition syn match lessProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=lessCssAttribute syn match lessProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=lessCssAttribute syn match lessCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@lessCssAttributes,lessVariable,lessFunction,lessInterpolation syn match lessDefault "!default\>" contained " less variables and media queries syn match lessVariable "@[[:alnum:]_-]\+" nextgroup=lessCssAttribute skipwhite syn match lessMedia "@media" nextgroup=lessCssAttribute skipwhite " Less functions syn match lessFunction "\<\%(escape\|e\|unit\)\>(\@=" contained syn match lessFunction "\<\%(ceil\|floor\|percentage\|round\|sqrt\|abs\|sin\|asin\|cos\|acos\|tan\|atan\|pi\|pow\|min\|max\)\>(\@=" contained syn match lessFunction "\<\%(rgb\|rgba\|argb\|argb\|hsl\|hsla\|hsv\|hsva\)\>(\@=" contained syn match lessFunction "\<\%(hue\|saturation\|lightness\|red\|green\|blue\|alpha\|luma\)\>(\@=" contained syn match lessFunction "\<\%(saturate\|desaturate\|lighten\|darken\|fadein\|fadeout\|fade\|spin\|mix\|greyscale\|contrast\)\>(\@=" contained syn match lessFunction "\<\%(multiply\|screen\|overlay\|softlight\|hardlight\|difference\|exclusion\|average\|negation\)\>(\@=" contained " Less id class visualization syn match lessIdChar "#[[:alnum:]_-]\@=" nextgroup=lessId,lessClassIdCall syn match lessId "[[:alnum:]_-]\+" contained syn match lessClassIdCall "[[:alnum:]_-]\+()" contained syn match lessClassChar "\.[[:alnum:]_-]\@=" nextgroup=lessClass,lessClassCall syn match lessClass "[[:alnum:]_-]\+" contained syn match lessClassCall "[[:alnum:]_-]\+()" contained syn match lessAmpersand "&" contains=lessIdChar,lessClassChar syn region lessInclude start="@import" end=";\|$" contains=lessComment,cssURL,cssUnicodeEscape,cssMediaType,cssStringQ,cssStringQQ syn keyword lessTodo FIXME NOTE TODO OPTIMIZE XXX contained syn region lessComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=lessTodo,@Spell syn region lessCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=lessTodo,@Spell syn match lessEndOfLineComment "//.*" contains=lessComment,lessTodo,@Spell hi def link lessEndOfLineComment lessComment hi def link lessCssComment lessComment hi def link lessComment Comment hi def link lessDefault cssImportant hi def link lessVariable Identifier hi def link lessFunction PreProc hi def link lessTodo Todo hi def link lessInclude Include hi def link lessIdChar Special hi def link lessClassChar Special hi def link lessAmpersand Character hi def link lessId Identifier hi def link lessClass Type hi def link lessCssAttribute PreProc hi def link lessClassCall Type hi def link lessClassIdCall Type hi def link lessTagName cssTagName hi def link lessDeprecated cssDeprecated hi def link lessMedia cssMedia let b:current_syntax = "less" " vim:set sw=2: neovim-0.2.2/runtime/syntax/lex.vim000066400000000000000000000151101320401574200173220ustar00rootroot00000000000000" Vim syntax file " Language: Lex " Maintainer: Charles E. Campbell " Last Change: Aug 31, 2016 " Version: 16 " URL: http://mysite.verizon.net/astronaut/vim/index.html#SYNTAX_LEX " " Option: " lex_uses_cpp : if this variable exists, then C++ is loaded rather than C " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Read the C/C++ syntax to start with let s:Cpath= fnameescape(expand(":p:h").(exists("g:lex_uses_cpp")? "/cpp.vim" : "/c.vim")) if !filereadable(s:Cpath) for s:Cpath in split(globpath(&rtp,(exists("g:lex_uses_cpp")? "syntax/cpp.vim" : "syntax/c.vim")),"\n") if filereadable(fnameescape(s:Cpath)) let s:Cpath= fnameescape(s:Cpath) break endif endfor endif exe "syn include @lexCcode ".s:Cpath " --- ========= --- " --- Lex stuff --- " --- ========= --- " Options Section syn match lexOptions '^%\s*option\>.*$' contains=lexPatString " Abbreviations Section if has("folding") syn region lexAbbrvBlock fold start="^\(\h\+\s\|%{\)" end="^\ze%%$" skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState else syn region lexAbbrvBlock start="^\(\h\+\s\|%{\)" end="^\ze%%$" skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState endif syn match lexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=lexAbbrvRegExp syn match lexAbbrv "^%[sx]" contained syn match lexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=lexAbbrv,lexInclude if has("folding") syn region lexInclude fold matchgroup=lexSep start="^%{" end="%}" contained contains=@lexCcode syn region lexAbbrvComment fold start="^\s\+/\*" end="\*/" contains=@Spell syn region lexAbbrvComment fold start="\%^/\*" end="\*/" contains=@Spell syn region lexStartState fold matchgroup=lexAbbrv start="^%\a\+" end="$" contained else syn region lexInclude matchgroup=lexSep start="^%{" end="%}" contained contains=@lexCcode syn region lexAbbrvComment start="^\s\+/\*" end="\*/" contains=@Spell syn region lexAbbrvComment start="\%^/\*" end="\*/" contains=@Spell syn region lexStartState matchgroup=lexAbbrv start="^%\a\+" end="$" contained endif "%% : Patterns {Actions} if has("folding") syn region lexPatBlock fold matchgroup=Todo start="^%%$" matchgroup=Todo end="^%\ze%$" skipnl skipwhite nextgroup=lexFinalCodeBlock contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude syn region lexPat fold start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 skipwhite contained nextgroup=lexMorePat,lexPatSep,lexPattern contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace syn region lexPatInclude fold matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode syn region lexBrace fold start="\[" skip=+\\\\\|\\+ end="]" contained syn region lexPatString fold matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained else syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite nextgroup=lexFinalCodeBlock contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude syn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 skipwhite contained nextgroup=lexMorePat,lexPatSep,lexPattern contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace syn region lexPatInclude matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode syn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" contained syn region lexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained endif syn match lexPatTag "^<\I\i*\(,\I\i*\)*>" contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep syn match lexPatTagZone "^<\I\i*\(,\I\i*\)*>\s\+\ze{" contained nextgroup=lexPatTagZoneStart syn match lexPatTag +^<\I\i*\(,\I\i*\)*>*\(\\\\\)*\\"+ contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep " Lex Patterns syn region lexPattern start='[^ \t{}]' end="$" contained contains=lexPatRange syn region lexPatRange matchgroup=Delimiter start='\[' skip='\\\\\|\\.' end='\]' contains=lexEscape syn match lexEscape '\%(\\\\\)*\\.' contained if has("folding") syn region lexPatTagZoneStart matchgroup=lexPatTag fold start='{' end='}' contained contains=lexPat,lexPatComment syn region lexPatComment start="\s\+/\*" end="\*/" fold skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell else syn region lexPatTagZoneStart matchgroup=lexPatTag start='{' end='}' contained contains=lexPat,lexPatComment syn region lexPatComment start="\s\+/\*" end="\*/" skipnl contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell endif syn match lexPatCodeLine "[^{\[].*" contained contains=@lexCcode syn match lexMorePat "\s*|\s*$" skipnl contained nextgroup=lexPat,lexPatTag,lexPatComment syn match lexPatSep "\s\+" contained nextgroup=lexMorePat,lexPatCode,lexPatCodeLine syn match lexSlashQuote +\(\\\\\)*\\"+ contained if has("folding") syn region lexPatCode matchgroup=Delimiter start="{" end="}" fold skipnl contained contains=@lexCcode,lexCFunctions else syn region lexPatCode matchgroup=Delimiter start="{" end="}" skipnl contained contains=@lexCcode,lexCFunctions endif " Lex "functions" which may appear in C/C++ code blocks syn keyword lexCFunctions BEGIN input unput woutput yyleng yylook yytext syn keyword lexCFunctions ECHO output winput wunput yyless yymore yywrap " %% " lexAbbrevBlock " %% " lexPatBlock " %% " lexFinalCodeBlock syn region lexFinalCodeBlock matchgroup=Todo start="%$"me=e-1 end="\%$" contained contains=@lexCcode " includes several ALLBUTs; these have to be treated so as to exclude lex* groups syn cluster cParenGroup add=lex.* syn cluster cDefineGroup add=lex.* syn cluster cPreProcGroup add=lex.* syn cluster cMultiGroup add=lex.* " Synchronization syn sync clear syn sync minlines=500 syn sync match lexSyncPat grouphere lexPatBlock "^%[a-zA-Z]" syn sync match lexSyncPat groupthere lexPatBlock "^<$" syn sync match lexSyncPat groupthere lexPatBlock "^%%$" " The default highlighting. if !exists("skip_lex_syntax_inits") hi def link lexAbbrvComment lexPatComment hi def link lexAbbrvRegExp Macro hi def link lexAbbrv SpecialChar hi def link lexBrace lexPat hi def link lexCFunctions Function hi def link lexCstruct cStructure hi def link lexMorePat SpecialChar hi def link lexOptions PreProc hi def link lexPatComment Comment hi def link lexPat Function hi def link lexPatString Function hi def link lexPatTag Special hi def link lexPatTagZone lexPatTag hi def link lexSep Delimiter hi def link lexSlashQuote lexPat hi def link lexStartState Statement endif let b:current_syntax = "lex" " vim:ts=10 neovim-0.2.2/runtime/syntax/lftp.vim000066400000000000000000000164571320401574200175160ustar00rootroot00000000000000" Vim syntax file " Language: lftp(1) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2007-06-17 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=- syn region lftpComment display oneline start='#' end='$' \ contains=lftpTodo,@Spell syn keyword lftpTodo contained TODO FIXME XXX NOTE syn region lftpString contained display \ start=+"+ skip=+\\$\|\\"+ end=+"+ end=+$+ syn match lftpNumber contained display '\<\d\+\(\.\d\+\)\=\>' syn keyword lftpBoolean contained yes no on off true false syn keyword lftpInterval contained infinity inf never forever syn match lftpInterval contained '\<\(\d\+\(\.\d\+\)\=[dhms]\)\+\>' syn keyword lftpKeywords alias anon at bookmark cache cat cd chmod close \ cls command debug du echo exit fg find get \ get1 glob help history jobs kill lcd lftp \ lpwd ls mget mirror mkdir module more mput \ mrm mv nlist open pget put pwd queue quote \ reget recls rels renlist repeat reput rm \ rmdir scache site source suspend user version \ wait zcat zmore syn region lftpSet matchgroup=lftpKeywords \ start="set" end=";" end="$" \ contains=lftpString,lftpNumber,lftpBoolean, \ lftpInterval,lftpSettingsPrefix,lftpSettings syn match lftpSettingsPrefix contained '\<\%(bmk\|cache\|cmd\|color\|dns\):' syn match lftpSettingsPrefix contained '\<\%(file\|fish\|ftp\|hftp\):' syn match lftpSettingsPrefix contained '\<\%(http\|https\|mirror\|module\):' syn match lftpSettingsPrefix contained '\<\%(net\|sftp\|ssl\|xfer\):' " bmk: syn keyword lftpSettings contained save-p[asswords] " cache: syn keyword lftpSettings contained cache-em[pty-listings] en[able] \ exp[ire] siz[e] " cmd: syn keyword lftpSettings contained at[-exit] cls-c[ompletion-default] \ cls-d[efault] cs[h-history] \ default-p[rotocol] default-t[itle] syn keyword lftpSettings contained fai[l-exit] in[teractive] \ lo[ng-running] ls[-default] mo[ve-background] \ prom[pt] \ rem[ote-completion] \ save-c[wd-history] save-r[l-history] \ set-t[erm-status] statu[s-interval] \ te[rm-status] verb[ose] verify-h[ost] \ verify-path verify-path[-cached] " color: syn keyword lftpSettings contained dir[-colors] use-c[olor] " dns: syn keyword lftpSettings contained S[RV-query] cache-en[able] \ cache-ex[pire] cache-s[ize] \ fat[al-timeout] o[rder] use-fo[rk] " file: syn keyword lftpSettings contained ch[arset] " fish: syn keyword lftpSettings contained connect[-program] sh[ell] " ftp: syn keyword lftpSettings contained acct anon-p[ass] anon-u[ser] \ au[to-sync-mode] b[ind-data-socket] \ ch[arset] cli[ent] dev[ice-prefix] \ fi[x-pasv-address] fxp-f[orce] \ fxp-p[assive-source] h[ome] la[ng] \ list-e[mpty-ok] list-o[ptions] \ nop[-interval] pas[sive-mode] \ port-i[pv4] port-r[ange] prox[y] \ rest-l[ist] rest-s[tor] \ retry-530 retry-530[-anonymous] \ sit[e-group] skey-a[llow] \ skey-f[orce] ssl-allow \ ssl-allow[-anonymous] ssl-au[th] \ ssl-f[orce] ssl-protect-d[ata] \ ssl-protect-l[ist] stat-[interval] \ sy[nc-mode] timez[one] use-a[bor] \ use-fe[at] use-fx[p] use-hf[tp] \ use-mdtm use-mdtm[-overloaded] \ use-ml[sd] use-p[ret] use-q[uit] \ use-site-c[hmod] use-site-i[dle] \ use-site-u[time] use-siz[e] \ use-st[at] use-te[lnet-iac] \ verify-a[ddress] verify-p[ort] \ w[eb-mode] " hftp: syn keyword lftpSettings contained w[eb-mode] cache prox[y] \ use-au[thorization] use-he[ad] use-ty[pe] " http: syn keyword lftpSettings contained accept accept-c[harset] \ accept-l[anguage] cache coo[kie] \ pos[t-content-type] prox[y] \ put-c[ontent-type] put-m[ethod] ref[erer] \ set-c[ookies] user[-agent] " https: syn keyword lftpSettings contained prox[y] " mirror: syn keyword lftpSettings contained exc[lude-regex] o[rder] \ parallel-d[irectories] \ parallel-t[ransfer-count] use-p[get-n] " module: syn keyword lftpSettings contained pat[h] " net: syn keyword lftpSettings contained connection-l[imit] \ connection-t[akeover] id[le] limit-m[ax] \ limit-r[ate] limit-total-m[ax] \ limit-total-r[ate] max-ret[ries] no-[proxy] \ pe[rsist-retries] reconnect-interval-b[ase] \ reconnect-interval-ma[x] \ reconnect-interval-mu[ltiplier] \ socket-bind-ipv4 socket-bind-ipv6 \ socket-bu[ffer] socket-m[axseg] timeo[ut] " sftp: syn keyword lftpSettings contained connect[-program] \ max-p[ackets-in-flight] prot[ocol-version] \ ser[ver-program] size-r[ead] size-w[rite] " ssl: syn keyword lftpSettings contained ca-f[ile] ca-p[ath] ce[rt-file] \ crl-f[ile] crl-p[ath] k[ey-file] \ verify-c[ertificate] " xfer: syn keyword lftpSettings contained clo[bber] dis[k-full-fatal] \ eta-p[eriod] eta-t[erse] mak[e-backup] \ max-red[irections] ra[te-period] hi def link lftpComment Comment hi def link lftpTodo Todo hi def link lftpString String hi def link lftpNumber Number hi def link lftpBoolean Boolean hi def link lftpInterval Number hi def link lftpKeywords Keyword hi def link lftpSettingsPrefix PreProc hi def link lftpSettings Type let b:current_syntax = "lftp" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/lhaskell.vim000066400000000000000000000105231320401574200203340ustar00rootroot00000000000000" Vim syntax file " Language: Haskell with literate comments, Bird style, " TeX style and plain text surrounding " \begin{code} \end{code} blocks " Maintainer: Haskell Cafe mailinglist " Original Author: Arthur van Leeuwen " Last Change: 2010 Apr 11 " Version: 1.04 " " Thanks to Ian Lynagh for thoughtful comments on initial versions and " for the inspiration for writing this in the first place. " " This style guesses as to the type of markup used in a literate haskell " file and will highlight (La)TeX markup if it finds any " This behaviour can be overridden, both glabally and locally using " the lhs_markup variable or b:lhs_markup variable respectively. " " lhs_markup must be set to either tex or none to indicate that " you always want (La)TeX highlighting or no highlighting " must not be set to let the highlighting be guessed " b:lhs_markup must be set to eiterh tex or none to indicate that " you want (La)TeX highlighting or no highlighting for " this particular buffer " must not be set to let the highlighting be guessed " " " 2004 February 18: New version, based on Ian Lynagh's TeX guessing " lhaskell.vim, cweb.vim, tex.vim, sh.vim and fortran.vim " 2004 February 20: Cleaned up the guessing and overriding a bit " 2004 February 23: Cleaned up syntax highlighting for \begin{code} and " \end{code}, added some clarification to the attributions " 2008 July 1: Removed % from guess list, as it totally breaks plain " text markup guessing " 2009 April 29: Fixed highlighting breakage in TeX mode, " thanks to Kalman Noel " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " First off, see if we can inherit a user preference for lhs_markup if !exists("b:lhs_markup") if exists("lhs_markup") if lhs_markup =~ '\<\%(tex\|none\)\>' let b:lhs_markup = matchstr(lhs_markup,'\<\%(tex\|none\)\>') else echohl WarningMsg | echo "Unknown value of lhs_markup" | echohl None let b:lhs_markup = "unknown" endif else let b:lhs_markup = "unknown" endif else if b:lhs_markup !~ '\<\%(tex\|none\)\>' let b:lhs_markup = "unknown" endif endif " Remember where the cursor is, and go to upperleft let s:oldline=line(".") let s:oldcolumn=col(".") call cursor(1,1) " If no user preference, scan buffer for our guess of the markup to " highlight. We only differentiate between TeX and plain markup, where " plain is not highlighted. The heuristic for finding TeX markup is if " one of the following occurs anywhere in the file: " - \documentclass " - \begin{env} (for env != code) " - \part, \chapter, \section, \subsection, \subsubsection, etc if b:lhs_markup == "unknown" if search('\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0 let b:lhs_markup = "tex" else let b:lhs_markup = "plain" endif endif " If user wants us to highlight TeX syntax or guess thinks it's TeX, read it. if b:lhs_markup == "tex" runtime! syntax/tex.vim unlet b:current_syntax " Tex.vim removes "_" from 'iskeyword', but we need it for Haskell. setlocal isk+=_ syntax cluster lhsTeXContainer contains=tex.*Zone,texAbstract else syntax cluster lhsTeXContainer contains=.* endif " Literate Haskell is Haskell in between text, so at least read Haskell " highlighting syntax include @haskellTop syntax/haskell.vim syntax region lhsHaskellBirdTrack start="^>" end="\%(^[^>]\)\@=" contains=@haskellTop,lhsBirdTrack containedin=@lhsTeXContainer syntax region lhsHaskellBeginEndBlock start="^\\begin{code}\s*$" matchgroup=NONE end="\%(^\\end{code}.*$\)\@=" contains=@haskellTop,beginCodeBegin containedin=@lhsTeXContainer syntax match lhsBirdTrack "^>" contained syntax match beginCodeBegin "^\\begin" nextgroup=beginCodeCode contained syntax region beginCodeCode matchgroup=texDelimiter start="{" end="}" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link lhsBirdTrack Comment hi def link beginCodeBegin texCmdName hi def link beginCodeCode texSection " Restore cursor to original position, as it may have been disturbed " by the searches in our guessing code call cursor (s:oldline, s:oldcolumn) unlet s:oldline unlet s:oldcolumn let b:current_syntax = "lhaskell" " vim: ts=8 neovim-0.2.2/runtime/syntax/libao.vim000066400000000000000000000011741320401574200176250ustar00rootroot00000000000000" Vim syntax file " Language: libao.conf(5) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword libaoTodo contained TODO FIXME XXX NOTE syn region libaoComment display oneline start='^\s*#' end='$' \ contains=libaoTodo,@Spell syn keyword libaoKeyword default_driver hi def link libaoTodo Todo hi def link libaoComment Comment hi def link libaoKeyword Keyword let b:current_syntax = "libao" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/lifelines.vim000066400000000000000000000147601320401574200205160ustar00rootroot00000000000000" Vim syntax file " Language: LifeLines (v 3.0.62) " Maintainer: Patrick Texier " Location: " Last Change: 2010 May 7 " option to highlight error obsolete statements " add the following line to your .vimrc file : " let lifelines_deprecated = 1 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " A bunch of useful LifeLines keywords 3.0.62 syn keyword lifelinesDecl char_encoding require option include syn keyword lifelinesStatement set syn keyword lifelinesUser getindi geindiset getfam getint getstr choosechild syn keyword lifelinesUser chooseindi choosespouse choosesubset menuchoose syn keyword lifelinesUser choosefam syn keyword lifelinesProc proc func return call syn keyword lifelinesInclude include syn keyword lifelinesDef global syn keyword lifelinesConditional if else elsif switch syn keyword lifelinesRepeat continue break while syn keyword lifelinesLogical and or not eq ne lt gt le ge strcmp eqstr nestr syn keyword lifelinesArithm add sub mul div mod exp neg incr decr syn keyword lifelinesArithm cos sin tan arccos arcsin arctan syn keyword lifelinesArithm deg2dms dms2deg spdist syn keyword lifelinesIndi name fullname surname givens trimname birth syn keyword lifelinesIndi death burial baptism syn keyword lifelinesIndi father mother nextsib prevsib sex male female syn keyword lifelinesIndi pn nspouses nfamilies parents title key syn keyword lifelinesIndi soundex inode root indi firstindi nextindi syn keyword lifelinesIndi previndi spouses families forindi indiset syn keyword lifelinesIndi addtoset deletefromset union intersect syn keyword lifelinesIndi difference parentset childset spouseset siblingset syn keyword lifelinesIndi ancestorset descendentset descendantset uniqueset syn keyword lifelinesIndi namesort keysort valuesort genindiset getindiset syn keyword lifelinesIndi forindiset lastindi writeindi syn keyword lifelinesIndi inset syn keyword lifelinesFam marriage husband wife nchildren firstchild syn keyword lifelinesFam lastchild fnode fam firstfam nextfam lastfam syn keyword lifelinesFam prevfam children forfam writefam syn keyword lifelinesFam fathers mothers Parents syn keyword lifelinesList list empty length enqueue dequeue requeue syn keyword lifelinesList push pop setel getel forlist inlist dup clear syn keyword lifelinesTable table insert lookup syn keyword lifelinesGedcom xref tag value parent child sibling savenode syn keyword lifelinesGedcom fornodes traverse createnode addnode syn keyword lifelinesGedcom detachnode foreven fornotes forothr forsour syn keyword lifelinesGedcom reference dereference getrecord syn keyword lifelinesGedcom gengedcomstrong syn keyword lifelinesFunct date place year long short gettoday dayformat syn keyword lifelinesFunct monthformat dateformat extractdate eraformat syn keyword lifelinesFunct complexdate complexformat complexpic datepic syn keyword lifelinesFunct extractnames extractplaces extracttokens lower syn keyword lifelinesFunct yearformat syn keyword lifelinesFunct upper capitalize trim rjustify syn keyword lifelinesFunct concat strconcat strlen substring index syn keyword lifelinesFunct titlecase gettext syn keyword lifelinesFunct d card ord alpha roman strsoundex strtoint syn keyword lifelinesFunct atoi linemode pagemod col row pos pageout nl syn keyword lifelinesFunct sp qt newfile outfile copyfile print lock unlock test syn keyword lifelinesFunct database version system stddate program syn keyword lifelinesFunct pvalue pagemode level extractdatestr debug syn keyword lifelinesFunct f float int free getcol getproperty heapused syn keyword lifelinesFunct sort rsort syn keyword lifelinesFunct deleteel syn keyword lifelinesFunct bytecode convertcode setlocale " New dates functions (since 3.0.51) syn keyword lifelinesFunct jd2date date2jd dayofweek setdate " options to highlight as error obsolete statements " please read ll-reportmanual. if exists("lifelines_deprecated") syn keyword lifelinesError getintmsg getindimsg getstrmsg syn keyword lifelinesError gengedcom gengedcomweak deletenode syn keyword lifelinesError save strsave syn keyword lifelinesError lengthset if version >= 700 let g:omni_syntax_group_exclude_lifelines = 'lifelinesError' endif else syn keyword lifelinesUser getintmsg getindimsg getstrmsg syn keyword lifelinesGedcom gengedcom gengedcomweak deletenode syn keyword lifelinesFunct save strsave syn keyword lifelinesIndi lengthset endif syn region lifelinesString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lifelinesSpecial syn match lifelinesSpecial "\\\(\\\|\(n\|t\)\)" contained syn keyword lifelinesTodo contained TODO FIXME XXX syn region lifelinesComment start="/\*" end="\*/" contains=lifelinesTodo " integers syn match lifelinesNumber "-\=\<\d\+\>" "floats, with dot syn match lifelinesNumber "-\=\<\d\+\.\d*\>" "floats, starting with a dot syn match lifelinesNumber "-\=\.\d\+\>" " folding using {} syn region lifelinesFoldBlock start="{" end="}" transparent fold "catch errors caused by wrong parenthesis "adapted from original c.vim written by Bram Moolenaar syn cluster lifelinesParenGroup contains=lifelinesParenError syn region lifelinesParen transparent start='(' end=')' contains=ALLBUT,@lifelinesParenGroup syn match lifelinesParenError ")" syn match lifelinesErrInParen contained "[{}]" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link lifelinesConditional Conditional hi def link lifelinesArithm Operator hi def link lifelinesLogical Conditional hi def link lifelinesInclude Include hi def link lifelinesComment Comment hi def link lifelinesStatement Statement hi def link lifelinesUser Statement hi def link lifelinesFunct Statement hi def link lifelinesTable Statement hi def link lifelinesGedcom Statement hi def link lifelinesList Statement hi def link lifelinesRepeat Repeat hi def link lifelinesFam Statement hi def link lifelinesIndi Statement hi def link lifelinesProc Statement hi def link lifelinesDef Statement hi def link lifelinesString String hi def link lifelinesSpecial Special hi def link lifelinesNumber Number hi def link lifelinesParenError Error hi def link lifelinesErrInParen Error hi def link lifelinesError Error hi def link lifelinesTodo Todo hi def link lifelinesDecl PreProc let b:current_syntax = "lifelines" " vim: ts=8 sw=4 neovim-0.2.2/runtime/syntax/lilo.vim000066400000000000000000000242731320401574200175030ustar00rootroot00000000000000" Vim syntax file " Language: lilo configuration (lilo.conf) " Maintainer: Niels Horn " Previous Maintainer: David Necas (Yeti) " Last Change: 2010-02-03 " Setup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword=@,48-57,.,-,_ syn case ignore " Base constructs syn match liloError "\S\+" syn match liloComment "#.*$" syn match liloEnviron "\$\w\+" contained syn match liloEnviron "\${[^}]\+}" contained syn match liloDecNumber "\d\+" contained syn match liloHexNumber "0[xX]\x\+" contained syn match liloDecNumberP "\d\+p\=" contained syn match liloSpecial contained "\\\(\"\|\\\|$\)" syn region liloString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=liloSpecial,liloEnviron syn match liloLabel :[^ "]\+: contained contains=liloSpecial,liloEnviron syn region liloPath start=+[$/]+ skip=+\\\\\|\\ \|\\$"+ end=+ \|$+ contained contains=liloSpecial,liloEnviron syn match liloDecNumberList "\(\d\|,\)\+" contained contains=liloDecNumber syn match liloDecNumberPList "\(\d\|[,p]\)\+" contained contains=liloDecNumberP,liloDecNumber syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString " Path syn keyword liloOption backup bitmap boot disktab force-backup keytable map message nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty syn keyword liloKernelOpt initrd root nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty syn keyword liloImageOpt path loader table nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty syn keyword liloDiskOpt partition nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty " Other syn keyword liloOption menu-scheme raid-extra-boot serial install nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty syn keyword liloOption bios-passes-dl nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty syn keyword liloOption default label alias wmdefault nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty syn keyword liloKernelOpt ramdisk nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty syn keyword liloImageOpt password range nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty syn keyword liloDiskOpt set type nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty " Symbolic syn keyword liloKernelOpt vga nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty " Number syn keyword liloOption delay timeout verbose nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty syn keyword liloDiskOpt sectors heads cylinders start nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty " String syn keyword liloOption menu-title nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty syn keyword liloKernelOpt append addappend nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty " Hex number syn keyword liloImageOpt map-drive to boot-as nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty syn keyword liloDiskOpt bios normal hidden nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty " Number list syn keyword liloOption bmp-colors nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty " Number list, some of the numbers followed by p syn keyword liloOption bmp-table bmp-timer nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty " Flag syn keyword liloOption compact fix-table geometric ignore-table lba32 linear mandatory nowarn prompt syn keyword liloOption bmp-retain el-torito-bootable-CD large-memory suppress-boot-time-BIOS-data syn keyword liloKernelOpt read-only read-write syn keyword liloImageOpt bypass lock mandatory optional restricted single-key unsafe syn keyword liloImageOpt master-boot wmwarn wmdisable syn keyword liloDiskOpt change activate deactivate inaccessible reset " Image syn keyword liloImage image other nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty syn keyword liloDisk disk nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty syn keyword liloChRules change-rules " Vga keywords syn keyword liloVgaKeyword ask ext extended normal contained " Comment followed by equal sign and ... syn match liloEqPathComment "#.*$" contained nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty syn match liloEqVgaComment "#.*$" contained nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty syn match liloEqHexNumberComment "#.*$" contained nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty syn match liloEqStringComment "#.*$" contained nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty syn match liloEqLabelStringComment "#.*$" contained nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty syn match liloEqNumberListComment "#.*$" contained nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty syn match liloEqDecNumberPListComment "#.*$" contained nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty syn match liloEqAnythingComment "#.*$" contained nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty " Equal sign followed by ... syn match liloEqPath "=" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty syn match liloEqVga "=" contained nextgroup=liloVgaKeyword,liloHexNumber,liloDecNumber,liloVgaComment,liloError skipwhite skipempty syn match liloEqNumber "=" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty syn match liloEqHexNumber "=" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty syn match liloEqString "=" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty syn match liloEqLabelString "=" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty syn match liloEqNumberList "=" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty syn match liloEqDecNumberPList "=" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty " Comment followed by ... syn match liloPathComment "#.*$" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty syn match liloVgaComment "#.*$" contained nextgroup=liloVgaKeyword,liloHexNumber,liloVgaComment,liloError skipwhite skipempty syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty syn match liloHexNumberComment "#.*$" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty syn match liloStringComment "#.*$" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty syn match liloLabelStringComment "#.*$" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty syn match liloDecNumberListComment "#.*$" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty " Define the default highlighting hi def link liloEqPath liloEquals hi def link liloEqWord liloEquals hi def link liloEqVga liloEquals hi def link liloEqDecNumber liloEquals hi def link liloEqHexNumber liloEquals hi def link liloEqNumber liloEquals hi def link liloEqString liloEquals hi def link liloEqAnything liloEquals hi def link liloEquals Special hi def link liloError Error hi def link liloEqPathComment liloComment hi def link liloEqVgaComment liloComment hi def link liloEqDecNumberComment liloComment hi def link liloEqHexNumberComment liloComment hi def link liloEqStringComment liloComment hi def link liloEqAnythingComment liloComment hi def link liloPathComment liloComment hi def link liloVgaComment liloComment hi def link liloDecNumberComment liloComment hi def link liloHexNumberComment liloComment hi def link liloNumberComment liloComment hi def link liloStringComment liloComment hi def link liloAnythingComment liloComment hi def link liloComment Comment hi def link liloDiskOpt liloOption hi def link liloKernelOpt liloOption hi def link liloImageOpt liloOption hi def link liloOption Keyword hi def link liloDecNumber liloNumber hi def link liloHexNumber liloNumber hi def link liloDecNumberP liloNumber hi def link liloNumber Number hi def link liloString String hi def link liloPath Constant hi def link liloSpecial Special hi def link liloLabel Title hi def link liloDecNumberList Special hi def link liloDecNumberPList Special hi def link liloAnything Normal hi def link liloEnviron Identifier hi def link liloVgaKeyword Identifier hi def link liloImage Type hi def link liloChRules Preproc hi def link liloDisk Preproc let b:current_syntax = "lilo" neovim-0.2.2/runtime/syntax/limits.vim000066400000000000000000000024451320401574200200420ustar00rootroot00000000000000" Vim syntax file " Language: limits(5) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword limitsTodo contained TODO FIXME XXX NOTE syn region limitsComment display oneline start='^\s*#' end='$' \ contains=limitsTodo,@Spell syn match limitsBegin display '^' \ nextgroup=limitsUser,limitsDefault,limitsComment \ skipwhite syn match limitsUser contained '[^ \t#*]\+' \ nextgroup=limitsLimit,limitsDeLimit skipwhite syn match limitsDefault contained '*' \ nextgroup=limitsLimit,limitsDeLimit skipwhite syn match limitsLimit contained '[ACDFMNRSTUKLP]' nextgroup=limitsNumber syn match limitsDeLimit contained '-' syn match limitsNumber contained '\d\+\>' nextgroup=limitsLimit skipwhite hi def link limitsTodo Todo hi def link limitsComment Comment hi def link limitsUser Keyword hi def link limitsDefault Macro hi def link limitsLimit Identifier hi def link limitsDeLimit Special hi def link limitsNumber Number let b:current_syntax = "limits" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/liquid.vim000066400000000000000000000140501320401574200200230ustar00rootroot00000000000000" Vim syntax file " Language: Liquid " Maintainer: Tim Pope " Filenames: *.liquid " Last Change: 2013 May 30 if exists('b:current_syntax') finish endif if !exists('main_syntax') let main_syntax = 'liquid' endif if !exists('g:liquid_default_subtype') let g:liquid_default_subtype = 'html' endif if !exists('b:liquid_subtype') && main_syntax == 'liquid' let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:liquid_subtype = matchstr(s:lines,'liquid_subtype=\zs\w\+') if b:liquid_subtype == '' let b:liquid_subtype = matchstr(&filetype,'^liquid\.\zs\w\+') endif if b:liquid_subtype == '' let b:liquid_subtype = matchstr(substitute(expand('%:t'),'\c\%(\.liquid\)\+$','',''),'\.\zs\w\+$') endif if b:liquid_subtype == '' let b:liquid_subtype = g:liquid_default_subtype endif endif if exists('b:liquid_subtype') && b:liquid_subtype != '' exe 'runtime! syntax/'.b:liquid_subtype.'.vim' unlet! b:current_syntax endif syn case match if exists('b:liquid_subtype') && b:liquid_subtype != 'yaml' " YAML Front Matter syn include @liquidYamlTop syntax/yaml.vim unlet! b:current_syntax syn region liquidYamlHead start="\%^---$" end="^---\s*$" keepend contains=@liquidYamlTop,@Spell endif if !exists('g:liquid_highlight_types') let g:liquid_highlight_types = [] endif if !exists('s:subtype') let s:subtype = exists('b:liquid_subtype') ? b:liquid_subtype : '' for s:type in map(copy(g:liquid_highlight_types),'matchstr(v:val,"[^=]*$")') if s:type =~ '\.' let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*') endif exe 'syn include @liquidHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim' unlet! b:current_syntax endfor unlet! s:type if s:subtype == '' unlet! b:liquid_subtype else let b:liquid_subtype = s:subtype endif unlet s:subtype endif syn region liquidStatement matchgroup=liquidDelimiter start="{%" end="%}" contains=@liquidStatement containedin=ALLBUT,@liquidExempt keepend syn region liquidExpression matchgroup=liquidDelimiter start="{{" end="}}" contains=@liquidExpression containedin=ALLBUT,@liquidExempt keepend syn region liquidComment matchgroup=liquidDelimiter start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=liquidTodo,@Spell containedin=ALLBUT,@liquidExempt keepend syn region liquidRaw matchgroup=liquidDelimiter start="{%\s*raw\s*%}" end="{%\s*endraw\s*%}" contains=TOP,@liquidExempt containedin=ALLBUT,@liquidExempt keepend syn cluster liquidExempt contains=liquidStatement,liquidExpression,liquidComment,liquidRaw,@liquidStatement,liquidYamlHead syn cluster liquidStatement contains=liquidConditional,liquidRepeat,liquidKeyword,@liquidExpression syn cluster liquidExpression contains=liquidOperator,liquidString,liquidNumber,liquidFloat,liquidBoolean,liquidNull,liquidEmpty,liquidPipe,liquidForloop syn keyword liquidKeyword highlight nextgroup=liquidTypeHighlight skipwhite contained syn keyword liquidKeyword endhighlight contained syn region liquidHighlight start="{%\s*highlight\s\+\w\+\s*%}" end="{% endhighlight %}" keepend for s:type in g:liquid_highlight_types exe 'syn match liquidTypeHighlight "\<'.matchstr(s:type,'[^=]*').'\>" contained' exe 'syn region liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' start="{%\s*highlight\s\+'.matchstr(s:type,'[^=]*').'\s*%}" end="{% endhighlight %}" keepend contains=@liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') endfor unlet! s:type syn region liquidString matchgroup=liquidQuote start=+"+ end=+"+ contained syn region liquidString matchgroup=liquidQuote start=+'+ end=+'+ contained syn match liquidNumber "-\=\<\d\+\>" contained syn match liquidFloat "-\=\<\d\+\>\.\.\@!\%(\d\+\>\)\=" contained syn keyword liquidBoolean true false contained syn keyword liquidNull null nil contained syn match liquidEmpty "\" contained syn keyword liquidOperator and or not contained syn match liquidPipe '|' contained skipwhite nextgroup=liquidFilter syn keyword liquidFilter date capitalize downcase upcase first last join sort size strip_html strip_newlines newline_to_br replace replace_first remove remove_first truncate truncatewords prepend append minus plus times divided_by contained syn keyword liquidConditional if elsif else endif unless endunless case when endcase ifchanged endifchanged contained syn keyword liquidRepeat for endfor tablerow endtablerow in contained syn match liquidRepeat "\%({%\s*\)\@<=empty\>" contained syn keyword liquidKeyword assign cycle include with contained syn keyword liquidForloop forloop nextgroup=liquidForloopDot contained syn match liquidForloopDot "\." nextgroup=liquidForloopAttribute contained syn keyword liquidForloopAttribute length index index0 rindex rindex0 first last contained syn keyword liquidTablerowloop tablerowloop nextgroup=liquidTablerowloopDot contained syn match liquidTablerowloopDot "\." nextgroup=liquidTableForloopAttribute contained syn keyword liquidTablerowloopAttribute length index index0 col col0 index0 rindex rindex0 first last col_first col_last contained hi def link liquidDelimiter PreProc hi def link liquidComment Comment hi def link liquidTypeHighlight Type hi def link liquidConditional Conditional hi def link liquidRepeat Repeat hi def link liquidKeyword Keyword hi def link liquidOperator Operator hi def link liquidString String hi def link liquidQuote Delimiter hi def link liquidNumber Number hi def link liquidFloat Float hi def link liquidEmpty liquidNull hi def link liquidNull liquidBoolean hi def link liquidBoolean Boolean hi def link liquidFilter Function hi def link liquidForloop Identifier hi def link liquidForloopAttribute Identifier let b:current_syntax = 'liquid' if exists('main_syntax') && main_syntax == 'liquid' unlet main_syntax endif neovim-0.2.2/runtime/syntax/lisp.vim000066400000000000000000001065631320401574200175160ustar00rootroot00000000000000" Vim syntax file " Language: Lisp " Maintainer: Charles E. Campbell " Last Change: May 02, 2016 " Version: 26 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP " " Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec " Clisp additions courtesy of http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/emacs/lisp.vim " --------------------------------------------------------------------- " Load Once: {{{1 if exists("b:current_syntax") finish endif if exists("g:lisp_isk") exe "setl isk=".g:lisp_isk elseif !has("patch-7.4.1142") setl isk=38,42,43,45,47-58,60-62,64-90,97-122,_ else syn iskeyword 38,42,43,45,47-58,60-62,64-90,97-122,_ endif if exists("g:lispsyntax_ignorecase") || exists("g:lispsyntax_clisp") set ignorecase endif " --------------------------------------------------------------------- " Clusters: {{{1 syn cluster lispAtomCluster contains=lispAtomBarSymbol,lispAtomList,lispAtomNmbr0,lispComment,lispDecl,lispFunc,lispLeadWhite syn cluster lispBaseListCluster contains=lispAtom,lispAtomBarSymbol,lispAtomMark,lispBQList,lispBarSymbol,lispComment,lispConcat,lispDecl,lispFunc,lispKey,lispList,lispNumber,lispEscapeSpecial,lispSymbol,lispVar,lispLeadWhite if exists("g:lisp_instring") syn cluster lispListCluster contains=@lispBaseListCluster,lispString,lispInString,lispInStringString else syn cluster lispListCluster contains=@lispBaseListCluster,lispString endif syn case ignore " --------------------------------------------------------------------- " Lists: {{{1 syn match lispSymbol contained ![^()'`,"; \t]\+! syn match lispBarSymbol contained !|..\{-}|! if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 syn region lispParen0 matchgroup=hlLevel0 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen1 syn region lispParen1 contained matchgroup=hlLevel1 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen2 syn region lispParen2 contained matchgroup=hlLevel2 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen3 syn region lispParen3 contained matchgroup=hlLevel3 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen4 syn region lispParen4 contained matchgroup=hlLevel4 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen5 syn region lispParen5 contained matchgroup=hlLevel5 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen6 syn region lispParen6 contained matchgroup=hlLevel6 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen7 syn region lispParen7 contained matchgroup=hlLevel7 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen8 syn region lispParen8 contained matchgroup=hlLevel8 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen9 syn region lispParen9 contained matchgroup=hlLevel9 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen0 else syn region lispList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@lispListCluster syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster endif " --------------------------------------------------------------------- " Atoms: {{{1 syn match lispAtomMark "'" syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark syn region lispAtom start=+'"+ skip=+\\"+ end=+"+ syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispEscapeSpecial syn match lispAtomNmbr contained "\<\d\+" syn match lispLeadWhite contained "^\s\+" " --------------------------------------------------------------------- " Standard Lisp Functions and Macros: {{{1 syn keyword lispFunc * find-method pprint-indent syn keyword lispFunc ** find-package pprint-linear syn keyword lispFunc *** find-restart pprint-logical-block syn keyword lispFunc + find-symbol pprint-newline syn keyword lispFunc ++ finish-output pprint-pop syn keyword lispFunc +++ first pprint-tab syn keyword lispFunc - fixnum pprint-tabular syn keyword lispFunc / flet prin1 syn keyword lispFunc // float prin1-to-string syn keyword lispFunc /// float-digits princ syn keyword lispFunc /= float-precision princ-to-string syn keyword lispFunc 1+ float-radix print syn keyword lispFunc 1- float-sign print-not-readable syn keyword lispFunc < floating-point-inexact print-not-readable-object syn keyword lispFunc <= floating-point-invalid-operation print-object syn keyword lispFunc = floating-point-overflow print-unreadable-object syn keyword lispFunc > floating-point-underflow probe-file syn keyword lispFunc >= floatp proclaim syn keyword lispFunc abort floor prog syn keyword lispFunc abs fmakunbound prog* syn keyword lispFunc access force-output prog1 syn keyword lispFunc acons format prog2 syn keyword lispFunc acos formatter progn syn keyword lispFunc acosh fourth program-error syn keyword lispFunc add-method fresh-line progv syn keyword lispFunc adjoin fround provide syn keyword lispFunc adjust-array ftruncate psetf syn keyword lispFunc adjustable-array-p ftype psetq syn keyword lispFunc allocate-instance funcall push syn keyword lispFunc alpha-char-p function pushnew syn keyword lispFunc alphanumericp function-keywords putprop syn keyword lispFunc and function-lambda-expression quote syn keyword lispFunc append functionp random syn keyword lispFunc apply gbitp random-state syn keyword lispFunc applyhook gcd random-state-p syn keyword lispFunc apropos generic-function rassoc syn keyword lispFunc apropos-list gensym rassoc-if syn keyword lispFunc aref gentemp rassoc-if-not syn keyword lispFunc arithmetic-error get ratio syn keyword lispFunc arithmetic-error-operands get-decoded-time rational syn keyword lispFunc arithmetic-error-operation get-dispatch-macro-character rationalize syn keyword lispFunc array get-internal-real-time rationalp syn keyword lispFunc array-dimension get-internal-run-time read syn keyword lispFunc array-dimension-limit get-macro-character read-byte syn keyword lispFunc array-dimensions get-output-stream-string read-char syn keyword lispFunc array-displacement get-properties read-char-no-hang syn keyword lispFunc array-element-type get-setf-expansion read-delimited-list syn keyword lispFunc array-has-fill-pointer-p get-setf-method read-eval-print syn keyword lispFunc array-in-bounds-p get-universal-time read-from-string syn keyword lispFunc array-rank getf read-line syn keyword lispFunc array-rank-limit gethash read-preserving-whitespace syn keyword lispFunc array-row-major-index go read-sequence syn keyword lispFunc array-total-size graphic-char-p reader-error syn keyword lispFunc array-total-size-limit handler-bind readtable syn keyword lispFunc arrayp handler-case readtable-case syn keyword lispFunc ash hash-table readtablep syn keyword lispFunc asin hash-table-count real syn keyword lispFunc asinh hash-table-p realp syn keyword lispFunc assert hash-table-rehash-size realpart syn keyword lispFunc assoc hash-table-rehash-threshold reduce syn keyword lispFunc assoc-if hash-table-size reinitialize-instance syn keyword lispFunc assoc-if-not hash-table-test rem syn keyword lispFunc atan host-namestring remf syn keyword lispFunc atanh identity remhash syn keyword lispFunc atom if remove syn keyword lispFunc base-char if-exists remove-duplicates syn keyword lispFunc base-string ignorable remove-if syn keyword lispFunc bignum ignore remove-if-not syn keyword lispFunc bit ignore-errors remove-method syn keyword lispFunc bit-and imagpart remprop syn keyword lispFunc bit-andc1 import rename-file syn keyword lispFunc bit-andc2 in-package rename-package syn keyword lispFunc bit-eqv in-package replace syn keyword lispFunc bit-ior incf require syn keyword lispFunc bit-nand initialize-instance rest syn keyword lispFunc bit-nor inline restart syn keyword lispFunc bit-not input-stream-p restart-bind syn keyword lispFunc bit-orc1 inspect restart-case syn keyword lispFunc bit-orc2 int-char restart-name syn keyword lispFunc bit-vector integer return syn keyword lispFunc bit-vector-p integer-decode-float return-from syn keyword lispFunc bit-xor integer-length revappend syn keyword lispFunc block integerp reverse syn keyword lispFunc boole interactive-stream-p room syn keyword lispFunc boole-1 intern rotatef syn keyword lispFunc boole-2 internal-time-units-per-second round syn keyword lispFunc boole-and intersection row-major-aref syn keyword lispFunc boole-andc1 invalid-method-error rplaca syn keyword lispFunc boole-andc2 invoke-debugger rplacd syn keyword lispFunc boole-c1 invoke-restart safety syn keyword lispFunc boole-c2 invoke-restart-interactively satisfies syn keyword lispFunc boole-clr isqrt sbit syn keyword lispFunc boole-eqv keyword scale-float syn keyword lispFunc boole-ior keywordp schar syn keyword lispFunc boole-nand labels search syn keyword lispFunc boole-nor lambda second syn keyword lispFunc boole-orc1 lambda-list-keywords sequence syn keyword lispFunc boole-orc2 lambda-parameters-limit serious-condition syn keyword lispFunc boole-set last set syn keyword lispFunc boole-xor lcm set-char-bit syn keyword lispFunc boolean ldb set-difference syn keyword lispFunc both-case-p ldb-test set-dispatch-macro-character syn keyword lispFunc boundp ldiff set-exclusive-or syn keyword lispFunc break least-negative-double-float set-macro-character syn keyword lispFunc broadcast-stream least-negative-long-float set-pprint-dispatch syn keyword lispFunc broadcast-stream-streams least-negative-normalized-double-float set-syntax-from-char syn keyword lispFunc built-in-class least-negative-normalized-long-float setf syn keyword lispFunc butlast least-negative-normalized-short-float setq syn keyword lispFunc byte least-negative-normalized-single-float seventh syn keyword lispFunc byte-position least-negative-short-float shadow syn keyword lispFunc byte-size least-negative-single-float shadowing-import syn keyword lispFunc call-arguments-limit least-positive-double-float shared-initialize syn keyword lispFunc call-method least-positive-long-float shiftf syn keyword lispFunc call-next-method least-positive-normalized-double-float short-float syn keyword lispFunc capitalize least-positive-normalized-long-float short-float-epsilon syn keyword lispFunc car least-positive-normalized-short-float short-float-negative-epsilon syn keyword lispFunc case least-positive-normalized-single-float short-site-name syn keyword lispFunc catch least-positive-short-float signal syn keyword lispFunc ccase least-positive-single-float signed-byte syn keyword lispFunc cdr length signum syn keyword lispFunc ceiling let simple-condition syn keyword lispFunc cell-error let* simple-array syn keyword lispFunc cell-error-name lisp simple-base-string syn keyword lispFunc cerror lisp-implementation-type simple-bit-vector syn keyword lispFunc change-class lisp-implementation-version simple-bit-vector-p syn keyword lispFunc char list simple-condition-format-arguments syn keyword lispFunc char-bit list* simple-condition-format-control syn keyword lispFunc char-bits list-all-packages simple-error syn keyword lispFunc char-bits-limit list-length simple-string syn keyword lispFunc char-code listen simple-string-p syn keyword lispFunc char-code-limit listp simple-type-error syn keyword lispFunc char-control-bit load simple-vector syn keyword lispFunc char-downcase load-logical-pathname-translations simple-vector-p syn keyword lispFunc char-equal load-time-value simple-warning syn keyword lispFunc char-font locally sin syn keyword lispFunc char-font-limit log single-flaot-epsilon syn keyword lispFunc char-greaterp logand single-float syn keyword lispFunc char-hyper-bit logandc1 single-float-epsilon syn keyword lispFunc char-int logandc2 single-float-negative-epsilon syn keyword lispFunc char-lessp logbitp sinh syn keyword lispFunc char-meta-bit logcount sixth syn keyword lispFunc char-name logeqv sleep syn keyword lispFunc char-not-equal logical-pathname slot-boundp syn keyword lispFunc char-not-greaterp logical-pathname-translations slot-exists-p syn keyword lispFunc char-not-lessp logior slot-makunbound syn keyword lispFunc char-super-bit lognand slot-missing syn keyword lispFunc char-upcase lognor slot-unbound syn keyword lispFunc char/= lognot slot-value syn keyword lispFunc char< logorc1 software-type syn keyword lispFunc char<= logorc2 software-version syn keyword lispFunc char= logtest some syn keyword lispFunc char> logxor sort syn keyword lispFunc char>= long-float space syn keyword lispFunc character long-float-epsilon special syn keyword lispFunc characterp long-float-negative-epsilon special-form-p syn keyword lispFunc check-type long-site-name special-operator-p syn keyword lispFunc cis loop speed syn keyword lispFunc class loop-finish sqrt syn keyword lispFunc class-name lower-case-p stable-sort syn keyword lispFunc class-of machine-instance standard syn keyword lispFunc clear-input machine-type standard-char syn keyword lispFunc clear-output machine-version standard-char-p syn keyword lispFunc close macro-function standard-class syn keyword lispFunc clrhash macroexpand standard-generic-function syn keyword lispFunc code-char macroexpand-1 standard-method syn keyword lispFunc coerce macroexpand-l standard-object syn keyword lispFunc commonp macrolet step syn keyword lispFunc compilation-speed make-array storage-condition syn keyword lispFunc compile make-array store-value syn keyword lispFunc compile-file make-broadcast-stream stream syn keyword lispFunc compile-file-pathname make-char stream-element-type syn keyword lispFunc compiled-function make-concatenated-stream stream-error syn keyword lispFunc compiled-function-p make-condition stream-error-stream syn keyword lispFunc compiler-let make-dispatch-macro-character stream-external-format syn keyword lispFunc compiler-macro make-echo-stream streamp syn keyword lispFunc compiler-macro-function make-hash-table streamup syn keyword lispFunc complement make-instance string syn keyword lispFunc complex make-instances-obsolete string-capitalize syn keyword lispFunc complexp make-list string-char syn keyword lispFunc compute-applicable-methods make-load-form string-char-p syn keyword lispFunc compute-restarts make-load-form-saving-slots string-downcase syn keyword lispFunc concatenate make-method string-equal syn keyword lispFunc concatenated-stream make-package string-greaterp syn keyword lispFunc concatenated-stream-streams make-pathname string-left-trim syn keyword lispFunc cond make-random-state string-lessp syn keyword lispFunc condition make-sequence string-not-equal syn keyword lispFunc conjugate make-string string-not-greaterp syn keyword lispFunc cons make-string-input-stream string-not-lessp syn keyword lispFunc consp make-string-output-stream string-right-strim syn keyword lispFunc constantly make-symbol string-right-trim syn keyword lispFunc constantp make-synonym-stream string-stream syn keyword lispFunc continue make-two-way-stream string-trim syn keyword lispFunc control-error makunbound string-upcase syn keyword lispFunc copy-alist map string/= syn keyword lispFunc copy-list map-into string< syn keyword lispFunc copy-pprint-dispatch mapc string<= syn keyword lispFunc copy-readtable mapcan string= syn keyword lispFunc copy-seq mapcar string> syn keyword lispFunc copy-structure mapcon string>= syn keyword lispFunc copy-symbol maphash stringp syn keyword lispFunc copy-tree mapl structure syn keyword lispFunc cos maplist structure-class syn keyword lispFunc cosh mask-field structure-object syn keyword lispFunc count max style-warning syn keyword lispFunc count-if member sublim syn keyword lispFunc count-if-not member-if sublis syn keyword lispFunc ctypecase member-if-not subseq syn keyword lispFunc debug merge subsetp syn keyword lispFunc decf merge-pathname subst syn keyword lispFunc declaim merge-pathnames subst-if syn keyword lispFunc declaration method subst-if-not syn keyword lispFunc declare method-combination substitute syn keyword lispFunc decode-float method-combination-error substitute-if syn keyword lispFunc decode-universal-time method-qualifiers substitute-if-not syn keyword lispFunc defclass min subtypep syn keyword lispFunc defconstant minusp svref syn keyword lispFunc defgeneric mismatch sxhash syn keyword lispFunc define-compiler-macro mod symbol syn keyword lispFunc define-condition most-negative-double-float symbol-function syn keyword lispFunc define-method-combination most-negative-fixnum symbol-macrolet syn keyword lispFunc define-modify-macro most-negative-long-float symbol-name syn keyword lispFunc define-setf-expander most-negative-short-float symbol-package syn keyword lispFunc define-setf-method most-negative-single-float symbol-plist syn keyword lispFunc define-symbol-macro most-positive-double-float symbol-value syn keyword lispFunc defmacro most-positive-fixnum symbolp syn keyword lispFunc defmethod most-positive-long-float synonym-stream syn keyword lispFunc defpackage most-positive-short-float synonym-stream-symbol syn keyword lispFunc defparameter most-positive-single-float sys syn keyword lispFunc defsetf muffle-warning system syn keyword lispFunc defstruct multiple-value-bind t syn keyword lispFunc deftype multiple-value-call tagbody syn keyword lispFunc defun multiple-value-list tailp syn keyword lispFunc defvar multiple-value-prog1 tan syn keyword lispFunc delete multiple-value-seteq tanh syn keyword lispFunc delete-duplicates multiple-value-setq tenth syn keyword lispFunc delete-file multiple-values-limit terpri syn keyword lispFunc delete-if name-char the syn keyword lispFunc delete-if-not namestring third syn keyword lispFunc delete-package nbutlast throw syn keyword lispFunc denominator nconc time syn keyword lispFunc deposit-field next-method-p trace syn keyword lispFunc describe nil translate-logical-pathname syn keyword lispFunc describe-object nintersection translate-pathname syn keyword lispFunc destructuring-bind ninth tree-equal syn keyword lispFunc digit-char no-applicable-method truename syn keyword lispFunc digit-char-p no-next-method truncase syn keyword lispFunc directory not truncate syn keyword lispFunc directory-namestring notany two-way-stream syn keyword lispFunc disassemble notevery two-way-stream-input-stream syn keyword lispFunc division-by-zero notinline two-way-stream-output-stream syn keyword lispFunc do nreconc type syn keyword lispFunc do* nreverse type-error syn keyword lispFunc do-all-symbols nset-difference type-error-datum syn keyword lispFunc do-exeternal-symbols nset-exclusive-or type-error-expected-type syn keyword lispFunc do-external-symbols nstring type-of syn keyword lispFunc do-symbols nstring-capitalize typecase syn keyword lispFunc documentation nstring-downcase typep syn keyword lispFunc dolist nstring-upcase unbound-slot syn keyword lispFunc dotimes nsublis unbound-slot-instance syn keyword lispFunc double-float nsubst unbound-variable syn keyword lispFunc double-float-epsilon nsubst-if undefined-function syn keyword lispFunc double-float-negative-epsilon nsubst-if-not unexport syn keyword lispFunc dpb nsubstitute unintern syn keyword lispFunc dribble nsubstitute-if union syn keyword lispFunc dynamic-extent nsubstitute-if-not unless syn keyword lispFunc ecase nth unread syn keyword lispFunc echo-stream nth-value unread-char syn keyword lispFunc echo-stream-input-stream nthcdr unsigned-byte syn keyword lispFunc echo-stream-output-stream null untrace syn keyword lispFunc ed number unuse-package syn keyword lispFunc eighth numberp unwind-protect syn keyword lispFunc elt numerator update-instance-for-different-class syn keyword lispFunc encode-universal-time nunion update-instance-for-redefined-class syn keyword lispFunc end-of-file oddp upgraded-array-element-type syn keyword lispFunc endp open upgraded-complex-part-type syn keyword lispFunc enough-namestring open-stream-p upper-case-p syn keyword lispFunc ensure-directories-exist optimize use-package syn keyword lispFunc ensure-generic-function or use-value syn keyword lispFunc eq otherwise user syn keyword lispFunc eql output-stream-p user-homedir-pathname syn keyword lispFunc equal package values syn keyword lispFunc equalp package-error values-list syn keyword lispFunc error package-error-package vector syn keyword lispFunc etypecase package-name vector-pop syn keyword lispFunc eval package-nicknames vector-push syn keyword lispFunc eval-when package-shadowing-symbols vector-push-extend syn keyword lispFunc evalhook package-use-list vectorp syn keyword lispFunc evenp package-used-by-list warn syn keyword lispFunc every packagep warning syn keyword lispFunc exp pairlis when syn keyword lispFunc export parse-error wild-pathname-p syn keyword lispFunc expt parse-integer with-accessors syn keyword lispFunc extended-char parse-namestring with-compilation-unit syn keyword lispFunc fboundp pathname with-condition-restarts syn keyword lispFunc fceiling pathname-device with-hash-table-iterator syn keyword lispFunc fdefinition pathname-directory with-input-from-string syn keyword lispFunc ffloor pathname-host with-open-file syn keyword lispFunc fifth pathname-match-p with-open-stream syn keyword lispFunc file-author pathname-name with-output-to-string syn keyword lispFunc file-error pathname-type with-package-iterator syn keyword lispFunc file-error-pathname pathname-version with-simple-restart syn keyword lispFunc file-length pathnamep with-slots syn keyword lispFunc file-namestring peek-char with-standard-io-syntax syn keyword lispFunc file-position phase write syn keyword lispFunc file-stream pi write-byte syn keyword lispFunc file-string-length plusp write-char syn keyword lispFunc file-write-date pop write-line syn keyword lispFunc fill position write-sequence syn keyword lispFunc fill-pointer position-if write-string syn keyword lispFunc find position-if-not write-to-string syn keyword lispFunc find-all-symbols pprint y-or-n-p syn keyword lispFunc find-class pprint-dispatch yes-or-no-p syn keyword lispFunc find-if pprint-exit-if-list-exhausted zerop syn keyword lispFunc find-if-not pprint-fill syn match lispFunc "\" if exists("g:lispsyntax_clisp") " CLISP FFI: syn match lispFunc "\<\(ffi:\)\?with-c-\(place\|var\)\>" syn match lispFunc "\<\(ffi:\)\?with-foreign-\(object\|string\)\>" syn match lispFunc "\<\(ffi:\)\?default-foreign-\(language\|library\)\>" syn match lispFunc "\<\([us]_\?\)\?\(element\|deref\|cast\|slot\|validp\)\>" syn match lispFunc "\<\(ffi:\)\?set-foreign-pointer\>" syn match lispFunc "\<\(ffi:\)\?allocate-\(deep\|shallow\)\>" syn match lispFunc "\<\(ffi:\)\?c-lines\>" syn match lispFunc "\<\(ffi:\)\?foreign-\(value\|free\|variable\|function\|object\)\>" syn match lispFunc "\<\(ffi:\)\?foreign-address\(-null\|unsigned\)\?\>" syn match lispFunc "\<\(ffi:\)\?undigned-foreign-address\>" syn match lispFunc "\<\(ffi:\)\?c-var-\(address\|object\)\>" syn match lispFunc "\<\(ffi:\)\?typeof\>" syn match lispFunc "\<\(ffi:\)\?\(bit\)\?sizeof\>" " CLISP Macros, functions et al: syn match lispFunc "\<\(ext:\)\?with-collect\>" syn match lispFunc "\<\(ext:\)\?letf\*\?\>" syn match lispFunc "\<\(ext:\)\?finalize\>\>" syn match lispFunc "\<\(ext:\)\?memoized\>" syn match lispFunc "\<\(ext:\)\?getenv\>" syn match lispFunc "\<\(ext:\)\?convert-string-\(to\|from\)-bytes\>" syn match lispFunc "\<\(ext:\)\?ethe\>" syn match lispFunc "\<\(ext:\)\?with-gensyms\>" syn match lispFunc "\<\(ext:\)\?open-http\>" syn match lispFunc "\<\(ext:\)\?string-concat\>" syn match lispFunc "\<\(ext:\)\?with-http-\(in\|out\)put\>" syn match lispFunc "\<\(ext:\)\?with-html-output\>" syn match lispFunc "\<\(ext:\)\?expand-form\>" syn match lispFunc "\<\(ext:\)\?\(without-\)\?package-lock\>" syn match lispFunc "\<\(ext:\)\?re-export\>" syn match lispFunc "\<\(ext:\)\?saveinitmem\>" syn match lispFunc "\<\(ext:\)\?\(read\|write\)-\(integer\|float\)\>" syn match lispFunc "\<\(ext:\)\?\(read\|write\)-\(char\|byte\)-sequence\>" syn match lispFunc "\<\(custom:\)\?\*system-package-list\*\>" syn match lispFunc "\<\(custom:\)\?\*ansi\*\>" endif " --------------------------------------------------------------------- " Lisp Keywords (modifiers): {{{1 syn keyword lispKey :abort :from-end :overwrite syn keyword lispKey :adjustable :gensym :predicate syn keyword lispKey :append :host :preserve-whitespace syn keyword lispKey :array :if-does-not-exist :pretty syn keyword lispKey :base :if-exists :print syn keyword lispKey :case :include :print-function syn keyword lispKey :circle :index :probe syn keyword lispKey :conc-name :inherited :radix syn keyword lispKey :constructor :initial-contents :read-only syn keyword lispKey :copier :initial-element :rehash-size syn keyword lispKey :count :initial-offset :rehash-threshold syn keyword lispKey :create :initial-value :rename syn keyword lispKey :default :input :rename-and-delete syn keyword lispKey :defaults :internal :size syn keyword lispKey :device :io :start syn keyword lispKey :direction :junk-allowed :start1 syn keyword lispKey :directory :key :start2 syn keyword lispKey :displaced-index-offset :length :stream syn keyword lispKey :displaced-to :level :supersede syn keyword lispKey :element-type :name :test syn keyword lispKey :end :named :test-not syn keyword lispKey :end1 :new-version :type syn keyword lispKey :end2 :nicknames :use syn keyword lispKey :error :output :verbose syn keyword lispKey :escape :output-file :version syn keyword lispKey :external " defpackage arguments syn keyword lispKey :documentation :shadowing-import-from :modern :export syn keyword lispKey :case-sensitive :case-inverted :shadow :import-from :intern " lambda list keywords syn keyword lispKey &allow-other-keys &aux &body syn keyword lispKey &environment &key &optional &rest &whole " make-array argument syn keyword lispKey :fill-pointer " readtable-case values syn keyword lispKey :upcase :downcase :preserve :invert " eval-when situations syn keyword lispKey :load-toplevel :compile-toplevel :execute " ANSI Extended LOOP: syn keyword lispKey :while :until :for :do :if :then :else :when :unless :in syn keyword lispKey :across :finally :collect :nconc :maximize :minimize :sum syn keyword lispKey :and :with :initially :append :into :count :end :repeat syn keyword lispKey :always :never :thereis :from :to :upto :downto :below syn keyword lispKey :above :by :on :being :each :the :hash-key :hash-keys syn keyword lispKey :hash-value :hash-values :using :of-type :upfrom :downfrom if exists("g:lispsyntax_clisp") " CLISP FFI: syn keyword lispKey :arguments :return-type :library :full :malloc-free syn keyword lispKey :none :alloca :in :out :in-out :stdc-stdcall :stdc :c syn keyword lispKey :language :built-in :typedef :external syn keyword lispKey :fini :init-once :init-always endif " --------------------------------------------------------------------- " Standard Lisp Variables: {{{1 syn keyword lispVar *applyhook* *load-pathname* *print-pprint-dispatch* syn keyword lispVar *break-on-signals* *load-print* *print-pprint-dispatch* syn keyword lispVar *break-on-signals* *load-truename* *print-pretty* syn keyword lispVar *break-on-warnings* *load-verbose* *print-radix* syn keyword lispVar *compile-file-pathname* *macroexpand-hook* *print-readably* syn keyword lispVar *compile-file-pathname* *modules* *print-right-margin* syn keyword lispVar *compile-file-truename* *package* *print-right-margin* syn keyword lispVar *compile-file-truename* *print-array* *query-io* syn keyword lispVar *compile-print* *print-base* *random-state* syn keyword lispVar *compile-verbose* *print-case* *read-base* syn keyword lispVar *compile-verbose* *print-circle* *read-default-float-format* syn keyword lispVar *debug-io* *print-escape* *read-eval* syn keyword lispVar *debugger-hook* *print-gensym* *read-suppress* syn keyword lispVar *default-pathname-defaults* *print-length* *readtable* syn keyword lispVar *error-output* *print-level* *standard-input* syn keyword lispVar *evalhook* *print-lines* *standard-output* syn keyword lispVar *features* *print-miser-width* *terminal-io* syn keyword lispVar *gensym-counter* *print-miser-width* *trace-output* " --------------------------------------------------------------------- " Strings: {{{1 syn region lispString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell if exists("g:lisp_instring") syn region lispInString keepend matchgroup=Delimiter start=+"(+rs=s+1 skip=+|.\{-}|+ matchgroup=Delimiter end=+)"+ contains=@lispBaseListCluster,lispInStringString syn region lispInStringString start=+\\"+ skip=+\\\\+ end=+\\"+ contained endif " --------------------------------------------------------------------- " Shared with Xlisp, Declarations, Macros, Functions: {{{1 syn keyword lispDecl defmacro do-all-symbols labels syn keyword lispDecl defsetf do-external-symbols let syn keyword lispDecl deftype do-symbols locally syn keyword lispDecl defun dotimes macrolet syn keyword lispDecl do* flet multiple-value-bind if exists("g:lispsyntax_clisp") " CLISP FFI: syn match lispDecl "\<\(ffi:\)\?def-c-\(var\|const\|enum\|type\|struct\)\>" syn match lispDecl "\<\(ffi:\)\?def-call-\(out\|in\)\>" syn match lispDecl "\<\(ffi:\)\?c-\(function\|struct\|pointer\|string\)\>" syn match lispDecl "\<\(ffi:\)\?c-ptr\(-null\)\?\>" syn match lispDecl "\<\(ffi:\)\?c-array\(-ptr\|-max\)\?\>" syn match lispDecl "\<\(ffi:\)\?[us]\?\(char\|short\|int\|long\)\>" syn match lispDecl "\<\(win32:\|w32\)\?d\?word\>" syn match lispDecl "\<\([us]_\?\)\?int\(8\|16\|32\|64\)\(_t\)\?\>" syn keyword lispDecl size_t off_t time_t handle endif " --------------------------------------------------------------------- " Numbers: supporting integers and floating point numbers {{{1 syn match lispNumber "-\=\(\.\d\+\|\d\+\(\.\d*\)\=\)\([dDeEfFlL][-+]\=\d\+\)\=" syn match lispNumber "-\=\(\d\+/\d\+\)" syn match lispEscapeSpecial "\*\w[a-z_0-9-]*\*" syn match lispEscapeSpecial !#|[^()'`,"; \t]\+|#! syn match lispEscapeSpecial !#x\x\+! syn match lispEscapeSpecial !#o\o\+! syn match lispEscapeSpecial !#b[01]\+! syn match lispEscapeSpecial !#\\[ -}\~]! syn match lispEscapeSpecial !#[':][^()'`,"; \t]\+! syn match lispEscapeSpecial !#([^()'`,"; \t]\+)! syn match lispEscapeSpecial !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\)! syn match lispEscapeSpecial "\<+[a-zA-Z_][a-zA-Z_0-9-]*+\>" syn match lispConcat "\s\.\s" syn match lispParenError ")" " --------------------------------------------------------------------- " Comments: {{{1 syn cluster lispCommentGroup contains=lispTodo,@Spell syn match lispComment ";.*$" contains=@lispCommentGroup syn region lispCommentRegion start="#|" end="|#" contains=lispCommentRegion,@lispCommentGroup syn keyword lispTodo contained combak combak: todo todo: " --------------------------------------------------------------------- " Synchronization: {{{1 syn sync lines=100 " --------------------------------------------------------------------- " Define Highlighting: {{{1 if !exists("skip_lisp_syntax_inits") hi def link lispCommentRegion lispComment hi def link lispAtomNmbr lispNumber hi def link lispAtomMark lispMark hi def link lispInStringString lispString hi def link lispAtom Identifier hi def link lispAtomBarSymbol Special hi def link lispBarSymbol Special hi def link lispComment Comment hi def link lispConcat Statement hi def link lispDecl Statement hi def link lispFunc Statement hi def link lispKey Type hi def link lispMark Delimiter hi def link lispNumber Number hi def link lispParenError Error hi def link lispEscapeSpecial Type hi def link lispString String hi def link lispTodo Todo hi def link lispVar Statement if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 if &bg == "dark" hi def hlLevel0 ctermfg=red guifg=red1 hi def hlLevel1 ctermfg=yellow guifg=orange1 hi def hlLevel2 ctermfg=green guifg=yellow1 hi def hlLevel3 ctermfg=cyan guifg=greenyellow hi def hlLevel4 ctermfg=magenta guifg=green1 hi def hlLevel5 ctermfg=red guifg=springgreen1 hi def hlLevel6 ctermfg=yellow guifg=cyan1 hi def hlLevel7 ctermfg=green guifg=slateblue1 hi def hlLevel8 ctermfg=cyan guifg=magenta1 hi def hlLevel9 ctermfg=magenta guifg=purple1 else hi def hlLevel0 ctermfg=red guifg=red3 hi def hlLevel1 ctermfg=darkyellow guifg=orangered3 hi def hlLevel2 ctermfg=darkgreen guifg=orange2 hi def hlLevel3 ctermfg=blue guifg=yellow3 hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4 hi def hlLevel5 ctermfg=red guifg=green4 hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3 hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4 hi def hlLevel8 ctermfg=blue guifg=darkslateblue hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet endif endif endif let b:current_syntax = "lisp" " --------------------------------------------------------------------- " vim: ts=8 nowrap fdm=marker neovim-0.2.2/runtime/syntax/lite.vim000066400000000000000000000113551320401574200174760ustar00rootroot00000000000000" Vim syntax file " Language: lite " Maintainer: Lutz Eymers " URL: http://www.isp.de/data/lite.vim " Email: Subject: send syntax_vim.tgz " Last Change: 2001 Mai 01 " " Options lite_sql_query = 1 for SQL syntax highligthing inside strings " lite_minlines = x to sync at least x lines backwards " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'lite' endif if main_syntax == 'lite' if exists("lite_sql_query") if lite_sql_query == 1 syn include @liteSql :p:h/sql.vim unlet b:current_syntax endif endif endif if main_syntax == 'msql' if exists("msql_sql_query") if msql_sql_query == 1 syn include @liteSql :p:h/sql.vim unlet b:current_syntax endif endif endif syn cluster liteSql remove=sqlString,sqlComment syn case match " Internal Variables syn keyword liteIntVar ERRMSG contained " Comment syn region liteComment start="/\*" end="\*/" contains=liteTodo " Function names syn keyword liteFunctions echo printf fprintf open close read syn keyword liteFunctions readln readtok syn keyword liteFunctions split strseg chop tr sub substr syn keyword liteFunctions test unlink umask chmod mkdir chdir rmdir syn keyword liteFunctions rename truncate link symlink stat syn keyword liteFunctions sleep system getpid getppid kill syn keyword liteFunctions time ctime time2unixtime unixtime2year syn keyword liteFunctions unixtime2year unixtime2month unixtime2day syn keyword liteFunctions unixtime2hour unixtime2min unixtime2sec syn keyword liteFunctions strftime syn keyword liteFunctions getpwnam getpwuid syn keyword liteFunctions gethostbyname gethostbyaddress syn keyword liteFunctions urlEncode setContentType includeFile syn keyword liteFunctions msqlConnect msqlClose msqlSelectDB syn keyword liteFunctions msqlQuery msqlStoreResult msqlFreeResult syn keyword liteFunctions msqlFetchRow msqlDataSeek msqlListDBs syn keyword liteFunctions msqlListTables msqlInitFieldList msqlListField syn keyword liteFunctions msqlFieldSeek msqlNumRows msqlEncode syn keyword liteFunctions exit fatal typeof syn keyword liteFunctions crypt addHttpHeader " Conditional syn keyword liteConditional if else " Repeat syn keyword liteRepeat while " Operator syn keyword liteStatement break return continue " Operator syn match liteOperator "[-+=#*]" syn match liteOperator "/[^*]"me=e-1 syn match liteOperator "\$" syn match liteRelation "&&" syn match liteRelation "||" syn match liteRelation "[!=<>]=" syn match liteRelation "[<>]" " Identifier syn match liteIdentifier "$\h\w*" contains=liteIntVar,liteOperator syn match liteGlobalIdentifier "@\h\w*" contains=liteIntVar " Include syn keyword liteInclude load " Define syn keyword liteDefine funct " Type syn keyword liteType int uint char real " String syn region liteString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=liteIdentifier,liteSpecialChar,@liteSql " Number syn match liteNumber "-\=\<\d\+\>" " Float syn match liteFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" " SpecialChar syn match liteSpecialChar "\\[abcfnrtv\\]" contained syn match liteParentError "[)}\]]" " Todo syn keyword liteTodo TODO Todo todo contained " dont syn #!... syn match liteExec "^#!.*$" " Parents syn cluster liteInside contains=liteComment,liteFunctions,liteIdentifier,liteGlobalIdentifier,liteConditional,liteRepeat,liteStatement,liteOperator,liteRelation,liteType,liteString,liteNumber,liteFloat,liteParent syn region liteParent matchgroup=Delimiter start="(" end=")" contains=@liteInside syn region liteParent matchgroup=Delimiter start="{" end="}" contains=@liteInside syn region liteParent matchgroup=Delimiter start="\[" end="\]" contains=@liteInside " sync if main_syntax == 'lite' if exists("lite_minlines") exec "syn sync minlines=" . lite_minlines else syn sync minlines=100 endif endif " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link liteComment Comment hi def link liteString String hi def link liteNumber Number hi def link liteFloat Float hi def link liteIdentifier Identifier hi def link liteGlobalIdentifier Identifier hi def link liteIntVar Identifier hi def link liteFunctions Function hi def link liteRepeat Repeat hi def link liteConditional Conditional hi def link liteStatement Statement hi def link liteType Type hi def link liteInclude Include hi def link liteDefine Define hi def link liteSpecialChar SpecialChar hi def link liteParentError liteError hi def link liteError Error hi def link liteTodo Todo hi def link liteOperator Operator hi def link liteRelation Operator let b:current_syntax = "lite" if main_syntax == 'lite' unlet main_syntax endif " vim: ts=8 neovim-0.2.2/runtime/syntax/litestep.vim000066400000000000000000000150241320401574200203670ustar00rootroot00000000000000" Vim syntax file " Language: LiteStep RC file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2007-02-22 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword litestepTodo \ contained \ TODO FIXME XXX NOTE syn match litestepComment \ contained display contains=litestepTodo,@Spell \ ';.*$' syn case ignore syn cluster litestepBeginnings \ contains= \ litestepComment, \ litestepPreProc, \ litestepMultiCommandStart, \ litestepBangCommandStart, \ litestepGenericDirective syn match litestepGenericDirective \ contained display \ '\<\h\w\+\>' syn match litestepBeginning \ nextgroup=@litestepBeginnings skipwhite \ '^' syn keyword litestepPreProc \ contained \ Include \ If \ ElseIf \ Else \ EndIf syn cluster litestepMultiCommands \ contains= \ litestepMultiCommand syn match litestepMultiCommandStart \ nextgroup=@litestepMultiCommands \ '\*' syn match litestepMultiCommand \ contained display \ '\<\h\w\+\>' syn cluster litestepVariables \ contains= \ litestepBuiltinFolderVariable, \ litestepBuiltinConditionalVariable, \ litestepBuiltinResourceVariable, \ litestepBuiltinGUIDFolderMappingVariable, \ litestepVariable syn region litestepVariableExpansion \ display oneline transparent \ contains= \ @litestepVariables, \ litestepNumber, \ litestepMathOperator \ matchgroup=litestepVariableExpansion \ start='\$' \ end='\$' syn match litestepNumber \ display \ '\<\d\+\>' syn region litestepString \ display oneline contains=litestepVariableExpansion \ start=+"+ end=+"+ " TODO: unsure about this one. syn region litestepSubValue \ display oneline contains=litestepVariableExpansion \ start=+'+ end=+'+ syn keyword litestepBoolean \ true \ false "syn keyword litestepLine " \ ? "syn match litestepColor " \ display " \ '\<\x\+\>' syn match litestepRelationalOperator \ display \ '=\|<[>=]\=\|>=\=' syn keyword litestepLogicalOperator \ and \ or \ not syn match litestepMathOperator \ contained display \ '[+*/-]' syn keyword litestepBuiltinDirective \ LoadModule \ LSNoStartup \ LSAutoHideModules \ LSNoShellWarning \ LSSetAsShell \ LSUseSystemDDE \ LSDisableTrayService \ LSImageFolder \ ThemeAuthor \ ThemeName syn keyword litestepDeprecatedBuiltinDirective \ LSLogLevel \ LSLogFile syn match litestepVariable \ contained display \ '\<\h\w\+\>' syn keyword litestepBuiltinFolderVariable \ contained \ AdminToolsDir \ CommonAdminToolsDir \ CommonDesktopDir \ CommonFavorites \ CommonPrograms \ CommonStartMenu \ CommonStartup \ Cookies \ Desktop \ DesktopDir \ DocumentsDir \ Favorites \ Fonts \ History \ Internet \ InternetCache \ LitestepDir \ Nethood \ Printhood \ Programs \ QuickLaunch \ Recent \ Sendto \ Startmenu \ Startup \ Templates \ WinDir \ LitestepDir syn keyword litestepBuiltinConditionalVariable \ contained \ Win2000 \ Win95 \ Win98 \ Win9X \ WinME \ WinNT \ WinNT4 \ WinXP syn keyword litestepBuiltinResourceVariable \ contained \ CompileDate \ ResolutionX \ ResolutionY \ UserName syn keyword litestepBuiltinGUIDFolderMappingVariable \ contained \ AdminTools \ BitBucket \ Controls \ Dialup \ Documents \ Drives \ Network \ NetworkAndDialup \ Printers \ Scheduled syn cluster litestepBangs \ contains= \ litestepBuiltinBang, \ litestepBang syn match litestepBangStart \ nextgroup=@litestepBangs \ '!' syn match litestepBang \ contained display \ '\<\h\w\+\>' syn keyword litestepBuiltinBang \ contained \ About \ Alert \ CascadeWindows \ Confirm \ Execute \ Gather \ HideModules \ LogOff \ MinimizeWindows \ None \ Quit \ Recycle \ Refresh \ Reload \ ReloadModule \ RestoreWindows \ Run \ ShowModules \ Shutdown \ Switchuser \ TileWindowsH \ TileWindowsV \ ToggleModules \ UnloadModule hi def link litestepTodo Todo hi def link litestepComment Comment hi def link litestepDirective Keyword hi def link litestepGenericDirective litestepDirective hi def link litestepPreProc PreProc hi def link litestepMultiCommandStart litestepPreProc hi def link litestepMultiCommand litestepDirective hi def link litestepDelimiter Delimiter hi def link litestepVariableExpansion litestepDelimiter hi def link litestepNumber Number hi def link litestepString String hi def link litestepSubValue litestepString hi def link litestepBoolean Boolean "hi def link litestepLine "hi def link litestepColor Type hi def link litestepOperator Operator hi def link litestepRelationalOperator litestepOperator hi def link litestepLogicalOperator litestepOperator hi def link litestepMathOperator litestepOperator hi def link litestepBuiltinDirective litestepDirective hi def link litestepDeprecatedBuiltinDirective Error hi def link litestepVariable Identifier hi def link litestepBuiltinFolderVariable Identifier hi def link litestepBuiltinConditionalVariable Identifier hi def link litestepBuiltinResourceVariable Identifier hi def link litestepBuiltinGUIDFolderMappingVariable Identifier hi def link litestepBangStart litestepPreProc hi def link litestepBang litestepDirective hi def link litestepBuiltinBang litestepBang let b:current_syntax = "litestep" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/loginaccess.vim000066400000000000000000000101451320401574200210270ustar00rootroot00000000000000" Vim syntax file " Language: login.access(5) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword loginaccessTodo contained TODO FIXME XXX NOTE syn region loginaccessComment display oneline start='^#' end='$' \ contains=loginaccessTodo,@Spell syn match loginaccessBegin display '^' \ nextgroup=loginaccessPermission, \ loginaccessComment skipwhite syn match loginaccessPermission contained display '[^#]' \ contains=loginaccessPermError \ nextgroup=loginaccessUserSep syn match loginaccessPermError contained display '[^+-]' syn match loginaccessUserSep contained display ':' \ nextgroup=loginaccessUsers, \ loginaccessAllUsers, \ loginaccessExceptUsers syn match loginaccessUsers contained display '[^, \t:]\+' \ nextgroup=loginaccessUserIntSep, \ loginaccessOriginSep syn match loginaccessAllUsers contained display '\' \ nextgroup=loginaccessUserIntSep, \ loginaccessOriginSep syn match loginaccessLocalUsers contained display '\' \ nextgroup=loginaccessUserIntSep, \ loginaccessOriginSep syn match loginaccessExceptUsers contained display '\' \ nextgroup=loginaccessUserIntSep, \ loginaccessOriginSep syn match loginaccessUserIntSep contained display '[, \t]' \ nextgroup=loginaccessUsers, \ loginaccessAllUsers, \ loginaccessExceptUsers syn match loginaccessOriginSep contained display ':' \ nextgroup=loginaccessOrigins, \ loginaccessAllOrigins, \ loginaccessExceptOrigins syn match loginaccessOrigins contained display '[^, \t]\+' \ nextgroup=loginaccessOriginIntSep syn match loginaccessAllOrigins contained display '\' \ nextgroup=loginaccessOriginIntSep syn match loginaccessLocalOrigins contained display '\' \ nextgroup=loginaccessOriginIntSep syn match loginaccessExceptOrigins contained display '\' \ nextgroup=loginaccessOriginIntSep syn match loginaccessOriginIntSep contained display '[, \t]' \ nextgroup=loginaccessOrigins, \ loginaccessAllOrigins, \ loginaccessExceptOrigins hi def link loginaccessTodo Todo hi def link loginaccessComment Comment hi def link loginaccessPermission Type hi def link loginaccessPermError Error hi def link loginaccessUserSep Delimiter hi def link loginaccessUsers Identifier hi def link loginaccessAllUsers Macro hi def link loginaccessLocalUsers Macro hi def link loginaccessExceptUsers Operator hi def link loginaccessUserIntSep loginaccessUserSep hi def link loginaccessOriginSep loginaccessUserSep hi def link loginaccessOrigins Identifier hi def link loginaccessAllOrigins Macro hi def link loginaccessLocalOrigins Macro hi def link loginaccessExceptOrigins loginaccessExceptUsers hi def link loginaccessOriginIntSep loginaccessUserSep let b:current_syntax = "loginaccess" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/logindefs.vim000066400000000000000000000165611320401574200205170ustar00rootroot00000000000000" Vim syntax file " Language: login.defs(5) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2010-11-29 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match logindefsBegin display '^' \ nextgroup= \ logindefsComment, \ @logindefsKeyword \ skipwhite syn region logindefsComment display oneline start='^\s*#' end='$' \ contains=logindefsTodo,@Spell syn keyword logindefsTodo contained TODO FIXME XXX NOTE syn cluster logindefsKeyword contains= \ logindefsBooleanKeyword, \ logindefsEncryptKeyword, \ logindefsNumberKeyword, \ logindefsPathKeyword, \ logindefsPathsKeyword, \ logindefsStringKeyword syn keyword logindefsBooleanKeyword contained \ CHFN_AUTH \ CHSH_AUTH \ CREATE_HOME \ DEFAULT_HOME \ FAILLOG_ENAB \ LASTLOG_ENAB \ LOG_OK_LOGINS \ LOG_UNKFAIL_ENAB \ MAIL_CHECK_ENAB \ MD5_CRYPT_ENAB \ OBSCURE_CHECKS_ENAB \ PASS_ALWAYS_WARN \ PORTTIME_CHECKS_ENAB \ QUOTAS_ENAB \ SU_WHEEL_ONLY \ SYSLOG_SG_ENAB \ SYSLOG_SU_ENAB \ USERGROUPS_ENAB \ nextgroup=logindefsBoolean skipwhite syn keyword logindefsBoolean contained yes no syn keyword logindefsEncryptKeyword contained \ ENCRYPT_METHOD \ nextgroup=logindefsEncryptMethod skipwhite syn keyword logindefsEncryptMethod contained \ DES \ MD5 \ SHA256 \ SHA512 syn keyword logindefsNumberKeyword contained \ ERASECHAR \ FAIL_DELAY \ GID_MAX \ GID_MIN \ KILLCHAR \ LOGIN_RETRIES \ LOGIN_TIMEOUT \ MAX_MEMBERS_PER_GROUP \ PASS_CHANGE_TRIES \ PASS_MAX_DAYS \ PASS_MIN_DAYS \ PASS_WARN_AGE \ PASS_MAX_LEN \ PASS_MIN_LEN \ SHA_CRYPT_MAX_ROUNDS \ SHA_CRYPT_MIN_ROUNDS \ SYS_GID_MAX \ SYS_GID_MIN \ SYS_UID_MAX \ SYS_UID_MIN \ UID_MAX \ UID_MIN \ ULIMIT \ UMASK \ nextgroup=@logindefsNumber skipwhite syn cluster logindefsNumber contains= \ logindefsDecimal, \ logindefsHex, \ logindefsOctal, \ logindefsOctalError syn match logindefsDecimal contained '\<\d\+\>' syn match logindefsHex contained display '\<0x\x\+\>' syn match logindefsOctal contained display '\<0\o\+\>' \ contains=logindefsOctalZero syn match logindefsOctalZero contained display '\<0' syn match logindefsOctalError contained display '\<0\o*[89]\d*\>' syn keyword logindefsPathKeyword contained \ ENVIRON_FILE \ FAKE_SHELL \ FTMP_FILE \ HUSHLOGIN_FILE \ ISSUE_FILE \ MAIL_DIR \ MAIL_FILE \ NOLOGINS_FILE \ SULOG_FILE \ TTYTYPE_FILE \ nextgroup=logindefsPath skipwhite syn match logindefsPath contained '[[:graph:]]\+' syn keyword logindefsPathsKeyword contained \ CONSOLE \ ENV_PATH \ ENV_SUPATH \ MOTD_FILE \ nextgroup=logindefsPaths skipwhite syn match logindefsPaths contained '[^:]\+' \ nextgroup=logindefsPathDelim syn match logindefsPathDelim contained ':' nextgroup=logindefsPaths syn keyword logindefsStringKeyword contained \ CHFN_RESTRICT \ CONSOLE_GROUPS \ ENV_HZ \ ENV_TZ \ LOGIN_STRING \ SU_NAME \ TTYGROUP \ TTYPERM \ USERDEL_CMD \ nextgroup=logindefsString skipwhite syn match logindefsString contained '[[:graph:]]\+' hi def link logindefsComment Comment hi def link logindefsTodo Todo hi def link logindefsKeyword Keyword hi def link logindefsBooleanKeyword logindefsKeyword hi def link logindefsEncryptKeyword logindefsKeyword hi def link logindefsNumberKeyword logindefsKeyword hi def link logindefsPathKeyword logindefsKeyword hi def link logindefsPathsKeyword logindefsKeyword hi def link logindefsStringKeyword logindefsKeyword hi def link logindefsBoolean Boolean hi def link logindefsEncryptMethod Type hi def link logindefsNumber Number hi def link logindefsDecimal logindefsNumber hi def link logindefsHex logindefsNumber hi def link logindefsOctal logindefsNumber hi def link logindefsOctalZero PreProc hi def link logindefsOctalError Error hi def link logindefsPath String hi def link logindefsPaths logindefsPath hi def link logindefsPathDelim Delimiter hi def link logindefsString String let b:current_syntax = "logindefs" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/logtalk.vim000066400000000000000000000372471320401574200202060ustar00rootroot00000000000000" Vim syntax file " " Language: Logtalk " Maintainer: Paulo Moura " Last Change: February 4, 2012 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Logtalk is case sensitive: syn case match " Logtalk variables syn match logtalkVariable "\<\(\u\|_\)\(\w\)*\>" " Logtalk clause functor syn match logtalkOperator ":-" " Logtalk quoted atoms and strings syn region logtalkString start=+"+ skip=+\\"+ end=+"+ syn region logtalkAtom start=+'+ skip=+\\'+ end=+'+ contains=logtalkEscapeSequence syn match logtalkEscapeSequence contained "\\\([\\abfnrtv\"\']\|\(x[a-fA-F0-9]\+\|[0-7]\+\)\\\)" " Logtalk message sending operators syn match logtalkOperator "::" syn match logtalkOperator ":" syn match logtalkOperator "\^\^" " Logtalk external call syn region logtalkExtCall matchgroup=logtalkExtCallTag start="{" matchgroup=logtalkExtCallTag end="}" contains=ALL " Logtalk opening entity directives syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- object(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom,logtalkEntityRel,logtalkLineComment syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- protocol(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel,logtalkLineComment syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- category(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel,logtalkLineComment " Logtalk closing entity directives syn match logtalkCloseEntityDir ":- end_object\." syn match logtalkCloseEntityDir ":- end_protocol\." syn match logtalkCloseEntityDir ":- end_category\." " Logtalk entity relations syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="instantiates(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="specializes(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="extends(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="imports(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="implements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="complements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained " Logtalk directives syn region logtalkDir matchgroup=logtalkDirTag start=":- if(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- elif(" matchgroup=logtalkDirTag end=")\." contains=ALL syn match logtalkDirTag ":- else\." syn match logtalkDirTag ":- endif\." syn region logtalkDir matchgroup=logtalkDirTag start=":- alias(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- coinductive(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL syn match logtalkDirTag ":- dynamic\." syn region logtalkDir matchgroup=logtalkDirTag start=":- discontiguous(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- multifile(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- public(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- protected(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- private(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_predicate(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_non_terminal(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- op(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- set_logtalk_flag(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- synchronized(" matchgroup=logtalkDirTag end=")\." contains=ALL syn match logtalkDirTag ":- synchronized\." syn region logtalkDir matchgroup=logtalkDirTag start=":- uses(" matchgroup=logtalkDirTag end=")\." contains=ALL syn match logtalkDirTag ":- threaded\." " Prolog directives syn region logtalkDir matchgroup=logtalkDirTag start=":- ensure_loaded(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- include(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- set_prolog_flag(" matchgroup=logtalkDirTag end=")\." contains=ALL " Module directives syn region logtalkDir matchgroup=logtalkDirTag start=":- module(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- export(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- reexport(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- use_module(" matchgroup=logtalkDirTag end=")\." contains=ALL " Logtalk built-in predicates syn match logtalkBuiltIn "\<\(abolish\|c\(reate\|urrent\)\)_\(object\|protocol\|category\)\ze(" syn match logtalkBuiltIn "\<\(object\|protocol\|category\)_property\ze(" syn match logtalkBuiltIn "\" syn match logtalkKeyword "\" syn match logtalkKeyword "\" syn match logtalkOperator "->" syn match logtalkKeyword "\" syn match logtalkOperator "@>=" " Term creation and decomposition syn match logtalkKeyword "\" " Arithemtic comparison syn match logtalkOperator "=:=" syn match logtalkOperator "=\\=" syn match logtalkOperator "<" syn match logtalkOperator "=<" syn match logtalkOperator ">" syn match logtalkOperator ">=" " Stream selection and control syn match logtalkKeyword "\<\(curren\|se\)t_\(in\|out\)put\ze(" syn match logtalkKeyword "\" syn match logtalkKeyword "\" syn match logtalkKeyword "\" " Term input/output syn match logtalkKeyword "\" " Atomic term processing syn match logtalkKeyword "\" " Sorting syn match logtalkKeyword "\<\(key\)\?sort\ze(" " Evaluable functors syn match logtalkOperator "+" syn match logtalkOperator "-" syn match logtalkOperator "\*" syn match logtalkOperator "//" syn match logtalkOperator "/" syn match logtalkKeyword "\" syn match logtalkKeyword "\" syn match logtalkKeyword "\" syn match logtalkKeyword "\" syn match logtalkKeyword "\>" syn match logtalkOperator "<<" syn match logtalkOperator "/\\" syn match logtalkOperator "\\/" syn match logtalkOperator "\\" " Logtalk list operator syn match logtalkOperator "|" " Logtalk existential quantifier operator syn match logtalkOperator "\^" " Logtalk numbers syn match logtalkNumber "\<\d\+\>" syn match logtalkNumber "\<\d\+\.\d\+\>" syn match logtalkNumber "\<\d\+[eE][-+]\=\d\+\>" syn match logtalkNumber "\<\d\+\.\d\+[eE][-+]\=\d\+\>" syn match logtalkNumber "\<0'.\|0''\|0'\"\>" syn match logtalkNumber "\<0b[0-1]\+\>" syn match logtalkNumber "\<0o\o\+\>" syn match logtalkNumber "\<0x\x\+\>" " Logtalk end-of-clause syn match logtalkOperator "\." " Logtalk comments syn region logtalkBlockComment start="/\*" end="\*/" fold syn match logtalkLineComment "%.*" syn cluster logtalkComment contains=logtalkBlockComment,logtalkLineComment " Logtalk conditional compilation folding syn region logtalkIfContainer transparent keepend extend start=":- if(" end=":- endif\." containedin=ALLBUT,@logtalkComment contains=NONE syn region logtalkIf transparent fold keepend start=":- if(" end=":- \(else\.\|elif(\)"ms=s-1,me=s-1 contained containedin=logtalkIfContainer nextgroup=logtalkElseIf,logtalkElse contains=TOP syn region logtalkElseIf transparent fold keepend start=":- elif(" end=":- \(else\.\|elif(\)"ms=s-1,me=s-1 contained containedin=logtalkIfContainer nextgroup=logtalkElseIf,logtalkElse contains=TOP syn region logtalkElse transparent fold keepend start=":- else\." end=":- endif\." contained containedin=logtalkIfContainer contains=TOP " Logtalk entity folding syn region logtalkEntity transparent fold keepend start=":- object(" end=":- end_object\." contains=ALL syn region logtalkEntity transparent fold keepend start=":- protocol(" end=":- end_protocol\." contains=ALL syn region logtalkEntity transparent fold keepend start=":- category(" end=":- end_category\." contains=ALL syn sync ccomment logtalkBlockComment maxlines=50 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link logtalkBlockComment Comment hi def link logtalkLineComment Comment hi def link logtalkOpenEntityDir Normal hi def link logtalkOpenEntityDirTag PreProc hi def link logtalkIfContainer PreProc hi def link logtalkIf PreProc hi def link logtalkElseIf PreProc hi def link logtalkElse PreProc hi def link logtalkEntity Normal hi def link logtalkEntityRel Normal hi def link logtalkEntityRelTag PreProc hi def link logtalkCloseEntityDir PreProc hi def link logtalkDir Normal hi def link logtalkDirTag PreProc hi def link logtalkAtom String hi def link logtalkString String hi def link logtalkEscapeSequence SpecialChar hi def link logtalkNumber Number hi def link logtalkKeyword Keyword hi def link logtalkBuiltIn Keyword hi def link logtalkBuiltInMethod Keyword hi def link logtalkOperator Operator hi def link logtalkExtCall Normal hi def link logtalkExtCallTag Operator hi def link logtalkVariable Identifier let b:current_syntax = "logtalk" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/lotos.vim000066400000000000000000000044711320401574200177020ustar00rootroot00000000000000" Vim syntax file " Language: LOTOS (Language Of Temporal Ordering Specifications, IS8807) " Maintainer: Daniel Amyot " Last Change: Wed Aug 19 1998 " URL: http://lotos.csi.uottawa.ca/~damyot/vim/lotos.vim " This file is an adaptation of pascal.vim by Mario Eusebio " I'm not sure I understand all of the syntax highlight language, " but this file seems to do the job for standard LOTOS. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore "Comments in LOTOS are between (* and *) syn region lotosComment start="(\*" end="\*)" contains=lotosTodo "Operators [], [...], >>, ->, |||, |[...]|, ||, ;, !, ?, :, =, ,, := syn match lotosDelimiter "[][]" syn match lotosDelimiter ">>" syn match lotosDelimiter "->" syn match lotosDelimiter "\[>" syn match lotosDelimiter "[|;!?:=,]" "Regular keywords syn keyword lotosStatement specification endspec process endproc syn keyword lotosStatement where behaviour behavior syn keyword lotosStatement any let par accept choice hide of in syn keyword lotosStatement i stop exit noexit "Operators from the Abstract Data Types in IS8807 syn keyword lotosOperator eq ne succ and or xor implies iff syn keyword lotosOperator not true false syn keyword lotosOperator Insert Remove IsIn NotIn Union Ints syn keyword lotosOperator Minus Includes IsSubsetOf syn keyword lotosOperator lt le ge gt 0 "Sorts in IS8807 syn keyword lotosSort Boolean Bool FBoolean FBool Element syn keyword lotosSort Set String NaturalNumber Nat HexString syn keyword lotosSort HexDigit DecString DecDigit syn keyword lotosSort OctString OctDigit BitString Bit syn keyword lotosSort Octet OctetString "Keywords for ADTs syn keyword lotosType type endtype library endlib sorts formalsorts syn keyword lotosType eqns formaleqns opns formalopns forall ofsort is syn keyword lotosType for renamedby actualizedby sortnames opnnames syn keyword lotosType using syn sync lines=250 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link lotosStatement Statement hi def link lotosProcess Label hi def link lotosOperator Operator hi def link lotosSort Function hi def link lotosType Type hi def link lotosComment Comment hi def link lotosDelimiter String let b:current_syntax = "lotos" " vim: ts=8 neovim-0.2.2/runtime/syntax/lout.vim000066400000000000000000000103451320401574200175220ustar00rootroot00000000000000" Vim syntax file " Language: Lout " Maintainer: Christian V. J. Brssow " Last Change: So 12 Feb 2012 15:15:03 CET " Filenames: *.lout,*.lt " URL: http://www.cvjb.de/comp/vim/lout.vim " $Id: lout.vim,v 1.4 2012/02/12 15:16:17 bruessow Exp $ " " Lout: Basser Lout document formatting system. " Many Thanks to... " " 2012-02-12: " Thilo Six send a patch for cpoptions. " See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save=&cpo set cpo&vim " Lout is case sensitive syn case match " Synchronization, I know it is a huge number, but normal texts can be " _very_ long ;-) syn sync lines=1000 " Characters allowed in keywords " I don't know if 128-255 are allowed in ANS-FORHT setlocal iskeyword=@,48-57,.,@-@,_,192-255 " Some special keywords syn keyword loutTodo contained TODO lout Lout LOUT syn keyword loutDefine def macro " Some big structures syn keyword loutKeyword @Begin @End @Figure @Tab syn keyword loutKeyword @Book @Doc @Document @Report syn keyword loutKeyword @Introduction @Abstract @Appendix syn keyword loutKeyword @Chapter @Section @BeginSections @EndSections " All kind of Lout keywords syn match loutFunction '\<@[^ \t{}]\+\>' " Braces -- Don`t edit these lines! syn match loutMBraces '[{}]' syn match loutIBraces '[{}]' syn match loutBBrace '[{}]' syn match loutBIBraces '[{}]' syn match loutHeads '[{}]' " Unmatched braces. syn match loutBraceError '}' " End of multi-line definitions, like @Document, @Report and @Book. syn match loutEOmlDef '^//$' " Grouping of parameters and objects. syn region loutObject transparent matchgroup=Delimiter start='{' matchgroup=Delimiter end='}' contains=ALLBUT,loutBraceError " The NULL object has a special meaning syn keyword loutNULL {} " Comments syn region loutComment start='\#' end='$' contains=loutTodo " Double quotes syn region loutSpecial start=+"+ skip=+\\\\\|\\"+ end=+"+ " ISO-LATIN-1 characters created with @Char, or Adobe symbols " created with @Sym syn match loutSymbols '@\(\(Char\)\|\(Sym\)\)\s\+[A-Za-z]\+' " Include files syn match loutInclude '@IncludeGraphic\s\+\k\+' syn region loutInclude start='@\(\(SysInclude\)\|\(IncludeGraphic\)\|\(Include\)\)\s*{' end='}' " Tags syn match loutTag '@\(\(Tag\)\|\(PageMark\)\|\(PageOf\)\|\(NumberOf\)\)\s\+\k\+' syn region loutTag start='@Tag\s*{' end='}' " Equations syn match loutMath '@Eq\s\+\k\+' syn region loutMath matchgroup=loutMBraces start='@Eq\s*{' matchgroup=loutMBraces end='}' contains=ALLBUT,loutBraceError " " Fonts syn match loutItalic '@I\s\+\k\+' syn region loutItalic matchgroup=loutIBraces start='@I\s*{' matchgroup=loutIBraces end='}' contains=ALLBUT,loutBraceError syn match loutBold '@B\s\+\k\+' syn region loutBold matchgroup=loutBBraces start='@B\s*{' matchgroup=loutBBraces end='}' contains=ALLBUT,loutBraceError syn match loutBoldItalic '@BI\s\+\k\+' syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=loutBIBraces end='}' contains=ALLBUT,loutBraceError syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overrriden later. hi def link loutTodo Todo hi def link loutDefine Define hi def link loutEOmlDef Define hi def link loutFunction Function hi def link loutBraceError Error hi def link loutNULL Special hi def link loutComment Comment hi def link loutSpecial Special hi def link loutSymbols Character hi def link loutInclude Include hi def link loutKeyword Keyword hi def link loutTag Tag hi def link loutMath Number hi def link loutMBraces loutMath hi loutItalic term=italic cterm=italic gui=italic hi def link loutIBraces loutItalic hi loutBold term=bold cterm=bold gui=bold hi def link loutBBraces loutBold hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic hi def link loutBIBraces loutBoldItalic hi loutHeadings term=bold cterm=bold guifg=indianred hi def link loutHeads loutHeadings let b:current_syntax = "lout" let &cpo=s:cpo_save unlet s:cpo_save " vim:ts=8:sw=4:nocindent:smartindent: neovim-0.2.2/runtime/syntax/lpc.vim000066400000000000000000000551421320401574200173210ustar00rootroot00000000000000" Vim syntax file " Language: LPC " Maintainer: Shizhu Pan " URL: http://poet.tomud.com/pub/lpc.vim.bz2 " Last Change: 2016 Aug 31 " Comments: If you are using Vim 6.2 or later, see :h lpc.vim for " file type recognizing, if not, you had to use modeline. " Nodule: This is the start nodule. {{{1 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Nodule: Keywords {{{1 " LPC keywords " keywords should always be highlighted so "contained" is not used. syn cluster lpcKeywdGrp contains=lpcConditional,lpcLabel,lpcOperator,lpcRepeat,lpcStatement,lpcModifier,lpcReserved syn keyword lpcConditional if else switch syn keyword lpcLabel case default syn keyword lpcOperator catch efun in inherit syn keyword lpcRepeat do for foreach while syn keyword lpcStatement break continue return syn match lpcEfunError /efun[^:]/ display " Illegal to use keyword as function " It's not working, maybe in the next version. syn keyword lpcKeywdError contained if for foreach return switch while " These are keywords only because they take lvalue or type as parameter, " so these keywords should only be used as function but cannot be names of " user-defined functions. syn keyword lpcKeywdFunc new parse_command sscanf time_expression " Nodule: Type and modifiers {{{1 " Type names list. " Special types syn keyword lpcType void mixed unknown " Scalar/Value types. syn keyword lpcType int float string " Pointer types. syn keyword lpcType array buffer class function mapping object " Other types. if exists("lpc_compat_32") syn keyword lpcType closure status funcall else syn keyword lpcError closure status syn keyword lpcType multiset endif " Type modifier. syn keyword lpcModifier nomask private public syn keyword lpcModifier varargs virtual " sensible modifiers if exists("lpc_pre_v22") syn keyword lpcReserved nosave protected ref syn keyword lpcModifier static else syn keyword lpcError static syn keyword lpcModifier nosave protected ref endif " Nodule: Applies {{{1 " Match a function declaration or function pointer syn match lpcApplyDecl excludenl /->\h\w*(/me=e-1 contains=lpcApplies transparent display " We should note that in func_spec.c the efun definition syntax is so " complicated that I use such a long regular expression to describe. syn match lpcLongDecl excludenl /\(\s\|\*\)\h\+\s\h\+(/me=e-1 contains=@lpcEfunGroup,lpcType,@lpcKeywdGrp transparent display " this is form for all functions " ->foo() form had been excluded syn match lpcFuncDecl excludenl /\h\w*(/me=e-1 contains=lpcApplies,@lpcEfunGroup,lpcKeywdError transparent display " The (: :) parenthesis or $() forms a function pointer syn match lpcFuncName /(:\s*\h\+\s*:)/me=e-1 contains=lpcApplies,@lpcEfunGroup transparent display contained syn match lpcFuncName /(:\s*\h\+,/ contains=lpcApplies,@lpcEfunGroup transparent display contained syn match lpcFuncName /\$(\h\+)/ contains=lpcApplies,@lpcEfunGroup transparent display contained " Applies list. " system applies syn keyword lpcApplies contained __INIT clean_up create destructor heart_beat id init move_or_destruct reset " interactive syn keyword lpcApplies contained catch_tell logon net_dead process_input receive_message receive_snoop telnet_suboption terminal_type window_size write_prompt " master applies syn keyword lpcApplies contained author_file compile_object connect crash creator_file domain_file epilog error_handler flag get_bb_uid get_root_uid get_save_file_name log_error make_path_absolute object_name preload privs_file retrieve_ed_setup save_ed_setup slow_shutdown syn keyword lpcApplies contained valid_asm valid_bind valid_compile_to_c valid_database valid_hide valid_link valid_object valid_override valid_read valid_save_binary valid_seteuid valid_shadow valid_socket valid_write " parsing syn keyword lpcApplies contained inventory_accessible inventory_visible is_living parse_command_adjectiv_id_list parse_command_adjective_id_list parse_command_all_word parse_command_id_list parse_command_plural_id_list parse_command_prepos_list parse_command_users parse_get_environment parse_get_first_inventory parse_get_next_inventory parser_error_message " Nodule: Efuns {{{1 syn cluster lpcEfunGroup contains=lpc_efuns,lpcOldEfuns,lpcNewEfuns,lpcKeywdFunc " Compat32 efuns if exists("lpc_compat_32") syn keyword lpc_efuns contained closurep heart_beat_info m_delete m_values m_indices query_once_interactive strstr else syn match lpcErrFunc /#`\h\w*/ " Shell compatible first line comment. syn region lpcCommentFunc start=/^#!/ end=/$/ endif " pre-v22 efuns which are removed in newer versions. syn keyword lpcOldEfuns contained tail dump_socket_status " new efuns after v22 should be added here! syn keyword lpcNewEfuns contained socket_status " LPC efuns list. " DEBUG efuns Not included. " New efuns should NOT be added to this list, see v22 efuns above. " Efuns list {{{2 syn keyword lpc_efuns contained acos add_action all_inventory all_previous_objects allocate allocate_buffer allocate_mapping apply arrayp asin atan author_stats syn keyword lpc_efuns contained bind break_string bufferp syn keyword lpc_efuns contained cache_stats call_other call_out call_out_info call_stack capitalize catch ceil check_memory children classp clear_bit clone_object clonep command commands copy cos cp crc32 crypt ctime syn keyword lpc_efuns contained db_close db_commit db_connect db_exec db_fetch db_rollback db_status debug_info debugmalloc debug_message deep_inherit_list deep_inventory destruct disable_commands disable_wizard domain_stats dumpallobj dump_file_descriptors dump_prog syn keyword lpc_efuns contained each ed ed_cmd ed_start enable_commands enable_wizard environment error errorp eval_cost evaluate exec exp explode export_uid external_start syn keyword lpc_efuns contained fetch_variable file_length file_name file_size filter filter_array filter_mapping find_call_out find_living find_object find_player first_inventory floatp floor flush_messages function_exists function_owner function_profile functionp functions syn keyword lpc_efuns contained generate_source get_char get_config get_dir geteuid getuid syn keyword lpc_efuns contained heart_beats syn keyword lpc_efuns contained id_matrix implode in_edit in_input inherit_list inherits input_to interactive intp syn keyword lpc_efuns contained keys syn keyword lpc_efuns contained link living livings load_object localtime log log10 lookat_rotate lower_case lpc_info syn keyword lpc_efuns contained malloc_check malloc_debug malloc_status map map_array map_delete map_mapping mapp master match_path max_eval_cost member_array memory_info memory_summary message mkdir moncontrol move_object mud_status syn keyword lpc_efuns contained named_livings network_stats next_bit next_inventory notify_fail nullp syn keyword lpc_efuns contained objectp objects oldcrypt opcprof origin syn keyword lpc_efuns contained parse_add_rule parse_add_synonym parse_command parse_dump parse_init parse_my_rules parse_refresh parse_remove parse_sentence pluralize pointerp pow present previous_object printf process_string process_value program_info syn keyword lpc_efuns contained query_ed_mode query_heart_beat query_host_name query_idle query_ip_name query_ip_number query_ip_port query_load_average query_notify_fail query_privs query_replaced_program query_shadowing query_snoop query_snooping query_verb syn keyword lpc_efuns contained random read_buffer read_bytes read_file receive reclaim_objects refs regexp reg_assoc reload_object remove_action remove_call_out remove_interactive remove_shadow rename repeat_string replace_program replace_string replaceable reset_eval_cost resolve restore_object restore_variable rm rmdir rotate_x rotate_y rotate_z rusage syn keyword lpc_efuns contained save_object save_variable say scale set_author set_bit set_eval_limit set_heart_beat set_hide set_light set_living_name set_malloc_mask set_privs set_reset set_this_player set_this_user seteuid shadow shallow_inherit_list shout shutdown sin sizeof snoop socket_accept socket_acquire socket_address socket_bind socket_close socket_connect socket_create socket_error socket_listen socket_release socket_write sort_array sprintf sqrt stat store_variable strcmp stringp strlen strsrch syn keyword lpc_efuns contained tan tell_object tell_room terminal_colour test_bit this_interactive this_object this_player this_user throw time to_float to_int trace traceprefix translate typeof syn keyword lpc_efuns contained undefinedp unique_array unique_mapping upper_case uptime userp users syn keyword lpc_efuns contained values variables virtualp syn keyword lpc_efuns contained wizardp write write_buffer write_bytes write_file " Nodule: Constants {{{1 " LPC Constants. " like keywords, constants are always highlighted, be careful to choose only " the constants we used to add to this list. syn keyword lpcConstant __ARCH__ __COMPILER__ __DIR__ __FILE__ __OPTIMIZATION__ __PORT__ __VERSION__ " Defines in options.h are all predefined in LPC sources surrounding by " two underscores. Do we need to include all of that? syn keyword lpcConstant __SAVE_EXTENSION__ __HEARTBEAT_INTERVAL__ " from the documentation we know that these constants remains only for " backward compatibility and should not be used any more. syn keyword lpcConstant HAS_ED HAS_PRINTF HAS_RUSAGE HAS_DEBUG_LEVEL syn keyword lpcConstant MUD_NAME F__THIS_OBJECT " Nodule: Todo for this file. {{{1 " TODO : need to check for LPC4 syntax and other series of LPC besides " v22, b21 and l32, if you had a good idea, contact me at poet@mudbuilder.net " and I will be appreciated about that. " Notes about some FAQ: " " About variables : We adopts the same behavior for C because almost all the " LPC programmers are also C programmers, so we don't need separate settings " for C and LPC. That is the reason why I don't change variables like " "c_no_utf"s to "lpc_no_utf"s. " " Copy : Some of the following seems to be copied from c.vim but not quite " the same in details because the syntax for C and LPC is different. " " Color scheme : this syntax file had been thouroughly tested to work well " for all of the dark-backgrounded color schemes Vim has provided officially, " and it should be quite Ok for all of the bright-backgrounded color schemes, " of course it works best for the color scheme that I am using, download it " from http://poet.tomud.com/pub/ps_color.vim.bz2 if you want to try it. " " Nodule: String and Character {{{1 " String and Character constants " Highlight special characters (those which have a backslash) differently syn match lpcSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" if !exists("c_no_utf") syn match lpcSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" endif " LPC version of sprintf() format, syn match lpcFormat display "%\(\d\+\)\=[-+ |=#@:.]*\(\d\+\)\=\('\I\+'\|'\I*\\'\I*'\)\=[OsdicoxXf]" contained syn match lpcFormat display "%%" contained syn region lpcString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lpcSpecial,lpcFormat " lpcCppString: same as lpcString, but ends at end of line syn region lpcCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=lpcSpecial,lpcFormat " LPC preprocessor for the text formatting short cuts " Thanks to Dr. Charles E. Campbell " he suggests the best way to do this. syn region lpcTextString start=/@\z(\h\w*\)$/ end=/^\z1/ contains=lpcSpecial syn region lpcArrayString start=/@@\z(\h\w*\)$/ end=/^\z1/ contains=lpcSpecial " Character syn match lpcCharacter "L\='[^\\]'" syn match lpcCharacter "L'[^']*'" contains=lpcSpecial syn match lpcSpecialError "L\='\\[^'\"?\\abefnrtv]'" syn match lpcSpecialCharacter "L\='\\['\"?\\abefnrtv]'" syn match lpcSpecialCharacter display "L\='\\\o\{1,3}'" syn match lpcSpecialCharacter display "'\\x\x\{1,2}'" syn match lpcSpecialCharacter display "L'\\x\x\+'" " Nodule: White space {{{1 " when wanted, highlight trailing white space if exists("c_space_errors") if !exists("c_no_trail_space_error") syn match lpcSpaceError display excludenl "\s\+$" endif if !exists("c_no_tab_space_error") syn match lpcSpaceError display " \+\t"me=e-1 endif endif " Nodule: Parenthesis and brackets {{{1 " catch errors caused by wrong parenthesis and brackets syn cluster lpcParenGroup contains=lpcParenError,lpcIncluded,lpcSpecial,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcUserCont,lpcUserLabel,lpcBitField,lpcCommentSkip,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom syn region lpcParen transparent start='(' end=')' contains=ALLBUT,@lpcParenGroup,lpcCppParen,lpcErrInBracket,lpcCppBracket,lpcCppString,@lpcEfunGroup,lpcApplies,lpcKeywdError " lpcCppParen: same as lpcParen but ends at end-of-line; used in lpcDefine syn region lpcCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@lpcParenGroup,lpcErrInBracket,lpcParen,lpcBracket,lpcString,@lpcEfunGroup,lpcApplies,lpcKeywdError syn match lpcParenError display ")" syn match lpcParenError display "\]" " for LPC: " Here we should consider the array ({ }) parenthesis and mapping ([ ]) " parenthesis and multiset (< >) parenthesis. syn match lpcErrInParen display contained "[^^]{"ms=s+1 syn match lpcErrInParen display contained "\(}\|\]\)[^)]"me=e-1 syn region lpcBracket transparent start='\[' end=']' contains=ALLBUT,@lpcParenGroup,lpcErrInParen,lpcCppParen,lpcCppBracket,lpcCppString,@lpcEfunGroup,lpcApplies,lpcFuncName,lpcKeywdError " lpcCppBracket: same as lpcParen but ends at end-of-line; used in lpcDefine syn region lpcCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@lpcParenGroup,lpcErrInParen,lpcParen,lpcBracket,lpcString,@lpcEfunGroup,lpcApplies,lpcFuncName,lpcKeywdError syn match lpcErrInBracket display contained "[);{}]" " Nodule: Numbers {{{1 " integer number, or floating point number without a dot and with "f". syn case ignore syn match lpcNumbers display transparent "\<\d\|\.\d" contains=lpcNumber,lpcFloat,lpcOctalError,lpcOctal " Same, but without octal error (for comments) syn match lpcNumbersCom display contained transparent "\<\d\|\.\d" contains=lpcNumber,lpcFloat,lpcOctal syn match lpcNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" " hex number syn match lpcNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" " Flag the first zero of an octal number as something special syn match lpcOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=lpcOctalZero syn match lpcOctalZero display contained "\<0" syn match lpcFloat display contained "\d\+f" " floating point number, with dot, optional exponent syn match lpcFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" " floating point number, starting with a dot, optional exponent syn match lpcFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" " floating point number, without dot, with exponent syn match lpcFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" " flag an octal number with wrong digits syn match lpcOctalError display contained "0\o*[89]\d*" syn case match " Nodule: Comment string {{{1 " lpcCommentGroup allows adding matches for special things in comments syn keyword lpcTodo contained TODO FIXME XXX syn cluster lpcCommentGroup contains=lpcTodo if exists("c_comment_strings") " A comment can contain lpcString, lpcCharacter and lpcNumber. syntax match lpcCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region lpcCommentString contained start=+L\=\\\@" skip="\\$" end="$" end="//"me=s-1 contains=lpcComment,lpcCppString,lpcCharacter,lpcCppParen,lpcParenError,lpcNumbers,lpcCommentError,lpcSpaceError syn match lpcPreCondit display "^\s*#\s*\(else\|endif\)\>" if !exists("c_no_if0") syn region lpcCppOut start="^\s*#\s*if\s\+0\+\>" end=".\|$" contains=lpcCppOut2 syn region lpcCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=lpcSpaceError,lpcCppSkip syn region lpcCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=lpcSpaceError,lpcCppSkip endif syn region lpcIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match lpcIncluded display contained "<[^>]*>" syn match lpcInclude display "^\s*#\s*include\>\s*["<]" contains=lpcIncluded syn match lpcLineSkip "\\$" syn cluster lpcPreProcGroup contains=lpcPreCondit,lpcIncluded,lpcInclude,lpcDefine,lpcErrInParen,lpcErrInBracket,lpcUserLabel,lpcSpecial,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom,lpcString,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcParen,lpcBracket,lpcMulti,lpcKeywdError syn region lpcDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@lpcPreProcGroup if exists("lpc_pre_v22") syn region lpcPreProc start="^\s*#\s*\(pragma\>\|echo\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@lpcPreProcGroup else syn region lpcPreProc start="^\s*#\s*\(pragma\>\|echo\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@lpcPreProcGroup endif " Nodule: User labels {{{1 " Highlight Labels " User labels in LPC is not allowed, only "case x" and "default" is supported syn cluster lpcMultiGroup contains=lpcIncluded,lpcSpecial,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcUserCont,lpcUserLabel,lpcBitField,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom,lpcCppParen,lpcCppBracket,lpcCppString,lpcKeywdError syn region lpcMulti transparent start='\(case\|default\|public\|protected\|private\)' skip='::' end=':' contains=ALLBUT,@lpcMultiGroup syn cluster lpcLabelGroup contains=lpcUserLabel syn match lpcUserCont display "^\s*lpc:$" contains=@lpcLabelGroup " Don't want to match anything syn match lpcUserLabel display "lpc" contained " Nodule: Initializations {{{1 if exists("c_minlines") let b:c_minlines = c_minlines else if !exists("c_no_if0") let b:c_minlines = 50 " #if 0 constructs can be long else let b:c_minlines = 15 " mostly for () constructs endif endif exec "syn sync ccomment lpcComment minlines=" . b:c_minlines " Make sure these options take place since we no longer depend on file type " plugin for C setlocal cindent setlocal fo-=t fo+=croql setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "LPC Source Files (*.c *.d *.h)\t*.c;*.d;*.h\n" . \ "LPC Data Files (*.scr *.o *.dat)\t*.scr;*.o;*.dat\n" . \ "Text Documentation (*.txt)\t*.txt\n" . \ "All Files (*.*)\t*.*\n" endif " Nodule: Highlight links {{{1 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link lpcModifier lpcStorageClass hi def link lpcQuotedFmt lpcFormat hi def link lpcFormat lpcSpecial hi def link lpcCppString lpcString " Cpp means " C Pre-Processor hi def link lpcCommentL lpcComment hi def link lpcCommentStart lpcComment hi def link lpcUserLabel lpcLabel hi def link lpcSpecialCharacter lpcSpecial hi def link lpcOctal lpcPreProc hi def link lpcOctalZero lpcSpecial " LPC will treat octal numbers " as decimals, programmers should " be aware of that. hi def link lpcEfunError lpcError hi def link lpcKeywdError lpcError hi def link lpcOctalError lpcError hi def link lpcParenError lpcError hi def link lpcErrInParen lpcError hi def link lpcErrInBracket lpcError hi def link lpcCommentError lpcError hi def link lpcCommentStartError lpcError hi def link lpcSpaceError lpcError hi def link lpcSpecialError lpcError hi def link lpcErrFunc lpcError if exists("lpc_pre_v22") hi def link lpcOldEfuns lpc_efuns hi def link lpcNewEfuns lpcError else hi def link lpcOldEfuns lpcReserved hi def link lpcNewEfuns lpc_efuns endif hi def link lpc_efuns lpcFunction hi def link lpcReserved lpcPreProc hi def link lpcTextString lpcString " This should be preprocessors, but hi def link lpcArrayString lpcPreProc " let's make some difference " between text and array hi def link lpcIncluded lpcString hi def link lpcCommentString lpcString hi def link lpcComment2String lpcString hi def link lpcCommentSkip lpcComment hi def link lpcCommentFunc lpcComment hi def link lpcCppSkip lpcCppOut hi def link lpcCppOut2 lpcCppOut hi def link lpcCppOut lpcComment " Standard type below hi def link lpcApplies Special hi def link lpcCharacter Character hi def link lpcComment Comment hi def link lpcConditional Conditional hi def link lpcConstant Constant hi def link lpcDefine Macro hi def link lpcError Error hi def link lpcFloat Float hi def link lpcFunction Function hi def link lpcIdentifier Identifier hi def link lpcInclude Include hi def link lpcLabel Label hi def link lpcNumber Number hi def link lpcOperator Operator hi def link lpcPreCondit PreCondit hi def link lpcPreProc PreProc hi def link lpcRepeat Repeat hi def link lpcStatement Statement hi def link lpcStorageClass StorageClass hi def link lpcString String hi def link lpcStructure Structure hi def link lpcSpecial LineNr hi def link lpcTodo Todo hi def link lpcType Type " Nodule: This is the end nodule. {{{1 let b:current_syntax = "lpc" let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8:nosta:sw=2:ai:si: " vim600:set fdm=marker: }}}1 neovim-0.2.2/runtime/syntax/lprolog.vim000066400000000000000000000076131320401574200202210ustar00rootroot00000000000000" Vim syntax file " Language: LambdaProlog (Teyjus) " Filenames: *.mod *.sig " Maintainer: Markus Mottl " URL: http://www.ocaml.info/vim/syntax/lprolog.vim " Last Change: 2006 Feb 05 " 2001 Apr 26 - Upgraded for new Vim version " 2000 Jun 5 - Initial release " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Lambda Prolog is case sensitive. syn case match syn match lprologBrackErr "\]" syn match lprologParenErr ")" syn cluster lprologContained contains=lprologTodo,lprologModuleName,lprologTypeNames,lprologTypeName " Enclosing delimiters syn region lprologEncl transparent matchgroup=lprologKeyword start="(" matchgroup=lprologKeyword end=")" contains=ALLBUT,@lprologContained,lprologParenErr syn region lprologEncl transparent matchgroup=lprologKeyword start="\[" matchgroup=lprologKeyword end="\]" contains=ALLBUT,@lprologContained,lprologBrackErr " General identifiers syn match lprologIdentifier "\<\(\w\|[-+*/\\^<>=`'~?@#$&!_]\)*\>" syn match lprologVariable "\<\(\u\|_\)\(\w\|[-+*/\\^<>=`'~?@#$&!]\)*\>" syn match lprologOperator "/" " Comments syn region lprologComment start="/\*" end="\*/" contains=lprologComment,lprologTodo syn region lprologComment start="%" end="$" contains=lprologTodo syn keyword lprologTodo contained TODO FIXME XXX syn match lprologInteger "\<\d\+\>" syn match lprologReal "\<\(\d\+\)\=\.\d+\>" syn region lprologString start=+"+ skip=+\\\\\|\\"+ end=+"+ " Clause definitions syn region lprologClause start="^\w\+" end=":-\|\." " Modules syn region lprologModule matchgroup=lprologKeyword start="^\" matchgroup=lprologKeyword end="\." " Types syn match lprologKeyword "^\" skipwhite nextgroup=lprologTypeNames syn region lprologTypeNames matchgroup=lprologBraceErr start="\<\w\+\>" matchgroup=lprologKeyword end="\." contained contains=lprologTypeName,lprologOperator syn match lprologTypeName "\<\w\+\>" contained " Keywords syn keyword lprologKeyword end import accumulate accum_sig syn keyword lprologKeyword local localkind closed sig syn keyword lprologKeyword kind exportdef useonly syn keyword lprologKeyword infixl infixr infix prefix syn keyword lprologKeyword prefixr postfix postfixl syn keyword lprologSpecial pi sigma is true fail halt stop not " Operators syn match lprologSpecial ":-" syn match lprologSpecial "->" syn match lprologSpecial "=>" syn match lprologSpecial "\\" syn match lprologSpecial "!" syn match lprologSpecial "," syn match lprologSpecial ";" syn match lprologSpecial "&" syn match lprologOperator "+" syn match lprologOperator "-" syn match lprologOperator "*" syn match lprologOperator "\~" syn match lprologOperator "\^" syn match lprologOperator "<" syn match lprologOperator ">" syn match lprologOperator "=<" syn match lprologOperator ">=" syn match lprologOperator "::" syn match lprologOperator "=" syn match lprologOperator "\." syn match lprologOperator ":" syn match lprologOperator "|" syn match lprologCommentErr "\*/" syn sync minlines=50 syn sync maxlines=500 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link lprologComment Comment hi def link lprologTodo Todo hi def link lprologKeyword Keyword hi def link lprologSpecial Special hi def link lprologOperator Operator hi def link lprologIdentifier Normal hi def link lprologInteger Number hi def link lprologReal Number hi def link lprologString String hi def link lprologCommentErr Error hi def link lprologBrackErr Error hi def link lprologParenErr Error hi def link lprologModuleName Special hi def link lprologTypeName Identifier hi def link lprologVariable Keyword hi def link lprologAtom Normal hi def link lprologClause Type let b:current_syntax = "lprolog" " vim: ts=8 neovim-0.2.2/runtime/syntax/lscript.vim000066400000000000000000000275031320401574200202230ustar00rootroot00000000000000" Vim syntax file " Language: LotusScript " Maintainer: Taryn East (taryneast@hotmail.com) " Last Change: 2003 May 11 " This is a rough amalgamation of the visual basic syntax file, and the UltraEdit " and Textpad syntax highlighters. " It's not too brilliant given that a) I've never written a syntax.vim file before " and b) I'm not so crash hot at LotusScript either. If you see any problems " feel free to email me with them. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " LotusScript is case insensitive syn case ignore " These are Notes thingies that had an equivalent in the vb highlighter " or I was already familiar with them syn keyword lscriptStatement ActivateApp As And Base Beep Call Case ChDir ChDrive Class syn keyword lscriptStatement Const Dim Declare DefCur DefDbl DefInt DefLng DefSng DefStr syn keyword lscriptStatement DefVar Do Else %Else ElseIf %ElseIf End %End Erase Event Exit syn keyword lscriptStatement Explicit FileCopy FALSE For ForAll Function Get GoTo GoSub syn keyword lscriptStatement If %If In Is Kill Let List Lock Loop MkDir syn keyword lscriptStatement Name Next New NoCase NoPitch Not Nothing NULL syn keyword lscriptStatement On Option Or PI Pitch Preserve Private Public syn keyword lscriptStatement Property Public Put syn keyword lscriptStatement Randomize ReDim Reset Resume Return RmDir syn keyword lscriptStatement Select SendKeys SetFileAttr Set Static Sub Then To TRUE syn keyword lscriptStatement Type Unlock Until While WEnd With Write XOr syn keyword lscriptDatatype Array Currency Double Integer Long Single String String$ Variant syn keyword lscriptNotesType Field Button Navigator syn keyword lscriptNotesType NotesACL NotesACLEntry NotesAgent NotesDatabase NotesDateRange syn keyword lscriptNotesType NotesDateTime NotesDbDirectory NotesDocument syn keyword lscriptNotesType NotesDocumentCollection NotesEmbeddedObject NotesForm syn keyword lscriptNotesType NotesInternational NotesItem NotesLog NotesName NotesNewsLetter syn keyword lscriptNotesType NotesMIMEEntry NotesOutline NotesOutlineEntry NotesRegistration syn keyword lscriptNotesType NotesReplication NotesRichTextItem NotesRichTextParagraphStyle syn keyword lscriptNotesType NotesRichTextStyle NotesRichTextTab syn keyword lscriptNotesType NotesSession NotesTimer NotesView NotesViewColumn NotesViewEntry syn keyword lscriptNotesType NotesViewEntryCollection NotesViewNavigator NotesUIDatabase syn keyword lscriptNotesType NotesUIDocument NotesUIView NotesUIWorkspace syn keyword lscriptNotesConst ACLLEVEL_AUTHOR ACLLEVEL_DEPOSITOR ACLLEVEL_DESIGNER syn keyword lscriptNotesConst ACLLEVEL_EDITOR ACLLEVEL_MANAGER ACLLEVEL_NOACCESS syn keyword lscriptNotesConst ACLLEVEL_READER ACLTYPE_MIXED_GROUP ACLTYPE_PERSON syn keyword lscriptNotesConst ACLTYPE_PERSON_GROUP ACLTYPE_SERVER ACLTYPE_SERVER_GROUP syn keyword lscriptNotesConst ACLTYPE_UNSPECIFIED ACTIONCD ALIGN_CENTER syn keyword lscriptNotesConst ALIGN_FULL ALIGN_LEFT ALIGN_NOWRAP ALIGN_RIGHT syn keyword lscriptNotesConst ASSISTANTINFO ATTACHMENT AUTHORS COLOR_BLACK syn keyword lscriptNotesConst COLOR_BLUE COLOR_CYAN COLOR_DARK_BLUE COLOR_DARK_CYAN syn keyword lscriptNotesConst COLOR_DARK_GREEN COLOR_DARK_MAGENTA COLOR_DARK_RED syn keyword lscriptNotesConst COLOR_DARK_YELLOW COLOR_GRAY COLOR_GREEN COLOR_LIGHT_GRAY syn keyword lscriptNotesConst COLOR_MAGENTA COLOR_RED COLOR_WHITE COLOR_YELLOW syn keyword lscriptNotesConst DATABASE DATETIMES DB_REPLICATION_PRIORITY_HIGH syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_LOW DB_REPLICATION_PRIORITY_MED syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_NOTSET EFFECTS_EMBOSS syn keyword lscriptNotesConst EFFECTS_EXTRUDE EFFECTS_NONE EFFECTS_SHADOW syn keyword lscriptNotesConst EFFECTS_SUBSCRIPT EFFECTS_SUPERSCRIPT EMBED_ATTACHMENT syn keyword lscriptNotesConst EMBED_OBJECT EMBED_OBJECTLINK EMBEDDEDOBJECT ERRORITEM syn keyword lscriptNotesConst EV_ALARM EV_COMM EV_MAIL EV_MISC EV_REPLICA EV_RESOURCE syn keyword lscriptNotesConst EV_SECURITY EV_SERVER EV_UNKNOWN EV_UPDATE FONT_COURIER syn keyword lscriptNotesConst FONT_HELV FONT_ROMAN FORMULA FT_DATABASE FT_DATE_ASC syn keyword lscriptNotesConst FT_DATE_DES FT_FILESYSTEM FT_FUZZY FT_SCORES FT_STEMS syn keyword lscriptNotesConst FT_THESAURUS HTML ICON ID_CERTIFIER ID_FLAT syn keyword lscriptNotesConst ID_HIERARCHICAL LSOBJECT MIME_PART NAMES NOTESLINKS syn keyword lscriptNotesConst NOTEREFS NOTES_DESKTOP_CLIENT NOTES_FULL_CLIENT syn keyword lscriptNotesConst NOTES_LIMITED_CLIENT NUMBERS OTHEROBJECT syn keyword lscriptNotesConst OUTLINE_CLASS_DATABASE OUTLINE_CLASS_DOCUMENT syn keyword lscriptNotesConst OUTLINE_CLASS_FOLDER OUTLINE_CLASS_FORM syn keyword lscriptNotesConst OUTLINE_CLASS_FRAMESET OUTLINE_CLASS_NAVIGATOR syn keyword lscriptNotesConst OUTLINE_CLASS_PAGE OUTLINE_CLASS_UNKNOWN syn keyword lscriptNotesConst OUTLINE_CLASS_VIEW OUTLINE_OTHER_FOLDERS_TYPE syn keyword lscriptNotesConst OUTLINE_OTHER_UNKNOWN_TYPE OUTLINE_OTHER_VIEWS_TYPE syn keyword lscriptNotesConst OUTLINE_TYPE_ACTION OUTLINE_TYPE_NAMEDELEMENT syn keyword lscriptNotesConst OUTLINE_TYPE_NOTELINK OUTLINE_TYPE_URL PAGINATE_BEFORE syn keyword lscriptNotesConst PAGINATE_DEFAULT PAGINATE_KEEP_TOGETHER syn keyword lscriptNotesConst PAGINATE_KEEP_WITH_NEXT PICKLIST_CUSTOM PICKLIST_NAMES syn keyword lscriptNotesConst PICKLIST_RESOURCES PICKLIST_ROOMS PROMPT_OK PROMPT_OKCANCELCOMBO syn keyword lscriptNotesConst PROMPT_OKCANCELEDIT PROMPT_OKCANCELEDITCOMBO PROMPT_OKCANCELLIST syn keyword lscriptNotesConst PROMPT_OKCANCELLISTMULT PROMPT_PASSWORD PROMPT_YESNO syn keyword lscriptNotesConst PROMPT_YESNOCANCEL QUERYCD READERS REPLICA_CANDIDATE syn keyword lscriptNotesConst RICHTEXT RULER_ONE_CENTIMETER RULER_ONE_INCH SEV_FAILURE syn keyword lscriptNotesConst SEV_FATAL SEV_NORMAL SEV_WARNING1 SEV_WARNING2 syn keyword lscriptNotesConst SIGNATURE SPACING_DOUBLE SPACING_ONE_POINT_50 syn keyword lscriptNotesConst SPACING_SINGLE STYLE_NO_CHANGE TAB_CENTER TAB_DECIMAL syn keyword lscriptNotesConst TAB_LEFT TAB_RIGHT TARGET_ALL_DOCS TARGET_ALL_DOCS_IN_VIEW syn keyword lscriptNotesConst TARGET_NEW_DOCS TARGET_NEW_OR_MODIFIED_DOCS TARGET_NONE syn keyword lscriptNotesConst TARGET_RUN_ONCE TARGET_SELECTED_DOCS TARGET_UNREAD_DOCS_IN_VIEW syn keyword lscriptNotesConst TEMPLATE TEMPLATE_CANDIDATE TEXT TRIGGER_AFTER_MAIL_DELIVERY syn keyword lscriptNotesConst TRIGGER_BEFORE_MAIL_DELIVERY TRIGGER_DOC_PASTED syn keyword lscriptNotesConst TRIGGER_DOC_UPDATE TRIGGER_MANUAL TRIGGER_NONE syn keyword lscriptNotesConst TRIGGER_SCHEDULED UNAVAILABLE UNKNOWN USERDATA syn keyword lscriptNotesConst USERID VC_ALIGN_CENTER VC_ALIGN_LEFT VC_ALIGN_RIGHT syn keyword lscriptNotesConst VC_ATTR_PARENS VC_ATTR_PUNCTUATED VC_ATTR_PERCENT syn keyword lscriptNotesConst VC_FMT_ALWAYS VC_FMT_CURRENCY VC_FMT_DATE VC_FMT_DATETIME syn keyword lscriptNotesConst VC_FMT_FIXED VC_FMT_GENERAL VC_FMT_HM VC_FMT_HMS syn keyword lscriptNotesConst VC_FMT_MD VC_FMT_NEVER VC_FMT_SCIENTIFIC syn keyword lscriptNotesConst VC_FMT_SOMETIMES VC_FMT_TIME VC_FMT_TODAYTIME VC_FMT_YM syn keyword lscriptNotesConst VC_FMT_YMD VC_FMT_Y4M VC_FONT_BOLD VC_FONT_ITALIC syn keyword lscriptNotesConst VC_FONT_STRIKEOUT VC_FONT_UNDERLINE VC_SEP_COMMA syn keyword lscriptNotesConst VC_SEP_NEWLINE VC_SEP_SEMICOLON VC_SEP_SPACE syn keyword lscriptNotesConst VIEWMAPDATA VIEWMAPLAYOUT VW_SPACING_DOUBLE syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_25 VW_SPACING_ONE_POINT_50 syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_75 VW_SPACING_SINGLE syn keyword lscriptFunction Abs Asc Atn Atn2 ACos ASin syn keyword lscriptFunction CCur CDat CDbl Chr Chr$ CInt CLng Command Command$ syn keyword lscriptFunction Cos CSng CStr syn keyword lscriptFunction CurDir CurDir$ CVar Date Date$ DateNumber DateSerial DateValue syn keyword lscriptFunction Day Dir Dir$ Environ$ Environ EOF Error Error$ Evaluate Exp syn keyword lscriptFunction FileAttr FileDateTime FileLen Fix Format Format$ FreeFile syn keyword lscriptFunction GetFileAttr GetThreadInfo Hex Hex$ Hour syn keyword lscriptFunction IMESetMode IMEStatus Input Input$ InputB InputB$ syn keyword lscriptFunction InputBP InputBP$ InputBox InputBox$ InStr InStrB InStrBP InstrC syn keyword lscriptFunction IsA IsArray IsDate IsElement IsList IsNumeric syn keyword lscriptFunction IsObject IsResponse IsScalar IsUnknown LCase LCase$ syn keyword lscriptFunction Left Left$ LeftB LeftB$ LeftC syn keyword lscriptFunction LeftBP LeftBP$ Len LenB LenBP LenC Loc LOF Log syn keyword lscriptFunction LSet LTrim LTrim$ MessageBox Mid Mid$ MidB MidB$ MidC syn keyword lscriptFunction Minute Month Now Oct Oct$ Responses Right Right$ syn keyword lscriptFunction RightB RightB$ RightBP RightBP$ RightC Round Rnd RSet RTrim RTrim$ syn keyword lscriptFunction Second Seek Sgn Shell Sin Sleep Space Space$ Spc Sqr Str Str$ syn keyword lscriptFunction StrConv StrLeft StrleftBack StrRight StrRightBack syn keyword lscriptFunction StrCompare Tab Tan Time Time$ TimeNumber Timer syn keyword lscriptFunction TimeValue Trim Trim$ Today TypeName UCase UCase$ syn keyword lscriptFunction UniversalID Val Weekday Year syn keyword lscriptMethods AppendToTextList ArrayAppend ArrayReplace ArrayGetIndex syn keyword lscriptMethods Append Bind Close "syn keyword lscriptMethods Contains syn keyword lscriptMethods CopyToDatabase CopyAllItems Count CurrentDatabase Delete Execute syn keyword lscriptMethods GetAllDocumentsByKey GetDatabase GetDocumentByKey syn keyword lscriptMethods GetDocumentByUNID GetFirstDocument GetFirstItem syn keyword lscriptMethods GetItems GetItemValue GetNthDocument GetView syn keyword lscriptMethods IsEmpty IsNull %Include Items syn keyword lscriptMethods Line LBound LoadMsgText Open Print syn keyword lscriptMethods RaiseEvent ReplaceItemValue Remove RemoveItem Responses syn keyword lscriptMethods Save Stop UBound UnprocessedDocuments Write syn keyword lscriptEvents Compare OnError "************************************************************************************* "These are Notes thingies that I'm not sure how to classify as they had no vb equivalent " At a wild guess I'd put them as Functions... " if anyone sees something really out of place... tell me! syn keyword lscriptFunction Access Alias Any Bin Bin$ Binary ByVal syn keyword lscriptFunction CodeLock CodeLockCheck CodeUnlock CreateLock syn keyword lscriptFunction CurDrive CurDrive$ DataType DestroyLock Eqv syn keyword lscriptFunction Erl Err Fraction From FromFunction FullTrim syn keyword lscriptFunction Imp Int Lib Like ListTag LMBCS LSServer Me syn keyword lscriptFunction Mod MsgDescription MsgText Output Published syn keyword lscriptFunction Random Read Shared Step UChr UChr$ Uni Unicode syn keyword lscriptFunction Until Use UseLSX UString UString$ Width Yield syn keyword lscriptTodo contained TODO "integer number, or floating point number without a dot. syn match lscriptNumber "\<\d\+\>" "floating point number, with dot syn match lscriptNumber "\<\d\+\.\d*\>" "floating point number, starting with a dot syn match lscriptNumber "\.\d\+\>" " String and Character constants syn region lscriptString start=+"+ end=+"+ syn region lscriptComment start="REM" end="$" contains=lscriptTodo syn region lscriptComment start="'" end="$" contains=lscriptTodo syn region lscriptLineNumber start="^\d" end="\s" syn match lscriptTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi lscriptNotesType term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold hi def link lscriptNotesConst lscriptNotesType hi def link lscriptLineNumber Comment hi def link lscriptDatatype Type hi def link lscriptNumber Number hi def link lscriptError Error hi def link lscriptStatement Statement hi def link lscriptString String hi def link lscriptComment Comment hi def link lscriptTodo Todo hi def link lscriptFunction Identifier hi def link lscriptMethods PreProc hi def link lscriptEvents Special hi def link lscriptTypeSpecifier Type let b:current_syntax = "lscript" " vim: ts=8 neovim-0.2.2/runtime/syntax/lsl.vim000066400000000000000000000366701320401574200173420ustar00rootroot00000000000000" Vim syntax file " Language: Linden Scripting Language " Maintainer: Timo Frenay " Last Change: 2012 Apr 30 " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:keepcpo= &cpo set cpo&vim " Initializations syn case match " Keywords syn keyword lslKeyword default do else for if jump return state while " Types syn keyword lslType float integer key list quaternion rotation string vector " Labels syn match lslLabel +@\h\w*+ display " Constants syn keyword lslConstant \ ACTIVE AGENT AGENT_ALWAYS_RUN AGENT_ATTACHMENTS AGENT_AWAY AGENT_BUSY \ AGENT_CROUCHING AGENT_FLYING AGENT_IN_AIR AGENT_MOUSELOOK AGENT_ON_OBJECT \ AGENT_SCRIPTED AGENT_SITTING AGENT_TYPING AGENT_WALKING ALL_SIDES ANIM_ON \ ATTACH_BACK ATTACH_BELLY ATTACH_CHEST ATTACH_CHIN ATTACH_HEAD \ ATTACH_HUD_BOTTOM ATTACH_HUD_BOTTOM_LEFT ATTACH_HUD_BOTTOM_RIGHT \ ATTACH_HUD_CENTER_1 ATTACH_HUD_CENTER_2 ATTACH_HUD_TOP_CENTER \ ATTACH_HUD_TOP_LEFT ATTACH_HUD_TOP_RIGHT ATTACH_LEAR ATTACH_LEYE ATTACH_LFOOT \ ATTACH_LHAND ATTACH_LHIP ATTACH_LLARM ATTACH_LLLEG ATTACH_LPEC \ ATTACH_LSHOULDER ATTACH_LUARM ATTACH_LULEG ATTACH_MOUTH ATTACH_NOSE \ ATTACH_PELVIS ATTACH_REAR ATTACH_REYE ATTACH_RFOOT ATTACH_RHAND ATTACH_RHIP \ ATTACH_RLARM ATTACH_RLLEG ATTACH_RPEC ATTACH_RSHOULDER ATTACH_RUARM \ ATTACH_RULEG CAMERA_ACTIVE CAMERA_BEHINDNESS_ANGLE CAMERA_BEHINDNESS_LAG \ CAMERA_DISTANCE CAMERA_FOCUS CAMERA_FOCUS_LAG CAMERA_FOCUS_LOCKED \ CAMERA_FOCUS_OFFSET CAMERA_FOCUS_THRESHOLD CAMERA_PITCH CAMERA_POSITION \ CAMERA_POSITION_LAG CAMERA_POSITION_LOCKED CAMERA_POSITION_THRESHOLD \ CHANGED_ALLOWED_DROP CHANGED_COLOR CHANGED_INVENTORY CHANGED_LINK \ CHANGED_OWNER CHANGED_REGION CHANGED_SCALE CHANGED_SHAPE CHANGED_TELEPORT \ CHANGED_TEXTURE CLICK_ACTION_BUY CLICK_ACTION_NONE CLICK_ACTION_OPEN \ CLICK_ACTION_OPEN_MEDIA CLICK_ACTION_PAY CLICK_ACTION_PLAY CLICK_ACTION_SIT \ CLICK_ACTION_TOUCH CONTROL_BACK CONTROL_DOWN CONTROL_FWD CONTROL_LBUTTON \ CONTROL_LEFT CONTROL_ML_LBUTTON CONTROL_RIGHT CONTROL_ROT_LEFT \ CONTROL_ROT_RIGHT CONTROL_UP DATA_BORN DATA_NAME DATA_ONLINE DATA_PAYINFO \ DATA_RATING DATA_SIM_POS DATA_SIM_RATING DATA_SIM_STATUS DEBUG_CHANNEL \ DEG_TO_RAD EOF FALSE HTTP_BODY_MAXLENGTH HTTP_BODY_TRUNCATED HTTP_METHOD \ HTTP_MIMETYPE HTTP_VERIFY_CERT INVENTORY_ALL INVENTORY_ANIMATION \ INVENTORY_BODYPART INVENTORY_CLOTHING INVENTORY_GESTURE INVENTORY_LANDMARK \ INVENTORY_NONE INVENTORY_NOTECARD INVENTORY_OBJECT INVENTORY_SCRIPT \ INVENTORY_SOUND INVENTORY_TEXTURE LAND_LARGE_BRUSH LAND_LEVEL LAND_LOWER \ LAND_MEDIUM_BRUSH LAND_NOISE LAND_RAISE LAND_REVERT LAND_SMALL_BRUSH \ LAND_SMOOTH LINK_ALL_CHILDREN LINK_ALL_OTHERS LINK_ROOT LINK_SET LINK_THIS \ LIST_STAT_GEOMETRIC_MEAN LIST_STAT_MAX LIST_STAT_MEAN LIST_STAT_MEDIAN \ LIST_STAT_MIN LIST_STAT_NUM_COUNT LIST_STAT_RANGE LIST_STAT_STD_DEV \ LIST_STAT_SUM LIST_STAT_SUM_SQUARES LOOP MASK_BASE MASK_EVERYONE MASK_GROUP \ MASK_NEXT MASK_OWNER NULL_KEY OBJECT_CREATOR OBJECT_DESC OBJECT_GROUP \ OBJECT_NAME OBJECT_OWNER OBJECT_POS OBJECT_ROT OBJECT_UNKNOWN_DETAIL \ OBJECT_VELOCITY PARCEL_COUNT_GROUP PARCEL_COUNT_OTHER PARCEL_COUNT_OWNER \ PARCEL_COUNT_SELECTED PARCEL_COUNT_TEMP PARCEL_COUNT_TOTAL PARCEL_DETAILS_AREA \ PARCEL_DETAILS_DESC PARCEL_DETAILS_GROUP PARCEL_DETAILS_NAME \ PARCEL_DETAILS_OWNER PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY \ PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS PARCEL_FLAG_ALLOW_CREATE_OBJECTS \ PARCEL_FLAG_ALLOW_DAMAGE PARCEL_FLAG_ALLOW_FLY \ PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY PARCEL_FLAG_ALLOW_GROUP_SCRIPTS \ PARCEL_FLAG_ALLOW_LANDMARK PARCEL_FLAG_ALLOW_SCRIPTS \ PARCEL_FLAG_ALLOW_TERRAFORM PARCEL_FLAG_LOCAL_SOUND_ONLY \ PARCEL_FLAG_RESTRICT_PUSHOBJECT PARCEL_FLAG_USE_ACCESS_GROUP \ PARCEL_FLAG_USE_ACCESS_LIST PARCEL_FLAG_USE_BAN_LIST \ PARCEL_FLAG_USE_LAND_PASS_LIST PARCEL_MEDIA_COMMAND_AGENT \ PARCEL_MEDIA_COMMAND_AUTO_ALIGN PARCEL_MEDIA_COMMAND_DESC \ PARCEL_MEDIA_COMMAND_LOOP PARCEL_MEDIA_COMMAND_LOOP_SET \ PARCEL_MEDIA_COMMAND_PAUSE PARCEL_MEDIA_COMMAND_PLAY PARCEL_MEDIA_COMMAND_SIZE \ PARCEL_MEDIA_COMMAND_STOP PARCEL_MEDIA_COMMAND_TEXTURE \ PARCEL_MEDIA_COMMAND_TIME PARCEL_MEDIA_COMMAND_TYPE \ PARCEL_MEDIA_COMMAND_UNLOAD PARCEL_MEDIA_COMMAND_URL PASSIVE \ PAYMENT_INFO_ON_FILE PAYMENT_INFO_USED PAY_DEFAULT PAY_HIDE PERM_ALL PERM_COPY \ PERM_MODIFY PERM_MOVE PERM_TRANSFER PERMISSION_ATTACH PERMISSION_CHANGE_LINKS \ PERMISSION_CONTROL_CAMERA PERMISSION_DEBIT PERMISSION_TAKE_CONTROLS \ PERMISSION_TRACK_CAMERA PERMISSION_TRIGGER_ANIMATION PI PI_BY_TWO PING_PONG \ PRIM_BUMP_BARK PRIM_BUMP_BLOBS PRIM_BUMP_BRICKS PRIM_BUMP_BRIGHT \ PRIM_BUMP_CHECKER PRIM_BUMP_CONCRETE PRIM_BUMP_DARK PRIM_BUMP_DISKS \ PRIM_BUMP_GRAVEL PRIM_BUMP_LARGETILE PRIM_BUMP_NONE PRIM_BUMP_SHINY \ PRIM_BUMP_SIDING PRIM_BUMP_STONE PRIM_BUMP_STUCCO PRIM_BUMP_SUCTION \ PRIM_BUMP_TILE PRIM_BUMP_WEAVE PRIM_BUMP_WOOD PRIM_CAST_SHADOWS PRIM_COLOR \ PRIM_FLEXIBLE PRIM_FULLBRIGHT PRIM_HOLE_CIRCLE PRIM_HOLE_DEFAULT \ PRIM_HOLE_SQUARE PRIM_HOLE_TRIANGLE PRIM_MATERIAL PRIM_MATERIAL_FLESH \ PRIM_MATERIAL_GLASS PRIM_MATERIAL_LIGHT PRIM_MATERIAL_METAL \ PRIM_MATERIAL_PLASTIC PRIM_MATERIAL_RUBBER PRIM_MATERIAL_STONE \ PRIM_MATERIAL_WOOD PRIM_PHANTOM PRIM_PHYSICS PRIM_POINT_LIGHT PRIM_POSITION \ PRIM_ROTATION PRIM_SCULPT_TYPE_CYLINDER PRIM_SCULPT_TYPE_PLANE \ PRIM_SCULPT_TYPE_SPHERE PRIM_SCULPT_TYPE_TORUS PRIM_SHINY_HIGH PRIM_SHINY_LOW \ PRIM_SHINY_MEDIUM PRIM_SHINY_NONE PRIM_SIZE PRIM_TEMP_ON_REZ PRIM_TEXGEN \ PRIM_TEXGEN_DEFAULT PRIM_TEXGEN_PLANAR PRIM_TEXTURE PRIM_TYPE PRIM_TYPE_BOX \ PRIM_TYPE_BOX PRIM_TYPE_CYLINDER PRIM_TYPE_CYLINDER PRIM_TYPE_LEGACY \ PRIM_TYPE_PRISM PRIM_TYPE_PRISM PRIM_TYPE_RING PRIM_TYPE_SCULPT \ PRIM_TYPE_SPHERE PRIM_TYPE_SPHERE PRIM_TYPE_TORUS PRIM_TYPE_TORUS \ PRIM_TYPE_TUBE PRIM_TYPE_TUBE PSYS_PART_BEAM_MASK PSYS_PART_BOUNCE_MASK \ PSYS_PART_DEAD_MASK PSYS_PART_EMISSIVE_MASK PSYS_PART_END_ALPHA \ PSYS_PART_END_COLOR PSYS_PART_END_SCALE PSYS_PART_FLAGS \ PSYS_PART_FOLLOW_SRC_MASK PSYS_PART_FOLLOW_VELOCITY_MASK \ PSYS_PART_INTERP_COLOR_MASK PSYS_PART_INTERP_SCALE_MASK PSYS_PART_MAX_AGE \ PSYS_PART_RANDOM_ACCEL_MASK PSYS_PART_RANDOM_VEL_MASK PSYS_PART_START_ALPHA \ PSYS_PART_START_COLOR PSYS_PART_START_SCALE PSYS_PART_TARGET_LINEAR_MASK \ PSYS_PART_TARGET_POS_MASK PSYS_PART_TRAIL_MASK PSYS_PART_WIND_MASK \ PSYS_SRC_ACCEL PSYS_SRC_ANGLE_BEGIN PSYS_SRC_ANGLE_END \ PSYS_SRC_BURST_PART_COUNT PSYS_SRC_BURST_RADIUS PSYS_SRC_BURST_RATE \ PSYS_SRC_BURST_SPEED_MAX PSYS_SRC_BURST_SPEED_MIN PSYS_SRC_INNERANGLE \ PSYS_SRC_MAX_AGE PSYS_SRC_OMEGA PSYS_SRC_OUTERANGLE PSYS_SRC_PATTERN \ PSYS_SRC_PATTERN_ANGLE PSYS_SRC_PATTERN_ANGLE_CONE \ PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY PSYS_SRC_PATTERN_DROP \ PSYS_SRC_PATTERN_EXPLODE PSYS_SRC_TARGET_KEY PSYS_SRC_TEXTURE PUBLIC_CHANNEL \ RAD_TO_DEG REGION_FLAG_ALLOW_DAMAGE REGION_FLAG_ALLOW_DIRECT_TELEPORT \ REGION_FLAG_BLOCK_FLY REGION_FLAG_BLOCK_TERRAFORM \ REGION_FLAG_DISABLE_COLLISIONS REGION_FLAG_DISABLE_PHYSICS \ REGION_FLAG_FIXED_SUN REGION_FLAG_RESTRICT_PUSHOBJECT REGION_FLAG_SANDBOX \ REMOTE_DATA_CHANNEL REMOTE_DATA_REPLY REMOTE_DATA_REQUEST REVERSE ROTATE SCALE \ SCRIPTED SMOOTH SQRT2 STATUS_BLOCK_GRAB STATUS_CAST_SHADOWS STATUS_DIE_AT_EDGE \ STATUS_PHANTOM STATUS_PHYSICS STATUS_RETURN_AT_EDGE STATUS_ROTATE_X \ STATUS_ROTATE_Y STATUS_ROTATE_Z STATUS_SANDBOX STRING_TRIM STRING_TRIM_HEAD \ STRING_TRIM_TAIL TRUE TWO_PI TYPE_FLOAT TYPE_INTEGER TYPE_INVALID TYPE_KEY \ TYPE_ROTATION TYPE_STRING TYPE_VECTOR VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY \ VEHICLE_ANGULAR_DEFLECTION_TIMESCALE VEHICLE_ANGULAR_FRICTION_TIMESCALE \ VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE VEHICLE_ANGULAR_MOTOR_DIRECTION \ VEHICLE_ANGULAR_MOTOR_TIMESCALE VEHICLE_BANKING_EFFICIENCY VEHICLE_BANKING_MIX \ VEHICLE_BANKING_TIMESCALE VEHICLE_BUOYANCY VEHICLE_FLAG_CAMERA_DECOUPLED \ VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT VEHICLE_FLAG_HOVER_TERRAIN_ONLY \ VEHICLE_FLAG_HOVER_UP_ONLY VEHICLE_FLAG_HOVER_WATER_ONLY \ VEHICLE_FLAG_LIMIT_MOTOR_UP VEHICLE_FLAG_LIMIT_ROLL_ONLY \ VEHICLE_FLAG_MOUSELOOK_BANK VEHICLE_FLAG_MOUSELOOK_STEER \ VEHICLE_FLAG_NO_DEFLECTION_UP VEHICLE_HOVER_EFFICIENCY VEHICLE_HOVER_HEIGHT \ VEHICLE_HOVER_TIMESCALE VEHICLE_LINEAR_DEFLECTION_EFFICIENCY \ VEHICLE_LINEAR_DEFLECTION_TIMESCALE VEHICLE_LINEAR_FRICTION_TIMESCALE \ VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE VEHICLE_LINEAR_MOTOR_TIMESCALE \ VEHICLE_LINEAR_MOTOR_DIRECTION VEHICLE_LINEAR_MOTOR_OFFSET \ VEHICLE_REFERENCE_FRAME VEHICLE_TYPE_AIRPLANE VEHICLE_TYPE_BALLOON \ VEHICLE_TYPE_BOAT VEHICLE_TYPE_CAR VEHICLE_TYPE_NONE VEHICLE_TYPE_SLED \ VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY VEHICLE_VERTICAL_ATTRACTION_TIMESCALE \ ZERO_ROTATION ZERO_VECTOR " Events syn keyword lslEvent \ attach at_rot_target at_target changed collision collision_end collision_start \ control dataserver email http_response land_collision land_collision_end \ land_collision_start link_message listen money moving_end moving_start \ not_at_rot_target no_sensor object_rez on_rez remote_data run_time_permissions \ sensor state_entry state_exit timer touch touch_end touch_start not_at_target " Functions syn keyword lslFunction \ llAbs llAcos llAddToLandBanList llAddToLandPassList llAdjustSoundVolume \ llAllowInventoryDrop llAngleBetween llApplyImpulse llApplyRotationalImpulse \ llAsin llAtan2 llAttachToAvatar llAvatarOnSitTarget llAxes2Rot llAxisAngle2Rot \ llBase64ToInteger llBase64ToString llBreakAllLinks llBreakLink llCSV2List \ llCeil llClearCameraParams llCloseRemoteDataChannel llCloud llCollisionFilter \ llCollisionSound llCollisionSprite llCos llCreateLink llDeleteSubList \ llDeleteSubString llDetachFromAvatar llDetectedGrab llDetectedGroup \ llDetectedKey llDetectedLinkNumber llDetectedName llDetectedOwner \ llDetectedPos llDetectedRot llDetectedType llDetectedVel llDialog llDie \ llDumpList2String llEdgeOfWorld llEjectFromLand llEmail llEscapeURL \ llEuler2Rot llFabs llFloor llForceMouselook llFrand llGetAccel llGetAgentInfo \ llGetAgentSize llGetAlpha llGetAndResetTime llGetAnimation llGetAnimationList \ llGetAttached llGetBoundingBox llGetCameraPos llGetCameraRot llGetCenterOfMass \ llGetColor llGetCreator llGetDate llGetEnergy llGetForce llGetFreeMemory \ llGetGMTclock llGetGeometricCenter llGetInventoryCreator llGetInventoryKey \ llGetInventoryName llGetInventoryNumber llGetInventoryPermMask \ llGetInventoryType llGetKey llGetLandOwnerAt llGetLinkKey llGetLinkName \ llGetLinkNumber llGetListEntryType llGetListLength llGetLocalPos llGetLocalRot \ llGetMass llGetNextEmail llGetNotecardLine llGetNumberOfNotecardLines \ llGetNumberOfPrims llGetNumberOfSides llGetObjectDesc llGetObjectDetails \ llGetObjectMass llGetObjectName llGetObjectPermMask llGetObjectPrimCount \ llGetOmega llGetOwner llGetOwnerKey llGetParcelDetails llGetParcelFlags \ llGetParcelMaxPrims llGetParcelPrimCount llGetParcelPrimOwners \ llGetPermissions llGetPermissionsKey llGetPos llGetPrimitiveParams \ llGetRegionCorner llGetRegionFPS llGetRegionFlags llGetRegionName \ llGetRegionTimeDilation llGetRootPosition llGetRootRotation llGetRot \ llGetScale llGetScriptName llGetScriptState llGetSimulatorHostname \ llGetStartParameter llGetStatus llGetSubString llGetSunDirection llGetTexture \ llGetTextureOffset llGetTextureRot llGetTextureScale llGetTime llGetTimeOfDay \ llGetTimestamp llGetTorque llGetUnixTime llGetVel llGetWallclock \ llGiveInventory llGiveInventoryList llGiveMoney llGodLikeRezObject llGround \ llGroundContour llGroundNormal llGroundRepel llGroundSlope llHTTPRequest \ llInsertString llInstantMessage llIntegerToBase64 llKey2Name llList2CSV \ llList2Float llList2Integer llList2Key llList2List llList2ListStrided \ llList2Rot llList2String llList2Vector llListFindList llListInsertList \ llListRandomize llListReplaceList llListSort llListStatistics llListen \ llListenControl llListenRemove llLoadURL llLog llLog10 llLookAt llLoopSound \ llLoopSoundMaster llLoopSoundSlave llMD5String llMakeExplosion llMakeFire \ llMakeFountain llMakeSmoke llMapDestination llMessageLinked llMinEventDelay \ llModPow llModifyLand llMoveToTarget llOffsetTexture llOpenRemoteDataChannel \ llOverMyLand llOwnerSay llParcelMediaCommandList llParcelMediaQuery \ llParseString2List llParseStringKeepNulls llParticleSystem llPassCollisions \ llPassTouches llPlaySound llPlaySoundSlave llPointAt llPow llPreloadSound \ llPushObject llRefreshPrimURL llRegionSay llReleaseCamera llReleaseControls \ llRemoteDataReply llRemoteDataSetRegion llRemoteLoadScript \ llRemoteLoadScriptPin llRemoveFromLandBanList llRemoveFromLandPassList \ llRemoveInventory llRemoveVehicleFlags llRequestAgentData \ llRequestInventoryData llRequestPermissions llRequestSimulatorData \ llResetLandBanList llResetLandPassList llResetOtherScript llResetScript \ llResetTime llRezAtRoot llRezObject llRot2Angle llRot2Axis llRot2Euler \ llRot2Fwd llRot2Left llRot2Up llRotBetween llRotLookAt llRotTarget \ llRotTargetRemove llRotateTexture llRound llSameGroup llSay llScaleTexture \ llScriptDanger llSendRemoteData llSensor llSensorRemove llSensorRepeat \ llSetAlpha llSetBuoyancy llSetCameraAtOffset llSetCameraEyeOffset \ llSetCameraParams llSetClickAction llSetColor llSetDamage llSetForce \ llSetForceAndTorque llSetHoverHeight llSetInventoryPermMask llSetLinkAlpha \ llSetLinkColor llSetLinkPrimitiveParams llSetLinkTexture llSetLocalRot \ llSetObjectDesc llSetObjectName llSetObjectPermMask llSetParcelMusicURL \ llSetPayPrice llSetPos llSetPrimURL llSetPrimitiveParams \ llSetRemoteScriptAccessPin llSetRot llSetScale llSetScriptState llSetSitText \ llSetSoundQueueing llSetSoundRadius llSetStatus llSetText llSetTexture \ llSetTextureAnim llSetTimerEvent llSetTorque llSetTouchText llSetVehicleFlags \ llSetVehicleFloatParam llSetVehicleRotationParam llSetVehicleType \ llSetVehicleVectorParam llShout llSin llSitTarget llSleep llSound \ llSoundPreload llSqrt llStartAnimation llStopAnimation llStopHover \ llStopLookAt llStopMoveToTarget llStopPointAt llStopSound llStringLength \ llStringToBase64 llStringTrim llSubStringIndex llTakeCamera llTakeControls \ llTan llTarget llTargetOmega llTargetRemove llTeleportAgentHome llToLower \ llToUpper llTriggerSound llTriggerSoundLimited llUnSit llUnescapeURL llVecDist \ llVecMag llVecNorm llVolumeDetect llWater llWhisper llWind llXorBase64Strings \ llXorBase64StringsCorrect " Operators syn match lslOperator +[-!%&*+/<=>^|~]+ display " Numbers syn match lslNumber +-\=\%(\<\d\+\|\%(\<\d\+\)\=\.\d\+\)\%([Ee][-+]\=\d\+\)\=\>\|\<0x\x\+\>+ display " Vectors and rotations syn match lslVectorRot +<[-\t +.0-9A-Za-z_]\+\%(,[-\t +.0-9A-Za-z_]\+\)\{2,3}>+ contains=lslNumber display " Vector and rotation properties syn match lslProperty +\.\@<=[sxyz]\>+ display " Strings syn region lslString start=+"+ skip=+\\.+ end=+"+ contains=lslSpecialChar,@Spell syn match lslSpecialChar +\\.+ contained display " Keys syn match lslKey +"\x\{8}-\x\{4}-\x\{4}-\x\{4}-\x\{12}"+ display " Parentheses, braces and brackets syn match lslBlock +[][(){}]+ display " Typecast operators syn match lslTypecast +(\%(float\|integer\|key\|list\|quaternion\|rotation\|string\|vector\))+ contains=lslType display " Comments syn match lslComment +//.*+ contains=@Spell " Define the default highlighting. hi def link lslKeyword Keyword hi def link lslType Type hi def link lslLabel Label hi def link lslConstant Constant hi def link lslEvent PreProc hi def link lslFunction Function hi def link lslOperator Operator hi def link lslNumber Number hi def link lslVectorRot Special hi def link lslProperty Identifier hi def link lslString String hi def link lslSpecialChar SpecialChar hi def link lslKey Special hi def link lslBlock Special hi def link lslTypecast Operator hi def link lslComment Comment let b:current_syntax = "lsl" let &cpo = s:keepcpo unlet s:keepcpo " vim: ts=8 neovim-0.2.2/runtime/syntax/lss.vim000066400000000000000000000114061320401574200173370ustar00rootroot00000000000000" Vim syntax file " Language: Lynx 2.7.1 style file " Maintainer: Scott Bigham " Last Change: 2004 Oct 06 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " This setup is probably atypical for a syntax highlighting file, because " most of it is not really intended to be overrideable. Instead, the " highlighting is supposed to correspond to the highlighting specified by " the .lss file entries themselves; ie. the "bold" keyword should be bold, " the "red" keyword should be red, and so forth. The exceptions to this " are comments, of course, and the initial keyword identifying the affected " element, which will inherit the usual Identifier highlighting. syn match lssElement "^[^:]\+" nextgroup=lssMono syn match lssMono ":[^:]\+" contained nextgroup=lssFgColor contains=lssReverse,lssUnderline,lssBold,lssStandout syn keyword lssBold bold contained syn keyword lssReverse reverse contained syn keyword lssUnderline underline contained syn keyword lssStandout standout contained syn match lssFgColor ":[^:]\+" contained nextgroup=lssBgColor contains=lssRedFg,lssBlueFg,lssGreenFg,lssBrownFg,lssMagentaFg,lssCyanFg,lssLightgrayFg,lssGrayFg,lssBrightredFg,lssBrightgreenFg,lssYellowFg,lssBrightblueFg,lssBrightmagentaFg,lssBrightcyanFg syn case ignore syn keyword lssRedFg red contained syn keyword lssBlueFg blue contained syn keyword lssGreenFg green contained syn keyword lssBrownFg brown contained syn keyword lssMagentaFg magenta contained syn keyword lssCyanFg cyan contained syn keyword lssLightgrayFg lightgray contained syn keyword lssGrayFg gray contained syn keyword lssBrightredFg brightred contained syn keyword lssBrightgreenFg brightgreen contained syn keyword lssYellowFg yellow contained syn keyword lssBrightblueFg brightblue contained syn keyword lssBrightmagentaFg brightmagenta contained syn keyword lssBrightcyanFg brightcyan contained syn case match syn match lssBgColor ":[^:]\+" contained contains=lssRedBg,lssBlueBg,lssGreenBg,lssBrownBg,lssMagentaBg,lssCyanBg,lssLightgrayBg,lssGrayBg,lssBrightredBg,lssBrightgreenBg,lssYellowBg,lssBrightblueBg,lssBrightmagentaBg,lssBrightcyanBg,lssWhiteBg syn case ignore syn keyword lssRedBg red contained syn keyword lssBlueBg blue contained syn keyword lssGreenBg green contained syn keyword lssBrownBg brown contained syn keyword lssMagentaBg magenta contained syn keyword lssCyanBg cyan contained syn keyword lssLightgrayBg lightgray contained syn keyword lssGrayBg gray contained syn keyword lssBrightredBg brightred contained syn keyword lssBrightgreenBg brightgreen contained syn keyword lssYellowBg yellow contained syn keyword lssBrightblueBg brightblue contained syn keyword lssBrightmagentaBg brightmagenta contained syn keyword lssBrightcyanBg brightcyan contained syn keyword lssWhiteBg white contained syn case match syn match lssComment "#.*$" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link lssComment Comment hi def link lssElement Identifier hi def lssBold term=bold cterm=bold hi def lssReverse term=reverse cterm=reverse hi def lssUnderline term=underline cterm=underline hi def lssStandout term=standout cterm=standout hi def lssRedFg ctermfg=red hi def lssBlueFg ctermfg=blue hi def lssGreenFg ctermfg=green hi def lssBrownFg ctermfg=brown hi def lssMagentaFg ctermfg=magenta hi def lssCyanFg ctermfg=cyan hi def lssGrayFg ctermfg=gray if $COLORTERM == "rxvt" " On rxvt's, bright colors are activated by setting the bold attribute. hi def lssLightgrayFg ctermfg=gray cterm=bold hi def lssBrightredFg ctermfg=red cterm=bold hi def lssBrightgreenFg ctermfg=green cterm=bold hi def lssYellowFg ctermfg=yellow cterm=bold hi def lssBrightblueFg ctermfg=blue cterm=bold hi def lssBrightmagentaFg ctermfg=magenta cterm=bold hi def lssBrightcyanFg ctermfg=cyan cterm=bold else hi def lssLightgrayFg ctermfg=lightgray hi def lssBrightredFg ctermfg=lightred hi def lssBrightgreenFg ctermfg=lightgreen hi def lssYellowFg ctermfg=yellow hi def lssBrightblueFg ctermfg=lightblue hi def lssBrightmagentaFg ctermfg=lightmagenta hi def lssBrightcyanFg ctermfg=lightcyan endif hi def lssRedBg ctermbg=red hi def lssBlueBg ctermbg=blue hi def lssGreenBg ctermbg=green hi def lssBrownBg ctermbg=brown hi def lssMagentaBg ctermbg=magenta hi def lssCyanBg ctermbg=cyan hi def lssLightgrayBg ctermbg=lightgray hi def lssGrayBg ctermbg=gray hi def lssBrightredBg ctermbg=lightred hi def lssBrightgreenBg ctermbg=lightgreen hi def lssYellowBg ctermbg=yellow hi def lssBrightblueBg ctermbg=lightblue hi def lssBrightmagentaBg ctermbg=lightmagenta hi def lssBrightcyanBg ctermbg=lightcyan hi def lssWhiteBg ctermbg=white ctermfg=black let b:current_syntax = "lss" " vim: ts=8 neovim-0.2.2/runtime/syntax/lua.vim000066400000000000000000000333441320401574200173240ustar00rootroot00000000000000" Vim syntax file " Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2 " Maintainer: Marcus Aurelius Farias " First Author: Carlos Augusto Teixeira Mendes " Last Change: 2012 Aug 12 " Options: lua_version = 4 or 5 " lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2) " default 5.2 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim if !exists("lua_version") " Default is lua 5.2 let lua_version = 5 let lua_subversion = 2 elseif !exists("lua_subversion") " lua_version exists, but lua_subversion doesn't. So, set it to 0 let lua_subversion = 0 endif syn case match " syncing method syn sync minlines=100 " Comments syn keyword luaTodo contained TODO FIXME XXX syn match luaComment "--.*$" contains=luaTodo,@Spell if lua_version == 5 && lua_subversion == 0 syn region luaComment matchgroup=luaComment start="--\[\[" end="\]\]" contains=luaTodo,luaInnerComment,@Spell syn region luaInnerComment contained transparent start="\[\[" end="\]\]" elseif lua_version > 5 || (lua_version == 5 && lua_subversion >= 1) " Comments in Lua 5.1: --[[ ... ]], [=[ ... ]=], [===[ ... ]===], etc. syn region luaComment matchgroup=luaComment start="--\[\z(=*\)\[" end="\]\z1\]" contains=luaTodo,@Spell endif " First line may start with #! syn match luaComment "\%^#!.*" " catch errors caused by wrong parenthesis and wrong curly brackets or " keywords placed outside their respective blocks syn region luaParen transparent start='(' end=')' contains=ALLBUT,luaParenError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=ALLBUT,luaBraceError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement syn match luaParenError ")" syn match luaBraceError "}" syn match luaError "\<\%(end\|else\|elseif\|then\|until\|in\)\>" " function ... end syn region luaFunctionBlock transparent matchgroup=luaFunction start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn " if ... then syn region luaIfThen transparent matchgroup=luaCond start="\" end="\"me=e-4 contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaIn nextgroup=luaThenEnd skipwhite skipempty " then ... end syn region luaThenEnd contained transparent matchgroup=luaCond start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaThenEnd,luaIn " elseif ... then syn region luaElseifThen contained transparent matchgroup=luaCond start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn " else syn keyword luaElse contained else " do ... end syn region luaBlock transparent matchgroup=luaStatement start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn " repeat ... until syn region luaLoopBlock transparent matchgroup=luaRepeat start="\" end="\" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn " while ... do syn region luaLoopBlock transparent matchgroup=luaRepeat start="\" end="\"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaIn nextgroup=luaBlock skipwhite skipempty " for ... do and for ... in ... do syn region luaLoopBlock transparent matchgroup=luaRepeat start="\" end="\"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd nextgroup=luaBlock skipwhite skipempty syn keyword luaIn contained in " other keywords syn keyword luaStatement return local break if lua_version > 5 || (lua_version == 5 && lua_subversion >= 2) syn keyword luaStatement goto syn match luaLabel "::\I\i*::" endif syn keyword luaOperator and or not syn keyword luaConstant nil if lua_version > 4 syn keyword luaConstant true false endif " Strings if lua_version < 5 syn match luaSpecial contained "\\[\\abfnrtv\'\"]\|\\[[:digit:]]\{,3}" elseif lua_version == 5 if lua_subversion == 0 syn match luaSpecial contained #\\[\\abfnrtv'"[\]]\|\\[[:digit:]]\{,3}# syn region luaString2 matchgroup=luaString start=+\[\[+ end=+\]\]+ contains=luaString2,@Spell else if lua_subversion == 1 syn match luaSpecial contained #\\[\\abfnrtv'"]\|\\[[:digit:]]\{,3}# else " Lua 5.2 syn match luaSpecial contained #\\[\\abfnrtvz'"]\|\\x[[:xdigit:]]\{2}\|\\[[:digit:]]\{,3}# endif syn region luaString2 matchgroup=luaString start="\[\z(=*\)\[" end="\]\z1\]" contains=@Spell endif endif syn region luaString start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=luaSpecial,@Spell syn region luaString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=luaSpecial,@Spell " integer number syn match luaNumber "\<\d\+\>" " floating point number, with dot, optional exponent syn match luaNumber "\<\d\+\.\d*\%([eE][-+]\=\d\+\)\=\>" " floating point number, starting with a dot, optional exponent syn match luaNumber "\.\d\+\%([eE][-+]\=\d\+\)\=\>" " floating point number, without dot, with exponent syn match luaNumber "\<\d\+[eE][-+]\=\d\+\>" " hex numbers if lua_version >= 5 if lua_subversion == 1 syn match luaNumber "\<0[xX]\x\+\>" elseif lua_subversion >= 2 syn match luaNumber "\<0[xX][[:xdigit:].]\+\%([pP][-+]\=\d\+\)\=\>" endif endif syn keyword luaFunc assert collectgarbage dofile error next syn keyword luaFunc print rawget rawset tonumber tostring type _VERSION if lua_version == 4 syn keyword luaFunc _ALERT _ERRORMESSAGE gcinfo syn keyword luaFunc call copytagmethods dostring syn keyword luaFunc foreach foreachi getglobal getn syn keyword luaFunc gettagmethod globals newtag syn keyword luaFunc setglobal settag settagmethod sort syn keyword luaFunc tag tinsert tremove syn keyword luaFunc _INPUT _OUTPUT _STDIN _STDOUT _STDERR syn keyword luaFunc openfile closefile flush seek syn keyword luaFunc setlocale execute remove rename tmpname syn keyword luaFunc getenv date clock exit syn keyword luaFunc readfrom writeto appendto read write syn keyword luaFunc PI abs sin cos tan asin syn keyword luaFunc acos atan atan2 ceil floor syn keyword luaFunc mod frexp ldexp sqrt min max log syn keyword luaFunc log10 exp deg rad random syn keyword luaFunc randomseed strlen strsub strlower strupper syn keyword luaFunc strchar strrep ascii strbyte syn keyword luaFunc format strfind gsub syn keyword luaFunc getinfo getlocal setlocal setcallhook setlinehook elseif lua_version == 5 syn keyword luaFunc getmetatable setmetatable syn keyword luaFunc ipairs pairs syn keyword luaFunc pcall xpcall syn keyword luaFunc _G loadfile rawequal require if lua_subversion == 0 syn keyword luaFunc getfenv setfenv syn keyword luaFunc loadstring unpack syn keyword luaFunc gcinfo loadlib LUA_PATH _LOADED _REQUIREDNAME else syn keyword luaFunc load select syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ if lua_subversion == 1 syn keyword luaFunc getfenv setfenv syn keyword luaFunc loadstring module unpack syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ elseif lua_subversion == 2 syn keyword luaFunc _ENV rawlen syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ endif syn match luaFunc /\/ endif syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ if lua_subversion == 0 syn match luaFunc /\/ else syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ endif if lua_subversion == 0 syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ elseif lua_subversion == 1 syn match luaFunc /\/ elseif lua_subversion == 2 syn match luaFunc /\/ syn match luaFunc /\/ endif syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ if lua_subversion == 0 syn match luaFunc /\/ syn match luaFunc /\/ else if lua_subversion == 1 syn match luaFunc /\/ endif syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ endif syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ if lua_subversion == 1 syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ elseif lua_subversion == 2 syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ syn match luaFunc /\/ endif endif " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link luaStatement Statement hi def link luaRepeat Repeat hi def link luaFor Repeat hi def link luaString String hi def link luaString2 String hi def link luaNumber Number hi def link luaOperator Operator hi def link luaIn Operator hi def link luaConstant Constant hi def link luaCond Conditional hi def link luaElse Conditional hi def link luaFunction Function hi def link luaComment Comment hi def link luaTodo Todo hi def link luaTable Structure hi def link luaError Error hi def link luaParenError Error hi def link luaBraceError Error hi def link luaSpecial SpecialChar hi def link luaFunc Identifier hi def link luaLabel Label let b:current_syntax = "lua" let &cpo = s:cpo_save unlet s:cpo_save " vim: et ts=8 sw=2 neovim-0.2.2/runtime/syntax/lynx.vim000066400000000000000000000146631320401574200175400ustar00rootroot00000000000000" Vim syntax file " Language: Lynx configuration file (lynx.cfg) " Maintainer: Doug Kearns " Last Change: 2013 Jun 20 " Lynx 2.8.7 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match lynxStart "^" transparent skipwhite nextgroup=lynxOption syn match lynxComment "\(^\|\s\+\)#.*$" contains=lynxTodo syn keyword lynxTodo TODO NOTE FIXME XXX contained syn match lynxDelimiter ":" skipwhite nextgroup=lynxBoolean,lynxNumber,lynxNone,lynxRCOption syn case ignore syn keyword lynxBoolean TRUE FALSE ON OFF contained syn keyword lynxNone NONE contained syn case match syn match lynxNumber "-\=\<\d\+\>" contained "{{{ Options syn case ignore syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS ALWAYS_RESUBMIT_POSTS \ ALWAYS_TRUSTED_EXEC ANONFTP_PASSWORD ASSUMED_COLOR \ ASSUMED_DOC_CHARSET_CHOICE ASSUME_CHARSET ASSUME_LOCAL_CHARSET \ ASSUME_UNREC_CHARSET AUTO_SESSION AUTO_UNCACHE_DIRLISTS BAD_HTML \ BIBP_BIBHOST BIBP_GLOBAL_SERVER BLOCK_MULTI_BOOKMARKS BOLD_H1 \ BOLD_HEADERS BOLD_NAME_ANCHORS BOOKMARK_FILE BROKEN_FTP_EPSV \ BROKEN_FTP_RETR BZIP2_PATH CASE_SENSITIVE_ALWAYS_ON \ CASE_SENSITIVE_SEARCHING CHARACTER_SET CHARSETS_DIRECTORY \ CHARSET_SWITCH_RULES CHECKMAIL CHMOD_PATH COLLAPSE_BR_TAGS COLOR \ COLOR_STYLE COMPRESS_PATH CONNECT_TIMEOUT COOKIE_ACCEPT_DOMAINS \ COOKIE_FILE COOKIE_LOOSE_INVALID_DOMAINS \ COOKIE_QUERY_INVALID_DOMAINS COOKIE_REJECT_DOMAINS COOKIE_SAVE_FILE \ COOKIE_STRICT_INVALID_DOMAINS COPY_PATH CSO_PROXY CSWING_PATH \ DEBUGSECS DEFAULT_BOOKMARK_FILE DEFAULT_CACHE_SIZE DEFAULT_COLORS \ DEFAULT_EDITOR DEFAULT_INDEX_FILE DEFAULT_KEYPAD_MODE \ DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS DEFAULT_USER_MODE \ DEFAULT_VIRTUAL_MEMORY_SIZE DELAYSECS DIRED_MENU DIR_LIST_ORDER \ DIR_LIST_STYLE DISPLAY DISPLAY_CHARSET_CHOICE DOWNLOADER EMACS_KEYS \ EMACS_KEYS_ALWAYS_ON ENABLE_LYNXRC ENABLE_SCROLLBACK EXTERNAL \ FILE_EDITOR FILE_SORTING_METHOD FINGER_PROXY FOCUS_WINDOW \ FORCE_8BIT_TOUPPER FORCE_COOKIE_PROMPT FORCE_EMPTY_HREFLESS_A \ FORCE_SSL_COOKIES_SECURE FORCE_SSL_PROMPT FORMS_OPTIONS FTP_FORMAT \ FTP_PASSIVE FTP_PROXY GLOBAL_EXTENSION_MAP GLOBAL_MAILCAP \ GOPHER_PROXY GOTOBUFFER GZIP_PATH HELPFILE HIDDEN_LINK_MARKER \ HISTORICAL_COMMENTS HTMLSRC_ATTRNAME_XFORM HTMLSRC_TAGNAME_XFORM \ HTTPS_PROXY HTTP_PROXY INCLUDE INFLATE_PATH INFOSECS INSTALL_PATH \ JUMPBUFFER JUMPFILE JUMP_PROMPT JUSTIFY JUSTIFY_MAX_VOID_PERCENT \ KBLAYOUT KEYBOARD_LAYOUT KEYMAP KEYPAD_MODE \ LEFTARROW_IN_TEXTFIELD_PROMPT LINEEDIT_MODE LIST_FORMAT \ LIST_NEWS_DATES LIST_NEWS_NUMBERS LOCALE_CHARSET LOCALHOST_ALIAS \ LOCAL_DOMAIN LOCAL_EXECUTION_LINKS_ALWAYS_ON \ LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE LYNXCGI_DOCUMENT_ROOT \ LYNXCGI_ENVIRONMENT LYNX_HOST_NAME LYNX_SIG_FILE MAIL_ADRS \ MAIL_SYSTEM_ERROR_LOGGING MAKE_LINKS_FOR_ALL_IMAGES \ MAKE_PSEUDO_ALTS_FOR_INLINES MAX_COOKIES_BUFFER MAX_COOKIES_DOMAIN \ MAX_COOKIES_GLOBAL MESSAGESECS MINIMAL_COMMENTS MKDIR_PATH \ MULTI_BOOKMARK MULTI_BOOKMARK_SUPPORT MV_PATH NCR_IN_BOOKMARKS \ NESTED_TABLES NEWSPOST_PROXY NEWSREPLY_PROXY NEWS_CHUNK_SIZE \ NEWS_MAX_CHUNK NEWS_POSTING NEWS_PROXY NNTPSERVER NNTP_PROXY \ NONRESTARTING_SIGWINCH NO_DOT_FILES NO_FILE_REFERER \ NO_FORCED_CORE_DUMP NO_FROM_HEADER NO_ISMAP_IF_USEMAP NO_MARGINS \ NO_PAUSE NO_PROXY NO_REFERER_HEADER NO_TABLE_CENTER NO_TITLE \ NUMBER_FIELDS_ON_LEFT NUMBER_LINKS_ON_LEFT OUTGOING_MAIL_CHARSET \ PARTIAL PARTIAL_THRES PERSISTENT_COOKIES PERSONAL_EXTENSION_MAP \ PERSONAL_MAILCAP PERSONAL_MAIL_ADDRESS POSITIONABLE_EDITOR \ PREFERRED_CHARSET PREFERRED_ENCODING PREFERRED_LANGUAGE \ PREFERRED_MEDIA_TYPES PREPEND_BASE_TO_SOURCE \ PREPEND_CHARSET_TO_SOURCE PRETTYSRC PRETTYSRC_SPEC \ PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING PRINTER QUIT_DEFAULT_YES RAW_MODE \ READ_TIMEOUT REFERER_WITH_QUERY REPLAYSECS REUSE_TEMPFILES \ RLOGIN_PATH RM_PATH RMDIR_PATH RULE RULESFILE \ RUN_ALL_EXECUTION_LINKS RUN_EXECUTION_LINKS_LOCAL SAVE_SPACE \ SCAN_FOR_BURIED_NEWS_REFS SCREEN_SIZE SCROLLBAR SCROLLBAR_ARROW \ SEEK_FRAG_AREA_IN_CUR SEEK_FRAG_MAP_IN_CUR SELECT_POPUPS \ SEND_USERAGENT SESSION_FILE SESSION_LIMIT SET_COOKIES SETFONT_PATH \ SHOW_COLOR SHOW_CURSOR SHOW_DOTFILES SHOW_KB_NAME SHOW_KB_RATE \ SNEWSPOST_PROXY SNEWSREPLY_PROXY SNEWS_PROXY SOFT_DQUOTES \ SOURCE_CACHE SOURCE_CACHE_FOR_ABORTED SSL_CERT_FILE STARTFILE \ STATUS_BUFFER_SIZE STRIP_DOTDOT_URLS SUBSTITUTE_UNDERSCORES \ SUB_BOOKMARKS SUFFIX SUFFIX_ORDER SYSLOG_REQUESTED_URLS SYSLOG_TEXT \ SYSTEM_EDITOR SYSTEM_MAIL SYSTEM_MAIL_FLAGS TAGSOUP TAR_PATH \ TELNET_PATH TEXTFIELDS_NEED_ACTIVATION TIMEOUT TN3270_PATH \ TOUCH_PATH TRIM_INPUT_FIELDS TRUSTED_EXEC TRUSTED_LYNXCGI \ UNCOMPRESS_PATH UNDERLINE_LINKS UNZIP_PATH UPLOADER \ URL_DOMAIN_PREFIXES URL_DOMAIN_SUFFIXES USERAGENT USER_MODE \ USE_FIXED_RECORDS USE_MOUSE USE_SELECT_POPUPS UUDECODE_PATH \ VERBOSE_IMAGES VIEWER VISITED_LINKS VI_KEYS VI_KEYS_ALWAYS_ON \ WAIS_PROXY XHTML_PARSING XLOADIMAGE_COMMAND ZCAT_PATH ZIP_PATH \ contained nextgroup=lynxDelimiter syn keyword lynxRCOption accept_all_cookies assume_charset auto_session \ bookmark_file case_sensitive_searching character_set \ cookie_accept_domains cookie_file cookie_loose_invalid_domains \ cookie_query_invalid_domains cookie_reject_domains \ cookie_strict_invalid_domains dir_list_style display emacs_keys \ file_editor file_sorting_method force_cookie_prompt force_ssl_prompt \ ftp_passive kblayout keypad_mode lineedit_mode locale_charset \ make_links_for_all_images make_pseudo_alts_for_inlines \ multi_bookmark no_pause personal_mail_address preferred_charset \ preferred_encoding preferred_language preferred_media_types raw_mode \ run_all_execution_links run_execution_links_on_local_files scrollbar \ select_popups send_useragent session_file set_cookies show_color \ show_cursor show_dotfiles show_kb_rate sub_bookmarks tagsoup \ underline_links user_mode useragent verbose_images vi_keys \ visited_links \ contained nextgroup=lynxDelimiter syn case match " }}} " cfg2html.pl formatting directives syn match lynxFormatDir "^\.h\d\s.*$" syn match lynxFormatDir "^\.\(ex\|nf\)\(\s\+\d\+\)\=$" syn match lynxFormatDir "^\.fi$" hi def link lynxBoolean Boolean hi def link lynxComment Comment hi def link lynxDelimiter Special hi def link lynxFormatDir Special hi def link lynxNone Constant hi def link lynxNumber Number hi def link lynxOption Identifier hi def link lynxRCOption lynxOption hi def link lynxTodo Todo let b:current_syntax = "lynx" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 fdm=marker: neovim-0.2.2/runtime/syntax/m4.vim000066400000000000000000000052051320401574200170560ustar00rootroot00000000000000" Vim syntax file " Language: M4 " Maintainer: Claudio Fleiner (claudio@fleiner.com) " URL: http://www.fleiner.com/vim/syntax/m4.vim " Last Change: 2005 Jan 15 " This file will highlight user function calls if they use only " capital letters and have at least one argument (i.e. the '(' " must be there). Let me know if this is a problem. " quit when a syntax file was already loaded if !exists("main_syntax") if exists("b:current_syntax") finish endif " we define it here so that included files can test for it let main_syntax='m4' endif " define the m4 syntax syn match m4Variable contained "\$\d\+" syn match m4Special contained "$[@*#]" syn match m4Comment "\<\(m4_\)\=dnl\>.*" contains=SpellErrors syn match m4Constants "\<\(m4_\)\=__file__" syn match m4Constants "\<\(m4_\)\=__line__" syn keyword m4Constants divnum sysval m4_divnum m4_sysval syn region m4Paren matchgroup=m4Delimiter start="(" end=")" contained contains=@m4Top syn region m4Command matchgroup=m4Function start="\<\(m4_\)\=\(define\|defn\|pushdef\)(" end=")" contains=@m4Top syn region m4Command matchgroup=m4Preproc start="\<\(m4_\)\=\(include\|sinclude\)("he=e-1 end=")" contains=@m4Top syn region m4Command matchgroup=m4Statement start="\<\(m4_\)\=\(syscmd\|esyscmd\|ifdef\|ifelse\|indir\|builtin\|shift\|errprint\|m4exit\|changecom\|changequote\|changeword\|m4wrap\|debugfile\|divert\|undivert\)("he=e-1 end=")" contains=@m4Top syn region m4Command matchgroup=m4builtin start="\<\(m4_\)\=\(len\|index\|regexp\|substr\|translit\|patsubst\|format\|incr\|decr\|eval\|maketemp\)("he=e-1 end=")" contains=@m4Top syn keyword m4Statement divert undivert syn region m4Command matchgroup=m4Type start="\<\(m4_\)\=\(undefine\|popdef\)("he=e-1 end=")" contains=@m4Top syn region m4Function matchgroup=m4Type start="\<[_A-Z][_A-Z0-9]*("he=e-1 end=")" contains=@m4Top syn region m4String start="`" end="'" contained contains=@m4Top,@m4StringContents,SpellErrors syn cluster m4Top contains=m4Comment,m4Constants,m4Special,m4Variable,m4String,m4Paren,m4Command,m4Statement,m4Function " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link m4Delimiter Delimiter hi def link m4Comment Comment hi def link m4Function Function hi def link m4Keyword Keyword hi def link m4Special Special hi def link m4String String hi def link m4Statement Statement hi def link m4Preproc PreProc hi def link m4Type Type hi def link m4Special Special hi def link m4Variable Special hi def link m4Constants Constant hi def link m4Builtin Statement let b:current_syntax = "m4" if main_syntax == 'm4' unlet main_syntax endif " vim: ts=4 neovim-0.2.2/runtime/syntax/mail.vim000066400000000000000000000136651320401574200174710ustar00rootroot00000000000000" Vim syntax file " Language: Mail file " Previous Maintainer: Felix von Leitner " Maintainer: GI , where a='gi1242+vim', b='gmail', c='com' " Last Change: Wed 14 Aug 2013 08:24:52 AM PDT " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " The mail header is recognized starting with a "keyword:" line and ending " with an empty line or other line that can't be in the header. All lines of " the header are highlighted. Headers of quoted messages (quoted with >) are " also highlighted. " Syntax clusters syn cluster mailHeaderFields contains=mailHeaderKey,mailSubject,mailHeaderEmail,@mailLinks syn cluster mailLinks contains=mailURL,mailEmail syn cluster mailQuoteExps contains=mailQuoteExp1,mailQuoteExp2,mailQuoteExp3,mailQuoteExp4,mailQuoteExp5,mailQuoteExp6 syn case match " For "From " matching case is required. The "From " is not matched in quoted " emails " According to RFC 2822 any printable ASCII character can appear in a field " name, except ':'. syn region mailHeader contains=@mailHeaderFields,@NoSpell start="^From .*\d\d\d\d$" skip="^\s" end="\v^[!-9;-~]*([^!-~]|$)"me=s-1 fold syn match mailHeaderKey contained contains=mailEmail,@NoSpell "^From\s.*\d\d\d\d$" " Nothing else depends on case. syn case ignore " Headers in properly quoted (with "> " or ">") emails are matched syn region mailHeader keepend contains=@mailHeaderFields,@mailQuoteExps,@NoSpell start="^\z(\(> \?\)*\)\v(newsgroups|x-([a-z\-])*|path|xref|message-id|from|((in-)?reply-)?to|b?cc|subject|return-path|received|date|replied):" skip="^\z1\s" end="\v^\z1[!-9;-~]*([^!-~]|$)"me=s-1 end="\v^\z1@!"me=s-1 end="\v^\z1(\> ?)+"me=s-1 fold " Usenet headers syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(Newsgroups|Followup-To|Message-ID|Supersedes|Control):.*$" syn region mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@mailQuoteExps,@NoSpell start="\v(^(\> ?)*)@<=(to|b?cc):" skip=",$" end="$" syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(from|reply-to):.*$" fold syn match mailHeaderKey contained contains=@NoSpell "\v(^(\> ?)*)@<=date:" syn match mailSubject contained "\v^subject:.*$" fold syn match mailSubject contained contains=@NoSpell "\v(^(\> ?)+)@<=subject:.*$" " Anything in the header between < and > is an email address syn match mailHeaderEmail contained contains=@NoSpell "<.\{-}>" " Mail Signatures. (Begin with "-- ", end with change in quote level) syn region mailSignature keepend contains=@mailLinks,@mailQuoteExps start="^--\s$" end="^$" end="^\(> \?\)\+"me=s-1 fold syn region mailSignature keepend contains=@mailLinks,@mailQuoteExps,@NoSpell start="^\z(\(> \?\)\+\)--\s$" end="^\z1$" end="^\z1\@!"me=s-1 end="^\z1\(> \?\)\+"me=s-1 fold " Treat verbatim Text special. syn region mailVerbatim contains=@NoSpell keepend start="^#v+$" end="^#v-$" fold syn region mailVerbatim contains=@mailQuoteExps,@NoSpell keepend start="^\z(\(> \?\)\+\)#v+$" end="\z1#v-$" fold " URLs start with a known protocol or www,web,w3. syn match mailURL contains=@NoSpell `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-z0-9/]` syn match mailEmail contains=@NoSpell "\v[_=a-z\./+0-9-]+\@[a-z0-9._-]+\a{2}" " Make sure quote markers in regions (header / signature) have correct color syn match mailQuoteExp1 contained "\v^(\> ?)" syn match mailQuoteExp2 contained "\v^(\> ?){2}" syn match mailQuoteExp3 contained "\v^(\> ?){3}" syn match mailQuoteExp4 contained "\v^(\> ?){4}" syn match mailQuoteExp5 contained "\v^(\> ?){5}" syn match mailQuoteExp6 contained "\v^(\> ?){6}" " Even and odd quoted lines. Order is important here! syn region mailQuoted6 keepend contains=mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z(\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{5}\([a-z]\+>\|[]|}>]\)\)" end="^\z1\@!" fold syn region mailQuoted5 keepend contains=mailQuoted6,mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z(\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{4}\([a-z]\+>\|[]|}>]\)\)" end="^\z1\@!" fold syn region mailQuoted4 keepend contains=mailQuoted5,mailQuoted6,mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z(\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{3}\([a-z]\+>\|[]|}>]\)\)" end="^\z1\@!" fold syn region mailQuoted3 keepend contains=mailQuoted4,mailQuoted5,mailQuoted6,mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z(\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{2}\([a-z]\+>\|[]|}>]\)\)" end="^\z1\@!" fold syn region mailQuoted2 keepend contains=mailQuoted3,mailQuoted4,mailQuoted5,mailQuoted6,mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z(\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{1}\([a-z]\+>\|[]|}>]\)\)" end="^\z1\@!" fold syn region mailQuoted1 keepend contains=mailQuoted2,mailQuoted3,mailQuoted4,mailQuoted5,mailQuoted6,mailVerbatim,mailHeader,@mailLinks,mailSignature,@NoSpell start="^\z([a-z]\+>\|[]|}>]\)" end="^\z1\@!" fold " Need to sync on the header. Assume we can do that within 100 lines if exists("mail_minlines") exec "syn sync minlines=" . mail_minlines else syn sync minlines=100 endif " Define the default highlighting. hi def link mailVerbatim Special hi def link mailHeader Statement hi def link mailHeaderKey Type hi def link mailSignature PreProc hi def link mailHeaderEmail mailEmail hi def link mailEmail Special hi def link mailURL String hi def link mailSubject Title hi def link mailQuoted1 Comment hi def link mailQuoted3 mailQuoted1 hi def link mailQuoted5 mailQuoted1 hi def link mailQuoted2 Identifier hi def link mailQuoted4 mailQuoted2 hi def link mailQuoted6 mailQuoted2 hi def link mailQuoteExp1 mailQuoted1 hi def link mailQuoteExp2 mailQuoted2 hi def link mailQuoteExp3 mailQuoted3 hi def link mailQuoteExp4 mailQuoted4 hi def link mailQuoteExp5 mailQuoted5 hi def link mailQuoteExp6 mailQuoted6 let b:current_syntax = "mail" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/mailaliases.vim000066400000000000000000000053171320401574200210260ustar00rootroot00000000000000" Vim syntax file " Language: aliases(5) local alias database file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2008-04-14 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword mailaliasesTodo contained TODO FIXME XXX NOTE syn region mailaliasesComment display oneline start='^\s*#' end='$' \ contains=mailaliasesTodo,@Spell syn match mailaliasesBegin display '^' \ nextgroup=mailaliasesName, \ mailaliasesComment syn match mailaliasesName contained '[[:alnum:]\._-]\+' \ nextgroup=mailaliasesColon syn region mailaliasesName contained oneline start=+"+ \ skip=+\\\\\|\\"+ end=+"+ \ nextgroup=mailaliasesColon syn match mailaliasesColon contained ':' \ nextgroup=@mailaliasesValue \ skipwhite skipnl syn cluster mailaliasesValue contains=mailaliasesValueAddress, \ mailaliasesValueFile, \ mailaliasesValueCommand, \ mailaliasesValueInclude syn match mailaliasesValueAddress contained '[^ \t/|,]\+' \ nextgroup=mailaliasesValueSep \ skipwhite skipnl syn match mailaliasesValueFile contained '/[^,]*' \ nextgroup=mailaliasesValueSep \ skipwhite skipnl syn match mailaliasesValueCommand contained '|[^,]*' \ nextgroup=mailaliasesValueSep \ skipwhite skipnl syn match mailaliasesValueInclude contained ':include:[^,]*' \ nextgroup=mailaliasesValueSep \ skipwhite skipnl syn match mailaliasesValueSep contained ',' \ nextgroup=@mailaliasesValue \ skipwhite skipnl hi def link mailaliasesTodo Todo hi def link mailaliasesComment Comment hi def link mailaliasesName Identifier hi def link mailaliasesColon Delimiter hi def link mailaliasesValueAddress String hi def link mailaliasesValueFile String hi def link mailaliasesValueCommand String hi def link mailaliasesValueInclude PreProc hi def link mailaliasesValueSep Delimiter let b:current_syntax = "mailaliases" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/mailcap.vim000066400000000000000000000021571320401574200201470ustar00rootroot00000000000000" Vim syntax file " Language: Mailcap configuration file " Maintainer: Doug Kearns " Last Change: 2013 Jun 01 if exists("b:current_syntax") finish endif syn match mailcapComment "^#.*" syn region mailcapString start=+"+ end=+"+ contains=mailcapSpecial oneline syn match mailcapDelimiter "\\\@" syn match mailcapFieldname "\<\(compose\|composetyped\|print\|edit\|test\|x11-bitmap\|nametemplate\|textualnewlines\|description\|x-\w+\)\>\ze\s*=" syn match mailcapTypeField "^\(text\|image\|audio\|video\|application\|message\|multipart\|model\|x-[[:graph:]]\+\)\(/\(\*\|[[:graph:]]\+\)\)\=\ze\s*;" syn case match hi def link mailcapComment Comment hi def link mailcapDelimiter Delimiter hi def link mailcapFlag Statement hi def link mailcapFieldname Statement hi def link mailcapSpecial Identifier hi def link mailcapTypeField Type hi def link mailcapString String let b:current_syntax = "mailcap" " vim: ts=8 neovim-0.2.2/runtime/syntax/make.vim000066400000000000000000000140651320401574200174570ustar00rootroot00000000000000" Vim syntax file " Language: Makefile " Maintainer: Claudio Fleiner " URL: http://www.fleiner.com/vim/syntax/make.vim " Last Change: 2015 Feb 28 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " some special characters syn match makeSpecial "^\s*[@+-]\+" syn match makeNextLine "\\\n\s*" " some directives syn match makePreCondit "^ *\(ifeq\>\|else\>\|endif\>\|ifneq\>\|ifdef\>\|ifndef\>\)" syn match makeInclude "^ *[-s]\=include" syn match makeStatement "^ *vpath" syn match makeExport "^ *\(export\|unexport\)\>" syn match makeOverride "^ *override" hi link makeOverride makeStatement hi link makeExport makeStatement " catch unmatched define/endef keywords. endef only matches it is by itself on a line, possibly followed by a commend syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$" contains=makeStatement,makeIdent,makePreCondit,makeDefine " Microsoft Makefile specials syn case ignore syn match makeInclude "^! *include" syn match makePreCondit "! *\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|elseif\|else if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>" syn case match " identifiers syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent,makeSString,makeDString syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeSString,makeDString syn match makeIdent "\$\$\w*" syn match makeIdent "\$[^({]" syn match makeIdent "^ *[^:#= \t]*\s*[:+?!*]="me=e-2 syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1 syn match makeIdent "%" " Makefile.in variables syn match makeConfig "@[A-Za-z0-9_]\+@" " make targets " syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>" syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 nextgroup=makeSource syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 nextgroup=makeSource syn region makeTarget transparent matchgroup=makeTarget start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget,makeComment skipnl nextgroup=makeCommands,makeCommandError syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent,makeComment skipnl nextgroup=makeCommands,makeCommandError syn match makeCommandError "^\s\+\S.*" contained syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError syn match makeCmdNextLine "\\\n."he=e-1 contained " Statements / Functions (GNU make) syn match makeStatement contained "(\(subst\|abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 " Comment if exists("make_microsoft") syn match makeComment "#.*" contains=@Spell,makeTodo elseif !exists("make_no_comments") syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=@Spell,makeTodo syn match makeComment "#$" contains=@Spell endif syn keyword makeTodo TODO FIXME XXX contained " match escaped quotes and any other escaped character " except for $, as a backslash in front of a $ does " not make it a standard character, but instead it will " still act as the beginning of a variable " The escaped char is not highlightet currently syn match makeEscapedChar "\\[^$]" syn region makeDString start=+\(\\\)\@ " URL: https://github.com/jhradilek/vim-syntax " Last Change: 11 February 2013 " Description: A syntax file for the Mallard markup language according to " Mallard 1.0 DRAFT as of 2013-02-11. if exists("b:current_syntax") finish endif do Syntax xml syn cluster xmlTagHook add=mallardTagName syn spell toplevel syn case match syn keyword mallardTagName app cite cmd code col colgroup comment contained syn keyword mallardTagName credit desc em email example figure contained syn keyword mallardTagName file gui guiseq info input item key contained syn keyword mallardTagName keyseq license link links list listing contained syn keyword mallardTagName media name note output p page quote contained syn keyword mallardTagName revision screen section span steps contained syn keyword mallardTagName subtitle synopsis sys table tbody td contained syn keyword mallardTagName terms tfoot thead title tr tree var contained syn keyword mallardTagName years contained syn region mallardComment start="" end=""me=e-10 contains=xmlTag,xmlNamespace,xmlTagName,xmlEndTag,xmlRegion,xmlEntity,@Spell keepend syn region mallardEmphasis start="" end="
"me=e-5 contains=xmlTag,xmlNamespace,xmlTagName,xmlEndTag,xmlRegion,xmlEntity,@Spell keepend syn region mallardTitle start="" end=""me=e-8 contains=xmlTag,xmlNamespace,xmlTagName,xmlEndTag,xmlRegion,xmlEntity,@Spell keepend hi def link mallardComment Comment hi def link mallardTagName Statement hi def link mallardTitle Title hi def mallardEmphasis term=italic cterm=italic gui=italic let b:current_syntax = "mallard" neovim-0.2.2/runtime/syntax/man.vim000066400000000000000000000026641320401574200173170ustar00rootroot00000000000000" Maintainer: Anmol Sethi " Previous Maintainer: SungHyun Nam if exists('b:current_syntax') finish endif syntax case ignore syntax match manReference display '[^()[:space:]]\+([0-9nx][a-z]*)' syntax match manSectionHeading display '^\S.*$' syntax match manTitle display '^\%1l.*$' syntax match manSubHeading display '^ \{3\}\S.*$' syntax match manOptionDesc display '^\s\+\%(+\|-\)\S\+' highlight default link manTitle Title highlight default link manSectionHeading Statement highlight default link manOptionDesc Constant highlight default link manReference PreProc highlight default link manSubHeading Function if &filetype != 'man' " May have been included by some other filetype. finish endif if !exists('b:man_sect') call man#init_pager() endif if b:man_sect =~# '^[23]' syntax include @c $VIMRUNTIME/syntax/c.vim syntax match manCFuncDefinition display '\<\h\w*\>\ze\(\s\|\n\)*(' contained syntax region manSynopsis start='^\%( \SYNOPSIS\| \SYNTAX\| \SINTASSI\| \SKŁADNIA\| \СИНТАКСИС\| \書式\)$' end='^\%(\S.*\)\=\S$' keepend contains=manSectionHeading,@c,manCFuncDefinition highlight default link manCFuncDefinition Function endif " Prevent everything else from matching the last line execute 'syntax match manFooter display "^\%'.line('$').'l.*$"' let b:current_syntax = 'man' neovim-0.2.2/runtime/syntax/manconf.vim000066400000000000000000000103701320401574200201560ustar00rootroot00000000000000" Vim syntax file " Language: man.conf(5) - man configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword manconfTodo contained TODO FIXME XXX NOTE syn region manconfComment display oneline start='^#' end='$' \ contains=manconfTodo,@Spell if !has("win32") && $OSTYPE =~ 'bsd' syn match manconfBegin display '^' \ nextgroup=manconfKeyword,manconfSection, \ manconfComment skipwhite syn keyword manconfKeyword contained _build _crunch \ nextgroup=manconfExtCmd skipwhite syn keyword manconfKeyword contained _suffix \ nextgroup=manconfExt skipwhite syn keyword manconfKeyword contained _crunch syn keyword manconfKeyword contained _subdir _version _whatdb \ nextgroup=manconfPaths skipwhite syn match manconfExtCmd contained display '\.\S\+' \ nextgroup=manconfPaths skipwhite syn match manconfSection contained '[^#_ \t]\S*' \ nextgroup=manconfPaths skipwhite syn keyword manconfSection contained _default \ nextgroup=manconfPaths skipwhite syn match manconfPaths contained display '\S\+' \ nextgroup=manconfPaths skipwhite syn match manconfExt contained display '\.\S\+' hi def link manconfExtCmd Type hi def link manconfSection Identifier hi def link manconfPaths String else syn match manconfBegin display '^' \ nextgroup=manconfBoolean,manconfKeyword, \ manconfDecompress,manconfComment skipwhite syn keyword manconfBoolean contained FSSTND FHS NOAUTOPATH NOCACHE syn keyword manconfKeyword contained MANBIN \ nextgroup=manconfPath skipwhite syn keyword manconfKeyword contained MANPATH MANPATH_MAP \ nextgroup=manconfFirstPath skipwhite syn keyword manconfKeyword contained APROPOS WHATIS TROFF NROFF JNROFF EQN \ NEQN JNEQN TBL COL REFER PIC VGRIND GRAP \ PAGER BROWSER HTMLPAGER CMP CAT COMPRESS \ DECOMPRESS MANDEFOPTIONS \ nextgroup=manconfCommand skipwhite syn keyword manconfKeyword contained COMPRESS_EXT \ nextgroup=manconfExt skipwhite syn keyword manconfKeyword contained MANSECT \ nextgroup=manconfManSect skipwhite syn match manconfPath contained display '\S\+' syn match manconfFirstPath contained display '\S\+' \ nextgroup=manconfSecondPath skipwhite syn match manconfSecondPath contained display '\S\+' syn match manconfCommand contained display '\%(/[^/ \t]\+\)\+' \ nextgroup=manconfCommandOpt skipwhite syn match manconfCommandOpt contained display '\S\+' \ nextgroup=manconfCommandOpt skipwhite syn match manconfExt contained display '\.\S\+' syn match manconfManSect contained '[^:]\+' nextgroup=manconfManSectSep syn match manconfManSectSep contained ':' nextgroup=manconfManSect syn match manconfDecompress contained '\.\S\+' \ nextgroup=manconfCommand skipwhite hi def link manconfBoolean Boolean hi def link manconfPath String hi def link manconfFirstPath manconfPath hi def link manconfSecondPath manconfPath hi def link manconfCommand String hi def link manconfCommandOpt Special hi def link manconfManSect Identifier hi def link manconfManSectSep Delimiter hi def link manconfDecompress Type endif hi def link manconfTodo Todo hi def link manconfComment Comment hi def link manconfKeyword Keyword hi def link manconfExt Type let b:current_syntax = "manconf" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/manual.vim000066400000000000000000000016151320401574200200140ustar00rootroot00000000000000" Vim syntax support file " Maintainer: Bram Moolenaar " Last Change: 2016 Feb 01 " This file is used for ":syntax manual". " It installs the Syntax autocommands, but no the FileType autocommands. if !has("syntax") finish endif " Load the Syntax autocommands and set the default methods for highlighting. if !exists("syntax_on") so :p:h/synload.vim endif let syntax_manual = 1 " Overrule the connection between FileType and Syntax autocommands. This sets " the syntax when the file type is detected, without changing the value. augroup syntaxset au! FileType * exe "set syntax=" . &syntax augroup END " If the GUI is already running, may still need to install the FileType menu. " Don't do it when the 'M' flag is included in 'guioptions'. if has("menu") && has("gui_running") && !exists("did_install_syntax_menu") && &guioptions !~# 'M' source $VIMRUNTIME/menu.vim endif neovim-0.2.2/runtime/syntax/maple.vim000066400000000000000000000675611320401574200176510ustar00rootroot00000000000000" Vim syntax file " Language: Maple V (based on release 4) " Maintainer: Charles E. Campbell " Last Change: Aug 31, 2016 " Version: 15 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_MAPLE " " Package Function Selection: {{{1 " Because there are a lot of packages, and because of the potential for namespace " clashes, this version of needs the user to select which, if any, " package functions should be highlighted. Select your packages and put into your " <.vimrc> none or more of the lines following let ...=1 lines: " " if exists("mvpkg_all") " ... " endif " " *OR* let mvpkg_all=1 " This syntax file contains all the keywords and top-level packages of Maple 9.5 " but only the contents of packages of Maple V Release 4, and the top-level " routines of Release 4. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Iskeyword Effects: {{{1 if !has("patch-7.4.1142") setl isk=$,48-57,_,a-z,@-Z else syn iskeyword $,48-57,_,a-z,@-Z endif " Package Selection: {{{1 " allow user to simply select all packages for highlighting if exists("mvpkg_all") let mv_DEtools = 1 let mv_Galois = 1 let mv_GaussInt = 1 let mv_LREtools = 1 let mv_combinat = 1 let mv_combstruct = 1 let mv_difforms = 1 let mv_finance = 1 let mv_genfunc = 1 let mv_geometry = 1 let mv_grobner = 1 let mv_group = 1 let mv_inttrans = 1 let mv_liesymm = 1 let mv_linalg = 1 let mv_logic = 1 let mv_networks = 1 let mv_numapprox = 1 let mv_numtheory = 1 let mv_orthopoly = 1 let mv_padic = 1 let mv_plots = 1 let mv_plottools = 1 let mv_powseries = 1 let mv_process = 1 let mv_simplex = 1 let mv_stats = 1 let mv_student = 1 let mv_sumtools = 1 let mv_tensor = 1 let mv_totorder = 1 endif " Parenthesis/curly/brace sanity checker: {{{1 syn case match " parenthesis/curly/brace sanity checker syn region mvZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,mvError,mvBraceError,mvCurlyError syn region mvZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,mvError,mvBraceError,mvParenError syn region mvZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,mvError,mvCurlyError,mvParenError syn match mvError "[)\]}]" syn match mvBraceError "[)}]" contained syn match mvCurlyError "[)\]]" contained syn match mvParenError "[\]}]" contained syn match mvComma "[,;:]" syn match mvSemiError "[;:]" contained syn match mvDcolon "::" " Maple Packages, updated for Maple 9.5 syn keyword mvPackage algcurves ArrayTools Cache codegen syn keyword mvPackage CodeGeneration CodeTools combinat combstruct syn keyword mvPackage ContextMenu CurveFitting DEtools diffalg syn keyword mvPackage difforms DiscreteTransforms Domains ExternalCalling syn keyword mvPackage FileTools finance GaussInt genfunc syn keyword mvPackage geom3d geometry gfun Groebner syn keyword mvPackage group hashmset IntegerRelations inttrans syn keyword mvPackage LargeExpressions LibraryTools liesymm linalg syn keyword mvPackage LinearAlgebra LinearFunctionalSystems LinearOperators syn keyword mvPackage ListTools Logic LREtools Maplets syn keyword mvPackage MathematicalFunctions MathML Matlab syn keyword mvPackage MatrixPolynomialAlgebra MmaTranslator networks syn keyword mvPackage numapprox numtheory Optimization OreTools syn keyword mvPackage Ore_algebra OrthogonalSeries orthopoly padic syn keyword mvPackage PDEtools plots plottools PolynomialIdeals syn keyword mvPackage PolynomialTools powseries process QDifferenceEquations syn keyword mvPackage RandomTools RationalNormalForms RealDomain RootFinding syn keyword mvPackage ScientificConstants ScientificErrorAnalysis simplex syn keyword mvPackage Slode SNAP Sockets SoftwareMetrics syn keyword mvPackage SolveTools Spread stats StringTools syn keyword mvPackage Student student sumtools SumTools syn keyword mvPackage tensor TypeTools Units VariationalCalculus syn keyword mvPackage VectorCalculus Worksheet XMLTools " Language Support: {{{1 syn keyword mvTodo contained COMBAK FIXME TODO XXX if exists("g:mapleversion") && g:mapleversion < 9 syn region mvString start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo,@Spell syn region mvString start=+"+ skip=+""+ end=+"+ keepend contains=@Spell syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError,mvSemiError syn match mvVarAssign "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:=" contains=mvAssign syn match mvAssign ":=" contained else syn region mvName start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo syn region mvString start=+"+ skip=+""+ end=+"+ keepend contains=@Spell syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError syn match mvDelim "[;:]" display syn match mvAssign ":=" endif " Lower-Priority Operators: {{{1 syn match mvOper "\." " Number handling: {{{1 syn match mvNumber "\<\d\+" " integer syn match mvNumber "[-+]\=\.\d\+" " . integer syn match mvNumber "\<\d\+\.\d\+" " integer . integer syn match mvNumber "\<\d\+\." " integer . syn match mvNumber "\<\d\+\.\." contains=mvRange " integer .. syn match mvNumber "\<\d\+e[-+]\=\d\+" " integer e [-+] integer syn match mvNumber "[-+]\=\.\d\+e[-+]\=\d\+" " . integer e [-+] integer syn match mvNumber "\<\d\+\.\d*e[-+]\=\d\+" " integer . [integer] e [-+] integer syn match mvNumber "[-+]\d\+" " integer syn match mvNumber "[-+]\d\+\.\d\+" " integer . integer syn match mvNumber "[-+]\d\+\." " integer . syn match mvNumber "[-+]\d\+\.\." contains=mvRange " integer .. syn match mvNumber "[-+]\d\+e[-+]\=\d\+" " integer e [-+] integer syn match mvNumber "[-+]\d\+\.\d*e[-+]\=\d\+" " integer . [integer] e [-+] integer syn match mvRange "\.\." " Operators: {{{1 syn keyword mvOper and not or xor implies union intersect subset minus mod syn match mvOper "<>\|[<>]=\|[<>]\|=" syn match mvOper "&+\|&-\|&\*\|&\/\|&" syn match mvError "\.\.\." " MapleV Statements: ? statement {{{1 " MapleV Statements: ? statement " Split into booleans, conditionals, operators, repeat-logic, etc syn keyword mvBool true false FAIL syn keyword mvCond elif else fi if then syn match mvCond "end\s\+if" syn keyword mvRepeat by for in to syn keyword mvRepeat do from od while syn match mvRepeat "end\s\+do" syn keyword mvSpecial NULL syn match mvSpecial "\[\]\|{}" if exists("g:mapleversion") && g:mapleversion < 9 syn keyword mvStatement Order fail options read save syn keyword mvStatement break local point remember stop syn keyword mvStatement done mod proc restart with syn keyword mvStatement end mods quit return syn keyword mvStatement error next else syn keyword mvStatement option options read save syn keyword mvStatement break local remember stop syn keyword mvStatement done mod proc restart syn keyword mvStatement end mods quit return syn keyword mvStatement error next try catch syn keyword mvStatement finally assuming global export syn keyword mvStatement module description use endif " Builtin Constants: ? constants {{{1 syn keyword mvConstant Catalan I gamma infinity syn keyword mvConstant Pi " Comments: DEBUG, if in a comment, is specially highlighted. {{{1 syn keyword mvDebug contained DEBUG syn cluster mvCommentGroup contains=mvTodo,mvDebug,@Spell syn match mvComment "#.*$" contains=@mvCommentGroup " Basic Library Functions: ? index[function] syn keyword mvLibrary $ @ @@ ERROR syn keyword mvLibrary AFactor KelvinHer arctan factor log rhs syn keyword mvLibrary AFactors KelvinKei arctanh factors log10 root syn keyword mvLibrary AiryAi KelvinKer argument fclose lprint roots syn keyword mvLibrary AiryBi LambertW array feof map round syn keyword mvLibrary AngerJ Lcm assign fflush map2 rsolve syn keyword mvLibrary Berlekamp LegendreE assigned filepos match savelib syn keyword mvLibrary BesselI LegendreEc asspar fixdiv matrix scanf syn keyword mvLibrary BesselJ LegendreEc1 assume float max searchtext syn keyword mvLibrary BesselK LegendreF asubs floor maximize sec syn keyword mvLibrary BesselY LegendreKc asympt fnormal maxnorm sech syn keyword mvLibrary Beta LegendreKc1 attribute fopen maxorder select syn keyword mvLibrary C LegendrePi bernstein forget member seq syn keyword mvLibrary Chi LegendrePic branches fortran min series syn keyword mvLibrary Ci LegendrePic1 bspline fprintf minimize setattribute syn keyword mvLibrary CompSeq Li cat frac minpoly shake syn keyword mvLibrary Content Linsolve ceil freeze modp showprofile syn keyword mvLibrary D MOLS chrem fremove modp1 showtime syn keyword mvLibrary DESol Maple_floats close frontend modp2 sign syn keyword mvLibrary Det MeijerG close fscanf modpol signum syn keyword mvLibrary Diff Norm coeff fsolve mods simplify syn keyword mvLibrary Dirac Normal coeffs galois msolve sin syn keyword mvLibrary DistDeg Nullspace coeftayl gc mtaylor singular syn keyword mvLibrary Divide Power collect gcd mul sinh syn keyword mvLibrary Ei Powmod combine gcdex nextprime sinterp syn keyword mvLibrary Eigenvals Prem commutat genpoly nops solve syn keyword mvLibrary EllipticCE Primfield comparray harmonic norm sort syn keyword mvLibrary EllipticCK Primitive compoly has normal sparse syn keyword mvLibrary EllipticCPi Primpart conjugate hasfun numboccur spline syn keyword mvLibrary EllipticE ProbSplit content hasoption numer split syn keyword mvLibrary EllipticF Product convergs hastype op splits syn keyword mvLibrary EllipticK Psi convert heap open sprem syn keyword mvLibrary EllipticModulus Quo coords history optimize sprintf syn keyword mvLibrary EllipticNome RESol copy hypergeom order sqrfree syn keyword mvLibrary EllipticPi Randpoly cos iFFT parse sqrt syn keyword mvLibrary Eval Randprime cosh icontent pclose sscanf syn keyword mvLibrary Expand Ratrecon cost identity pclose ssystem syn keyword mvLibrary FFT Re cot igcd pdesolve stack syn keyword mvLibrary Factor Rem coth igcdex piecewise sturm syn keyword mvLibrary Factors Resultant csc ilcm plot sturmseq syn keyword mvLibrary FresnelC RootOf csch ilog plot3d subs syn keyword mvLibrary FresnelS Roots csgn ilog10 plotsetup subsop syn keyword mvLibrary Fresnelf SPrem dawson implicitdiff pochhammer substring syn keyword mvLibrary Fresnelg Searchtext define indets pointto sum syn keyword mvLibrary Frobenius Shi degree index poisson surd syn keyword mvLibrary GAMMA Si denom indexed polar symmdiff syn keyword mvLibrary GaussAGM Smith depends indices polylog symmetric syn keyword mvLibrary Gaussejord Sqrfree diagonal inifcn polynom system syn keyword mvLibrary Gausselim Ssi diff ininame powmod table syn keyword mvLibrary Gcd StruveH dilog initialize prem tan syn keyword mvLibrary Gcdex StruveL dinterp insert prevprime tanh syn keyword mvLibrary HankelH1 Sum disassemble int primpart testeq syn keyword mvLibrary HankelH2 Svd discont interface print testfloat syn keyword mvLibrary Heaviside TEXT discrim interp printf thaw syn keyword mvLibrary Hermite Trace dismantle invfunc procbody thiele syn keyword mvLibrary Im WeberE divide invztrans procmake time syn keyword mvLibrary Indep WeierstrassP dsolve iostatus product translate syn keyword mvLibrary Interp WeierstrassPPrime eliminate iperfpow proot traperror syn keyword mvLibrary Inverse WeierstrassSigma ellipsoid iquo property trigsubs syn keyword mvLibrary Irreduc WeierstrassZeta entries iratrecon protect trunc syn keyword mvLibrary Issimilar Zeta eqn irem psqrt type syn keyword mvLibrary JacobiAM abs erf iroot quo typematch syn keyword mvLibrary JacobiCD add erfc irreduc radnormal unames syn keyword mvLibrary JacobiCN addcoords eulermac iscont radsimp unapply syn keyword mvLibrary JacobiCS addressof eval isdifferentiable rand unassign syn keyword mvLibrary JacobiDC algebraic evala isolate randomize unload syn keyword mvLibrary JacobiDN algsubs evalapply ispoly randpoly unprotect syn keyword mvLibrary JacobiDS alias evalb isqrfree range updatesR4 syn keyword mvLibrary JacobiNC allvalues evalc isqrt rationalize userinfo syn keyword mvLibrary JacobiND anames evalf issqr ratrecon value syn keyword mvLibrary JacobiNS antisymm evalfint latex readbytes vector syn keyword mvLibrary JacobiSC applyop evalgf lattice readdata verify syn keyword mvLibrary JacobiSD arccos evalhf lcm readlib whattype syn keyword mvLibrary JacobiSN arccosh evalm lcoeff readline with syn keyword mvLibrary JacobiTheta1 arccot evaln leadterm readstat writebytes syn keyword mvLibrary JacobiTheta2 arccoth evalr length realroot writedata syn keyword mvLibrary JacobiTheta3 arccsc exp lexorder recipoly writeline syn keyword mvLibrary JacobiTheta4 arccsch expand lhs rem writestat syn keyword mvLibrary JacobiZeta arcsec expandoff limit remove writeto syn keyword mvLibrary KelvinBei arcsech expandon ln residue zip syn keyword mvLibrary KelvinBer arcsin extract lnGAMMA resultant ztrans syn keyword mvLibrary KelvinHei arcsinh " == PACKAGES ======================================================= {{{1 " Note: highlighting of package functions is now user-selectable by package. " Package: DEtools differential equations tools {{{2 if exists("mv_DEtools") syn keyword mvPkg_DEtools DEnormal Dchangevar autonomous dfieldplot reduceOrder untranslate syn keyword mvPkg_DEtools DEplot PDEchangecoords convertAlg indicialeq regularsp varparam syn keyword mvPkg_DEtools DEplot3d PDEplot convertsys phaseportrait translate endif " Package: Domains: create domains of computation {{{2 if exists("mv_Domains") endif " Package: GF: Galois Fields {{{2 if exists("mv_GF") syn keyword mvPkg_Galois galois endif " Package: GaussInt: Gaussian Integers {{{2 if exists("mv_GaussInt") syn keyword mvPkg_GaussInt GIbasis GIfactor GIissqr GInorm GIquadres GIsmith syn keyword mvPkg_GaussInt GIchrem GIfactors GIlcm GInormal GIquo GIsqrfree syn keyword mvPkg_GaussInt GIdivisor GIgcd GImcmbine GIorder GIrem GIsqrt syn keyword mvPkg_GaussInt GIfacpoly GIgcdex GInearest GIphi GIroots GIunitnormal syn keyword mvPkg_GaussInt GIfacset GIhermite GInodiv GIprime GIsieve endif " Package: LREtools: manipulate linear recurrence relations {{{2 if exists("mv_LREtools") syn keyword mvPkg_LREtools REcontent REprimpart REtodelta delta hypergeomsols ratpolysols syn keyword mvPkg_LREtools REcreate REreduceorder REtoproc dispersion polysols shift syn keyword mvPkg_LREtools REplot REtoDE constcoeffsol endif " Package: combinat: combinatorial functions {{{2 if exists("mv_combinat") syn keyword mvPkg_combinat Chi composition graycode numbcomb permute randperm syn keyword mvPkg_combinat bell conjpart inttovec numbcomp powerset stirling1 syn keyword mvPkg_combinat binomial decodepart lastpart numbpart prevpart stirling2 syn keyword mvPkg_combinat cartprod encodepart multinomial numbperm randcomb subsets syn keyword mvPkg_combinat character fibonacci nextpart partition randpart vectoint syn keyword mvPkg_combinat choose firstpart endif " Package: combstruct: combinatorial structures {{{2 if exists("mv_combstruct") syn keyword mvPkg_combstruct allstructs draw iterstructs options specification structures syn keyword mvPkg_combstruct count finished nextstruct endif " Package: difforms: differential forms {{{2 if exists("mv_difforms") syn keyword mvPkg_difforms const defform formpart parity scalarpart wdegree syn keyword mvPkg_difforms d form mixpar scalar simpform wedge endif " Package: finance: financial mathematics {{{2 if exists("mv_finance") syn keyword mvPkg_finance amortization cashflows futurevalue growingperpetuity mv_finance presentvalue syn keyword mvPkg_finance annuity effectiverate growingannuity levelcoupon perpetuity yieldtomaturity syn keyword mvPkg_finance blackscholes endif " Package: genfunc: rational generating functions {{{2 if exists("mv_genfunc") syn keyword mvPkg_genfunc rgf_charseq rgf_expand rgf_hybrid rgf_pfrac rgf_sequence rgf_term syn keyword mvPkg_genfunc rgf_encode rgf_findrecur rgf_norm rgf_relate rgf_simp termscale endif " Package: geometry: Euclidean geometry {{{2 if exists("mv_geometry") syn keyword mvPkg_geometry circle dsegment hyperbola parabola segment triangle syn keyword mvPkg_geometry conic ellipse line point square endif " Package: grobner: Grobner bases {{{2 if exists("mv_grobner") syn keyword mvPkg_grobner finduni gbasis leadmon normalf solvable spoly syn keyword mvPkg_grobner finite gsolve endif " Package: group: permutation and finitely-presented groups {{{2 if exists("mv_group") syn keyword mvPkg_group DerivedS areconjugate cosets grouporder issubgroup permrep syn keyword mvPkg_group LCS center cosrep inter mulperms pres syn keyword mvPkg_group NormalClosure centralizer derived invperm normalizer subgrel syn keyword mvPkg_group RandElement convert grelgroup isabelian orbit type syn keyword mvPkg_group Sylow core groupmember isnormal permgroup endif " Package: inttrans: integral transforms {{{2 if exists("mv_inttrans") syn keyword mvPkg_inttrans addtable fouriercos hankel invfourier invlaplace mellin syn keyword mvPkg_inttrans fourier fouriersin hilbert invhilbert laplace endif " Package: liesymm: Lie symmetries {{{2 if exists("mv_liesymm") syn keyword mvPkg_liesymm &^ TD depvars getform mixpar vfix syn keyword mvPkg_liesymm &mod annul determine hasclosure prolong wcollect syn keyword mvPkg_liesymm Eta autosimp dvalue hook reduce wdegree syn keyword mvPkg_liesymm Lie close extvars indepvars setup wedgeset syn keyword mvPkg_liesymm Lrank d getcoeff makeforms translate wsubs endif " Package: linalg: Linear algebra {{{2 if exists("mv_linalg") syn keyword mvPkg_linalg GramSchmidt coldim equal indexfunc mulcol singval syn keyword mvPkg_linalg JordanBlock colspace exponential innerprod multiply smith syn keyword mvPkg_linalg LUdecomp colspan extend intbasis norm stack syn keyword mvPkg_linalg QRdecomp companion ffgausselim inverse normalize submatrix syn keyword mvPkg_linalg addcol cond fibonacci ismith orthog subvector syn keyword mvPkg_linalg addrow copyinto forwardsub issimilar permanent sumbasis syn keyword mvPkg_linalg adjoint crossprod frobenius iszero pivot swapcol syn keyword mvPkg_linalg angle curl gausselim jacobian potential swaprow syn keyword mvPkg_linalg augment definite gaussjord jordan randmatrix sylvester syn keyword mvPkg_linalg backsub delcols geneqns kernel randvector toeplitz syn keyword mvPkg_linalg band delrows genmatrix laplacian rank trace syn keyword mvPkg_linalg basis det grad leastsqrs references transpose syn keyword mvPkg_linalg bezout diag hadamard linsolve row vandermonde syn keyword mvPkg_linalg blockmatrix diverge hermite matadd rowdim vecpotent syn keyword mvPkg_linalg charmat dotprod hessian matrix rowspace vectdim syn keyword mvPkg_linalg charpoly eigenval hilbert minor rowspan vector syn keyword mvPkg_linalg cholesky eigenvect htranspose minpoly scalarmul wronskian syn keyword mvPkg_linalg col entermatrix ihermite endif " Package: logic: Boolean logic {{{2 if exists("mv_logic") syn keyword mvPkg_logic MOD2 bsimp distrib environ randbool tautology syn keyword mvPkg_logic bequal canon dual frominert satisfy toinert endif " Package: networks: graph networks {{{2 if exists("mv_networks") syn keyword mvPkg_networks acycpoly connect dinic graph mincut show syn keyword mvPkg_networks addedge connectivity djspantree graphical mindegree shrink syn keyword mvPkg_networks addvertex contract dodecahedron gsimp neighbors span syn keyword mvPkg_networks adjacency countcuts draw gunion new spanpoly syn keyword mvPkg_networks allpairs counttrees duplicate head octahedron spantree syn keyword mvPkg_networks ancestor cube edges icosahedron outdegree tail syn keyword mvPkg_networks arrivals cycle ends incidence path tetrahedron syn keyword mvPkg_networks bicomponents cyclebase eweight incident petersen tuttepoly syn keyword mvPkg_networks charpoly daughter flow indegree random vdegree syn keyword mvPkg_networks chrompoly degreeseq flowpoly induce rank vertices syn keyword mvPkg_networks complement delete fundcyc isplanar rankpoly void syn keyword mvPkg_networks complete departures getlabel maxdegree shortpathtree vweight syn keyword mvPkg_networks components diameter girth endif " Package: numapprox: numerical approximation {{{2 if exists("mv_numapprox") syn keyword mvPkg_numapprox chebdeg chebsort fnorm laurent minimax remez syn keyword mvPkg_numapprox chebmult chebyshev hornerform laurent pade taylor syn keyword mvPkg_numapprox chebpade confracform infnorm minimax endif " Package: numtheory: number theory {{{2 if exists("mv_numtheory") syn keyword mvPkg_numtheory B cyclotomic invcfrac mcombine nthconver primroot syn keyword mvPkg_numtheory F divisors invphi mersenne nthdenom quadres syn keyword mvPkg_numtheory GIgcd euler isolve minkowski nthnumer rootsunity syn keyword mvPkg_numtheory J factorEQ isprime mipolys nthpow safeprime syn keyword mvPkg_numtheory L factorset issqrfree mlog order sigma syn keyword mvPkg_numtheory M fermat ithprime mobius pdexpand sq2factor syn keyword mvPkg_numtheory bernoulli ifactor jacobi mroot phi sum2sqr syn keyword mvPkg_numtheory bigomega ifactors kronecker msqrt pprimroot tau syn keyword mvPkg_numtheory cfrac imagunit lambda nearestp prevprime thue syn keyword mvPkg_numtheory cfracpol index legendre nextprime endif " Package: orthopoly: orthogonal polynomials {{{2 if exists("mv_orthopoly") syn keyword mvPkg_orthopoly G H L P T U endif " Package: padic: p-adic numbers {{{2 if exists("mv_padic") syn keyword mvPkg_padic evalp function orderp ratvaluep rootp valuep syn keyword mvPkg_padic expansion lcoeffp ordp endif " Package: plots: graphics package {{{2 if exists("mv_plots") syn keyword mvPkg_plots animate coordplot3d gradplot3d listplot3d polarplot setoptions3d syn keyword mvPkg_plots animate3d cylinderplot implicitplot loglogplot polygonplot spacecurve syn keyword mvPkg_plots changecoords densityplot implicitplot3d logplot polygonplot3d sparsematrixplot syn keyword mvPkg_plots complexplot display inequal matrixplot polyhedraplot sphereplot syn keyword mvPkg_plots complexplot3d display3d listcontplot odeplot replot surfdata syn keyword mvPkg_plots conformal fieldplot listcontplot3d pareto rootlocus textplot syn keyword mvPkg_plots contourplot fieldplot3d listdensityplot pointplot semilogplot textplot3d syn keyword mvPkg_plots contourplot3d gradplot listplot pointplot3d setoptions tubeplot syn keyword mvPkg_plots coordplot endif " Package: plottools: basic graphical objects {{{2 if exists("mv_plottools") syn keyword mvPkg_plottools arc curve dodecahedron hyperbola pieslice semitorus syn keyword mvPkg_plottools arrow cutin ellipse icosahedron point sphere syn keyword mvPkg_plottools circle cutout ellipticArc line polygon tetrahedron syn keyword mvPkg_plottools cone cylinder hemisphere octahedron rectangle torus syn keyword mvPkg_plottools cuboid disk hexahedron endif " Package: powseries: formal power series {{{2 if exists("mv_powseries") syn keyword mvPkg_powseries compose multiply powcreate powlog powsolve reversion syn keyword mvPkg_powseries evalpow negative powdiff powpoly powsqrt subtract syn keyword mvPkg_powseries inverse powadd powexp powseries quotient tpsform syn keyword mvPkg_powseries multconst powcos powint powsin endif " Package: process: (Unix)-multi-processing {{{2 if exists("mv_process") syn keyword mvPkg_process block fork pclose pipe popen wait syn keyword mvPkg_process exec kill endif " Package: simplex: linear optimization {{{2 if exists("mv_simplex") syn keyword mvPkg_simplex NONNEGATIVE cterm dual maximize pivoteqn setup syn keyword mvPkg_simplex basis define_zero equality minimize pivotvar standardize syn keyword mvPkg_simplex convexhull display feasible pivot ratio endif " Package: stats: statistics {{{2 if exists("mv_stats") syn keyword mvPkg_stats anova describe fit random statevalf statplots endif " Package: student: student calculus {{{2 if exists("mv_student") syn keyword mvPkg_student D Product distance isolate middlesum rightsum syn keyword mvPkg_student Diff Sum equate leftbox midpoint showtangent syn keyword mvPkg_student Doubleint Tripleint extrema leftsum minimize simpson syn keyword mvPkg_student Int changevar integrand makeproc minimize slope syn keyword mvPkg_student Limit combine intercept maximize powsubs trapezoid syn keyword mvPkg_student Lineint completesquare intparts middlebox rightbox value syn keyword mvPkg_student Point endif " Package: sumtools: indefinite and definite sums {{{2 if exists("mv_sumtools") syn keyword mvPkg_sumtools Hypersum extended_gosper hyperrecursion hyperterm sumrecursion sumtohyper syn keyword mvPkg_sumtools Sumtohyper gosper hypersum simpcomb endif " Package: tensor: tensor computations and General Relativity {{{2 if exists("mv_tensor") syn keyword mvPkg_tensor Christoffel1 Riemann connexF display_allGR get_compts partial_diff syn keyword mvPkg_tensor Christoffel2 RiemannF contract dual get_rank permute_indices syn keyword mvPkg_tensor Einstein Weyl convertNP entermetric invars petrov syn keyword mvPkg_tensor Jacobian act cov_diff exterior_diff invert prod syn keyword mvPkg_tensor Killing_eqns antisymmetrize create exterior_prod lin_com raise syn keyword mvPkg_tensor Levi_Civita change_basis d1metric frame lower symmetrize syn keyword mvPkg_tensor Lie_diff commutator d2metric geodesic_eqns npcurve tensorsGR syn keyword mvPkg_tensor Ricci compare directional_diff get_char npspin transform syn keyword mvPkg_tensor Ricciscalar conj displayGR endif " Package: totorder: total orders on names {{{2 if exists("mv_totorder") syn keyword mvPkg_totorder forget init ordering tassume tis endif " ===================================================================== " Highlighting: Define the default highlighting. {{{1 " Only when an item doesn't have highlighting yet if !exists("skip_maplev_syntax_inits") " Maple->Maple Links {{{2 hi def link mvBraceError mvError hi def link mvCurlyError mvError hi def link mvDebug mvTodo hi def link mvParenError mvError hi def link mvPkg_DEtools mvPkgFunc hi def link mvPkg_Galois mvPkgFunc hi def link mvPkg_GaussInt mvPkgFunc hi def link mvPkg_LREtools mvPkgFunc hi def link mvPkg_combinat mvPkgFunc hi def link mvPkg_combstruct mvPkgFunc hi def link mvPkg_difforms mvPkgFunc hi def link mvPkg_finance mvPkgFunc hi def link mvPkg_genfunc mvPkgFunc hi def link mvPkg_geometry mvPkgFunc hi def link mvPkg_grobner mvPkgFunc hi def link mvPkg_group mvPkgFunc hi def link mvPkg_inttrans mvPkgFunc hi def link mvPkg_liesymm mvPkgFunc hi def link mvPkg_linalg mvPkgFunc hi def link mvPkg_logic mvPkgFunc hi def link mvPkg_networks mvPkgFunc hi def link mvPkg_numapprox mvPkgFunc hi def link mvPkg_numtheory mvPkgFunc hi def link mvPkg_orthopoly mvPkgFunc hi def link mvPkg_padic mvPkgFunc hi def link mvPkg_plots mvPkgFunc hi def link mvPkg_plottools mvPkgFunc hi def link mvPkg_powseries mvPkgFunc hi def link mvPkg_process mvPkgFunc hi def link mvPkg_simplex mvPkgFunc hi def link mvPkg_stats mvPkgFunc hi def link mvPkg_student mvPkgFunc hi def link mvPkg_sumtools mvPkgFunc hi def link mvPkg_tensor mvPkgFunc hi def link mvPkg_totorder mvPkgFunc hi def link mvRange mvOper hi def link mvSemiError mvError hi def link mvDelim Delimiter " Maple->Standard Links {{{2 hi def link mvAssign Delimiter hi def link mvBool Boolean hi def link mvComma Delimiter hi def link mvComment Comment hi def link mvCond Conditional hi def link mvConstant Number hi def link mvDelayEval Label hi def link mvDcolon Delimiter hi def link mvError Error hi def link mvLibrary Statement hi def link mvNumber Number hi def link mvOper Operator hi def link mvAssign Delimiter hi def link mvPackage Type hi def link mvPkgFunc Function hi def link mvPktOption Special hi def link mvRepeat Repeat hi def link mvSpecial Special hi def link mvStatement Statement hi def link mvName String hi def link mvString String hi def link mvTodo Todo endif " Current Syntax: {{{1 let b:current_syntax = "maple" " vim: ts=20 fdm=marker neovim-0.2.2/runtime/syntax/markdown.vim000066400000000000000000000175641320401574200203730ustar00rootroot00000000000000" Vim syntax file " Language: Markdown " Maintainer: Tim Pope " Filenames: *.markdown " Last Change: 2016 Aug 29 if exists("b:current_syntax") finish endif if !exists('main_syntax') let main_syntax = 'markdown' endif runtime! syntax/html.vim unlet! b:current_syntax if !exists('g:markdown_fenced_languages') let g:markdown_fenced_languages = [] endif for s:type in map(copy(g:markdown_fenced_languages),'matchstr(v:val,"[^=]*$")') if s:type =~ '\.' let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*') endif exe 'syn include @markdownHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim' unlet! b:current_syntax endfor unlet! s:type syn sync minlines=10 syn case ignore syn match markdownValid '[<>]\c[a-z/$!]\@!' syn match markdownValid '&\%(#\=\w*;\)\@!' syn match markdownLineStart "^[<@]\@!" nextgroup=@markdownBlock,htmlSpecialChar syn cluster markdownBlock contains=markdownH1,markdownH2,markdownH3,markdownH4,markdownH5,markdownH6,markdownBlockquote,markdownListMarker,markdownOrderedListMarker,markdownCodeBlock,markdownRule syn cluster markdownInline contains=markdownLineBreak,markdownLinkText,markdownItalic,markdownBold,markdownCode,markdownEscape,@htmlTop,markdownError syn match markdownH1 "^.\+\n=\+$" contained contains=@markdownInline,markdownHeadingRule,markdownAutomaticLink syn match markdownH2 "^.\+\n-\+$" contained contains=@markdownInline,markdownHeadingRule,markdownAutomaticLink syn match markdownHeadingRule "^[=-]\+$" contained syn region markdownH1 matchgroup=markdownHeadingDelimiter start="##\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained syn region markdownH2 matchgroup=markdownHeadingDelimiter start="###\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained syn region markdownH3 matchgroup=markdownHeadingDelimiter start="####\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained syn region markdownH4 matchgroup=markdownHeadingDelimiter start="#####\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained syn region markdownH5 matchgroup=markdownHeadingDelimiter start="######\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained syn region markdownH6 matchgroup=markdownHeadingDelimiter start="#######\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained syn match markdownBlockquote ">\%(\s\|$\)" contained nextgroup=@markdownBlock syn region markdownCodeBlock start=" \|\t" end="$" contained " TODO: real nesting syn match markdownListMarker "\%(\t\| \{0,4\}\)[-*+]\%(\s\+\S\)\@=" contained syn match markdownOrderedListMarker "\%(\t\| \{0,4}\)\<\d\+\.\%(\s\+\S\)\@=" contained syn match markdownRule "\* *\* *\*[ *]*$" contained syn match markdownRule "- *- *-[ -]*$" contained syn match markdownLineBreak " \{2,\}$" syn region markdownIdDeclaration matchgroup=markdownLinkDelimiter start="^ \{0,3\}!\=\[" end="\]:" oneline keepend nextgroup=markdownUrl skipwhite syn match markdownUrl "\S\+" nextgroup=markdownUrlTitle skipwhite contained syn region markdownUrl matchgroup=markdownUrlDelimiter start="<" end=">" oneline keepend nextgroup=markdownUrlTitle skipwhite contained syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+"+ end=+"+ keepend contained syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+'+ end=+'+ keepend contained syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+(+ end=+)+ keepend contained syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline let s:concealends = has('conceal') ? ' concealends' : '' exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart' . s:concealends exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart' . s:concealends exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart' . s:concealends exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart' . s:concealends syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```.*$" end="^\s*```\ze\s*$" keepend syn match markdownFootnote "\[^[^\]]\+\]" syn match markdownFootnoteDefinition "^\[^[^\]]\+\]:" if main_syntax ==# 'markdown' for s:type in g:markdown_fenced_languages exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```\s*'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') endfor unlet! s:type endif syn match markdownEscape "\\[][\\`*_{}()<>#+.!-]" syn match markdownError "\w\@<=_\w\@=" hi def link markdownH1 htmlH1 hi def link markdownH2 htmlH2 hi def link markdownH3 htmlH3 hi def link markdownH4 htmlH4 hi def link markdownH5 htmlH5 hi def link markdownH6 htmlH6 hi def link markdownHeadingRule markdownRule hi def link markdownHeadingDelimiter Delimiter hi def link markdownOrderedListMarker markdownListMarker hi def link markdownListMarker htmlTagName hi def link markdownBlockquote Comment hi def link markdownRule PreProc hi def link markdownFootnote Typedef hi def link markdownFootnoteDefinition Typedef hi def link markdownLinkText htmlLink hi def link markdownIdDeclaration Typedef hi def link markdownId Type hi def link markdownAutomaticLink markdownUrl hi def link markdownUrl Float hi def link markdownUrlTitle String hi def link markdownIdDelimiter markdownLinkDelimiter hi def link markdownUrlDelimiter htmlTag hi def link markdownUrlTitleDelimiter Delimiter hi def link markdownItalic htmlItalic hi def link markdownItalicDelimiter markdownItalic hi def link markdownBold htmlBold hi def link markdownBoldDelimiter markdownBold hi def link markdownBoldItalic htmlBoldItalic hi def link markdownBoldItalicDelimiter markdownBoldItalic hi def link markdownCodeDelimiter Delimiter hi def link markdownEscape Special hi def link markdownError Error let b:current_syntax = "markdown" if main_syntax ==# 'markdown' unlet main_syntax endif " vim:set sw=2: neovim-0.2.2/runtime/syntax/masm.vim000066400000000000000000000415111320401574200174730ustar00rootroot00000000000000" Vim syntax file " Language: Microsoft Macro Assembler (80x86) " Orig Author: Rob Brady " Maintainer: Wu Yongwei " Last Change: $Date: 2013/11/13 11:49:24 $ " $Revision: 1.48 $ " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case ignore syn match masmIdentifier "[@a-z_$?][@a-z0-9_$?]*" syn match masmLabel "^\s*[@a-z_$?][@a-z0-9_$?]*:"he=e-1 syn match masmDecimal "[-+]\?\d\+[dt]\?" syn match masmBinary "[-+]\?[0-1]\+[by]" "put this before hex or 0bfh dies! syn match masmOctal "[-+]\?[0-7]\+[oq]" syn match masmHexadecimal "[-+]\?[0-9]\x*h" syn match masmFloatRaw "[-+]\?[0-9]\x*r" syn match masmFloat "[-+]\?\d\+\.\(\d*\(E[-+]\?\d\+\)\?\)\?" syn match masmComment ";.*" contains=@Spell syn region masmComment start=+COMMENT\s*\z(\S\)+ end=+\z1.*+ contains=@Spell syn region masmString start=+'+ end=+'+ oneline contains=@Spell syn region masmString start=+"+ end=+"+ oneline contains=@Spell syn region masmTitleArea start=+\" syn match masmOperator "CARRY?" syn match masmOperator "OVERFLOW?" syn match masmOperator "PARITY?" syn match masmOperator "SIGN?" syn match masmOperator "ZERO?" syn keyword masmDirective ALIAS ASSUME CATSTR COMM DB DD DF DOSSEG DQ DT syn keyword masmDirective DW ECHO ELSE ELSEIF ELSEIF1 ELSEIF2 ELSEIFB syn keyword masmDirective ELSEIFDEF ELSEIFDIF ELSEIFDIFI ELSEIFE syn keyword masmDirective ELSEIFIDN ELSEIFIDNI ELSEIFNB ELSEIFNDEF END syn keyword masmDirective ENDIF ENDM ENDP ENDS EQU EVEN EXITM EXTERN syn keyword masmDirective EXTERNDEF EXTRN FOR FORC GOTO GROUP IF IF1 IF2 syn keyword masmDirective IFB IFDEF IFDIF IFDIFI IFE IFIDN IFIDNI IFNB syn keyword masmDirective IFNDEF INCLUDE INCLUDELIB INSTR INVOKE IRP syn keyword masmDirective IRPC LABEL LOCAL MACRO NAME OPTION ORG PAGE syn keyword masmDirective POPCONTEXT PROC PROTO PUBLIC PURGE PUSHCONTEXT syn keyword masmDirective RECORD REPEAT REPT SEGMENT SIZESTR STRUC syn keyword masmDirective STRUCT SUBSTR SUBTITLE SUBTTL TEXTEQU TITLE syn keyword masmDirective TYPEDEF UNION WHILE syn match masmDirective "\.8086\>" syn match masmDirective "\.8087\>" syn match masmDirective "\.NO87\>" syn match masmDirective "\.186\>" syn match masmDirective "\.286\>" syn match masmDirective "\.286C\>" syn match masmDirective "\.286P\>" syn match masmDirective "\.287\>" syn match masmDirective "\.386\>" syn match masmDirective "\.386C\>" syn match masmDirective "\.386P\>" syn match masmDirective "\.387\>" syn match masmDirective "\.486\>" syn match masmDirective "\.486P\>" syn match masmDirective "\.586\>" syn match masmDirective "\.586P\>" syn match masmDirective "\.686\>" syn match masmDirective "\.686P\>" syn match masmDirective "\.K3D\>" syn match masmDirective "\.MMX\>" syn match masmDirective "\.XMM\>" syn match masmDirective "\.ALPHA\>" syn match masmDirective "\.DOSSEG\>" syn match masmDirective "\.SEQ\>" syn match masmDirective "\.CODE\>" syn match masmDirective "\.CONST\>" syn match masmDirective "\.DATA\>" syn match masmDirective "\.DATA?" syn match masmDirective "\.EXIT\>" syn match masmDirective "\.FARDATA\>" syn match masmDirective "\.FARDATA?" syn match masmDirective "\.MODEL\>" syn match masmDirective "\.STACK\>" syn match masmDirective "\.STARTUP\>" syn match masmDirective "\.IF\>" syn match masmDirective "\.ELSE\>" syn match masmDirective "\.ELSEIF\>" syn match masmDirective "\.ENDIF\>" syn match masmDirective "\.REPEAT\>" syn match masmDirective "\.UNTIL\>" syn match masmDirective "\.UNTILCXZ\>" syn match masmDirective "\.WHILE\>" syn match masmDirective "\.ENDW\>" syn match masmDirective "\.BREAK\>" syn match masmDirective "\.CONTINUE\>" syn match masmDirective "\.ERR\>" syn match masmDirective "\.ERR1\>" syn match masmDirective "\.ERR2\>" syn match masmDirective "\.ERRB\>" syn match masmDirective "\.ERRDEF\>" syn match masmDirective "\.ERRDIF\>" syn match masmDirective "\.ERRDIFI\>" syn match masmDirective "\.ERRE\>" syn match masmDirective "\.ERRIDN\>" syn match masmDirective "\.ERRIDNI\>" syn match masmDirective "\.ERRNB\>" syn match masmDirective "\.ERRNDEF\>" syn match masmDirective "\.ERRNZ\>" syn match masmDirective "\.LALL\>" syn match masmDirective "\.SALL\>" syn match masmDirective "\.XALL\>" syn match masmDirective "\.LFCOND\>" syn match masmDirective "\.SFCOND\>" syn match masmDirective "\.TFCOND\>" syn match masmDirective "\.CREF\>" syn match masmDirective "\.NOCREF\>" syn match masmDirective "\.XCREF\>" syn match masmDirective "\.LIST\>" syn match masmDirective "\.NOLIST\>" syn match masmDirective "\.XLIST\>" syn match masmDirective "\.LISTALL\>" syn match masmDirective "\.LISTIF\>" syn match masmDirective "\.NOLISTIF\>" syn match masmDirective "\.LISTMACRO\>" syn match masmDirective "\.NOLISTMACRO\>" syn match masmDirective "\.LISTMACROALL\>" syn match masmDirective "\.FPO\>" syn match masmDirective "\.RADIX\>" syn match masmDirective "\.SAFESEH\>" syn match masmDirective "%OUT\>" syn match masmDirective "ALIGN\>" syn match masmOption "ALIGN([0-9]\+)" syn keyword masmRegister AX BX CX DX SI DI BP SP syn keyword masmRegister CS DS SS ES FS GS syn keyword masmRegister AH BH CH DH AL BL CL DL syn keyword masmRegister EAX EBX ECX EDX ESI EDI EBP ESP syn keyword masmRegister CR0 CR2 CR3 CR4 syn keyword masmRegister DR0 DR1 DR2 DR3 DR6 DR7 syn keyword masmRegister TR3 TR4 TR5 TR6 TR7 syn match masmRegister "ST([0-7])" " x86-64 registers syn keyword masmRegister RAX RBX RCX RDX RSI RDI RBP RSP syn keyword masmRegister R8 R9 R10 R11 R12 R13 R14 R15 syn keyword masmRegister R8D R9D R10D R11D R12D R13D R14D R15D syn keyword masmRegister R8W R9W R10W R11W R12W R13W R14W R15W syn keyword masmRegister R8B R9B R10B R11B R12B R13B R14B R15B " SSE/AVX registers syn match masmRegister "\(X\|Y\)MM[0-9]\>" syn match masmRegister "\(X\|Y\)MM1[0-5]\>" " Instruction prefixes syn keyword masmOpcode LOCK REP REPE REPNE REPNZ REPZ " 8086/8088 opcodes syn keyword masmOpcode AAA AAD AAM AAS ADC ADD AND CALL CBW CLC CLD syn keyword masmOpcode CLI CMC CMP CMPS CMPSB CMPSW CWD DAA DAS DEC syn keyword masmOpcode DIV ESC HLT IDIV IMUL IN INC INT INTO IRET syn keyword masmOpcode JCXZ JMP LAHF LDS LEA LES LODS LODSB LODSW syn keyword masmOpcode LOOP LOOPE LOOPEW LOOPNE LOOPNEW LOOPNZ syn keyword masmOpcode LOOPNZW LOOPW LOOPZ LOOPZW MOV MOVS MOVSB syn keyword masmOpcode MOVSW MUL NEG NOP NOT OR OUT POP POPF PUSH syn keyword masmOpcode PUSHF RCL RCR RET RETF RETN ROL ROR SAHF SAL syn keyword masmOpcode SAR SBB SCAS SCASB SCASW SHL SHR STC STD STI syn keyword masmOpcode STOS STOSB STOSW SUB TEST WAIT XCHG XLAT XLATB syn keyword masmOpcode XOR syn match masmOpcode "J\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" " 80186 opcodes syn keyword masmOpcode BOUND ENTER INS INSB INSW LEAVE OUTS OUTSB syn keyword masmOpcode OUTSW POPA PUSHA PUSHW " 80286 opcodes syn keyword masmOpcode ARPL LAR LSL SGDT SIDT SLDT SMSW STR VERR VERW " 80286/80386 privileged opcodes syn keyword masmOpcode CLTS LGDT LIDT LLDT LMSW LTR " 80386 opcodes syn keyword masmOpcode BSF BSR BT BTC BTR BTS CDQ CMPSD CWDE INSD syn keyword masmOpcode IRETD IRETDF IRETF JECXZ LFS LGS LODSD LOOPD syn keyword masmOpcode LOOPED LOOPNED LOOPNZD LOOPZD LSS MOVSD MOVSX syn keyword masmOpcode MOVZX OUTSD POPAD POPFD PUSHAD PUSHD PUSHFD syn keyword masmOpcode SCASD SHLD SHRD STOSD syn match masmOpcode "SET\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" " 80486 opcodes syn keyword masmOpcode BSWAP CMPXCHG INVD INVLPG WBINVD XADD " Floating-point opcodes as of 487 syn keyword masmOpFloat F2XM1 FABS FADD FADDP FBLD FBSTP FCHS FCLEX syn keyword masmOpFloat FNCLEX FCOM FCOMP FCOMPP FCOS FDECSTP FDISI syn keyword masmOpFloat FNDISI FDIV FDIVP FDIVR FDIVRP FENI FNENI syn keyword masmOpFloat FFREE FIADD FICOM FICOMP FIDIV FIDIVR FILD syn keyword masmOpFloat FIMUL FINCSTP FINIT FNINIT FIST FISTP FISUB syn keyword masmOpFloat FISUBR FLD FLDCW FLDENV FLDLG2 FLDLN2 FLDL2E syn keyword masmOpFloat FLDL2T FLDPI FLDZ FLD1 FMUL FMULP FNOP FPATAN syn keyword masmOpFloat FPREM FPREM1 FPTAN FRNDINT FRSTOR FSAVE FNSAVE syn keyword masmOpFloat FSCALE FSETPM FSIN FSINCOS FSQRT FST FSTCW syn keyword masmOpFloat FNSTCW FSTENV FNSTENV FSTP FSTSW FNSTSW FSUB syn keyword masmOpFloat FSUBP FSUBR FSUBRP FTST FUCOM FUCOMP FUCOMPP syn keyword masmOpFloat FWAIT FXAM FXCH FXTRACT FYL2X FYL2XP1 " Floating-point opcodes in Pentium and later processors syn keyword masmOpFloat FCMOVE FCMOVNE FCMOVB FCMOVBE FCMOVNB FCMOVNBE syn keyword masmOpFloat FCMOVU FCMOVNU FCOMI FUCOMI FCOMIP FUCOMIP syn keyword masmOpFloat FXSAVE FXRSTOR " MMX opcodes (Pentium w/ MMX, Pentium II, and later) syn keyword masmOpcode MOVD MOVQ PACKSSWB PACKSSDW PACKUSWB syn keyword masmOpcode PUNPCKHBW PUNPCKHWD PUNPCKHDQ syn keyword masmOpcode PUNPCKLBW PUNPCKLWD PUNPCKLDQ syn keyword masmOpcode PADDB PADDW PADDD PADDSB PADDSW PADDUSB PADDUSW syn keyword masmOpcode PSUBB PSUBW PSUBD PSUBSB PSUBSW PSUBUSB PSUBUSW syn keyword masmOpcode PMULHW PMULLW PMADDWD syn keyword masmOpcode PCMPEQB PCMPEQW PCMPEQD PCMPGTB PCMPGTW PCMPGTD syn keyword masmOpcode PAND PANDN POR PXOR syn keyword masmOpcode PSLLW PSLLD PSLLQ PSRLW PSRLD PSRLQ PSRAW PSRAD syn keyword masmOpcode EMMS " SSE opcodes (Pentium III and later) syn keyword masmOpcode MOVAPS MOVUPS MOVHPS MOVHLPS MOVLPS MOVLHPS syn keyword masmOpcode MOVMSKPS MOVSS syn keyword masmOpcode ADDPS ADDSS SUBPS SUBSS MULPS MULSS DIVPS DIVSS syn keyword masmOpcode RCPPS RCPSS SQRTPS SQRTSS RSQRTPS RSQRTSS syn keyword masmOpcode MAXPS MAXSS MINPS MINSS syn keyword masmOpcode CMPPS CMPSS COMISS UCOMISS syn keyword masmOpcode ANDPS ANDNPS ORPS XORPS syn keyword masmOpcode SHUFPS UNPCKHPS UNPCKLPS syn keyword masmOpcode CVTPI2PS CVTSI2SS CVTPS2PI CVTTPS2PI syn keyword masmOpcode CVTSS2SI CVTTSS2SI syn keyword masmOpcode LDMXCSR STMXCSR syn keyword masmOpcode PAVGB PAVGW PEXTRW PINSRW PMAXUB PMAXSW syn keyword masmOpcode PMINUB PMINSW PMOVMSKB PMULHUW PSADBW PSHUFW syn keyword masmOpcode MASKMOVQ MOVNTQ MOVNTPS SFENCE syn keyword masmOpcode PREFETCHT0 PREFETCHT1 PREFETCHT2 PREFETCHNTA " SSE2 opcodes (Pentium 4 and later) syn keyword masmOpcode MOVAPD MOVUPD MOVHPD MOVLPD MOVMSKPD MOVSD syn keyword masmOpcode ADDPD ADDSD SUBPD SUBSD MULPD MULSD DIVPD DIVSD syn keyword masmOpcode SQRTPD SQRTSD MAXPD MAXSD MINPD MINSD syn keyword masmOpcode ANDPD ANDNPD ORPD XORPD syn keyword masmOpcode CMPPD CMPSD COMISD UCOMISD syn keyword masmOpcode SHUFPD UNPCKHPD UNPCKLPD syn keyword masmOpcode CVTPD2PI CVTTPD2PI CVTPI2PD CVTPD2DQ syn keyword masmOpcode CVTTPD2DQ CVTDQ2PD CVTPS2PD CVTPD2PS syn keyword masmOpcode CVTSS2SD CVTSD2SS CVTSD2SI CVTTSD2SI CVTSI2SD syn keyword masmOpcode CVTDQ2PS CVTPS2DQ CVTTPS2DQ syn keyword masmOpcode MOVDQA MOVDQU MOVQ2DQ MOVDQ2Q PMULUDQ syn keyword masmOpcode PADDQ PSUBQ PSHUFLW PSHUFHW PSHUFD syn keyword masmOpcode PSLLDQ PSRLDQ PUNPCKHQDQ PUNPCKLQDQ syn keyword masmOpcode CLFLUSH LFENCE MFENCE PAUSE MASKMOVDQU syn keyword masmOpcode MOVNTPD MOVNTDQ MOVNTI " SSE3 opcodes (Pentium 4 w/ Hyper-Threading and later) syn keyword masmOpcode FISTTP LDDQU ADDSUBPS ADDSUBPD syn keyword masmOpcode HADDPS HSUBPS HADDPD HSUBPD syn keyword masmOpcode MOVSHDUP MOVSLDUP MOVDDUP MONITOR MWAIT " SSSE3 opcodes (Core and later) syn keyword masmOpcode PSIGNB PSIGNW PSIGND PABSB PABSW PABSD syn keyword masmOpcode PALIGNR PSHUFB PMULHRSW PMADDUBSW syn keyword masmOpcode PHSUBW PHSUBD PHSUBSW PHADDW PHADDD PHADDSW " SSE 4.1 opcodes (Penryn and later) syn keyword masmOpcode MPSADBW PHMINPOSUW PMULDQ PMULLD DPPS DPPD syn keyword masmOpcode BLENDPS BLENDPD BLENDVPS BLENDVPD syn keyword masmOpcode PBLENDVB PBLENDW syn keyword masmOpcode PMINSB PMAXSB PMINSD PMAXSD syn keyword masmOpcode PMINUW PMAXUW PMINUD PMAXUD syn keyword masmOpcode ROUNDPS ROUNDSS ROUNDPD ROUNDSD syn keyword masmOpcode INSERTPS PINSRB PINSRD PINSRQ syn keyword masmOpcode EXTRACTPS PEXTRB PEXTRD PEXTRQ syn keyword masmOpcode PMOVSXBW PMOVZXBW PMOVSXBD PMOVZXBD syn keyword masmOpcode PMOVSXBQ PMOVZXBQ PMOVSXWD PMOVZXWD syn keyword masmOpcode PMOVSXWQ PMOVZXWQ PMOVSXDQ PMOVZXDQ syn keyword masmOpcode PTEST PCMPEQQ PACKUSDW MOVNTDQA " SSE 4.2 opcodes (Nehalem and later) syn keyword masmOpcode PCMPESTRI PCMPESTRM PCMPISTRI PCMPISTRM PCMPGTQ syn keyword masmOpcode CRC32 POPCNT LZCNT " AES-NI (Westmere (2010) and later) syn keyword masmOpcode AESENC AESENCLAST AESDEC AESDECLAST syn keyword masmOpcode AESKEYGENASSIST AESIMC PCLMULQDQ " AVX (Sandy Bridge (2011) and later) syn keyword masmOpcode VBROADCASTSS VBROADCASTSD VBROADCASTF128 syn keyword masmOpcode VINSERTF128 VEXTRACTF128 VMASKMOVPS VMASKMOVPD syn keyword masmOpcode VPERMILPS VPERMILPD VPERM2F128 syn keyword masmOpcode VZEROALL VZEROUPPER " Other opcodes in Pentium and later processors syn keyword masmOpcode CMPXCHG8B CPUID UD2 syn keyword masmOpcode RSM RDMSR WRMSR RDPMC RDTSC SYSENTER SYSEXIT syn match masmOpcode "CMOV\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" " The default highlighting hi def link masmLabel PreProc hi def link masmComment Comment hi def link masmDirective Statement hi def link masmType Type hi def link masmOperator Type hi def link masmOption Special hi def link masmRegister Special hi def link masmString String hi def link masmText String hi def link masmTitle Title hi def link masmOpcode Statement hi def link masmOpFloat Statement hi def link masmHexadecimal Number hi def link masmDecimal Number hi def link masmOctal Number hi def link masmBinary Number hi def link masmFloatRaw Number hi def link masmFloat Number hi def link masmIdentifier Identifier syntax sync minlines=50 let b:current_syntax = "masm" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/mason.vim000066400000000000000000000073521320401574200176600ustar00rootroot00000000000000" Vim syntax file " Language: Mason (Perl embedded in HTML) " Maintainer: vim-perl " Homepage: http://github.com/vim-perl/vim-perl/tree/master " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2017-09-12 " Contributors: Hinrik Örn Sigurðsson " Andrew Smith " " TODO: " - Fix <%text> blocks to show HTML tags but ignore Mason tags. " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " The HTML syntax file included below uses this variable. " if !exists("main_syntax") let main_syntax = 'mason' endif " First pull in the HTML syntax. " runtime! syntax/html.vim unlet b:current_syntax syn cluster htmlPreproc add=@masonTop " Now pull in the Perl syntax. " syn include @perlTop syntax/perl.vim unlet b:current_syntax syn include @podTop syntax/pod.vim " It's hard to reduce down to the correct sub-set of Perl to highlight in some " of these cases so I've taken the safe option of just using perlTop in all of " them. If you have any suggestions, please let me know. " syn region masonPod start="^=[a-z]" end="^=cut" keepend contained contains=@podTop syn cluster perlTop remove=perlBraces syn region masonLine matchgroup=Delimiter start="^%" end="$" keepend contains=@perlTop syn region masonPerlComment start="#" end="\%(%>\)\@=\|$" contained contains=perlTodo,@Spell syn region masonExpr matchgroup=Delimiter start="<%" end="%>" contains=@perlTop,masonPerlComment syn region masonPerl matchgroup=Delimiter start="<%perl>" end="" contains=masonPod,@perlTop syn region masonComp keepend matchgroup=Delimiter start="<&\s*\%([-._/[:alnum:]]\+:\)\?[-._/[:alnum:]]*" end="&>" contains=@perlTop syn region masonComp keepend matchgroup=Delimiter skipnl start="<&|\s*\%([-._/[:alnum:]]\+:\)\?[-._/[:alnum:]]*" end="&>" contains=@perlTop nextgroup=masonCompContent syn region masonCompContent matchgroup=Delimiter start="" end="" contained contains=@masonTop syn region masonArgs matchgroup=Delimiter start="<%args>" end="" contains=masonPod,@perlTop syn region masonInit matchgroup=Delimiter start="<%init>" end="" contains=masonPod,@perlTop syn region masonCleanup matchgroup=Delimiter start="<%cleanup>" end="" contains=masonPod,@perlTop syn region masonOnce matchgroup=Delimiter start="<%once>" end="" contains=masonPod,@perlTop syn region masonClass matchgroup=Delimiter start="<%class>" end="" contains=masonPod,@perlTop syn region masonShared matchgroup=Delimiter start="<%shared>" end="" contains=masonPod,@perlTop syn region masonDef matchgroup=Delimiter start="<%def\s*[-._/[:alnum:]]\+\s*>" end="" contains=@htmlTop syn region masonMethod matchgroup=Delimiter start="<%method\s*[-._/[:alnum:]]\+\s*>" end="" contains=@htmlTop syn region masonFlags matchgroup=Delimiter start="<%flags>" end="" contains=masonPod,@perlTop syn region masonAttr matchgroup=Delimiter start="<%attr>" end="" contains=masonPod,@perlTop syn region masonFilter matchgroup=Delimiter start="<%filter>" end="" contains=masonPod,@perlTop syn region masonDoc matchgroup=Delimiter start="<%doc>" end="" syn region masonText matchgroup=Delimiter start="<%text>" end="" syn cluster masonTop contains=masonLine,masonExpr,masonPerl,masonComp,masonArgs,masonInit,masonCleanup,masonOnce,masonShared,masonDef,masonMethod,masonFlags,masonAttr,masonFilter,masonDoc,masonText " Set up default highlighting. Almost all of this is done in the included " syntax files. hi def link masonDoc Comment hi def link masonPod Comment hi def link masonPerlComment perlComment let b:current_syntax = "mason" if main_syntax == 'mason' unlet main_syntax endif neovim-0.2.2/runtime/syntax/master.vim000066400000000000000000000017761320401574200200420ustar00rootroot00000000000000" Vim syntax file " Language: Focus Master File " Maintainer: Rob Brady " Last Change: $Date: 2004/06/13 15:54:03 $ " URL: http://www.datatone.com/~robb/vim/syntax/master.vim " $Revision: 1.1 $ " this is a very simple syntax file - I will be improving it " add entire DEFINE syntax " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match " A bunch of useful keywords syn keyword masterKeyword FILENAME SUFFIX SEGNAME SEGTYPE PARENT FIELDNAME syn keyword masterKeyword FIELD ALIAS USAGE INDEX MISSING ON syn keyword masterKeyword FORMAT CRFILE CRKEY syn keyword masterDefine DEFINE DECODE EDIT syn region masterString start=+"+ end=+"+ syn region masterString start=+'+ end=+'+ syn match masterComment "\$.*" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link masterKeyword Keyword hi def link masterComment Comment hi def link masterString String let b:current_syntax = "master" " vim: ts=8 neovim-0.2.2/runtime/syntax/matlab.vim000066400000000000000000000100451320401574200177740ustar00rootroot00000000000000" Vim syntax file " Language: Matlab " Maintainer: Alex Burka " Credits: Preben 'Peppe' Guldberg " Maurizio Tranchero - maurizio(.)tranchero(@)gmail(.)com " Original author: Mario Eusebio " Last Change: Mon Jan 23 2017 " added support for cell mode " Change History: " - now highlights cell-mode separator comments " - 'global' and 'persistent' keyword are now recognized " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn keyword matlabStatement return syn keyword matlabLabel case switch syn keyword matlabConditional else elseif end if otherwise syn keyword matlabRepeat do for while " MT_ADDON - added exception-specific keywords syn keyword matlabExceptions try catch syn keyword matlabOO classdef properties events methods syn keyword matlabTodo contained TODO syn keyword matlabScope global persistent " If you do not want these operators lit, uncommment them and the "hi link" below syn match matlabArithmeticOperator "[-+]" syn match matlabArithmeticOperator "\.\=[*/\\^]" syn match matlabRelationalOperator "[=~]=" syn match matlabRelationalOperator "[<>]=\=" syn match matlabLogicalOperator "[&|~]" syn match matlabLineContinuation "\.\{3}" "syn match matlabIdentifier "\<\a\w*\>" " String " MT_ADDON - added 'skip' in order to deal with 'tic' escaping sequence syn region matlabString start=+'+ end=+'+ oneline skip=+''+ " If you don't like tabs syn match matlabTab "\t" " Standard numbers syn match matlabNumber "\<\d\+[ij]\=\>" " floating point number, with dot, optional exponent syn match matlabFloat "\<\d\+\(\.\d*\)\=\([edED][-+]\=\d\+\)\=[ij]\=\>" " floating point number, starting with a dot, optional exponent syn match matlabFloat "\.\d\+\([edED][-+]\=\d\+\)\=[ij]\=\>" " Transpose character and delimiters: Either use just [...] or (...) aswell syn match matlabDelimiter "[][]" "syn match matlabDelimiter "[][()]" syn match matlabTransposeOperator "[])a-zA-Z0-9.]'"lc=1 syn match matlabSemicolon ";" syn match matlabComment "%.*$" contains=matlabTodo,matlabTab " MT_ADDON - correctly highlights words after '...' as comments syn match matlabComment "\.\.\..*$" contains=matlabTodo,matlabTab syn region matlabMultilineComment start=+%{+ end=+%}+ contains=matlabTodo,matlabTab syn match matlabCellComment "^%%.*$" syn keyword matlabOperator break zeros default margin round ones rand syn keyword matlabOperator ceil floor size clear zeros eye mean std cov syn keyword matlabFunction error eval function syn keyword matlabImplicit abs acos atan asin cos cosh exp log prod sum syn keyword matlabImplicit log10 max min sign sin sinh sqrt tan reshape syn match matlabError "-\=\<\d\+\.\d\+\.[^*/\\^]" syn match matlabError "-\=\<\d\+\.\d\+[eEdD][-+]\=\d\+\.\([^*/\\^]\)" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link matlabTransposeOperator matlabOperator hi def link matlabOperator Operator hi def link matlabLineContinuation Special hi def link matlabLabel Label hi def link matlabConditional Conditional hi def link matlabExceptions Conditional hi def link matlabRepeat Repeat hi def link matlabTodo Todo hi def link matlabString String hi def link matlabDelimiter Identifier hi def link matlabTransposeOther Identifier hi def link matlabNumber Number hi def link matlabFloat Float hi def link matlabFunction Function hi def link matlabError Error hi def link matlabImplicit matlabStatement hi def link matlabStatement Statement hi def link matlabOO Statement hi def link matlabSemicolon SpecialChar hi def link matlabComment Comment hi def link matlabMultilineComment Comment hi def link matlabCellComment Todo hi def link matlabScope Type hi def link matlabArithmeticOperator matlabOperator hi def link matlabRelationalOperator matlabOperator hi def link matlabLogicalOperator matlabOperator "optional highlighting "hi def link matlabIdentifier Identifier "hi def link matlabTab Error let b:current_syntax = "matlab" "EOF vim: ts=8 noet tw=100 sw=8 sts=0 neovim-0.2.2/runtime/syntax/maxima.vim000066400000000000000000000445621320401574200200230ustar00rootroot00000000000000" Vim syntax file " Language: Maxima (symbolic algebra program) " Maintainer: Robert Dodier (robert.dodier@gmail.com) " Last Change: April 6, 2006 " Version: 1 " Adapted mostly from xmath.vim " Number formats adapted from r.vim " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn sync lines=1000 " parenthesis sanity checker syn region maximaZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,maximaError,maximaBraceError,maximaCurlyError syn region maximaZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,maximaError,maximaBraceError,maximaParenError syn region maximaZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,maximaError,maximaCurlyError,maximaParenError syn match maximaError "[)\]}]" syn match maximaBraceError "[)}]" contained syn match maximaCurlyError "[)\]]" contained syn match maximaParenError "[\]}]" contained syn match maximaComma "[\[\](),;]" syn match maximaComma "\.\.\.$" " A bunch of useful maxima keywords syn keyword maximaConditional if then else elseif and or not syn keyword maximaRepeat do for thru " ---------------------- BEGIN LIST OF ALL FUNCTIONS (EXCEPT KEYWORDS) ---------------------- syn keyword maximaFunc abasep abs absboxchar absint acos acosh acot acoth acsc syn keyword maximaFunc acsch activate activecontexts addcol additive addrow adim syn keyword maximaFunc adjoint af aform airy algebraic algepsilon algexact algsys syn keyword maximaFunc alg_type alias aliases allbut all_dotsimp_denoms allroots allsym syn keyword maximaFunc alphabetic antid antidiff antisymmetric append appendfile syn keyword maximaFunc apply apply1 apply2 applyb1 apropos args array arrayapply syn keyword maximaFunc arrayinfo arraymake arrays asec asech asin asinh askexp syn keyword maximaFunc askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume syn keyword maximaFunc assume_pos assume_pos_pred assumescalar asymbol asympa at atan syn keyword maximaFunc atan2 atanh atensimp atom atomgrad atrig1 atvalue augcoefmatrix syn keyword maximaFunc av backsubst backtrace bashindices batch batchload bc2 bdvac syn keyword maximaFunc berlefact bern bernpoly bessel besselexpand bessel_i bessel_j syn keyword maximaFunc bessel_k bessel_y beta bezout bffac bfhzeta bfloat bfloatp syn keyword maximaFunc bfpsi bfpsi0 bftorat bftrunc bfzeta bimetric binomial block syn keyword maximaFunc bothcoef box boxchar break breakup bug_report build_info buildq syn keyword maximaFunc burn cabs canform canten carg cartan catch cauchysum cbffac syn keyword maximaFunc cdisplay cf cfdisrep cfexpand cflength cframe_flag cgeodesic syn keyword maximaFunc changename changevar charpoly checkdiv check_overlaps christof syn keyword maximaFunc clear_rules closefile closeps cmetric cnonmet_flag coeff syn keyword maximaFunc coefmatrix cograd col collapse columnvector combine commutative syn keyword maximaFunc comp2pui compfile compile compile_file components concan concat syn keyword maximaFunc conj conjugate conmetderiv cons constant constantp cont2part syn keyword maximaFunc content context contexts contortion contract contragrad coord syn keyword maximaFunc copylist copymatrix cos cosh cosnpiflag cot coth covdiff syn keyword maximaFunc covect create_list csc csch csetup ctaylor ctaypov ctaypt syn keyword maximaFunc ctayswitch ctayvar ct_coords ct_coordsys ctorsion_flag ctransform syn keyword maximaFunc ctrgsimp current_let_rule_package dblint deactivate debugmode syn keyword maximaFunc declare declare_translated declare_weight decsym syn keyword maximaFunc default_let_rule_package defcon define define_variable defint syn keyword maximaFunc defmatch defrule deftaylor del delete deleten delta demo syn keyword maximaFunc demoivre denom dependencies depends derivabbrev derivdegree syn keyword maximaFunc derivlist derivsubst describe desolve determinant detout syn keyword maximaFunc diagmatrix diagmatrixp diagmetric diff dim dimension direct syn keyword maximaFunc disolate disp dispcon dispflag dispform dispfun display syn keyword maximaFunc display2d display_format_internal disprule dispterms distrib syn keyword maximaFunc divide divsum doallmxops domain domxexpt domxmxops domxnctimes syn keyword maximaFunc dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp syn keyword maximaFunc dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules syn keyword maximaFunc dotsimp dpart dscalar %e echelon %edispflag eigenvalues syn keyword maximaFunc eigenvectors eighth einstein eivals eivects ele2comp syn keyword maximaFunc ele2polynome ele2pui elem eliminate elliptic_e elliptic_ec syn keyword maximaFunc elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix %emode syn keyword maximaFunc endcons entermatrix entertensor entier %enumer equal equalp erf syn keyword maximaFunc erfflag errcatch error errormsg error_size error_syms syn keyword maximaFunc %e_to_numlog euler ev eval evenp every evflag evfun evundiff syn keyword maximaFunc example exp expand expandwrt expandwrt_denom expandwrt_factored syn keyword maximaFunc explose expon exponentialize expop express expt exptdispflag syn keyword maximaFunc exptisolate exptsubst extdiff extract_linear_equations ezgcd syn keyword maximaFunc facexpand factcomb factlim factor factorflag factorial factorout syn keyword maximaFunc factorsum facts false fast_central_elements fast_linsolve syn keyword maximaFunc fasttimes fb feature featurep features fft fib fibtophi fifth syn keyword maximaFunc filename_merge file_search file_search_demo file_search_lisp syn keyword maximaFunc file_search_maxima file_type fillarray findde first fix flatten syn keyword maximaFunc flipflag float float2bf floatnump flush flush1deriv flushd syn keyword maximaFunc flushnd forget fortindent fortran fortspaces fourcos fourexpand syn keyword maximaFunc fourier fourint fourintcos fourintsin foursimp foursin fourth syn keyword maximaFunc fpprec fpprintprec frame_bracket freeof fullmap fullmapl syn keyword maximaFunc fullratsimp fullratsubst funcsolve functions fundef funmake funp syn keyword maximaFunc gamma %gamma gammalim gauss gcd gcdex gcfactor gdet genfact syn keyword maximaFunc genindex genmatrix gensumnum get getchar gfactor gfactorsum syn keyword maximaFunc globalsolve go gradef gradefs gramschmidt grind grobner_basis syn keyword maximaFunc gschmit hach halfangles hermite hipow hodge horner i0 i1 syn keyword maximaFunc *read-base* ic1 ic2 icc1 icc2 ic_convert ichr1 ichr2 icounter syn keyword maximaFunc icurvature ident idiff idim idummy idummyx ieqn ieqnprint ifb syn keyword maximaFunc ifc1 ifc2 ifg ifgi ifr iframe_bracket_form iframes ifri ift syn keyword maximaFunc igeodesic_coords igeowedge_flag ikt1 ikt2 ilt imagpart imetric syn keyword maximaFunc inchar indexed_tensor indices inf %inf infeval infinity infix syn keyword maximaFunc inflag infolists init_atensor init_ctensor inm inmc1 inmc2 syn keyword maximaFunc innerproduct in_netmath inpart inprod inrt integerp integrate syn keyword maximaFunc integrate_use_rootsof integration_constant_counter interpolate syn keyword maximaFunc intfaclim intopois intosum intpolabs intpolerror intpolrel syn keyword maximaFunc invariant1 invariant2 inverse_jacobi_cd inverse_jacobi_cn syn keyword maximaFunc inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn syn keyword maximaFunc inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd syn keyword maximaFunc inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd syn keyword maximaFunc inverse_jacobi_sn invert is ishow isolate isolate_wrt_times syn keyword maximaFunc isqrt itr j0 j1 jacobi jacobi_cd jacobi_cn jacobi_cs jacobi_dc syn keyword maximaFunc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_sc syn keyword maximaFunc jacobi_sd jacobi_sn jn kdels kdelta keepfloat kill killcontext syn keyword maximaFunc kinvariant kostka kt labels lambda laplace lassociative last syn keyword maximaFunc lc2kdt lc_l lcm lc_u ldefint ldisp ldisplay leinstein length syn keyword maximaFunc let letrat let_rule_packages letrules letsimp levi_civita lfg syn keyword maximaFunc lfreeof lg lgtreillis lhospitallim lhs liediff limit limsubst syn keyword maximaFunc linear linechar linel linenum linsolve linsolve_params syn keyword maximaFunc linsolvewarn listarith listarray listconstvars listdummyvars syn keyword maximaFunc list_nc_monomials listoftens listofvars listp lmxchar load syn keyword maximaFunc loadfile loadprint local log logabs logarc logconcoeffp syn keyword maximaFunc logcontract logexpand lognegint lognumer logsimp lopow syn keyword maximaFunc lorentz_gauge lpart lratsubst lriem lriemann lsum ltreillis syn keyword maximaFunc m1pbranch macroexpansion mainvar make_array makebox makefact syn keyword maximaFunc makegamma makelist make_random_state make_transform map mapatom syn keyword maximaFunc maperror maplist matchdeclare matchfix matrix matrix_element_add syn keyword maximaFunc matrix_element_mult matrix_element_transpose matrixmap matrixp syn keyword maximaFunc mattrace max maxapplydepth maxapplyheight maxnegex maxposex syn keyword maximaFunc maxtayorder member min %minf minfactorial minor mod syn keyword maximaFunc mode_check_errorp mode_checkp mode_check_warnp mode_declare syn keyword maximaFunc mode_identity modulus mon2schur mono monomial_dimensions syn keyword maximaFunc multi_elem multinomial multi_orbit multiplicative multiplicities syn keyword maximaFunc multi_pui multsym multthru myoptions nc_degree ncexpt ncharpoly syn keyword maximaFunc negdistrib negsumdispflag newcontext newdet newton niceindices syn keyword maximaFunc niceindicespref ninth nm nmc noeval nolabels nonmetricity syn keyword maximaFunc nonscalar nonscalarp noun noundisp nounify nouns np npi syn keyword maximaFunc nptetrad nroots nterms ntermst nthroot ntrig num numberp numer syn keyword maximaFunc numerval numfactor nusum obase oddp ode2 op openplot_curves syn keyword maximaFunc operatorp opproperties opsubst optimize optimprefix optionset syn keyword maximaFunc orbit ordergreat ordergreatp orderless orderlessp outative syn keyword maximaFunc outchar outermap outofpois packagefile pade part part2cont syn keyword maximaFunc partfrac partition partpol partswitch permanent permut petrov syn keyword maximaFunc pfeformat pi pickapart piece playback plog plot2d plot2d_ps syn keyword maximaFunc plot3d plot_options poisdiff poisexpt poisint poislim poismap syn keyword maximaFunc poisplus poissimp poisson poissubst poistimes poistrim polarform syn keyword maximaFunc polartorect polynome2ele posfun potential powerdisp powers syn keyword maximaFunc powerseries pred prederror primep print printpois printprops syn keyword maximaFunc prodhack prodrac product programmode prompt properties props syn keyword maximaFunc propvars pscom psdraw_curve psexpand psi pui pui2comp pui2ele syn keyword maximaFunc pui2polynome pui_direct puireduc put qput qq quad_qag quad_qagi syn keyword maximaFunc quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quanc8 quit syn keyword maximaFunc qunit quotient radcan radexpand radsubstflag random rank syn keyword maximaFunc rassociative rat ratalgdenom ratchristof ratcoef ratdenom syn keyword maximaFunc ratdenomdivide ratdiff ratdisrep rateinstein ratepsilon ratexpand syn keyword maximaFunc ratfac ratmx ratnumer ratnump ratp ratprint ratriemann ratsimp syn keyword maximaFunc ratsimpexpons ratsubst ratvars ratweight ratweights ratweyl syn keyword maximaFunc ratwtlvl read readonly realonly realpart realroots rearray syn keyword maximaFunc rectform recttopolar rediff refcheck rem remainder remarray syn keyword maximaFunc rembox remcomps remcon remcoord remfun remfunction remlet syn keyword maximaFunc remove remrule remsym remvalue rename reset residue resolvante syn keyword maximaFunc resolvante_alternee1 resolvante_bipartite resolvante_diedrale syn keyword maximaFunc resolvante_klein resolvante_klein3 resolvante_produit_sym syn keyword maximaFunc resolvante_unitaire resolvante_vierer rest resultant return syn keyword maximaFunc reveal reverse revert revert2 rhs ric ricci riem riemann syn keyword maximaFunc rinvariant risch rmxchar rncombine %rnum_list romberg rombergabs syn keyword maximaFunc rombergit rombergmin rombergtol room rootsconmode rootscontract syn keyword maximaFunc rootsepsilon round row run_testsuite save savedef savefactors syn keyword maximaFunc scalarmatrixp scalarp scalefactors scanmap schur2comp sconcat syn keyword maximaFunc scsimp scurvature sec sech second setcheck setcheckbreak syn keyword maximaFunc setelmx set_plot_option set_random_state setup_autoload syn keyword maximaFunc set_up_dot_simplifications setval seventh sf show showcomps syn keyword maximaFunc showratvars showtime sign signum similaritytransform simpsum syn keyword maximaFunc simtran sin sinh sinnpiflag sixth solve solvedecomposes syn keyword maximaFunc solveexplicit solvefactors solve_inconsistent_error solvenullwarn syn keyword maximaFunc solveradcan solvetrigwarn somrac sort sparse spherical_bessel_j syn keyword maximaFunc spherical_bessel_y spherical_hankel1 spherical_hankel2 syn keyword maximaFunc spherical_harmonic splice sqfr sqrt sqrtdispflag sstatus syn keyword maximaFunc stardisp status string stringout sublis sublis_apply_lambda syn keyword maximaFunc sublist submatrix subst substinpart substpart subvarp sum syn keyword maximaFunc sumcontract sumexpand sumhack sumsplitfact supcontext symbolp syn keyword maximaFunc symmetric symmetricp system tan tanh taylor taylordepth syn keyword maximaFunc taylorinfo taylor_logexpand taylor_order_coefficients taylorp syn keyword maximaFunc taylor_simplifier taylor_truncate_polynomials taytorat tcl_output syn keyword maximaFunc tcontract tellrat tellsimp tellsimpafter tensorkill tentex tenth syn keyword maximaFunc tex %th third throw time timer timer_devalue timer_info syn keyword maximaFunc tldefint tlimit tlimswitch todd_coxeter to_lisp totaldisrep syn keyword maximaFunc totalfourier totient tpartpol tr trace trace_options syn keyword maximaFunc transcompile translate translate_file transpose transrun syn keyword maximaFunc tr_array_as_ref tr_bound_function_applyp treillis treinat syn keyword maximaFunc tr_file_tty_messagesp tr_float_can_branch_complex syn keyword maximaFunc tr_function_call_default triangularize trigexpand trigexpandplus syn keyword maximaFunc trigexpandtimes triginverses trigrat trigreduce trigsign trigsimp syn keyword maximaFunc tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars true syn keyword maximaFunc trunc truncate tr_warn_bad_function_calls tr_warn_fexpr syn keyword maximaFunc tr_warnings_get tr_warn_meval tr_warn_mode tr_warn_undeclared syn keyword maximaFunc tr_warn_undefined_variable tr_windy ttyoff ueivects ufg ug syn keyword maximaFunc ultraspherical undiff uniteigenvectors unitvector unknown unorder syn keyword maximaFunc unsum untellrat untimer untrace uric uricci uriem uriemann syn keyword maximaFunc use_fast_arrays uvect values vect_cross vectorpotential syn keyword maximaFunc vectorsimp verb verbify verbose weyl with_stdout writefile syn keyword maximaFunc xgraph_curves xthru zerobern zeroequiv zeromatrix zeta zeta%pi syn match maximaOp "[\*\/\+\-\#\!\~\^\=\:\<\>\@]" " ---------------------- END LIST OF ALL FUNCTIONS (EXCEPT KEYWORDS) ---------------------- syn case match " Labels (supports maxima's goto) syn match maximaLabel "^\s*<[a-zA-Z_][a-zA-Z0-9%_]*>" " String and Character constants " Highlight special characters (those which have a backslash) differently syn match maximaSpecial contained "\\\d\d\d\|\\." syn region maximaString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=maximaSpecial syn match maximaCharacter "'[^\\]'" syn match maximaSpecialChar "'\\.'" " number with no fractional part or exponent syn match maximaNumber /\<\d\+\>/ " floating point number with integer and fractional parts and optional exponent syn match maximaFloat /\<\d\+\.\d*\([BbDdEeSs][-+]\=\d\+\)\=\>/ " floating point number with no integer part and optional exponent syn match maximaFloat /\<\.\d\+\([BbDdEeSs][-+]\=\d\+\)\=\>/ " floating point number with no fractional part and optional exponent syn match maximaFloat /\<\d\+[BbDdEeSs][-+]\=\d\+\>/ " Comments: " maxima supports /* ... */ (like C) syn keyword maximaTodo contained TODO Todo DEBUG syn region maximaCommentBlock start="/\*" end="\*/" contains=maximaString,maximaTodo,maximaCommentBlock " synchronizing syn sync match maximaSyncComment grouphere maximaCommentBlock "/*" syn sync match maximaSyncComment groupthere NONE "*/" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link maximaBraceError maximaError hi def link maximaCmd maximaStatement hi def link maximaCurlyError maximaError hi def link maximaFuncCmd maximaStatement hi def link maximaParenError maximaError " The default methods for highlighting. Can be overridden later hi def link maximaCharacter Character hi def link maximaComma Function hi def link maximaCommentBlock Comment hi def link maximaConditional Conditional hi def link maximaError Error hi def link maximaFunc Delimiter hi def link maximaOp Delimiter hi def link maximaLabel PreProc hi def link maximaNumber Number hi def link maximaFloat Float hi def link maximaRepeat Repeat hi def link maximaSpecial Type hi def link maximaSpecialChar SpecialChar hi def link maximaStatement Statement hi def link maximaString String hi def link maximaTodo Todo let b:current_syntax = "maxima" neovim-0.2.2/runtime/syntax/mel.vim000066400000000000000000000065151320401574200173200ustar00rootroot00000000000000" Vim syntax file " Language: MEL (Maya Extension Language) " Maintainer: Robert Minsk " Last Change: May 27 1999 " Based on: Bram Moolenaar C syntax file " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " when wanted, highlight trailing white space and spaces before tabs if exists("mel_space_errors") sy match melSpaceError "\s\+$" sy match melSpaceError " \+\t"me=e-1 endif " A bunch of useful MEL keywords sy keyword melBoolean true false yes no on off sy keyword melFunction proc sy match melIdentifier "\$\(\a\|_\)\w*" sy keyword melStatement break continue return sy keyword melConditional if else switch sy keyword melRepeat while for do in sy keyword melLabel case default sy keyword melOperator size eval env exists whatIs sy keyword melKeyword alias sy keyword melException catch error warning sy keyword melInclude source sy keyword melType int float string vector matrix sy keyword melStorageClass global sy keyword melDebug trace sy keyword melTodo contained TODO FIXME XXX " MEL data types sy match melCharSpecial contained "\\[ntr\\"]" sy match melCharError contained "\\[^ntr\\"]" sy region melString start=+"+ skip=+\\"+ end=+"+ contains=melCharSpecial,melCharError sy case ignore sy match melInteger "\<\d\+\(e[-+]\=\d\+\)\=\>" sy match melFloat "\<\d\+\(e[-+]\=\d\+\)\=f\>" sy match melFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=f\=\>" sy match melFloat "\.\d\+\(e[-+]\=\d\+\)\=f\=\>" sy case match sy match melCommaSemi contained "[,;]" sy region melMatrixVector start=/<>/ contains=melInteger,melFloat,melIdentifier,melCommaSemi sy cluster melGroup contains=melFunction,melStatement,melConditional,melLabel,melKeyword,melStorageClass,melTODO,melCharSpecial,melCharError,melCommaSemi " catch errors caused by wrong parenthesis sy region melParen transparent start='(' end=')' contains=ALLBUT,@melGroup,melParenError,melInParen sy match melParenError ")" sy match melInParen contained "[{}]" " comments sy region melComment start="/\*" end="\*/" contains=melTodo,melSpaceError sy match melComment "//.*" contains=melTodo,melSpaceError sy match melCommentError "\*/" sy region melQuestionColon matchgroup=melConditional transparent start='?' end=':' contains=ALLBUT,@melGroup if !exists("mel_minlines") let mel_minlines=15 endif exec "sy sync ccomment melComment minlines=" . mel_minlines " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link melBoolean Boolean hi def link melFunction Function hi def link melIdentifier Identifier hi def link melStatement Statement hi def link melConditional Conditional hi def link melRepeat Repeat hi def link melLabel Label hi def link melOperator Operator hi def link melKeyword Keyword hi def link melException Exception hi def link melInclude Include hi def link melType Type hi def link melStorageClass StorageClass hi def link melDebug Debug hi def link melTodo Todo hi def link melCharSpecial SpecialChar hi def link melString String hi def link melInteger Number hi def link melFloat Float hi def link melMatrixVector Float hi def link melComment Comment hi def link melError Error hi def link melSpaceError melError hi def link melCharError melError hi def link melParenError melError hi def link melInParen melError hi def link melCommentError melError let b:current_syntax = "mel" neovim-0.2.2/runtime/syntax/messages.vim000066400000000000000000000051351320401574200203470ustar00rootroot00000000000000" Vim syntax file " Language: /var/log/messages file " Maintainer: Yakov Lerner " Latest Revision: 2008-06-29 " Changes: 2008-06-29 support for RFC3339 tuimestamps James Vega " 2016 Jan 19: messagesDate changed by Bram if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match messagesBegin display '^' nextgroup=messagesDate,messagesDateRFC3339 syn match messagesDate contained display '[[:lower:][:upper:]][[:lower:][:upper:]][[:lower:][:upper:]] [ 0-9]\d *' \ nextgroup=messagesHour syn match messagesHour contained display '\d\d:\d\d:\d\d\s*' \ nextgroup=messagesHost syn match messagesDateRFC3339 contained display '\d\{4}-\d\d-\d\d' \ nextgroup=messagesRFC3339T syn match messagesRFC3339T contained display '\cT' \ nextgroup=messagesHourRFC3339 syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)' \ nextgroup=messagesHost syn match messagesHost contained display '\S*\s*' \ nextgroup=messagesLabel syn match messagesLabel contained display '\s*[^:]*:\s*' \ nextgroup=messagesText contains=messagesKernel,messagesPID syn match messagesPID contained display '\[\zs\d\+\ze\]' syn match messagesKernel contained display 'kernel:' syn match messagesIP '\d\+\.\d\+\.\d\+\.\d\+' syn match messagesURL '\w\+://\S\+' syn match messagesText contained display '.*' \ contains=messagesNumber,messagesIP,messagesURL,messagesError syn match messagesNumber contained '0x[0-9a-fA-F]*\|\[<[0-9a-f]\+>\]\|\<\d[0-9a-fA-F]*' syn match messagesError contained '\c.*\<\(FATAL\|ERROR\|ERRORS\|FAILED\|FAILURE\).*' hi def link messagesDate Constant hi def link messagesHour Type hi def link messagesDateRFC3339 Constant hi def link messagesHourRFC3339 Type hi def link messagesRFC3339T Normal hi def link messagesHost Identifier hi def link messagesLabel Operator hi def link messagesPID Constant hi def link messagesKernel Special hi def link messagesError ErrorMsg hi def link messagesIP Constant hi def link messagesURL Underlined hi def link messagesText Normal hi def link messagesNumber Number let b:current_syntax = "messages" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/mf.vim000066400000000000000000000360771320401574200171530ustar00rootroot00000000000000" Vim syntax file " Language: METAFONT " Maintainer: Nicola Vitacolonna " Former Maintainers: Andreas Scherer " Last Change: 2016 Oct 1 if exists("b:current_syntax") finish endif syn iskeyword @,_ " METAFONT 'primitives' as defined in chapter 25 of 'The METAFONTbook' " Page 210: 'boolean expressions' syn keyword mfBoolExp and charexists false known not odd or true unknown " Page 210: 'numeric expression' syn keyword mfNumExp ASCII angle cosd directiontime floor hex length syn keyword mfNumExp mexp mlog normaldeviate oct sind sqrt totalweight syn keyword mfNumExp turningnumber uniformdeviate xpart xxpart xypart syn keyword mfNumExp ypart yxpart yypart " Page 211: 'internal quantities' syn keyword mfInternal autorounding boundarychar charcode chardp chardx syn keyword mfInternal chardy charext charht charic charwd day designsize syn keyword mfInternal fillin fontmaking granularity hppp jobname month syn keyword mfInternal pausing proofing showstopping smoothing time syn keyword mfInternal tracingcapsules tracingchoices tracingcommands syn keyword mfInternal tracingedges tracingequations tracingmacros syn keyword mfInternal tracingonline tracingoutput tracingpens syn keyword mfInternal tracingrestores tracingspecs tracingstats syn keyword mfInternal tracingtitles turningcheck vppp warningcheck syn keyword mfInternal xoffset year yoffset " Page 212: 'pair expressions' syn keyword mfPairExp of penoffset point postcontrol precontrol rotated syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled syn keyword mfPairExp zscaled " Page 213: 'path expressions' syn keyword mfPathExp atleast controls curl cycle makepath reverse syn keyword mfPathExp subpath tension " Page 214: 'pen expressions' syn keyword mfPenExp makepen nullpen pencircle " Page 214: 'picture expressions' syn keyword mfPicExp nullpicture " Page 214: 'string expressions' syn keyword mfStringExp char decimal readstring str substring " Page 217: 'commands and statements' syn keyword mfCommand addto also at batchmode contour cull delimiters syn keyword mfCommand display doublepath dropping dump end errhelp syn keyword mfCommand errmessage errorstopmode everyjob from interim syn keyword mfCommand inwindow keeping let message newinternal syn keyword mfCommand nonstopmode numspecial openwindow outer randomseed syn keyword mfCommand save scrollmode shipout show showdependencies syn keyword mfCommand showstats showtoken showvariable special to withpen syn keyword mfCommand withweight " Page 56: 'types' syn keyword mfType boolean numeric pair path pen picture string syn keyword mfType transform " Page 155: 'grouping' syn keyword mfStatement begingroup endgroup " Page 165: 'definitions' syn keyword mfDefinition def enddef expr primary primarydef secondary syn keyword mfDefinition secondarydef suffix tertiary tertiarydef text syn keyword mfDefinition vardef " Page 169: 'conditions and loops' syn keyword mfCondition else elseif endfor exitif fi for forever syn keyword mfCondition forsuffixes if step until " Other primitives listed in the index syn keyword mfPrimitive charlist endinput expandafter extensible fontdimen syn keyword mfPrimitive headerbyte inner input intersectiontimes kern syn keyword mfPrimitive ligtable quote scantokens skipto " Implicit suffix parameters syn match mfSuffixParam "@#\|#@\|@" " These are just tags, but given their special status, we " highlight them as variables syn keyword mfVariable x y " Keywords defined by plain.mf (defined on pp.262-278) if get(g:, "plain_mf_macros", 1) syn keyword mfDef addto_currentpicture beginchar capsule_def syn keyword mfDef change_width clear_pen_memory clearit clearpen syn keyword mfDef clearxy culldraw cullit cutdraw syn keyword mfDef define_blacker_pixels define_corrected_pixels syn keyword mfDef define_good_x_pixels define_good_y_pixels syn keyword mfDef define_horizontal_corrected_pixels define_pixels syn keyword mfDef define_whole_blacker_pixels define_whole_pixels syn keyword mfDef define_whole_vertical_blacker_pixels syn keyword mfDef define_whole_vertical_pixels downto draw drawdot syn keyword mfDef endchar erase exitunless fill filldraw fix_units syn keyword mfDef flex font_coding_scheme font_extra_space syn keyword mfDef font_identifier font_normal_shrink syn keyword mfDef font_normal_space font_normal_stretch font_quad syn keyword mfDef font_size font_slant font_x_height gfcorners gobble syn keyword mfDef hide imagerules interact italcorr killtext syn keyword mfDef loggingall lowres_fix makebox makegrid maketicks syn keyword mfDef mode_def mode_setup nodisplays notransforms numtok syn keyword mfDef openit penrazor pensquare penstroke pickup syn keyword mfDef proofoffset proofrule range reflectedabout syn keyword mfDef rotatedaround screenchars screenrule screenstrokes syn keyword mfDef shipit showit smode stop superellipse takepower syn keyword mfDef tracingall tracingnone undraw undrawdot unfill syn keyword mfDef unfilldraw upto z syn match mfDef "???" syn keyword mfVardef bot byte ceiling counterclockwise cutoff decr dir syn keyword mfVardef direction directionpoint grayfont hround incr syn keyword mfVardef interpath inverse labelfont labels lft magstep " Note: nodot is not a vardef, it is used as in makelabel.lft.nodot("5",z5) " (METAFONT only) syn keyword mfVardef makelabel max min nodot penlabels penpos syn keyword mfVardef proofrulethickness round rt savepen slantfont solve syn keyword mfVardef tensepath titlefont top unitvector vround whatever syn match mpVardef "\" syn keyword mfPrimaryDef div dotprod gobbled mod syn keyword mfSecondaryDef intersectionpoint syn keyword mfTertiaryDef softjoin thru syn keyword mfNewInternal blacker currentwindow displaying eps epsilon syn keyword mfNewInternal infinity join_radius number_of_modes o_correction syn keyword mfNewInternal pen_bot pen_lft pen_rt pen_top pixels_per_inch syn keyword mfNewInternal screen_cols screen_rows tolerance " Predefined constants syn keyword mfConstant base_name base_version blankpicture ditto down syn keyword mfConstant fullcircle halfcircle identity left lowres origin syn keyword mfConstant penspeck proof quartercircle right rulepen smoke syn keyword mfConstant unitpixel unitsquare up " Other predefined variables syn keyword mfVariable aspect_ratio currentpen extra_beginchar syn keyword mfVariable extra_endchar currentpen_path currentpicture syn keyword mfVariable currenttransform d extra_setup h localfont mag mode syn keyword mfVariable mode_name w " let statements: syn keyword mfnumExp abs syn keyword mfPairExp rotatedabout syn keyword mfCommand bye relax endif " By default, METAFONT loads modes.mf, too if get(g:, "plain_mf_modes", 1) syn keyword mfConstant APSSixMed AgfaFourZeroZero AgfaThreeFourZeroZero syn keyword mfConstant AtariNineFive AtariNineSix AtariSLMEightZeroFour syn keyword mfConstant AtariSMOneTwoFour CItohEightFiveOneZero syn keyword mfConstant CItohThreeOneZero CanonBJCSixZeroZero CanonCX syn keyword mfConstant CanonEX CanonLBPLX CanonLBPTen CanonSX ChelgraphIBX syn keyword mfConstant CompugraphicEightSixZeroZero syn keyword mfConstant CompugraphicNineSixZeroZero DD DEClarge DECsmall syn keyword mfConstant DataDiscNew EightThree EpsonAction syn keyword mfConstant EpsonLQFiveZeroZeroLo EpsonLQFiveZeroZeroMed syn keyword mfConstant EpsonMXFX EpsonSQEightSevenZero EpsonStylusPro syn keyword mfConstant EpsonStylusProHigh EpsonStylusProLow syn keyword mfConstant EpsonStylusProMed FourFour GThreefax HPDeskJet syn keyword mfConstant HPLaserJetIIISi IBMFourTwoFiveZero IBMFourTwoOneSix syn keyword mfConstant IBMFourTwoThreeZero IBMFourZeroOneNine syn keyword mfConstant IBMFourZeroThreeNine IBMFourZeroTwoNine syn keyword mfConstant IBMProPrinter IBMSixOneFiveFour IBMSixSixSevenZero syn keyword mfConstant IBMThreeEightOneTwo IBMThreeEightTwoZero syn keyword mfConstant IBMThreeOneNineThree IBMThreeOneSevenNine syn keyword mfConstant IBMUlfHolleberg LASevenFive LNOthreR LNOthree syn keyword mfConstant LNZeroOne LNZeroThree LPSFourZero LPSTwoZero syn keyword mfConstant LexmarkFourZeroThreeNine LexmarkOptraR syn keyword mfConstant LexmarkOptraS LinotypeLThreeThreeZero syn keyword mfConstant LinotypeOneZeroZero LinotypeOneZeroZeroLo syn keyword mfConstant LinotypeThreeZeroZeroHi MacTrueSize NeXTprinter syn keyword mfConstant NeXTscreen NecTwoZeroOne Newgen NineOne syn keyword mfConstant OCESixSevenFiveZeroPS OneTwoZero OneZeroZero syn keyword mfConstant PrintwareSevenTwoZeroIQ Prism QMSOneSevenTwoFive syn keyword mfConstant QMSOneSevenZeroZero QMSTwoFourTwoFive RicohA syn keyword mfConstant RicohFortyEighty RicohFourZeroEightZero RicohLP syn keyword mfConstant SparcPrinter StarNLOneZero VAXstation VTSix syn keyword mfConstant VarityperFiveZeroSixZeroW syn keyword mfConstant VarityperFourThreeZeroZeroHi syn keyword mfConstant VarityperFourThreeZeroZeroLo syn keyword mfConstant VarityperFourTwoZeroZero VarityperSixZeroZero syn keyword mfConstant XeroxDocutech XeroxEightSevenNineZero syn keyword mfConstant XeroxFourZeroFiveZero XeroxNineSevenZeroZero syn keyword mfConstant XeroxPhaserSixTwoZeroZeroDP XeroxThreeSevenZeroZero syn keyword mfConstant Xerox_world agfafzz agfatfzz amiga aps apssixhi syn keyword mfConstant aselect atariezf atarinf atarins atariotf bitgraph syn keyword mfConstant bjtenex bjtzzex bjtzzl bjtzzs boise canonbjc syn keyword mfConstant canonex canonlbp cg cgl cgnszz citohtoz corona crs syn keyword mfConstant cthreeten cx datadisc declarge decsmall deskjet syn keyword mfConstant docutech dover dp dpdfezzz eighthre elvira epscszz syn keyword mfConstant epsdraft epsdrft epsdrftl epsfast epsfastl epshi syn keyword mfConstant epslo epsmed epsmedl epson epsonact epsonfx epsonl syn keyword mfConstant epsonlo epsonlol epsonlq epsonsq epstylus epstylwr syn keyword mfConstant epstyplo epstypmd epstypml epstypro epswlo epswlol syn keyword mfConstant esphi fourfour gpx gtfax gtfaxhi gtfaxl gtfaxlo syn keyword mfConstant gtfaxlol help hifax highfax hplaser hprugged ibm_a syn keyword mfConstant ibmd ibmega ibmegal ibmfzon ibmfztn ibmpp ibmppl syn keyword mfConstant ibmsoff ibmteot ibmtetz ibmtont ibmtosn ibmtosnl syn keyword mfConstant ibmvga ibx imagen imagewriter itoh itohl itohtoz syn keyword mfConstant itohtozl iw jetiiisi kyocera laserjet laserjetfive syn keyword mfConstant laserjetfivemp laserjetfour laserjetfourthousand syn keyword mfConstant laserjetfourzerozerozero laserjethi laserjetlo syn keyword mfConstant laserjettwoonezerozero syn keyword mfConstant laserjettwoonezerozerofastres lasermaster syn keyword mfConstant laserwriter lasf lexmarkr lexmarks lexmarku syn keyword mfConstant linohalf linohi linolo linolttz linoone linosuper syn keyword mfConstant linothree linothreelo linotzzh ljfive ljfivemp syn keyword mfConstant ljfour ljfzzz ljfzzzfr ljlo ljtozz ljtozzfr lmaster syn keyword mfConstant lnotr lnzo lps lpstz lqhires lqlores lqmed lqmedl syn keyword mfConstant lqmedres lview lviewl lwpro macmag mactrue modes_mf syn keyword mfConstant ncd nec nechi neclm nectzo newdd newddl nexthi syn keyword mfConstant nextscreen nextscrn nineone nullmode ocessfz syn keyword mfConstant okidata okidatal okifourten okifte okihi onetz syn keyword mfConstant onezz pcprevw pcscreen phaser phaserfs phasertf syn keyword mfConstant phasertfl phasertl pixpt printware prntware syn keyword mfConstant proprinter qms qmsesz qmsostf qmsoszz qmstftf ricoh syn keyword mfConstant ricoha ricohlp ricohsp sherpa sparcptr starnlt syn keyword mfConstant starnltl styletwo stylewr stylewri stylewriter sun syn keyword mfConstant supre swtwo toshiba ultre varityper vs vtftzz syn keyword mfConstant vtftzzhi vtftzzlo vtfzszw vtszz xpstzz xpstzzl syn keyword mfConstant xrxesnz xrxfzfz xrxnszz xrxtszz syn keyword mfDef BCPL_string coding_scheme font_face_byte syn keyword mfDef font_family landscape syn keyword mfDef mode_extra_info mode_help mode_param syn keyword mfNewInternal blacker_min endif " Some other basic macro names, e.g., from cmbase, logo, etc. if get(g:, "other_mf_macros", 1) syn keyword mfDef beginlogochar syn keyword mfDef font_setup syn keyword mfPrimitive generate endif " Numeric tokens syn match mfNumeric "[-]\=\d\+" syn match mfNumeric "[-]\=\.\d\+" syn match mfNumeric "[-]\=\d\+\.\d\+" " METAFONT lengths syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>" syn match mfLength "[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=" syn match mfLength "[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=" syn match mfLength "[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=" " String constants syn match mfOpenString /"[^"]*/ syn region mfString oneline keepend start=+"+ end=+"+ " Comments: syn keyword mfTodoComment contained TODO FIXME XXX DEBUG NOTE syn match mfComment "%.*$" contains=mfTodoComment,@Spell " synchronizing syn sync maxlines=50 " Define the default highlighting hi def link mfBoolExp Statement hi def link mfNumExp Statement hi def link mfPairExp Statement hi def link mfPathExp Statement hi def link mfPenExp Statement hi def link mfPicExp Statement hi def link mfStringExp Statement hi def link mfInternal Identifier hi def link mfCommand Statement hi def link mfType Type hi def link mfStatement Statement hi def link mfDefinition Statement hi def link mfCondition Conditional hi def link mfPrimitive Statement hi def link mfDef Function hi def link mfVardef mfDef hi def link mfPrimaryDef mfDef hi def link mfSecondaryDef mfDef hi def link mfTertiaryDef mfDef hi def link mfCoord Identifier hi def link mfPoint Identifier hi def link mfNumeric Number hi def link mfLength Number hi def link mfComment Comment hi def link mfString String hi def link mfOpenString Todo hi def link mfSuffixParam Label hi def link mfNewInternal mfInternal hi def link mfVariable Identifier hi def link mfConstant Constant hi def link mfTodoComment Todo let b:current_syntax = "mf" " vim:sw=2 neovim-0.2.2/runtime/syntax/mgl.vim000066400000000000000000000072141320401574200173170ustar00rootroot00000000000000" Vim syntax file " Language: MGL " Version: 1.0 " Last Change: 2006 Feb 21 " Maintainer: Gero Kuhlmann " " $Id: mgl.vim,v 1.1 2006/02/21 22:08:20 vimboss Exp $ " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn sync lines=250 syn keyword mglBoolean true false syn keyword mglConditional if else then syn keyword mglConstant nil syn keyword mglPredefined maxint syn keyword mglLabel case goto label syn keyword mglOperator to downto in of with syn keyword mglOperator and not or xor div mod syn keyword mglRepeat do for repeat while to until syn keyword mglStatement procedure function break continue return restart syn keyword mglStatement program begin end const var type syn keyword mglStruct record syn keyword mglType integer string char boolean char ipaddr array " String if !exists("mgl_one_line_string") syn region mglString matchgroup=mglString start=+'+ end=+'+ contains=mglStringEscape syn region mglString matchgroup=mglString start=+"+ end=+"+ contains=mglStringEscapeGPC else "wrong strings syn region mglStringError matchgroup=mglStringError start=+'+ end=+'+ end=+$+ contains=mglStringEscape syn region mglStringError matchgroup=mglStringError start=+"+ end=+"+ end=+$+ contains=mglStringEscapeGPC "right strings syn region mglString matchgroup=mglString start=+'+ end=+'+ oneline contains=mglStringEscape syn region mglString matchgroup=mglString start=+"+ end=+"+ oneline contains=mglStringEscapeGPC end syn match mglStringEscape contained "''" syn match mglStringEscapeGPC contained '""' if exists("mgl_symbol_operator") syn match mglSymbolOperator "[+\-/*=\%]" syn match mglSymbolOperator "[<>]=\=" syn match mglSymbolOperator "<>" syn match mglSymbolOperator ":=" syn match mglSymbolOperator "[()]" syn match mglSymbolOperator "\.\." syn match mglMatrixDelimiter "(." syn match mglMatrixDelimiter ".)" syn match mglMatrixDelimiter "[][]" endif syn match mglNumber "-\=\<\d\+\>" syn match mglHexNumber "\$[0-9a-fA-F]\+\>" syn match mglCharacter "\#[0-9]\+\>" syn match mglIpAddr "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\>" syn region mglComment start="(\*" end="\*)" syn region mglComment start="{" end="}" syn region mglComment start="//" end="$" if !exists("mgl_no_functions") syn keyword mglFunction dispose new syn keyword mglFunction get load print select syn keyword mglFunction odd pred succ syn keyword mglFunction chr ord abs sqr syn keyword mglFunction exit syn keyword mglOperator at timeout endif syn region mglPreProc start="(\*\$" end="\*)" syn region mglPreProc start="{\$" end="}" syn keyword mglException try except raise syn keyword mglPredefined exception " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link mglBoolean Boolean hi def link mglComment Comment hi def link mglConditional Conditional hi def link mglConstant Constant hi def link mglException Exception hi def link mglFunction Function hi def link mglLabel Label hi def link mglMatrixDelimiter Identifier hi def link mglNumber Number hi def link mglHexNumber Number hi def link mglCharacter Number hi def link mglIpAddr Number hi def link mglOperator Operator hi def link mglPredefined mglFunction hi def link mglPreProc PreProc hi def link mglRepeat Repeat hi def link mglStatement Statement hi def link mglString String hi def link mglStringEscape Special hi def link mglStringEscapeGPC Special hi def link mglStringError Error hi def link mglStruct mglStatement hi def link mglSymbolOperator mglOperator hi def link mglType Type let b:current_syntax = "mgl" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/mgp.vim000066400000000000000000000037201320401574200173210ustar00rootroot00000000000000" Vim syntax file " Language: mgp - MaGic Point " Maintainer: Gerfried Fuchs " Filenames: *.mgp " Last Change: 25 Apr 2001 " URL: http://alfie.ist.org/vim/syntax/mgp.vim " " Comments are very welcome - but please make sure that you are commenting on " the latest version of this file. " SPAM is _NOT_ welcome - be ready to be reported! " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match mgpLineSkip "\\$" " all the commands that are currently recognized syn keyword mgpCommand contained size fore back bgrad left leftfill center syn keyword mgpCommand contained right shrink lcutin rcutin cont xfont vfont syn keyword mgpCommand contained tfont tmfont tfont0 bar image newimage syn keyword mgpCommand contained prefix icon bimage default tab vgap hgap syn keyword mgpCommand contained pause mark again system filter endfilter syn keyword mgpCommand contained vfcap tfdir deffont font embed endembed syn keyword mgpCommand contained noop pcache include " charset is not yet supported :-) " syn keyword mgpCommand contained charset syn region mgpFile contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match mgpValue contained "\d\+" syn match mgpSize contained "\d\+x\d\+" syn match mgpLine +^%.*$+ contains=mgpCommand,mgpFile,mgpSize,mgpValue " Comments syn match mgpPercent +^%%.*$+ syn match mgpHash +^#.*$+ " these only work alone syn match mgpPage +^%page$+ syn match mgpNoDefault +^%nodefault$+ " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link mgpLineSkip Special hi def link mgpHash mgpComment hi def link mgpPercent mgpComment hi def link mgpComment Comment hi def link mgpCommand Identifier hi def link mgpLine Type hi def link mgpFile String hi def link mgpSize Number hi def link mgpValue Number hi def link mgpPage mgpDefine hi def link mgpNoDefault mgpDefine hi def link mgpDefine Define let b:current_syntax = "mgp" neovim-0.2.2/runtime/syntax/mib.vim000066400000000000000000000052101320401574200173010ustar00rootroot00000000000000" Vim syntax file " Language: Vim syntax file for SNMPv1 and SNMPv2 MIB and SMI files " Maintainer: Martin Smat " Original Author: David Pascoe " Written: Wed Jan 28 14:37:23 GMT--8:00 1998 " Last Changed: Mon Mar 23 2010 if exists("b:current_syntax") finish endif setlocal iskeyword=@,48-57,_,128-167,224-235,- syn keyword mibImplicit ACCESS ANY AUGMENTS BEGIN BIT BITS BOOLEAN CHOICE syn keyword mibImplicit COMPONENTS CONTACT-INFO DEFINITIONS DEFVAL syn keyword mibImplicit DESCRIPTION DISPLAY-HINT END ENTERPRISE EXTERNAL FALSE syn keyword mibImplicit FROM GROUP IMPLICIT IMPLIED IMPORTS INDEX syn keyword mibImplicit LAST-UPDATED MANDATORY-GROUPS MAX-ACCESS syn keyword mibImplicit MIN-ACCESS MODULE MODULE-COMPLIANCE MODULE-IDENTITY syn keyword mibImplicit NOTIFICATION-GROUP NOTIFICATION-TYPE NOTIFICATIONS syn keyword mibImplicit NULL OBJECT-GROUP OBJECT-IDENTITY OBJECT-TYPE syn keyword mibImplicit OBJECTS OF OPTIONAL ORGANIZATION REFERENCE syn keyword mibImplicit REVISION SEQUENCE SET SIZE STATUS SYNTAX syn keyword mibImplicit TEXTUAL-CONVENTION TRAP-TYPE TRUE UNITS VARIABLES syn keyword mibImplicit WRITE-SYNTAX syn keyword mibValue accessible-for-notify current DisplayString syn keyword mibValue deprecated mandatory not-accessible obsolete optional syn keyword mibValue read-create read-only read-write write-only INTEGER syn keyword mibValue Counter Gauge IpAddress OCTET STRING experimental mib-2 syn keyword mibValue TimeTicks RowStatus TruthValue UInteger32 snmpModules syn keyword mibValue Integer32 Counter32 TestAndIncr TimeStamp InstancePointer syn keyword mibValue OBJECT IDENTIFIER Gauge32 AutonomousType Counter64 syn keyword mibValue PhysAddress TimeInterval MacAddress StorageType RowPointer syn keyword mibValue TDomain TAddress ifIndex " Epilogue SMI extensions syn keyword mibEpilogue FORCE-INCLUDE EXCLUDE cookie get-function set-function syn keyword mibEpilogue test-function get-function-async set-function-async syn keyword mibEpilogue test-function-async next-function next-function-async syn keyword mibEpilogue leaf-name syn keyword mibEpilogue DEFAULT contained syn match mibOperator "::=" syn match mibComment "\ *--.\{-}\(--\|$\)" syn match mibNumber "\<['0-9a-fA-FhH]*\>" syn region mibDescription start="\"" end="\"" contains=DEFAULT hi def link mibImplicit Statement hi def link mibOperator Statement hi def link mibComment Comment hi def link mibConstants String hi def link mibNumber Number hi def link mibDescription Identifier hi def link mibEpilogue SpecialChar hi def link mibValue Structure let b:current_syntax = "mib" neovim-0.2.2/runtime/syntax/mix.vim000066400000000000000000000054501320401574200173350ustar00rootroot00000000000000" Vim syntax file " Language: MIX (Donald Knuth's assembly language used in TAOCP) " Maintainer: Wu Yongwei " Filenames: *.mixal *.mix " Last Change: 2013 Nov 13 " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case ignore " Special processing of ALF directive: implementations vary whether quotation " marks are needed syn match mixAlfParam #\s\{1,2\}"\?[^"]\{,5\}"\?# contains=mixAlfDirective,mixString nextgroup=mixEndComment contained " Region for parameters syn match mixParam #[-+*/:=0-9a-z,()"]\+# contains=mixIdentifier,mixSpecial,mixNumber,mixString,mixLabel nextgroup=mixEndComment contained " Comment at the line end syn match mixEndComment ".*" contains=mixRegister contained " Identifier; must go before literals syn match mixIdentifier "[a-z0-9_]\+" contained " Literals syn match mixSpecial "[-+*/:=]" contained syn match mixNumber "[0-9]\+\>" contained syn region mixString start=+"+ skip=+\\"+ end=+"+ contained " Labels syn match mixLabel "^[a-z0-9_]\{,10\}\s\+" nextgroup=mixAlfSpecial,mixOpcode,mixDirective syn match mixLabel "[0-9][BF]" contained " Comments syn match mixComment "^\*.*" contains=mixRegister " Directives syn keyword mixDirective ORIG EQU CON END nextgroup=mixParam contained skipwhite syn keyword mixDirective ALF nextgroup=mixAlfParam contained " Opcodes syn keyword mixOpcode NOP HLT NUM CHAR FLOT FIX nextgroup=mixEndComment contained syn keyword mixOpcode FADD FSUB FMUL FDIV FCMP MOVE ADD SUB MUL DIV IOC IN OUT JRED JBUS JMP JSJ JOV JNOV JL JE JG JLE JNE JGE SLA SRA SLAX SRAX SLC SRC nextgroup=mixParam contained skipwhite syn match mixOpcode "LD[AX1-6]N\?\>" nextgroup=mixParam contained skipwhite syn match mixOpcode "ST[AX1-6JZ]\>" nextgroup=mixParam contained skipwhite syn match mixOpcode "EN[TN][AX1-6]\>" nextgroup=mixParam contained skipwhite syn match mixOpcode "INC[AX1-6]\>" nextgroup=mixParam contained skipwhite syn match mixOpcode "DEC[AX1-6]\>" nextgroup=mixParam contained skipwhite syn match mixOpcode "CMP[AX1-6]\>" nextgroup=mixParam contained skipwhite syn match mixOpcode "J[AX1-6]N\?[NZP]\>" nextgroup=mixParam contained skipwhite " Switch back to being case sensitive syn case match " Registers (only to used in comments now) syn keyword mixRegister rA rX rI1 rI2 rI3 rI4 rI5 rI6 rJ contained " The default highlighting hi def link mixRegister Special hi def link mixLabel Define hi def link mixComment Comment hi def link mixEndComment Comment hi def link mixDirective Keyword hi def link mixOpcode Keyword hi def link mixSpecial Special hi def link mixNumber Number hi def link mixString String hi def link mixAlfParam String hi def link mixIdentifier Identifier let b:current_syntax = "mix" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/mma.vim000066400000000000000000000270271320401574200173160ustar00rootroot00000000000000" Vim syntax file " Language: Mathematica " Maintainer: steve layland " Last Change: 2012 Feb 03 by Thilo Six " Source: http://members.wri.com/layland/vim/syntax/mma.vim " http://vim.sourceforge.net/scripts/script.php?script_id=1273 " Id: $Id: mma.vim,v 1.4 2006/04/14 20:40:38 vimboss Exp $ " NOTE: " " Empty .m files will automatically be presumed as Matlab files " unless you have the following in your .vimrc: " " let filetype_m="mma" " " I also recommend setting the default 'Comment' hilighting to something " other than the color used for 'Function', since both are plentiful in " most mathematica files, and they are often the same color (when using " background=dark). " " Credits: " o Original Mathematica syntax version written by " Wolfgang Waltenberger " o Some ideas like the CommentStar,CommentTitle were adapted " from the Java vim syntax file by Claudio Fleiner. Thanks! " o Everything else written by steve " " Bugs: " o Vim 6.1 didn't really have support for character classes " of other named character classes. For example, [\a\d] " didn't work. Therefore, a lot of this code uses explicit " character classes instead: [0-9a-zA-Z] " " TODO: " folding " fix nesting " finish populating popular symbols " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Group Definitions: syntax cluster mmaNotes contains=mmaTodo,mmaFixme syntax cluster mmaComments contains=mmaComment,mmaFunctionComment,mmaItem,mmaFunctionTitle,mmaCommentStar syntax cluster mmaCommentStrings contains=mmaLooseQuote,mmaCommentString,mmaUnicode syntax cluster mmaStrings contains=@mmaCommentStrings,mmaString syntax cluster mmaTop contains=mmaOperator,mmaGenericFunction,mmaPureFunction,mmaVariable " Predefined Constants: " to list all predefined Symbols would be too insane... " it's probably smarter to define a select few, and get the rest from " context if absolutely necessary. " TODO - populate this with other often used Symbols " standard fixed symbols: syntax keyword mmaVariable True False None Automatic All Null C General " mathematical constants: syntax keyword mmaVariable Pi I E Infinity ComplexInfinity Indeterminate GoldenRatio EulerGamma Degree Catalan Khinchin Glaisher " stream data / atomic heads: syntax keyword mmaVariable Byte Character Expression Number Real String Word EndOfFile Integer Symbol " sets: syntax keyword mmaVariable Integers Complexes Reals Booleans Rationals " character classes: syntax keyword mmaPattern DigitCharacter LetterCharacter WhitespaceCharacter WordCharacter EndOfString StartOfString EndOfLine StartOfLine WordBoundary " SelectionMove directions/units: syntax keyword mmaVariable Next Previous After Before Character Word Expression TextLine CellContents Cell CellGroup EvaluationCell ButtonCell GeneratedCell Notebook syntax keyword mmaVariable CellTags CellStyle CellLabel " TableForm positions: syntax keyword mmaVariable Above Below Left Right " colors: syntax keyword mmaVariable Black Blue Brown Cyan Gray Green Magenta Orange Pink Purple Red White Yellow " function attributes syntax keyword mmaVariable Protected Listable OneIdentity Orderless Flat Constant NumericFunction Locked ReadProtected HoldFirst HoldRest HoldAll HoldAllComplete SequenceHold NHoldFirst NHoldRest NHoldAll Temporary Stub " Comment Sections: " this: " :that: syntax match mmaItem "\%(^[( |*\t]*\)\@<=\%(:\+\|\w\)\w\+\%( \w\+\)\{0,3}:" contained contains=@mmaNotes " Comment Keywords: syntax keyword mmaTodo TODO NOTE HEY contained syntax match mmaTodo "X\{3,}" contained syntax keyword mmaFixme FIX[ME] FIXTHIS BROKEN contained syntax match mmaFixme "BUG\%( *\#\=[0-9]\+\)\=" contained " yay pirates... syntax match mmaFixme "\%(Y\=A\+R\+G\+\|GRR\+\|CR\+A\+P\+\)\%(!\+\)\=" contained " EmPHAsis: " this unnecessary, but whatever :) syntax match mmaemPHAsis "\%(^\|\s\)\([_/]\)[a-zA-Z0-9]\+\%([- \t':]\+[a-zA-Z0-9]\+\)*\1\%(\s\|$\)" contained contains=mmaemPHAsis syntax match mmaemPHAsis "\%(^\|\s\)(\@]\@!" contains=mmaOperator "pattern default: syntax match mmaPattern ": *[^ ,]\+[\], ]\@=" contains=@mmaCommentStrings,@mmaTop,mmaOperator "pattern head/test: syntax match mmaPattern "[A-Za-z0-9`]*_\+\%(\a\+\)\=\%(?([^)]\+)\|?[^\]},]\+\)\=" contains=@mmaTop,@mmaCommentStrings,mmaPatternError " Operators: " /: ^= ^:= UpValue " /; Conditional " := = DownValue " == === || " != =!= && Logic " >= <= < > " += -= *= " /= ++ -- Math " ^* " -> :> Rules " @@ @@@ Apply " /@ //@ Map " /. //. Replace " // @ Function application " <> ~~ String/Pattern join " ~ infix operator " . : Pattern operators syntax match mmaOperator "\%(@\{1,3}\|//[.@]\=\)" syntax match mmaOperator "\%(/[;:@.]\=\|\^\=:\==\)" syntax match mmaOperator "\%([-:=]\=>\|<=\=\)" "syntax match mmaOperator "\%(++\=\|--\=\|[/+-*]=\|[^*]\)" syntax match mmaOperator "[*+=^.:?-]" syntax match mmaOperator "\%(\~\~\=\)" syntax match mmaOperator "\%(=\{2,3}\|=\=!=\|||\=\|&&\|!\)" contains=ALLBUT,mmaPureFunction " Symbol Tags: " "SymbolName::item" "syntax match mmaSymbol "`\=[a-zA-Z$]\+[0-9a-zA-Z$]*\%(`\%([a-zA-Z$]\+[0-9a-zA-Z$]*\)\=\)*" contained syntax match mmaMessage "`\=\([a-zA-Z$]\+[0-9a-zA-Z$]*\)\%(`\%([a-zA-Z$]\+[0-9a-zA-Z$]*\)\=\)*::\a\+" contains=mmaMessageType syntax match mmaMessageType "::\a\+"hs=s+2 contained " Pure Functions: syntax match mmaPureFunction "#\%(#\|\d\+\)\=" syntax match mmaPureFunction "&" " Named Functions: " Since everything is pretty much a function, get this straight " from context syntax match mmaGenericFunction "[A-Za-z0-9`]\+\s*\%([@[]\|/:\|/\=/@\)\@=" contains=mmaOperator syntax match mmaGenericFunction "\~\s*[^~]\+\s*\~"hs=s+1,he=e-1 contains=mmaOperator,mmaBoring syntax match mmaGenericFunction "//\s*[A-Za-z0-9`]\+"hs=s+2 contains=mmaOperator " Numbers: syntax match mmaNumber "\<\%(\d\+\.\=\d*\|\d*\.\=\d\+\)\>" syntax match mmaNumber "`\d\+\%(\d\@!\.\|\>\)" " Special Characters: " \[Name] named character " \ooo octal " \.xx 2 digit hex " \:xxxx 4 digit hex (multibyte unicode) syntax match mmaUnicode "\\\[\w\+\d*\]" syntax match mmaUnicode "\\\%(\x\{3}\|\.\x\{2}\|:\x\{4}\)" " Syntax Errors: syntax match mmaError "\*)" containedin=ALLBUT,@mmaComments,@mmaStrings syntax match mmaError "\%([/]{3,}\|[&:|+*?~-]\{3,}\|[.=]\{4,}\|_\@<=\.\{2,}\|`\{2,}\)" containedin=ALLBUT,@mmaComments,@mmaStrings " Punctuation: " things that shouldn't really be highlighted, or highlighted " in they're own group if you _really_ want. :) " ( ) { } " TODO - use Delimiter group? syntax match mmaBoring "[(){}]" contained " ------------------------------------ " future explorations... " ------------------------------------ " Function Arguments: " anything between brackets [] " (fold) "syntax region mmaArgument start="\[" end="\]" containedin=ALLBUT,@mmaComments,@mmaStrings transparent fold " Lists: " (fold) "syntax region mmaLists start="{" end="}" containedin=ALLBUT,@mmaComments,@mmaStrings transparent fold " Regions: " (fold) "syntax region mmaRegion start="(\*\+[^<]* \*)" containedin=ALLBUT,@mmaStrings transparent fold keepend " show fold text set commentstring='(*%s*)' "set foldtext=MmaFoldText() "function MmaFoldText() " let line = getline(v:foldstart) " " let lines = v:foldend-v:foldstart+1 " " let sub = substitute(line, '(\*\+|\*\+)|[-*_]\+', '', 'g') " " if match(line, '(\*') != -1 " let lines = lines.' line comment' " else " let lines = lines.' lines' " endif " " return v:folddashes.' '.lines.' '.sub "endf "this is slow for computing folds, but it does so accurately syntax sync fromstart " but this seems to do alright for non fold syntax coloring. " for folding, however, it doesn't get the nesting right. " TODO - find sync group for multiline modules? ick... " sync multi line comments "syntax sync match syncComments groupthere NONE "\*)" "syntax sync match syncComments groupthere mmaComment "(\*" "set foldmethod=syntax "set foldnestmax=1 "set foldminlines=15 " NOTE - the following links are not guaranteed to " look good under all colorschemes. You might need to " :so $VIMRUNTIME/syntax/hitest.vim and tweak these to " look good in yours hi def link mmaComment Comment hi def link mmaCommentStar Comment hi def link mmaFunctionComment Comment hi def link mmaLooseQuote Comment hi def link mmaGenericFunction Function hi def link mmaVariable Identifier " hi def link mmaSymbol Identifier hi def link mmaOperator Operator hi def link mmaPatternOp Operator hi def link mmaPureFunction Operator hi def link mmaString String hi def link mmaCommentString String hi def link mmaUnicode String hi def link mmaMessage Type hi def link mmaNumber Type hi def link mmaPattern Type hi def link mmaError Error hi def link mmaFixme Error hi def link mmaPatternError Error hi def link mmaTodo Todo hi def link mmaemPHAsis Special hi def link mmaFunctionTitle Special hi def link mmaMessageType Special hi def link mmaItem Preproc let b:current_syntax = "mma" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/mmix.vim000066400000000000000000000115501320401574200175100ustar00rootroot00000000000000" Vim syntax file " Language: MMIX " Maintainer: Dirk Hsken, " Last Change: 2012 Jun 01 " (Dominique Pelle added @Spell) " Filenames: *.mms " URL: http://homepages.uni-tuebingen.de/student/dirk.huesken/vim/syntax/mmix.vim " Limitations: Comments must start with either % or // " (preferably %, Knuth-Style) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " MMIX data types syn keyword mmixType byte wyde tetra octa " different literals... syn match decNumber "[0-9]*" syn match octNumber "0[0-7][0-7]\+" syn match hexNumber "#[0-9a-fA-F]\+" syn region mmixString start=+"+ skip=+\\"+ end=+"+ contains=@Spell syn match mmixChar "'.'" " ...and more special MMIX stuff syn match mmixAt "@" syn keyword mmixSegments Data_Segment Pool_Segment Stack_Segment syn match mmixIdentifier "[a-z_][a-z0-9_]*" " labels (for branches etc) syn match mmixLabel "^[a-z0-9_:][a-z0-9_]*" syn match mmixLabel "[0-9][HBF]" " pseudo-operations syn keyword mmixPseudo is loc greg " comments syn match mmixComment "%.*" contains=@Spell syn match mmixComment "//.*" contains=@Spell syn match mmixComment "^\*.*" contains=@Spell syn keyword mmixOpcode trap fcmp fun feql fadd fix fsub fixu syn keyword mmixOpcode fmul fcmpe fune feqle fdiv fsqrt frem fint syn keyword mmixOpcode floti flotui sfloti sflotui i syn keyword mmixOpcode muli mului divi divui syn keyword mmixOpcode addi addui subi subui syn keyword mmixOpcode 2addui 4addui 8addui 16addui syn keyword mmixOpcode cmpi cmpui negi negui syn keyword mmixOpcode sli slui sri srui syn keyword mmixOpcode bnb bzb bpb bodb syn keyword mmixOpcode bnnb bnzb bnpb bevb syn keyword mmixOpcode pbnb pbzb pbpb pbodb syn keyword mmixOpcode pbnnb pbnzb pbnpb pbevb syn keyword mmixOpcode csni cszi cspi csodi syn keyword mmixOpcode csnni csnzi csnpi csevi syn keyword mmixOpcode zsni zszi zspi zsodi syn keyword mmixOpcode zsnni zsnzi zsnpi zsevi syn keyword mmixOpcode ldbi ldbui ldwi ldwui syn keyword mmixOpcode ldti ldtui ldoi ldoui syn keyword mmixOpcode ldsfi ldhti cswapi ldunci syn keyword mmixOpcode ldvtsi preldi pregoi goi syn keyword mmixOpcode stbi stbui stwi stwui syn keyword mmixOpcode stti sttui stoi stoui syn keyword mmixOpcode stsfi sthti stcoi stunci syn keyword mmixOpcode syncdi presti syncidi pushgoi syn keyword mmixOpcode ori orni nori xori syn keyword mmixOpcode andi andni nandi nxori syn keyword mmixOpcode bdifi wdifi tdifi odifi syn keyword mmixOpcode muxi saddi mori mxori syn keyword mmixOpcode muli mului divi divui syn keyword mmixOpcode flot flotu sflot sflotu syn keyword mmixOpcode mul mulu div divu syn keyword mmixOpcode add addu sub subu syn keyword mmixOpcode 2addu 4addu 8addu 16addu syn keyword mmixOpcode cmp cmpu neg negu syn keyword mmixOpcode sl slu sr sru syn keyword mmixOpcode bn bz bp bod syn keyword mmixOpcode bnn bnz bnp bev syn keyword mmixOpcode pbn pbz pbp pbod syn keyword mmixOpcode pbnn pbnz pbnp pbev syn keyword mmixOpcode csn csz csp csod syn keyword mmixOpcode csnn csnz csnp csev syn keyword mmixOpcode zsn zsz zsp zsod syn keyword mmixOpcode zsnn zsnz zsnp zsev syn keyword mmixOpcode ldb ldbu ldw ldwu syn keyword mmixOpcode ldt ldtu ldo ldou syn keyword mmixOpcode ldsf ldht cswap ldunc syn keyword mmixOpcode ldvts preld prego go syn keyword mmixOpcode stb stbu stw stwu syn keyword mmixOpcode stt sttu sto stou syn keyword mmixOpcode stsf stht stco stunc syn keyword mmixOpcode syncd prest syncid pushgo syn keyword mmixOpcode or orn nor xor syn keyword mmixOpcode and andn nand nxor syn keyword mmixOpcode bdif wdif tdif odif syn keyword mmixOpcode mux sadd mor mxor syn keyword mmixOpcode seth setmh setml setl inch incmh incml incl syn keyword mmixOpcode orh ormh orml orl andh andmh andml andnl syn keyword mmixOpcode jmp pushj geta put syn keyword mmixOpcode pop resume save unsave sync swym get trip syn keyword mmixOpcode set lda " switch back to being case sensitive syn case match " general-purpose and special-purpose registers syn match mmixRegister "$[0-9]*" syn match mmixRegister "r[A-Z]" syn keyword mmixRegister rBB rTT rWW rXX rYY rZZ " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later hi def link mmixAt Type hi def link mmixPseudo Type hi def link mmixRegister Special hi def link mmixSegments Type hi def link mmixLabel Special hi def link mmixComment Comment hi def link mmixOpcode Keyword hi def link hexNumber Number hi def link decNumber Number hi def link octNumber Number hi def link mmixString String hi def link mmixChar String hi def link mmixType Type hi def link mmixIdentifier Normal hi def link mmixSpecialComment Comment " My default color overrides: " hi mmixSpecialComment ctermfg=red "hi mmixLabel ctermfg=lightcyan " hi mmixType ctermbg=black ctermfg=brown let b:current_syntax = "mmix" " vim: ts=8 neovim-0.2.2/runtime/syntax/mmp.vim000066400000000000000000000027161320401574200173330ustar00rootroot00000000000000" Vim syntax file " Language: Symbian meta-makefile definition (MMP) " Maintainer: Ron Aaron " Last Change: 2007/11/07 " URL: http://ronware.org/wiki/vim/mmp " Filetypes: *.mmp " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore syn match mmpComment "//.*" syn region mmpComment start="/\*" end="\*\/" syn keyword mmpKeyword aif asspabi assplibrary aaspexports baseaddress syn keyword mmpKeyword debuglibrary deffile document epocheapsize syn keyword mmpKeyword epocprocesspriority epocstacksize exportunfrozen syn keyword mmpStorage lang library linkas macro nostrictdef option syn keyword mmpStorage resource source sourcepath srcdbg startbitmap syn keyword mmpStorage start end staticlibrary strictdepend systeminclude syn keyword mmpStorage systemresource target targettype targetpath uid syn keyword mmpStorage userinclude win32_library syn match mmpIfdef "\#\(include\|ifdef\|ifndef\|if\|endif\|else\|elif\)" syn match mmpNumber "\d+" syn match mmpNumber "0x\x\+" " Define the default highlighting. " Only when an item doesn't have highlighting yet if !exists("did_mmp_syntax_inits") let did_mmp_syntax_inits=1 hi def link mmpComment Comment hi def link mmpKeyword Keyword hi def link mmpStorage StorageClass hi def link mmpString String hi def link mmpNumber Number hi def link mmpOrdinal Operator hi def link mmpIfdef PreCondit endif let b:current_syntax = "mmp" " vim: ts=8 neovim-0.2.2/runtime/syntax/modconf.vim000066400000000000000000000026131320401574200201630ustar00rootroot00000000000000" Vim syntax file " Language: modules.conf(5) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2007-10-25 if exists("b:current_syntax") finish endif setlocal iskeyword+=- let s:cpo_save = &cpo set cpo&vim syn keyword modconfTodo FIXME TODO XXX NOTE syn region modconfComment start='#' skip='\\$' end='$' \ contains=modconfTodo,@Spell syn keyword modconfConditional if else elseif endif syn keyword modconfPreProc alias define include keep prune \ post-install post-remove pre-install \ pre-remove persistdir blacklist syn keyword modconfKeyword add above below install options probe probeall \ remove syn keyword modconfIdentifier depfile insmod_opt path generic_stringfile \ pcimapfile isapnpmapfile usbmapfile \ parportmapfile ieee1394mapfile pnpbiosmapfile syn match modconfIdentifier 'path\[[^]]\+\]' hi def link modconfTodo Todo hi def link modconfComment Comment hi def link modconfConditional Conditional hi def link modconfPreProc PreProc hi def link modconfKeyword Keyword hi def link modconfIdentifier Identifier let b:current_syntax = "modconf" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/model.vim000066400000000000000000000026751320401574200176460ustar00rootroot00000000000000" Vim syntax file " Language: Model " Maintainer: Bram Moolenaar " Last Change: 2005 Jun 20 " very basic things only (based on the vgrindefs file). " If you use this language, please improve it, and send me the patches! " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif " A bunch of keywords syn keyword modelKeyword abs and array boolean by case cdnl char copied dispose syn keyword modelKeyword div do dynamic else elsif end entry external FALSE false syn keyword modelKeyword fi file for formal fortran global if iff ift in integer include syn keyword modelKeyword inline is lbnd max min mod new NIL nil noresult not notin od of syn keyword modelKeyword or procedure public read readln readonly record recursive rem rep syn keyword modelKeyword repeat res result return set space string subscript such then TRUE syn keyword modelKeyword true type ubnd union until varies while width " Special keywords syn keyword modelBlock beginproc endproc " Comments syn region modelComment start="\$" end="\$" end="$" " Strings syn region modelString start=+"+ end=+"+ " Character constant (is this right?) syn match modelString "'." " Define the default highlighting. " Only used when an item doesn't have highlighting yet hi def link modelKeyword Statement hi def link modelBlock PreProc hi def link modelComment Comment hi def link modelString String let b:current_syntax = "model" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/modsim3.vim000066400000000000000000000070471320401574200201170ustar00rootroot00000000000000" Vim syntax file " Language: Modsim III, by compuware corporation (www.compuware.com) " Maintainer: Philipp Jocham " Extension: *.mod " Last Change: 2001 May 10 " " 2001 March 24: " - Modsim III is a registered trademark from compuware corporation " - made compatible with Vim 6.0 " " 1999 Apr 22 : Changed modsim3Literal from region to match " " very basic things only (based on the modula2 and c files). " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " syn case match " case sensitiv match is default " A bunch of keywords syn keyword modsim3Keyword ACTID ALL AND AS ASK syn keyword modsim3Keyword BY CALL CASE CLASS CONST DIV syn keyword modsim3Keyword DOWNTO DURATION ELSE ELSIF EXIT FALSE FIXED FOR syn keyword modsim3Keyword FOREACH FORWARD IF IN INHERITED INOUT syn keyword modsim3Keyword INTERRUPT LOOP syn keyword modsim3Keyword MOD MONITOR NEWVALUE syn keyword modsim3Keyword NONMODSIM NOT OBJECT OF ON OR ORIGINAL OTHERWISE OUT syn keyword modsim3Keyword OVERRIDE PRIVATE PROTO REPEAT syn keyword modsim3Keyword RETURN REVERSED SELF STRERR TELL syn keyword modsim3Keyword TERMINATE THISMETHOD TO TRUE TYPE UNTIL VALUE VAR syn keyword modsim3Keyword WAIT WAITFOR WHEN WHILE WITH " Builtin functions and procedures syn keyword modsim3Builtin ABS ACTIVATE ADDMONITOR CAP CHARTOSTR CHR CLONE syn keyword modsim3Builtin DEACTIVATE DEC DISPOSE FLOAT GETMONITOR HIGH INC syn keyword modsim3Builtin INPUT INSERT INTTOSTR ISANCESTOR LOW LOWER MAX MAXOF syn keyword modsim3Builtin MIN MINOF NEW OBJTYPEID OBJTYPENAME OBJVARID ODD syn keyword modsim3Builtin ONERROR ONEXIT ORD OUTPUT POSITION PRINT REALTOSTR syn keyword modsim3Builtin REPLACE REMOVEMONITOR ROUND SCHAR SIZEOF SPRINT syn keyword modsim3Builtin STRLEN STRTOCHAR STRTOINT STRTOREAL SUBSTR TRUNC syn keyword modsim3Builtin UPDATEVALUE UPPER VAL syn keyword modsim3BuiltinNoParen HALT TRACE " Special keywords syn keyword modsim3Block PROCEDURE METHOD MODULE MAIN DEFINITION IMPLEMENTATION syn keyword modsim3Block BEGIN END syn keyword modsim3Include IMPORT FROM syn keyword modsim3Type ANYARRAY ANYOBJ ANYREC ARRAY BOOLEAN CHAR INTEGER syn keyword modsim3Type LMONITORED LRMONITORED NILARRAY NILOBJ NILREC REAL syn keyword modsim3Type RECORD RMONITOR RMONITORED STRING " catch errros cause by wrong parenthesis " slight problem with "( *)" or "(* )". Hints? syn region modsim3Paren transparent start='(' end=')' contains=ALLBUT,modsim3ParenError syn match modsim3ParenError ")" " Comments syn region modsim3Comment1 start="{" end="}" contains=modsim3Comment1,modsim3Comment2 syn region modsim3Comment2 start="(\*" end="\*)" contains=modsim3Comment1,modsim3Comment2 " highlighting is wrong for constructs like "{ (* } *)", " which are allowed in Modsim III, but " I think something like that shouldn't be used anyway. " Strings syn region modsim3String start=+"+ end=+"+ " Literals "syn region modsim3Literal start=+'+ end=+'+ syn match modsim3Literal "'[^']'\|''''" " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later hi def link modsim3Keyword Statement hi def link modsim3Block Statement hi def link modsim3Comment1 Comment hi def link modsim3Comment2 Comment hi def link modsim3String String hi def link modsim3Literal Character hi def link modsim3Include Statement hi def link modsim3Type Type hi def link modsim3ParenError Error hi def link modsim3Builtin Function hi def link modsim3BuiltinNoParen Function let b:current_syntax = "modsim3" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/modula2.vim000066400000000000000000000062311320401574200201010ustar00rootroot00000000000000" Vim syntax file " Language: Modula 2 " Maintainer: pf@artcom0.north.de (Peter Funk) " based on original work of Bram Moolenaar " Last Change: 2001 May 09 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Don't ignore case (Modula-2 is case significant). This is the default in vim " Especially emphasize headers of procedures and modules: syn region modula2Header matchgroup=modula2Header start="PROCEDURE " end="(" contains=modula2Ident oneline syn region modula2Header matchgroup=modula2Header start="MODULE " end=";" contains=modula2Ident oneline syn region modula2Header matchgroup=modula2Header start="BEGIN (\*" end="\*)" contains=modula2Ident oneline syn region modula2Header matchgroup=modula2Header start="END " end=";" contains=modula2Ident oneline syn region modula2Keyword start="END" end=";" contains=ALLBUT,modula2Ident oneline " Some very important keywords which should be emphasized more than others: syn keyword modula2AttKeyword CONST EXIT HALT RETURN TYPE VAR " All other keywords in alphabetical order: syn keyword modula2Keyword AND ARRAY BY CASE DEFINITION DIV DO ELSE syn keyword modula2Keyword ELSIF EXPORT FOR FROM IF IMPLEMENTATION IMPORT syn keyword modula2Keyword IN LOOP MOD NOT OF OR POINTER QUALIFIED RECORD syn keyword modula2Keyword SET THEN TO UNTIL WHILE WITH syn keyword modula2Type ADDRESS BITSET BOOLEAN CARDINAL CHAR INTEGER REAL WORD syn keyword modula2StdFunc ABS CAP CHR DEC EXCL INC INCL ORD SIZE TSIZE VAL syn keyword modula2StdConst FALSE NIL TRUE " The following may be discussed, since NEW and DISPOSE are some kind of " special builtin macro functions: syn keyword modula2StdFunc NEW DISPOSE " The following types are added later on and may be missing from older " Modula-2 Compilers (they are at least missing from the original report " by N.Wirth from March 1980 ;-) Highlighting should apply nevertheless: syn keyword modula2Type BYTE LONGCARD LONGINT LONGREAL PROC SHORTCARD SHORTINT " same note applies to min and max, which were also added later to m2: syn keyword modula2StdFunc MAX MIN " The underscore was originally disallowed in m2 ids, it was also added later: syn match modula2Ident " [A-Z,a-z][A-Z,a-z,0-9,_]*" contained " Comments may be nested in Modula-2: syn region modula2Comment start="(\*" end="\*)" contains=modula2Comment,modula2Todo syn keyword modula2Todo contained TODO FIXME XXX " Strings syn region modula2String start=+"+ end=+"+ syn region modula2String start="'" end="'" syn region modula2Set start="{" end="}" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link modula2Ident Identifier hi def link modula2StdConst Boolean hi def link modula2Type Identifier hi def link modula2StdFunc Identifier hi def link modula2Header Type hi def link modula2Keyword Statement hi def link modula2AttKeyword PreProc hi def link modula2Comment Comment " The following is just a matter of taste (you want to try this instead): " hi modula2Comment term=bold ctermfg=DarkBlue guifg=Blue gui=bold hi def link modula2Todo Todo hi def link modula2String String hi def link modula2Set String let b:current_syntax = "modula2" " vim: ts=8 neovim-0.2.2/runtime/syntax/modula3.vim000066400000000000000000000037341320401574200201070ustar00rootroot00000000000000" Vim syntax file " Language: Modula-3 " Maintainer: Timo Pedersen " Last Change: 2001 May 10 " Basic things only... " Based on the modula 2 syntax file " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Modula-3 is case-sensitive " syn case ignore " Modula-3 keywords syn keyword modula3Keyword ABS ADDRES ADR ADRSIZE AND ANY syn keyword modula3Keyword ARRAY AS BITS BITSIZE BOOLEAN BRANDED BY BYTESIZE syn keyword modula3Keyword CARDINAL CASE CEILING CHAR CONST DEC DEFINITION syn keyword modula3Keyword DISPOSE DIV syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION syn keyword modula3Keyword EXIT EXPORTS EXTENDED FALSE FINALLY FIRST FLOAT syn keyword modula3Keyword FLOOR FROM GENERIC IMPORT syn keyword modula3Keyword IN INC INTEGER ISTYPE LAST LOCK syn keyword modula3Keyword LONGREAL LOOPHOLE MAX METHOD MIN MOD MUTEX syn keyword modula3Keyword NARROW NEW NIL NOT NULL NUMBER OF OR ORD RAISE syn keyword modula3Keyword RAISES READONLY REAL RECORD REF REFANY syn keyword modula3Keyword RETURN ROOT syn keyword modula3Keyword ROUND SET SUBARRAY TEXT TRUE TRUNC TRY TYPE syn keyword modula3Keyword TYPECASE TYPECODE UNSAFE UNTRACED VAL VALUE VAR WITH " Special keywords, block delimiters etc syn keyword modula3Block PROCEDURE FUNCTION MODULE INTERFACE REPEAT THEN syn keyword modula3Block BEGIN END OBJECT METHODS OVERRIDES RECORD REVEAL syn keyword modula3Block WHILE UNTIL DO TO IF FOR ELSIF ELSE LOOP " Comments syn region modula3Comment start="(\*" end="\*)" " Strings syn region modula3String start=+"+ end=+"+ syn region modula3String start=+'+ end=+'+ " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later hi def link modula3Keyword Statement hi def link modula3Block PreProc hi def link modula3Comment Comment hi def link modula3String String let b:current_syntax = "modula3" "I prefer to use this... "set ai "vim: ts=8 neovim-0.2.2/runtime/syntax/monk.vim000066400000000000000000000237531320401574200175120ustar00rootroot00000000000000" Vim syntax file " Language: Monk (See-Beyond Technologies) " Maintainer: Mike Litherland " Last Change: 2012 Feb 03 by Thilo Six " This syntax file is good enough for my needs, but others " may desire more features. Suggestions and bug reports " are solicited by the author (above). " Originally based on the Scheme syntax file by: " Maintainer: Dirk van Deun " Last Change: April 30, 1998 " In fact it's almost identical. :) " The original author's notes: " This script incorrectly recognizes some junk input as numerals: " parsing the complete system of Scheme numerals using the pattern " language is practically impossible: I did a lax approximation. " Initializing: " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case ignore " Fascist highlighting: everything that doesn't fit the rules is an error... syn match monkError oneline ![^ \t()";]*! syn match monkError oneline ")" " Quoted and backquoted stuff syn region monkQuoted matchgroup=Delimiter start="['`]" end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start="," end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start=",@" end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start=",(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc " R5RS Scheme Functions and Syntax: setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ syn keyword monkSyntax lambda and or if cond case define let let* letrec syn keyword monkSyntax begin do delay set! else => syn keyword monkSyntax quote quasiquote unquote unquote-splicing syn keyword monkSyntax define-syntax let-syntax letrec-syntax syntax-rules syn keyword monkFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car! syn keyword monkFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr syn keyword monkFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr syn keyword monkFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr syn keyword monkFunc cddaar cddadr cdddar cddddr null? list? list length syn keyword monkFunc append reverse list-ref memq memv member assq assv assoc syn keyword monkFunc symbol? symbol->string string->symbol number? complex? syn keyword monkFunc real? rational? integer? exact? inexact? = < > <= >= syn keyword monkFunc zero? positive? negative? odd? even? max min + * - / abs syn keyword monkFunc quotient remainder modulo gcd lcm numerator denominator syn keyword monkFunc floor ceiling truncate round rationalize exp log sin cos syn keyword monkFunc tan asin acos atan sqrt expt make-rectangular make-polar syn keyword monkFunc real-part imag-part magnitude angle exact->inexact syn keyword monkFunc inexact->exact number->string string->number char=? syn keyword monkFunc char-ci=? char? char-ci>? char<=? syn keyword monkFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char? syn keyword monkFunc char-numeric? char-whitespace? char-upper-case? syn keyword monkFunc char-lower-case? syn keyword monkFunc char->integer integer->char char-upcase char-downcase syn keyword monkFunc string? make-string string string-length string-ref syn keyword monkFunc string-set! string=? string-ci=? string? string-ci>? string<=? string-ci<=? string>=? syn keyword monkFunc string-ci>=? substring string-append vector? make-vector syn keyword monkFunc vector vector-length vector-ref vector-set! procedure? syn keyword monkFunc apply map for-each call-with-current-continuation syn keyword monkFunc call-with-input-file call-with-output-file input-port? syn keyword monkFunc output-port? current-input-port current-output-port syn keyword monkFunc open-input-file open-output-file close-input-port syn keyword monkFunc close-output-port eof-object? read read-char peek-char syn keyword monkFunc write display newline write-char call/cc syn keyword monkFunc list-tail string->list list->string string-copy syn keyword monkFunc string-fill! vector->list list->vector vector-fill! syn keyword monkFunc force with-input-from-file with-output-to-file syn keyword monkFunc char-ready? load transcript-on transcript-off eval syn keyword monkFunc dynamic-wind port? values call-with-values syn keyword monkFunc monk-report-environment null-environment syn keyword monkFunc interaction-environment " Keywords specific to STC's implementation syn keyword monkFunc $event-clear $event-parse $event->string $make-event-map syn keyword monkFunc $resolve-event-definition change-pattern copy copy-strip syn keyword monkFunc count-data-children count-map-children count-rep data-map syn keyword monkFunc duplicate duplicate-strip file-check file-lookup get syn keyword monkFunc insert list-lookup node-has-data? not-verify path? syn keyword monkFunc path-defined-as-repeating? path-nodeclear path-nodedepth syn keyword monkFunc path-nodename path-nodeparentname path->string path-valid? syn keyword monkFunc regex string->path timestamp uniqueid verify " Keywords from the Monk function library (from e*Gate 4.1 programmers ref) syn keyword monkFunc allcap? capitalize char-punctuation? char-substitute syn keyword monkFunc char-to-char conv count-used-children degc->degf syn keyword monkFunc diff-two-dates display-error empty-string? fail_id syn keyword monkFunc fail_id_if fail_translation fail_translation_if syn keyword monkFunc find-get-after find-get-before get-timestamp julian-date? syn keyword monkFunc julian->standard leap-year? map-string not-empty-string? syn keyword monkFunc standard-date? standard->julian string-begins-with? syn keyword monkFunc string-contains? string-ends-with? string-search-from-left syn keyword monkFunc string-search-from-right string->ssn strip-punct syn keyword monkFunc strip-string substring=? symbol-table-get symbol-table-put syn keyword monkFunc trim-string-left trim-string-right valid-decimal? syn keyword monkFunc valid-integer? verify-type " Writing out the complete description of Scheme numerals without " using variables is a day's work for a trained secretary... " This is a useful lax approximation: syn match monkNumber oneline "[-#+0-9.][-#+/0-9a-f@i.boxesfdl]*" syn match monkError oneline ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t()";][^ \t()";]*! syn match monkOther oneline ![+-][ \t()";]!me=e-1 syn match monkOther oneline ![+-]$! " ... so that a single + or -, inside a quoted context, would not be " interpreted as a number (outside such contexts, it's a monkFunc) syn match monkDelimiter oneline !\.[ \t()";]!me=e-1 syn match monkDelimiter oneline !\.$! " ... and a single dot is not a number but a delimiter " Simple literals: syn match monkBoolean oneline "#[tf]" syn match monkError oneline !#[tf][^ \t()";]\+! syn match monkChar oneline "#\\" syn match monkChar oneline "#\\." syn match monkError oneline !#\\.[^ \t()";]\+! syn match monkChar oneline "#\\space" syn match monkError oneline !#\\space[^ \t()";]\+! syn match monkChar oneline "#\\newline" syn match monkError oneline !#\\newline[^ \t()";]\+! " This keeps all other stuff unhighlighted, except *stuff* and : syn match monkOther oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*, syn match monkError oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, syn match monkOther oneline "\.\.\." syn match monkError oneline !\.\.\.[^ \t()";]\+! " ... a special identifier syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[ \t()";],me=e-1 syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*$, syn match monkError oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t()";],me=e-1 syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$, syn match monkError oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, " Monk input and output structures syn match monkSyntax oneline "\(\~input\|\[I\]->\)[^ \t]*" syn match monkFunc oneline "\(\~output\|\[O\]->\)[^ \t]*" " Non-quoted lists, and strings: syn region monkStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL syn region monkStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL syn region monkString start=+"+ skip=+\\[\\"]+ end=+"+ " Comments: syn match monkComment ";.*$" " Synchronization and the wrapping up... syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link monkSyntax Statement hi def link monkFunc Function hi def link monkString String hi def link monkChar Character hi def link monkNumber Number hi def link monkBoolean Boolean hi def link monkDelimiter Delimiter hi def link monkConstant Constant hi def link monkComment Comment hi def link monkError Error let b:current_syntax = "monk" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/moo.vim000066400000000000000000000220221320401574200173240ustar00rootroot00000000000000" Vim syntax file " Language: MOO " Maintainer: Timo Frenay " Last Change: 2001 Oct 06 " Note: Requires Vim 6.0 or above " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Initializations syn case ignore " C-style comments syn match mooUncommentedError display ~\*/~ syn match mooCStyleCommentError display ~/\ze\*~ contained syn region mooCStyleComment matchgroup=mooComment start=~/\*~ end=~\*/~ contains=mooCStyleCommentError " Statements if exists("moo_extended_cstyle_comments") syn match mooIdentifier display ~\%(\%(/\*.\{-}\*/\s*\)*\)\@>\<\h\w*\>~ contained transparent contains=mooCStyleComment,@mooKeyword,mooType,mooVariable else syn match mooIdentifier display ~\<\h\w*\>~ contained transparent contains=@mooKeyword,mooType,mooVariable endif syn keyword mooStatement break continue else elseif endfor endfork endif endtry endwhile finally for if try syn keyword mooStatement except fork while nextgroup=mooIdentifier skipwhite syn keyword mooStatement return nextgroup=mooString skipwhite " Operators syn keyword mooOperatorIn in " Error constants syn keyword mooAny ANY syn keyword mooErrorConstant E_ARGS E_INVARG E_DIV E_FLOAT E_INVIND E_MAXREC E_NACC E_NONE E_PERM E_PROPNF E_QUOTA E_RANGE E_RECMOVE E_TYPE E_VARNF E_VERBNF " Builtin variables syn match mooType display ~\<\%(ERR\|FLOAT\|INT\|LIST\|NUM\|OBJ\|STR\)\>~ syn match mooVariable display ~\<\%(args\%(tr\)\=\|caller\|dobj\%(str\)\=\|iobj\%(str\)\=\|player\|prepstr\|this\|verb\)\>~ " Strings syn match mooStringError display ~[^\t -[\]-~]~ contained syn match mooStringSpecialChar display ~\\["\\]~ contained if !exists("moo_no_regexp") " Regular expressions syn match mooRegexp display ~%%~ contained containedin=mooString,mooRegexpParentheses transparent contains=NONE syn region mooRegexpParentheses display matchgroup=mooRegexpOr start=~%(~ skip=~%%~ end=~%)~ contained containedin=mooString,mooRegexpParentheses transparent oneline syn match mooRegexpOr display ~%|~ contained containedin=mooString,mooRegexpParentheses endif if !exists("moo_no_pronoun_sub") " Pronoun substitutions syn match mooPronounSub display ~%%~ contained containedin=mooString transparent contains=NONE syn match mooPronounSub display ~%[#dilnopqrst]~ contained containedin=mooString syn match mooPronounSub display ~%\[#[dilnt]\]~ contained containedin=mooString syn match mooPronounSub display ~%(\h\w*)~ contained containedin=mooString syn match mooPronounSub display ~%\[[dilnt]\h\w*\]~ contained containedin=mooString syn match mooPronounSub display ~%<\%([dilnt]:\)\=\a\+>~ contained containedin=mooString endif if exists("moo_unmatched_quotes") syn region mooString matchgroup=mooStringError start=~"~ end=~$~ contains=@mooStringContents keepend syn region mooString start=~"~ skip=~\\.~ end=~"~ contains=@mooStringContents oneline keepend else syn region mooString start=~"~ skip=~\\.~ end=~"\|$~ contains=@mooStringContents keepend endif " Numbers and object numbers syn match mooNumber display ~\%(\%(\<\d\+\)\=\.\d\+\|\<\d\+\)\%(e[+\-]\=\d\+\)\=\>~ syn match mooObject display ~#-\=\d\+\>~ " Properties and verbs if exists("moo_builtin_properties") "Builtin properties syn keyword mooBuiltinProperty contents f location name owner programmer r w wizard contained containedin=mooPropRef endif if exists("moo_extended_cstyle_comments") syn match mooPropRef display ~\.\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\h\w*\>~ transparent contains=mooCStyleComment,@mooKeyword syn match mooVerbRef display ~:\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\h\w*\>~ transparent contains=mooCStyleComment,@mooKeyword else syn match mooPropRef display ~\.\s*\h\w*\>~ transparent contains=@mooKeyword syn match mooVerbRef display ~:\s*\h\w*\>~ transparent contains=@mooKeyword endif " Builtin functions, core properties and core verbs if exists("moo_extended_cstyle_comments") syn match mooBuiltinFunction display ~\<\h\w*\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\ze(~ contains=mooCStyleComment syn match mooCorePropOrVerb display ~\$\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\%(in\>\)\@!\h\w*\>~ contains=mooCStyleComment,@mooKeyword else syn match mooBuiltinFunction display ~\<\h\w*\s*\ze(~ contains=NONE syn match mooCorePropOrVerb display ~\$\s*\%(in\>\)\@!\h\w*\>~ contains=@mooKeyword endif if exists("moo_unknown_builtin_functions") syn match mooUnknownBuiltinFunction ~\<\h\w*\>~ contained containedin=mooBuiltinFunction contains=mooKnownBuiltinFunction " Known builtin functions as of version 1.8.1 of the server " Add your own extensions to this group if you like syn keyword mooKnownBuiltinFunction abs acos add_property add_verb asin atan binary_hash boot_player buffered_output_length callers caller_perms call_function ceil children chparent clear_property connected_players connected_seconds connection_name connection_option connection_options cos cosh create crypt ctime db_disk_size decode_binary delete_property delete_verb disassemble dump_database encode_binary equal eval exp floatstr floor flush_input force_input function_info idle_seconds index is_clear_property is_member is_player kill_task length listappend listdelete listen listeners listinsert listset log log10 match max max_object memory_usage min move notify object_bytes open_network_connection output_delimiters parent pass players properties property_info queued_tasks queue_info raise random read recycle renumber reset_max_object resume rindex rmatch seconds_left server_log server_version setadd setremove set_connection_option set_player_flag set_property_info set_task_perms set_verb_args set_verb_code set_verb_info shutdown sin sinh sqrt strcmp string_hash strsub substitute suspend tan tanh task_id task_stack ticks_left time tofloat toint toliteral tonum toobj tostr trunc typeof unlisten valid value_bytes value_hash verbs verb_args verb_code verb_info contained endif "Enclosed expressions syn match mooUnenclosedError display ~[')\]|}]~ syn match mooParenthesesError display ~[';\]|}]~ contained syn region mooParentheses start=~(~ end=~)~ transparent contains=@mooEnclosedContents,mooParenthesesError syn match mooBracketsError display ~[');|}]~ contained syn region mooBrackets start=~\[~ end=~\]~ transparent contains=@mooEnclosedContents,mooBracketsError syn match mooBracesError display ~[');\]|]~ contained syn region mooBraces start=~{~ end=~}~ transparent contains=@mooEnclosedContents,mooBracesError syn match mooQuestionError display ~[');\]}]~ contained syn region mooQuestion start=~?~ end=~|~ transparent contains=@mooEnclosedContents,mooQuestionError syn match mooCatchError display ~[);\]|}]~ contained syn region mooCatch matchgroup=mooExclamation start=~`~ end=~'~ transparent contains=@mooEnclosedContents,mooCatchError,mooExclamation if exists("moo_extended_cstyle_comments") syn match mooExclamation display ~[\t !%&(*+,\-/<=>?@[^`{|]\@!=\@!~ contained contains=mooCStyleComment else syn match mooExclamation display ~[\t !%&(*+,\-/<=>?@[^`{|]\@?@^|]\@?~ transparent contains=mooCStyleComment else syn match mooScattering ~[,{]\@<=\s*?~ transparent contains=NONE endif " Clusters syn cluster mooKeyword contains=mooStatement,mooOperatorIn,mooAny,mooErrorConstant syn cluster mooStringContents contains=mooStringError,mooStringSpecialChar syn cluster mooEnclosedContents contains=TOP,mooUnenclosedError,mooComment,mooNonCode " Define the default highlighting. hi def link mooUncommentedError Error hi def link mooCStyleCommentError Error hi def link mooCStyleComment Comment hi def link mooStatement Statement hi def link mooOperatorIn Operator hi def link mooAny Constant " link this to Keyword if you want hi def link mooErrorConstant Constant hi def link mooType Type hi def link mooVariable Type hi def link mooStringError Error hi def link mooStringSpecialChar SpecialChar hi def link mooRegexpOr SpecialChar hi def link mooPronounSub SpecialChar hi def link mooString String hi def link mooNumber Number hi def link mooObject Number hi def link mooBuiltinProperty Type hi def link mooBuiltinFunction Function hi def link mooUnknownBuiltinFunction Error hi def link mooKnownBuiltinFunction Function hi def link mooCorePropOrVerb Identifier hi def link mooUnenclosedError Error hi def link mooParenthesesError Error hi def link mooBracketsError Error hi def link mooBracesError Error hi def link mooQuestionError Error hi def link mooCatchError Error hi def link mooExclamation Exception hi def link mooComment Comment hi def link mooNonCode PreProc let b:current_syntax = "moo" " vim: ts=8 neovim-0.2.2/runtime/syntax/mp.vim000066400000000000000000001267621320401574200171660ustar00rootroot00000000000000" Vim syntax file " Language: MetaPost " Maintainer: Nicola Vitacolonna " Former Maintainers: Andreas Scherer " Last Change: 2016 Oct 14 if exists("b:current_syntax") finish endif let s:cpo_sav = &cpo set cpo&vim if exists("g:plain_mf_macros") let s:plain_mf_macros = g:plain_mf_macros endif if exists("g:plain_mf_modes") let s:plain_mf_modes = g:plain_mf_modes endif if exists("g:other_mf_macros") let s:other_mf_macros = g:other_mf_macros endif let g:plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost let g:plain_mf_modes = 0 " No METAFONT modes let g:other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither " Read the METAFONT syntax to start with runtime! syntax/mf.vim unlet b:current_syntax " Necessary for syn include below " Restore the value of existing global variables if exists("s:plain_mf_macros") let g:plain_mf_macros = s:plain_mf_macros else unlet g:plain_mf_macros endif if exists("s:plain_mf_modes") let g:plain_mf_modes = s:plain_mf_modes else unlet g:plain_mf_modes endif if exists("s:other_mf_macros") let g:other_mf_macros = s:other_mf_macros else unlet g:other_mf_macros endif " Use TeX highlighting inside verbatimtex/btex... etex syn include @MPTeX syntax/tex.vim unlet b:current_syntax " These are defined as keywords rather than using matchgroup " in order to make them available to syntaxcomplete. syn keyword mpTeXdelim btex etex verbatimtex contained syn region mpTeXinsert \ start=/\\|\/rs=e+1 \ end=/\/re=s-1 keepend \ contains=@MPTeX,mpTeXdelim " iskeyword must be set after the syn include above, because tex.vim sets `syn " iskeyword`. Note that keywords do not contain numbers (numbers are " subscripts) syntax iskeyword @,_ " MetaPost primitives not found in METAFONT syn keyword mpBoolExp bounded clipped filled stroked textual arclength syn keyword mpNumExp arctime blackpart bluepart colormodel cyanpart syn keyword mpNumExp fontsize greenpart greypart magentapart redpart syn keyword mpPairExp yellowpart llcorner lrcorner ulcorner urcorner " envelope is seemingly undocumented, but it exists since mpost 1.003. " The syntax is: envelope of . For example, " path p; " p := envelope pensquare of (up--left); " (Thanks to Daniel H. Luecking for the example!) syn keyword mpPathExp envelope pathpart syn keyword mpPenExp penpart syn keyword mpPicExp dashpart glyph infont syn keyword mpStringExp fontpart readfrom textpart syn keyword mpType cmykcolor color rgbcolor " Other MetaPost primitives listed in the manual syn keyword mpPrimitive mpxbreak within " Internal quantities not found in METAFONT " (Table 6 in MetaPost: A User's Manual) syn keyword mpInternal defaultcolormodel hour minute linecap linejoin syn keyword mpInternal miterlimit mpprocset mpversion numberprecision syn keyword mpInternal numbersystem outputfilename outputformat syn keyword mpInternal outputformatoptions outputtemplate prologues syn keyword mpInternal restoreclipcolor tracinglostchars troffmode syn keyword mpInternal truecorners " List of commands not found in METAFONT (from MetaPost: A User's Manual) syn keyword mpCommand clip closefrom dashed filenametemplate fontmapfile syn keyword mpCommand fontmapline setbounds withcmykcolor withcolor syn keyword mpCommand withgreyscale withoutcolor withpostscript syn keyword mpCommand withprescript withrgbcolor write " METAFONT internal variables not found in MetaPost syn keyword notDefined autorounding chardx chardy fillin granularity syn keyword notDefined proofing smoothing tracingedges tracingpens syn keyword notDefined turningcheck xoffset yoffset " Suffix defined only in METAFONT: syn keyword notDefined nodot " Other not implemented primitives (see MetaPost: A User's Manual, §C.1) syn keyword notDefined cull display openwindow numspecial totalweight syn keyword notDefined withweight " Keywords defined by plain.mp if get(g:, "plain_mp_macros", 1) || get(g:, "mp_metafun_macros", 0) syn keyword mpDef beginfig clear_pen_memory clearit clearpen clearpen syn keyword mpDef clearxy colorpart cutdraw downto draw drawarrow syn keyword mpDef drawdblarrow drawdot drawoptions endfig erase syn keyword mpDef exitunless fill filldraw flex gobble hide interact syn keyword mpDef label loggingall makelabel numtok penstroke pickup syn keyword mpDef range reflectedabout rotatedaround shipit syn keyword mpDef stop superellipse takepower tracingall tracingnone syn keyword mpDef undraw undrawdot unfill unfilldraw upto syn match mpDef "???" syn keyword mpVardef arrowhead bbox bot buildcycle byte ceiling center syn keyword mpVardef counterclockwise decr dir direction directionpoint syn keyword mpVardef dotlabel dotlabels image incr interpath inverse syn keyword mpVardef labels lft magstep max min penlabels penpos round syn keyword mpVardef rt savepen solve tensepath thelabel top unitvector syn keyword mpVardef whatever z syn keyword mpPrimaryDef div dotprod gobbled mod syn keyword mpSecondaryDef intersectionpoint syn keyword mpTertiaryDef cutafter cutbefore softjoin thru syn keyword mpNewInternal ahangle ahlength bboxmargin beveled butt defaultpen syn keyword mpNewInternal defaultscale dotlabeldiam eps epsilon infinity syn keyword mpNewInternal join_radius labeloffset mitered pen_bot pen_lft syn keyword mpNewInternal pen_rt pen_top rounded squared tolerance " Predefined constants syn keyword mpConstant EOF background base_name base_version black syn keyword mpConstant blankpicture blue ditto down evenly fullcircle syn keyword mpConstant green halfcircle identity left origin penrazor syn keyword mpConstant penspeck pensquare quartercircle red right syn keyword mpConstant unitsquare up white withdots " Other predefined variables syn keyword mpVariable currentpen currentpen_path currentpicture cuttings syn keyword mpVariable defaultfont extra_beginfig extra_endfig syn match mpVariable /\<\%(laboff\|labxf\|labyf\)\>/ syn match mpVariable /\<\%(laboff\|labxf\|labyf\)\.\%(lft\|rt\|bot\|top\|ulft\|urt\|llft\|lrt\)\>/ " let statements: syn keyword mpnumExp abs syn keyword mpDef rotatedabout syn keyword mpCommand bye relax " on and off are not technically keywords, but it is nice to highlight them " inside dashpattern(). syn keyword mpOnOff off on contained syn keyword mpDash dashpattern contained syn region mpDashPattern \ start="dashpattern\s*" \ end=")"he=e-1 \ contains=mfNumeric,mfLength,mpOnOff,mpDash endif " Keywords defined by mfplain.mp if get(g:, "mfplain_mp_macros", 0) syn keyword mpDef beginchar capsule_def change_width syn keyword mpDef define_blacker_pixels define_corrected_pixels syn keyword mpDef define_good_x_pixels define_good_y_pixels syn keyword mpDef define_horizontal_corrected_pixels define_pixels syn keyword mpDef define_whole_blacker_pixels define_whole_pixels syn keyword mpDef define_whole_vertical_blacker_pixels syn keyword mpDef define_whole_vertical_pixels endchar syn keyword mpDef font_coding_scheme font_extra_space font_identifier syn keyword mpDef font_normal_shrink font_normal_space syn keyword mpDef font_normal_stretch font_quad font_size font_slant syn keyword mpDef font_x_height italcorr labelfont lowres_fix makebox syn keyword mpDef makegrid maketicks mode_def mode_setup proofrule syn keyword mpDef smode syn keyword mpVardef hround proofrulethickness vround syn keyword mpNewInternal blacker o_correction syn keyword mpVariable extra_beginchar extra_endchar extra_setup rulepen " plus some no-ops, also from mfplain.mp syn keyword mpDef cull cullit gfcorners imagerules nodisplays syn keyword mpDef notransforms openit proofoffset screenchars syn keyword mpDef screenrule screenstrokes showit syn keyword mpVardef grayfont slantfont titlefont syn keyword mpVariable currenttransform syn keyword mpConstant unitpixel " These are not listed in the MetaPost manual, and some are ignored by " MetaPost, but are nonetheless defined in mfplain.mp syn keyword mpDef killtext syn match mpVardef "\" syn keyword mpVariable aspect_ratio localfont mag mode mode_name syn keyword mpVariable proofcolor syn keyword mpConstant lowres proof smoke syn keyword mpNewInternal autorounding bp_per_pixel granularity syn keyword mpNewInternal number_of_modes proofing smoothing turningcheck endif " Keywords defined by all base macro packages: " - (r)boxes.mp " - format.mp " - graph.mp " - marith.mp " - sarith.mp " - string.mp " - TEX.mp if get(g:, "other_mp_macros", 1) " boxes and rboxes syn keyword mpDef boxjoin drawboxed drawboxes drawunboxed syn keyword mpNewInternal circmargin defaultdx defaultdy rbox_radius syn keyword mpVardef boxit bpath circleit fixpos fixsize generic_declare syn keyword mpVardef generic_redeclare generisize pic rboxit str_prefix " format syn keyword mpVardef Mformat format init_numbers roundd syn keyword mpVariable Fe_base Fe_plus syn keyword mpConstant Ten_to " graph syn keyword mpDef Gfor Gxyscale OUT auto begingraph endgraph gdata syn keyword mpDef gdraw gdrawarrow gdrawdblarrow gfill plot syn keyword mpVardef augment autogrid frame gdotlabel glabel grid itick syn keyword mpVardef otick syn keyword mpVardef Mreadpath setcoords setrange syn keyword mpNewInternal Gmarks Gminlog Gpaths linear log syn keyword mpVariable Autoform Gemarks Glmarks Gumarks syn keyword mpConstant Gtemplate syn match mpVariable /Gmargin\.\%(low\|high\)/ " marith syn keyword mpVardef Mabs Meform Mexp Mexp_str Mlog Mlog_Str Mlog_str syn keyword mpPrimaryDef Mdiv Mmul syn keyword mpSecondaryDef Madd Msub syn keyword mpTertiaryDef Mleq syn keyword mpNewInternal Mten Mzero " sarith syn keyword mpVardef Sabs Scvnum syn keyword mpPrimaryDef Sdiv Smul syn keyword mpSecondaryDef Sadd Ssub syn keyword mpTertiaryDef Sleq Sneq " string syn keyword mpVardef cspan isdigit loptok " TEX syn keyword mpVardef TEX TEXPOST TEXPRE endif " Up to date as of 23-Sep-2016. if get(b:, 'mp_metafun_macros', get(g:, 'mp_metafun_macros', 0)) " Highlight TeX keywords (for use in ConTeXt documents) syn match mpTeXKeyword '\\[a-zA-Z@]\+' " These keywords have been added manually. syn keyword mpPrimitive runscript " The following MetaFun keywords have been extracted automatically from " ConTeXt source code. They include all "public" macros (where a macro is " considered public if and only if it does not start with _, mfun_, mlib_, or " do_, and it does not end with _), all "public" unsaved variables, and all " `let` statements. " mp-abck.mpiv syn keyword mpDef abck_grid_line anchor_box box_found boxfilloptions syn keyword mpDef boxgridoptions boxlineoptions draw_multi_pars syn keyword mpDef draw_multi_side draw_multi_side_path freeze_box syn keyword mpDef initialize_box initialize_box_pos syn keyword mpDef multi_side_draw_options show_multi_kind syn keyword mpDef show_multi_pars syn keyword mpVardef abck_baseline_grid abck_draw_path abck_graphic_grid syn keyword mpVariable boxdashtype boxfilloffset boxfilltype syn keyword mpVariable boxgriddirection boxgriddistance boxgridshift syn keyword mpVariable boxgridtype boxgridwidth boxlineoffset syn keyword mpVariable boxlineradius boxlinetype boxlinewidth multikind syn keyword mpConstant context_abck " mp-apos.mpiv syn keyword mpDef anch_sidebars_draw boxfilloptions boxlineoptions syn keyword mpDef connect_positions syn keyword mpConstant context_apos " mp-asnc.mpiv syn keyword mpDef FlushSyncTasks ProcessSyncTask ResetSyncTasks syn keyword mpDef SetSyncColor SetSyncThreshold SyncTask syn keyword mpVardef PrepareSyncTasks SyncBox TheSyncColor syn keyword mpVardef TheSyncThreshold syn keyword mpVariable CurrentSyncClass NOfSyncPaths SyncColor syn keyword mpVariable SyncLeftOffset SyncPaths SyncTasks SyncThreshold syn keyword mpVariable SyncThresholdMethod SyncWidth syn keyword mpConstant context_asnc " mp-back.mpiv syn keyword mpDef some_double_back some_hash syn keyword mpVariable back_nillcolor syn keyword mpConstant context_back " mp-bare.mpiv syn keyword mpVardef colordecimals rawtextext syn keyword mpPrimaryDef infont syn keyword mpConstant context_bare " mp-base.mpiv " This is essentially plain.mp with only a few keywords added syn keyword mpNumExp graypart syn keyword mpType graycolor greycolor syn keyword mpConstant cyan magenta yellow " mp-butt.mpiv syn keyword mpDef predefinedbutton some_button syn keyword mpConstant context_butt " mp-char.mpiv syn keyword mpDef flow_begin_chart flow_begin_sub_chart syn keyword mpDef flow_chart_draw_comment flow_chart_draw_exit syn keyword mpDef flow_chart_draw_label flow_chart_draw_text syn keyword mpDef flow_clip_chart flow_collapse_points syn keyword mpDef flow_connect_bottom_bottom flow_connect_bottom_left syn keyword mpDef flow_connect_bottom_right flow_connect_bottom_top syn keyword mpDef flow_connect_left_bottom flow_connect_left_left syn keyword mpDef flow_connect_left_right flow_connect_left_top syn keyword mpDef flow_connect_right_bottom flow_connect_right_left syn keyword mpDef flow_connect_right_right flow_connect_right_top syn keyword mpDef flow_connect_top_bottom flow_connect_top_left syn keyword mpDef flow_connect_top_right flow_connect_top_top syn keyword mpDef flow_draw_connection flow_draw_connection_point syn keyword mpDef flow_draw_midpoint flow_draw_shape syn keyword mpDef flow_draw_test_area flow_draw_test_shape syn keyword mpDef flow_draw_test_shapes flow_end_chart syn keyword mpDef flow_end_sub_chart flow_flush_connections syn keyword mpDef flow_flush_picture flow_flush_pictures syn keyword mpDef flow_flush_shape flow_flush_shapes syn keyword mpDef flow_initialize_grid flow_new_chart flow_new_shape syn keyword mpDef flow_scaled_to_grid flow_show_connection syn keyword mpDef flow_show_connections flow_show_shapes syn keyword mpDef flow_xy_offset flow_y_pos syn keyword mpVardef flow_connection_path flow_down_on_grid syn keyword mpVardef flow_down_to_grid flow_i_point flow_left_on_grid syn keyword mpVardef flow_left_to_grid flow_offset syn keyword mpVardef flow_points_initialized flow_right_on_grid syn keyword mpVardef flow_right_to_grid flow_smooth_connection syn keyword mpVardef flow_trim_points flow_trimmed flow_up_on_grid syn keyword mpVardef flow_up_to_grid flow_valid_connection syn keyword mpVardef flow_x_on_grid flow_xy_bottom flow_xy_left syn keyword mpVardef flow_xy_on_grid flow_xy_right flow_xy_top syn keyword mpVardef flow_y_on_grid syn keyword mpVariable flow_arrowtip flow_chart_background_color syn keyword mpVariable flow_chart_offset flow_comment_offset syn keyword mpVariable flow_connection_arrow_size syn keyword mpVariable flow_connection_dash_size syn keyword mpVariable flow_connection_line_color syn keyword mpVariable flow_connection_line_width syn keyword mpVariable flow_connection_smooth_size flow_connections syn keyword mpVariable flow_cpath flow_dash_pattern flow_dashline syn keyword mpVariable flow_exit_offset flow_forcevalid flow_grid_height syn keyword mpVariable flow_grid_width flow_label_offset flow_max_x syn keyword mpVariable flow_max_y flow_peepshape flow_reverse_connection syn keyword mpVariable flow_reverse_y flow_shape_action flow_shape_archive syn keyword mpVariable flow_shape_decision flow_shape_down syn keyword mpVariable flow_shape_fill_color flow_shape_height syn keyword mpVariable flow_shape_left flow_shape_line_color syn keyword mpVariable flow_shape_line_width flow_shape_loop syn keyword mpVariable flow_shape_multidocument flow_shape_node syn keyword mpVariable flow_shape_procedure flow_shape_product syn keyword mpVariable flow_shape_right flow_shape_singledocument syn keyword mpVariable flow_shape_subprocedure flow_shape_up syn keyword mpVariable flow_shape_wait flow_shape_width syn keyword mpVariable flow_show_all_points flow_show_con_points syn keyword mpVariable flow_show_mid_points flow_showcrossing flow_smooth syn keyword mpVariable flow_touchshape flow_xypoint flow_zfactor syn keyword mpConstant context_flow " mp-chem.mpiv syn keyword mpDef chem_init_all chem_reset chem_start_structure syn keyword mpDef chem_transformed syn keyword mpVardef chem_ad chem_adj chem_align chem_arrow chem_au syn keyword mpVardef chem_b chem_bb chem_bd chem_bw chem_c chem_cc syn keyword mpVardef chem_ccd chem_cd chem_crz chem_cz chem_dash chem_db syn keyword mpVardef chem_diff chem_dir chem_do chem_dr chem_draw syn keyword mpVardef chem_drawarrow chem_eb chem_ed chem_ep chem_er syn keyword mpVardef chem_es chem_et chem_fill chem_hb chem_init_some syn keyword mpVardef chem_label chem_ldb chem_ldd chem_line chem_lr syn keyword mpVardef chem_lrb chem_lrbd chem_lrd chem_lrh chem_lrn syn keyword mpVardef chem_lrt chem_lrz chem_lsr chem_lsub chem_mark syn keyword mpVardef chem_marked chem_mid chem_mids chem_midz chem_mir syn keyword mpVardef chem_mov chem_move chem_number chem_oe chem_off syn keyword mpVardef chem_pb chem_pe chem_r chem_r_fragment chem_rb syn keyword mpVardef chem_rbd chem_rd chem_rdb chem_rdd chem_restore syn keyword mpVardef chem_rh chem_rm chem_rn chem_rot chem_rr chem_rrb syn keyword mpVardef chem_rrbd chem_rrd chem_rrh chem_rrn chem_rrt syn keyword mpVardef chem_rrz chem_rsr chem_rsub chem_rt chem_rz chem_s syn keyword mpVardef chem_save chem_sb chem_sd chem_set chem_sr chem_ss syn keyword mpVardef chem_start_component chem_stop_component syn keyword mpVardef chem_stop_structure chem_sub chem_symbol chem_tb syn keyword mpVardef chem_text chem_z chem_zln chem_zlt chem_zn chem_zrn syn keyword mpVardef chem_zrt chem_zt syn keyword mpVariable chem_mark_pair chem_stack_mirror chem_stack_origin syn keyword mpVariable chem_stack_p chem_stack_previous syn keyword mpVariable chem_stack_rotation chem_trace_boundingbox syn keyword mpVariable chem_trace_nesting chem_trace_text syn keyword mpConstant context_chem " mp-core.mpiv syn keyword mpDef FlushSyncTasks ProcessSyncTask syn keyword mpDef RegisterLocalTextArea RegisterPlainTextArea syn keyword mpDef RegisterRegionTextArea RegisterTextArea syn keyword mpDef ResetLocalTextArea ResetSyncTasks ResetTextAreas syn keyword mpDef SaveTextAreas SetSyncColor SetSyncThreshold syn keyword mpDef SyncTask anchor_box box_found boxfilloptions syn keyword mpDef boxgridoptions boxlineoptions collapse_multi_pars syn keyword mpDef draw_box draw_multi_pars draw_par freeze_box syn keyword mpDef initialize_area initialize_area_par initialize_box syn keyword mpDef initialize_box_pos initialize_par syn keyword mpDef prepare_multi_pars relocate_multipars save_multipar syn keyword mpDef set_par_line_height show_multi_pars show_par syn keyword mpDef simplify_multi_pars sort_multi_pars syn keyword mpVardef InsideSavedTextArea InsideSomeSavedTextArea syn keyword mpVardef InsideSomeTextArea InsideTextArea PrepareSyncTasks syn keyword mpVardef SyncBox TextAreaH TextAreaW TextAreaWH TextAreaX syn keyword mpVardef TextAreaXY TextAreaY TheSyncColor TheSyncThreshold syn keyword mpVardef baseline_grid graphic_grid multi_par_at_top syn keyword mpVariable CurrentSyncClass NOfSavedTextAreas syn keyword mpVariable NOfSavedTextColumns NOfSyncPaths NOfTextAreas syn keyword mpVariable NOfTextColumns PlainTextArea RegionTextArea syn keyword mpVariable SavedTextColumns SyncColor SyncLeftOffset SyncPaths syn keyword mpVariable SyncTasks SyncThreshold SyncThresholdMethod syn keyword mpVariable SyncWidth TextAreas TextColumns syn keyword mpVariable auto_multi_par_hsize boxdashtype boxfilloffset syn keyword mpVariable boxfilltype boxgriddirection boxgriddistance syn keyword mpVariable boxgridshift boxgridtype boxgridwidth boxlineradius syn keyword mpVariable boxlinetype boxlinewidth check_multi_par_chain syn keyword mpVariable compensate_multi_par_topskip syn keyword mpVariable enable_multi_par_fallback force_multi_par_chain syn keyword mpVariable ignore_multi_par_page last_multi_par_shift lefthang syn keyword mpVariable local_multi_par_area multi_column_first_page_hack syn keyword mpVariable multi_par_pages multiloc multilocs multipar syn keyword mpVariable multipars multiref multirefs nofmultipars syn keyword mpVariable obey_multi_par_hang obey_multi_par_more syn keyword mpVariable one_piece_multi_par par_hang_after par_hang_indent syn keyword mpVariable par_indent par_left_skip par_line_height syn keyword mpVariable par_right_skip par_start_pos par_stop_pos syn keyword mpVariable par_strut_depth par_strut_height ppos righthang syn keyword mpVariable snap_multi_par_tops somehang span_multi_column_pars syn keyword mpVariable use_multi_par_region syn keyword mpConstant context_core syn keyword LET anchor_area anchor_par draw_area " mp-cows.mpiv syn keyword mpConstant context_cows cow " mp-crop.mpiv syn keyword mpDef page_marks_add_color page_marks_add_lines syn keyword mpDef page_marks_add_marking page_marks_add_number syn keyword mpVardef crop_color crop_gray crop_marks_cmyk syn keyword mpVardef crop_marks_cmykrgb crop_marks_gray crop_marks_lines syn keyword mpVariable crop_colors more page syn keyword mpConstant context_crop " mp-figs.mpiv syn keyword mpDef naturalfigure registerfigure syn keyword mpVardef figuredimensions figureheight figuresize syn keyword mpVardef figurewidth syn keyword mpConstant context_figs " mp-fobg.mpiv syn keyword mpDef DrawFoFrame syn keyword mpVardef equalpaths syn keyword mpPrimaryDef inset outset syn keyword mpVariable FoBackground FoBackgroundColor FoFrame FoLineColor syn keyword mpVariable FoLineStyle FoLineWidth FoSplit syn keyword mpConstant FoAll FoBottom FoDash FoDotted FoDouble FoGroove syn keyword mpConstant FoHidden FoInset FoLeft FoMedium FoNoColor FoNone syn keyword mpConstant FoOutset FoRidge FoRight FoSolid FoThick FoThin syn keyword mpConstant FoTop context_fobg " mp-form.mpiv syn keyword mpConstant context_form " mp-func.mpiv syn keyword mpDef constructedfunction constructedpairs syn keyword mpDef constructedpath curvedfunction curvedpairs syn keyword mpDef curvedpath function pathconnectors straightfunction syn keyword mpDef straightpairs straightpath syn keyword mpConstant context_func " mp-grap.mpiv syn keyword mpDef Gfor OUT auto begingraph circles crosses diamonds syn keyword mpDef downtriangles endgraph gdata gdraw gdrawarrow syn keyword mpDef gdrawdblarrow gfill graph_addto syn keyword mpDef graph_addto_currentpicture graph_comma syn keyword mpDef graph_coordinate_multiplication graph_draw syn keyword mpDef graph_draw_label graph_errorbar_text graph_fill syn keyword mpDef graph_generate_exponents syn keyword mpDef graph_generate_label_position syn keyword mpDef graph_generate_numbers graph_label_location syn keyword mpDef graph_scan_mark graph_scan_marks graph_setbounds syn keyword mpDef graph_suffix graph_tick_label syn keyword mpDef graph_with_pen_and_color graph_withlist syn keyword mpDef graph_xyscale lefttriangles makefunctionpath plot syn keyword mpDef plotsymbol points rainbow righttriangles smoothpath syn keyword mpDef squares stars uptriangles witherrorbars syn keyword mpVardef addtopath augment autogrid constant_fit syn keyword mpVardef constant_function det escaped_format exp syn keyword mpVardef exponential_fit exponential_function format syn keyword mpVardef formatted frame functionpath gaussian_fit syn keyword mpVardef gaussian_function gdotlabel glabel graph_Feform syn keyword mpVardef graph_Meform graph_arrowhead_extent graph_bounds syn keyword mpVardef graph_clear_bounds syn keyword mpVardef graph_convert_user_path_to_internal graph_cspan syn keyword mpVardef graph_draw_arrowhead graph_error graph_errorbars syn keyword mpVardef graph_exp graph_factor_and_exponent_to_string syn keyword mpVardef graph_gridline_picture graph_is_null syn keyword mpVardef graph_label_convert_user_to_internal graph_loptok syn keyword mpVardef graph_match_exponents graph_mlog syn keyword mpVardef graph_modified_exponent_ypart graph_pair_adjust syn keyword mpVardef graph_picture_conversion graph_post_draw syn keyword mpVardef graph_read_line graph_readpath graph_remap syn keyword mpVardef graph_scan_path graph_select_exponent_mark syn keyword mpVardef graph_select_mark graph_set_bounds syn keyword mpVardef graph_set_default_bounds graph_shapesize syn keyword mpVardef graph_stash_label graph_tick_mark_spacing syn keyword mpVardef graph_unknown_pair_bbox grid isdigit itick syn keyword mpVardef linear_fit linear_function ln logten lorentzian_fit syn keyword mpVardef lorentzian_function otick polynomial_fit syn keyword mpVardef polynomial_function power_law_fit syn keyword mpVardef power_law_function powten setcoords setrange syn keyword mpVardef sortpath strfmt tick varfmt syn keyword mpNewInternal Mzero doubleinfinity graph_log_minimum syn keyword mpNewInternal graph_minimum_number_of_marks largestmantissa syn keyword mpNewInternal linear lntwo log mlogten singleinfinity syn keyword mpVariable Autoform determinant fit_chi_squared syn keyword mpVariable graph_errorbar_picture graph_exp_marks syn keyword mpVariable graph_frame_pair_a graph_frame_pair_b syn keyword mpVariable graph_lin_marks graph_log_marks graph_modified_bias syn keyword mpVariable graph_modified_higher graph_modified_lower syn keyword mpVariable graph_shape r_s resistance_color resistance_name syn keyword mpConstant context_grap " mp-grid.mpiv syn keyword mpDef hlingrid hloggrid vlingrid vloggrid syn keyword mpVardef hlinlabel hlintext hlogtext linlin linlinpath syn keyword mpVardef linlog linlogpath loglin loglinpath loglog syn keyword mpVardef loglogpath processpath vlinlabel vlintext vlogtext syn keyword mpVariable fmt_initialize fmt_pictures fmt_precision syn keyword mpVariable fmt_separator fmt_zerocheck grid_eps syn keyword mpConstant context_grid " mp-grph.mpiv syn keyword mpDef beginfig begingraphictextfig data_mpo_file syn keyword mpDef data_mpy_file doloadfigure draw endfig syn keyword mpDef endgraphictextfig fill fixedplace graphictext syn keyword mpDef loadfigure new_graphictext normalwithshade number syn keyword mpDef old_graphictext outlinefill protectgraphicmacros syn keyword mpDef resetfig reversefill withdrawcolor withfillcolor syn keyword mpDef withshade syn keyword mpVariable currentgraphictext figureshift syn keyword mpConstant context_grph " mp-idea.mpiv syn keyword mpVardef bcomponent ccomponent gcomponent mcomponent syn keyword mpVardef rcomponent somecolor ycomponent " mp-luas.mpiv syn keyword mpDef luacall message syn keyword mpVardef MP lua lualist syn keyword mpConstant context_luas " mp-mlib.mpiv syn keyword mpDef autoalign bitmapimage circular_shade cmyk comment syn keyword mpDef defineshade eofill eofillup externalfigure figure syn keyword mpDef fillup label linear_shade multitonecolor namedcolor syn keyword mpDef nofill onlayer passarrayvariable passvariable syn keyword mpDef plain_label register resolvedcolor scantokens syn keyword mpDef set_circular_vector set_linear_vector shaded syn keyword mpDef spotcolor startpassingvariable stoppassingvariable syn keyword mpDef thelabel transparent[] usemetafunlabels syn keyword mpDef useplainlabels withcircularshade withlinearshade syn keyword mpDef withmask withproperties withshadecenter syn keyword mpDef withshadecolors withshadedirection withshadedomain syn keyword mpDef withshadefactor withshadefraction withshadeorigin syn keyword mpDef withshaderadius withshadestep withshadetransform syn keyword mpDef withshadevector withtransparency syn keyword mpVardef anchored checkbounds checkedbounds syn keyword mpVardef define_circular_shade define_linear_shade dotlabel syn keyword mpVardef escaped_format fmttext fontsize format formatted syn keyword mpVardef installlabel onetimefmttext onetimetextext syn keyword mpVardef outlinetext plain_thelabel properties rawfmttext syn keyword mpVardef rawtexbox rawtextext rule strfmt strut texbox syn keyword mpVardef textext thefmttext thelabel thetexbox thetextext syn keyword mpVardef tostring transparency_alternative_to_number syn keyword mpVardef validtexbox varfmt verbatim syn keyword mpPrimaryDef asgroup infont normalinfont shadedinto syn keyword mpPrimaryDef shownshadecenter shownshadedirection syn keyword mpPrimaryDef shownshadeorigin shownshadevector withshade syn keyword mpPrimaryDef withshademethod syn keyword mpNewInternal colorburntransparent colordodgetransparent syn keyword mpNewInternal colortransparent darkentransparent syn keyword mpNewInternal differencetransparent exclusiontransparent syn keyword mpNewInternal hardlighttransparent huetransparent syn keyword mpNewInternal lightentransparent luminositytransparent syn keyword mpNewInternal multiplytransparent normaltransparent syn keyword mpNewInternal overlaytransparent saturationtransparent syn keyword mpNewInternal screentransparent shadefactor softlighttransparent syn keyword mpNewInternal textextoffset syn keyword mpType property transparency syn keyword mpVariable currentoutlinetext shadeddown shadedleft syn keyword mpVariable shadedright shadedup shadeoffset trace_shades syn keyword mpConstant context_mlib " mp-page.mpiv syn keyword mpDef BoundCoverAreas BoundPageAreas Enlarged FakeRule syn keyword mpDef FakeWord LoadPageState OverlayBox RuleColor syn keyword mpDef SetAreaVariables SetPageArea SetPageBackPage syn keyword mpDef SetPageCoverPage SetPageField SetPageFrontPage syn keyword mpDef SetPageHsize SetPageHstep SetPageLocation syn keyword mpDef SetPagePage SetPageSpine SetPageVariables syn keyword mpDef SetPageVsize SetPageVstep StartCover StartPage syn keyword mpDef StopCover StopPage SwapPageState innerenlarged syn keyword mpDef llEnlarged lrEnlarged outerenlarged ulEnlarged syn keyword mpDef urEnlarged syn keyword mpVardef BackPageHeight BackPageWidth BackSpace BaseLineSkip syn keyword mpVardef BodyFontSize BottomDistance BottomHeight syn keyword mpVardef BottomSpace CoverHeight CoverWidth CurrentColumn syn keyword mpVardef CurrentHeight CurrentWidth CutSpace EmWidth syn keyword mpVardef ExHeight FooterDistance FooterHeight syn keyword mpVardef FrontPageHeight FrontPageWidth HSize HeaderDistance syn keyword mpVardef HeaderHeight InPageBody InnerEdgeDistance syn keyword mpVardef InnerEdgeWidth InnerMarginDistance InnerMarginWidth syn keyword mpVardef InnerSpaceWidth LastPageNumber LayoutColumnDistance syn keyword mpVardef LayoutColumnWidth LayoutColumns LeftEdgeDistance syn keyword mpVardef LeftEdgeWidth LeftMarginDistance LeftMarginWidth syn keyword mpVardef LineHeight MakeupHeight MakeupWidth NOfColumns syn keyword mpVardef NOfPages OnOddPage OnRightPage OuterEdgeDistance syn keyword mpVardef OuterEdgeWidth OuterMarginDistance OuterMarginWidth syn keyword mpVardef OuterSpaceWidth OverlayDepth OverlayHeight syn keyword mpVardef OverlayLineWidth OverlayOffset OverlayWidth syn keyword mpVardef PageDepth PageFraction PageNumber PageOffset syn keyword mpVardef PaperBleed PaperHeight PaperWidth PrintPaperHeight syn keyword mpVardef PrintPaperWidth RealPageNumber RightEdgeDistance syn keyword mpVardef RightEdgeWidth RightMarginDistance RightMarginWidth syn keyword mpVardef SpineHeight SpineWidth StrutDepth StrutHeight syn keyword mpVardef TextHeight TextWidth TopDistance TopHeight TopSkip syn keyword mpVardef TopSpace VSize defaultcolormodel syn keyword mpVariable Area BackPage CoverPage CurrentLayout Field syn keyword mpVariable FrontPage HorPos Hsize Hstep Location Page syn keyword mpVariable PageStateAvailable RuleDepth RuleDirection syn keyword mpVariable RuleFactor RuleH RuleHeight RuleOffset RuleOption syn keyword mpVariable RuleThickness RuleV RuleWidth Spine VerPos Vsize syn keyword mpVariable Vstep syn keyword mpConstant context_page " mp-shap.mpiv syn keyword mpDef drawline drawshape some_shape syn keyword mpDef start_predefined_shape_definition syn keyword mpDef stop_predefined_shape_definition syn keyword mpVardef drawpredefinedline drawpredefinedshape syn keyword mpVardef some_shape_path syn keyword mpVariable predefined_shapes predefined_shapes_xradius syn keyword mpVariable predefined_shapes_xxradius syn keyword mpVariable predefined_shapes_yradius syn keyword mpVariable predefined_shapes_yyradius syn keyword mpConstant context_shap " mp-step.mpiv syn keyword mpDef initialize_step_variables midbottomboundary syn keyword mpDef midtopboundary step_begin_cell step_begin_chart syn keyword mpDef step_cell_ali step_cell_bot step_cell_top syn keyword mpDef step_cells step_end_cell step_end_chart syn keyword mpDef step_text_bot step_text_mid step_text_top syn keyword mpDef step_texts syn keyword mpVariable cell_distance_x cell_distance_y cell_fill_color syn keyword mpVariable cell_line_color cell_line_width cell_offset syn keyword mpVariable chart_align chart_category chart_vertical syn keyword mpVariable line_distance line_height line_line_color syn keyword mpVariable line_line_width line_offset nofcells syn keyword mpVariable text_distance_set text_fill_color text_line_color syn keyword mpVariable text_line_width text_offset syn keyword mpConstant context_cell " mp-symb.mpiv syn keyword mpDef finishglyph prepareglyph syn keyword mpConstant lefttriangle midbar onebar righttriangle sidebar syn keyword mpConstant sublefttriangle subrighttriangle twobar " mp-text.mpiv syn keyword mpDef build_parshape syn keyword mpVardef found_point syn keyword mpVariable trace_parshape syn keyword mpConstant context_text " mp-tool.mpiv syn keyword mpCommand dump syn keyword mpDef addbackground b_color beginglyph break centerarrow syn keyword mpDef clearxy condition data_mpd_file detaileddraw syn keyword mpDef detailpaths dowithpath draw drawboundary syn keyword mpDef drawboundingbox drawcontrollines drawcontrolpoints syn keyword mpDef drawfill draworigin drawpath drawpathonly syn keyword mpDef drawpathwithpoints drawpoint drawpointlabels syn keyword mpDef drawpoints drawticks drawwholepath drawxticks syn keyword mpDef drawyticks endglyph fill finishsavingdata g_color syn keyword mpDef inner_boundingbox job_name leftarrow loadmodule syn keyword mpDef midarrowhead naturalizepaths newboolean newcolor syn keyword mpDef newnumeric newpair newpath newpicture newstring syn keyword mpDef newtransform normalcolors normaldraw normalfill syn keyword mpDef normalwithcolor outer_boundingbox pop_boundingbox syn keyword mpDef popboundingbox popcurrentpicture push_boundingbox syn keyword mpDef pushboundingbox pushcurrentpicture r_color readfile syn keyword mpDef recolor redraw refill register_dirty_chars syn keyword mpDef remapcolor remapcolors remappedcolor reprocess syn keyword mpDef resetarrows resetcolormap resetdrawoptions syn keyword mpDef resolvedcolor restroke retext rightarrow savedata syn keyword mpDef saveoptions scale_currentpicture set_ahlength syn keyword mpDef set_grid showgrid startplaincompatibility syn keyword mpDef startsavingdata stopplaincompatibility syn keyword mpDef stopsavingdata stripe_path_a stripe_path_n undashed syn keyword mpDef undrawfill untext visualizeddraw visualizedfill syn keyword mpDef visualizepaths withcolor withgray syn keyword mpDef xscale_currentpicture xshifted syn keyword mpDef xyscale_currentpicture yscale_currentpicture syn keyword mpDef yshifted syn keyword mpVardef acos acosh anglebetween area arrowhead syn keyword mpVardef arrowheadonpath arrowpath asciistring asin asinh syn keyword mpVardef atan basiccolors bbheight bbwidth bcomponent syn keyword mpVardef blackcolor bottomboundary boundingbox c_phantom syn keyword mpVardef ccomponent center cleanstring colorcircle syn keyword mpVardef colordecimals colordecimalslist colorlike colorpart syn keyword mpVardef colortype complementary complemented copylist cos syn keyword mpVardef cosh cot cotd curved ddddecimal dddecimal ddecimal syn keyword mpVardef decorated drawarrowpath epsed exp freedotlabel syn keyword mpVardef freelabel gcomponent getunstringed grayed greyed syn keyword mpVardef hsvtorgb infinite innerboundingbox interpolated inv syn keyword mpVardef invcos inverted invsin invtan laddered leftboundary syn keyword mpVardef leftpath leftrightpath listsize listtocurves syn keyword mpVardef listtolines ln log mcomponent new_on_grid syn keyword mpVardef outerboundingbox paired pen_size penpoint phantom syn keyword mpVardef pointarrow pow punked rangepath rcomponent syn keyword mpVardef redecorated repathed rightboundary rightpath syn keyword mpVardef rotation roundedsquare set_inner_boundingbox syn keyword mpVardef set_outer_boundingbox setunstringed shapedlist syn keyword mpVardef simplified sin sinh sortlist sqr straightpath tan syn keyword mpVardef tand tanh tensecircle thefreelabel topboundary syn keyword mpVardef tripled undecorated unitvector unspiked unstringed syn keyword mpVardef whitecolor ycomponent syn keyword mpPrimaryDef along blownup bottomenlarged cornered crossed syn keyword mpPrimaryDef enlarged enlonged leftenlarged llenlarged llmoved syn keyword mpPrimaryDef lrenlarged lrmoved on paralleled randomized syn keyword mpPrimaryDef randomizedcontrols randomshifted rightenlarged syn keyword mpPrimaryDef shortened sized smoothed snapped softened squeezed syn keyword mpPrimaryDef stretched superellipsed topenlarged ulenlarged syn keyword mpPrimaryDef ulmoved uncolored urenlarged urmoved xsized syn keyword mpPrimaryDef xstretched xyscaled xysized ysized ystretched zmod syn keyword mpSecondaryDef anglestriped intersection_point numberstriped syn keyword mpSecondaryDef peepholed syn keyword mpTertiaryDef cutends syn keyword mpNewInternal ahdimple ahvariant anglelength anglemethod syn keyword mpNewInternal angleoffset charscale cmykcolormodel graycolormodel syn keyword mpNewInternal greycolormodel maxdimensions metapostversion syn keyword mpNewInternal nocolormodel rgbcolormodel striped_normal_inner syn keyword mpNewInternal striped_normal_outer striped_reverse_inner syn keyword mpNewInternal striped_reverse_outer syn keyword mpType grayscale greyscale quadruplet triplet syn keyword mpVariable ahfactor collapse_data color_map drawoptionsfactor syn keyword mpVariable freedotlabelsize freelabeloffset grid grid_full syn keyword mpVariable grid_h grid_left grid_nx grid_ny grid_w grid_x syn keyword mpVariable grid_y intersection_found originlength syn keyword mpVariable plain_compatibility_data pointlabelfont syn keyword mpVariable pointlabelscale refillbackground savingdata syn keyword mpVariable savingdatadone swappointlabels ticklength tickstep syn keyword mpConstant CRLF DQUOTE PERCENT SPACE bcircle context_tool crlf syn keyword mpConstant darkblue darkcyan darkgray darkgreen darkmagenta syn keyword mpConstant darkred darkyellow downtriangle dquote freesquare syn keyword mpConstant fulldiamond fullsquare fulltriangle lcircle syn keyword mpConstant lefttriangle lightgray llcircle lltriangle lrcircle syn keyword mpConstant lrtriangle mpversion nocolor noline oddly syn keyword mpConstant originpath percent rcircle righttriangle space syn keyword mpConstant tcircle triangle ulcircle ultriangle unitcircle syn keyword mpConstant unitdiamond unittriangle uptriangle urcircle syn keyword mpConstant urtriangle endif " MetaFun macros " Define the default highlighting hi def link mpTeXdelim mpPrimitive hi def link mpBoolExp mfBoolExp hi def link mpNumExp mfNumExp hi def link mpPairExp mfPairExp hi def link mpPathExp mfPathExp hi def link mpPenExp mfPenExp hi def link mpPicExp mfPicExp hi def link mpStringExp mfStringExp hi def link mpInternal mfInternal hi def link mpCommand mfCommand hi def link mpType mfType hi def link mpPrimitive mfPrimitive hi def link mpDef mfDef hi def link mpVardef mpDef hi def link mpPrimaryDef mpDef hi def link mpSecondaryDef mpDef hi def link mpTertiaryDef mpDef hi def link mpNewInternal mpInternal hi def link mpVariable mfVariable hi def link mpConstant mfConstant hi def link mpOnOff mpPrimitive hi def link mpDash mpPrimitive hi def link mpTeXKeyword Identifier let b:current_syntax = "mp" let &cpo = s:cpo_sav unlet! s:cpo_sav " vim:sw=2 neovim-0.2.2/runtime/syntax/mplayerconf.vim000066400000000000000000000164771320401574200210720ustar00rootroot00000000000000" Vim syntax file " Language: mplayer(1) configuration file " Maintainer: Dmitri Vereshchagin " Previous Maintainer: Nikolai Weibull " Latest Revision: 2015-01-24 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=- syn keyword mplayerconfTodo contained TODO FIXME XXX NOTE syn region mplayerconfComment display oneline start='#' end='$' \ contains=mplayerconfTodo,@Spell syn keyword mplayerconfPreProc include syn keyword mplayerconfBoolean yes no true false syn match mplayerconfNumber '\<\d\+\>' syn keyword mplayerconfOption hardframedrop nomouseinput bandwidth dumpstream \ rtsp-stream-over-tcp tv overlapsub \ sub-bg-alpha subfont-outline unicode format \ vo edl cookies fps zrfd af-adv nosound \ audio-density passlogfile vobsuboutindex autoq \ autosync benchmark colorkey nocolorkey edlout \ enqueue fixed-vo framedrop h identify input \ lircconf list-options loop menu menu-cfg \ menu-root nojoystick nolirc nortc playlist \ quiet really-quiet shuffle skin slave \ softsleep speed sstep use-stdin aid alang \ audio-demuxer audiofile audiofile-cache \ cdrom-device cache cdda channels chapter \ cookies-file demuxer dumpaudio dumpfile \ dumpvideo dvbin dvd-device dvdangle forceidx \ frames hr-mp3-seek idx ipv4-only-proxy \ loadidx mc mf ni nobps noextbased \ passwd prefer-ipv4 prefer-ipv6 rawaudio \ rawvideo saveidx sb srate ss tskeepbroken \ tsprog tsprobe user user-agent vid vivo \ dumpjacosub dumpmicrodvdsub dumpmpsub dumpsami \ dumpsrtsub dumpsub ffactor flip-hebrew font \ forcedsubsonly fribidi-charset ifo noautosub \ osdlevel sid slang spuaa spualign spugauss \ sub sub-bg-color sub-demuxer sub-fuzziness \ sub-no-text-pp subalign subcc subcp subdelay \ subfile subfont-autoscale subfont-blur \ subfont-encoding subfont-osd-scale \ subfont-text-scale subfps subpos subwidth \ utf8 vobsub vobsubid abs ao aofile aop delay \ mixer nowaveheader aa bpp brightness contrast \ dfbopts display double dr dxr2 fb fbmode \ fbmodeconfig forcexv fs fsmode-dontuse fstype \ geometry guiwid hue jpeg monitor-dotclock \ monitor-hfreq monitor-vfreq monitoraspect \ nograbpointer nokeepaspect noxv ontop panscan \ rootwin saturation screenw stop-xscreensaver \ vm vsync wid xineramascreen z zrbw zrcrop \ zrdev zrhelp zrnorm zrquality zrvdec zrxdoff \ ac af afm aspect flip lavdopts noaspect \ noslices novideo oldpp pp pphelp ssf stereo \ sws vc vfm x xvidopts xy y zoom vf vop \ audio-delay audio-preload endpos ffourcc \ include info noautoexpand noskip o oac of \ ofps ovc skiplimit v vobsubout vobsuboutid \ lameopts lavcopts nuvopts xvidencopts a52drc \ adapter af-add af-clr af-del af-pre \ allow-dangerous-playlist-parsing ass \ ass-border-color ass-bottom-margin ass-color \ ass-font-scale ass-force-style ass-hinting \ ass-line-spacing ass-styles ass-top-margin \ ass-use-margins ausid bluray-angle \ bluray-device border border-pos-x border-pos-y \ cache-min cache-seek-min capture codecpath \ codecs-file correct-pts crash-debug \ doubleclick-time dvd-speed edl-backward-delay \ edl-start-pts embeddedfonts fafmttag \ field-dominance fontconfig force-avi-aspect \ force-key-frames frameno-file fullscreen gamma \ gui gui-include gui-wid heartbeat-cmd \ heartbeat-interval hr-edl-seek \ http-header-fields idle ignore-start \ key-fifo-size list-properties menu-chroot \ menu-keepdir menu-startup mixer-channel \ monitor-orientation monitorpixelaspect \ mouse-movements msgcharset msgcolor msglevel \ msgmodule name noar nocache noconfig \ noconsolecontrols nocorrect-pts nodouble \ noedl-start-pts noencodedups \ noflip-hebrew-commas nogui noidx noodml \ nostop-xscreensaver nosub noterm-osd \ osd-duration osd-fractions panscanrange \ pausing playing-msg priority profile \ progbar-align psprobe pvr radio referrer \ refreshrate reuse-socket rtc rtc-device \ rtsp-destination rtsp-port \ rtsp-stream-over-http screenh show-profile \ softvol softvol-max sub-paths subfont \ term-osd-esc title tvscan udp-ip udp-master \ udp-port udp-seek-threshold udp-slave \ unrarexec use-filedir-conf use-filename-title \ vf-add vf-clr vf-del vf-pre volstep volume \ zrhdec zrydoff syn region mplayerconfString display oneline start=+"+ end=+"+ syn region mplayerconfString display oneline start=+'+ end=+'+ syn region mplayerconfProfile display oneline start='^\s*\[' end='\]' hi def link mplayerconfTodo Todo hi def link mplayerconfComment Comment hi def link mplayerconfPreProc PreProc hi def link mplayerconfBoolean Boolean hi def link mplayerconfNumber Number hi def link mplayerconfOption Keyword hi def link mplayerconfString String hi def link mplayerconfProfile Special let b:current_syntax = "mplayerconf" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/mrxvtrc.vim000066400000000000000000000226031320401574200202440ustar00rootroot00000000000000" Description : Vim syntax file for mrxvtrc (for mrxvt-0.5.0 and up) " Created : Wed 26 Apr 2006 01:20:53 AM CDT " Modified : Thu 02 Feb 2012 08:37:45 PM EST " Maintainer : GI , where a='gi1242+vim', b='gmail', c='com' " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case match " Errors syn match mrxvtrcError contained '\v\S+' " Comments syn match mrxvtrcComment contains=@Spell '^\s*[!#].*$' syn match mrxvtrcComment '\v^\s*[#!]\s*\w+[.*]\w+.*:.*' " " Options. " syn match mrxvtrcClass '\v^\s*\w+[.*]' \ nextgroup=mrxvtrcOptions,mrxvtrcProfile,@mrxvtrcPOpts,mrxvtrcError " Boolean options syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcBColon,mrxvtrcError \ highlightTabOnBell syncTabTitle hideTabbar \ autohideTabbar bottomTabbar hideButtons \ syncTabIcon veryBoldFont maximized \ fullscreen reverseVideo loginShell \ jumpScroll scrollBar scrollbarRight \ scrollbarFloating scrollTtyOutputInhibit \ scrollTtyKeypress transparentForce \ transparentScrollbar transparentMenubar \ transparentTabbar tabUsePixmap utmpInhibit \ visualBell mapAlert meta8 \ mouseWheelScrollPage multibyte_cursor \ tripleclickwords showMenu xft xftNomFont \ xftSlowOutput xftAntialias xftHinting \ xftAutoHint xftGlobalAdvance cmdAllTabs \ protectSecondary thai borderLess \ overrideRedirect broadcast smartResize \ pointerBlank cursorBlink noSysConfig \ disableMacros linuxHomeEndKey sessionMgt \ boldColors smoothResize useFifo veryBright syn match mrxvtrcOptions contained nextgroup=mrxvtrcBColon,mrxvtrcError \ '\v' syn match mrxvtrcBColon contained skipwhite \ nextgroup=mrxvtrcBoolVal,mrxvtrcError ':' syn case ignore syn keyword mrxvtrcBoolVal contained skipwhite nextgroup=mrxvtrcError \ 0 1 yes no on off true false syn case match " Color options syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcCColon,mrxvtrcError \ ufBackground textShadow tabForeground \ itabForeground tabBackground itabBackground \ scrollColor troughColor highlightColor \ cursorColor cursorColor2 pointerColor \ borderColor tintColor syn match mrxvtrcOptions contained nextgroup=mrxvtrcCColon,mrxvtrcError \ '\v' syn match mrxvtrcCColon contained skipwhite \ nextgroup=mrxvtrcColorVal ':' syn match mrxvtrcColorVal contained skipwhite nextgroup=mrxvtrcError \ '\v#[0-9a-fA-F]{6}' " Numeric options syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcNColon,mrxvtrcError \ maxTabWidth minVisibleTabs \ scrollbarThickness xftmSize xftSize desktop \ externalBorder internalBorder lineSpace \ pointerBlankDelay cursorBlinkInterval \ shading backgroundFade bgRefreshInterval \ fading opacity opacityDegree xftPSize syn match mrxvtrcNColon contained skipwhite \ nextgroup=mrxvtrcNumVal,mrxvtrcError ':' syn match mrxvtrcNumVal contained skipwhite nextgroup=mrxvtrcError \ '\v[+-]?<(0[0-7]+|\d+|0x[0-9a-f]+)>' " String options syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcSColon,mrxvtrcError \ tabTitle termName title clientName iconName \ bellCommand backspaceKey deleteKey \ printPipe cutChars answerbackString \ smClientID geometry path boldFont xftFont \ xftmFont xftPFont inputMethod \ greektoggle_key menu menubarPixmap \ scrollbarPixmap tabbarPixmap appIcon \ multichar_encoding initProfileList syn match mrxvtrcOptions contained nextgroup=mrxvtrcSColon,mrxvtrcError \ '\v' syn match mrxvtrcSColon contained skipwhite nextgroup=mrxvtrcStrVal ':' syn match mrxvtrcStrVal contained '\v\S.*' " Profile options syn cluster mrxvtrcPOpts contains=mrxvtrcPSOpts,mrxvtrcPCOpts,mrxvtrcPNOpts syn match mrxvtrcProfile contained nextgroup=@mrxvtrcPOpts,mrxvtrcError \ '\vprofile\d+\.' syn keyword mrxvtrcPSOpts contained nextgroup=mrxvtrcSColon,mrxvtrcError \ tabTitle command holdExitText holdExitTitle \ Pixmap workingDirectory titleFormat \ winTitleFormat syn keyword mrxvtrcPCOpts contained nextgroup=mrxvtrcCColon,mrxvtrcError \ background foreground syn keyword mrxvtrcPNOpts contained nextgroup=mrxvtrcNColon,mrxvtrcError \ holdExit saveLines " scrollbarStyle syn match mrxvtrcOptions contained skipwhite \ nextgroup=mrxvtrcSBstyle,mrxvtrcError \ '\v' " " Highlighting groups " hi def link mrxvtrcError Error hi def link mrxvtrcComment Comment hi def link mrxvtrcClass Statement hi def link mrxvtrcOptions mrxvtrcClass hi def link mrxvtrcBColon mrxvtrcClass hi def link mrxvtrcCColon mrxvtrcClass hi def link mrxvtrcNColon mrxvtrcClass hi def link mrxvtrcSColon mrxvtrcClass hi def link mrxvtrcProfile mrxvtrcClass hi def link mrxvtrcPSOpts mrxvtrcClass hi def link mrxvtrcPCOpts mrxvtrcClass hi def link mrxvtrcPNOpts mrxvtrcClass hi def link mrxvtrcBoolVal Boolean hi def link mrxvtrcStrVal String hi def link mrxvtrcColorVal Constant hi def link mrxvtrcNumVal Number hi def link mrxvtrcSBstyle mrxvtrcStrVal hi def link mrxvtrcSBalign mrxvtrcStrVal hi def link mrxvtrcTSmode mrxvtrcStrVal hi def link mrxvtrcGrkKbd mrxvtrcStrVal hi def link mrxvtrcXftWt mrxvtrcStrVal hi def link mrxvtrcXftSl mrxvtrcStrVal hi def link mrxvtrcXftWd mrxvtrcStrVal hi def link mrxvtrcXftHt mrxvtrcStrVal hi def link mrxvtrcPedit mrxvtrcStrVal hi def link mrxvtrcMod mrxvtrcStrVal hi def link mrxvtrcSelSty mrxvtrcStrVal hi def link mrxvtrcMacro Identifier hi def link mrxvtrcKey mrxvtrcClass hi def link mrxvtrcTitle mrxvtrcStrVal hi def link mrxvtrcShell Special hi def link mrxvtrcCmd PreProc hi def link mrxvtrcSubwin mrxvtrcStrVal let b:current_syntax = "mrxvtrc" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/msidl.vim000066400000000000000000000066101320401574200176470ustar00rootroot00000000000000" Vim syntax file " Language: MS IDL (Microsoft dialect of Interface Description Language) " Maintainer: Vadim Zeitlin " Last Change: 2012 Feb 12 by Thilo Six " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Misc basic syn match msidlId "[a-zA-Z][a-zA-Z0-9_]*" syn match msidlUUID "{\?[[:xdigit:]]\{8}-\([[:xdigit:]]\{4}-\)\{3}[[:xdigit:]]\{12}}\?" syn region msidlString start=/"/ skip=/\\\(\\\\\)*"/ end=/"/ syn match msidlLiteral "\d\+\(\.\d*\)\=" syn match msidlLiteral "\.\d\+" syn match msidlSpecial contained "[]\[{}:]" " Comments syn keyword msidlTodo contained TODO FIXME XXX syn region msidlComment start="/\*" end="\*/" contains=msidlTodo syn match msidlComment "//.*" contains=msidlTodo syn match msidlCommentError "\*/" " C style Preprocessor syn region msidlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+ syn match msidlIncluded contained "<[^>]*>" syn match msidlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=msidlIncluded,msidlString syn region msidlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=msidlComment,msidlCommentError syn region msidlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=msidlLiteral, msidlString " Attributes syn keyword msidlAttribute contained in out propget propput propputref retval syn keyword msidlAttribute contained aggregatable appobject binadable coclass control custom default defaultbind defaultcollelem defaultvalue defaultvtable dispinterface displaybind dual entry helpcontext helpfile helpstring helpstringdll hidden id immediatebind lcid library licensed nonbrowsable noncreatable nonextensible oleautomation optional object public readonly requestedit restricted source string uidefault usesgetlasterror vararg version syn match msidlAttribute /uuid(.*)/he=s+4 contains=msidlUUID syn match msidlAttribute /helpstring(.*)/he=s+10 contains=msidlString syn region msidlAttributes start="\[" end="]" keepend contains=msidlSpecial,msidlString,msidlAttribute,msidlComment,msidlCommentError " Keywords syn keyword msidlEnum enum syn keyword msidlImport import importlib syn keyword msidlStruct interface library coclass syn keyword msidlTypedef typedef " Types syn keyword msidlStandardType byte char double float hyper int long short void wchar_t syn keyword msidlStandardType BOOL BSTR HRESULT VARIANT VARIANT_BOOL syn region msidlSafeArray start="SAFEARRAY(" end=")" contains=msidlStandardType syn sync lines=50 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link msidlInclude Include hi def link msidlPreProc PreProc hi def link msidlPreCondit PreCondit hi def link msidlDefine Macro hi def link msidlIncluded String hi def link msidlString String hi def link msidlComment Comment hi def link msidlTodo Todo hi def link msidlSpecial SpecialChar hi def link msidlLiteral Number hi def link msidlUUID Number hi def link msidlImport Include hi def link msidlEnum StorageClass hi def link msidlStruct Structure hi def link msidlTypedef Typedef hi def link msidlAttribute StorageClass hi def link msidlStandardType Type hi def link msidlSafeArray Type let b:current_syntax = "msidl" let &cpo = s:cpo_save unlet s:cpo_save " vi: set ts=8 sw=4: neovim-0.2.2/runtime/syntax/msmessages.vim000066400000000000000000000142561320401574200207130ustar00rootroot00000000000000" Vim syntax file " Language: MS Message Text files (*.mc) " Maintainer: Kevin Locke " Last Change: 2008 April 09 " Location: http://kevinlocke.name/programs/vim/syntax/msmessages.vim " See format description at " This file is based on the rc.vim and c.vim " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Common MS Messages keywords syn case ignore syn keyword msmessagesIdentifier MessageIdTypedef syn keyword msmessagesIdentifier SeverityNames syn keyword msmessagesIdentifier FacilityNames syn keyword msmessagesIdentifier LanguageNames syn keyword msmessagesIdentifier OutputBase syn keyword msmessagesIdentifier MessageId syn keyword msmessagesIdentifier Severity syn keyword msmessagesIdentifier Facility syn keyword msmessagesIdentifier OutputBase syn match msmessagesIdentifier /\/ nextgroup=msmessagesIdentEq skipwhite syn match msmessagesIdentEq transparent /=/ nextgroup=msmessagesIdentDef skipwhite contained syn match msmessagesIdentDef display /\w\+/ contained " Note: The Language keyword is highlighted as part of an msmessagesLangEntry " Set value syn case match syn region msmessagesSet start="(" end=")" transparent fold contains=msmessagesName keepend syn match msmessagesName /\w\+/ nextgroup=msmessagesSetEquals skipwhite contained syn match msmessagesSetEquals /=/ display transparent nextgroup=msmessagesNumVal skipwhite contained syn match msmessagesNumVal display transparent "\<\d\|\.\d" contains=msmessagesNumber,msmessagesFloat,msmessagesOctalError,msmessagesOctal nextgroup=msmessagesValSep syn match msmessagesValSep /:/ display nextgroup=msmessagesNameDef contained syn match msmessagesNameDef /\w\+/ display contained " Comments are converted to C source (by removing leading ;) " So we highlight the comments as C syn include @msmessagesC syntax/c.vim unlet b:current_syntax syn region msmessagesCComment matchgroup=msmessagesComment start=/;/ end=/$/ contains=@msmessagesC keepend " String and Character constants " Highlight special characters (those which have a escape) differently syn case ignore syn region msmessagesLangEntry start=/\\s*=\s*\S\+\s*$/hs=e+1 end=/^\./ contains=msmessagesFormat,msmessagesLangEntryEnd,msmessagesLanguage keepend syn match msmessagesLanguage /\" "hex number syn match msmessagesNumber display contained "\<0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" " Flag the first zero of an octal number as something special syn match msmessagesOctal display contained "\<0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=msmessagesOctalZero syn match msmessagesOctalZero display contained "\<0" " flag an octal number with wrong digits syn match msmessagesOctalError display contained "\<0\o*[89]\d*" syn match msmessagesFloat display contained "\d\+f" "floating point number, with dot, optional exponent syn match msmessagesFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" "floating point number, starting with a dot, optional exponent syn match msmessagesFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match msmessagesFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" "hexadecimal floating point number, optional leading digits, with dot, with exponent syn match msmessagesFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" "hexadecimal floating point number, with leading digits, optional dot, with exponent syn match msmessagesFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" " Types (used in MessageIdTypedef statement) syn case match syn keyword msmessagesType int long short char syn keyword msmessagesType signed unsigned syn keyword msmessagesType size_t ssize_t sig_atomic_t syn keyword msmessagesType int8_t int16_t int32_t int64_t syn keyword msmessagesType uint8_t uint16_t uint32_t uint64_t syn keyword msmessagesType int_least8_t int_least16_t int_least32_t int_least64_t syn keyword msmessagesType uint_least8_t uint_least16_t uint_least32_t uint_least64_t syn keyword msmessagesType int_fast8_t int_fast16_t int_fast32_t int_fast64_t syn keyword msmessagesType uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t syn keyword msmessagesType intptr_t uintptr_t syn keyword msmessagesType intmax_t uintmax_t " Add some Windows datatypes that will be common in msmessages files syn keyword msmessagesType BYTE CHAR SHORT SIZE_T SSIZE_T TBYTE TCHAR UCHAR USHORT syn keyword msmessagesType DWORD DWORDLONG DWORD32 DWORD64 syn keyword msmessagesType INT INT32 INT64 UINT UINT32 UINT64 syn keyword msmessagesType LONG LONGLONG LONG32 LONG64 syn keyword msmessagesType ULONG ULONGLONG ULONG32 ULONG64 " Sync to language entries, since they should be most common syn sync match msmessagesLangSync grouphere msmessagesLangEntry "\ " URL: http://www.isp.de/data/msql.vim " Email: Subject: send syntax_vim.tgz " Last Change: 2001 May 10 " " Options msql_sql_query = 1 for SQL syntax highligthing inside strings " msql_minlines = x to sync at least x lines backwards " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'msql' endif runtime! syntax/html.vim unlet b:current_syntax syn cluster htmlPreproc add=msqlRegion syn case match " Internal Variables syn keyword msqlIntVar ERRMSG contained " Env Variables syn keyword msqlEnvVar SERVER_SOFTWARE SERVER_NAME SERVER_URL GATEWAY_INTERFACE contained syn keyword msqlEnvVar SERVER_PROTOCOL SERVER_PORT REQUEST_METHOD PATH_INFO contained syn keyword msqlEnvVar PATH_TRANSLATED SCRIPT_NAME QUERY_STRING REMOTE_HOST contained syn keyword msqlEnvVar REMOTE_ADDR AUTH_TYPE REMOTE_USER CONTEN_TYPE contained syn keyword msqlEnvVar CONTENT_LENGTH HTTPS HTTPS_KEYSIZE HTTPS_SECRETKEYSIZE contained syn keyword msqlEnvVar HTTP_ACCECT HTTP_USER_AGENT HTTP_IF_MODIFIED_SINCE contained syn keyword msqlEnvVar HTTP_FROM HTTP_REFERER contained " Inlclude lLite syn include @msqlLite :p:h/lite.vim " Msql Region syn region msqlRegion matchgroup=Delimiter start="D]" end=">" contains=@msqlLite,msql.* " sync if exists("msql_minlines") exec "syn sync minlines=" . msql_minlines else syn sync minlines=100 endif " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link msqlComment Comment hi def link msqlString String hi def link msqlNumber Number hi def link msqlFloat Float hi def link msqlIdentifier Identifier hi def link msqlGlobalIdentifier Identifier hi def link msqlIntVar Identifier hi def link msqlEnvVar Identifier hi def link msqlFunctions Function hi def link msqlRepeat Repeat hi def link msqlConditional Conditional hi def link msqlStatement Statement hi def link msqlType Type hi def link msqlInclude Include hi def link msqlDefine Define hi def link msqlSpecialChar SpecialChar hi def link msqlParentError Error hi def link msqlTodo Todo hi def link msqlOperator Operator hi def link msqlRelation Operator let b:current_syntax = "msql" if main_syntax == 'msql' unlet main_syntax endif " vim: ts=8 neovim-0.2.2/runtime/syntax/mupad.vim000066400000000000000000000361641320401574200176540ustar00rootroot00000000000000" Vim syntax file " Language: MuPAD source " Maintainer: Dave Silvia " Filenames: *.mu " Date: 6/30/2004 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Set default highlighting to Win2k if !exists("mupad_cmdextversion") let mupad_cmdextversion = 2 endif syn case match syn match mupadComment "//\p*$" syn region mupadComment start="/\*" end="\*/" syn region mupadString start="\"" skip=/\\"/ end="\"" syn match mupadOperator "(\|)\|:=\|::\|:\|;" " boolean syn keyword mupadOperator and or not xor syn match mupadOperator "==>\|\<=\>" " Informational syn keyword mupadSpecial FILEPATH NOTEBOOKFILE NOTEBOOKPATH " Set-able, e.g., DIGITS:=10 syn keyword mupadSpecial DIGITS HISTORY LEVEL syn keyword mupadSpecial MAXLEVEL MAXDEPTH ORDER syn keyword mupadSpecial TEXTWIDTH " Set-able, e.g., PRETTYPRINT:=TRUE syn keyword mupadSpecial PRETTYPRINT " Set-able, e.g., LIBPATH:="C:\\MuPAD Pro\\mylibdir" or LIBPATH:="/usr/MuPAD Pro/mylibdir" syn keyword mupadSpecial LIBPATH PACKAGEPATH syn keyword mupadSpecial READPATH TESTPATH WRITEPATH " Symbols and Constants syn keyword mupadDefine FAIL NIL syn keyword mupadDefine TRUE FALSE UNKNOWN syn keyword mupadDefine complexInfinity infinity syn keyword mupadDefine C_ CATALAN E EULER I PI Q_ R_ syn keyword mupadDefine RD_INF RD_NINF undefined unit universe Z_ " print() directives syn keyword mupadDefine Unquoted NoNL KeepOrder Typeset " domain specifics syn keyword mupadStatement domain begin end_domain end syn keyword mupadIdentifier inherits category axiom info doc interface " basic programming statements syn keyword mupadStatement proc begin end_proc syn keyword mupadUnderlined name local option save syn keyword mupadConditional if then elif else end_if syn keyword mupadConditional case of do break end_case syn keyword mupadRepeat for do next break end_for syn keyword mupadRepeat while do next break end_while syn keyword mupadRepeat repeat next break until end_repeat " domain packages/libraries syn keyword mupadType detools import linalg numeric numlib plot polylib syn match mupadType '\' "syn keyword mupadFunction contains " Functions dealing with prime numbers syn keyword mupadFunction phi invphi mersenne nextprime numprimedivisors syn keyword mupadFunction pollard prevprime primedivisors " Functions operating on Lists, Matrices, Sets, ... syn keyword mupadFunction array _index " Evaluation syn keyword mupadFunction float contains " stdlib syn keyword mupadFunction _exprseq _invert _lazy_and _lazy_or _negate syn keyword mupadFunction _stmtseq _invert intersect minus union syn keyword mupadFunction Ci D Ei O Re Im RootOf Si syn keyword mupadFunction Simplify syn keyword mupadFunction abs airyAi airyBi alias unalias anames append syn keyword mupadFunction arcsin arccos arctan arccsc arcsec arccot syn keyword mupadFunction arcsinh arccosh arctanh arccsch arcsech arccoth syn keyword mupadFunction arg args array assert assign assignElements syn keyword mupadFunction assume assuming asympt bernoulli syn keyword mupadFunction besselI besselJ besselK besselY beta binomial bool syn keyword mupadFunction bytes card syn keyword mupadFunction ceil floor round trunc syn keyword mupadFunction coeff coerce collect combine copyClosure syn keyword mupadFunction conjugate content context contfrac syn keyword mupadFunction debug degree degreevec delete _delete denom syn keyword mupadFunction densematrix diff dilog dirac discont div _div syn keyword mupadFunction divide domtype doprint erf erfc error eval evalassign syn keyword mupadFunction evalp exp expand export unexport expose expr syn keyword mupadFunction expr2text external extnops extop extsubsop syn keyword mupadFunction fact fact2 factor fclose finput fname fopen fprint syn keyword mupadFunction fread ftextinput readbitmap readdata pathname syn keyword mupadFunction protocol read readbytes write writebytes syn keyword mupadFunction float frac frame _frame frandom freeze unfreeze syn keyword mupadFunction funcenv gamma gcd gcdex genident genpoly syn keyword mupadFunction getpid getprop ground has hastype heaviside help syn keyword mupadFunction history hold hull hypergeom icontent id syn keyword mupadFunction ifactor igamma igcd igcdex ilcm in _in syn keyword mupadFunction indets indexval info input int int2text syn keyword mupadFunction interpolate interval irreducible is syn keyword mupadFunction isprime isqrt iszero ithprime kummerU lambertW syn keyword mupadFunction last lasterror lcm lcoeff ldegree length syn keyword mupadFunction level lhs rhs limit linsolve lllint syn keyword mupadFunction lmonomial ln loadmod loadproc log lterm syn keyword mupadFunction match map mapcoeffs maprat matrix max min syn keyword mupadFunction mod modp mods monomials multcoeffs new syn keyword mupadFunction newDomain _next nextprime nops syn keyword mupadFunction norm normal nterms nthcoeff nthmonomial nthterm syn keyword mupadFunction null numer ode op operator package syn keyword mupadFunction pade partfrac patchlevel pdivide syn keyword mupadFunction piecewise plot plotfunc2d plotfunc3d syn keyword mupadFunction poly poly2list polylog powermod print syn keyword mupadFunction product protect psi quit _quit radsimp random rationalize syn keyword mupadFunction rec rectform register reset return revert syn keyword mupadFunction rewrite select series setuserinfo share sign signIm syn keyword mupadFunction simplify syn keyword mupadFunction sin cos tan csc sec cot syn keyword mupadFunction sinh cosh tanh csch sech coth syn keyword mupadFunction slot solve syn keyword mupadFunction pdesolve matlinsolve matlinsolveLU toeplitzSolve syn keyword mupadFunction vandermondeSolve fsolve odesolve odesolve2 syn keyword mupadFunction polyroots polysysroots odesolveGeometric syn keyword mupadFunction realroot realroots mroots lincongruence syn keyword mupadFunction msqrts syn keyword mupadFunction sort split sqrt strmatch strprint syn keyword mupadFunction subs subset subsex subsop substring sum syn keyword mupadFunction surd sysname sysorder system table taylor tbl2text syn keyword mupadFunction tcoeff testargs testeq testtype text2expr syn keyword mupadFunction text2int text2list text2tbl rtime time syn keyword mupadFunction traperror type unassume unit universe syn keyword mupadFunction unloadmod unprotect userinfo val version syn keyword mupadFunction warning whittakerM whittakerW zeta zip " graphics plot:: syn keyword mupadFunction getDefault setDefault copy modify Arc2d Arrow2d syn keyword mupadFunction Arrow3d Bars2d Bars3d Box Boxplot Circle2d Circle3d syn keyword mupadFunction Cone Conformal Curve2d Curve3d Cylinder Cylindrical syn keyword mupadFunction Density Ellipse2d Function2d Function3d Hatch syn keyword mupadFunction Histogram2d HOrbital Implicit2d Implicit3d syn keyword mupadFunction Inequality Iteration Line2d Line3d Lsys Matrixplot syn keyword mupadFunction MuPADCube Ode2d Ode3d Parallelogram2d Parallelogram3d syn keyword mupadFunction Piechart2d Piechart3d Point2d Point3d Polar syn keyword mupadFunction Polygon2d Polygon3d Raster Rectangle Sphere syn keyword mupadFunction Ellipsoid Spherical Sum Surface SurfaceSet syn keyword mupadFunction SurfaceSTL Tetrahedron Hexahedron Octahedron syn keyword mupadFunction Dodecahedron Icosahedron Text2d Text3d Tube Turtle syn keyword mupadFunction VectorField2d XRotate ZRotate Canvas CoordinateSystem2d syn keyword mupadFunction CoordinateSystem3d Group2d Group3d Scene2d Scene3d ClippingBox syn keyword mupadFunction Rotate2d Rotate3d Scale2d Scale3d Transform2d syn keyword mupadFunction Transform3d Translate2d Translate3d AmbientLight syn keyword mupadFunction Camera DistantLight PointLight SpotLight " graphics Attributes " graphics Output Attributes syn keyword mupadIdentifier OutputFile OutputOptions " graphics Defining Attributes syn keyword mupadIdentifier Angle AngleRange AngleBegin AngleEnd syn keyword mupadIdentifier Area Axis AxisX AxisY AxisZ Base Top syn keyword mupadIdentifier BaseX TopX BaseY TopY BaseZ TopZ syn keyword mupadIdentifier BaseRadius TopRadius Cells syn keyword mupadIdentifier Center CenterX CenterY CenterZ syn keyword mupadIdentifier Closed ColorData CommandList Contours CoordinateType syn keyword mupadIdentifier Data DensityData DensityFunction From To syn keyword mupadIdentifier FromX ToX FromY ToY FromZ ToZ syn keyword mupadIdentifier Function FunctionX FunctionY FunctionZ syn keyword mupadIdentifier Function1 Function2 Baseline syn keyword mupadIdentifier Generations RotationAngle IterationRules StartRule StepLength syn keyword mupadIdentifier TurtleRules Ground Heights Moves Inequalities syn keyword mupadIdentifier InputFile Iterations StartingPoint syn keyword mupadIdentifier LineColorFunction FillColorFunction syn keyword mupadIdentifier Matrix2d Matrix3d syn keyword mupadIdentifier MeshList MeshListType MeshListNormals syn keyword mupadIdentifier MagneticQuantumNumber MomentumQuantumNumber PrincipalQuantumNumber syn keyword mupadIdentifier Name Normal NormalX NormalY NormalZ syn keyword mupadIdentifier ParameterName ParameterBegin ParameterEnd ParameterRange syn keyword mupadIdentifier Points2d Points3d Radius RadiusFunction syn keyword mupadIdentifier Position PositionX PositionY PositionZ syn keyword mupadIdentifier Scale ScaleX ScaleY ScaleZ Shift ShiftX ShiftY ShiftZ syn keyword mupadIdentifier SemiAxes SemiAxisX SemiAxisY SemiAxisZ syn keyword mupadIdentifier Tangent1 Tangent1X Tangent1Y Tangent1Z syn keyword mupadIdentifier Tangent2 Tangent2X Tangent2Y Tangent2Z syn keyword mupadIdentifier Text TextOrientation TextRotation syn keyword mupadIdentifier UName URange UMin UMax VName VRange VMin VMax syn keyword mupadIdentifier XName XRange XMin XMax YName YRange YMin YMax syn keyword mupadIdentifier ZName ZRange ZMin ZMax ViewingBox syn keyword mupadIdentifier ViewingBoxXMin ViewingBoxXMax ViewingBoxXRange syn keyword mupadIdentifier ViewingBoxYMin ViewingBoxYMax ViewingBoxYRange syn keyword mupadIdentifier ViewingBoxZMin ViewingBoxZMax ViewingBoxZRange syn keyword mupadIdentifier Visible " graphics Axis Attributes syn keyword mupadIdentifier Axes AxesInFront AxesLineColor AxesLineWidth syn keyword mupadIdentifier AxesOrigin AxesOriginX AxesOriginY AxesOriginZ syn keyword mupadIdentifier AxesTips AxesTitleAlignment syn keyword mupadIdentifier AxesTitleAlignmentX AxesTitleAlignmentY AxesTitleAlignmentZ syn keyword mupadIdentifier AxesTitles XAxisTitle YAxisTitle ZAxisTitle syn keyword mupadIdentifier AxesVisible XAxisVisible YAxisVisible ZAxisVisible syn keyword mupadIdentifier YAxisTitleOrientation " graphics Tick Marks Attributes syn keyword mupadIdentifier TicksAnchor XTicksAnchor YTicksAnchor ZTicksAnchor syn keyword mupadIdentifier TicksAt XTicksAt YTicksAt ZTicksAt syn keyword mupadIdentifier TicksBetween XTicksBetween YTicksBetween ZTicksBetween syn keyword mupadIdentifier TicksDistance XTicksDistance YTicksDistance ZTicksDistance syn keyword mupadIdentifier TicksNumber XTicksNumber YTicksNumber ZTicksNumber syn keyword mupadIdentifier TicksVisible XTicksVisible YTicksVisible ZTicksVisible syn keyword mupadIdentifier TicksLength TicksLabelStyle syn keyword mupadIdentifier XTicksLabelStyle YTicksLabelStyle ZTicksLabelStyle syn keyword mupadIdentifier TicksLabelsVisible syn keyword mupadIdentifier XTicksLabelsVisible YTicksLabelsVisible ZTicksLabelsVisible " graphics Grid Lines Attributes syn keyword mupadIdentifier GridInFront GridLineColor SubgridLineColor syn keyword mupadIdentifier GridLineStyle SubgridLineStyle GridLineWidth SubgridLineWidth syn keyword mupadIdentifier GridVisible XGridVisible YGridVisible ZGridVisible syn keyword mupadIdentifier SubgridVisible XSubgridVisible YSubgridVisible ZSubgridVisible " graphics Animation Attributes syn keyword mupadIdentifier Frames TimeRange TimeBegin TimeEnd syn keyword mupadIdentifier VisibleAfter VisibleBefore VisibleFromTo syn keyword mupadIdentifier VisibleAfterEnd VisibleBeforeBegin " graphics Annotation Attributes syn keyword mupadIdentifier Footer Header FooterAlignment HeaderAlignment syn keyword mupadIdentifier HorizontalAlignment TitleAlignment VerticalAlignment syn keyword mupadIdentifier Legend LegendEntry LegendText syn keyword mupadIdentifier LegendAlignment LegendPlacement LegendVisible syn keyword mupadIdentifier Title Titles syn keyword mupadIdentifier TitlePosition TitlePositionX TitlePositionY TitlePositionZ " graphics Layout Attributes syn keyword mupadIdentifier Bottom Left Height Width Layout Rows Columns syn keyword mupadIdentifier Margin BottomMargin TopMargin LeftMargin RightMargin syn keyword mupadIdentifier OutputUnits Spacing " graphics Calculation Attributes syn keyword mupadIdentifier AdaptiveMesh DiscontinuitySearch Mesh SubMesh syn keyword mupadIdentifier UMesh USubMesh VMesh VSubMesh syn keyword mupadIdentifier XMesh XSubMesh YMesh YSubMesh Zmesh " graphics Camera and Lights Attributes syn keyword mupadIdentifier CameraCoordinates CameraDirection syn keyword mupadIdentifier CameraDirectionX CameraDirectionY CameraDirectionZ syn keyword mupadIdentifier FocalPoint FocalPointX FocalPointY FocalPointZ syn keyword mupadIdentifier LightColor Lighting LightIntensity OrthogonalProjection syn keyword mupadIdentifier SpotAngle ViewingAngle syn keyword mupadIdentifier Target TargetX TargetY TargetZ " graphics Presentation Style and Fonts Attributes syn keyword mupadIdentifier ArrowLength syn keyword mupadIdentifier AxesTitleFont FooterFont HeaderFont LegendFont syn keyword mupadIdentifier TextFont TicksLabelFont TitleFont syn keyword mupadIdentifier BackgroundColor BackgroundColor2 BackgroundStyle syn keyword mupadIdentifier BackgroundTransparent Billboarding BorderColor BorderWidth syn keyword mupadIdentifier BoxCenters BoxWidths DrawMode Gap XGap YGap syn keyword mupadIdentifier Notched NotchWidth Scaling YXRatio ZXRatio syn keyword mupadIdentifier VerticalAsymptotesVisible VerticalAsymptotesStyle syn keyword mupadIdentifier VerticalAsymptotesColor VerticalAsymptotesWidth " graphics Line Style Attributes syn keyword mupadIdentifier LineColor LineColor2 LineColorType LineStyle syn keyword mupadIdentifier LinesVisible ULinesVisible VLinesVisible XLinesVisible syn keyword mupadIdentifier YLinesVisible LineWidth MeshVisible " graphics Point Style Attributes syn keyword mupadIdentifier PointColor PointSize PointStyle PointsVisible " graphics Surface Style Attributes syn keyword mupadIdentifier BarStyle Shadows Color Colors FillColor FillColor2 syn keyword mupadIdentifier FillColorTrue FillColorFalse FillColorUnknown FillColorType syn keyword mupadIdentifier Filled FillPattern FillPatterns FillStyle syn keyword mupadIdentifier InterpolationStyle Shading UseNormals " graphics Arrow Style Attributes syn keyword mupadIdentifier TipAngle TipLength TipStyle TubeDiameter syn keyword mupadIdentifier Tubular " graphics meta-documentation Attributes syn keyword mupadIdentifier objectGroupsListed hi def link mupadComment Comment hi def link mupadString String hi def link mupadOperator Operator hi def link mupadSpecial Special hi def link mupadStatement Statement hi def link mupadUnderlined Underlined hi def link mupadConditional Conditional hi def link mupadRepeat Repeat hi def link mupadFunction Function hi def link mupadType Type hi def link mupadDefine Define hi def link mupadIdentifier Identifier " TODO More comprehensive listing. neovim-0.2.2/runtime/syntax/murphi.vim000066400000000000000000000110131320401574200200340ustar00rootroot00000000000000" Vim syntax file " Language: Murphi model checking language " Maintainer: Matthew Fernandez " Last Change: 2017 Aug 27 " Version: 2 " Remark: Originally authored by Diego Ongaro if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Keywords are case insensitive. " Keep these in alphabetical order. syntax case ignore syn keyword murphiKeyword alias syn keyword murphiStructure array syn keyword murphiKeyword assert syn keyword murphiKeyword begin syn keyword murphiType boolean syn keyword murphiKeyword by syn keyword murphiLabel case syn keyword murphiKeyword clear syn keyword murphiLabel const syn keyword murphiRepeat do syn keyword murphiConditional else syn keyword murphiConditional elsif syn keyword murphiKeyword end syn keyword murphiKeyword endalias syn keyword murphiRepeat endexists syn keyword murphiRepeat endfor syn keyword murphiRepeat endforall syn keyword murphiKeyword endfunction syn keyword murphiConditional endif syn keyword murphiKeyword endprocedure syn keyword murphiStructure endrecord syn keyword murphiKeyword endrule syn keyword murphiKeyword endruleset syn keyword murphiKeyword endstartstate syn keyword murphiConditional endswitch syn keyword murphiRepeat endwhile syn keyword murphiStructure enum syn keyword murphiKeyword error syn keyword murphiRepeat exists syn keyword murphiBoolean false syn keyword murphiRepeat for syn keyword murphiRepeat forall syn keyword murphiKeyword function syn keyword murphiConditional if syn keyword murphiKeyword in syn keyword murphiKeyword interleaved syn keyword murphiLabel invariant syn keyword murphiFunction ismember syn keyword murphiFunction isundefined syn keyword murphiKeyword log syn keyword murphiStructure of syn keyword murphiType multiset syn keyword murphiFunction multisetadd syn keyword murphiFunction multisetcount syn keyword murphiFunction multisetremove syn keyword murphiFunction multisetremovepred syn keyword murphiKeyword procedure syn keyword murphiKeyword process syn keyword murphiKeyword program syn keyword murphiKeyword put syn keyword murphiStructure record syn keyword murphiKeyword return syn keyword murphiLabel rule syn keyword murphiLabel ruleset syn keyword murphiType scalarset syn keyword murphiLabel startstate syn keyword murphiConditional switch syn keyword murphiConditional then syn keyword murphiRepeat to syn keyword murphiKeyword traceuntil syn keyword murphiBoolean true syn keyword murphiLabel type syn keyword murphiKeyword undefine syn keyword murphiStructure union syn keyword murphiLabel var syn keyword murphiRepeat while syn keyword murphiTodo contained todo xxx fixme syntax case match " Integers. syn match murphiNumber "\<\d\+\>" " Operators and special characters. syn match murphiOperator "[\+\-\*\/%&|=!<>:\?]\|\." syn match murphiDelimiter "\(:[^=]\|[;,]\)" syn match murphiSpecial "[()\[\]]" " Double equal sign is a common error: use one equal sign for equality testing. syn match murphiError "==[^>]"he=e-1 " Double && and || are errors. syn match murphiError "&&\|||" " Strings. This is defined so late so that it overrides previous matches. syn region murphiString start=+"+ end=+"+ " Comments. This is defined so late so that it overrides previous matches. syn region murphiComment start="--" end="$" contains=murphiTodo syn region murphiComment start="/\*" end="\*/" contains=murphiTodo " Link the rules to some groups. hi def link murphiComment Comment hi def link murphiString String hi def link murphiNumber Number hi def link murphiBoolean Boolean hi def link murphiIdentifier Identifier hi def link murphiFunction Function hi def link murphiStatement Statement hi def link murphiConditional Conditional hi def link murphiRepeat Repeat hi def link murphiLabel Label hi def link murphiOperator Operator hi def link murphiKeyword Keyword hi def link murphiType Type hi def link murphiStructure Structure hi def link murphiSpecial Special hi def link murphiDelimiter Delimiter hi def link murphiError Error hi def link murphiTodo Todo let b:current_syntax = "murphi" neovim-0.2.2/runtime/syntax/mush.vim000066400000000000000000000316031320401574200175130ustar00rootroot00000000000000" MUSHcode syntax file " Maintainer: Rick Bird " Based on vim Syntax file by: Bek Oberin " Last Updated: Fri Nov 04 20:28:15 2005 " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " regular mush functions syntax keyword mushFunction contained @@ abs accent accname acos add after align syntax keyword mushFunction contained allof alphamax alphamin and andflags syntax keyword mushFunction contained andlflags andlpowers andpowers ansi aposs art syntax keyword mushFunction contained asin atan atan2 atrlock attrcnt band baseconv syntax keyword mushFunction contained beep before blank2tilde bnand bnot bor bound syntax keyword mushFunction contained brackets break bxor cand cansee capstr case syntax keyword mushFunction contained caseall cat ceil center checkpass children syntax keyword mushFunction contained chr clone cmds cnetpost comp con config conn syntax keyword mushFunction contained controls convsecs convtime convutcsecs cor syntax keyword mushFunction contained cos create ctime ctu dec decrypt default syntax keyword mushFunction contained delete die dig digest dist2d dist3d div syntax keyword mushFunction contained division divscope doing downdiv dynhelp e syntax keyword mushFunction contained edefault edit element elements elist elock syntax keyword mushFunction contained emit empire empower encrypt endtag entrances syntax keyword mushFunction contained eq escape etimefmt eval exit exp extract fdiv syntax keyword mushFunction contained filter filterbool findable first firstof syntax keyword mushFunction contained flags flip floor floordiv fmod fold syntax keyword mushFunction contained folderstats followers following foreach syntax keyword mushFunction contained fraction fullname functions get get_eval grab syntax keyword mushFunction contained graball grep grepi gt gte hasattr hasattrp syntax keyword mushFunction contained hasattrpval hasattrval hasdivpower hasflag syntax keyword mushFunction contained haspower haspowergroup hastype height hidden syntax keyword mushFunction contained home host hostname html idle idlesecs syntax keyword mushFunction contained idle_average idle_times idle_total if ifelse syntax keyword mushFunction contained ilev iname inc index indiv indivall insert syntax keyword mushFunction contained inum ipaddr isdaylight isdbref isint isnum syntax keyword mushFunction contained isword itemize items iter itext last lattr syntax keyword mushFunction contained lcon lcstr ldelete ldivisions left lemit syntax keyword mushFunction contained level lexits lflags link list lit ljust lmath syntax keyword mushFunction contained ln lnum loc localize locate lock loctree log syntax keyword mushFunction contained lparent lplayers lports lpos lsearch lsearchr syntax keyword mushFunction contained lstats lt lte lthings lvcon lvexits lvplayers syntax keyword mushFunction contained lvthings lwho mail maildstats mailfrom syntax keyword mushFunction contained mailfstats mailstats mailstatus mailsubject syntax keyword mushFunction contained mailtime map match matchall max mean median syntax keyword mushFunction contained member merge mid min mix mod modulo modulus syntax keyword mushFunction contained money mtime mudname mul munge mwho name nand syntax keyword mushFunction contained nattr ncon nearby neq nexits next nor not syntax keyword mushFunction contained nplayers nsemit nslemit nsoemit nspemit syntax keyword mushFunction contained nsremit nszemit nthings null num nvcon syntax keyword mushFunction contained nvexits nvplayers nvthings obj objeval objid syntax keyword mushFunction contained objmem oemit ooref open or ord orflags syntax keyword mushFunction contained orlflags orlpowers orpowers owner parent syntax keyword mushFunction contained parse pcreate pemit pi pickrand playermem syntax keyword mushFunction contained pmatch poll ports pos poss power powergroups syntax keyword mushFunction contained powers powover program prompt pueblo quitprog syntax keyword mushFunction contained quota r rand randword recv regedit regeditall syntax keyword mushFunction contained regeditalli regediti regmatch regmatchi syntax keyword mushFunction contained regrab regraball regraballi regrabi regrep syntax keyword mushFunction contained regrepi remainder remit remove repeat replace syntax keyword mushFunction contained rest restarts restarttime reswitch syntax keyword mushFunction contained reswitchall reswitchalli reswitchi reverse syntax keyword mushFunction contained revwords right rjust rloc rnum room root syntax keyword mushFunction contained round s scan scramble search secs secure sent syntax keyword mushFunction contained set setdiff setinter setq setr setunion sha0 syntax keyword mushFunction contained shl shr shuffle sign signal sin sort sortby syntax keyword mushFunction contained soundex soundlike soundslike space spellnum syntax keyword mushFunction contained splice sql sqlescape sqrt squish ssl syntax keyword mushFunction contained starttime stats stddev step strcat strinsert syntax keyword mushFunction contained stripaccents stripansi strlen strmatch syntax keyword mushFunction contained strreplace sub subj switch switchall t table syntax keyword mushFunction contained tag tagwrap tan tel terminfo textfile syntax keyword mushFunction contained tilde2blank time timefmt timestring tr syntax keyword mushFunction contained trigger trim trimpenn trimtiny trunc type u syntax keyword mushFunction contained ucstr udefault ufun uldefault ulocal updiv syntax keyword mushFunction contained utctime v vadd val valid vcross vdim vdot syntax keyword mushFunction contained version visible vmag vmax vmin vmul vsub syntax keyword mushFunction contained vtattr vtcount vtcreate vtdestroy vtlcon syntax keyword mushFunction contained vtloc vtlocate vtmaster vtname vtref vttel syntax keyword mushFunction contained vunit wait where width wipe wordpos words syntax keyword mushFunction contained wrap xcon xexits xget xor xplayers xthings syntax keyword mushFunction contained xvcon xvexits xvplayers xvthings zemit zfun syntax keyword mushFunction contained zmwho zone zwho " only highligh functions when they have an in-bracket immediately after syntax match mushFunctionBrackets "\i*(" contains=mushFunction " " regular mush commands syntax keyword mushAtCommandList contained @ALLHALT @ALLQUOTA @ASSERT @ATRCHOWN @ATRLOCK @ATTRIBUTE @BOOT syntax keyword mushAtCommandList contained @BREAK @CEMIT @CHANNEL @CHAT @CHOWN @CHOWNALL @CHZONE @CHZONEALL syntax keyword mushAtCommandList contained @CLOCK @CLONE @COBJ @COMMAND @CONFIG @CPATTR @CREATE @CRPLOG @DBCK syntax keyword mushAtCommandList contained @DECOMPILE @DESTROY @DIG @DISABLE @DIVISION @DOING @DOLIST @DRAIN syntax keyword mushAtCommandList contained @DUMP @EDIT @ELOCK @EMIT @EMPOWER @ENABLE @ENTRANCES @EUNLOCK @FIND syntax keyword mushAtCommandList contained @FIRSTEXIT @FLAG @FORCE @FUNCTION @EDIT @GREP @HALT @HIDE @HOOK @KICK syntax keyword mushAtCommandList contained @LEMIT @LEVEL @LINK @LIST @LISTMOTD @LOCK @LOG @LOGWIPE @LSET @MAIL @MALIAS syntax keyword mushAtCommandList contained @MAP @MOTD @MVATTR @NAME @NEWPASSWORD @NOTIFY @NSCEMIT @NSEMIT @NSLEMIT syntax keyword mushAtCommandList contained @NSOEMIT @NSPEMIT @NSPEMIT @NSREMIT @NSZEMIT @NUKE @OEMIT @OPEN @PARENT @PASSWORD syntax keyword mushAtCommandList contained @PCREATE @PEMIT @POLL @POOR @POWERLEVEL @PROGRAM @PROMPT @PS @PURGE @QUOTA syntax keyword mushAtCommandList contained @READCACHE @RECYCLE @REJECTMOTD @REMIT @RESTART @SCAN @SEARCH @SELECT @SET syntax keyword mushAtCommandList contained @SHUTDOWN @SITELOCK @SNOOP @SQL @SQUOTA @STATS @SWITCH @SWEEP @SWITCH @TELEPORT syntax keyword mushAtCommandList contained @TRIGGER @ULOCK @UNDESTROY @UNLINK @UNLOCK @UNRECYCLE @UPTIME @UUNLOCK @VERB syntax keyword mushAtCommandList contained @VERSION @WAIT @WALL @WARNINGS @WCHECK @WHEREIS @WIPE @ZCLONE @ZEMIT syntax match mushCommand "@\i\I*" contains=mushAtCommandList syntax keyword mushCommand AHELP ANEWS ATTRIB_SET BRIEF BRIEF BUY CHANGES DESERT syntax keyword mushCommand DISMISS DROP EMPTY ENTER EXAMINE FOLLOW GET GIVE GOTO syntax keyword mushCommand HELP HUH_COMMAND INVENTORY INVENTORY LOOK LEAVE LOOK syntax keyword mushCommand GOTO NEWS PAGE PAGE POSE RULES SAY SCORE SEMIPOSE syntax keyword mushCommand SPECIALNEWS TAKE TEACH THINK UNFOLLOW USE WHISPER WHISPER syntax keyword mushCommand WARN_ON_MISSING WHISPER WITH syntax match mushSpecial "\*\|!\|=\|-\|\\\|+" syntax match mushSpecial2 contained "\*" syn region mushString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=mushSpecial,mushSpecial2,@Spell syntax match mushIdentifier "&[^ ]\+" syntax match mushVariable "%r\|%t\|%cr\|%[A-Za-z0-9]\+\|%#\|##\|here" " numbers syntax match mushNumber +[0-9]\++ " A comment line starts with a or # or " at the start of the line " or an @@ syntax keyword mushTodo contained TODO FIXME XXX syntax cluster mushCommentGroup contains=mushTodo syntax match mushComment "^\s*@@.*$" contains=mushTodo syntax match mushComment "^#[^define|^ifdef|^else|^pragma|^ifndef|^echo|^elif|^undef|^warning].*$" contains=mushTodo syntax match mushComment "^#$" contains=mushTodo syntax region mushComment matchgroup=mushCommentStart start="/@@" end="@@/" contains=@mushCommentGroup,mushCommentStartError,mushCommentString,@Spell syntax region mushCommentString contained start=+L\=\\\@" skip="\\$" end="$" end="//"me=s-1 contains=mushComment syn match mushPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" syn cluster mushPreProcGroup contains=mushPreCondit,mushIncluded,mushInclude,mushDefine,mushSpecial,mushString,mushCommentSkip,mushCommentString,@mushCommentGroup,mushCommentStartError syn region mushIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match mushIncluded display contained "<[^>]*>" syn match mushInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=mushIncluded syn region mushDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@mushPreProcGroup,@Spell syn region mushPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@mushPreProcGroup syntax region mushFuncBoundaries start="\[" end="\]" contains=mushFunction,mushFlag,mushAttributes,mushNumber,mushCommand,mushVariable,mushSpecial2 " FLAGS syntax keyword mushFlag PLAYER ABODE BUILDER CHOWN_OK DARK FLOATING syntax keyword mushFlag GOING HAVEN INHERIT JUMP_OK KEY LINK_OK MONITOR syntax keyword mushFlag NOSPOOF OPAQUE QUIET STICKY TRACE UNFINDABLE VISUAL syntax keyword mushFlag WIZARD PARENT_OK ZONE AUDIBLE CONNECTED DESTROY_OK syntax keyword mushFlag ENTER_OK HALTED IMMORTAL LIGHT MYOPIC PUPPET TERSE syntax keyword mushFlag ROBOT SAFE TRANSPARENT VERBOSE CONTROL_OK COMMANDS syntax keyword mushAttribute aahear aclone aconnect adesc adfail adisconnect syntax keyword mushAttribute adrop aefail aenter afail agfail ahear akill syntax keyword mushAttribute aleave alfail alias amhear amove apay arfail syntax keyword mushAttribute asucc atfail atport aufail ause away charges syntax keyword mushAttribute cost desc dfail drop ealias efail enter fail syntax keyword mushAttribute filter forwardlist gfail idesc idle infilter syntax keyword mushAttribute inprefix kill lalias last lastsite leave lfail syntax keyword mushAttribute listen move odesc odfail odrop oefail oenter syntax keyword mushAttribute ofail ogfail okill oleave olfail omove opay syntax keyword mushAttribute orfail osucc otfail otport oufail ouse oxenter syntax keyword mushAttribute oxleave oxtport pay prefix reject rfail runout syntax keyword mushAttribute semaphore sex startup succ tfail tport ufail syntax keyword mushAttribute use va vb vc vd ve vf vg vh vi vj vk vl vm vn syntax keyword mushAttribute vo vp vq vr vs vt vu vv vw vx vy vz " The default methods for highlighting. Can be overridden later hi def link mushAttribute Constant hi def link mushCommand Function hi def link mushNumber Number hi def link mushSetting PreProc hi def link mushFunction Statement hi def link mushVariable Identifier hi def link mushSpecial Special hi def link mushTodo Todo hi def link mushFlag Special hi def link mushIdentifier Identifier hi def link mushDefine Macro hi def link mushPreProc PreProc hi def link mushPreProcGroup PreProc hi def link mushPreCondit PreCondit hi def link mushIncluded cString hi def link mushInclude Include " Comments hi def link mushCommentStart mushComment hi def link mushComment Comment hi def link mushCommentString mushString let b:current_syntax = "mush" " mush: ts=17 neovim-0.2.2/runtime/syntax/muttrc.vim000066400000000000000000001750671320401574200200720ustar00rootroot00000000000000" Vim syntax file " Language: Mutt setup files " Original: Preben 'Peppe' Guldberg " Maintainer: Kyle Wheeler " Last Change: 18 August 2016 " This file covers mutt version 1.7.0 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Set the keyword characters setlocal isk=@,48-57,_,- " handling optional variables if !exists("use_mutt_sidebar") let use_mutt_sidebar=0 endif syn match muttrcComment "^# .*$" contains=@Spell syn match muttrcComment "^#[^ ].*$" syn match muttrcComment "^#$" syn match muttrcComment "[^\\]#.*$"lc=1 " Escape sequences (back-tick and pipe goes here too) syn match muttrcEscape +\\[#tnr"'Cc ]+ syn match muttrcEscape +[`|]+ syn match muttrcEscape +\\$+ " The variables takes the following arguments "syn match muttrcString contained "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape syn region muttrcString contained keepend start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcCommand,muttrcAction,muttrcShellString syn region muttrcString contained keepend start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcCommand,muttrcAction syn match muttrcStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcString,muttrcStringNL syn region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand syn match muttrcRXChars contained /[^\\][][.*?+]\+/hs=s+1 syn match muttrcRXChars contained /[][|()][.*?+]*/ syn match muttrcRXChars contained /['"]^/ms=s+1 syn match muttrcRXChars contained /$['"]/me=e-1 syn match muttrcRXChars contained /\\/ " Why does muttrcRXString2 work with one \ when muttrcRXString requires two? syn region muttrcRXString contained skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars syn region muttrcRXString contained skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars syn region muttrcRXString contained skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXChars " For some reason, skip refuses to match backslashes here... syn region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXChars syn region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXChars syn region muttrcRXString2 contained skipwhite start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars syn region muttrcRXString2 contained skipwhite start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars " these must be kept synchronized with muttrcRXString, but are intended for " muttrcRXHooks syn region muttrcRXHookString contained keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syn region muttrcRXHookString contained keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syn region muttrcRXHookString contained keepend skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syn region muttrcRXHookString contained keepend skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syn region muttrcRXHookString contained keepend matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syn match muttrcRXHookStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcRXHookString,muttrcRXHookStringNL " these are exclusively for args lists (e.g. -rx pat pat pat ...) syn region muttrcRXPat contained keepend skipwhite start=+'+ skip=+\\'+ end=+'\s*+ contains=muttrcRXString nextgroup=muttrcRXPat syn region muttrcRXPat contained keepend skipwhite start=+"+ skip=+\\"+ end=+"\s*+ contains=muttrcRXString nextgroup=muttrcRXPat syn match muttrcRXPat contained /[^-'"#!]\S\+/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat syn match muttrcRXDef contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat syn match muttrcSpecial +\(['"]\)!\1+ syn match muttrcSetStrAssignment contained skipwhite /=\s*\%(\\\?\$\)\?[0-9A-Za-z_-]\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable syn region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*"+hs=s+1 end=+"+ skip=+\\"+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcString syn region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*'+hs=s+1 end=+'+ skip=+\\'+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcString syn match muttrcSetBoolAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable syn match muttrcSetBoolAssignment contained skipwhite /=\s*\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetBoolAssignment contained skipwhite /=\s*"\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetBoolAssignment contained skipwhite /=\s*'\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetQuadAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable syn match muttrcSetQuadAssignment contained skipwhite /=\s*\%(ask-\)\?\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetQuadAssignment contained skipwhite /=\s*"\%(ask-\)\?\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetQuadAssignment contained skipwhite /=\s*'\%(ask-\)\?\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetNumAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable syn match muttrcSetNumAssignment contained skipwhite /=\s*\d\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetNumAssignment contained skipwhite /=\s*"\d\+"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetNumAssignment contained skipwhite /=\s*'\d\+'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr " Now catch some email addresses and headers (purified version from mail.vim) syn match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+" syn match muttrcHeader "\<\c\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\=" syn match muttrcKeySpecial contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+ syn match muttrcKey contained "\S\+" contains=muttrcKeySpecial,muttrcKeyName syn region muttrcKey contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=muttrcKeySpecial,muttrcKeyName syn region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=muttrcKeySpecial,muttrcKeyName syn match muttrcKeyName contained "\" syn match muttrcKeyName contained "\\[trne]" syn match muttrcKeyName contained "\c<\%(BackSpace\|BackTab\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" syn match muttrcKeyName contained "" syn keyword muttrcVarBool skipwhite contained \ allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split \ auto_tag autoedit beep beep_new bounce_delivered braille_friendly \ check_mbox_size check_new collapse_unread confirmappend confirmcreate \ crypt_autoencrypt crypt_autopgp crypt_autosign crypt_autosmime \ crypt_confirmhook crypt_opportunistic_encrypt crypt_replyencrypt \ crypt_replysign crypt_replysignencrypted crypt_timestamp crypt_use_gpgme \ crypt_use_pka delete_untag digest_collapse duplicate_threads edit_hdrs \ edit_headers encode_from envelope_from fast_reply fcc_clear followup_to \ force_name forw_decode forw_decrypt forw_quote forward_decode forward_decrypt \ forward_quote hdrs header help hidden_host hide_limited hide_missing \ hide_thread_subject hide_top_limited hide_top_missing honor_disposition \ idn_decode idn_encode ignore_linear_white_space ignore_list_reply_to \ imap_check_subscribed imap_list_subscribed imap_passive imap_peek \ imap_servernoise implicit_autoview include_onlyfirst keep_flagged \ mail_check_recent mail_check_stats mailcap_sanitize maildir_check_cur \ maildir_header_cache_verify maildir_trash mark_old markers menu_move_off \ menu_scroll message_cache_clean meta_key metoo mh_purge mime_forward_decode \ narrow_tree pager_stop pgp_auto_decode pgp_auto_traditional pgp_autoencrypt \ pgp_autoinline pgp_autosign pgp_check_exit pgp_create_traditional \ pgp_ignore_subkeys pgp_long_ids pgp_replyencrypt pgp_replyinline pgp_replysign \ pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable pgp_strict_enc \ pgp_use_gpg_agent pipe_decode pipe_split pop_auth_try_all pop_last \ postpone_encrypt postpone_encrypt_as print_decode print_split prompt_after \ read_only reflow_space_quotes reflow_text reflow_wrap reply_self resolve \ resume_draft_files resume_edited_draft_files reverse_alias reverse_name \ reverse_realname rfc2047_parameters save_address save_empty save_name score \ sidebar_folder_indent sidebar_new_mail_only sidebar_next_new_wrap \ sidebar_short_path sidebar_sort sidebar_visible sig_dashes sig_on_top \ smart_wrap smime_ask_cert_label smime_decrypt_use_default_key smime_is_default \ sort_re ssl_force_tls ssl_use_sslv2 ssl_use_sslv3 ssl_use_tlsv1 \ ssl_usesystemcerts ssl_verify_dates ssl_verify_host status_on_top strict_mime \ strict_threads suspend text_flowed thorough_search thread_received tilde \ ts_enabled uncollapse_jump use_8bitmime use_domain use_envelope_from use_from \ use_idn use_ipv6 user_agent wait_key weed wrap_search write_bcc \ nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained \ noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc noattach_split \ noauto_tag noautoedit nobeep nobeep_new nobounce_delivered nobraille_friendly \ nocheck_mbox_size nocheck_new nocollapse_unread noconfirmappend noconfirmcreate \ nocrypt_autoencrypt nocrypt_autopgp nocrypt_autosign nocrypt_autosmime \ nocrypt_confirmhook nocrypt_opportunistic_encrypt nocrypt_replyencrypt \ nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp nocrypt_use_gpgme \ nocrypt_use_pka nodelete_untag nodigest_collapse noduplicate_threads noedit_hdrs \ noedit_headers noencode_from noenvelope_from nofast_reply nofcc_clear nofollowup_to \ noforce_name noforw_decode noforw_decrypt noforw_quote noforward_decode noforward_decrypt \ noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nohide_missing \ nohide_thread_subject nohide_top_limited nohide_top_missing nohonor_disposition \ noidn_decode noidn_encode noignore_linear_white_space noignore_list_reply_to \ noimap_check_subscribed noimap_list_subscribed noimap_passive noimap_peek \ noimap_servernoise noimplicit_autoview noinclude_onlyfirst nokeep_flagged \ nomail_check_recent nomail_check_stats nomailcap_sanitize nomaildir_check_cur \ nomaildir_header_cache_verify nomaildir_trash nomark_old nomarkers nomenu_move_off \ nomenu_scroll nomessage_cache_clean nometa_key nometoo nomh_purge nomime_forward_decode \ nonarrow_tree nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt \ nopgp_autoinline nopgp_autosign nopgp_check_exit nopgp_create_traditional \ nopgp_ignore_subkeys nopgp_long_ids nopgp_replyencrypt nopgp_replyinline nopgp_replysign \ nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable nopgp_strict_enc \ nopgp_use_gpg_agent nopipe_decode nopipe_split nopop_auth_try_all nopop_last \ nopostpone_encrypt nopostpone_encrypt_as noprint_decode noprint_split noprompt_after \ noread_only noreflow_space_quotes noreflow_text noreflow_wrap noreply_self noresolve \ noresume_draft_files noresume_edited_draft_files noreverse_alias noreverse_name \ noreverse_realname norfc2047_parameters nosave_address nosave_empty nosave_name noscore \ nosidebar_folder_indent nosidebar_new_mail_only nosidebar_next_new_wrap \ nosidebar_short_path nosidebar_sort nosidebar_visible nosig_dashes nosig_on_top \ nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key nosmime_is_default \ nosort_re nossl_force_tls nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1 \ nossl_usesystemcerts nossl_verify_dates nossl_verify_host nostatus_on_top nostrict_mime \ nostrict_threads nosuspend notext_flowed nothorough_search nothread_received notilde \ nots_enabled nouncollapse_jump nouse_8bitmime nouse_domain nouse_envelope_from nouse_from \ nouse_idn nouse_ipv6 nouser_agent nowait_key noweed nowrap_search nowrite_bcc \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained \ invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc invaskcc invattach_split \ invauto_tag invautoedit invbeep invbeep_new invbounce_delivered invbraille_friendly \ invcheck_mbox_size invcheck_new invcollapse_unread invconfirmappend invconfirmcreate \ invcrypt_autoencrypt invcrypt_autopgp invcrypt_autosign invcrypt_autosmime \ invcrypt_confirmhook invcrypt_opportunistic_encrypt invcrypt_replyencrypt \ invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp invcrypt_use_gpgme \ invcrypt_use_pka invdelete_untag invdigest_collapse invduplicate_threads invedit_hdrs \ invedit_headers invencode_from invenvelope_from invfast_reply invfcc_clear invfollowup_to \ invforce_name invforw_decode invforw_decrypt invforw_quote invforward_decode invforward_decrypt \ invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited invhide_missing \ invhide_thread_subject invhide_top_limited invhide_top_missing invhonor_disposition \ invidn_decode invidn_encode invignore_linear_white_space invignore_list_reply_to \ invimap_check_subscribed invimap_list_subscribed invimap_passive invimap_peek \ invimap_servernoise invimplicit_autoview invinclude_onlyfirst invkeep_flagged \ invmail_check_recent invmail_check_stats invmailcap_sanitize invmaildir_check_cur \ invmaildir_header_cache_verify invmaildir_trash invmark_old invmarkers invmenu_move_off \ invmenu_scroll invmessage_cache_clean invmeta_key invmetoo invmh_purge invmime_forward_decode \ invnarrow_tree invpager_stop invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt \ invpgp_autoinline invpgp_autosign invpgp_check_exit invpgp_create_traditional \ invpgp_ignore_subkeys invpgp_long_ids invpgp_replyencrypt invpgp_replyinline invpgp_replysign \ invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable invpgp_strict_enc \ invpgp_use_gpg_agent invpipe_decode invpipe_split invpop_auth_try_all invpop_last \ invpostpone_encrypt invpostpone_encrypt_as invprint_decode invprint_split invprompt_after \ invread_only invreflow_space_quotes invreflow_text invreflow_wrap invreply_self invresolve \ invresume_draft_files invresume_edited_draft_files invreverse_alias invreverse_name \ invreverse_realname invrfc2047_parameters invsave_address invsave_empty invsave_name invscore \ invsidebar_folder_indent invsidebar_new_mail_only invsidebar_next_new_wrap \ invsidebar_short_path invsidebar_sort invsidebar_visible invsig_dashes invsig_on_top \ invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key invsmime_is_default \ invsort_re invssl_force_tls invssl_use_sslv2 invssl_use_sslv3 invssl_use_tlsv1 \ invssl_usesystemcerts invssl_verify_dates invssl_verify_host invstatus_on_top invstrict_mime \ invstrict_threads invsuspend invtext_flowed invthorough_search invthread_received invtilde \ invts_enabled invuncollapse_jump invuse_8bitmime invuse_domain invuse_envelope_from invuse_from \ invuse_idn invuse_ipv6 invuser_agent invwait_key invweed invwrap_search invwrite_bcc \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained \ abort_nosubject abort_unmodified bounce copy crypt_verify_sig delete \ fcc_attach forward_edit honor_followup_to include mime_forward \ mime_forward_rest mime_fwd move pgp_mime_auto pgp_verify_sig pop_delete \ pop_reconnect postpone print quit recall reply_to ssl_starttls \ nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained \ noabort_nosubject noabort_unmodified nobounce nocopy nocrypt_verify_sig nodelete \ nofcc_attach noforward_edit nohonor_followup_to noinclude nomime_forward \ nomime_forward_rest nomime_fwd nomove nopgp_mime_auto nopgp_verify_sig nopop_delete \ nopop_reconnect nopostpone noprint noquit norecall noreply_to nossl_starttls \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained \ invabort_nosubject invabort_unmodified invbounce invcopy invcrypt_verify_sig invdelete \ invfcc_attach invforward_edit invhonor_followup_to invinclude invmime_forward \ invmime_forward_rest invmime_fwd invmove invpgp_mime_auto invpgp_verify_sig invpop_delete \ invpop_reconnect invpostpone invprint invquit invrecall invreply_to invssl_starttls \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained \ connect_timeout history imap_keepalive imap_pipeline_depth mail_check \ mail_check_stats_interval menu_context net_inc pager_context pager_index_lines \ pgp_timeout pop_checkinterval read_inc save_history score_threshold_delete \ score_threshold_flag score_threshold_read search_context sendmail_wait \ sidebar_width sleep_time smime_timeout ssl_min_dh_prime_bits time_inc timeout \ wrap wrap_headers wrapmargin write_inc \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcFormatErrors contained /%./ syn match muttrcStrftimeEscapes contained /%[AaBbCcDdeFGgHhIjklMmnpRrSsTtUuVvWwXxYyZz+%]/ syn match muttrcStrftimeEscapes contained /%E[cCxXyY]/ syn match muttrcStrftimeEscapes contained /%O[BdeHImMSuUVwWy]/ syn region muttrcIndexFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcQueryFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcAliasFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcAliasFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcAttachFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcAttachFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcComposeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcComposeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcFolderFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcFolderFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcMixFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcMixFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPCmdFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPCmdFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcStatusFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcStatusFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPGetKeysFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPGetKeysFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcSmimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcSmimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcStrftimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcStrftimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr " The following info was pulled from hdr_format_str in hdrline.c syn match muttrcIndexFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[aAbBcCdDeEfFHilLmMnNOPsStTuvXyYZ%]/ syn match muttrcIndexFormatEscapes contained /%[>|*]./ syn match muttrcIndexFormatConditionals contained /%?[EFHlLMNOXyY]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from alias_format_str in addrbook.c syn match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[afnrt%]/ " The following info was pulled from query_format_str in query.c syn match muttrcQueryFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acent%]/ syn match muttrcQueryFormatConditionals contained /%?[e]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from mutt_attach_fmt in recvattach.c syn match muttrcAttachFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CcDdefImMnQstTuX%]/ syn match muttrcAttachFormatEscapes contained /%[>|*]./ syn match muttrcAttachFormatConditionals contained /%?[CcdDefInmMQstTuX]?/ nextgroup=muttrcFormatConditionals2 syn match muttrcFormatConditionals2 contained /[^?]*?/ " The following info was pulled from compose_format_str in compose.c syn match muttrcComposeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ahlv%]/ syn match muttrcComposeFormatEscapes contained /%[>|*]./ " The following info was pulled from folder_format_str in browser.c syn match muttrcFolderFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CDdfFglNstu%]/ syn match muttrcFolderFormatEscapes contained /%[>|*]./ syn match muttrcFolderFormatConditionals contained /%?[N]?/ " The following info was pulled from mix_entry_fmt in remailer.c syn match muttrcMixFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ncsa%]/ syn match muttrcMixFormatConditionals contained /%?[ncsa]?/ " The following info was pulled from crypt_entry_fmt in crypt-gpgme.c " and pgp_entry_fmt in pgpkey.c (note that crypt_entry_fmt supports " 'p', but pgp_entry_fmt does not). syn match muttrcPGPFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[nkualfctp%]/ syn match muttrcPGPFormatConditionals contained /%?[nkualfct]?/ " The following info was pulled from _mutt_fmt_pgp_command in " pgpinvoke.c syn match muttrcPGPCmdFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[pfsar%]/ syn match muttrcPGPCmdFormatConditionals contained /%?[pfsar]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from status_format_str in status.c syn match muttrcStatusFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[bdfFhlLmMnopPrsStuvV%]/ syn match muttrcStatusFormatEscapes contained /%[>|*]./ syn match muttrcStatusFormatConditionals contained /%?[bdFlLmMnoptuV]?/ nextgroup=muttrcFormatConditionals2 " This matches the documentation, but directly contradicts the code " (according to the code, this should be identical to the " muttrcPGPCmdFormatEscapes syn match muttrcPGPGetKeysFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[r%]/ " The following info was pulled from _mutt_fmt_smime_command in " smime.c syn match muttrcSmimeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[Cciskaf%]/ syn match muttrcSmimeFormatConditionals contained /%?[Cciskaf]?/ nextgroup=muttrcFormatConditionals2 syn region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes syn region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes syn region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes syn region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes syn region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes syn keyword muttrcVarStr contained skipwhite attribution index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt syn match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr syn keyword muttrcVarStr contained skipwhite alias_format nextgroup=muttrcVarEqualsAliasFmt syn match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr syn keyword muttrcVarStr contained skipwhite attach_format nextgroup=muttrcVarEqualsAttachFmt syn match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr syn keyword muttrcVarStr contained skipwhite compose_format nextgroup=muttrcVarEqualsComposeFmt syn match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr syn keyword muttrcVarStr contained skipwhite folder_format nextgroup=muttrcVarEqualsFolderFmt syn match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr syn keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt syn match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr syn keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt syn match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr syn keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFmt syn match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr syn keyword muttrcVarStr contained skipwhite pgp_decode_command pgp_verify_command pgp_decrypt_command pgp_clearsign_command pgp_sign_command pgp_encrypt_sign_command pgp_encrypt_only_command pgp_import_command pgp_export_command pgp_verify_key_command pgp_list_secring_command pgp_list_pubring_command nextgroup=muttrcVarEqualsPGPCmdFmt syn match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr syn keyword muttrcVarStr contained skipwhite ts_icon_format ts_status_format status_format nextgroup=muttrcVarEqualsStatusFmt syn match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr syn keyword muttrcVarStr contained skipwhite pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt syn match muttrcVarEqualsPGPGetKeysFmt contained skipwhite "=" nextgroup=muttrcPGPGetKeysFormatStr syn keyword muttrcVarStr contained skipwhite smime_decrypt_command smime_verify_command smime_verify_opaque_command smime_sign_command smime_sign_opaque_command smime_encrypt_command smime_pk7out_command smime_get_cert_command smime_get_signer_cert_command smime_import_cert_command smime_get_cert_email_command nextgroup=muttrcVarEqualsSmimeFmt syn match muttrcVarEqualsSmimeFmt contained skipwhite "=" nextgroup=muttrcSmimeFormatStr syn keyword muttrcVarStr contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFmt syn match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStrftimeFormatStr syn match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite \ alias_file assumed_charset attach_charset attach_sep certificate_file charset \ config_charset content_type default_hook display_filter dotlock_program \ dsn_notify dsn_return editor entropy_file envelope_from_address escape folder \ forw_format forward_format from gecos_mask hdr_format header_cache \ header_cache_compress header_cache_pagesize history_file hostname \ imap_authenticators imap_delim_chars imap_headers imap_idle imap_login \ imap_pass imap_user indent_str indent_string ispell locale mailcap_path mask \ mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied mh_seq_unseen \ mixmaster msg_format pager pgp_decryption_okay pgp_good_sign \ pgp_mime_signature_description pgp_mime_signature_filename pgp_sign_as \ pgp_sort_keys pipe_sep pop_authenticators pop_host pop_pass pop_user \ post_indent_str post_indent_string postpone_encrypt_as postponed preconnect \ print_cmd print_command query_command quote_regexp realname record \ reply_regexp send_charset sendmail shell sidebar_delim sidebar_delim_chars \ sidebar_divider_char sidebar_format sidebar_indent_string sidebar_sort_method \ signature simple_search smileys smime_ca_location smime_certificates \ smime_default_key smime_encrypt_with smime_keys smime_sign_as \ smime_sign_digest_alg smtp_authenticators smtp_pass smtp_url sort sort_alias \ sort_aux sort_browser spam_separator spoolfile ssl_ca_certificates_file \ ssl_ciphers ssl_client_cert status_chars tmpdir to_chars trash ts_icon_format \ ts_status_format tunnel visual \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr " Present in 1.4.2.1 (pgp_create_traditional was a bool then) syn keyword muttrcVarBool contained skipwhite imap_force_ssl noimap_force_ssl invimap_force_ssl nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr "syn keyword muttrcVarQuad contained pgp_create_traditional nopgp_create_traditional invpgp_create_traditional syn keyword muttrcVarStr contained skipwhite alternates nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcMenu contained alias attach browser compose editor index pager postpone pgp mix query generic syn match muttrcMenuList "\S\+" contained contains=muttrcMenu syn match muttrcMenuCommas /,/ contained syn keyword muttrcHooks contained skipwhite account-hook charset-hook iconv-hook message-hook folder-hook mbox-hook save-hook fcc-hook fcc-save-hook send-hook send2-hook reply-hook crypt-hook syn keyword muttrcCommand skipwhite \ alternative_order auto_view exec hdr_order iconv-hook ignore mailboxes \ mailto_allow mime_lookup my_hdr pgp-hook push score sidebar_whitelist source \ unalternative_order unalternative_order unauto_view ungroup unhdr_order \ unignore unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore syn keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString syn keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks syn keyword muttrcCommand skipwhite spam nextgroup=muttrcSpamPattern syn region muttrcSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL syn region muttrcSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL syn keyword muttrcCommand skipwhite nospam nextgroup=muttrcNoSpamPattern syn region muttrcNoSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern syn region muttrcNoSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern syn match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType syn match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType syn match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag syn match muttrcUnHighlightSpace contained "\%(\s\+\|\\$\)" syn keyword muttrcAsterisk contained * syn keyword muttrcListsKeyword lists skipwhite nextgroup=muttrcGroupDef,muttrcComment syn keyword muttrcListsKeyword unlists skipwhite nextgroup=muttrcAsterisk,muttrcComment syn keyword muttrcSubscribeKeyword subscribe nextgroup=muttrcGroupDef,muttrcComment syn keyword muttrcSubscribeKeyword unsubscribe nextgroup=muttrcAsterisk,muttrcComment syn keyword muttrcAlternateKeyword contained alternates unalternates syn region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment " muttrcVariable includes a prefix because partial strings are considered " valid. syn match muttrcVariable contained "\\\@]\+" contains=muttrcEmail syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|purge\|recall\|resend\|save\|send\|tag\|undelete\)-message\>" syn match muttrcFunction contained "\<\%(delete\|next\|previous\|read\|tag\|break\|undelete\)-thread\>" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>" syn match muttrcFunction contained "\<\%(delete\|filter\|first\|last\|next\|pipe\|previous\|print\|save\|select\|tag\|undelete\)-entry\>" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>" syn keyword muttrcFunction contained imap-logout-all if use_mutt_sidebar == 1 syn match muttrcFunction contained "\]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName syn keyword muttrcCommand set skipwhite nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcCommand unset skipwhite nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcCommand reset skipwhite nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcCommand toggle skipwhite nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr " First, functions that take regular expressions: syn match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL syn match muttrcRXHooks /\<\%(account\|folder\)-hook\>/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL " Now, functions that take patterns syn match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern syn match muttrcPatHooks /\<\%(mbox\|crypt\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern syn match muttrcPatHooks /\<\%(message\|reply\|send\|send2\|save\|\|fcc\%(-save\)\?\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern syn match muttrcBindFunction contained /\S\+\>/ skipwhite contains=muttrcFunction syn match muttrcBindFunctionNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL syn match muttrcBindKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL syn match muttrcBindKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindKey,muttrcBindKeyNL syn match muttrcBindMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcBindKey,muttrcBindKeyNL syn match muttrcBindMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL syn keyword muttrcCommand skipwhite bind nextgroup=muttrcBindMenuList,muttrcBindMenuListNL syn region muttrcMacroDescr contained keepend skipwhite start=+\s*\S+ms=e skip=+\\ + end=+ \|$+me=s syn region muttrcMacroDescr contained keepend skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s syn region muttrcMacroDescr contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s syn match muttrcMacroDescrNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL syn region muttrcMacroBody contained skipwhite start="\S" skip='\\ \|\\$' end=' \|$' contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+'+ms=e skip=+\\'+ end=+'\|\%(\%(\\\\\)\@]\+>/ contains=muttrcEmail nextgroup=muttrcAliasComma syn match muttrcAliasEncEmailNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL syn match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL syn region muttrcAliasName contained matchgroup=Type start=/(/ end=/)/ skipwhite syn match muttrcAliasNameNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL syn match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL syn match muttrcAliasKey contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL syn match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL syn keyword muttrcCommand skipwhite alias nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL syn match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL syn match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL syn keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrcUnAliasNL syn match muttrcSimplePat contained "!\?\^\?[~][ADEFgGklNOpPQRSTuUvV=$]" syn match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[0-9]\+[kM]\?[-]\%([0-9]\+[kM]\?\)\?\)" syn match muttrcSimplePat contained "!\?\^\?[~][dr]\s*\%(\%(-\?[0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)\|\%(\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)-\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)\?\)\?\)\|\%([<>=][0-9]\+[ymwd]\)\|\%(`[^`]\+`\)\|\%(\$[a-zA-Z0-9_-]\+\)\)" contains=muttrcShellString,muttrcVariable syn match muttrcSimplePat contained "!\?\^\?[~][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatRXContainer syn match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString syn match muttrcSimplePat contained "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString syn region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat "syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXString syn region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+ syn region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+ syn region muttrcSimplePatString contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 syn region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXString syn region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXString syn region muttrcSimplePatRXContainer contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 contains=muttrcRXString syn match muttrcSimplePatMetas contained /[(|)]/ syn match muttrcOptSimplePat contained skipwhite /[~=%!(^].*/ contains=muttrcSimplePat,muttrcSimplePatMetas syn match muttrcOptSimplePat contained skipwhite /[^~=%!(^].*/ contains=muttrcRXString syn region muttrcOptPattern contained matchgroup=Type keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL syn region muttrcOptPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL syn region muttrcOptPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL syn match muttrcOptPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL syn match muttrcOptPattern contained skipwhite /[.]/ nextgroup=muttrcString,muttrcStringNL " Keep muttrcPattern and muttrcOptPattern synchronized syn region muttrcPattern contained matchgroup=Type keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syn region muttrcPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syn region muttrcPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat syn match muttrcPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat syn match muttrcPattern contained skipwhite /[.]/ syn region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syn region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas " Colour definitions takes object, foreground and background arguments (regexps excluded). syn match muttrcColorMatchCount contained "[0-9]\+" syn match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syn region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syn region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syn keyword muttrcColorField skipwhite contained \ attachment body bold error hdrdefault header index indicator markers message \ normal prompt quoted search sidebar-divider sidebar-flagged sidebar-highlight \ sidebar-indicator sidebar-new sidebar-spoolfile signature status tilde tree \ underline syn match muttrcColorField contained "\" if use_mutt_sidebar == 1 syn keyword muttrcColorField contained sidebar_new endif syn keyword muttrcColor contained black blue cyan default green magenta red white yellow syn keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow syn match muttrcColor contained "\<\%(bright\)\=color\d\{1,3}\>" " Now for the structure of the color line syn match muttrcColorRXNL contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL syn match muttrcColorBG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL syn match muttrcColorBGNL contained skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL syn match muttrcColorFG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL syn match muttrcColorFGNL contained skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL syn match muttrcColorContext contained /\s*[$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorFG,muttrcColorFGNL syn match muttrcColorNL contained skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL syn match muttrcColorKeyword contained /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL syn region muttrcColorLine keepend start=/^\s*color\s\+\%(index\|header\)\@!/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace " Now for the structure of the color index line syn match muttrcPatternNL contained skipnl "\s*\\$" nextgroup=muttrcPattern,muttrcPatternNL syn match muttrcColorBGI contained /\s*[$]\?\w\+\s*/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcPattern,muttrcPatternNL syn match muttrcColorBGNLI contained skipnl "\s*\\$" nextgroup=muttrcColorBGI,muttrcColorBGNLI syn match muttrcColorFGI contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBGI,muttrcColorBGNLI syn match muttrcColorFGNLI contained skipnl "\s*\\$" nextgroup=muttrcColorFGI,muttrcColorFGNLI syn match muttrcColorContextI contained /\s*\/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGI,muttrcColorFGNLI syn match muttrcColorNLI contained skipnl "\s*\\$" nextgroup=muttrcColorContextI,muttrcColorNLI syn match muttrcColorKeywordI contained skipwhite /\/ nextgroup=muttrcColorContextI,muttrcColorNLI syn region muttrcColorLine keepend skipwhite start=/\/ skip=+\\$+ end=+$+ contains=muttrcColorKeywordI,muttrcComment,muttrcUnHighlightSpace " Now for the structure of the color header line syn match muttrcRXPatternNL contained skipnl "\s*\\$" nextgroup=muttrcRXString,muttrcRXPatternNL syn match muttrcColorBGH contained /\s*[$]\?\w\+\s*/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcRXString,muttrcRXPatternNL syn match muttrcColorBGNLH contained skipnl "\s*\\$" nextgroup=muttrcColorBGH,muttrcColorBGNLH syn match muttrcColorFGH contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBGH,muttrcColorBGNLH syn match muttrcColorFGNLH contained skipnl "\s*\\$" nextgroup=muttrcColorFGH,muttrcColorFGNLH syn match muttrcColorContextH contained /\s*\/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGH,muttrcColorFGNLH syn match muttrcColorNLH contained skipnl "\s*\\$" nextgroup=muttrcColorContextH,muttrcColorNLH syn match muttrcColorKeywordH contained skipwhite /\/ nextgroup=muttrcColorContextH,muttrcColorNLH syn region muttrcColorLine keepend skipwhite start=/\/ skip=+\\$+ end=+$+ contains=muttrcColorKeywordH,muttrcComment,muttrcUnHighlightSpace " And now color's brother: syn region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syn region muttrcUnColorPatterns contained skipwhite start=+\s*"+ end=+"+ skip=+\\"+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syn match muttrcUnColorPatterns contained skipwhite /\s*[^'"\s]\S\*/ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syn match muttrcUnColorPatNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syn match muttrcUnColorAll contained skipwhite /[*]/ syn match muttrcUnColorAPNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL syn match muttrcUnColorIndex contained skipwhite /\s*index\s\+/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL syn match muttrcUnColorIndexNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL syn match muttrcUnColorKeyword contained skipwhite /^\s*uncolor\s\+/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL syn region muttrcUnColorLine keepend start=+^\s*uncolor\s+ skip=+\\$+ end=+$+ contains=muttrcUnColorKeyword,muttrcComment,muttrcUnHighlightSpace " Mono are almost like color (ojects inherited from color) syn keyword muttrcMonoAttrib contained bold none normal reverse standout underline syn keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField syn match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link muttrcComment Comment hi def link muttrcEscape SpecialChar hi def link muttrcRXChars SpecialChar hi def link muttrcString String hi def link muttrcRXString String hi def link muttrcRXString2 String hi def link muttrcSpecial Special hi def link muttrcHooks Type hi def link muttrcGroupFlag Type hi def link muttrcGroupDef Macro hi def link muttrcAddrDef muttrcGroupFlag hi def link muttrcRXDef muttrcGroupFlag hi def link muttrcRXPat String hi def link muttrcAliasGroupName Macro hi def link muttrcAliasKey Identifier hi def link muttrcUnAliasKey Identifier hi def link muttrcAliasEncEmail Identifier hi def link muttrcAliasParens Type hi def link muttrcSetNumAssignment Number hi def link muttrcSetBoolAssignment Boolean hi def link muttrcSetQuadAssignment Boolean hi def link muttrcSetStrAssignment String hi def link muttrcEmail Special hi def link muttrcVariableInner Special hi def link muttrcEscapedVariable String hi def link muttrcHeader Type hi def link muttrcKeySpecial SpecialChar hi def link muttrcKey Type hi def link muttrcKeyName SpecialChar hi def link muttrcVarBool Identifier hi def link muttrcVarQuad Identifier hi def link muttrcVarNum Identifier hi def link muttrcVarStr Identifier hi def link muttrcMenu Identifier hi def link muttrcCommand Keyword hi def link muttrcMacroDescr String hi def link muttrcAction Macro hi def link muttrcBadAction Error hi def link muttrcBindFunction Error hi def link muttrcBindMenuList Error hi def link muttrcFunction Macro hi def link muttrcGroupKeyword muttrcCommand hi def link muttrcGroupLine Error hi def link muttrcSubscribeKeyword muttrcCommand hi def link muttrcSubscribeLine Error hi def link muttrcListsKeyword muttrcCommand hi def link muttrcListsLine Error hi def link muttrcAlternateKeyword muttrcCommand hi def link muttrcAlternatesLine Error hi def link muttrcAttachmentsLine muttrcCommand hi def link muttrcAttachmentsFlag Type hi def link muttrcAttachmentsMimeType String hi def link muttrcColorLine Error hi def link muttrcColorContext Error hi def link muttrcColorContextI Identifier hi def link muttrcColorContextH Identifier hi def link muttrcColorKeyword muttrcCommand hi def link muttrcColorKeywordI muttrcColorKeyword hi def link muttrcColorKeywordH muttrcColorKeyword hi def link muttrcColorField Identifier hi def link muttrcColor Type hi def link muttrcColorFG Error hi def link muttrcColorFGI Error hi def link muttrcColorFGH Error hi def link muttrcColorBG Error hi def link muttrcColorBGI Error hi def link muttrcColorBGH Error hi def link muttrcMonoAttrib muttrcColor hi def link muttrcMono muttrcCommand hi def link muttrcSimplePat Identifier hi def link muttrcSimplePatString Macro hi def link muttrcSimplePatMetas Special hi def link muttrcPattern Error hi def link muttrcUnColorLine Error hi def link muttrcUnColorKeyword muttrcCommand hi def link muttrcUnColorIndex Identifier hi def link muttrcShellString muttrcEscape hi def link muttrcRXHooks muttrcCommand hi def link muttrcRXHookNot Type hi def link muttrcPatHooks muttrcCommand hi def link muttrcPatHookNot Type hi def link muttrcFormatConditionals2 Type hi def link muttrcIndexFormatStr muttrcString hi def link muttrcIndexFormatEscapes muttrcEscape hi def link muttrcIndexFormatConditionals muttrcFormatConditionals2 hi def link muttrcAliasFormatStr muttrcString hi def link muttrcAliasFormatEscapes muttrcEscape hi def link muttrcAttachFormatStr muttrcString hi def link muttrcAttachFormatEscapes muttrcEscape hi def link muttrcAttachFormatConditionals muttrcFormatConditionals2 hi def link muttrcComposeFormatStr muttrcString hi def link muttrcComposeFormatEscapes muttrcEscape hi def link muttrcFolderFormatStr muttrcString hi def link muttrcFolderFormatEscapes muttrcEscape hi def link muttrcFolderFormatConditionals muttrcFormatConditionals2 hi def link muttrcMixFormatStr muttrcString hi def link muttrcMixFormatEscapes muttrcEscape hi def link muttrcMixFormatConditionals muttrcFormatConditionals2 hi def link muttrcPGPFormatStr muttrcString hi def link muttrcPGPFormatEscapes muttrcEscape hi def link muttrcPGPFormatConditionals muttrcFormatConditionals2 hi def link muttrcPGPCmdFormatStr muttrcString hi def link muttrcPGPCmdFormatEscapes muttrcEscape hi def link muttrcPGPCmdFormatConditionals muttrcFormatConditionals2 hi def link muttrcStatusFormatStr muttrcString hi def link muttrcStatusFormatEscapes muttrcEscape hi def link muttrcStatusFormatConditionals muttrcFormatConditionals2 hi def link muttrcPGPGetKeysFormatStr muttrcString hi def link muttrcPGPGetKeysFormatEscapes muttrcEscape hi def link muttrcSmimeFormatStr muttrcString hi def link muttrcSmimeFormatEscapes muttrcEscape hi def link muttrcSmimeFormatConditionals muttrcFormatConditionals2 hi def link muttrcTimeEscapes muttrcEscape hi def link muttrcPGPTimeEscapes muttrcEscape hi def link muttrcStrftimeEscapes Type hi def link muttrcStrftimeFormatStr muttrcString hi def link muttrcFormatErrors Error hi def link muttrcBindFunctionNL SpecialChar hi def link muttrcBindKeyNL SpecialChar hi def link muttrcBindMenuListNL SpecialChar hi def link muttrcMacroDescrNL SpecialChar hi def link muttrcMacroBodyNL SpecialChar hi def link muttrcMacroKeyNL SpecialChar hi def link muttrcMacroMenuListNL SpecialChar hi def link muttrcColorMatchCountNL SpecialChar hi def link muttrcColorNL SpecialChar hi def link muttrcColorRXNL SpecialChar hi def link muttrcColorBGNL SpecialChar hi def link muttrcColorFGNL SpecialChar hi def link muttrcAliasNameNL SpecialChar hi def link muttrcAliasENNL SpecialChar hi def link muttrcAliasNL SpecialChar hi def link muttrcUnAliasNL SpecialChar hi def link muttrcAliasGroupDefNL SpecialChar hi def link muttrcAliasEncEmailNL SpecialChar hi def link muttrcPatternNL SpecialChar hi def link muttrcUnColorPatNL SpecialChar hi def link muttrcUnColorAPNL SpecialChar hi def link muttrcUnColorIndexNL SpecialChar hi def link muttrcStringNL SpecialChar let b:current_syntax = "muttrc" let &cpo = s:cpo_save unlet s:cpo_save "EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim neovim-0.2.2/runtime/syntax/mysql.vim000066400000000000000000000423111320401574200177020ustar00rootroot00000000000000" Vim syntax file " Language: mysql " Maintainer: Kenneth J. Pronovici " Last Change: $LastChangedDate: 2016-04-11 10:31:04 -0500 (Mon, 11 Apr 2016) $ " Filenames: *.mysql " URL: ftp://cedar-solutions.com/software/mysql.vim " Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Always ignore case syn case ignore " General keywords which don't fall into other categories syn keyword mysqlKeyword action add after aggregate all alter as asc auto_increment avg_row_length syn keyword mysqlKeyword both by syn keyword mysqlKeyword cascade change character check checksum column columns comment constraint create cross syn keyword mysqlKeyword current_date current_time current_timestamp syn keyword mysqlKeyword data database databases day day_hour day_minute day_second syn keyword mysqlKeyword default delayed delay_key_write delete desc describe distinct distinctrow drop syn keyword mysqlKeyword enclosed escape escaped explain syn keyword mysqlKeyword fields file first flush for foreign from full function syn keyword mysqlKeyword global grant grants group syn keyword mysqlKeyword having heap high_priority hosts hour hour_minute hour_second syn keyword mysqlKeyword identified ignore index infile inner insert insert_id into isam syn keyword mysqlKeyword join syn keyword mysqlKeyword key keys kill last_insert_id leading left limit lines load local lock logs long syn keyword mysqlKeyword low_priority syn keyword mysqlKeyword match max_rows middleint min_rows minute minute_second modify month myisam syn keyword mysqlKeyword natural no syn keyword mysqlKeyword on optimize option optionally order outer outfile syn keyword mysqlKeyword pack_keys partial password primary privileges procedure process processlist syn keyword mysqlKeyword read references reload rename replace restrict returns revoke right row rows syn keyword mysqlKeyword second select show shutdown soname sql_big_result sql_big_selects sql_big_tables sql_log_off syn keyword mysqlKeyword sql_log_update sql_low_priority_updates sql_select_limit sql_small_result sql_warnings starting syn keyword mysqlKeyword status straight_join string syn keyword mysqlKeyword table tables temporary terminated to trailing type syn keyword mysqlKeyword unique unlock unsigned update usage use using syn keyword mysqlKeyword values varbinary variables varying syn keyword mysqlKeyword where with write syn keyword mysqlKeyword year_month syn keyword mysqlKeyword zerofill " Special values syn keyword mysqlSpecial false null true " Strings (single- and double-quote) syn region mysqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region mysqlString start=+'+ skip=+\\\\\|\\'+ end=+'+ " Numbers and hexidecimal values syn match mysqlNumber "-\=\<[0-9]*\>" syn match mysqlNumber "-\=\<[0-9]*\.[0-9]*\>" syn match mysqlNumber "-\=\<[0-9][0-9]*e[+-]\=[0-9]*\>" syn match mysqlNumber "-\=\<[0-9]*\.[0-9]*e[+-]\=[0-9]*\>" syn match mysqlNumber "\<0x[abcdefABCDEF0-9]*\>" " User variables syn match mysqlVariable "@\a*[A-Za-z0-9]*\([._]*[A-Za-z0-9]\)*" " Escaped column names syn match mysqlEscaped "`[^`]*`" " Comments (c-style, mysql-style and modified sql-style) syn region mysqlComment start="/\*" end="\*/" syn match mysqlComment "#.*" syn match mysqlComment "--\_s.*" syn sync ccomment mysqlComment " Column types " " This gets a bit ugly. There are two different problems we have to " deal with. " " The first problem is that some keywords like 'float' can be used " both with and without specifiers, i.e. 'float', 'float(1)' and " 'float(@var)' are all valid. We have to account for this and we " also have to make sure that garbage like floatn or float_(1) is not " highlighted. " " The second problem is that some of these keywords are included in " function names. For instance, year() is part of the name of the " dayofyear() function, and the dec keyword (no parenthesis) is part of " the name of the decode() function. syn keyword mysqlType tinyint smallint mediumint int integer bigint syn keyword mysqlType date datetime time bit bool syn keyword mysqlType tinytext mediumtext longtext text syn keyword mysqlType tinyblob mediumblob longblob blob syn region mysqlType start="float\W" end="."me=s-1 syn region mysqlType start="float$" end="."me=s-1 syn region mysqlType start="float(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="double\W" end="."me=s-1 syn region mysqlType start="double$" end="."me=s-1 syn region mysqlType start="double(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="double precision\W" end="."me=s-1 syn region mysqlType start="double precision$" end="."me=s-1 syn region mysqlType start="double precision(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="real\W" end="."me=s-1 syn region mysqlType start="real$" end="."me=s-1 syn region mysqlType start="real(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="numeric(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="dec\W" end="."me=s-1 syn region mysqlType start="dec$" end="."me=s-1 syn region mysqlType start="dec(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="decimal\W" end="."me=s-1 syn region mysqlType start="decimal$" end="."me=s-1 syn region mysqlType start="decimal(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="\Wtimestamp\W" end="."me=s-1 syn region mysqlType start="\Wtimestamp$" end="."me=s-1 syn region mysqlType start="\Wtimestamp(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="^timestamp\W" end="."me=s-1 syn region mysqlType start="^timestamp$" end="."me=s-1 syn region mysqlType start="^timestamp(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="\Wyear(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="^year(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="char(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="varchar(" end=")" contains=mysqlNumber,mysqlVariable syn region mysqlType start="enum(" end=")" contains=mysqlString,mysqlVariable syn region mysqlType start="\Wset(" end=")" contains=mysqlString,mysqlVariable syn region mysqlType start="^set(" end=")" contains=mysqlString,mysqlVariable " Logical, string and numeric operators syn keyword mysqlOperator between not and or is in like regexp rlike binary exists syn region mysqlOperator start="isnull(" end=")" contains=ALL syn region mysqlOperator start="coalesce(" end=")" contains=ALL syn region mysqlOperator start="interval(" end=")" contains=ALL " Control flow functions syn keyword mysqlFlow case when then else end syn region mysqlFlow start="ifnull(" end=")" contains=ALL syn region mysqlFlow start="nullif(" end=")" contains=ALL syn region mysqlFlow start="if(" end=")" contains=ALL " General Functions " " I'm leery of just defining keywords for functions, since according to the MySQL manual: " " Function names do not clash with table or column names. For example, ABS is a " valid column name. The only restriction is that for a function call, no spaces " are allowed between the function name and the `(' that follows it. " " This means that if I want to highlight function names properly, I have to use a " region to define them, not just a keyword. This will probably cause the syntax file " to load more slowly, but at least it will be 'correct'. syn region mysqlFunction start="abs(" end=")" contains=ALL syn region mysqlFunction start="acos(" end=")" contains=ALL syn region mysqlFunction start="adddate(" end=")" contains=ALL syn region mysqlFunction start="ascii(" end=")" contains=ALL syn region mysqlFunction start="asin(" end=")" contains=ALL syn region mysqlFunction start="atan(" end=")" contains=ALL syn region mysqlFunction start="atan2(" end=")" contains=ALL syn region mysqlFunction start="avg(" end=")" contains=ALL syn region mysqlFunction start="benchmark(" end=")" contains=ALL syn region mysqlFunction start="bin(" end=")" contains=ALL syn region mysqlFunction start="bit_and(" end=")" contains=ALL syn region mysqlFunction start="bit_count(" end=")" contains=ALL syn region mysqlFunction start="bit_or(" end=")" contains=ALL syn region mysqlFunction start="ceiling(" end=")" contains=ALL syn region mysqlFunction start="character_length(" end=")" contains=ALL syn region mysqlFunction start="char_length(" end=")" contains=ALL syn region mysqlFunction start="concat(" end=")" contains=ALL syn region mysqlFunction start="concat_ws(" end=")" contains=ALL syn region mysqlFunction start="connection_id(" end=")" contains=ALL syn region mysqlFunction start="conv(" end=")" contains=ALL syn region mysqlFunction start="cos(" end=")" contains=ALL syn region mysqlFunction start="cot(" end=")" contains=ALL syn region mysqlFunction start="count(" end=")" contains=ALL syn region mysqlFunction start="curdate(" end=")" contains=ALL syn region mysqlFunction start="curtime(" end=")" contains=ALL syn region mysqlFunction start="date_add(" end=")" contains=ALL syn region mysqlFunction start="date_format(" end=")" contains=ALL syn region mysqlFunction start="date_sub(" end=")" contains=ALL syn region mysqlFunction start="dayname(" end=")" contains=ALL syn region mysqlFunction start="dayofmonth(" end=")" contains=ALL syn region mysqlFunction start="dayofweek(" end=")" contains=ALL syn region mysqlFunction start="dayofyear(" end=")" contains=ALL syn region mysqlFunction start="decode(" end=")" contains=ALL syn region mysqlFunction start="degrees(" end=")" contains=ALL syn region mysqlFunction start="elt(" end=")" contains=ALL syn region mysqlFunction start="encode(" end=")" contains=ALL syn region mysqlFunction start="encrypt(" end=")" contains=ALL syn region mysqlFunction start="exp(" end=")" contains=ALL syn region mysqlFunction start="export_set(" end=")" contains=ALL syn region mysqlFunction start="extract(" end=")" contains=ALL syn region mysqlFunction start="field(" end=")" contains=ALL syn region mysqlFunction start="find_in_set(" end=")" contains=ALL syn region mysqlFunction start="floor(" end=")" contains=ALL syn region mysqlFunction start="format(" end=")" contains=ALL syn region mysqlFunction start="from_days(" end=")" contains=ALL syn region mysqlFunction start="from_unixtime(" end=")" contains=ALL syn region mysqlFunction start="get_lock(" end=")" contains=ALL syn region mysqlFunction start="greatest(" end=")" contains=ALL syn region mysqlFunction start="group_unique_users(" end=")" contains=ALL syn region mysqlFunction start="hex(" end=")" contains=ALL syn region mysqlFunction start="inet_aton(" end=")" contains=ALL syn region mysqlFunction start="inet_ntoa(" end=")" contains=ALL syn region mysqlFunction start="instr(" end=")" contains=ALL syn region mysqlFunction start="lcase(" end=")" contains=ALL syn region mysqlFunction start="least(" end=")" contains=ALL syn region mysqlFunction start="length(" end=")" contains=ALL syn region mysqlFunction start="load_file(" end=")" contains=ALL syn region mysqlFunction start="locate(" end=")" contains=ALL syn region mysqlFunction start="log(" end=")" contains=ALL syn region mysqlFunction start="log10(" end=")" contains=ALL syn region mysqlFunction start="lower(" end=")" contains=ALL syn region mysqlFunction start="lpad(" end=")" contains=ALL syn region mysqlFunction start="ltrim(" end=")" contains=ALL syn region mysqlFunction start="make_set(" end=")" contains=ALL syn region mysqlFunction start="master_pos_wait(" end=")" contains=ALL syn region mysqlFunction start="max(" end=")" contains=ALL syn region mysqlFunction start="md5(" end=")" contains=ALL syn region mysqlFunction start="mid(" end=")" contains=ALL syn region mysqlFunction start="min(" end=")" contains=ALL syn region mysqlFunction start="mod(" end=")" contains=ALL syn region mysqlFunction start="monthname(" end=")" contains=ALL syn region mysqlFunction start="now(" end=")" contains=ALL syn region mysqlFunction start="oct(" end=")" contains=ALL syn region mysqlFunction start="octet_length(" end=")" contains=ALL syn region mysqlFunction start="ord(" end=")" contains=ALL syn region mysqlFunction start="period_add(" end=")" contains=ALL syn region mysqlFunction start="period_diff(" end=")" contains=ALL syn region mysqlFunction start="pi(" end=")" contains=ALL syn region mysqlFunction start="position(" end=")" contains=ALL syn region mysqlFunction start="pow(" end=")" contains=ALL syn region mysqlFunction start="power(" end=")" contains=ALL syn region mysqlFunction start="quarter(" end=")" contains=ALL syn region mysqlFunction start="radians(" end=")" contains=ALL syn region mysqlFunction start="rand(" end=")" contains=ALL syn region mysqlFunction start="release_lock(" end=")" contains=ALL syn region mysqlFunction start="repeat(" end=")" contains=ALL syn region mysqlFunction start="reverse(" end=")" contains=ALL syn region mysqlFunction start="round(" end=")" contains=ALL syn region mysqlFunction start="rpad(" end=")" contains=ALL syn region mysqlFunction start="rtrim(" end=")" contains=ALL syn region mysqlFunction start="sec_to_time(" end=")" contains=ALL syn region mysqlFunction start="session_user(" end=")" contains=ALL syn region mysqlFunction start="sign(" end=")" contains=ALL syn region mysqlFunction start="sin(" end=")" contains=ALL syn region mysqlFunction start="soundex(" end=")" contains=ALL syn region mysqlFunction start="space(" end=")" contains=ALL syn region mysqlFunction start="sqrt(" end=")" contains=ALL syn region mysqlFunction start="std(" end=")" contains=ALL syn region mysqlFunction start="stddev(" end=")" contains=ALL syn region mysqlFunction start="strcmp(" end=")" contains=ALL syn region mysqlFunction start="subdate(" end=")" contains=ALL syn region mysqlFunction start="substring(" end=")" contains=ALL syn region mysqlFunction start="substring_index(" end=")" contains=ALL syn region mysqlFunction start="subtime(" end=")" contains=ALL syn region mysqlFunction start="sum(" end=")" contains=ALL syn region mysqlFunction start="sysdate(" end=")" contains=ALL syn region mysqlFunction start="system_user(" end=")" contains=ALL syn region mysqlFunction start="tan(" end=")" contains=ALL syn region mysqlFunction start="time_format(" end=")" contains=ALL syn region mysqlFunction start="time_to_sec(" end=")" contains=ALL syn region mysqlFunction start="to_days(" end=")" contains=ALL syn region mysqlFunction start="trim(" end=")" contains=ALL syn region mysqlFunction start="ucase(" end=")" contains=ALL syn region mysqlFunction start="unique_users(" end=")" contains=ALL syn region mysqlFunction start="unix_timestamp(" end=")" contains=ALL syn region mysqlFunction start="upper(" end=")" contains=ALL syn region mysqlFunction start="user(" end=")" contains=ALL syn region mysqlFunction start="version(" end=")" contains=ALL syn region mysqlFunction start="week(" end=")" contains=ALL syn region mysqlFunction start="weekday(" end=")" contains=ALL syn region mysqlFunction start="yearweek(" end=")" contains=ALL " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link mysqlKeyword Statement hi def link mysqlSpecial Special hi def link mysqlString String hi def link mysqlNumber Number hi def link mysqlVariable Identifier hi def link mysqlComment Comment hi def link mysqlType Type hi def link mysqlOperator Statement hi def link mysqlFlow Statement hi def link mysqlFunction Function let b:current_syntax = "mysql" neovim-0.2.2/runtime/syntax/n1ql.vim000066400000000000000000000311431320401574200174110ustar00rootroot00000000000000" Vim syntax file " Language: N1QL / Couchbase Server " Maintainer: Eugene Ciurana " Version: 1.0 " Source: https://github.com/pr3d4t0r/n1ql-vim-syntax " " License: Vim is Charityware. n1ql.vim syntax is Charityware. " (c) Copyright 2017 by Eugene Ciurana / pr3d4t0r. Licensed " under the standard VIM LICENSE - Vim command :help uganda.txt " for details. " " Questions, comments: " https://ciurana.eu/pgp, https://keybase.io/pr3d4t0r " " vim: set fileencoding=utf-8: if exists("b:current_syntax") finish endif syn case ignore syn keyword n1qlSpecial DATASTORES syn keyword n1qlSpecial DUAL syn keyword n1qlSpecial FALSE syn keyword n1qlSpecial INDEXES syn keyword n1qlSpecial KEYSPACES syn keyword n1qlSpecial MISSING syn keyword n1qlSpecial NAMESPACES syn keyword n1qlSpecial NULL syn keyword n1qlSpecial TRUE " " *** keywords *** " syn keyword n1qlKeyword ALL syn keyword n1qlKeyword ANY syn keyword n1qlKeyword ASC syn keyword n1qlKeyword BEGIN syn keyword n1qlKeyword BETWEEN syn keyword n1qlKeyword BREAK syn keyword n1qlKeyword BUCKET syn keyword n1qlKeyword CALL syn keyword n1qlKeyword CASE syn keyword n1qlKeyword CAST syn keyword n1qlKeyword CLUSTER syn keyword n1qlKeyword COLLATE syn keyword n1qlKeyword COLLECTION syn keyword n1qlKeyword CONNECT syn keyword n1qlKeyword CONTINUE syn keyword n1qlKeyword CORRELATE syn keyword n1qlKeyword COVER syn keyword n1qlKeyword DATABASE syn keyword n1qlKeyword DATASET syn keyword n1qlKeyword DATASTORE syn keyword n1qlKeyword DECLARE syn keyword n1qlKeyword DECREMENT syn keyword n1qlKeyword DERIVED syn keyword n1qlKeyword DESC syn keyword n1qlKeyword DESCRIBE syn keyword n1qlKeyword DO syn keyword n1qlKeyword EACH syn keyword n1qlKeyword ELEMENT syn keyword n1qlKeyword ELSE syn keyword n1qlKeyword END syn keyword n1qlKeyword EVERY syn keyword n1qlKeyword EXCLUDE syn keyword n1qlKeyword EXISTS syn keyword n1qlKeyword FETCH syn keyword n1qlKeyword FIRST syn keyword n1qlKeyword FLATTEN syn keyword n1qlKeyword FOR syn keyword n1qlKeyword FORCE syn keyword n1qlKeyword FROM syn keyword n1qlKeyword FUNCTION syn keyword n1qlKeyword GROUP syn keyword n1qlKeyword GSI syn keyword n1qlKeyword HAVING syn keyword n1qlKeyword IF syn keyword n1qlKeyword IGNORE syn keyword n1qlKeyword INCLUDE syn keyword n1qlKeyword INCREMENT syn keyword n1qlKeyword INDEX syn keyword n1qlKeyword INITIAL syn keyword n1qlKeyword INLINE syn keyword n1qlKeyword INNER syn keyword n1qlKeyword INTO syn keyword n1qlKeyword KEY syn keyword n1qlKeyword KEYS syn keyword n1qlKeyword KEYSPACE syn keyword n1qlKeyword KNOWN syn keyword n1qlKeyword LAST syn keyword n1qlKeyword LET syn keyword n1qlKeyword LETTING syn keyword n1qlKeyword LIMIT syn keyword n1qlKeyword LOOP syn keyword n1qlKeyword LSM syn keyword n1qlKeyword MAP syn keyword n1qlKeyword MAPPING syn keyword n1qlKeyword MATCHED syn keyword n1qlKeyword MATERIALIZED syn keyword n1qlKeyword MERGE syn keyword n1qlKeyword NAMESPACE syn keyword n1qlKeyword NEST syn keyword n1qlKeyword OPTION syn keyword n1qlKeyword ORDER syn keyword n1qlKeyword OUTER syn keyword n1qlKeyword OVER syn keyword n1qlKeyword PARSE syn keyword n1qlKeyword PARTITION syn keyword n1qlKeyword PASSWORD syn keyword n1qlKeyword PATH syn keyword n1qlKeyword POOL syn keyword n1qlKeyword PRIMARY syn keyword n1qlKeyword PRIVATE syn keyword n1qlKeyword PRIVILEGE syn keyword n1qlKeyword PROCEDURE syn keyword n1qlKeyword PUBLIC syn keyword n1qlKeyword REALM syn keyword n1qlKeyword REDUCE syn keyword n1qlKeyword RETURN syn keyword n1qlKeyword RETURNING syn keyword n1qlKeyword ROLE syn keyword n1qlKeyword SATISFIES syn keyword n1qlKeyword SCHEMA syn keyword n1qlKeyword SELF syn keyword n1qlKeyword SEMI syn keyword n1qlKeyword SHOW syn keyword n1qlKeyword START syn keyword n1qlKeyword STATISTICS syn keyword n1qlKeyword SYSTEM syn keyword n1qlKeyword THEN syn keyword n1qlKeyword TRANSACTION syn keyword n1qlKeyword TRIGGER syn keyword n1qlKeyword UNDER syn keyword n1qlKeyword UNKNOWN syn keyword n1qlKeyword UNSET syn keyword n1qlKeyword USE syn keyword n1qlKeyword USER syn keyword n1qlKeyword USING syn keyword n1qlKeyword VALIDATE syn keyword n1qlKeyword VALUE syn keyword n1qlKeyword VALUED syn keyword n1qlKeyword VALUES syn keyword n1qlKeyword VIEW syn keyword n1qlKeyword WHEN syn keyword n1qlKeyword WHERE syn keyword n1qlKeyword WHILE syn keyword n1qlKeyword WITHIN syn keyword n1qlKeyword WORK " " *** functions *** " syn keyword n1qlOperator ABS syn keyword n1qlOperator ACOS syn keyword n1qlOperator ARRAY_AGG syn keyword n1qlOperator ARRAY_APPEND syn keyword n1qlOperator ARRAY_AVG syn keyword n1qlOperator ARRAY_CONCAT syn keyword n1qlOperator ARRAY_CONTAINS syn keyword n1qlOperator ARRAY_COUNT syn keyword n1qlOperator ARRAY_DISTINCT syn keyword n1qlOperator ARRAY_FLATTEN syn keyword n1qlOperator ARRAY_IFNULL syn keyword n1qlOperator ARRAY_INSERT syn keyword n1qlOperator ARRAY_INTERSECT syn keyword n1qlOperator ARRAY_LENGTH syn keyword n1qlOperator ARRAY_MAX syn keyword n1qlOperator ARRAY_MIN syn keyword n1qlOperator ARRAY_POSITION syn keyword n1qlOperator ARRAY_PREPEND syn keyword n1qlOperator ARRAY_PUT syn keyword n1qlOperator ARRAY_RANGE syn keyword n1qlOperator ARRAY_REMOVE syn keyword n1qlOperator ARRAY_REPEAT syn keyword n1qlOperator ARRAY_REPLACE syn keyword n1qlOperator ARRAY_REVERSE syn keyword n1qlOperator ARRAY_SORT syn keyword n1qlOperator ARRAY_START syn keyword n1qlOperator ARRAY_SUM syn keyword n1qlOperator ARRAY_SYMDIFF syn keyword n1qlOperator ARRAY_UNION syn keyword n1qlOperator ASIN syn keyword n1qlOperator ATAN syn keyword n1qlOperator ATAN2 syn keyword n1qlOperator AVG syn keyword n1qlOperator BASE64 syn keyword n1qlOperator BASE64_DECODE syn keyword n1qlOperator BASE64_ENCODE syn keyword n1qlOperator CEIL syn keyword n1qlOperator CLOCK_LOCAL syn keyword n1qlOperator CLOCK_STR syn keyword n1qlOperator CLOCK_TZ syn keyword n1qlOperator CLOCK_UTC syn keyword n1qlOperator CLOCL_MILLIS syn keyword n1qlOperator CONTAINS syn keyword n1qlOperator COS syn keyword n1qlOperator COUNT syn keyword n1qlOperator DATE_ADD_MILLIS syn keyword n1qlOperator DATE_ADD_STR syn keyword n1qlOperator DATE_DIFF_MILLIS syn keyword n1qlOperator DATE_DIFF_STR syn keyword n1qlOperator DATE_FORMAT_STR syn keyword n1qlOperator DATE_PART_MILLIS syn keyword n1qlOperator DATE_PART_STR syn keyword n1qlOperator DATE_RANGE_MILLIS syn keyword n1qlOperator DATE_RANGE_STR syn keyword n1qlOperator DATE_TRUC_STR syn keyword n1qlOperator DATE_TRUNC_MILLIS syn keyword n1qlOperator DECODE_JSON syn keyword n1qlOperator DEGREES syn keyword n1qlOperator DURATION_TO_STR syn keyword n1qlOperator E syn keyword n1qlOperator ENCODED_SIZE syn keyword n1qlOperator ENCODE_JSON syn keyword n1qlOperator EXP syn keyword n1qlOperator FLOOR syn keyword n1qlOperator GREATEST syn keyword n1qlOperator IFINF syn keyword n1qlOperator IFMISSING syn keyword n1qlOperator IFMISSINGORNULL syn keyword n1qlOperator IFNAN syn keyword n1qlOperator IFNANORINF syn keyword n1qlOperator IFNULL syn keyword n1qlOperator INITCAP syn keyword n1qlOperator ISARRAY syn keyword n1qlOperator ISATOM syn keyword n1qlOperator ISBOOLEAN syn keyword n1qlOperator ISNUMBER syn keyword n1qlOperator ISOBJECT syn keyword n1qlOperator ISSTRING syn keyword n1qlOperator LEAST syn keyword n1qlOperator LENGTH syn keyword n1qlOperator LN syn keyword n1qlOperator LOG syn keyword n1qlOperator LOWER syn keyword n1qlOperator LTRIM syn keyword n1qlOperator MAX syn keyword n1qlOperator META syn keyword n1qlOperator MILLIS syn keyword n1qlOperator MILLIS_TO_LOCAL syn keyword n1qlOperator MILLIS_TO_STR syn keyword n1qlOperator MILLIS_TO_TZ syn keyword n1qlOperator MILLIS_TO_UTC syn keyword n1qlOperator MILLIS_TO_ZONE_NAME syn keyword n1qlOperator MIN syn keyword n1qlOperator MISSINGIF syn keyword n1qlOperator NANIF syn keyword n1qlOperator NEGINFIF syn keyword n1qlOperator NOW_LOCAL syn keyword n1qlOperator NOW_MILLIS syn keyword n1qlOperator NOW_STR syn keyword n1qlOperator NOW_TZ syn keyword n1qlOperator NOW_UTC syn keyword n1qlOperator NULLIF syn keyword n1qlOperator OBJECT_ADD syn keyword n1qlOperator OBJECT_CONCAT syn keyword n1qlOperator OBJECT_INNER_PAIRS syn keyword n1qlOperator OBJECT_INNER_VALUES syn keyword n1qlOperator OBJECT_LENGTH syn keyword n1qlOperator OBJECT_NAMES syn keyword n1qlOperator OBJECT_PAIRS syn keyword n1qlOperator OBJECT_PUT syn keyword n1qlOperator OBJECT_REMOVE syn keyword n1qlOperator OBJECT_RENAME syn keyword n1qlOperator OBJECT_REPLACE syn keyword n1qlOperator OBJECT_UNWRAP syn keyword n1qlOperator OBJECT_VALUES syn keyword n1qlOperator PI syn keyword n1qlOperator POLY_LENGTH syn keyword n1qlOperator POSINIF syn keyword n1qlOperator POSITION syn keyword n1qlOperator POWER syn keyword n1qlOperator RADIANS syn keyword n1qlOperator RANDOM syn keyword n1qlOperator REGEXP_CONTAINS syn keyword n1qlOperator REGEXP_LIKE syn keyword n1qlOperator REGEXP_POSITION syn keyword n1qlOperator REGEXP_REPLACE syn keyword n1qlOperator REPEAT syn keyword n1qlOperator REPLACE syn keyword n1qlOperator REVERSE syn keyword n1qlOperator ROUND syn keyword n1qlOperator RTRIM syn keyword n1qlOperator SIGN syn keyword n1qlOperator SIN syn keyword n1qlOperator SPLIT syn keyword n1qlOperator SQRT syn keyword n1qlOperator STR_TO_DURATION syn keyword n1qlOperator STR_TO_MILLIS syn keyword n1qlOperator STR_TO_TZ syn keyword n1qlOperator STR_TO_UTC syn keyword n1qlOperator STR_TO_ZONE_NAME syn keyword n1qlOperator SUBSTR syn keyword n1qlOperator SUFFIXES syn keyword n1qlOperator SUM syn keyword n1qlOperator TAN syn keyword n1qlOperator TITLE syn keyword n1qlOperator TOARRAY syn keyword n1qlOperator TOATOM syn keyword n1qlOperator TOBOOLEAN syn keyword n1qlOperator TOKENS syn keyword n1qlOperator TONUMBER syn keyword n1qlOperator TOOBJECT syn keyword n1qlOperator TOSTRING syn keyword n1qlOperator TRIM syn keyword n1qlOperator TRUNC syn keyword n1qlOperator TYPE syn keyword n1qlOperator UPPER syn keyword n1qlOperator UUID syn keyword n1qlOperator WEEKDAY_MILLIS syn keyword n1qlOperator WEEKDAY_STR " " *** operators *** " syn keyword n1qlOperator AND syn keyword n1qlOperator AS syn keyword n1qlOperator BY syn keyword n1qlOperator DISTINCT syn keyword n1qlOperator EXCEPT syn keyword n1qlOperator ILIKE syn keyword n1qlOperator IN syn keyword n1qlOperator INTERSECT syn keyword n1qlOperator IS syn keyword n1qlOperator JOIN syn keyword n1qlOperator LEFT syn keyword n1qlOperator LIKE syn keyword n1qlOperator MINUS syn keyword n1qlOperator NEST syn keyword n1qlOperator NESTING syn keyword n1qlOperator NOT syn keyword n1qlOperator OFFSET syn keyword n1qlOperator ON syn keyword n1qlOperator OR syn keyword n1qlOperator OUT syn keyword n1qlOperator RIGHT syn keyword n1qlOperator SOME syn keyword n1qlOperator TO syn keyword n1qlOperator UNION syn keyword n1qlOperator UNIQUE syn keyword n1qlOperator UNNEST syn keyword n1qlOperator VIA syn keyword n1qlOperator WITH syn keyword n1qlOperator XOR " " *** statements *** " syn keyword n1qlStatement ALTER syn keyword n1qlStatement ANALYZE syn keyword n1qlStatement BUILD syn keyword n1qlStatement COMMIT syn keyword n1qlStatement CREATE syn keyword n1qlStatement DELETE syn keyword n1qlStatement DROP syn keyword n1qlStatement EXECUTE syn keyword n1qlStatement EXPLAIN syn keyword n1qlStatement GRANT syn keyword n1qlStatement INFER syn keyword n1qlStatement INSERT syn keyword n1qlStatement MERGE syn keyword n1qlStatement PREPARE syn keyword n1qlStatement RENAME syn keyword n1qlStatement REVOKE syn keyword n1qlStatement ROLLBACK syn keyword n1qlStatement SELECT syn keyword n1qlStatement SET syn keyword n1qlStatement TRUNCATE syn keyword n1qlStatement UPDATE syn keyword n1qlStatement UPSERT " " *** types *** " syn keyword n1qlType ARRAY syn keyword n1qlType BINARY syn keyword n1qlType BOOLEAN syn keyword n1qlType NUMBER syn keyword n1qlType OBJECT syn keyword n1qlType RAW syn keyword n1qlType STRING " " *** strings and characters *** " syn region n1qlString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region n1qlString start=+'+ skip=+\\\\\|\\'+ end=+'+ syn region n1qlBucketSpec start=+`+ skip=+\\\\\|\\'+ end=+`+ " " *** numbers *** " syn match n1qlNumber "-\=\<\d*\.\=[0-9_]\>" " " *** comments *** " syn region n1qlComment start="/\*" end="\*/" contains=n1qlTODO syn match n1qlComment "--.*$" contains=n1qlTODO syn sync ccomment n1qlComment " " *** TODO *** " syn keyword n1qlTODO contained TODO FIXME XXX DEBUG NOTE " " *** enable *** " hi def link n1qlBucketSpec Underlined hi def link n1qlComment Comment hi def link n1qlKeyword Macro hi def link n1qlOperator Function hi def link n1qlSpecial Special hi def link n1qlStatement Statement hi def link n1qlString String hi def link n1qlTODO Todo hi def link n1qlType Type let b:current_syntax = "n1ql" neovim-0.2.2/runtime/syntax/named.vim000066400000000000000000000234071320401574200176260ustar00rootroot00000000000000" Vim syntax file " Language: BIND configuration file " Maintainer: Nick Hibma " Last change: 2007-01-30 " Filenames: named.conf, rndc.conf " Location: http://www.van-laarhoven.org/vim/syntax/named.vim " " Previously maintained by glory hump and updated by Marcin " Dalecki. " " This file could do with a lot of improvements, so comments are welcome. " Please submit the named.conf (segment) with any comments. " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match setlocal iskeyword=.,-,48-58,A-Z,a-z,_ syn sync match namedSync grouphere NONE "^(zone|controls|acl|key)" let s:save_cpo = &cpo set cpo-=C " BIND configuration file syn match namedComment "//.*" syn match namedComment "#.*" syn region namedComment start="/\*" end="\*/" syn region namedString start=/"/ end=/"/ contained " --- omitted trailing semicolon syn match namedError /[^;{#]$/ " --- top-level keywords syn keyword namedInclude include nextgroup=namedString skipwhite syn keyword namedKeyword acl key nextgroup=namedIntIdent skipwhite syn keyword namedKeyword server nextgroup=namedIdentifier skipwhite syn keyword namedKeyword controls nextgroup=namedSection skipwhite syn keyword namedKeyword trusted-keys nextgroup=namedIntSection skipwhite syn keyword namedKeyword logging nextgroup=namedLogSection skipwhite syn keyword namedKeyword options nextgroup=namedOptSection skipwhite syn keyword namedKeyword zone nextgroup=namedZoneString skipwhite " --- Identifier: name of following { ... } Section syn match namedIdentifier contained /\k\+/ nextgroup=namedSection skipwhite " --- IntIdent: name of following IntSection syn match namedIntIdent contained /"\=\k\+"\=/ nextgroup=namedIntSection skipwhite " --- Section: { ... } clause syn region namedSection contained start=+{+ end=+};+ contains=namedSection,namedIntKeyword " --- IntSection: section that does not contain other sections syn region namedIntSection contained start=+{+ end=+}+ contains=namedIntKeyword,namedError " --- IntKeyword: keywords contained within `{ ... }' sections only " + these keywords are contained within `key' and `acl' sections syn keyword namedIntKeyword contained key algorithm syn keyword namedIntKeyword contained secret nextgroup=namedString skipwhite " + these keywords are contained within `server' section only syn keyword namedIntKeyword contained bogus support-ixfr nextgroup=namedBool,namedNotBool skipwhite syn keyword namedIntKeyword contained transfers nextgroup=namedNumber,namedNotNumber skipwhite syn keyword namedIntKeyword contained transfer-format syn keyword namedIntKeyword contained keys nextgroup=namedIntSection skipwhite " + these keywords are contained within `controls' section only syn keyword namedIntKeyword contained inet nextgroup=namedIPaddr,namedIPerror skipwhite syn keyword namedIntKeyword contained unix nextgroup=namedString skipwhite syn keyword namedIntKeyword contained port perm owner group nextgroup=namedNumber,namedNotNumber skipwhite syn keyword namedIntKeyword contained allow nextgroup=namedIntSection skipwhite " + these keywords are contained within `update-policy' section only syn keyword namedIntKeyword contained grant nextgroup=namedString skipwhite syn keyword namedIntKeyword contained name self subdomain wildcard nextgroup=namedString skipwhite syn keyword namedIntKeyword TXT A PTR NS SOA A6 CNAME MX ANY skipwhite " --- options syn region namedOptSection contained start=+{+ end=+};+ contains=namedOption,namedCNOption,namedComment,namedParenError syn keyword namedOption contained version directory \ nextgroup=namedString skipwhite syn keyword namedOption contained named-xfer dump-file pid-file \ nextgroup=namedString skipwhite syn keyword namedOption contained mem-statistics-file statistics-file \ nextgroup=namedString skipwhite syn keyword namedOption contained auth-nxdomain deallocate-on-exit \ nextgroup=namedBool,namedNotBool skipwhite syn keyword namedOption contained dialup fake-iquery fetch-glue \ nextgroup=namedBool,namedNotBool skipwhite syn keyword namedOption contained has-old-clients host-statistics \ nextgroup=namedBool,namedNotBool skipwhite syn keyword namedOption contained maintain-ixfr-base multiple-cnames \ nextgroup=namedBool,namedNotBool skipwhite syn keyword namedOption contained notify recursion rfc2308-type1 \ nextgroup=namedBool,namedNotBool skipwhite syn keyword namedOption contained use-id-pool treat-cr-as-space \ nextgroup=namedBool,namedNotBool skipwhite syn keyword namedOption contained also-notify forwarders \ nextgroup=namedIPlist skipwhite syn keyword namedOption contained forward check-names syn keyword namedOption contained allow-query allow-transfer allow-recursion \ nextgroup=namedAML skipwhite syn keyword namedOption contained blackhole listen-on \ nextgroup=namedIntSection skipwhite syn keyword namedOption contained lame-ttl max-transfer-time-in \ nextgroup=namedNumber,namedNotNumber skipwhite syn keyword namedOption contained max-ncache-ttl min-roots \ nextgroup=namedNumber,namedNotNumber skipwhite syn keyword namedOption contained serial-queries transfers-in \ nextgroup=namedNumber,namedNotNumber skipwhite syn keyword namedOption contained transfers-out transfers-per-ns syn keyword namedOption contained transfer-format syn keyword namedOption contained transfer-source \ nextgroup=namedIPaddr,namedIPerror skipwhite syn keyword namedOption contained max-ixfr-log-size \ nextgroup=namedNumber,namedNotNumber skipwhite syn keyword namedOption contained coresize datasize files stacksize syn keyword namedOption contained cleaning-interval interface-interval statistics-interval heartbeat-interval \ nextgroup=namedNumber,namedNotNumber skipwhite syn keyword namedOption contained topology sortlist rrset-order \ nextgroup=namedIntSection skipwhite syn match namedOption contained /\/ nextgroup=namedSpareDot syn match namedDomain contained /"\."/ms=s+1,me=e-1 syn match namedSpareDot contained /\./ " --- syntax errors syn match namedIllegalDom contained /"\S*[^-A-Za-z0-9.[:space:]]\S*"/ms=s+1,me=e-1 syn match namedIPerror contained /\<\S*[^0-9.[:space:];]\S*/ syn match namedEParenError contained +{+ syn match namedParenError +}\([^;]\|$\)+ " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link namedComment Comment hi def link namedInclude Include hi def link namedKeyword Keyword hi def link namedIntKeyword Keyword hi def link namedIdentifier Identifier hi def link namedIntIdent Identifier hi def link namedString String hi def link namedBool Type hi def link namedNotBool Error hi def link namedNumber Number hi def link namedNotNumber Error hi def link namedOption namedKeyword hi def link namedLogOption namedKeyword hi def link namedCNOption namedKeyword hi def link namedQSKeywords Type hi def link namedCNKeywords Type hi def link namedLogCategory Type hi def link namedIPaddr Number hi def link namedDomain Identifier hi def link namedZoneOpt namedKeyword hi def link namedZoneType Type hi def link namedParenError Error hi def link namedEParenError Error hi def link namedIllegalDom Error hi def link namedIPerror Error hi def link namedSpareDot Error hi def link namedError Error let &cpo = s:save_cpo unlet s:save_cpo let b:current_syntax = "named" " vim: ts=17 neovim-0.2.2/runtime/syntax/nanorc.vim000066400000000000000000000245741320401574200200300ustar00rootroot00000000000000" Vim syntax file " Language: nanorc(5) - GNU nano configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword nanorcTodo contained TODO FIXME XXX NOTE syn region nanorcComment display oneline start='^\s*#' end='$' \ contains=nanorcTodo,@Spell syn match nanorcBegin display '^' \ nextgroup=nanorcKeyword,nanorcComment \ skipwhite syn keyword nanorcKeyword contained set unset \ nextgroup=nanorcBoolOption, \ nanorcStringOption,nanorcNumberOption \ skipwhite syn keyword nanorcKeyword contained syntax \ nextgroup=nanorcSynGroupName skipwhite syn keyword nanorcKeyword contained color \ nextgroup=@nanorcFGColor skipwhite syn keyword nanorcBoolOption contained autoindent backup const cut \ historylog morespace mouse multibuffer \ noconvert nofollow nohelp nowrap preserve \ rebinddelete regexp smarthome smooth suspend \ tempfile view syn keyword nanorcStringOption contained backupdir brackets operatingdir \ punct quotestr speller whitespace \ nextgroup=nanorcString skipwhite syn keyword nanorcNumberOption contained fill tabsize \ nextgroup=nanorcNumber skipwhite syn region nanorcSynGroupName contained display oneline start=+"+ \ end=+"\ze\%([[:blank:]]\|$\)+ \ nextgroup=nanorcRegexes skipwhite syn match nanorcString contained display '".*"' syn region nanorcRegexes contained display oneline start=+"+ \ end=+"\ze\%([[:blank:]]\|$\)+ \ nextgroup=nanorcRegexes skipwhite syn match nanorcNumber contained display '[+-]\=\<\d\+\>' syn cluster nanorcFGColor contains=nanorcFGWhite,nanorcFGBlack, \ nanorcFGRed,nanorcFGBlue,nanorcFGGreen, \ nanorcFGYellow,nanorcFGMagenta,nanorcFGCyan, \ nanorcFGBWhite,nanorcFGBBlack,nanorcFGBRed, \ nanorcFGBBlue,nanorcFGBGreen,nanorcFGBYellow, \ nanorcFGBMagenta,nanorcFGBCyan syn keyword nanorcFGWhite contained white \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBlack contained black \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGRed contained red \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBlue contained blue \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGGreen contained green \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGYellow contained yellow \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGMagenta contained magenta \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGCyan contained cyan \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBWhite contained brightwhite \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBBlack contained brightblack \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBRed contained brightred \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBBlue contained brightblue \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBGreen contained brightgreen \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBYellow contained brightyellow \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBMagenta contained brightmagenta \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBCyan contained brightcyan \ nextgroup=@nanorcFGSpec skipwhite syn cluster nanorcBGColor contains=nanorcBGWhite,nanorcBGBlack, \ nanorcBGRed,nanorcBGBlue,nanorcBGGreen, \ nanorcBGYellow,nanorcBGMagenta,nanorcBGCyan, \ nanorcBGBWhite,nanorcBGBBlack,nanorcBGBRed, \ nanorcBGBBlue,nanorcBGBGreen,nanorcBGBYellow, \ nanorcBGBMagenta,nanorcBGBCyan syn keyword nanorcBGWhite contained white \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBlack contained black \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGRed contained red \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBlue contained blue \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGGreen contained green \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGYellow contained yellow \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGMagenta contained magenta \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGCyan contained cyan \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBWhite contained brightwhite \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBBlack contained brightblack \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBRed contained brightred \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBBlue contained brightblue \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBGreen contained brightgreen \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBYellow contained brightyellow \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBMagenta contained brightmagenta \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBCyan contained brightcyan \ nextgroup=@nanorcBGSpec skipwhite syn match nanorcBGColorSep contained ',' nextgroup=@nanorcBGColor syn cluster nanorcFGSpec contains=nanorcBGColorSep,nanorcRegexes, \ nanorcStartRegion syn cluster nanorcBGSpec contains=nanorcRegexes,nanorcStartRegion syn keyword nanorcStartRegion contained start nextgroup=nanorcStartRegionEq syn match nanorcStartRegionEq contained '=' nextgroup=nanorcRegion syn region nanorcRegion contained display oneline start=+"+ \ end=+"\ze\%([[:blank:]]\|$\)+ \ nextgroup=nanorcEndRegion skipwhite syn keyword nanorcEndRegion contained end nextgroup=nanorcStartRegionEq syn match nanorcEndRegionEq contained '=' nextgroup=nanorcRegex syn region nanorcRegex contained display oneline start=+"+ \ end=+"\ze\%([[:blank:]]\|$\)+ hi def link nanorcTodo Todo hi def link nanorcComment Comment hi def link nanorcKeyword Keyword hi def link nanorcBoolOption Identifier hi def link nanorcStringOption Identifier hi def link nanorcNumberOption Identifier hi def link nanorcSynGroupName String hi def link nanorcString String hi def link nanorcRegexes nanorcString hi def link nanorcNumber Number hi def nanorcFGWhite ctermfg=Gray guifg=Gray hi def nanorcFGBlack ctermfg=Black guifg=Black hi def nanorcFGRed ctermfg=DarkRed guifg=DarkRed hi def nanorcFGBlue ctermfg=DarkBlue guifg=DarkBlue hi def nanorcFGGreen ctermfg=DarkGreen guifg=DarkGreen hi def nanorcFGYellow ctermfg=Brown guifg=Brown hi def nanorcFGMagenta ctermfg=DarkMagenta guifg=DarkMagenta hi def nanorcFGCyan ctermfg=DarkCyan guifg=DarkCyan hi def nanorcFGBWhite ctermfg=White guifg=White hi def nanorcFGBBlack ctermfg=DarkGray guifg=DarkGray hi def nanorcFGBRed ctermfg=Red guifg=Red hi def nanorcFGBBlue ctermfg=Blue guifg=Blue hi def nanorcFGBGreen ctermfg=Green guifg=Green hi def nanorcFGBYellow ctermfg=Yellow guifg=Yellow hi def nanorcFGBMagenta ctermfg=Magenta guifg=Magenta hi def nanorcFGBCyan ctermfg=Cyan guifg=Cyan hi def link nanorcBGColorSep Normal hi def nanorcBGWhite ctermbg=Gray guibg=Gray hi def nanorcBGBlack ctermbg=Black guibg=Black hi def nanorcBGRed ctermbg=DarkRed guibg=DarkRed hi def nanorcBGBlue ctermbg=DarkBlue guibg=DarkBlue hi def nanorcBGGreen ctermbg=DarkGreen guibg=DarkGreen hi def nanorcBGYellow ctermbg=Brown guibg=Brown hi def nanorcBGMagenta ctermbg=DarkMagenta guibg=DarkMagenta hi def nanorcBGCyan ctermbg=DarkCyan guibg=DarkCyan hi def nanorcBGBWhite ctermbg=White guibg=White hi def nanorcBGBBlack ctermbg=DarkGray guibg=DarkGray hi def nanorcBGBRed ctermbg=Red guibg=Red hi def nanorcBGBBlue ctermbg=Blue guibg=Blue hi def nanorcBGBGreen ctermbg=Green guibg=Green hi def nanorcBGBYellow ctermbg=Yellow guibg=Yellow hi def nanorcBGBMagenta ctermbg=Magenta guibg=Magenta hi def nanorcBGBCyan ctermbg=Cyan guibg=Cyan hi def link nanorcStartRegion Type hi def link nanorcStartRegionEq Operator hi def link nanorcRegion nanorcString hi def link nanorcEndRegion Type hi def link nanorcEndRegionEq Operator hi def link nanorcRegex nanoRegexes let b:current_syntax = "nanorc" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/nasm.vim000066400000000000000000000632551320401574200175050ustar00rootroot00000000000000" Vim syntax file " Language: NASM - The Netwide Assembler (v0.98) " Maintainer: Andrii Sokolov " Original Author: Manuel M.H. Stol " Former Maintainer: Manuel M.H. Stol " Contributors: Leonard König (C string highlighting) " Last Change: 2017 Jan 23 " NASM Home: http://www.nasm.us/ " Setup Syntax: " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Assembler syntax is case insensetive syn case ignore " Vim search and movement commands on identifers " Comments at start of a line inside which to skip search for indentifiers setlocal comments=:; " Identifier Keyword characters (defines \k) setlocal iskeyword=@,48-57,#,$,.,?,@-@,_,~ " Comments: syn region nasmComment start=";" keepend end="$" contains=@nasmGrpInComments syn region nasmSpecialComment start=";\*\*\*" keepend end="$" syn keyword nasmInCommentTodo contained TODO FIXME XXX[XXXXX] syn cluster nasmGrpInComments contains=nasmInCommentTodo syn cluster nasmGrpComments contains=@nasmGrpInComments,nasmComment,nasmSpecialComment " Label Identifiers: " in NASM: 'Everything is a Label' " Definition Label = label defined by %[i]define or %[i]assign " Identifier Label = label defined as first non-keyword on a line or %[i]macro syn match nasmLabelError "$\=\(\d\+\K\|[#.@]\|\$\$\k\)\k*\>" syn match nasmLabel "\<\(\h\|[?@]\)\k*\>" syn match nasmLabel "[\$\~]\(\h\|[?@]\)\k*\>"lc=1 " Labels starting with one or two '.' are special syn match nasmLocalLabel "\<\.\(\w\|[#$?@~]\)\k*\>" syn match nasmLocalLabel "\<\$\.\(\w\|[#$?@~]\)\k*\>"ms=s+1 if !exists("nasm_no_warn") syn match nasmLabelWarn "\<\~\=\$\=[_.][_.\~]*\>" endif if exists("nasm_loose_syntax") syn match nasmSpecialLabel "\<\.\.@\k\+\>" syn match nasmSpecialLabel "\<\$\.\.@\k\+\>"ms=s+1 if !exists("nasm_no_warn") syn match nasmLabelWarn "\<\$\=\.\.@\(\d\|[#$\.~]\)\k*\>" endif " disallow use of nasm internal label format syn match nasmLabelError "\<\$\=\.\.@\d\+\.\k*\>" else syn match nasmSpecialLabel "\<\.\.@\(\h\|[?@]\)\k*\>" syn match nasmSpecialLabel "\<\$\.\.@\(\h\|[?@]\)\k*\>"ms=s+1 endif " Labels can be dereferenced with '$' to destinguish them from reserved words syn match nasmLabelError "\<\$\K\k*\s*:" syn match nasmLabelError "^\s*\$\K\k*\>" syn match nasmLabelError "\<\~\s*\(\k*\s*:\|\$\=\.\k*\)" " Constants: syn match nasmStringError +["'`]+ " NASM is case sensitive here: eg. u-prefix allows for 4-digit, U-prefix for " 8-digit Unicode characters syn case match " one-char escape-sequences syn match nasmCStringEscape display contained "\\[’"‘\\\?abtnvfre]" " hex and octal numbers syn match nasmCStringEscape display contained "\\\(x\x\{2}\|\o\{1,3}\)" " Unicode characters syn match nasmCStringEscape display contained "\\\(u\x\{4}\|U\x\{8}\)" " ISO C99 format strings (copied from cFormat in runtime/syntax/c.vim) syn match nasmCStringFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained syn match nasmCStringFormat display "%%" contained syn match nasmString +\("[^"]\{-}"\|'[^']\{-}'\)+ " Highlight C escape- and format-sequences within ``-strings syn match nasmCString +\(`[^`]\{-}`\)+ contains=nasmCStringEscape,nasmCStringFormat extend syn case ignore syn match nasmBinNumber "\<[0-1]\+b\>" syn match nasmBinNumber "\<\~[0-1]\+b\>"lc=1 syn match nasmOctNumber "\<\o\+q\>" syn match nasmOctNumber "\<\~\o\+q\>"lc=1 syn match nasmDecNumber "\<\d\+\>" syn match nasmDecNumber "\<\~\d\+\>"lc=1 syn match nasmHexNumber "\<\(\d\x*h\|0x\x\+\|\$\d\x*\)\>" syn match nasmHexNumber "\<\~\(\d\x*h\|0x\x\+\|\$\d\x*\)\>"lc=1 syn match nasmFltNumber "\<\d\+\.\d*\(e[+-]\=\d\+\)\=\>" syn keyword nasmFltNumber Inf Infinity Indefinite NaN SNaN QNaN syn match nasmNumberError "\<\~\s*\d\+\.\d*\(e[+-]\=\d\+\)\=\>" " Netwide Assembler Storage Directives: " Storage types syn keyword nasmTypeError DF EXTRN FWORD RESF TBYTE syn keyword nasmType FAR NEAR SHORT syn keyword nasmType BYTE WORD DWORD QWORD DQWORD HWORD DHWORD TWORD syn keyword nasmType CDECL FASTCALL NONE PASCAL STDCALL syn keyword nasmStorage DB DW DD DQ DDQ DT syn keyword nasmStorage RESB RESW RESD RESQ RESDQ REST syn keyword nasmStorage EXTERN GLOBAL COMMON " Structured storage types syn match nasmTypeError "\<\(AT\|I\=\(END\)\=\(STRUCT\=\|UNION\)\|I\=END\)\>" syn match nasmStructureLabel contained "\<\(AT\|I\=\(END\)\=\(STRUCT\=\|UNION\)\|I\=END\)\>" " structures cannot be nested (yet) -> use: 'keepend' and 're=' syn cluster nasmGrpCntnStruc contains=ALLBUT,@nasmGrpInComments,nasmMacroDef,@nasmGrpInMacros,@nasmGrpInPreCondits,nasmStructureDef,@nasmGrpInStrucs syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*STRUCT\>"hs=e-5 end="^\s*ENDSTRUCT\>"re=e-9 contains=@nasmGrpCntnStruc syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*STRUC\>"hs=e-4 end="^\s*ENDSTRUC\>"re=e-8 contains=@nasmGrpCntnStruc syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="\" end="\" contains=@nasmGrpCntnStruc,nasmInStructure " union types are not part of nasm (yet) "syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnStruc "syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="\" end="\" contains=@nasmGrpCntnStruc,nasmInStructure syn match nasmInStructure contained "^\s*AT\>"hs=e-1 syn cluster nasmGrpInStrucs contains=nasmStructure,nasmInStructure,nasmStructureLabel " PreProcessor Instructions: " NAsm PreProcs start with %, but % is not a character syn match nasmPreProcError "%{\=\(%\=\k\+\|%%\+\k*\|[+-]\=\d\+\)}\=" if exists("nasm_loose_syntax") syn cluster nasmGrpNxtCtx contains=nasmStructureLabel,nasmLabel,nasmLocalLabel,nasmSpecialLabel,nasmLabelError,nasmPreProcError else syn cluster nasmGrpNxtCtx contains=nasmStructureLabel,nasmLabel,nasmLabelError,nasmPreProcError endif " Multi-line macro syn cluster nasmGrpCntnMacro contains=ALLBUT,@nasmGrpInComments,nasmStructureDef,@nasmGrpInStrucs,nasmMacroDef,@nasmGrpPreCondits,nasmMemReference,nasmInMacPreCondit,nasmInMacStrucDef syn region nasmMacroDef matchgroup=nasmMacro keepend start="^\s*%macro\>"hs=e-5 start="^\s*%imacro\>"hs=e-6 end="^\s*%endmacro\>"re=e-9 contains=@nasmGrpCntnMacro,nasmInMacStrucDef if exists("nasm_loose_syntax") syn match nasmInMacLabel contained "%\(%\k\+\>\|{%\k\+}\)" syn match nasmInMacLabel contained "%\($\+\(\w\|[#\.?@~]\)\k*\>\|{$\+\(\w\|[#\.?@~]\)\k*}\)" syn match nasmInMacPreProc contained "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=nasmStructureLabel,nasmLabel,nasmInMacParam,nasmLocalLabel,nasmSpecialLabel,nasmLabelError,nasmPreProcError if !exists("nasm_no_warn") syn match nasmInMacLblWarn contained "%\(%[$\.]\k*\>\|{%[$\.]\k*}\)" syn match nasmInMacLblWarn contained "%\($\+\(\d\|[#\.@~]\)\k*\|{\$\+\(\d\|[#\.@~]\)\k*}\)" hi link nasmInMacCatLabel nasmInMacLblWarn else hi link nasmInMacCatLabel nasmInMacLabel endif else syn match nasmInMacLabel contained "%\(%\(\w\|[#?@~]\)\k*\>\|{%\(\w\|[#?@~]\)\k*}\)" syn match nasmInMacLabel contained "%\($\+\(\h\|[?@]\)\k*\>\|{$\+\(\h\|[?@]\)\k*}\)" hi link nasmInMacCatLabel nasmLabelError endif syn match nasmInMacCatLabel contained "\d\K\k*"lc=1 syn match nasmInMacLabel contained "\d}\k\+"lc=2 if !exists("nasm_no_warn") syn match nasmInMacLblWarn contained "%\(\($\+\|%\)[_~][._~]*\>\|{\($\+\|%\)[_~][._~]*}\)" endif syn match nasmInMacPreProc contained "^\s*%pop\>"hs=e-3 syn match nasmInMacPreProc contained "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=@nasmGrpNxtCtx " structures cannot be nested (yet) -> use: 'keepend' and 're=' syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*STRUCT\>"hs=e-5 end="^\s*ENDSTRUCT\>"re=e-9 contains=@nasmGrpCntnMacro syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*STRUC\>"hs=e-4 end="^\s*ENDSTRUC\>"re=e-8 contains=@nasmGrpCntnMacro syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\" end="\" contains=@nasmGrpCntnMacro,nasmInStructure " union types are not part of nasm (yet) "syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnMacro "syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\" end="\" contains=@nasmGrpCntnMacro,nasmInStructure syn region nasmInMacPreConDef contained transparent matchgroup=nasmInMacPreCondit start="^\s*%ifnidni\>"hs=e-7 start="^\s*%if\(idni\|n\(ctx\|def\|idn\|num\|str\)\)\>"hs=e-6 start="^\s*%if\(ctx\|def\|idn\|nid\|num\|str\)\>"hs=e-5 start="^\s*%ifid\>"hs=e-4 start="^\s*%if\>"hs=e-2 end="%endif\>" contains=@nasmGrpCntnMacro,nasmInMacPreCondit,nasmInPreCondit " Todo: allow STRUC/ISTRUC to be used inside preprocessor conditional block syn match nasmInMacPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx syn match nasmInMacPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx syn match nasmInMacPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx syn match nasmInMacParamNum contained "\<\d\+\.list\>"me=e-5 syn match nasmInMacParamNum contained "\<\d\+\.nolist\>"me=e-7 syn match nasmInMacDirective contained "\.\(no\)\=list\>" syn match nasmInMacMacro contained transparent "macro\s"lc=5 skipwhite nextgroup=nasmStructureLabel syn match nasmInMacMacro contained "^\s*%rotate\>"hs=e-6 syn match nasmInMacParam contained "%\([+-]\=\d\+\|{[+-]\=\d\+}\)" " nasm conditional macro operands/arguments " Todo: check feasebility; add too nasmGrpInMacros, etc. "syn match nasmInMacCond contained "\<\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P[EO]\=\)\>" syn cluster nasmGrpInMacros contains=nasmMacro,nasmInMacMacro,nasmInMacParam,nasmInMacParamNum,nasmInMacDirective,nasmInMacLabel,nasmInMacLblWarn,nasmInMacMemRef,nasmInMacPreConDef,nasmInMacPreCondit,nasmInMacPreProc,nasmInMacStrucDef " Context pre-procs that are better used inside a macro if exists("nasm_ctx_outside_macro") syn region nasmPreConditDef transparent matchgroup=nasmCtxPreCondit start="^\s*%ifnctx\>"hs=e-6 start="^\s*%ifctx\>"hs=e-5 end="%endif\>" contains=@nasmGrpCntnPreCon syn match nasmCtxPreProc "^\s*%pop\>"hs=e-3 if exists("nasm_loose_syntax") syn match nasmCtxLocLabel "%$\+\(\w\|[#.?@~]\)\k*\>" else syn match nasmCtxLocLabel "%$\+\(\h\|[?@]\)\k*\>" endif syn match nasmCtxPreProc "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=@nasmGrpNxtCtx syn match nasmCtxPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx syn match nasmCtxPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx syn match nasmCtxPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx if exists("nasm_no_warn") hi link nasmCtxPreCondit nasmPreCondit hi link nasmCtxPreProc nasmPreProc hi link nasmCtxLocLabel nasmLocalLabel else hi link nasmCtxPreCondit nasmPreProcWarn hi link nasmCtxPreProc nasmPreProcWarn hi link nasmCtxLocLabel nasmLabelWarn endif endif " Conditional assembly syn cluster nasmGrpCntnPreCon contains=ALLBUT,@nasmGrpInComments,@nasmGrpInMacros,@nasmGrpInStrucs syn region nasmPreConditDef transparent matchgroup=nasmPreCondit start="^\s*%ifnidni\>"hs=e-7 start="^\s*%if\(idni\|n\(def\|idn\|num\|str\)\)\>"hs=e-6 start="^\s*%if\(def\|idn\|nid\|num\|str\)\>"hs=e-5 start="^\s*%ifid\>"hs=e-4 start="^\s*%if\>"hs=e-2 end="%endif\>" contains=@nasmGrpCntnPreCon syn match nasmInPreCondit contained "^\s*%el\(if\|se\)\>"hs=e-4 syn match nasmInPreCondit contained "^\s*%elifid\>"hs=e-6 syn match nasmInPreCondit contained "^\s*%elif\(def\|idn\|nid\|num\|str\)\>"hs=e-7 syn match nasmInPreCondit contained "^\s*%elif\(n\(def\|idn\|num\|str\)\|idni\)\>"hs=e-8 syn match nasmInPreCondit contained "^\s*%elifnidni\>"hs=e-9 syn cluster nasmGrpInPreCondits contains=nasmPreCondit,nasmInPreCondit,nasmCtxPreCondit syn cluster nasmGrpPreCondits contains=nasmPreConditDef,@nasmGrpInPreCondits,nasmCtxPreProc,nasmCtxLocLabel " Other pre-processor statements syn match nasmPreProc "^\s*%\(rep\|use\)\>"hs=e-3 syn match nasmPreProc "^\s*%line\>"hs=e-4 syn match nasmPreProc "^\s*%\(clear\|error\|fatal\)\>"hs=e-5 syn match nasmPreProc "^\s*%\(endrep\|strlen\|substr\)\>"hs=e-6 syn match nasmPreProc "^\s*%\(exitrep\|warning\)\>"hs=e-7 syn match nasmDefine "^\s*%undef\>"hs=e-5 syn match nasmDefine "^\s*%\(assign\|define\)\>"hs=e-6 syn match nasmDefine "^\s*%i\(assign\|define\)\>"hs=e-7 syn match nasmDefine "^\s*%unmacro\>"hs=e-7 syn match nasmInclude "^\s*%include\>"hs=e-7 " Todo: Treat the line tail after %fatal, %error, %warning as text " Multiple pre-processor instructions on single line detection (obsolete) "syn match nasmPreProcError +^\s*\([^\t "%';][^"%';]*\|[^\t "';][^"%';]\+\)%\a\+\>+ syn cluster nasmGrpPreProcs contains=nasmMacroDef,@nasmGrpInMacros,@nasmGrpPreCondits,nasmPreProc,nasmDefine,nasmInclude,nasmPreProcWarn,nasmPreProcError " Register Identifiers: " Register operands: syn match nasmGen08Register "\<[A-D][HL]\>" syn match nasmGen16Register "\<\([A-D]X\|[DS]I\|[BS]P\)\>" syn match nasmGen32Register "\" syn match nasmGen64Register "\" syn match nasmSegRegister "\<[C-GS]S\>" syn match nasmSpcRegister "\" syn match nasmFpuRegister "\" syn match nasmMmxRegister "\" syn match nasmSseRegister "\" syn match nasmCtrlRegister "\" syn match nasmDebugRegister "\" syn match nasmTestRegister "\" syn match nasmRegisterError "\<\(CR[15-9]\|DR[4-58-9]\|TR[0-28-9]\)\>" syn match nasmRegisterError "\" syn match nasmRegisterError "\\)" syn match nasmRegisterError "\" " Memory reference operand (address): syn match nasmMemRefError "[[\]]" syn cluster nasmGrpCntnMemRef contains=ALLBUT,@nasmGrpComments,@nasmGrpPreProcs,@nasmGrpInStrucs,nasmMemReference,nasmMemRefError syn match nasmInMacMemRef contained "\[[^;[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmInMacLabel,nasmInMacLblWarn,nasmInMacParam syn match nasmMemReference "\[[^;[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmCtxLocLabel " Netwide Assembler Directives: " Compilation constants syn keyword nasmConstant __BITS__ __DATE__ __FILE__ __FORMAT__ __LINE__ syn keyword nasmConstant __NASM_MAJOR__ __NASM_MINOR__ __NASM_VERSION__ syn keyword nasmConstant __TIME__ " Instruction modifiers syn match nasmInstructnError "\" syn match nasmInstrModifier "\(^\|:\)\s*[C-GS]S\>"ms=e-1 syn keyword nasmInstrModifier A16 A32 O16 O32 syn match nasmInstrModifier "\"lc=5,ms=e-1 " the 'to' keyword is not allowed for fpu-pop instructions (yet) "syn match nasmInstrModifier "\"lc=6,ms=e-1 " NAsm directives syn keyword nasmRepeat TIMES syn keyword nasmDirective ALIGN[B] INCBIN EQU NOSPLIT SPLIT syn keyword nasmDirective ABSOLUTE BITS SECTION SEGMENT syn keyword nasmDirective ENDSECTION ENDSEGMENT syn keyword nasmDirective __SECT__ " Macro created standard directives: (requires %include) syn case match syn keyword nasmStdDirective ENDPROC EPILOGUE LOCALS PROC PROLOGUE USES syn keyword nasmStdDirective ENDIF ELSE ELIF ELSIF IF "syn keyword nasmStdDirective BREAK CASE DEFAULT ENDSWITCH SWITCH "syn keyword nasmStdDirective CASE OF ENDCASE syn keyword nasmStdDirective DO ENDFOR ENDWHILE FOR REPEAT UNTIL WHILE EXIT syn case ignore " Format specific directives: (all formats) " (excluded: extension directives to section, global, common and extern) syn keyword nasmFmtDirective ORG syn keyword nasmFmtDirective EXPORT IMPORT GROUP UPPERCASE SEG WRT syn keyword nasmFmtDirective LIBRARY syn case match syn keyword nasmFmtDirective _GLOBAL_OFFSET_TABLE_ __GLOBAL_OFFSET_TABLE_ syn keyword nasmFmtDirective ..start ..got ..gotoff ..gotpc ..plt ..sym syn case ignore " Standard Instructions: syn match nasmInstructnError "\<\(F\=CMOV\|SET\)N\=\a\{0,2}\>" syn keyword nasmInstructnError CMPS MOVS LCS LODS STOS XLAT syn match nasmStdInstruction "\" syn match nasmInstructnError "\\s*[^:]"he=e-1 syn match nasmStdInstruction "\<\(CMOV\|J\|SET\)\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P[EO]\=\)\>" syn match nasmStdInstruction "\" syn keyword nasmStdInstruction AAA AAD AAM AAS ADC ADD AND syn keyword nasmStdInstruction BOUND BSF BSR BSWAP BT[C] BTR BTS syn keyword nasmStdInstruction CALL CBW CDQ CLC CLD CMC CMP CMPSB CMPSD CMPSW CMPSQ syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] CQO syn keyword nasmStdInstruction DAA DAS DEC DIV ENTER syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW IRETQ syn keyword nasmStdInstruction JCXZ JECXZ JMP syn keyword nasmStdInstruction LAHF LDS LEA LEAVE LES LFS LGS LODSB LODSD LODSQ syn keyword nasmStdInstruction LODSW LOOP[E] LOOPNE LOOPNZ LOOPZ LSS syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVSQ MOVZX MUL NEG NOP NOT syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW POPFQ syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW PUSHFQ syn keyword nasmStdInstruction RCL RCR RETF RET[N] ROL ROR syn keyword nasmStdInstruction SAHF SAL SAR SBB SCASB SCASD SCASW syn keyword nasmStdInstruction SHL[D] SHR[D] STC STD STOSB STOSD STOSW STOSQ SUB syn keyword nasmStdInstruction TEST XADD XCHG XLATB XOR syn keyword nasmStdInstruction LFENCE MFENCE SFENCE " System Instructions: (usually privileged) " Verification of pointer parameters syn keyword nasmSysInstruction ARPL LAR LSL VERR VERW " Addressing descriptor tables syn keyword nasmSysInstruction LLDT SLDT LGDT SGDT " Multitasking syn keyword nasmSysInstruction LTR STR " Coprocessing and Multiprocessing (requires fpu and multiple cpu's resp.) syn keyword nasmSysInstruction CLTS LOCK WAIT " Input and Output syn keyword nasmInstructnError INS OUTS syn keyword nasmSysInstruction IN INSB INSW INSD OUT OUTSB OUTSB OUTSW OUTSD " Interrupt control syn keyword nasmSysInstruction CLI STI LIDT SIDT " System control syn match nasmSysInstruction "\"me=s+3 syn keyword nasmSysInstruction HLT INVD LMSW syn keyword nasmSseInstruction PREFETCHT0 PREFETCHT1 PREFETCHT2 PREFETCHNTA syn keyword nasmSseInstruction RSM SFENCE SMSW SYSENTER SYSEXIT UD2 WBINVD " TLB (Translation Lookahead Buffer) testing syn match nasmSysInstruction "\"me=s+3 syn keyword nasmSysInstruction INVLPG " Debugging Instructions: (privileged) syn match nasmDbgInstruction "\"me=s+3 syn keyword nasmDbgInstruction INT1 INT3 RDMSR RDTSC RDPMC WRMSR " Floating Point Instructions: (requires FPU) syn match nasmFpuInstruction "\" syn keyword nasmFpuInstruction F2XM1 FABS FADD[P] FBLD FBSTP syn keyword nasmFpuInstruction FCHS FCLEX FCOM[IP] FCOMP[P] FCOS syn keyword nasmFpuInstruction FDECSTP FDISI FDIV[P] FDIVR[P] FENI FFREE syn keyword nasmFpuInstruction FIADD FICOM[P] FIDIV[R] FILD syn keyword nasmFpuInstruction FIMUL FINCSTP FINIT FIST[P] FISUB[R] syn keyword nasmFpuInstruction FLD[1] FLDCW FLDENV FLDL2E FLDL2T FLDLG2 syn keyword nasmFpuInstruction FLDLN2 FLDPI FLDZ FMUL[P] syn keyword nasmFpuInstruction FNCLEX FNDISI FNENI FNINIT FNOP FNSAVE syn keyword nasmFpuInstruction FNSTCW FNSTENV FNSTSW FNSTSW syn keyword nasmFpuInstruction FPATAN FPREM[1] FPTAN FRNDINT FRSTOR syn keyword nasmFpuInstruction FSAVE FSCALE FSETPM FSIN FSINCOS FSQRT syn keyword nasmFpuInstruction FSTCW FSTENV FST[P] FSTSW FSUB[P] FSUBR[P] syn keyword nasmFpuInstruction FTST FUCOM[IP] FUCOMP[P] syn keyword nasmFpuInstruction FXAM FXCH FXTRACT FYL2X FYL2XP1 " Multi Media Xtension Packed Instructions: (requires MMX unit) " Standard MMX instructions: (requires MMX1 unit) syn match nasmInstructnError "\" syn match nasmInstructnError "\" syn keyword nasmMmxInstruction EMMS MOVD MOVQ syn keyword nasmMmxInstruction PACKSSDW PACKSSWB PACKUSWB PADDB PADDD PADDW syn keyword nasmMmxInstruction PADDSB PADDSW PADDUSB PADDUSW PAND[N] syn keyword nasmMmxInstruction PCMPEQB PCMPEQD PCMPEQW PCMPGTB PCMPGTD PCMPGTW syn keyword nasmMmxInstruction PMACHRIW PMADDWD PMULHW PMULLW POR syn keyword nasmMmxInstruction PSLLD PSLLQ PSLLW PSRAD PSRAW PSRLD PSRLQ PSRLW syn keyword nasmMmxInstruction PSUBB PSUBD PSUBW PSUBSB PSUBSW PSUBUSB PSUBUSW syn keyword nasmMmxInstruction PUNPCKHBW PUNPCKHDQ PUNPCKHWD syn keyword nasmMmxInstruction PUNPCKLBW PUNPCKLDQ PUNPCKLWD PXOR " Extended MMX instructions: (requires MMX2/SSE unit) syn keyword nasmMmxInstruction MASKMOVQ MOVNTQ syn keyword nasmMmxInstruction PAVGB PAVGW PEXTRW PINSRW PMAXSW PMAXUB syn keyword nasmMmxInstruction PMINSW PMINUB PMOVMSKB PMULHUW PSADBW PSHUFW " Streaming SIMD Extension Packed Instructions: (requires SSE unit) syn match nasmInstructnError "\" syn match nasmSseInstruction "\" syn keyword nasmSseInstruction ADDPS ADDSS ANDNPS ANDPS syn keyword nasmSseInstruction COMISS CVTPI2PS CVTPS2PI syn keyword nasmSseInstruction CVTSI2SS CVTSS2SI CVTTPS2PI CVTTSS2SI syn keyword nasmSseInstruction DIVPS DIVSS FXRSTOR FXSAVE LDMXCSR syn keyword nasmSseInstruction MAXPS MAXSS MINPS MINSS MOVAPS MOVHLPS MOVHPS syn keyword nasmSseInstruction MOVLHPS MOVLPS MOVMSKPS MOVNTPS MOVSS MOVUPS syn keyword nasmSseInstruction MULPS MULSS syn keyword nasmSseInstruction ORPS RCPPS RCPSS RSQRTPS RSQRTSS syn keyword nasmSseInstruction SHUFPS SQRTPS SQRTSS STMXCSR SUBPS SUBSS syn keyword nasmSseInstruction UCOMISS UNPCKHPS UNPCKLPS XORPS " Three Dimensional Now Packed Instructions: (requires 3DNow! unit) syn keyword nasmNowInstruction FEMMS PAVGUSB PF2ID PFACC PFADD PFCMPEQ PFCMPGE syn keyword nasmNowInstruction PFCMPGT PFMAX PFMIN PFMUL PFRCP PFRCPIT1 syn keyword nasmNowInstruction PFRCPIT2 PFRSQIT1 PFRSQRT PFSUB[R] PI2FD syn keyword nasmNowInstruction PMULHRWA PREFETCH[W] " Vendor Specific Instructions: " Cyrix instructions (requires Cyrix processor) syn keyword nasmCrxInstruction PADDSIW PAVEB PDISTIB PMAGW PMULHRW[C] PMULHRIW syn keyword nasmCrxInstruction PMVGEZB PMVLZB PMVNZB PMVZB PSUBSIW syn keyword nasmCrxInstruction RDSHR RSDC RSLDT SMINT SMINTOLD SVDC SVLDT SVTS syn keyword nasmCrxInstruction WRSHR " AMD instructions (requires AMD processor) syn keyword nasmAmdInstruction SYSCALL SYSRET " Undocumented Instructions: syn match nasmUndInstruction "\"me=s+3 syn keyword nasmUndInstruction CMPXCHG486 IBTS ICEBP INT01 INT03 LOADALL syn keyword nasmUndInstruction LOADALL286 LOADALL386 SALC SMI UD1 UMOV XBTS " Synchronize Syntax: syn sync clear syn sync minlines=50 "for multiple region nesting syn sync match nasmSync grouphere nasmMacroDef "^\s*%i\=macro\>"me=s-1 syn sync match nasmSync grouphere NONE "^\s*%endmacro\>" " Define the default highlighting. " Only when an item doesn't have highlighting yet " Sub Links: hi def link nasmInMacDirective nasmDirective hi def link nasmInMacLabel nasmLocalLabel hi def link nasmInMacLblWarn nasmLabelWarn hi def link nasmInMacMacro nasmMacro hi def link nasmInMacParam nasmMacro hi def link nasmInMacParamNum nasmDecNumber hi def link nasmInMacPreCondit nasmPreCondit hi def link nasmInMacPreProc nasmPreProc hi def link nasmInPreCondit nasmPreCondit hi def link nasmInStructure nasmStructure hi def link nasmStructureLabel nasmStructure " Comment Group: hi def link nasmComment Comment hi def link nasmSpecialComment SpecialComment hi def link nasmInCommentTodo Todo " Constant Group: hi def link nasmString String hi def link nasmCString String hi def link nasmStringError Error hi def link nasmCStringEscape SpecialChar hi def link nasmCStringFormat SpecialChar hi def link nasmBinNumber Number hi def link nasmOctNumber Number hi def link nasmDecNumber Number hi def link nasmHexNumber Number hi def link nasmFltNumber Float hi def link nasmNumberError Error " Identifier Group: hi def link nasmLabel Identifier hi def link nasmLocalLabel Identifier hi def link nasmSpecialLabel Special hi def link nasmLabelError Error hi def link nasmLabelWarn Todo " PreProc Group: hi def link nasmPreProc PreProc hi def link nasmDefine Define hi def link nasmInclude Include hi def link nasmMacro Macro hi def link nasmPreCondit PreCondit hi def link nasmPreProcError Error hi def link nasmPreProcWarn Todo " Type Group: hi def link nasmType Type hi def link nasmStorage StorageClass hi def link nasmStructure Structure hi def link nasmTypeError Error " Directive Group: hi def link nasmConstant Constant hi def link nasmInstrModifier Operator hi def link nasmRepeat Repeat hi def link nasmDirective Keyword hi def link nasmStdDirective Operator hi def link nasmFmtDirective Keyword " Register Group: hi def link nasmCtrlRegister Special hi def link nasmDebugRegister Debug hi def link nasmTestRegister Special hi def link nasmRegisterError Error hi def link nasmMemRefError Error " Instruction Group: hi def link nasmStdInstruction Statement hi def link nasmSysInstruction Statement hi def link nasmDbgInstruction Debug hi def link nasmFpuInstruction Statement hi def link nasmMmxInstruction Statement hi def link nasmSseInstruction Statement hi def link nasmNowInstruction Statement hi def link nasmAmdInstruction Special hi def link nasmCrxInstruction Special hi def link nasmUndInstruction Todo hi def link nasmInstructnError Error let b:current_syntax = "nasm" " vim:ts=8 sw=4 neovim-0.2.2/runtime/syntax/nastran.vim000066400000000000000000000204701320401574200202050ustar00rootroot00000000000000" Vim syntax file " Language: NASTRAN input/DMAP " Maintainer: Tom Kowalski " Last change: April 27, 2001 " Thanks to the authors and maintainers of fortran.vim. " Since DMAP shares some traits with fortran, this syntax file " is based on the fortran.vim syntax file. "---------------------------------------------------------------------- " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " DMAP is not case dependent syn case ignore " "--------------------DMAP SYNTAX--------------------------------------- " " -------Executive Modules and Statements " syn keyword nastranDmapexecmod call dbview delete end equiv equivx exit syn keyword nastranDmapexecmod file message purge purgex return subdmap syn keyword nastranDmapType type syn keyword nastranDmapLabel go to goto syn keyword nastranDmapRepeat if else elseif endif then syn keyword nastranDmapRepeat do while syn region nastranDmapString start=+"+ end=+"+ oneline syn region nastranDmapString start=+'+ end=+'+ oneline " If you don't like initial tabs in dmap (or at all) "syn match nastranDmapIniTab "^\t.*$" "syn match nastranDmapTab "\t" " Any integer syn match nastranDmapNumber "-\=\<[0-9]\+\>" " floating point number, with dot, optional exponent syn match nastranDmapFloat "\<[0-9]\+\.[0-9]*\([edED][-+]\=[0-9]\+\)\=\>" " floating point number, starting with a dot, optional exponent syn match nastranDmapFloat "\.[0-9]\+\([edED][-+]\=[0-9]\+\)\=\>" " floating point number, without dot, with exponent syn match nastranDmapFloat "\<[0-9]\+[edED][-+]\=[0-9]\+\>" syn match nastranDmapLogical "\(true\|false\)" syn match nastranDmapPreCondit "^#define\>" syn match nastranDmapPreCondit "^#include\>" " " -------Comments may be contained in another line. " syn match nastranDmapComment "^[\$].*$" syn match nastranDmapComment "\$.*$" syn match nastranDmapComment "^[\$].*$" contained syn match nastranDmapComment "\$.*$" contained " Treat all past 72nd column as a comment. Do not work with tabs! " Breaks down when 72-73rd column is in another match (eg number or keyword) syn match nastranDmapComment "^.\{-72}.*$"lc=72 contained " " -------Utility Modules " syn keyword nastranDmapUtilmod append copy dbc dbdict dbdir dmin drms1 syn keyword nastranDmapUtilmod dtiin eltprt ifp ifp1 inputt2 inputt4 lamx syn keyword nastranDmapUtilmod matgen matgpr matmod matpch matprn matprt syn keyword nastranDmapUtilmod modtrl mtrxin ofp output2 output4 param syn keyword nastranDmapUtilmod paraml paramr prtparam pvt scalar syn keyword nastranDmapUtilmod seqp setval tabedit tabprt tabpt vec vecplot syn keyword nastranDmapUtilmod xsort " " -------Matrix Modules " syn keyword nastranDmapMatmod add add5 cead dcmp decomp diagonal fbs merge syn keyword nastranDmapMatmod mpyad norm read reigl smpyad solve solvit syn keyword nastranDmapMatmod trnsp umerge umerge1 upartn dmiin partn syn region nastranDmapMatmod start=+^ *[Dd][Mm][Ii]+ end=+[\/]+ " " -------Implicit Functions " syn keyword nastranDmapImplicit abs acos acosh andl asin asinh atan atan2 syn keyword nastranDmapImplicit atanh atanh2 char clen clock cmplx concat1 syn keyword nastranDmapImplicit concat2 concat3 conjg cos cosh dble diagoff syn keyword nastranDmapImplicit diagon dim dlablank dlxblank dprod eqvl exp syn keyword nastranDmapImplicit getdiag getsys ichar imag impl index indexstr syn keyword nastranDmapImplicit int itol leq lge lgt lle llt lne log log10 syn keyword nastranDmapImplicit logx ltoi mcgetsys mcputsys max min mod neqvl syn keyword nastranDmapImplicit nint noop normal notl numeq numge numgt numle syn keyword nastranDmapImplicit numlt numne orl pi precison putdiag putsys syn keyword nastranDmapImplicit rand rdiagon real rtimtogo setcore sign sin syn keyword nastranDmapImplicit sinh sngl sprod sqrt substrin tan tanh syn keyword nastranDmapImplicit timetogo wlen xorl " " "--------------------INPUT FILE SYNTAX--------------------------------------- " " " -------Nastran Statement " syn keyword nastranNastranCard nastran " " -------The File Management Section (FMS) " syn region nastranFMSCard start=+^ *[Aa][Cc][Qq][Uu][Ii]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Aa][Ss][Ss][Ii][Gg]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Cc][oO][Nn][Nn][Ee]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Dd][Bb][Cc][Ll][Ee]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Dd][Bb][Dd][Ii][Cc]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Dd][Bb][Dd][Ii][Rr]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Dd][Bb][Ff][Ii][Xx]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Dd][Bb][Ll][Oo][Aa]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Dd][Bb][Ll][Oo][Cc]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Dd][Bb][Ss][Ee][Tt]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Dd][Bb][Uu][Nn][Ll]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Dd][Bb][Uu][Pp][Dd]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Dd][Ee][Ff][Ii][Nn]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Ee][Nn][Dd][Jj][Oo]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Ee][Xx][Pp][Aa][Nn]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Ii][Nn][Cc][Ll][Uu]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Ii][Nn][Ii][Tt]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Pp][Rr][Oo][Jj]+ end=+$+ oneline syn region nastranFMSCard start=+^ *[Rr][Ee][Ss][Tt]+ end=+$+ oneline syn match nastranDmapUtilmod "^ *[Rr][Ee][Ss][Tt][Aa].*,.*," contains=nastranDmapComment " " -------Executive Control Section " syn region nastranECSCard start=+^ *[Aa][Ll][Tt][Ee][Rr]+ end=+$+ oneline syn region nastranECSCard start=+^ *[Aa][Pp][Pp]+ end=+$+ oneline syn region nastranECSCard start=+^ *[Cc][Oo][Mm][Pp][Ii]+ end=+$+ oneline syn region nastranECSCard start=+^ *[Dd][Ii][Aa][Gg] + end=+$+ oneline syn region nastranECSCard start=+^ *[Ee][Cc][Hh][Oo]+ end=+$+ oneline syn region nastranECSCard start=+^ *[Ee][Nn][Dd][Aa][Ll]+ end=+$+ oneline syn region nastranECSCard start=+^ *[Ii][Dd]+ end=+$+ oneline syn region nastranECSCard start=+^ *[Ii][Nn][Cc][Ll][Uu]+ end=+$+ oneline syn region nastranECSCard start=+^ *[Ll][Ii][Nn][Kk]+ end=+$+ oneline syn region nastranECSCard start=+^ *[Mm][Aa][Ll][Tt][Ee]+ end=+$+ oneline syn region nastranECSCard start=+^ *[Ss][Oo][Ll] + end=+$+ oneline syn region nastranECSCard start=+^ *[Tt][Ii][Mm][Ee]+ end=+$+ oneline " " -------Delimiters " syn match nastranDelimiter "[Cc][Ee][Nn][Dd]" contained syn match nastranDelimiter "[Bb][Ee][Gg][Ii][Nn]" contained syn match nastranDelimiter " *[Bb][Uu][Ll][Kk]" contained syn match nastranDelimiter "[Ee][Nn][Dd] *[dD][Aa][Tt][Aa]" contained " " -------Case Control section " syn region nastranCC start=+^ *[Cc][Ee][Nn][Dd]+ end=+^ *[Bb][Ee][Gg][Ii][Nn]+ contains=nastranDelimiter,nastranBulkData,nastranDmapComment " " -------Bulk Data section " syn region nastranBulkData start=+ *[Bb][Uu][Ll][Kk] *$+ end=+^ [Ee][Nn][Dd] *[Dd]+ contains=nastranDelimiter,nastranDmapComment " " -------The following cards may appear in multiple sections of the file " syn keyword nastranUtilCard ECHOON ECHOOFF INCLUDE PARAM " The default methods for highlighting. Can be overridden later hi def link nastranDmapexecmod Statement hi def link nastranDmapType Type hi def link nastranDmapPreCondit Error hi def link nastranDmapUtilmod PreProc hi def link nastranDmapMatmod nastranDmapUtilmod hi def link nastranDmapString String hi def link nastranDmapNumber Constant hi def link nastranDmapFloat nastranDmapNumber hi def link nastranDmapInitTab nastranDmapNumber hi def link nastranDmapTab nastranDmapNumber hi def link nastranDmapLogical nastranDmapExecmod hi def link nastranDmapImplicit Identifier hi def link nastranDmapComment Comment hi def link nastranDmapRepeat nastranDmapexecmod hi def link nastranNastranCard nastranDmapPreCondit hi def link nastranECSCard nastranDmapUtilmod hi def link nastranFMSCard nastranNastranCard hi def link nastranCC nastranDmapexecmod hi def link nastranDelimiter Special hi def link nastranBulkData nastranDmapType hi def link nastranUtilCard nastranDmapexecmod let b:current_syntax = "nastran" "EOF vim: ts=8 noet tw=120 sw=8 sts=0 neovim-0.2.2/runtime/syntax/natural.vim000066400000000000000000000155011320401574200202040ustar00rootroot00000000000000" Vim syntax file " " Language: NATURAL " Version: 2.1.0.5 " Maintainer: Marko von Oppen " Last Changed: 2012-02-05 18:50:43 " Support: http://www.von-oppen.com/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword+=-,*,#,+,_,/ let s:cpo_save = &cpo set cpo&vim " NATURAL is case insensitive syntax case ignore " preprocessor syn keyword naturalInclude include nextgroup=naturalObjName skipwhite " define data syn keyword naturalKeyword define data end-define syn keyword naturalKeyword independent global parameter local redefine view syn keyword naturalKeyword const[ant] init initial " loops syn keyword naturalLoop read end-read end-work find end-find histogram end-histogram syn keyword naturalLoop end-all sort end-sort sorted descending ascending syn keyword naturalRepeat repeat end-repeat while until for step end-for syn keyword naturalKeyword in file with field starting from ending at thru by isn where syn keyword naturalError on error end-error syn keyword naturalKeyword accept reject end-enddata number unique retain as release syn keyword naturalKeyword start end-start break end-break physical page top sequence syn keyword naturalKeyword end-toppage end-endpage end-endfile before processing syn keyword naturalKeyword end-before " conditionals syn keyword naturalConditional if then else end-if end-norec syn keyword naturalConditional decide end-decide value when condition none any " assignment / calculation syn keyword naturalKeyword reset assign move left right justified compress to into edited syn keyword naturalKeyword add subtract multiply divide compute name syn keyword naturalKeyword all giving remainder rounded leaving space numeric syn keyword naturalKeyword examine full replace giving separate delimiter modified syn keyword naturalKeyword suspend identical suppress " program flow syn keyword naturalFlow callnat fetch return enter escape bottom top stack formatted syn keyword naturalFlow command call syn keyword naturalflow end-subroutine routine " file operations syn keyword naturalKeyword update store get delete end transaction work once close " other keywords syn keyword naturalKeyword first every of no record[s] found ignore immediate syn keyword naturalKeyword set settime key control stop terminate " in-/output syn keyword naturalKeyword write display input reinput notitle nohdr map newpage syn keyword naturalKeyword alarm text help eject index window base size syn keyword naturalKeyword format printer skip lines " functions syn keyword naturalKeyword abs atn cos exp frac int log sgn sin sqrt tan val old syn keyword naturalKeyword pos " report mode keywords syn keyword naturalRMKeyword same loop obtain indexed do doend " Subroutine name syn keyword naturalFlow perform subroutine nextgroup=naturalFunction skipwhite syn match naturalFunction "\<[a-z][-_a-z0-9]*\>" syn keyword naturalFlow using nextgroup=naturalKeyword,naturalObjName skipwhite syn match naturalObjName "\<[a-z][-_a-z0-9]\{,7}\>" " Labels syn match naturalLabel "\<[+#a-z][-_#a-z0-9]*\." syn match naturalRef "\<[+#a-z][-_#a-z0-9]*\>\.\<[+#a-z][*]\=[-_#a-z0-9]*\>" " mark keyword special handling syn keyword naturalKeyword mark nextgroup=naturalMark skipwhite syn match naturalMark "\<\*[a-z][-_#.a-z0-9]*\>" " System variables syn match naturalSysVar "\<\*[a-z][-a-z0-9]*\>" "integer number, or floating point number without a dot. syn match naturalNumber "\<-\=\d\+\>" "floating point number, with dot syn match naturalNumber "\<-\=\d\+\.\d\+\>" "floating point number, starting with a dot syn match naturalNumber "\.\d\+" " Formats in write statement syn match naturalFormat "\<\d\+[TX]\>" " String and Character contstants syn match naturalString "H'\x\+'" syn region naturalString start=+"+ end=+"+ syn region naturalString start=+'+ end=+'+ " Type definition syn match naturalAttribute "\<[-a-z][a-z]=[-a-z0-9_\.,]\+\>" syn match naturalType contained "\<[ABINP]\d\+\(,\d\+\)\=\>" syn match naturalType contained "\<[CL]\>" " "TODO" / other comments syn keyword naturalTodo contained todo test syn match naturalCommentMark contained "[a-z][^ \t/:|]*\(\s[^ \t/:'"|]\+\)*:\s"he=e-1 " comments syn region naturalComment start="/\*" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark syn region naturalComment start="^\*[ *]" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark syn region naturalComment start="^\d\{4} \*[\ \*]"lc=5 end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark syn match naturalComment "^\*$" syn match naturalComment "^\d\{4} \*$"lc=5 " /* is legal syntax in parentheses e.g. "#ident(label./*)" syn region naturalPComment contained start="/\*\s*[^),]" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark " operators syn keyword naturalOperator and or not eq ne gt lt ge le mask scan modified " constants syn keyword naturalBoolean true false syn match naturalLineNo "^\d\{4}" " identifiers syn match naturalIdent "\<[+#a-z][-_#a-z0-9]*\>[^\.']"me=e-1 syn match naturalIdent "\<[+#a-z][-_#a-z0-9]*$" syn match naturalLegalIdent "[+#a-z][-_#a-z0-9]*/[-_#a-z0-9]*" " parentheses syn region naturalPar matchgroup=naturalParGui start="(" end=")" contains=naturalLabel,naturalRef,naturalOperator,@naturalConstant,naturalType,naturalSysVar,naturalPar,naturalLineNo,naturalPComment syn match naturalLineRef "(\d\{4})" " build syntax groups syntax cluster naturalConstant contains=naturalString,naturalNumber,naturalAttribute,naturalBoolean " folding if v:version >= 600 set foldignore=* endif " The default methods for highlighting. Can be overridden later " Constants hi def link naturalFormat Constant hi def link naturalAttribute Constant hi def link naturalNumber Number hi def link naturalString String hi def link naturalBoolean Boolean " All kinds of keywords hi def link naturalConditional Conditional hi def link naturalRepeat Repeat hi def link naturalLoop Repeat hi def link naturalFlow Keyword hi def link naturalError Keyword hi def link naturalKeyword Keyword hi def link naturalOperator Operator hi def link naturalParGui Operator " Labels hi def link naturalLabel Label hi def link naturalRefLabel Label " Comments hi def link naturalPComment Comment hi def link naturalComment Comment hi def link naturalTodo Todo hi def link naturalCommentMark PreProc hi def link naturalInclude Include hi def link naturalSysVar Identifier hi def link naturalLineNo LineNr hi def link naturalLineRef Error hi def link naturalSpecial Special hi def link naturalComKey Todo " illegal things hi def link naturalRMKeyword Error hi def link naturalLegalIdent Error hi def link naturalType Type hi def link naturalFunction Function hi def link naturalObjName PreProc let b:current_syntax = "natural" let &cpo = s:cpo_save unlet s:cpo_save " vim:set ts=8 sw=8 noet ft=vim list: neovim-0.2.2/runtime/syntax/ncf.vim000066400000000000000000000321501320401574200173030ustar00rootroot00000000000000" Vim syntax file " Language: Novell "NCF" Batch File " Maintainer: Jonathan J. Miner " Last Change: Tue, 04 Sep 2001 16:20:33 CDT " $Id: ncf.vim,v 1.1 2004/06/13 16:31:58 vimboss Exp $ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore syn keyword ncfCommands mount load unload syn keyword ncfBoolean on off syn keyword ncfCommands set nextgroup=ncfSetCommands syn keyword ncfTimeTypes Reference Primary Secondary Single syn match ncfLoad "\(unl\|l\)oad .*"lc=4 contains=ALLBUT,Error syn match ncfMount "mount .*"lc=5 contains=ALLBUT,Error syn match ncfComment "^\ *rem.*$" syn match ncfComment "^\ *;.*$" syn match ncfComment "^\ *#.*$" syn match ncfSearchPath "search \(add\|del\) " nextgroup=ncfPath syn match ncfPath "\<[^: ]\+:\([A-Za-z0-9._]\|\\\)*\>" syn match ncfServerName "^file server name .*$" syn match ncfIPXNet "^ipx internal net" " String syn region ncfString start=+"+ end=+"+ syn match ncfContString "= \(\(\.\{0,1}\(OU=\|O=\)\{0,1}[A-Z_]\+\)\+;\{0,1}\)\+"lc=2 syn match ncfHexNumber "\<\d\(\d\+\|[A-F]\+\)*\>" syn match ncfNumber "\<\d\+\.\{0,1}\d*\>" syn match ncfIPAddr "\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}" syn match ncfTime "\(+|=\)\{0,1}\d\{1,2}:\d\{1,2}:\d\{1,2}" syn match ncfDSTTime "([^ ]\+ [^ ]\+ \(FIRST\|LAST\)\s*\d\{1,2}:\d\{1,2}:\d\{1,2} \(AM\|PM\))" syn match ncfTimeZone "[A-Z]\{3}\d[A-Z]\{3}" syn match ncfLogins "^\([Dd]is\|[Ee]n\)able login[s]*" syn match ncfScript "[^ ]*\.ncf" " SET Commands that take a Number following syn match ncfSetCommandsNum "\(Alert Message Nodes\)\s*=" syn match ncfSetCommandsNum "\(Auto Restart After Abend\)\s*=" syn match ncfSetCommandsNum "\(Auto Restart After Abend Delay Time\)\s*=" syn match ncfSetCommandsNum "\(Compression Daily Check Starting Hour\)\s*=" syn match ncfSetCommandsNum "\(Compression Daily Check Stop Hour\)\s*=" syn match ncfSetCommandsNum "\(Concurrent Remirror Requests\)\s*=" syn match ncfSetCommandsNum "\(Convert Compressed to Uncompressed Option\)\s*=" syn match ncfSetCommandsNum "\(Days Untouched Before Compression\)\s*=" syn match ncfSetCommandsNum "\(Decompress Free Space Warning Interval\)\s*=" syn match ncfSetCommandsNum "\(Decompress Percent Disk Space Free to Allow Commit\)\s*=" syn match ncfSetCommandsNum "\(Deleted Files Compression Option\)\s*=" syn match ncfSetCommandsNum "\(Directory Cache Allocation Wait Time\)\s*=" syn match ncfSetCommandsNum "\(Enable IPX Checksums\)\s*=" syn match ncfSetCommandsNum "\(Garbage Collection Interval\)\s*=" syn match ncfSetCommandsNum "\(IPX NetBIOS Replication Option\)\s*=" syn match ncfSetCommandsNum "\(Maximum Concurrent Compressions\)\s*=" syn match ncfSetCommandsNum "\(Maximum Concurrent Directory Cache Writes\)\s*=" syn match ncfSetCommandsNum "\(Maximum Concurrent Disk Cache Writes\)\s*=" syn match ncfSetCommandsNum "\(Maximum Directory Cache Buffers\)\s*=" syn match ncfSetCommandsNum "\(Maximum Extended Attributes per File or Path\)\s*=" syn match ncfSetCommandsNum "\(Maximum File Locks\)\s*=" syn match ncfSetCommandsNum "\(Maximum File Locks Per Connection\)\s*=" syn match ncfSetCommandsNum "\(Maximum Interrupt Events\)\s*=" syn match ncfSetCommandsNum "\(Maximum Number of Directory Handles\)\s*=" syn match ncfSetCommandsNum "\(Maximum Number of Internal Directory Handles\)\s*=" syn match ncfSetCommandsNum "\(Maximum Outstanding NCP Searches\)\s*=" syn match ncfSetCommandsNum "\(Maximum Packet Receive Buffers\)\s*=" syn match ncfSetCommandsNum "\(Maximum Physical Receive Packet Size\)\s*=" syn match ncfSetCommandsNum "\(Maximum Record Locks\)\s*=" syn match ncfSetCommandsNum "\(Maximum Record Locks Per Connection\)\s*=" syn match ncfSetCommandsNum "\(Maximum Service Processes\)\s*=" syn match ncfSetCommandsNum "\(Maximum Subdirectory Tree Depth\)\s*=" syn match ncfSetCommandsNum "\(Maximum Transactions\)\s*=" syn match ncfSetCommandsNum "\(Minimum Compression Percentage Gain\)\s*=" syn match ncfSetCommandsNum "\(Minimum Directory Cache Buffers\)\s*=" syn match ncfSetCommandsNum "\(Minimum File Cache Buffers\)\s*=" syn match ncfSetCommandsNum "\(Minimum File Cache Report Threshold\)\s*=" syn match ncfSetCommandsNum "\(Minimum Free Memory for Garbage Collection\)\s*=" syn match ncfSetCommandsNum "\(Minimum Packet Receive Buffers\)\s*=" syn match ncfSetCommandsNum "\(Minimum Service Processes\)\s*=" syn match ncfSetCommandsNum "\(NCP Packet Signature Option\)\s*=" syn match ncfSetCommandsNum "\(NDS Backlink Interval\)\s*=" syn match ncfSetCommandsNum "\(NDS Client NCP Retries\)\s*=" syn match ncfSetCommandsNum "\(NDS External Reference Life Span\)\s*=" syn match ncfSetCommandsNum "\(NDS Inactivity Synchronization Interval\)\s*=" syn match ncfSetCommandsNum "\(NDS Janitor Interval\)\s*=" syn match ncfSetCommandsNum "\(New Service Process Wait Time\)\s*=" syn match ncfSetCommandsNum "\(Number of Frees for Garbage Collection\)\s*=" syn match ncfSetCommandsNum "\(Number of Watchdog Packets\)\s*=" syn match ncfSetCommandsNum "\(Pseudo Preemption Count\)\s*=" syn match ncfSetCommandsNum "\(Read Ahead LRU Sitting Time Threshold\)\s*=" syn match ncfSetCommandsNum "\(Remirror Block Size\)\s*=" syn match ncfSetCommandsNum "\(Reserved Buffers Below 16 Meg\)\s*=" syn match ncfSetCommandsNum "\(Server Log File Overflow Size\)\s*=" syn match ncfSetCommandsNum "\(Server Log File State\)\s*=" syn match ncfSetCommandsNum "\(SMP Polling Count\)\s*=" syn match ncfSetCommandsNum "\(SMP Stack Size\)\s*=" syn match ncfSetCommandsNum "\(TIMESYNC Polling Count\)\s*=" syn match ncfSetCommandsNum "\(TIMESYNC Polling Interval\)\s*=" syn match ncfSetCommandsNum "\(TIMESYNC Synchronization Radius\)\s*=" syn match ncfSetCommandsNum "\(TIMESYNC Write Value\)\s*=" syn match ncfSetCommandsNum "\(Volume Log File Overflow Size\)\s*=" syn match ncfSetCommandsNum "\(Volume Log File State\)\s*=" syn match ncfSetCommandsNum "\(Volume Low Warning Reset Threshold\)\s*=" syn match ncfSetCommandsNum "\(Volume Low Warning Threshold\)\s*=" syn match ncfSetCommandsNum "\(Volume TTS Log File Overflow Size\)\s*=" syn match ncfSetCommandsNum "\(Volume TTS Log File State\)\s*=" syn match ncfSetCommandsNum "\(Worker Thread Execute In a Row Count\)\s*=" " SET Commands that take a Boolean (ON/OFF) syn match ncfSetCommandsBool "\(Alloc Memory Check Flag\)\s*=" syn match ncfSetCommandsBool "\(Allow Audit Passwords\)\s*=" syn match ncfSetCommandsBool "\(Allow Change to Client Rights\)\s*=" syn match ncfSetCommandsBool "\(Allow Deletion of Active Directories\)\s*=" syn match ncfSetCommandsBool "\(Allow Invalid Pointers\)\s*=" syn match ncfSetCommandsBool "\(Allow LIP\)\s*=" syn match ncfSetCommandsBool "\(Allow Unencrypted Passwords\)\s*=" syn match ncfSetCommandsBool "\(Allow Unowned Files To Be Extended\)\s*=" syn match ncfSetCommandsBool "\(Auto Register Memory Above 16 Megabytes\)\s*=" syn match ncfSetCommandsBool "\(Auto TTS Backout Flag\)\s*=" syn match ncfSetCommandsBool "\(Automatically Repair Bad Volumes\)\s*=" syn match ncfSetCommandsBool "\(Check Equivalent to Me\)\s*=" syn match ncfSetCommandsBool "\(Command Line Prompt Default Choice\)\s*=" syn match ncfSetCommandsBool "\(Console Display Watchdog Logouts\)\s*=" syn match ncfSetCommandsBool "\(Daylight Savings Time Status\)\s*=" syn match ncfSetCommandsBool "\(Developer Option\)\s*=" syn match ncfSetCommandsBool "\(Display Incomplete IPX Packet Alerts\)\s*=" syn match ncfSetCommandsBool "\(Display Lost Interrupt Alerts\)\s*=" syn match ncfSetCommandsBool "\(Display NCP Bad Component Warnings\)\s*=" syn match ncfSetCommandsBool "\(Display NCP Bad Length Warnings\)\s*=" syn match ncfSetCommandsBool "\(Display Old API Names\)\s*=" syn match ncfSetCommandsBool "\(Display Relinquish Control Alerts\)\s*=" syn match ncfSetCommandsBool "\(Display Spurious Interrupt Alerts\)\s*=" syn match ncfSetCommandsBool "\(Enable Deadlock Detection\)\s*=" syn match ncfSetCommandsBool "\(Enable Disk Read After Write Verify\)\s*=" syn match ncfSetCommandsBool "\(Enable File Compression\)\s*=" syn match ncfSetCommandsBool "\(Enable IO Handicap Attribute\)\s*=" syn match ncfSetCommandsBool "\(Enable SECURE.NCF\)\s*=" syn match ncfSetCommandsBool "\(Fast Volume Mounts\)\s*=" syn match ncfSetCommandsBool "\(Global Pseudo Preemption\)\s*=" syn match ncfSetCommandsBool "\(Halt System on Invalid Parameters\)\s*=" syn match ncfSetCommandsBool "\(Ignore Disk Geometry\)\s*=" syn match ncfSetCommandsBool "\(Immediate Purge of Deleted Files\)\s*=" syn match ncfSetCommandsBool "\(NCP File Commit\)\s*=" syn match ncfSetCommandsBool "\(NDS Trace File Length to Zero\)\s*=" syn match ncfSetCommandsBool "\(NDS Trace to File\)\s*=" syn match ncfSetCommandsBool "\(NDS Trace to Screen\)\s*=" syn match ncfSetCommandsBool "\(New Time With Daylight Savings Time Status\)\s*=" syn match ncfSetCommandsBool "\(Read Ahead Enabled\)\s*=" syn match ncfSetCommandsBool "\(Read Fault Emulation\)\s*=" syn match ncfSetCommandsBool "\(Read Fault Notification\)\s*=" syn match ncfSetCommandsBool "\(Reject NCP Packets with Bad Components\)\s*=" syn match ncfSetCommandsBool "\(Reject NCP Packets with Bad Lengths\)\s*=" syn match ncfSetCommandsBool "\(Replace Console Prompt with Server Name\)\s*=" syn match ncfSetCommandsBool "\(Reply to Get Nearest Server\)\s*=" syn match ncfSetCommandsBool "\(SMP Developer Option\)\s*=" syn match ncfSetCommandsBool "\(SMP Flush Processor Cache\)\s*=" syn match ncfSetCommandsBool "\(SMP Intrusive Abend Mode\)\s*=" syn match ncfSetCommandsBool "\(SMP Memory Protection\)\s*=" syn match ncfSetCommandsBool "\(Sound Bell for Alerts\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Configured Sources\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Directory Tree Mode\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Hardware Clock\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC RESET\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Restart Flag\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Service Advertising\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Write Parameters\)\s*=" syn match ncfSetCommandsBool "\(TTS Abort Dump Flag\)\s*=" syn match ncfSetCommandsBool "\(Upgrade Low Priority Threads\)\s*=" syn match ncfSetCommandsBool "\(Volume Low Warn All Users\)\s*=" syn match ncfSetCommandsBool "\(Write Fault Emulation\)\s*=" syn match ncfSetCommandsBool "\(Write Fault Notification\)\s*=" " Set Commands that take a "string" -- NOT QUOTED syn match ncfSetCommandsStr "\(Default Time Server Type\)\s*=" syn match ncfSetCommandsStr "\(SMP NetWare Kernel Mode\)\s*=" syn match ncfSetCommandsStr "\(Time Zone\)\s*=" syn match ncfSetCommandsStr "\(TIMESYNC ADD Time Source\)\s*=" syn match ncfSetCommandsStr "\(TIMESYNC REMOVE Time Source\)\s*=" syn match ncfSetCommandsStr "\(TIMESYNC Time Source\)\s*=" syn match ncfSetCommandsStr "\(TIMESYNC Type\)\s*=" " SET Commands that take a "Time" syn match ncfSetCommandsTime "\(Command Line Prompt Time Out\)\s*=" syn match ncfSetCommandsTime "\(Delay Before First Watchdog Packet\)\s*=" syn match ncfSetCommandsTime "\(Delay Between Watchdog Packets\)\s*=" syn match ncfSetCommandsTime "\(Directory Cache Buffer NonReferenced Delay\)\s*=" syn match ncfSetCommandsTime "\(Dirty Directory Cache Delay Time\)\s*=" syn match ncfSetCommandsTime "\(Dirty Disk Cache Delay Time\)\s*=" syn match ncfSetCommandsTime "\(File Delete Wait Time\)\s*=" syn match ncfSetCommandsTime "\(Minimum File Delete Wait Time\)\s*=" syn match ncfSetCommandsTime "\(Mirrored Devices Are Out of Sync Message Frequency\)\s*=" syn match ncfSetCommandsTime "\(New Packet Receive Buffer Wait Time\)\s*=" syn match ncfSetCommandsTime "\(TTS Backout File Truncation Wait Time\)\s*=" syn match ncfSetCommandsTime "\(TTS UnWritten Cache Wait Time\)\s*=" syn match ncfSetCommandsTime "\(Turbo FAT Re-Use Wait Time\)\s*=" syn match ncfSetCommandsTime "\(Daylight Savings Time Offset\)\s*=" syn match ncfSetCommandsTimeDate "\(End of Daylight Savings Time\)\s*=" syn match ncfSetCommandsTimeDate "\(Start of Daylight Savings Time\)\s*=" syn match ncfSetCommandsBindCon "\(Bindery Context\)\s*=" nextgroup=ncfContString syn cluster ncfSetCommands contains=ncfSetCommandsNum,ncfSetCommandsBool,ncfSetCommandsStr,ncfSetCommandsTime,ncfSetCommandsTimeDate,ncfSetCommandsBindCon if exists("ncf_highlight_unknowns") syn match Error "[^ \t]*" contains=ALL endif " The default methods for highlighting. Can be overridden later hi def link ncfCommands Statement hi def link ncfSetCommands ncfCommands hi def link ncfLogins ncfCommands hi def link ncfString String hi def link ncfContString ncfString hi def link ncfComment Comment hi def link ncfImplicit Type hi def link ncfBoolean Boolean hi def link ncfScript Identifier hi def link ncfNumber Number hi def link ncfIPAddr ncfNumber hi def link ncfHexNumber ncfNumber hi def link ncfTime ncfNumber hi def link ncfDSTTime ncfNumber hi def link ncfPath Constant hi def link ncfServerName Special hi def link ncfIPXNet ncfServerName hi def link ncfTimeTypes Constant hi def link ncfSetCommandsNum ncfSetCommands hi def link ncfSetCommandsBool ncfSetCommands hi def link ncfSetCommandsStr ncfSetCommands hi def link ncfSetCommandsTime ncfSetCommands hi def link ncfSetCommandsTimeDate ncfSetCommands hi def link ncfSetCommandsBindCon ncfSetCommands let b:current_syntax = "ncf" neovim-0.2.2/runtime/syntax/neomuttrc.vim000066400000000000000000002312531320401574200205620ustar00rootroot00000000000000" Vim syntax file " Language: NeoMutt setup files " Maintainer: Guillaume Brogi " Last Change: 2017 Oct 28 " Original version based on syntax/muttrc.vim " This file covers NeoMutt 20170912 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Set the keyword characters setlocal isk=@,48-57,_,- " handling optional variables syntax match muttrcComment "^# .*$" contains=@Spell syntax match muttrcComment "^#[^ ].*$" syntax match muttrcComment "^#$" syntax match muttrcComment "[^\\]#.*$"lc=1 " Escape sequences (back-tick and pipe goes here too) syntax match muttrcEscape +\\[#tnr"'Cc ]+ syntax match muttrcEscape +[`|]+ syntax match muttrcEscape +\\$+ " The variables takes the following arguments "syn match muttrcString contained "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape syntax region muttrcString contained keepend start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcCommand,muttrcAction,muttrcShellString syntax region muttrcString contained keepend start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcCommand,muttrcAction syntax match muttrcStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcString,muttrcStringNL syntax region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand,muttrcVarDeprecatedStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad syntax match muttrcRXChars contained /[^\\][][.*?+]\+/hs=s+1 syntax match muttrcRXChars contained /[][|()][.*?+]*/ syntax match muttrcRXChars contained /['"]^/ms=s+1 syntax match muttrcRXChars contained /$['"]/me=e-1 syntax match muttrcRXChars contained /\\/ " Why does muttrcRXString2 work with one \ when muttrcRXString requires two? syntax region muttrcRXString contained skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars syntax region muttrcRXString contained skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars syntax region muttrcRXString contained skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXChars " For some reason, skip refuses to match backslashes here... syntax region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXChars syntax region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXChars syntax region muttrcRXString2 contained skipwhite start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars syntax region muttrcRXString2 contained skipwhite start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars " these must be kept synchronized with muttrcRXString, but are intended for " muttrcRXHooks syntax region muttrcRXHookString contained keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syntax region muttrcRXHookString contained keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syntax region muttrcRXHookString contained keepend skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syntax region muttrcRXHookString contained keepend skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syntax region muttrcRXHookString contained keepend matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syntax match muttrcRXHookStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcRXHookString,muttrcRXHookStringNL " these are exclusively for args lists (e.g. -rx pat pat pat ...) syntax region muttrcRXPat contained keepend skipwhite start=+'+ skip=+\\'+ end=+'\s*+ contains=muttrcRXString nextgroup=muttrcRXPat syntax region muttrcRXPat contained keepend skipwhite start=+"+ skip=+\\"+ end=+"\s*+ contains=muttrcRXString nextgroup=muttrcRXPat syntax match muttrcRXPat contained /[^-'"#!]\S\+/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat syntax match muttrcRXDef contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat syntax match muttrcSpecial +\(['"]\)!\1+ syntax match muttrcSetStrAssignment contained skipwhite /=\s*\%(\\\?\$\)\?[0-9A-Za-z_-]\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcVariable,muttrcEscapedVariable syntax region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*"+hs=s+1 end=+"+ skip=+\\"+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcString syntax region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*'+hs=s+1 end=+'+ skip=+\\'+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcString syntax match muttrcSetBoolAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcVariable,muttrcEscapedVariable syntax match muttrcSetBoolAssignment contained skipwhite /=\s*\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax match muttrcSetBoolAssignment contained skipwhite /=\s*"\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax match muttrcSetBoolAssignment contained skipwhite /=\s*'\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax match muttrcSetQuadAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcVariable,muttrcEscapedVariable syntax match muttrcSetQuadAssignment contained skipwhite /=\s*\%(ask-\)\?\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax match muttrcSetQuadAssignment contained skipwhite /=\s*"\%(ask-\)\?\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax match muttrcSetQuadAssignment contained skipwhite /=\s*'\%(ask-\)\?\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax match muttrcSetNumAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr contains=muttrcVariable,muttrcEscapedVariable syntax match muttrcSetNumAssignment contained skipwhite /=\s*\d\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax match muttrcSetNumAssignment contained skipwhite /=\s*"\d\+"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax match muttrcSetNumAssignment contained skipwhite /=\s*'\d\+'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " Now catch some email addresses and headers (purified version from mail.vim) syntax match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+" syntax match muttrcHeader "\<\c\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\=" syntax match muttrcKeySpecial contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+ syntax match muttrcKey contained "\S\+" contains=muttrcKeySpecial,muttrcKeyName syntax region muttrcKey contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=muttrcKeySpecial,muttrcKeyName syntax region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=muttrcKeySpecial,muttrcKeyName syntax match muttrcKeyName contained "\\[trne]" syntax match muttrcKeyName contained "\c<\%(BackSpace\|BackTab\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|Next\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" syntax match muttrcKeyName contained "\c" syntax match muttrcFormatErrors contained /%./ syntax match muttrcStrftimeEscapes contained /%[AaBbCcDdeFGgHhIjklMmnpRrSsTtUuVvWwXxYyZz+%]/ syntax match muttrcStrftimeEscapes contained /%E[cCxXyY]/ syntax match muttrcStrftimeEscapes contained /%O[BdeHImMSuUVwWy]/ syntax region muttrcIndexFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcGroupIndexFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcGroupIndexFormatEscapes,muttrcGroupIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcGroupIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcGroupIndexFormatEscapes,muttrcGroupIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcSidebarFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSidebarFormatEscapes,muttrcSidebarFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcSidebarFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSidebarFormatEscapes,muttrcSidebarFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcQueryFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcAliasFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcAliasFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcAttachFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcAttachFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcComposeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcComposeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcFolderFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcFolderFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcMixFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcMixFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcPGPFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcPGPFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcPGPCmdFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcPGPCmdFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcStatusFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcStatusFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcPGPGetKeysFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcPGPGetKeysFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcSmimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcSmimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcStrftimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax region muttrcStrftimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " Format escapes and conditionals syntax match muttrcFormatConditionals2 contained /[^?]*?/ function s:escapesConditionals(baseName, sequence, alignment, secondary) exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?\%(' . a:sequence . '\|%\)/' if a:alignment exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%[>|*]./' endif if a:secondary exec 'syntax match muttrc' . a:baseName . 'Conditionals contained /%?\%(' . a:sequence . '\)?/ nextgroup=muttrcFormatConditionals2' else exec 'syntax match muttrc' . a:baseName . 'Conditionals contained /%?\%(' . a:sequence . '\)?/' endif endfunction " flatcap compiled a list of formats here: https://pastebin.com/raw/5QXhiP6L " UPDATE " The following info was pulled from hdr_format_str in hdrline.c call s:escapesConditionals('IndexFormat', '[AaBbCcDdEeFfgHIiJKLlMmNnOPqrSsTtuvWXxYyZz(<[{]\|G[a-zA-Z]\+', 1, 1) " The following info was pulled from alias_format_str in addrbook.c syntax match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[afnrt%]/ " The following info was pulled from newsgroup_format_str in browser.c call s:escapesConditionals('GroupIndexFormat', '[CdfMNns]', 1, 1) " The following info was pulled from cb_format_str in sidebar.c call s:escapesConditionals('SidebarFormat', '[BdFLNnSt!]', 1, 1) " The following info was pulled from query_format_str in query.c call s:escapesConditionals('QueryFormat', '[acent]', 0, 1) " The following info was pulled from mutt_attach_fmt in recvattach.c call s:escapesConditionals('AttachFormat', '[CcDdeFfIMmnQsTtuX]', 1, 1) " The following info was pulled from compose_format_str in compose.c syntax match muttrcComposeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ahlv%]/ syntax match muttrcComposeFormatEscapes contained /%[>|*]./ " The following info was pulled from folder_format_str in browser.c call s:escapesConditionals('FolderFormat', '[CDdfFglNstu]', 1, 0) " The following info was pulled from mix_entry_fmt in remailer.c call s:escapesConditionals('MixFormat', '[acns]', 0, 0) " The following info was pulled from crypt_entry_fmt in crypt-gpgme.c " and pgp_entry_fmt in pgpkey.c (note that crypt_entry_fmt supports " 'p', but pgp_entry_fmt does not). call s:escapesConditionals('PGPFormat', '[acfklnptu[]', 0, 0) " The following info was pulled from _mutt_fmt_pgp_command in " pgpinvoke.c call s:escapesConditionals('PGPCmdFormat', '[afprs]', 0, 1) " The following info was pulled from status_format_str in status.c call s:escapesConditionals('StatusFormat', '[bdFfhLlMmnoPprSstuVu]', 1, 1) " This matches the documentation, but directly contradicts the code " (according to the code, this should be identical to the " muttrcPGPCmdFormatEscapes syntax match muttrcPGPGetKeysFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acfklntu[%]/ " The following info was pulled from _mutt_fmt_smime_command in " smime.c call s:escapesConditionals('SmimeFormat', '[aCcdfiks]', 0, 1) syntax region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes syntax region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes syntax region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes syntax region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes syntax region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes syntax match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr syntax match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr syntax match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr syntax match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr syntax match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr syntax match muttrcVarEqualsGrpIdxFmt contained skipwhite "=" nextgroup=muttrcGroupIndexFormatStr syntax match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr syntax match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr syntax match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr syntax match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr syntax match muttrcVarEqualsSdbFmt contained skipwhite "=" nextgroup=muttrcSidebarFormatStr syntax match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr syntax match muttrcVarEqualsPGPGetKeysFmt contained skipwhite "=" nextgroup=muttrcPGPGetKeysFormatStr syntax match muttrcVarEqualsSmimeFmt contained skipwhite "=" nextgroup=muttrcSmimeFormatStr syntax match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStrftimeFormatStr syntax match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of the different screens in mutt " UPDATE syntax keyword muttrcMenu contained alias attach browser compose editor index pager postpone pgp mix query generic syntax match muttrcMenuList "\S\+" contained contains=muttrcMenu syntax match muttrcMenuCommas /,/ contained " List of hooks in Commands in init.h " UPDATE syntax keyword muttrcHooks contained skipwhite \ account-hook append-hook charset-hook \ close-hook crypt-hook fcc-hook fcc-save-hook folder-hook iconv-hook mbox-hook \ message-hook open-hook pgp-hook reply-hook save-hook send-hook send2-hook syntax keyword muttrcHooks skipwhite shutdown-hook startup-hook timeout-hook nextgroup=muttrcCommand syntax region muttrcSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL syntax region muttrcSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL syntax region muttrcNoSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern syntax region muttrcNoSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern syntax match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType syntax match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType syntax match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag syntax match muttrcUnHighlightSpace contained "\%(\s\+\|\\$\)" syntax keyword muttrcAsterisk contained * syntax keyword muttrcListsKeyword lists skipwhite nextgroup=muttrcGroupDef,muttrcComment syntax keyword muttrcListsKeyword unlists skipwhite nextgroup=muttrcAsterisk,muttrcComment syntax keyword muttrcSubscribeKeyword subscribe nextgroup=muttrcGroupDef,muttrcComment syntax keyword muttrcSubscribeKeyword unsubscribe nextgroup=muttrcAsterisk,muttrcComment syntax keyword muttrcAlternateKeyword contained alternates unalternates syntax region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment " muttrcVariable includes a prefix because partial strings are considered " valid. syntax match muttrcVariable contained "\\\@]\+" contains=muttrcEmail syntax match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName " First, functions that take regular expressions: syntax match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL syntax match muttrcRXHooks /\<\%(account\|append\|close\|crypt\|folder\|mbox\|open\|pgp\)-hook\>/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL " Now, functions that take patterns syntax match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern syntax match muttrcPatHooks /\<\%(charset\|iconv\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern syntax match muttrcPatHooks /\<\%(message\|reply\|send\|send2\|save\|fcc\|fcc-save\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern syntax match muttrcBindFunction contained /\S\+\>/ skipwhite contains=muttrcFunction syntax match muttrcBindFunctionNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL syntax match muttrcBindKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL syntax match muttrcBindKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindKey,muttrcBindKeyNL syntax match muttrcBindMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcBindKey,muttrcBindKeyNL syntax match muttrcBindMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL syntax region muttrcMacroDescr contained keepend skipwhite start=+\s*\S+ms=e skip=+\\ + end=+ \|$+me=s syntax region muttrcMacroDescr contained keepend skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s syntax region muttrcMacroDescr contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s syntax match muttrcMacroDescrNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL syntax region muttrcMacroBody contained skipwhite start="\S" skip='\\ \|\\$' end=' \|$' contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL syntax region muttrcMacroBody matchgroup=Type contained skipwhite start=+'+ms=e skip=+\\'+ end=+'\|\%(\%(\\\\\)\@]\+>/ contains=muttrcEmail nextgroup=muttrcAliasComma syntax match muttrcAliasEncEmailNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL syntax match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL syntax region muttrcAliasName contained matchgroup=Type start=/(/ end=/)/ skipwhite syntax match muttrcAliasNameNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL syntax match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL syntax match muttrcAliasKey contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL syntax match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL syntax match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL syntax match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL syntax match muttrcSimplePat contained "!\?\^\?[~][ADEFgGklNOpPQRSTuUvV=$]" syntax match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[0-9]\+[kM]\?[-]\%([0-9]\+[kM]\?\)\?\)" syntax match muttrcSimplePat contained "!\?\^\?[~][dr]\s*\%(\%(-\?[0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)\|\%(\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)-\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)\?\)\?\)\|\%([<>=][0-9]\+[ymwd]\)\|\%(`[^`]\+`\)\|\%(\$[a-zA-Z0-9_-]\+\)\)" contains=muttrcShellString,muttrcVariable syntax match muttrcSimplePat contained "!\?\^\?[~][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatRXContainer syntax match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString syntax match muttrcSimplePat contained "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString syntax region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat "syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXString syntax region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+ syntax region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+ syntax region muttrcSimplePatString contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 syntax region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXString syntax region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXString syntax region muttrcSimplePatRXContainer contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 contains=muttrcRXString syntax match muttrcSimplePatMetas contained /[(|)]/ syntax match muttrcOptSimplePat contained skipwhite /[~=%!(^].*/ contains=muttrcSimplePat,muttrcSimplePatMetas syntax match muttrcOptSimplePat contained skipwhite /[^~=%!(^].*/ contains=muttrcRXString syntax region muttrcOptPattern contained matchgroup=Type keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL syntax region muttrcOptPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL syntax region muttrcOptPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL syntax match muttrcOptPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL syntax match muttrcOptPattern contained skipwhite /[.]/ nextgroup=muttrcString,muttrcStringNL " Keep muttrcPattern and muttrcOptPattern synchronized syntax region muttrcPattern contained matchgroup=Type keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syntax region muttrcPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syntax region muttrcPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat syntax match muttrcPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat syntax match muttrcPattern contained skipwhite /[.]/ syntax region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syntax region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas " Colour definitions takes object, foreground and background arguments (regexps excluded). syntax match muttrcColorMatchCount contained "[0-9]\+" syntax match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syntax region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syntax region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syntax keyword muttrcColor contained black blue cyan default green magenta red white yellow syntax keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow syntax match muttrcColor contained "\<\%(bright\)\=color\d\{1,3}\>" " Now for the structure of the color line syntax match muttrcColorRXNL contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL syntax match muttrcColorBG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL syntax match muttrcColorBGNL contained skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL syntax match muttrcColorFG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL syntax match muttrcColorFGNL contained skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL syntax match muttrcColorContext contained /\s*[$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace,muttrcColorCompose nextgroup=muttrcColorFG,muttrcColorFGNL syntax match muttrcColorNL contained skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL,muttrcColorCompose syntax match muttrcColorKeyword contained /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL,muttrcColorCompose " And now color's brother: syntax region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syntax region muttrcUnColorPatterns contained skipwhite start=+\s*"+ end=+"+ skip=+\\"+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syntax match muttrcUnColorPatterns contained skipwhite /\s*[^'"\s]\S\*/ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syntax match muttrcUnColorPatNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syntax match muttrcUnColorAll contained skipwhite /[*]/ syntax match muttrcUnColorAPNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL syntax match muttrcUnColorIndex contained skipwhite /\s*index\s\+/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL syntax match muttrcUnColorIndexNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL syntax match muttrcUnColorKeyword contained skipwhite /^\s*uncolor\s\+/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL syntax region muttrcUnColorLine keepend start=+^\s*uncolor\s+ skip=+\\$+ end=+$+ contains=muttrcUnColorKeyword,muttrcComment,muttrcUnHighlightSpace syntax keyword muttrcMonoAttrib contained bold none normal reverse standout underline syntax keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField,muttrcColorCompose syntax match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono " List of fields in Fields in color.c " UPDATE syntax keyword muttrcColorField skipwhite contained \ attach_headers attachment bold error hdrdefault index_author index_collapsed \ index_date index_label index_number index_size index_subject index_tags \ indicator markers message normal progress prompt quoted search sidebar_divider \ sidebar_flagged sidebar_highlight sidebar_indicator sidebar_new \ sidebar_ordinary sidebar_spoolfile signature status tilde tree underline \ body header index index_flags index_tag \ nextgroup=muttrcColor syntax match muttrcColorField contained "\" syntax match muttrcColorCompose skipwhite contained /\s*compose\s*/ nextgroup=muttrcColorComposeField " List of fields in ComposeFields in color.c " UPDATE syntax keyword muttrcColorComposeField skipwhite contained \ header security_encrypt security_sign security_both security_none \ nextgroup=muttrcColorFG,muttrcColorFGNL syntax region muttrcColorLine keepend start=/^\s*color\s\+/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace function s:boolQuadGen(type, vars, deprecated) let l:novars = copy(a:vars) call map(l:novars, '"no" . v:val') let l:invvars = copy(a:vars) call map(l:invvars, '"inv" . v:val') let l:orig_type = copy(a:type) if a:deprecated let l:type = 'Deprecated' . a:type else let l:type = a:type endif exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(a:vars) . ' nextgroup=muttrcSet' . l:orig_type . 'Assignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr' exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(l:novars) . ' nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr' exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(l:invvars) . ' nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr' endfunction " List of DT_BOOL in MuttVars in init.h " UPDATE call s:boolQuadGen('Bool', [ \ 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'askbcc', 'askcc', \ 'ask_follow_up', 'ask_x_comment_to', 'attach_split', 'autoedit', 'auto_tag', \ 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly', 'check_mbox_size', \ 'check_new', 'collapse_all', 'collapse_flagged', 'collapse_unread', \ 'confirmappend', 'confirmcreate', 'crypt_autoencrypt', 'crypt_autopgp', \ 'crypt_autosign', 'crypt_autosmime', 'crypt_confirmhook', \ 'crypt_opportunistic_encrypt', 'crypt_replyencrypt', 'crypt_replysign', \ 'crypt_replysignencrypted', 'crypt_timestamp', 'crypt_use_gpgme', \ 'crypt_use_pka', 'delete_untag', 'digest_collapse', 'duplicate_threads', \ 'edit_headers', 'encode_from', 'fast_reply', 'fcc_clear', 'flag_safe', \ 'followup_to', 'force_name', 'forward_decode', 'forward_decrypt', \ 'forward_quote', 'forward_references', 'hdrs', 'header', \ 'header_cache_compress', 'header_color_partial', 'help', 'hidden_host', \ 'hide_limited', 'hide_missing', 'hide_thread_subject', 'hide_top_limited', \ 'hide_top_missing', 'history_remove_dups', 'honor_disposition', 'idn_decode', \ 'idn_encode', 'ignore_linear_white_space', 'ignore_list_reply_to', \ 'imap_check_subscribed', 'imap_idle', 'imap_list_subscribed', 'imap_passive', \ 'imap_peek', 'imap_servernoise', 'implicit_autoview', 'include_onlyfirst', \ 'keep_flagged', 'keywords_legacy', 'keywords_standard', 'mailcap_sanitize', \ 'mail_check_recent', 'mail_check_stats', 'maildir_check_cur', \ 'maildir_header_cache_verify', 'maildir_trash', 'markers', 'mark_old', \ 'menu_move_off', 'menu_scroll', 'message_cache_clean', 'meta_key', 'metoo', \ 'mh_purge', 'mime_forward_decode', 'mime_subject', 'mime_type_query_first', \ 'narrow_tree', 'nm_record', 'nntp_listgroup', 'nntp_load_description', \ 'pager_stop', 'pgp_auto_decode', 'pgp_autoinline', 'pgp_check_exit', \ 'pgp_ignore_subkeys', 'pgp_long_ids', 'pgp_replyinline', \ 'pgp_retainable_sigs', 'pgp_self_encrypt', 'pgp_show_unusable', \ 'pgp_strict_enc', 'pgp_use_gpg_agent', 'pipe_decode', 'pipe_split', \ 'pop_auth_try_all', 'pop_last', 'postpone_encrypt', 'print_decode', \ 'print_split', 'prompt_after', 'read_only', 'reflow_space_quotes', \ 'reflow_text', 'reply_self', 'reply_with_xorig', 'resolve', \ 'resume_draft_files', 'resume_edited_draft_files', 'reverse_alias', \ 'reverse_name', 'reverse_realname', 'rfc2047_parameters', 'save_address', \ 'save_empty', 'save_name', 'save_unsubscribed', 'score', 'show_new_news', \ 'show_only_unread', 'sidebar_folder_indent', 'sidebar_new_mail_only', \ 'sidebar_next_new_wrap', 'sidebar_on_right', 'sidebar_short_path', \ 'sidebar_visible', 'sig_dashes', 'sig_on_top', 'smart_wrap', \ 'smime_ask_cert_label', 'smime_decrypt_use_default_key', 'smime_is_default', \ 'smime_self_encrypt', 'sort_re', 'ssl_force_tls', 'ssl_use_sslv2', \ 'ssl_use_sslv3', 'ssl_usesystemcerts', 'ssl_use_tlsv1', 'ssl_use_tlsv1_1', \ 'ssl_use_tlsv1_2', 'ssl_verify_dates', 'ssl_verify_host', \ 'ssl_verify_partial_chains', 'status_on_top', 'strict_threads', 'suspend', \ 'text_flowed', 'thorough_search', 'thread_received', 'tilde', 'ts_enabled', \ 'uncollapse_jump', 'uncollapse_new', 'use_8bitmime', 'use_domain', \ 'use_envelope_from', 'use_from', 'use_ipv6', 'user_agent', \ 'virtual_spoolfile', 'wait_key', 'weed', 'wrap_search', 'write_bcc', \ 'x_comment_to' \ ], 0) " Deprecated Bools " UPDATE " List of DT_SYNONYM synonyms of Bools in MuttVars in init.h call s:boolQuadGen('Bool', [ \ 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt', 'forw_quote', \ 'pgp_autoencrypt', 'pgp_autosign', 'pgp_auto_traditional', \ 'pgp_create_traditional', 'pgp_replyencrypt', 'pgp_replysign', \ 'pgp_replysignencrypted', 'xterm_set_titles' \ ], 1) " List of DT_QUAD in MuttVars in init.h " UPDATE call s:boolQuadGen('Quad', [ \ 'abort_noattach', 'abort_nosubject', 'abort_unmodified', 'bounce', \ 'catchup_newsgroup', 'copy', 'crypt_verify_sig', 'delete', 'fcc_attach', \ 'followup_to_poster', 'forward_edit', 'honor_followup_to', 'include', \ 'mime_forward', 'mime_forward_rest', 'move', 'pgp_encrypt_self', \ 'pgp_mime_auto', 'pop_delete', 'pop_reconnect', 'post_moderated', 'postpone', \ 'print', 'quit', 'recall', 'reply_to', 'smime_encrypt_self', 'ssl_starttls', \ ], 0) " Deprecated Quads " UPDATE " List of DT_SYNONYM synonyms of Quads in MuttVars in init.h call s:boolQuadGen('Quad', [ \ 'mime_fwd', 'pgp_verify_sig' \ ], 1) " List of DT_NUMBER in MuttVars in init.h " UPDATE syntax keyword muttrcVarNum skipwhite contained \ connect_timeout debug_level history imap_keepalive imap_pipeline_depth \ imap_poll_timeout mail_check mail_check_stats_interval menu_context net_inc \ nm_db_limit nm_open_timeout nm_query_window_current_position \ nm_query_window_duration nntp_context nntp_poll pager_context \ pager_index_lines pgp_timeout pop_checkinterval read_inc reflow_wrap \ save_history score_threshold_delete score_threshold_flag score_threshold_read \ search_context sendmail_wait sidebar_width skip_quoted_offset sleep_time \ smime_timeout ssl_min_dh_prime_bits time_inc timeout wrap wrap_headers \ wrapmargin write_inc \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_STRING in MuttVars in init.h " UPDATE " Special cases first, and all the rest at the end " A lot of special cases are format, flatcap compiled a list here https://pastebin.com/raw/5QXhiP6L " Formats themselves must be updated in their respective groups " See s:escapesConditionals syntax match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax keyword muttrcVarStr contained skipwhite alias_format nextgroup=muttrcVarEqualsAliasFmt syntax keyword muttrcVarStr contained skipwhite attach_format nextgroup=muttrcVarEqualsAttachFmt syntax keyword muttrcVarStr contained skipwhite compose_format nextgroup=muttrcVarEqualsComposeFmt syntax keyword muttrcVarStr contained skipwhite folder_format vfolder_format nextgroup=muttrcVarEqualsFolderFmt syntax keyword muttrcVarStr contained skipwhite attribution index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt " Deprecated format syntax keyword muttrcVarDeprecatedStr contained skipwhite hdr_format msg_format nextgroup=muttrcVarEqualsIdxFmt syntax keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt syntax keyword muttrcVarStr contained skipwhite \ pgp_decode_command pgp_verify_command pgp_decrypt_command \ pgp_clearsign_command pgp_sign_command pgp_encrypt_sign_command \ pgp_encrypt_only_command pgp_import_command pgp_export_command \ pgp_verify_key_command pgp_list_secring_command pgp_list_pubring_command \ nextgroup=muttrcVarEqualsPGPCmdFmt syntax keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt syntax keyword muttrcVarStr contained skipwhite pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt syntax keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFmt syntax keyword muttrcVarStr contained skipwhite \ smime_decrypt_command smime_verify_command smime_verify_opaque_command \ smime_sign_command smime_sign_opaque_command smime_encrypt_command \ smime_pk7out_command smime_get_cert_command smime_get_signer_cert_command \ smime_import_cert_command smime_get_cert_email_command \ nextgroup=muttrcVarEqualsSmimeFmt syntax keyword muttrcVarStr contained skipwhite ts_icon_format ts_status_format status_format nextgroup=muttrcVarEqualsStatusFmt " Deprecated format syntax keyword muttrcVarDeprecatedStr contained skipwhite xterm_icon xterm_title nextgroup=muttrcVarEqualsStatusFmt syntax keyword muttrcVarStr contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFmt syntax keyword muttrcVarStr contained skipwhite group_index_format nextgroup=muttrcVarEqualsGrpIdxFmt syntax keyword muttrcVarStr contained skipwhite sidebar_format nextgroup=muttrcVarEqualsSdbFmt syntax keyword muttrcVarStr contained skipwhite \ assumed_charset attach_charset attach_sep attribution_locale charset \ config_charset content_type default_hook dsn_notify dsn_return empty_subject \ escape forward_attribution_intro forward_attribution_trailer forward_format \ header_cache_pagesize hostname imap_authenticators imap_delim_chars \ imap_headers imap_login imap_pass imap_user indent_string mailcap_path \ mark_macro_prefix mh_seq_flagged mh_seq_replied mh_seq_unseen \ mime_type_query_command newsgroups_charset news_server nm_default_uri \ nm_exclude_tags nm_hidden_tags nm_query_type nm_query_window_current_search \ nm_query_window_timebase nm_record_tags nm_unread_tag nntp_authenticators \ nntp_pass nntp_user pgp_self_encrypt_as pgp_sign_as pipe_sep \ pop_authenticators pop_host pop_pass pop_user post_indent_string \ postpone_encrypt_as preconnect realname send_charset \ show_multipart_alternative sidebar_delim_chars sidebar_divider_char \ sidebar_indent_string simple_search smime_default_key smime_encrypt_with \ smime_self_encrypt_as smime_sign_digest_alg smtp_authenticators smtp_pass \ smtp_url spam_separator ssl_ciphers tunnel xlabel_delimiter \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " Deprecated strings syntax keyword muttrcVarDeprecatedStr contained skipwhite \ forw_format indent_str post_indent_str smime_sign_as \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_ADDRESS syntax keyword muttrcVarStr contained skipwhite envelope_from_address from nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_HCACHE syntax keyword muttrcVarStr contained skipwhite header_cache_backend nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_MAGIC syntax keyword muttrcVarStr contained skipwhite mbox_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_MBTABLE syntax keyword muttrcVarStr contained skipwhite flag_chars from_chars status_chars to_chars nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_PATH syntax keyword muttrcVarStr contained skipwhite \ alias_file certificate_file debug_file display_filter editor entropy_file \ folder header_cache history_file inews ispell mbox message_cachedir mixmaster \ new_mail_command news_cache_dir newsrc pager postponed print_command \ query_command record sendmail shell signature smime_ca_location \ smime_certificates smime_keys spoolfile ssl_ca_certificates_file \ ssl_client_cert tmpdir trash visual \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of deprecated DT_PATH syntax keyword muttrcVarDeprecatedStr contained skipwhite print_cmd nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_REGEX syntax keyword muttrcVarStr contained skipwhite \ attach_keyword gecos_mask mask pgp_decryption_okay pgp_good_sign quote_regexp \ reply_regexp smileys \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_SORT syntax keyword muttrcVarStr contained skipwhite \ pgp_sort_keys sidebar_sort_method sort sort_alias sort_aux sort_browser \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of commands in Commands in init.h " UPDATE " Remember to remove hooks, they have already been dealt with syntax keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString syntax keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks syntax keyword muttrcCommand skipwhite spam nextgroup=muttrcSpamPattern syntax keyword muttrcCommand skipwhite nospam nextgroup=muttrcNoSpamPattern syntax keyword muttrcCommand skipwhite bind nextgroup=muttrcBindMenuList,muttrcBindMenuListNL syntax keyword muttrcCommand skipwhite macro nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL syntax keyword muttrcCommand skipwhite alias nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL syntax keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrcUnAliasNL syntax keyword muttrcCommand skipwhite set unset reset toggle nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax keyword muttrcCommand skipwhite exec nextgroup=muttrcFunction syntax keyword muttrcCommand skipwhite \ alternative_order attachments auto_view hdr_order ifdef ifndef ignore lua \ lua-source mailboxes mailto_allow mime_lookup my_hdr push score setenv \ sidebar_whitelist source subjectrx tag-formats tag-transforms \ unalternative_order unattachments unauto_view uncolor unhdr_order unignore \ unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore unsetenv \ unsidebar_whitelist unsubjectrx unvirtual-mailboxes virtual-mailboxes " List of functions in functions.h " UPDATE syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" syntax match muttrcFunction contained "\" " Define the default highlighting. " Only when an item doesn't have highlighting yet highlight def link muttrcComment Comment highlight def link muttrcEscape SpecialChar highlight def link muttrcRXChars SpecialChar highlight def link muttrcString String highlight def link muttrcRXString String highlight def link muttrcRXString2 String highlight def link muttrcSpecial Special highlight def link muttrcHooks Type highlight def link muttrcGroupFlag Type highlight def link muttrcGroupDef Macro highlight def link muttrcAddrDef muttrcGroupFlag highlight def link muttrcRXDef muttrcGroupFlag highlight def link muttrcRXPat String highlight def link muttrcAliasGroupName Macro highlight def link muttrcAliasKey Identifier highlight def link muttrcUnAliasKey Identifier highlight def link muttrcAliasEncEmail Identifier highlight def link muttrcAliasParens Type highlight def link muttrcSetNumAssignment Number highlight def link muttrcSetBoolAssignment Boolean highlight def link muttrcSetQuadAssignment Boolean highlight def link muttrcSetStrAssignment String highlight def link muttrcEmail Special highlight def link muttrcVariableInner Special highlight def link muttrcEscapedVariable String highlight def link muttrcHeader Type highlight def link muttrcKeySpecial SpecialChar highlight def link muttrcKey Type highlight def link muttrcKeyName SpecialChar highlight def link muttrcVarBool Identifier highlight def link muttrcVarQuad Identifier highlight def link muttrcVarNum Identifier highlight def link muttrcVarStr Identifier highlight def link muttrcMenu Identifier highlight def link muttrcCommand Keyword highlight def link muttrcMacroDescr String highlight def link muttrcAction Macro highlight def link muttrcBadAction Error highlight def link muttrcBindFunction Error highlight def link muttrcBindMenuList Error highlight def link muttrcFunction Macro highlight def link muttrcGroupKeyword muttrcCommand highlight def link muttrcGroupLine Error highlight def link muttrcSubscribeKeyword muttrcCommand highlight def link muttrcSubscribeLine Error highlight def link muttrcListsKeyword muttrcCommand highlight def link muttrcListsLine Error highlight def link muttrcAlternateKeyword muttrcCommand highlight def link muttrcAlternatesLine Error highlight def link muttrcAttachmentsLine muttrcCommand highlight def link muttrcAttachmentsFlag Type highlight def link muttrcAttachmentsMimeType String highlight def link muttrcColorLine Error highlight def link muttrcColorContext Error highlight def link muttrcColorContextI Identifier highlight def link muttrcColorContextH Identifier highlight def link muttrcColorKeyword muttrcCommand highlight def link muttrcColorField Identifier highlight def link muttrcColorCompose Identifier highlight def link muttrcColorComposeField Identifier highlight def link muttrcColor Type highlight def link muttrcColorFG Error highlight def link muttrcColorFGI Error highlight def link muttrcColorFGH Error highlight def link muttrcColorBG Error highlight def link muttrcColorBGI Error highlight def link muttrcColorBGH Error highlight def link muttrcMonoAttrib muttrcColor highlight def link muttrcMono muttrcCommand highlight def link muttrcSimplePat Identifier highlight def link muttrcSimplePatString Macro highlight def link muttrcSimplePatMetas Special highlight def link muttrcPattern Error highlight def link muttrcUnColorLine Error highlight def link muttrcUnColorKeyword muttrcCommand highlight def link muttrcUnColorIndex Identifier highlight def link muttrcShellString muttrcEscape highlight def link muttrcRXHooks muttrcCommand highlight def link muttrcRXHookNot Type highlight def link muttrcPatHooks muttrcCommand highlight def link muttrcPatHookNot Type highlight def link muttrcFormatConditionals2 Type highlight def link muttrcIndexFormatStr muttrcString highlight def link muttrcIndexFormatEscapes muttrcEscape highlight def link muttrcIndexFormatConditionals muttrcFormatConditionals2 highlight def link muttrcAliasFormatStr muttrcString highlight def link muttrcAliasFormatEscapes muttrcEscape highlight def link muttrcAttachFormatStr muttrcString highlight def link muttrcAttachFormatEscapes muttrcEscape highlight def link muttrcAttachFormatConditionals muttrcFormatConditionals2 highlight def link muttrcComposeFormatStr muttrcString highlight def link muttrcComposeFormatEscapes muttrcEscape highlight def link muttrcFolderFormatStr muttrcString highlight def link muttrcFolderFormatEscapes muttrcEscape highlight def link muttrcFolderFormatConditionals muttrcFormatConditionals2 highlight def link muttrcMixFormatStr muttrcString highlight def link muttrcMixFormatEscapes muttrcEscape highlight def link muttrcMixFormatConditionals muttrcFormatConditionals2 highlight def link muttrcPGPFormatStr muttrcString highlight def link muttrcPGPFormatEscapes muttrcEscape highlight def link muttrcPGPFormatConditionals muttrcFormatConditionals2 highlight def link muttrcPGPCmdFormatStr muttrcString highlight def link muttrcPGPCmdFormatEscapes muttrcEscape highlight def link muttrcPGPCmdFormatConditionals muttrcFormatConditionals2 highlight def link muttrcStatusFormatStr muttrcString highlight def link muttrcStatusFormatEscapes muttrcEscape highlight def link muttrcStatusFormatConditionals muttrcFormatConditionals2 highlight def link muttrcPGPGetKeysFormatStr muttrcString highlight def link muttrcPGPGetKeysFormatEscapes muttrcEscape highlight def link muttrcSmimeFormatStr muttrcString highlight def link muttrcSmimeFormatEscapes muttrcEscape highlight def link muttrcSmimeFormatConditionals muttrcFormatConditionals2 highlight def link muttrcTimeEscapes muttrcEscape highlight def link muttrcPGPTimeEscapes muttrcEscape highlight def link muttrcStrftimeEscapes Type highlight def link muttrcStrftimeFormatStr muttrcString highlight def link muttrcFormatErrors Error highlight def link muttrcBindFunctionNL SpecialChar highlight def link muttrcBindKeyNL SpecialChar highlight def link muttrcBindMenuListNL SpecialChar highlight def link muttrcMacroDescrNL SpecialChar highlight def link muttrcMacroBodyNL SpecialChar highlight def link muttrcMacroKeyNL SpecialChar highlight def link muttrcMacroMenuListNL SpecialChar highlight def link muttrcColorMatchCountNL SpecialChar highlight def link muttrcColorNL SpecialChar highlight def link muttrcColorRXNL SpecialChar highlight def link muttrcColorBGNL SpecialChar highlight def link muttrcColorFGNL SpecialChar highlight def link muttrcAliasNameNL SpecialChar highlight def link muttrcAliasENNL SpecialChar highlight def link muttrcAliasNL SpecialChar highlight def link muttrcUnAliasNL SpecialChar highlight def link muttrcAliasGroupDefNL SpecialChar highlight def link muttrcAliasEncEmailNL SpecialChar highlight def link muttrcPatternNL SpecialChar highlight def link muttrcUnColorPatNL SpecialChar highlight def link muttrcUnColorAPNL SpecialChar highlight def link muttrcUnColorIndexNL SpecialChar highlight def link muttrcStringNL SpecialChar highlight def link muttrcVarDeprecatedBool Error highlight def link muttrcVarDeprecatedQuad Error highlight def link muttrcVarDeprecatedStr Error let b:current_syntax = "neomuttrc" let &cpo = s:cpo_save unlet s:cpo_save "EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim neovim-0.2.2/runtime/syntax/netrc.vim000066400000000000000000000036161320401574200176550ustar00rootroot00000000000000" Vim syntax file " Language: netrc(5) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2010-01-03 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword netrcKeyword machine nextgroup=netrcMachine skipwhite skipnl syn keyword netrcKeyword account \ login \ nextgroup=netrcLogin,netrcSpecial skipwhite skipnl syn keyword netrcKeyword password nextgroup=netrcPassword skipwhite skipnl syn keyword netrcKeyword default syn keyword netrcKeyword macdef \ nextgroup=netrcInit,netrcMacroName skipwhite skipnl syn region netrcMacro contained start='.' end='^$' syn match netrcMachine contained display '\S\+' syn match netrcMachine contained display '"[^\\"]*\(\\.[^\\"]*\)*"' syn match netrcLogin contained display '\S\+' syn match netrcLogin contained display '"[^\\"]*\(\\.[^\\"]*\)*"' syn match netrcPassword contained display '\S\+' syn match netrcPassword contained display '"[^\\"]*\(\\.[^\\"]*\)*"' syn match netrcMacroName contained display '\S\+' \ nextgroup=netrcMacro skipwhite skipnl syn match netrcMacroName contained display '"[^\\"]*\(\\.[^\\"]*\)*"' \ nextgroup=netrcMacro skipwhite skipnl syn keyword netrcSpecial contained anonymous syn match netrcInit contained '\" contained skipwhite " ----------------------------- " Special filetype highlighting {{{1 " ----------------------------- if exists("g:netrw_special_syntax") && netrw_special_syntax syn match netrwBak "\(\S\+ \)*\S\+\.bak\>" contains=netrwTreeBar,@NoSpell syn match netrwCompress "\(\S\+ \)*\S\+\.\%(gz\|bz2\|Z\|zip\)\>" contains=netrwTreeBar,@NoSpell if has("unix") syn match netrwCoreDump "\" contains=netrwTreeBar,@NoSpell endif syn match netrwLex "\(\S\+ \)*\S\+\.\%(l\|lex\)\>" contains=netrwTreeBar,@NoSpell syn match netrwYacc "\(\S\+ \)*\S\+\.y\>" contains=netrwTreeBar,@NoSpell syn match netrwData "\(\S\+ \)*\S\+\.dat\>" contains=netrwTreeBar,@NoSpell syn match netrwDoc "\(\S\+ \)*\S\+\.\%(doc\|txt\|pdf\|ps\)" contains=netrwTreeBar,@NoSpell syn match netrwHdr "\(\S\+ \)*\S\+\.\%(h\|hpp\)\>" contains=netrwTreeBar,@NoSpell syn match netrwLib "\(\S\+ \)*\S*\.\%(a\|so\|lib\|dll\)\>" contains=netrwTreeBar,@NoSpell syn match netrwMakeFile "\<[mM]akefile\>\|\(\S\+ \)*\S\+\.mak\>" contains=netrwTreeBar,@NoSpell syn match netrwObj "\(\S\+ \)*\S*\.\%(o\|obj\)\>" contains=netrwTreeBar,@NoSpell syn match netrwTags "\<\(ANmenu\|ANtags\)\>" contains=netrwTreeBar,@NoSpell syn match netrwTags "\" contains=netrwTreeBar,@NoSpell syn match netrwTilde "\(\S\+ \)*\S\+\~\*\=\>" contains=netrwTreeBar,@NoSpell syn match netrwTmp "\\|\(\S\+ \)*\S*tmp\>" contains=netrwTreeBar,@NoSpell endif " --------------------------------------------------------------------- " Highlighting Links: {{{1 if !exists("did_drchip_netrwlist_syntax") let did_drchip_netrwlist_syntax= 1 hi default link netrwClassify Function hi default link netrwCmdSep Delimiter hi default link netrwComment Comment hi default link netrwDir Directory hi default link netrwHelpCmd Function hi default link netrwQHTopic Number hi default link netrwHidePat Statement hi default link netrwHideSep netrwComment hi default link netrwList Statement hi default link netrwVersion Identifier hi default link netrwSymLink Question hi default link netrwExe PreProc hi default link netrwDateSep Delimiter hi default link netrwTreeBar Special hi default link netrwTimeSep netrwDateSep hi default link netrwComma netrwComment hi default link netrwHide netrwComment hi default link netrwMarkFile TabLineSel hi default link netrwLink Special " special syntax highlighting (see :he g:netrw_special_syntax) hi default link netrwBak NonText hi default link netrwCompress Folded hi default link netrwCoreDump WarningMsg hi default link netrwData DiffChange hi default link netrwHdr netrwPlain hi default link netrwLex netrwPlain hi default link netrwLib DiffChange hi default link netrwMakefile DiffChange hi default link netrwObj Folded hi default link netrwTilde Folded hi default link netrwTmp Folded hi default link netrwTags Folded hi default link netrwYacc netrwPlain endif " Current Syntax: {{{1 let b:current_syntax = "netrwlist" " --------------------------------------------------------------------- " vim: ts=8 fdm=marker neovim-0.2.2/runtime/syntax/ninja.vim000066400000000000000000000051001320401574200176270ustar00rootroot00000000000000" ninja build file syntax. " Language: ninja build file as described at " http://martine.github.com/ninja/manual.html " Version: 1.4 " Last Change: 2014/05/13 " Maintainer: Nicolas Weber " Version 1.4 of this script is in the upstream vim repository and will be " included in the next vim release. If you change this, please send your change " upstream. " ninja lexer and parser are at " https://github.com/martine/ninja/blob/master/src/lexer.in.cc " https://github.com/martine/ninja/blob/master/src/manifest_parser.cc if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case match syn match ninjaComment /#.*/ contains=@Spell " Toplevel statements are the ones listed here and " toplevel variable assignments (ident '=' value). " lexer.in.cc, ReadToken() and manifest_parser.cc, Parse() syn match ninjaKeyword "^build\>" syn match ninjaKeyword "^rule\>" syn match ninjaKeyword "^pool\>" syn match ninjaKeyword "^default\>" syn match ninjaKeyword "^include\>" syn match ninjaKeyword "^subninja\>" " Both 'build' and 'rule' begin a variable scope that ends " on the first line without indent. 'rule' allows only a " limited set of magic variables, 'build' allows general " let assignments. " manifest_parser.cc, ParseRule() syn region ninjaRule start="^rule" end="^\ze\S" contains=ALL transparent syn keyword ninjaRuleCommand contained command deps depfile description generator \ pool restat rspfile rspfile_content syn region ninjaPool start="^pool" end="^\ze\S" contains=ALL transparent syn keyword ninjaPoolCommand contained depth " Strings are parsed as follows: " lexer.in.cc, ReadEvalString() " simple_varname = [a-zA-Z0-9_-]+; " varname = [a-zA-Z0-9_.-]+; " $$ -> $ " $\n -> line continuation " '$ ' -> escaped space " $simple_varname -> variable " ${varname} -> variable syn match ninjaDollar "\$\$" syn match ninjaWrapLineOperator "\$$" syn match ninjaSimpleVar "\$[a-zA-Z0-9_-]\+" syn match ninjaVar "\${[a-zA-Z0-9_.-]\+}" " operators are: " variable assignment = " rule definition : " implicit dependency | " order-only dependency || syn match ninjaOperator "\(=\|:\||\|||\)\ze\s" hi def link ninjaComment Comment hi def link ninjaKeyword Keyword hi def link ninjaRuleCommand Statement hi def link ninjaPoolCommand Statement hi def link ninjaDollar ninjaOperator hi def link ninjaWrapLineOperator ninjaOperator hi def link ninjaOperator Operator hi def link ninjaSimpleVar ninjaVar hi def link ninjaVar Identifier let b:current_syntax = "ninja" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/nosyntax.vim000066400000000000000000000013631320401574200204220ustar00rootroot00000000000000" Vim syntax support file " Maintainer: Bram Moolenaar " Last Change: 2006 Apr 16 " This file is used for ":syntax off". " It removes the autocommands and stops highlighting for all buffers. if !has("syntax") finish endif " Remove all autocommands for the Syntax event. This also avoids that " "syntax=foo" in a modeline triggers the SynSet() function of synload.vim. au! Syntax " remove all syntax autocommands and remove the syntax for each buffer augroup syntaxset au! au BufEnter * syn clear au BufEnter * if exists("b:current_syntax") | unlet b:current_syntax | endif doautoall syntaxset BufEnter * au! augroup END if exists("syntax_on") unlet syntax_on endif if exists("syntax_manual") unlet syntax_manual endif neovim-0.2.2/runtime/syntax/nqc.vim000066400000000000000000000333641320401574200173260ustar00rootroot00000000000000" Vim syntax file " Language: NQC - Not Quite C, for LEGO mindstorms " NQC homepage: http://www.enteract.com/~dbaum/nqc/ " Maintainer: Stefan Scherer " Last Change: 2001 May 10 " URL: http://www.enotes.de/twiki/pub/Home/LegoMindstorms/nqc.vim " Filenames: .nqc " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Statements syn keyword nqcStatement break return continue start stop abs sign syn keyword nqcStatement sub task syn keyword nqcLabel case default syn keyword nqcConditional if else switch syn keyword nqcRepeat while for do until repeat " Scout and RCX2 syn keyword nqcEvents acquire catch monitor " types and classes syn keyword nqcType int true false void syn keyword nqcStorageClass asm const inline " Sensors -------------------------------------------- " Input Sensors syn keyword nqcConstant SENSOR_1 SENSOR_2 SENSOR_3 " Types for SetSensorType() syn keyword nqcConstant SENSOR_TYPE_TOUCH SENSOR_TYPE_TEMPERATURE syn keyword nqcConstant SENSOR_TYPE_LIGHT SENSOR_TYPE_ROTATION syn keyword nqcConstant SENSOR_LIGHT SENSOR_TOUCH " Modes for SetSensorMode() syn keyword nqcConstant SENSOR_MODE_RAW SENSOR_MODE_BOOL syn keyword nqcConstant SENSOR_MODE_EDGE SENSOR_MODE_PULSE syn keyword nqcConstant SENSOR_MODE_PERCENT SENSOR_MODE_CELSIUS syn keyword nqcConstant SENSOR_MODE_FAHRENHEIT SENSOR_MODE_ROTATION " Sensor configurations for SetSensor() syn keyword nqcConstant SENSOR_TOUCH SENSOR_LIGHT SENSOR_ROTATION syn keyword nqcConstant SENSOR_CELSIUS SENSOR_FAHRENHEIT SENSOR_PULSE syn keyword nqcConstant SENSOR_EDGE " Functions - All syn keyword nqcFunction ClearSensor syn keyword nqcFunction SensorValue SensorType " Functions - RCX syn keyword nqcFunction SetSensor SetSensorType syn keyword nqcFunction SensorValueBool " Functions - RCX, CyberMaster syn keyword nqcFunction SetSensorMode SensorMode " Functions - RCX, Scout syn keyword nqcFunction SensorValueRaw " Functions - Scout syn keyword nqcFunction SetSensorLowerLimit SetSensorUpperLimit syn keyword nqcFunction SetSensorHysteresis CalibrateSensor " Outputs -------------------------------------------- " Outputs for On(), Off(), etc. syn keyword nqcConstant OUT_A OUT_B OUT_C " Modes for SetOutput() syn keyword nqcConstant OUT_ON OUT_OFF OUT_FLOAT " Directions for SetDirection() syn keyword nqcConstant OUT_FWD OUT_REV OUT_TOGGLE " Output power for SetPower() syn keyword nqcConstant OUT_LOW OUT_HALF OUT_FULL " Functions - All syn keyword nqcFunction SetOutput SetDirection SetPower OutputStatus syn keyword nqcFunction On Off Float Fwd Rev Toggle syn keyword nqcFunction OnFwd OnRev OnFor " Functions - RXC2, Scout syn keyword nqcFunction SetGlobalOutput SetGlobalDirection SetMaxPower syn keyword nqcFunction GlobalOutputStatus " Sound ---------------------------------------------- " Sounds for PlaySound() syn keyword nqcConstant SOUND_CLICK SOUND_DOUBLE_BEEP SOUND_DOWN syn keyword nqcConstant SOUND_UP SOUND_LOW_BEEP SOUND_FAST_UP " Functions - All syn keyword nqcFunction PlaySound PlayTone " Functions - RCX2, Scout syn keyword nqcFunction MuteSound UnmuteSound ClearSound syn keyword nqcFunction SelectSounds " LCD ------------------------------------------------ " Modes for SelectDisplay() syn keyword nqcConstant DISPLAY_WATCH DISPLAY_SENSOR_1 DISPLAY_SENSOR_2 syn keyword nqcConstant DISPLAY_SENSOR_3 DISPLAY_OUT_A DISPLAY_OUT_B syn keyword nqcConstant DISPLAY_OUT_C " RCX2 syn keyword nqcConstant DISPLAY_USER " Functions - RCX syn keyword nqcFunction SelectDisplay " Functions - RCX2 syn keyword nqcFunction SetUserDisplay " Communication -------------------------------------- " Messages - RCX, Scout ------------------------------ " Tx power level for SetTxPower() syn keyword nqcConstant TX_POWER_LO TX_POWER_HI " Functions - RCX, Scout syn keyword nqcFunction Message ClearMessage SendMessage SetTxPower " Serial - RCX2 -------------------------------------- " for SetSerialComm() syn keyword nqcConstant SERIAL_COMM_DEFAULT SERIAL_COMM_4800 syn keyword nqcConstant SERIAL_COMM_DUTY25 SERIAL_COMM_76KHZ " for SetSerialPacket() syn keyword nqcConstant SERIAL_PACKET_DEFAULT SERIAL_PACKET_PREAMBLE syn keyword nqcConstant SERIAL_PACKET_NEGATED SERIAL_PACKET_CHECKSUM syn keyword nqcConstant SERIAL_PACKET_RCX " Functions - RCX2 syn keyword nqcFunction SetSerialComm SetSerialPacket SetSerialData syn keyword nqcFunction SerialData SendSerial " VLL - Scout ---------------------------------------- " Functions - Scout syn keyword nqcFunction SendVLL " Timers --------------------------------------------- " Functions - All syn keyword nqcFunction ClearTimer Timer " Functions - RCX2 syn keyword nqcFunction SetTimer FastTimer " Counters ------------------------------------------- " Functions - RCX2, Scout syn keyword nqcFunction ClearCounter IncCounter DecCounter Counter " Access Control ------------------------------------- syn keyword nqcConstant ACQUIRE_OUT_A ACQUIRE_OUT_B ACQUIRE_OUT_C syn keyword nqcConstant ACQUIRE_SOUND " RCX2 only syn keyword nqcConstant ACQUIRE_USER_1 ACQUIRE_USER_2 ACQUIRE_USER_3 syn keyword nqcConstant ACQUIRE_USER_4 " Functions - RCX2, Scout syn keyword nqcFunction SetPriority " Events --------------------------------------------- " RCX2 Events syn keyword nqcConstant EVENT_TYPE_PRESSED EVENT_TYPE_RELEASED syn keyword nqcConstant EVENT_TYPE_PULSE EVENT_TYPE_EDGE syn keyword nqcConstant EVENT_TYPE_FAST_CHANGE EVENT_TYPE_LOW syn keyword nqcConstant EVENT_TYPE_NORMAL EVENT_TYPE_HIGH syn keyword nqcConstant EVENT_TYPE_CLICK EVENT_TYPE_DOUBLECLICK syn keyword nqcConstant EVENT_TYPE_MESSAGE " Scout Events syn keyword nqcConstant EVENT_1_PRESSED EVENT_1_RELEASED syn keyword nqcConstant EVENT_2_PRESSED EVENT_2_RELEASED syn keyword nqcConstant EVENT_LIGHT_HIGH EVENT_LIGHT_NORMAL syn keyword nqcConstant EVENT_LIGHT_LOW EVENT_LIGHT_CLICK syn keyword nqcConstant EVENT_LIGHT_DOUBLECLICK EVENT_COUNTER_0 syn keyword nqcConstant EVENT_COUNTER_1 EVENT_TIMER_0 EVENT_TIMER_1 syn keyword nqcConstant EVENT_TIMER_2 EVENT_MESSAGE " Functions - RCX2, Scout syn keyword nqcFunction ActiveEvents Event " Functions - RCX2 syn keyword nqcFunction CurrentEvents syn keyword nqcFunction SetEvent ClearEvent ClearAllEvents EventState syn keyword nqcFunction CalibrateEvent SetUpperLimit UpperLimit syn keyword nqcFunction SetLowerLimit LowerLimit SetHysteresis syn keyword nqcFunction Hysteresis syn keyword nqcFunction SetClickTime ClickTime SetClickCounter syn keyword nqcFunction ClickCounter " Functions - Scout syn keyword nqcFunction SetSensorClickTime SetCounterLimit syn keyword nqcFunction SetTimerLimit " Data Logging --------------------------------------- " Functions - RCX syn keyword nqcFunction CreateDatalog AddToDatalog syn keyword nqcFunction UploadDatalog " General Features ----------------------------------- " Functions - All syn keyword nqcFunction Wait StopAllTasks Random syn keyword nqcFunction SetSleepTime SleepNow " Functions - RCX syn keyword nqcFunction Program Watch SetWatch " Functions - RCX2 syn keyword nqcFunction SetRandomSeed SelectProgram syn keyword nqcFunction BatteryLevel FirmwareVersion " Functions - Scout " Parameters for SetLight() syn keyword nqcConstant LIGHT_ON LIGHT_OFF syn keyword nqcFunction SetScoutRules ScoutRules SetScoutMode syn keyword nqcFunction SetEventFeedback EventFeedback SetLight " additional CyberMaster defines syn keyword nqcConstant OUT_L OUT_R OUT_X syn keyword nqcConstant SENSOR_L SENSOR_M SENSOR_R " Functions - CyberMaster syn keyword nqcFunction Drive OnWait OnWaitDifferent syn keyword nqcFunction ClearTachoCounter TachoCount TachoSpeed syn keyword nqcFunction ExternalMotorRunning AGC " nqcCommentGroup allows adding matches for special things in comments syn keyword nqcTodo contained TODO FIXME XXX syn cluster nqcCommentGroup contains=nqcTodo "when wanted, highlight trailing white space if exists("nqc_space_errors") if !exists("nqc_no_trail_space_error") syn match nqcSpaceError display excludenl "\s\+$" endif if !exists("nqc_no_tab_space_error") syn match nqcSpaceError display " \+\t"me=e-1 endif endif "catch errors caused by wrong parenthesis and brackets syn cluster nqcParenGroup contains=nqcParenError,nqcIncluded,nqcCommentSkip,@nqcCommentGroup,nqcCommentStartError,nqcCommentSkip,nqcCppOut,nqcCppOut2,nqcCppSkip,nqcNumber,nqcFloat,nqcNumbers if exists("nqc_no_bracket_error") syn region nqcParen transparent start='(' end=')' contains=ALLBUT,@nqcParenGroup,nqcCppParen " nqcCppParen: same as nqcParen but ends at end-of-line; used in nqcDefine syn region nqcCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@nqcParenGroup,nqcParen syn match nqcParenError display ")" syn match nqcErrInParen display contained "[{}]" else syn region nqcParen transparent start='(' end=')' contains=ALLBUT,@nqcParenGroup,nqcCppParen,nqcErrInBracket,nqcCppBracket " nqcCppParen: same as nqcParen but ends at end-of-line; used in nqcDefine syn region nqcCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@nqcParenGroup,nqcErrInBracket,nqcParen,nqcBracket syn match nqcParenError display "[\])]" syn match nqcErrInParen display contained "[\]{}]" syn region nqcBracket transparent start='\[' end=']' contains=ALLBUT,@nqcParenGroup,nqcErrInParen,nqcCppParen,nqcCppBracket " nqcCppBracket: same as nqcParen but ends at end-of-line; used in nqcDefine syn region nqcCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@nqcParenGroup,nqcErrInParen,nqcParen,nqcBracket syn match nqcErrInBracket display contained "[);{}]" endif "integer number, or floating point number without a dot and with "f". syn case ignore syn match nqcNumbers display transparent "\<\d\|\.\d" contains=nqcNumber,nqcFloat " Same, but without octal error (for comments) syn match nqcNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" "hex number syn match nqcNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" " Flag the first zero of an octal number as something special syn match nqcFloat display contained "\d\+f" "floating point number, with dot, optional exponent syn match nqcFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" "floating point number, starting with a dot, optional exponent syn match nqcFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match nqcFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" " flag an octal number with wrong digits syn case match syn region nqcCommentL start="//" skip="\\$" end="$" keepend contains=@nqcCommentGroup,nqcSpaceError syn region nqcComment matchgroup=nqcCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@nqcCommentGroup,nqcCommentStartError,nqcSpaceError " keep a // comment separately, it terminates a preproc. conditional syntax match nqcCommentError display "\*/" syntax match nqcCommentStartError display "/\*" contained syn region nqcPreCondit start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=nqcComment,nqcCharacter,nqcCppParen,nqcParenError,nqcNumbers,nqcCommentError,nqcSpaceError syn match nqcPreCondit display "^\s*#\s*\(else\|endif\)\>" if !exists("nqc_no_if0") syn region nqcCppOut start="^\s*#\s*if\s\+0\>" end=".\|$" contains=nqcCppOut2 syn region nqcCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=nqcSpaceError,nqcCppSkip syn region nqcCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=nqcSpaceError,nqcCppSkip endif syn region nqcIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match nqcInclude display "^\s*#\s*include\>\s*["]" contains=nqcIncluded "syn match nqcLineSkip "\\$" syn cluster nqcPreProcGroup contains=nqcPreCondit,nqcIncluded,nqcInclude,nqcDefine,nqcErrInParen,nqcErrInBracket,nqcCppOut,nqcCppOut2,nqcCppSkip,nqcNumber,nqcFloat,nqcNumbers,nqcCommentSkip,@nqcCommentGroup,nqcCommentStartError,nqcParen,nqcBracket syn region nqcDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" contains=ALLBUT,@nqcPreProcGroup syn region nqcPreProc start="^\s*#\s*\(pragma\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@nqcPreProcGroup if !exists("nqc_minlines") if !exists("nqc_no_if0") let nqc_minlines = 50 " #if 0 constructs can be long else let nqc_minlines = 15 " mostly for () constructs endif endif exec "syn sync ccomment nqcComment minlines=" . nqc_minlines " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later hi def link nqcLabel Label hi def link nqcConditional Conditional hi def link nqcRepeat Repeat hi def link nqcCharacter Character hi def link nqcNumber Number hi def link nqcFloat Float hi def link nqcFunction Function hi def link nqcParenError nqcError hi def link nqcErrInParen nqcError hi def link nqcErrInBracket nqcError hi def link nqcCommentL nqcComment hi def link nqcCommentStart nqcComment hi def link nqcCommentError nqcError hi def link nqcCommentStartError nqcError hi def link nqcSpaceError nqcError hi def link nqcStorageClass StorageClass hi def link nqcInclude Include hi def link nqcPreProc PreProc hi def link nqcDefine Macro hi def link nqcIncluded String hi def link nqcError Error hi def link nqcStatement Statement hi def link nqcEvents Statement hi def link nqcPreCondit PreCondit hi def link nqcType Type hi def link nqcConstant Constant hi def link nqcCommentSkip nqcComment hi def link nqcComment Comment hi def link nqcTodo Todo hi def link nqcCppSkip nqcCppOut hi def link nqcCppOut2 nqcCppOut hi def link nqcCppOut Comment let b:current_syntax = "nqc" " vim: ts=8 neovim-0.2.2/runtime/syntax/nroff.vim000066400000000000000000000171371320401574200176570ustar00rootroot00000000000000" VIM syntax file " Language: nroff/groff " Maintainer: Pedro Alejandro Lpez-Valencia " URL: http://vorbote.wordpress.com/ " Last Change: 2012 Feb 2 " " {{{1 Acknowledgements " " ACKNOWLEDGEMENTS: " " My thanks to Jrme Plt , who was the " creator and maintainer of this syntax file for several years. " May I be as good at it as he has been. " " {{{1 Todo " " TODO: " " * Write syntax highlighting files for the preprocessors, " and integrate with nroff.vim. " " " {{{1 Start syntax highlighting. " " quit when a syntax file was already loaded " if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " " {{{1 plugin settings... " " {{{2 enable spacing error highlighting " if exists("nroff_space_errors") syn match nroffError /\s\+$/ syn match nroffSpaceError /[.,:;!?]\s\{2,}/ endif " " " {{{1 Special file settings " " {{{2 ms exdented paragraphs are not in the default paragraphs list. " setlocal paragraphs+=XP " " {{{2 Activate navigation to preporcessor sections. " if exists("b:preprocs_as_sections") setlocal sections=EQTSPS[\ G1GS endif " {{{1 Escape sequences " ------------------------------------------------------------ syn match nroffEscChar /\\[CN]/ nextgroup=nroffEscCharArg syn match nroffEscape /\\[*fgmnYV]/ nextgroup=nroffEscRegPar,nroffEscRegArg syn match nroffEscape /\\s[+-]\=/ nextgroup=nroffSize syn match nroffEscape /\\[$AbDhlLRvxXZ]/ nextgroup=nroffEscPar,nroffEscArg syn match nroffEscRegArg /./ contained syn match nroffEscRegArg2 /../ contained syn match nroffEscRegPar /(/ contained nextgroup=nroffEscRegArg2 syn match nroffEscArg /./ contained syn match nroffEscArg2 /../ contained syn match nroffEscPar /(/ contained nextgroup=nroffEscArg2 syn match nroffSize /\((\d\)\=\d/ contained syn region nroffEscCharArg start=/'/ end=/'/ contained syn region nroffEscArg start=/'/ end=/'/ contained contains=nroffEscape,@nroffSpecial if exists("b:nroff_is_groff") syn region nroffEscRegArg matchgroup=nroffEscape start=/\[/ end=/\]/ contained oneline syn region nroffSize matchgroup=nroffEscape start=/\[/ end=/\]/ contained endif syn match nroffEscape /\\[adprtu{}]/ syn match nroffEscape /\\$/ syn match nroffEscape /\\\$[@*]/ " {{{1 Strings and special characters " ------------------------------------------------------------ syn match nroffSpecialChar /\\[\\eE?!-]/ syn match nroffSpace "\\[&%~|^0)/,]" syn match nroffSpecialChar /\\(../ if exists("b:nroff_is_groff") syn match nroffSpecialChar /\\\[[^]]*]/ syn region nroffPreserve matchgroup=nroffSpecialChar start=/\\?/ end=/\\?/ oneline endif syn region nroffPreserve matchgroup=nroffSpecialChar start=/\\!/ end=/$/ oneline syn cluster nroffSpecial contains=nroffSpecialChar,nroffSpace syn region nroffString start=/"/ end=/"/ skip=/\\$/ contains=nroffEscape,@nroffSpecial contained syn region nroffString start=/'/ end=/'/ skip=/\\$/ contains=nroffEscape,@nroffSpecial contained " {{{1 Numbers and units " ------------------------------------------------------------ syn match nroffNumBlock /[0-9.]\a\=/ contained contains=nroffNumber syn match nroffNumber /\d\+\(\.\d*\)\=/ contained nextgroup=nroffUnit,nroffBadChar syn match nroffNumber /\.\d\+)/ contained nextgroup=nroffUnit,nroffBadChar syn match nroffBadChar /./ contained syn match nroffUnit /[icpPszmnvMu]/ contained " {{{1 Requests " ------------------------------------------------------------ " Requests begin with . or ' at the beginning of a line, or " after .if or .ie. syn match nroffReqLeader /^[.']/ nextgroup=nroffReqName skipwhite syn match nroffReqLeader /[.']/ contained nextgroup=nroffReqName skipwhite if exists("b:nroff_is_groff") " " GNU troff allows long request names " syn match nroffReqName /[^\t \\\[?]\+/ contained nextgroup=nroffReqArg else syn match nroffReqName /[^\t \\\[?]\{1,2}/ contained nextgroup=nroffReqArg endif syn region nroffReqArg start=/\S/ skip=/\\$/ end=/$/ contained contains=nroffEscape,@nroffSpecial,nroffString,nroffError,nroffSpaceError,nroffNumBlock,nroffComment " {{{2 Conditional: .if .ie .el syn match nroffReqName /\(if\|ie\)/ contained nextgroup=nroffCond skipwhite syn match nroffReqName /el/ contained nextgroup=nroffReqLeader skipwhite syn match nroffCond /\S\+/ contained nextgroup=nroffReqLeader skipwhite " {{{2 String definition: .ds .as syn match nroffReqname /[da]s/ contained nextgroup=nroffDefIdent skipwhite syn match nroffDefIdent /\S\+/ contained nextgroup=nroffDefinition skipwhite syn region nroffDefinition matchgroup=nroffSpecialChar start=/"/ matchgroup=NONE end=/\\"/me=e-2 skip=/\\$/ start=/\S/ end=/$/ contained contains=nroffDefSpecial syn match nroffDefSpecial /\\$/ contained syn match nroffDefSpecial /\\\((.\)\=./ contained if exists("b:nroff_is_groff") syn match nroffDefSpecial /\\\[[^]]*]/ contained endif " {{{2 Macro definition: .de .am, also diversion: .di syn match nroffReqName /\(d[ei]\|am\)/ contained nextgroup=nroffIdent skipwhite syn match nroffIdent /[^[?( \t]\+/ contained if exists("b:nroff_is_groff") syn match nroffReqName /als/ contained nextgroup=nroffIdent skipwhite endif " {{{2 Register definition: .rn .rr syn match nroffReqName /[rn]r/ contained nextgroup=nroffIdent skipwhite if exists("b:nroff_is_groff") syn match nroffReqName /\(rnn\|aln\)/ contained nextgroup=nroffIdent skipwhite endif " {{{1 eqn/tbl/pic " ------------------------------------------------------------ " " XXX: write proper syntax highlight for eqn / tbl / pic ? " syn region nroffEquation start=/^\.\s*EQ\>/ end=/^\.\s*EN\>/ syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/ syn region nroffPicture start=/^\.\s*PS\>/ end=/^\.\s*PE\>/ syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/ syn region nroffGrap start=/^\.\s*G1\>/ end=/^\.\s*G2\>/ syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/ " {{{1 Comments " ------------------------------------------------------------ syn region nroffIgnore start=/^[.']\s*ig/ end=/^['.]\s*\./ syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo syn match nroffComment /^'''.*/ contains=nroffTodo if exists("b:nroff_is_groff") syn match nroffComment "\\#.*$" contains=nroffTodo endif syn keyword nroffTodo TODO XXX FIXME contained " {{{1 Hilighting " ------------------------------------------------------------ " " " Define the default highlighting. " Only when an item doesn't have highlighting yet " hi def link nroffEscChar nroffSpecialChar hi def link nroffEscCharAr nroffSpecialChar hi def link nroffSpecialChar SpecialChar hi def link nroffSpace Delimiter hi def link nroffEscRegArg2 nroffEscRegArg hi def link nroffEscRegArg nroffIdent hi def link nroffEscArg2 nroffEscArg hi def link nroffEscPar nroffEscape hi def link nroffEscRegPar nroffEscape hi def link nroffEscArg nroffEscape hi def link nroffSize nroffEscape hi def link nroffEscape Preproc hi def link nroffIgnore Comment hi def link nroffComment Comment hi def link nroffTodo Todo hi def link nroffReqLeader nroffRequest hi def link nroffReqName nroffRequest hi def link nroffRequest Statement hi def link nroffCond PreCondit hi def link nroffDefIdent nroffIdent hi def link nroffIdent Identifier hi def link nroffEquation PreProc hi def link nroffTable PreProc hi def link nroffPicture PreProc hi def link nroffRefer PreProc hi def link nroffGrap PreProc hi def link nroffGremlin PreProc hi def link nroffNumber Number hi def link nroffBadChar nroffError hi def link nroffSpaceError nroffError hi def link nroffError Error hi def link nroffPreserve String hi def link nroffString String hi def link nroffDefinition String hi def link nroffDefSpecial Special let b:current_syntax = "nroff" let &cpo = s:cpo_save unlet s:cpo_save " vim600: set fdm=marker fdl=2: neovim-0.2.2/runtime/syntax/nsis.vim000066400000000000000000000225021320401574200175110ustar00rootroot00000000000000" Vim syntax file " Language: NSIS script, for version of NSIS 1.91 and later " Maintainer: Alex Jakushev " Last Change: 2004 May 12 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore "COMMENTS syn keyword nsisTodo todo attention note fixme readme syn region nsisComment start=";" end="$" contains=nsisTodo syn region nsisComment start="#" end="$" contains=nsisTodo "LABELS syn match nsisLocalLabel "\a\S\{-}:" syn match nsisGlobalLabel "\.\S\{-1,}:" "PREPROCESSOR syn match nsisPreprocSubst "${.\{-}}" syn match nsisDefine "!define\>" syn match nsisDefine "!undef\>" syn match nsisPreCondit "!ifdef\>" syn match nsisPreCondit "!ifndef\>" syn match nsisPreCondit "!endif\>" syn match nsisPreCondit "!else\>" syn match nsisMacro "!macro\>" syn match nsisMacro "!macroend\>" syn match nsisMacro "!insertmacro\>" "COMPILER UTILITY syn match nsisInclude "!include\>" syn match nsisSystem "!cd\>" syn match nsisSystem "!system\>" syn match nsisSystem "!packhdr\>" "VARIABLES syn match nsisUserVar "$\d" syn match nsisUserVar "$R\d" syn match nsisSysVar "$INSTDIR" syn match nsisSysVar "$OUTDIR" syn match nsisSysVar "$CMDLINE" syn match nsisSysVar "$PROGRAMFILES" syn match nsisSysVar "$DESKTOP" syn match nsisSysVar "$EXEDIR" syn match nsisSysVar "$WINDIR" syn match nsisSysVar "$SYSDIR" syn match nsisSysVar "$TEMP" syn match nsisSysVar "$STARTMENU" syn match nsisSysVar "$SMPROGRAMS" syn match nsisSysVar "$SMSTARTUP" syn match nsisSysVar "$QUICKLAUNCH" syn match nsisSysVar "$HWNDPARENT" syn match nsisSysVar "$\\r" syn match nsisSysVar "$\\n" syn match nsisSysVar "$\$" "STRINGS syn region nsisString start=/"/ skip=/'\|`/ end=/"/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry syn region nsisString start=/'/ skip=/"\|`/ end=/'/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry syn region nsisString start=/`/ skip=/"\|'/ end=/`/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry "CONSTANTS syn keyword nsisBoolean true false on off syn keyword nsisAttribOptions hide show nevershow auto force try ifnewer normal silent silentlog syn keyword nsisAttribOptions smooth colored SET CUR END RO none listonly textonly both current all syn keyword nsisAttribOptions zlib bzip2 lzma syn match nsisAttribOptions '\/NOCUSTOM' syn match nsisAttribOptions '\/CUSTOMSTRING' syn match nsisAttribOptions '\/COMPONENTSONLYONCUSTOM' syn match nsisAttribOptions '\/windows' syn match nsisAttribOptions '\/r' syn match nsisAttribOptions '\/oname' syn match nsisAttribOptions '\/REBOOTOK' syn match nsisAttribOptions '\/SILENT' syn match nsisAttribOptions '\/FILESONLY' syn match nsisAttribOptions '\/SHORT' syn keyword nsisExecShell SW_SHOWNORMAL SW_SHOWMAXIMIZED SW_SHOWMINIMIZED syn keyword nsisRegistry HKCR HKLM HKCU HKU HKCC HKDD HKPD syn keyword nsisRegistry HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE HKEY_CURRENT_USER HKEY_USERS syn keyword nsisRegistry HKEY_CURRENT_CONFIG HKEY_DYN_DATA HKEY_PERFORMANCE_DATA syn keyword nsisFileAttrib NORMAL ARCHIVE HIDDEN OFFLINE READONLY SYSTEM TEMPORARY syn keyword nsisFileAttrib FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN syn keyword nsisFileAttrib FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM syn keyword nsisFileAttrib FILE_ATTRIBUTE_TEMPORARY syn keyword nsisMessageBox MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL syn keyword nsisMessageBox MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP syn keyword nsisMessageBox MB_TOPMOST MB_SETFOREGROUND MB_RIGHT syn keyword nsisMessageBox MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4 syn keyword nsisMessageBox IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES syn match nsisNumber "\<[^0]\d*\>" syn match nsisNumber "\<0x\x\+\>" syn match nsisNumber "\<0\o*\>" "INSTALLER ATTRIBUTES - General installer configuration syn keyword nsisAttribute OutFile Name Caption SubCaption BrandingText Icon syn keyword nsisAttribute WindowIcon BGGradient SilentInstall SilentUnInstall syn keyword nsisAttribute CRCCheck MiscButtonText InstallButtonText FileErrorText "INSTALLER ATTRIBUTES - Install directory configuration syn keyword nsisAttribute InstallDir InstallDirRegKey "INSTALLER ATTRIBUTES - License page configuration syn keyword nsisAttribute LicenseText LicenseData "INSTALLER ATTRIBUTES - Component page configuration syn keyword nsisAttribute ComponentText InstType EnabledBitmap DisabledBitmap SpaceTexts "INSTALLER ATTRIBUTES - Directory page configuration syn keyword nsisAttribute DirShow DirText AllowRootDirInstall "INSTALLER ATTRIBUTES - Install page configuration syn keyword nsisAttribute InstallColors InstProgressFlags AutoCloseWindow syn keyword nsisAttribute ShowInstDetails DetailsButtonText CompletedText "INSTALLER ATTRIBUTES - Uninstall configuration syn keyword nsisAttribute UninstallText UninstallIcon UninstallCaption syn keyword nsisAttribute UninstallSubCaption ShowUninstDetails UninstallButtonText "COMPILER ATTRIBUTES syn keyword nsisCompiler SetOverwrite SetCompress SetCompressor SetDatablockOptimize SetDateSave "FUNCTIONS - general purpose syn keyword nsisInstruction SetOutPath File Exec ExecWait ExecShell syn keyword nsisInstruction Rename Delete RMDir "FUNCTIONS - registry & ini syn keyword nsisInstruction WriteRegStr WriteRegExpandStr WriteRegDWORD WriteRegBin syn keyword nsisInstruction WriteINIStr ReadRegStr ReadRegDWORD ReadINIStr ReadEnvStr syn keyword nsisInstruction ExpandEnvStrings DeleteRegValue DeleteRegKey EnumRegKey syn keyword nsisInstruction EnumRegValue DeleteINISec DeleteINIStr "FUNCTIONS - general purpose, advanced syn keyword nsisInstruction CreateDirectory CopyFiles SetFileAttributes CreateShortCut syn keyword nsisInstruction GetFullPathName SearchPath GetTempFileName CallInstDLL syn keyword nsisInstruction RegDLL UnRegDLL GetDLLVersion GetDLLVersionLocal syn keyword nsisInstruction GetFileTime GetFileTimeLocal "FUNCTIONS - Branching, flow control, error checking, user interaction, etc instructions syn keyword nsisInstruction Goto Call Return IfErrors ClearErrors SetErrors FindWindow syn keyword nsisInstruction SendMessage IsWindow IfFileExists MessageBox StrCmp syn keyword nsisInstruction IntCmp IntCmpU Abort Quit GetFunctionAddress GetLabelAddress syn keyword nsisInstruction GetCurrentAddress "FUNCTIONS - File and directory i/o instructions syn keyword nsisInstruction FindFirst FindNext FindClose FileOpen FileClose FileRead syn keyword nsisInstruction FileWrite FileReadByte FileWriteByte FileSeek "FUNCTIONS - Misc instructions syn keyword nsisInstruction SetDetailsView SetDetailsPrint SetAutoClose DetailPrint syn keyword nsisInstruction Sleep BringToFront HideWindow SetShellVarContext "FUNCTIONS - String manipulation support syn keyword nsisInstruction StrCpy StrLen "FUNCTIONS - Stack support syn keyword nsisInstruction Push Pop Exch "FUNCTIONS - Integer manipulation support syn keyword nsisInstruction IntOp IntFmt "FUNCTIONS - Rebooting support syn keyword nsisInstruction Reboot IfRebootFlag SetRebootFlag "FUNCTIONS - Uninstaller instructions syn keyword nsisInstruction WriteUninstaller "FUNCTIONS - Install logging instructions syn keyword nsisInstruction LogSet LogText "FUNCTIONS - Section management instructions syn keyword nsisInstruction SectionSetFlags SectionGetFlags SectionSetText syn keyword nsisInstruction SectionGetText "SPECIAL FUNCTIONS - install syn match nsisCallback "\.onInit" syn match nsisCallback "\.onUserAbort" syn match nsisCallback "\.onInstSuccess" syn match nsisCallback "\.onInstFailed" syn match nsisCallback "\.onVerifyInstDir" syn match nsisCallback "\.onNextPage" syn match nsisCallback "\.onPrevPage" syn match nsisCallback "\.onSelChange" "SPECIAL FUNCTIONS - uninstall syn match nsisCallback "un\.onInit" syn match nsisCallback "un\.onUserAbort" syn match nsisCallback "un\.onInstSuccess" syn match nsisCallback "un\.onInstFailed" syn match nsisCallback "un\.onVerifyInstDir" syn match nsisCallback "un\.onNextPage" "STATEMENTS - sections syn keyword nsisStatement Section SectionIn SectionEnd SectionDivider syn keyword nsisStatement AddSize "STATEMENTS - functions syn keyword nsisStatement Function FunctionEnd "STATEMENTS - pages syn keyword nsisStatement Page UninstPage PageEx PageExEnc PageCallbacks "ERROR syn keyword nsisError UninstallExeName " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link nsisInstruction Function hi def link nsisComment Comment hi def link nsisLocalLabel Label hi def link nsisGlobalLabel Label hi def link nsisStatement Statement hi def link nsisString String hi def link nsisBoolean Boolean hi def link nsisAttribOptions Constant hi def link nsisExecShell Constant hi def link nsisFileAttrib Constant hi def link nsisMessageBox Constant hi def link nsisRegistry Identifier hi def link nsisNumber Number hi def link nsisError Error hi def link nsisUserVar Identifier hi def link nsisSysVar Identifier hi def link nsisAttribute Type hi def link nsisCompiler Type hi def link nsisTodo Todo hi def link nsisCallback Operator " preprocessor commands hi def link nsisPreprocSubst PreProc hi def link nsisDefine Define hi def link nsisMacro Macro hi def link nsisPreCondit PreCondit hi def link nsisInclude Include hi def link nsisSystem PreProc let b:current_syntax = "nsis" neovim-0.2.2/runtime/syntax/obj.vim000066400000000000000000000053421320401574200173120ustar00rootroot00000000000000" Vim syntax file " Language: 3D wavefront's obj file " Maintainer: Vincent Berthoux " File Types: .obj (used in 3D) " Last Change: 2010 May 18 " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match objError "^\a\+" syn match objKeywords "^cstype\s" syn match objKeywords "^ctech\s" syn match objKeywords "^stech\s" syn match objKeywords "^deg\s" syn match objKeywords "^curv\(2\?\)\s" syn match objKeywords "^parm\s" syn match objKeywords "^surf\s" syn match objKeywords "^end\s" syn match objKeywords "^bzp\s" syn match objKeywords "^bsp\s" syn match objKeywords "^res\s" syn match objKeywords "^cdc\s" syn match objKeywords "^con\s" syn match objKeywords "^shadow_obj\s" syn match objKeywords "^trace_obj\s" syn match objKeywords "^usemap\s" syn match objKeywords "^lod\s" syn match objKeywords "^maplib\s" syn match objKeywords "^d_interp\s" syn match objKeywords "^c_interp\s" syn match objKeywords "^bevel\s" syn match objKeywords "^mg\s" syn match objKeywords "^s\s" syn match objKeywords "^con\s" syn match objKeywords "^trim\s" syn match objKeywords "^hole\s" syn match objKeywords "^scrv\s" syn match objKeywords "^sp\s" syn match objKeywords "^step\s" syn match objKeywords "^bmat\s" syn match objKeywords "^csh\s" syn match objKeywords "^call\s" syn match objComment "^#.*" syn match objVertex "^v\s" syn match objFace "^f\s" syn match objVertice "^vt\s" syn match objNormale "^vn\s" syn match objGroup "^g\s.*" syn match objMaterial "^usemtl\s.*" syn match objInclude "^mtllib\s.*" syn match objFloat "-\?\d\+\.\d\+\(e\(+\|-\)\d\+\)\?" syn match objInt "\d\+" syn match objIndex "\d\+\/\d*\/\d*" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link objError Error hi def link objComment Comment hi def link objInclude PreProc hi def link objFloat Float hi def link objInt Number hi def link objGroup Structure hi def link objIndex Constant hi def link objMaterial Label hi def link objVertex Keyword hi def link objNormale Keyword hi def link objVertice Keyword hi def link objFace Keyword hi def link objKeywords Keyword let b:current_syntax = "obj" " vim: ts=8 neovim-0.2.2/runtime/syntax/objc.vim000066400000000000000000001213701320401574200174550ustar00rootroot00000000000000" Vim syntax file " Language: Objective-C " Maintainer: Kazunobu Kuriyama " Last Change: 2015 Dec 14 """ Preparation for loading ObjC stuff if exists("b:current_syntax") finish endif if &filetype != 'objcpp' syn clear runtime! syntax/c.vim endif let s:cpo_save = &cpo set cpo&vim """ ObjC proper stuff follows... syn keyword objcPreProcMacro __OBJC__ __OBJC2__ __clang__ " Defined Types syn keyword objcPrincipalType id Class SEL IMP BOOL instancetype syn keyword objcUsefulTerm nil Nil NO YES " Preprocessor Directives syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match objcImported display contained "\(<\h[-a-zA-Z0-9_/]*\.h>\|<[a-z0-9]\+>\)" syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported " ObjC Compiler Directives syn match objcObjDef display /@interface\>\|@implementation\>\|@end\>\|@class\>/ syn match objcProtocol display /@protocol\>\|@optional\>\|@required\>/ syn match objcProperty display /@property\>\|@synthesize\>\|@dynamic\>/ syn match objcIvarScope display /@private\>\|@protected\>\|@public\>\|@package\>/ syn match objcInternalRep display /@selector\>\|@encode\>/ syn match objcException display /@try\>\|@throw\>\|@catch\|@finally\>/ syn match objcThread display /@synchronized\>/ syn match objcPool display /@autoreleasepool\>/ syn match objcModuleImport display /@import\>/ " ObjC Constant Strings syn match objcSpecial display contained "%@" syn region objcString start=+\(@"\|"\)+ skip=+\\\\\|\\"+ end=+"+ contains=cFormat,cSpecial,objcSpecial " ObjC Hidden Arguments syn keyword objcHiddenArgument self _cmd super " ObjC Type Qualifiers for Blocks syn keyword objcBlocksQualifier __block " ObjC Type Qualifiers for Object Lifetime syn keyword objcObjectLifetimeQualifier __strong __weak __unsafe_unretained __autoreleasing " ObjC Type Qualifiers for Toll-Free Bridge syn keyword objcTollFreeBridgeQualifier __bridge __bridge_retained __bridge_transfer " ObjC Type Qualifiers for Remote Messaging syn match objcRemoteMessagingQualifier display contained /\((\s*oneway\s\+\|(\s*in\s\+\|(\s*out\s\+\|(\s*inout\s\+\|(\s*bycopy\s\+\(in\(out\)\?\|out\)\?\|(\s*byref\s\+\(in\(out\)\?\|out\)\?\)/hs=s+1 " ObjC Storage Classes syn keyword objcStorageClass _Nullable _Nonnull _Null_unspecified syn keyword objcStorageClass __nullable __nonnull __null_unspecified syn keyword objcStorageClass nullable nonnull null_unspecified " ObjC type specifier syn keyword objcTypeSpecifier __kindof __covariant " ObjC Type Infomation Parameters syn keyword objcTypeInfoParams ObjectType KeyType " shorthand syn cluster objcTypeQualifier contains=objcBlocksQualifier,objcObjectLifetimeQualifier,objcTollFreeBridgeQualifier,objcRemoteMessagingQualifier " ObjC Fast Enumeration syn match objcFastEnumKeyword display /\sin\(\s\|$\)/ " ObjC Literal Syntax syn match objcLiteralSyntaxNumber display /@\(YES\>\|NO\>\|\d\|-\|+\)/ contains=cNumber,cFloat,cOctal syn match objcLiteralSyntaxSpecialChar display /@'/ contains=cSpecialCharacter syn match objcLiteralSyntaxChar display /@'[^\\]'/ syn match objcLiteralSyntaxOp display /@\((\|\[\|{\)/me=e-1,he=e-1 " ObjC Declared Property Attributes syn match objDeclPropAccessorNameAssign display /\s*=\s*/ contained syn region objcDeclPropAccessorName display start=/\(getter\|setter\)/ end=/\h\w*/ contains=objDeclPropAccessorNameAssign syn keyword objcDeclPropAccessorType readonly readwrite contained syn keyword objcDeclPropAssignSemantics assign retain copy contained syn keyword objcDeclPropAtomicity nonatomic contained syn keyword objcDeclPropARC strong weak contained syn match objcDeclPropNullable /\((\|\s\)nullable\(,\|)\)/ms=s+1,hs=s+1,me=e-1,he=e-1 contained syn match objcDeclPropNonnull /\((\|\s\)nonnull\(,\|)\)/ms=s+1,hs=s+1,me=e-1,he=e-1 contained syn match objcDeclPropNullUnspecified /\((\|\s\)null_unspecified\(,\|)\)/ms=s+1,hs=s+1,me=e-1,he=e-1 contained syn keyword objcDeclProcNullResettable null_resettable contained syn region objcDeclProp display transparent keepend start=/@property\s*(/ end=/)/ contains=objcProperty,objcDeclPropAccessorName,objcDeclPropAccessorType,objcDeclPropAssignSemantics,objcDeclPropAtomicity,objcDeclPropARC,objcDeclPropNullable,objcDeclPropNonnull,objcDeclPropNullUnspecified,objcDeclProcNullResettable " To distinguish colons in methods and dictionaries from those in C's labels. syn match objcColon display /^\s*\h\w*\s*\:\(\s\|.\)/me=e-1,he=e-1 " To distinguish a protocol list from system header files syn match objcProtocolList display /<\h\w*\(\s*,\s*\h\w*\)*>/ contains=objcPrincipalType,cType,Type,objcType,objcTypeInfoParams " Type info for collection classes syn match objcTypeInfo display /<\h\w*\s*<\(\h\w*\s*\**\|\h\w*\)>>/ contains=objcPrincipalType,cType,Type,objcType,objcTypeInfoParams " shorthand syn cluster objcCEntities contains=cType,cStructure,cStorageClass,cString,cCharacter,cSpecialCharacter,cNumbers,cConstant,cOperator,cComment,cCommentL,cStatement,cLabel,cConditional,cRepeat syn cluster objcObjCEntities contains=objcHiddenArgument,objcPrincipalType,objcString,objcUsefulTerm,objcProtocol,objcInternalRep,objcException,objcThread,objcPool,objcModuleImport,@objcTypeQualifier,objcLiteralSyntaxNumber,objcLiteralSyntaxOp,objcLiteralSyntaxChar,objcLiteralSyntaxSpecialChar,objcProtocolList,objcColon,objcFastEnumKeyword,objcType,objcClass,objcMacro,objcEnum,objcEnumValue,objcExceptionValue,objcNotificationValue,objcConstVar,objcPreProcMacro,objcTypeInfo " Objective-C Message Expressions syn region objcMethodCall start=/\[/ end=/\]/ contains=objcMethodCall,objcBlocks,@objcObjCEntities,@objcCEntities " To distinguish class method and instance method syn match objcInstanceMethod display /^s*-\s*/ syn match objcClassMethod display /^s*+\s*/ " ObjC Blocks syn region objcBlocks start=/\(\^\s*([^)]\+)\s*{\|\^\s*{\)/ end=/}/ contains=objcBlocks,objcMethodCall,@objcObjCEntities,@objcCEntities syn cluster cParenGroup add=objcMethodCall syn cluster cPreProcGroup add=objcMethodCall """ Foundation Framework syn match objcClass /Protocol\s*\*/me=s+8,he=s+8 """"""""""""""""" " NSObjCRuntime.h syn keyword objcType NSInteger NSUInteger NSComparator syn keyword objcEnum NSComparisonResult syn keyword objcEnumValue NSOrderedAscending NSOrderedSame NSOrderedDescending syn keyword objcEnum NSEnumerationOptions syn keyword objcEnumValue NSEnumerationConcurrent NSEnumerationReverse syn keyword objcEnum NSSortOptions syn keyword objcEnumValue NSSortConcurrent NSSortStable syn keyword objcEnumValue NSNotFound syn keyword objcMacro NSIntegerMax NSIntegerMin NSUIntegerMax syn keyword objcMacro NS_INLINE NS_BLOCKS_AVAILABLE NS_NONATOMIC_IOSONLY NS_FORMAT_FUNCTION NS_FORMAT_ARGUMENT NS_RETURNS_RETAINED NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_AUTOMATED_REFCOUNT_UNAVAILABLE NS_AUTOMATED_REFCOUNT_WEAK_UNAVAILABLE NS_REQUIRES_PROPERTY_DEFINITIONS NS_REPLACES_RECEIVER NS_RELEASES_ARGUMENT NS_VALID_UNTIL_END_OF_SCOPE NS_ROOT_CLASS NS_REQUIRES_SUPER NS_PROTOCOL_REQUIRES_EXPLICIT_IMPLEMENTATION NS_DESIGNATED_INITIALIZER NS_REQUIRES_NIL_TERMINATION syn keyword objcEnum NSQualityOfService syn keyword objcEnumValue NSQualityOfServiceUserInteractive NSQualityOfServiceUserInitiated NSQualityOfServiceUtility NSQualityOfServiceBackground NSQualityOfServiceDefault " NSRange.h syn keyword objcType NSRange NSRangePointer " NSGeometry.h syn keyword objcType NSPoint NSPointPointer NSPointArray NSSize NSSizePointer NSSizeArray NSRect NSRectPointer NSRectArray NSEdgeInsets syn keyword objcEnum NSRectEdge syn keyword objcEnumValue NSMinXEdge NSMinYEdge NSMaxXEdge NSMaxYEdge syn keyword objcEnumValue NSRectEdgeMinX NSRectEdgeMinY NSRectEdgeMaxX NSRectEdgeMaxY syn keyword objcConstVar NSZeroPoint NSZeroSize NSZeroRect NSEdgeInsetsZero syn keyword cType CGFloat CGPoint CGSize CGRect syn keyword objcEnum NSAlignmentOptions syn keyword objcEnumValue NSAlignMinXInward NSAlignMinYInward NSAlignMaxXInward NSAlignMaxYInward NSAlignWidthInward NSAlignHeightInward NSAlignMinXOutward NSAlignMinYOutward NSAlignMaxXOutward NSAlignMaxYOutward NSAlignWidthOutward NSAlignHeightOutward NSAlignMinXNearest NSAlignMinYNearest NSAlignMaxXNearest NSAlignMaxYNearest NSAlignWidthNearest NSAlignHeightNearest NSAlignRectFlipped NSAlignAllEdgesInward NSAlignAllEdgesOutward NSAlignAllEdgesNearest " NSDecimal.h syn keyword objcType NSDecimal syn keyword objcEnum NSRoundingMode syn keyword objcEnumValue NSRoundPlain NSRoundDown NSRoundUp NSRoundBankers syn keyword objcEnum NSCalculationError syn keyword objcEnumValue NSCalculationNoError NSCalculationLossOfPrecision NSCalculationUnderflow NSCalculationOverflow NSCalculationDivideByZero syn keyword objcConstVar NSDecimalMaxSize NSDecimalNoScale " NSDate.h syn match objcClass /NSDate\s*\*/me=s+6,he=s+6 syn keyword objcType NSTimeInterval syn keyword objcNotificationValue NSSystemClockDidChangeNotification syn keyword objcMacro NSTimeIntervalSince1970 " NSZone.h syn match objcType /NSZone\s*\*/me=s+6,he=s+6 syn keyword objcEnumValue NSScannedOption NSCollectorDisabledOption " NSError.h syn match objcClass /NSError\s*\*/me=s+7,he=s+7 syn keyword objcConstVar NSCocoaErrorDomain NSPOSIXErrorDomain NSOSStatusErrorDomain NSMachErrorDomain NSUnderlyingErrorKey NSLocalizedDescriptionKey NSLocalizedFailureReasonErrorKey NSLocalizedRecoverySuggestionErrorKey NSLocalizedRecoveryOptionsErrorKey NSRecoveryAttempterErrorKey NSHelpAnchorErrorKey NSStringEncodingErrorKey NSURLErrorKey NSFilePathErrorKey " NSException.h syn match objcClass /NSException\s*\*/me=s+11,he=s+11 syn match objcClass /NSAssertionHandler\s*\*/me=s+18,he=s+18 syn keyword objcType NSUncaughtExceptionHandler syn keyword objcConstVar NSGenericException NSRangeException NSInvalidArgumentException NSInternalInconsistencyException NSMallocException NSObjectInaccessibleException NSObjectNotAvailableException NSDestinationInvalidException NSPortTimeoutException NSInvalidSendPortException NSInvalidReceivePortException NSPortSendException NSPortReceiveException NSOldStyleException " NSNotification.h syn match objcClass /NSNotification\s*\*/me=s+14,he=s+14 syn match objcClass /NSNotificationCenter\s*\*/me=s+20,he=s+20 " NSDistributedNotificationCenter.h syn match objcClass /NSDistributedNotificationCenter\s*\*/me=s+31,he=s+31 syn keyword objcConstVar NSLocalNotificationCenterType syn keyword objcEnum NSNotificationSuspensionBehavior syn keyword objcEnumValue NSNotificationSuspensionBehaviorDrop NSNotificationSuspensionBehaviorCoalesce NSNotificationSuspensionBehaviorHold NSNotificationSuspensionBehaviorHold NSNotificationSuspensionBehaviorDeliverImmediately syn keyword objcEnumValue NSNotificationDeliverImmediately NSNotificationPostToAllSessions syn keyword objcEnum NSDistributedNotificationOptions syn keyword objcEnumValue NSDistributedNotificationDeliverImmediately NSDistributedNotificationPostToAllSessions " NSNotificationQueue.h syn match objcClass /NSNotificationQueue\s*\*/me=s+19,he=s+19 syn keyword objcEnum NSPostingStyle syn keyword objcEnumValue NSPostWhenIdle NSPostASAP NSPostNow syn keyword objcEnum NSNotificationCoalescing syn keyword objcEnumValue NSNotificationNoCoalescing NSNotificationCoalescingOnName NSNotificationCoalescingOnSender " NSEnumerator.h syn match objcClass /NSEnumerator\s*\*/me=s+12,he=s+12 syn match objcClass /NSEnumerator<.*>\s*\*/me=s+12,he=s+12 contains=objcTypeInfoParams syn keyword objcType NSFastEnumerationState " NSIndexSet.h syn match objcClass /NSIndexSet\s*\*/me=s+10,he=s+10 syn match objcClass /NSMutableIndexSet\s*\*/me=s+17,he=s+17 " NSCharecterSet.h syn match objcClass /NSCharacterSet\s*\*/me=s+14,he=s+14 syn match objcClass /NSMutableCharacterSet\s*\*/me=s+21,he=s+21 syn keyword objcConstVar NSOpenStepUnicodeReservedBase " NSURL.h syn match objcClass /NSURL\s*\*/me=s+5,he=s+5 syn keyword objcEnum NSURLBookmarkCreationOptions syn keyword objcEnumValue NSURLBookmarkCreationPreferFileIDResolution NSURLBookmarkCreationMinimalBookmark NSURLBookmarkCreationSuitableForBookmarkFile NSURLBookmarkCreationWithSecurityScope NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess syn keyword objcEnum NSURLBookmarkResolutionOptions syn keyword objcEnumValue NSURLBookmarkResolutionWithoutUI NSURLBookmarkResolutionWithoutMounting NSURLBookmarkResolutionWithSecurityScope syn keyword objcType NSURLBookmarkFileCreationOptions syn keyword objcConstVar NSURLFileScheme NSURLKeysOfUnsetValuesKey syn keyword objcConstVar NSURLNameKey NSURLLocalizedNameKey NSURLIsRegularFileKey NSURLIsDirectoryKey NSURLIsSymbolicLinkKey NSURLIsVolumeKey NSURLIsPackageKey NSURLIsApplicationKey NSURLApplicationIsScriptableKey NSURLIsSystemImmutableKey NSURLIsUserImmutableKey NSURLIsHiddenKey NSURLHasHiddenExtensionKey NSURLCreationDateKey NSURLContentAccessDateKey NSURLContentModificationDateKey NSURLAttributeModificationDateKey NSURLLinkCountKey NSURLParentDirectoryURLKey NSURLVolumeURLKey NSURLTypeIdentifierKey NSURLLocalizedTypeDescriptionKey NSURLLabelNumberKey NSURLLabelColorKey NSURLLocalizedLabelKey NSURLEffectiveIconKey NSURLCustomIconKey NSURLFileResourceIdentifierKey NSURLVolumeIdentifierKey NSURLPreferredIOBlockSizeKey NSURLIsReadableKey NSURLIsWritableKey NSURLIsExecutableKey NSURLFileSecurityKey NSURLIsExcludedFromBackupKey NSURLTagNamesKey NSURLPathKey NSURLIsMountTriggerKey NSURLGenerationIdentifierKey NSURLDocumentIdentifierKey NSURLAddedToDirectoryDateKey NSURLQuarantinePropertiesKey NSURLFileResourceTypeKey syn keyword objcConstVar NSURLFileResourceTypeNamedPipe NSURLFileResourceTypeCharacterSpecial NSURLFileResourceTypeDirectory NSURLFileResourceTypeBlockSpecial NSURLFileResourceTypeRegular NSURLFileResourceTypeSymbolicLink NSURLFileResourceTypeSocket NSURLFileResourceTypeUnknown NSURLThumbnailDictionaryKey NSURLThumbnailKey NSThumbnail1024x1024SizeKey syn keyword objcConstVar NSURLFileSizeKey NSURLFileAllocatedSizeKey NSURLTotalFileSizeKey NSURLTotalFileAllocatedSizeKey NSURLIsAliasFileKey NSURLFileProtectionKey NSURLFileProtectionNone NSURLFileProtectionComplete NSURLFileProtectionCompleteUnlessOpen NSURLFileProtectionCompleteUntilFirstUserAuthentication syn keyword objcConstVar NSURLVolumeLocalizedFormatDescriptionKey NSURLVolumeTotalCapacityKey NSURLVolumeAvailableCapacityKey NSURLVolumeResourceCountKey NSURLVolumeSupportsPersistentIDsKey NSURLVolumeSupportsSymbolicLinksKey NSURLVolumeSupportsHardLinksKey NSURLVolumeSupportsJournalingKey NSURLVolumeIsJournalingKey NSURLVolumeSupportsSparseFilesKey NSURLVolumeSupportsZeroRunsKey NSURLVolumeSupportsCaseSensitiveNamesKey NSURLVolumeSupportsCasePreservedNamesKey NSURLVolumeSupportsRootDirectoryDatesKey NSURLVolumeSupportsVolumeSizesKey NSURLVolumeSupportsRenamingKey NSURLVolumeSupportsAdvisoryFileLockingKey NSURLVolumeSupportsExtendedSecurityKey NSURLVolumeIsBrowsableKey NSURLVolumeMaximumFileSizeKey NSURLVolumeIsEjectableKey NSURLVolumeIsRemovableKey NSURLVolumeIsInternalKey NSURLVolumeIsAutomountedKey NSURLVolumeIsLocalKey NSURLVolumeIsReadOnlyKey NSURLVolumeCreationDateKey NSURLVolumeURLForRemountingKey NSURLVolumeUUIDStringKey NSURLVolumeNameKey NSURLVolumeLocalizedNameKey syn keyword objcConstVar NSURLIsUbiquitousItemKey NSURLUbiquitousItemHasUnresolvedConflictsKey NSURLUbiquitousItemIsDownloadedKey NSURLUbiquitousItemIsDownloadingKey NSURLUbiquitousItemIsUploadedKey NSURLUbiquitousItemIsUploadingKey NSURLUbiquitousItemPercentDownloadedKey NSURLUbiquitousItemPercentUploadedKey NSURLUbiquitousItemDownloadingStatusKey NSURLUbiquitousItemDownloadingErrorKey NSURLUbiquitousItemUploadingErrorKey NSURLUbiquitousItemDownloadRequestedKey NSURLUbiquitousItemContainerDisplayNameKey NSURLUbiquitousItemDownloadingStatusNotDownloaded NSURLUbiquitousItemDownloadingStatusDownloaded NSURLUbiquitousItemDownloadingStatusCurrent """""""""""" " NSString.h syn match objcClass /NSString\s*\*/me=s+8,he=s+8 syn match objcClass /NSMutableString\s*\*/me=s+15,he=s+15 syn keyword objcType unichar syn keyword objcExceptionValue NSParseErrorException NSCharacterConversionException syn keyword objcMacro NSMaximumStringLength syn keyword objcEnum NSStringCompareOptions syn keyword objcEnumValue NSCaseInsensitiveSearch NSLiteralSearch NSBackwardsSearch NSAnchoredSearch NSNumericSearch NSDiacriticInsensitiveSearch NSWidthInsensitiveSearch NSForcedOrderingSearch NSRegularExpressionSearch syn keyword objcEnum NSStringEncoding syn keyword objcEnumValue NSProprietaryStringEncoding syn keyword objcEnumValue NSASCIIStringEncoding NSNEXTSTEPStringEncoding NSJapaneseEUCStringEncoding NSUTF8StringEncoding NSISOLatin1StringEncoding NSSymbolStringEncoding NSNonLossyASCIIStringEncoding NSShiftJISStringEncoding NSISOLatin2StringEncoding NSUnicodeStringEncoding NSWindowsCP1251StringEncoding NSWindowsCP1252StringEncoding NSWindowsCP1253StringEncoding NSWindowsCP1254StringEncoding NSWindowsCP1250StringEncoding NSISO2022JPStringEncoding NSMacOSRomanStringEncoding NSUTF16StringEncoding NSUTF16BigEndianStringEncoding NSUTF16LittleEndianStringEncoding NSUTF32StringEncoding NSUTF32BigEndianStringEncoding NSUTF32LittleEndianStringEncoding syn keyword objcEnum NSStringEncodingConversionOptions syn keyword objcEnumValue NSStringEncodingConversionAllowLossy NSStringEncodingConversionExternalRepresentation syn keyword objcEnum NSStringEnumerationOptions syn keyword objcEnumValue NSStringEnumerationByLines NSStringEnumerationByParagraphs NSStringEnumerationByComposedCharacterSequences NSStringEnumerationByWords NSStringEnumerationBySentences NSStringEnumerationReverse NSStringEnumerationSubstringNotRequired NSStringEnumerationLocalized syn keyword objcConstVar NSStringTransformLatinToKatakana NSStringTransformLatinToHiragana NSStringTransformLatinToHangul NSStringTransformLatinToArabic NSStringTransformLatinToHebrew NSStringTransformLatinToThai NSStringTransformLatinToCyrillic NSStringTransformLatinToGreek NSStringTransformToLatin NSStringTransformMandarinToLatin NSStringTransformHiraganaToKatakana NSStringTransformFullwidthToHalfwidth NSStringTransformToXMLHex NSStringTransformToUnicodeName NSStringTransformStripCombiningMarks NSStringTransformStripDiacritics syn keyword objcConstVar NSStringEncodingDetectionSuggestedEncodingsKey NSStringEncodingDetectionDisallowedEncodingsKey NSStringEncodingDetectionUseOnlySuggestedEncodingsKey NSStringEncodingDetectionAllowLossyKey NSStringEncodingDetectionFromWindowsKey NSStringEncodingDetectionLossySubstitutionKey NSStringEncodingDetectionLikelyLanguageKey " NSAttributedString.h syn match objcClass /NSAttributedString\s*\*/me=s+18,he=s+18 syn match objcClass /NSMutableAttributedString\s*\*/me=s+25,he=s+25 syn keyword objcEnum NSAttributedStringEnumerationOptions syn keyword objcEnumValue NSAttributedStringEnumerationReverse NSAttributedStringEnumerationLongestEffectiveRangeNotRequired " NSValue.h syn match objcClass /NSValue\s*\*/me=s+7,he=s+7 syn match objcClass /NSNumber\s*\*/me=s+8,he=s+8 " NSDecimalNumber.h syn match objcClass /NSDecimalNumber\s*\*/me=s+15,he=s+15 syn match objcClass /NSDecimalNumberHandler\s*\*/me=s+22,he=s+22 syn keyword objcExceptionValue NSDecimalNumberExactnessException NSDecimalNumberOverflowException NSDecimalNumberUnderflowException NSDecimalNumberDivideByZeroException " NSData.h syn match objcClass /NSData\s*\*/me=s+6,he=s+6 syn match objcClass /NSMutableData\s*\*/me=s+13,he=s+13 syn keyword objcEnum NSDataReadingOptions syn keyword objcEnumValue NSDataReadingMappedIfSafe NSDataReadingUncached NSDataReadingMappedAlways NSDataReadingMapped NSMappedRead NSUncachedRead syn keyword objcEnum NSDataWritingOptions syn keyword objcEnumValue NSDataWritingAtomic NSDataWritingWithoutOverwriting NSDataWritingFileProtectionNone NSDataWritingFileProtectionComplete NSDataWritingFileProtectionCompleteUnlessOpen NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication NSDataWritingFileProtectionMask NSAtomicWrite syn keyword objcEnum NSDataSearchOptions syn keyword objcEnumValue NSDataSearchBackwards NSDataSearchAnchored syn keyword objcEnum NSDataBase64EncodingOptions NSDataBase64DecodingOptions syn keyword objcEnumValue NSDataBase64Encoding64CharacterLineLength NSDataBase64Encoding76CharacterLineLength NSDataBase64EncodingEndLineWithCarriageReturn NSDataBase64EncodingEndLineWithLineFeed NSDataBase64DecodingIgnoreUnknownCharacters " NSArray.h syn match objcClass /NSArray\s*\*/me=s+7,he=s+7 syn match objcClass /NSArray<.*>\s*\*/me=s+7,he=s+7 contains=objcTypeInfoParams syn match objcClass /NSMutableArray\s*\*/me=s+14,he=s+14 syn match objcClass /NSMutableArray<.*>\s*\*/me=s+14,he=s+14 contains=objcTypeInfoParams syn keyword objcEnum NSBinarySearchingOptions syn keyword objcEnumValue NSBinarySearchingFirstEqual NSBinarySearchingLastEqual NSBinarySearchingInsertionIndex " NSDictionary.h syn match objcClass /NSDictionary\s*\*/me=s+12,he=s+12 syn match objcClass /NSDictionary<.*>\s*\*/me=s+12,he=s+12 contains=objcTypeInfoParams syn match objcClass /NSMutableDictionary\s*\*/me=s+19,he=s+19 syn match objcClass /NSMutableDictionary<.*>\s*\*/me=s+19,he=s+19 contains=objcTypeInfoParams " NSSet.h syn match objcClass /NSSet\s*\*/me=s+5,me=s+5 syn match objcClass /NSSet<.*>\s*\*/me=s+5,me=s+5 contains=objcTypeInfoParams syn match objcClass /NSMutableSet\s*\*/me=s+12,me=s+12 syn match objcClass /NSMutableSet<.*>\s*\*/me=s+12,me=s+12 contains=objcTypeInfoParams syn match objcClass /NSCountedSet\s*\*/me=s+12,me=s+12 syn match objcClass /NSCountedSet<.*>\s*\*/me=s+12,me=s+12 contains=objcTypeInfoParams " NSOrderedSet.h syn match objcClass /NSOrderedSet\s*\*/me=s+12,me=s+12 syn match objcClass /NSOrderedSet<.*>\s*\*/me=s+12,me=s+12 contains=objcTypeInfoParams syn match objcClass /NSMutableOrderedSet\s*\*/me=s+19,me=s+19 syn match objcClass /NSMutableOrderedSet<.*>\s*\*/me=s+19,me=s+19 """"""""""""""""""" " NSPathUtilities.h syn keyword objcEnum NSSearchPathDirectory syn keyword objcEnumValue NSApplicationDirectory NSDemoApplicationDirectory NSDeveloperApplicationDirectory NSAdminApplicationDirectory NSLibraryDirectory NSDeveloperDirectory NSUserDirectory NSDocumentationDirectory NSDocumentDirectory NSCoreServiceDirectory NSAutosavedInformationDirectory NSDesktopDirectory NSCachesDirectory NSApplicationSupportDirectory NSDownloadsDirectory NSInputMethodsDirectory NSMoviesDirectory NSMusicDirectory NSPicturesDirectory NSPrinterDescriptionDirectory NSSharedPublicDirectory NSPreferencePanesDirectory NSApplicationScriptsDirectory NSItemReplacementDirectory NSAllApplicationsDirectory NSAllLibrariesDirectory NSTrashDirectory syn keyword objcEnum NSSearchPathDomainMask syn keyword objcEnumValue NSUserDomainMask NSLocalDomainMask NSNetworkDomainMask NSSystemDomainMask NSAllDomainsMask " NSFileManger.h syn match objcClass /NSFileManager\s*\*/me=s+13,he=s+13 syn match objcClass /NSDirectoryEnumerator\s*\*/me=s+21,he=s+21 contains=objcTypeInfoParams syn match objcClass /NSDirectoryEnumerator<.*>\s*\*/me=s+21,he=s+21 syn keyword objcEnum NSVolumeEnumerationOptions syn keyword objcEnumValue NSVolumeEnumerationSkipHiddenVolumes NSVolumeEnumerationProduceFileReferenceURLs syn keyword objcEnum NSURLRelationship syn keyword objcEnumValue NSURLRelationshipContains NSURLRelationshipSame NSURLRelationshipOther syn keyword objcEnum NSFileManagerUnmountOptions syn keyword objcEnumValue NSFileManagerUnmountAllPartitionsAndEjectDisk NSFileManagerUnmountWithoutUI syn keyword objcConstVar NSFileManagerUnmountDissentingProcessIdentifierErrorKey syn keyword objcEnum NSDirectoryEnumerationOptions syn keyword objcEnumValue NSDirectoryEnumerationSkipsSubdirectoryDescendants NSDirectoryEnumerationSkipsPackageDescendants NSDirectoryEnumerationSkipsHiddenFiles syn keyword objcEnum NSFileManagerItemReplacementOptions syn keyword objcEnumValue NSFileManagerItemReplacementUsingNewMetadataOnly NSFileManagerItemReplacementWithoutDeletingBackupItem syn keyword objcNotificationValue NSUbiquityIdentityDidChangeNotification syn keyword objcConstVar NSFileType NSFileTypeDirectory NSFileTypeRegular NSFileTypeSymbolicLink NSFileTypeSocket NSFileTypeCharacterSpecial NSFileTypeBlockSpecial NSFileTypeUnknown NSFileSize NSFileModificationDate NSFileReferenceCount NSFileDeviceIdentifier NSFileOwnerAccountName NSFileGroupOwnerAccountName NSFilePosixPermissions NSFileSystemNumber NSFileSystemFileNumber NSFileExtensionHidden NSFileHFSCreatorCode NSFileHFSTypeCode NSFileImmutable NSFileAppendOnly NSFileCreationDate NSFileOwnerAccountID NSFileGroupOwnerAccountID NSFileBusy NSFileProtectionKey NSFileProtectionNone NSFileProtectionComplete NSFileProtectionCompleteUnlessOpen NSFileProtectionCompleteUntilFirstUserAuthentication NSFileSystemSize NSFileSystemFreeSize NSFileSystemNodes NSFileSystemFreeNodes " NSFileHandle.h syn match objcClass /NSFileHandle\s*\*/me=s+12,he=s+12 syn keyword objcExceptionValue NSFileHandleOperationException syn keyword objcNotificationValue NSFileHandleReadCompletionNotification NSFileHandleReadToEndOfFileCompletionNotification NSFileHandleConnectionAcceptedNotification NSFileHandleDataAvailableNotification NSFileHandleNotificationDataItem NSFileHandleNotificationFileHandleItem NSFileHandleNotificationMonitorModes syn match objcClass /NSPipe\s*\*/me=s+6,he=s+6 """""""""""" " NSLocale.h syn match objcClass /NSLocale\s*\*/me=s+8,he=s+8 syn keyword objcEnum NSLocaleLanguageDirection syn keyword objcEnumValue NSLocaleLanguageDirectionUnknown NSLocaleLanguageDirectionLeftToRight NSLocaleLanguageDirectionRightToLeft NSLocaleLanguageDirectionTopToBottom NSLocaleLanguageDirectionBottomToTop syn keyword objcNotificationValue NSCurrentLocaleDidChangeNotification syn keyword objcConstVar NSLocaleIdentifier NSLocaleLanguageCode NSLocaleCountryCode NSLocaleScriptCode NSLocaleVariantCode NSLocaleExemplarCharacterSet NSLocaleCalendar NSLocaleCollationIdentifier NSLocaleUsesMetricSystem NSLocaleMeasurementSystem NSLocaleDecimalSeparator NSLocaleGroupingSeparator NSLocaleCurrencySymbol NSLocaleCurrencyCode NSLocaleCollatorIdentifier NSLocaleQuotationBeginDelimiterKey NSLocaleQuotationEndDelimiterKey NSLocaleAlternateQuotationBeginDelimiterKey NSLocaleAlternateQuotationEndDelimiterKey NSGregorianCalendar NSBuddhistCalendar NSChineseCalendar NSHebrewCalendar NSIslamicCalendar NSIslamicCivilCalendar NSJapaneseCalendar NSRepublicOfChinaCalendar NSPersianCalendar NSIndianCalendar NSISO8601Calendar " NSFormatter.h syn match objcClass /NSFormatter\s*\*/me=s+11,he=s+11 syn keyword objcEnum NSFormattingContext NSFormattingUnitStyle syn keyword objcEnumValue NSFormattingContextUnknown NSFormattingContextDynamic NSFormattingContextStandalone NSFormattingContextListItem NSFormattingContextBeginningOfSentence NSFormattingContextMiddleOfSentence NSFormattingUnitStyleShort NSFormattingUnitStyleMedium NSFormattingUnitStyleLong " NSNumberFormatter.h syn match objcClass /NSNumberFormatter\s*\*/me=s+17,he=s+17 syn keyword objcEnum NSNumberFormatterStyle syn keyword objcEnumValue NSNumberFormatterNoStyle NSNumberFormatterDecimalStyle NSNumberFormatterCurrencyStyle NSNumberFormatterPercentStyle NSNumberFormatterScientificStyle NSNumberFormatterSpellOutStyle NSNumberFormatterOrdinalStyle NSNumberFormatterCurrencyISOCodeStyle NSNumberFormatterCurrencyPluralStyle NSNumberFormatterCurrencyAccountingStyle syn keyword objcEnum NSNumberFormatterBehavior syn keyword objcEnumValue NSNumberFormatterBehaviorDefault NSNumberFormatterBehavior10_0 NSNumberFormatterBehavior10_4 syn keyword objcEnum NSNumberFormatterPadPosition syn keyword objcEnumValue NSNumberFormatterPadBeforePrefix NSNumberFormatterPadAfterPrefix NSNumberFormatterPadBeforeSuffix NSNumberFormatterPadAfterSuffix syn keyword objcEnum NSNumberFormatterRoundingMode syn keyword objcEnumValue NSNumberFormatterRoundCeiling NSNumberFormatterRoundFloor NSNumberFormatterRoundDown NSNumberFormatterRoundUp NSNumberFormatterRoundHalfEven NSNumberFormatterRoundHalfDown NSNumberFormatterRoundHalfUp " NSDateFormatter.h syn match objcClass /NSDateFormatter\s*\*/me=s+15,he=s+15 syn keyword objcEnum NSDateFormatterStyle syn keyword objcEnumValue NSDateFormatterNoStyle NSDateFormatterShortStyle NSDateFormatterMediumStyle NSDateFormatterLongStyle NSDateFormatterFullStyle syn keyword objcEnum NSDateFormatterBehavior syn keyword objcEnumValue NSDateFormatterBehaviorDefault NSDateFormatterBehavior10_0 NSDateFormatterBehavior10_4 " NSCalendar.h syn match objcClass /NSCalendar\s*\*/me=s+10,he=s+10 syn keyword objcConstVar NSCalendarIdentifierGregorian NSCalendarIdentifierBuddhist NSCalendarIdentifierChinese NSCalendarIdentifierCoptic NSCalendarIdentifierEthiopicAmeteMihret NSCalendarIdentifierEthiopicAmeteAlem NSCalendarIdentifierHebrew NSCalendarIdentifierISO8601 NSCalendarIdentifierIndian NSCalendarIdentifierIslamic NSCalendarIdentifierIslamicCivil NSCalendarIdentifierJapanese NSCalendarIdentifierPersian NSCalendarIdentifierRepublicOfChina NSCalendarIdentifierIslamicTabular NSCalendarIdentifierIslamicUmmAlQura syn keyword objcEnum NSCalendarUnit syn keyword objcEnumValue NSCalendarUnitEra NSCalendarUnitYear NSCalendarUnitMonth NSCalendarUnitDay NSCalendarUnitHour NSCalendarUnitMinute NSCalendarUnitSecond NSCalendarUnitWeekday NSCalendarUnitWeekdayOrdinal NSCalendarUnitQuarter NSCalendarUnitWeekOfMonth NSCalendarUnitWeekOfYear NSCalendarUnitYearForWeekOfYear NSCalendarUnitNanosecond NSCalendarUnitCalendar NSCalendarUnitTimeZone syn keyword objcEnumValue NSEraCalendarUnit NSYearCalendarUnit NSMonthCalendarUnit NSDayCalendarUnit NSHourCalendarUnit NSMinuteCalendarUnit NSSecondCalendarUnit NSWeekCalendarUnit NSWeekdayCalendarUnit NSWeekdayOrdinalCalendarUnit NSQuarterCalendarUnit NSWeekOfMonthCalendarUnit NSWeekOfYearCalendarUnit NSYearForWeekOfYearCalendarUnit NSCalendarCalendarUnit NSTimeZoneCalendarUnit syn keyword objcEnumValue NSWrapCalendarComponents NSUndefinedDateComponent NSDateComponentUndefined syn match objcClass /NSDateComponents\s*\*/me=s+16,he=s+16 syn keyword objcEnum NSCalendarOptions syn keyword objcEnumValue NSCalendarWrapComponents NSCalendarMatchStrictly NSCalendarSearchBackwards NSCalendarMatchPreviousTimePreservingSmallerUnits NSCalendarMatchNextTimePreservingSmallerUnits NSCalendarMatchNextTime NSCalendarMatchFirst NSCalendarMatchLast syn keyword objcConstVar NSCalendarDayChangedNotification " NSTimeZone.h syn match objcClass /NSTimeZone\s*\*/me=s+10,he=s+10 syn keyword objcEnum NSTimeZoneNameStyle syn keyword objcEnumValue NSTimeZoneNameStyleStandard NSTimeZoneNameStyleShortStandard NSTimeZoneNameStyleDaylightSaving NSTimeZoneNameStyleShortDaylightSaving NSTimeZoneNameStyleGeneric NSTimeZoneNameStyleShortGeneric syn keyword objcNotificationValue NSSystemTimeZoneDidChangeNotification """"""""""" " NSCoder.h syn match objcClass /NSCoder\s*\*/me=s+7,he=s+7 " NSArchiver.h syn match objcClass /NSArchiver\s*\*/me=s+10,he=s+10 syn match objcClass /NSUnarchiver\s*\*/me=s+12,he=s+12 syn keyword objcExceptionValue NSInconsistentArchiveException " NSKeyedArchiver.h syn match objcClass /NSKeyedArchiver\s*\*/me=s+15,he=s+15 syn match objcClass /NSKeyedUnarchiver\s*\*/me=s+17,he=s+17 syn keyword objcExceptionValue NSInvalidArchiveOperationException NSInvalidUnarchiveOperationException syn keyword objcConstVar NSKeyedArchiveRootObjectKey """""""""""""""""" " NSPropertyList.h syn keyword objcEnum NSPropertyListMutabilityOptions syn keyword objcEnumValue NSPropertyListImmutable NSPropertyListMutableContainers NSPropertyListMutableContainersAndLeaves syn keyword objcEnum NSPropertyListFormat syn keyword objcEnumValue NSPropertyListOpenStepFormat NSPropertyListXMLFormat_v1_0 NSPropertyListBinaryFormat_v1_0 syn keyword objcType NSPropertyListReadOptions NSPropertyListWriteOptions " NSUserDefaults.h syn match objcClass /NSUserDefaults\s*\*/me=s+14,he=s+14 syn keyword objcConstVar NSGlobalDomain NSArgumentDomain NSRegistrationDomain syn keyword objcNotificationValue NSUserDefaultsDidChangeNotification " NSBundle.h syn match objcClass /NSBundle\s*\*/me=s+8,he=s+8 syn keyword objcEnumValue NSBundleExecutableArchitectureI386 NSBundleExecutableArchitecturePPC NSBundleExecutableArchitectureX86_64 NSBundleExecutableArchitecturePPC64 syn keyword objcNotificationValue NSBundleDidLoadNotification NSLoadedClasses NSBundleResourceRequestLowDiskSpaceNotification syn keyword objcConstVar NSBundleResourceRequestLoadingPriorityUrgent """"""""""""""""" " NSProcessInfo.h syn match objcClass /NSProcessInfo\s*\*/me=s+13,he=s+13 syn keyword objcEnumValue NSWindowsNTOperatingSystem NSWindows95OperatingSystem NSSolarisOperatingSystem NSHPUXOperatingSystem NSMACHOperatingSystem NSSunOSOperatingSystem NSOSF1OperatingSystem syn keyword objcType NSOperatingSystemVersion syn keyword objcEnum NSActivityOptions NSProcessInfoThermalState syn keyword objcEnumValue NSActivityIdleDisplaySleepDisabled NSActivityIdleSystemSleepDisabled NSActivitySuddenTerminationDisabled NSActivityAutomaticTerminationDisabled NSActivityUserInitiated NSActivityUserInitiatedAllowingIdleSystemSleep NSActivityBackground NSActivityLatencyCritical NSProcessInfoThermalStateNominal NSProcessInfoThermalStateFair NSProcessInfoThermalStateSerious NSProcessInfoThermalStateCritical syn keyword objcNotificationValue NSProcessInfoThermalStateDidChangeNotification NSProcessInfoPowerStateDidChangeNotification " NSTask.h syn match objcClass /NSTask\s*\*/me=s+6,he=s+6 syn keyword objcEnum NSTaskTerminationReason syn keyword objcEnumValue NSTaskTerminationReasonExit NSTaskTerminationReasonUncaughtSignal syn keyword objcNotificationValue NSTaskDidTerminateNotification " NSThread.h syn match objcClass /NSThread\s*\*/me=s+8,he=s+8 syn keyword objcNotificationValue NSWillBecomeMultiThreadedNotification NSDidBecomeSingleThreadedNotification NSThreadWillExitNotification " NSLock.h syn match objcClass /NSLock\s*\*/me=s+6,he=s+6 syn match objcClass /NSConditionLock\s*\*/me=s+15,he=s+15 syn match objcClass /NSRecursiveLock\s*\*/me=s+15,he=s+15 " NSDictributedLock syn match objcClass /NSDistributedLock\s*\*/me=s+17,he=s+17 " NSOperation.h """""""""""""""" syn match objcClass /NSOperation\s*\*/me=s+11,he=s+11 syn keyword objcEnum NSOperationQueuePriority syn keyword objcEnumValue NSOperationQueuePriorityVeryLow NSOperationQueuePriorityLow NSOperationQueuePriorityNormal NSOperationQueuePriorityHigh NSOperationQueuePriorityVeryHigh syn match objcClass /NSBlockOperation\s*\*/me=s+16,he=s+16 syn match objcClass /NSInvocationOperation\s*\*/me=s+21,he=s+21 syn keyword objcExceptionValue NSInvocationOperationVoidResultException NSInvocationOperationCancelledException syn match objcClass /NSOperationQueue\s*\*/me=s+16,he=s+16 syn keyword objcEnumValue NSOperationQueueDefaultMaxConcurrentOperationCount " NSConnection.h syn match objcClass /NSConnection\s*\*/me=s+12,he=s+12 syn keyword objcConstVar NSConnectionReplyMode syn keyword objcNotificationValue NSConnectionDidDieNotification NSConnectionDidInitializeNotification syn keyword objcExceptionValue NSFailedAuthenticationException " NSPort.h syn match objcClass /NSPort\s*\*/me=s+6,he=s+6 syn keyword objcType NSSocketNativeHandle syn keyword objcNotificationValue NSPortDidBecomeInvalidNotification syn match objcClass /NSMachPort\s*\*/me=s+10,he=s+10 syn keyword objcEnum NSMachPortOptions syn keyword objcEnumValue NSMachPortDeallocateNone NSMachPortDeallocateSendRight NSMachPortDeallocateReceiveRight syn match objcClass /NSMessagePort\s*\*/me=s+13,he=s+13 syn match objcClass /NSSocketPort\s*\*/me=s+12,he=s+12 " NSPortMessage.h syn match objcClass /NSPortMessage\s*\*/me=s+13,he=s+13 " NSDistantObject.h syn match objcClass /NSDistantObject\s*\*/me=s+15,he=s+15 " NSPortNameServer.h syn match objcClass /NSPortNameServer\s*\*/me=s+16,he=s+16 syn match objcClass /NSMessagePortNameServer\s*\*/me=s+23,he=s+23 syn match objcClass /NSSocketPortNameServer\s*\*/me=s+22,he=s+22 " NSHost.h syn match objcClass /NSHost\s*\*/me=s+6,he=s+6 " NSInvocation.h syn match objcClass /NSInvocation\s*\*/me=s+12,he=s+12 " NSMethodSignature.h syn match objcClass /NSMethodSignature\s*\*/me=s+17,he=s+17 """"" " NSScanner.h syn match objcClass /NSScanner\s*\*/me=s+9,he=s+9 " NSTimer.h syn match objcClass /NSTimer\s*\*/me=s+7,he=s+7 " NSAutoreleasePool.h syn match objcClass /NSAutoreleasePool\s*\*/me=s+17,he=s+17 " NSRunLoop.h syn match objcClass /NSRunLoop\s*\*/me=s+9,he=s+9 syn keyword objcConstVar NSDefaultRunLoopMode NSRunLoopCommonModes " NSNull.h syn match objcClass /NSNull\s*\*/me=s+6,he=s+6 " NSProxy.h syn match objcClass /NSProxy\s*\*/me=s+7,he=s+7 " NSObject.h syn match objcClass /NSObject\s*\*/me=s+8,he=s+8 " NSCache.h syn match objcClass /NSCache\s*\*/me=s+7,he=s+7 syn match objcClass /NSCache<.*>\s*\*/me=s+7,he=s+7 contains=objcTypeInfoParams " NSHashTable.h syn match objcClass /NSHashTable\s*\*/me=s+11,he=s+11 syn match objcClass /NSHashTable<.*>\s*\*/me=s+11,he=s+11 contains=objcTypeInfoParams syn keyword objcConstVar NSHashTableStrongMemory NSHashTableZeroingWeakMemory NSHashTableCopyIn NSHashTableObjectPointerPersonality NSHashTableWeakMemory syn keyword objcType NSHashTableOptions NSHashEnumerator NSHashTableCallBacks syn keyword objcConstVar NSIntegerHashCallBacks NSNonOwnedPointerHashCallBacks NSNonRetainedObjectHashCallBacks NSObjectHashCallBacks NSOwnedObjectIdentityHashCallBacks NSOwnedPointerHashCallBacks NSPointerToStructHashCallBacks NSOwnedObjectIdentityHashCallBacks NSOwnedObjectIdentityHashCallBacks NSIntHashCallBacks " NSMapTable.h syn match objcClass /NSMapTable\s*\*/me=s+10,he=s+10 syn match objcClass /NSMapTable<.*>\s*\*/me=s+10,he=s+10 contains=objcTypeInfoParams syn keyword objcConstVar NSPointerToStructHashCallBacks NSPointerToStructHashCallBacks NSPointerToStructHashCallBacks NSPointerToStructHashCallBacks NSPointerToStructHashCallBacks syn keyword objcConstVar NSMapTableStrongMemory NSMapTableZeroingWeakMemory NSMapTableCopyIn NSMapTableObjectPointerPersonality NSMapTableWeakMemory syn keyword objcType NSMapTableOptions NSMapEnumerator NSMapTableKeyCallBacks NSMapTableValueCallBacks syn keyword objcMacro NSNotAnIntMapKey NSNotAnIntegerMapKey NSNotAPointerMapKey syn keyword objcConstVar NSIntegerMapKeyCallBacks NSNonOwnedPointerMapKeyCallBacks NSNonOwnedPointerOrNullMapKeyCallBacks NSNonRetainedObjectMapKeyCallBacks NSObjectMapKeyCallBacks NSOwnedPointerMapKeyCallBacks NSIntMapKeyCallBacks NSIntegerMapValueCallBacks NSNonOwnedPointerMapValueCallBacks NSObjectMapValueCallBacks NSNonRetainedObjectMapValueCallBacks NSOwnedPointerMapValueCallBacks NSIntMapValueCallBacks " NSPointerFunctions.h syn match objcClass /NSPointerFunctions\s*\*/me=s+18,he=s+18 syn keyword objcEnum NSPointerFunctionsOptions syn keyword objcEnumValue NSPointerFunctionsStrongMemory NSPointerFunctionsZeroingWeakMemory NSPointerFunctionsOpaqueMemory NSPointerFunctionsMallocMemory NSPointerFunctionsMachVirtualMemory NSPointerFunctionsWeakMemory NSPointerFunctionsObjectPersonality NSPointerFunctionsOpaquePersonality NSPointerFunctionsObjectPointerPersonality NSPointerFunctionsCStringPersonality NSPointerFunctionsStructPersonality NSPointerFunctionsIntegerPersonality NSPointerFunctionsCopyIn """ Default Highlighting hi def link objcPreProcMacro cConstant hi def link objcPrincipalType cType hi def link objcUsefulTerm cConstant hi def link objcImport cInclude hi def link objcImported cString hi def link objcObjDef cOperator hi def link objcProtocol cOperator hi def link objcProperty cOperator hi def link objcIvarScope cOperator hi def link objcInternalRep cOperator hi def link objcException cOperator hi def link objcThread cOperator hi def link objcPool cOperator hi def link objcModuleImport cOperator hi def link objcSpecial cSpecial hi def link objcString cString hi def link objcHiddenArgument cStatement hi def link objcBlocksQualifier cStorageClass hi def link objcObjectLifetimeQualifier cStorageClass hi def link objcTollFreeBridgeQualifier cStorageClass hi def link objcRemoteMessagingQualifier cStorageClass hi def link objcStorageClass cStorageClass hi def link objcFastEnumKeyword cStatement hi def link objcLiteralSyntaxNumber cNumber hi def link objcLiteralSyntaxChar cCharacter hi def link objcLiteralSyntaxSpecialChar cCharacter hi def link objcLiteralSyntaxOp cOperator hi def link objcDeclPropAccessorName cConstant hi def link objcDeclPropAccessorType cConstant hi def link objcDeclPropAssignSemantics cConstant hi def link objcDeclPropAtomicity cConstant hi def link objcDeclPropARC cConstant hi def link objcDeclPropNullable cConstant hi def link objcDeclPropNonnull cConstant hi def link objcDeclPropNullUnspecified cConstant hi def link objcDeclProcNullResettable cConstant hi def link objcInstanceMethod Function hi def link objcClassMethod Function hi def link objcType cType hi def link objcClass cType hi def link objcTypeSpecifier cType hi def link objcMacro cConstant hi def link objcEnum cType hi def link objcEnumValue cConstant hi def link objcExceptionValue cConstant hi def link objcNotificationValue cConstant hi def link objcConstVar cConstant hi def link objcTypeInfoParams Identifier """ Final step let b:current_syntax = "objc" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 sts=2 neovim-0.2.2/runtime/syntax/objcpp.vim000066400000000000000000000011301320401574200200040ustar00rootroot00000000000000" Vim syntax file " Language: Objective C++ " Maintainer: Kazunobu Kuriyama " Ex-Maintainer: Anthony Hodsdon " Last Change: 2007 Oct 29 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Read in C++ and ObjC syntax files runtime! syntax/cpp.vim unlet b:current_syntax runtime! syntax/objc.vim syn keyword objCppNonStructure class template namespace transparent contained syn keyword objCppNonStatement new delete friend using transparent contained let b:current_syntax = "objcpp" neovim-0.2.2/runtime/syntax/ocaml.vim000066400000000000000000000323451320401574200176360ustar00rootroot00000000000000" Vim syntax file " Language: OCaml " Filenames: *.ml *.mli *.mll *.mly " Maintainers: Markus Mottl " Karl-Heinz Sylla " Issac Trotts " URL: http://www.ocaml.info/vim/syntax/ocaml.vim " Last Change: 2012 May 12 - Added Dominique Pellé's spell checking patch (MM) " 2012 Feb 01 - Improved module path highlighting (MM) " 2010 Oct 11 - Added highlighting of lnot (MM, thanks to Erick Matsen) " A minor patch was applied to the official version so that object/end " can be distinguished from begin/end, which is used for indentation, " and folding. (David Baelde) " quit when a syntax file was already loaded if exists("b:current_syntax") && b:current_syntax == "ocaml" finish endif " OCaml is case sensitive. syn case match " Access to the method of an object syn match ocamlMethod "#" " Script headers highlighted like comments syn match ocamlComment "^#!.*" contains=@Spell " Scripting directives syn match ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|require\|thread\|trace\|untrace\|untrace_all\|print_depth\|print_length\|camlp4o\)\>" " lowercase identifier - the standard way to match syn match ocamlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/ syn match ocamlKeyChar "|" " Errors syn match ocamlBraceErr "}" syn match ocamlBrackErr "\]" syn match ocamlParenErr ")" syn match ocamlArrErr "|]" syn match ocamlCommentErr "\*)" syn match ocamlCountErr "\" syn match ocamlCountErr "\" if !exists("ocaml_revised") syn match ocamlDoErr "\" endif syn match ocamlDoneErr "\" syn match ocamlThenErr "\" " Error-highlighting of "end" without synchronization: " as keyword or as error (default) if exists("ocaml_noend_error") syn match ocamlKeyword "\" else syn match ocamlEndErr "\" endif " Some convenient clusters syn cluster ocamlAllErrs contains=ocamlBraceErr,ocamlBrackErr,ocamlParenErr,ocamlCommentErr,ocamlCountErr,ocamlDoErr,ocamlDoneErr,ocamlEndErr,ocamlThenErr syn cluster ocamlAENoParen contains=ocamlBraceErr,ocamlBrackErr,ocamlCommentErr,ocamlCountErr,ocamlDoErr,ocamlDoneErr,ocamlEndErr,ocamlThenErr syn cluster ocamlContained contains=ocamlTodo,ocamlPreDef,ocamlModParam,ocamlModParam1,ocamlPreMPRestr,ocamlMPRestr,ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3,ocamlModRHS,ocamlFuncWith,ocamlFuncStruct,ocamlModTypeRestr,ocamlModTRWith,ocamlWith,ocamlWithRest,ocamlModType,ocamlFullMod,ocamlVal " Enclosing delimiters syn region ocamlEncl transparent matchgroup=ocamlKeyword start="(" matchgroup=ocamlKeyword end=")" contains=ALLBUT,@ocamlContained,ocamlParenErr syn region ocamlEncl transparent matchgroup=ocamlKeyword start="{" matchgroup=ocamlKeyword end="}" contains=ALLBUT,@ocamlContained,ocamlBraceErr syn region ocamlEncl transparent matchgroup=ocamlKeyword start="\[" matchgroup=ocamlKeyword end="\]" contains=ALLBUT,@ocamlContained,ocamlBrackErr syn region ocamlEncl transparent matchgroup=ocamlKeyword start="\[|" matchgroup=ocamlKeyword end="|\]" contains=ALLBUT,@ocamlContained,ocamlArrErr " Comments syn region ocamlComment start="(\*" end="\*)" contains=@Spell,ocamlComment,ocamlTodo syn keyword ocamlTodo contained TODO FIXME XXX NOTE " Objects syn region ocamlEnd matchgroup=ocamlObject start="\" matchgroup=ocamlObject end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr " Blocks if !exists("ocaml_revised") syn region ocamlEnd matchgroup=ocamlKeyword start="\" matchgroup=ocamlKeyword end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr endif " "for" syn region ocamlNone matchgroup=ocamlKeyword start="\" matchgroup=ocamlKeyword end="\<\(to\|downto\)\>" contains=ALLBUT,@ocamlContained,ocamlCountErr " "do" if !exists("ocaml_revised") syn region ocamlDo matchgroup=ocamlKeyword start="\" matchgroup=ocamlKeyword end="\" contains=ALLBUT,@ocamlContained,ocamlDoneErr endif " "if" syn region ocamlNone matchgroup=ocamlKeyword start="\" matchgroup=ocamlKeyword end="\" contains=ALLBUT,@ocamlContained,ocamlThenErr "" Modules " "sig" syn region ocamlSig matchgroup=ocamlModule start="\" matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule syn region ocamlModSpec matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr " "open" syn region ocamlNone matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment " "include" syn match ocamlKeyword "\" skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod " "module" - somewhat complicated stuff ;-) syn region ocamlModule matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlPreDef syn region ocamlPreDef start="."me=e-1 matchgroup=ocamlKeyword end="\l\|=\|)"me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlModTypeRestr,ocamlModTRWith nextgroup=ocamlModPreRHS syn region ocamlModParam start="([^*]" end=")" contained contains=@ocamlAENoParen,ocamlModParam1,ocamlVal syn match ocamlModParam1 "\<\u\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlPreMPRestr syn region ocamlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlMPRestr,ocamlModTypeRestr syn region ocamlMPRestr start=":" end="."me=e-1 contained contains=@ocamlComment skipwhite skipempty nextgroup=ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3 syn region ocamlMPRestr1 matchgroup=ocamlModule start="\ssig\s\=" matchgroup=ocamlModule end="\" contained contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule syn region ocamlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=ocamlKeyword end="->" contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam skipwhite skipempty nextgroup=ocamlFuncWith,ocamlMPRestr2 syn match ocamlMPRestr3 "\w\(\w\|'\)*\( *\. *\w\(\w\|'\)*\)*" contained syn match ocamlModPreRHS "=" contained skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod syn keyword ocamlKeyword val syn region ocamlVal matchgroup=ocamlKeyword start="\" matchgroup=ocamlLCIdentifier end="\<\l\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment,ocamlFullMod skipwhite skipempty nextgroup=ocamlMPRestr syn region ocamlModRHS start="." end=". *\w\|([^*]"me=e-2 contained contains=ocamlComment skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod syn match ocamlFullMod "\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=ocamlFuncWith syn region ocamlFuncWith start="([^*]"me=e-1 end=")" contained contains=ocamlComment,ocamlWith,ocamlFuncStruct skipwhite skipempty nextgroup=ocamlFuncWith syn region ocamlFuncStruct matchgroup=ocamlModule start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr syn match ocamlModTypeRestr "\<\w\(\w\|'\)*\( *\. *\w\(\w\|'\)*\)*\>" contained syn region ocamlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@ocamlAENoParen,ocamlWith syn match ocamlWith "\<\(\u\(\w\|'\)* *\. *\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlWithRest syn region ocamlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@ocamlContained " "struct" syn region ocamlStruct matchgroup=ocamlModule start="\<\(module\s\+\)\=struct\>" matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr " "module type" syn region ocamlKeyword start="\\s*\\(\s*\\)\=" matchgroup=ocamlModule end="\<\w\(\w\|'\)*\>" contains=ocamlComment skipwhite skipempty nextgroup=ocamlMTDef syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s+1 skipwhite skipempty nextgroup=ocamlFullMod syn keyword ocamlKeyword and as assert class syn keyword ocamlKeyword constraint else syn keyword ocamlKeyword exception external fun syn keyword ocamlKeyword in inherit initializer syn keyword ocamlKeyword land lazy let match syn keyword ocamlKeyword method mutable new of syn keyword ocamlKeyword parser private raise rec syn keyword ocamlKeyword try type syn keyword ocamlKeyword virtual when while with if exists("ocaml_revised") syn keyword ocamlKeyword do value syn keyword ocamlBoolean True False else syn keyword ocamlKeyword function syn keyword ocamlBoolean true false syn match ocamlKeyChar "!" endif syn keyword ocamlType array bool char exn float format format4 syn keyword ocamlType int int32 int64 lazy_t list nativeint option syn keyword ocamlType string unit syn keyword ocamlOperator asr lnot lor lsl lsr lxor mod not syn match ocamlConstructor "(\s*)" syn match ocamlConstructor "\[\s*\]" syn match ocamlConstructor "\[|\s*>|]" syn match ocamlConstructor "\[<\s*>\]" syn match ocamlConstructor "\u\(\w\|'\)*\>" " Polymorphic variants syn match ocamlConstructor "`\w\(\w\|'\)*\>" " Module prefix syn match ocamlModPath "\u\(\w\|'\)* *\."he=e-1 syn match ocamlCharacter "'\\\d\d\d'\|'\\[\'ntbr]'\|'.'" syn match ocamlCharacter "'\\x\x\x'" syn match ocamlCharErr "'\\\d\d'\|'\\\d'" syn match ocamlCharErr "'\\[^\'ntbr]'" syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell syn match ocamlFunDef "->" syn match ocamlRefAssign ":=" syn match ocamlTopStop ";;" syn match ocamlOperator "\^" syn match ocamlOperator "::" syn match ocamlOperator "&&" syn match ocamlOperator "<" syn match ocamlOperator ">" syn match ocamlAnyVar "\<_\>" syn match ocamlKeyChar "|[^\]]"me=e-1 syn match ocamlKeyChar ";" syn match ocamlKeyChar "\~" syn match ocamlKeyChar "?" syn match ocamlKeyChar "\*" syn match ocamlKeyChar "=" if exists("ocaml_revised") syn match ocamlErr "<-" else syn match ocamlOperator "<-" endif syn match ocamlNumber "\<-\=\d\(_\|\d\)*[l|L|n]\?\>" syn match ocamlNumber "\<-\=0[x|X]\(\x\|_\)\+[l|L|n]\?\>" syn match ocamlNumber "\<-\=0[o|O]\(\o\|_\)\+[l|L|n]\?\>" syn match ocamlNumber "\<-\=0[b|B]\([01]\|_\)\+[l|L|n]\?\>" syn match ocamlFloat "\<-\=\d\(_\|\d\)*\.\?\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>" " Labels syn match ocamlLabel "\~\(\l\|_\)\(\w\|'\)*"lc=1 syn match ocamlLabel "?\(\l\|_\)\(\w\|'\)*"lc=1 syn region ocamlLabel transparent matchgroup=ocamlLabel start="?(\(\l\|_\)\(\w\|'\)*"lc=2 end=")"me=e-1 contains=ALLBUT,@ocamlContained,ocamlParenErr " Synchronization syn sync minlines=50 syn sync maxlines=500 if !exists("ocaml_revised") syn sync match ocamlDoSync grouphere ocamlDo "\" syn sync match ocamlDoSync groupthere ocamlDo "\" endif if exists("ocaml_revised") syn sync match ocamlEndSync grouphere ocamlEnd "\<\(object\)\>" else syn sync match ocamlEndSync grouphere ocamlEnd "\<\(begin\|object\)\>" endif syn sync match ocamlEndSync groupthere ocamlEnd "\" syn sync match ocamlStructSync grouphere ocamlStruct "\" syn sync match ocamlStructSync groupthere ocamlStruct "\" syn sync match ocamlSigSync grouphere ocamlSig "\" syn sync match ocamlSigSync groupthere ocamlSig "\" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link ocamlBraceErr Error hi def link ocamlBrackErr Error hi def link ocamlParenErr Error hi def link ocamlArrErr Error hi def link ocamlCommentErr Error hi def link ocamlCountErr Error hi def link ocamlDoErr Error hi def link ocamlDoneErr Error hi def link ocamlEndErr Error hi def link ocamlThenErr Error hi def link ocamlCharErr Error hi def link ocamlErr Error hi def link ocamlComment Comment hi def link ocamlModPath Include hi def link ocamlObject Include hi def link ocamlModule Include hi def link ocamlModParam1 Include hi def link ocamlModType Include hi def link ocamlMPRestr3 Include hi def link ocamlFullMod Include hi def link ocamlModTypeRestr Include hi def link ocamlWith Include hi def link ocamlMTDef Include hi def link ocamlScript Include hi def link ocamlConstructor Constant hi def link ocamlVal Keyword hi def link ocamlModPreRHS Keyword hi def link ocamlMPRestr2 Keyword hi def link ocamlKeyword Keyword hi def link ocamlMethod Include hi def link ocamlFunDef Keyword hi def link ocamlRefAssign Keyword hi def link ocamlKeyChar Keyword hi def link ocamlAnyVar Keyword hi def link ocamlTopStop Keyword hi def link ocamlOperator Keyword hi def link ocamlBoolean Boolean hi def link ocamlCharacter Character hi def link ocamlNumber Number hi def link ocamlFloat Float hi def link ocamlString String hi def link ocamlLabel Identifier hi def link ocamlType Type hi def link ocamlTodo Todo hi def link ocamlEncl Keyword let b:current_syntax = "ocaml" " vim: ts=8 neovim-0.2.2/runtime/syntax/occam.vim000066400000000000000000000103341320401574200176170ustar00rootroot00000000000000" Vim syntax file " Language: occam " Copyright: Fred Barnes , Mario Schweigler " Maintainer: Mario Schweigler " Last Change: 24 May 2003 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif "{{{ Settings " Set shift width for indent setlocal shiftwidth=2 " Set the tab key size to two spaces setlocal softtabstop=2 " Let tab keys always be expanded to spaces setlocal expandtab " Dots are valid in occam identifiers setlocal iskeyword+=. "}}} syn case match syn keyword occamType BYTE BOOL INT INT16 INT32 INT64 REAL32 REAL64 ANY syn keyword occamType CHAN DATA OF TYPE TIMER INITIAL VAL PORT MOBILE PLACED syn keyword occamType PROCESSOR PACKED RECORD PROTOCOL SHARED ROUND TRUNC syn keyword occamStructure SEQ PAR IF ALT PRI FORKING PLACE AT syn keyword occamKeyword PROC IS TRUE FALSE SIZE RECURSIVE REC syn keyword occamKeyword RETYPES RESHAPES STEP FROM FOR RESCHEDULE STOP SKIP FORK syn keyword occamKeyword FUNCTION VALOF RESULT ELSE CLONE CLAIM syn keyword occamBoolean TRUE FALSE syn keyword occamRepeat WHILE syn keyword occamConditional CASE syn keyword occamConstant MOSTNEG MOSTPOS syn match occamBrackets /\[\|\]/ syn match occamParantheses /(\|)/ syn keyword occamOperator AFTER TIMES MINUS PLUS INITIAL REM AND OR XOR NOT syn keyword occamOperator BITAND BITOR BITNOT BYTESIN OFFSETOF syn match occamOperator /::\|:=\|?\|!/ syn match occamOperator /<\|>\|+\|-\|\*\|\/\|\\\|=\|\~/ syn match occamOperator /@\|\$\$\|%\|&&\|<&\|&>\|<\]\|\[>\|\^/ syn match occamSpecialChar /\M**\|*'\|*"\|*#\(\[0-9A-F\]\+\)/ contained syn match occamChar /\M\L\='\[^*\]'/ syn match occamChar /L'[^']*'/ contains=occamSpecialChar syn case ignore syn match occamTodo /\:\=/ contained syn match occamNote /\:\=/ contained syn case match syn keyword occamNote NOT contained syn match occamComment /--.*/ contains=occamCommentTitle,occamTodo,occamNote syn match occamCommentTitle /--\s*\u\a*\(\s\+\u\a*\)*:/hs=s+2 contained contains=occamTodo,occamNote syn match occamCommentTitle /--\s*KROC-LIBRARY\(\.so\|\.a\)\=\s*$/hs=s+2 contained syn match occamCommentTitle /--\s*\(KROC-OPTIONS:\|RUN-PARAMETERS:\)/hs=s+2 contained syn match occamIdentifier /\<[A-Z.][A-Z.0-9]*\>/ syn match occamFunction /\<[A-Za-z.][A-Za-z0-9.]*\>/ contained syn match occamPPIdentifier /##.\{-}\>/ syn region occamString start=/"/ skip=/\M*"/ end=/"/ contains=occamSpecialChar syn region occamCharString start=/'/ end=/'/ contains=occamSpecialChar syn match occamNumber /\<\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/ syn match occamNumber /-\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/ syn match occamNumber /#\(\d\|[A-F]\)\+/ syn match occamNumber /-#\(\d\|[A-F]\)\+/ syn keyword occamCDString SHARED EXTERNAL DEFINED NOALIAS NOUSAGE NOT contained syn keyword occamCDString FILE LINE PROCESS.PRIORITY OCCAM2.5 contained syn keyword occamCDString USER.DEFINED.OPERATORS INITIAL.DECL MOBILES contained syn keyword occamCDString BLOCKING.SYSCALLS VERSION NEED.QUAD.ALIGNMENT contained syn keyword occamCDString TARGET.CANONICAL TARGET.CPU TARGET.OS TARGET.VENDOR contained syn keyword occamCDString TRUE FALSE AND OR contained syn match occamCDString /<\|>\|=\|(\|)/ contained syn region occamCDirective start=/#\(USE\|INCLUDE\|PRAGMA\|DEFINE\|UNDEFINE\|UNDEF\|IF\|ELIF\|ELSE\|ENDIF\|WARNING\|ERROR\|RELAX\)\>/ end=/$/ contains=occamString,occamComment,occamCDString hi def link occamType Type hi def link occamKeyword Keyword hi def link occamComment Comment hi def link occamCommentTitle PreProc hi def link occamTodo Todo hi def link occamNote Todo hi def link occamString String hi def link occamCharString String hi def link occamNumber Number hi def link occamCDirective PreProc hi def link occamCDString String hi def link occamPPIdentifier PreProc hi def link occamBoolean Boolean hi def link occamSpecialChar SpecialChar hi def link occamChar Character hi def link occamStructure Structure hi def link occamIdentifier Identifier hi def link occamConstant Constant hi def link occamOperator Operator hi def link occamFunction Ignore hi def link occamRepeat Repeat hi def link occamConditional Conditional hi def link occamBrackets Type hi def link occamParantheses Delimiter let b:current_syntax = "occam" neovim-0.2.2/runtime/syntax/omnimark.vim000066400000000000000000000143511320401574200203550ustar00rootroot00000000000000" Vim syntax file " Language: Omnimark " Maintainer: Paul Terray " Last Change: 11 Oct 2000 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword=@,48-57,_,128-167,224-235,- syn keyword omnimarkKeywords ACTIVATE AGAIN syn keyword omnimarkKeywords CATCH CLEAR CLOSE COPY COPY-CLEAR CROSS-TRANSLATE syn keyword omnimarkKeywords DEACTIVATE DECLARE DECREMENT DEFINE DISCARD DIVIDE DO DOCUMENT-END DOCUMENT-START DONE DTD-START syn keyword omnimarkKeywords ELEMENT ELSE ESCAPE EXIT syn keyword omnimarkKeywords FAIL FIND FIND-END FIND-START FORMAT syn keyword omnimarkKeywords GROUP syn keyword omnimarkKeywords HALT HALT-EVERYTHING syn keyword omnimarkKeywords IGNORE IMPLIED INCLUDE INCLUDE-END INCLUDE-START INCREMENT INPUT syn keyword omnimarkKeywords JOIN syn keyword omnimarkKeywords LINE-END LINE-START LOG LOOKAHEAD syn keyword omnimarkKeywords MACRO syn keyword omnimarkKeywords MACRO-END MARKED-SECTION MARKUP-COMMENT MARKUP-ERROR MARKUP-PARSER MASK MATCH MINUS MODULO syn keyword omnimarkKeywords NEW NEWLINE NEXT syn keyword omnimarkKeywords OPEN OUTPUT OUTPUT-TO OVER syn keyword omnimarkKeywords PROCESS PROCESS-END PROCESS-START PROCESSING-INSTRUCTION PROLOG-END PROLOG-IN-ERROR PUT syn keyword omnimarkKeywords REMOVE REOPEN REPEAT RESET RETHROW RETURN syn keyword omnimarkKeywords WHEN WHITE-SPACE syn keyword omnimarkKeywords SAVE SAVE-CLEAR SCAN SELECT SET SGML SGML-COMMENT SGML-DECLARATION-END SGML-DTD SGML-DTDS SGML-ERROR SGML-IN SGML-OUT SGML-PARSE SGML-PARSER SHIFT SUBMIT SUCCEED SUPPRESS syn keyword omnimarkKeywords SYSTEM-CALL syn keyword omnimarkKeywords TEST-SYSTEM THROW TO TRANSLATE syn keyword omnimarkKeywords UC UL UNLESS UP-TRANSLATE syn keyword omnimarkKeywords XML-PARSE syn keyword omnimarkCommands ACTIVE AFTER ANCESTOR AND ANOTHER ARG AS ATTACHED ATTRIBUTE ATTRIBUTES syn keyword omnimarkCommands BASE BEFORE BINARY BINARY-INPUT BINARY-MODE BINARY-OUTPUT BREAK-WIDTH BUFFER BY syn keyword omnimarkCommands CASE CHILDREN CLOSED COMPILED-DATE COMPLEMENT CONREF CONTENT CONTEXT-TRANSLATE COUNTER CREATED CREATING CREATOR CURRENT syn keyword omnimarkCommands DATA-ATTRIBUTE DATA-ATTRIBUTES DATA-CONTENT DATA-LETTERS DATE DECLARED-CONREF DECLARED-CURRENT DECLARED-DEFAULTED DECLARED-FIXED DECLARED-IMPLIED DECLARED-REQUIRED syn keyword omnimarkCommands DEFAULT-ENTITY DEFAULTED DEFAULTING DELIMITER DIFFERENCE DIRECTORY DOCTYPE DOCUMENT DOCUMENT-ELEMENT DOMAIN-FREE DOWN-TRANSLATE DTD DTD-END DTDS syn keyword omnimarkCommands ELEMENTS ELSEWHERE EMPTY ENTITIES ENTITY EPILOG-START EQUAL EXCEPT EXISTS EXTERNAL EXTERNAL-DATA-ENTITY EXTERNAL-ENTITY EXTERNAL-FUNCTION EXTERNAL-OUTPUT-FUNCTION syn keyword omnimarkCommands EXTERNAL-TEXT-ENTITY syn keyword omnimarkCommands FALSE FILE FUNCTION FUNCTION-LIBRARY syn keyword omnimarkCommands GENERAL GLOBAL GREATER-EQUAL GREATER-THAN GROUPS syn keyword omnimarkCommands HAS HASNT HERALDED-NAMES syn keyword omnimarkCommands ID ID-CHECKING IDREF IDREFS IN IN-LIBRARY INCLUSION INITIAL INITIAL-SIZE INSERTION-BREAK INSTANCE INTERNAL INVALID-DATA IS ISNT ITEM syn keyword omnimarkCommands KEY KEYED syn keyword omnimarkCommands LAST LASTMOST LC LENGTH LESS-EQUAL LESS-THAN LETTERS LIBRARY LITERAL LOCAL syn keyword omnimarkCommands MATCHES MIXED MODIFIABLE syn keyword omnimarkCommands NAME NAME-LETTERS NAMECASE NAMED NAMES NDATA-ENTITY NEGATE NESTED-REFERENTS NMTOKEN NMTOKENS NO NO-DEFAULT-IO NON-CDATA NON-IMPLIED NON-SDATA NOT NOTATION NUMBER-OF NUMBERS syn keyword omnimarkCommands NUTOKEN NUTOKENS syn keyword omnimarkCommands OCCURRENCE OF OPAQUE OPTIONAL OR syn keyword omnimarkCommands PARAMETER PARENT PAST PATTERN PLUS PREPARENT PREVIOUS PROPER PUBLIC syn keyword omnimarkCommands READ-ONLY READABLE REFERENT REFERENTS REFERENTS-ALLOWED REFERENTS-DISPLAYED REFERENTS-NOT-ALLOWED REMAINDER REPEATED REPLACEMENT-BREAK REVERSED syn keyword omnimarkCommands SILENT-REFERENT SIZE SKIP SOURCE SPECIFIED STATUS STREAM SUBDOC-ENTITY SUBDOCUMENT SUBDOCUMENTS SUBELEMENT SWITCH SYMBOL SYSTEM syn keyword omnimarkCommands TEXT-MODE THIS TIMES TOKEN TRUE syn keyword omnimarkCommands UNANCHORED UNATTACHED UNION USEMAP USING syn keyword omnimarkCommands VALUE VALUED VARIABLE syn keyword omnimarkCommands WITH WRITABLE syn keyword omnimarkCommands XML XML-DTD XML-DTDS syn keyword omnimarkCommands YES syn keyword omnimarkCommands #ADDITIONAL-INFO #APPINFO #CAPACITY #CHARSET #CLASS #COMMAND-LINE-NAMES #CONSOLE #CURRENT-INPUT #CURRENT-OUTPUT #DATA #DOCTYPE #DOCUMENT #DTD #EMPTY #ERROR #ERROR-CODE syn keyword omnimarkCommands #FILE-NAME #FIRST #GROUP #IMPLIED #ITEM #LANGUAGE-VERSION #LAST #LIBPATH #LIBRARY #LIBVALUE #LINE-NUMBER #MAIN-INPUT #MAIN-OUTPUT #MARKUP-ERROR-COUNT #MARKUP-ERROR-TOTAL syn keyword omnimarkCommands #MARKUP-PARSER #MARKUP-WARNING-COUNT #MARKUP-WARNING-TOTAL #MESSAGE #NONE #OUTPUT #PLATFORM-INFO #PROCESS-INPUT #PROCESS-OUTPUT #RECOVERY-INFO #SGML #SGML-ERROR-COUNT syn keyword omnimarkCommands #SGML-ERROR-TOTAL #SGML-WARNING-COUNT #SGML-WARNING-TOTAL #SUPPRESS #SYNTAX #! syn keyword omnimarkPatterns ANY ANY-TEXT syn keyword omnimarkPatterns BLANK syn keyword omnimarkPatterns CDATA CDATA-ENTITY CONTENT-END CONTENT-START syn keyword omnimarkPatterns DIGIT syn keyword omnimarkPatterns LETTER syn keyword omnimarkPatterns NUMBER syn keyword omnimarkPatterns PCDATA syn keyword omnimarkPatterns RCDATA syn keyword omnimarkPatterns SDATA SDATA-ENTITY SPACE syn keyword omnimarkPatterns TEXT syn keyword omnimarkPatterns VALUE-END VALUE-START syn keyword omnimarkPatterns WORD-END WORD-START syn region omnimarkComment start=";" end="$" " strings syn region omnimarkString matchgroup=Normal start=+'+ end=+'+ skip=+%'+ contains=omnimarkEscape syn region omnimarkString matchgroup=Normal start=+"+ end=+"+ skip=+%"+ contains=omnimarkEscape syn match omnimarkEscape contained +%.+ syn match omnimarkEscape contained +%[0-9][0-9]#+ "syn sync maxlines=100 syn sync minlines=2000 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link omnimarkCommands Statement hi def link omnimarkKeywords Identifier hi def link omnimarkString String hi def link omnimarkPatterns Macro " hi def link omnimarkNumber Number hi def link omnimarkComment Comment hi def link omnimarkEscape Special let b:current_syntax = "omnimark" " vim: ts=8 neovim-0.2.2/runtime/syntax/openroad.vim000066400000000000000000000332331320401574200203470ustar00rootroot00000000000000" Vim syntax file " Language: CA-OpenROAD " Maintainer: Luis Moreno " Last change: 2001 Jun 12 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syntax case ignore " Keywords " syntax keyword openroadKeyword ABORT ALL ALTER AND ANY AS ASC AT AVG BEGIN syntax keyword openroadKeyword BETWEEN BY BYREF CALL CALLFRAME CALLPROC CASE syntax keyword openroadKeyword CLEAR CLOSE COMMIT CONNECT CONTINUE COPY COUNT syntax keyword openroadKeyword CREATE CURRENT DBEVENT DECLARE DEFAULT DELETE syntax keyword openroadKeyword DELETEROW DESC DIRECT DISCONNECT DISTINCT DO syntax keyword openroadKeyword DROP ELSE ELSEIF END ENDCASE ENDDECLARE ENDFOR syntax keyword openroadKeyword ENDIF ENDLOOP ENDWHILE ESCAPE EXECUTE EXISTS syntax keyword openroadKeyword EXIT FETCH FIELD FOR FROM GOTOFRAME GRANT GROUP syntax keyword openroadKeyword HAVING IF IMMEDIATE IN INDEX INITIALISE syntax keyword openroadKeyword INITIALIZE INQUIRE_INGRES INQUIRE_SQL INSERT syntax keyword openroadKeyword INSERTROW INSTALLATION INTEGRITY INTO KEY LIKE syntax keyword openroadKeyword LINK MAX MESSAGE METHOD MIN MODE MODIFY NEXT syntax keyword openroadKeyword NOECHO NOT NULL OF ON OPEN OPENFRAME OR ORDER syntax keyword openroadKeyword PERMIT PROCEDURE PROMPT QUALIFICATION RAISE syntax keyword openroadKeyword REGISTER RELOCATE REMOVE REPEAT REPEATED RESUME syntax keyword openroadKeyword RETURN RETURNING REVOKE ROLE ROLLBACK RULE SAVE syntax keyword openroadKeyword SAVEPOINT SELECT SET SLEEP SOME SUM SYSTEM TABLE syntax keyword openroadKeyword THEN TO TRANSACTION UNION UNIQUE UNTIL UPDATE syntax keyword openroadKeyword VALUES VIEW WHERE WHILE WITH WORK syntax keyword openroadTodo contained TODO " Catch errors caused by wrong parenthesis " syntax cluster openroadParenGroup contains=openroadParenError,openroadTodo syntax region openroadParen transparent start='(' end=')' contains=ALLBUT,@openroadParenGroup syntax match openroadParenError ")" highlight link openroadParenError cError " Numbers " syntax match openroadNumber "\<[0-9]\+\>" " String " syntax region openroadString start=+'+ end=+'+ " Operators, Data Types and Functions " syntax match openroadOperator /[\+\-\*\/=\<\>;\(\)]/ syntax keyword openroadType ARRAY BYTE CHAR DATE DECIMAL FLOAT FLOAT4 syntax keyword openroadType FLOAT8 INT1 INT2 INT4 INTEGER INTEGER1 syntax keyword openroadType INTEGER2 INTEGER4 MONEY OBJECT_KEY syntax keyword openroadType SECURITY_LABEL SMALLINT TABLE_KEY VARCHAR syntax keyword openroadFunc IFNULL " System Classes " syntax keyword openroadClass ACTIVEFIELD ANALOGFIELD APPFLAG APPSOURCE syntax keyword openroadClass ARRAYOBJECT ATTRIBUTEOBJECT BARFIELD syntax keyword openroadClass BITMAPOBJECT BOXTRIM BREAKSPEC BUTTONFIELD syntax keyword openroadClass CELLATTRIBUTE CHOICEBITMAP CHOICEDETAIL syntax keyword openroadClass CHOICEFIELD CHOICEITEM CHOICELIST CLASS syntax keyword openroadClass CLASSSOURCE COLUMNCROSS COLUMNFIELD syntax keyword openroadClass COMPOSITEFIELD COMPSOURCE CONTROLBUTTON syntax keyword openroadClass CROSSTABLE CURSORBITMAP CURSOROBJECT DATASTREAM syntax keyword openroadClass DATEOBJECT DBEVENTOBJECT DBSESSIONOBJECT syntax keyword openroadClass DISPLAYFORM DYNEXPR ELLIPSESHAPE ENTRYFIELD syntax keyword openroadClass ENUMFIELD EVENT EXTOBJECT EXTOBJFIELD syntax keyword openroadClass FIELDOBJECT FLEXIBLEFORM FLOATOBJECT FORMFIELD syntax keyword openroadClass FRAMEEXEC FRAMEFORM FRAMESOURCE FREETRIM syntax keyword openroadClass GHOSTEXEC GHOSTSOURCE IMAGEFIELD IMAGETRIM syntax keyword openroadClass INTEGEROBJECT LISTFIELD LISTVIEWCOLATTR syntax keyword openroadClass LISTVIEWFIELD LONGBYTEOBJECT LONGVCHAROBJECT syntax keyword openroadClass MATRIXFIELD MENUBAR MENUBUTTON MENUFIELD syntax keyword openroadClass MENUGROUP MENUITEM MENULIST MENUSEPARATOR syntax keyword openroadClass MENUSTACK MENUTOGGLE METHODEXEC METHODOBJECT syntax keyword openroadClass MONEYOBJECT OBJECT OPTIONFIELD OPTIONMENU syntax keyword openroadClass PALETTEFIELD POPUPBUTTON PROC4GLSOURCE PROCEXEC syntax keyword openroadClass PROCHANDLE QUERYCOL QUERYOBJECT QUERYPARM syntax keyword openroadClass QUERYTABLE RADIOFIELD RECTANGLESHAPE ROWCROSS syntax keyword openroadClass SCALARFIELD SCOPE SCROLLBARFIELD SEGMENTSHAPE syntax keyword openroadClass SESSIONOBJECT SHAPEFIELD SLIDERFIELD SQLSELECT syntax keyword openroadClass STACKFIELD STRINGOBJECT SUBFORM TABBAR syntax keyword openroadClass TABFIELD TABFOLDER TABLEFIELD TABPAGE syntax keyword openroadClass TOGGLEFIELD TREE TREENODE TREEVIEWFIELD syntax keyword openroadClass USERCLASSOBJECT USEROBJECT VIEWPORTFIELD " System Events " syntax keyword openroadEvent CHILDCLICK CHILDCLICKPOINT CHILDCOLLAPSED syntax keyword openroadEvent CHILDDETAILS CHILDDOUBLECLICK CHILDDRAGBOX syntax keyword openroadEvent CHILDDRAGSEGMENT CHILDENTRY CHILDEXIT syntax keyword openroadEvent CHILDEXPANDED CHILDHEADERCLICK CHILDMOVED syntax keyword openroadEvent CHILDPROPERTIES CHILDRESIZED CHILDSCROLL syntax keyword openroadEvent CHILDSELECT CHILDSELECTIONCHANGED CHILDSETVALUE syntax keyword openroadEvent CHILDUNSELECT CHILDVALIDATE CLICK CLICKPOINT syntax keyword openroadEvent COLLAPSED DBEVENT DETAILS DOUBLECLICK DRAGBOX syntax keyword openroadEvent DRAGSEGMENT ENTRY EXIT EXPANDED EXTCLASSEVENT syntax keyword openroadEvent FRAMEACTIVATE FRAMEDEACTIVATE HEADERCLICK syntax keyword openroadEvent INSERTROW LABELCHANGED MOVED PAGEACTIVATED syntax keyword openroadEvent PAGECHANGED PAGEDEACTIVATED PROPERTIES RESIZED syntax keyword openroadEvent SCROLL SELECT SELECTIONCHANGED SETVALUE syntax keyword openroadEvent TERMINATE UNSELECT USEREVENT VALIDATE syntax keyword openroadEvent WINDOWCLOSE WINDOWICON WINDOWMOVED WINDOWRESIZED syntax keyword openroadEvent WINDOWVISIBLE " System Constants " syntax keyword openroadConst BF_BMP BF_GIF BF_SUNRASTER BF_TIFF syntax keyword openroadConst BF_WINDOWCURSOR BF_WINDOWICON BF_XBM syntax keyword openroadConst CC_BACKGROUND CC_BLACK CC_BLUE CC_BROWN CC_CYAN syntax keyword openroadConst CC_DEFAULT_1 CC_DEFAULT_10 CC_DEFAULT_11 syntax keyword openroadConst CC_DEFAULT_12 CC_DEFAULT_13 CC_DEFAULT_14 syntax keyword openroadConst CC_DEFAULT_15 CC_DEFAULT_16 CC_DEFAULT_17 syntax keyword openroadConst CC_DEFAULT_18 CC_DEFAULT_19 CC_DEFAULT_2 syntax keyword openroadConst CC_DEFAULT_20 CC_DEFAULT_21 CC_DEFAULT_22 syntax keyword openroadConst CC_DEFAULT_23 CC_DEFAULT_24 CC_DEFAULT_25 syntax keyword openroadConst CC_DEFAULT_26 CC_DEFAULT_27 CC_DEFAULT_28 syntax keyword openroadConst CC_DEFAULT_29 CC_DEFAULT_3 CC_DEFAULT_30 syntax keyword openroadConst CC_DEFAULT_4 CC_DEFAULT_5 CC_DEFAULT_6 syntax keyword openroadConst CC_DEFAULT_7 CC_DEFAULT_8 CC_DEFAULT_9 syntax keyword openroadConst CC_FOREGROUND CC_GRAY CC_GREEN CC_LIGHT_BLUE syntax keyword openroadConst CC_LIGHT_BROWN CC_LIGHT_CYAN CC_LIGHT_GRAY syntax keyword openroadConst CC_LIGHT_GREEN CC_LIGHT_ORANGE CC_LIGHT_PINK syntax keyword openroadConst CC_LIGHT_PURPLE CC_LIGHT_RED CC_LIGHT_YELLOW syntax keyword openroadConst CC_MAGENTA CC_ORANGE CC_PALE_BLUE CC_PALE_BROWN syntax keyword openroadConst CC_PALE_CYAN CC_PALE_GRAY CC_PALE_GREEN syntax keyword openroadConst CC_PALE_ORANGE CC_PALE_PINK CC_PALE_PURPLE syntax keyword openroadConst CC_PALE_RED CC_PALE_YELLOW CC_PINK CC_PURPLE syntax keyword openroadConst CC_RED CC_SYS_ACTIVEBORDER CC_SYS_ACTIVECAPTION syntax keyword openroadConst CC_SYS_APPWORKSPACE CC_SYS_BACKGROUND syntax keyword openroadConst CC_SYS_BTNFACE CC_SYS_BTNSHADOW CC_SYS_BTNTEXT syntax keyword openroadConst CC_SYS_CAPTIONTEXT CC_SYS_GRAYTEXT syntax keyword openroadConst CC_SYS_HIGHLIGHT CC_SYS_HIGHLIGHTTEXT syntax keyword openroadConst CC_SYS_INACTIVEBORDER CC_SYS_INACTIVECAPTION syntax keyword openroadConst CC_SYS_INACTIVECAPTIONTEXT CC_SYS_MENU syntax keyword openroadConst CC_SYS_MENUTEXT CC_SYS_SCROLLBAR CC_SYS_SHADOW syntax keyword openroadConst CC_SYS_WINDOW CC_SYS_WINDOWFRAME syntax keyword openroadConst CC_SYS_WINDOWTEXT CC_WHITE CC_YELLOW syntax keyword openroadConst CL_INVALIDVALUE CP_BOTH CP_COLUMNS CP_NONE syntax keyword openroadConst CP_ROWS CS_CLOSED CS_CURRENT CS_NOCURRENT syntax keyword openroadConst CS_NO_MORE_ROWS CS_OPEN CS_OPEN_CACHED DC_BW syntax keyword openroadConst DC_COLOR DP_AUTOSIZE_FIELD DP_CLIP_IMAGE syntax keyword openroadConst DP_SCALE_IMAGE_H DP_SCALE_IMAGE_HW syntax keyword openroadConst DP_SCALE_IMAGE_W DS_CONNECTED DS_DISABLED syntax keyword openroadConst DS_DISCONNECTED DS_INGRES_DBMS DS_NO_DBMS syntax keyword openroadConst DS_ORACLE_DBMS DS_SQLSERVER_DBMS DV_NULL syntax keyword openroadConst DV_STRING DV_SYSTEM EH_NEXT_HANDLER EH_RESUME syntax keyword openroadConst EH_RETRY EP_INTERACTIVE EP_NONE EP_OUTPUT syntax keyword openroadConst ER_FAIL ER_NAMEEXISTS ER_OK ER_OUTOFRANGE syntax keyword openroadConst ER_ROWNOTFOUND ER_USER1 ER_USER10 ER_USER2 syntax keyword openroadConst ER_USER3 ER_USER4 ER_USER5 ER_USER6 ER_USER7 syntax keyword openroadConst ER_USER8 ER_USER9 FALSE FA_BOTTOMCENTER syntax keyword openroadConst FA_BOTTOMLEFT FA_BOTTOMRIGHT FA_CENTER syntax keyword openroadConst FA_CENTERLEFT FA_CENTERRIGHT FA_DEFAULT FA_NONE syntax keyword openroadConst FA_TOPCENTER FA_TOPLEFT FA_TOPRIGHT syntax keyword openroadConst FB_CHANGEABLE FB_CLICKPOINT FB_DIMMED FB_DRAGBOX syntax keyword openroadConst FB_DRAGSEGMENT FB_FLEXIBLE FB_INVISIBLE syntax keyword openroadConst FB_LANDABLE FB_MARKABLE FB_RESIZEABLE syntax keyword openroadConst FB_VIEWABLE FB_VISIBLE FC_LOWER FC_NONE FC_UPPER syntax keyword openroadConst FM_QUERY FM_READ FM_UPDATE FM_USER1 FM_USER2 syntax keyword openroadConst FM_USER3 FO_DEFAULT FO_HORIZONTAL FO_VERTICAL syntax keyword openroadConst FP_BITMAP FP_CLEAR FP_CROSSHATCH FP_DARKSHADE syntax keyword openroadConst FP_DEFAULT FP_HORIZONTAL FP_LIGHTSHADE FP_SHADE syntax keyword openroadConst FP_SOLID FP_VERTICAL FT_NOTSETVALUE FT_SETVALUE syntax keyword openroadConst FT_TABTO FT_TAKEFOCUS GF_BOTTOM GF_DEFAULT syntax keyword openroadConst GF_LEFT GF_RIGHT GF_TOP HC_DOUBLEQUOTE syntax keyword openroadConst HC_FORMFEED HC_NEWLINE HC_QUOTE HC_SPACE HC_TAB syntax keyword openroadConst HV_CONTENTS HV_CONTEXT HV_HELPONHELP HV_KEY syntax keyword openroadConst HV_QUIT LS_3D LS_DASH LS_DASHDOT LS_DASHDOTDOT syntax keyword openroadConst LS_DEFAULT LS_DOT LS_SOLID LW_DEFAULT syntax keyword openroadConst LW_EXTRATHIN LW_MAXIMUM LW_MIDDLE LW_MINIMUM syntax keyword openroadConst LW_NOLINE LW_THICK LW_THIN LW_VERYTHICK syntax keyword openroadConst LW_VERYTHIN MB_DISABLED MB_ENABLED MB_INVISIBLE syntax keyword openroadConst MB_MOVEABLE MT_ERROR MT_INFO MT_NONE MT_WARNING syntax keyword openroadConst OP_APPEND OP_NONE OS3D OS_DEFAULT OS_SHADOW syntax keyword openroadConst OS_SOLID PU_CANCEL PU_OK QS_ACTIVE QS_INACTIVE syntax keyword openroadConst QS_SETCOL QY_ARRAY QY_CACHE QY_CURSOR QY_DIRECT syntax keyword openroadConst RC_CHILDSELECTED RC_DOWN RC_END RC_FIELDFREED syntax keyword openroadConst RC_FIELDORPHANED RC_GROUPSELECT RC_HOME RC_LEFT syntax keyword openroadConst RC_MODECHANGED RC_MOUSECLICK RC_MOUSEDRAG syntax keyword openroadConst RC_NEXT RC_NOTAPPLICABLE RC_PAGEDOWN RC_PAGEUP syntax keyword openroadConst RC_PARENTSELECTED RC_PREVIOUS RC_PROGRAM syntax keyword openroadConst RC_RESUME RC_RETURN RC_RIGHT RC_ROWDELETED syntax keyword openroadConst RC_ROWINSERTED RC_ROWSALLDELETED RC_SELECT syntax keyword openroadConst RC_TFSCROLL RC_TOGGLESELECT RC_UP RS_CHANGED syntax keyword openroadConst RS_DELETED RS_NEW RS_UNCHANGED RS_UNDEFINED syntax keyword openroadConst SK_CLOSE SK_COPY SK_CUT SK_DELETE SK_DETAILS syntax keyword openroadConst SK_DUPLICATE SK_FIND SK_GO SK_HELP SK_NEXT syntax keyword openroadConst SK_NONE SK_PASTE SK_PROPS SK_QUIT SK_REDO syntax keyword openroadConst SK_SAVE SK_TFDELETEALLROWS SK_TFDELETEROW syntax keyword openroadConst SK_TFFIND SK_TFINSERTROW SK_UNDO SP_APPSTARTING syntax keyword openroadConst SP_ARROW SP_CROSS SP_IBEAM SP_ICON SP_NO syntax keyword openroadConst SP_SIZE SP_SIZENESW SP_SIZENS SP_SIZENWSE syntax keyword openroadConst SP_SIZEWE SP_UPARROW SP_WAIT SY_NT SY_OS2 syntax keyword openroadConst SY_UNIX SY_VMS SY_WIN95 TF_COURIER TF_HELVETICA syntax keyword openroadConst TF_LUCIDA TF_MENUDEFAULT TF_NEWCENTURY TF_SYSTEM syntax keyword openroadConst TF_TIMESROMAN TRUE UE_DATAERROR UE_EXITED syntax keyword openroadConst UE_NOTACTIVE UE_PURGED UE_RESUMED UE_UNKNOWN syntax keyword openroadConst WI_MOTIF WI_MSWIN32 WI_MSWINDOWS WI_NONE WI_PM syntax keyword openroadConst WP_FLOATING WP_INTERACTIVE WP_PARENTCENTERED syntax keyword openroadConst WP_PARENTRELATIVE WP_SCREENCENTERED syntax keyword openroadConst WP_SCREENRELATIVE WV_ICON WV_INVISIBLE syntax keyword openroadConst WV_UNREALIZED WV_VISIBLE " System Variables " syntax keyword openroadVar CurFrame CurProcedure CurMethod CurObject " Identifiers " syntax match openroadIdent /[a-zA-Z_][a-zA-Z_]*![a-zA-Z_][a-zA-Z_]*/ " Comments " if exists("openroad_comment_strings") syntax match openroadCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region openroadCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" syntax region openroadComment start="/\*" end="\*/" contains=openroadCommentString,openroadCharacter,openroadNumber syntax match openroadComment "//.*" contains=openroadComment2String,openroadCharacter,openroadNumber else syn region openroadComment start="/\*" end="\*/" syn match openroadComment "//.*" endif " Define the default highlighting. " Only when an item doesn't have highlighting yet " hi def link openroadKeyword Statement hi def link openroadNumber Number hi def link openroadString String hi def link openroadComment Comment hi def link openroadOperator Operator hi def link openroadType Type hi def link openroadFunc Special hi def link openroadClass Type hi def link openroadEvent Statement hi def link openroadConst Constant hi def link openroadVar Identifier hi def link openroadIdent Identifier hi def link openroadTodo Todo let b:current_syntax = "openroad" neovim-0.2.2/runtime/syntax/opl.vim000066400000000000000000000100401320401574200173210ustar00rootroot00000000000000" Vim syntax file " Language: OPL " Maintainer: Czo " Last Change: 2012 Feb 03 by Thilo Six " $Id: opl.vim,v 1.1 2004/06/13 17:34:11 vimboss Exp $ " Open Psion Language... (EPOC16/EPOC32) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " case is not significant syn case ignore " A bunch of useful OPL keywords syn keyword OPLStatement proc endp abs acos addr adjustalloc alert alloc app syn keyword OPLStatement append appendsprite asc asin at atan back beep syn keyword OPLStatement begintrans bookmark break busy byref cache syn keyword OPLStatement cachehdr cacherec cachetidy call cancel caption syn keyword OPLStatement changesprite chr$ clearflags close closesprite cls syn keyword OPLStatement cmd$ committrans compact compress const continue syn keyword OPLStatement copy cos count create createsprite cursor syn keyword OPLStatement datetosecs datim$ day dayname$ days daystodate syn keyword OPLStatement dbuttons dcheckbox dchoice ddate declare dedit syn keyword OPLStatement deditmulti defaultwin deg delete dfile dfloat syn keyword OPLStatement dialog diaminit diampos dinit dir$ dlong do dow syn keyword OPLStatement dposition drawsprite dtext dtime dxinput edit else syn keyword OPLStatement elseif enda endif endv endwh entersend entersend0 syn keyword OPLStatement eof erase err err$ errx$ escape eval exist exp ext syn keyword OPLStatement external find findfield findlib first fix$ flags syn keyword OPLStatement flt font freealloc gat gborder gbox gbutton syn keyword OPLStatement gcircle gclock gclose gcls gcolor gcopy gcreate syn keyword OPLStatement gcreatebit gdrawobject gellipse gen$ get get$ syn keyword OPLStatement getcmd$ getdoc$ getevent getevent32 geteventa32 syn keyword OPLStatement geteventc getlibh gfill gfont ggmode ggrey gheight syn keyword OPLStatement gidentity ginfo ginfo32 ginvert giprint glineby syn keyword OPLStatement glineto gloadbit gloadfont global gmove gorder syn keyword OPLStatement goriginx goriginy goto gotomark gpatt gpeekline syn keyword OPLStatement gpoly gprint gprintb gprintclip grank gsavebit syn keyword OPLStatement gscroll gsetpenwidth gsetwin gstyle gtmode gtwidth syn keyword OPLStatement gunloadfont gupdate guse gvisible gwidth gx syn keyword OPLStatement gxborder gxprint gy hex$ hour iabs icon if include syn keyword OPLStatement input insert int intf intrans key key$ keya keyc syn keyword OPLStatement killmark kmod last lclose left$ len lenalloc syn keyword OPLStatement linklib ln loadlib loadm loc local lock log lopen syn keyword OPLStatement lower$ lprint max mcard mcasc mean menu mid$ min syn keyword OPLStatement minit minute mkdir modify month month$ mpopup syn keyword OPLStatement newobj newobjh next notes num$ odbinfo off onerr syn keyword OPLStatement open openr opx os parse$ path pause peek pi syn keyword OPLStatement pointerfilter poke pos position possprite print syn keyword OPLStatement put rad raise randomize realloc recsize rename syn keyword OPLStatement rept$ return right$ rmdir rnd rollback sci$ screen syn keyword OPLStatement screeninfo second secstodate send setdoc setflags syn keyword OPLStatement setname setpath sin space sqr statuswin syn keyword OPLStatement statwininfo std stop style sum tan testevent trap syn keyword OPLStatement type uadd unloadlib unloadm until update upper$ syn keyword OPLStatement use usr usr$ usub val var vector week while year " syn keyword OPLStatement rem syn match OPLNumber "\<\d\+\>" syn match OPLNumber "\<\d\+\.\d*\>" syn match OPLNumber "\.\d\+\>" syn region OPLString start=+"+ end=+"+ syn region OPLComment start="REM[\t ]" end="$" syn match OPLMathsOperator "-\|=\|[:<>+\*^/\\]" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link OPLStatement Statement hi def link OPLNumber Number hi def link OPLString String hi def link OPLComment Comment hi def link OPLMathsOperator Conditional " hi def link OPLError Error let b:current_syntax = "opl" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/ora.vim000066400000000000000000000650051320401574200173230ustar00rootroot00000000000000" Vim syntax file " Language: Oracle config files (.ora) (Oracle 8i, ver. 8.1.5) " Maintainer: Sandor Kopanyi " Url: <-> " Last Change: 2003 May 11 " * the keywords are listed by file (sqlnet.ora, listener.ora, etc.) " * the parathesis-checking is made at the beginning for all keywords " * possible values are listed also " * there are some overlappings (e.g. METHOD is mentioned both for " sqlnet-ora and tnsnames.ora; since will not cause(?) problems " is easier to follow separately each file's keywords) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'ora' endif syn case ignore "comments syn match oraComment "\#.*" " catch errors caused by wrong parenthesis syn region oraParen transparent start="(" end=")" contains=@oraAll,oraParen syn match oraParenError ")" " strings syn region oraString start=+"+ end=+"+ "common .ora staff "common protocol parameters syn keyword oraKeywordGroup ADDRESS ADDRESS_LIST syn keyword oraKeywordGroup DESCRIPTION_LIST DESCRIPTION "all protocols syn keyword oraKeyword PROTOCOL syn keyword oraValue ipc tcp nmp "Bequeath syn keyword oraKeyword PROGRAM ARGV0 ARGS "IPC syn keyword oraKeyword KEY "Named Pipes syn keyword oraKeyword SERVER PIPE "LU6.2 syn keyword oraKeyword LU_NAME LLU LOCAL_LU LLU_NAME LOCAL_LU_NAME syn keyword oraKeyword MODE MDN syn keyword oraKeyword PLU PARTNER_LU_NAME PLU_LA PARTNER_LU_LOCAL_ALIAS syn keyword oraKeyword TP_NAME TPN "SPX syn keyword oraKeyword SERVICE "TCP/IP and TCP/IP with SSL syn keyword oraKeyword HOST PORT "misc. keywords I've met but didn't find in manual (maybe they are deprecated?) syn keyword oraKeywordGroup COMMUNITY_LIST syn keyword oraKeyword COMMUNITY NAME DEFAULT_ZONE syn keyword oraValue tcpcom "common values syn keyword oraValue yes no on off true false null all none ok "word 'world' is used a lot... syn keyword oraModifier world "misc. common keywords syn keyword oraKeyword TRACE_DIRECTORY TRACE_LEVEL TRACE_FILE "sqlnet.ora syn keyword oraKeywordPref NAMES NAMESCTL syn keyword oraKeywordPref OSS SOURCE SQLNET TNSPING syn keyword oraKeyword AUTOMATIC_IPC BEQUEATH_DETACH DAEMON TRACE_MASK syn keyword oraKeyword DISABLE_OOB syn keyword oraKeyword LOG_DIRECTORY_CLIENT LOG_DIRECTORY_SERVER syn keyword oraKeyword LOG_FILE_CLIENT LOG_FILE_SERVER syn keyword oraKeyword DCE PREFIX DEFAULT_DOMAIN DIRECTORY_PATH syn keyword oraKeyword INITIAL_RETRY_TIMEOUT MAX_OPEN_CONNECTIONS syn keyword oraKeyword MESSAGE_POOL_START_SIZE NIS META_MAP syn keyword oraKeyword PASSWORD PREFERRED_SERVERS REQUEST_RETRIES syn keyword oraKeyword INTERNAL_ENCRYPT_PASSWORD INTERNAL_USE syn keyword oraKeyword NO_INITIAL_SERVER NOCONFIRM syn keyword oraKeyword SERVER_PASSWORD TRACE_UNIQUE MY_WALLET syn keyword oraKeyword LOCATION DIRECTORY METHOD METHOD_DATA syn keyword oraKeyword SQLNET_ADDRESS syn keyword oraKeyword AUTHENTICATION_SERVICES syn keyword oraKeyword AUTHENTICATION_KERBEROS5_SERVICE syn keyword oraKeyword AUTHENTICATION_GSSAPI_SERVICE syn keyword oraKeyword CLIENT_REGISTRATION syn keyword oraKeyword CRYPTO_CHECKSUM_CLIENT CRYPTO_CHECKSUM_SERVER syn keyword oraKeyword CRYPTO_CHECKSUM_TYPES_CLIENT CRYPTO_CHECKSUM_TYPES_SERVER syn keyword oraKeyword CRYPTO_SEED syn keyword oraKeyword ENCRYPTION_CLIENT ENCRYPTION_SERVER syn keyword oraKeyword ENCRYPTION_TYPES_CLIENT ENCRYPTION_TYPES_SERVER syn keyword oraKeyword EXPIRE_TIME syn keyword oraKeyword IDENTIX_FINGERPRINT_DATABASE IDENTIX_FINGERPRINT_DATABASE_USER syn keyword oraKeyword IDENTIX_FINGERPRINT_DATABASE_PASSWORD IDENTIX_FINGERPRINT_METHOD syn keyword oraKeyword KERBEROS5_CC_NAME KERBEROS5_CLOCKSKEW KERBEROS5_CONF syn keyword oraKeyword KERBEROS5_KEYTAB KERBEROS5_REALMS syn keyword oraKeyword RADIUS_ALTERNATE RADIUS_ALTERNATE_PORT RADIUS_ALTERNATE_RETRIES syn keyword oraKeyword RADIUS_AUTHENTICATION_TIMEOUT RADIUS_AUTHENTICATION syn keyword oraKeyword RADIUS_AUTHENTICATION_INTERFACE RADIUS_AUTHENTICATION_PORT syn keyword oraKeyword RADIUS_AUTHENTICATION_RETRIES RADIUS_AUTHENTICATION_TIMEOUT syn keyword oraKeyword RADIUS_CHALLENGE_RESPONSE RADIUS_SECRET RADIUS_SEND_ACCOUNTING syn keyword oraKeyword SSL_CLIENT_AUTHENTICATION SSL_CIPHER_SUITES SSL_VERSION syn keyword oraKeyword TRACE_DIRECTORY_CLIENT TRACE_DIRECTORY_SERVER syn keyword oraKeyword TRACE_FILE_CLIENT TRACE_FILE_SERVER syn keyword oraKeyword TRACE_LEVEL_CLIENT TRACE_LEVEL_SERVER syn keyword oraKeyword TRACE_UNIQUE_CLIENT syn keyword oraKeyword USE_CMAN USE_DEDICATED_SERVER syn keyword oraValue user admin support syn keyword oraValue accept accepted reject rejected requested required syn keyword oraValue md5 rc4_40 rc4_56 rc4_128 des des_40 syn keyword oraValue tnsnames onames hostname dce nis novell syn keyword oraValue file oracle syn keyword oraValue oss syn keyword oraValue beq nds nts kerberos5 securid cybersafe identix dcegssapi radius syn keyword oraValue undetermined "tnsnames.ora syn keyword oraKeywordGroup CONNECT_DATA FAILOVER_MODE syn keyword oraKeyword FAILOVER LOAD_BALANCE SOURCE_ROUTE TYPE_OF_SERVICE syn keyword oraKeyword BACKUP TYPE METHOD GLOBAL_NAME HS syn keyword oraKeyword INSTANCE_NAME RDB_DATABASE SDU SERVER syn keyword oraKeyword SERVICE_NAME SERVICE_NAMES SID syn keyword oraKeyword HANDLER_NAME EXTPROC_CONNECTION_DATA syn keyword oraValue session select basic preconnect dedicated shared "listener.ora syn keyword oraKeywordGroup SID_LIST SID_DESC PRESPAWN_LIST PRESPAWN_DESC syn match oraKeywordGroup "SID_LIST_\w*" syn keyword oraKeyword PROTOCOL_STACK PRESENTATION SESSION syn keyword oraKeyword GLOBAL_DBNAME ORACLE_HOME PROGRAM SID_NAME syn keyword oraKeyword PRESPAWN_MAX POOL_SIZE TIMEOUT syn match oraKeyword "CONNECT_TIMEOUT_\w*" syn match oraKeyword "LOG_DIRECTORY_\w*" syn match oraKeyword "LOG_FILE_\w*" syn match oraKeyword "PASSWORDS_\w*" syn match oraKeyword "STARTUP_WAIT_TIME_\w*" syn match oraKeyword "STARTUP_WAITTIME_\w*" syn match oraKeyword "TRACE_DIRECTORY_\w*" syn match oraKeyword "TRACE_FILE_\w*" syn match oraKeyword "TRACE_LEVEL_\w*" syn match oraKeyword "USE_PLUG_AND_PLAY_\w*" syn keyword oraValue ttc giop ns raw "names.ora syn keyword oraKeywordGroup ADDRESSES ADMIN_REGION syn keyword oraKeywordGroup DEFAULT_FORWARDERS FORWARDER_LIST FORWARDER syn keyword oraKeywordGroup DOMAIN_HINTS HINT_DESC HINT_LIST syn keyword oraKeywordGroup DOMAINS DOMAIN_LIST DOMAIN syn keyword oraKeywordPref NAMES syn keyword oraKeyword EXPIRE REFRESH REGION RETRY USERID VERSION syn keyword oraKeyword AUTHORITY_REQUIRED CONNECT_TIMEOUT syn keyword oraKeyword AUTO_REFRESH_EXPIRE AUTO_REFRESH_RETRY syn keyword oraKeyword CACHE_CHECKPOINT_FILE CACHE_CHECKPOINT_INTERVAL syn keyword oraKeyword CONFIG_CHECKPOINT_FILE DEFAULT_FORWARDERS_ONLY syn keyword oraKeyword HINT FORWARDING_AVAILABLE FORWARDING_DESIRED syn keyword oraKeyword KEEP_DB_OPEN syn keyword oraKeyword LOG_DIRECTORY LOG_FILE LOG_STATS_INTERVAL LOG_UNIQUE syn keyword oraKeyword MAX_OPEN_CONNECTIONS MAX_REFORWARDS syn keyword oraKeyword MESSAGE_POOL_START_SIZE syn keyword oraKeyword NO_MODIFY_REQUESTS NO_REGION_DATABASE syn keyword oraKeyword PASSWORD REGION_CHECKPOINT_FILE syn keyword oraKeyword RESET_STATS_INTERVAL SAVE_CONFIG_ON_STOP syn keyword oraKeyword SERVER_NAME TRACE_FUNC TRACE_UNIQUE "cman.ora syn keyword oraKeywordGroup CMAN CMAN_ADMIN CMAN_PROFILE PARAMETER_LIST syn keyword oraKeywordGroup CMAN_RULES RULES_LIST RULE syn keyword oraKeyword ANSWER_TIMEOUT AUTHENTICATION_LEVEL LOG_LEVEL syn keyword oraKeyword MAX_FREELIST_BUFFERS MAXIMUM_CONNECT_DATA MAXIMUM_RELAYS syn keyword oraKeyword RELAY_STATISTICS SHOW_TNS_INFO TRACING syn keyword oraKeyword USE_ASYNC_CALL SRC DST SRV ACT "protocol.ora syn match oraKeyword "\w*\.EXCLUDED_NODES" syn match oraKeyword "\w*\.INVITED_NODES" syn match oraKeyword "\w*\.VALIDNODE_CHECKING" syn keyword oraKeyword TCP NODELAY "--------------------------------------- "init.ora "common values syn keyword oraValue nested_loops merge hash unlimited "init params syn keyword oraKeyword O7_DICTIONARY_ACCESSIBILITY ALWAYS_ANTI_JOIN ALWAYS_SEMI_JOIN syn keyword oraKeyword AQ_TM_PROCESSES ARCH_IO_SLAVES AUDIT_FILE_DEST AUDIT_TRAIL syn keyword oraKeyword BACKGROUND_CORE_DUMP BACKGROUND_DUMP_DEST syn keyword oraKeyword BACKUP_TAPE_IO_SLAVES BITMAP_MERGE_AREA_SIZE syn keyword oraKeyword BLANK_TRIMMING BUFFER_POOL_KEEP BUFFER_POOL_RECYCLE syn keyword oraKeyword COMMIT_POINT_STRENGTH COMPATIBLE CONTROL_FILE_RECORD_KEEP_TIME syn keyword oraKeyword CONTROL_FILES CORE_DUMP_DEST CPU_COUNT syn keyword oraKeyword CREATE_BITMAP_AREA_SIZE CURSOR_SPACE_FOR_TIME syn keyword oraKeyword DB_BLOCK_BUFFERS DB_BLOCK_CHECKING DB_BLOCK_CHECKSUM syn keyword oraKeyword DB_BLOCK_LRU_LATCHES DB_BLOCK_MAX_DIRTY_TARGET syn keyword oraKeyword DB_BLOCK_SIZE DB_DOMAIN syn keyword oraKeyword DB_FILE_DIRECT_IO_COUNT DB_FILE_MULTIBLOCK_READ_COUNT syn keyword oraKeyword DB_FILE_NAME_CONVERT DB_FILE_SIMULTANEOUS_WRITES syn keyword oraKeyword DB_FILES DB_NAME DB_WRITER_PROCESSES syn keyword oraKeyword DBLINK_ENCRYPT_LOGIN DBWR_IO_SLAVES syn keyword oraKeyword DELAYED_LOGGING_BLOCK_CLEANOUTS DISCRETE_TRANSACTIONS_ENABLED syn keyword oraKeyword DISK_ASYNCH_IO DISTRIBUTED_TRANSACTIONS syn keyword oraKeyword DML_LOCKS ENQUEUE_RESOURCES ENT_DOMAIN_NAME EVENT syn keyword oraKeyword FAST_START_IO_TARGET FAST_START_PARALLEL_ROLLBACK syn keyword oraKeyword FIXED_DATE FREEZE_DB_FOR_FAST_INSTANCE_RECOVERY syn keyword oraKeyword GC_DEFER_TIME GC_FILES_TO_LOCKS GC_RELEASABLE_LOCKS GC_ROLLBACK_LOCKS syn keyword oraKeyword GLOBAL_NAMES HASH_AREA_SIZE syn keyword oraKeyword HASH_JOIN_ENABLED HASH_MULTIBLOCK_IO_COUNT syn keyword oraKeyword HI_SHARED_MEMORY_ADDRESS HS_AUTOREGISTER syn keyword oraKeyword IFILE syn keyword oraKeyword INSTANCE_GROUPS INSTANCE_NAME INSTANCE_NUMBER syn keyword oraKeyword JAVA_POOL_SIZE JOB_QUEUE_INTERVAL JOB_QUEUE_PROCESSES LARGE_POOL_SIZE syn keyword oraKeyword LICENSE_MAX_SESSIONS LICENSE_MAX_USERS LICENSE_SESSIONS_WARNING syn keyword oraKeyword LM_LOCKS LM_PROCS LM_RESS syn keyword oraKeyword LOCAL_LISTENER LOCK_NAME_SPACE LOCK_SGA LOCK_SGA_AREAS syn keyword oraKeyword LOG_ARCHIVE_BUFFER_SIZE LOG_ARCHIVE_BUFFERS LOG_ARCHIVE_DEST syn match oraKeyword "LOG_ARCHIVE_DEST_\(1\|2\|3\|4\|5\)" syn match oraKeyword "LOG_ARCHIVE_DEST_STATE_\(1\|2\|3\|4\|5\)" syn keyword oraKeyword LOG_ARCHIVE_DUPLEX_DEST LOG_ARCHIVE_FORMAT LOG_ARCHIVE_MAX_PROCESSES syn keyword oraKeyword LOG_ARCHIVE_MIN_SUCCEED_DEST LOG_ARCHIVE_START syn keyword oraKeyword LOG_BUFFER LOG_CHECKPOINT_INTERVAL LOG_CHECKPOINT_TIMEOUT syn keyword oraKeyword LOG_CHECKPOINTS_TO_ALERT LOG_FILE_NAME_CONVERT syn keyword oraKeyword MAX_COMMIT_PROPAGATION_DELAY MAX_DUMP_FILE_SIZE syn keyword oraKeyword MAX_ENABLED_ROLES MAX_ROLLBACK_SEGMENTS syn keyword oraKeyword MTS_DISPATCHERS MTS_MAX_DISPATCHERS MTS_MAX_SERVERS MTS_SERVERS syn keyword oraKeyword NLS_CALENDAR NLS_COMP NLS_CURRENCY NLS_DATE_FORMAT syn keyword oraKeyword NLS_DATE_LANGUAGE NLS_DUAL_CURRENCY NLS_ISO_CURRENCY NLS_LANGUAGE syn keyword oraKeyword NLS_NUMERIC_CHARACTERS NLS_SORT NLS_TERRITORY syn keyword oraKeyword OBJECT_CACHE_MAX_SIZE_PERCENT OBJECT_CACHE_OPTIMAL_SIZE syn keyword oraKeyword OPEN_CURSORS OPEN_LINKS OPEN_LINKS_PER_INSTANCE syn keyword oraKeyword OPS_ADMINISTRATION_GROUP syn keyword oraKeyword OPTIMIZER_FEATURES_ENABLE OPTIMIZER_INDEX_CACHING syn keyword oraKeyword OPTIMIZER_INDEX_COST_ADJ OPTIMIZER_MAX_PERMUTATIONS syn keyword oraKeyword OPTIMIZER_MODE OPTIMIZER_PERCENT_PARALLEL syn keyword oraKeyword OPTIMIZER_SEARCH_LIMIT syn keyword oraKeyword ORACLE_TRACE_COLLECTION_NAME ORACLE_TRACE_COLLECTION_PATH syn keyword oraKeyword ORACLE_TRACE_COLLECTION_SIZE ORACLE_TRACE_ENABLE syn keyword oraKeyword ORACLE_TRACE_FACILITY_NAME ORACLE_TRACE_FACILITY_PATH syn keyword oraKeyword OS_AUTHENT_PREFIX OS_ROLES syn keyword oraKeyword PARALLEL_ADAPTIVE_MULTI_USER PARALLEL_AUTOMATIC_TUNING syn keyword oraKeyword PARALLEL_BROADCAST_ENABLED PARALLEL_EXECUTION_MESSAGE_SIZE syn keyword oraKeyword PARALLEL_INSTANCE_GROUP PARALLEL_MAX_SERVERS syn keyword oraKeyword PARALLEL_MIN_PERCENT PARALLEL_MIN_SERVERS syn keyword oraKeyword PARALLEL_SERVER PARALLEL_SERVER_INSTANCES PARALLEL_THREADS_PER_CPU syn keyword oraKeyword PARTITION_VIEW_ENABLED PLSQL_V2_COMPATIBILITY syn keyword oraKeyword PRE_PAGE_SGA PROCESSES syn keyword oraKeyword QUERY_REWRITE_ENABLED QUERY_REWRITE_INTEGRITY syn keyword oraKeyword RDBMS_SERVER_DN READ_ONLY_OPEN_DELAYED RECOVERY_PARALLELISM syn keyword oraKeyword REMOTE_DEPENDENCIES_MODE REMOTE_LOGIN_PASSWORDFILE syn keyword oraKeyword REMOTE_OS_AUTHENT REMOTE_OS_ROLES syn keyword oraKeyword REPLICATION_DEPENDENCY_TRACKING syn keyword oraKeyword RESOURCE_LIMIT RESOURCE_MANAGER_PLAN syn keyword oraKeyword ROLLBACK_SEGMENTS ROW_LOCKING SERIAL _REUSE SERVICE_NAMES syn keyword oraKeyword SESSION_CACHED_CURSORS SESSION_MAX_OPEN_FILES SESSIONS syn keyword oraKeyword SHADOW_CORE_DUMP syn keyword oraKeyword SHARED_MEMORY_ADDRESS SHARED_POOL_RESERVED_SIZE SHARED_POOL_SIZE syn keyword oraKeyword SORT_AREA_RETAINED_SIZE SORT_AREA_SIZE SORT_MULTIBLOCK_READ_COUNT syn keyword oraKeyword SQL92_SECURITY SQL_TRACE STANDBY_ARCHIVE_DEST syn keyword oraKeyword STAR_TRANSFORMATION_ENABLED TAPE_ASYNCH_IO THREAD syn keyword oraKeyword TIMED_OS_STATISTICS TIMED_STATISTICS syn keyword oraKeyword TRANSACTION_AUDITING TRANSACTIONS TRANSACTIONS_PER_ROLLBACK_SEGMENT syn keyword oraKeyword USE_INDIRECT_DATA_BUFFERS USER_DUMP_DEST syn keyword oraKeyword UTL_FILE_DIR syn keyword oraKeywordObs ALLOW_PARTIAL_SN_RESULTS B_TREE_BITMAP_PLANS syn keyword oraKeywordObs BACKUP_DISK_IO_SLAVES CACHE_SIZE_THRESHOLD syn keyword oraKeywordObs CCF_IO_SIZE CLEANUP_ROLLBACK_ENTRIES syn keyword oraKeywordObs CLOSE_CACHED_OPEN_CURSORS COMPATIBLE_NO_RECOVERY syn keyword oraKeywordObs COMPLEX_VIEW_MERGING syn keyword oraKeywordObs DB_BLOCK_CHECKPOINT_BATCH DB_BLOCK_LRU_EXTENDED_STATISTICS syn keyword oraKeywordObs DB_BLOCK_LRU_STATISTICS syn keyword oraKeywordObs DISTRIBUTED_LOCK_TIMEOUT DISTRIBUTED_RECOVERY_CONNECTION_HOLD_TIME syn keyword oraKeywordObs FAST_FULL_SCAN_ENABLED GC_LATCHES GC_LCK_PROCS syn keyword oraKeywordObs LARGE_POOL_MIN_ALLOC LGWR_IO_SLAVES syn keyword oraKeywordObs LOG_BLOCK_CHECKSUM LOG_FILES syn keyword oraKeywordObs LOG_SIMULTANEOUS_COPIES LOG_SMALL_ENTRY_MAX_SIZE syn keyword oraKeywordObs MAX_TRANSACTION_BRANCHES syn keyword oraKeywordObs MTS_LISTENER_ADDRESS MTS_MULTIPLE_LISTENERS syn keyword oraKeywordObs MTS_RATE_LOG_SIZE MTS_RATE_SCALE MTS_SERVICE syn keyword oraKeywordObs OGMS_HOME OPS_ADMIN_GROUP syn keyword oraKeywordObs PARALLEL_DEFAULT_MAX_INSTANCES PARALLEL_MIN_MESSAGE_POOL syn keyword oraKeywordObs PARALLEL_SERVER_IDLE_TIME PARALLEL_TRANSACTION_RESOURCE_TIMEOUT syn keyword oraKeywordObs PUSH_JOIN_PREDICATE REDUCE_ALARM ROW_CACHE_CURSORS syn keyword oraKeywordObs SEQUENCE_CACHE_ENTRIES SEQUENCE_CACHE_HASH_BUCKETS syn keyword oraKeywordObs SHARED_POOL_RESERVED_MIN_ALLOC syn keyword oraKeywordObs SORT_DIRECT_WRITES SORT_READ_FAC SORT_SPACEMAP_SIZE syn keyword oraKeywordObs SORT_WRITE_BUFFER_SIZE SORT_WRITE_BUFFERS syn keyword oraKeywordObs SPIN_COUNT TEMPORARY_TABLE_LOCKS USE_ISM syn keyword oraValue db os full partial mandatory optional reopen enable defer syn keyword oraValue always default intent disable dml plsql temp_disable syn match oravalue "Arabic Hijrah" syn match oravalue "English Hijrah" syn match oravalue "Gregorian" syn match oravalue "Japanese Imperial" syn match oravalue "Persian" syn match oravalue "ROC Official" syn match oravalue "Thai Buddha" syn match oravalue "8.0.0" syn match oravalue "8.0.3" syn match oravalue "8.0.4" syn match oravalue "8.1.3" syn match oraModifier "archived log" syn match oraModifier "backup corruption" syn match oraModifier "backup datafile" syn match oraModifier "backup piece " syn match oraModifier "backup redo log" syn match oraModifier "backup set" syn match oraModifier "copy corruption" syn match oraModifier "datafile copy" syn match oraModifier "deleted object" syn match oraModifier "loghistory" syn match oraModifier "offline range" "undocumented init params "up to 7.2 (inclusive) syn keyword oraKeywordUndObs _latch_spin_count _trace_instance_termination syn keyword oraKeywordUndObs _wakeup_timeout _lgwr_async_write "7.3 syn keyword oraKeywordUndObs _standby_lock_space_name _enable_dba_locking "8.0.5 syn keyword oraKeywordUnd _NUMA_instance_mapping _NUMA_pool_size syn keyword oraKeywordUnd _advanced_dss_features _affinity_on _all_shared_dblinks syn keyword oraKeywordUnd _allocate_creation_order _allow_resetlogs_corruption syn keyword oraKeywordUnd _always_star_transformation _bump_highwater_mark_count syn keyword oraKeywordUnd _column_elimination_off _controlfile_enqueue_timeout syn keyword oraKeywordUnd _corrupt_blocks_on_stuck_recovery _corrupted_rollback_segments syn keyword oraKeywordUnd _cr_deadtime _cursor_db_buffers_pinned syn keyword oraKeywordUnd _db_block_cache_clone _db_block_cache_map _db_block_cache_protect syn keyword oraKeywordUnd _db_block_hash_buckets _db_block_hi_priority_batch_size syn keyword oraKeywordUnd _db_block_max_cr_dba _db_block_max_scan_cnt syn keyword oraKeywordUnd _db_block_med_priority_batch_size _db_block_no_idle_writes syn keyword oraKeywordUnd _db_block_write_batch _db_handles _db_handles_cached syn keyword oraKeywordUnd _db_large_dirty_queue _db_no_mount_lock syn keyword oraKeywordUnd _db_writer_histogram_statistics _db_writer_scan_depth syn keyword oraKeywordUnd _db_writer_scan_depth_decrement _db_writer_scan_depth_increment syn keyword oraKeywordUnd _disable_incremental_checkpoints syn keyword oraKeywordUnd _disable_latch_free_SCN_writes_via_32cas syn keyword oraKeywordUnd _disable_latch_free_SCN_writes_via_64cas syn keyword oraKeywordUnd _disable_logging _disable_ntlog_events syn keyword oraKeywordUnd _dss_cache_flush _dynamic_stats_threshold syn keyword oraKeywordUnd _enable_cscn_caching _enable_default_affinity syn keyword oraKeywordUnd _enqueue_debug_multi_instance _enqueue_hash syn keyword oraKeywordUnd _enqueue_hash_chain_latches _enqueue_locks syn keyword oraKeywordUnd _fifth_spare_parameter _first_spare_parameter _fourth_spare_parameter syn keyword oraKeywordUnd _gc_class_locks _groupby_nopushdown_cut_ratio syn keyword oraKeywordUnd _idl_conventional_index_maintenance _ignore_failed_escalates syn keyword oraKeywordUnd _init_sql_file syn keyword oraKeywordUnd _io_slaves_disabled _ioslave_batch_count _ioslave_issue_count syn keyword oraKeywordUnd _kgl_bucket_count _kgl_latch_count _kgl_multi_instance_invalidation syn keyword oraKeywordUnd _kgl_multi_instance_lock _kgl_multi_instance_pin syn keyword oraKeywordUnd _latch_miss_stat_sid _latch_recovery_alignment _latch_wait_posting syn keyword oraKeywordUnd _lm_ast_option _lm_direct_sends _lm_dlmd_procs _lm_domains _lm_groups syn keyword oraKeywordUnd _lm_non_fault_tolerant _lm_send_buffers _lm_statistics _lm_xids syn keyword oraKeywordUnd _log_blocks_during_backup _log_buffers_debug _log_checkpoint_recovery_check syn keyword oraKeywordUnd _log_debug_multi_instance _log_entry_prebuild_threshold _log_io_size syn keyword oraKeywordUnd _log_space_errors syn keyword oraKeywordUnd _max_exponential_sleep _max_sleep_holding_latch syn keyword oraKeywordUnd _messages _minimum_giga_scn _mts_load_constants _nested_loop_fudge syn keyword oraKeywordUnd _no_objects _no_or_expansion syn keyword oraKeywordUnd _number_cached_attributes _offline_rollback_segments _open_files_limit syn keyword oraKeywordUnd _optimizer_undo_changes syn keyword oraKeywordUnd _oracle_trace_events _oracle_trace_facility_version syn keyword oraKeywordUnd _ordered_nested_loop _parallel_server_sleep_time syn keyword oraKeywordUnd _passwordfile_enqueue_timeout _pdml_slaves_diff_part syn keyword oraKeywordUnd _plsql_dump_buffer_events _predicate_elimination_enabled syn keyword oraKeywordUnd _project_view_columns syn keyword oraKeywordUnd _px_broadcast_fudge_factor _px_broadcast_trace _px_dop_limit_degree syn keyword oraKeywordUnd _px_dop_limit_threshold _px_kxfr_granule_allocation _px_kxib_tracing syn keyword oraKeywordUnd _release_insert_threshold _reuse_index_loop syn keyword oraKeywordUnd _rollback_segment_count _rollback_segment_initial syn keyword oraKeywordUnd _row_cache_buffer_size _row_cache_instance_locks syn keyword oraKeywordUnd _save_escalates _scn_scheme syn keyword oraKeywordUnd _second_spare_parameter _session_idle_bit_latches syn keyword oraKeywordUnd _shared_session_sort_fetch_buffer _single_process syn keyword oraKeywordUnd _small_table_threshold _sql_connect_capability_override syn keyword oraKeywordUnd _sql_connect_capability_table syn keyword oraKeywordUnd _test_param_1 _test_param_2 _test_param_3 syn keyword oraKeywordUnd _third_spare_parameter _tq_dump_period syn keyword oraKeywordUnd _trace_archive_dest _trace_archive_start _trace_block_size syn keyword oraKeywordUnd _trace_buffers_per_process _trace_enabled _trace_events syn keyword oraKeywordUnd _trace_file_size _trace_files_public _trace_flushing _trace_write_batch_size syn keyword oraKeywordUnd _upconvert_from_ast _use_vector_post _wait_for_sync _walk_insert_threshold "dunno which version; may be 8.1.x, may be obsoleted syn keyword oraKeywordUndObs _arch_io_slaves _average_dirties_half_life _b_tree_bitmap_plans syn keyword oraKeywordUndObs _backup_disk_io_slaves _backup_io_pool_size syn keyword oraKeywordUndObs _cleanup_rollback_entries _close_cached_open_cursors syn keyword oraKeywordUndObs _compatible_no_recovery _complex_view_merging syn keyword oraKeywordUndObs _cpu_to_io _cr_server syn keyword oraKeywordUndObs _db_aging_cool_count _db_aging_freeze_cr _db_aging_hot_criteria syn keyword oraKeywordUndObs _db_aging_stay_count _db_aging_touch_time syn keyword oraKeywordUndObs _db_percent_hot_default _db_percent_hot_keep _db_percent_hot_recycle syn keyword oraKeywordUndObs _db_writer_chunk_writes _db_writer_max_writes syn keyword oraKeywordUndObs _dbwr_async_io _dbwr_tracing syn keyword oraKeywordUndObs _defer_multiple_waiters _discrete_transaction_enabled syn keyword oraKeywordUndObs _distributed_lock_timeout _distributed_recovery _distribited_recovery_ syn keyword oraKeywordUndObs _domain_index_batch_size _domain_index_dml_batch_size syn keyword oraKeywordUndObs _enable_NUMA_optimization _enable_block_level_transaction_recovery syn keyword oraKeywordUndObs _enable_list_io _enable_multiple_sampling syn keyword oraKeywordUndObs _fairness_treshold _fast_full_scan_enabled _foreground_locks syn keyword oraKeywordUndObs _full_pwise_join_enabled _gc_latches _gc_lck_procs syn keyword oraKeywordUndObs _high_server_treshold _index_prefetch_factor _kcl_debug syn keyword oraKeywordUndObs _kkfi_trace _large_pool_min_alloc _lazy_freelist_close _left_nested_loops_random syn keyword oraKeywordUndObs _lgwr_async_io _lgwr_io_slaves _lock_sga_areas syn keyword oraKeywordUndObs _log_archive_buffer_size _log_archive_buffers _log_simultaneous_copies syn keyword oraKeywordUndObs _low_server_treshold _max_transaction_branches syn keyword oraKeywordUndObs _mts_rate_log_size _mts_rate_scale syn keyword oraKeywordUndObs _mview_cost_rewrite _mview_rewrite_2 syn keyword oraKeywordUndObs _ncmb_readahead_enabled _ncmb_readahead_tracing syn keyword oraKeywordUndObs _ogms_home syn keyword oraKeywordUndObs _parallel_adaptive_max_users _parallel_default_max_instances syn keyword oraKeywordUndObs _parallel_execution_message_align _parallel_fake_class_pct syn keyword oraKeywordUndObs _parallel_load_bal_unit _parallel_load_balancing syn keyword oraKeywordUndObs _parallel_min_message_pool _parallel_recovery_stopat syn keyword oraKeywordUndObs _parallel_server_idle_time _parallelism_cost_fudge_factor syn keyword oraKeywordUndObs _partial_pwise_join_enabled _pdml_separate_gim _push_join_predicate syn keyword oraKeywordUndObs _px_granule_size _px_index_sampling _px_load_publish_interval syn keyword oraKeywordUndObs _px_max_granules_per_slave _px_min_granules_per_slave _px_no_stealing syn keyword oraKeywordUndObs _row_cache_cursors _serial_direct_read _shared_pool_reserved_min_alloc syn keyword oraKeywordUndObs _sort_space_for_write_buffers _spin_count _system_trig_enabled syn keyword oraKeywordUndObs _trace_buffer_flushes _trace_cr_buffer_creates _trace_multi_block_reads syn keyword oraKeywordUndObs _transaction_recovery_servers _use_ism _yield_check_interval syn cluster oraAll add=oraKeyword,oraKeywordGroup,oraKeywordPref,oraKeywordObs,oraKeywordUnd,oraKeywordUndObs syn cluster oraAll add=oraValue,oraModifier,oraString,oraSpecial,oraComment "============================================================================== " highlighting " Only when an item doesn't have highlighting yet hi def link oraKeyword Statement "usual keywords hi def link oraKeywordGroup Type "keywords which group other keywords hi def link oraKeywordPref oraKeywordGroup "keywords which act as prefixes hi def link oraKeywordObs Todo "obsolete keywords hi def link oraKeywordUnd PreProc "undocumented keywords hi def link oraKeywordUndObs oraKeywordObs "undocumented obsolete keywords hi def link oraValue Identifier "values, like true or false hi def link oraModifier oraValue "modifies values hi def link oraString String "strings hi def link oraSpecial Special "special characters hi def link oraError Error "errors hi def link oraParenError oraError "errors caused by mismatching parantheses hi def link oraComment Comment "comments let b:current_syntax = "ora" if main_syntax == 'ora' unlet main_syntax endif " vim: ts=8 neovim-0.2.2/runtime/syntax/pamconf.vim000066400000000000000000000126521320401574200201650ustar00rootroot00000000000000" Vim syntax file " Language: pam(8) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2011-08-03 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match pamconfService '^[[:graph:]]\+' \ nextgroup=pamconfType, \ pamconfServiceLineCont skipwhite syn keyword pamconfTodo contained TODO FIXME XXX NOTE syn region pamconfComment display oneline start='#' end='$' \ contains=pamconfTodo,@Spell syn match pamconfServiceLineCont contained '\\$' \ nextgroup=pamconfType, \ pamconfServiceLineCont skipwhite skipnl syn keyword pamconfType account auth password session \ nextgroup=pamconfControl, \ pamconfTypeLineCont skipwhite syn match pamconfTypeLineCont contained '\\$' \ nextgroup=pamconfControl, \ pamconfTypeLineCont skipwhite skipnl syn keyword pamconfControl contained requisite required sufficient \ optional include substack \ nextgroup=pamconfMPath, \ pamconfControlLineContH skipwhite syn match pamconfControlBegin '\[' nextgroup=pamconfControlValues, \ pamconfControlLineCont skipwhite syn match pamconfControlLineCont contained '\\$' \ nextgroup=pamconfControlValues, \ pamconfControlLineCont skipwhite skipnl syn keyword pamconfControlValues contained success open_err symbol_err \ service_err system_err buf_err \ perm_denied auth_err cred_insufficient \ authinfo_unavail user_unknown maxtries \ new_authtok_reqd acct_expired session_err \ cred_unavail cred_expired cred_err \ no_module_data conv_err authtok_err \ authtok_recover_err authtok_lock_busy \ authtok_disable_aging try_again ignore \ abort authtok_expired module_unknown \ bad_item and default \ nextgroup=pamconfControlValueEq syn match pamconfControlValueEq contained '=' \ nextgroup=pamconfControlActionN, \ pamconfControlAction syn match pamconfControlActionN contained '\d\+\>' \ nextgroup=pamconfControlValues, \ pamconfControlLineCont,pamconfControlEnd \ skipwhite syn keyword pamconfControlAction contained ignore bad die ok done reset \ nextgroup=pamconfControlValues, \ pamconfControlLineCont,pamconfControlEnd \ skipwhite syn match pamconfControlEnd contained '\]' \ nextgroup=pamconfMPath, \ pamconfControlLineContH skipwhite syn match pamconfControlLineContH contained '\\$' \ nextgroup=pamconfMPath, \ pamconfControlLineContH skipwhite skipnl syn match pamconfMPath contained '\S\+' \ nextgroup=pamconfMPathLineCont, \ pamconfArgs skipwhite syn match pamconfArgs contained '\S\+' \ nextgroup=pamconfArgsLineCont, \ pamconfArgs skipwhite syn match pamconfMPathLineCont contained '\\$' \ nextgroup=pamconfMPathLineCont, \ pamconfArgs skipwhite skipnl syn match pamconfArgsLineCont contained '\\$' \ nextgroup=pamconfArgsLineCont, \ pamconfArgs skipwhite skipnl hi def link pamconfTodo Todo hi def link pamconfComment Comment hi def link pamconfService Statement hi def link pamconfServiceLineCont Special hi def link pamconfType Type hi def link pamconfTypeLineCont pamconfServiceLineCont hi def link pamconfControl Macro hi def link pamconfControlBegin Delimiter hi def link pamconfControlLineContH pamconfServiceLineCont hi def link pamconfControlLineCont pamconfServiceLineCont hi def link pamconfControlValues Identifier hi def link pamconfControlValueEq Operator hi def link pamconfControlActionN Number hi def link pamconfControlAction Identifier hi def link pamconfControlEnd Delimiter hi def link pamconfMPath String hi def link pamconfMPathLineCont pamconfServiceLineCont hi def link pamconfArgs Normal hi def link pamconfArgsLineCont pamconfServiceLineCont let b:current_syntax = "pamconf" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/papp.vim000066400000000000000000000073151320401574200175020ustar00rootroot00000000000000" Vim syntax file for the "papp" file format (_p_erl _app_lication) " " Language: papp " Maintainer: Marc Lehmann " Last Change: 2009 Nov 11 " Filenames: *.papp *.pxml *.pxsl " URL: http://papp.plan9.de/ " You can set the "papp_include_html" variable so that html will be " rendered as such inside phtml sections (in case you actually put html " there - papp does not require that). Also, rendering html tends to keep " the clutter high on the screen - mixing three languages is difficult " enough(!). PS: it is also slow. " pod is, btw, allowed everywhere, which is actually wrong :( " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " source is basically xml, with included html (this is common) and perl bits runtime! syntax/xml.vim unlet b:current_syntax if exists("papp_include_html") syn include @PAppHtml syntax/html.vim unlet b:current_syntax syntax spell default " added by Bram endif syn include @PAppPerl syntax/perl.vim syn cluster xmlFoldCluster add=papp_perl,papp_xperl,papp_phtml,papp_pxml,papp_perlPOD " preprocessor commands syn region papp_prep matchgroup=papp_prep start="^#\s*\(if\|elsif\)" end="$" keepend contains=@perlExpr contained syn match papp_prep /^#\s*\(else\|endif\|??\).*$/ contained " translation entries syn region papp_gettext start=/__"/ end=/"/ contained contains=@papp_perlInterpDQ syn cluster PAppHtml add=papp_gettext,papp_prep " add special, paired xperl, perl and phtml tags syn region papp_perl matchgroup=xmlTag start="" end="" contains=papp_CDATAp,@PAppPerl keepend syn region papp_xperl matchgroup=xmlTag start="" end="" contains=papp_CDATAp,@PAppPerl keepend syn region papp_phtml matchgroup=xmlTag start="" end="" contains=papp_CDATAh,papp_ph_perl,papp_ph_html,papp_ph_hint,@PAppHtml keepend syn region papp_pxml matchgroup=xmlTag start="" end="" contains=papp_CDATAx,papp_ph_perl,papp_ph_xml,papp_ph_xint keepend syn region papp_perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,perlTodo keepend " cdata sections syn region papp_CDATAp matchgroup=xmlCdataDecl start="" contains=@PAppPerl contained keepend syn region papp_CDATAh matchgroup=xmlCdataDecl start="" contains=papp_ph_perl,papp_ph_html,papp_ph_hint,@PAppHtml contained keepend syn region papp_CDATAx matchgroup=xmlCdataDecl start="" contains=papp_ph_perl,papp_ph_xml,papp_ph_xint contained keepend syn region papp_ph_perl matchgroup=Delimiter start="<[:?]" end="[:?]>"me=e-2 nextgroup=papp_ph_html contains=@PAppPerl contained keepend syn region papp_ph_html matchgroup=Delimiter start=":>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@PAppHtml contained keepend syn region papp_ph_hint matchgroup=Delimiter start="?>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@perlInterpDQ,@PAppHtml contained keepend syn region papp_ph_xml matchgroup=Delimiter start=":>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains= contained keepend syn region papp_ph_xint matchgroup=Delimiter start="?>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@perlInterpDQ contained keepend " synchronization is horrors! syn sync clear syn sync match pappSync grouphere papp_CDATAh "" syn sync match pappSync grouphere papp_CDATAh "^# *\(if\|elsif\|else\|endif\)" syn sync match pappSync grouphere papp_CDATAh "" syn sync match pappSync grouphere NONE "" syn sync maxlines=300 syn sync minlines=5 " The default highlighting. hi def link papp_prep preCondit hi def link papp_gettext String let b:current_syntax = "papp" neovim-0.2.2/runtime/syntax/pascal.vim000066400000000000000000000352401320401574200200030ustar00rootroot00000000000000" Vim syntax file " Language: Pascal " Version: 2.8 " Last Change: 2004/10/17 17:47:30 " Maintainer: Xavier Crgut " Previous Maintainer: Mario Eusebio " Contributors: Tim Chase , " Stas Grabois , " Mazen NEIFER , " Klaus Hast , " Austin Ziegler , " Markus Koenig " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore syn sync lines=250 syn keyword pascalBoolean true false syn keyword pascalConditional if else then syn keyword pascalConstant nil maxint syn keyword pascalLabel case goto label syn keyword pascalOperator and div downto in mod not of or packed with syn keyword pascalRepeat do for do repeat while to until syn keyword pascalStatement procedure function syn keyword pascalStatement program begin end const var type syn keyword pascalStruct record syn keyword pascalType array boolean char integer file pointer real set syn keyword pascalType string text variant " 20011222az: Added new items. syn keyword pascalTodo contained TODO FIXME XXX DEBUG NOTE " 20010723az: When wanted, highlight the trailing whitespace -- this is " based on c_space_errors; to enable, use "pascal_space_errors". if exists("pascal_space_errors") if !exists("pascal_no_trail_space_error") syn match pascalSpaceError "\s\+$" endif if !exists("pascal_no_tab_space_error") syn match pascalSpaceError " \+\t"me=e-1 endif endif " String if !exists("pascal_one_line_string") syn region pascalString matchgroup=pascalString start=+'+ end=+'+ contains=pascalStringEscape if exists("pascal_gpc") syn region pascalString matchgroup=pascalString start=+"+ end=+"+ contains=pascalStringEscapeGPC else syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ contains=pascalStringEscape endif else "wrong strings syn region pascalStringError matchgroup=pascalStringError start=+'+ end=+'+ end=+$+ contains=pascalStringEscape if exists("pascal_gpc") syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ end=+$+ contains=pascalStringEscapeGPC else syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ end=+$+ contains=pascalStringEscape endif "right strings syn region pascalString matchgroup=pascalString start=+'+ end=+'+ oneline contains=pascalStringEscape " To see the start and end of strings: " syn region pascalString matchgroup=pascalStringError start=+'+ end=+'+ oneline contains=pascalStringEscape if exists("pascal_gpc") syn region pascalString matchgroup=pascalString start=+"+ end=+"+ oneline contains=pascalStringEscapeGPC else syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ oneline contains=pascalStringEscape endif end syn match pascalStringEscape contained "''" syn match pascalStringEscapeGPC contained '""' " syn match pascalIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" if exists("pascal_symbol_operator") syn match pascalSymbolOperator "[+\-/*=]" syn match pascalSymbolOperator "[<>]=\=" syn match pascalSymbolOperator "<>" syn match pascalSymbolOperator ":=" syn match pascalSymbolOperator "[()]" syn match pascalSymbolOperator "\.\." syn match pascalSymbolOperator "[\^.]" syn match pascalMatrixDelimiter "[][]" "if you prefer you can highlight the range "syn match pascalMatrixDelimiter "[\d\+\.\.\d\+]" endif syn match pascalNumber "-\=\<\d\+\>" syn match pascalFloat "-\=\<\d\+\.\d\+\>" syn match pascalFloat "-\=\<\d\+\.\d\+[eE]-\=\d\+\>" syn match pascalHexNumber "\$[0-9a-fA-F]\+\>" if exists("pascal_no_tabs") syn match pascalShowTab "\t" endif syn region pascalComment start="(\*\|{" end="\*)\|}" contains=pascalTodo,pascalSpaceError if !exists("pascal_no_functions") " array functions syn keyword pascalFunction pack unpack " memory function syn keyword pascalFunction Dispose New " math functions syn keyword pascalFunction Abs Arctan Cos Exp Ln Sin Sqr Sqrt " file functions syn keyword pascalFunction Eof Eoln Write Writeln syn keyword pascalPredefined Input Output if exists("pascal_traditional") " These functions do not seem to be defined in Turbo Pascal syn keyword pascalFunction Get Page Put endif " ordinal functions syn keyword pascalFunction Odd Pred Succ " transfert functions syn keyword pascalFunction Chr Ord Round Trunc endif if !exists("pascal_traditional") syn keyword pascalStatement constructor destructor implementation inherited syn keyword pascalStatement interface unit uses syn keyword pascalModifier absolute assembler external far forward inline syn keyword pascalModifier interrupt near virtual syn keyword pascalAcces private public syn keyword pascalStruct object syn keyword pascalOperator shl shr xor syn region pascalPreProc start="(\*\$" end="\*)" contains=pascalTodo syn region pascalPreProc start="{\$" end="}" syn region pascalAsm matchgroup=pascalAsmKey start="\" end="\" contains=pascalComment,pascalPreProc syn keyword pascalType ShortInt LongInt Byte Word syn keyword pascalType ByteBool WordBool LongBool syn keyword pascalType Cardinal LongWord syn keyword pascalType Single Double Extended Comp syn keyword pascalType PChar if !exists ("pascal_fpc") syn keyword pascalPredefined Result endif if exists("pascal_fpc") syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError syn keyword pascalStatement fail otherwise operator syn keyword pascalDirective popstack syn keyword pascalPredefined self syn keyword pascalType ShortString AnsiString WideString endif if exists("pascal_gpc") syn keyword pascalType SmallInt syn keyword pascalType AnsiChar syn keyword pascalType PAnsiChar endif if exists("pascal_delphi") syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError syn keyword pascalType SmallInt Int64 syn keyword pascalType Real48 Currency syn keyword pascalType AnsiChar WideChar syn keyword pascalType ShortString AnsiString WideString syn keyword pascalType PAnsiChar PWideChar syn match pascalFloat "-\=\<\d\+\.\d\+[dD]-\=\d\+\>" syn match pascalStringEscape contained "#[12][0-9]\=[0-9]\=" syn keyword pascalStruct class dispinterface syn keyword pascalException try except raise at on finally syn keyword pascalStatement out syn keyword pascalStatement library package syn keyword pascalStatement initialization finalization uses exports syn keyword pascalStatement property out resourcestring threadvar syn keyword pascalModifier contains syn keyword pascalModifier overridden reintroduce abstract syn keyword pascalModifier override export dynamic name message syn keyword pascalModifier dispid index stored default nodefault readonly syn keyword pascalModifier writeonly implements overload requires resident syn keyword pascalAcces protected published automated syn keyword pascalDirective register pascal cvar cdecl stdcall safecall syn keyword pascalOperator as is endif if exists("pascal_no_functions") "syn keyword pascalModifier read write "may confuse with Read and Write functions. Not easy to handle. else " control flow functions syn keyword pascalFunction Break Continue Exit Halt RunError " ordinal functions syn keyword pascalFunction Dec Inc High Low " math functions syn keyword pascalFunction Frac Int Pi " string functions syn keyword pascalFunction Concat Copy Delete Insert Length Pos Str Val " memory function syn keyword pascalFunction FreeMem GetMem MaxAvail MemAvail " pointer and address functions syn keyword pascalFunction Addr Assigned CSeg DSeg Ofs Ptr Seg SPtr SSeg " misc functions syn keyword pascalFunction Exclude FillChar Hi Include Lo Move ParamCount syn keyword pascalFunction ParamStr Random Randomize SizeOf Swap TypeOf syn keyword pascalFunction UpCase " predefined variables syn keyword pascalPredefined ErrorAddr ExitCode ExitProc FileMode FreeList syn keyword pascalPredefined FreeZero HeapEnd HeapError HeapOrg HeapPtr syn keyword pascalPredefined InOutRes OvrCodeList OvrDebugPtr OvrDosHandle syn keyword pascalPredefined OvrEmsHandle OvrHeapEnd OvrHeapOrg OvrHeapPtr syn keyword pascalPredefined OvrHeapSize OvrLoadList PrefixSeg RandSeed syn keyword pascalPredefined SaveInt00 SaveInt02 SaveInt1B SaveInt21 syn keyword pascalPredefined SaveInt23 SaveInt24 SaveInt34 SaveInt35 syn keyword pascalPredefined SaveInt36 SaveInt37 SaveInt38 SaveInt39 syn keyword pascalPredefined SaveInt3A SaveInt3B SaveInt3C SaveInt3D syn keyword pascalPredefined SaveInt3E SaveInt3F SaveInt75 SegA000 SegB000 syn keyword pascalPredefined SegB800 SelectorInc StackLimit Test8087 " file functions syn keyword pascalFunction Append Assign BlockRead BlockWrite ChDir Close syn keyword pascalFunction Erase FilePos FileSize Flush GetDir IOResult syn keyword pascalFunction MkDir Read Readln Rename Reset Rewrite RmDir syn keyword pascalFunction Seek SeekEof SeekEoln SetTextBuf Truncate " crt unit syn keyword pascalFunction AssignCrt ClrEol ClrScr Delay DelLine GotoXY syn keyword pascalFunction HighVideo InsLine KeyPressed LowVideo NormVideo syn keyword pascalFunction NoSound ReadKey Sound TextBackground TextColor syn keyword pascalFunction TextMode WhereX WhereY Window syn keyword pascalPredefined CheckBreak CheckEOF CheckSnow DirectVideo syn keyword pascalPredefined LastMode TextAttr WindMin WindMax syn keyword pascalFunction BigCursor CursorOff CursorOn syn keyword pascalConstant Black Blue Green Cyan Red Magenta Brown syn keyword pascalConstant LightGray DarkGray LightBlue LightGreen syn keyword pascalConstant LightCyan LightRed LightMagenta Yellow White syn keyword pascalConstant Blink ScreenWidth ScreenHeight bw40 syn keyword pascalConstant co40 bw80 co80 mono syn keyword pascalPredefined TextChar " DOS unit syn keyword pascalFunction AddDisk DiskFree DiskSize DosExitCode DosVersion syn keyword pascalFunction EnvCount EnvStr Exec Expand FindClose FindFirst syn keyword pascalFunction FindNext FSearch FSplit GetCBreak GetDate syn keyword pascalFunction GetEnv GetFAttr GetFTime GetIntVec GetTime syn keyword pascalFunction GetVerify Intr Keep MSDos PackTime SetCBreak syn keyword pascalFunction SetDate SetFAttr SetFTime SetIntVec SetTime syn keyword pascalFunction SetVerify SwapVectors UnPackTime syn keyword pascalConstant FCarry FParity FAuxiliary FZero FSign FOverflow syn keyword pascalConstant Hidden Sysfile VolumeId Directory Archive syn keyword pascalConstant AnyFile fmClosed fmInput fmOutput fmInout syn keyword pascalConstant TextRecNameLength TextRecBufSize syn keyword pascalType ComStr PathStr DirStr NameStr ExtStr SearchRec syn keyword pascalType FileRec TextBuf TextRec Registers DateTime syn keyword pascalPredefined DosError "Graph Unit syn keyword pascalFunction Arc Bar Bar3D Circle ClearDevice ClearViewPort syn keyword pascalFunction CloseGraph DetectGraph DrawPoly Ellipse syn keyword pascalFunction FillEllipse FillPoly FloodFill GetArcCoords syn keyword pascalFunction GetAspectRatio GetBkColor GetColor syn keyword pascalFunction GetDefaultPalette GetDriverName GetFillPattern syn keyword pascalFunction GetFillSettings GetGraphMode GetImage syn keyword pascalFunction GetLineSettings GetMaxColor GetMaxMode GetMaxX syn keyword pascalFunction GetMaxY GetModeName GetModeRange GetPalette syn keyword pascalFunction GetPaletteSize GetPixel GetTextSettings syn keyword pascalFunction GetViewSettings GetX GetY GraphDefaults syn keyword pascalFunction GraphErrorMsg GraphResult ImageSize InitGraph syn keyword pascalFunction InstallUserDriver InstallUserFont Line LineRel syn keyword pascalFunction LineTo MoveRel MoveTo OutText OutTextXY syn keyword pascalFunction PieSlice PutImage PutPixel Rectangle syn keyword pascalFunction RegisterBGIDriver RegisterBGIFont syn keyword pascalFunction RestoreCRTMode Sector SetActivePage syn keyword pascalFunction SetAllPallette SetAspectRatio SetBkColor syn keyword pascalFunction SetColor SetFillPattern SetFillStyle syn keyword pascalFunction SetGraphBufSize SetGraphMode SetLineStyle syn keyword pascalFunction SetPalette SetRGBPalette SetTextJustify syn keyword pascalFunction SetTextStyle SetUserCharSize SetViewPort syn keyword pascalFunction SetVisualPage SetWriteMode TextHeight TextWidth syn keyword pascalType ArcCoordsType FillPatternType FillSettingsType syn keyword pascalType LineSettingsType PaletteType PointType syn keyword pascalType TextSettingsType ViewPortType " string functions syn keyword pascalFunction StrAlloc StrBufSize StrCat StrComp StrCopy syn keyword pascalFunction StrDispose StrECopy StrEnd StrFmt StrIComp syn keyword pascalFunction StrLCat StrLComp StrLCopy StrLen StrLFmt syn keyword pascalFunction StrLIComp StrLower StrMove StrNew StrPas syn keyword pascalFunction StrPCopy StrPLCopy StrPos StrRScan StrScan syn keyword pascalFunction StrUpper endif endif " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link pascalAcces pascalStatement hi def link pascalBoolean Boolean hi def link pascalComment Comment hi def link pascalConditional Conditional hi def link pascalConstant Constant hi def link pascalDelimiter Identifier hi def link pascalDirective pascalStatement hi def link pascalException Exception hi def link pascalFloat Float hi def link pascalFunction Function hi def link pascalLabel Label hi def link pascalMatrixDelimiter Identifier hi def link pascalModifier Type hi def link pascalNumber Number hi def link pascalOperator Operator hi def link pascalPredefined pascalStatement hi def link pascalPreProc PreProc hi def link pascalRepeat Repeat hi def link pascalSpaceError Error hi def link pascalStatement Statement hi def link pascalString String hi def link pascalStringEscape Special hi def link pascalStringEscapeGPC Special hi def link pascalStringError Error hi def link pascalStruct pascalStatement hi def link pascalSymbolOperator pascalOperator hi def link pascalTodo Todo hi def link pascalType Type hi def link pascalUnclassified pascalStatement " hi def link pascalAsm Assembler hi def link pascalError Error hi def link pascalAsmKey pascalStatement hi def link pascalShowTab Error let b:current_syntax = "pascal" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/passwd.vim000066400000000000000000000046131320401574200200410ustar00rootroot00000000000000" Vim syntax file " Language: passwd(5) password file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-10-03 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match passwdBegin display '^' nextgroup=passwdAccount syn match passwdAccount contained display '[^:]\+' \ nextgroup=passwdPasswordColon syn match passwdPasswordColon contained display ':' \ nextgroup=passwdPassword,passwdShadow syn match passwdPassword contained display '[^:]\+' \ nextgroup=passwdUIDColon syn match passwdShadow contained display '[x*!]' \ nextgroup=passwdUIDColon syn match passwdUIDColon contained display ':' nextgroup=passwdUID syn match passwdUID contained display '\d\{0,10}' \ nextgroup=passwdGIDColon syn match passwdGIDColon contained display ':' nextgroup=passwdGID syn match passwdGID contained display '\d\{0,10}' \ nextgroup=passwdGecosColon syn match passwdGecosColon contained display ':' nextgroup=passwdGecos syn match passwdGecos contained display '[^:]*' \ nextgroup=passwdDirColon syn match passwdDirColon contained display ':' nextgroup=passwdDir syn match passwdDir contained display '/[^:]*' \ nextgroup=passwdShellColon syn match passwdShellColon contained display ':' \ nextgroup=passwdShell syn match passwdShell contained display '.*' hi def link passwdColon Normal hi def link passwdAccount Identifier hi def link passwdPasswordColon passwdColon hi def link passwdPassword Number hi def link passwdShadow Special hi def link passwdUIDColon passwdColon hi def link passwdUID Number hi def link passwdGIDColon passwdColon hi def link passwdGID Number hi def link passwdGecosColon passwdColon hi def link passwdGecos Comment hi def link passwdDirColon passwdColon hi def link passwdDir Type hi def link passwdShellColon passwdColon hi def link passwdShell Operator let b:current_syntax = "passwd" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/pcap.vim000066400000000000000000000027301320401574200174610ustar00rootroot00000000000000" Vim syntax file " Config file: printcap " Maintainer: Lennart Schultz (defunct) " Modified by Bram " Last Change: 2003 May 11 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif "define keywords setlocal isk=@,46-57,_,-,#,=,192-255 "first all the bad guys syn match pcapBad '^.\+$' "define any line as bad syn match pcapBadword '\k\+' contained "define any sequence of keywords as bad syn match pcapBadword ':' contained "define any single : as bad syn match pcapBadword '\\' contained "define any single \ as bad "then the good boys " Boolean keywords syn match pcapKeyword contained ':\(fo\|hl\|ic\|rs\|rw\|sb\|sc\|sf\|sh\)' " Numeric Keywords syn match pcapKeyword contained ':\(br\|du\|fc\|fs\|mx\|pc\|pl\|pw\|px\|py\|xc\|xs\)#\d\+' " String Keywords syn match pcapKeyword contained ':\(af\|cf\|df\|ff\|gf\|if\|lf\|lo\|lp\|nd\|nf\|of\|rf\|rg\|rm\|rp\|sd\|st\|tf\|tr\|vf\)=\k*' " allow continuation syn match pcapEnd ':\\$' contained " syn match pcapDefineLast '^\s.\+$' contains=pcapBadword,pcapKeyword syn match pcapDefine '^\s.\+$' contains=pcapBadword,pcapKeyword,pcapEnd syn match pcapHeader '^\k[^|]\+\(|\k[^|]\+\)*:\\$' syn match pcapComment "#.*$" syn sync minlines=50 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link pcapBad WarningMsg hi def link pcapBadword WarningMsg hi def link pcapComment Comment let b:current_syntax = "pcap" " vim: ts=8 neovim-0.2.2/runtime/syntax/pccts.vim000066400000000000000000000077751320401574200176700ustar00rootroot00000000000000" Vim syntax file " Language: PCCTS " Maintainer: Scott Bigham " Last Change: 10 Aug 1999 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Read the C++ syntax to start with syn include @cppTopLevel syntax/cpp.vim syn region pcctsAction matchgroup=pcctsDelim start="<<" end=">>?\=" contains=@cppTopLevel,pcctsRuleRef syn region pcctsArgBlock matchgroup=pcctsDelim start="\(>\s*\)\=\[" end="\]" contains=@cppTopLevel,pcctsRuleRef syn region pcctsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pcctsSpecialChar syn match pcctsSpecialChar "\\\\\|\\\"" contained syn region pcctsComment start="/\*" end="\*/" contains=cTodo syn match pcctsComment "//.*$" contains=cTodo syn region pcctsDirective start="^\s*#header\s\+<<" end=">>" contains=pcctsAction keepend syn match pcctsDirective "^\s*#parser\>.*$" contains=pcctsString,pcctsComment syn match pcctsDirective "^\s*#tokdefs\>.*$" contains=pcctsString,pcctsComment syn match pcctsDirective "^\s*#token\>.*$" contains=pcctsString,pcctsAction,pcctsTokenName,pcctsComment syn region pcctsDirective start="^\s*#tokclass\s\+[A-Z]\i*\s\+{" end="}" contains=pcctsString,pcctsTokenName syn match pcctsDirective "^\s*#lexclass\>.*$" contains=pcctsTokenName syn region pcctsDirective start="^\s*#errclass\s\+[^{]\+\s\+{" end="}" contains=pcctsString,pcctsTokenName syn match pcctsDirective "^\s*#pred\>.*$" contains=pcctsTokenName,pcctsAction syn cluster pcctsInRule contains=pcctsString,pcctsRuleName,pcctsTokenName,pcctsAction,pcctsArgBlock,pcctsSubRule,pcctsLabel,pcctsComment syn region pcctsRule start="\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\(\s*>\s*\[[^]]*\]\)\=\s*:" end=";" contains=@pcctsInRule syn region pcctsSubRule matchgroup=pcctsDelim start="(" end=")\(+\|\*\|?\(\s*=>\)\=\)\=" contains=@pcctsInRule contained syn region pcctsSubRule matchgroup=pcctsDelim start="{" end="}" contains=@pcctsInRule contained syn match pcctsRuleName "\<[a-z]\i*\>" contained syn match pcctsTokenName "\<[A-Z]\i*\>" contained syn match pcctsLabel "\<\I\i*:\I\i*" contained contains=pcctsLabelHack,pcctsRuleName,pcctsTokenName syn match pcctsLabel "\<\I\i*:\"\([^\\]\|\\.\)*\"" contained contains=pcctsLabelHack,pcctsString syn match pcctsLabelHack "\<\I\i*:" contained syn match pcctsRuleRef "\$\I\i*\>" contained syn match pcctsRuleRef "\$\d\+\(\.\d\+\)\>" contained syn keyword pcctsClass class nextgroup=pcctsClassName skipwhite syn match pcctsClassName "\<\I\i*\>" contained nextgroup=pcctsClassBlock skipwhite skipnl syn region pcctsClassBlock start="{" end="}" contained contains=pcctsRule,pcctsComment,pcctsDirective,pcctsAction,pcctsException,pcctsExceptionHandler syn keyword pcctsException exception nextgroup=pcctsExceptionRuleRef skipwhite syn match pcctsExceptionRuleRef "\[\I\i*\]" contained contains=pcctsExceptionID syn match pcctsExceptionID "\I\i*" contained syn keyword pcctsExceptionHandler catch default syn keyword pcctsExceptionHandler NoViableAlt NoSemViableAlt syn keyword pcctsExceptionHandler MismatchedToken syn sync clear syn sync match pcctsSyncAction grouphere pcctsAction "<<" syn sync match pcctsSyncAction "<<\([^>]\|>[^>]\)*>>" syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\s*\[[^]]*\]\s*:" syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\s*>\s*\[[^]]*\]\s*:" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link pcctsDelim Special hi def link pcctsTokenName Identifier hi def link pcctsRuleName Statement hi def link pcctsLabelHack Label hi def link pcctsDirective PreProc hi def link pcctsString String hi def link pcctsComment Comment hi def link pcctsClass Statement hi def link pcctsClassName Identifier hi def link pcctsException Statement hi def link pcctsExceptionHandler Keyword hi def link pcctsExceptionRuleRef pcctsDelim hi def link pcctsExceptionID Identifier hi def link pcctsRuleRef Identifier hi def link pcctsSpecialChar SpecialChar let b:current_syntax = "pccts" " vim: ts=8 neovim-0.2.2/runtime/syntax/pdf.vim000066400000000000000000000067231320401574200173150ustar00rootroot00000000000000" Vim syntax file " Language: PDF " Maintainer: Tim Pope " Last Change: 2007 Dec 16 if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'pdf' endif syn include @pdfXML syntax/xml.vim syn case match syn cluster pdfObjects contains=pdfBoolean,pdfConstant,pdfNumber,pdfFloat,pdfName,pdfHexString,pdfString,pdfArray,pdfHash,pdfReference,pdfComment syn keyword pdfBoolean true false contained syn keyword pdfConstant null contained syn match pdfNumber "[+-]\=\<\d\+\>" syn match pdfFloat "[+-]\=\<\%(\d\+\.\|\d*\.\d\+\)\>" contained syn match pdfNameError "#\X\|#\x\X\|#00" contained containedin=pdfName syn match pdfSpecialChar "#\x\x" contained containedin=pdfName syn match pdfName "/[^[:space:]\[\](){}<>/]*" contained syn match pdfHexError "[^[:space:][:xdigit:]<>]" contained "syn match pdfHexString "<\s*\x[^<>]*\x\s*>" contained contains=pdfHexError "syn match pdfHexString "<\s*\x\=\s*>" contained syn region pdfHexString matchgroup=pdfDelimiter start="<<\@!" end=">" contained contains=pdfHexError syn match pdfStringError "\\." contained containedin=pdfString syn match pdfSpecialChar "\\\%(\o\{1,3\}\|[nrtbf()\\]\)" contained containedin=pdfString syn region pdfString matchgroup=pdfDelimiter start="\\\@>" contains=@pdfObjects contained syn match pdfReference "\<\d\+\s\+\d\+\s\+R\>" "syn keyword pdfOperator R contained containedin=pdfReference syn region pdfObject matchgroup=pdfType start="\" end="\" contains=@pdfObjects syn region pdfObject matchgroup=pdfType start="\ " Homepage: http://github.com/vim-perl/vim-perl/tree/master " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2017-09-12 " Contributors: Andy Lester " Hinrik Örn Sigurðsson " Lukas Mai " Nick Hibma " Sonia Heimann " Rob Hoelz " and many others. " " Please download the most recent version first, before mailing " any comments. " " The following parameters are available for tuning the " perl syntax highlighting, with defaults given: " " let perl_include_pod = 1 " unlet perl_no_scope_in_variables " unlet perl_no_extended_vars " unlet perl_string_as_statement " unlet perl_no_sync_on_sub " unlet perl_no_sync_on_global_var " let perl_sync_dist = 100 " unlet perl_fold " unlet perl_fold_blocks " unlet perl_nofold_packages " unlet perl_nofold_subs " unlet perl_fold_anonymous_subs " unlet perl_no_subprototype_error if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " POD starts with ^= and ends with ^=cut if !exists("perl_include_pod") || perl_include_pod == 1 " Include a while extra syntax file syn include @Pod syntax/pod.vim unlet b:current_syntax if exists("perl_fold") syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend fold extend syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend fold extend else syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend endif else " Use only the bare minimum of rules if exists("perl_fold") syn region perlPOD start="^=[a-z]" end="^=cut" fold else syn region perlPOD start="^=[a-z]" end="^=cut" endif endif syn cluster perlTop contains=TOP syn region perlBraces start="{" end="}" transparent extend " All keywords " syn match perlConditional "\<\%(if\|elsif\|unless\|given\|when\|default\)\>" syn match perlConditional "\\)\|\>\)" contains=perlElseIfError skipwhite skipnl skipempty syn match perlRepeat "\<\%(while\|for\%(each\)\=\|do\|until\|continue\)\>" syn match perlOperator "\<\%(defined\|undef\|eq\|ne\|[gl][et]\|cmp\|not\|and\|or\|xor\|not\|bless\|ref\|do\)\>" " for some reason, adding this as the nextgroup for perlControl fixes BEGIN " folding issues... syn match perlFakeGroup "" contained syn match perlControl "\<\%(BEGIN\|CHECK\|INIT\|END\|UNITCHECK\)\>\_s*" nextgroup=perlFakeGroup syn match perlStatementStorage "\<\%(my\|our\|local\|state\)\>" syn match perlStatementControl "\<\%(return\|last\|next\|redo\|goto\|break\)\>" syn match perlStatementScalar "\<\%(chom\=p\|chr\|crypt\|r\=index\|lc\%(first\)\=\|length\|ord\|pack\|sprintf\|substr\|fc\|uc\%(first\)\=\)\>" syn match perlStatementRegexp "\<\%(pos\|quotemeta\|split\|study\)\>" syn match perlStatementNumeric "\<\%(abs\|atan2\|cos\|exp\|hex\|int\|log\|oct\|rand\|sin\|sqrt\|srand\)\>" syn match perlStatementList "\<\%(splice\|unshift\|shift\|push\|pop\|join\|reverse\|grep\|map\|sort\|unpack\)\>" syn match perlStatementHash "\<\%(delete\|each\|exists\|keys\|values\)\>" syn match perlStatementIOfunc "\<\%(syscall\|dbmopen\|dbmclose\)\>" syn match perlStatementFiledesc "\<\%(binmode\|close\%(dir\)\=\|eof\|fileno\|getc\|lstat\|printf\=\|read\%(dir\|line\|pipe\)\|rewinddir\|say\|select\|stat\|tell\%(dir\)\=\|write\)\>" nextgroup=perlFiledescStatementNocomma skipwhite syn match perlStatementFiledesc "\<\%(fcntl\|flock\|ioctl\|open\%(dir\)\=\|read\|seek\%(dir\)\=\|sys\%(open\|read\|seek\|write\)\|truncate\)\>" nextgroup=perlFiledescStatementComma skipwhite syn match perlStatementVector "\" syn match perlStatementFiles "\<\%(ch\%(dir\|mod\|own\|root\)\|glob\|link\|mkdir\|readlink\|rename\|rmdir\|symlink\|umask\|unlink\|utime\)\>" syn match perlStatementFiles "-[rwxoRWXOezsfdlpSbctugkTBMAC]\>" syn match perlStatementFlow "\<\%(caller\|die\|dump\|eval\|exit\|wantarray\|evalbytes\)\>" syn match perlStatementInclude "\<\%(require\|import\|unimport\)\>" syn match perlStatementInclude "\<\%(use\|no\)\s\+\%(\%(attributes\|attrs\|autodie\|autouse\|parent\|base\|big\%(int\|num\|rat\)\|blib\|bytes\|charnames\|constant\|diagnostics\|encoding\%(::warnings\)\=\|feature\|fields\|filetest\|if\|integer\|less\|lib\|locale\|mro\|open\|ops\|overload\|overloading\|re\|sigtrap\|sort\|strict\|subs\|threads\%(::shared\)\=\|utf8\|vars\|version\|vmsish\|warnings\%(::register\)\=\)\>\)\=" syn match perlStatementProc "\<\%(alarm\|exec\|fork\|get\%(pgrp\|ppid\|priority\)\|kill\|pipe\|set\%(pgrp\|priority\)\|sleep\|system\|times\|wait\%(pid\)\=\)\>" syn match perlStatementSocket "\<\%(accept\|bind\|connect\|get\%(peername\|sock\%(name\|opt\)\)\|listen\|recv\|send\|setsockopt\|shutdown\|socket\%(pair\)\=\)\>" syn match perlStatementIPC "\<\%(msg\%(ctl\|get\|rcv\|snd\)\|sem\%(ctl\|get\|op\)\|shm\%(ctl\|get\|read\|write\)\)\>" syn match perlStatementNetwork "\<\%(\%(end\|[gs]et\)\%(host\|net\|proto\|serv\)ent\|get\%(\%(host\|net\)by\%(addr\|name\)\|protoby\%(name\|number\)\|servby\%(name\|port\)\)\)\>" syn match perlStatementPword "\<\%(get\%(pw\%(uid\|nam\)\|gr\%(gid\|nam\)\|login\)\)\|\%(end\|[gs]et\)\%(pw\|gr\)ent\>" syn match perlStatementTime "\<\%(gmtime\|localtime\|time\)\>" syn match perlStatementMisc "\<\%(warn\|format\|formline\|reset\|scalar\|prototype\|lock\|tied\=\|untie\)\>" syn keyword perlTodo TODO TODO: TBD TBD: FIXME FIXME: XXX XXX: NOTE NOTE: contained syn region perlStatementIndirObjWrap matchgroup=perlStatementIndirObj start="\%(\<\%(map\|grep\|sort\|printf\=\|say\|system\|exec\)\>\s*\)\@<={" end="}" transparent extend syn match perlLabel "^\s*\h\w*\s*::\@!\%(\ is *not* considered as part of the " variable - there again, too complicated and too slow. " Special variables first ($^A, ...) and ($|, $', ...) syn match perlVarPlain "$^[ACDEFHILMNOPRSTVWX]\=" syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]" syn match perlVarPlain "@[-+]" syn match perlVarPlain "$\%(0\|[1-9]\d*\)" " Same as above, but avoids confusion in $::foo (equivalent to $main::foo) syn match perlVarPlain "$::\@!" " These variables are not recognized within matches. syn match perlVarNotInMatches "$[|)]" " This variable is not recognized within matches delimited by m//. syn match perlVarSlash "$/" " And plain identifiers syn match perlPackageRef "[$@#%*&]\%(\%(::\|'\)\=\I\i*\%(\%(::\|'\)\I\i*\)*\)\=\%(::\|'\)\I"ms=s+1,me=e-1 contained " To not highlight packages in variables as a scope reference - i.e. in " $pack::var, pack:: is a scope, just set "perl_no_scope_in_variables" " If you don't want complex things like @{${"foo"}} to be processed, " just set the variable "perl_no_extended_vars"... if !exists("perl_no_scope_in_variables") syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref else syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref endif syn match perlVarPlain2 "%[-+]" if !exists("perl_no_extended_vars") syn cluster perlExpr contains=perlStatementIndirObjWrap,perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarPlain2,perlVarNotInMatches,perlVarSlash,perlVarBlock,perlVarBlock2,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ,perlArrow,perlBraces syn region perlArrow matchgroup=perlArrow start="->\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contained syn region perlArrow matchgroup=perlArrow start="->\s*\[" end="\]" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contained syn region perlArrow matchgroup=perlArrow start="->\s*{" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contained syn match perlArrow "->\s*{\s*\I\i*\s*}" contains=perlVarSimpleMemberName nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contained syn region perlArrow matchgroup=perlArrow start="->\s*\$*\I\i*\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contained syn region perlVarBlock matchgroup=perlVarPlain start="\%($#\|[$@]\)\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend syn region perlVarBlock2 matchgroup=perlVarPlain start="[%&*]\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend syn match perlVarPlain2 "[%&*]\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend syn match perlVarPlain "\%(\$#\|[@$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\={" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend syn match perlVarSimpleMember "\%(->\)\={\s*\I\i*\s*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contains=perlVarSimpleMemberName contained extend syn match perlVarSimpleMemberName "\I\i*" contained syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\=\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend syn match perlPackageConst "__PACKAGE__" nextgroup=perlMethod,perlPostDeref syn match perlMethod "->\$*\I\i*" contained nextgroup=perlVarSimpleMember,perlVarMember,perlMethod,perlPostDeref syn match perlPostDeref "->\%($#\|[$@%&*]\)\*" contained nextgroup=perlVarSimpleMember,perlVarMember,perlMethod,perlPostDeref syn region perlPostDeref start="->\%($#\|[$@%&*]\)\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarSimpleMember,perlVarMember,perlMethod,perlPostDeref syn region perlPostDeref matchgroup=perlPostDeref start="->\%($#\|[$@%&*]\){" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarSimpleMember,perlVarMember,perlMethod,perlPostDeref endif " File Descriptors syn match perlFiledescRead "<\h\w*>" syn match perlFiledescStatementComma "(\=\s*\<\u\w*\>\s*,"me=e-1 transparent contained contains=perlFiledescStatement syn match perlFiledescStatementNocomma "(\=\s*\<\u\w*\>\s*[^, \t]"me=e-1 transparent contained contains=perlFiledescStatement syn match perlFiledescStatement "\<\u\w*\>" contained " Special characters in strings and matches syn match perlSpecialString "\\\%(\o\{1,3}\|x\%({\x\+}\|\x\{1,2}\)\|c.\|[^cx]\)" contained extend syn match perlSpecialStringU2 "\\." extend contained contains=NONE syn match perlSpecialStringU "\\\\" contained syn match perlSpecialMatch "\\[1-9]" contained extend syn match perlSpecialMatch "\\g\%(\d\+\|{\%(-\=\d\+\|\h\w*\)}\)" contained syn match perlSpecialMatch "\\k\%(<\h\w*>\|'\h\w*'\)" contained syn match perlSpecialMatch "{\d\+\%(,\%(\d\+\)\=\)\=}" contained syn match perlSpecialMatch "\[[]-]\=[^\[\]]*[]-]\=\]" contained extend syn match perlSpecialMatch "[+*()?.]" contained syn match perlSpecialMatch "(?[#:=!]" contained syn match perlSpecialMatch "(?[impsx]*\%(-[imsx]\+\)\=)" contained syn match perlSpecialMatch "(?\%([-+]\=\d\+\|R\))" contained syn match perlSpecialMatch "(?\%(&\|P[>=]\)\h\w*)" contained syn match perlSpecialMatch "(\*\%(\%(PRUNE\|SKIP\|THEN\)\%(:[^)]*\)\=\|\%(MARK\|\):[^)]*\|COMMIT\|F\%(AIL\)\=\|ACCEPT\))" contained " Possible errors " " Highlight lines with only whitespace (only in blank delimited here documents) as errors syn match perlNotEmptyLine "^\s\+$" contained " Highlight "} else if (...) {", it should be "} else { if (...) { " or "} elsif (...) {" syn match perlElseIfError "else\_s*if" containedin=perlConditional syn keyword perlElseIfError elseif containedin=perlConditional " Variable interpolation " " These items are interpolated inside "" strings and similar constructs. syn cluster perlInterpDQ contains=perlSpecialString,perlVarPlain,perlVarNotInMatches,perlVarSlash,perlVarBlock " These items are interpolated inside '' strings and similar constructs. syn cluster perlInterpSQ contains=perlSpecialStringU,perlSpecialStringU2 " These items are interpolated inside m// matches and s/// substitutions. syn cluster perlInterpSlash contains=perlSpecialString,perlSpecialMatch,perlVarPlain,perlVarBlock " These items are interpolated inside m## matches and s### substitutions. syn cluster perlInterpMatch contains=@perlInterpSlash,perlVarSlash " Shell commands syn region perlShellCommand matchgroup=perlMatchStartEnd start="`" end="`" contains=@perlInterpDQ keepend " Constants " " Numbers syn match perlNumber "\<\%(0\%(x\x[[:xdigit:]_]*\|b[01][01_]*\|\o[0-7_]*\|\)\|[1-9][[:digit:]_]*\)\>" syn match perlFloat "\<\d[[:digit:]_]*[eE][\-+]\=\d\+" syn match perlFloat "\<\d[[:digit:]_]*\.[[:digit:]_]*\%([eE][\-+]\=\d\+\)\=" syn match perlFloat "\.[[:digit:]][[:digit:]_]*\%([eE][\-+]\=\d\+\)\=" syn match perlString "\<\%(v\d\+\%(\.\d\+\)*\|\d\+\%(\.\d\+\)\{2,}\)\>" contains=perlVStringV syn match perlVStringV "\+ extend contained contains=perlAnglesSQ,@perlInterpSQ keepend syn region perlParensDQ start=+(+ end=+)+ extend contained contains=perlParensDQ,@perlInterpDQ keepend syn region perlBracketsDQ start=+\[+ end=+\]+ extend contained contains=perlBracketsDQ,@perlInterpDQ keepend syn region perlBracesDQ start=+{+ end=+}+ extend contained contains=perlBracesDQ,@perlInterpDQ keepend syn region perlAnglesDQ start=+<+ end=+>+ extend contained contains=perlAnglesDQ,@perlInterpDQ keepend " Simple version of searches and matches syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\s*\z([^[:space:]'([{<#]\)+ end=+\z1[msixpodualgcn]*+ contains=@perlInterpMatch keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@\)\@\)\@[msixpodualgcn]*+ contains=@perlInterpMatch,perlAnglesDQ keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@\s*\z([^[:space:]'([{<#]\)+ end=+\z1+me=e-1 contains=@perlInterpMatch nextgroup=perlSubstitutionGQQ keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@\)\@+ contains=@perlInterpMatch,perlAnglesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@[msixpodualgcern]*+ contained contains=@perlInterpDQ,perlAnglesDQ keepend extend syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[msixpodualgcern]*+ contained contains=@perlInterpSQ keepend extend " Translations " perlMatch is the first part, perlTranslation* is the second, translator part. syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\s*\z([^[:space:]([{<#]\)+ end=+\z1+me=e-1 contains=@perlInterpSQ nextgroup=perlTranslationGQ syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@+ contains=@perlInterpSQ,perlAnglesSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@[cdsr]*+ contains=perlAnglesSQ contained " Strings and q, qq, qw and qr expressions syn region perlStringUnexpanded matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ keepend extend syn region perlString matchgroup=perlStringStartEnd start=+"+ end=+"+ contains=@perlInterpDQ keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpSQ keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@\)\@+ contains=@perlInterpSQ,perlAnglesSQ keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpDQ keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@\)\@+ contains=@perlInterpDQ,perlAnglesDQ keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@\)\@\)\@+ contains=@perlInterpSQ,perlAnglesSQ keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\s*\z([^[:space:]#([{<'/]\)+ end=+\z1[imosxdual]*+ contains=@perlInterpMatch keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\)\@\)\@\)\@ and qr[] which allows for comments and extra whitespace in the pattern syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\)\@[imosxdual]*+ contains=@perlInterpMatch,perlAnglesDQ,perlComment keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@\zs\_[^)]\+" contained syn match perlSubPrototype +(\_[^)]*)\_s*+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError endif syn match perlSubName +\%(\h\|::\|'\w\)\%(\w\|::\|'\w\)*\_s*\|+ contained nextgroup=perlSubPrototype,perlSignature,perlSubAttributes,perlComment syn match perlFunction +\\_s*+ nextgroup=perlSubName " The => operator forces a bareword to the left of it to be interpreted as " a string syn match perlString "\I\@\)\@=" " All other # are comments, except ^#! syn match perlComment "#.*" contains=perlTodo,@Spell extend syn match perlSharpBang "^#!.*" " Formats syn region perlFormat matchgroup=perlStatementIOFunc start="^\s*\~]\+\%(\.\.\.\)\=" contained syn match perlFormatField "[@^]#[#.]*" contained syn match perlFormatField "@\*" contained syn match perlFormatField "@[^A-Za-z_|<>~#*]"me=e-1 contained syn match perlFormatField "@$" contained " __END__ and __DATA__ clauses if exists("perl_fold") syntax region perlDATA start="^__DATA__$" skip="." end="." contains=@perlDATA fold syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA fold else syntax region perlDATA start="^__DATA__$" skip="." end="." contains=@perlDATA syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA endif " " Folding if exists("perl_fold") " Note: this bit must come before the actual highlighting of the "package" " keyword, otherwise this will screw up Pod lines that match /^package/ if !exists("perl_nofold_packages") syn region perlPackageFold start="^package \S\+;\s*\%(#.*\)\=$" end="^1;\=\s*\%(#.*\)\=$" end="\n\+package"me=s-1 transparent fold keepend endif if !exists("perl_nofold_subs") if get(g:, "perl_fold_anonymous_subs", 0) syn region perlSubFold start="\[^{]*{" end="}" transparent fold keepend extend syn region perlSubFold start="\<\%(BEGIN\|END\|CHECK\|INIT\)\>\s*{" end="}" transparent fold keepend else syn region perlSubFold start="^\z(\s*\)\.*[^};]$" end="^\z1}\s*\%(#.*\)\=$" transparent fold keepend syn region perlSubFold start="^\z(\s*\)\<\%(BEGIN\|END\|CHECK\|INIT\|UNITCHECK\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend endif endif if exists("perl_fold_blocks") syn region perlBlockFold start="^\z(\s*\)\%(if\|elsif\|unless\|for\|while\|until\|given\)\s*(.*)\%(\s*{\)\=\s*\%(#.*\)\=$" start="^\z(\s*\)for\%(each\)\=\s*\%(\%(my\|our\)\=\s*\S\+\s*\)\=(.*)\%(\s*{\)\=\s*\%(#.*\)\=$" end="^\z1}\s*;\=\%(#.*\)\=$" transparent fold keepend syn region perlBlockFold start="^\z(\s*\)\%(do\|else\)\%(\s*{\)\=\s*\%(#.*\)\=$" end="^\z1}\s*while" end="^\z1}\s*;\=\%(#.*\)\=$" transparent fold keepend endif setlocal foldmethod=syntax syn sync fromstart else " fromstart above seems to set minlines even if perl_fold is not set. syn sync minlines=0 endif " NOTE: If you're linking new highlight groups to perlString, please also put " them into b:match_skip in ftplugin/perl.vim. " The default highlighting. hi def link perlSharpBang PreProc hi def link perlControl PreProc hi def link perlInclude Include hi def link perlSpecial Special hi def link perlString String hi def link perlCharacter Character hi def link perlNumber Number hi def link perlFloat Float hi def link perlType Type hi def link perlIdentifier Identifier hi def link perlLabel Label hi def link perlStatement Statement hi def link perlConditional Conditional hi def link perlRepeat Repeat hi def link perlOperator Operator hi def link perlFunction Keyword hi def link perlSubName Function hi def link perlSubPrototype Type hi def link perlSignature Type hi def link perlSubAttributes PreProc hi def link perlSubAttributesCont perlSubAttributes hi def link perlComment Comment hi def link perlTodo Todo if exists("perl_string_as_statement") hi def link perlStringStartEnd perlStatement else hi def link perlStringStartEnd perlString endif hi def link perlVStringV perlStringStartEnd hi def link perlList perlStatement hi def link perlMisc perlStatement hi def link perlVarPlain perlIdentifier hi def link perlVarPlain2 perlIdentifier hi def link perlArrow perlIdentifier hi def link perlFiledescRead perlIdentifier hi def link perlFiledescStatement perlIdentifier hi def link perlVarSimpleMember perlIdentifier hi def link perlVarSimpleMemberName perlString hi def link perlVarNotInMatches perlIdentifier hi def link perlVarSlash perlIdentifier hi def link perlQQ perlString hi def link perlHereDoc perlString hi def link perlStringUnexpanded perlString hi def link perlSubstitutionSQ perlString hi def link perlSubstitutionGQQ perlString hi def link perlTranslationGQ perlString hi def link perlMatch perlString hi def link perlMatchStartEnd perlStatement hi def link perlFormatName perlIdentifier hi def link perlFormatField perlString hi def link perlPackageDecl perlType hi def link perlStorageClass perlType hi def link perlPackageRef perlType hi def link perlStatementPackage perlStatement hi def link perlStatementStorage perlStatement hi def link perlStatementControl perlStatement hi def link perlStatementScalar perlStatement hi def link perlStatementRegexp perlStatement hi def link perlStatementNumeric perlStatement hi def link perlStatementList perlStatement hi def link perlStatementHash perlStatement hi def link perlStatementIOfunc perlStatement hi def link perlStatementFiledesc perlStatement hi def link perlStatementVector perlStatement hi def link perlStatementFiles perlStatement hi def link perlStatementFlow perlStatement hi def link perlStatementInclude perlStatement hi def link perlStatementProc perlStatement hi def link perlStatementSocket perlStatement hi def link perlStatementIPC perlStatement hi def link perlStatementNetwork perlStatement hi def link perlStatementPword perlStatement hi def link perlStatementTime perlStatement hi def link perlStatementMisc perlStatement hi def link perlStatementIndirObj perlStatement hi def link perlFunctionName perlIdentifier hi def link perlMethod perlIdentifier hi def link perlPostDeref perlIdentifier hi def link perlFunctionPRef perlType if !get(g:, 'perl_include_pod', 1) hi def link perlPOD perlComment endif hi def link perlShellCommand perlString hi def link perlSpecialAscii perlSpecial hi def link perlSpecialDollar perlSpecial hi def link perlSpecialString perlSpecial hi def link perlSpecialStringU perlSpecial hi def link perlSpecialMatch perlSpecial hi def link perlDATA perlComment " NOTE: Due to a bug in Vim (or more likely, a misunderstanding on my part), " I had to remove the transparent property from the following regions " in order to get them to highlight correctly. Feel free to remove " these and reinstate the transparent property if you know how. hi def link perlParensSQ perlString hi def link perlBracketsSQ perlString hi def link perlBracesSQ perlString hi def link perlAnglesSQ perlString hi def link perlParensDQ perlString hi def link perlBracketsDQ perlString hi def link perlBracesDQ perlString hi def link perlAnglesDQ perlString hi def link perlSpecialStringU2 perlString " Possible errors hi def link perlNotEmptyLine Error hi def link perlElseIfError Error hi def link perlSubPrototypeError Error hi def link perlSubError Error " Syncing to speed up processing " if !exists("perl_no_sync_on_sub") syn sync match perlSync grouphere NONE "^\s*\" syn sync match perlSync grouphere NONE "^}" endif if !exists("perl_no_sync_on_global_var") syn sync match perlSync grouphere NONE "^$\I[[:alnum:]_:]+\s*=\s*{" syn sync match perlSync grouphere NONE "^[@%]\I[[:alnum:]_:]+\s*=\s*(" endif if exists("perl_sync_dist") execute "syn sync maxlines=" . perl_sync_dist else syn sync maxlines=100 endif syn sync match perlSyncPOD grouphere perlPOD "^=pod" syn sync match perlSyncPOD grouphere perlPOD "^=head" syn sync match perlSyncPOD grouphere perlPOD "^=item" syn sync match perlSyncPOD grouphere NONE "^=cut" let b:current_syntax = "perl" let &cpo = s:cpo_save unlet s:cpo_save " XXX Change to sts=4:sw=4 " vim:ts=8:sts=2:sw=2:expandtab:ft=vim neovim-0.2.2/runtime/syntax/perl6.vim000066400000000000000000002206171320401574200175740ustar00rootroot00000000000000" Vim syntax file " Language: Perl 6 " Maintainer: vim-perl " Homepage: http://github.com/vim-perl/vim-perl/tree/master " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2013-07-21 " Contributors: Luke Palmer " Moritz Lenz " Hinrik Örn Sigurðsson " " This is a big undertaking. Perl 6 is the sort of language that only Perl " can parse. But I'll do my best to get vim to. " " You can associate the extension ".pl" with the filetype "perl6" by setting " autocmd BufNewFile,BufRead *.pl setf perl6 " in your ~/.vimrc. But that will infringe on Perl 5, so you might want to " put a modeline near the beginning or end of your Perl 6 files instead: " # vim: filetype=perl6 " TODO: " * Deal with s:Perl5// " * m:s// is a match, not a substitution " * Make these highlight as strings, not operators: " <==> <=:=> <===> <=~> <« »> «>» «<» " * Allow more keywords to match as function calls(leave() is export(), etc) " * Optimization: use nextgroup instead of lookaround (:help syn-nextgroup) " * Fix s''' substitutions being matched as package names " * Match s/// and m/// better, so things like "$s/" won't match " * Add more support for folding (:help syn-fold) " * Add more syntax syncing hooks (:help syn-sync) " * Q//: " :to, :heredoc " interpolate \q:s{$scalar} (though the spec isn't very clear on it) " " Impossible TODO?: " * Unspace " * Unicode bracketing characters for quoting (there are so many) " * Various tricks depending on context. I.e. we can't know when Perl " expects «*» to be a string or a hyperoperator. The latter is presumably " more common, so that's what we assume. " * Selective highlighting of Pod formatting codes with the :allow option " * Arbitrary number, order, and negation of adverbs to Q//, q//, qq//. " Currently only the first adverb is considered significant. Anything " more would require an exponential amount of regexes, making this " already slow syntax file even slower. " " If you want to have Pir code inside Q:PIR// strings highlighted, do: " let perl6_embedded_pir=1 " " The above requires pir.vim, which you can find in Parrot's repository: " https://svn.parrot.org/parrot/trunk/editor/ " " Some less than crucial things have been made optional to speed things up. " Look at the comments near the if/else branches in this file to see exactly " which features are affected. "perl6_extended_all" enables everything. " " The defaults are: " " unlet perl6_extended_comments " unlet perl6_extended_q " unlet perl6_extended_all " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:keepcpo= &cpo set cpo&vim " identifiers syn match p6Normal display "\K\%(\k\|[-']\K\@=\)*" " This is used in the for loops below " Don't use the "syn keyword" construct because that always has higher " priority than matches/regions, so the words can't be autoquoted with " the "=>" and "p5=>" operators. All the lookaround stuff is to make sure " we don't match them as part of some other identifier. let s:before_keyword = " display \"\\%(\\k\\|\\K\\@<=[-']\\)\\@.;\\]" syn match p6Operator display "\%(:\@\)" " "i" requires a digit to the left, and no keyword char to the right syn match p6Operator display "\d\@<=i\k\@!" " index overloading syn match p6Operator display "\%(&\.(\@=\|@\.\[\@=\|%\.{\@=\)" " all infix operators except nonassocative ones let s:infix_a = [ \ "div % mod +& +< +> \\~& ?& \\~< \\~> +| +\\^ \\~| \\~\\^ ?| ?\\^ xx x", \ "\\~ && & also <== ==> <<== ==>> == != < <= > >= \\~\\~ eq ne lt le gt", \ "ge =:= === eqv before after \\^\\^ min max \\^ff ff\\^ \\^ff\\^", \ "\\^fff fff\\^ \\^fff\\^ fff ff ::= := \\.= => , : p5=> Z minmax", \ "\\.\\.\\. and andthen or orelse xor \\^ += -= /= \\*= \\~= //= ||=", \ "+ - \\*\\* \\* // / \\~ || |", \ ] " nonassociative infix operators let s:infix_n = "but does <=> leg cmp \\.\\. \\.\\.\\^\\^ \\^\\.\\. \\^\\.\\.\\^" let s:infix_a_long = join(s:infix_a, " ") let s:infix_a_words = split(s:infix_a_long) let s:infix_a_pattern = join(s:infix_a_words, "\\|") let s:infix_n_words = split(s:infix_n) let s:infix_n_pattern = join(s:infix_n_words, "\\|") let s:both = [s:infix_a_pattern, s:infix_n_pattern] let s:infix = join(s:both, "\\|") let s:infix_assoc = "!\\?\\%(" . s:infix_a_pattern . "\\)" let s:infix = "!\\?\\%(" . s:infix . "\\)" unlet s:infix_a s:infix_a_long s:infix_a_words s:infix_a_pattern unlet s:infix_n s:infix_n_pattern s:both " [+] reduce exec "syn match p6ReduceOp display \"\\k\\@" " does is a type constraint sometimes syn match p6TypeConstraint display "does\%(\s*\%(\k\|[-']\K\@=\)\)\@=" " int is a type sometimes syn match p6Type display "\\%(\s*(\|\s\+\d\)\@!" " these Routine names are also Properties, if preceded by "is" syn match p6Property display "\%(is\s\+\)\@<=\%(signature\|context\|also\|shape\)" " The sigil in ::*Package syn match p6PackageTwigil display "\%(::\)\@<=\*" " $ syn region p6MatchVarSigil \ matchgroup=p6Variable \ start="\$\%(<<\@!\)\@=" \ end=">\@<=" \ contains=p6MatchVar syn region p6MatchVar \ matchgroup=p6Twigil \ start="<" \ end=">" \ contained " Contextualizers syn match p6Context display "\<\%(item\|list\|slice\|hash\)\>" syn match p6Context display "\%(\$\|@\|%\|&\|@@\)(\@=" " the "$" placeholder in "$var1, $, var2 = @list" syn match p6Placeholder display "\%(,\s*\)\@<=\$\%(\K\|\%([.^*?=!~]\|:\@]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)" \ start="\ze\z(\$\%(\%(\%(\%([.^*?=!~]\|:\@]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)" \ end="\z1\zs" \ contained \ contains=TOP \ keepend syn region p6InterpArray \ matchgroup=p6Context \ start="@\ze()\@!" \ start="@@\ze()\@!" \ skip="([^)]*)" \ end=")\zs" \ contained \ contains=TOP syn region p6InterpHash \ start="\ze\z(%\$*\%(\%(\%(!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)" \ end="\z1\zs" \ contained \ contains=TOP \ keepend syn region p6InterpHash \ matchgroup=p6Context \ start="%\ze()\@!" \ skip="([^)]*)" \ end=")\zs" \ contained \ contains=TOP syn region p6InterpFunction \ start="\ze\z(&\%(\%(!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)" \ end="\z1\zs" \ contained \ contains=TOP \ keepend syn region p6InterpFunction \ matchgroup=p6Context \ start="&\ze()\@!" \ skip="([^)]*)" \ end=")\zs" \ contained \ contains=TOP syn region p6InterpClosure \ start="\\\@" contained syn match p6EscCloseFrench display "\\»" contained syn match p6EscBackTick display "\\`" contained syn match p6EscForwardSlash display "\\/" contained syn match p6EscVerticalBar display "\\|" contained syn match p6EscExclamation display "\\!" contained syn match p6EscComma display "\\," contained syn match p6EscDollar display "\\\$" contained syn match p6EscCloseCurly display "\\}" contained syn match p6EscCloseBracket display "\\\]" contained " misc escapes syn match p6EscOctOld display "\\\d\{1,3}" contained syn match p6EscNull display "\\0\d\@!" contained syn match p6EscCodePoint display "\%(\\c\)\@<=\%(\d\|\S\|\[\)\@=" contained nextgroup=p6CodePoint syn match p6EscHex display "\%(\\x\)\@<=\%(\x\|\[\)\@=" contained nextgroup=p6HexSequence syn match p6EscOct display "\%(\\o\)\@<=\%(\o\|\[\)\@=" contained nextgroup=p6OctSequence syn match p6EscQQ display "\\qq" contained nextgroup=p6QQSequence syn match p6EscOpenCurly display "\\{" contained syn match p6EscHash display "\\#" contained syn match p6EscBackSlash display "\\\\" contained syn region p6QQSequence \ matchgroup=p6Escape \ start="\[" \ skip="\[[^\]]*]" \ end="]" \ contained \ transparent \ contains=@p6Interp_qq syn match p6CodePoint display "\%(\d\+\|\S\)" contained syn region p6CodePoint \ matchgroup=p6Escape \ start="\[" \ end="]" \ contained syn match p6HexSequence display "\x\+" contained syn region p6HexSequence \ matchgroup=p6Escape \ start="\[" \ end="]" \ contained syn match p6OctSequence display "\o\+" contained syn region p6OctSequence \ matchgroup=p6Escape \ start="\[" \ end="]" \ contained " matches :key, :!key, :$var, :key, etc " Since we don't know in advance how the adverb ends, we use a trick. " Consume nothing with the start pattern (\ze at the beginning), " while capturing the whole adverb into \z1 and then putting it before " the match start (\zs) of the end pattern. syn region p6Adverb \ start="\ze\z(:!\?\K\%(\k\|[-']\K\@=\)*\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\?\)" \ start="\ze\z(:!\?[@$%]\$*\%(::\|\%(\$\@<=\d\+\|!\|/\|¢\)\|\%(\%([.^*?=!~]\|:\@ " FIXME: not sure how to distinguish this from the "less than" operator " in all cases. For now, it matches if any of the following is true: " " * There is whitespace missing on either side of the "<", since " people tend to put spaces around "less than" " * It comes after "enum", "for", "any", "all", or "none" " * It's the first or last thing on a line (ignoring whitespace) " * It's preceded by "= " " " It never matches when: " " * Preceded by [<+~=] (e.g. <>, =<$foo>) " * Followed by [-=] (e.g. <--, <=, <==) syn region p6StringAngle \ matchgroup=p6Quote \ start="\%(\<\%(enum\|for\|any\|all\|none\)\>\s*(\?\s*\)\@<=<\%(<\|=>\|[-=]\{1,2}>\@!\)\@!" \ start="\%(\s\|[<+~=]\)\@\|[-=]\{1,2}>\@!\)\@!" \ start="[<+~=]\@\|[-=]\{1,2}>\@!\)\@!" \ start="\%(^\s*\)\@<=<\%(<\|=>\|[-=]\{1,2}>\@!\)\@!" \ start="[<+~=]\@\|[-=]\{1,2}>\@!\)\@!" \ skip="\\\@" \ end=">" \ contains=p6InnerAnglesOne,p6EscBackSlash,p6EscCloseAngle syn region p6InnerAnglesOne \ matchgroup=p6StringAngle \ start="<" \ skip="\\\@" \ end=">" \ transparent \ contained \ contains=p6InnerAnglesOne " <> syn region p6StringAngles \ matchgroup=p6Quote \ start="<<=\@!" \ skip="\\\@" \ end=">>" \ contains=p6InnerAnglesTwo,@p6Interp_qq,p6Comment,p6EscHash,p6EscCloseAngle,p6Adverb,p6StringSQ,p6StringDQ syn region p6InnerAnglesTwo \ matchgroup=p6StringAngles \ start="<<" \ skip="\\\@" \ end=">>" \ transparent \ contained \ contains=p6InnerAnglesTwo " «words» syn region p6StringFrench \ matchgroup=p6Quote \ start="«" \ skip="\\\@" nextgroup=p6QPairs skipwhite skipempty syn match p6QPairs contained transparent skipwhite skipempty nextgroup=p6StringQ,p6StringQ_PIR "\%(\_s*:!\?\K\%(\k\|[-']\K\@=\)*\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\?\)*" if exists("perl6_embedded_pir") syn include @p6PIR syntax/pir.vim endif " hardcoded set of delimiters let s:delims = [ \ ["\\\"", "\\\"", "p6EscDoubleQuote", "\\\\\\@", "p6EscCloseAngle", "\\%(\\\\\\@\\|<[^>]*>\\)"], \ ["«", "»", "p6EscCloseFrench", "\\%(\\\\\\@>", "p6EscCloseAngle", "\\%(\\\\\\@>\\|<<\\%([^>]\\|>>\\@!\\)*>>\\)"]) call add(s:delims, ["\\s\\@<=<<<", ">>>", "p6EscCloseAngle", "\\%(\\\\\\@>>\\|<<<\\%([^>]\\|>\\%(>>\\)\\@!\\)*>>>\\)"]) endif if !exists("perl6_extended_q") && !exists("perl6_extended_all") " simple version, no special highlighting within the string for [start_delim, end_delim, end_group, skip] in s:delims exec "syn region p6StringQ matchgroup=p6Quote start=\"".start_delim."\" skip=\"".skip."\" end=\"".end_delim."\" contains=".end_group." contained" endfor if exists("perl6_embedded_pir") " highlight embedded PIR code for [start_delim, end_delim, end_group, skip] in s:delims exec "syn region p6StringQ_PIR matchgroup=p6Quote start=\"\\%(Q\\s*:PIR\\s*\\)\\@<=".start_delim."\" skip=\"".skip."\" end=\"".end_delim."\" contains=@p6PIR,".end_group." contained" endfor endif else let s:before = "syn region p6StringQ matchgroup=p6Quote start=\"\\%(" let s:after = "\\%(\\_s*:!\\?\\K\\%(\\k\\|[-']\\K\\@=\\)*\\%(([^)]*)\\|\\[[^\\]]*]\\|<[^>]*>\\|«[^»]*»\\|{[^}]*}\\)\\?\\)*\\_s*\\)\\@<=" let s:adverbs = [ \ ["s", "scalar"], \ ["a", "array"], \ ["h", "hash"], \ ["f", "function"], \ ["c", "closure"], \ ["b", "backslash"], \ ["w", "words"], \ ["ww", "quotewords"], \ ["x", "exec"], \ ] " these can't be conjoined with q and qq (e.g. as qqq and qqqq) let s:q_adverbs = [ \ ["q", "single"], \ ["qq", "double"], \ ] for [start_delim, end_delim, end_group, skip] in s:delims " Q, q, and qq with any number of (ignored) adverbs exec s:before ."Q". s:after .start_delim."\" end=\"". end_delim ."\""." contained" exec s:before ."q". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_q"." contained" exec s:before ."qq". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_qq"." contained" for [short, long] in s:adverbs " Qs, qs, qqs, Qa, qa, qqa, etc, with ignored adverbs exec s:before ."Q".short. s:after .start_delim ."\" end=\"". end_delim ."\" contains=@p6Interp_".long." contained" exec s:before ."q".short. s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_q,@p6Interp_".long." contained" exec s:before ."qq".short. s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_qq,@p6Interp_".long." contained" " Q, q, and qq, with one significant adverb exec s:before ."Q\\s*:\\%(".short."\\|".long."\\)". s:after .start_delim ."\" end=\"". end_delim ."\" contains=@p6Interp_".long." contained" for [q_short, q_long] in s:q_adverbs exec s:before ."Q\\s*:\\%(".q_short."\\|".q_long."\\)". s:after .start_delim ."\" end=\"". end_delim ."\" contains=@p6Interp_".q_long." contained" endfor exec s:before ."q\\s*:\\%(".short."\\|".long."\\)". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_q,@p6Interp_".long." contained" exec s:before ."qq\\s*:\\%(".short."\\|".long."\\)". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_qq,@p6Interp_".long." contained" for [short2, long2] in s:adverbs " Qs, qs, qqs, Qa, qa, qqa, etc, with one significant adverb exec s:before ."Q".short."\\s*:\\%(".short2."\\|".long2."\\)". s:after .start_delim ."\" end=\"". end_delim ."\" contains=@p6Interp_".long.",@p6Interp_".long2." contained" for [q_short2, q_long2] in s:q_adverbs exec s:before ."Q".short."\\s*:\\%(".q_short2."\\|".q_long2."\\)". s:after .start_delim ."\" end=\"". end_delim ."\" contains=@p6Interp_".long.",@p6Interp_".q_long2." contained" endfor exec s:before ."q".short."\\s*:\\%(".short2."\\|".long2."\\)". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_q,@p6Interp_".long.",@p6Interp_".long2." contained" exec s:before ."qq".short."\\s*:\\%(".short2."\\|".long2."\\)". s:after .start_delim ."\" skip=\"". skip ."\" end=\"". end_delim ."\" contains=". end_group .",@p6Interp_qq,@p6Interp_".long.",@p6Interp_".long2." contained" endfor endfor endfor unlet s:before s:after s:adverbs s:q_adverbs endif unlet s:delims " Match these so something else above can't. E.g. the "q" in "role q { }" " should not be considered a string syn match p6Normal display "\%(\<\%(role\|grammar\|slang\)\s\+\)\@<=\K\%(\k\|[-']\K\@=\)*" " :key syn match p6Operator display ":\@ and p5=> autoquoting syn match p6StringP5Auto display "\K\%(\k\|[-']\K\@=\)*\ze\s\+p5=>" syn match p6StringAuto display "\K\%(\k\|[-']\K\@=\)*\ze\%(p5\)\@" syn match p6StringAuto display "\K\%(\k\|[-']\K\@=\)*\ze\s\+=>" syn match p6StringAuto display "\K\%(\k\|[-']\K\@=\)*p5\ze=>" " Hyperoperators. Needs to come after the quoting operators (<>, «», etc) exec "syn match p6HyperOp display \"»" .s:infix."»\\?\"" exec "syn match p6HyperOp display \"«\\?".s:infix."«\"" exec "syn match p6HyperOp display \"»" .s:infix."«\"" exec "syn match p6HyperOp display \"«" .s:infix. "»\"" exec "syn match p6HyperOp display \">>" .s:infix."\\%(>>\\)\\?\"" exec "syn match p6HyperOp display \"\\%(<<\\)\\?".s:infix."<<\"" exec "syn match p6HyperOp display \">>" .s:infix."<<\"" exec "syn match p6HyperOp display \"<<" .s:infix.">>\"" unlet s:infix " Regexes and grammars syn match p6RegexName display "\%(\<\%(regex\|rule\|token\)\s\+\)\@<=\K\%(\k\|[-']\K\@=\)*" nextgroup=p6RegexBlockCrap skipwhite skipempty syn match p6RegexBlockCrap "[^{]*" nextgroup=p6RegexBlock skipwhite skipempty transparent contained syn region p6RegexBlock \ matchgroup=p6Normal \ start="{" \ end="}" \ contained \ contains=@p6Regexen,@p6Variables " Perl 6 regex bits syn cluster p6Regexen \ add=p6RxMeta \ add=p6RxEscape \ add=p6EscHex \ add=p6EscOct \ add=p6EscNull \ add=p6RxAnchor \ add=p6RxCapture \ add=p6RxGroup \ add=p6RxAlternation \ add=p6RxAdverb \ add=p6RxAdverbArg \ add=p6RxStorage \ add=p6RxAssertion \ add=p6RxQuoteWords \ add=p6RxClosure \ add=p6RxStringSQ \ add=p6RxStringDQ \ add=p6Comment syn match p6RxMeta display contained ".\%(\k\|\s\)\@" \ contained \ contains=@p6Regexen,@p6Variables,p6RxCharClass,p6RxAssertCall syn region p6RxAssertCall \ matchgroup=p6Normal \ start="\%(::\|\%(\K\%(\k\|[-']\K\@=\)*\)\)\@<=(\@=" \ end=")\@<=" \ contained \ contains=TOP syn region p6RxCharClass \ matchgroup=p6StringSpecial2 \ start="\%(<[-!+?]\?\)\@<=\[" \ skip="\\]" \ end="]" \ contained \ contains=p6RxRange,p6RxEscape,p6EscHex,p6EscOct,p6EscNull syn region p6RxQuoteWords \ matchgroup=p6StringSpecial2 \ start="< " \ end=">" \ contained syn region p6RxAdverb \ start="\ze\z(:!\?\K\%(\k\|[-']\K\@=\)*\)" \ end="\z1\zs" \ contained \ contains=TOP \ keepend syn region p6RxAdverbArg \ start="\%(:!\?\K\%(\k\|[-']\K\@=\)*\)\@<=(" \ skip="([^)]*)" \ end=")" \ contained \ contains=TOP syn region p6RxStorage \ matchgroup=p6Operator \ start="\%(^\s*\)\@<=:\%(my\>\|temp\>\)\@=" \ end="$" \ contains=TOP \ contained " Perl 5 regex bits syn cluster p6RegexP5Base \ add=p6RxP5Escape \ add=p6RxP5Oct \ add=p6RxP5Hex \ add=p6RxP5EscMeta \ add=p6RxP5CodePoint \ add=p6RxP5Prop " normal regex stuff syn cluster p6RegexP5 \ add=@p6RegexP5Base \ add=p6RxP5Quantifier \ add=p6RxP5Meta \ add=p6RxP5QuoteMeta \ add=p6RxP5ParenMod \ add=p6RxP5Verb \ add=p6RxP5Count \ add=p6RxP5Named \ add=p6RxP5ReadRef \ add=p6RxP5WriteRef \ add=p6RxP5CharClass \ add=p6RxP5Anchor " inside character classes syn cluster p6RegexP5Class \ add=@p6RegexP5Base \ add=p6RxP5Posix \ add=p6RxP5Range syn match p6RxP5Escape display contained "\\\S" syn match p6RxP5CodePoint display contained "\\c\S\@=" nextgroup=p6RxP5CPId syn match p6RxP5CPId display contained "\S" syn match p6RxP5Oct display contained "\\\%(\o\{1,3}\)\@=" nextgroup=p6RxP5OctSeq syn match p6RxP5OctSeq display contained "\o\{1,3}" syn match p6RxP5Anchor display contained "[\^$]" syn match p6RxP5Hex display contained "\\x\%({\x\+}\|\x\{1,2}\)\@=" nextgroup=p6RxP5HexSeq syn match p6RxP5HexSeq display contained "\x\{1,2}" syn region p6RxP5HexSeq \ matchgroup=p6RxP5Escape \ start="{" \ end="}" \ contained syn region p6RxP5Named \ matchgroup=p6RxP5Escape \ start="\%(\\N\)\@<={" \ end="}" \ contained syn match p6RxP5Quantifier display contained "\%([+*]\|(\@" \ contained syn match p6RxP5WriteRef display contained "\\g\%(\d\|{\)\@=" nextgroup=p6RxP5WriteRefId syn match p6RxP5WriteRefId display contained "\d\+" syn region p6RxP5WriteRefId \ matchgroup=p6RxP5Escape \ start="{" \ end="}" \ contained syn match p6RxP5Prop display contained "\\[pP]\%(\a\|{\)\@=" nextgroup=p6RxP5PropId syn match p6RxP5PropId display contained "\a" syn region p6RxP5PropId \ matchgroup=p6RxP5Escape \ start="{" \ end="}" \ contained syn match p6RxP5Meta display contained "[(|).]" syn match p6RxP5ParenMod display contained "(\@<=?\@=" nextgroup=p6RxP5Mod,p6RxP5ModName,p6RxP5Code syn match p6RxP5Mod display contained "?\%(<\?=\|<\?!\|[#:|]\)" syn match p6RxP5Mod display contained "?-\?[impsx]\+" syn match p6RxP5Mod display contained "?\%([-+]\?\d\+\|R\)" syn match p6RxP5Mod display contained "?(DEFINE)" syn match p6RxP5Mod display contained "?\%(&\|P[>=]\)" nextgroup=p6RxP5ModDef syn match p6RxP5ModDef display contained "\h\w*" syn region p6RxP5ModName \ matchgroup=p6StringSpecial \ start="?'" \ end="'" \ contained syn region p6RxP5ModName \ matchgroup=p6StringSpecial \ start="?P\?<" \ end=">" \ contained syn region p6RxP5Code \ matchgroup=p6StringSpecial \ start="??\?{" \ end="})\@=" \ contained \ contains=TOP syn match p6RxP5EscMeta display contained "\\[?*.{}()[\]|\^$]" syn match p6RxP5Count display contained "\%({\d\+\%(,\%(\d\+\)\?\)\?}\)\@=" nextgroup=p6RxP5CountId syn region p6RxP5CountId \ matchgroup=p6RxP5Escape \ start="{" \ end="}" \ contained syn match p6RxP5Verb display contained "(\@<=\*\%(\%(PRUNE\|SKIP\|THEN\)\%(:[^)]*\)\?\|\%(MARK\|\):[^)]*\|COMMIT\|F\%(AIL\)\?\|ACCEPT\)" syn region p6RxP5QuoteMeta \ matchgroup=p6RxP5Escape \ start="\\Q" \ end="\\E" \ contained \ contains=@p6Variables,p6EscBackSlash syn region p6RxP5CharClass \ matchgroup=p6StringSpecial \ start="\[\^\?" \ skip="\\]" \ end="]" \ contained \ contains=@p6RegexP5Class syn region p6RxP5Posix \ matchgroup=p6RxP5Escape \ start="\[:" \ end=":]" \ contained syn match p6RxP5Range display contained "-" " 'string' inside a regex syn region p6RxStringSQ \ matchgroup=p6Quote \ start="'" \ skip="\\\@, mm, rx syn region p6Match \ matchgroup=p6Quote \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@\@!>\@!" \ skip="\\>" \ end=">" \ contains=@p6Regexen,@p6Variables " m«foo», mm«foo», rx«foo» syn region p6Match \ matchgroup=p6Quote \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@ syn region p6Match \ matchgroup=p6Quote \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@\@!" \ skip="\\>" \ end=">" \ contains=@p6Regexen,@p6Variables " s«foo» syn region p6Match \ matchgroup=p6Quote \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@ syn region p6Match \ matchgroup=p6Quote \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@\@!" \ skip="\\>" \ end=">" \ contains=@p6RegexP5,p6Variables " m:P5«» syn region p6Match \ matchgroup=p6Quote \ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@]*>" \ end=">" \ matchgroup=p6Error \ start="^#<" \ contains=p6Attention,p6Comment syn region p6Comment \ matchgroup=p6Comment \ start="^\@]\|>>\@!\)*>>" \ end=">>" \ matchgroup=p6Error \ start="^#<<" \ contains=p6Attention,p6Comment syn region p6Comment \ matchgroup=p6Comment \ start="^\@]\|>\%(>>\)\@!\)*>>>" \ end=">>>" \ matchgroup=p6Error \ start="^#<<<" \ contains=p6Attention,p6Comment syn region p6Comment \ matchgroup=p6Comment \ start="^\@" \ end="^\ze\%(\s*$\|=\K\)" \ contains=p6PodAbbrCodeType \ keepend syn region p6PodAbbrCodeType \ matchgroup=p6PodType \ start="\K\k*" \ end="^\ze\%(\s*$\|=\K\)" \ contained \ contains=p6PodName,p6PodAbbrCode syn region p6PodAbbrCode \ start="^" \ end="^\ze\%(\s*$\|=\K\)" \ contained " Abbreviated blocks (everything is a comment) syn region p6PodAbbrRegion \ matchgroup=p6PodPrefix \ start="^=\zecomment\>" \ end="^\ze\%(\s*$\|=\K\)" \ contains=p6PodAbbrCommentType \ keepend syn region p6PodAbbrCommentType \ matchgroup=p6PodType \ start="\K\k*" \ end="^\ze\%(\s*$\|=\K\)" \ contained \ contains=p6PodComment,p6PodAbbrNoCode " Abbreviated blocks (implicit code allowed) syn region p6PodAbbrRegion \ matchgroup=p6PodPrefix \ start="^=\ze\%(pod\|item\|nested\|\u\+\)\>" \ end="^\ze\%(\s*$\|=\K\)" \ contains=p6PodAbbrType \ keepend syn region p6PodAbbrType \ matchgroup=p6PodType \ start="\K\k*" \ end="^\ze\%(\s*$\|=\K\)" \ contained \ contains=p6PodName,p6PodAbbr syn region p6PodAbbr \ start="^" \ end="^\ze\%(\s*$\|=\K\)" \ contained \ contains=@p6PodFormat,p6PodImplicitCode " Abbreviated block to end-of-file syn region p6PodAbbrRegion \ matchgroup=p6PodPrefix \ start="^=\zeEND\>" \ end="\%$" \ contains=p6PodAbbrEOFType \ keepend syn region p6PodAbbrEOFType \ matchgroup=p6PodType \ start="\K\k*" \ end="\%$" \ contained \ contains=p6PodName,p6PodAbbrEOF syn region p6PodAbbrEOF \ start="^" \ end="\%$" \ contained \ contains=@p6PodNestedBlocks,@p6PodFormat,p6PodImplicitCode " Directives syn region p6PodDirectRegion \ matchgroup=p6PodPrefix \ start="^=\%(config\|use\)\>" \ end="^\ze\%([^=]\|=\K\|\s*$\)" \ contains=p6PodDirectArgRegion \ keepend syn region p6PodDirectArgRegion \ matchgroup=p6PodType \ start="\S\+" \ end="^\ze\%([^=]\|=\K\|\s*$\)" \ contained \ contains=p6PodDirectConfigRegion syn region p6PodDirectConfigRegion \ start="" \ end="^\ze\%([^=]\|=\K\|\s*$\)" \ contained \ contains=@p6PodConfig " =encoding is a special directive syn region p6PodDirectRegion \ matchgroup=p6PodPrefix \ start="^=encoding\>" \ end="^\ze\%([^=]\|=\K\|\s*$\)" \ contains=p6PodEncodingArgRegion \ keepend syn region p6PodEncodingArgRegion \ matchgroup=p6PodName \ start="\S\+" \ end="^\ze\%([^=]\|=\K\|\s*$\)" \ contained " Paragraph blocks (implicit code forbidden) syn region p6PodParaRegion \ matchgroup=p6PodPrefix \ start="^=for\>" \ end="^\ze\%(\s*$\|=\K\)" \ contains=p6PodParaNoCodeTypeRegion \ keepend \ extend syn region p6PodParaNoCodeTypeRegion \ matchgroup=p6PodType \ start="\K\k*" \ end="^\ze\%(\s*$\|=\K\)" \ contained \ contains=p6PodParaNoCode,p6PodParaConfigRegion syn region p6PodParaConfigRegion \ start="" \ end="^\ze\%([^=]\|=\k\@\ze\s*code\>" \ end="^\ze\%(\s*$\|=\K\)" \ contains=p6PodParaCodeTypeRegion \ keepend \ extend syn region p6PodParaCodeTypeRegion \ matchgroup=p6PodType \ start="\K\k*" \ end="^\ze\%(\s*$\|=\K\)" \ contained \ contains=p6PodParaCode,p6PodParaConfigRegion syn region p6PodParaCode \ start="^[^=]" \ end="^\ze\%(\s*$\|=\K\)" \ contained " Paragraph blocks (implicit code allowed) syn region p6PodParaRegion \ matchgroup=p6PodPrefix \ start="^=for\>\ze\s*\%(pod\|item\|nested\|\u\+\)\>" \ end="^\ze\%(\s*$\|=\K\)" \ contains=p6PodParaTypeRegion \ keepend \ extend syn region p6PodParaTypeRegion \ matchgroup=p6PodType \ start="\K\k*" \ end="^\ze\%(\s*$\|=\K\)" \ contained \ contains=p6PodPara,p6PodParaConfigRegion syn region p6PodPara \ start="^[^=]" \ end="^\ze\%(\s*$\|=\K\)" \ contained \ contains=@p6PodFormat,p6PodImplicitCode " Paragraph block to end-of-file syn region p6PodParaRegion \ matchgroup=p6PodPrefix \ start="^=for\>\ze\s\+END\>" \ end="\%$" \ contains=p6PodParaEOFTypeRegion \ keepend \ extend syn region p6PodParaEOFTypeRegion \ matchgroup=p6PodType \ start="\K\k*" \ end="\%$" \ contained \ contains=p6PodParaEOF,p6PodParaConfigRegion syn region p6PodParaEOF \ start="^[^=]" \ end="\%$" \ contained \ contains=@p6PodNestedBlocks,@p6PodFormat,p6PodImplicitCode " Delimited blocks (implicit code forbidden) syn region p6PodDelimRegion \ matchgroup=p6PodPrefix \ start="^=begin\>" \ end="^=end\>" \ contains=p6PodDelimNoCodeTypeRegion \ keepend \ extend syn region p6PodDelimNoCodeTypeRegion \ matchgroup=p6PodType \ start="\K\k*" \ end="^\ze=end\>" \ contained \ contains=p6PodDelimNoCode,p6PodDelimConfigRegion syn region p6PodDelimConfigRegion \ start="" \ end="^\ze\%([^=]\|=\K\|\s*$\)" \ contained \ contains=@p6PodConfig syn region p6PodDelimNoCode \ start="^" \ end="^\ze=end\>" \ contained \ contains=@p6PodNestedBlocks,@p6PodFormat " Delimited blocks (everything is code) syn region p6PodDelimRegion \ matchgroup=p6PodPrefix \ start="^=begin\>\ze\s*code\>" \ end="^=end\>" \ contains=p6PodDelimCodeTypeRegion \ keepend \ extend syn region p6PodDelimCodeTypeRegion \ matchgroup=p6PodType \ start="\K\k*" \ end="^\ze=end\>" \ contained \ contains=p6PodDelimCode,p6PodDelimConfigRegion syn region p6PodDelimCode \ start="^" \ end="^\ze=end\>" \ contained \ contains=@p6PodNestedBlocks " Delimited blocks (implicit code allowed) syn region p6PodDelimRegion \ matchgroup=p6PodPrefix \ start="^=begin\>\ze\s*\%(pod\|item\|nested\|\u\+\)\>" \ end="^=end\>" \ contains=p6PodDelimTypeRegion \ keepend \ extend syn region p6PodDelimTypeRegion \ matchgroup=p6PodType \ start="\K\k*" \ end="^\ze=end\>" \ contained \ contains=p6PodDelim,p6PodDelimConfigRegion syn region p6PodDelim \ start="^" \ end="^\ze=end\>" \ contained \ contains=@p6PodNestedBlocks,@p6PodFormat,p6PodImplicitCode " Delimited block to end-of-file syn region p6PodDelimRegion \ matchgroup=p6PodPrefix \ start="^=begin\>\ze\s\+END\>" \ end="\%$" \ contains=p6PodDelimEOFTypeRegion \ extend syn region p6PodDelimEOFTypeRegion \ matchgroup=p6PodType \ start="\K\k*" \ end="\%$" \ contained \ contains=p6PodDelimEOF,p6PodDelimConfigRegion syn region p6PodDelimEOF \ start="^" \ end="\%$" \ contained \ contains=@p6PodNestedBlocks,@p6PodFormat,p6PodImplicitCode syn cluster p6PodConfig \ add=p6PodConfigOperator \ add=p6PodExtraConfig \ add=p6StringAuto \ add=p6PodAutoQuote \ add=p6StringSQ syn region p6PodParens \ start="(" \ end=")" \ contained \ contains=p6Number,p6StringSQ syn match p6PodAutoQuote display contained "=>" syn match p6PodConfigOperator display contained ":!\?" nextgroup=p6PodConfigOption syn match p6PodConfigOption display contained "[^[:space:](<]\+" nextgroup=p6PodParens,p6StringAngle syn match p6PodExtraConfig display contained "^=" syn match p6PodVerticalBar display contained "|" syn match p6PodColon display contained ":" syn match p6PodSemicolon display contained ";" syn match p6PodComma display contained "," syn match p6PodImplicitCode display contained "^\s.*" syn region p6PodDelimEndRegion \ matchgroup=p6PodType \ start="\%(^=end\>\)\@<=" \ end="\K\k*" " These may appear inside delimited blocks syn cluster p6PodNestedBlocks \ add=p6PodAbbrRegion \ add=p6PodDirectRegion \ add=p6PodParaRegion \ add=p6PodDelimRegion \ add=p6PodDelimEndRegion " Pod formatting codes syn cluster p6PodFormat \ add=p6PodFormatOne \ add=p6PodFormatTwo \ add=p6PodFormatThree \ add=p6PodFormatFrench " Balanced angles found inside formatting codes. Ensures proper nesting. syn region p6PodFormatAnglesOne \ matchgroup=p6PodFormat \ start="<" \ skip="<[^>]*>" \ end=">" \ transparent \ contained \ contains=p6PodFormatAnglesFrench,p6PodFormatAnglesOne syn region p6PodFormatAnglesTwo \ matchgroup=p6PodFormat \ start="<<" \ skip="<<[^>]*>>" \ end=">>" \ transparent \ contained \ contains=p6PodFormatAnglesFrench,p6PodFormatAnglesOne,p6PodFormatAnglesTwo syn region p6PodFormatAnglesThree \ matchgroup=p6PodFormat \ start="<<<" \ skip="<<<[^>]*>>>" \ end=">>>" \ transparent \ contained \ contains=p6PodFormatAnglesFrench,p6PodFormatAnglesOne,p6PodFormatAnglesTwo,p6PodFormatAnglesThree syn region p6PodFormatAnglesFrench \ matchgroup=p6PodFormat \ start="«" \ skip="«[^»]*»" \ end="»" \ transparent \ contained \ contains=p6PodFormatAnglesFrench,p6PodFormatAnglesOne,p6PodFormatAnglesTwo,p6PodFormatAnglesThree " All formatting codes syn region p6PodFormatOne \ matchgroup=p6PodFormatCode \ start="\u<" \ skip="<[^>]*>" \ end=">" \ contained \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne syn region p6PodFormatTwo \ matchgroup=p6PodFormatCode \ start="\u<<" \ skip="<<[^>]*>>" \ end=">>" \ contained \ contains=p6PodFormatAnglesTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo syn region p6PodFormatThree \ matchgroup=p6PodFormatCode \ start="\u<<<" \ skip="<<<[^>]*>>>" \ end=">>>" \ contained \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree syn region p6PodFormatFrench \ matchgroup=p6PodFormatCode \ start="\u«" \ skip="«[^»]*»" \ end="»" \ contained \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree " C<> and V<> don't allow nested formatting formatting codes syn region p6PodFormatOne \ matchgroup=p6PodFormatCode \ start="[CV]<" \ skip="<[^>]*>" \ end=">" \ contained \ contains=p6PodFormatAnglesOne syn region p6PodFormatTwo \ matchgroup=p6PodFormatCode \ start="[CV]<<" \ skip="<<[^>]*>>" \ end=">>" \ contained \ contains=p6PodFormatAnglesTwo syn region p6PodFormatThree \ matchgroup=p6PodFormatCode \ start="[CV]<<<" \ skip="<<<[^>]*>>>" \ end=">>>" \ contained \ contains=p6PodFormatAnglesThree syn region p6PodFormatFrench \ matchgroup=p6PodFormatCode \ start="[CV]«" \ skip="«[^»]*»" \ end="»" \ contained \ contains=p6PodFormatAnglesFrench " L<> can have a "|" separator syn region p6PodFormatOne \ matchgroup=p6PodFormatCode \ start="L<" \ skip="<[^>]*>" \ end=">" \ contained \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne,p6PodVerticalBar syn region p6PodFormatTwo \ matchgroup=p6PodFormatCode \ start="L<<" \ skip="<<[^>]*>>" \ end=">>" \ contained \ contains=p6PodFormatAnglesTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodVerticalBar syn region p6PodFormatThree \ matchgroup=p6PodFormatCode \ start="L<<<" \ skip="<<<[^>]*>>>" \ end=">>>" \ contained \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar syn region p6PodFormatFrench \ matchgroup=p6PodFormatCode \ start="L«" \ skip="«[^»]*»" \ end="»" \ contained \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar " E<> can have a ";" separator syn region p6PodFormatOne \ matchgroup=p6PodFormatCode \ start="E<" \ skip="<[^>]*>" \ end=">" \ contained \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne,p6PodSemiColon syn region p6PodFormatTwo \ matchgroup=p6PodFormatCode \ start="E<<" \ skip="<<[^>]*>>" \ end=">>" \ contained \ contains=p6PodFormatAnglesTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodSemiColon syn region p6PodFormatThree \ matchgroup=p6PodFormatCode \ start="E<<<" \ skip="<<<[^>]*>>>" \ end=">>>" \ contained \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodSemiColon syn region p6PodFormatFrench \ matchgroup=p6PodFormatCode \ start="E«" \ skip="«[^»]*»" \ end="»" \ contained \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodSemiColon " M<> can have a ":" separator syn region p6PodFormatOne \ matchgroup=p6PodFormatCode \ start="M<" \ skip="<[^>]*>" \ end=">" \ contained \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne,p6PodColon syn region p6PodFormatTwo \ matchgroup=p6PodFormatCode \ start="M<<" \ skip="<<[^>]*>>" \ end=">>" \ contained \ contains=p6PodFormatAnglesTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodColon syn region p6PodFormatThree \ matchgroup=p6PodFormatCode \ start="M<<<" \ skip="<<<[^>]*>>>" \ end=">>>" \ contained \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodColon syn region p6PodFormatFrench \ matchgroup=p6PodFormatCode \ start="M«" \ skip="«[^»]*»" \ end="»" \ contained \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodColon " D<> can have "|" and ";" separators syn region p6PodFormatOne \ matchgroup=p6PodFormatCode \ start="D<" \ skip="<[^>]*>" \ end=">" \ contained \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne,p6PodVerticalBar,p6PodSemiColon syn region p6PodFormatTwo \ matchgroup=p6PodFormatCode \ start="D<<" \ skip="<<[^>]*>>" \ end=">>" \ contained \ contains=p6PodFormatAngleTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodVerticalBar,p6PodSemiColon syn region p6PodFormatThree \ matchgroup=p6PodFormatCode \ start="D<<<" \ skip="<<<[^>]*>>>" \ end=">>>" \ contained \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar,p6PodSemiColon syn region p6PodFormatFrench \ matchgroup=p6PodFormatCode \ start="D«" \ skip="«[^»]*»" \ end="»" \ contained \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar,p6PodSemiColon " X<> can have "|", "," and ";" separators syn region p6PodFormatOne \ matchgroup=p6PodFormatCode \ start="X<" \ skip="<[^>]*>" \ end=">" \ contained \ contains=p6PodFormatAnglesOne,p6PodFormatFrench,p6PodFormatOne,p6PodVerticalBar,p6PodSemiColon,p6PodComma syn region p6PodFormatTwo \ matchgroup=p6PodFormatCode \ start="X<<" \ skip="<<[^>]*>>" \ end=">>" \ contained \ contains=p6PodFormatAnglesTwo,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodVerticalBar,p6PodSemiColon,p6PodComma syn region p6PodFormatThree \ matchgroup=p6PodFormatCode \ start="X<<<" \ skip="<<<[^>]*>>>" \ end=">>>" \ contained \ contains=p6PodFormatAnglesThree,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar,p6PodSemiColon,p6PodComma syn region p6PodFormatFrench \ matchgroup=p6PodFormatCode \ start="X«" \ skip="«[^»]*»" \ end="»" \ contained \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar,p6PodSemiColon,p6PodComma " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link p6EscOctOld p6Error hi def link p6PackageTwigil p6Twigil hi def link p6StringAngle p6String hi def link p6StringFrench p6String hi def link p6StringAngles p6String hi def link p6StringSQ p6String hi def link p6StringDQ p6String hi def link p6StringQ p6String hi def link p6RxStringSQ p6String hi def link p6RxStringDQ p6String hi def link p6Substitution p6String hi def link p6Transliteration p6String hi def link p6StringAuto p6String hi def link p6StringP5Auto p6String hi def link p6Key p6String hi def link p6Match p6String hi def link p6RegexBlock p6String hi def link p6RxP5CharClass p6String hi def link p6RxP5QuoteMeta p6String hi def link p6RxCharClass p6String hi def link p6RxQuoteWords p6String hi def link p6ReduceOp p6Operator hi def link p6ReverseCrossOp p6Operator hi def link p6HyperOp p6Operator hi def link p6QuoteQ p6Operator hi def link p6RxRange p6StringSpecial hi def link p6RxAnchor p6StringSpecial hi def link p6RxP5Anchor p6StringSpecial hi def link p6CodePoint p6StringSpecial hi def link p6RxMeta p6StringSpecial hi def link p6RxP5Range p6StringSpecial hi def link p6RxP5CPId p6StringSpecial hi def link p6RxP5Posix p6StringSpecial hi def link p6RxP5Mod p6StringSpecial hi def link p6RxP5HexSeq p6StringSpecial hi def link p6RxP5OctSeq p6StringSpecial hi def link p6RxP5WriteRefId p6StringSpecial hi def link p6HexSequence p6StringSpecial hi def link p6OctSequence p6StringSpecial hi def link p6RxP5Named p6StringSpecial hi def link p6RxP5PropId p6StringSpecial hi def link p6RxP5Quantifier p6StringSpecial hi def link p6RxP5CountId p6StringSpecial hi def link p6RxP5Verb p6StringSpecial hi def link p6Escape p6StringSpecial2 hi def link p6EscNull p6StringSpecial2 hi def link p6EscHash p6StringSpecial2 hi def link p6EscQQ p6StringSpecial2 hi def link p6EscQuote p6StringSpecial2 hi def link p6EscDoubleQuote p6StringSpecial2 hi def link p6EscBackTick p6StringSpecial2 hi def link p6EscForwardSlash p6StringSpecial2 hi def link p6EscVerticalBar p6StringSpecial2 hi def link p6EscExclamation p6StringSpecial2 hi def link p6EscDollar p6StringSpecial2 hi def link p6EscOpenCurly p6StringSpecial2 hi def link p6EscCloseCurly p6StringSpecial2 hi def link p6EscCloseBracket p6StringSpecial2 hi def link p6EscCloseAngle p6StringSpecial2 hi def link p6EscCloseFrench p6StringSpecial2 hi def link p6EscBackSlash p6StringSpecial2 hi def link p6RxEscape p6StringSpecial2 hi def link p6RxCapture p6StringSpecial2 hi def link p6RxAlternation p6StringSpecial2 hi def link p6RxP5 p6StringSpecial2 hi def link p6RxP5ReadRef p6StringSpecial2 hi def link p6RxP5Oct p6StringSpecial2 hi def link p6RxP5Hex p6StringSpecial2 hi def link p6RxP5EscMeta p6StringSpecial2 hi def link p6RxP5Meta p6StringSpecial2 hi def link p6RxP5Escape p6StringSpecial2 hi def link p6RxP5CodePoint p6StringSpecial2 hi def link p6RxP5WriteRef p6StringSpecial2 hi def link p6RxP5Prop p6StringSpecial2 hi def link p6Property Tag hi def link p6Attention Todo hi def link p6Type Type hi def link p6Error Error hi def link p6BlockLabel Label hi def link p6Float Float hi def link p6Normal Normal hi def link p6Package Normal hi def link p6PackageScope Normal hi def link p6Number Number hi def link p6VersionNum Number hi def link p6String String hi def link p6Repeat Repeat hi def link p6Keyword Keyword hi def link p6Pragma Keyword hi def link p6Module Keyword hi def link p6DeclareRoutine Keyword hi def link p6VarStorage Special hi def link p6FlowControl Special hi def link p6NumberBase Special hi def link p6Twigil Special hi def link p6StringSpecial2 Special hi def link p6VersionDot Special hi def link p6Comment Comment hi def link p6Include Include hi def link p6Shebang PreProc hi def link p6ClosureTrait PreProc hi def link p6Routine Function hi def link p6Operator Operator hi def link p6Version Operator hi def link p6Context Operator hi def link p6Quote Delimiter hi def link p6TypeConstraint PreCondit hi def link p6Exception Exception hi def link p6Placeholder Identifier hi def link p6Variable Identifier hi def link p6VarSlash Identifier hi def link p6VarNum Identifier hi def link p6VarExclam Identifier hi def link p6VarMatch Identifier hi def link p6VarName Identifier hi def link p6MatchVar Identifier hi def link p6RxP5ReadRefId Identifier hi def link p6RxP5ModDef Identifier hi def link p6RxP5ModName Identifier hi def link p6Conditional Conditional hi def link p6StringSpecial SpecialChar hi def link p6PodAbbr p6Pod hi def link p6PodAbbrEOF p6Pod hi def link p6PodAbbrNoCode p6Pod hi def link p6PodAbbrCode p6PodCode hi def link p6PodPara p6Pod hi def link p6PodParaEOF p6Pod hi def link p6PodParaNoCode p6Pod hi def link p6PodParaCode p6PodCode hi def link p6PodDelim p6Pod hi def link p6PodDelimEOF p6Pod hi def link p6PodDelimNoCode p6Pod hi def link p6PodDelimCode p6PodCode hi def link p6PodImplicitCode p6PodCode hi def link p6PodExtraConfig p6PodPrefix hi def link p6PodVerticalBar p6PodFormatCode hi def link p6PodColon p6PodFormatCode hi def link p6PodSemicolon p6PodFormatCode hi def link p6PodComma p6PodFormatCode hi def link p6PodFormatOne p6PodFormat hi def link p6PodFormatTwo p6PodFormat hi def link p6PodFormatThree p6PodFormat hi def link p6PodFormatFrench p6PodFormat hi def link p6PodType Type hi def link p6PodConfigOption String hi def link p6PodCode PreProc hi def link p6Pod Comment hi def link p6PodComment Comment hi def link p6PodAutoQuote Operator hi def link p6PodConfigOperator Operator hi def link p6PodPrefix Statement hi def link p6PodName Identifier hi def link p6PodFormatCode SpecialChar hi def link p6PodFormat SpecialComment " Syncing to speed up processing "syn sync match p6SyncPod groupthere p6PodAbbrRegion "^=\K\k*\>" "syn sync match p6SyncPod groupthere p6PodDirectRegion "^=\%(config\|use\|encoding\)\>" "syn sync match p6SyncPod groupthere p6PodParaRegion "^=for\>" "syn sync match p6SyncPod groupthere p6PodDelimRegion "^=begin\>" "syn sync match p6SyncPod groupthere p6PodDelimEndRegion "^=end\>" " Let's just sync whole file, the other methods aren't reliable (or I don't " know how to use them reliably) syn sync fromstart setlocal foldmethod=syntax let b:current_syntax = "perl6" let &cpo = s:keepcpo unlet s:keepcpo " vim:ts=8:sts=4:sw=4:expandtab:ft=vim neovim-0.2.2/runtime/syntax/pf.vim000066400000000000000000000122561320401574200171470ustar00rootroot00000000000000" pf syntax file " Language: OpenBSD packet filter configuration (pf.conf) " Original Author: Camiel Dobbelaar " Maintainer: Lauri Tirkkonen " Last Change: 2016 Jul 06 if exists("b:current_syntax") finish endif setlocal foldmethod=syntax syn iskeyword @,48-57,_,-,+ syn sync fromstart syn cluster pfNotLS contains=pfTodo,pfVarAssign syn keyword pfCmd anchor antispoof block include match pass queue syn keyword pfCmd queue set table syn match pfCmd /^\s*load\sanchor\>/ syn keyword pfTodo TODO XXX contained syn keyword pfWildAddr all any syn match pfComment /#.*$/ contains=pfTodo syn match pfCont /\\$/ syn match pfErrClose /}/ syn match pfIPv4 /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ syn match pfIPv6 /[a-fA-F0-9:]*::[a-fA-F0-9:.]*/ syn match pfIPv6 /[a-fA-F0-9:]\+:[a-fA-F0-9:]\+:[a-fA-F0-9:.]\+/ syn match pfNetmask /\/\d\+/ syn match pfNum /[a-zA-Z0-9_:.]\@/ syn match pfVar /$[a-zA-Z][a-zA-Z0-9_]*/ syn match pfVarAssign /^\s*[a-zA-Z][a-zA-Z0-9_]*\s*=/me=e-1 syn region pfFold1 start=/^#\{1}>/ end=/^#\{1,3}>/me=s-1 transparent fold syn region pfFold2 start=/^#\{2}>/ end=/^#\{2,3}>/me=s-1 transparent fold syn region pfFold3 start=/^#\{3}>/ end=/^#\{3}>/me=s-1 transparent fold syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfNotLS syn region pfString start=/"/ skip=/\\"/ end=/"/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar syn region pfString start=/'/ skip=/\\'/ end=/'/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar syn keyword pfService 802-11-iapp Microsoft-SQL-Monitor syn keyword pfService Microsoft-SQL-Server NeXTStep NextStep syn keyword pfService afpovertcp afs3-bos afs3-callback afs3-errors syn keyword pfService afs3-fileserver afs3-kaserver afs3-prserver syn keyword pfService afs3-rmtsys afs3-update afs3-vlserver syn keyword pfService afs3-volser amt-redir-tcp amt-redir-tls syn keyword pfService amt-soap-http amt-soap-https asf-rmcp at-echo syn keyword pfService at-nbp at-rtmp at-zis auth authentication syn keyword pfService bfd-control bfd-echo bftp bgp bgpd biff bootpc syn keyword pfService bootps canna cddb cddbp chargen chat cmd syn keyword pfService cmip-agent cmip-man comsat conference syn keyword pfService conserver courier csnet-ns cso-ns cvspserver syn keyword pfService daap datametrics daytime dhcpd-sync syn keyword pfService dhcpv6-client dhcpv6-server discard domain syn keyword pfService echo efs eklogin ekshell ekshell2 epmap eppc syn keyword pfService exec finger ftp ftp-data git gopher hostname syn keyword pfService hostnames hprop http https hunt hylafax iapp syn keyword pfService icb ident imap imap2 imap3 imaps ingreslock syn keyword pfService ipp iprop ipsec-msft ipsec-nat-t ipx irc syn keyword pfService isakmp iscsi isisd iso-tsap kauth kdc kerberos syn keyword pfService kerberos-adm kerberos-iv kerberos-sec syn keyword pfService kerberos_master kf kip klogin kpasswd kpop syn keyword pfService krb524 krb_prop krbupdate krcmd kreg kshell kx syn keyword pfService l2tp ldap ldaps ldp link login mail mdns syn keyword pfService mdnsresponder microsoft-ds ms-sql-m ms-sql-s syn keyword pfService msa msp mtp mysql name nameserver netbios-dgm syn keyword pfService netbios-ns netbios-ssn netnews netplan netrjs syn keyword pfService netstat netwall newdate nextstep nfs nfsd syn keyword pfService nicname nnsp nntp ntalk ntp null openwebnet syn keyword pfService ospf6d ospfapi ospfd photuris pop2 pop3 pop3pw syn keyword pfService pop3s poppassd portmap postgresql postoffice syn keyword pfService pptp presence printer prospero prospero-np syn keyword pfService puppet pwdgen qotd quote radacct radius syn keyword pfService radius-acct rdp readnews remotefs resource rfb syn keyword pfService rfe rfs rfs_server ripd ripng rje rkinit rlp syn keyword pfService routed router rpc rpcbind rsync rtelnet rtsp syn keyword pfService sa-msg-port sane-port sftp shell sieve silc syn keyword pfService sink sip smtp smtps smux snmp snmp-trap syn keyword pfService snmptrap snpp socks source spamd spamd-cfg syn keyword pfService spamd-sync spooler spop3 ssdp ssh submission syn keyword pfService sunrpc supdup supfiledbg supfilesrv support syn keyword pfService svn svrloc swat syslog syslog-tls systat syn keyword pfService tacacs tacas+ talk tap tcpmux telnet tempo syn keyword pfService tftp time timed timeserver timserver tsap syn keyword pfService ttylink ttytst ub-dns-control ulistserv untp syn keyword pfService usenet users uucp uucp-path uucpd vnc vxlan syn keyword pfService wais webster who whod whois www x400 x400-snd syn keyword pfService xcept xdmcp xmpp-bosh xmpp-client xmpp-server syn keyword pfService z3950 zabbix-agent zabbix-trapper zebra syn keyword pfService zebrasrv hi def link pfCmd Statement hi def link pfComment Comment hi def link pfCont Statement hi def link pfErrClose Error hi def link pfIPv4 Type hi def link pfIPv6 Type hi def link pfNetmask Constant hi def link pfNum Constant hi def link pfService Constant hi def link pfString String hi def link pfTable Identifier hi def link pfTodo Todo hi def link pfVar Identifier hi def link pfVarAssign Identifier hi def link pfWildAddr Type let b:current_syntax = "pf" neovim-0.2.2/runtime/syntax/pfmain.vim000066400000000000000000002651011320401574200200130ustar00rootroot00000000000000" Vim syntax file " Language: Postfix main.cf configuration " Maintainer: KELEMEN Peter " Last Updates: Anton Shestakov, Hong Xu " Last Change: 2015 Feb 10 " Version: 0.40 " URL: http://cern.ch/fuji/vim/syntax/pfmain.vim " Comment: Based on Postfix 2.12/3.0 postconf.5.html. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword=@,48-57,_,- syntax case match syntax sync minlines=1 syntax keyword pfmainConf 2bounce_notice_recipient syntax keyword pfmainConf access_map_defer_code syntax keyword pfmainConf access_map_reject_code syntax keyword pfmainConf address_verify_cache_cleanup_interval syntax keyword pfmainConf address_verify_default_transport syntax keyword pfmainConf address_verify_local_transport syntax keyword pfmainConf address_verify_map syntax keyword pfmainConf address_verify_negative_cache syntax keyword pfmainConf address_verify_negative_expire_time syntax keyword pfmainConf address_verify_negative_refresh_time syntax keyword pfmainConf address_verify_poll_count syntax keyword pfmainConf address_verify_poll_delay syntax keyword pfmainConf address_verify_positive_expire_time syntax keyword pfmainConf address_verify_positive_refresh_time syntax keyword pfmainConf address_verify_relay_transport syntax keyword pfmainConf address_verify_relayhost syntax keyword pfmainConf address_verify_sender syntax keyword pfmainConf address_verify_sender_dependent_default_transport_maps syntax keyword pfmainConf address_verify_sender_dependent_relayhost_maps syntax keyword pfmainConf address_verify_sender_ttl syntax keyword pfmainConf address_verify_service_name syntax keyword pfmainConf address_verify_transport_maps syntax keyword pfmainConf address_verify_virtual_transport syntax keyword pfmainConf alias_database syntax keyword pfmainConf alias_maps syntax keyword pfmainConf allow_mail_to_commands syntax keyword pfmainConf allow_mail_to_files syntax keyword pfmainConf allow_min_user syntax keyword pfmainConf allow_percent_hack syntax keyword pfmainConf allow_untrusted_routing syntax keyword pfmainConf alternate_config_directories syntax keyword pfmainConf always_add_missing_headers syntax keyword pfmainConf always_bcc syntax keyword pfmainConf anvil_rate_time_unit syntax keyword pfmainConf anvil_status_update_time syntax keyword pfmainConf append_at_myorigin syntax keyword pfmainConf append_dot_mydomain syntax keyword pfmainConf application_event_drain_time syntax keyword pfmainConf authorized_flush_users syntax keyword pfmainConf authorized_mailq_users syntax keyword pfmainConf authorized_submit_users syntax keyword pfmainConf authorized_verp_clients syntax keyword pfmainConf backwards_bounce_logfile_compatibility syntax keyword pfmainConf berkeley_db_create_buffer_size syntax keyword pfmainConf berkeley_db_read_buffer_size syntax keyword pfmainConf best_mx_transport syntax keyword pfmainConf biff syntax keyword pfmainConf body_checks syntax keyword pfmainConf body_checks_size_limit syntax keyword pfmainConf bounce_notice_recipient syntax keyword pfmainConf bounce_queue_lifetime syntax keyword pfmainConf bounce_service_name syntax keyword pfmainConf bounce_size_limit syntax keyword pfmainConf bounce_template_file syntax keyword pfmainConf broken_sasl_auth_clients syntax keyword pfmainConf canonical_classes syntax keyword pfmainConf canonical_maps syntax keyword pfmainConf cleanup_service_name syntax keyword pfmainConf command_directory syntax keyword pfmainConf command_execution_directory syntax keyword pfmainConf command_expansion_filter syntax keyword pfmainConf command_time_limit syntax keyword pfmainConf compatibility_level syntax keyword pfmainConf config_directory syntax keyword pfmainConf confirm_delay_cleared syntax keyword pfmainConf connection_cache_protocol_timeout syntax keyword pfmainConf connection_cache_service_name syntax keyword pfmainConf connection_cache_status_update_time syntax keyword pfmainConf connection_cache_ttl_limit syntax keyword pfmainConf content_filter syntax keyword pfmainConf cyrus_sasl_config_path syntax keyword pfmainConf daemon_directory syntax keyword pfmainConf daemon_table_open_error_is_fatal syntax keyword pfmainConf daemon_timeout syntax keyword pfmainConf data_directory syntax keyword pfmainConf debug_peer_level syntax keyword pfmainConf debug_peer_list syntax keyword pfmainConf debugger_command syntax keyword pfmainConf default_database_type syntax keyword pfmainConf default_delivery_slot_cost syntax keyword pfmainConf default_delivery_slot_discount syntax keyword pfmainConf default_delivery_slot_loan syntax keyword pfmainConf default_delivery_status_filter syntax keyword pfmainConf default_destination_concurrency_failed_cohort_limit syntax keyword pfmainConf default_destination_concurrency_limit syntax keyword pfmainConf default_destination_concurrency_negative_feedback syntax keyword pfmainConf default_destination_concurrency_positive_feedback syntax keyword pfmainConf default_destination_rate_delay syntax keyword pfmainConf default_destination_recipient_limit syntax keyword pfmainConf default_extra_recipient_limit syntax keyword pfmainConf default_filter_nexthop syntax keyword pfmainConf default_minimum_delivery_slots syntax keyword pfmainConf default_privs syntax keyword pfmainConf default_process_limit syntax keyword pfmainConf default_rbl_reply syntax keyword pfmainConf default_recipient_limit syntax keyword pfmainConf default_recipient_refill_delay syntax keyword pfmainConf default_recipient_refill_limit syntax keyword pfmainConf default_transport syntax keyword pfmainConf default_verp_delimiters syntax keyword pfmainConf defer_code syntax keyword pfmainConf defer_service_name syntax keyword pfmainConf defer_transports syntax keyword pfmainConf delay_logging_resolution_limit syntax keyword pfmainConf delay_notice_recipient syntax keyword pfmainConf delay_warning_time syntax keyword pfmainConf deliver_lock_attempts syntax keyword pfmainConf deliver_lock_delay syntax keyword pfmainConf destination_concurrency_feedback_debug syntax keyword pfmainConf detect_8bit_encoding_header syntax keyword pfmainConf disable_dns_lookups syntax keyword pfmainConf disable_mime_input_processing syntax keyword pfmainConf disable_mime_output_conversion syntax keyword pfmainConf disable_verp_bounces syntax keyword pfmainConf disable_vrfy_command syntax keyword pfmainConf dnsblog_reply_delay syntax keyword pfmainConf dnsblog_service_name syntax keyword pfmainConf dont_remove syntax keyword pfmainConf double_bounce_sender syntax keyword pfmainConf duplicate_filter_limit syntax keyword pfmainConf empty_address_default_transport_maps_lookup_key syntax keyword pfmainConf empty_address_recipient syntax keyword pfmainConf empty_address_relayhost_maps_lookup_key syntax keyword pfmainConf enable_errors_to syntax keyword pfmainConf enable_long_queue_ids syntax keyword pfmainConf enable_original_recipient syntax keyword pfmainConf error_notice_recipient syntax keyword pfmainConf error_service_name syntax keyword pfmainConf execution_directory_expansion_filter syntax keyword pfmainConf expand_owner_alias syntax keyword pfmainConf export_environment syntax keyword pfmainConf extract_recipient_limit syntax keyword pfmainConf fallback_relay syntax keyword pfmainConf fallback_transport syntax keyword pfmainConf fallback_transport_maps syntax keyword pfmainConf fast_flush_domains syntax keyword pfmainConf fast_flush_purge_time syntax keyword pfmainConf fast_flush_refresh_time syntax keyword pfmainConf fault_injection_code syntax keyword pfmainConf flush_service_name syntax keyword pfmainConf fork_attempts syntax keyword pfmainConf fork_delay syntax keyword pfmainConf forward_expansion_filter syntax keyword pfmainConf forward_path syntax keyword pfmainConf frozen_delivered_to syntax keyword pfmainConf hash_queue_depth syntax keyword pfmainConf hash_queue_names syntax keyword pfmainConf header_address_token_limit syntax keyword pfmainConf header_checks syntax keyword pfmainConf header_size_limit syntax keyword pfmainConf helpful_warnings syntax keyword pfmainConf home_mailbox syntax keyword pfmainConf hopcount_limit syntax keyword pfmainConf html_directory syntax keyword pfmainConf ignore_mx_lookup_error syntax keyword pfmainConf import_environment syntax keyword pfmainConf in_flow_delay syntax keyword pfmainConf inet_interfaces syntax keyword pfmainConf inet_protocols syntax keyword pfmainConf initial_destination_concurrency syntax keyword pfmainConf internal_mail_filter_classes syntax keyword pfmainConf invalid_hostname_reject_code syntax keyword pfmainConf ipc_idle syntax keyword pfmainConf ipc_timeout syntax keyword pfmainConf ipc_ttl syntax keyword pfmainConf line_length_limit syntax keyword pfmainConf lmdb_map_size syntax keyword pfmainConf lmtp_address_preference syntax keyword pfmainConf lmtp_address_verify_target syntax keyword pfmainConf lmtp_assume_final syntax keyword pfmainConf lmtp_bind_address syntax keyword pfmainConf lmtp_bind_address6 syntax keyword pfmainConf lmtp_body_checks syntax keyword pfmainConf lmtp_cache_connection syntax keyword pfmainConf lmtp_cname_overrides_servername syntax keyword pfmainConf lmtp_connect_timeout syntax keyword pfmainConf lmtp_connection_cache_destinations syntax keyword pfmainConf lmtp_connection_cache_on_demand syntax keyword pfmainConf lmtp_connection_cache_time_limit syntax keyword pfmainConf lmtp_connection_reuse_count_limit syntax keyword pfmainConf lmtp_connection_reuse_time_limit syntax keyword pfmainConf lmtp_data_done_timeout syntax keyword pfmainConf lmtp_data_init_timeout syntax keyword pfmainConf lmtp_data_xfer_timeout syntax keyword pfmainConf lmtp_defer_if_no_mx_address_found syntax keyword pfmainConf lmtp_delivery_status_filter syntax keyword pfmainConf lmtp_destination_concurrency_limit syntax keyword pfmainConf lmtp_destination_recipient_limit syntax keyword pfmainConf lmtp_discard_lhlo_keyword_address_maps syntax keyword pfmainConf lmtp_discard_lhlo_keywords syntax keyword pfmainConf lmtp_dns_reply_filter syntax keyword pfmainConf lmtp_dns_resolver_options syntax keyword pfmainConf lmtp_dns_support_level syntax keyword pfmainConf lmtp_enforce_tls syntax keyword pfmainConf lmtp_generic_maps syntax keyword pfmainConf lmtp_header_checks syntax keyword pfmainConf lmtp_host_lookup syntax keyword pfmainConf lmtp_lhlo_name syntax keyword pfmainConf lmtp_lhlo_timeout syntax keyword pfmainConf lmtp_line_length_limit syntax keyword pfmainConf lmtp_mail_timeout syntax keyword pfmainConf lmtp_mime_header_checks syntax keyword pfmainConf lmtp_mx_address_limit syntax keyword pfmainConf lmtp_mx_session_limit syntax keyword pfmainConf lmtp_nested_header_checks syntax keyword pfmainConf lmtp_per_record_deadline syntax keyword pfmainConf lmtp_pix_workaround_delay_time syntax keyword pfmainConf lmtp_pix_workaround_maps syntax keyword pfmainConf lmtp_pix_workaround_threshold_time syntax keyword pfmainConf lmtp_pix_workarounds syntax keyword pfmainConf lmtp_quit_timeout syntax keyword pfmainConf lmtp_quote_rfc821_envelope syntax keyword pfmainConf lmtp_randomize_addresses syntax keyword pfmainConf lmtp_rcpt_timeout syntax keyword pfmainConf lmtp_reply_filter syntax keyword pfmainConf lmtp_rset_timeout syntax keyword pfmainConf lmtp_sasl_auth_cache_name syntax keyword pfmainConf lmtp_sasl_auth_cache_time syntax keyword pfmainConf lmtp_sasl_auth_enable syntax keyword pfmainConf lmtp_sasl_auth_soft_bounce syntax keyword pfmainConf lmtp_sasl_mechanism_filter syntax keyword pfmainConf lmtp_sasl_password_maps syntax keyword pfmainConf lmtp_sasl_path syntax keyword pfmainConf lmtp_sasl_security_options syntax keyword pfmainConf lmtp_sasl_tls_security_options syntax keyword pfmainConf lmtp_sasl_tls_verified_security_options syntax keyword pfmainConf lmtp_sasl_type syntax keyword pfmainConf lmtp_send_dummy_mail_auth syntax keyword pfmainConf lmtp_send_xforward_command syntax keyword pfmainConf lmtp_sender_dependent_authentication syntax keyword pfmainConf lmtp_skip_5xx_greeting syntax keyword pfmainConf lmtp_skip_quit_response syntax keyword pfmainConf lmtp_starttls_timeout syntax keyword pfmainConf lmtp_tcp_port syntax keyword pfmainConf lmtp_tls_CAfile syntax keyword pfmainConf lmtp_tls_CApath syntax keyword pfmainConf lmtp_tls_block_early_mail_reply syntax keyword pfmainConf lmtp_tls_cert_file syntax keyword pfmainConf lmtp_tls_ciphers syntax keyword pfmainConf lmtp_tls_dcert_file syntax keyword pfmainConf lmtp_tls_dkey_file syntax keyword pfmainConf lmtp_tls_eccert_file syntax keyword pfmainConf lmtp_tls_eckey_file syntax keyword pfmainConf lmtp_tls_enforce_peername syntax keyword pfmainConf lmtp_tls_exclude_ciphers syntax keyword pfmainConf lmtp_tls_fingerprint_cert_match syntax keyword pfmainConf lmtp_tls_fingerprint_digest syntax keyword pfmainConf lmtp_tls_force_insecure_host_tlsa_lookup syntax keyword pfmainConf lmtp_tls_key_file syntax keyword pfmainConf lmtp_tls_loglevel syntax keyword pfmainConf lmtp_tls_mandatory_ciphers syntax keyword pfmainConf lmtp_tls_mandatory_exclude_ciphers syntax keyword pfmainConf lmtp_tls_mandatory_protocols syntax keyword pfmainConf lmtp_tls_note_starttls_offer syntax keyword pfmainConf lmtp_tls_per_site syntax keyword pfmainConf lmtp_tls_policy_maps syntax keyword pfmainConf lmtp_tls_protocols syntax keyword pfmainConf lmtp_tls_scert_verifydepth syntax keyword pfmainConf lmtp_tls_secure_cert_match syntax keyword pfmainConf lmtp_tls_security_level syntax keyword pfmainConf lmtp_tls_session_cache_database syntax keyword pfmainConf lmtp_tls_session_cache_timeout syntax keyword pfmainConf lmtp_tls_trust_anchor_file syntax keyword pfmainConf lmtp_tls_verify_cert_match syntax keyword pfmainConf lmtp_use_tls syntax keyword pfmainConf lmtp_xforward_timeout syntax keyword pfmainConf local_command_shell syntax keyword pfmainConf local_delivery_status_filter syntax keyword pfmainConf local_destination_concurrency_limit syntax keyword pfmainConf local_destination_recipient_limit syntax keyword pfmainConf local_header_rewrite_clients syntax keyword pfmainConf local_recipient_maps syntax keyword pfmainConf local_transport syntax keyword pfmainConf luser_relay syntax keyword pfmainConf mail_name syntax keyword pfmainConf mail_owner syntax keyword pfmainConf mail_release_date syntax keyword pfmainConf mail_spool_directory syntax keyword pfmainConf mail_version syntax keyword pfmainConf mailbox_command syntax keyword pfmainConf mailbox_command_maps syntax keyword pfmainConf mailbox_delivery_lock syntax keyword pfmainConf mailbox_size_limit syntax keyword pfmainConf mailbox_transport syntax keyword pfmainConf mailbox_transport_maps syntax keyword pfmainConf mailq_path syntax keyword pfmainConf manpage_directory syntax keyword pfmainConf maps_rbl_domains syntax keyword pfmainConf maps_rbl_reject_code syntax keyword pfmainConf masquerade_classes syntax keyword pfmainConf masquerade_domains syntax keyword pfmainConf masquerade_exceptions syntax keyword pfmainConf master_service_disable syntax keyword pfmainConf max_idle syntax keyword pfmainConf max_use syntax keyword pfmainConf maximal_backoff_time syntax keyword pfmainConf maximal_queue_lifetime syntax keyword pfmainConf message_drop_headers syntax keyword pfmainConf message_reject_characters syntax keyword pfmainConf message_size_limit syntax keyword pfmainConf message_strip_characters syntax keyword pfmainConf meta_directory syntax keyword pfmainConf milter_command_timeout syntax keyword pfmainConf milter_connect_macros syntax keyword pfmainConf milter_connect_timeout syntax keyword pfmainConf milter_content_timeout syntax keyword pfmainConf milter_data_macros syntax keyword pfmainConf milter_default_action syntax keyword pfmainConf milter_end_of_data_macros syntax keyword pfmainConf milter_end_of_header_macros syntax keyword pfmainConf milter_header_checks syntax keyword pfmainConf milter_helo_macros syntax keyword pfmainConf milter_macro_daemon_name syntax keyword pfmainConf milter_macro_v syntax keyword pfmainConf milter_mail_macros syntax keyword pfmainConf milter_protocol syntax keyword pfmainConf milter_rcpt_macros syntax keyword pfmainConf milter_unknown_command_macros syntax keyword pfmainConf mime_boundary_length_limit syntax keyword pfmainConf mime_header_checks syntax keyword pfmainConf mime_nesting_limit syntax keyword pfmainConf minimal_backoff_time syntax keyword pfmainConf multi_instance_directories syntax keyword pfmainConf multi_instance_enable syntax keyword pfmainConf multi_instance_group syntax keyword pfmainConf multi_instance_name syntax keyword pfmainConf multi_instance_wrapper syntax keyword pfmainConf multi_recipient_bounce_reject_code syntax keyword pfmainConf mydestination syntax keyword pfmainConf mydomain syntax keyword pfmainConf myhostname syntax keyword pfmainConf mynetworks syntax keyword pfmainConf mynetworks_style syntax keyword pfmainConf myorigin syntax keyword pfmainConf nested_header_checks syntax keyword pfmainConf newaliases_path syntax keyword pfmainConf non_fqdn_reject_code syntax keyword pfmainConf non_smtpd_milters syntax keyword pfmainConf notify_classes syntax keyword pfmainConf nullmx_reject_code syntax keyword pfmainConf owner_request_special syntax keyword pfmainConf parent_domain_matches_subdomains syntax keyword pfmainConf permit_mx_backup_networks syntax keyword pfmainConf pickup_service_name syntax keyword pfmainConf pipe_delivery_status_filter syntax keyword pfmainConf plaintext_reject_code syntax keyword pfmainConf postmulti_control_commands syntax keyword pfmainConf postmulti_start_commands syntax keyword pfmainConf postmulti_stop_commands syntax keyword pfmainConf postscreen_access_list syntax keyword pfmainConf postscreen_bare_newline_action syntax keyword pfmainConf postscreen_bare_newline_enable syntax keyword pfmainConf postscreen_bare_newline_ttl syntax keyword pfmainConf postscreen_blacklist_action syntax keyword pfmainConf postscreen_cache_cleanup_interval syntax keyword pfmainConf postscreen_cache_map syntax keyword pfmainConf postscreen_cache_retention_time syntax keyword pfmainConf postscreen_client_connection_count_limit syntax keyword pfmainConf postscreen_command_count_limit syntax keyword pfmainConf postscreen_command_filter syntax keyword pfmainConf postscreen_command_time_limit syntax keyword pfmainConf postscreen_disable_vrfy_command syntax keyword pfmainConf postscreen_discard_ehlo_keyword_address_maps syntax keyword pfmainConf postscreen_discard_ehlo_keywords syntax keyword pfmainConf postscreen_dnsbl_action syntax keyword pfmainConf postscreen_dnsbl_reply_map syntax keyword pfmainConf postscreen_dnsbl_sites syntax keyword pfmainConf postscreen_dnsbl_threshold syntax keyword pfmainConf postscreen_dnsbl_timeout syntax keyword pfmainConf postscreen_dnsbl_ttl syntax keyword pfmainConf postscreen_dnsbl_whitelist_threshold syntax keyword pfmainConf postscreen_enforce_tls syntax keyword pfmainConf postscreen_expansion_filter syntax keyword pfmainConf postscreen_forbidden_commands syntax keyword pfmainConf postscreen_greet_action syntax keyword pfmainConf postscreen_greet_banner syntax keyword pfmainConf postscreen_greet_ttl syntax keyword pfmainConf postscreen_greet_wait syntax keyword pfmainConf postscreen_helo_required syntax keyword pfmainConf postscreen_non_smtp_command_action syntax keyword pfmainConf postscreen_non_smtp_command_enable syntax keyword pfmainConf postscreen_non_smtp_command_ttl syntax keyword pfmainConf postscreen_pipelining_action syntax keyword pfmainConf postscreen_pipelining_enable syntax keyword pfmainConf postscreen_pipelining_ttl syntax keyword pfmainConf postscreen_post_queue_limit syntax keyword pfmainConf postscreen_pre_queue_limit syntax keyword pfmainConf postscreen_reject_footer syntax keyword pfmainConf postscreen_tls_security_level syntax keyword pfmainConf postscreen_upstream_proxy_protocol syntax keyword pfmainConf postscreen_upstream_proxy_timeout syntax keyword pfmainConf postscreen_use_tls syntax keyword pfmainConf postscreen_watchdog_timeout syntax keyword pfmainConf postscreen_whitelist_interfaces syntax keyword pfmainConf prepend_delivered_header syntax keyword pfmainConf process_id syntax keyword pfmainConf process_id_directory syntax keyword pfmainConf process_name syntax keyword pfmainConf propagate_unmatched_extensions syntax keyword pfmainConf proxy_interfaces syntax keyword pfmainConf proxy_read_maps syntax keyword pfmainConf proxy_write_maps syntax keyword pfmainConf proxymap_service_name syntax keyword pfmainConf proxywrite_service_name syntax keyword pfmainConf qmgr_clog_warn_time syntax keyword pfmainConf qmgr_daemon_timeout syntax keyword pfmainConf qmgr_fudge_factor syntax keyword pfmainConf qmgr_ipc_timeout syntax keyword pfmainConf qmgr_message_active_limit syntax keyword pfmainConf qmgr_message_recipient_limit syntax keyword pfmainConf qmgr_message_recipient_minimum syntax keyword pfmainConf qmqpd_authorized_clients syntax keyword pfmainConf qmqpd_client_port_logging syntax keyword pfmainConf qmqpd_error_delay syntax keyword pfmainConf qmqpd_timeout syntax keyword pfmainConf queue_directory syntax keyword pfmainConf queue_file_attribute_count_limit syntax keyword pfmainConf queue_minfree syntax keyword pfmainConf queue_run_delay syntax keyword pfmainConf queue_service_name syntax keyword pfmainConf rbl_reply_maps syntax keyword pfmainConf readme_directory syntax keyword pfmainConf receive_override_options syntax keyword pfmainConf recipient_bcc_maps syntax keyword pfmainConf recipient_canonical_classes syntax keyword pfmainConf recipient_canonical_maps syntax keyword pfmainConf recipient_delimiter syntax keyword pfmainConf reject_code syntax keyword pfmainConf reject_tempfail_action syntax keyword pfmainConf relay_clientcerts syntax keyword pfmainConf relay_destination_concurrency_limit syntax keyword pfmainConf relay_destination_recipient_limit syntax keyword pfmainConf relay_domains syntax keyword pfmainConf relay_domains_reject_code syntax keyword pfmainConf relay_recipient_maps syntax keyword pfmainConf relay_transport syntax keyword pfmainConf relayhost syntax keyword pfmainConf relocated_maps syntax keyword pfmainConf remote_header_rewrite_domain syntax keyword pfmainConf require_home_directory syntax keyword pfmainConf reset_owner_alias syntax keyword pfmainConf resolve_dequoted_address syntax keyword pfmainConf resolve_null_domain syntax keyword pfmainConf resolve_numeric_domain syntax keyword pfmainConf rewrite_service_name syntax keyword pfmainConf sample_directory syntax keyword pfmainConf send_cyrus_sasl_authzid syntax keyword pfmainConf sender_based_routing syntax keyword pfmainConf sender_bcc_maps syntax keyword pfmainConf sender_canonical_classes syntax keyword pfmainConf sender_canonical_maps syntax keyword pfmainConf sender_dependent_default_transport_maps syntax keyword pfmainConf sender_dependent_relayhost_maps syntax keyword pfmainConf sendmail_fix_line_endings syntax keyword pfmainConf sendmail_path syntax keyword pfmainConf service_throttle_time syntax keyword pfmainConf setgid_group syntax keyword pfmainConf shlib_directory syntax keyword pfmainConf show_user_unknown_table_name syntax keyword pfmainConf showq_service_name syntax keyword pfmainConf smtp_address_preference syntax keyword pfmainConf smtp_address_verify_target syntax keyword pfmainConf smtp_always_send_ehlo syntax keyword pfmainConf smtp_bind_address syntax keyword pfmainConf smtp_bind_address6 syntax keyword pfmainConf smtp_body_checks syntax keyword pfmainConf smtp_cname_overrides_servername syntax keyword pfmainConf smtp_connect_timeout syntax keyword pfmainConf smtp_connection_cache_destinations syntax keyword pfmainConf smtp_connection_cache_on_demand syntax keyword pfmainConf smtp_connection_cache_time_limit syntax keyword pfmainConf smtp_connection_reuse_count_limit syntax keyword pfmainConf smtp_connection_reuse_time_limit syntax keyword pfmainConf smtp_data_done_timeout syntax keyword pfmainConf smtp_data_init_timeout syntax keyword pfmainConf smtp_data_xfer_timeout syntax keyword pfmainConf smtp_defer_if_no_mx_address_found syntax keyword pfmainConf smtp_delivery_status_filter syntax keyword pfmainConf smtp_destination_concurrency_limit syntax keyword pfmainConf smtp_destination_recipient_limit syntax keyword pfmainConf smtp_discard_ehlo_keyword_address_maps syntax keyword pfmainConf smtp_discard_ehlo_keywords syntax keyword pfmainConf smtp_dns_reply_filter syntax keyword pfmainConf smtp_dns_resolver_options syntax keyword pfmainConf smtp_dns_support_level syntax keyword pfmainConf smtp_enforce_tls syntax keyword pfmainConf smtp_fallback_relay syntax keyword pfmainConf smtp_generic_maps syntax keyword pfmainConf smtp_header_checks syntax keyword pfmainConf smtp_helo_name syntax keyword pfmainConf smtp_helo_timeout syntax keyword pfmainConf smtp_host_lookup syntax keyword pfmainConf smtp_line_length_limit syntax keyword pfmainConf smtp_mail_timeout syntax keyword pfmainConf smtp_mime_header_checks syntax keyword pfmainConf smtp_mx_address_limit syntax keyword pfmainConf smtp_mx_session_limit syntax keyword pfmainConf smtp_nested_header_checks syntax keyword pfmainConf smtp_never_send_ehlo syntax keyword pfmainConf smtp_per_record_deadline syntax keyword pfmainConf smtp_pix_workaround_delay_time syntax keyword pfmainConf smtp_pix_workaround_maps syntax keyword pfmainConf smtp_pix_workaround_threshold_time syntax keyword pfmainConf smtp_pix_workarounds syntax keyword pfmainConf smtp_quit_timeout syntax keyword pfmainConf smtp_quote_rfc821_envelope syntax keyword pfmainConf smtp_randomize_addresses syntax keyword pfmainConf smtp_rcpt_timeout syntax keyword pfmainConf smtp_reply_filter syntax keyword pfmainConf smtp_rset_timeout syntax keyword pfmainConf smtp_sasl_auth_cache_name syntax keyword pfmainConf smtp_sasl_auth_cache_time syntax keyword pfmainConf smtp_sasl_auth_enable syntax keyword pfmainConf smtp_sasl_auth_soft_bounce syntax keyword pfmainConf smtp_sasl_mechanism_filter syntax keyword pfmainConf smtp_sasl_password_maps syntax keyword pfmainConf smtp_sasl_path syntax keyword pfmainConf smtp_sasl_security_options syntax keyword pfmainConf smtp_sasl_tls_security_options syntax keyword pfmainConf smtp_sasl_tls_verified_security_options syntax keyword pfmainConf smtp_sasl_type syntax keyword pfmainConf smtp_send_dummy_mail_auth syntax keyword pfmainConf smtp_send_xforward_command syntax keyword pfmainConf smtp_sender_dependent_authentication syntax keyword pfmainConf smtp_skip_4xx_greeting syntax keyword pfmainConf smtp_skip_5xx_greeting syntax keyword pfmainConf smtp_skip_quit_response syntax keyword pfmainConf smtp_starttls_timeout syntax keyword pfmainConf smtp_tls_CAfile syntax keyword pfmainConf smtp_tls_CApath syntax keyword pfmainConf smtp_tls_block_early_mail_reply syntax keyword pfmainConf smtp_tls_cert_file syntax keyword pfmainConf smtp_tls_cipherlist syntax keyword pfmainConf smtp_tls_ciphers syntax keyword pfmainConf smtp_tls_dcert_file syntax keyword pfmainConf smtp_tls_dkey_file syntax keyword pfmainConf smtp_tls_eccert_file syntax keyword pfmainConf smtp_tls_eckey_file syntax keyword pfmainConf smtp_tls_enforce_peername syntax keyword pfmainConf smtp_tls_exclude_ciphers syntax keyword pfmainConf smtp_tls_fingerprint_cert_match syntax keyword pfmainConf smtp_tls_fingerprint_digest syntax keyword pfmainConf smtp_tls_force_insecure_host_tlsa_lookup syntax keyword pfmainConf smtp_tls_key_file syntax keyword pfmainConf smtp_tls_loglevel syntax keyword pfmainConf smtp_tls_mandatory_ciphers syntax keyword pfmainConf smtp_tls_mandatory_exclude_ciphers syntax keyword pfmainConf smtp_tls_mandatory_protocols syntax keyword pfmainConf smtp_tls_note_starttls_offer syntax keyword pfmainConf smtp_tls_per_site syntax keyword pfmainConf smtp_tls_policy_maps syntax keyword pfmainConf smtp_tls_protocols syntax keyword pfmainConf smtp_tls_scert_verifydepth syntax keyword pfmainConf smtp_tls_secure_cert_match syntax keyword pfmainConf smtp_tls_security_level syntax keyword pfmainConf smtp_tls_session_cache_database syntax keyword pfmainConf smtp_tls_session_cache_timeout syntax keyword pfmainConf smtp_tls_trust_anchor_file syntax keyword pfmainConf smtp_tls_verify_cert_match syntax keyword pfmainConf smtp_tls_wrappermode syntax keyword pfmainConf smtp_use_tls syntax keyword pfmainConf smtp_xforward_timeout syntax keyword pfmainConf smtpd_authorized_verp_clients syntax keyword pfmainConf smtpd_authorized_xclient_hosts syntax keyword pfmainConf smtpd_authorized_xforward_hosts syntax keyword pfmainConf smtpd_banner syntax keyword pfmainConf smtpd_client_connection_count_limit syntax keyword pfmainConf smtpd_client_connection_rate_limit syntax keyword pfmainConf smtpd_client_event_limit_exceptions syntax keyword pfmainConf smtpd_client_message_rate_limit syntax keyword pfmainConf smtpd_client_new_tls_session_rate_limit syntax keyword pfmainConf smtpd_client_port_logging syntax keyword pfmainConf smtpd_client_recipient_rate_limit syntax keyword pfmainConf smtpd_client_restrictions syntax keyword pfmainConf smtpd_command_filter syntax keyword pfmainConf smtpd_data_restrictions syntax keyword pfmainConf smtpd_delay_open_until_valid_rcpt syntax keyword pfmainConf smtpd_delay_reject syntax keyword pfmainConf smtpd_discard_ehlo_keyword_address_maps syntax keyword pfmainConf smtpd_discard_ehlo_keywords syntax keyword pfmainConf smtpd_dns_reply_filter syntax keyword pfmainConf smtpd_end_of_data_restrictions syntax keyword pfmainConf smtpd_enforce_tls syntax keyword pfmainConf smtpd_error_sleep_time syntax keyword pfmainConf smtpd_etrn_restrictions syntax keyword pfmainConf smtpd_expansion_filter syntax keyword pfmainConf smtpd_forbidden_commands syntax keyword pfmainConf smtpd_hard_error_limit syntax keyword pfmainConf smtpd_helo_required syntax keyword pfmainConf smtpd_helo_restrictions syntax keyword pfmainConf smtpd_history_flush_threshold syntax keyword pfmainConf smtpd_junk_command_limit syntax keyword pfmainConf smtpd_log_access_permit_actions syntax keyword pfmainConf smtpd_milters syntax keyword pfmainConf smtpd_noop_commands syntax keyword pfmainConf smtpd_null_access_lookup_key syntax keyword pfmainConf smtpd_peername_lookup syntax keyword pfmainConf smtpd_per_record_deadline syntax keyword pfmainConf smtpd_policy_service_default_action syntax keyword pfmainConf smtpd_policy_service_max_idle syntax keyword pfmainConf smtpd_policy_service_max_ttl syntax keyword pfmainConf smtpd_policy_service_request_limit syntax keyword pfmainConf smtpd_policy_service_retry_delay syntax keyword pfmainConf smtpd_policy_service_timeout syntax keyword pfmainConf smtpd_policy_service_try_limit syntax keyword pfmainConf smtpd_proxy_ehlo syntax keyword pfmainConf smtpd_proxy_filter syntax keyword pfmainConf smtpd_proxy_options syntax keyword pfmainConf smtpd_proxy_timeout syntax keyword pfmainConf smtpd_recipient_limit syntax keyword pfmainConf smtpd_recipient_overshoot_limit syntax keyword pfmainConf smtpd_recipient_restrictions syntax keyword pfmainConf smtpd_reject_footer syntax keyword pfmainConf smtpd_reject_unlisted_recipient syntax keyword pfmainConf smtpd_reject_unlisted_sender syntax keyword pfmainConf smtpd_relay_restrictions syntax keyword pfmainConf smtpd_restriction_classes syntax keyword pfmainConf smtpd_sasl_application_name syntax keyword pfmainConf smtpd_sasl_auth_enable syntax keyword pfmainConf smtpd_sasl_authenticated_header syntax keyword pfmainConf smtpd_sasl_exceptions_networks syntax keyword pfmainConf smtpd_sasl_local_domain syntax keyword pfmainConf smtpd_sasl_path syntax keyword pfmainConf smtpd_sasl_security_options syntax keyword pfmainConf smtpd_sasl_service syntax keyword pfmainConf smtpd_sasl_tls_security_options syntax keyword pfmainConf smtpd_sasl_type syntax keyword pfmainConf smtpd_sender_login_maps syntax keyword pfmainConf smtpd_sender_restrictions syntax keyword pfmainConf smtpd_service_name syntax keyword pfmainConf smtpd_soft_error_limit syntax keyword pfmainConf smtpd_starttls_timeout syntax keyword pfmainConf smtpd_timeout syntax keyword pfmainConf smtpd_tls_CAfile syntax keyword pfmainConf smtpd_tls_CApath syntax keyword pfmainConf smtpd_tls_always_issue_session_ids syntax keyword pfmainConf smtpd_tls_ask_ccert syntax keyword pfmainConf smtpd_tls_auth_only syntax keyword pfmainConf smtpd_tls_ccert_verifydepth syntax keyword pfmainConf smtpd_tls_cert_file syntax keyword pfmainConf smtpd_tls_cipherlist syntax keyword pfmainConf smtpd_tls_ciphers syntax keyword pfmainConf smtpd_tls_dcert_file syntax keyword pfmainConf smtpd_tls_dh1024_param_file syntax keyword pfmainConf smtpd_tls_dh512_param_file syntax keyword pfmainConf smtpd_tls_dkey_file syntax keyword pfmainConf smtpd_tls_eccert_file syntax keyword pfmainConf smtpd_tls_eckey_file syntax keyword pfmainConf smtpd_tls_eecdh_grade syntax keyword pfmainConf smtpd_tls_exclude_ciphers syntax keyword pfmainConf smtpd_tls_fingerprint_digest syntax keyword pfmainConf smtpd_tls_key_file syntax keyword pfmainConf smtpd_tls_loglevel syntax keyword pfmainConf smtpd_tls_mandatory_ciphers syntax keyword pfmainConf smtpd_tls_mandatory_exclude_ciphers syntax keyword pfmainConf smtpd_tls_mandatory_protocols syntax keyword pfmainConf smtpd_tls_protocols syntax keyword pfmainConf smtpd_tls_received_header syntax keyword pfmainConf smtpd_tls_req_ccert syntax keyword pfmainConf smtpd_tls_security_level syntax keyword pfmainConf smtpd_tls_session_cache_database syntax keyword pfmainConf smtpd_tls_session_cache_timeout syntax keyword pfmainConf smtpd_tls_wrappermode syntax keyword pfmainConf smtpd_upstream_proxy_protocol syntax keyword pfmainConf smtpd_upstream_proxy_timeout syntax keyword pfmainConf smtpd_use_tls syntax keyword pfmainConf smtputf8_autodetect_classes syntax keyword pfmainConf smtputf8_enable syntax keyword pfmainConf soft_bounce syntax keyword pfmainConf stale_lock_time syntax keyword pfmainConf stress syntax keyword pfmainConf strict_7bit_headers syntax keyword pfmainConf strict_8bitmime syntax keyword pfmainConf strict_8bitmime_body syntax keyword pfmainConf strict_mailbox_ownership syntax keyword pfmainConf strict_mime_encoding_domain syntax keyword pfmainConf strict_rfc821_envelopes syntax keyword pfmainConf strict_smtputf8 syntax keyword pfmainConf sun_mailtool_compatibility syntax keyword pfmainConf swap_bangpath syntax keyword pfmainConf syslog_facility syntax keyword pfmainConf syslog_name syntax keyword pfmainConf tcp_windowsize syntax keyword pfmainConf tls_append_default_CA syntax keyword pfmainConf tls_daemon_random_bytes syntax keyword pfmainConf tls_dane_digest_agility syntax keyword pfmainConf tls_dane_digests syntax keyword pfmainConf tls_dane_trust_anchor_digest_enable syntax keyword pfmainConf tls_disable_workarounds syntax keyword pfmainConf tls_eecdh_strong_curve syntax keyword pfmainConf tls_eecdh_ultra_curve syntax keyword pfmainConf tls_export_cipherlist syntax keyword pfmainConf tls_high_cipherlist syntax keyword pfmainConf tls_legacy_public_key_fingerprints syntax keyword pfmainConf tls_low_cipherlist syntax keyword pfmainConf tls_medium_cipherlist syntax keyword pfmainConf tls_null_cipherlist syntax keyword pfmainConf tls_preempt_cipherlist syntax keyword pfmainConf tls_random_bytes syntax keyword pfmainConf tls_random_exchange_name syntax keyword pfmainConf tls_random_prng_update_period syntax keyword pfmainConf tls_random_reseed_period syntax keyword pfmainConf tls_random_source syntax keyword pfmainConf tls_session_ticket_cipher syntax keyword pfmainConf tls_ssl_options syntax keyword pfmainConf tls_wildcard_matches_multiple_labels syntax keyword pfmainConf tlsmgr_service_name syntax keyword pfmainConf tlsproxy_enforce_tls syntax keyword pfmainConf tlsproxy_service_name syntax keyword pfmainConf tlsproxy_tls_CAfile syntax keyword pfmainConf tlsproxy_tls_CApath syntax keyword pfmainConf tlsproxy_tls_always_issue_session_ids syntax keyword pfmainConf tlsproxy_tls_ask_ccert syntax keyword pfmainConf tlsproxy_tls_ccert_verifydepth syntax keyword pfmainConf tlsproxy_tls_cert_file syntax keyword pfmainConf tlsproxy_tls_ciphers syntax keyword pfmainConf tlsproxy_tls_dcert_file syntax keyword pfmainConf tlsproxy_tls_dh1024_param_file syntax keyword pfmainConf tlsproxy_tls_dh512_param_file syntax keyword pfmainConf tlsproxy_tls_dkey_file syntax keyword pfmainConf tlsproxy_tls_eccert_file syntax keyword pfmainConf tlsproxy_tls_eckey_file syntax keyword pfmainConf tlsproxy_tls_eecdh_grade syntax keyword pfmainConf tlsproxy_tls_exclude_ciphers syntax keyword pfmainConf tlsproxy_tls_fingerprint_digest syntax keyword pfmainConf tlsproxy_tls_key_file syntax keyword pfmainConf tlsproxy_tls_loglevel syntax keyword pfmainConf tlsproxy_tls_mandatory_ciphers syntax keyword pfmainConf tlsproxy_tls_mandatory_exclude_ciphers syntax keyword pfmainConf tlsproxy_tls_mandatory_protocols syntax keyword pfmainConf tlsproxy_tls_protocols syntax keyword pfmainConf tlsproxy_tls_req_ccert syntax keyword pfmainConf tlsproxy_tls_security_level syntax keyword pfmainConf tlsproxy_tls_session_cache_timeout syntax keyword pfmainConf tlsproxy_use_tls syntax keyword pfmainConf tlsproxy_watchdog_timeout syntax keyword pfmainConf trace_service_name syntax keyword pfmainConf transport_delivery_slot_cost syntax keyword pfmainConf transport_delivery_slot_discount syntax keyword pfmainConf transport_delivery_slot_loan syntax keyword pfmainConf transport_destination_concurrency_failed_cohort_limit syntax keyword pfmainConf transport_destination_concurrency_limit syntax keyword pfmainConf transport_destination_concurrency_negative_feedback syntax keyword pfmainConf transport_destination_concurrency_positive_feedback syntax keyword pfmainConf transport_destination_rate_delay syntax keyword pfmainConf transport_destination_recipient_limit syntax keyword pfmainConf transport_extra_recipient_limit syntax keyword pfmainConf transport_initial_destination_concurrency syntax keyword pfmainConf transport_maps syntax keyword pfmainConf transport_minimum_delivery_slots syntax keyword pfmainConf transport_recipient_limit syntax keyword pfmainConf transport_recipient_refill_delay syntax keyword pfmainConf transport_recipient_refill_limit syntax keyword pfmainConf transport_retry_time syntax keyword pfmainConf transport_time_limit syntax keyword pfmainConf trigger_timeout syntax keyword pfmainConf undisclosed_recipients_header syntax keyword pfmainConf unknown_address_reject_code syntax keyword pfmainConf unknown_address_tempfail_action syntax keyword pfmainConf unknown_client_reject_code syntax keyword pfmainConf unknown_helo_hostname_tempfail_action syntax keyword pfmainConf unknown_hostname_reject_code syntax keyword pfmainConf unknown_local_recipient_reject_code syntax keyword pfmainConf unknown_relay_recipient_reject_code syntax keyword pfmainConf unknown_virtual_alias_reject_code syntax keyword pfmainConf unknown_virtual_mailbox_reject_code syntax keyword pfmainConf unverified_recipient_defer_code syntax keyword pfmainConf unverified_recipient_reject_code syntax keyword pfmainConf unverified_recipient_reject_reason syntax keyword pfmainConf unverified_recipient_tempfail_action syntax keyword pfmainConf unverified_sender_defer_code syntax keyword pfmainConf unverified_sender_reject_code syntax keyword pfmainConf unverified_sender_reject_reason syntax keyword pfmainConf unverified_sender_tempfail_action syntax keyword pfmainConf verp_delimiter_filter syntax keyword pfmainConf virtual_alias_address_length_limit syntax keyword pfmainConf virtual_alias_domains syntax keyword pfmainConf virtual_alias_expansion_limit syntax keyword pfmainConf virtual_alias_maps syntax keyword pfmainConf virtual_alias_recursion_limit syntax keyword pfmainConf virtual_delivery_status_filter syntax keyword pfmainConf virtual_destination_concurrency_limit syntax keyword pfmainConf virtual_destination_recipient_limit syntax keyword pfmainConf virtual_gid_maps syntax keyword pfmainConf virtual_mailbox_base syntax keyword pfmainConf virtual_mailbox_domains syntax keyword pfmainConf virtual_mailbox_limit syntax keyword pfmainConf virtual_mailbox_lock syntax keyword pfmainConf virtual_mailbox_maps syntax keyword pfmainConf virtual_maps syntax keyword pfmainConf virtual_minimum_uid syntax keyword pfmainConf virtual_transport syntax keyword pfmainConf virtual_uid_maps syntax match pfmainRef "$\<2bounce_notice_recipient\>" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax match pfmainRef "$\" syntax keyword pfmainWord accept syntax keyword pfmainWord all syntax keyword pfmainWord always syntax keyword pfmainWord check_address_map syntax keyword pfmainWord check_ccert_access syntax keyword pfmainWord check_client_a_access syntax keyword pfmainWord check_client_access syntax keyword pfmainWord check_client_mx_access syntax keyword pfmainWord check_client_ns_access syntax keyword pfmainWord check_etrn_access syntax keyword pfmainWord check_helo_a_access syntax keyword pfmainWord check_helo_access syntax keyword pfmainWord check_helo_mx_access syntax keyword pfmainWord check_helo_ns_access syntax keyword pfmainWord check_policy_service syntax keyword pfmainWord check_recipient_a_access syntax keyword pfmainWord check_recipient_access syntax keyword pfmainWord check_recipient_maps syntax keyword pfmainWord check_recipient_mx_access syntax keyword pfmainWord check_recipient_ns_access syntax keyword pfmainWord check_relay_domains syntax keyword pfmainWord check_reverse_client_hostname_a_access syntax keyword pfmainWord check_reverse_client_hostname_access syntax keyword pfmainWord check_reverse_client_hostname_mx_access syntax keyword pfmainWord check_reverse_client_hostname_ns_access syntax keyword pfmainWord check_sasl_access syntax keyword pfmainWord check_sender_a_access syntax keyword pfmainWord check_sender_access syntax keyword pfmainWord check_sender_mx_access syntax keyword pfmainWord check_sender_ns_access syntax keyword pfmainWord class syntax keyword pfmainWord client_address syntax keyword pfmainWord client_port syntax keyword pfmainWord dane syntax keyword pfmainWord dane-only syntax keyword pfmainWord defer syntax keyword pfmainWord defer_if_permit syntax keyword pfmainWord defer_if_reject syntax keyword pfmainWord defer_unauth_destination syntax keyword pfmainWord disabled syntax keyword pfmainWord dns syntax keyword pfmainWord dnssec syntax keyword pfmainWord drop syntax keyword pfmainWord dunno syntax keyword pfmainWord enabled syntax keyword pfmainWord encrypt syntax keyword pfmainWord enforce syntax keyword pfmainWord envelope_recipient syntax keyword pfmainWord envelope_sender syntax keyword pfmainWord export syntax keyword pfmainWord fingerprint syntax keyword pfmainWord header_recipient syntax keyword pfmainWord header_sender syntax keyword pfmainWord high syntax keyword pfmainWord host syntax keyword pfmainWord ignore syntax keyword pfmainWord ipv4 syntax keyword pfmainWord ipv6 syntax keyword pfmainWord localtime syntax keyword pfmainWord low syntax keyword pfmainWord may syntax keyword pfmainWord maybe syntax keyword pfmainWord medium syntax keyword pfmainWord native syntax keyword pfmainWord never syntax keyword pfmainWord no_address_mappings syntax keyword pfmainWord no_header_body_checks syntax keyword pfmainWord no_header_reply syntax keyword pfmainWord no_milters syntax keyword pfmainWord no_unknown_recipient_checks syntax keyword pfmainWord none syntax keyword pfmainWord null syntax keyword pfmainWord off syntax keyword pfmainWord on syntax keyword pfmainWord permit syntax keyword pfmainWord permit_auth_destination syntax keyword pfmainWord permit_dnswl_client syntax keyword pfmainWord permit_inet_interfaces syntax keyword pfmainWord permit_mx_backup syntax keyword pfmainWord permit_mynetworks syntax keyword pfmainWord permit_naked_ip_address syntax keyword pfmainWord permit_rhswl_client syntax keyword pfmainWord permit_sasl_authenticated syntax keyword pfmainWord permit_tls_all_clientcerts syntax keyword pfmainWord permit_tls_clientcerts syntax keyword pfmainWord quarantine syntax keyword pfmainWord reject syntax keyword pfmainWord reject_authenticated_sender_login_mismatch syntax keyword pfmainWord reject_invalid_helo_hostname syntax keyword pfmainWord reject_invalid_hostname syntax keyword pfmainWord reject_known_sender_login_mismatch syntax keyword pfmainWord reject_maps_rbl syntax keyword pfmainWord reject_multi_recipient_bounce syntax keyword pfmainWord reject_non_fqdn_helo_hostname syntax keyword pfmainWord reject_non_fqdn_hostname syntax keyword pfmainWord reject_non_fqdn_recipient syntax keyword pfmainWord reject_non_fqdn_sender syntax keyword pfmainWord reject_plaintext_session syntax keyword pfmainWord reject_rbl syntax keyword pfmainWord reject_rbl_client syntax keyword pfmainWord reject_rhsbl_client syntax keyword pfmainWord reject_rhsbl_helo syntax keyword pfmainWord reject_rhsbl_recipient syntax keyword pfmainWord reject_rhsbl_reverse_client syntax keyword pfmainWord reject_rhsbl_sender syntax keyword pfmainWord reject_sender_login_mismatch syntax keyword pfmainWord reject_unauth_destination syntax keyword pfmainWord reject_unauth_pipelining syntax keyword pfmainWord reject_unauthenticated_sender_login_mismatch syntax keyword pfmainWord reject_unknown_address syntax keyword pfmainWord reject_unknown_client syntax keyword pfmainWord reject_unknown_client_hostname syntax keyword pfmainWord reject_unknown_forward_client_hostname syntax keyword pfmainWord reject_unknown_helo_hostname syntax keyword pfmainWord reject_unknown_hostname syntax keyword pfmainWord reject_unknown_recipient_domain syntax keyword pfmainWord reject_unknown_reverse_client_hostname syntax keyword pfmainWord reject_unknown_sender_domain syntax keyword pfmainWord reject_unlisted_recipient syntax keyword pfmainWord reject_unlisted_sender syntax keyword pfmainWord reject_unverified_recipient syntax keyword pfmainWord reject_unverified_sender syntax keyword pfmainWord secure syntax keyword pfmainWord server_name syntax keyword pfmainWord sleep syntax keyword pfmainWord smtpd_access_maps syntax keyword pfmainWord speed_adjust syntax keyword pfmainWord strong syntax keyword pfmainWord subnet syntax keyword pfmainWord tempfail syntax keyword pfmainWord ultra syntax keyword pfmainWord warn_if_reject syntax keyword pfmainWord CRYPTOPRO_TLSEXT_BUG syntax keyword pfmainWord DONT_INSERT_EMPTY_FRAGMENTS syntax keyword pfmainWord LEGACY_SERVER_CONNECT syntax keyword pfmainWord MICROSOFT_BIG_SSLV3_BUFFER syntax keyword pfmainWord MICROSOFT_SESS_ID_BUG syntax keyword pfmainWord MSIE_SSLV2_RSA_PADDING syntax keyword pfmainWord NETSCAPE_CHALLENGE_BUG syntax keyword pfmainWord NETSCAPE_REUSE_CIPHER_CHANGE_BUG syntax keyword pfmainWord SSLEAY_080_CLIENT_DH_BUG syntax keyword pfmainWord SSLREF2_REUSE_CERT_TYPE_BUG syntax keyword pfmainWord TLS_BLOCK_PADDING_BUG syntax keyword pfmainWord TLS_D5_BUG syntax keyword pfmainWord TLS_ROLLBACK_BUG syntax keyword pfmainDict btree cidr environ hash nis pcre proxy regexp sdbm static tcp unix syntax keyword pfmainQueueDir incoming active deferred corrupt hold syntax keyword pfmainTransport smtp lmtp unix local relay uucp virtual syntax keyword pfmainLock fcntl flock dotlock syntax keyword pfmainAnswer yes no syntax match pfmainComment "#.*$" syntax match pfmainNumber "\<\d\+\>" syntax match pfmainTime "\<\d\+[hmsd]\>" syntax match pfmainIP "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>" syntax match pfmainVariable "\$\w\+" contains=pfmainRef syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\<2bounce\>" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" syntax match pfmainSpecial "\" hi def link pfmainConf Statement hi def link pfmainRef PreProc hi def link pfmainWord identifier hi def link pfmainDict Type hi def link pfmainQueueDir Constant hi def link pfmainTransport Constant hi def link pfmainLock Constant hi def link pfmainAnswer Constant hi def link pfmainComment Comment hi def link pfmainNumber Number hi def link pfmainTime Number hi def link pfmainIP Number hi def link pfmainVariable Error hi def link pfmainSpecial Special let b:current_syntax = "pfmain" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/php.vim000066400000000000000000002350561320401574200173360ustar00rootroot00000000000000" Vim syntax file " Language: php PHP 3/4/5/7 " Maintainer: Jason Woofenden " Last Change: Jul 14, 2017 " URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD " Former Maintainers: Peter Hodge " Debian VIM Maintainers " " Note: If you are using a colour terminal with dark background, you will " probably find the 'elflord' colorscheme is much better for PHP's syntax " than the default colourscheme, because elflord's colours will better " highlight the break-points (Statements) in your code. " " Options: " Set to anything to enable: " php_sql_query SQL syntax highlighting inside strings " php_htmlInStrings HTML syntax highlighting inside strings " php_baselib highlighting baselib functions " php_asp_tags highlighting ASP-style short tags " php_parent_error_close highlighting parent error ] or ) " php_parent_error_open skipping an php end tag, if there exists " an open ( or [ without a closing one " php_oldStyle use old colorstyle " php_noShortTags don't sync as php " Set to a specific value: " php_folding = 1 fold classes and functions " php_folding = 2 fold all { } regions " php_sync_method = x where x is an integer: " -1 sync by search ( default ) " >0 sync at least x lines backwards " 0 sync from start " Set to 0 to _disable_: (Added by Peter Hodge On June 9, 2006) " php_special_functions = 0 highlight functions with abnormal behaviour " php_alt_comparisons = 0 comparison operators in an alternate colour " php_alt_assignByReference = 0 '= &' in an alternate colour " " " Note: " Setting php_folding=1 will match a closing } by comparing the indent " before the class or function keyword with the indent of a matching }. " Setting php_folding=2 will match all of pairs of {,} ( see known " bugs ii ) " Known Bugs: " - setting php_parent_error_close on and php_parent_error_open off " has these two leaks: " i) A closing ) or ] inside a string match to the last open ( or [ " before the string, when the the closing ) or ] is on the same line " where the string started. In this case a following ) or ] after " the string would be highlighted as an error, what is incorrect. " ii) Same problem if you are setting php_folding = 2 with a closing " } inside an string on the first line of this string. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'php' endif runtime! syntax/html.vim unlet b:current_syntax " accept old options if !exists("php_sync_method") if exists("php_minlines") let php_sync_method=php_minlines else let php_sync_method=-1 endif endif if exists("php_parentError") && !exists("php_parent_error_open") && !exists("php_parent_error_close") let php_parent_error_close=1 let php_parent_error_open=1 endif syn cluster htmlPreproc add=phpRegion,phpRegionAsp,phpRegionSc syn include @sqlTop syntax/sql.vim syn sync clear unlet b:current_syntax syn cluster sqlTop remove=sqlString,sqlComment if exists( "php_sql_query") syn cluster phpAddStrings contains=@sqlTop endif if exists( "php_htmlInStrings") syn cluster phpAddStrings add=@htmlTop endif " make sure we can use \ at the beginning of the line to do a continuation let s:cpo_save = &cpo set cpo&vim syn case match " Env Variables syn keyword phpEnvVar GATEWAY_INTERFACE SERVER_NAME SERVER_SOFTWARE SERVER_PROTOCOL REQUEST_METHOD QUERY_STRING DOCUMENT_ROOT HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CONNECTION HTTP_HOST HTTP_REFERER HTTP_USER_AGENT REMOTE_ADDR REMOTE_PORT SCRIPT_FILENAME SERVER_ADMIN SERVER_PORT SERVER_SIGNATURE PATH_TRANSLATED SCRIPT_NAME REQUEST_URI contained " Internal Variables syn keyword phpIntVar GLOBALS PHP_ERRMSG PHP_SELF HTTP_GET_VARS HTTP_POST_VARS HTTP_COOKIE_VARS HTTP_POST_FILES HTTP_ENV_VARS HTTP_SERVER_VARS HTTP_SESSION_VARS HTTP_RAW_POST_DATA HTTP_STATE_VARS _GET _POST _COOKIE _FILES _SERVER _ENV _SERVER _REQUEST _SESSION contained " Constants syn keyword phpCoreConstant PHP_VERSION PHP_OS DEFAULT_INCLUDE_PATH PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_BINDIR PHP_LIBDIR PHP_DATADIR PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END contained " Predefined constants " Generated by: curl -q http://php.net/manual/en/errorfunc.constants.php | grep -oP 'E_\w+' | sort -u syn keyword phpCoreConstant E_ALL E_COMPILE_ERROR E_COMPILE_WARNING E_CORE_ERROR E_CORE_WARNING E_DEPRECATED E_ERROR E_NOTICE E_PARSE E_RECOVERABLE_ERROR E_STRICT E_USER_DEPRECATED E_USER_ERROR E_USER_NOTICE E_USER_WARNING E_WARNING contained syn case ignore syn keyword phpConstant __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__ __DIR__ __NAMESPACE__ __TRAIT__ contained " Function and Methods ripped from php_manual_de.tar.gz Jan 2003 syn keyword phpFunctions apache_child_terminate apache_get_modules apache_get_version apache_getenv apache_lookup_uri apache_note apache_request_headers apache_response_headers apache_setenv ascii2ebcdic ebcdic2ascii getallheaders virtual contained syn keyword phpFunctions array_change_key_case array_chunk array_column array_combine array_count_values array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_diff array_fill_keys array_fill array_filter array_flip array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_replace_recursive array_replace array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_uintersect_assoc array_uintersect_uassoc array_uintersect array_unique array_unshift array_values array_walk_recursive array_walk arsort asort count current each end in_array key_exists key krsort ksort natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort contained syn keyword phpFunctions aspell_check aspell_new aspell_suggest contained syn keyword phpFunctions bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub contained syn keyword phpFunctions bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite contained syn keyword phpFunctions cal_days_in_month cal_from_jd cal_info cal_to_jd easter_date easter_days frenchtojd gregoriantojd jddayofweek jdmonthname jdtofrench jdtogregorian jdtojewish jdtojulian jdtounix jewishtojd juliantojd unixtojd contained syn keyword phpFunctions ccvs_add ccvs_auth ccvs_command ccvs_count ccvs_delete ccvs_done ccvs_init ccvs_lookup ccvs_new ccvs_report ccvs_return ccvs_reverse ccvs_sale ccvs_status ccvs_textvalue ccvs_void contained syn keyword phpFunctions call_user_method_array call_user_method class_exists get_class_methods get_class_vars get_class get_declared_classes get_object_vars get_parent_class is_a is_subclass_of method_exists contained syn keyword phpFunctions com VARIANT com_addref com_get com_invoke com_isenum com_load_typelib com_load com_propget com_propput com_propset com_release com_set contained syn keyword phpFunctions cpdf_add_annotation cpdf_add_outline cpdf_arc cpdf_begin_text cpdf_circle cpdf_clip cpdf_close cpdf_closepath_fill_stroke cpdf_closepath_stroke cpdf_closepath cpdf_continue_text cpdf_curveto cpdf_end_text cpdf_fill_stroke cpdf_fill cpdf_finalize_page cpdf_finalize cpdf_global_set_document_limits cpdf_import_jpeg cpdf_lineto cpdf_moveto cpdf_newpath cpdf_open cpdf_output_buffer cpdf_page_init cpdf_place_inline_image cpdf_rect cpdf_restore cpdf_rlineto cpdf_rmoveto cpdf_rotate_text cpdf_rotate cpdf_save_to_file cpdf_save cpdf_scale cpdf_set_action_url cpdf_set_char_spacing cpdf_set_creator cpdf_set_current_page cpdf_set_font_directories cpdf_set_font_map_file cpdf_set_font cpdf_set_horiz_scaling cpdf_set_keywords cpdf_set_leading cpdf_set_page_animation cpdf_set_subject cpdf_set_text_matrix cpdf_set_text_pos cpdf_set_text_rendering cpdf_set_text_rise cpdf_set_title cpdf_set_viewer_preferences cpdf_set_word_spacing cpdf_setdash cpdf_setflat cpdf_setgray_fill cpdf_setgray_stroke cpdf_setgray cpdf_setlinecap cpdf_setlinejoin cpdf_setlinewidth cpdf_setmiterlimit cpdf_setrgbcolor_fill cpdf_setrgbcolor_stroke cpdf_setrgbcolor cpdf_show_xy cpdf_show cpdf_stringwidth cpdf_stroke cpdf_text cpdf_translate contained syn keyword phpFunctions crack_check crack_closedict crack_getlastmessage crack_opendict contained syn keyword phpFunctions ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_graph ctype_lower ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit contained syn keyword phpFunctions curl_close curl_errno curl_error curl_exec curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_setopt curl_version contained syn keyword phpFunctions cybercash_base64_decode cybercash_base64_encode cybercash_decr cybercash_encr contained syn keyword phpFunctions cyrus_authenticate cyrus_bind cyrus_close cyrus_connect cyrus_query cyrus_unbind contained syn keyword phpFunctions checkdate date getdate gettimeofday gmdate gmmktime gmstrftime localtime microtime mktime strftime strtotime time contained syn keyword phpFunctions dba_close dba_delete dba_exists dba_fetch dba_firstkey dba_handlers dba_insert dba_key_split dba_list dba_nextkey dba_open dba_optimize dba_popen dba_replace dba_sync contained syn keyword phpFunctions dbase_add_record dbase_close dbase_create dbase_delete_record dbase_get_header_info dbase_get_record_with_names dbase_get_record dbase_numfields dbase_numrecords dbase_open dbase_pack dbase_replace_record contained syn keyword phpFunctions dblist dbmclose dbmdelete dbmexists dbmfetch dbmfirstkey dbminsert dbmnextkey dbmopen dbmreplace contained syn keyword phpFunctions dbplus_add dbplus_aql dbplus_chdir dbplus_close dbplus_curr dbplus_errcode dbplus_errno dbplus_find dbplus_first dbplus_flush dbplus_freealllocks dbplus_freelock dbplus_freerlocks dbplus_getlock dbplus_getunique dbplus_info dbplus_last dbplus_lockrel dbplus_next dbplus_open dbplus_prev dbplus_rchperm dbplus_rcreate dbplus_rcrtexact dbplus_rcrtlike dbplus_resolve dbplus_restorepos dbplus_rkeys dbplus_ropen dbplus_rquery dbplus_rrename dbplus_rsecindex dbplus_runlink dbplus_rzap dbplus_savepos dbplus_setindex dbplus_setindexbynumber dbplus_sql dbplus_tcl dbplus_tremove dbplus_undo dbplus_undoprepare dbplus_unlockrel dbplus_unselect dbplus_update dbplus_xlockrel dbplus_xunlockrel contained syn keyword phpFunctions dbx_close dbx_compare dbx_connect dbx_error dbx_escape_string dbx_fetch_row dbx_query dbx_sort contained syn keyword phpFunctions dio_close dio_fcntl dio_open dio_read dio_seek dio_stat dio_tcsetattr dio_truncate dio_write contained syn keyword phpFunctions chdir chroot dir closedir getcwd opendir readdir rewinddir scandir contained syn keyword phpFunctions domxml_new_doc domxml_open_file domxml_open_mem domxml_version domxml_xmltree domxml_xslt_stylesheet_doc domxml_xslt_stylesheet_file domxml_xslt_stylesheet xpath_eval_expression xpath_eval xpath_new_context xptr_eval xptr_new_context contained syn keyword phpMethods name specified value create_attribute create_cdata_section create_comment create_element_ns create_element create_entity_reference create_processing_instruction create_text_node doctype document_element dump_file dump_mem get_element_by_id get_elements_by_tagname html_dump_mem xinclude entities internal_subset name notations public_id system_id get_attribute_node get_attribute get_elements_by_tagname has_attribute remove_attribute set_attribute tagname add_namespace append_child append_sibling attributes child_nodes clone_node dump_node first_child get_content has_attributes has_child_nodes insert_before is_blank_node last_child next_sibling node_name node_type node_value owner_document parent_node prefix previous_sibling remove_child replace_child replace_node set_content set_name set_namespace unlink_node data target process result_dump_file result_dump_mem contained syn keyword phpFunctions dotnet_load contained syn keyword phpFunctions debug_backtrace debug_print_backtrace error_log error_reporting restore_error_handler set_error_handler trigger_error user_error contained syn keyword phpFunctions escapeshellarg escapeshellcmd exec passthru proc_close proc_get_status proc_nice proc_open proc_terminate shell_exec system contained syn keyword phpFunctions fam_cancel_monitor fam_close fam_monitor_collection fam_monitor_directory fam_monitor_file fam_next_event fam_open fam_pending fam_resume_monitor fam_suspend_monitor contained syn keyword phpFunctions fbsql_affected_rows fbsql_autocommit fbsql_change_user fbsql_close fbsql_commit fbsql_connect fbsql_create_blob fbsql_create_clob fbsql_create_db fbsql_data_seek fbsql_database_password fbsql_database fbsql_db_query fbsql_db_status fbsql_drop_db fbsql_errno fbsql_error fbsql_fetch_array fbsql_fetch_assoc fbsql_fetch_field fbsql_fetch_lengths fbsql_fetch_object fbsql_fetch_row fbsql_field_flags fbsql_field_len fbsql_field_name fbsql_field_seek fbsql_field_table fbsql_field_type fbsql_free_result fbsql_get_autostart_info fbsql_hostname fbsql_insert_id fbsql_list_dbs fbsql_list_fields fbsql_list_tables fbsql_next_result fbsql_num_fields fbsql_num_rows fbsql_password fbsql_pconnect fbsql_query fbsql_read_blob fbsql_read_clob fbsql_result fbsql_rollback fbsql_select_db fbsql_set_lob_mode fbsql_set_transaction fbsql_start_db fbsql_stop_db fbsql_tablename fbsql_username fbsql_warnings contained syn keyword phpFunctions fdf_add_doc_javascript fdf_add_template fdf_close fdf_create fdf_enum_values fdf_errno fdf_error fdf_get_ap fdf_get_attachment fdf_get_encoding fdf_get_file fdf_get_flags fdf_get_opt fdf_get_status fdf_get_value fdf_get_version fdf_header fdf_next_field_name fdf_open_string fdf_open fdf_remove_item fdf_save_string fdf_save fdf_set_ap fdf_set_encoding fdf_set_file fdf_set_flags fdf_set_javascript_action fdf_set_opt fdf_set_status fdf_set_submit_form_action fdf_set_target_frame fdf_set_value fdf_set_version contained syn keyword phpFunctions filepro_fieldcount filepro_fieldname filepro_fieldtype filepro_fieldwidth filepro_retrieve filepro_rowcount filepro contained syn keyword phpFunctions basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable link linkinfo lstat mkdir move_uploaded_file parse_ini_file pathinfo pclose popen readfile readlink realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink contained syn keyword phpFunctions fribidi_log2vis contained syn keyword phpFunctions ftp_alloc ftp_cdup ftp_chdir ftp_chmod ftp_close ftp_connect ftp_delete ftp_exec ftp_fget ftp_fput ftp_get_option ftp_get ftp_login ftp_mdtm ftp_mkdir ftp_nb_continue ftp_nb_fget ftp_nb_fput ftp_nb_get ftp_nb_put ftp_nlist ftp_pasv ftp_put ftp_pwd ftp_quit ftp_raw ftp_rawlist ftp_rename ftp_rmdir ftp_set_option ftp_site ftp_size ftp_ssl_connect ftp_systype contained syn keyword phpFunctions call_user_func_array call_user_func create_function func_get_arg func_get_args func_num_args function_exists get_defined_functions register_shutdown_function register_tick_function unregister_tick_function contained syn keyword phpFunctions bind_textdomain_codeset bindtextdomain dcgettext dcngettext dgettext dngettext gettext ngettext textdomain contained syn keyword phpFunctions gmp_abs gmp_add gmp_and gmp_clrbit gmp_cmp gmp_com gmp_div_q gmp_div_qr gmp_div_r gmp_div gmp_divexact gmp_fact gmp_gcd gmp_gcdext gmp_hamdist gmp_init gmp_intval gmp_invert gmp_jacobi gmp_legendre gmp_mod gmp_mul gmp_neg gmp_or gmp_perfect_square gmp_popcount gmp_pow gmp_powm gmp_prob_prime gmp_random gmp_scan0 gmp_scan1 gmp_setbit gmp_sign gmp_sqrt gmp_sqrtrem gmp_sqrtrm gmp_strval gmp_sub gmp_xor contained syn keyword phpFunctions header headers_list headers_sent setcookie contained syn keyword phpFunctions hw_api_attribute hwapi_hgcsp hw_api_content hw_api_object contained syn keyword phpMethods key langdepvalue value values checkin checkout children mimetype read content copy dbstat dcstat dstanchors dstofsrcanchors count reason find ftstat hwstat identify info insert insertanchor insertcollection insertdocument link lock move assign attreditable count insert remove title value object objectbyanchor parents description type remove replace setcommitedversion srcanchors srcsofdst unlock user userlist contained syn keyword phpFunctions hw_Array2Objrec hw_changeobject hw_Children hw_ChildrenObj hw_Close hw_Connect hw_connection_info hw_cp hw_Deleteobject hw_DocByAnchor hw_DocByAnchorObj hw_Document_Attributes hw_Document_BodyTag hw_Document_Content hw_Document_SetContent hw_Document_Size hw_dummy hw_EditText hw_Error hw_ErrorMsg hw_Free_Document hw_GetAnchors hw_GetAnchorsObj hw_GetAndLock hw_GetChildColl hw_GetChildCollObj hw_GetChildDocColl hw_GetChildDocCollObj hw_GetObject hw_GetObjectByQuery hw_GetObjectByQueryColl hw_GetObjectByQueryCollObj hw_GetObjectByQueryObj hw_GetParents hw_GetParentsObj hw_getrellink hw_GetRemote hw_getremotechildren hw_GetSrcByDestObj hw_GetText hw_getusername hw_Identify hw_InCollections hw_Info hw_InsColl hw_InsDoc hw_insertanchors hw_InsertDocument hw_InsertObject hw_mapid hw_Modifyobject hw_mv hw_New_Document hw_objrec2array hw_Output_Document hw_pConnect hw_PipeDocument hw_Root hw_setlinkroot hw_stat hw_Unlock hw_Who contained syn keyword phpFunctions ibase_add_user ibase_affected_rows ibase_blob_add ibase_blob_cancel ibase_blob_close ibase_blob_create ibase_blob_echo ibase_blob_get ibase_blob_import ibase_blob_info ibase_blob_open ibase_close ibase_commit_ret ibase_commit ibase_connect ibase_delete_user ibase_drop_db ibase_errcode ibase_errmsg ibase_execute ibase_fetch_assoc ibase_fetch_object ibase_fetch_row ibase_field_info ibase_free_event_handler ibase_free_query ibase_free_result ibase_gen_id ibase_modify_user ibase_name_result ibase_num_fields ibase_num_params ibase_param_info ibase_pconnect ibase_prepare ibase_query ibase_rollback_ret ibase_rollback ibase_set_event_handler ibase_timefmt ibase_trans ibase_wait_event contained syn keyword phpFunctions iconv_get_encoding iconv_mime_decode_headers iconv_mime_decode iconv_mime_encode iconv_set_encoding iconv_strlen iconv_strpos iconv_strrpos iconv_substr iconv ob_iconv_handler contained syn keyword phpFunctions ifx_affected_rows ifx_blobinfile_mode ifx_byteasvarchar ifx_close ifx_connect ifx_copy_blob ifx_create_blob ifx_create_char ifx_do ifx_error ifx_errormsg ifx_fetch_row ifx_fieldproperties ifx_fieldtypes ifx_free_blob ifx_free_char ifx_free_result ifx_get_blob ifx_get_char ifx_getsqlca ifx_htmltbl_result ifx_nullformat ifx_num_fields ifx_num_rows ifx_pconnect ifx_prepare ifx_query ifx_textasvarchar ifx_update_blob ifx_update_char ifxus_close_slob ifxus_create_slob ifxus_free_slob ifxus_open_slob ifxus_read_slob ifxus_seek_slob ifxus_tell_slob ifxus_write_slob contained syn keyword phpFunctions exif_imagetype exif_read_data exif_thumbnail gd_info getimagesize image_type_to_mime_type image2wbmp imagealphablending imageantialias imagearc imagechar imagecharup imagecolorallocate imagecolorallocatealpha imagecolorat imagecolorclosest imagecolorclosestalpha imagecolorclosesthwb imagecolordeallocate imagecolorexact imagecolorexactalpha imagecolormatch imagecolorresolve imagecolorresolvealpha imagecolorset imagecolorsforindex imagecolorstotal imagecolortransparent imagecopy imagecopymerge imagecopymergegray imagecopyresampled imagecopyresized imagecreate imagecreatefromgd2 imagecreatefromgd2part imagecreatefromgd imagecreatefromgif imagecreatefromjpeg imagecreatefrompng imagecreatefromstring imagecreatefromwbmp imagecreatefromxbm imagecreatefromxpm imagecreatetruecolor imagedashedline imagedestroy imageellipse imagefill imagefilledarc imagefilledellipse imagefilledpolygon imagefilledrectangle imagefilltoborder imagefontheight imagefontwidth imageftbbox imagefttext imagegammacorrect imagegd2 imagegd imagegif imageinterlace imageistruecolor imagejpeg imageline imageloadfont imagepalettecopy imagepng imagepolygon imagepsbbox imagepscopyfont imagepsencodefont imagepsextendfont imagepsfreefont imagepsloadfont imagepsslantfont imagepstext imagerectangle imagerotate imagesavealpha imagesetbrush imagesetpixel imagesetstyle imagesetthickness imagesettile imagestring imagestringup imagesx imagesy imagetruecolortopalette imagettfbbox imagettftext imagetypes imagewbmp iptcembed iptcparse jpeg2wbmp png2wbmp read_exif_data contained syn keyword phpFunctions imap_8bit imap_alerts imap_append imap_base64 imap_binary imap_body imap_bodystruct imap_check imap_clearflag_full imap_close imap_createmailbox imap_delete imap_deletemailbox imap_errors imap_expunge imap_fetch_overview imap_fetchbody imap_fetchheader imap_fetchstructure imap_get_quota imap_get_quotaroot imap_getacl imap_getmailboxes imap_getsubscribed imap_header imap_headerinfo imap_headers imap_last_error imap_list imap_listmailbox imap_listscan imap_listsubscribed imap_lsub imap_mail_compose imap_mail_copy imap_mail_move imap_mail imap_mailboxmsginfo imap_mime_header_decode imap_msgno imap_num_msg imap_num_recent imap_open imap_ping imap_qprint imap_renamemailbox imap_reopen imap_rfc822_parse_adrlist imap_rfc822_parse_headers imap_rfc822_write_address imap_scanmailbox imap_search imap_set_quota imap_setacl imap_setflag_full imap_sort imap_status imap_subscribe imap_thread imap_timeout imap_uid imap_undelete imap_unsubscribe imap_utf7_decode imap_utf7_encode imap_utf8 contained syn keyword phpFunctions assert_options assert dl extension_loaded get_cfg_var get_current_user get_defined_constants get_extension_funcs get_include_path get_included_files get_loaded_extensions get_magic_quotes_gpc get_magic_quotes_runtime get_required_files getenv getlastmod getmygid getmyinode getmypid getmyuid getopt getrusage ini_alter ini_get_all ini_get ini_restore ini_set main memory_get_usage php_ini_scanned_files php_logo_guid php_sapi_name php_uname phpcredits phpinfo phpversion putenv restore_include_path set_include_path set_magic_quotes_runtime set_time_limit version_compare zend_logo_guid zend_version contained syn keyword phpFunctions ingres_autocommit ingres_close ingres_commit ingres_connect ingres_fetch_array ingres_fetch_object ingres_fetch_row ingres_field_length ingres_field_name ingres_field_nullable ingres_field_precision ingres_field_scale ingres_field_type ingres_num_fields ingres_num_rows ingres_pconnect ingres_query ingres_rollback contained syn keyword phpFunctions ircg_channel_mode ircg_disconnect ircg_fetch_error_msg ircg_get_username ircg_html_encode ircg_ignore_add ircg_ignore_del ircg_is_conn_alive ircg_join ircg_kick ircg_lookup_format_messages ircg_msg ircg_nick ircg_nickname_escape ircg_nickname_unescape ircg_notice ircg_part ircg_pconnect ircg_register_format_messages ircg_set_current ircg_set_file ircg_set_on_die ircg_topic ircg_whois contained syn keyword phpFunctions java_last_exception_clear java_last_exception_get contained syn keyword phpFunctions json_decode json_encode json_last_error contained syn keyword phpFunctions ldap_8859_to_t61 ldap_add ldap_bind ldap_close ldap_compare ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_err2str ldap_errno ldap_error ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_first_reference ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_option ldap_get_values_len ldap_get_values ldap_list ldap_mod_add ldap_mod_del ldap_mod_replace ldap_modify ldap_next_attribute ldap_next_entry ldap_next_reference ldap_parse_reference ldap_parse_result ldap_read ldap_rename ldap_search ldap_set_option ldap_set_rebind_proc ldap_sort ldap_start_tls ldap_t61_to_8859 ldap_unbind contained syn keyword phpFunctions lzf_compress lzf_decompress lzf_optimized_for contained syn keyword phpFunctions ezmlm_hash mail contained syn keyword phpFunctions mailparse_determine_best_xfer_encoding mailparse_msg_create mailparse_msg_extract_part_file mailparse_msg_extract_part mailparse_msg_free mailparse_msg_get_part_data mailparse_msg_get_part mailparse_msg_get_structure mailparse_msg_parse_file mailparse_msg_parse mailparse_rfc822_parse_addresses mailparse_stream_encode mailparse_uudecode_all contained syn keyword phpFunctions abs acos acosh asin asinh atan2 atan atanh base_convert bindec ceil cos cosh decbin dechex decoct deg2rad exp expm1 floor fmod getrandmax hexdec hypot is_finite is_infinite is_nan lcg_value log10 log1p log max min mt_getrandmax mt_rand mt_srand octdec pi pow rad2deg rand round sin sinh sqrt srand tan tanh contained syn keyword phpFunctions mb_convert_case mb_convert_encoding mb_convert_kana mb_convert_variables mb_decode_mimeheader mb_decode_numericentity mb_detect_encoding mb_detect_order mb_encode_mimeheader mb_encode_numericentity mb_ereg_match mb_ereg_replace mb_ereg_search_getpos mb_ereg_search_getregs mb_ereg_search_init mb_ereg_search_pos mb_ereg_search_regs mb_ereg_search_setpos mb_ereg_search mb_ereg mb_eregi_replace mb_eregi mb_get_info mb_http_input mb_http_output mb_internal_encoding mb_language mb_output_handler mb_parse_str mb_preferred_mime_name mb_regex_encoding mb_regex_set_options mb_send_mail mb_split mb_strcut mb_strimwidth mb_strlen mb_strpos mb_strrpos mb_strtolower mb_strtoupper mb_strwidth mb_substitute_character mb_substr_count mb_substr contained syn keyword phpFunctions mcal_append_event mcal_close mcal_create_calendar mcal_date_compare mcal_date_valid mcal_day_of_week mcal_day_of_year mcal_days_in_month mcal_delete_calendar mcal_delete_event mcal_event_add_attribute mcal_event_init mcal_event_set_alarm mcal_event_set_category mcal_event_set_class mcal_event_set_description mcal_event_set_end mcal_event_set_recur_daily mcal_event_set_recur_monthly_mday mcal_event_set_recur_monthly_wday mcal_event_set_recur_none mcal_event_set_recur_weekly mcal_event_set_recur_yearly mcal_event_set_start mcal_event_set_title mcal_expunge mcal_fetch_current_stream_event mcal_fetch_event mcal_is_leap_year mcal_list_alarms mcal_list_events mcal_next_recurrence mcal_open mcal_popen mcal_rename_calendar mcal_reopen mcal_snooze mcal_store_event mcal_time_valid mcal_week_of_year contained syn keyword phpFunctions mcrypt_cbc mcrypt_cfb mcrypt_create_iv mcrypt_decrypt mcrypt_ecb mcrypt_enc_get_algorithms_name mcrypt_enc_get_block_size mcrypt_enc_get_iv_size mcrypt_enc_get_key_size mcrypt_enc_get_modes_name mcrypt_enc_get_supported_key_sizes mcrypt_enc_is_block_algorithm_mode mcrypt_enc_is_block_algorithm mcrypt_enc_is_block_mode mcrypt_enc_self_test mcrypt_encrypt mcrypt_generic_deinit mcrypt_generic_end mcrypt_generic_init mcrypt_generic mcrypt_get_block_size mcrypt_get_cipher_name mcrypt_get_iv_size mcrypt_get_key_size mcrypt_list_algorithms mcrypt_list_modes mcrypt_module_close mcrypt_module_get_algo_block_size mcrypt_module_get_algo_key_size mcrypt_module_get_supported_key_sizes mcrypt_module_is_block_algorithm_mode mcrypt_module_is_block_algorithm mcrypt_module_is_block_mode mcrypt_module_open mcrypt_module_self_test mcrypt_ofb mdecrypt_generic contained syn keyword phpFunctions mcve_adduser mcve_adduserarg mcve_bt mcve_checkstatus mcve_chkpwd mcve_chngpwd mcve_completeauthorizations mcve_connect mcve_connectionerror mcve_deleteresponse mcve_deletetrans mcve_deleteusersetup mcve_deluser mcve_destroyconn mcve_destroyengine mcve_disableuser mcve_edituser mcve_enableuser mcve_force mcve_getcell mcve_getcellbynum mcve_getcommadelimited mcve_getheader mcve_getuserarg mcve_getuserparam mcve_gft mcve_gl mcve_gut mcve_initconn mcve_initengine mcve_initusersetup mcve_iscommadelimited mcve_liststats mcve_listusers mcve_maxconntimeout mcve_monitor mcve_numcolumns mcve_numrows mcve_override mcve_parsecommadelimited mcve_ping mcve_preauth mcve_preauthcompletion mcve_qc mcve_responseparam mcve_return mcve_returncode mcve_returnstatus mcve_sale mcve_setblocking mcve_setdropfile mcve_setip mcve_setssl_files mcve_setssl mcve_settimeout mcve_settle mcve_text_avs mcve_text_code mcve_text_cv mcve_transactionauth mcve_transactionavs mcve_transactionbatch mcve_transactioncv mcve_transactionid mcve_transactionitem mcve_transactionssent mcve_transactiontext mcve_transinqueue mcve_transnew mcve_transparam mcve_transsend mcve_ub mcve_uwait mcve_verifyconnection mcve_verifysslcert mcve_void contained syn keyword phpFunctions mhash_count mhash_get_block_size mhash_get_hash_name mhash_keygen_s2k mhash contained syn keyword phpFunctions mime_content_type contained syn keyword phpFunctions ming_setcubicthreshold ming_setscale ming_useswfversion SWFAction SWFBitmap swfbutton_keypress SWFbutton SWFDisplayItem SWFFill SWFFont SWFGradient SWFMorph SWFMovie SWFShape SWFSprite SWFText SWFTextField contained syn keyword phpMethods getHeight getWidth addAction addShape setAction setdown setHit setOver setUp addColor move moveTo multColor remove Rotate rotateTo scale scaleTo setDepth setName setRatio skewX skewXTo skewY skewYTo moveTo rotateTo scaleTo skewXTo skewYTo getwidth addEntry getshape1 getshape2 add nextframe output remove save setbackground setdimension setframes setrate streammp3 addFill drawCurve drawCurveTo drawLine drawLineTo movePen movePenTo setLeftFill setLine setRightFill add nextframe remove setframes addString getWidth moveTo setColor setFont setHeight setSpacing addstring align setbounds setcolor setFont setHeight setindentation setLeftMargin setLineSpacing setMargins setname setrightMargin contained syn keyword phpFunctions connection_aborted connection_status connection_timeout constant define defined die eval exit get_browser highlight_file highlight_string ignore_user_abort pack show_source sleep uniqid unpack usleep contained syn keyword phpFunctions udm_add_search_limit udm_alloc_agent udm_api_version udm_cat_list udm_cat_path udm_check_charset udm_check_stored udm_clear_search_limits udm_close_stored udm_crc32 udm_errno udm_error udm_find udm_free_agent udm_free_ispell_data udm_free_res udm_get_doc_count udm_get_res_field udm_get_res_param udm_load_ispell_data udm_open_stored udm_set_agent_param contained syn keyword phpFunctions msession_connect msession_count msession_create msession_destroy msession_disconnect msession_find msession_get_array msession_get msession_getdata msession_inc msession_list msession_listvar msession_lock msession_plugin msession_randstr msession_set_array msession_set msession_setdata msession_timeout msession_uniq msession_unlock contained syn keyword phpFunctions msql_affected_rows msql_close msql_connect msql_create_db msql_createdb msql_data_seek msql_dbname msql_drop_db msql_dropdb msql_error msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_field_seek msql_fieldflags msql_fieldlen msql_fieldname msql_fieldtable msql_fieldtype msql_free_result msql_freeresult msql_list_dbs msql_list_fields msql_list_tables msql_listdbs msql_listfields msql_listtables msql_num_fields msql_num_rows msql_numfields msql_numrows msql_pconnect msql_query msql_regcase msql_result msql_select_db msql_selectdb msql_tablename msql contained syn keyword phpFunctions mssql_bind mssql_close mssql_connect mssql_data_seek mssql_execute mssql_fetch_array mssql_fetch_assoc mssql_fetch_batch mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_free_result mssql_free_statement mssql_get_last_message mssql_guid_string mssql_init mssql_min_error_severity mssql_min_message_severity mssql_next_result mssql_num_fields mssql_num_rows mssql_pconnect mssql_query mssql_result mssql_rows_affected mssql_select_db contained syn keyword phpFunctions muscat_close muscat_get muscat_give muscat_setup_net muscat_setup contained syn keyword phpFunctions mysql_affected_rows mysql_change_user mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query contained syn keyword phpFunctions mysqli_affected_rows mysqli_autocommit mysqli_bind_param mysqli_bind_result mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect mysqli_data_seek mysqli_debug mysqli_disable_reads_from_master mysqli_disable_rpl_parse mysqli_dump_debug_info mysqli_enable_reads_from_master mysqli_enable_rpl_parse mysqli_errno mysqli_error mysqli_execute mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_fetch mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_client_info mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_master_query mysqli_num_fields mysqli_num_rows mysqli_options mysqli_param_count mysqli_ping mysqli_prepare_result mysqli_prepare mysqli_profiler mysqli_query mysqli_read_query_result mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reload mysqli_rollback mysqli_rpl_parse_enabled mysqli_rpl_probe mysqli_rpl_query_type mysqli_select_db mysqli_send_long_data mysqli_send_query mysqli_slave_query mysqli_ssl_set mysqli_stat mysqli_stmt_affected_rows mysqli_stmt_close mysqli_stmt_errno mysqli_stmt_error mysqli_stmt_store_result mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count contained syn keyword phpFunctions ncurses_addch ncurses_addchnstr ncurses_addchstr ncurses_addnstr ncurses_addstr ncurses_assume_default_colors ncurses_attroff ncurses_attron ncurses_attrset ncurses_baudrate ncurses_beep ncurses_bkgd ncurses_bkgdset ncurses_border ncurses_bottom_panel ncurses_can_change_color ncurses_cbreak ncurses_clear ncurses_clrtobot ncurses_clrtoeol ncurses_color_content ncurses_color_set ncurses_curs_set ncurses_def_prog_mode ncurses_def_shell_mode ncurses_define_key ncurses_del_panel ncurses_delay_output ncurses_delch ncurses_deleteln ncurses_delwin ncurses_doupdate ncurses_echo ncurses_echochar ncurses_end ncurses_erase ncurses_erasechar ncurses_filter ncurses_flash ncurses_flushinp ncurses_getch ncurses_getmaxyx ncurses_getmouse ncurses_getyx ncurses_halfdelay ncurses_has_colors ncurses_has_ic ncurses_has_il ncurses_has_key ncurses_hide_panel ncurses_hline ncurses_inch ncurses_init_color ncurses_init_pair ncurses_init ncurses_insch ncurses_insdelln ncurses_insertln ncurses_insstr ncurses_instr ncurses_isendwin ncurses_keyok ncurses_keypad ncurses_killchar ncurses_longname ncurses_meta ncurses_mouse_trafo ncurses_mouseinterval ncurses_mousemask ncurses_move_panel ncurses_move ncurses_mvaddch ncurses_mvaddchnstr ncurses_mvaddchstr ncurses_mvaddnstr ncurses_mvaddstr ncurses_mvcur ncurses_mvdelch ncurses_mvgetch ncurses_mvhline ncurses_mvinch ncurses_mvvline ncurses_mvwaddstr ncurses_napms ncurses_new_panel ncurses_newpad ncurses_newwin ncurses_nl ncurses_nocbreak ncurses_noecho ncurses_nonl ncurses_noqiflush ncurses_noraw ncurses_pair_content ncurses_panel_above ncurses_panel_below ncurses_panel_window ncurses_pnoutrefresh ncurses_prefresh ncurses_putp ncurses_qiflush ncurses_raw ncurses_refresh ncurses_replace_panel ncurses_reset_prog_mode ncurses_reset_shell_mode ncurses_resetty ncurses_savetty ncurses_scr_dump ncurses_scr_init ncurses_scr_restore ncurses_scr_set ncurses_scrl ncurses_show_panel ncurses_slk_attr ncurses_slk_attroff ncurses_slk_attron ncurses_slk_attrset ncurses_slk_clear ncurses_slk_color ncurses_slk_init ncurses_slk_noutrefresh ncurses_slk_refresh ncurses_slk_restore ncurses_slk_set ncurses_slk_touch ncurses_standend ncurses_standout ncurses_start_color ncurses_termattrs ncurses_termname ncurses_timeout ncurses_top_panel ncurses_typeahead ncurses_ungetch ncurses_ungetmouse ncurses_update_panels ncurses_use_default_colors ncurses_use_env ncurses_use_extended_names ncurses_vidattr ncurses_vline ncurses_waddch ncurses_waddstr ncurses_wattroff ncurses_wattron ncurses_wattrset ncurses_wborder ncurses_wclear ncurses_wcolor_set ncurses_werase ncurses_wgetch ncurses_whline ncurses_wmouse_trafo ncurses_wmove ncurses_wnoutrefresh ncurses_wrefresh ncurses_wstandend ncurses_wstandout ncurses_wvline contained syn keyword phpFunctions checkdnsrr closelog debugger_off debugger_on define_syslog_variables dns_check_record dns_get_mx dns_get_record fsockopen gethostbyaddr gethostbyname gethostbynamel getmxrr getprotobyname getprotobynumber getservbyname getservbyport ip2long long2ip openlog pfsockopen socket_get_status socket_set_blocking socket_set_timeout syslog contained syn keyword phpFunctions yp_all yp_cat yp_err_string yp_errno yp_first yp_get_default_domain yp_master yp_match yp_next yp_order contained syn keyword phpFunctions notes_body notes_copy_db notes_create_db notes_create_note notes_drop_db notes_find_note notes_header_info notes_list_msgs notes_mark_read notes_mark_unread notes_nav_create notes_search notes_unread notes_version contained syn keyword phpFunctions nsapi_request_headers nsapi_response_headers nsapi_virtual contained syn keyword phpFunctions aggregate_info aggregate_methods_by_list aggregate_methods_by_regexp aggregate_methods aggregate_properties_by_list aggregate_properties_by_regexp aggregate_properties aggregate aggregation_info deaggregate contained syn keyword phpFunctions ocibindbyname ocicancel ocicloselob ocicollappend ocicollassign ocicollassignelem ocicollgetelem ocicollmax ocicollsize ocicolltrim ocicolumnisnull ocicolumnname ocicolumnprecision ocicolumnscale ocicolumnsize ocicolumntype ocicolumntyperaw ocicommit ocidefinebyname ocierror ociexecute ocifetch ocifetchinto ocifetchstatement ocifreecollection ocifreecursor ocifreedesc ocifreestatement ociinternaldebug ociloadlob ocilogoff ocilogon ocinewcollection ocinewcursor ocinewdescriptor ocinlogon ocinumcols ociparse ociplogon ociresult ocirollback ocirowcount ocisavelob ocisavelobfile ociserverversion ocisetprefetch ocistatementtype ociwritelobtofile ociwritetemporarylob contained syn keyword phpFunctions odbc_autocommit odbc_binmode odbc_close_all odbc_close odbc_columnprivileges odbc_columns odbc_commit odbc_connect odbc_cursor odbc_data_source odbc_do odbc_error odbc_errormsg odbc_exec odbc_execute odbc_fetch_array odbc_fetch_into odbc_fetch_object odbc_fetch_row odbc_field_len odbc_field_name odbc_field_num odbc_field_precision odbc_field_scale odbc_field_type odbc_foreignkeys odbc_free_result odbc_gettypeinfo odbc_longreadlen odbc_next_result odbc_num_fields odbc_num_rows odbc_pconnect odbc_prepare odbc_primarykeys odbc_procedurecolumns odbc_procedures odbc_result_all odbc_result odbc_rollback odbc_setoption odbc_specialcolumns odbc_statistics odbc_tableprivileges odbc_tables contained syn keyword phpFunctions openssl_cipher_iv_length openssl_csr_export_to_file openssl_csr_export openssl_csr_get_public_key openssl_csr_get_subject openssl_csr_new openssl_csr_sign openssl_decrypt openssl_dh_compute_key openssl_digest openssl_encrypt openssl_error_string openssl_free_key openssl_get_cert_locations openssl_get_cipher_methods openssl_get_md_methods openssl_get_privatekey openssl_get_publickey openssl_open openssl_pbkdf2 openssl_pkcs12_export_to_file openssl_pkcs12_export openssl_pkcs12_read openssl_pkcs7_decrypt openssl_pkcs7_encrypt openssl_pkcs7_sign openssl_pkcs7_verify openssl_pkey_export_to_file openssl_pkey_export openssl_pkey_free openssl_pkey_get_details openssl_pkey_get_private openssl_pkey_get_public openssl_pkey_new openssl_private_decrypt openssl_private_encrypt openssl_public_decrypt openssl_public_encrypt openssl_random_pseudo_bytes openssl_seal openssl_sign openssl_spki_export_challenge openssl_spki_export openssl_spki_new openssl_spki_verify openssl_verify openssl_x509_check_private_key openssl_x509_checkpurpose openssl_x509_export_to_file openssl_x509_export openssl_x509_fingerprint openssl_x509_free openssl_x509_parse openssl_x509_read contained syn keyword phpFunctions ora_bind ora_close ora_columnname ora_columnsize ora_columntype ora_commit ora_commitoff ora_commiton ora_do ora_error ora_errorcode ora_exec ora_fetch_into ora_fetch ora_getcolumn ora_logoff ora_logon ora_numcols ora_numrows ora_open ora_parse ora_plogon ora_rollback contained syn keyword phpFunctions flush ob_clean ob_end_clean ob_end_flush ob_flush ob_get_clean ob_get_contents ob_get_flush ob_get_length ob_get_level ob_get_status ob_gzhandler ob_implicit_flush ob_list_handlers ob_start output_add_rewrite_var output_reset_rewrite_vars contained syn keyword phpFunctions overload contained syn keyword phpFunctions ovrimos_close ovrimos_commit ovrimos_connect ovrimos_cursor ovrimos_exec ovrimos_execute ovrimos_fetch_into ovrimos_fetch_row ovrimos_field_len ovrimos_field_name ovrimos_field_num ovrimos_field_type ovrimos_free_result ovrimos_longreadlen ovrimos_num_fields ovrimos_num_rows ovrimos_prepare ovrimos_result_all ovrimos_result ovrimos_rollback contained syn keyword phpFunctions pcntl_exec pcntl_fork pcntl_signal pcntl_waitpid pcntl_wexitstatus pcntl_wifexited pcntl_wifsignaled pcntl_wifstopped pcntl_wstopsig pcntl_wtermsig contained syn keyword phpFunctions preg_grep preg_match_all preg_match preg_quote preg_replace_callback preg_replace preg_split contained syn keyword phpFunctions pdf_add_annotation pdf_add_bookmark pdf_add_launchlink pdf_add_locallink pdf_add_note pdf_add_outline pdf_add_pdflink pdf_add_thumbnail pdf_add_weblink pdf_arc pdf_arcn pdf_attach_file pdf_begin_page pdf_begin_pattern pdf_begin_template pdf_circle pdf_clip pdf_close_image pdf_close_pdi_page pdf_close_pdi pdf_close pdf_closepath_fill_stroke pdf_closepath_stroke pdf_closepath pdf_concat pdf_continue_text pdf_curveto pdf_delete pdf_end_page pdf_end_pattern pdf_end_template pdf_endpath pdf_fill_stroke pdf_fill pdf_findfont pdf_get_buffer pdf_get_font pdf_get_fontname pdf_get_fontsize pdf_get_image_height pdf_get_image_width pdf_get_majorversion pdf_get_minorversion pdf_get_parameter pdf_get_pdi_parameter pdf_get_pdi_value pdf_get_value pdf_initgraphics pdf_lineto pdf_makespotcolor pdf_moveto pdf_new pdf_open_CCITT pdf_open_file pdf_open_gif pdf_open_image_file pdf_open_image pdf_open_jpeg pdf_open_memory_image pdf_open_pdi_page pdf_open_pdi pdf_open_png pdf_open_tiff pdf_open pdf_place_image pdf_place_pdi_page pdf_rect pdf_restore pdf_rotate pdf_save pdf_scale pdf_set_border_color pdf_set_border_dash pdf_set_border_style pdf_set_char_spacing pdf_set_duration pdf_set_font pdf_set_horiz_scaling pdf_set_info_author pdf_set_info_creator pdf_set_info_keywords pdf_set_info_subject pdf_set_info_title pdf_set_info pdf_set_leading pdf_set_parameter pdf_set_text_matrix pdf_set_text_pos pdf_set_text_rendering pdf_set_text_rise pdf_set_value pdf_set_word_spacing pdf_setcolor pdf_setdash pdf_setflat pdf_setfont pdf_setgray_fill pdf_setgray_stroke pdf_setgray pdf_setlinecap pdf_setlinejoin pdf_setlinewidth pdf_setmatrix pdf_setmiterlimit pdf_setpolydash pdf_setrgbcolor_fill pdf_setrgbcolor_stroke pdf_setrgbcolor pdf_show_boxed pdf_show_xy pdf_show pdf_skew pdf_stringwidth pdf_stroke pdf_translate contained syn keyword phpFunctions pfpro_cleanup pfpro_init pfpro_process_raw pfpro_process pfpro_version contained syn keyword phpFunctions pg_affected_rows pg_cancel_query pg_client_encoding pg_close pg_connect pg_connection_busy pg_connection_reset pg_connection_status pg_convert pg_copy_from pg_copy_to pg_dbname pg_delete pg_end_copy pg_escape_bytea pg_escape_string pg_fetch_all pg_fetch_array pg_fetch_assoc pg_fetch_object pg_fetch_result pg_fetch_row pg_field_is_null pg_field_name pg_field_num pg_field_prtlen pg_field_size pg_field_type pg_free_result pg_get_notify pg_get_pid pg_get_result pg_host pg_insert pg_last_error pg_last_notice pg_last_oid pg_lo_close pg_lo_create pg_lo_export pg_lo_import pg_lo_open pg_lo_read_all pg_lo_read pg_lo_seek pg_lo_tell pg_lo_unlink pg_lo_write pg_meta_data pg_num_fields pg_num_rows pg_options pg_pconnect pg_ping pg_port pg_put_line pg_query pg_result_error pg_result_seek pg_result_status pg_select pg_send_query pg_set_client_encoding pg_trace pg_tty pg_unescape_bytea pg_untrace pg_update contained syn keyword phpFunctions posix_ctermid posix_get_last_error posix_getcwd posix_getegid posix_geteuid posix_getgid posix_getgrgid posix_getgrnam posix_getgroups posix_getlogin posix_getpgid posix_getpgrp posix_getpid posix_getppid posix_getpwnam posix_getpwuid posix_getrlimit posix_getsid posix_getuid posix_isatty posix_kill posix_mkfifo posix_setegid posix_seteuid posix_setgid posix_setpgid posix_setsid posix_setuid posix_strerror posix_times posix_ttyname posix_uname contained syn keyword phpFunctions printer_abort printer_close printer_create_brush printer_create_dc printer_create_font printer_create_pen printer_delete_brush printer_delete_dc printer_delete_font printer_delete_pen printer_draw_bmp printer_draw_chord printer_draw_elipse printer_draw_line printer_draw_pie printer_draw_rectangle printer_draw_roundrect printer_draw_text printer_end_doc printer_end_page printer_get_option printer_list printer_logical_fontheight printer_open printer_select_brush printer_select_font printer_select_pen printer_set_option printer_start_doc printer_start_page printer_write contained syn keyword phpFunctions pspell_add_to_personal pspell_add_to_session pspell_check pspell_clear_session pspell_config_create pspell_config_ignore pspell_config_mode pspell_config_personal pspell_config_repl pspell_config_runtogether pspell_config_save_repl pspell_new_config pspell_new_personal pspell_new pspell_save_wordlist pspell_store_replacement pspell_suggest contained syn keyword phpFunctions qdom_error qdom_tree contained syn keyword phpFunctions readline_add_history readline_clear_history readline_completion_function readline_info readline_list_history readline_read_history readline_write_history readline contained syn keyword phpFunctions recode_file recode_string recode contained syn keyword phpFunctions ereg_replace ereg eregi_replace eregi split spliti sql_regcase contained syn keyword phpFunctions ftok msg_get_queue msg_receive msg_remove_queue msg_send msg_set_queue msg_stat_queue sem_acquire sem_get sem_release sem_remove shm_attach shm_detach shm_get_var shm_put_var shm_remove_var shm_remove contained syn keyword phpFunctions sesam_affected_rows sesam_commit sesam_connect sesam_diagnostic sesam_disconnect sesam_errormsg sesam_execimm sesam_fetch_array sesam_fetch_result sesam_fetch_row sesam_field_array sesam_field_name sesam_free_result sesam_num_fields sesam_query sesam_rollback sesam_seek_row sesam_settransaction contained syn keyword phpFunctions session_cache_expire session_cache_limiter session_decode session_destroy session_encode session_get_cookie_params session_id session_is_registered session_module_name session_name session_regenerate_id session_register session_save_path session_set_cookie_params session_set_save_handler session_start session_unregister session_unset session_write_close contained syn keyword phpFunctions shmop_close shmop_delete shmop_open shmop_read shmop_size shmop_write contained syn keyword phpFunctions snmp_get_quick_print snmp_set_quick_print snmpget snmprealwalk snmpset snmpwalk snmpwalkoid contained syn keyword phpFunctions socket_accept socket_bind socket_clear_error socket_close socket_connect socket_create_listen socket_create_pair socket_create socket_get_option socket_getpeername socket_getsockname socket_iovec_add socket_iovec_alloc socket_iovec_delete socket_iovec_fetch socket_iovec_free socket_iovec_set socket_last_error socket_listen socket_read socket_readv socket_recv socket_recvfrom socket_recvmsg socket_select socket_send socket_sendmsg socket_sendto socket_set_block socket_set_nonblock socket_set_option socket_shutdown socket_strerror socket_write socket_writev contained syn keyword phpFunctions sqlite_array_query sqlite_busy_timeout sqlite_changes sqlite_close sqlite_column sqlite_create_aggregate sqlite_create_function sqlite_current sqlite_error_string sqlite_escape_string sqlite_fetch_array sqlite_fetch_single sqlite_fetch_string sqlite_field_name sqlite_has_more sqlite_last_error sqlite_last_insert_rowid sqlite_libencoding sqlite_libversion sqlite_next sqlite_num_fields sqlite_num_rows sqlite_open sqlite_popen sqlite_query sqlite_rewind sqlite_seek sqlite_udf_decode_binary sqlite_udf_encode_binary sqlite_unbuffered_query contained syn keyword phpFunctions stream_context_create stream_context_get_options stream_context_set_option stream_context_set_params stream_copy_to_stream stream_filter_append stream_filter_prepend stream_filter_register stream_get_contents stream_get_filters stream_get_line stream_get_meta_data stream_get_transports stream_get_wrappers stream_register_wrapper stream_select stream_set_blocking stream_set_timeout stream_set_write_buffer stream_socket_accept stream_socket_client stream_socket_get_name stream_socket_recvfrom stream_socket_sendto stream_socket_server stream_wrapper_register contained syn keyword phpFunctions addcslashes addslashes bin2hex chop chr chunk_split convert_cyr_string count_chars crc32 crypt explode fprintf get_html_translation_table hebrev hebrevc html_entity_decode htmlentities htmlspecialchars implode join levenshtein localeconv ltrim md5_file md5 metaphone money_format nl_langinfo nl2br number_format ord parse_str print printf quoted_printable_decode quotemeta rtrim setlocale sha1_file sha1 similar_text soundex sprintf sscanf str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr_compare substr_count substr_replace substr trim ucfirst ucwords vprintf vsprintf wordwrap contained syn keyword phpFunctions swf_actiongeturl swf_actiongotoframe swf_actiongotolabel swf_actionnextframe swf_actionplay swf_actionprevframe swf_actionsettarget swf_actionstop swf_actiontogglequality swf_actionwaitforframe swf_addbuttonrecord swf_addcolor swf_closefile swf_definebitmap swf_definefont swf_defineline swf_definepoly swf_definerect swf_definetext swf_endbutton swf_enddoaction swf_endshape swf_endsymbol swf_fontsize swf_fontslant swf_fonttracking swf_getbitmapinfo swf_getfontinfo swf_getframe swf_labelframe swf_lookat swf_modifyobject swf_mulcolor swf_nextid swf_oncondition swf_openfile swf_ortho2 swf_ortho swf_perspective swf_placeobject swf_polarview swf_popmatrix swf_posround swf_pushmatrix swf_removeobject swf_rotate swf_scale swf_setfont swf_setframe swf_shapearc swf_shapecurveto3 swf_shapecurveto swf_shapefillbitmapclip swf_shapefillbitmaptile swf_shapefilloff swf_shapefillsolid swf_shapelinesolid swf_shapelineto swf_shapemoveto swf_showframe swf_startbutton swf_startdoaction swf_startshape swf_startsymbol swf_textwidth swf_translate swf_viewport contained syn keyword phpFunctions sybase_affected_rows sybase_close sybase_connect sybase_data_seek sybase_deadlock_retry_count sybase_fetch_array sybase_fetch_assoc sybase_fetch_field sybase_fetch_object sybase_fetch_row sybase_field_seek sybase_free_result sybase_get_last_message sybase_min_client_severity sybase_min_error_severity sybase_min_message_severity sybase_min_server_severity sybase_num_fields sybase_num_rows sybase_pconnect sybase_query sybase_result sybase_select_db sybase_set_message_handler sybase_unbuffered_query contained syn keyword phpFunctions tidy_access_count tidy_clean_repair tidy_config_count tidy_diagnose tidy_error_count tidy_get_body tidy_get_config tidy_get_error_buffer tidy_get_head tidy_get_html_ver tidy_get_html tidy_get_output tidy_get_release tidy_get_root tidy_get_status tidy_getopt tidy_is_xhtml tidy_load_config tidy_parse_file tidy_parse_string tidy_repair_file tidy_repair_string tidy_reset_config tidy_save_config tidy_set_encoding tidy_setopt tidy_warning_count contained syn keyword phpMethods attributes children get_attr get_nodes has_children has_siblings is_asp is_comment is_html is_jsp is_jste is_text is_xhtml is_xml next prev tidy_node contained syn keyword phpFunctions token_get_all token_name contained syn keyword phpFunctions base64_decode base64_encode get_meta_tags http_build_query parse_url rawurldecode rawurlencode urldecode urlencode contained syn keyword phpFunctions doubleval empty floatval get_defined_vars get_resource_type gettype import_request_variables intval is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string isset print_r serialize settype strval unserialize unset var_dump var_export contained syn keyword phpFunctions vpopmail_add_alias_domain_ex vpopmail_add_alias_domain vpopmail_add_domain_ex vpopmail_add_domain vpopmail_add_user vpopmail_alias_add vpopmail_alias_del_domain vpopmail_alias_del vpopmail_alias_get_all vpopmail_alias_get vpopmail_auth_user vpopmail_del_domain_ex vpopmail_del_domain vpopmail_del_user vpopmail_error vpopmail_passwd vpopmail_set_user_quota contained syn keyword phpFunctions w32api_deftype w32api_init_dtype w32api_invoke_function w32api_register_function w32api_set_call_method contained syn keyword phpFunctions wddx_add_vars wddx_deserialize wddx_packet_end wddx_packet_start wddx_serialize_value wddx_serialize_vars contained syn keyword phpFunctions utf8_decode utf8_encode xml_error_string xml_get_current_byte_index xml_get_current_column_number xml_get_current_line_number xml_get_error_code xml_parse_into_struct xml_parse xml_parser_create_ns xml_parser_create xml_parser_free xml_parser_get_option xml_parser_set_option xml_set_character_data_handler xml_set_default_handler xml_set_element_handler xml_set_end_namespace_decl_handler xml_set_external_entity_ref_handler xml_set_notation_decl_handler xml_set_object xml_set_processing_instruction_handler xml_set_start_namespace_decl_handler xml_set_unparsed_entity_decl_handler contained syn keyword phpFunctions xmlrpc_decode_request xmlrpc_decode xmlrpc_encode_request xmlrpc_encode xmlrpc_get_type xmlrpc_parse_method_descriptions xmlrpc_server_add_introspection_data xmlrpc_server_call_method xmlrpc_server_create xmlrpc_server_destroy xmlrpc_server_register_introspection_callback xmlrpc_server_register_method xmlrpc_set_type contained syn keyword phpFunctions xslt_create xslt_errno xslt_error xslt_free xslt_output_process xslt_set_base xslt_set_encoding xslt_set_error_handler xslt_set_log xslt_set_sax_handler xslt_set_sax_handlers xslt_set_scheme_handler xslt_set_scheme_handlers contained syn keyword phpFunctions yaz_addinfo yaz_ccl_conf yaz_ccl_parse yaz_close yaz_connect yaz_database yaz_element yaz_errno yaz_error yaz_es_result yaz_get_option yaz_hits yaz_itemorder yaz_present yaz_range yaz_record yaz_scan_result yaz_scan yaz_schema yaz_search yaz_set_option yaz_sort yaz_syntax yaz_wait contained syn keyword phpFunctions zip_close zip_entry_close zip_entry_compressedsize zip_entry_compressionmethod zip_entry_filesize zip_entry_name zip_entry_open zip_entry_read zip_open zip_read contained syn keyword phpFunctions gzclose gzcompress gzdeflate gzencode gzeof gzfile gzgetc gzgets gzgetss gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzuncompress gzwrite readgzfile zlib_get_coding_type contained if exists( "php_baselib" ) syn keyword phpMethods query next_record num_rows affected_rows nf f p np num_fields haltmsg seek link_id query_id metadata table_names nextid connect halt free register unregister is_registered delete url purl self_url pself_url hidden_session add_query padd_query reimport_get_vars reimport_post_vars reimport_cookie_vars set_container set_tokenname release_token put_headers get_id get_id put_id freeze thaw gc reimport_any_vars start url purl login_if is_authenticated auth_preauth auth_loginform auth_validatelogin auth_refreshlogin auth_registerform auth_doregister start check have_perm permsum perm_invalid contained syn keyword phpFunctions page_open page_close sess_load sess_save contained endif " Conditional syn keyword phpConditional declare else enddeclare endswitch elseif endif if switch contained " Repeat syn keyword phpRepeat as do endfor endforeach endwhile for foreach while contained " Repeat syn keyword phpLabel case default switch contained " Statement syn keyword phpStatement return break continue exit goto yield contained " Keyword syn keyword phpKeyword var const contained " Type syn keyword phpType bool boolean int integer real double float string array object NULL callable iterable contained " Structure syn keyword phpStructure namespace extends implements instanceof parent self contained " Operator syn match phpOperator "[-=+%^&|*!.~?:]" contained display syn match phpOperator "[-+*/%^&|.]=" contained display syn match phpOperator "/[^*/]"me=e-1 contained display syn match phpOperator "\$" contained display syn match phpOperator "&&\|\" contained display syn match phpOperator "||\|\" contained display syn match phpRelation "[!=<>]=" contained display syn match phpRelation "[<>]" contained display syn match phpMemberSelector "->" contained display syn match phpVarSelector "\$" contained display " Identifier syn match phpIdentifier "$\h\w*" contained contains=phpEnvVar,phpIntVar,phpVarSelector display syn match phpIdentifierSimply "${\h\w*}" contains=phpOperator,phpParent contained display syn region phpIdentifierComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained " Interpolated indentifiers (inside strings) syn match phpBrackets "[][}{]" contained display " errors syn match phpInterpSimpleError "\[[^]]*\]" contained display " fallback (if nothing else matches) syn match phpInterpSimpleError "->[^a-zA-Z_]" contained display " make sure these stay above the correct DollarCurlies so they don't take priority syn match phpInterpBogusDollarCurley "${[^}]*}" contained display " fallback (if nothing else matches) syn match phpinterpSimpleBracketsInner "\w\+" contained syn match phpInterpSimpleBrackets "\[\h\w*]" contained contains=phpBrackets,phpInterpSimpleBracketsInner syn match phpInterpSimpleBrackets "\[\d\+]" contained contains=phpBrackets,phpInterpSimpleBracketsInner syn match phpInterpSimpleBrackets "\[0[xX]\x\+]" contained contains=phpBrackets,phpInterpSimpleBracketsInner syn match phpInterpSimple "\$\h\w*\(\[[^]]*\]\|->\h\w*\)\?" contained contains=phpInterpSimpleBrackets,phpIdentifier,phpInterpSimpleError,phpMethods,phpMemberSelector display syn match phpInterpVarname "\h\w*" contained syn match phpInterpMethodName "\h\w*" contained " default color syn match phpInterpSimpleCurly "\${\h\w*}" contains=phpInterpVarname contained extend syn region phpInterpDollarCurley1Helper matchgroup=phpParent start="{" end="\[" contains=phpInterpVarname contained syn region phpInterpDollarCurly1 matchgroup=phpParent start="\${\h\w*\["rs=s+1 end="]}" contains=phpInterpDollarCurley1Helper,@phpClConst contained extend syn match phpInterpDollarCurley2Helper "{\h\w*->" contains=phpBrackets,phpInterpVarname,phpMemberSelector contained syn region phpInterpDollarCurly2 matchgroup=phpParent start="\${\h\w*->"rs=s+1 end="}" contains=phpInterpDollarCurley2Helper,phpInterpMethodName contained syn match phpInterpBogusDollarCurley "${\h\w*->}" contained display syn match phpInterpBogusDollarCurley "${\h\w*\[]}" contained display syn region phpInterpComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained " define a cluster to get all interpolation syntaxes for double-quoted strings syn cluster phpInterpDouble contains=phpInterpSimple,phpInterpSimpleCurly,phpInterpDollarCurly1,phpInterpDollarCurly2,phpInterpBogusDollarCurley,phpInterpComplex " Methoden syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display " Include syn keyword phpInclude include require include_once require_once use contained " Define syn keyword phpDefine new clone contained " Boolean syn keyword phpBoolean true false contained " Number syn match phpNumber "-\=\<\d\+\>" contained display syn match phpNumber "\<0x\x\{1,8}\>" contained display " Float syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display " Backslash escapes syn case match " for double quotes and heredoc syn match phpBackslashSequences "\\[fnrtv\\\"$]" contained display syn match phpBackslashSequences "\\\d\{1,3}" contained contains=phpOctalError display syn match phpBackslashSequences "\\x\x\{1,2}" contained display " additional sequence for double quotes only syn match phpBackslashDoubleQuote "\\[\"]" contained display " for single quotes only syn match phpBackslashSingleQuote "\\[\\']" contained display syn case ignore " Error syn match phpOctalError "[89]" contained display if exists("php_parent_error_close") syn match phpParentError "[)\]}]" contained display endif " Todo syn keyword phpTodo todo fixme xxx contained " Comment if exists("php_parent_error_open") syn region phpComment start="/\*" end="\*/" contained contains=phpTodo,@Spell else syn region phpComment start="/\*" end="\*/" contained contains=phpTodo,@Spell extend endif syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell " String if exists("php_parent_error_open") syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble,@Spell contained keepend syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained keepend syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote,@Spell contained keepend else syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble,@Spell contained extend keepend syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained extend keepend syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote,@Spell contained keepend extend endif " HereDoc and NowDoc syn case match " HereDoc syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend " including HTML,JavaScript,SQL even if not enabled via options syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend " NowDoc syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained contains=@Spell keepend extend " including HTML,JavaScript,SQL even if not enabled via options syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,@Spell keepend extend syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,@Spell keepend extend syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,@Spell keepend extend syn case ignore " Parent if exists("php_parent_error_close") || exists("php_parent_error_open") syn match phpParent "[{}]" contained syn region phpParent matchgroup=Delimiter start="(" end=")" contained contains=@phpClInside transparent syn region phpParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phpClInside transparent if !exists("php_parent_error_close") syn match phpParent "[\])]" contained endif else syn match phpParent "[({[\]})]" contained endif syn cluster phpClConst contains=phpFunctions,phpIdentifier,phpConditional,phpRepeat,phpStatement,phpOperator,phpRelation,phpStringSingle,phpStringDouble,phpBacktick,phpNumber,phpFloat,phpKeyword,phpType,phpBoolean,phpStructure,phpMethodsVar,phpConstant,phpCoreConstant,phpException syn cluster phpClInside contains=@phpClConst,phpComment,phpLabel,phpParent,phpParentError,phpInclude,phpHereDoc,phpNowDoc syn cluster phpClFunction contains=@phpClInside,phpDefine,phpParentError,phpStorageClass syn cluster phpClTop contains=@phpClFunction,phpFoldFunction,phpFoldClass,phpFoldInterface,phpFoldTry,phpFoldCatch " Php Region if exists("php_parent_error_open") if exists("php_noShortTags") syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop else syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop endif syn region phpRegionSc matchgroup=Delimiter start=++ contains=@phpClTop if exists("php_asp_tags") syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop endif else if exists("php_noShortTags") syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop keepend else syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop keepend endif syn region phpRegionSc matchgroup=Delimiter start=++ contains=@phpClTop keepend if exists("php_asp_tags") syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop keepend endif endif " Fold if exists("php_folding") && php_folding==1 " match one line constructs here and skip them at folding syn keyword phpSCKeyword abstract final private protected public static contained syn keyword phpFCKeyword function contained syn keyword phpStorageClass global contained syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*\(trait\|class\)\(\s\+.*}\)\@=" contained syn match phpStructure "\(\s\|^\)interface\(\s\+.*}\)\@=" contained syn match phpException "\(\s\|^\)try\(\s\+.*}\)\@=" contained syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained syn match phpException "\(\s\|^\)finally\(\s\+.*}\)\@=" contained set foldmethod=syntax syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="" end="-]@]\=?[<>]@!" contained containedin=phpRegion " highlight the 'instanceof' operator as a comparison operator rather than a structure syntax case ignore syntax keyword phpComparison instanceof contained containedin=phpRegion hi def link phpComparison Statement endif " ================================================================ " Sync if php_sync_method==-1 if exists("php_noShortTags") syn sync match phpRegionSync grouphere phpRegion "^\s*\s*$+ if exists("php_asp_tags") syn sync match phpRegionSync grouphere phpRegionAsp "^\s*<%\(=\)\=\s*$" endif syn sync match phpRegionSync grouphere NONE "^\s*?>\s*$" syn sync match phpRegionSync grouphere NONE "^\s*%>\s*$" syn sync match phpRegionSync grouphere phpRegion "function\s.*(.*\$" "syn sync match phpRegionSync grouphere NONE "/\i*>\s*$" elseif php_sync_method>0 exec "syn sync minlines=" . php_sync_method else exec "syn sync fromstart" endif syntax match phpDocCustomTags "@[a-zA-Z]*\(\s\+\|\n\|\r\)" containedin=phpComment syntax region phpDocTags start="{@\(example\|id\|internal\|inheritdoc\|link\|source\|toc\|tutorial\)" end="}" containedin=phpComment syntax match phpDocTags "@\(abstract\|access\|author\|category\|copyright\|deprecated\|example\|final\|global\|ignore\|internal\|license\|link\|method\|name\|package\|param\|property\|return\|see\|since\|static\|staticvar\|subpackage\|tutorial\|uses\|var\|version\|contributor\|modified\|filename\|description\|filesource\|throws\)\(\s\+\)\?" containedin=phpComment syntax match phpDocTodo "@\(todo\|fixme\|xxx\)\(\s\+\)\?" containedin=phpComment " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link phpConstant Constant hi def link phpCoreConstant Constant hi def link phpComment Comment hi def link phpDocTags PreProc hi def link phpDocCustomTags Type hi def link phpException Exception hi def link phpBoolean Boolean hi def link phpStorageClass StorageClass hi def link phpSCKeyword StorageClass hi def link phpFCKeyword Define hi def link phpStructure Structure hi def link phpStringSingle String hi def link phpStringDouble String hi def link phpBacktick String hi def link phpNumber Number hi def link phpFloat Float hi def link phpMethods Function hi def link phpFunctions Function hi def link phpBaselib Function hi def link phpRepeat Repeat hi def link phpConditional Conditional hi def link phpLabel Label hi def link phpStatement Statement hi def link phpKeyword Statement hi def link phpType Type hi def link phpInclude Include hi def link phpDefine Define hi def link phpBackslashSequences SpecialChar hi def link phpBackslashDoubleQuote SpecialChar hi def link phpBackslashSingleQuote SpecialChar hi def link phpParent Delimiter hi def link phpBrackets Delimiter hi def link phpIdentifierConst Delimiter hi def link phpParentError Error hi def link phpOctalError Error hi def link phpInterpSimpleError Error hi def link phpInterpBogusDollarCurley Error hi def link phpInterpDollarCurly1 Error hi def link phpInterpDollarCurly2 Error hi def link phpInterpSimpleBracketsInner String hi def link phpInterpSimpleCurly Delimiter hi def link phpInterpVarname Identifier hi def link phpTodo Todo hi def link phpDocTodo Todo hi def link phpMemberSelector Structure if exists("php_oldStyle") hi def phpIntVar guifg=Red ctermfg=DarkRed hi def phpEnvVar guifg=Red ctermfg=DarkRed hi def phpOperator guifg=SeaGreen ctermfg=DarkGreen hi def phpVarSelector guifg=SeaGreen ctermfg=DarkGreen hi def phpRelation guifg=SeaGreen ctermfg=DarkGreen hi def phpIdentifier guifg=DarkGray ctermfg=Brown hi def phpIdentifierSimply guifg=DarkGray ctermfg=Brown else hi def link phpIntVar Identifier hi def link phpEnvVar Identifier hi def link phpOperator Operator hi def link phpVarSelector Operator hi def link phpRelation Operator hi def link phpIdentifier Identifier hi def link phpIdentifierSimply Identifier endif let b:current_syntax = "php" if main_syntax == 'php' unlet main_syntax endif " put cpoptions back the way we found it let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sts=2 sw=2 expandtab neovim-0.2.2/runtime/syntax/phtml.vim000066400000000000000000000002271320401574200176610ustar00rootroot00000000000000" Vim syntax file " PHTML used to be the filetype for PHP 2.0. Now everything is PHP. if !exists("b:current_syntax") runtime! syntax/php.vim endif neovim-0.2.2/runtime/syntax/pic.vim000066400000000000000000000064051320401574200173140ustar00rootroot00000000000000" Vim syntax file " Language: PIC16F84 Assembler (Microchip's microcontroller) " Maintainer: Aleksandar Veselinovic " Last Change: 2003 May 11 " URL: http://galeb.etf.bg.ac.yu/~alexa/vim/syntax/pic.vim " Revision: 1.01 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match syn keyword picTodo NOTE TODO XXX contained syn case ignore syn match picIdentifier "[a-z_$][a-z0-9_$]*" syn match picLabel "^[A-Z_$][A-Z0-9_$]*" syn match picLabel "^[A-Z_$][A-Z0-9_$]*:"me=e-1 syn match picASCII "A\='.'" syn match picBinary "B'[0-1]\+'" syn match picDecimal "D'\d\+'" syn match picDecimal "\d\+" syn match picHexadecimal "0x\x\+" syn match picHexadecimal "H'\x\+'" syn match picHexadecimal "[0-9]\x*h" syn match picOctal "O'[0-7]\o*'" syn match picComment ";.*" contains=picTodo syn region picString start=+"+ end=+"+ syn keyword picRegister INDF TMR0 PCL STATUS FSR PORTA PORTB syn keyword picRegister EEDATA EEADR PCLATH INTCON INDF OPTION_REG PCL syn keyword picRegister FSR TRISA TRISB EECON1 EECON2 INTCON OPTION " Register --- bits " STATUS syn keyword picRegisterPart IRP RP1 RP0 TO PD Z DC C " PORTA syn keyword picRegisterPart T0CKI syn match picRegisterPart "RA[0-4]" " PORTB syn keyword picRegisterPart INT syn match picRegisterPart "RB[0-7]" " INTCON syn keyword picRegisterPart GIE EEIE T0IE INTE RBIE T0IF INTF RBIF " OPTION syn keyword picRegisterPart RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS0 " EECON2 syn keyword picRegisterPart EEIF WRERR WREN WR RD " INTCON syn keyword picRegisterPart GIE EEIE T0IE INTE RBIE T0IF INTF RBIF " OpCodes... syn keyword picOpcode ADDWF ANDWF CLRF CLRW COMF DECF DECFSZ INCF INCFSZ syn keyword picOpcode IORWF MOVF MOVWF NOP RLF RRF SUBWF SWAPF XORWF syn keyword picOpcode BCF BSF BTFSC BTFSS syn keyword picOpcode ADDLW ANDLW CALL CLRWDT GOTO IORLW MOVLW RETFIE syn keyword picOpcode RETLW RETURN SLEEP SUBLW XORLW syn keyword picOpcode GOTO " Directives syn keyword picDirective __BADRAM BANKISEL BANKSEL CBLOCK CODE __CONFIG syn keyword picDirective CONSTANT DATA DB DE DT DW ELSE END ENDC syn keyword picDirective ENDIF ENDM ENDW EQU ERROR ERRORLEVEL EXITM EXPAND syn keyword picDirective EXTERN FILL GLOBAL IDATA __IDLOCS IF IFDEF IFNDEF syn keyword picDirective INCLUDE LIST LOCAL MACRO __MAXRAM MESSG NOEXPAND syn keyword picDirective NOLIST ORG PAGE PAGESEL PROCESSOR RADIX RES SET syn keyword picDirective SPACE SUBTITLE TITLE UDATA UDATA_OVR UDATA_SHR syn keyword picDirective VARIABLE WHILE INCLUDE syn match picDirective "#\=UNDEFINE" syn match picDirective "#\=INCLUDE" syn match picDirective "#\=DEFINE" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link picTodo Todo hi def link picComment Comment hi def link picDirective Statement hi def link picLabel Label hi def link picString String "hi def link picOpcode Keyword "hi def link picRegister Structure "hi def link picRegisterPart Special hi def link picASCII String hi def link picBinary Number hi def link picDecimal Number hi def link picHexadecimal Number hi def link picOctal Number hi def link picIdentifier Identifier let b:current_syntax = "pic" " vim: ts=8 neovim-0.2.2/runtime/syntax/pike.vim000066400000000000000000000143551320401574200174740ustar00rootroot00000000000000" Vim syntax file " Language: Pike " Maintainer: Francesco Chemolli " Last Change: 2001 May 10 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " A bunch of useful C keywords syn keyword pikeStatement goto break return continue syn keyword pikeLabel case default syn keyword pikeConditional if else switch syn keyword pikeRepeat while for foreach do syn keyword pikeStatement gauge destruct lambda inherit import typeof syn keyword pikeException catch syn keyword pikeType inline nomask private protected public static syn keyword pikeTodo contained TODO FIXME XXX " String and Character constants " Highlight special characters (those which have a backslash) differently syn match pikeSpecial contained "\\[0-7][0-7][0-7]\=\|\\." syn region pikeString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial syn match pikeCharacter "'[^\\]'" syn match pikeSpecialCharacter "'\\.'" syn match pikeSpecialCharacter "'\\[0-7][0-7]'" syn match pikeSpecialCharacter "'\\[0-7][0-7][0-7]'" " Compound data types syn region pikeCompoundType start='({' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='})' syn region pikeCompoundType start='(\[' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='\])' syn region pikeCompoundType start='(<' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='>)' "catch errors caused by wrong parenthesis syn region pikeParen transparent start='([^{[<(]' end=')' contains=ALLBUT,pikeParenError,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField syn match pikeParenError ")" syn match pikeInParen contained "[^(][{}][^)]" "integer number, or floating point number without a dot and with "f". syn case ignore syn match pikeNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" "floating point number, with dot, optional exponent syn match pikeFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, starting with a dot, optional exponent syn match pikeFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match pikeFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" "hex number syn match pikeNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" "syn match pikeIdentifier "\<[a-z_][a-z0-9_]*\>" syn case match " flag an octal number with wrong digits syn match pikeOctalError "\<0[0-7]*[89]" if exists("c_comment_strings") " A comment can contain pikeString, pikeCharacter and pikeNumber. " But a "*/" inside a pikeString in a pikeComment DOES end the comment! So we " need to use a special type of pikeString: pikeCommentString, which also ends on " "*/", and sees a "*" at the start of the line as comment again. " Unfortunately this doesn't very well work for // type of comments :-( syntax match pikeCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region pikeCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=pikeSpecial,pikeCommentSkip syntax region pikeComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=pikeSpecial syntax region pikeComment start="/\*" end="\*/" contains=pikeTodo,pikeCommentString,pikeCharacter,pikeNumber,pikeFloat syntax match pikeComment "//.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber syntax match pikeComment "#\!.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber else syn region pikeComment start="/\*" end="\*/" contains=pikeTodo syn match pikeComment "//.*" contains=pikeTodo syn match pikeComment "#!.*" contains=pikeTodo endif syntax match pikeCommentError "\*/" syn keyword pikeOperator sizeof syn keyword pikeType int string void float mapping array multiset mixed syn keyword pikeType program object function syn region pikePreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=pikeComment,pikeString,pikeCharacter,pikeNumber,pikeCommentError syn region pikeIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match pikeIncluded contained "<[^>]*>" syn match pikeInclude "^\s*#\s*include\>\s*["<]" contains=pikeIncluded "syn match pikeLineSkip "\\$" syn region pikeDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen syn region pikePreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen " Highlight User Labels syn region pikeMulti transparent start='?' end=':' contains=ALLBUT,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField " Avoid matching foo::bar() in C++ by requiring that the next char is not ':' syn match pikeUserLabel "^\s*\I\i*\s*:$" syn match pikeUserLabel ";\s*\I\i*\s*:$"ms=s+1 syn match pikeUserLabel "^\s*\I\i*\s*:[^:]"me=e-1 syn match pikeUserLabel ";\s*\I\i*\s*:[^:]"ms=s+1,me=e-1 " Avoid recognizing most bitfields as labels syn match pikeBitField "^\s*\I\i*\s*:\s*[1-9]"me=e-1 syn match pikeBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1 syn sync ccomment pikeComment minlines=10 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link pikeLabel Label hi def link pikeUserLabel Label hi def link pikeConditional Conditional hi def link pikeRepeat Repeat hi def link pikeCharacter Character hi def link pikeSpecialCharacter pikeSpecial hi def link pikeNumber Number hi def link pikeFloat Float hi def link pikeOctalError pikeError hi def link pikeParenError pikeError hi def link pikeInParen pikeError hi def link pikeCommentError pikeError hi def link pikeOperator Operator hi def link pikeInclude Include hi def link pikePreProc PreProc hi def link pikeDefine Macro hi def link pikeIncluded pikeString hi def link pikeError Error hi def link pikeStatement Statement hi def link pikePreCondit PreCondit hi def link pikeType Type hi def link pikeCommentError pikeError hi def link pikeCommentString pikeString hi def link pikeComment2String pikeString hi def link pikeCommentSkip pikeComment hi def link pikeString String hi def link pikeComment Comment hi def link pikeSpecial SpecialChar hi def link pikeTodo Todo hi def link pikeException pikeStatement hi def link pikeCompoundType Constant "hi def link pikeIdentifier Identifier let b:current_syntax = "pike" " vim: ts=8 neovim-0.2.2/runtime/syntax/pilrc.vim000066400000000000000000000122771320401574200176560ustar00rootroot00000000000000" Vim syntax file " Language: pilrc - a resource compiler for Palm OS development " Maintainer: Brian Schau " Last change: 2003 May 11 " Available on: http://www.schau.com/pilrcvim/pilrc.vim " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " Notes: TRANSPARENT, FONT and FONT ID are defined in the specials " section below. Beware of the order of the specials! " Look in the syntax.txt and usr_27.txt files in vim\vim{version}\doc " directory for regexps etc. " Keywords - basic syn keyword pilrcKeyword ALERT APPLICATION APPLICATIONICONNAME AREA syn keyword pilrcKeyword BITMAP BITMAPCOLOR BITMAPCOLOR16 BITMAPCOLOR16K syn keyword pilrcKeyword BITMAPFAMILY BITMAPFAMILYEX BITMAPFAMILYSPECIAL syn keyword pilrcKeyword BITMAPGREY BITMAPGREY16 BITMAPSCREENFAMILY syn keyword pilrcKeyword BOOTSCREENFAMILY BUTTON BUTTONS BYTELIST syn keyword pilrcKeyword CATEGORIES CHECKBOX COUNTRYLOCALISATION syn keyword pilrcKeyword DATA syn keyword pilrcKeyword FEATURE FIELD FONTINDEX FORM FORMBITMAP syn keyword pilrcKeyword GADGET GENERATEHEADER syn keyword pilrcKeyword GRAFFITIINPUTAREA GRAFFITISTATEINDICATOR syn keyword pilrcKeyword HEX syn keyword pilrcKeyword ICON ICONFAMILY ICONFAMILYEX INTEGER syn keyword pilrcKeyword KEYBOARD syn keyword pilrcKeyword LABEL LAUNCHERCATEGORY LIST LONGWORDLIST syn keyword pilrcKeyword MENU MENUITEM MESSAGE MIDI syn keyword pilrcKeyword PALETTETABLE POPUPLIST POPUPTRIGGER syn keyword pilrcKeyword PULLDOWN PUSHBUTTON syn keyword pilrcKeyword REPEATBUTTON RESETAUTOID syn keyword pilrcKeyword SCROLLBAR SELECTORTRIGGER SLIDER SMALLICON syn keyword pilrcKeyword SMALLICONFAMILY SMALLICONFAMILYEX STRING STRINGTABLE syn keyword pilrcKeyword TABLE TITLE TRANSLATION TRAP syn keyword pilrcKeyword VERSION syn keyword pilrcKeyword WORDLIST " Types syn keyword pilrcType AT AUTOSHIFT syn keyword pilrcType BACKGROUNDID BITMAPID BOLDFRAME BPP syn keyword pilrcType CHECKED COLORTABLE COLUMNS COLUMNWIDTHS COMPRESS syn keyword pilrcType COMPRESSBEST COMPRESSPACKBITS COMPRESSRLE COMPRESSSCANLINE syn keyword pilrcType CONFIRMATION COUNTRY CREATOR CURRENCYDECIMALPLACES syn keyword pilrcType CURRENCYNAME CURRENCYSYMBOL CURRENCYUNIQUESYMBOL syn keyword pilrcType DATEFORMAT DAYLIGHTSAVINGS DEFAULTBTNID DEFAULTBUTTON syn keyword pilrcType DENSITY DISABLED DYNAMICSIZE syn keyword pilrcType EDITABLE ENTRY ERROR EXTENDED syn keyword pilrcType FEEDBACK FILE FONTID FORCECOMPRESS FRAME syn keyword pilrcType GRAFFITI GRAPHICAL GROUP syn keyword pilrcType HASSCROLLBAR HELPID syn keyword pilrcType ID INDEX INFORMATION syn keyword pilrcType KEYDOWNCHR KEYDOWNKEYCODE KEYDOWNMODIFIERS syn keyword pilrcType LANGUAGE LEFTALIGN LEFTANCHOR LONGDATEFORMAT syn keyword pilrcType MAX MAXCHARS MEASUREMENTSYSTEM MENUID MIN LOCALE syn keyword pilrcType MINUTESWESTOFGMT MODAL MULTIPLELINES syn keyword pilrcType NAME NOCOLORTABLE NOCOMPRESS NOFRAME NONEDITABLE syn keyword pilrcType NONEXTENDED NONUSABLE NOSAVEBEHIND NUMBER NUMBERFORMAT syn keyword pilrcType NUMERIC syn keyword pilrcType PAGESIZE syn keyword pilrcType RECTFRAME RIGHTALIGN RIGHTANCHOR ROWS syn keyword pilrcType SAVEBEHIND SEARCH SCREEN SELECTEDBITMAPID SINGLELINE syn keyword pilrcType THUMBID TRANSPARENTINDEX TIMEFORMAT syn keyword pilrcType UNDERLINED USABLE syn keyword pilrcType VALUE VERTICAL VISIBLEITEMS syn keyword pilrcType WARNING WEEKSTARTDAY " Country syn keyword pilrcCountry Australia Austria Belgium Brazil Canada Denmark syn keyword pilrcCountry Finland France Germany HongKong Iceland Indian syn keyword pilrcCountry Indonesia Ireland Italy Japan Korea Luxembourg Malaysia syn keyword pilrcCountry Mexico Netherlands NewZealand Norway Philippines syn keyword pilrcCountry RepChina Singapore Spain Sweden Switzerland Thailand syn keyword pilrcCountry Taiwan UnitedKingdom UnitedStates " Language syn keyword pilrcLanguage English French German Italian Japanese Spanish " String syn match pilrcString "\"[^"]*\"" " Number syn match pilrcNumber "\<0x\x\+\>" syn match pilrcNumber "\<\d\+\>" " Comment syn region pilrcComment start="/\*" end="\*/" syn region pilrcComment start="//" end="$" " Constants syn keyword pilrcConstant AUTO AUTOID BOTTOM CENTER PREVBOTTOM PREVHEIGHT syn keyword pilrcConstant PREVLEFT PREVRIGHT PREVTOP PREVWIDTH RIGHT syn keyword pilrcConstant SEPARATOR " Identifier syn match pilrcIdentifier "\<\h\w*\>" " Specials syn match pilrcType "\" syn match pilrcKeyword "\\s*\" syn match pilrcType "\" " Function syn keyword pilrcFunction BEGIN END " Include syn match pilrcInclude "\#include" syn match pilrcInclude "\#define" syn keyword pilrcInclude equ syn keyword pilrcInclude package syn region pilrcInclude start="public class" end="}" syn sync ccomment pilrcComment " The default methods for highlighting hi def link pilrcKeyword Statement hi def link pilrcType Type hi def link pilrcError Error hi def link pilrcCountry SpecialChar hi def link pilrcLanguage SpecialChar hi def link pilrcString SpecialChar hi def link pilrcNumber Number hi def link pilrcComment Comment hi def link pilrcConstant Constant hi def link pilrcFunction Function hi def link pilrcInclude SpecialChar hi def link pilrcIdentifier Number let b:current_syntax = "pilrc" neovim-0.2.2/runtime/syntax/pine.vim000066400000000000000000000360631320401574200174770ustar00rootroot00000000000000" Vim syntax file " Language: Pine (email program) run commands " Maintainer: David Pascoe " Last Change: Thu Feb 27 10:18:48 WST 2003, update for pine 4.53 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword=@,48-57,_,128-167,224-235,- syn keyword pineConfig addrbook-sort-rule syn keyword pineConfig address-book syn keyword pineConfig addressbook-formats syn keyword pineConfig alt-addresses syn keyword pineConfig bugs-additional-data syn keyword pineConfig bugs-address syn keyword pineConfig bugs-fullname syn keyword pineConfig character-set syn keyword pineConfig color-style syn keyword pineConfig compose-mime syn keyword pineConfig composer-wrap-column syn keyword pineConfig current-indexline-style syn keyword pineConfig cursor-style syn keyword pineConfig customized-hdrs syn keyword pineConfig debug-memory syn keyword pineConfig default-composer-hdrs syn keyword pineConfig default-fcc syn keyword pineConfig default-saved-msg-folder syn keyword pineConfig disable-these-authenticators syn keyword pineConfig disable-these-drivers syn keyword pineConfig display-filters syn keyword pineConfig download-command syn keyword pineConfig download-command-prefix syn keyword pineConfig editor syn keyword pineConfig elm-style-save syn keyword pineConfig empty-header-message syn keyword pineConfig fcc-name-rule syn keyword pineConfig feature-level syn keyword pineConfig feature-list syn keyword pineConfig file-directory syn keyword pineConfig folder-collections syn keyword pineConfig folder-extension syn keyword pineConfig folder-sort-rule syn keyword pineConfig font-char-set syn keyword pineConfig font-name syn keyword pineConfig font-size syn keyword pineConfig font-style syn keyword pineConfig forced-abook-entry syn keyword pineConfig form-letter-folder syn keyword pineConfig global-address-book syn keyword pineConfig goto-default-rule syn keyword pineConfig header-in-reply syn keyword pineConfig image-viewer syn keyword pineConfig inbox-path syn keyword pineConfig incoming-archive-folders syn keyword pineConfig incoming-folders syn keyword pineConfig incoming-startup-rule syn keyword pineConfig index-answered-background-color syn keyword pineConfig index-answered-foreground-color syn keyword pineConfig index-deleted-background-color syn keyword pineConfig index-deleted-foreground-color syn keyword pineConfig index-format syn keyword pineConfig index-important-background-color syn keyword pineConfig index-important-foreground-color syn keyword pineConfig index-new-background-color syn keyword pineConfig index-new-foreground-color syn keyword pineConfig index-recent-background-color syn keyword pineConfig index-recent-foreground-color syn keyword pineConfig index-to-me-background-color syn keyword pineConfig index-to-me-foreground-color syn keyword pineConfig index-unseen-background-color syn keyword pineConfig index-unseen-foreground-color syn keyword pineConfig initial-keystroke-list syn keyword pineConfig kblock-passwd-count syn keyword pineConfig keylabel-background-color syn keyword pineConfig keylabel-foreground-color syn keyword pineConfig keyname-background-color syn keyword pineConfig keyname-foreground-color syn keyword pineConfig last-time-prune-questioned syn keyword pineConfig last-version-used syn keyword pineConfig ldap-servers syn keyword pineConfig literal-signature syn keyword pineConfig local-address syn keyword pineConfig local-fullname syn keyword pineConfig mail-check-interval syn keyword pineConfig mail-directory syn keyword pineConfig mailcap-search-path syn keyword pineConfig mimetype-search-path syn keyword pineConfig new-version-threshold syn keyword pineConfig news-active-file-path syn keyword pineConfig news-collections syn keyword pineConfig news-spool-directory syn keyword pineConfig newsrc-path syn keyword pineConfig nntp-server syn keyword pineConfig normal-background-color syn keyword pineConfig normal-foreground-color syn keyword pineConfig old-style-reply syn keyword pineConfig operating-dir syn keyword pineConfig patterns syn keyword pineConfig patterns-filters syn keyword pineConfig patterns-filters2 syn keyword pineConfig patterns-indexcolors syn keyword pineConfig patterns-other syn keyword pineConfig patterns-roles syn keyword pineConfig patterns-scores syn keyword pineConfig patterns-scores2 syn keyword pineConfig personal-name syn keyword pineConfig personal-print-category syn keyword pineConfig personal-print-command syn keyword pineConfig postponed-folder syn keyword pineConfig print-font-char-set syn keyword pineConfig print-font-name syn keyword pineConfig print-font-size syn keyword pineConfig print-font-style syn keyword pineConfig printer syn keyword pineConfig prompt-background-color syn keyword pineConfig prompt-foreground-color syn keyword pineConfig pruned-folders syn keyword pineConfig pruning-rule syn keyword pineConfig quote1-background-color syn keyword pineConfig quote1-foreground-color syn keyword pineConfig quote2-background-color syn keyword pineConfig quote2-foreground-color syn keyword pineConfig quote3-background-color syn keyword pineConfig quote3-foreground-color syn keyword pineConfig read-message-folder syn keyword pineConfig remote-abook-history syn keyword pineConfig remote-abook-metafile syn keyword pineConfig remote-abook-validity syn keyword pineConfig reply-indent-string syn keyword pineConfig reply-leadin syn keyword pineConfig reverse-background-color syn keyword pineConfig reverse-foreground-color syn keyword pineConfig rsh-command syn keyword pineConfig rsh-open-timeout syn keyword pineConfig rsh-path syn keyword pineConfig save-by-sender syn keyword pineConfig saved-msg-name-rule syn keyword pineConfig scroll-margin syn keyword pineConfig selectable-item-background-color syn keyword pineConfig selectable-item-foreground-color syn keyword pineConfig sending-filters syn keyword pineConfig sendmail-path syn keyword pineConfig show-all-characters syn keyword pineConfig signature-file syn keyword pineConfig smtp-server syn keyword pineConfig sort-key syn keyword pineConfig speller syn keyword pineConfig ssh-command syn keyword pineConfig ssh-open-timeout syn keyword pineConfig ssh-path syn keyword pineConfig standard-printer syn keyword pineConfig status-background-color syn keyword pineConfig status-foreground-color syn keyword pineConfig status-message-delay syn keyword pineConfig suggest-address syn keyword pineConfig suggest-fullname syn keyword pineConfig tcp-open-timeout syn keyword pineConfig tcp-query-timeout syn keyword pineConfig tcp-read-warning-timeout syn keyword pineConfig tcp-write-warning-timeout syn keyword pineConfig threading-display-style syn keyword pineConfig threading-expanded-character syn keyword pineConfig threading-index-style syn keyword pineConfig threading-indicator-character syn keyword pineConfig threading-lastreply-character syn keyword pineConfig title-background-color syn keyword pineConfig title-foreground-color syn keyword pineConfig titlebar-color-style syn keyword pineConfig upload-command syn keyword pineConfig upload-command-prefix syn keyword pineConfig url-viewers syn keyword pineConfig use-only-domain-name syn keyword pineConfig user-domain syn keyword pineConfig user-id syn keyword pineConfig user-id syn keyword pineConfig user-input-timeout syn keyword pineConfig viewer-hdr-colors syn keyword pineConfig viewer-hdrs syn keyword pineConfig viewer-overlap syn keyword pineConfig window-position syn keyword pineOption allow-changing-from syn keyword pineOption allow-talk syn keyword pineOption alternate-compose-menu syn keyword pineOption assume-slow-link syn keyword pineOption auto-move-read-msgs syn keyword pineOption auto-open-next-unread syn keyword pineOption auto-unzoom-after-apply syn keyword pineOption auto-zoom-after-select syn keyword pineOption cache-remote-pinerc syn keyword pineOption check-newmail-when-quitting syn keyword pineOption combined-addrbook-display syn keyword pineOption combined-folder-display syn keyword pineOption combined-subdirectory-display syn keyword pineOption compose-cut-from-cursor syn keyword pineOption compose-maps-delete-key-to-ctrl-d syn keyword pineOption compose-rejects-unqualified-addrs syn keyword pineOption compose-send-offers-first-filter syn keyword pineOption compose-sets-newsgroup-without-confirm syn keyword pineOption confirm-role-even-for-default syn keyword pineOption continue-tab-without-confirm syn keyword pineOption delete-skips-deleted syn keyword pineOption disable-2022-jp-conversions syn keyword pineOption disable-busy-alarm syn keyword pineOption disable-charset-conversions syn keyword pineOption disable-config-cmd syn keyword pineOption disable-keyboard-lock-cmd syn keyword pineOption disable-keymenu syn keyword pineOption disable-password-caching syn keyword pineOption disable-password-cmd syn keyword pineOption disable-pipes-in-sigs syn keyword pineOption disable-pipes-in-templates syn keyword pineOption disable-roles-setup-cmd syn keyword pineOption disable-roles-sig-edit syn keyword pineOption disable-roles-template-edit syn keyword pineOption disable-sender syn keyword pineOption disable-shared-namespaces syn keyword pineOption disable-signature-edit-cmd syn keyword pineOption disable-take-last-comma-first syn keyword pineOption enable-8bit-esmtp-negotiation syn keyword pineOption enable-8bit-nntp-posting syn keyword pineOption enable-aggregate-command-set syn keyword pineOption enable-alternate-editor-cmd syn keyword pineOption enable-alternate-editor-implicitly syn keyword pineOption enable-arrow-navigation syn keyword pineOption enable-arrow-navigation-relaxed syn keyword pineOption enable-background-sending syn keyword pineOption enable-bounce-cmd syn keyword pineOption enable-cruise-mode syn keyword pineOption enable-cruise-mode-delete syn keyword pineOption enable-delivery-status-notification syn keyword pineOption enable-dot-files syn keyword pineOption enable-dot-folders syn keyword pineOption enable-exit-via-lessthan-command syn keyword pineOption enable-fast-recent-test syn keyword pineOption enable-flag-cmd syn keyword pineOption enable-flag-screen-implicitly syn keyword pineOption enable-full-header-and-text syn keyword pineOption enable-full-header-cmd syn keyword pineOption enable-goto-in-file-browser syn keyword pineOption enable-incoming-folders syn keyword pineOption enable-jump-shortcut syn keyword pineOption enable-lame-list-mode syn keyword pineOption enable-mail-check-cue syn keyword pineOption enable-mailcap-param-substitution syn keyword pineOption enable-mouse-in-xterm syn keyword pineOption enable-msg-view-addresses syn keyword pineOption enable-msg-view-attachments syn keyword pineOption enable-msg-view-forced-arrows syn keyword pineOption enable-msg-view-urls syn keyword pineOption enable-msg-view-web-hostnames syn keyword pineOption enable-newmail-in-xterm-icon syn keyword pineOption enable-partial-match-lists syn keyword pineOption enable-print-via-y-command syn keyword pineOption enable-reply-indent-string-editing syn keyword pineOption enable-rules-under-take syn keyword pineOption enable-search-and-replace syn keyword pineOption enable-sigdashes syn keyword pineOption enable-suspend syn keyword pineOption enable-tab-completion syn keyword pineOption enable-take-export syn keyword pineOption enable-tray-icon syn keyword pineOption enable-unix-pipe-cmd syn keyword pineOption enable-verbose-smtp-posting syn keyword pineOption expanded-view-of-addressbooks syn keyword pineOption expanded-view-of-distribution-lists syn keyword pineOption expanded-view-of-folders syn keyword pineOption expose-hidden-config syn keyword pineOption expunge-only-manually syn keyword pineOption expunge-without-confirm syn keyword pineOption expunge-without-confirm-everywhere syn keyword pineOption fcc-on-bounce syn keyword pineOption fcc-only-without-confirm syn keyword pineOption fcc-without-attachments syn keyword pineOption include-attachments-in-reply syn keyword pineOption include-header-in-reply syn keyword pineOption include-text-in-reply syn keyword pineOption ldap-result-to-addrbook-add syn keyword pineOption mark-fcc-seen syn keyword pineOption mark-for-cc syn keyword pineOption news-approximates-new-status syn keyword pineOption news-deletes-across-groups syn keyword pineOption news-offers-catchup-on-close syn keyword pineOption news-post-without-validation syn keyword pineOption news-read-in-newsrc-order syn keyword pineOption next-thread-without-confirm syn keyword pineOption old-growth syn keyword pineOption pass-control-characters-as-is syn keyword pineOption prefer-plain-text syn keyword pineOption preserve-start-stop-characters syn keyword pineOption print-formfeed-between-messages syn keyword pineOption print-includes-from-line syn keyword pineOption print-index-enabled syn keyword pineOption print-offers-custom-cmd-prompt syn keyword pineOption quell-attachment-extra-prompt syn keyword pineOption quell-berkeley-format-timezone syn keyword pineOption quell-content-id syn keyword pineOption quell-dead-letter-on-cancel syn keyword pineOption quell-empty-directories syn keyword pineOption quell-extra-post-prompt syn keyword pineOption quell-folder-internal-msg syn keyword pineOption quell-imap-envelope-update syn keyword pineOption quell-lock-failure-warnings syn keyword pineOption quell-maildomain-warning syn keyword pineOption quell-news-envelope-update syn keyword pineOption quell-partial-fetching syn keyword pineOption quell-ssl-largeblocks syn keyword pineOption quell-status-message-beeping syn keyword pineOption quell-timezone-comment-when-sending syn keyword pineOption quell-user-lookup-in-passwd-file syn keyword pineOption quit-without-confirm syn keyword pineOption reply-always-uses-reply-to syn keyword pineOption save-aggregates-copy-sequence syn keyword pineOption save-will-advance syn keyword pineOption save-will-not-delete syn keyword pineOption save-will-quote-leading-froms syn keyword pineOption scramble-message-id syn keyword pineOption select-without-confirm syn keyword pineOption selectable-item-nobold syn keyword pineOption separate-folder-and-directory-entries syn keyword pineOption show-cursor syn keyword pineOption show-plain-text-internally syn keyword pineOption show-selected-in-boldface syn keyword pineOption signature-at-bottom syn keyword pineOption single-column-folder-list syn keyword pineOption slash-collapses-entire-thread syn keyword pineOption spell-check-before-sending syn keyword pineOption store-window-position-in-config syn keyword pineOption strip-from-sigdashes-on-reply syn keyword pineOption tab-visits-next-new-message-only syn keyword pineOption termdef-takes-precedence syn keyword pineOption thread-index-shows-important-color syn keyword pineOption try-alternative-authentication-driver-first syn keyword pineOption unselect-will-not-advance syn keyword pineOption use-current-dir syn keyword pineOption use-function-keys syn keyword pineOption use-sender-not-x-sender syn keyword pineOption use-subshell-for-suspend syn keyword pineOption vertical-folder-list syn match pineComment "^#.*$" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link pineConfig Type hi def link pineComment Comment hi def link pineOption Macro let b:current_syntax = "pine" " vim: ts=8 neovim-0.2.2/runtime/syntax/pinfo.vim000066400000000000000000000122601320401574200176500ustar00rootroot00000000000000" Vim syntax file " Language: pinfo(1) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2007-06-17 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=- syn case ignore syn keyword pinfoTodo contained FIXME TODO XXX NOTE syn region pinfoComment start='^#' end='$' contains=pinfoTodo,@Spell syn keyword pinfoOptions MANUAL CUT-MAN-HEADERS CUT-EMPTY-MAN-LINES \ RAW-FILENAME APROPOS \ DONT-HANDLE-WITHOUT-TAG-TABLE HTTPVIEWER \ FTPVIEWER MAILEDITOR PRINTUTILITY MANLINKS \ INFOPATH MAN-OPTIONS STDERR-REDIRECTION \ LONG-MANUAL-LINKS FILTER-0xB7 \ QUIT-CONFIRMATION QUIT-CONFIRM-DEFAULT \ CLEAR-SCREEN-AT-EXIT CALL-READLINE-HISTORY \ HIGHLIGHTREGEXP SAFE-USER SAFE-GROUP syn keyword pinfoColors COL_NORMAL COL_TOPLINE COL_BOTTOMLINE \ COL_MENU COL_MENUSELECTED COL_NOTE \ COL_NOTESELECTED COL_URL COL_URLSELECTED \ COL_INFOHIGHLIGHT COL_MANUALBOLD \ COL_MANUALITALIC COL_SEARCHHIGHLIGHT syn keyword pinfoColorDefault COLOR_DEFAULT syn keyword pinfoColorBold BOLD syn keyword pinfoColorNoBold NO_BOLD syn keyword pinfoColorBlink BLINK syn keyword pinfoColorNoBlink NO_BLINK syn keyword pinfoColorBlack COLOR_BLACK syn keyword pinfoColorRed COLOR_RED syn keyword pinfoColorGreen COLOR_GREEN syn keyword pinfoColorYellow COLOR_YELLOW syn keyword pinfoColorBlue COLOR_BLUE syn keyword pinfoColorMagenta COLOR_MAGENTA syn keyword pinfoColorCyan COLOR_CYAN syn keyword pinfoColorWhite COLOR_WHITE syn keyword pinfoKeys KEY_TOTALSEARCH_1 KEY_TOTALSEARCH_2 \ KEY_SEARCH_1 KEY_SEARCH_2 \ KEY_SEARCH_AGAIN_1 KEY_SEARCH_AGAIN_2 \ KEY_GOTO_1 KEY_GOTO_2 KEY_PREVNODE_1 \ KEY_PREVNODE_2 KEY_NEXTNODE_1 \ KEY_NEXTNODE_2 KEY_UP_1 KEY_UP_2 KEY_END_1 \ KEY_END_2 KEY_PGDN_1 KEY_PGDN_2 \ KEY_PGDN_AUTO_1 KEY_PGDN_AUTO_2 KEY_HOME_1 \ KEY_HOME_2 KEY_PGUP_1 KEY_PGUP_2 \ KEY_PGUP_AUTO_1 KEY_PGUP_AUTO_2 KEY_DOWN_1 \ KEY_DOWN_2 KEY_TOP_1 KEY_TOP_2 KEY_BACK_1 \ KEY_BACK_2 KEY_FOLLOWLINK_1 \ KEY_FOLLOWLINK_2 KEY_REFRESH_1 \ KEY_REFRESH_2 KEY_SHELLFEED_1 \ KEY_SHELLFEED_2 KEY_QUIT_1 KEY_QUIT_2 \ KEY_GOLINE_1 KEY_GOLINE_2 KEY_PRINT_1 \ KEY_PRINT_2 KEY_DIRPAGE_1 KEY_DIRPAGE_2 \ KEY_TWODOWN_1 KEY_TWODOWN_2 KEY_TWOUP_1 \ KEY_TWOUP_2 syn keyword pinfoSpecialKeys KEY_BREAK KEY_DOWN KEY_UP KEY_LEFT KEY_RIGHT \ KEY_DOWN KEY_HOME KEY_BACKSPACE KEY_NPAGE \ KEY_PPAGE KEY_END KEY_IC KEY_DC syn region pinfoSpecialKeys matchgroup=pinfoSpecialKeys transparent \ start=+KEY_\%(F\|CTRL\|ALT\)(+ end=+)+ syn region pinfoSimpleKey start=+'+ skip=+\\'+ end=+'+ \ contains=pinfoSimpleKeyEscape syn match pinfoSimpleKeyEscape +\\[\\nt']+ syn match pinfoKeycode '\<\d\+\>' syn keyword pinfoConstants TRUE FALSE YES NO hi def link pinfoTodo Todo hi def link pinfoComment Comment hi def link pinfoOptions Keyword hi def link pinfoColors Keyword hi def link pinfoColorDefault Normal hi def link pinfoSpecialKeys SpecialChar hi def link pinfoSimpleKey String hi def link pinfoSimpleKeyEscape SpecialChar hi def link pinfoKeycode Number hi def link pinfoConstants Constant hi def link pinfoKeys Keyword hi def pinfoColorBold cterm=bold hi def pinfoColorNoBold cterm=none hi def pinfoColorBlink cterm=inverse hi def pinfoColorNoBlink cterm=none hi def pinfoColorBlack ctermfg=Black guifg=Black hi def pinfoColorRed ctermfg=DarkRed guifg=DarkRed hi def pinfoColorGreen ctermfg=DarkGreen guifg=DarkGreen hi def pinfoColorYellow ctermfg=DarkYellow guifg=DarkYellow hi def pinfoColorBlue ctermfg=DarkBlue guifg=DarkBlue hi def pinfoColorMagenta ctermfg=DarkMagenta guifg=DarkMagenta hi def pinfoColorCyan ctermfg=DarkCyan guifg=DarkCyan hi def pinfoColorWhite ctermfg=LightGray guifg=LightGray let b:current_syntax = "pinfo" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/plaintex.vim000066400000000000000000000240751320401574200203700ustar00rootroot00000000000000" Vim syntax file " Language: TeX (plain.tex format) " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-10-26 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match plaintexControlSequence display contains=@NoSpell \ '\\[a-zA-Z@]\+' runtime! syntax/initex.vim unlet b:current_syntax syn match plaintexComment display \ contains=ALLBUT,initexComment,plaintexComment \ '^\s*%[CDM].*$' if exists("g:plaintex_delimiters") syn match plaintexDelimiter display '[][{}]' endif syn match plaintexRepeat display contains=@NoSpell \ '\\\%(loop\|repeat\)\>' syn match plaintexCommand display contains=@NoSpell \ '\\\%(plainoutput\|TeX\)\>' syn match plaintexBoxCommand display contains=@NoSpell \ '\\\%(null\|strut\)\>' syn match plaintexDebuggingCommand display contains=@NoSpell \ '\\\%(showhyphens\|tracingall\|wlog\)\>' syn match plaintexFontsCommand display contains=@NoSpell \ '\\\%(bf\|\%(five\|seven\)\%(bf\|i\|rm\|sy\)\|it\|oldstyle\|rm\|sl\|ten\%(bf\|ex\|it\=\|rm\|sl\|sy\|tt\)\|tt\)\>' syn match plaintexGlueCommand display contains=@NoSpell \ '\\\%(\%(big\|en\|med\|\%(no\|off\)interline\|small\)skip\|\%(center\|left\|right\)\=line\|\%(dot\|\%(left\|right\)arrow\)fill\|[hv]glue\|[lr]lap\|q\=quad\|space\|topglue\)\>' syn match plaintexInsertsCommand display contains=@NoSpell \ '\\\%(\%(end\|top\)insert\|v\=footnote\)\>' syn match plaintexJobCommand display contains=@NoSpell \ '\\\%(bye\|fmt\%(name\|version\)\)\>' syn match plaintexInsertsCommand display contains=@NoSpell \ '\\\%(mid\|page\)insert\>' syn match plaintexKernCommand display contains=@NoSpell \ '\\\%(en\|\%(neg\)\=thin\)space\>' syn match plaintexMacroCommand display contains=@NoSpell \ '\\\%(active\|[be]group\|empty\)\>' syn match plaintexPageCommand display contains=@NoSpell \ '\\\%(\%(super\)\=eject\|nopagenumbers\|\%(normal\|ragged\)bottom\)\>' syn match plaintexParagraphCommand display contains=@NoSpell \ '\\\%(endgraf\|\%(non\)\=frenchspacing\|hang\|item\%(item\)\=\|narrower\|normalbaselines\|obey\%(lines\|spaces\)\|openup\|proclaim\|\%(tt\)\=raggedright\|textindent\)\>' syn match plaintexPenaltiesCommand display contains=@NoSpell \ '\\\%(allow\|big\|fil\|good\|med\|no\|small\)\=break\>' syn match plaintexRegistersCommand display contains=@NoSpell \ '\\\%(advancepageno\|new\%(box\|count\|dimen\|fam\|help\|if\|insert\|language\|muskip\|read\|skip\|toks\|write\)\)\>' syn match plaintexTablesCommand display contains=@NoSpell \ '&\|\\+\|\\\%(cleartabs\|endline\|hidewidth\|ialign\|multispan\|settabs\|tabalign\)\>' if !exists("g:plaintex_no_math") syn region plaintexMath matchgroup=plaintexMath \ contains=@plaintexMath,@NoSpell \ start='\$' skip='\\\\\|\\\$' end='\$' syn region plaintexMath matchgroup=plaintexMath \ contains=@plaintexMath,@NoSpell keepend \ start='\$\$' skip='\\\\\|\\\$' end='\$\$' endif " Keep this after plaintexMath, as we don’t want math mode started at a \$. syn match plaintexCharacterCommand display contains=@NoSpell \ /\\\%(["#$%&'.=^_`~]\|``\|''\|-\{2,3}\|[?!]`\|^^L\|\~\|\%(a[ae]\|A[AE]\|acute\|[cdHoOPStuvijlL]\|copyright\|d\=dag\|folio\|ldotp\|[lr]q\|oe\|OE\|slash\|ss\|underbar\)\>\)/ syn cluster plaintexMath \ contains=plaintexMathCommand,plaintexMathBoxCommand, \ plaintexMathCharacterCommand,plaintexMathDelimiter, \ plaintexMathFontsCommand,plaintexMathLetter,plaintexMathSymbol, \ plaintexMathFunction,plaintexMathOperator,plaintexMathPunctuation, \ plaintexMathRelation syn match plaintexMathCommand display contains=@NoSpell contained \ '\\\%([!*,;>{}|_^]\|\%([aA]rrowvert\|[bB]ig\%(g[lmr]\=\|r\)\=\|\%(border\|p\)\=matrix\|displaylines\|\%(down\|up\)bracefill\|eqalign\%(no\)\|leqalignno\|[lr]moustache\|mathpalette\|root\|s[bp]\|skew\|sqrt\)\>\)' syn match plaintexMathBoxCommand display contains=@NoSpell contained \ '\\\%([hv]\=phantom\|mathstrut\|smash\)\>' syn match plaintexMathCharacterCommand display contains=@NoSpell contained \ '\\\%(b\|bar\|breve\|check\|d\=dots\=\|grave\|hat\|[lv]dots\|tilde\|vec\|wide\%(hat\|tilde\)\)\>' syn match plaintexMathDelimiter display contains=@NoSpell contained \ '\\\%(brace\%(vert\)\=\|brack\|cases\|choose\|[lr]\%(angle\|brace\|brack\|ceil\|floor\|group\)\|over\%(brace\|\%(left\|right\)arrow\)\|underbrace\)\>' syn match plaintexMathFontsCommand display contains=@NoSpell contained \ '\\\%(\%(bf\|it\|sl\|tt\)fam\|cal\|mit\)\>' syn match plaintexMathLetter display contains=@NoSpell contained \ '\\\%(aleph\|alpha\|beta\|chi\|[dD]elta\|ell\|epsilon\|eta\|[gG]amma\|[ij]math\|iota\|kappa\|[lL]ambda\|[mn]u\|[oO]mega\|[pP][hs]\=i\|rho\|[sS]igma\|tau\|[tT]heta\|[uU]psilon\|var\%(epsilon\|ph\=i\|rho\|sigma\|theta\)\|[xX]i\|zeta\)\>' syn match plaintexMathSymbol display contains=@NoSpell contained \ '\\\%(angle\|backslash\|bot\|clubsuit\|emptyset\|epsilon\|exists\|flat\|forall\|hbar\|heartsuit\|Im\|infty\|int\|lnot\|nabla\|natural\|neg\|pmod\|prime\|Re\|sharp\|smallint\|spadesuit\|surd\|top\|triangle\%(left\|right\)\=\|vdash\|wp\)\>' syn match plaintexMathFunction display contains=@NoSpell contained \ '\\\%(arc\%(cos\|sin\|tan\)\|arg\|\%(cos\|sin\|tan\)h\=\|coth\=\|csc\|de[gt]\|dim\|exp\|gcd\|hom\|inf\|ker\|lo\=g\|lim\%(inf\|sup\)\=\|ln\|max\|min\|Pr\|sec\|sup\)\>' syn match plaintexMathOperator display contains=@NoSpell contained \ '\\\%(amalg\|ast\|big\%(c[au]p\|circ\|o\%(dot\|plus\|times\|sqcup\)\|triangle\%(down\|up\)\|uplus\|vee\|wedge\|bmod\|bullet\)\|c[au]p\|cdot[ps]\=\|circ\|coprod\|d\=dagger\|diamond\%(suit\)\=\|div\|land\|lor\|mp\|o\%(dot\|int\|minus\|plus\|slash\|times\)pm\|prod\|setminus\|sqc[au]p\|sqsu[bp]seteq\|star\|su[bp]set\%(eq\)\=\|sum\|times\|uplus\|vee\|wedge\|wr\)\>' syn match plaintexMathPunctuation display contains=@NoSpell contained \ '\\\%(colon\)\>' syn match plaintexMathRelation display contains=@NoSpell contained \ '\\\%(approx\|asymp\|bowtie\|buildrel\|cong\|dashv\|doteq\|[dD]ownarrow\|equiv\|frown\|geq\=\|gets\|gg\|hook\%(left\|right\)arrow\|iff\|in\|leq\=\|[lL]eftarrow\|\%(left\|right\)harpoon\%(down\|up\)\|[lL]eftrightarrow\|ll\|[lL]ongleftrightarrow\|longmapsto\|[lL]ongrightarrow\|mapsto\|mid\|models\|[ns][ew]arrow\|neq\=\|ni\|not\%(in\)\=\|owns\|parallel\|perp\|prec\%(eq\)\=\|propto\|[rR]ightarrow\|rightleftharpoons\|sim\%(eq\)\=\|smile\|succ\%(eq\)\=\|to\|[uU]parrow\|[uU]pdownarrow\|[vV]ert\)\>' syn match plaintexParameterDimen display contains=@NoSpell \ '\\maxdimen\>' syn match plaintexMathParameterDimen display contains=@NoSpell \ '\\jot\>' syn match plaintexParagraphParameterGlue display contains=@NoSpell \ '\\\%(\%(big\|med\|small\)skipamount\|normalbaselineskip\|normallineskip\%(limit\)\=\)\>' syn match plaintexFontParameterInteger display contains=@NoSpell \ '\\magstep\%(half\)\=\>' syn match plaintexJobParameterInteger display contains=@NoSpell \ '\\magnification\>' syn match plaintexPageParameterInteger display contains=@NoSpell \ '\\pageno\>' syn match plaintexPageParameterToken display contains=@NoSpell \ '\\\%(foot\|head\)line\>' hi def link plaintexOperator Operator hi def link plaintexDelimiter Delimiter hi def link plaintexControlSequence Identifier hi def link plaintexComment Comment hi def link plaintexInclude Include hi def link plaintexRepeat Repeat hi def link plaintexCommand initexCommand hi def link plaintexBoxCommand plaintexCommand hi def link plaintexCharacterCommand initexCharacterCommand hi def link plaintexDebuggingCommand initexDebuggingCommand hi def link plaintexFontsCommand initexFontsCommand hi def link plaintexGlueCommand plaintexCommand hi def link plaintexInsertsCommand plaintexCommand hi def link plaintexJobCommand initexJobCommand hi def link plaintexKernCommand plaintexCommand hi def link plaintexMacroCommand initexMacroCommand hi def link plaintexPageCommand plaintexCommand hi def link plaintexParagraphCommand plaintexCommand hi def link plaintexPenaltiesCommand plaintexCommand hi def link plaintexRegistersCommand plaintexCommand hi def link plaintexTablesCommand plaintexCommand hi def link plaintexMath String hi def link plaintexMathCommand plaintexCommand hi def link plaintexMathBoxCommand plaintexBoxCommand hi def link plaintexMathCharacterCommand plaintexCharacterCommand hi def link plaintexMathDelimiter plaintexDelimiter hi def link plaintexMathFontsCommand plaintexFontsCommand hi def link plaintexMathLetter plaintexMathCharacterCommand hi def link plaintexMathSymbol plaintexMathLetter hi def link plaintexMathFunction Function hi def link plaintexMathOperator plaintexOperator hi def link plaintexMathPunctuation plaintexCharacterCommand hi def link plaintexMathRelation plaintexOperator hi def link plaintexParameterDimen initexParameterDimen hi def link plaintexMathParameterDimen initexMathParameterDimen hi def link plaintexParagraphParameterGlue initexParagraphParameterGlue hi def link plaintexFontParameterInteger initexFontParameterInteger hi def link plaintexJobParameterInteger initexJobParameterInteger hi def link plaintexPageParameterInteger initexPageParameterInteger hi def link plaintexPageParameterToken initexParameterToken let b:current_syntax = "plaintex" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/pli.vim000066400000000000000000000316461320401574200173320ustar00rootroot00000000000000" Vim syntax file " Modified from http://plnet.org/files/vim/ " using keywords from http://www.kednos.com/pli/docs/reference_manual/6291pro_contents.html " 2012-11-13 Alan Thompson " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " Todo. syn keyword pl1Todo TODO FIXME XXX DEBUG NOTE " pl1CommentGroup allows adding matches for special things in comments " 20010723az: Added this so that these could be matched in comments... syn cluster pl1CommentGroup contains=pl1Todo syn match pl1Garbage "[^ \t()]" syn match pl1Identifier "[a-z][a-z0-9$_#]*" syn match pl1HostIdentifier ":[a-z][a-z0-9$_#]*" " 20010723az: When wanted, highlight the trailing whitespace -- this is " based on c_space_errors if exists("c_space_errors") if !exists("c_no_trail_space_error") syn match pl1SpaceError "\s\+$" endif if !exists("c_no_tab_space_error") syn match pl1SpaceError " \+\t"me=e-1 endif endif " Symbols. syn match pl1Symbol "\(;\|,\|\.\)" syn match pl1PreProcSym "%" " Operators. syn match pl1Operator "\(&\|:\|!\|+\|-\|\*\|/\|=\|<\|>\|@\|\*\*\|!=\|\~=\)" syn match pl1Operator "\(\^\|\^=\|<=\|>=\|:=\|=>\|\.\.\|||\|<<\|>>\|\"\)" " Attributes syn keyword pl1Attribute BACKWARDS BUFFERED BUF CONNECTED CONN CONSTANT EVENT syn keyword pl1Attribute EXCLUSIVE EXCL FORMAT GENERIC IRREDUCIBLE IRRED LOCAL syn keyword pl1Attribute REDUCIBLE RED TASK TRANSIENT UNBUFFERED UNBUF ALIGNED ANY syn keyword pl1Attribute AREA AUTOMATIC AUTO BASED BUILTIN CONDITION COND CONTROLLED syn keyword pl1Attribute CTL DEFINED DEF DIRECT ENVIRONMENT ENV EXTERNAL EXT FILE syn keyword pl1Attribute GLOBALDEF GLOBALREF INITIAL INIT INPUT INTERNAL INT KEYED syn keyword pl1Attribute LABEL LIKE LIST MEMBER NONVARYING NONVAR OPTIONAL OPTIONS syn keyword pl1Attribute OUTPUT PARAMETER PARM PICTURE PIC POSITION POS PRECISION syn keyword pl1Attribute PREC PRINT READONLY RECORD REFER RETURNS SEQUENTIAL SEQL syn keyword pl1Attribute STATIC STREAM STRUCTURE TRUNCATE UNALIGNED UNAL UNION UPDATE syn keyword pl1Attribute VARIABLE VARYING VAR COMPLEX CPLX REAL BINARY BIN BIT syn keyword pl1Attribute CHARACTER CHAR DECIMAL DEC DESCRIPTOR DESC DIMENSION DIM syn keyword pl1Attribute FIXED FLOAT OFFSET POINTER PTR REFERENCE VALUE VAL " Functions syn keyword pl1Function AFTER ALL ANY BEFORE COMPLETION CPLN CONJG COUNT syn keyword pl1Function CURRENTSTORAGE CSTG DATAFIELD DECAT DOT ERF ERFC IMAG syn keyword pl1Function ONCOUNT ONFIELD ONLOC POLY PRIORITY REPEAT SAMEKEY STATUS syn keyword pl1Function STORAGE STG ABS ACOS ACTUALCOUNT ADD ADDR ADDREL ALLOCATION syn keyword pl1Function ALLOCN ASIN ATAN ATAND ATANH BOOL BYTE BYTESIZE CEIL COLLATE syn keyword pl1Function COPY COS COSD COSH DATE DATETIME DECODE DISPLAY DIVIDE EMPTY syn keyword pl1Function ENCODE ERROR EVERY EXP EXTEND FLOOR FLUSH FREE HBOUND HIGH syn keyword pl1Function INDEX INFORM INT LBOUND LENGTH LINE LINENO LOG LOG10 LOG2 syn keyword pl1Function LOW LTRIM MAX MAXLENGTH MIN MOD MULTIPLY NEXT_VOLUME NULL syn keyword pl1Function ONARGSLIST ONCHAR ONCODE ONFILE ONKEY ONSOURCE PAGENO POSINT syn keyword pl1Function PRESENT PROD RANK RELEASE RESIGNAL REVERSE REWIND ROUND syn keyword pl1Function RTRIM SEARCH SIGN SIN SIND SINH SIZE SOME SPACEBLOCK SQRT syn keyword pl1Function STRING SUBSTR SUBTRACT SUM TAN TAND TANH TIME TRANSLATE TRIM syn keyword pl1Function TRUNC UNSPEC VALID VARIANT VERIFY WARN " Other keywords syn keyword pl1Other ATTENTION ATTN C CONVERSION CONV DATA NAME NOCONVERSION syn keyword pl1Other NOCONV NOFIXEDOVERFLOW NOFOFL NOOVERFLOW NOSIZE syn keyword pl1Other NOSTRINGRANGE NOSTRG NOSTRINGSIZE NOSTRZ NOSUBSCRIPTRANGE syn keyword pl1Other NOSUBRG NOZERODIVIDE NOZDIV OVERFLOW OFL PENDING RECORD syn keyword pl1Other REENTRANT SIZE STRINGRANGE STRG STRINGSIZE STRZ syn keyword pl1Other SUBSCRIPTRANGE SUBRG TRANSMIT A ANYCONDITION APPEND B B1 B2 syn keyword pl1Other B3 B4 BACKUP_DATE BATCH BLOCK_BOUNDARY_FORMAT BLOCK_IO syn keyword pl1Other BLOCK_SIZE BUCKET_SIZE BY CANCEL_CONTROL_O syn keyword pl1Other CARRIAGE_RETURN_FORMAT COLUMN COL CONTIGUOUS syn keyword pl1Other CONTIGUOUS_BEST_TRY CONVERSION CONV CREATION_DATE syn keyword pl1Other CURRENT_POSITION DEFAULT_FILE_NAME DEFERRED_WRITE E EDIT syn keyword pl1Other ENDFILE ENDPAGE EXPIRATION_DATE EXTENSION_SIZE F FAST_DELETE syn keyword pl1Other FILE_ID FILE_ID_TO FILE_SIZE FINISH FIXEDOVERFLOW FOFL syn keyword pl1Other FIXED_CONTROL_FROM FIXED_CONTROL_SIZE FIXED_CONTROL_SIZE_TO syn keyword pl1Other FIXED_CONTROL_TO FIXED_LENGTH_RECORDS FROM GROUP_PROTECTION syn keyword pl1Other IDENT IGNORE_LINE_MARKS IN INDEXED INDEX_NUMBER INITIAL_FILL syn keyword pl1Other INTO KEY KEYFROM KEYTO LINESIZE LOCK_ON_READ LOCK_ON_WRITE syn keyword pl1Other MAIN MANUAL_UNLOCKING MATCH_GREATER MATCH_GREATER_EQUAL syn keyword pl1Other MATCH_NEXT MATCH_NEXT_EQUAL MAXIMUM_RECORD_NUMBER syn keyword pl1Other MAXIMUM_RECORD_SIZE MULTIBLOCK_COUNT MULTIBUFFER_COUNT syn keyword pl1Other NOLOCK NONEXISTENT_RECORD NONRECURSIVE NO_ECHO NO_FILTER syn keyword pl1Other NO_SHARE OVERFLOW OFL OWNER_GROUP OWNER_ID OWNER_MEMBER syn keyword pl1Other OWNER_PROTECTION P PAGE PAGESIZE PRINTER_FORMAT PROMPT syn keyword pl1Other PURGE_TYPE_AHEAD R READ_AHEAD READ_CHECK READ_REGARDLESS syn keyword pl1Other RECORD_ID RECORD_ID_ACCESS RECORD_ID_TO RECURSIVE REPEAT syn keyword pl1Other RETRIEVAL_POINTERS REVISION_DATE REWIND_ON_CLOSE syn keyword pl1Other REWIND_ON_OPEN SCALARVARYING SET SHARED_READ SHARED_WRITE syn keyword pl1Other SKIP SPOOL STORAGE STRINGRANGE STRG SUBSCRIPTRANGE SUBRG syn keyword pl1Other SUPERSEDE SYSIN SYSPRINT SYSTEM_PROTECTION TAB TEMPORARY syn keyword pl1Other TIMEOUT_PERIOD TITLE TO UNDEFINEDFILE UNDF UNDERFLOW UFL syn keyword pl1Other UNTIL USER_OPEN VAXCONDITION WAIT_FOR_RECORD WHILE syn keyword pl1Other WORLD_PROTECTION WRITE_BEHIND WRITE_CHECK X ZERODIVIDE ZDIV " PreProcessor keywords syn keyword pl1PreProc ACTIVATE DEACTIVATE DECLARE DCL DICTIONARY DO END ERROR syn keyword pl1PreProc FATAL GOTO IF INCLUDE INFORM LIST NOLIST PAGE PROCEDURE PROC syn keyword pl1PreProc REPLACE RETURN SBTTL TITLE WARN THEN ELSE " Statements syn keyword pl1Statement CALL SUB ENTRY BY NAME CASE CHECK COPY DEFAULT DFT DELAY syn keyword pl1Statement DESCRIPTORS DISPLAY EXIT FETCH HALT IGNORE LIST LOCATE syn keyword pl1Statement NOCHECK NOLOCK NONE ORDER RANGE RELEASE REORDER REPLY SNAP syn keyword pl1Statement SYSTEM TAB UNLOCK WAIT ALLOCATE ALLOC BEGIN CALL CLOSE syn keyword pl1Statement DECLARE DCL DELETE DO ELSE END FORMAT GET GOTO GO TO IF syn keyword pl1Statement LEAVE NORESCAN ON OPEN OTHERWISE OTHER PROCEDURE PROC PUT syn keyword pl1Statement READ RESCAN RETURN REVERT REWRITE SELECT SIGNAL SNAP syn keyword pl1Statement STATEMENT STOP SYSTEM THEN WHEN WRITE " PL1's own keywords " syn match pl1Keyword "\" " syn match pl1Keyword "\.COUNT\>"hs=s+1 " syn match pl1Keyword "\.EXISTS\>"hs=s+1 " syn match pl1Keyword "\.FIRST\>"hs=s+1 " syn match pl1Keyword "\.LAST\>"hs=s+1 " syn match pl1Keyword "\.DELETE\>"hs=s+1 " syn match pl1Keyword "\.PREV\>"hs=s+1 " syn match pl1Keyword "\.NEXT\>"hs=s+1 if exists("pl1_highlight_triggers") syn keyword pl1Trigger INSERTING UPDATING DELETING endif " Conditionals. syn keyword pl1Conditional ELSIF ELSE IF syn match pl1Conditional "\" " Loops. syn keyword pl1Repeat FOR LOOP WHILE FORALL syn match pl1Repeat "\" " Various types of comments. " 20010723az: Added the ability to treat strings within comments just like " C does. if exists("c_comment_strings") syntax match pl1CommentSkip contained "^\s*\*\($\|\s\+\)" syntax region pl1CommentString contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=pl1CommentSkip syntax region pl1Comment2String contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end="$" syntax region pl1CommentL start="--" skip="\\$" end="$" keepend contains=@pl1CommentGroup,pl1Comment2String,pl1CharLiteral,pl1BooleanLiteral,pl1NumbersCom,pl1SpaceError syntax region pl1Comment start="/\*" end="\*/" contains=@pl1CommentGroup,pl1Comment2String,pl1CharLiteral,pl1BooleanLiteral,pl1NumbersCom,pl1SpaceError else syntax region pl1CommentL start="--" skip="\\$" end="$" keepend contains=@pl1CommentGroup,pl1SpaceError syntax region pl1Comment start="/\*" end="\*/" contains=@pl1CommentGroup,pl1SpaceError endif " 20010723az: These are the old comment commands ... commented out. " syn match pl1Comment "--.*$" contains=pl1Todo " syn region pl1Comment start="/\*" end="\*/" contains=pl1Todo syn sync ccomment pl1Comment syn sync ccomment pl1CommentL " To catch unterminated string literals. syn match pl1StringError "'.*$" " Various types of literals. " 20010723az: Added stuff for comment matching. syn match pl1Numbers transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=pl1IntLiteral,pl1FloatLiteral syn match pl1NumbersCom contained transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=pl1IntLiteral,pl1FloatLiteral syn match pl1IntLiteral contained "[+-]\=\d\+" syn match pl1FloatLiteral contained "[+-]\=\d\+\.\d*" syn match pl1FloatLiteral contained "[+-]\=\d*\.\d*" "syn match pl1FloatLiteral "[+-]\=\([0-9]*\.[0-9]\+\|[0-9]\+\.[0-9]\+\)\(e[+-]\=[0-9]\+\)\=" syn match pl1CharLiteral "'[^']'" syn match pl1StringLiteral "'\([^']\|''\)*'" syn keyword pl1BooleanLiteral TRUE FALSE NULL " The built-in types. syn keyword pl1Storage ANYDATA ANYTYPE BFILE BINARY_INTEGER BLOB BOOLEAN syn keyword pl1Storage BYTE CHAR CHARACTER CLOB CURSOR DATE DAY DEC DECIMAL syn keyword pl1Storage DOUBLE DSINTERVAL_UNCONSTRAINED FLOAT HOUR syn keyword pl1Storage INT INTEGER INTERVAL LOB LONG MINUTE syn keyword pl1Storage MLSLABEL MONTH NATURAL NATURALN NCHAR NCHAR_CS NCLOB syn keyword pl1Storage NUMBER NUMERIC NVARCHAR PLS_INT PLS_INTEGER syn keyword pl1Storage POSITIVE POSITIVEN PRECISION RAW REAL RECORD syn keyword pl1Storage SECOND SIGNTYPE SMALLINT STRING SYS_REFCURSOR TABLE TIME syn keyword pl1Storage TIMESTAMP TIMESTAMP_UNCONSTRAINED syn keyword pl1Storage TIMESTAMP_TZ_UNCONSTRAINED syn keyword pl1Storage TIMESTAMP_LTZ_UNCONSTRAINED UROWID VARCHAR syn keyword pl1Storage VARCHAR2 YEAR YMINTERVAL_UNCONSTRAINED ZONE " A type-attribute is really a type. " 20020916bp: Removed leading part of pattern to avoid highlighting the " object syn match pl1TypeAttribute "%\(TYPE\|ROWTYPE\)\>" " All other attributes. syn match pl1Attribute "%\(BULK_EXCEPTIONS\|BULK_ROWCOUNT\|ISOPEN\|FOUND\|NOTFOUND\|ROWCOUNT\)\>" " Catch errors caused by wrong parentheses and brackets " 20010723az: significantly more powerful than the values -- commented out " below the replaced values. This adds the C functionality to PL/SQL. syn cluster pl1ParenGroup contains=pl1ParenError,@pl1CommentGroup,pl1CommentSkip,pl1IntLiteral,pl1FloatLiteral,pl1NumbersCom if exists("c_no_bracket_error") syn region pl1Paren transparent start='(' end=')' contains=ALLBUT,@pl1ParenGroup syn match pl1ParenError ")" syn match pl1ErrInParen contained "[{}]" else syn region pl1Paren transparent start='(' end=')' contains=ALLBUT,@pl1ParenGroup,pl1ErrInBracket syn match pl1ParenError "[\])]" syn match pl1ErrInParen contained "[{}]" syn region pl1Bracket transparent start='\[' end=']' contains=ALLBUT,@pl1ParenGroup,pl1ErrInParen syn match pl1ErrInBracket contained "[);{}]" endif " syn region pl1Paren transparent start='(' end=')' contains=ALLBUT,pl1ParenError " syn match pl1ParenError ")" " Syntax Synchronizing syn sync minlines=10 maxlines=100 " Define the default highlighting. " Only when and item doesn't have highlighting yet. hi def link pl1Attribute Macro hi def link pl1BlockError Error hi def link pl1BooleanLiteral Boolean hi def link pl1CharLiteral Character hi def link pl1Comment Comment hi def link pl1CommentL Comment hi def link pl1Conditional Conditional hi def link pl1Error Error hi def link pl1ErrInBracket Error hi def link pl1ErrInBlock Error hi def link pl1ErrInParen Error hi def link pl1Exception Function hi def link pl1FloatLiteral Float hi def link pl1Function Function hi def link pl1Garbage Error hi def link pl1HostIdentifier Label hi def link pl1Identifier Normal hi def link pl1IntLiteral Number hi def link pl1Operator Operator hi def link pl1Paren Normal hi def link pl1ParenError Error hi def link pl1SpaceError Error hi def link pl1Pseudo PreProc hi def link pl1PreProc PreProc hi def link pl1PreProcSym PreProc hi def link pl1Keyword Keyword hi def link pl1Other Keyword hi def link pl1Repeat Repeat hi def link pl1Statement Keyword hi def link pl1Storage StorageClass hi def link pl1StringError Error hi def link pl1StringLiteral String hi def link pl1CommentString String hi def link pl1Comment2String String hi def link pl1Symbol Normal hi def link pl1Trigger Function hi def link pl1TypeAttribute StorageClass hi def link pl1Todo Todo let b:current_syntax = "pl1" neovim-0.2.2/runtime/syntax/plm.vim000066400000000000000000000123611320401574200173270ustar00rootroot00000000000000" Vim syntax file " Language: PL/M " Maintainer: Philippe Coulonges " Last change: 2003 May 11 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " PL/M is a case insensitive language syn case ignore syn keyword plmTodo contained TODO FIXME XXX " String syn region plmString start=+'+ end=+'+ syn match plmOperator "[@=\+\-\*\/\<\>]" syn match plmIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" syn match plmDelimiter "[();,]" syn region plmPreProc start="^\s*\$\s*" skip="\\$" end="$" " FIXME : No Number support for floats, as I'm working on an embedded " project that doesn't use any. syn match plmNumber "-\=\<\d\+\>" syn match plmNumber "\<[0-9a-fA-F]*[hH]*\>" " If you don't like tabs "syn match plmShowTab "\t" "syn match plmShowTabc "\t" "when wanted, highlight trailing white space if exists("c_space_errors") syn match plmSpaceError "\s*$" syn match plmSpaceError " \+\t"me=e-1 endif " " Use the same control variable as C language for I believe " users will want the same behavior if exists("c_comment_strings") " FIXME : don't work fine with c_comment_strings set, " which I don't care as I don't use " A comment can contain plmString, plmCharacter and plmNumber. " But a "*/" inside a plmString in a plmComment DOES end the comment! So we " need to use a special type of plmString: plmCommentString, which also ends on " "*/", and sees a "*" at the start of the line as comment again. syntax match plmCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region plmCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plmSpecial,plmCommentSkip syntax region plmComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=plmSpecial syntax region plmComment start="/\*" end="\*/" contains=plmTodo,plmCommentString,plmCharacter,plmNumber,plmFloat,plmSpaceError syntax match plmComment "//.*" contains=plmTodo,plmComment2String,plmCharacter,plmNumber,plmSpaceError else syn region plmComment start="/\*" end="\*/" contains=plmTodo,plmSpaceError syn match plmComment "//.*" contains=plmTodo,plmSpaceError endif syntax match plmCommentError "\*/" syn keyword plmReserved ADDRESS AND AT BASED BY BYTE CALL CASE syn keyword plmReserved DATA DECLARE DISABLE DO DWORD syn keyword plmReserved ELSE ENABLE END EOF EXTERNAL syn keyword plmReserved GO GOTO HALT IF INITIAL INTEGER INTERRUPT syn keyword plmReserved LABEL LITERALLY MINUS MOD NOT OR syn keyword plmReserved PLUS POINTER PROCEDURE PUBLIC syn keyword plmReserved REAL REENTRANT RETURN SELECTOR STRUCTURE syn keyword plmReserved THEN TO WHILE WORD XOR syn keyword plm386Reserved CHARINT HWORD LONGINT OFFSET QWORD SHORTINT syn keyword plmBuiltIn ABS ADJUSTRPL BLOCKINPUT BLOCKINWORD BLOCKOUTPUT syn keyword plmBuiltIn BLOCKOUTWORD BUILPTR CARRY CAUSEINTERRUPT CMPB syn keyword plmBuiltIn CMPW DEC DOUBLE FINDB FINDRB FINDRW FINDW FIX syn keyword plmBuiltIn FLAGS FLOAT GETREALERROR HIGH IABS INITREALMATHUNIT syn keyword plmBuiltIn INPUT INT INWORD LAST LOCKSET LENGTH LOW MOVB MOVE syn keyword plmBuiltIn MOVRB MOVRW MOVW NIL OUTPUT OUTWORD RESTOREREALSTATUS syn keyword plmBuiltIn ROL ROR SAL SAVEREALSTATUS SCL SCR SELECTOROF SETB syn keyword plmBuiltIn SETREALMODE SETW SHL SHR SIGN SIGNED SIZE SKIPB syn keyword plmBuiltIn SKIPRB SKIPRW SKIPW STACKBASE STACKPTR TIME SIZE syn keyword plmBuiltIn UNSIGN XLAT ZERO syn keyword plm386BuiltIn INTERRUPT SETINTERRUPT syn keyword plm286BuiltIn CLEARTASKSWITCHEDFLAG GETACCESSRIGHTS syn keyword plm286BuiltIn GETSEGMENTLIMIT LOCALTABLE MACHINESTATUS syn keyword plm286BuiltIn OFFSETOF PARITY RESTOREGLOBALTABLE syn keyword plm286BuiltIn RESTOREINTERRUPTTABLE SAVEGLOBALTABLE syn keyword plm286BuiltIn SAVEINTERRUPTTABLE SEGMENTREADABLE syn keyword plm286BuiltIn SEGMENTWRITABLE TASKREGISTER WAITFORINTERRUPT syn keyword plm386BuiltIn CONTROLREGISTER DEBUGREGISTER FINDHW syn keyword plm386BuiltIn FINDRHW INHWORD MOVBIT MOVRBIT MOVHW MOVRHW syn keyword plm386BuiltIn OUTHWORD SCANBIT SCANRBIT SETHW SHLD SHRD syn keyword plm386BuiltIn SKIPHW SKIPRHW TESTREGISTER syn keyword plm386w16BuiltIn BLOCKINDWORD BLOCKOUTDWORD CMPD FINDD syn keyword plm386w16BuiltIn FINDRD INDWORD MOVD MOVRD OUTDWORD syn keyword plm386w16BuiltIn SETD SKIPD SKIPRD syn sync lines=50 " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later " hi def link plmLabel Label " hi def link plmConditional Conditional " hi def link plmRepeat Repeat hi def link plmTodo Todo hi def link plmNumber Number hi def link plmOperator Operator hi def link plmDelimiter Operator "hi def link plmShowTab Error "hi def link plmShowTabc Error hi def link plmIdentifier Identifier hi def link plmBuiltIn Statement hi def link plm286BuiltIn Statement hi def link plm386BuiltIn Statement hi def link plm386w16BuiltIn Statement hi def link plmReserved Statement hi def link plm386Reserved Statement hi def link plmPreProc PreProc hi def link plmCommentError plmError hi def link plmCommentString plmString hi def link plmComment2String plmString hi def link plmCommentSkip plmComment hi def link plmString String hi def link plmComment Comment let b:current_syntax = "plm" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/plp.vim000066400000000000000000000023631320401574200173330ustar00rootroot00000000000000" Vim syntax file " Language: PLP (Perl in HTML) " Maintainer: Juerd " Last Change: 2003 Apr 25 " Cloned From: aspperl.vim " Add to filetype.vim the following line (without quote sign): " au BufNewFile,BufRead *.plp setf plp " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'perlscript' endif runtime! syntax/html.vim unlet b:current_syntax syn include @PLPperl syntax/perl.vim syn cluster htmlPreproc add=PLPperlblock syn keyword perlControl PLP_END syn keyword perlStatementInclude include Include syn keyword perlStatementFiles ReadFile WriteFile Counter syn keyword perlStatementScalar Entity AutoURL DecodeURI EncodeURI syn cluster PLPperlcode contains=perlStatement.*,perlFunction,perlOperator,perlVarPlain,perlVarNotInMatches,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ,perlControl,perlConditional,perlRepeat,perlComment,perlPOD,perlHereDoc,perlPackageDecl,perlElseIfError,perlFiledescRead,perlMatch syn region PLPperlblock keepend matchgroup=Delimiter start=+<:=\=+ end=+:>+ transparent contains=@PLPperlcode syn region PLPinclude keepend matchgroup=Delimiter start=+<(+ end=+)>+ let b:current_syntax = "plp" neovim-0.2.2/runtime/syntax/plsql.vim000066400000000000000000000311661320401574200176760ustar00rootroot00000000000000" Vim syntax file " Language: Oracle Procedureal SQL (PL/SQL) " Maintainer: Jeff Lanzarotta (jefflanzarotta at yahoo dot com) " Original Maintainer: C. Laurence Gonsalves (clgonsal@kami.com) " URL: http://lanzarotta.tripod.com/vim/syntax/plsql.vim.zip " Last Change: September 18, 2002 " History: Geoff Evans & Bill Pribyl (bill at plnet dot org) " Added 9i keywords. " Austin Ziegler (austin at halostatue dot ca) " Added 8i+ features. " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Todo. syn keyword plsqlTodo TODO FIXME XXX DEBUG NOTE syn cluster plsqlCommentGroup contains=plsqlTodo syn case ignore syn match plsqlGarbage "[^ \t()]" syn match plsqlIdentifier "[a-z][a-z0-9$_#]*" syn match plsqlHostIdentifier ":[a-z][a-z0-9$_#]*" " When wanted, highlight the trailing whitespace. if exists("c_space_errors") if !exists("c_no_trail_space_error") syn match plsqlSpaceError "\s\+$" endif if !exists("c_no_tab_space_error") syn match plsqlSpaceError " \+\t"me=e-1 endif endif " Symbols. syn match plsqlSymbol "\(;\|,\|\.\)" " Operators. syn match plsqlOperator "\(+\|-\|\*\|/\|=\|<\|>\|@\|\*\*\|!=\|\~=\)" syn match plsqlOperator "\(^=\|<=\|>=\|:=\|=>\|\.\.\|||\|<<\|>>\|\"\)" " Some of Oracle's SQL keywords. syn keyword plsqlSQLKeyword ABORT ACCESS ACCESSED ADD AFTER ALL ALTER AND ANY syn keyword plsqlSQLKeyword AS ASC ATTRIBUTE AUDIT AUTHORIZATION AVG BASE_TABLE syn keyword plsqlSQLKeyword BEFORE BETWEEN BY CASCADE CAST CHECK CLUSTER syn keyword plsqlSQLKeyword CLUSTERS COLAUTH COLUMN COMMENT COMPRESS CONNECT syn keyword plsqlSQLKeyword CONSTRAINT CRASH CREATE CURRENT DATA DATABASE syn keyword plsqlSQLKeyword DATA_BASE DBA DEFAULT DELAY DELETE DESC DISTINCT syn keyword plsqlSQLKeyword DROP DUAL ELSE EXCLUSIVE EXISTS EXTENDS EXTRACT syn keyword plsqlSQLKeyword FILE FORCE FOREIGN FROM GRANT GROUP HAVING HEAP syn keyword plsqlSQLKeyword IDENTIFIED IDENTIFIER IMMEDIATE IN INCLUDING syn keyword plsqlSQLKeyword INCREMENT INDEX INDEXES INITIAL INSERT INSTEAD syn keyword plsqlSQLKeyword INTERSECT INTO INVALIDATE IS ISOLATION KEY LIBRARY syn keyword plsqlSQLKeyword LIKE LOCK MAXEXTENTS MINUS MODE MODIFY MULTISET syn keyword plsqlSQLKeyword NESTED NOAUDIT NOCOMPRESS NOT NOWAIT OF OFF OFFLINE syn keyword plsqlSQLKeyword ON ONLINE OPERATOR OPTION OR ORDER ORGANIZATION syn keyword plsqlSQLKeyword PCTFREE PRIMARY PRIOR PRIVATE PRIVILEGES PUBLIC syn keyword plsqlSQLKeyword QUOTA RELEASE RENAME REPLACE RESOURCE REVOKE ROLLBACK syn keyword plsqlSQLKeyword ROW ROWLABEL ROWS SCHEMA SELECT SEPARATE SESSION SET syn keyword plsqlSQLKeyword SHARE SIZE SPACE START STORE SUCCESSFUL SYNONYM syn keyword plsqlSQLKeyword SYSDATE TABLE TABLES TABLESPACE TEMPORARY TO TREAT syn keyword plsqlSQLKeyword TRIGGER TRUNCATE UID UNION UNIQUE UNLIMITED UPDATE syn keyword plsqlSQLKeyword USE USER VALIDATE VALUES VIEW WHENEVER WHERE WITH " PL/SQL's own keywords. syn keyword plsqlKeyword AGENT AND ANY ARRAY ASSIGN AS AT AUTHID BEGIN BODY BY syn keyword plsqlKeyword BULK C CASE CHAR_BASE CHARSETFORM CHARSETID CLOSE syn keyword plsqlKeyword COLLECT CONSTANT CONSTRUCTOR CONTEXT CURRVAL DECLARE syn keyword plsqlKeyword DVOID EXCEPTION EXCEPTION_INIT EXECUTE EXIT FETCH syn keyword plsqlKeyword FINAL FUNCTION GOTO HASH IMMEDIATE IN INDICATOR syn keyword plsqlKeyword INSTANTIABLE IS JAVA LANGUAGE LIBRARY MAP MAXLEN syn keyword plsqlKeyword MEMBER NAME NEW NOCOPY NUMBER_BASE OBJECT OCICOLL syn keyword plsqlKeyword OCIDATE OCIDATETIME OCILOBLOCATOR OCINUMBER OCIRAW syn keyword plsqlKeyword OCISTRING OF OPAQUE OPEN OR ORDER OTHERS OUT syn keyword plsqlKeyword OVERRIDING PACKAGE PARALLEL_ENABLE PARAMETERS syn keyword plsqlKeyword PARTITION PIPELINED PRAGMA PROCEDURE RAISE RANGE REF syn keyword plsqlKeyword RESULT RETURN REVERSE ROWTYPE SB1 SELF SHORT SIZE_T syn keyword plsqlKeyword SQL SQLCODE SQLERRM STATIC STRUCT SUBTYPE TDO THEN syn keyword plsqlKeyword TABLE TIMEZONE_ABBR TIMEZONE_HOUR TIMEZONE_MINUTE syn keyword plsqlKeyword TIMEZONE_REGION TYPE UNDER UNSIGNED USING VARIANCE syn keyword plsqlKeyword VARRAY VARYING WHEN WRITE syn match plsqlKeyword "\" syn match plsqlKeyword "\.COUNT\>"hs=s+1 syn match plsqlKeyword "\.EXISTS\>"hs=s+1 syn match plsqlKeyword "\.FIRST\>"hs=s+1 syn match plsqlKeyword "\.LAST\>"hs=s+1 syn match plsqlKeyword "\.DELETE\>"hs=s+1 syn match plsqlKeyword "\.PREV\>"hs=s+1 syn match plsqlKeyword "\.NEXT\>"hs=s+1 " PL/SQL functions. syn keyword plsqlFunction ABS ACOS ADD_MONTHS ASCII ASCIISTR ASIN ATAN ATAN2 syn keyword plsqlFunction BFILENAME BITAND CEIL CHARTOROWID CHR COALESCE syn keyword plsqlFunction COMMIT COMMIT_CM COMPOSE CONCAT CONVERT COS COSH syn keyword plsqlFunction COUNT CUBE CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP syn keyword plsqlFunction DBTIMEZONE DECODE DECOMPOSE DEREF DUMP EMPTY_BLOB syn keyword plsqlFunction EMPTY_CLOB EXISTS EXP FLOOR FROM_TZ GETBND GLB syn keyword plsqlFunction GREATEST GREATEST_LB GROUPING HEXTORAW INITCAP syn keyword plsqlFunction INSTR INSTR2 INSTR4 INSTRB INSTRC ISNCHAR LAST_DAY syn keyword plsqlFunction LEAST LEAST_UB LENGTH LENGTH2 LENGTH4 LENGTHB LENGTHC syn keyword plsqlFunction LN LOCALTIME LOCALTIMESTAMP LOG LOWER LPAD syn keyword plsqlFunction LTRIM LUB MAKE_REF MAX MIN MOD MONTHS_BETWEEN syn keyword plsqlFunction NCHARTOROWID NCHR NEW_TIME NEXT_DAY NHEXTORAW syn keyword plsqlFunction NLS_CHARSET_DECL_LEN NLS_CHARSET_ID NLS_CHARSET_NAME syn keyword plsqlFunction NLS_INITCAP NLS_LOWER NLSSORT NLS_UPPER NULLFN NULLIF syn keyword plsqlFunction NUMTODSINTERVAL NUMTOYMINTERVAL NVL POWER syn keyword plsqlFunction RAISE_APPLICATION_ERROR RAWTOHEX RAWTONHEX REF syn keyword plsqlFunction REFTOHEX REPLACE ROLLBACK_NR ROLLBACK_SV ROLLUP ROUND syn keyword plsqlFunction ROWIDTOCHAR ROWIDTONCHAR ROWLABEL RPAD RTRIM syn keyword plsqlFunction SAVEPOINT SESSIONTIMEZONE SETBND SET_TRANSACTION_USE syn keyword plsqlFunction SIGN SIN SINH SOUNDEX SQLCODE SQLERRM SQRT STDDEV syn keyword plsqlFunction SUBSTR SUBSTR2 SUBSTR4 SUBSTRB SUBSTRC SUM syn keyword plsqlFunction SYS_AT_TIME_ZONE SYS_CONTEXT SYSDATE SYS_EXTRACT_UTC syn keyword plsqlFunction SYS_GUID SYS_LITERALTODATE SYS_LITERALTODSINTERVAL syn keyword plsqlFunction SYS_LITERALTOTIME SYS_LITERALTOTIMESTAMP syn keyword plsqlFunction SYS_LITERALTOTZTIME SYS_LITERALTOTZTIMESTAMP syn keyword plsqlFunction SYS_LITERALTOYMINTERVAL SYS_OVER__DD SYS_OVER__DI syn keyword plsqlFunction SYS_OVER__ID SYS_OVER_IID SYS_OVER_IIT syn keyword plsqlFunction SYS_OVER__IT SYS_OVER__TI SYS_OVER__TT syn keyword plsqlFunction SYSTIMESTAMP TAN TANH TO_ANYLOB TO_BLOB TO_CHAR syn keyword plsqlFunction TO_CLOB TO_DATE TO_DSINTERVAL TO_LABEL TO_MULTI_BYTE syn keyword plsqlFunction TO_NCHAR TO_NCLOB TO_NUMBER TO_RAW TO_SINGLE_BYTE syn keyword plsqlFunction TO_TIME TO_TIMESTAMP TO_TIMESTAMP_TZ TO_TIME_TZ syn keyword plsqlFunction TO_YMINTERVAL TRANSLATE TREAT TRIM TRUNC TZ_OFFSET UID syn keyword plsqlFunction UNISTR UPPER UROWID USER USERENV VALUE VARIANCE syn keyword plsqlFunction VSIZE WORK XOR syn match plsqlFunction "\" " PL/SQL Exceptions syn keyword plsqlException ACCESS_INTO_NULL CASE_NOT_FOUND COLLECTION_IS_NULL syn keyword plsqlException CURSOR_ALREADY_OPEN DUP_VAL_ON_INDEX INVALID_CURSOR syn keyword plsqlException INVALID_NUMBER LOGIN_DENIED NO_DATA_FOUND syn keyword plsqlException NOT_LOGGED_ON PROGRAM_ERROR ROWTYPE_MISMATCH syn keyword plsqlException SELF_IS_NULL STORAGE_ERROR SUBSCRIPT_BEYOND_COUNT syn keyword plsqlException SUBSCRIPT_OUTSIDE_LIMIT SYS_INVALID_ROWID syn keyword plsqlException TIMEOUT_ON_RESOURCE TOO_MANY_ROWS VALUE_ERROR syn keyword plsqlException ZERO_DIVIDE " Oracle Pseudo Colums. syn keyword plsqlPseudo CURRVAL LEVEL NEXTVAL ROWID ROWNUM if exists("plsql_highlight_triggers") syn keyword plsqlTrigger INSERTING UPDATING DELETING endif " Conditionals. syn keyword plsqlConditional ELSIF ELSE IF syn match plsqlConditional "\" " Loops. syn keyword plsqlRepeat FOR LOOP WHILE FORALL syn match plsqlRepeat "\" " Various types of comments. if exists("c_comment_strings") syntax match plsqlCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region plsqlCommentString contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plsqlCommentSkip syntax region plsqlComment2String contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end="$" syntax region plsqlCommentL start="--" skip="\\$" end="$" keepend contains=@plsqlCommentGroup,plsqlComment2String,plsqlCharLiteral,plsqlBooleanLiteral,plsqlNumbersCom,plsqlSpaceError syntax region plsqlComment start="/\*" end="\*/" contains=@plsqlCommentGroup,plsqlComment2String,plsqlCharLiteral,plsqlBooleanLiteral,plsqlNumbersCom,plsqlSpaceError else syntax region plsqlCommentL start="--" skip="\\$" end="$" keepend contains=@plsqlCommentGroup,plsqlSpaceError syntax region plsqlComment start="/\*" end="\*/" contains=@plsqlCommentGroup,plsqlSpaceError endif syn sync ccomment plsqlComment syn sync ccomment plsqlCommentL " To catch unterminated string literals. syn match plsqlStringError "'.*$" " Various types of literals. syn match plsqlNumbers transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=plsqlIntLiteral,plsqlFloatLiteral syn match plsqlNumbersCom contained transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=plsqlIntLiteral,plsqlFloatLiteral syn match plsqlIntLiteral contained "[+-]\=\d\+" syn match plsqlFloatLiteral contained "[+-]\=\d\+\.\d*" syn match plsqlFloatLiteral contained "[+-]\=\d*\.\d*" syn match plsqlCharLiteral "'[^']'" syn match plsqlStringLiteral "'\([^']\|''\)*'" syn keyword plsqlBooleanLiteral TRUE FALSE NULL " The built-in types. syn keyword plsqlStorage ANYDATA ANYTYPE BFILE BINARY_INTEGER BLOB BOOLEAN syn keyword plsqlStorage BYTE CHAR CHARACTER CLOB CURSOR DATE DAY DEC DECIMAL syn keyword plsqlStorage DOUBLE DSINTERVAL_UNCONSTRAINED FLOAT HOUR syn keyword plsqlStorage INT INTEGER INTERVAL LOB LONG MINUTE syn keyword plsqlStorage MLSLABEL MONTH NATURAL NATURALN NCHAR NCHAR_CS NCLOB syn keyword plsqlStorage NUMBER NUMERIC NVARCHAR PLS_INT PLS_INTEGER syn keyword plsqlStorage POSITIVE POSITIVEN PRECISION RAW REAL RECORD syn keyword plsqlStorage SECOND SIGNTYPE SMALLINT STRING SYS_REFCURSOR TABLE TIME syn keyword plsqlStorage TIMESTAMP TIMESTAMP_UNCONSTRAINED syn keyword plsqlStorage TIMESTAMP_TZ_UNCONSTRAINED syn keyword plsqlStorage TIMESTAMP_LTZ_UNCONSTRAINED UROWID VARCHAR syn keyword plsqlStorage VARCHAR2 YEAR YMINTERVAL_UNCONSTRAINED ZONE " A type-attribute is really a type. syn match plsqlTypeAttribute "%\(TYPE\|ROWTYPE\)\>" " All other attributes. syn match plsqlAttribute "%\(BULK_EXCEPTIONS\|BULK_ROWCOUNT\|ISOPEN\|FOUND\|NOTFOUND\|ROWCOUNT\)\>" " This'll catch mis-matched close-parens. syn cluster plsqlParenGroup contains=plsqlParenError,@plsqlCommentGroup,plsqlCommentSkip,plsqlIntLiteral,plsqlFloatLiteral,plsqlNumbersCom if exists("c_no_bracket_error") syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup syn match plsqlParenError ")" syn match plsqlErrInParen contained "[{}]" else syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup,plsqlErrInBracket syn match plsqlParenError "[\])]" syn match plsqlErrInParen contained "[{}]" syn region plsqlBracket transparent start='\[' end=']' contains=ALLBUT,@plsqlParenGroup,plsqlErrInParen syn match plsqlErrInBracket contained "[);{}]" endif " Syntax Synchronizing syn sync minlines=10 maxlines=100 " Define the default highlighting. " Only when an item doesn't have highlighting yet. hi def link plsqlAttribute Macro hi def link plsqlBlockError Error hi def link plsqlBooleanLiteral Boolean hi def link plsqlCharLiteral Character hi def link plsqlComment Comment hi def link plsqlCommentL Comment hi def link plsqlConditional Conditional hi def link plsqlError Error hi def link plsqlErrInBracket Error hi def link plsqlErrInBlock Error hi def link plsqlErrInParen Error hi def link plsqlException Function hi def link plsqlFloatLiteral Float hi def link plsqlFunction Function hi def link plsqlGarbage Error hi def link plsqlHostIdentifier Label hi def link plsqlIdentifier Normal hi def link plsqlIntLiteral Number hi def link plsqlOperator Operator hi def link plsqlParen Normal hi def link plsqlParenError Error hi def link plsqlSpaceError Error hi def link plsqlPseudo PreProc hi def link plsqlKeyword Keyword hi def link plsqlRepeat Repeat hi def link plsqlStorage StorageClass hi def link plsqlSQLKeyword Function hi def link plsqlStringError Error hi def link plsqlStringLiteral String hi def link plsqlCommentString String hi def link plsqlComment2String String hi def link plsqlSymbol Normal hi def link plsqlTrigger Function hi def link plsqlTypeAttribute StorageClass hi def link plsqlTodo Todo let b:current_syntax = "plsql" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/po.vim000066400000000000000000000143711320401574200171600ustar00rootroot00000000000000" Vim syntax file " Language: po (gettext) " Maintainer: Dwayne Bailey " Last Change: 2015 Jun 07 " Contributors: Dwayne Bailey (Most advanced syntax highlighting) " Leonardo Fontenelle (Spell checking) " Nam SungHyun (Original maintainer) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:keepcpo= &cpo set cpo&vim syn sync minlines=10 " Identifiers syn match poStatementMsgCTxt "^msgctxt" syn match poStatementMsgidplural "^msgid_plural" contained syn match poPluralCaseN "[0-9]" contained syn match poStatementMsgstr "^msgstr\(\[[0-9]\]\)" contains=poPluralCaseN " Simple HTML and XML highlighting syn match poHtml "<\_[^<>]\+>" contains=poHtmlTranslatables,poLineBreak syn match poHtmlNot +"<[^<]\+>"+ms=s+1,me=e-1 syn region poHtmlTranslatables start=+\(abbr\|alt\|content\|summary\|standby\|title\)=\\"+ms=e-1 end=+\\"+ contained contains=@Spell syn match poLineBreak +"\n"+ contained " Translation blocks syn region poMsgCTxt matchgroup=poStatementMsgCTxt start=+^msgctxt "+rs=e-1 matchgroup=poStringCTxt end=+^msgid "+me=s-1 contains=poStringCTxt syn region poMsgID matchgroup=poStatementMsgid start=+^msgid "+rs=e-1 matchgroup=poStringID end=+^msgstr\(\|\[[\]0\[]\]\) "+me=s-1 contains=poStringID,poStatementMsgidplural,poStatementMsgid syn region poMsgSTR matchgroup=poStatementMsgstr start=+^msgstr\(\|\[[\]0\[]\]\) "+rs=e-1 matchgroup=poStringSTR end=+\n\n+me=s-1 contains=poStringSTR,poStatementMsgstr syn region poStringCTxt start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region poStringID start=+"+ skip=+\\\\\|\\"+ end=+"+ contained \ contains=poSpecial,poFormat,poCommentKDE,poPluralKDE,poKDEdesktopFile,poHtml,poAcceleratorId,poHtmlNot,poVariable syn region poStringSTR start=+"+ skip=+\\\\\|\\"+ end=+"+ contained \ contains=@Spell,poSpecial,poFormat,poHeaderItem,poCommentKDEError,poHeaderUndefined,poPluralKDEError,poMsguniqError,poKDEdesktopFile,poHtml,poAcceleratorStr,poHtmlNot,poVariable " Header and Copyright syn match poHeaderItem "\(Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|Language\|MIME-Version\|Content-Type\|Content-Transfer-Encoding\|Plural-Forms\|X-Generator\): " contained syn match poHeaderUndefined "\(PACKAGE VERSION\|YEAR-MO-DA HO:MI+ZONE\|FULL NAME \|LANGUAGE \|CHARSET\|ENCODING\|INTEGER\|EXPRESSION\)" contained syn match poCopyrightUnset "SOME DESCRIPTIVE TITLE\|FIRST AUTHOR , YEAR\|Copyright (C) YEAR Free Software Foundation, Inc\|YEAR THE PACKAGE\'S COPYRIGHT HOLDER\|PACKAGE" contained " Translation comment block including: translator comment, automatic coments, flags and locations syn match poComment "^#.*$" syn keyword poFlagFuzzy fuzzy contained syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset syn match poCommentAutomatic "^#\..*$" syn match poCommentSources "^#:.*$" syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy syn match poDiffOld '\(^#| "[^{]*+}\|{+[^}]*+}\|{+[^}]*\|"$\)' contained syn match poDiffNew '\(^#| "[^{]*-}\|{-[^}]*-}\|{-[^}]*\|"$\)' contained syn match poCommentDiff "^#|.*$" contains=poDiffOld,poDiffNew " Translations (also includes header fields as they appear in a translation msgstr) syn region poCommentKDE start=+"_: +ms=s+1 end="\\n" end="\"\n^msgstr"me=s-1 contained syn region poCommentKDEError start=+"\(\|\s\+\)_:+ms=s+1 end="\\n" end=+"\n\n+me=s-1 contained syn match poPluralKDE +"_n: +ms=s+1 contained syn region poPluralKDEError start=+"\(\|\s\+\)_n:+ms=s+1 end="\"\n\n"me=s-1 contained syn match poSpecial contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" syn match poFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained syn match poFormat "%%" contained " msguniq and msgcat conflicts syn region poMsguniqError matchgroup=poMsguniqErrorMarkers start="#-#-#-#-#" end='#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)\\n' contained " Obsolete messages syn match poObsolete "^#\~.*$" " KDE Name= handling syn match poKDEdesktopFile "\"\(Name\|Comment\|GenericName\|Description\|Keywords\|About\)="ms=s+1,me=e-1 " Accelerator keys - this messes up if the preceding or following char is a multibyte unicode char syn match poAcceleratorId contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 syn match poAcceleratorStr contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 contains=@Spell " Variables simple syn match poVariable contained "%\d" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link poCommentSources PreProc hi def link poComment Comment hi def link poCommentAutomatic Comment hi def link poCommentTranslator Comment hi def link poCommentFlags Special hi def link poCommentDiff Comment hi def link poCopyrightUnset Todo hi def link poFlagFuzzy Todo hi def link poDiffOld Todo hi def link poDiffNew Special hi def link poObsolete Comment hi def link poStatementMsgid Statement hi def link poStatementMsgstr Statement hi def link poStatementMsgidplural Statement hi def link poStatementMsgCTxt Statement hi def link poPluralCaseN Constant hi def link poStringCTxt Comment hi def link poStringID String hi def link poStringSTR String hi def link poCommentKDE Comment hi def link poCommentKDEError Error hi def link poPluralKDE Comment hi def link poPluralKDEError Error hi def link poHeaderItem Identifier hi def link poHeaderUndefined Todo hi def link poKDEdesktopFile Identifier hi def link poHtml Identifier hi def link poHtmlNot String hi def link poHtmlTranslatables String hi def link poLineBreak String hi def link poFormat poSpecial hi def link poSpecial Special hi def link poAcceleratorId Special hi def link poAcceleratorStr Special hi def link poVariable Special hi def link poMsguniqError Special hi def link poMsguniqErrorMarkers Comment let b:current_syntax = "po" let &cpo = s:keepcpo unlet s:keepcpo " vim:set ts=8 sts=2 sw=2 noet: neovim-0.2.2/runtime/syntax/pod.vim000066400000000000000000000161631320401574200173250ustar00rootroot00000000000000" Vim syntax file " Language: Perl POD format " Maintainer: vim-perl " Previously: Scott Bigham " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2017-09-12 " To add embedded POD documentation highlighting to your syntax file, add " the commands: " " syn include @Pod :p:h/pod.vim " syn region myPOD start="^=pod" start="^=head" end="^=cut" keepend contained contains=@Pod " " and add myPod to the contains= list of some existing region, probably a " comment. The "keepend" flag is needed because "=cut" is matched as a " pattern in its own right. " Remove any old syntax stuff hanging around (this is suppressed " automatically by ":syn include" if necessary). " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " POD commands syn match podCommand "^=encoding" nextgroup=podCmdText contains=@NoSpell syn match podCommand "^=head[1234]" nextgroup=podCmdText contains=@NoSpell syn match podCommand "^=item" nextgroup=podCmdText contains=@NoSpell syn match podCommand "^=over" nextgroup=podOverIndent skipwhite contains=@NoSpell syn match podCommand "^=back" contains=@NoSpell syn match podCommand "^=cut" contains=@NoSpell syn match podCommand "^=pod" contains=@NoSpell syn match podCommand "^=for" nextgroup=podForKeywd skipwhite contains=@NoSpell syn match podCommand "^=begin" nextgroup=podForKeywd skipwhite contains=@NoSpell syn match podCommand "^=end" nextgroup=podForKeywd skipwhite contains=@NoSpell " Text of a =head1, =head2 or =item command syn match podCmdText ".*$" contained contains=podFormat,@NoSpell " Indent amount of =over command syn match podOverIndent "\d\+" contained contains=@NoSpell " Formatter identifier keyword for =for, =begin and =end commands syn match podForKeywd "\S\+" contained contains=@NoSpell " An indented line, to be displayed verbatim syn match podVerbatimLine "^\s.*$" contains=@NoSpell " Inline textual items handled specially by POD syn match podSpecial "\(\<\|&\)\I\i*\(::\I\i*\)*([^)]*)" contains=@NoSpell syn match podSpecial "[$@%]\I\i*\(::\I\i*\)*\>" contains=@NoSpell " Special formatting sequences syn region podFormat start="[IBSCLFX]<[^<]"me=e-1 end=">" oneline contains=podFormat,@NoSpell syn region podFormat start="[IBSCLFX]<<\s" end="\s>>" oneline contains=podFormat,@NoSpell syn match podFormat "Z<>" syn match podFormat "E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2,@NoSpell syn match podEscape "\I\i*>"me=e-1 contained contains=@NoSpell syn match podEscape2 "\d\+>"me=e-1 contained contains=@NoSpell " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link podCommand Statement hi def link podCmdText String hi def link podOverIndent Number hi def link podForKeywd Identifier hi def link podFormat Identifier hi def link podVerbatimLine PreProc hi def link podSpecial Identifier hi def link podEscape String hi def link podEscape2 Number if exists("perl_pod_spellcheck_headings") " Spell-check headings syn clear podCmdText syn match podCmdText ".*$" contained contains=podFormat endif if exists("perl_pod_formatting") " By default, escapes like C<> are not checked for spelling. Remove B<> " and I<> from the list of escapes. syn clear podFormat syn region podFormat start="[CLF]<[^<]"me=e-1 end=">" oneline contains=podFormat,@NoSpell syn region podFormat start="[CLF]<<\s" end="\s>>" oneline contains=podFormat,@NoSpell " Don't spell-check inside E<>, but ensure that the E< itself isn't " marked as a spelling mistake. syn match podFormat "E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2,@NoSpell " Z<> is a mock formatting code. Ensure Z<> on its own isn't marked as a " spelling mistake. syn match podFormat "Z<>" contains=podEscape,podEscape2,@NoSpell " These are required so that whatever is *within* B<...>, I<...>, etc. is " spell-checked, but not the B, I, ... itself. syn match podBoldOpen "B<" contains=@NoSpell syn match podItalicOpen "I<" contains=@NoSpell syn match podNoSpaceOpen "S<" contains=@NoSpell syn match podIndexOpen "X<" contains=@NoSpell " Same as above but for the << >> syntax. syn match podBoldAlternativeDelimOpen "B<< " contains=@NoSpell syn match podItalicAlternativeDelimOpen "I<< " contains=@NoSpell syn match podNoSpaceAlternativeDelimOpen "S<< " contains=@NoSpell syn match podIndexAlternativeDelimOpen "X<< " contains=@NoSpell " Add support for spell checking text inside B<>, I<>, S<> and X<>. syn region podBold start="B<[^<]"me=e end=">" oneline contains=podBoldItalic,podBoldOpen syn region podBoldAlternativeDelim start="B<<\s" end="\s>>" oneline contains=podBoldAlternativeDelimOpen syn region podItalic start="I<[^<]"me=e end=">" oneline contains=podItalicBold,podItalicOpen syn region podItalicAlternativeDelim start="I<<\s" end="\s>>" oneline contains=podItalicAlternativeDelimOpen " Nested bold/italic and vice-versa syn region podBoldItalic contained start="I<[^<]"me=e end=">" oneline syn region podItalicBold contained start="B<[^<]"me=e end=">" oneline syn region podNoSpace start="S<[^<]"ms=s-2 end=">"me=e oneline contains=podNoSpaceOpen syn region podNoSpaceAlternativeDelim start="S<<\s"ms=s-2 end="\s>>"me=e oneline contains=podNoSpaceAlternativeDelimOpen syn region podIndex start="X<[^<]"ms=s-2 end=">"me=e oneline contains=podIndexOpen syn region podIndexAlternativeDelim start="X<<\s"ms=s-2 end="\s>>"me=e oneline contains=podIndexAlternativeDelimOpen " Restore this (otherwise B<> is shown as bold inside verbatim) syn match podVerbatimLine "^\s.*$" contains=@NoSpell " Ensure formatted text can be displayed in headings and items syn clear podCmdText if exists("perl_pod_spellcheck_headings") syn match podCmdText ".*$" contained contains=podFormat,podBold, \podBoldAlternativeDelim,podItalic,podItalicAlternativeDelim, \podBoldOpen,podItalicOpen,podBoldAlternativeDelimOpen, \podItalicAlternativeDelimOpen,podNoSpaceOpen else syn match podCmdText ".*$" contained contains=podFormat,podBold, \podBoldAlternativeDelim,podItalic,podItalicAlternativeDelim, \@NoSpell endif " Specify how to display these hi def podBold term=bold cterm=bold gui=bold hi link podBoldAlternativeDelim podBold hi link podBoldAlternativeDelimOpen podBold hi link podBoldOpen podBold hi link podNoSpace Identifier hi link podNoSpaceAlternativeDelim Identifier hi link podIndex Identifier hi link podIndexAlternativeDelim Identifier hi def podItalic term=italic cterm=italic gui=italic hi link podItalicAlternativeDelim podItalic hi link podItalicAlternativeDelimOpen podItalic hi link podItalicOpen podItalic hi def podBoldItalic term=italic,bold cterm=italic,bold gui=italic,bold hi def podItalicBold term=italic,bold cterm=italic,bold gui=italic,bold endif let b:current_syntax = "pod" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/postscr.vim000066400000000000000000001320651320401574200202400ustar00rootroot00000000000000" Vim syntax file " Language: PostScript - all Levels, selectable " Maintainer: Mike Williams " Filenames: *.ps,*.eps " Last Change: 31st October 2007 " URL: http://www.eandem.co.uk/mrw/vim " " Options Flags: " postscr_level - language level to use for highligting (1, 2, or 3) " postscr_display - include display PS operators " postscr_ghostscript - include GS extensions " postscr_fonts - highlight standard font names (a lot for PS 3) " postscr_encodings - highlight encoding names (there are a lot) " postscr_andornot_binary - highlight and, or, and not as binary operators (not logical) " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " PostScript is case sensitive syn case match " Keyword characters - all 7-bit ASCII bar PS delimiters and ws setlocal iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% " Yer trusty old TODO highlghter! syn keyword postscrTodo contained TODO " Comment syn match postscrComment "%.*$" contains=postscrTodo,@Spell " DSC comment start line (NB: defines DSC level, not PS level!) syn match postscrDSCComment "^%!PS-Adobe-\d\+\.\d\+\s*.*$" " DSC comment line (no check on possible comments - another language!) syn match postscrDSCComment "^%%\u\+.*$" contains=@postscrString,@postscrNumber,@Spell " DSC continuation line (no check that previous line is DSC comment) syn match postscrDSCComment "^%%+ *.*$" contains=@postscrString,@postscrNumber,@Spell " Names syn match postscrName "\k\+" " Identifiers syn match postscrIdentifierError "/\{1,2}[[:space:]\[\]{}]"me=e-1 syn match postscrIdentifier "/\{1,2}\k\+" contains=postscrConstant,postscrBoolean,postscrCustConstant " Numbers syn case ignore " In file hex data - usually complete lines syn match postscrHex "^[[:xdigit:]][[:xdigit:][:space:]]*$" "syn match postscrHex "\<\x\{2,}\>" " Integers syn match postscrInteger "\<[+-]\=\d\+\>" " Radix syn match postscrRadix "\d\+#\x\+\>" " Reals - upper and lower case e is allowed syn match postscrFloat "[+-]\=\d\+\.\>" syn match postscrFloat "[+-]\=\d\+\.\d*\(e[+-]\=\d\+\)\=\>" syn match postscrFloat "[+-]\=\.\d\+\(e[+-]\=\d\+\)\=\>" syn match postscrFloat "[+-]\=\d\+e[+-]\=\d\+\>" syn cluster postscrNumber contains=postscrInteger,postscrRadix,postscrFloat syn case match " Escaped characters syn match postscrSpecialChar contained "\\[nrtbf\\()]" syn match postscrSpecialCharError contained "\\[^nrtbf\\()]"he=e-1 " Escaped octal characters syn match postscrSpecialChar contained "\\\o\{1,3}" " Strings " ASCII strings syn region postscrASCIIString start=+(+ end=+)+ skip=+([^)]*)+ contains=postscrSpecialChar,postscrSpecialCharError,@Spell syn match postscrASCIIStringError ")" " Hex strings syn match postscrHexCharError contained "[^<>[:xdigit:][:space:]]" syn region postscrHexString start=+<\($\|[^<]\)+ end=+>+ contains=postscrHexCharError syn match postscrHexString "<>" " ASCII85 strings syn match postscrASCII85CharError contained "[^<>\~!-uz[:space:]]" syn region postscrASCII85String start=+<\~+ end=+\~>+ contains=postscrASCII85CharError syn cluster postscrString contains=postscrASCIIString,postscrHexString,postscrASCII85String " Set default highlighting to level 2 - most common at the moment if !exists("postscr_level") let postscr_level = 2 endif " PS level 1 operators - common to all levels (well ...) " Stack operators syn keyword postscrOperator pop exch dup copy index roll clear count mark cleartomark counttomark " Math operators syn keyword postscrMathOperator add div idiv mod mul sub abs neg ceiling floor round truncate sqrt atan cos syn keyword postscrMathOperator sin exp ln log rand srand rrand " Array operators syn match postscrOperator "[\[\]{}]" syn keyword postscrOperator array length get put getinterval putinterval astore aload copy syn keyword postscrRepeat forall " Dictionary operators syn keyword postscrOperator dict maxlength begin end def load store known where currentdict syn keyword postscrOperator countdictstack dictstack cleardictstack internaldict syn keyword postscrConstant $error systemdict userdict statusdict errordict " String operators syn keyword postscrOperator string anchorsearch search token " Logic operators syn keyword postscrLogicalOperator eq ne ge gt le lt and not or if exists("postscr_andornot_binaryop") syn keyword postscrBinaryOperator and or not else syn keyword postscrLogicalOperator and not or endif syn keyword postscrBinaryOperator xor bitshift syn keyword postscrBoolean true false " PS Type names syn keyword postscrConstant arraytype booleantype conditiontype dicttype filetype fonttype gstatetype syn keyword postscrConstant integertype locktype marktype nametype nulltype operatortype syn keyword postscrConstant packedarraytype realtype savetype stringtype " Control operators syn keyword postscrConditional if ifelse syn keyword postscrRepeat for repeat loop syn keyword postscrOperator exec exit stop stopped countexecstack execstack quit syn keyword postscrProcedure start " Object operators syn keyword postscrOperator type cvlit cvx xcheck executeonly noaccess readonly rcheck wcheck cvi cvn cvr syn keyword postscrOperator cvrs cvs " File operators syn keyword postscrOperator file closefile read write readhexstring writehexstring readstring writestring syn keyword postscrOperator bytesavailable flush flushfile resetfile status run currentfile print syn keyword postscrOperator stack pstack readline deletefile setfileposition fileposition renamefile syn keyword postscrRepeat filenameforall syn keyword postscrProcedure = == " VM operators syn keyword postscrOperator save restore " Misc operators syn keyword postscrOperator bind null usertime executive echo realtime syn keyword postscrConstant product revision serialnumber version syn keyword postscrProcedure prompt " GState operators syn keyword postscrOperator gsave grestore grestoreall initgraphics setlinewidth setlinecap currentgray syn keyword postscrOperator currentlinejoin setmiterlimit currentmiterlimit setdash currentdash setgray syn keyword postscrOperator sethsbcolor currenthsbcolor setrgbcolor currentrgbcolor currentlinewidth syn keyword postscrOperator currentlinecap setlinejoin setcmykcolor currentcmykcolor " Device gstate operators syn keyword postscrOperator setscreen currentscreen settransfer currenttransfer setflat currentflat syn keyword postscrOperator currentblackgeneration setblackgeneration setundercolorremoval syn keyword postscrOperator setcolorscreen currentcolorscreen setcolortransfer currentcolortransfer syn keyword postscrOperator currentundercolorremoval " Matrix operators syn keyword postscrOperator matrix initmatrix identmatrix defaultmatrix currentmatrix setmatrix translate syn keyword postscrOperator concat concatmatrix transform dtransform itransform idtransform invertmatrix syn keyword postscrOperator scale rotate " Path operators syn keyword postscrOperator newpath currentpoint moveto rmoveto lineto rlineto arc arcn arcto curveto syn keyword postscrOperator closepath flattenpath reversepath strokepath charpath clippath pathbbox syn keyword postscrOperator initclip clip eoclip rcurveto syn keyword postscrRepeat pathforall " Painting operators syn keyword postscrOperator erasepage fill eofill stroke image imagemask colorimage " Device operators syn keyword postscrOperator showpage copypage nulldevice " Character operators syn keyword postscrProcedure findfont syn keyword postscrConstant FontDirectory ISOLatin1Encoding StandardEncoding syn keyword postscrOperator definefont scalefont makefont setfont currentfont show ashow syn keyword postscrOperator stringwidth kshow setcachedevice syn keyword postscrOperator setcharwidth widthshow awidthshow findencoding cshow rootfont setcachedevice2 " Interpreter operators syn keyword postscrOperator vmstatus cachestatus setcachelimit " PS constants syn keyword postscrConstant contained Gray Red Green Blue All None DeviceGray DeviceRGB " PS Filters syn keyword postscrConstant contained ASCIIHexDecode ASCIIHexEncode ASCII85Decode ASCII85Encode LZWDecode syn keyword postscrConstant contained RunLengthDecode RunLengthEncode SubFileDecode NullEncode syn keyword postscrConstant contained GIFDecode PNGDecode LZWEncode " PS JPEG filter dictionary entries syn keyword postscrConstant contained DCTEncode DCTDecode Colors HSamples VSamples QuantTables QFactor syn keyword postscrConstant contained HuffTables ColorTransform " PS CCITT filter dictionary entries syn keyword postscrConstant contained CCITTFaxEncode CCITTFaxDecode Uncompressed K EndOfLine syn keyword postscrConstant contained Columns Rows EndOfBlock Blacks1 DamagedRowsBeforeError syn keyword postscrConstant contained EncodedByteAlign " PS Form dictionary entries syn keyword postscrConstant contained FormType XUID BBox Matrix PaintProc Implementation " PS Errors syn keyword postscrProcedure handleerror syn keyword postscrConstant contained configurationerror dictfull dictstackunderflow dictstackoverflow syn keyword postscrConstant contained execstackoverflow interrupt invalidaccess syn keyword postscrConstant contained invalidcontext invalidexit invalidfileaccess invalidfont syn keyword postscrConstant contained invalidid invalidrestore ioerror limitcheck nocurrentpoint syn keyword postscrConstant contained rangecheck stackoverflow stackunderflow syntaxerror timeout syn keyword postscrConstant contained typecheck undefined undefinedfilename undefinedresource syn keyword postscrConstant contained undefinedresult unmatchedmark unregistered VMerror if exists("postscr_fonts") " Font names syn keyword postscrConstant contained Symbol Times-Roman Times-Italic Times-Bold Times-BoldItalic syn keyword postscrConstant contained Helvetica Helvetica-Oblique Helvetica-Bold Helvetica-BoldOblique syn keyword postscrConstant contained Courier Courier-Oblique Courier-Bold Courier-BoldOblique endif if exists("postscr_display") " Display PS only operators syn keyword postscrOperator currentcontext fork join detach lock monitor condition wait notify yield syn keyword postscrOperator viewclip eoviewclip rectviewclip initviewclip viewclippath deviceinfo syn keyword postscrOperator sethalftonephase currenthalftonephase wtranslation defineusername endif " PS Character encoding names if exists("postscr_encodings") " Common encoding names syn keyword postscrConstant contained .notdef " Standard and ISO encoding names syn keyword postscrConstant contained space exclam quotedbl numbersign dollar percent ampersand quoteright syn keyword postscrConstant contained parenleft parenright asterisk plus comma hyphen period slash zero syn keyword postscrConstant contained one two three four five six seven eight nine colon semicolon less syn keyword postscrConstant contained equal greater question at syn keyword postscrConstant contained bracketleft backslash bracketright asciicircum underscore quoteleft syn keyword postscrConstant contained braceleft bar braceright asciitilde syn keyword postscrConstant contained exclamdown cent sterling fraction yen florin section currency syn keyword postscrConstant contained quotesingle quotedblleft guillemotleft guilsinglleft guilsinglright syn keyword postscrConstant contained fi fl endash dagger daggerdbl periodcentered paragraph bullet syn keyword postscrConstant contained quotesinglbase quotedblbase quotedblright guillemotright ellipsis syn keyword postscrConstant contained perthousand questiondown grave acute circumflex tilde macron breve syn keyword postscrConstant contained dotaccent dieresis ring cedilla hungarumlaut ogonek caron emdash syn keyword postscrConstant contained AE ordfeminine Lslash Oslash OE ordmasculine ae dotlessi lslash syn keyword postscrConstant contained oslash oe germandbls " The following are valid names, but are used as short procedure names in generated PS! " a b c d e f g h i j k l m n o p q r s t u v w x y z " A B C D E F G H I J K L M N O P Q R S T U V W X Y Z " Symbol encoding names syn keyword postscrConstant contained universal existential suchthat asteriskmath minus syn keyword postscrConstant contained congruent Alpha Beta Chi Delta Epsilon Phi Gamma Eta Iota theta1 syn keyword postscrConstant contained Kappa Lambda Mu Nu Omicron Pi Theta Rho Sigma Tau Upsilon sigma1 syn keyword postscrConstant contained Omega Xi Psi Zeta therefore perpendicular syn keyword postscrConstant contained radicalex alpha beta chi delta epsilon phi gamma eta iota phi1 syn keyword postscrConstant contained kappa lambda mu nu omicron pi theta rho sigma tau upsilon omega1 syn keyword postscrConstant contained Upsilon1 minute lessequal infinity club diamond heart spade syn keyword postscrConstant contained arrowboth arrowleft arrowup arrowright arrowdown degree plusminus syn keyword postscrConstant contained second greaterequal multiply proportional partialdiff divide syn keyword postscrConstant contained notequal equivalence approxequal arrowvertex arrowhorizex syn keyword postscrConstant contained aleph Ifraktur Rfraktur weierstrass circlemultiply circleplus syn keyword postscrConstant contained emptyset intersection union propersuperset reflexsuperset notsubset syn keyword postscrConstant contained propersubset reflexsubset element notelement angle gradient syn keyword postscrConstant contained registerserif copyrightserif trademarkserif radical dotmath syn keyword postscrConstant contained logicalnot logicaland logicalor arrowdblboth arrowdblleft arrowdblup syn keyword postscrConstant contained arrowdblright arrowdbldown omega xi psi zeta similar carriagereturn syn keyword postscrConstant contained lozenge angleleft registersans copyrightsans trademarksans summation syn keyword postscrConstant contained parenlefttp parenleftex parenleftbt bracketlefttp bracketleftex syn keyword postscrConstant contained bracketleftbt bracelefttp braceleftmid braceleftbt braceex euro syn keyword postscrConstant contained angleright integral integraltp integralex integralbt parenrighttp syn keyword postscrConstant contained parenrightex parenrightbt bracketrighttp bracketrightex syn keyword postscrConstant contained bracketrightbt bracerighttp bracerightmid bracerightbt " ISO Latin1 encoding names syn keyword postscrConstant contained brokenbar copyright registered twosuperior threesuperior syn keyword postscrConstant contained onesuperior onequarter onehalf threequarters syn keyword postscrConstant contained Agrave Aacute Acircumflex Atilde Adieresis Aring Ccedilla Egrave syn keyword postscrConstant contained Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis syn keyword postscrConstant contained Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis Ugrave Uacute syn keyword postscrConstant contained Ucircumflex Udieresis Yacute Thorn syn keyword postscrConstant contained agrave aacute acircumflex atilde adieresis aring ccedilla egrave syn keyword postscrConstant contained eacute ecircumflex edieresis igrave iacute icircumflex idieresis syn keyword postscrConstant contained eth ntilde ograve oacute ocircumflex otilde odieresis ugrave uacute syn keyword postscrConstant contained ucircumflex udieresis yacute thorn ydieresis syn keyword postscrConstant contained zcaron exclamsmall Hungarumlautsmall dollaroldstyle dollarsuperior syn keyword postscrConstant contained ampersandsmall Acutesmall parenleftsuperior parenrightsuperior syn keyword postscrConstant contained twodotenleader onedotenleader zerooldstyle oneoldstyle twooldstyle syn keyword postscrConstant contained threeoldstyle fouroldstyle fiveoldstyle sixoldstyle sevenoldstyle syn keyword postscrConstant contained eightoldstyle nineoldstyle commasuperior syn keyword postscrConstant contained threequartersemdash periodsuperior questionsmall asuperior bsuperior syn keyword postscrConstant contained centsuperior dsuperior esuperior isuperior lsuperior msuperior syn keyword postscrConstant contained nsuperior osuperior rsuperior ssuperior tsuperior ff ffi ffl syn keyword postscrConstant contained parenleftinferior parenrightinferior Circumflexsmall hyphensuperior syn keyword postscrConstant contained Gravesmall Asmall Bsmall Csmall Dsmall Esmall Fsmall Gsmall Hsmall syn keyword postscrConstant contained Ismall Jsmall Ksmall Lsmall Msmall Nsmall Osmall Psmall Qsmall syn keyword postscrConstant contained Rsmall Ssmall Tsmall Usmall Vsmall Wsmall Xsmall Ysmall Zsmall syn keyword postscrConstant contained colonmonetary onefitted rupiah Tildesmall exclamdownsmall syn keyword postscrConstant contained centoldstyle Lslashsmall Scaronsmall Zcaronsmall Dieresissmall syn keyword postscrConstant contained Brevesmall Caronsmall Dotaccentsmall Macronsmall figuredash syn keyword postscrConstant contained hypheninferior Ogoneksmall Ringsmall Cedillasmall questiondownsmall syn keyword postscrConstant contained oneeighth threeeighths fiveeighths seveneighths onethird twothirds syn keyword postscrConstant contained zerosuperior foursuperior fivesuperior sixsuperior sevensuperior syn keyword postscrConstant contained eightsuperior ninesuperior zeroinferior oneinferior twoinferior syn keyword postscrConstant contained threeinferior fourinferior fiveinferior sixinferior seveninferior syn keyword postscrConstant contained eightinferior nineinferior centinferior dollarinferior periodinferior syn keyword postscrConstant contained commainferior Agravesmall Aacutesmall Acircumflexsmall syn keyword postscrConstant contained Atildesmall Adieresissmall Aringsmall AEsmall Ccedillasmall syn keyword postscrConstant contained Egravesmall Eacutesmall Ecircumflexsmall Edieresissmall Igravesmall syn keyword postscrConstant contained Iacutesmall Icircumflexsmall Idieresissmall Ethsmall Ntildesmall syn keyword postscrConstant contained Ogravesmall Oacutesmall Ocircumflexsmall Otildesmall Odieresissmall syn keyword postscrConstant contained OEsmall Oslashsmall Ugravesmall Uacutesmall Ucircumflexsmall syn keyword postscrConstant contained Udieresissmall Yacutesmall Thornsmall Ydieresissmall Black Bold Book syn keyword postscrConstant contained Light Medium Regular Roman Semibold " Sundry standard and expert encoding names syn keyword postscrConstant contained trademark Scaron Ydieresis Zcaron scaron softhyphen overscore syn keyword postscrConstant contained graybox Sacute Tcaron Zacute sacute tcaron zacute Aogonek Scedilla syn keyword postscrConstant contained Zdotaccent aogonek scedilla Lcaron lcaron zdotaccent Racute Abreve syn keyword postscrConstant contained Lacute Cacute Ccaron Eogonek Ecaron Dcaron Dcroat Nacute Ncaron syn keyword postscrConstant contained Ohungarumlaut Rcaron Uring Uhungarumlaut Tcommaaccent racute abreve syn keyword postscrConstant contained lacute cacute ccaron eogonek ecaron dcaron dcroat nacute ncaron syn keyword postscrConstant contained ohungarumlaut rcaron uring uhungarumlaut tcommaaccent Gbreve syn keyword postscrConstant contained Idotaccent gbreve blank apple endif " By default level 3 includes all level 2 operators if postscr_level == 2 || postscr_level == 3 " Dictionary operators syn match postscrL2Operator "\(<<\|>>\)" syn keyword postscrL2Operator undef syn keyword postscrConstant globaldict shareddict " Device operators syn keyword postscrL2Operator setpagedevice currentpagedevice " Path operators syn keyword postscrL2Operator rectclip setbbox uappend ucache upath ustrokepath arct " Painting operators syn keyword postscrL2Operator rectfill rectstroke ufill ueofill ustroke " Array operators syn keyword postscrL2Operator currentpacking setpacking packedarray " Misc operators syn keyword postscrL2Operator languagelevel " Insideness operators syn keyword postscrL2Operator infill ineofill instroke inufill inueofill inustroke " GState operators syn keyword postscrL2Operator gstate setgstate currentgstate setcolor syn keyword postscrL2Operator setcolorspace currentcolorspace setstrokeadjust currentstrokeadjust syn keyword postscrL2Operator currentcolor " Device gstate operators syn keyword postscrL2Operator sethalftone currenthalftone setoverprint currentoverprint syn keyword postscrL2Operator setcolorrendering currentcolorrendering " Character operators syn keyword postscrL2Constant GlobalFontDirectory SharedFontDirectory syn keyword postscrL2Operator glyphshow selectfont syn keyword postscrL2Operator addglyph undefinefont xshow xyshow yshow " Pattern operators syn keyword postscrL2Operator makepattern setpattern execform " Resource operators syn keyword postscrL2Operator defineresource undefineresource findresource resourcestatus syn keyword postscrL2Repeat resourceforall " File operators syn keyword postscrL2Operator filter printobject writeobject setobjectformat currentobjectformat " VM operators syn keyword postscrL2Operator currentshared setshared defineuserobject execuserobject undefineuserobject syn keyword postscrL2Operator gcheck scheck startjob currentglobal setglobal syn keyword postscrConstant UserObjects " Interpreter operators syn keyword postscrL2Operator setucacheparams setvmthreshold ucachestatus setsystemparams syn keyword postscrL2Operator setuserparams currentuserparams setcacheparams currentcacheparams syn keyword postscrL2Operator currentdevparams setdevparams vmreclaim currentsystemparams " PS2 constants syn keyword postscrConstant contained DeviceCMYK Pattern Indexed Separation Cyan Magenta Yellow Black syn keyword postscrConstant contained CIEBasedA CIEBasedABC CIEBasedDEF CIEBasedDEFG " PS2 $error dictionary entries syn keyword postscrConstant contained newerror errorname command errorinfo ostack estack dstack syn keyword postscrConstant contained recordstacks binary " PS2 Category dictionary syn keyword postscrConstant contained DefineResource UndefineResource FindResource ResourceStatus syn keyword postscrConstant contained ResourceForAll Category InstanceType ResourceFileName " PS2 Category names syn keyword postscrConstant contained Font Encoding Form Pattern ProcSet ColorSpace Halftone syn keyword postscrConstant contained ColorRendering Filter ColorSpaceFamily Emulator IODevice syn keyword postscrConstant contained ColorRenderingType FMapType FontType FormType HalftoneType syn keyword postscrConstant contained ImageType PatternType Category Generic " PS2 pagedevice dictionary entries syn keyword postscrConstant contained PageSize MediaColor MediaWeight MediaType InputAttributes ManualFeed syn keyword postscrConstant contained OutputType OutputAttributes NumCopies Collate Duplex Tumble syn keyword postscrConstant contained Separations HWResolution Margins NegativePrint MirrorPrint syn keyword postscrConstant contained CutMedia AdvanceMedia AdvanceDistance ImagingBBox syn keyword postscrConstant contained Policies Install BeginPage EndPage PolicyNotFound PolicyReport syn keyword postscrConstant contained ManualSize OutputFaceUp Jog syn keyword postscrConstant contained Bind BindDetails Booklet BookletDetails CollateDetails syn keyword postscrConstant contained DeviceRenderingInfo ExitJamRecovery Fold FoldDetails Laminate syn keyword postscrConstant contained ManualFeedTimeout Orientation OutputPage syn keyword postscrConstant contained PostRenderingEnhance PostRenderingEnhanceDetails syn keyword postscrConstant contained PreRenderingEnhance PreRenderingEnhanceDetails syn keyword postscrConstant contained Signature SlipSheet Staple StapleDetails Trim syn keyword postscrConstant contained ProofSet REValue PrintQuality ValuesPerColorComponent AntiAlias " PS2 PDL resource entries syn keyword postscrConstant contained Selector LanguageFamily LanguageVersion " PS2 halftone dictionary entries syn keyword postscrConstant contained HalftoneType HalftoneName syn keyword postscrConstant contained AccurateScreens ActualAngle Xsquare Ysquare AccurateFrequency syn keyword postscrConstant contained Frequency SpotFunction Angle Width Height Thresholds syn keyword postscrConstant contained RedFrequency RedSpotFunction RedAngle RedWidth RedHeight syn keyword postscrConstant contained GreenFrequency GreenSpotFunction GreenAngle GreenWidth GreenHeight syn keyword postscrConstant contained BlueFrequency BlueSpotFunction BlueAngle BlueWidth BlueHeight syn keyword postscrConstant contained GrayFrequency GrayAngle GraySpotFunction GrayWidth GrayHeight syn keyword postscrConstant contained GrayThresholds BlueThresholds GreenThresholds RedThresholds syn keyword postscrConstant contained TransferFunction " PS2 CSR dictionaries syn keyword postscrConstant contained RangeA DecodeA MatrixA RangeABC DecodeABC MatrixABC BlackPoint syn keyword postscrConstant contained RangeLMN DecodeLMN MatrixLMN WhitePoint RangeDEF DecodeDEF RangeHIJ syn keyword postscrConstant contained RangeDEFG DecodeDEFG RangeHIJK Table " PS2 CRD dictionaries syn keyword postscrConstant contained ColorRenderingType EncodeLMB EncodeABC RangePQR MatrixPQR syn keyword postscrConstant contained AbsoluteColorimetric RelativeColorimetric Saturation Perceptual syn keyword postscrConstant contained TransformPQR RenderTable " PS2 Pattern dictionary syn keyword postscrConstant contained PatternType PaintType TilingType XStep YStep " PS2 Image dictionary syn keyword postscrConstant contained ImageType ImageMatrix MultipleDataSources DataSource syn keyword postscrConstant contained BitsPerComponent Decode Interpolate " PS2 Font dictionaries syn keyword postscrConstant contained FontType FontMatrix FontName FontInfo LanguageLevel WMode Encoding syn keyword postscrConstant contained UniqueID StrokeWidth Metrics Metrics2 CDevProc CharStrings Private syn keyword postscrConstant contained FullName Notice version ItalicAngle isFixedPitch UnderlinePosition syn keyword postscrConstant contained FMapType Encoding FDepVector PrefEnc EscChar ShiftOut ShiftIn syn keyword postscrConstant contained WeightVector Blend $Blend CIDFontType sfnts CIDSystemInfo CodeMap syn keyword postscrConstant contained CMap CIDFontName CIDSystemInfo UIDBase CIDDevProc CIDCount syn keyword postscrConstant contained CIDMapOffset FDArray FDBytes GDBytes GlyphData GlyphDictionary syn keyword postscrConstant contained SDBytes SubrMapOffset SubrCount BuildGlyph CIDMap FID MIDVector syn keyword postscrConstant contained Ordering Registry Supplement CMapName CMapVersion UIDOffset syn keyword postscrConstant contained SubsVector UnderlineThickness FamilyName FontBBox CurMID syn keyword postscrConstant contained Weight " PS2 User paramters syn keyword postscrConstant contained MaxFontItem MinFontCompress MaxUPathItem MaxFormItem MaxPatternItem syn keyword postscrConstant contained MaxScreenItem MaxOpStack MaxDictStack MaxExecStack MaxLocalVM syn keyword postscrConstant contained VMReclaim VMThreshold " PS2 System paramters syn keyword postscrConstant contained SystemParamsPassword StartJobPassword BuildTime ByteOrder RealFormat syn keyword postscrConstant contained MaxFontCache CurFontCache MaxOutlineCache CurOutlineCache syn keyword postscrConstant contained MaxUPathCache CurUPathCache MaxFormCache CurFormCache syn keyword postscrConstant contained MaxPatternCache CurPatternCache MaxScreenStorage CurScreenStorage syn keyword postscrConstant contained MaxDisplayList CurDisplayList " PS2 LZW Filters syn keyword postscrConstant contained Predictor " Paper Size operators syn keyword postscrL2Operator letter lettersmall legal ledger 11x17 a4 a3 a4small b5 note " Paper Tray operators syn keyword postscrL2Operator lettertray legaltray ledgertray a3tray a4tray b5tray 11x17tray " SCC compatibility operators syn keyword postscrL2Operator sccbatch sccinteractive setsccbatch setsccinteractive " Page duplexing operators syn keyword postscrL2Operator duplexmode firstside newsheet setduplexmode settumble tumble " Device compatibility operators syn keyword postscrL2Operator devdismount devformat devmount devstatus syn keyword postscrL2Repeat devforall " Imagesetter compatibility operators syn keyword postscrL2Operator accuratescreens checkscreen pagemargin pageparams setaccuratescreens setpage syn keyword postscrL2Operator setpagemargin setpageparams " Misc compatability operators syn keyword postscrL2Operator appletalktype buildtime byteorder checkpassword defaulttimeouts diskonline syn keyword postscrL2Operator diskstatus manualfeed manualfeedtimeout margins mirrorprint pagecount syn keyword postscrL2Operator pagestackorder printername processcolors sethardwareiomode setjobtimeout syn keyword postscrL2Operator setpagestockorder setprintername setresolution doprinterrors dostartpage syn keyword postscrL2Operator hardwareiomode initializedisk jobname jobtimeout ramsize realformat resolution syn keyword postscrL2Operator setdefaulttimeouts setdoprinterrors setdostartpage setdosysstart syn keyword postscrL2Operator setuserdiskpercent softwareiomode userdiskpercent waittimeout syn keyword postscrL2Operator setsoftwareiomode dosysstart emulate setmargins setmirrorprint endif " PS2 highlighting if postscr_level == 3 " Shading operators syn keyword postscrL3Operator setsmoothness currentsmoothness shfill " Clip operators syn keyword postscrL3Operator clipsave cliprestore " Pagedevive operators syn keyword postscrL3Operator setpage setpageparams " Device gstate operators syn keyword postscrL3Operator findcolorrendering " Font operators syn keyword postscrL3Operator composefont " PS LL3 Output device resource entries syn keyword postscrConstant contained DeviceN TrappingDetailsType " PS LL3 pagdevice dictionary entries syn keyword postscrConstant contained DeferredMediaSelection ImageShift InsertSheet LeadingEdge MaxSeparations syn keyword postscrConstant contained MediaClass MediaPosition OutputDevice PageDeviceName PageOffset ProcessColorModel syn keyword postscrConstant contained RollFedMedia SeparationColorNames SeparationOrder Trapping TrappingDetails syn keyword postscrConstant contained TraySwitch UseCIEColor syn keyword postscrConstant contained ColorantDetails ColorantName ColorantType NeutralDensity TrappingOrder syn keyword postscrConstant contained ColorantSetName " PS LL3 trapping dictionary entries syn keyword postscrConstant contained BlackColorLimit BlackDensityLimit BlackWidth ColorantZoneDetails syn keyword postscrConstant contained SlidingTrapLimit StepLimit TrapColorScaling TrapSetName TrapWidth syn keyword postscrConstant contained ImageResolution ImageToObjectTrapping ImageTrapPlacement syn keyword postscrConstant contained StepLimit TrapColorScaling Enabled ImageInternalTrapping " PS LL3 filters and entries syn keyword postscrConstant contained ReusableStreamDecode CloseSource CloseTarget UnitSize LowBitFirst syn keyword postscrConstant contained FlateEncode FlateDecode DecodeParams Intent AsyncRead " PS LL3 halftone dictionary entries syn keyword postscrConstant contained Height2 Width2 " PS LL3 function dictionary entries syn keyword postscrConstant contained FunctionType Domain Range Order BitsPerSample Encode Size C0 C1 N syn keyword postscrConstant contained Functions Bounds " PS LL3 image dictionary entries syn keyword postscrConstant contained InterleaveType MaskDict DataDict MaskColor " PS LL3 Pattern and shading dictionary entries syn keyword postscrConstant contained Shading ShadingType Background ColorSpace Coords Extend Function syn keyword postscrConstant contained VerticesPerRow BitsPerCoordinate BitsPerFlag " PS LL3 image dictionary entries syn keyword postscrConstant contained XOrigin YOrigin UnpaintedPath PixelCopy " PS LL3 colorrendering procedures syn keyword postscrProcedure GetHalftoneName GetPageDeviceName GetSubstituteCRD " PS LL3 CIDInit procedures syn keyword postscrProcedure beginbfchar beginbfrange begincidchar begincidrange begincmap begincodespacerange syn keyword postscrProcedure beginnotdefchar beginnotdefrange beginrearrangedfont beginusematrix syn keyword postscrProcedure endbfchar endbfrange endcidchar endcidrange endcmap endcodespacerange syn keyword postscrProcedure endnotdefchar endnotdefrange endrearrangedfont endusematrix syn keyword postscrProcedure StartData usefont usecmp " PS LL3 Trapping procedures syn keyword postscrProcedure settrapparams currenttrapparams settrapzone " PS LL3 BitmapFontInit procedures syn keyword postscrProcedure removeall removeglyphs " PS LL3 Font names if exists("postscr_fonts") syn keyword postscrConstant contained AlbertusMT AlbertusMT-Italic AlbertusMT-Light Apple-Chancery Apple-ChanceryCE syn keyword postscrConstant contained AntiqueOlive-Roman AntiqueOlive-Italic AntiqueOlive-Bold AntiqueOlive-Compact syn keyword postscrConstant contained AntiqueOliveCE-Roman AntiqueOliveCE-Italic AntiqueOliveCE-Bold AntiqueOliveCE-Compact syn keyword postscrConstant contained ArialMT Arial-ItalicMT Arial-LightMT Arial-BoldMT Arial-BoldItalicMT syn keyword postscrConstant contained ArialCE ArialCE-Italic ArialCE-Light ArialCE-Bold ArialCE-BoldItalic syn keyword postscrConstant contained AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique syn keyword postscrConstant contained AvantGardeCE-Book AvantGardeCE-BookOblique AvantGardeCE-Demi AvantGardeCE-DemiOblique syn keyword postscrConstant contained Bodoni Bodoni-Italic Bodoni-Bold Bodoni-BoldItalic Bodoni-Poster Bodoni-PosterCompressed syn keyword postscrConstant contained BodoniCE BodoniCE-Italic BodoniCE-Bold BodoniCE-BoldItalic BodoniCE-Poster BodoniCE-PosterCompressed syn keyword postscrConstant contained Bookman-Light Bookman-LightItalic Bookman-Demi Bookman-DemiItalic syn keyword postscrConstant contained BookmanCE-Light BookmanCE-LightItalic BookmanCE-Demi BookmanCE-DemiItalic syn keyword postscrConstant contained Carta Chicago ChicagoCE Clarendon Clarendon-Light Clarendon-Bold syn keyword postscrConstant contained ClarendonCE ClarendonCE-Light ClarendonCE-Bold CooperBlack CooperBlack-Italic syn keyword postscrConstant contained Copperplate-ThirtyTwoBC CopperPlate-ThirtyThreeBC Coronet-Regular CoronetCE-Regular syn keyword postscrConstant contained CourierCE CourierCE-Oblique CourierCE-Bold CourierCE-BoldOblique syn keyword postscrConstant contained Eurostile Eurostile-Bold Eurostile-ExtendedTwo Eurostile-BoldExtendedTwo syn keyword postscrConstant contained Eurostile EurostileCE-Bold EurostileCE-ExtendedTwo EurostileCE-BoldExtendedTwo syn keyword postscrConstant contained Geneva GenevaCE GillSans GillSans-Italic GillSans-Bold GillSans-BoldItalic GillSans-BoldCondensed syn keyword postscrConstant contained GillSans-Light GillSans-LightItalic GillSans-ExtraBold syn keyword postscrConstant contained GillSansCE-Roman GillSansCE-Italic GillSansCE-Bold GillSansCE-BoldItalic GillSansCE-BoldCondensed syn keyword postscrConstant contained GillSansCE-Light GillSansCE-LightItalic GillSansCE-ExtraBold syn keyword postscrConstant contained Goudy Goudy-Italic Goudy-Bold Goudy-BoldItalic Goudy-ExtraBould syn keyword postscrConstant contained HelveticaCE HelveticaCE-Oblique HelveticaCE-Bold HelveticaCE-BoldOblique syn keyword postscrConstant contained Helvetica-Condensed Helvetica-Condensed-Oblique Helvetica-Condensed-Bold Helvetica-Condensed-BoldObl syn keyword postscrConstant contained HelveticaCE-Condensed HelveticaCE-Condensed-Oblique HelveticaCE-Condensed-Bold syn keyword postscrConstant contained HelveticaCE-Condensed-BoldObl Helvetica-Narrow Helvetica-Narrow-Oblique Helvetica-Narrow-Bold syn keyword postscrConstant contained Helvetica-Narrow-BoldOblique HelveticaCE-Narrow HelveticaCE-Narrow-Oblique HelveticaCE-Narrow-Bold syn keyword postscrConstant contained HelveticaCE-Narrow-BoldOblique HoeflerText-Regular HoeflerText-Italic HoeflerText-Black syn keyword postscrConstant contained HoeflerText-BlackItalic HoeflerText-Ornaments HoeflerTextCE-Regular HoeflerTextCE-Italic syn keyword postscrConstant contained HoeflerTextCE-Black HoeflerTextCE-BlackItalic syn keyword postscrConstant contained JoannaMT JoannaMT-Italic JoannaMT-Bold JoannaMT-BoldItalic syn keyword postscrConstant contained JoannaMTCE JoannaMTCE-Italic JoannaMTCE-Bold JoannaMTCE-BoldItalic syn keyword postscrConstant contained LetterGothic LetterGothic-Slanted LetterGothic-Bold LetterGothic-BoldSlanted syn keyword postscrConstant contained LetterGothicCE LetterGothicCE-Slanted LetterGothicCE-Bold LetterGothicCE-BoldSlanted syn keyword postscrConstant contained LubalinGraph-Book LubalinGraph-BookOblique LubalinGraph-Demi LubalinGraph-DemiOblique syn keyword postscrConstant contained LubalinGraphCE-Book LubalinGraphCE-BookOblique LubalinGraphCE-Demi LubalinGraphCE-DemiOblique syn keyword postscrConstant contained Marigold Monaco MonacoCE MonaLisa-Recut Oxford Symbol Tekton syn keyword postscrConstant contained NewCennturySchlbk-Roman NewCenturySchlbk-Italic NewCenturySchlbk-Bold NewCenturySchlbk-BoldItalic syn keyword postscrConstant contained NewCenturySchlbkCE-Roman NewCenturySchlbkCE-Italic NewCenturySchlbkCE-Bold syn keyword postscrConstant contained NewCenturySchlbkCE-BoldItalic NewYork NewYorkCE syn keyword postscrConstant contained Optima Optima-Italic Optima-Bold Optima-BoldItalic syn keyword postscrConstant contained OptimaCE OptimaCE-Italic OptimaCE-Bold OptimaCE-BoldItalic syn keyword postscrConstant contained Palatino-Roman Palatino-Italic Palatino-Bold Palatino-BoldItalic syn keyword postscrConstant contained PalatinoCE-Roman PalatinoCE-Italic PalatinoCE-Bold PalatinoCE-BoldItalic syn keyword postscrConstant contained StempelGaramond-Roman StempelGaramond-Italic StempelGaramond-Bold StempelGaramond-BoldItalic syn keyword postscrConstant contained StempelGaramondCE-Roman StempelGaramondCE-Italic StempelGaramondCE-Bold StempelGaramondCE-BoldItalic syn keyword postscrConstant contained TimesCE-Roman TimesCE-Italic TimesCE-Bold TimesCE-BoldItalic syn keyword postscrConstant contained TimesNewRomanPSMT TimesNewRomanPS-ItalicMT TimesNewRomanPS-BoldMT TimesNewRomanPS-BoldItalicMT syn keyword postscrConstant contained TimesNewRomanCE TimesNewRomanCE-Italic TimesNewRomanCE-Bold TimesNewRomanCE-BoldItalic syn keyword postscrConstant contained Univers Univers-Oblique Univers-Bold Univers-BoldOblique syn keyword postscrConstant contained UniversCE-Medium UniversCE-Oblique UniversCE-Bold UniversCE-BoldOblique syn keyword postscrConstant contained Univers-Light Univers-LightOblique UniversCE-Light UniversCE-LightOblique syn keyword postscrConstant contained Univers-Condensed Univers-CondensedOblique Univers-CondensedBold Univers-CondensedBoldOblique syn keyword postscrConstant contained UniversCE-Condensed UniversCE-CondensedOblique UniversCE-CondensedBold UniversCE-CondensedBoldOblique syn keyword postscrConstant contained Univers-Extended Univers-ExtendedObl Univers-BoldExt Univers-BoldExtObl syn keyword postscrConstant contained UniversCE-Extended UniversCE-ExtendedObl UniversCE-BoldExt UniversCE-BoldExtObl syn keyword postscrConstant contained Wingdings-Regular ZapfChancery-MediumItalic ZapfChanceryCE-MediumItalic ZapfDingBats endif " Font names endif " PS LL3 highlighting if exists("postscr_ghostscript") " GS gstate operators syn keyword postscrGSOperator .setaccuratecurves .currentaccuratecurves .setclipoutside syn keyword postscrGSOperator .setdashadapt .currentdashadapt .setdefaultmatrix .setdotlength syn keyword postscrGSOperator .currentdotlength .setfilladjust2 .currentfilladjust2 syn keyword postscrGSOperator .currentclipoutside .setcurvejoin .currentcurvejoin syn keyword postscrGSOperator .setblendmode .currentblendmode .setopacityalpha .currentopacityalpha .setshapealpha .currentshapealpha syn keyword postscrGSOperator .setlimitclamp .currentlimitclamp .setoverprintmode .currentoverprintmode " GS path operators syn keyword postscrGSOperator .dashpath .rectappend " GS painting operators syn keyword postscrGSOperator .setrasterop .currentrasterop .setsourcetransparent syn keyword postscrGSOperator .settexturetransparent .currenttexturetransparent syn keyword postscrGSOperator .currentsourcetransparent " GS character operators syn keyword postscrGSOperator .charboxpath .type1execchar %Type1BuildChar %Type1BuildGlyph " GS mathematical operators syn keyword postscrGSMathOperator arccos arcsin " GS dictionary operators syn keyword postscrGSOperator .dicttomark .forceput .forceundef .knownget .setmaxlength " GS byte and string operators syn keyword postscrGSOperator .type1encrypt .type1decrypt syn keyword postscrGSOperator .bytestring .namestring .stringmatch " GS relational operators (seem like math ones to me!) syn keyword postscrGSMathOperator max min " GS file operators syn keyword postscrGSOperator findlibfile unread writeppmfile syn keyword postscrGSOperator .filename .fileposition .peekstring .unread " GS vm operators syn keyword postscrGSOperator .forgetsave " GS device operators syn keyword postscrGSOperator copydevice .getdevice makeimagedevice makewordimagedevice copyscanlines syn keyword postscrGSOperator setdevice currentdevice getdeviceprops putdeviceprops flushpage syn keyword postscrGSOperator finddevice findprotodevice .getbitsrect " GS misc operators syn keyword postscrGSOperator getenv .makeoperator .setdebug .oserrno .oserror .execn " GS rendering stack operators syn keyword postscrGSOperator .begintransparencygroup .discardtransparencygroup .endtransparencygroup syn keyword postscrGSOperator .begintransparencymask .discardtransparencymask .endtransparencymask .inittransparencymask syn keyword postscrGSOperator .settextknockout .currenttextknockout " GS filters syn keyword postscrConstant contained BCPEncode BCPDecode eexecEncode eexecDecode PCXDecode syn keyword postscrConstant contained PixelDifferenceEncode PixelDifferenceDecode syn keyword postscrConstant contained PNGPredictorDecode TBCPEncode TBCPDecode zlibEncode syn keyword postscrConstant contained zlibDecode PNGPredictorEncode PFBDecode syn keyword postscrConstant contained MD5Encode " GS filter keys syn keyword postscrConstant contained InitialCodeLength FirstBitLowOrder BlockData DecodedByteAlign " GS device parameters syn keyword postscrConstant contained BitsPerPixel .HWMargins HWSize Name GrayValues syn keyword postscrConstant contained ColorValues TextAlphaBits GraphicsAlphaBits BufferSpace syn keyword postscrConstant contained OpenOutputFile PageCount BandHeight BandWidth BandBufferSpace syn keyword postscrConstant contained ViewerPreProcess GreenValues BlueValues OutputFile syn keyword postscrConstant contained MaxBitmap RedValues endif " GhostScript highlighting " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link postscrComment Comment hi def link postscrConstant Constant hi def link postscrString String hi def link postscrASCIIString postscrString hi def link postscrHexString postscrString hi def link postscrASCII85String postscrString hi def link postscrNumber Number hi def link postscrInteger postscrNumber hi def link postscrHex postscrNumber hi def link postscrRadix postscrNumber hi def link postscrFloat Float hi def link postscrBoolean Boolean hi def link postscrIdentifier Identifier hi def link postscrProcedure Function hi def link postscrName Statement hi def link postscrConditional Conditional hi def link postscrRepeat Repeat hi def link postscrL2Repeat postscrRepeat hi def link postscrOperator Operator hi def link postscrL1Operator postscrOperator hi def link postscrL2Operator postscrOperator hi def link postscrL3Operator postscrOperator hi def link postscrMathOperator postscrOperator hi def link postscrLogicalOperator postscrOperator hi def link postscrBinaryOperator postscrOperator hi def link postscrDSCComment SpecialComment hi def link postscrSpecialChar SpecialChar hi def link postscrTodo Todo hi def link postscrError Error hi def link postscrSpecialCharError postscrError hi def link postscrASCII85CharError postscrError hi def link postscrHexCharError postscrError hi def link postscrASCIIStringError postscrError hi def link postscrIdentifierError postscrError if exists("postscr_ghostscript") hi def link postscrGSOperator postscrOperator hi def link postscrGSMathOperator postscrMathOperator else hi def link postscrGSOperator postscrError hi def link postscrGSMathOperator postscrError endif let b:current_syntax = "postscr" " vim: ts=8 neovim-0.2.2/runtime/syntax/pov.vim000066400000000000000000000215411320401574200173430ustar00rootroot00000000000000" Vim syntax file " Language: PoV-Ray(tm) 3.7 Scene Description Language " Maintainer: David Necas (Yeti) " Last Change: 2011-04-23 " Required Vim Version: 6.0 " Setup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match " Top level stuff syn keyword povCommands global_settings syn keyword povObjects array atmosphere background bicubic_patch blob box camera component cone cubic cylinder disc fog height_field isosurface julia_fractal lathe light_group light_source mesh mesh2 object ovus parametric pattern photons plane poly polygon polynomial prism quadric quartic rainbow sky_sphere smooth_triangle sor sphere sphere_sweep spline superellipsoid text torus triangle syn keyword povCSG clipped_by composite contained_by difference intersection merge union syn keyword povAppearance interior material media texture interior_texture texture_list syn keyword povGlobalSettings ambient_light assumed_gamma charset hf_gray_16 irid_wavelength max_intersections max_trace_level number_of_waves radiosity noise_generator syn keyword povTransform inverse matrix rotate scale translate transform " Descriptors syn keyword povDescriptors finish inside_vector normal pigment uv_mapping uv_vectors vertex_vectors syn keyword povDescriptors adc_bailout always_sample brightness count error_bound distance_maximum gray_threshold load_file low_error_factor maximum_reuse max_sample media minimum_reuse mm_per_unit nearest_count normal pretrace_end pretrace_start recursion_limit save_file syn keyword povDescriptors color colour rgb rgbt rgbf rgbft srgb srgbf srgbt srgbft syn match povDescriptors "\<\(red\|green\|blue\|gray\)\>" syn keyword povDescriptors bump_map color_map colour_map image_map material_map pigment_map quick_color quick_colour normal_map texture_map image_pattern pigment_pattern syn keyword povDescriptors ambient brilliance conserve_energy crand diffuse fresnel irid metallic phong phong_size refraction reflection reflection_exponent roughness specular subsurface syn keyword povDescriptors cylinder fisheye mesh_camera omnimax orthographic panoramic perspective spherical ultra_wide_angle syn keyword povDescriptors agate aoi average brick boxed bozo bumps cells checker crackle cylindrical dents facets function gradient granite hexagon julia leopard magnet mandel marble onion pavement planar quilted radial ripples slope spherical spiral1 spiral2 spotted square tiles tile2 tiling toroidal triangular waves wood wrinkles syn keyword povDescriptors density_file syn keyword povDescriptors area_light shadowless spotlight parallel syn keyword povDescriptors absorption confidence density emission intervals ratio samples scattering variance syn keyword povDescriptors distance fog_alt fog_offset fog_type turb_depth syn keyword povDescriptors b_spline bezier_spline cubic_spline evaluate face_indices form linear_spline max_gradient natural_spline normal_indices normal_vectors quadratic_spline uv_indices syn keyword povDescriptors target " Modifiers syn keyword povModifiers caustics dispersion dispersion_samples fade_color fade_colour fade_distance fade_power ior syn keyword povModifiers bounded_by double_illuminate hierarchy hollow no_shadow open smooth sturm threshold water_level syn keyword povModifiers importance no_radiosity syn keyword povModifiers hypercomplex max_iteration precision quaternion slice syn keyword povModifiers conic_sweep linear_sweep syn keyword povModifiers flatness type u_steps v_steps syn keyword povModifiers aa_level aa_threshold adaptive area_illumination falloff jitter looks_like media_attenuation media_interaction method point_at radius tightness syn keyword povModifiers angle aperture bokeh blur_samples confidence direction focal_point h_angle location look_at right sky up v_angle variance syn keyword povModifiers all bump_size gamma interpolate map_type once premultiplied slope_map use_alpha use_color use_colour use_index syn match povModifiers "\<\(filter\|transmit\)\>" syn keyword povModifiers black_hole agate_turb brick_size control0 control1 cubic_wave density_map flip frequency interpolate inverse lambda metric mortar octaves offset omega phase poly_wave ramp_wave repeat scallop_wave sine_wave size strength triangle_wave thickness turbulence turb_depth type warp syn keyword povModifiers eccentricity extinction syn keyword povModifiers arc_angle falloff_angle width syn keyword povModifiers accuracy all_intersections altitude autostop circular collect coords cutaway_textures dist_exp expand_thresholds exponent exterior gather global_lights major_radius max_trace no_bump_scale no_image no_reflection orient orientation pass_through precompute projected_through range_divider solid spacing split_union tolerance " Words not marked `reserved' in documentation, but... syn keyword povBMPType alpha exr gif hdr iff jpeg pgm png pot ppm sys tga tiff syn keyword povFontType ttf contained syn keyword povDensityType df3 contained syn keyword povCharset ascii utf8 contained " Math functions on floats, vectors and strings syn keyword povFunctions abs acos acosh asc asin asinh atan atan2 atanh bitwise_and bitwise_or bitwise_xor ceil cos cosh defined degrees dimensions dimension_size div exp file_exists floor inside int internal ln log max min mod pow prod radians rand seed select sin sinh sqrt strcmp strlen sum tan tanh val vdot vlength vstr vturbulence syn keyword povFunctions min_extent max_extent trace vcross vrotate vaxis_rotate vnormalize vturbulence syn keyword povFunctions chr concat datetime now substr str strupr strlwr syn keyword povJuliaFunctions acosh asinh atan cosh cube pwr reciprocal sinh sqr tanh " Specialities syn keyword povConsts clock clock_delta clock_on final_clock final_frame frame_number initial_clock initial_frame input_file_name image_width image_height false no off on pi true version yes syn match povConsts "\<[tuvxyz]\>" syn match povDotItem "\.\@<=\(blue\|green\|gray\|filter\|red\|transmit\|hf\|t\|u\|v\|x\|y\|z\)\>" display " Comments syn region povComment start="/\*" end="\*/" contains=povTodo,povComment syn match povComment "//.*" contains=povTodo syn match povCommentError "\*/" syn sync ccomment povComment syn sync minlines=50 syn keyword povTodo TODO FIXME XXX NOT contained syn cluster povPRIVATE add=povTodo " Language directives syn match povConditionalDir "#\s*\(else\|end\|for\|if\|ifdef\|ifndef\|switch\|while\)\>" syn match povLabelDir "#\s*\(break\|case\|default\|range\)\>" syn match povDeclareDir "#\s*\(declare\|default\|local\|macro\|undef\|version\)\>" nextgroup=povDeclareOption skipwhite syn keyword povDeclareOption deprecated once contained nextgroup=povDeclareOption skipwhite syn match povIncludeDir "#\s*include\>" syn match povFileDir "#\s*\(fclose\|fopen\|read\|write\)\>" syn keyword povFileDataType uint8 sint8 unit16be uint16le sint16be sint16le sint32le sint32be syn match povMessageDir "#\s*\(debug\|error\|render\|statistics\|warning\)\>" syn region povFileOpen start="#\s*fopen\>" skip=+"[^"]*"+ matchgroup=povOpenType end="\<\(read\|write\|append\)\>" contains=ALLBUT,PovParenError,PovBraceError,@PovPRIVATE transparent keepend " Literal strings syn match povSpecialChar "\\u\x\{4}\|\\\d\d\d\|\\." contained syn region povString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=povSpecialChar oneline syn cluster povPRIVATE add=povSpecialChar " Catch errors caused by wrong parenthesization syn region povParen start='(' end=')' contains=ALLBUT,povParenError,@povPRIVATE transparent syn match povParenError ")" syn region povBrace start='{' end='}' contains=ALLBUT,povBraceError,@povPRIVATE transparent syn match povBraceError "}" " Numbers syn match povNumber "\(^\|\W\)\@<=[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\=" " Define the default highlighting hi def link povComment Comment hi def link povTodo Todo hi def link povNumber Number hi def link povString String hi def link povFileOpen Constant hi def link povConsts Constant hi def link povDotItem povSpecial hi def link povBMPType povSpecial hi def link povCharset povSpecial hi def link povDensityType povSpecial hi def link povFontType povSpecial hi def link povOpenType povSpecial hi def link povSpecialChar povSpecial hi def link povSpecial Special hi def link povConditionalDir PreProc hi def link povLabelDir PreProc hi def link povDeclareDir Define hi def link povDeclareOption Define hi def link povIncludeDir Include hi def link povFileDir PreProc hi def link povFileDataType Special hi def link povMessageDir Debug hi def link povAppearance povDescriptors hi def link povObjects povDescriptors hi def link povGlobalSettings povDescriptors hi def link povDescriptors Type hi def link povJuliaFunctions PovFunctions hi def link povModifiers povFunctions hi def link povFunctions Function hi def link povCommands Operator hi def link povTransform Operator hi def link povCSG Operator hi def link povParenError povError hi def link povBraceError povError hi def link povCommentError povError hi def link povError Error let b:current_syntax = "pov" neovim-0.2.2/runtime/syntax/povini.vim000066400000000000000000000066401320401574200200460ustar00rootroot00000000000000" Vim syntax file " Language: PoV-Ray(tm) 3.7 configuration/initialization files " Maintainer: David Necas (Yeti) " Last Change: 2011-04-24 " Required Vim Version: 6.0 " Setup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " Syntax syn match poviniInclude "^\s*[^[+-;]\S*\s*$" contains=poviniSection syn match poviniLabel "^.\{-1,}\ze=" transparent contains=poviniKeyword nextgroup=poviniBool,poviniNumber syn keyword poviniBool On Off True False Yes No syn match poviniNumber "\<\d*\.\=\d\+\>" syn keyword poviniKeyword Clock Initial_Frame Final_Frame Frame_Final Frame_Step Initial_Clock Final_Clock Subset_Start_Frame Subset_End_Frame Cyclic_Animation Clockless_Animation Real_Time_Raytracing Field_Render Odd_Field Work_Threads syn keyword poviniKeyword Width Height Start_Column Start_Row End_Column End_Row Test_Abort Test_Abort_Count Continue_Trace Create_Ini syn keyword poviniKeyword Display Video_Mode Palette Display_Gamma Pause_When_Done Verbose Draw_Vistas Preview_Start_Size Preview_End_Size Render_Block_Size Render_Block_Step Render_Pattern Max_Image_Buffer_Memory syn keyword poviniKeyword Output_to_File Output_File_Type Output_Alpha Bits_Per_Color Output_File_Name Buffer_Output Buffer_Size Dither Dither_Method File_Gamma syn keyword poviniKeyword BSP_Base BSP_Child BSP_Isect BSP_Max BSP_Miss syn keyword poviniKeyword Histogram_Type Histogram_Grid_Size Histogram_Name syn keyword poviniKeyword Input_File_Name Include_Header Library_Path Version syn keyword poviniKeyword Debug_Console Fatal_Console Render_Console Statistic_Console Warning_Console All_Console Debug_File Fatal_File Render_File Statistic_File Warning_File All_File Warning_Level syn keyword poviniKeyword Quality Bounding Bounding_Method Bounding_Threshold Light_Buffer Vista_Buffer Remove_Bounds Split_Unions Antialias Sampling_Method Antialias_Threshold Jitter Jitter_Amount Antialias_Depth Antialias_Gamma syn keyword poviniKeyword Pre_Scene_Return Pre_Frame_Return Post_Scene_Return Post_Frame_Return User_Abort_Return Fatal_Error_Return syn keyword poviniKeyword Radiosity Radiosity_File_Name Radiosity_From_File Radiosity_To_File Radiosity_Vain_Pretrace High_Reproducibility syn match poviniShellOut "^\s*\(Pre_Scene_Command\|Pre_Frame_Command\|Post_Scene_Command\|Post_Frame_Command\|User_Abort_Command\|Fatal_Error_Command\)\>" nextgroup=poviniShellOutEq skipwhite syn match poviniShellOutEq "=" nextgroup=poviniShellOutRHS skipwhite contained syn match poviniShellOutRHS "[^;]\+" skipwhite contained contains=poviniShellOutSpecial syn match poviniShellOutSpecial "%[osnkhw%]" contained syn keyword poviniDeclare Declare syn match poviniComment ";.*$" syn match poviniOption "^\s*[+-]\S*" syn match poviniIncludeLabel "^\s*Include_INI\s*=" nextgroup=poviniIncludedFile skipwhite syn match poviniIncludedFile "[^;]\+" contains=poviniSection contained syn region poviniSection start="\[" end="\]" " Define the default highlighting hi def link poviniSection Special hi def link poviniComment Comment hi def link poviniDeclare poviniKeyword hi def link poviniShellOut poviniKeyword hi def link poviniIncludeLabel poviniKeyword hi def link poviniKeyword Type hi def link poviniShellOutSpecial Special hi def link poviniIncludedFile poviniInclude hi def link poviniInclude Include hi def link poviniOption Keyword hi def link poviniBool Constant hi def link poviniNumber Number let b:current_syntax = "povini" neovim-0.2.2/runtime/syntax/ppd.vim000066400000000000000000000015441320401574200173230ustar00rootroot00000000000000" Vim syntax file " Language: PPD (PostScript printer description) file " Maintainer: Bjoern Jacke " Last Change: 2001-10-06 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match ppdComment "^\*%.*" syn match ppdDef "\*[a-zA-Z0-9]\+" syn match ppdDefine "\*[a-zA-Z0-9\-_]\+:" syn match ppdUI "\*[a-zA-Z]*\(Open\|Close\)UI" syn match ppdUIGroup "\*[a-zA-Z]*\(Open\|Close\)Group" syn match ppdGUIText "/.*:" syn match ppdContraints "^*UIConstraints:" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link ppdComment Comment hi def link ppdDefine Statement hi def link ppdUI Function hi def link ppdUIGroup Function hi def link ppdDef String hi def link ppdGUIText Type hi def link ppdContraints Special let b:current_syntax = "ppd" " vim: ts=8 neovim-0.2.2/runtime/syntax/ppwiz.vim000066400000000000000000000053341320401574200177120ustar00rootroot00000000000000" Vim syntax file " Language: PPWizard (preprocessor by Dennis Bareis) " Maintainer: Stefan Schwarzer " URL: http://www.ndh.net/home/sschwarzer/download/ppwiz.vim " Last Change: 2003 May 11 " Filename: ppwiz.vim " Remove old syntax stuff " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore if !exists("ppwiz_highlight_defs") let ppwiz_highlight_defs = 1 endif if !exists("ppwiz_with_html") let ppwiz_with_html = 1 endif " comments syn match ppwizComment "^;.*$" syn match ppwizComment ";;.*$" " HTML if ppwiz_with_html > 0 syn region ppwizHTML start="<" end=">" contains=ppwizArg,ppwizMacro syn match ppwizHTML "\&\w\+;" endif " define, evaluate etc. if ppwiz_highlight_defs == 1 syn match ppwizDef "^\s*\#\S\+\s\+\S\+" contains=ALL syn match ppwizDef "^\s*\#\(if\|else\|endif\)" contains=ALL syn match ppwizDef "^\s*\#\({\|break\|continue\|}\)" contains=ALL " elseif ppwiz_highlight_defs == 2 " syn region ppwizDef start="^\s*\#" end="[^\\]$" end="^$" keepend contains=ALL else syn region ppwizDef start="^\s*\#" end="[^\\]$" end="^$" keepend contains=ppwizCont endif syn match ppwizError "\s.\\$" syn match ppwizCont "\s\([+\-%]\|\)\\$" " macros to execute syn region ppwizMacro start="<\$" end=">" contains=@ppwizArgVal,ppwizCont " macro arguments syn region ppwizArg start="{" end="}" contains=ppwizEqual,ppwizString syn match ppwizEqual "=" contained syn match ppwizOperator "<>\|=\|<\|>" contained " standard variables (builtin) syn region ppwizStdVar start="" contains=@ppwizArgVal " Rexx variables syn region ppwizRexxVar start="" contains=@ppwizArgVal " Constants syn region ppwizString start=+"+ end=+"+ contained contains=ppwizMacro,ppwizArg,ppwizHTML,ppwizCont,ppwizStdVar,ppwizRexxVar syn region ppwizString start=+'+ end=+'+ contained contains=ppwizMacro,ppwizArg,ppwizHTML,ppwizCont,ppwizStdVar,ppwizRexxVar syn match ppwizInteger "\d\+" contained " Clusters syn cluster ppwizArgVal add=ppwizString,ppwizInteger " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link ppwizSpecial Special hi def link ppwizEqual ppwizSpecial hi def link ppwizOperator ppwizSpecial hi def link ppwizComment Comment hi def link ppwizDef PreProc hi def link ppwizMacro Statement hi def link ppwizArg Identifier hi def link ppwizStdVar Identifier hi def link ppwizRexxVar Identifier hi def link ppwizString Constant hi def link ppwizInteger Constant hi def link ppwizCont ppwizSpecial hi def link ppwizError Error hi def link ppwizHTML Type let b:current_syntax = "ppwiz" " vim: ts=4 neovim-0.2.2/runtime/syntax/prescribe.vim000066400000000000000000000045171320401574200205210ustar00rootroot00000000000000" Vim syntax file " Language: Kyocera PreScribe2e " Maintainer: Klaus Muth " URL: http://www.hampft.de/vim/syntax/prescribe.vim " Last Change: 2005 Mar 04 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match prescribeSpecial "!R!" " all prescribe commands syn keyword prescribeStatement ALTF AMCR ARC ASFN ASTK BARC BLK BOX CALL syn keyword prescribeStatement CASS CIR CLIP CLPR CLSP COPY CPTH CSET CSTK syn keyword prescribeStatement CTXT DAF DAM DAP DELF DELM DPAT DRP DRPA DUPX syn keyword prescribeStatement DXPG DXSD DZP ENDD ENDM ENDR EPL EPRM EXIT syn keyword prescribeStatement FDIR FILL FLAT FLST FONT FPAT FRPO FSET FTMD syn keyword prescribeStatement GPAT ICCD INTL JOG LDFC MAP MCRO MDAT MID syn keyword prescribeStatement MLST MRP MRPA MSTK MTYP MZP NEWP PAGE PARC PAT syn keyword prescribeStatement PCRP PCZP PDIR RDRP PDZP PELP PIE PMRA PMRP PMZP syn keyword prescribeStatement PRBX PRRC PSRC PXPL RDMP RES RSL RGST RPCS RPF syn keyword prescribeStatement RPG RPP RPU RTTX RTXT RVCD RVRD SBM SCAP SCCS syn keyword prescribeStatement SCF SCG SCP SCPI SCRC SCS SCU SDP SEM SETF SFA syn keyword prescribeStatement SFNT SIMG SIR SLJN SLM SLPI SLPP SLS SMLT SPD syn keyword prescribeStatement SPL SPLT SPO SPSZ SPW SRM SRO SROP SSTK STAT STRK syn keyword prescribeStatement SULP SVCP TATR TEXT TPRS UNIT UOM WIDE WRED XPAT syn match prescribeStatement "\" syn match prescribeStatement "\" syn match prescribeStatement "\" syn match prescribeStatement "\" syn match prescribeStatement "\" syn match prescribeStatement "\" syn match prescribeStatement "\" syn match prescribeCSETArg "[0-9]\{1,3}[A-Z]" syn match prescribeFRPOArg "[A-Z][0-9]\{1,2}" syn match prescribeNumber "[0-9]\+" syn region prescribeString start=+'+ end=+'+ skip=+\\'+ syn region prescribeComment start=+CMNT+ end=+;+ " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link prescribeSpecial PreProc hi def link prescribeStatement Statement hi def link prescribeNumber Number hi def link prescribeCSETArg String hi def link prescribeFRPOArg String hi def link prescribeComment Comment let b:current_syntax = "prescribe" " vim: ts=8 neovim-0.2.2/runtime/syntax/privoxy.vim000066400000000000000000000067731320401574200202710ustar00rootroot00000000000000" Vim syntax file " Language: Privoxy actions file " Maintainer: Doug Kearns " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/privoxy.vim " Last Change: 2007 Mar 30 " Privoxy 3.0.6 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword=@,48-57,_,- syn keyword privoxyTodo contained TODO FIXME XXX NOTE syn match privoxyComment "#.*" contains=privoxyTodo,@Spell syn region privoxyActionLine matchgroup=privoxyActionLineDelimiter start="^\s*\zs{" end="}\ze\s*$" \ contains=privoxyEnabledPrefix,privoxyDisabledPrefix syn match privoxyEnabledPrefix "\%(^\|\s\|{\)\@<=+\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained syn match privoxyDisabledPrefix "\%(^\|\s\|{\)\@<=-\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained syn match privoxyAction "\%(add-header\|block\|content-type-overwrite\|crunch-client-header\|crunch-if-none-match\)\>" contained syn match privoxyAction "\%(crunch-incoming-cookies\|crunch-outgoing-cookies\|crunch-server-header\|deanimate-gifs\)\>" contained syn match privoxyAction "\%(downgrade-http-version\|fast-redirects\|filter-client-headers\|filter-server-headers\)\>" contained syn match privoxyAction "\%(filter\|force-text-mode\|handle-as-empty-document\|handle-as-image\)\>" contained syn match privoxyAction "\%(hide-accept-language\|hide-content-disposition\|hide-forwarded-for-headers\)\>" contained syn match privoxyAction "\%(hide-from-header\|hide-if-modified-since\|hide-referrer\|hide-user-agent\|inspect-jpegs\)\>" contained syn match privoxyAction "\%(kill-popups\|limit-connect\|overwrite-last-modified\|prevent-compression\|redirect\)\>" contained syn match privoxyAction "\%(send-vanilla-wafer\|send-wafer\|session-cookies-only\|set-image-blocker\)\>" contained syn match privoxyAction "\%(treat-forbidden-connects-like-blocks\)\>" syn match privoxyFilterAction "filter{[^}]*}" contained contains=privoxyFilterArg,privoxyActionBraces syn match privoxyActionBraces "[{}]" contained syn keyword privoxyFilterArg js-annoyances js-events html-annoyances content-cookies refresh-tags unsolicited-popups all-popups \ img-reorder banners-by-size banners-by-link webbugs tiny-textforms jumping-windows frameset-borders demoronizer \ shockwave-flash quicktime-kioskmode fun crude-parental ie-exploits site-specifics no-ping google yahoo msn blogspot \ x-httpd-php-to-html html-to-xml xml-to-html hide-tor-exit-notation contained " Alternative spellings syn match privoxyAction "\%(kill-popup\|hide-referer\|prevent-keeping-cookies\)\>" contained " Pre-3.0 compatibility syn match privoxyAction "\%(no-cookie-read\|no-cookie-set\|prevent-reading-cookies\|prevent-setting-cookies\)\>" contained syn match privoxyAction "\%(downgrade\|hide-forwarded\|hide-from\|image\|image-blocker\|no-compression\)\>" contained syn match privoxyAction "\%(no-cookies-keep\|no-cookies-read\|no-cookies-set\|no-popups\|vanilla-wafer\|wafer\)\>" contained syn match privoxySetting "\" syn match privoxyHeader "^\s*\zs{{\%(alias\|settings\)}}\ze\s*$" hi def link privoxyAction Identifier hi def link privoxyFilterAction Identifier hi def link privoxyActionLineDelimiter Delimiter hi def link privoxyDisabledPrefix SpecialChar hi def link privoxyEnabledPrefix SpecialChar hi def link privoxyHeader PreProc hi def link privoxySetting Identifier hi def link privoxyFilterArg Constant hi def link privoxyComment Comment hi def link privoxyTodo Todo let b:current_syntax = "privoxy" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/procmail.vim000066400000000000000000000037431320401574200203510ustar00rootroot00000000000000" Vim syntax file " Language: Procmail definition file " Maintainer: Melchior FRANZ " Last Change: 2003 Aug 14 " Author: Sonia Heimann " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match procmailComment "#.*$" contains=procmailTodo syn keyword procmailTodo contained Todo TBD syn region procmailString start=+"+ skip=+\\"+ end=+"+ syn region procmailString start=+'+ skip=+\\'+ end=+'+ syn region procmailVarDeclRegion start="^\s*[a-zA-Z0-9_]\+\s*="hs=e-1 skip=+\\$+ end=+$+ contains=procmailVar,procmailVarDecl,procmailString syn match procmailVarDecl contained "^\s*[a-zA-Z0-9_]\+" syn match procmailVar "$[a-zA-Z0-9_]\+" syn match procmailCondition contained "^\s*\*.*" syn match procmailActionFolder contained "^\s*[-_a-zA-Z0-9/]\+" syn match procmailActionVariable contained "^\s*$[a-zA-Z_]\+" syn region procmailActionForward start=+^\s*!+ skip=+\\$+ end=+$+ syn region procmailActionPipe start=+^\s*|+ skip=+\\$+ end=+$+ syn region procmailActionNested start=+^\s*{+ end=+^\s*}+ contains=procmailRecipe,procmailComment,procmailVarDeclRegion syn region procmailRecipe start=+^\s*:.*$+ end=+^\s*\($\|}\)+me=e-1 contains=procmailComment,procmailCondition,procmailActionFolder,procmailActionVariable,procmailActionForward,procmailActionPipe,procmailActionNested,procmailVarDeclRegion " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link procmailComment Comment hi def link procmailTodo Todo hi def link procmailRecipe Statement "hi def link procmailCondition Statement hi def link procmailActionFolder procmailAction hi def link procmailActionVariable procmailAction hi def link procmailActionForward procmailAction hi def link procmailActionPipe procmailAction hi def link procmailAction Function hi def link procmailVar Identifier hi def link procmailVarDecl Identifier hi def link procmailString String let b:current_syntax = "procmail" " vim: ts=8 neovim-0.2.2/runtime/syntax/progress.vim000066400000000000000000000760041320401574200204070ustar00rootroot00000000000000" Vim syntax file " Language: Progress 4GL " Filename extensions: *.p (collides with Pascal), " *.i (collides with assembler) " *.w (collides with cweb) " Maintainer: Philip Uren Remove SPAXY spam block " Contributors: Matthew Stickney " Chris Ruprecht " Mikhail Kuperblum " John Florian " Version: 13 " Last Change: Nov 11 2012 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword=@,48-57,_,-,!,#,$,% " The Progress editor doesn't cope with tabs very well. set expandtab syn case ignore " Progress Blocks of code and mismatched "end." errors. syn match ProgressEndError "\" syn region ProgressDoBlock transparent matchgroup=ProgressDo start="\" matchgroup=ProgressDo end="\" contains=ALLBUT,ProgressProcedure,ProgressFunction syn region ProgressForBlock transparent matchgroup=ProgressFor start="\" matchgroup=ProgressFor end="\" contains=ALLBUT,ProgressProcedure,ProgressFunction syn region ProgressRepeatBlock transparent matchgroup=ProgressRepeat start="\" matchgroup=ProgressRepeat end="\" contains=ALLBUT,ProgressProcedure,ProgressFunction syn region ProgressCaseBlock transparent matchgroup=ProgressCase start="\" matchgroup=ProgressCase end="\\|\" contains=ALLBUT,ProgressProcedure,ProgressFunction " These are Progress reserved words, " and they could go in ProgressReserved, " but I found it more helpful to highlight them in a different color. syn keyword ProgressConditional if else then when otherwise syn keyword ProgressFor each where " Make those TODO and debugging notes stand out! syn keyword ProgressTodo contained TODO BUG FIX syn keyword ProgressDebug contained DEBUG syn keyword ProgressDebug debugger " If you like to highlight the whole line of " the start and end of procedures " to make the whole block of code stand out: syn match ProgressProcedure "^\s*procedure.*" syn match ProgressProcedure "^\s*end\s\s*procedure.*" syn match ProgressFunction "^\s*function.*" syn match ProgressFunction "^\s*end\s\s*function.*" " ... otherwise use this: " syn keyword ProgressFunction procedure function syn keyword ProgressReserved accum[ulate] active-form active-window add alias all alter ambig[uous] analyz[e] and any apply as asc[ending] syn keyword ProgressReserved assign asynchronous at attr[-space] audit-control audit-policy authorization auto-ret[urn] avail[able] back[ground] syn keyword ProgressReserved before-h[ide] begins bell between big-endian blank break buffer-comp[are] buffer-copy by by-pointer by-variant-point[er] call syn keyword ProgressReserved can-do can-find case case-sen[sitive] cast center[ed] check chr clear clipboard codebase-locator colon color column-lab[el] syn keyword ProgressReserved col[umns] com-self compiler connected control copy-lob count-of cpstream create current current-changed current-lang[uage] syn keyword ProgressReserved current-window current_date curs[or] database dataservers dataset dataset-handle db-remote-host dbcodepage dbcollation dbname syn keyword ProgressReserved dbparam dbrest[rictions] dbtaskid dbtype dbvers[ion] dde deblank debug-list debugger decimals declare default syn keyword ProgressReserved default-noxl[ate] default-window def[ine] delete delimiter desc[ending] dict[ionary] disable discon[nect] disp[lay] distinct do dos syn keyword ProgressReserved down drop dynamic-cast dynamic-func[tion] dynamic-new each editing else enable encode end entry error-stat[us] escape syn keyword ProgressReserved etime event-procedure except exclusive[-lock] exclusive-web[-user] exists export false fetch field[s] file-info[rmation] syn keyword ProgressReserved fill find find-case-sensitive find-global find-next-occurrence find-prev-occurrence find-select find-wrap-around first syn keyword ProgressReserved first-of focus font for form[at] fram[e] frame-col frame-db frame-down frame-field frame-file frame-inde[x] frame-line syn keyword ProgressReserved frame-name frame-row frame-val[ue] from from-c[hars] from-p[ixels] function-call-type gateway[s] get-attr-call-type get-byte syn keyword ProgressReserved get-codepage[s] get-coll[ations] get-column get-error-column get-error-row get-file-name get-file-offse[t] get-key-val[ue] syn keyword ProgressReserved get-message-type get-row getbyte global go-on go-pend[ing] grant graphic-e[dge] group having header help hide host-byte-order if syn keyword ProgressReserved import in index indicator input input-o[utput] insert into is is-attr[-space] join kblabel key-code key-func[tion] key-label syn keyword ProgressReserved keycode keyfunc[tion] keylabel keys keyword label last last-even[t] last-key last-of lastkey ldbname leave library like syn keyword ProgressReserved like-sequential line-count[er] listi[ng] little-endian locked log-manager lookup machine-class map member message message-lines mouse syn keyword ProgressReserved mpe new next next-prompt no no-attr[-space] no-error no-f[ill] no-help no-hide no-label[s] no-lobs no-lock no-map syn keyword ProgressReserved no-mes[sage] no-pause no-prefe[tch] no-return-val[ue] no-undo no-val[idate] no-wait not now null num-ali[ases] num-dbs num-entries syn keyword ProgressReserved of off old on open opsys option or os-append os-command os-copy os-create-dir os-delete os-dir os-drive[s] os-error syn keyword ProgressReserved os-rename otherwise output overlay page page-bot[tom] page-num[ber] page-top param[eter] password-field pause pdbname syn keyword ProgressReserved persist[ent] pixels preproc[ess] privileges proc-ha[ndle] proc-st[atus] procedure-call-type process profiler program-name progress syn keyword ProgressReserved prompt[-for] promsgs propath provers[ion] publish put put-byte put-key-val[ue] putbyte query query-tuning quit r-index syn keyword ProgressReserved rcode-info[rmation] read-available read-exact-num readkey recid record-len[gth] rect[angle] release repeat reposition retain retry return syn keyword ProgressReserved return-val[ue] revert revoke row-created row-deleted row-modified row-unmodified run save sax-comple[te] sax-parser-error syn keyword ProgressReserved sax-running sax-uninitialized sax-write-begin sax-write-complete sax-write-content sax-write-element sax-write-error syn keyword ProgressReserved sax-write-idle sax-write-tag schema screen screen-io screen-lines scroll sdbname search search-self search-target security-policy syn keyword ProgressReserved seek select self session set set-attr-call-type setuser[id] share[-lock] shared show-stat[s] skip some source-procedure syn keyword ProgressReserved space status stream stream-handle stream-io string-xref subscribe super system-dialog table table-handle target-procedure syn keyword ProgressReserved term[inal] text text-cursor text-seg[-grow] then this-object this-procedure time title to today top-only trans[action] trigger syn keyword ProgressReserved triggers trim true underl[ine] undo unform[atted] union unique unix unless-hidden unsubscribe up update use-index use-revvideo syn keyword ProgressReserved use-underline user[id] using value values view view-as wait-for web-con[text] when where while window window-delayed-min[imize] syn keyword ProgressReserved window-maxim[ized] window-minim[ized] window-normal with work-tab[le] workfile write xcode xcode-session-key xref xref-xml yes " Strings. Handles embedded quotes. " Note that, for some reason, Progress doesn't use the backslash, "\" " as the escape character; it uses tilde, "~". syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~'\|\~\~\|\~"+ contains=@Spell syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~\|\~"+ contains=@Spell syn match ProgressIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>()" " syn match ProgressDelimiter "()" syn match ProgressMatrixDelimiter "[][]" " If you prefer you can highlight the range: "syn match ProgressMatrixDelimiter "[\d\+\.\.\d\+]" syn match ProgressNumber "\<\-\=\d\+\(u\=l\=\|lu\|f\)\>" syn match ProgressByte "\$[0-9a-fA-F]\+" " More values: Logicals, and Progress's unknown value, ?. syn match ProgressNumber "?" syn keyword ProgressNumber true false yes no " If you don't like tabs: syn match ProgressShowTab "\t" " If you don't like white space on the end of lines, uncomment this: " syn match ProgressSpaceError "\s\+$" syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug,@Spell syn region ProgressInclude start="^[ ]*[{]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,ProgressComment syn region ProgressPreProc start="&" end="\>" contained " This next line works reasonably well. " syn match ProgressOperator "[!;|)(:.><+*=-]" " " Progress allows a '-' to be part of an identifier. To be considered " the subtraction/negation operation operator it needs a non-word " character on either side. Also valid are cases where the minus " operation appears at the beginning or end of a line. " This next line trips up on "no-undo" etc. " syn match ProgressOperator "[!;|)(:.><+*=]\|\W-\W\|^-\W\|\W-$" syn match ProgressOperator "[!;|)(:.><+*=]\|\s-\s\|^-\s\|\s-$" syn keyword ProgressOperator <= <> >= syn keyword ProgressOperator abs[olute] accelerator accept-changes accept-row-changes across active actor add-buffer add-calc-col[umn] syn keyword ProgressOperator add-columns-from add-events-proc[edure] add-fields-from add-first add-header-entry add-index-field add-interval add-last syn keyword ProgressOperator add-like-col[umn] add-like-field add-like-index add-new-field add-new-index add-rel[ation] add-schema-location add-source-buffer syn keyword ProgressOperator add-super-proc[edure] adm-data advise after-buffer after-rowid after-table alert-box allow-column-searching allow-replication alternate-key syn keyword ProgressOperator always-on-top ansi-only anywhere append append-child appl-alert[-boxes] appl-context-id application apply-callback appserver-info syn keyword ProgressOperator appserver-password appserver-userid array-m[essage] ask-overwrite assembly async-request-count async-request-handle attach-data-source syn keyword ProgressOperator attached-pairlist attach attribute-names audit-enabled audit-event-context authentication-failed auto-comp[letion] auto-delete syn keyword ProgressOperator auto-delete-xml auto-end-key auto-endkey auto-go auto-ind[ent] auto-resize auto-synchronize auto-val[idate] auto-z[ap] automatic syn keyword ProgressOperator available-formats ave[rage] avg backward[s] base-ade base-key basic-logging batch[-mode] batch-size before-buffer before-rowid syn keyword ProgressOperator before-table begin-event-group bgc[olor] binary bind bind-where blob block-iteration-display border-b[ottom-chars] syn keyword ProgressOperator border-bottom-p[ixels] border-l[eft-chars] border-left-p[ixels] border-r[ight-chars] border-right-p[ixels] border-t[op-chars] syn keyword ProgressOperator border-top-p[ixels] both bottom box box-select[able] browse buffer buffer-chars buffer-create buffer-delete buffer-field buffer-handle syn keyword ProgressOperator buffer-lines buffer-n[ame] buffer-releas[e] buffer-validate buffer-value button[s] by-reference by-value byte bytes-read syn keyword ProgressOperator bytes-written cache cache-size call-name call-type can-crea[te] can-dele[te] can-query can-read can-set can-writ[e] cancel-break syn keyword ProgressOperator cancel-button cancel-requests cancelled caps careful-paint catch cdecl chained char[acter] character_length charset checked syn keyword ProgressOperator child-buffer child-num choose class class-type clear-appl-context clear-log clear-select[ion] clear-sort-arrow[s] syn keyword ProgressOperator client-connection-id client-principal client-tty client-type client-workstation clob clone-node close close-log code codepage syn keyword ProgressOperator codepage-convert col-of collate colon-align[ed] color-table column-bgc[olor] column-codepage column-dcolor column-fgc[olor] syn keyword ProgressOperator column-font column-movable column-of column-pfc[olor] column-read-only column-resizable column-sc[rolling] com-handle combo-box syn keyword ProgressOperator command compare[s] compile complete config-name connect constructor contents context context-help context-help-file syn keyword ProgressOperator context-help-id context-pop[up] control-box control-fram[e] convert convert-to-offs[et] copy-dataset copy-sax-attributes syn keyword ProgressOperator copy-temp-table count cpcase cpcoll cpint[ernal] cplog cpprint cprcodein cprcodeout cpterm crc-val[ue] create-like syn keyword ProgressOperator create-like-sequential create-node create-node-namespace create-result-list-entry create-test-file current-column current-env[ironment] syn keyword ProgressOperator current-iteration current-query current-result-row current-row-modified current-value cursor-char cursor-line cursor-offset data-b[ind] syn keyword ProgressOperator data-entry-ret[urn] data-rel[ation] data-source data-source-complete-map data-source-modified data-source-rowid data-t[ype] date syn keyword ProgressOperator date-f[ormat] day db-references dcolor dde-error dde-i[d] dde-item dde-name dde-topic debu[g] debug-alert syn keyword ProgressOperator declare-namespace decrypt default-buffer-handle default-but[ton] default-commit default-ex[tension] default-string syn keyword ProgressOperator default-value define-user-event-manager defined delete-char delete-current-row delete-header-entry delete-line delete-node syn keyword ProgressOperator delete-result-list-entry delete-selected-row delete-selected-rows descript[ion] deselect-focused-row deselect-rows deselect-selected-row syn keyword ProgressOperator destructor detach-data-source dialog-box dir directory disable-auto-zap disable-connections disable-dump-triggers syn keyword ProgressOperator disable-load-triggers disabled display-message display-timezone display-t[ype] domain-description domain-name domain-type double syn keyword ProgressOperator drag-enabled drop-down drop-down-list drop-target dump dump-logging-now dynamic dynamic-current-value dynamic-next-value echo syn keyword ProgressOperator edge[-chars] edge-p[ixels] edit-can-paste edit-can-undo edit-clear edit-copy edit-cut edit-paste edit-undo editor empty syn keyword ProgressOperator empty-dataset empty-temp-table enable-connections enabled encoding encrypt encrypt-audit-mac-key encryption-salt end-document syn keyword ProgressOperator end-element end-event-group end-file-drop end-key end-user-prompt endkey entered entry-types-list eq error error-col[umn] syn keyword ProgressOperator error-object-detail error-row error-stack-trace error-string event-group-id event-procedure-context event-t[ype] events exclusive-id syn keyword ProgressOperator execute execution-log exp expand expandable expire explicit export-principal extended extent external extract syn keyword ProgressOperator fetch-selected-row fgc[olor] file file-create-d[ate] file-create-t[ime] file-mod-d[ate] file-mod-t[ime] file-name file-off[set] syn keyword ProgressOperator file-size file-type filename fill-in fill-mode fill-where-string filled filters final finally find-by-rowid find-current syn keyword ProgressOperator find-first find-last find-unique finder first-async[-request] first-buffer first-child first-column first-data-source syn keyword ProgressOperator first-dataset first-form first-object first-proc[edure] first-query first-serv[er] first-server-socket first-socket syn keyword ProgressOperator first-tab-i[tem] fit-last-column fix-codepage fixed-only flat-button float focused-row focused-row-selected font-table force-file syn keyword ProgressOperator fore[ground] foreign-key-hidden form-input form-long-input formatte[d] forward-only forward[s] fragmen[t] frame-spa[cing] frame-x syn keyword ProgressOperator frame-y frequency from-cur[rent] full-height[-chars] full-height-p[ixels] full-pathn[ame] full-width[-chars] syn keyword ProgressOperator full-width-p[ixels] function ge generate-pbe-key generate-pbe-salt generate-random-key generate-uuid get get-attribute get-attribute-node syn keyword ProgressOperator get-binary-data get-bits get-blue[-value] get-browse-col[umn] get-buffer-handle get-byte-order get-bytes get-bytes-available syn keyword ProgressOperator get-callback-proc-context get-callback-proc-name get-cgi-list get-cgi-long-value get-cgi-value get-changes get-child get-child-rel[ation] syn keyword ProgressOperator get-config-value get-curr[ent] get-dataset-buffer get-dir get-document-element get-double get-dropped-file get-dynamic get-file syn keyword ProgressOperator get-firs[t] get-float get-green[-value] get-header-entr[y] get-index-by-namespace-name get-index-by-qname get-iteration get-last syn keyword ProgressOperator get-localname-by-index get-long get-message get-next get-node get-number get-parent get-pointer-value get-prev get-printers get-property syn keyword ProgressOperator get-qname-by-index get-red[-value] get-rel[ation] get-repositioned-row get-rgb[-value] get-selected[-widget] get-serialized get-short syn keyword ProgressOperator get-signature get-size get-socket-option get-source-buffer get-string get-tab-item get-text-height[-chars] get-text-height-p[ixels] syn keyword ProgressOperator get-text-width[-chars] get-text-width-p[ixels] get-top-buffer get-type-by-index get-type-by-namespace-name get-type-by-qname syn keyword ProgressOperator get-unsigned-long get-unsigned-short get-uri-by-index get-value-by-index get-value-by-namespace-name get-value-by-qname syn keyword ProgressOperator get-wait[-state] grayed grid-factor-h[orizontal] grid-factor-v[ertical] grid-snap grid-unit-height[-chars] grid-unit-height-p[ixels] syn keyword ProgressOperator grid-unit-width[-chars] grid-unit-width-p[ixels] grid-visible group-box gt guid handle handler has-lobs has-records height[-chars] syn keyword ProgressOperator height-p[ixels] help-topic hex-decode hex-encode hidden hint hori[zontal] html-charset html-end-of-line html-end-of-page syn keyword ProgressOperator html-frame-begin html-frame-end html-header-begin html-header-end html-title-begin html-title-end hwnd icfparam[eter] icon syn keyword ProgressOperator ignore-current-mod[ified] image image-down image-insensitive image-size image-size-c[hars] image-size-p[ixels] image-up immediate-display syn keyword ProgressOperator implements import-node import-principal in-handle increment-exclusive-id index-hint index-info[rmation] indexed-reposition syn keyword ProgressOperator info[rmation] inherit-bgc[olor] inherit-fgc[olor] inherits init[ial] initial-dir initial-filter initialize-document-type initiate syn keyword ProgressOperator inner inner-chars inner-lines input-value insert-attribute insert-b[acktab] insert-before insert-file insert-row syn keyword ProgressOperator insert-string insert-t[ab] instantiating-procedure int[eger] interface internal-entries interval invoke is-clas[s] syn keyword ProgressOperator is-codepage-fixed is-column-codepage is-lead-byte is-open is-parameter-set is-row-selected is-selected is-xml iso-date item syn keyword ProgressOperator items-per-row join-by-sqldb keep-connection-open keep-frame-z[-order] keep-messages keep-security-cache keep-tab-order key syn keyword ProgressOperator keyword-all label-bgc[olor] label-dc[olor] label-fgc[olor] label-font label-pfc[olor] labels landscape language[s] large syn keyword ProgressOperator large-to-small last-async[-request] last-batch last-child last-form last-object last-proce[dure] last-serv[er] last-server-socket syn keyword ProgressOperator last-socket last-tab-i[tem] lc le leading left left-align[ed] left-trim length line list-events list-item-pairs list-items syn keyword ProgressOperator list-property-names list-query-attrs list-set-attrs list-widgets literal-question load load-domains load-icon load-image load-image-down syn keyword ProgressOperator load-image-insensitive load-image-up load-mouse-p[ointer] load-picture load-small-icon lob-dir local-host local-name local-port syn keyword ProgressOperator locator-column-number locator-line-number locator-public-id locator-system-id locator-type lock-registration log log-audit-event syn keyword ProgressOperator log-entry-types log-threshold logfile-name logging-level logical login-expiration-timestamp login-host login-state logout long[char] syn keyword ProgressOperator longchar-to-node-value lookahead lower lt mandatory manual-highlight margin-extra margin-height[-chars] margin-height-p[ixels] syn keyword ProgressOperator margin-width[-chars] margin-width-p[ixels] mark-new mark-row-state matches max-button max-chars max-data-guess max-height[-chars] syn keyword ProgressOperator max-height-p[ixels] max-rows max-size max-val[ue] max-width[-chars] max-width-p[ixels] maximize max[imum] maximum-level memory memptr syn keyword ProgressOperator memptr-to-node-value menu menu-bar menu-item menu-k[ey] menu-m[ouse] menubar merge-by-field merge-changes merge-row-changes message-area syn keyword ProgressOperator message-area-font method min-button min-column-width-c[hars] min-column-width-p[ixels] min-height[-chars] min-height-p[ixels] syn keyword ProgressOperator min-schema-marshal min-size min-val[ue] min-width[-chars] min-width-p[ixels] min[imum] modified mod[ulo] month mouse-p[ointer] movable syn keyword ProgressOperator move-after[-tab-item] move-befor[e-tab-item] move-col[umn] move-to-b[ottom] move-to-eof move-to-t[op] mtime multi-compile multiple syn keyword ProgressOperator multiple-key multitasking-interval must-exist must-understand name namespace-prefix namespace-uri native ne needs-appserver-prompt syn keyword ProgressOperator needs-prompt nested new-instance new-row next-col[umn] next-rowid next-sibling next-tab-ite[m] next-value no-apply syn keyword ProgressOperator no-array-m[essage] no-assign no-attr-l[ist] no-auto-validate no-bind-where no-box no-console no-convert no-current-value no-debug syn keyword ProgressOperator no-drag no-echo no-empty-space no-focus no-index-hint no-inherit-bgc[olor] no-inherit-fgc[olor] no-join-by-sqldb no-lookahead syn keyword ProgressOperator no-row-markers no-schema-marshal no-scrollbar-v[ertical] no-separate-connection no-separators no-tab[-stop] no-und[erline] syn keyword ProgressOperator no-word-wrap node-value node-value-to-longchar node-value-to-memptr nonamespace-schema-location none normalize not-active syn keyword ProgressOperator num-buffers num-but[tons] num-child-relations num-children num-col[umns] num-copies num-dropped-files num-fields num-formats syn keyword ProgressOperator num-header-entries num-items num-iterations num-lines num-locked-col[umns] num-log-files num-messages num-parameters num-references syn keyword ProgressOperator num-relations num-repl[aced] num-results num-selected-rows num-selected[-widgets] num-source-buffers num-tabs num-to-retain syn keyword ProgressOperator num-top-buffers num-visible-col[umns] numeric numeric-dec[imal-point] numeric-f[ormat] numeric-sep[arator] object ok ok-cancel syn keyword ProgressOperator on-frame[-border] ordered-join ordinal orientation origin-handle origin-rowid os-getenv outer outer-join override owner owner-document syn keyword ProgressOperator page-size page-wid[th] paged parent parent-buffer parent-rel[ation] parse-status partial-key pascal pathname syn keyword ProgressOperator pbe-hash-alg[orithm] pbe-key-rounds perf[ormance] persistent-cache-disabled persistent-procedure pfc[olor] pixels-per-col[umn] syn keyword ProgressOperator pixels-per-row popup-m[enu] popup-o[nly] portrait position precision prefer-dataset prepare-string prepared presel[ect] prev syn keyword ProgressOperator prev-col[umn] prev-sibling prev-tab-i[tem] primary printer printer-control-handle printer-hdc printer-name printer-port syn keyword ProgressOperator printer-setup private private-d[ata] proce[dure] procedure-name progress-s[ource] property protected proxy proxy-password syn keyword ProgressOperator proxy-userid public public-id published-events put-bits put-bytes put-double put-float put-long put-short put-string syn keyword ProgressOperator put-unsigned-long put-unsigned-short query-close query-off-end query-open query-prepare question quoter radio-buttons radio-set random syn keyword ProgressOperator raw raw-transfer read read-file read-only read-xml read-xmlschema real recursive reference-only refresh syn keyword ProgressOperator refresh-audit-policy refreshable register-domain reject-changes reject-row-changes rejected relation-fi[elds] relations-active remote syn keyword ProgressOperator remote-host remote-port remove-attribute remove-child remove-events-proc[edure] remove-super-proc[edure] replace replace-child syn keyword ProgressOperator replace-selection-text replication-create replication-delete replication-write reposition-back[ward] reposition-forw[ard] reposition-to-row syn keyword ProgressOperator reposition-to-rowid request reset resiza[ble] resize restart-row restart-rowid result retain-s[hape] retry-cancel return-ins[erted] syn keyword ProgressOperator return-to-start-di[r] return-value-data-type returns reverse-from rgb-v[alue] right right-align[ed] right-trim roles round rounded syn keyword ProgressOperator routine-level row row-height[-chars] row-height-p[ixels] row-ma[rkers] row-of row-resizable row-state rowid rule run-proc[edure] syn keyword ProgressOperator save-as save-file save-row-changes save-where-string sax-attributes sax-parse sax-parse-first sax-parse-next sax-reader syn keyword ProgressOperator sax-writer schema-change schema-location schema-marshal schema-path screen-val[ue] scroll-bars scroll-delta scroll-offset syn keyword ProgressOperator scroll-to-current-row scroll-to-i[tem] scroll-to-selected-row scrollable scrollbar-h[orizontal] scrollbar-v[ertical] syn keyword ProgressOperator scrolled-row-pos[ition] scrolling seal seal-timestamp section select-all select-focused-row select-next-row select-prev-row select-row syn keyword ProgressOperator selectable selected selection-end selection-list selection-start selection-text send sensitive separate-connection syn keyword ProgressOperator separator-fgc[olor] separators server server-connection-bo[und] server-connection-bound-re[quest] server-connection-co[ntext] syn keyword ProgressOperator server-connection-id server-operating-mode server-socket session-end session-id set-actor set-appl-context set-attribute syn keyword ProgressOperator set-attribute-node set-blue[-value] set-break set-buffers set-byte-order set-callback set-callback-procedure set-client set-commit syn keyword ProgressOperator set-connect-procedure set-contents set-db-client set-dynamic set-green[-value] set-input-source set-must-understand set-node syn keyword ProgressOperator set-numeric-form[at] set-option set-output-destination set-parameter set-pointer-val[ue] set-property set-read-response-procedure syn keyword ProgressOperator set-red[-value] set-repositioned-row set-rgb[-value] set-rollback set-selection set-serialized set-size set-socket-option syn keyword ProgressOperator set-sort-arrow set-wait[-state] short show-in-task[bar] side-label-h[andle] side-lab[els] silent simple single single-character size syn keyword ProgressOperator size-c[hars] size-p[ixels] skip-deleted-rec[ord] slider small-icon small-title smallint soap-fault soap-fault-actor syn keyword ProgressOperator soap-fault-code soap-fault-detail soap-fault-string soap-header soap-header-entryref socket sort sort-ascending sort-number source syn keyword ProgressOperator sql sqrt ssl-server-name standalone start-document start-element start[ing] startup-parameters state-detail static syn keyword ProgressOperator status-area status-area-font stdcall stop stop-parsing stoppe[d] stored-proc[edure] stretch-to-fit strict string string-value syn keyword ProgressOperator sub-ave[rage] sub-count sub-max[imum] sub-menu sub-menu-help sub-min[imum] sub-total subst[itute] substr[ing] subtype sum syn keyword ProgressOperator super-proc[edures] suppress-namespace-processing suppress-w[arnings] suspend symmetric-encryption-algorithm symmetric-encryption-iv syn keyword ProgressOperator symmetric-encryption-key symmetric-support synchronize system-alert[-boxes] system-help system-id tab-position tab-stop table-crc-list syn keyword ProgressOperator table-list table-num[ber] target temp-dir[ectory] temp-table temp-table-prepar[e] terminate text-selected three-d through throw syn keyword ProgressOperator thru tic-marks time-source timezone title-bgc[olor] title-dc[olor] title-fgc[olor] title-fo[nt] to-rowid toggle-box syn keyword ProgressOperator tooltip tooltips top top-nav-query topic total tracking-changes trailing trans-init-proc[edure] transaction-mode syn keyword ProgressOperator transpar[ent] trunc[ate] ttcodepage type type-of unbox unbuff[ered] unique-id unique-match unload unsigned-byte unsigned-integer syn keyword ProgressOperator unsigned-long unsigned-short update-attribute upper url url-decode url-encode url-password url-userid use use-dic[t-exps] syn keyword ProgressOperator use-filename use-text use-widget-pool user-id valid-event valid-handle valid-object validate validate-expressio[n] syn keyword ProgressOperator validate-message validate-seal validate-xml validation-enabled var[iable] verb[ose] version vert[ical] view-first-column-on-reopen syn keyword ProgressOperator virtual-height[-chars] virtual-height-p[ixels] virtual-width[-chars] virtual-width-p[ixels] visible void wait warning weekday where-string syn keyword ProgressOperator widget widget-e[nter] widget-h[andle] widget-id widget-l[eave] widget-pool width[-chars] width-p[ixels] window-name syn keyword ProgressOperator window-sta[te] window-sys[tem] word-index word-wrap work-area-height-p[ixels] work-area-width-p[ixels] work-area-x work-area-y syn keyword ProgressOperator write-cdata write-characters write-comment write-data-element write-empty-element write-entity-ref write-external-dtd syn keyword ProgressOperator write-fragment write-message write-processing-instruction write-status write-xml write-xmlschema x x-document x-noderef x-of syn keyword ProgressOperator xml-data-type xml-node-name xml-node-type xml-schema-pat[h] xml-suppress-namespace-processing y y-of year year-offset yes-no syn keyword ProgressOperator yes-no-cancel syn keyword ProgressType char[acter] int[eger] int64 dec[imal] log[ical] da[te] datetime datetime-tz syn sync lines=800 " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later. hi def link ProgressByte Number hi def link ProgressCase Repeat hi def link ProgressComment Comment hi def link ProgressConditional Conditional hi def link ProgressDebug Debug hi def link ProgressDo Repeat hi def link ProgressEndError Error hi def link ProgressFor Repeat hi def link ProgressFunction Procedure hi def link ProgressIdentifier Identifier hi def link ProgressInclude Include hi def link ProgressMatrixDelimiter Identifier hi def link ProgressNumber Number hi def link ProgressOperator Operator hi def link ProgressPreProc PreProc hi def link ProgressProcedure Procedure hi def link ProgressQuote Delimiter hi def link ProgressRepeat Repeat hi def link ProgressReserved Statement hi def link ProgressSpaceError Error hi def link ProgressString String hi def link ProgressTodo Todo hi def link ProgressType Statement hi def link ProgressShowTab Error let b:current_syntax = "progress" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=8 neovim-0.2.2/runtime/syntax/prolog.vim000066400000000000000000000104101320401574200200320ustar00rootroot00000000000000" Vim syntax file " Language: PROLOG " Maintainer: Thomas Koehler " Please be aware: I'm often slow to answer email due to a high " non-computer related workload (sometimes 4-8 weeks) " Last Change: 2016 September 6 " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/prolog.vim " There are two sets of highlighting in here: " If the "prolog_highlighting_clean" variable exists, it is rather sparse. " Otherwise you get more highlighting. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Prolog is case sensitive. syn case match " Very simple highlighting for comments, clause heads and " character codes. It respects prolog strings and atoms. syn region prologCComment start=+/\*+ end=+\*/+ syn match prologComment +%.*+ syn keyword prologKeyword module meta_predicate multifile dynamic syn match prologCharCode +0'\\\=.+ syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+ syn region prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause if !exists("prolog_highlighting_clean") " some keywords " some common predicates are also highlighted as keywords " is there a better solution? syn keyword prologKeyword abolish current_output peek_code syn keyword prologKeyword append current_predicate put_byte syn keyword prologKeyword arg current_prolog_flag put_char syn keyword prologKeyword asserta fail put_code syn keyword prologKeyword assertz findall read syn keyword prologKeyword at_end_of_stream float read_term syn keyword prologKeyword atom flush_output repeat syn keyword prologKeyword atom_chars functor retract syn keyword prologKeyword atom_codes get_byte set_input syn keyword prologKeyword atom_concat get_char set_output syn keyword prologKeyword atom_length get_code set_prolog_flag syn keyword prologKeyword atomic halt set_stream_position syn keyword prologKeyword bagof integer setof syn keyword prologKeyword call is stream_property syn keyword prologKeyword catch nl sub_atom syn keyword prologKeyword char_code nonvar throw syn keyword prologKeyword char_conversion number true syn keyword prologKeyword clause number_chars unify_with_occurs_check syn keyword prologKeyword close number_codes var syn keyword prologKeyword compound once write syn keyword prologKeyword copy_term op write_canonical syn keyword prologKeyword current_char_conversion open write_term syn keyword prologKeyword current_input peek_byte writeq syn keyword prologKeyword current_op peek_char syn match prologOperator "=\\=\|=:=\|\\==\|=<\|==\|>=\|\\=\|\\+\|<\|>\|=" syn match prologAsIs "===\|\\===\|<=\|=>" syn match prologNumber "\<[0123456789]*\>'\@!" syn match prologCommentError "\*/" syn match prologSpecialCharacter ";" syn match prologSpecialCharacter "!" syn match prologSpecialCharacter ":-" syn match prologSpecialCharacter "-->" syn match prologQuestion "?-.*\." contains=prologNumber endif syn sync maxlines=50 " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default highlighting. hi def link prologComment Comment hi def link prologCComment Comment hi def link prologCharCode Special if exists ("prolog_highlighting_clean") hi def link prologKeyword Statement hi def link prologClauseHead Statement hi def link prologClause Normal else hi def link prologKeyword Keyword hi def link prologClauseHead Constant hi def link prologClause Normal hi def link prologQuestion PreProc hi def link prologSpecialCharacter Special hi def link prologNumber Number hi def link prologAsIs Normal hi def link prologCommentError Error hi def link prologAtom String hi def link prologString String hi def link prologOperator Operator endif let b:current_syntax = "prolog" " vim: ts=8 neovim-0.2.2/runtime/syntax/promela.vim000066400000000000000000000033001320401574200201670ustar00rootroot00000000000000" Vim syntax file " Language: ProMeLa " Maintainer: Maurizio Tranchero - " First Release: Mon Oct 16 08:49:46 CEST 2006 " Last Change: Thu Aug 7 21:22:48 CEST 2008 " Version: 0.5 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " case is significant " syn case ignore " ProMeLa Keywords syn keyword promelaStatement proctype if else while chan do od fi break goto unless syn keyword promelaStatement active assert label atomic syn keyword promelaFunctions skip timeout run syn keyword promelaTodo contained TODO " ProMeLa Types syn keyword promelaType bit bool byte short int " Operators and special characters syn match promelaOperator "!" syn match promelaOperator "?" syn match promelaOperator "->" syn match promelaOperator "=" syn match promelaOperator "+" syn match promelaOperator "*" syn match promelaOperator "/" syn match promelaOperator "-" syn match promelaOperator "<" syn match promelaOperator ">" syn match promelaOperator "<=" syn match promelaOperator ">=" syn match promelaSpecial "\[" syn match promelaSpecial "\]" syn match promelaSpecial ";" syn match promelaSpecial "::" " ProMeLa Comments syn region promelaComment start="/\*" end="\*/" contains=promelaTodo,@Spell syn match promelaComment "//.*" contains=promelaTodo,@Spell " Class Linking hi def link promelaStatement Statement hi def link promelaType Type hi def link promelaComment Comment hi def link promelaOperator Type hi def link promelaSpecial Special hi def link promelaFunctions Special hi def link promelaString String hi def link promelaTodo Todo let b:current_syntax = "promela" neovim-0.2.2/runtime/syntax/proto.vim000066400000000000000000000055651320401574200177120ustar00rootroot00000000000000" syntax file for Protocol Buffers - Google's data interchange format " " Copyright 2008 Google Inc. All rights reserved. " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to deal " in the Software without restriction, including without limitation the rights " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell " copies of the Software, and to permit persons to whom the Software is " furnished to do so, subject to the following conditions: " " The above copyright notice and this permission notice shall be included in " all copies or substantial portions of the Software. " " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN " THE SOFTWARE. " " http://code.google.com/p/protobuf/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match syn keyword protoTodo contained TODO FIXME XXX syn cluster protoCommentGrp contains=protoTodo syn keyword protoSyntax syntax import option syn keyword protoStructure package message group syn keyword protoRepeat optional required repeated syn keyword protoDefault default syn keyword protoExtend extend extensions to max syn keyword protoRPC service rpc returns syn keyword protoType int32 int64 uint32 uint64 sint32 sint64 syn keyword protoType fixed32 fixed64 sfixed32 sfixed64 syn keyword protoType float double bool string bytes syn keyword protoTypedef enum syn keyword protoBool true false syn match protoInt /-\?\<\d\+\>/ syn match protoInt /\<0[xX]\x+\>/ syn match protoFloat /\<-\?\d*\(\.\d*\)\?/ syn region protoComment start="\/\*" end="\*\/" contains=@protoCommentGrp syn region protoComment start="//" skip="\\$" end="$" keepend contains=@protoCommentGrp syn region protoString start=/"/ skip=/\\./ end=/"/ syn region protoString start=/'/ skip=/\\./ end=/'/ hi def link protoTodo Todo hi def link protoSyntax Include hi def link protoStructure Structure hi def link protoRepeat Repeat hi def link protoDefault Keyword hi def link protoExtend Keyword hi def link protoRPC Keyword hi def link protoType Type hi def link protoTypedef Typedef hi def link protoBool Boolean hi def link protoInt Number hi def link protoFloat Float hi def link protoComment Comment hi def link protoString String let b:current_syntax = "proto" neovim-0.2.2/runtime/syntax/protocols.vim000066400000000000000000000026251320401574200205650ustar00rootroot00000000000000" Vim syntax file " Language: protocols(5) - Internet protocols definition file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match protocolsBegin display '^' \ nextgroup=protocolsName,protocolsComment syn match protocolsName contained display '[[:graph:]]\+' \ nextgroup=protocolsPort skipwhite syn match protocolsPort contained display '\d\+' \ nextgroup=protocolsAliases,protocolsComment \ skipwhite syn match protocolsAliases contained display '\S\+' \ nextgroup=protocolsAliases,protocolsComment \ skipwhite syn keyword protocolsTodo contained TODO FIXME XXX NOTE syn region protocolsComment display oneline start='#' end='$' \ contains=protocolsTodo,@Spell hi def link protocolsTodo Todo hi def link protocolsComment Comment hi def link protocolsName Identifier hi def link protocolsPort Number hi def link protocolsPPDiv Delimiter hi def link protocolsPPDivDepr Error hi def link protocolsProtocol Type hi def link protocolsAliases Macro let b:current_syntax = "protocols" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/psf.vim000066400000000000000000000103021320401574200173200ustar00rootroot00000000000000" Vim syntax file " Language: Software Distributor product specification file " (POSIX 1387.2-1995). " Maintainer: Rex Barzee " Last change: 25 Apr 2001 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Product specification files are case sensitive syn case match syn keyword psfObject bundle category control_file depot distribution syn keyword psfObject end file fileset host installed_software media syn keyword psfObject product root subproduct vendor syn match psfUnquotString +[^"# ][^#]*+ contained syn region psfQuotString start=+"+ skip=+\\"+ end=+"+ contained syn match psfObjTag "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*" contained syn match psfAttAbbrev ",\<\(fa\|fr\|[aclqrv]\)\(<\|>\|<=\|>=\|=\|==\)[^,]\+" contained syn match psfObjTags "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\(\s\+\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\)*" contained syn match psfNumber "\<\d\+\>" contained syn match psfFloat "\<\d\+\>\(\.\<\d\+\>\)*" contained syn match psfLongDate "\<\d\d\d\d\d\d\d\d\d\d\d\d\.\d\d\>" contained syn keyword psfState available configured corrupt installed transient contained syn keyword psfPState applied committed superseded contained syn keyword psfBoolean false true contained "Some of the attributes covered by attUnquotString and attQuotString: " architecture category_tag control_directory copyright " create_date description directory file_permissions install_source " install_type location machine_type mod_date number os_name os_release " os_version pose_as_os_name pose_as_os_release readme revision " share_link title vendor_tag syn region psfAttUnquotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+[^#" ]~rs=e-1 contains=psfUnquotString,psfComment end=~$~ keepend oneline syn region psfAttQuotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+"~rs=e-1 contains=psfQuotString,psfComment skip=~\\"~ matchgroup=psfQuotString end=~"~ keepend " These regions are defined in attempt to do syntax checking for some " of the attributes. syn region psfAttTag matchgroup=psfAttrib start="^\s*tag\s\+" contains=psfObjTag,psfComment end="$" keepend oneline syn region psfAttSpec matchgroup=psfAttrib start="^\s*\(ancestor\|applied_patches\|applied_to\|contents\|corequisites\|exrequisites\|prerequisites\|software_spec\|supersedes\|superseded_by\)\s\+" contains=psfObjTag,psfAttAbbrev,psfComment end="$" keepend syn region psfAttTags matchgroup=psfAttrib start="^\s*all_filesets\s\+" contains=psfObjTags,psfComment end="$" keepend syn region psfAttNumber matchgroup=psfAttrib start="^\s*\(compressed_size\|instance_id\|media_sequence_number\|sequence_number\|size\)\s\+" contains=psfNumber,psfComment end="$" keepend oneline syn region psfAttTime matchgroup=psfAttrib start="^\s*\(create_time\|ctime\|mod_time\|mtime\|timestamp\)\s\+" contains=psfNumber,psfComment end="$" keepend oneline syn region psfAttFloat matchgroup=psfAttrib start="^\s*\(data_model_revision\|layout_version\)\s\+" contains=psfFloat,psfComment end="$" keepend oneline syn region psfAttLongDate matchgroup=psfAttrib start="^\s*install_date\s\+" contains=psfLongDate,psfComment end="$" keepend oneline syn region psfAttState matchgroup=psfAttrib start="^\s*\(state\)\s\+" contains=psfState,psfComment end="$" keepend oneline syn region psfAttPState matchgroup=psfAttrib start="^\s*\(patch_state\)\s\+" contains=psfPState,psfComment end="$" keepend oneline syn region psfAttBoolean matchgroup=psfAttrib start="^\s*\(is_kernel\|is_locatable\|is_patch\|is_protected\|is_reboot\|is_reference\|is_secure\|is_sparse\)\s\+" contains=psfBoolean,psfComment end="$" keepend oneline syn match psfComment "#.*$" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link psfObject Statement hi def link psfAttrib Type hi def link psfQuotString String hi def link psfObjTag Identifier hi def link psfAttAbbrev PreProc hi def link psfObjTags Identifier hi def link psfComment Comment " Long descriptions and copyrights confuse the syntax highlighting, so " force vim to backup at least 100 lines before the top visible line " looking for a sync location. syn sync lines=100 let b:current_syntax = "psf" neovim-0.2.2/runtime/syntax/ptcap.vim000066400000000000000000000100401320401574200176360ustar00rootroot00000000000000" Vim syntax file " Language: printcap/termcap database " Maintainer: Haakon Riiser " URL: http://folk.uio.no/hakonrk/vim/syntax/ptcap.vim " Last Change: 2001 May 15 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Since I only highlight based on the structure of the databases, not " specific keywords, case sensitivity isn't required syn case ignore " Since everything that is not caught by the syntax patterns is assumed " to be an error, we start parsing 20 lines up, unless something else " is specified if exists("ptcap_minlines") exe "syn sync lines=".ptcap_minlines else syn sync lines=20 endif " Highlight everything that isn't caught by the rules as errors, " except blank lines syn match ptcapError "^.*\S.*$" syn match ptcapLeadBlank "^\s\+" contained " `:' and `|' are delimiters for fields and names, and should not be " highlighted. Hence, they are linked to `NONE' syn match ptcapDelimiter "[:|]" contained " Escaped characters receive special highlighting syn match ptcapEscapedChar "\\." contained syn match ptcapEscapedChar "\^." contained syn match ptcapEscapedChar "\\\o\{3}" contained " A backslash at the end of a line will suppress the newline syn match ptcapLineCont "\\$" contained " A number follows the same rules as an integer in C syn match ptcapNumber "#\(+\|-\)\=\d\+"lc=1 contained syn match ptcapNumberError "#\d*[^[:digit:]:\\]"lc=1 contained syn match ptcapNumber "#0x\x\{1,8}"lc=1 contained syn match ptcapNumberError "#0x\X"me=e-1,lc=1 contained syn match ptcapNumberError "#0x\x\{9}"lc=1 contained syn match ptcapNumberError "#0x\x*[^[:xdigit:]:\\]"lc=1 contained " The `@' operator clears a flag (i.e., sets it to zero) " The `#' operator assigns a following number to the flag " The `=' operator assigns a string to the preceding flag syn match ptcapOperator "[@#=]" contained " Some terminal capabilites have special names like `#5' and `@1', and we " need special rules to match these properly syn match ptcapSpecialCap "\W[#@]\d" contains=ptcapDelimiter contained " If editing a termcap file, an entry in the database is terminated by " a (non-escaped) newline. Otherwise, it is terminated by a line which " does not start with a colon (:) if exists("b:ptcap_type") && b:ptcap_type[0] == 't' syn region ptcapEntry start="^\s*[^[:space:]:]" end="[^\\]\(\\\\\)*$" end="^$" contains=ptcapNames,ptcapField,ptcapLeadBlank keepend else syn region ptcapEntry start="^\s*[^[:space:]:]"me=e-1 end="^\s*[^[:space:]:#]"me=e-1 contains=ptcapNames,ptcapField,ptcapLeadBlank,ptcapComment endif syn region ptcapNames start="^\s*[^[:space:]:]" skip="[^\\]\(\\\\\)*\\:" end=":"me=e-1 contains=ptcapDelimiter,ptcapEscapedChar,ptcapLineCont,ptcapLeadBlank,ptcapComment keepend contained syn region ptcapField start=":" skip="[^\\]\(\\\\\)*\\$" end="[^\\]\(\\\\\)*:"me=e-1 end="$" contains=ptcapDelimiter,ptcapString,ptcapNumber,ptcapNumberError,ptcapOperator,ptcapLineCont,ptcapSpecialCap,ptcapLeadBlank,ptcapComment keepend contained syn region ptcapString matchgroup=ptcapOperator start="=" skip="[^\\]\(\\\\\)*\\:" matchgroup=ptcapDelimiter end=":"me=e-1 matchgroup=NONE end="[^\\]\(\\\\\)*[^\\]$" end="^$" contains=ptcapEscapedChar,ptcapLineCont keepend contained syn region ptcapComment start="^\s*#" end="$" contains=ptcapLeadBlank hi def link ptcapComment Comment hi def link ptcapDelimiter Delimiter " The highlighting of "ptcapEntry" should always be overridden by " its contents, so I use Todo highlighting to indicate that there " is work to be done with the syntax file if you can see it :-) hi def link ptcapEntry Todo hi def link ptcapError Error hi def link ptcapEscapedChar SpecialChar hi def link ptcapField Type hi def link ptcapLeadBlank NONE hi def link ptcapLineCont Special hi def link ptcapNames Label hi def link ptcapNumber NONE hi def link ptcapNumberError Error hi def link ptcapOperator Operator hi def link ptcapSpecialCap Type hi def link ptcapString NONE let b:current_syntax = "ptcap" " vim: sts=4 sw=4 ts=8 neovim-0.2.2/runtime/syntax/purifylog.vim000066400000000000000000000064351320401574200205640ustar00rootroot00000000000000" Vim syntax file " Language: purify log files " Maintainer: Gautam H. Mudunuri " Last Change: 2003 May 11 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Purify header syn match purifyLogHeader "^\*\*\*\*.*$" " Informational messages syn match purifyLogFIU "^FIU:.*$" syn match purifyLogMAF "^MAF:.*$" syn match purifyLogMIU "^MIU:.*$" syn match purifyLogSIG "^SIG:.*$" syn match purifyLogWPF "^WPF:.*$" syn match purifyLogWPM "^WPM:.*$" syn match purifyLogWPN "^WPN:.*$" syn match purifyLogWPR "^WPR:.*$" syn match purifyLogWPW "^WPW:.*$" syn match purifyLogWPX "^WPX:.*$" " Warning messages syn match purifyLogABR "^ABR:.*$" syn match purifyLogBSR "^BSR:.*$" syn match purifyLogBSW "^BSW:.*$" syn match purifyLogFMR "^FMR:.*$" syn match purifyLogMLK "^MLK:.*$" syn match purifyLogMSE "^MSE:.*$" syn match purifyLogPAR "^PAR:.*$" syn match purifyLogPLK "^PLK:.*$" syn match purifyLogSBR "^SBR:.*$" syn match purifyLogSOF "^SOF:.*$" syn match purifyLogUMC "^UMC:.*$" syn match purifyLogUMR "^UMR:.*$" " Corrupting messages syn match purifyLogABW "^ABW:.*$" syn match purifyLogBRK "^BRK:.*$" syn match purifyLogFMW "^FMW:.*$" syn match purifyLogFNH "^FNH:.*$" syn match purifyLogFUM "^FUM:.*$" syn match purifyLogMRE "^MRE:.*$" syn match purifyLogSBW "^SBW:.*$" " Fatal messages syn match purifyLogCOR "^COR:.*$" syn match purifyLogNPR "^NPR:.*$" syn match purifyLogNPW "^NPW:.*$" syn match purifyLogZPR "^ZPR:.*$" syn match purifyLogZPW "^ZPW:.*$" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link purifyLogFIU purifyLogInformational hi def link purifyLogMAF purifyLogInformational hi def link purifyLogMIU purifyLogInformational hi def link purifyLogSIG purifyLogInformational hi def link purifyLogWPF purifyLogInformational hi def link purifyLogWPM purifyLogInformational hi def link purifyLogWPN purifyLogInformational hi def link purifyLogWPR purifyLogInformational hi def link purifyLogWPW purifyLogInformational hi def link purifyLogWPX purifyLogInformational hi def link purifyLogABR purifyLogWarning hi def link purifyLogBSR purifyLogWarning hi def link purifyLogBSW purifyLogWarning hi def link purifyLogFMR purifyLogWarning hi def link purifyLogMLK purifyLogWarning hi def link purifyLogMSE purifyLogWarning hi def link purifyLogPAR purifyLogWarning hi def link purifyLogPLK purifyLogWarning hi def link purifyLogSBR purifyLogWarning hi def link purifyLogSOF purifyLogWarning hi def link purifyLogUMC purifyLogWarning hi def link purifyLogUMR purifyLogWarning hi def link purifyLogABW purifyLogCorrupting hi def link purifyLogBRK purifyLogCorrupting hi def link purifyLogFMW purifyLogCorrupting hi def link purifyLogFNH purifyLogCorrupting hi def link purifyLogFUM purifyLogCorrupting hi def link purifyLogMRE purifyLogCorrupting hi def link purifyLogSBW purifyLogCorrupting hi def link purifyLogCOR purifyLogFatal hi def link purifyLogNPR purifyLogFatal hi def link purifyLogNPW purifyLogFatal hi def link purifyLogZPR purifyLogFatal hi def link purifyLogZPW purifyLogFatal hi def link purifyLogHeader Comment hi def link purifyLogInformational PreProc hi def link purifyLogWarning Type hi def link purifyLogCorrupting Error hi def link purifyLogFatal Error let b:current_syntax = "purifylog" " vim:ts=8 neovim-0.2.2/runtime/syntax/pyrex.vim000066400000000000000000000031771320401574200177130ustar00rootroot00000000000000" Vim syntax file " Language: Pyrex " Maintainer: Marco Barisione " URL: http://marcobari.altervista.org/pyrex_vim.html " Last Change: 2009 Nov 09 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Read the Python syntax to start with runtime! syntax/python.vim unlet b:current_syntax " Pyrex extentions syn keyword pyrexStatement cdef typedef ctypedef sizeof syn keyword pyrexType int long short float double char object void syn keyword pyrexType signed unsigned syn keyword pyrexStructure struct union enum syn keyword pyrexInclude include cimport syn keyword pyrexAccess public private property readonly extern " If someome wants Python's built-ins highlighted probably he " also wants Pyrex's built-ins highlighted if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") syn keyword pyrexBuiltin NULL endif " This deletes "from" from the keywords and re-adds it as a " match with lower priority than pyrexForFrom syn clear pythonInclude syn keyword pythonInclude import syn match pythonInclude "from" " With "for[^:]*\zsfrom" VIM does not match "for" anymore, so " I used the slower "\@<=" form syn match pyrexForFrom "\(for[^:]*\)\@<=from" " Default highlighting hi def link pyrexStatement Statement hi def link pyrexType Type hi def link pyrexStructure Structure hi def link pyrexInclude PreCondit hi def link pyrexAccess pyrexStatement if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") hi def link pyrexBuiltin Function endif hi def link pyrexForFrom Statement let b:current_syntax = "pyrex" neovim-0.2.2/runtime/syntax/python.vim000066400000000000000000000337261320401574200200700ustar00rootroot00000000000000" Vim syntax file " Language: Python " Maintainer: Zvezdan Petkovic " Last Change: 2016 Oct 29 " Credits: Neil Schemenauer " Dmitry Vasiliev " " This version is a major rewrite by Zvezdan Petkovic. " " - introduced highlighting of doctests " - updated keywords, built-ins, and exceptions " - corrected regular expressions for " " * functions " * decorators " * strings " * escapes " * numbers " * space error " " - corrected synchronization " - more highlighting is ON by default, except " - space error highlighting is OFF by default " " Optional highlighting can be controlled using these variables. " " let python_no_builtin_highlight = 1 " let python_no_doctest_code_highlight = 1 " let python_no_doctest_highlight = 1 " let python_no_exception_highlight = 1 " let python_no_number_highlight = 1 " let python_space_error_highlight = 1 " " All the options above can be switched on together. " " let python_highlight_all = 1 " " quit when a syntax file was already loaded. if exists("b:current_syntax") finish endif " We need nocompatible mode in order to continue lines with backslashes. " Original setting will be restored. let s:cpo_save = &cpo set cpo&vim if exists("python_no_doctest_highlight") let python_no_doctest_code_highlight = 1 endif if exists("python_highlight_all") if exists("python_no_builtin_highlight") unlet python_no_builtin_highlight endif if exists("python_no_doctest_code_highlight") unlet python_no_doctest_code_highlight endif if exists("python_no_doctest_highlight") unlet python_no_doctest_highlight endif if exists("python_no_exception_highlight") unlet python_no_exception_highlight endif if exists("python_no_number_highlight") unlet python_no_number_highlight endif let python_space_error_highlight = 1 endif " Keep Python keywords in alphabetical order inside groups for easy " comparison with the table in the 'Python Language Reference' " https://docs.python.org/2/reference/lexical_analysis.html#keywords, " https://docs.python.org/3/reference/lexical_analysis.html#keywords. " Groups are in the order presented in NAMING CONVENTIONS in syntax.txt. " Exceptions come last at the end of each group (class and def below). " " Keywords 'with' and 'as' are new in Python 2.6 " (use 'from __future__ import with_statement' in Python 2.5). " " Some compromises had to be made to support both Python 3 and 2. " We include Python 3 features, but when a definition is duplicated, " the last definition takes precedence. " " - 'False', 'None', and 'True' are keywords in Python 3 but they are " built-ins in 2 and will be highlighted as built-ins below. " - 'exec' is a built-in in Python 3 and will be highlighted as " built-in below. " - 'nonlocal' is a keyword in Python 3 and will be highlighted. " - 'print' is a built-in in Python 3 and will be highlighted as " built-in below (use 'from __future__ import print_function' in 2) " - async and await were added in Python 3.5 and are soft keywords. " syn keyword pythonStatement False None True syn keyword pythonStatement as assert break continue del exec global syn keyword pythonStatement lambda nonlocal pass print return with yield syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite syn keyword pythonConditional elif else if syn keyword pythonRepeat for while syn keyword pythonOperator and in is not or syn keyword pythonException except finally raise try syn keyword pythonInclude from import syn keyword pythonAsync async await " Decorators (new in Python 2.4) " A dot must be allowed because of @MyClass.myfunc decorators. syn match pythonDecorator "@" display contained syn match pythonDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator " Python 3.5 introduced the use of the same symbol for matrix multiplication: " https://www.python.org/dev/peps/pep-0465/. We now have to exclude the " symbol from highlighting when used in that context. " Single line multiplication. syn match pythonMatrixMultiply \ "\%(\w\|[])]\)\s*@" \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue \ transparent " Multiplication continued on the next line after backslash. syn match pythonMatrixMultiply \ "[^\\]\\\s*\n\%(\s*\.\.\.\s\)\=\s\+@" \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue \ transparent " Multiplication in a parenthesized expression over multiple lines with @ at " the start of each continued line; very similar to decorators and complex. syn match pythonMatrixMultiply \ "^\s*\%(\%(>>>\|\.\.\.\)\s\+\)\=\zs\%(\h\|\%(\h\|[[(]\).\{-}\%(\w\|[])]\)\)\s*\n\%(\s*\.\.\.\s\)\=\s\+@\%(.\{-}\n\%(\s*\.\.\.\s\)\=\s\+@\)*" \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue \ transparent syn match pythonFunction "\h\w*" display contained syn match pythonComment "#.*$" contains=pythonTodo,@Spell syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained " Triple-quoted strings can contain doctests. syn region pythonString matchgroup=pythonQuotes \ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1" \ contains=pythonEscape,@Spell syn region pythonString matchgroup=pythonTripleQuotes \ start=+[uU]\=\z('''\|"""\)+ skip=+\\["']+ end="\z1" keepend \ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell syn region pythonRawString matchgroup=pythonQuotes \ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1" \ contains=@Spell syn region pythonRawString matchgroup=pythonTripleQuotes \ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend \ contains=pythonSpaceError,pythonDoctest,@Spell syn match pythonEscape +\\[abfnrtv'"\\]+ contained syn match pythonEscape "\\\o\{1,3}" contained syn match pythonEscape "\\x\x\{2}" contained syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained " Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/ syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained syn match pythonEscape "\\$" " It is very important to understand all details before changing the " regular expressions below or their order. " The word boundaries are *not* the floating-point number boundaries " because of a possible leading or trailing decimal point. " The expressions below ensure that all valid number literals are " highlighted, and invalid number literals are not. For example, " " - a decimal point in '4.' at the end of a line is highlighted, " - a second dot in 1.0.0 is not highlighted, " - 08 is not highlighted, " - 08e0 or 08j are highlighted, " " and so on, as specified in the 'Python Language Reference'. " https://docs.python.org/2/reference/lexical_analysis.html#numeric-literals " https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals if !exists("python_no_number_highlight") " numbers (including longs and complex) syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>" syn match pythonNumber "\<0[xX]\x\+[Ll]\=\>" syn match pythonNumber "\<0[bB][01]\+[Ll]\=\>" syn match pythonNumber "\<\%([1-9]\d*\|0\)[Ll]\=\>" syn match pythonNumber "\<\d\+[jJ]\>" syn match pythonNumber "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" syn match pythonNumber \ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@=" syn match pythonNumber \ "\%(^\|\W\)\zs\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>" endif " Group the built-ins in the order in the 'Python Library Reference' for " easier comparison. " https://docs.python.org/2/library/constants.html " https://docs.python.org/3/library/constants.html " http://docs.python.org/2/library/functions.html " http://docs.python.org/3/library/functions.html " http://docs.python.org/2/library/functions.html#non-essential-built-in-functions " http://docs.python.org/3/library/functions.html#non-essential-built-in-functions " Python built-in functions are in alphabetical order. if !exists("python_no_builtin_highlight") " built-in constants " 'False', 'True', and 'None' are also reserved words in Python 3 syn keyword pythonBuiltin False True None syn keyword pythonBuiltin NotImplemented Ellipsis __debug__ " built-in functions syn keyword pythonBuiltin abs all any bin bool bytearray callable chr syn keyword pythonBuiltin classmethod compile complex delattr dict dir syn keyword pythonBuiltin divmod enumerate eval filter float format syn keyword pythonBuiltin frozenset getattr globals hasattr hash syn keyword pythonBuiltin help hex id input int isinstance syn keyword pythonBuiltin issubclass iter len list locals map max syn keyword pythonBuiltin memoryview min next object oct open ord pow syn keyword pythonBuiltin print property range repr reversed round set syn keyword pythonBuiltin setattr slice sorted staticmethod str syn keyword pythonBuiltin sum super tuple type vars zip __import__ " Python 2 only syn keyword pythonBuiltin basestring cmp execfile file syn keyword pythonBuiltin long raw_input reduce reload unichr syn keyword pythonBuiltin unicode xrange " Python 3 only syn keyword pythonBuiltin ascii bytes exec " non-essential built-in functions; Python 2 only syn keyword pythonBuiltin apply buffer coerce intern " avoid highlighting attributes as builtins syn match pythonAttribute /\.\h\w*/hs=s+1 \ contains=ALLBUT,pythonBuiltin,pythonFunction,pythonAsync \ transparent endif " From the 'Python Library Reference' class hierarchy at the bottom. " http://docs.python.org/2/library/exceptions.html " http://docs.python.org/3/library/exceptions.html if !exists("python_no_exception_highlight") " builtin base exceptions (used mostly as base classes for other exceptions) syn keyword pythonExceptions BaseException Exception syn keyword pythonExceptions ArithmeticError BufferError syn keyword pythonExceptions LookupError " builtin base exceptions removed in Python 3 syn keyword pythonExceptions EnvironmentError StandardError " builtin exceptions (actually raised) syn keyword pythonExceptions AssertionError AttributeError syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit syn keyword pythonExceptions ImportError IndentationError syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt syn keyword pythonExceptions MemoryError NameError NotImplementedError syn keyword pythonExceptions OSError OverflowError ReferenceError syn keyword pythonExceptions RuntimeError StopIteration SyntaxError syn keyword pythonExceptions SystemError SystemExit TabError TypeError syn keyword pythonExceptions UnboundLocalError UnicodeError syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError syn keyword pythonExceptions UnicodeTranslateError ValueError syn keyword pythonExceptions ZeroDivisionError " builtin OS exceptions in Python 3 syn keyword pythonExceptions BlockingIOError BrokenPipeError syn keyword pythonExceptions ChildProcessError ConnectionAbortedError syn keyword pythonExceptions ConnectionError ConnectionRefusedError syn keyword pythonExceptions ConnectionResetError FileExistsError syn keyword pythonExceptions FileNotFoundError InterruptedError syn keyword pythonExceptions IsADirectoryError NotADirectoryError syn keyword pythonExceptions PermissionError ProcessLookupError syn keyword pythonExceptions RecursionError StopAsyncIteration syn keyword pythonExceptions TimeoutError " builtin exceptions deprecated/removed in Python 3 syn keyword pythonExceptions IOError VMSError WindowsError " builtin warnings syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning syn keyword pythonExceptions ImportWarning PendingDeprecationWarning syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning syn keyword pythonExceptions UserWarning Warning " builtin warnings in Python 3 syn keyword pythonExceptions ResourceWarning endif if exists("python_space_error_highlight") " trailing whitespace syn match pythonSpaceError display excludenl "\s\+$" " mixed tabs and spaces syn match pythonSpaceError display " \+\t" syn match pythonSpaceError display "\t\+ " endif " Do not spell doctests inside strings. " Notice that the end of a string, either ''', or """, will end the contained " doctest too. Thus, we do *not* need to have it as an end pattern. if !exists("python_no_doctest_highlight") if !exists("python_no_doctest_code_highlight") syn region pythonDoctest \ start="^\s*>>>\s" end="^\s*$" \ contained contains=ALLBUT,pythonDoctest,pythonFunction,@Spell syn region pythonDoctestValue \ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$" \ contained else syn region pythonDoctest \ start="^\s*>>>" end="^\s*$" \ contained contains=@NoSpell endif endif " Sync at the beginning of class, function, or method definition. syn sync match pythonSync grouphere NONE "^\%(def\|class\)\s\+\h\w*\s*[(:]" " The default highlight links. Can be overridden later. hi def link pythonStatement Statement hi def link pythonConditional Conditional hi def link pythonRepeat Repeat hi def link pythonOperator Operator hi def link pythonException Exception hi def link pythonInclude Include hi def link pythonAsync Statement hi def link pythonDecorator Define hi def link pythonDecoratorName Function hi def link pythonFunction Function hi def link pythonComment Comment hi def link pythonTodo Todo hi def link pythonString String hi def link pythonRawString String hi def link pythonQuotes String hi def link pythonTripleQuotes pythonQuotes hi def link pythonEscape Special if !exists("python_no_number_highlight") hi def link pythonNumber Number endif if !exists("python_no_builtin_highlight") hi def link pythonBuiltin Function endif if !exists("python_no_exception_highlight") hi def link pythonExceptions Structure endif if exists("python_space_error_highlight") hi def link pythonSpaceError Error endif if !exists("python_no_doctest_highlight") hi def link pythonDoctest Special hi def link pythonDoctestValue Define endif let b:current_syntax = "python" let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2 ts=8 noet: neovim-0.2.2/runtime/syntax/qf.vim000066400000000000000000000011241320401574200171400ustar00rootroot00000000000000" Vim syntax file " Language: Quickfix window " Maintainer: Bram Moolenaar " Last change: 2001 Jan 15 " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " A bunch of useful C keywords syn match qfFileName "^[^|]*" nextgroup=qfSeparator syn match qfSeparator "|" nextgroup=qfLineNr contained syn match qfLineNr "[^|]*" contained contains=qfError syn match qfError "error" contained " The default highlighting. hi def link qfFileName Directory hi def link qfLineNr LineNr hi def link qfError Error let b:current_syntax = "qf" " vim: ts=8 neovim-0.2.2/runtime/syntax/quake.vim000066400000000000000000000205521320401574200176460ustar00rootroot00000000000000" Vim syntax file " Language: Quake[1-3] configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2007-06-17 " quake_is_quake1 - the syntax is to be used for quake1 configs " quake_is_quake2 - the syntax is to be used for quake2 configs " quake_is_quake3 - the syntax is to be used for quake3 configs " Credits: Tomasz Kalkosinski wrote the original quake3Colors stuff if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=-,+ syn keyword quakeTodo contained TODO FIXME XXX NOTE syn region quakeComment display oneline start='//' end='$' end=';' \ keepend contains=quakeTodo,@Spell syn region quakeString display oneline start=+"+ skip=+\\\\\|\\"+ \ end=+"\|$+ contains=quakeNumbers, \ @quakeCommands,@quake3Colors syn case ignore syn match quakeNumbers display transparent '\<-\=\d\|\.\d' \ contains=quakeNumber,quakeFloat, \ quakeOctalError,quakeOctal syn match quakeNumber contained display '\d\+\>' syn match quakeFloat contained display '\d\+\.\d*' syn match quakeFloat contained display '\.\d\+\>' if exists("quake_is_quake1") || exists("quake_is_quake2") syn match quakeOctal contained display '0\o\+\>' \ contains=quakeOctalZero syn match quakeOctalZero contained display '\<0' syn match quakeOctalError contained display '0\o*[89]\d*' endif syn cluster quakeCommands contains=quakeCommand,quake1Command, \ quake12Command,Quake2Command,Quake23Command, \ Quake3Command syn keyword quakeCommand +attack +back +forward +left +lookdown +lookup syn keyword quakeCommand +mlook +movedown +moveleft +moveright +moveup syn keyword quakeCommand +right +speed +strafe -attack -back bind syn keyword quakeCommand bindlist centerview clear connect cvarlist dir syn keyword quakeCommand disconnect dumpuser echo error exec -forward syn keyword quakeCommand god heartbeat joy_advancedupdate kick kill syn keyword quakeCommand killserver -left -lookdown -lookup map syn keyword quakeCommand messagemode messagemode2 -mlook modellist syn keyword quakeCommand -movedown -moveleft -moveright -moveup play syn keyword quakeCommand quit rcon reconnect record -right say say_team syn keyword quakeCommand screenshot serverinfo serverrecord serverstop syn keyword quakeCommand set sizedown sizeup snd_restart soundinfo syn keyword quakeCommand soundlist -speed spmap status -strafe stopsound syn keyword quakeCommand toggleconsole unbind unbindall userinfo pause syn keyword quakeCommand vid_restart viewpos wait weapnext weapprev if exists("quake_is_quake1") syn keyword quake1Command sv endif if exists("quake_is_quake1") || exists("quake_is_quake2") syn keyword quake12Command +klook alias cd impulse link load save syn keyword quake12Command timerefresh changing info loading syn keyword quake12Command pingservers playerlist players score endif if exists("quake_is_quake2") syn keyword quake2Command cmd demomap +use condump download drop gamemap syn keyword quake2Command give gun_model setmaster sky sv_maplist wave syn keyword quake2Command cmdlist gameversiona gun_next gun_prev invdrop syn keyword quake2Command inven invnext invnextp invnextw invprev syn keyword quake2Command invprevp invprevw invuse menu_addressbook syn keyword quake2Command menu_credits menu_dmoptions menu_game syn keyword quake2Command menu_joinserver menu_keys menu_loadgame syn keyword quake2Command menu_main menu_multiplayer menu_options syn keyword quake2Command menu_playerconfig menu_quit menu_savegame syn keyword quake2Command menu_startserver menu_video syn keyword quake2Command notarget precache prog togglechat vid_front syn keyword quake2Command weaplast endif if exists("quake_is_quake2") || exists("quake_is_quake3") syn keyword quake23Command imagelist modellist path z_stats endif if exists("quake_is_quake3") syn keyword quake3Command +info +scores +zoom addbot arena banClient syn keyword quake3Command banUser callteamvote callvote changeVectors syn keyword quake3Command cinematic clientinfo clientkick cmd cmdlist syn keyword quake3Command condump configstrings crash cvar_restart devmap syn keyword quake3Command fdir follow freeze fs_openedList Fs_pureList syn keyword quake3Command Fs_referencedList gfxinfo globalservers syn keyword quake3Command hunk_stats in_restart -info levelshot syn keyword quake3Command loaddeferred localservers map_restart mem_info syn keyword quake3Command messagemode3 messagemode4 midiinfo model music syn keyword quake3Command modelist net_restart nextframe nextskin noclip syn keyword quake3Command notarget ping prevframe prevskin reset restart syn keyword quake3Command s_disable_a3d s_enable_a3d s_info s_list s_stop syn keyword quake3Command scanservers -scores screenshotJPEG sectorlist syn keyword quake3Command serverstatus seta setenv sets setu setviewpos syn keyword quake3Command shaderlist showip skinlist spdevmap startOribt syn keyword quake3Command stats stopdemo stoprecord systeminfo togglemenu syn keyword quake3Command tcmd team teamtask teamvote tell tell_attacker syn keyword quake3Command tell_target testgun testmodel testshader toggle syn keyword quake3Command touchFile vminfo vmprofile vmtest vosay syn keyword quake3Command vosay_team vote votell vsay vsay_team vstr syn keyword quake3Command vtaunt vtell vtell_attacker vtell_target weapon syn keyword quake3Command writeconfig -zoom syn match quake3Command display "\<[+-]button\(\d\|1[0-4]\)\>" endif if exists("quake_is_quake3") syn cluster quake3Colors contains=quake3Red,quake3Green,quake3Yellow, \ quake3Blue,quake3Cyan,quake3Purple,quake3White, \ quake3Orange,quake3Grey,quake3Black,quake3Shadow syn region quake3Red contained start=+\^1+hs=e+1 end=+[$^"\n]+he=e-1 syn region quake3Green contained start=+\^2+hs=e+1 end=+[$^"\n]+he=e-1 syn region quake3Yellow contained start=+\^3+hs=e+1 end=+[$^"\n]+he=e-1 syn region quake3Blue contained start=+\^4+hs=e+1 end=+[$^"\n]+he=e-1 syn region quake3Cyan contained start=+\^5+hs=e+1 end=+[$^"\n]+he=e-1 syn region quake3Purple contained start=+\^6+hs=e+1 end=+[$^"\n]+he=e-1 syn region quake3White contained start=+\^7+hs=e+1 end=+[$^"\n]+he=e-1 syn region quake3Orange contained start=+\^8+hs=e+1 end=+[$^\"\n]+he=e-1 syn region quake3Grey contained start=+\^9+hs=e+1 end=+[$^"\n]+he=e-1 syn region quake3Black contained start=+\^0+hs=e+1 end=+[$^"\n]+he=e-1 syn region quake3Shadow contained start=+\^[Xx]+hs=e+1 end=+[$^"\n]+he=e-1 endif hi def link quakeComment Comment hi def link quakeTodo Todo hi def link quakeString String hi def link quakeNumber Number hi def link quakeOctal Number hi def link quakeOctalZero PreProc hi def link quakeFloat Number hi def link quakeOctalError Error hi def link quakeCommand quakeCommands hi def link quake1Command quakeCommands hi def link quake12Command quakeCommands hi def link quake2Command quakeCommands hi def link quake23Command quakeCommands hi def link quake3Command quakeCommands hi def link quakeCommands Keyword if exists("quake_is_quake3") hi quake3Red ctermfg=Red guifg=Red hi quake3Green ctermfg=Green guifg=Green hi quake3Yellow ctermfg=Yellow guifg=Yellow hi quake3Blue ctermfg=Blue guifg=Blue hi quake3Cyan ctermfg=Cyan guifg=Cyan hi quake3Purple ctermfg=DarkMagenta guifg=Purple hi quake3White ctermfg=White guifg=White hi quake3Black ctermfg=Black guifg=Black hi quake3Orange ctermfg=Brown guifg=Orange hi quake3Grey ctermfg=LightGrey guifg=LightGrey hi quake3Shadow cterm=underline gui=underline endif let b:current_syntax = "quake" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/r.vim000066400000000000000000000337541320401574200170110ustar00rootroot00000000000000" Vim syntax file " Language: R (GNU S) " Maintainer: Jakson Aquino " Former Maintainers: Vaidotas Zemlys " Tom Payne " Contributor: Johannes Ranke " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Sat Apr 08, 2017 07:01PM " Filenames: *.R *.r *.Rhistory *.Rt " " NOTE: The highlighting of R functions might be defined in " runtime files created by a filetype plugin, if installed. " " CONFIGURATION: " Syntax folding can be turned on by " " let r_syntax_folding = 1 " " ROxygen highlighting can be turned off by " " let r_syntax_hl_roxygen = 0 " " Some lines of code were borrowed from Zhuojun Chen. if exists("b:current_syntax") finish endif if has("patch-7.4.1142") syn iskeyword @,48-57,_,. else setlocal iskeyword=@,48-57,_,. endif " The variables g:r_hl_roxygen and g:r_syn_minlines were renamed on April 8, 2017. if exists("g:r_hl_roxygen") let g:r_syntax_hl_roxygen = g:r_hl_roxygen endif if exists("g:r_syn_minlines") let g:r_syntax_minlines = g:r_syn_minlines endif if exists("g:r_syntax_folding") && g:r_syntax_folding setlocal foldmethod=syntax endif if !exists("g:r_syntax_hl_roxygen") let g:r_syntax_hl_roxygen = 1 endif syn case match " Comment syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):" syn match rComment contains=@Spell,rCommentTodo,rOBlock "#.*" " Roxygen if g:r_syntax_hl_roxygen " A roxygen block can start at the beginning of a file (first version) and " after a blank line (second version). It ends when a line that does not " contain a roxygen comment. In the following comments, any line containing " a roxygen comment marker (one or two hash signs # followed by a single " quote ' and preceded only by whitespace) is called a roxygen line. A " roxygen line containing only a roxygen comment marker, optionally followed " by whitespace is called an empty roxygen line. " First we match all roxygen blocks as containing only a title. In case an " empty roxygen line ending the title or a tag is found, this will be " overriden later by the definitions of rOBlock. syn match rOTitleBlock "\%^\(\s*#\{1,2}' .*\n\)\{1,}" contains=rOCommentKey,rOTitleTag syn match rOTitleBlock "^\s*\n\(\s*#\{1,2}' .*\n\)\{1,}" contains=rOCommentKey,rOTitleTag " When a roxygen block has a title and additional content, the title " consists of one or more roxygen lines (as little as possible are matched), " followed either by an empty roxygen line syn region rOBlock start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold syn region rOBlock start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold " or by a roxygen tag (we match everything starting with @ but not @@ which is used as escape sequence for a literal @). syn region rOBlock start="\%^\(\s*#\{1,2}' .*\n\)\{-}\s*#\{1,2}' @\(@\)\@!" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold syn region rOBlock start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-}\s*#\{1,2}' @\(@\)\@!" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold " If a block contains an @rdname, @describeIn tag, it may have paragraph breaks, but does not have a title syn region rOBlockNoTitle start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @rdname" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold syn region rOBlockNoTitle start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @rdname" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold syn region rOBlockNoTitle start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @describeIn" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold syn region rOBlockNoTitle start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @describeIn" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold " A title as part of a block is always at the beginning of the block, i.e. " either at the start of a file or after a completely empty line. syn match rOTitle "\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" contained contains=rOCommentKey,rOTitleTag syn match rOTitle "^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" contained contains=rOCommentKey,rOTitleTag syn match rOTitleTag contained "@title" syn match rOCommentKey "#\{1,2}'" contained syn region rOExamples start="^#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOTag fold " rOTag list generated from the lists in " https://github.com/klutometis/roxygen/R/rd.R and " https://github.com/klutometis/roxygen/R/namespace.R " using s/^ \([A-Za-z0-9]*\) = .*/ syn match rOTag contained "@\1"/ " Plus we need the @include tag " rd.R syn match rOTag contained "@aliases" syn match rOTag contained "@author" syn match rOTag contained "@backref" syn match rOTag contained "@concept" syn match rOTag contained "@describeIn" syn match rOTag contained "@description" syn match rOTag contained "@details" syn match rOTag contained "@docType" syn match rOTag contained "@encoding" syn match rOTag contained "@evalRd" syn match rOTag contained "@example" syn match rOTag contained "@examples" syn match rOTag contained "@family" syn match rOTag contained "@field" syn match rOTag contained "@format" syn match rOTag contained "@inherit" syn match rOTag contained "@inheritParams" syn match rOTag contained "@inheritDotParams" syn match rOTag contained "@inheritSection" syn match rOTag contained "@keywords" syn match rOTag contained "@method" syn match rOTag contained "@name" syn match rOTag contained "@md" syn match rOTag contained "@noMd" syn match rOTag contained "@noRd" syn match rOTag contained "@note" syn match rOTag contained "@param" syn match rOTag contained "@rdname" syn match rOTag contained "@rawRd" syn match rOTag contained "@references" syn match rOTag contained "@return" syn match rOTag contained "@section" syn match rOTag contained "@seealso" syn match rOTag contained "@slot" syn match rOTag contained "@source" syn match rOTag contained "@template" syn match rOTag contained "@templateVar" syn match rOTag contained "@title" syn match rOTag contained "@usage" " namespace.R syn match rOTag contained "@export" syn match rOTag contained "@exportClass" syn match rOTag contained "@exportMethod" syn match rOTag contained "@exportPattern" syn match rOTag contained "@import" syn match rOTag contained "@importClassesFrom" syn match rOTag contained "@importFrom" syn match rOTag contained "@importMethodsFrom" syn match rOTag contained "@rawNamespace" syn match rOTag contained "@S3method" syn match rOTag contained "@useDynLib" " other syn match rOTag contained "@include" endif if &filetype == "rhelp" " string enclosed in double quotes syn region rString contains=rSpecial,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/ " string enclosed in single quotes syn region rString contains=rSpecial,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/ else " string enclosed in double quotes syn region rString contains=rSpecial,rStrError,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/ " string enclosed in single quotes syn region rString contains=rSpecial,rStrError,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/ endif syn match rStrError display contained "\\." " New line, carriage return, tab, backspace, bell, feed, vertical tab, backslash syn match rSpecial display contained "\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\" " Hexadecimal and Octal digits syn match rSpecial display contained "\\\(x\x\{1,2}\|[0-8]\{1,3}\)" " Unicode characters syn match rSpecial display contained "\\u\x\{1,4}" syn match rSpecial display contained "\\U\x\{1,8}" syn match rSpecial display contained "\\u{\x\{1,4}}" syn match rSpecial display contained "\\U{\x\{1,8}}" " Statement syn keyword rStatement break next return syn keyword rConditional if else syn keyword rRepeat for in repeat while " Constant (not really) syn keyword rConstant T F LETTERS letters month.abb month.name pi syn keyword rConstant R.version.string syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_ " Constants syn keyword rConstant NULL syn keyword rBoolean FALSE TRUE syn keyword rNumber NA Inf NaN " integer syn match rInteger "\<\d\+L" syn match rInteger "\<0x\([0-9]\|[a-f]\|[A-F]\)\+L" syn match rInteger "\<\d\+[Ee]+\=\d\+L" " number with no fractional part or exponent syn match rNumber "\<\d\+\>" " hexadecimal number syn match rNumber "\<0x\([0-9]\|[a-f]\|[A-F]\)\+" " floating point number with integer and fractional parts and optional exponent syn match rFloat "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=" " floating point number with no integer part and optional exponent syn match rFloat "\<\.\d\+\([Ee][-+]\=\d\+\)\=" " floating point number with no fractional part and optional exponent syn match rFloat "\<\d\+[Ee][-+]\=\d\+" " complex number syn match rComplex "\<\d\+i" syn match rComplex "\<\d\++\d\+i" syn match rComplex "\<0x\([0-9]\|[a-f]\|[A-F]\)\+i" syn match rComplex "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=i" syn match rComplex "\<\.\d\+\([Ee][-+]\=\d\+\)\=i" syn match rComplex "\<\d\+[Ee][-+]\=\d\+i" syn match rAssign '=' syn match rOperator "&" syn match rOperator '-' syn match rOperator '\*' syn match rOperator '+' if &filetype != "rmd" && &filetype != "rrst" syn match rOperator "[|!<>^~/:]" else syn match rOperator "[|!<>^~`/:]" endif syn match rOperator "%\{2}\|%\S\{-}%" syn match rOperator '\([!><]\)\@<==' syn match rOperator '==' syn match rOpError '\*\{3}' syn match rOpError '//' syn match rOpError '&&&' syn match rOpError '|||' syn match rOpError '<<' syn match rOpError '>>' syn match rAssign "<\{1,2}-" syn match rAssign "->\{1,2}" " Special syn match rDelimiter "[,;:]" " Error if exists("g:r_syntax_folding") syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError fold syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError fold syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError fold else syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError endif syn match rError "[)\]}]" syn match rBraceError "[)}]" contained syn match rCurlyError "[)\]]" contained syn match rParenError "[\]}]" contained " Use Nvim-R to highlight functions dynamically if it is installed if !exists("g:r_syntax_fun_pattern") let s:ff = split(substitute(globpath(&rtp, "R/functions.vim"), "functions.vim", "", "g"), "\n") if len(s:ff) > 0 let g:r_syntax_fun_pattern = 0 else let g:r_syntax_fun_pattern = 1 endif endif " Only use Nvim-R to highlight functions if they should not be highlighted " according to a generic pattern if g:r_syntax_fun_pattern == 1 syn match rFunction '[0-9a-zA-Z_\.]\+\s*\ze(' else if !exists("g:R_hi_fun") let g:R_hi_fun = 1 endif if g:R_hi_fun " Nvim-R: runtime R/functions.vim endif endif syn match rDollar display contained "\$" syn match rDollar display contained "@" " List elements will not be highlighted as functions: syn match rLstElmt "\$[a-zA-Z0-9\\._]*" contains=rDollar syn match rLstElmt "@[a-zA-Z0-9\\._]*" contains=rDollar " Functions that may add new objects syn keyword rPreProc library require attach detach source if &filetype == "rhelp" syn match rHelpIdent '\\method' syn match rHelpIdent '\\S4method' endif " Type syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame " Name of object with spaces if &filetype != "rmd" && &filetype != "rrst" syn region rNameWSpace start="`" end="`" endif if &filetype == "rhelp" syn match rhPreProc "^#ifdef.*" syn match rhPreProc "^#endif.*" syn match rhSection "\\dontrun\>" endif if exists("r_syntax_minlines") exe "syn sync minlines=" . r_syntax_minlines else syn sync minlines=40 endif " Define the default highlighting. hi def link rAssign Statement hi def link rBoolean Boolean hi def link rBraceError Error hi def link rComment Comment hi def link rCommentTodo Todo hi def link rComplex Number hi def link rConditional Conditional hi def link rConstant Constant hi def link rCurlyError Error hi def link rDelimiter Delimiter hi def link rDollar SpecialChar hi def link rError Error hi def link rFloat Float hi def link rFunction Function hi def link rHelpIdent Identifier hi def link rhPreProc PreProc hi def link rhSection PreCondit hi def link rInteger Number hi def link rLstElmt Normal hi def link rNameWSpace Normal hi def link rNumber Number hi def link rOperator Operator hi def link rOpError Error hi def link rParenError Error hi def link rPreProc PreProc hi def link rRepeat Repeat hi def link rSpecial SpecialChar hi def link rStatement Statement hi def link rString String hi def link rStrError Error hi def link rType Type if g:r_syntax_hl_roxygen hi def link rOTitleTag Operator hi def link rOTag Operator hi def link rOTitleBlock Title hi def link rOBlock Comment hi def link rOBlockNoTitle Comment hi def link rOTitle Title hi def link rOCommentKey Comment hi def link rOExamples SpecialComment endif let b:current_syntax="r" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/racc.vim000066400000000000000000000127631320401574200174550ustar00rootroot00000000000000" Vim default file " Language: Racc input file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2008-06-22 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword raccTodo contained TODO FIXME XXX NOTE syn region raccComment start='/\*' end='\*/' \ contains=raccTodo,@Spell syn region raccComment display oneline start='#' end='$' \ contains=raccTodo,@Spell syn region raccClass transparent matchgroup=raccKeyword \ start='\' end='\'he=e-4 \ contains=raccComment,raccPrecedence, \ raccTokenDecl,raccExpect,raccOptions,raccConvert, \ raccStart, syn region raccPrecedence transparent matchgroup=raccKeyword \ start='\' end='\' \ contains=raccComment,raccPrecSpec syn keyword raccPrecSpec contained nonassoc left right \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn match raccPrecToken contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn region raccPrecString matchgroup=raccPrecString start=+"+ \ skip=+\\\\\|\\"+ end=+"+ \ contains=raccSpecial \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn region raccPrecString matchgroup=raccPrecString start=+'+ \ skip=+\\\\\|\\'+ end=+'+ contains=raccSpecial \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn keyword raccTokenDecl contained token \ nextgroup=raccTokenR skipwhite skipnl syn match raccTokenR contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccTokenR skipwhite skipnl syn keyword raccExpect contained expect \ nextgroup=raccNumber skipwhite skipnl syn match raccNumber contained '\<\d\+\>' syn keyword raccOptions contained options \ nextgroup=raccOptionsR skipwhite skipnl syn keyword raccOptionsR contained omit_action_call result_var \ nextgroup=raccOptionsR skipwhite skipnl syn region raccConvert transparent contained matchgroup=raccKeyword \ start='\' end='\' \ contains=raccComment,raccConvToken skipwhite \ skipnl syn match raccConvToken contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccString skipwhite skipnl syn keyword raccStart contained start \ nextgroup=raccTargetS skipwhite skipnl syn match raccTargetS contained '\<\l[a-z0-9_]*\>' syn match raccSpecial contained '\\["'\\]' syn region raccString start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=raccSpecial syn region raccString start=+'+ skip=+\\\\\|\\'+ end=+'+ \ contains=raccSpecial syn region raccRules transparent matchgroup=raccKeyword start='\' \ end='\' contains=raccComment,raccString, \ raccNumber,raccToken,raccTarget,raccDelimiter, \ raccAction syn match raccTarget contained '\<\l[a-z0-9_]*\>' syn match raccDelimiter contained '[:|]' syn match raccToken contained '\<\u[A-Z0-9_]*\>' syn include @raccRuby syntax/ruby.vim syn region raccAction transparent matchgroup=raccDelimiter \ start='{' end='}' contains=@raccRuby syn region raccHeader transparent matchgroup=raccPreProc \ start='^---- header.*' end='^----'he=e-4 \ contains=@raccRuby syn region raccInner transparent matchgroup=raccPreProc \ start='^---- inner.*' end='^----'he=e-4 \ contains=@raccRuby syn region raccFooter transparent matchgroup=raccPreProc \ start='^---- footer.*' end='^----'he=e-4 \ contains=@raccRuby syn sync match raccSyncHeader grouphere raccHeader '^---- header' syn sync match raccSyncInner grouphere raccInner '^---- inner' syn sync match raccSyncFooter grouphere raccFooter '^---- footer' hi def link raccTodo Todo hi def link raccComment Comment hi def link raccPrecSpec Type hi def link raccPrecToken raccToken hi def link raccPrecString raccString hi def link raccTokenDecl Keyword hi def link raccToken Identifier hi def link raccTokenR raccToken hi def link raccExpect Keyword hi def link raccNumber Number hi def link raccOptions Keyword hi def link raccOptionsR Identifier hi def link raccConvToken raccToken hi def link raccStart Keyword hi def link raccTargetS Type hi def link raccSpecial special hi def link raccString String hi def link raccTarget Type hi def link raccDelimiter Delimiter hi def link raccPreProc PreProc hi def link raccKeyword Keyword let b:current_syntax = "racc" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/radiance.vim000066400000000000000000000157631320401574200203160ustar00rootroot00000000000000" Vim syntax file " Language: Radiance Scene Description " Maintainer: Georg Mischler " Last change: 26. April. 2001 " Radiance is a lighting simulation software package written " by Gregory Ward-Larson ("the computer artist formerly known " as Greg Ward"), then at LBNL. " " http://radsite.lbl.gov/radiance/HOME.html " " Of course, there is also information available about it " from http://www.schorsch.com/ " We take a minimalist approach here, highlighting just the " essential properties of each object, its type and ID, as well as " comments, external command names and the null-modifier "void". " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " all printing characters except '#' and '!' are valid in names. setlocal iskeyword=\",$-~ " The null-modifier syn keyword radianceKeyword void " The different kinds of scene description object types " Reference types syn keyword radianceExtraType contained alias instance " Surface types syn keyword radianceSurfType contained ring polygon sphere bubble syn keyword radianceSurfType contained cone cup cylinder tube source " Emitting material types syn keyword radianceLightType contained light glow illum spotlight " Material types syn keyword radianceMatType contained mirror mist prism1 prism2 syn keyword radianceMatType contained metal plastic trans syn keyword radianceMatType contained metal2 plastic2 trans2 syn keyword radianceMatType contained metfunc plasfunc transfunc syn keyword radianceMatType contained metdata plasdata transdata syn keyword radianceMatType contained dielectric interface glass syn keyword radianceMatType contained BRTDfunc antimatter " Pattern modifier types syn keyword radiancePatType contained colorfunc brightfunc syn keyword radiancePatType contained colordata colorpict brightdata syn keyword radiancePatType contained colortext brighttext " Texture modifier types syn keyword radianceTexType contained texfunc texdata " Mixture types syn keyword radianceMixType contained mixfunc mixdata mixpict mixtext " Each type name is followed by an ID. " This doesn't work correctly if the id is one of the type names of the " same class (which is legal for radiance), in which case the id will get " type color as well, and the int count (or alias reference) gets id color. syn region radianceID start="\" end="\<\k*\>" contains=radianceExtraType syn region radianceID start="\" end="\<\k*\>" contains=radianceExtraType syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType syn region radianceID start="\" end="\<\k*\>" contains=radianceSurfType syn region radianceID start="\" end="\<\k*\>" contains=radianceLightType syn region radianceID start="\" end="\<\k*\>" contains=radianceLightType syn region radianceID start="\" end="\<\k*\>" contains=radianceLightType syn region radianceID start="\" end="\<\k*\>" contains=radianceLightType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radianceMatType syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType syn region radianceID start="\" end="\<\k*\>" contains=radiancePatType syn region radianceID start="\" end="\<\k*\>" contains=radianceTexType syn region radianceID start="\" end="\<\k*\>" contains=radianceTexType syn region radianceID start="\" end="\<\k*\>" contains=radianceMixType syn region radianceID start="\" end="\<\k*\>" contains=radianceMixType syn region radianceID start="\" end="\<\k*\>" contains=radianceMixType " external commands (generators, xform et al.) syn match radianceCommand "^\s*!\s*[^\s]\+\>" " The usual suspects syn keyword radianceTodo contained TODO XXX syn match radianceComment "#.*$" contains=radianceTodo " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link radianceKeyword Keyword hi def link radianceExtraType Type hi def link radianceSurfType Type hi def link radianceLightType Type hi def link radianceMatType Type hi def link radiancePatType Type hi def link radianceTexType Type hi def link radianceMixType Type hi def link radianceComment Comment hi def link radianceCommand Function hi def link radianceID String hi def link radianceTodo Todo let b:current_syntax = "radiance" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/ratpoison.vim000066400000000000000000000415051320401574200205570ustar00rootroot00000000000000" Vim syntax file " Language: Ratpoison configuration/commands file ( /etc/ratpoisonrc ~/.ratpoisonrc ) " Maintainer: Magnus Woldrich " URL: http://github.com/trapd00r/vim-syntax-ratpoison " Last Change: 2011 Apr 11 " Previous Maintainer: Doug Kearns " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match ratpoisonComment "^\s*#.*$" contains=ratpoisonTodo syn keyword ratpoisonTodo TODO NOTE FIXME XXX contained syn case ignore syn keyword ratpoisonBooleanArg on off contained syn case match syn keyword ratpoisonCommandArg abort addhook alias banish chdir contained syn keyword ratpoisonCommandArg clrunmanaged cnext colon compat cother contained syn keyword ratpoisonCommandArg cprev curframe dedicate definekey delete contained syn keyword ratpoisonCommandArg delkmap describekey echo escape exec contained syn keyword ratpoisonCommandArg fdump focus focusdown focuslast focusleft contained syn keyword ratpoisonCommandArg focusprev focusright focusup frestore fselect contained syn keyword ratpoisonCommandArg gdelete getenv getsel gmerge gmove contained syn keyword ratpoisonCommandArg gnew gnewbg gnext gprev gravity contained syn keyword ratpoisonCommandArg groups gselect help hsplit inext contained syn keyword ratpoisonCommandArg info iother iprev kill lastmsg contained syn keyword ratpoisonCommandArg license link listhook meta msgwait contained syn keyword ratpoisonCommandArg newkmap newwm next nextscreen number contained syn keyword ratpoisonCommandArg only other prev prevscreen prompt contained syn keyword ratpoisonCommandArg putsel quit ratclick rathold ratrelwarp contained syn keyword ratpoisonCommandArg ratwarp readkey redisplay redo remhook contained syn keyword ratpoisonCommandArg remove resize restart rudeness sdump contained syn keyword ratpoisonCommandArg select set setenv sfdump shrink contained syn keyword ratpoisonCommandArg source sselect startup_message time title contained syn keyword ratpoisonCommandArg tmpwm unalias undefinekey undo unmanage contained syn keyword ratpoisonCommandArg unsetenv verbexec version vsplit warp contained syn keyword ratpoisonCommandArg windows contained syn match ratpoisonGravityArg "\<\(n\|north\)\>" contained syn match ratpoisonGravityArg "\<\(nw\|northwest\)\>" contained syn match ratpoisonGravityArg "\<\(ne\|northeast\)\>" contained syn match ratpoisonGravityArg "\<\(w\|west\)\>" contained syn match ratpoisonGravityArg "\<\(c\|center\)\>" contained syn match ratpoisonGravityArg "\<\(e\|east\)\>" contained syn match ratpoisonGravityArg "\<\(s\|south\)\>" contained syn match ratpoisonGravityArg "\<\(sw\|southwest\)\>" contained syn match ratpoisonGravityArg "\<\(se\|southeast\)\>" contained syn case match syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(F[1-9][0-9]\=\|\(\a\|\d\)\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(space\|exclam\|quotedbl\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(numbersign\|dollar\|percent\|ampersand\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(apostrophe\|quoteright\|parenleft\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(parenright\|asterisk\|plus\|comma\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(minus\|period\|slash\|colon\|semicolon\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(less\|equal\|greater\|question\|at\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(bracketleft\|backslash\|bracketright\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(asciicircum\|underscore\|grave\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(quoteleft\|braceleft\|bar\|braceright\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(asciitilde\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(BackSpace\|Tab\|Linefeed\|Clear\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Return\|Pause\|Scroll_Lock\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Sys_Req\|Escape\|Delete\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Home\|Left\|Up\|Right\|Down\|Prior\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Page_Up\|Next\|Page_Down\|End\|Begin\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Select\|Print\|Execute\|Insert\|Undo\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Redo\|Menu\|Find\|Cancel\|Help\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Break\|Mode_switch\|script_switch\|Num_Lock\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Space\|Tab\|Enter\|F[1234]\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Home\|Left\|Up\|Right\|Down\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Prior\|Page_Up\|Next\|Page_Down\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(End\|Begin\|Insert\|Delete\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Equal\|Multiply\|Add\|Separator\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Subtract\|Decimal\|Divide\|\d\)\>" contained nextgroup=ratpoisonCommandArg skipwhite syn match ratpoisonHookArg "\<\(key\|switchwin\|switchframe\|switchgroup\|quit\|restart\)\>" contained syn match ratpoisonNumberArg "\<\d\+\>" contained nextgroup=ratpoisonNumberArg skipwhite syn keyword ratpoisonSetArg barborder contained nextgroup=ratpoisonNumberArg syn keyword ratpoisonSetArg bargravity contained nextgroup=ratpoisonGravityArg syn keyword ratpoisonSetArg barpadding contained nextgroup=ratpoisonNumberArg syn keyword ratpoisonSetArg bgcolor syn keyword ratpoisonSetArg border contained nextgroup=ratpoisonNumberArg syn keyword ratpoisonSetArg fgcolor syn keyword ratpoisonSetArg fwcolor syn keyword ratpoisonSetArg bwcolor syn keyword ratpoisonSetArg historysize syn keyword ratpoisonSetArg historycompaction syn keyword ratpoisonSetArg historyexpansion syn keyword ratpoisonSetArg topkmap syn keyword ratpoisonSetArg barinpadding syn keyword ratpoisonSetArg font syn keyword ratpoisonSetArg framesels syn keyword ratpoisonSetArg inputwidth contained nextgroup=ratpoisonNumberArg syn keyword ratpoisonSetArg maxsizegravity contained nextgroup=ratpoisonGravityArg syn keyword ratpoisonSetArg padding contained nextgroup=ratpoisonNumberArg syn keyword ratpoisonSetArg resizeunit contained nextgroup=ratpoisonNumberArg syn keyword ratpoisonSetArg transgravity contained nextgroup=ratpoisonGravityArg syn keyword ratpoisonSetArg waitcursor contained nextgroup=ratpoisonNumberArg syn keyword ratpoisonSetArg winfmt contained nextgroup=ratpoisonWinFmtArg syn keyword ratpoisonSetArg wingravity contained nextgroup=ratpoisonGravityArg syn keyword ratpoisonSetArg winliststyle contained nextgroup=ratpoisonWinListArg syn keyword ratpoisonSetArg winname contained nextgroup=ratpoisonWinNameArg syn match ratpoisonWinFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite syn match ratpoisonWinListArg "\<\(row\|column\)\>" contained syn match ratpoisonWinNameArg "\<\(name\|title\|class\)\>" contained syn match ratpoisonDefCommand "^\s*set\s*" nextgroup=ratpoisonSetArg syn match ratpoisonDefCommand "^\s*defbarborder\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonDefCommand "^\s*defbargravity\s*" nextgroup=ratpoisonGravityArg syn match ratpoisonDefCommand "^\s*defbarpadding\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonDefCommand "^\s*defbgcolor\s*" syn match ratpoisonDefCommand "^\s*defborder\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonDefCommand "^\s*deffgcolor\s*" syn match ratpoisonDefCommand "^\s*deffont\s*" syn match ratpoisonDefCommand "^\s*defframesels\s*" syn match ratpoisonDefCommand "^\s*definputwidth\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonDefCommand "^\s*defmaxsizegravity\s*" nextgroup=ratpoisonGravityArg syn match ratpoisonDefCommand "^\s*defpadding\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonDefCommand "^\s*defresizeunit\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonDefCommand "^\s*deftransgravity\s*" nextgroup=ratpoisonGravityArg syn match ratpoisonDefCommand "^\s*defwaitcursor\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonDefCommand "^\s*defwinfmt\s*" nextgroup=ratpoisonWinFmtArg syn match ratpoisonDefCommand "^\s*defwingravity\s*" nextgroup=ratpoisonGravityArg syn match ratpoisonDefCommand "^\s*defwinliststyle\s*" nextgroup=ratpoisonWinListArg syn match ratpoisonDefCommand "^\s*defwinname\s*" nextgroup=ratpoisonWinNameArg syn match ratpoisonDefCommand "^\s*msgwait\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonStringCommand "^\s*\zsaddhook\ze\s*" nextgroup=ratpoisonHookArg syn match ratpoisonStringCommand "^\s*\zsalias\ze\s*" syn match ratpoisonStringCommand "^\s*\zsbind\ze\s*" nextgroup=ratpoisonKeySeqArg syn match ratpoisonStringCommand "^\s*\zschdir\ze\s*" syn match ratpoisonStringCommand "^\s*\zscolon\ze\s*" nextgroup=ratpoisonCommandArg syn match ratpoisonStringCommand "^\s*\zsdedicate\ze\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonStringCommand "^\s*\zsdefinekey\ze\s*" syn match ratpoisonStringCommand "^\s*\zsdelkmap\ze\s*" syn match ratpoisonStringCommand "^\s*\zsdescribekey\ze\s*" syn match ratpoisonStringCommand "^\s*\zsecho\ze\s*" syn match ratpoisonStringCommand "^\s*\zsescape\ze\s*" nextgroup=ratpoisonKeySeqArg syn match ratpoisonStringCommand "^\s*\zsexec\ze\s*" syn match ratpoisonStringCommand "^\s*\zsfdump\ze\s*" syn match ratpoisonStringCommand "^\s*\zsfrestore\ze\s*" syn match ratpoisonStringCommand "^\s*\zsgdelete\ze\s*" syn match ratpoisonStringCommand "^\s*\zsgetenv\ze\s*" syn match ratpoisonStringCommand "^\s*\zsgravity\ze\s*" nextgroup=ratpoisonGravityArg syn match ratpoisonStringCommand "^\s*\zsgselect\ze\s*" syn match ratpoisonStringCommand "^\s*\zslink\ze\s*" nextgroup=ratpoisonKeySeqArg syn match ratpoisonStringCommand "^\s*\zslisthook\ze\s*" nextgroup=ratpoisonHookArg syn match ratpoisonStringCommand "^\s*\zsnewkmap\ze\s*" syn match ratpoisonStringCommand "^\s*\zsnewwm\ze\s*" syn match ratpoisonStringCommand "^\s*\zsnumber\ze\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonStringCommand "^\s*\zsprompt\ze\s*" syn match ratpoisonStringCommand "^\s*\zsratwarp\ze\s*" syn match ratpoisonStringCommand "^\s*\zsratrelwarp\ze\s*" syn match ratpoisonStringCommand "^\s*\zsratclick\ze\s*" syn match ratpoisonStringCommand "^\s*\zsrathold\ze\s*" syn match ratpoisonStringCommand "^\s*\zsreadkey\ze\s*" syn match ratpoisonStringCommand "^\s*\zsremhook\ze\s*" nextgroup=ratpoisonHookArg syn match ratpoisonStringCommand "^\s*\zsresize\ze\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonStringCommand "^\s*\zsrudeness\ze\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonStringCommand "^\s*\zsselect\ze\s*" nextgroup=ratpoisonNumberArg syn match ratpoisonStringCommand "^\s*\zssetenv\ze\s*" syn match ratpoisonStringCommand "^\s*\zssource\ze\s*" syn match ratpoisonStringCommand "^\s*\zssselect\ze\s*" syn match ratpoisonStringCommand "^\s*\zsstartup_message\ze\s*" nextgroup=ratpoisonBooleanArg syn match ratpoisonStringCommand "^\s*\zstitle\ze\s*" syn match ratpoisonStringCommand "^\s*\zstmpwm\ze\s*" syn match ratpoisonStringCommand "^\s*\zsunalias\ze\s*" syn match ratpoisonStringCommand "^\s*\zsunbind\ze\s*" nextgroup=ratpoisonKeySeqArg syn match ratpoisonStringCommand "^\s*\zsundefinekey\ze\s*" syn match ratpoisonStringCommand "^\s*\zsunmanage\ze\s*" syn match ratpoisonStringCommand "^\s*\zsunsetenv\ze\s*" syn match ratpoisonStringCommand "^\s*\zsverbexec\ze\s*" syn match ratpoisonStringCommand "^\s*\zswarp\ze\s*" nextgroup=ratpoisonBooleanArg syn match ratpoisonVoidCommand "^\s*\zsabort\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsbanish\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsclrunmanaged\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zscnext\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zscompat\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zscother\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zscprev\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zscurframe\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsdelete\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsfocusdown\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsfocuslast\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsfocusleft\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsfocusprev\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsfocusright\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsfocusup\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsfocus\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsfselect\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsgetsel\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsgmerge\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsgmove\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsgnewbg\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsgnew\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsgnext\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsgprev\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsgroups\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zshelp\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zshsplit\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsinext\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsinfo\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsiother\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsiprev\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zskill\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zslastmsg\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zslicense\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsmeta\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsnextscreen\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsnext\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsonly\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsother\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsprevscreen\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsprev\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsputsel\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsquit\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsredisplay\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsredo\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsremove\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsrestart\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zssdump\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zssfdump\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsshrink\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zssplit\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zstime\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsundo\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsversion\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zsvsplit\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zswindows\ze\s*$" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link ratpoisonBooleanArg Boolean hi def link ratpoisonCommandArg Keyword hi def link ratpoisonComment Comment hi def link ratpoisonDefCommand Identifier hi def link ratpoisonGravityArg Constant hi def link ratpoisonKeySeqArg Special hi def link ratpoisonNumberArg Number hi def link ratpoisonSetArg Keyword hi def link ratpoisonStringCommand Identifier hi def link ratpoisonTodo Todo hi def link ratpoisonVoidCommand Identifier hi def link ratpoisonWinFmtArg Special hi def link ratpoisonWinNameArg Constant hi def link ratpoisonWinListArg Constant let b:current_syntax = "ratpoison" " vim: ts=8 neovim-0.2.2/runtime/syntax/rc.vim000066400000000000000000000237511320401574200171500ustar00rootroot00000000000000" Vim syntax file " Language: M$ Resource files (*.rc) " Maintainer: Christian Brabandt " Last Change: 2015-05-29 " Repository: https://github.com/chrisbra/vim-rc-syntax " License: Vim (see :h license) " Previous Maintainer: Heiko Erhardt " This file is based on the c.vim " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Common RC keywords syn keyword rcLanguage LANGUAGE syn keyword rcMainObject TEXTINCLUDE VERSIONINFO BITMAP ICON CURSOR CURSOR syn keyword rcMainObject MENU ACCELERATORS TOOLBAR DIALOG syn keyword rcMainObject STRINGTABLE MESSAGETABLE RCDATA DLGINIT DESIGNINFO syn keyword rcSubObject POPUP MENUITEM SEPARATOR syn keyword rcSubObject CONTROL LTEXT CTEXT RTEXT EDITTEXT syn keyword rcSubObject BUTTON PUSHBUTTON DEFPUSHBUTTON GROUPBOX LISTBOX COMBOBOX syn keyword rcSubObject FILEVERSION PRODUCTVERSION FILEFLAGSMASK FILEFLAGS FILEOS syn keyword rcSubObject FILETYPE FILESUBTYPE syn keyword rcCaptionParam CAPTION syn keyword rcParam CHARACTERISTICS CLASS STYLE EXSTYLE VERSION FONT syn keyword rcStatement BEGIN END BLOCK VALUE syn keyword rcCommonAttribute PRELOAD LOADONCALL FIXED MOVEABLE DISCARDABLE PURE IMPURE syn keyword rcAttribute WS_OVERLAPPED WS_POPUP WS_CHILD WS_MINIMIZE WS_VISIBLE WS_DISABLED WS_CLIPSIBLINGS syn keyword rcAttribute WS_CLIPCHILDREN WS_MAXIMIZE WS_CAPTION WS_BORDER WS_DLGFRAME WS_VSCROLL WS_HSCROLL syn keyword rcAttribute WS_SYSMENU WS_THICKFRAME WS_GROUP WS_TABSTOP WS_MINIMIZEBOX WS_MAXIMIZEBOX WS_TILED syn keyword rcAttribute WS_ICONIC WS_SIZEBOX WS_TILEDWINDOW WS_OVERLAPPEDWINDOW WS_POPUPWINDOW WS_CHILDWINDOW syn keyword rcAttribute WS_EX_DLGMODALFRAME WS_EX_NOPARENTNOTIFY WS_EX_TOPMOST WS_EX_ACCEPTFILES syn keyword rcAttribute WS_EX_TRANSPARENT WS_EX_MDICHILD WS_EX_TOOLWINDOW WS_EX_WINDOWEDGE WS_EX_CLIENTEDGE syn keyword rcAttribute WS_EX_CONTEXTHELP WS_EX_RIGHT WS_EX_LEFT WS_EX_RTLREADING WS_EX_LTRREADING syn keyword rcAttribute WS_EX_LEFTSCROLLBAR WS_EX_RIGHTSCROLLBAR WS_EX_CONTROLPARENT WS_EX_STATICEDGE syn keyword rcAttribute WS_EX_APPWINDOW WS_EX_OVERLAPPEDWINDOW WS_EX_PALETTEWINDOW syn keyword rcAttribute ES_LEFT ES_CENTER ES_RIGHT ES_MULTILINE ES_UPPERCASE ES_LOWERCASE ES_PASSWORD syn keyword rcAttribute ES_AUTOVSCROLL ES_AUTOHSCROLL ES_NOHIDESEL ES_OEMCONVERT ES_READONLY ES_WANTRETURN syn keyword rcAttribute ES_NUMBER syn keyword rcAttribute BS_PUSHBUTTON BS_DEFPUSHBUTTON BS_CHECKBOX BS_AUTOCHECKBOX BS_RADIOBUTTON BS_3STATE syn keyword rcAttribute BS_AUTO3STATE BS_GROUPBOX BS_USERBUTTON BS_AUTORADIOBUTTON BS_OWNERDRAW BS_LEFTTEXT syn keyword rcAttribute BS_TEXT BS_ICON BS_BITMAP BS_LEFT BS_RIGHT BS_CENTER BS_TOP BS_BOTTOM BS_VCENTER syn keyword rcAttribute BS_PUSHLIKE BS_MULTILINE BS_NOTIFY BS_FLAT BS_RIGHTBUTTON syn keyword rcAttribute SS_LEFT SS_CENTER SS_RIGHT SS_ICON SS_BLACKRECT SS_GRAYRECT SS_WHITERECT syn keyword rcAttribute SS_BLACKFRAME SS_GRAYFRAME SS_WHITEFRAME SS_USERITEM SS_SIMPLE SS_LEFTNOWORDWRAP syn keyword rcAttribute SS_OWNERDRAW SS_BITMAP SS_ENHMETAFILE SS_ETCHEDHORZ SS_ETCHEDVERT SS_ETCHEDFRAME syn keyword rcAttribute SS_TYPEMASK SS_NOPREFIX SS_NOTIFY SS_CENTERIMAGE SS_RIGHTJUST SS_REALSIZEIMAGE syn keyword rcAttribute SS_SUNKEN SS_ENDELLIPSIS SS_PATHELLIPSIS SS_WORDELLIPSIS SS_ELLIPSISMASK syn keyword rcAttribute DS_ABSALIGN DS_SYSMODAL DS_LOCALEDIT DS_SETFONT DS_MODALFRAME DS_NOIDLEMSG syn keyword rcAttribute DS_SETFOREGROUND DS_3DLOOK DS_FIXEDSYS DS_NOFAILCREATE DS_CONTROL DS_CENTER syn keyword rcAttribute DS_CENTERMOUSE DS_CONTEXTHELP syn keyword rcAttribute LBS_NOTIFY LBS_SORT LBS_NOREDRAW LBS_MULTIPLESEL LBS_OWNERDRAWFIXED syn keyword rcAttribute LBS_OWNERDRAWVARIABLE LBS_HASSTRINGS LBS_USETABSTOPS LBS_NOINTEGRALHEIGHT syn keyword rcAttribute LBS_MULTICOLUMN LBS_WANTKEYBOARDINPUT LBS_EXTENDEDSEL LBS_DISABLENOSCROLL syn keyword rcAttribute LBS_NODATA LBS_NOSEL LBS_STANDARD syn keyword rcAttribute CBS_SIMPLE CBS_DROPDOWN CBS_DROPDOWNLIST CBS_OWNERDRAWFIXED CBS_OWNERDRAWVARIABLE syn keyword rcAttribute CBS_AUTOHSCROLL CBS_OEMCONVERT CBS_SORT CBS_HASSTRINGS CBS_NOINTEGRALHEIGHT syn keyword rcAttribute CBS_DISABLENOSCROLL CBS_UPPERCASE CBS_LOWERCASE syn keyword rcAttribute SBS_HORZ SBS_VERT SBS_TOPALIGN SBS_LEFTALIGN SBS_BOTTOMALIGN SBS_RIGHTALIGN syn keyword rcAttribute SBS_SIZEBOXTOPLEFTALIGN SBS_SIZEBOXBOTTOMRIGHTALIGN SBS_SIZEBOX SBS_SIZEGRIP syn keyword rcAttribute CCS_TOP CCS_NOMOVEY CCS_BOTTOM CCS_NORESIZE CCS_NOPARENTALIGN CCS_ADJUSTABLE syn keyword rcAttribute CCS_NODIVIDER syn keyword rcAttribute LVS_ICON LVS_REPORT LVS_SMALLICON LVS_LIST LVS_TYPEMASK LVS_SINGLESEL LVS_SHOWSELALWAYS syn keyword rcAttribute LVS_SORTASCENDING LVS_SORTDESCENDING LVS_SHAREIMAGELISTS LVS_NOLABELWRAP syn keyword rcAttribute LVS_EDITLABELS LVS_OWNERDATA LVS_NOSCROLL LVS_TYPESTYLEMASK LVS_ALIGNTOP LVS_ALIGNLEFT syn keyword rcAttribute LVS_ALIGNMASK LVS_OWNERDRAWFIXED LVS_NOCOLUMNHEADER LVS_NOSORTHEADER LVS_AUTOARRANGE syn keyword rcAttribute TVS_HASBUTTONS TVS_HASLINES TVS_LINESATROOT TVS_EDITLABELS TVS_DISABLEDRAGDROP syn keyword rcAttribute TVS_SHOWSELALWAYS syn keyword rcAttribute TCS_FORCEICONLEFT TCS_FORCELABELLEFT TCS_TABS TCS_BUTTONS TCS_SINGLELINE TCS_MULTILINE syn keyword rcAttribute TCS_RIGHTJUSTIFY TCS_FIXEDWIDTH TCS_RAGGEDRIGHT TCS_FOCUSONBUTTONDOWN syn keyword rcAttribute TCS_OWNERDRAWFIXED TCS_TOOLTIPS TCS_FOCUSNEVER syn keyword rcAttribute ACS_CENTER ACS_TRANSPARENT ACS_AUTOPLAY syn keyword rcStdId IDI_APPLICATION IDI_HAND IDI_QUESTION IDI_EXCLAMATION IDI_ASTERISK IDI_WINLOGO IDI_WINLOGO syn keyword rcStdId IDI_WARNING IDI_ERROR IDI_INFORMATION syn keyword rcStdId IDCANCEL IDABORT IDRETRY IDIGNORE IDYES IDNO IDCLOSE IDHELP IDC_STATIC " Common RC keywords " Common RC keywords syn keyword rcTodo contained TODO FIXME XXX " String and Character constants " Highlight special characters (those which have a backslash) differently syn match rcSpecial contained "\\[0-7][0-7][0-7]\=\|\\." syn region rcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rcSpecial syn match rcCharacter "'[^\\]'" syn match rcSpecialCharacter "'\\.'" syn match rcSpecialCharacter "'\\[0-7][0-7]'" syn match rcSpecialCharacter "'\\[0-7][0-7][0-7]'" "catch errors caused by wrong parenthesis syn region rcParen transparent start='(' end=')' contains=ALLBUT,rcParenError,rcIncluded,rcSpecial,rcTodo syn match rcParenError ")" syn match rcInParen contained "[{}]" "integer number, or floating point number without a dot and with "f". syn case ignore syn match rcNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" "floating point number, with dot, optional exponent syn match rcFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, starting with a dot, optional exponent syn match rcFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match rcFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" "hex number syn match rcNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" "syn match rcIdentifier "\<[a-z_][a-z0-9_]*\>" syn case match " flag an octal number with wrong digits syn match rcOctalError "\<0[0-7]*[89]" if exists("rc_comment_strings") " A comment can contain rcString, rcCharacter and rcNumber. " But a "*/" inside a rcString in a rcComment DOES end the comment! So we " need to use a special type of rcString: rcCommentString, which also ends on " "*/", and sees a "*" at the start of the line as comment again. " Unfortunately this doesn't very well work for // type of comments :-( syntax match rcCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region rcCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=rcSpecial,rcCommentSkip syntax region rcComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=rcSpecial syntax region rcComment start="/\*" end="\*/" contains=rcTodo,rcCommentString,rcCharacter,rcNumber,rcFloat syntax match rcComment "//.*" contains=rcTodo,rcComment2String,rcCharacter,rcNumber else syn region rcComment start="/\*" end="\*/" contains=rcTodo syn match rcComment "//.*" contains=rcTodo endif syntax match rcCommentError "\*/" syn region rcPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=rcComment,rcString,rcCharacter,rcNumber,rcCommentError syn region rcIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match rcIncluded contained "<[^>]*>" syn match rcInclude "^\s*#\s*include\>\s*["<]" contains=rcIncluded "syn match rcLineSkip "\\$" syn region rcDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,rcPreCondit,rcIncluded,rcInclude,rcDefine,rcInParen syn region rcPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,rcPreCondit,rcIncluded,rcInclude,rcDefine,rcInParen syn sync ccomment rcComment minlines=10 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link rcCharacter Character hi def link rcSpecialCharacter rcSpecial hi def link rcNumber Number hi def link rcFloat Float hi def link rcOctalError rcError hi def link rcParenError rcError hi def link rcInParen rcError hi def link rcCommentError rcError hi def link rcInclude Include hi def link rcPreProc PreProc hi def link rcDefine Macro hi def link rcIncluded rcString hi def link rcError Error hi def link rcPreCondit PreCondit hi def link rcCommentString rcString hi def link rcComment2String rcString hi def link rcCommentSkip rcComment hi def link rcString String hi def link rcComment Comment hi def link rcSpecial SpecialChar hi def link rcTodo Todo hi def link rcAttribute rcCommonAttribute hi def link rcStdId rcStatement hi def link rcStatement Statement " Default color overrides hi def rcLanguage term=reverse ctermbg=Red ctermfg=Yellow guibg=Red guifg=Yellow hi def rcMainObject term=underline ctermfg=Blue guifg=Blue hi def rcSubObject ctermfg=Green guifg=Green hi def rcCaptionParam term=underline ctermfg=DarkGreen guifg=Green hi def rcParam ctermfg=DarkGreen guifg=DarkGreen hi def rcStatement ctermfg=DarkGreen guifg=DarkGreen hi def rcCommonAttribute ctermfg=Brown guifg=Brown "hi def link rcIdentifier Identifier let b:current_syntax = "rc" " vim: ts=8 neovim-0.2.2/runtime/syntax/rcs.vim000066400000000000000000000041251320401574200173250ustar00rootroot00000000000000" Vim syntax file " Language: RCS file " Maintainer: Dmitry Vasiliev " URL: https://github.com/hdima/vim-scripts/blob/master/syntax/rcs.vim " Last Change: 2012-02-11 " Filenames: *,v " Version: 1.12 " Options: " rcs_folding = 1 For folding strings " quit when a syntax file was already loaded. if exists("b:current_syntax") finish endif " RCS file must end with a newline. syn match rcsEOFError ".\%$" containedin=ALL " Keywords. syn keyword rcsKeyword head branch access symbols locks strict syn keyword rcsKeyword comment expand date author state branches syn keyword rcsKeyword next desc log syn keyword rcsKeyword text nextgroup=rcsTextStr skipwhite skipempty " Revision numbers and dates. syn match rcsNumber "\<[0-9.]\+\>" display " Strings. if exists("rcs_folding") && has("folding") " Folded strings. syn region rcsString matchgroup=rcsString start="@" end="@" skip="@@" fold contains=rcsSpecial syn region rcsTextStr matchgroup=rcsTextStr start="@" end="@" skip="@@" fold contained contains=rcsSpecial,rcsDiffLines else syn region rcsString matchgroup=rcsString start="@" end="@" skip="@@" contains=rcsSpecial syn region rcsTextStr matchgroup=rcsTextStr start="@" end="@" skip="@@" contained contains=rcsSpecial,rcsDiffLines endif syn match rcsSpecial "@@" contained syn match rcsDiffLines "[da]\d\+ \d\+$" contained " Synchronization. syn sync clear if exists("rcs_folding") && has("folding") syn sync fromstart else " We have incorrect folding if following sync patterns is turned on. syn sync match rcsSync grouphere rcsString "[0-9.]\+\(\s\|\n\)\+log\(\s\|\n\)\+@"me=e-1 syn sync match rcsSync grouphere rcsTextStr "@\(\s\|\n\)\+text\(\s\|\n\)\+@"me=e-1 endif " Define the default highlighting. " Only when an item doesn't have highlighting yet. hi def link rcsKeyword Keyword hi def link rcsNumber Identifier hi def link rcsString String hi def link rcsTextStr String hi def link rcsSpecial Special hi def link rcsDiffLines Special hi def link rcsEOFError Error let b:current_syntax = "rcs" neovim-0.2.2/runtime/syntax/rcslog.vim000066400000000000000000000010551320401574200200260ustar00rootroot00000000000000" Vim syntax file " Language: RCS log output " Maintainer: Joe Karthauser " Last Change: 2001 May 09 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match rcslogRevision "^revision.*$" syn match rcslogFile "^RCS file:.*" syn match rcslogDate "^date: .*$" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link rcslogFile Type hi def link rcslogRevision Constant hi def link rcslogDate Identifier let b:current_syntax = "rcslog" " vim: ts=8 neovim-0.2.2/runtime/syntax/readline.vim000066400000000000000000000406231320401574200203240ustar00rootroot00000000000000" Vim syntax file " Language: readline(3) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2017-06-25 " readline_has_bash - if defined add support for bash specific " settings/functions if exists('b:current_syntax') finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=- syn match readlineKey contained \ '\S' \ nextgroup=readlineKeyTerminator syn match readlineBegin display '^' \ nextgroup=readlineComment, \ readlineConditional, \ readlineInclude, \ readlineKeyName, \ readlineKey, \ readlineKeySeq, \ readlineKeyword \ skipwhite syn region readlineComment contained display oneline \ start='#' \ end='$' \ contains=readlineTodo, \ @Spell syn keyword readlineTodo contained \ TODO \ FIXME \ XXX \ NOTE syn match readlineConditional contained \ '$if\>' \ nextgroup=readlineTest, \ readlineTestApp \ skipwhite syn keyword readlineTest contained \ mode \ nextgroup=readlineTestModeEq syn match readlineTestModeEq contained \ '=' \ nextgroup=readlineEditingMode syn keyword readlineTest contained \ term \ nextgroup=readlineTestTermEq syn match readlineTestTermEq contained \ '=' \ nextgroup=readlineTestTerm syn match readlineTestTerm contained \ '\S\+' syn match readlineTestApp contained \ '\S\+' syn match readlineConditional contained display \ '$\%(else\|endif\)\>' syn match readlineInclude contained display \ '$include\>' \ nextgroup=readlinePath syn match readlinePath contained display \ '.\+' syn case ignore syn match readlineKeyName contained display \ nextgroup=readlineKeySeparator, \ readlineKeyTerminator \ '\%(Control\|Del\|Esc\|Escape\|LFD\|Meta\|Newline\|Ret\|Return\|Rubout\|Space\|Spc\|Tab\)' syn case match syn match readlineKeySeparator contained \ '-' \ nextgroup=readlineKeyName, \ readlineKey syn match readlineKeyTerminator contained \ ':' \ nextgroup=readlineFunction \ skipwhite syn region readlineKeySeq contained display oneline \ start=+"+ \ skip=+\\\\\|\\"+ \ end=+"+ \ contains=readlineKeyEscape \ nextgroup=readlineKeyTerminator syn match readlineKeyEscape contained display \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{2}\)+ syn keyword readlineKeyword contained \ set \ nextgroup=readlineVariable \ skipwhite syn keyword readlineVariable contained \ nextgroup=readlineBellStyle \ skipwhite \ bell-style syn keyword readlineVariable contained \ nextgroup=readlineBoolean \ skipwhite \ bind-tty-special-chars \ colored-stats \ completion-ignore-case \ completion-map-case \ convert-meta \ disable-completion \ echo-control-characters \ enable-keypad \ enable-meta-key \ expand-tilde \ history-preserve-point \ horizontal-scroll-mode \ input-meta \ meta-flag \ mark-directories \ mark-modified-lines \ mark-symlinked-directories \ match-hidden-files \ menu-complete-display-prefix \ output-meta \ page-completions \ print-completions-horizontally \ revert-all-at-newline \ show-all-if-ambiguous \ show-all-if-unmodified \ show-mode-in-prompt \ skip-completed-text \ visible-stats syn keyword readlineVariable contained \ nextgroup=readlineString \ skipwhite \ comment-begin \ isearch-terminators syn keyword readlineVariable contained \ nextgroup=readlineNumber \ skipwhite \ completion-display-width \ completion-prefix-display-length \ completion-query-items \ history-size \ keyseq-timeout syn keyword readlineVariable contained \ nextgroup=readlineEditingMode \ skipwhite \ editing-mode syn keyword readlineVariable contained \ nextgroup=readlineKeymap \ skipwhite \ keymap syn keyword readlineBellStyle contained \ audible \ visible \ none syn case ignore syn keyword readlineBoolean contained \ on \ off syn case match syn region readlineString contained display oneline \ matchgroup=readlineStringDelimiter \ start=+"+ \ skip=+\\\\\|\\"+ \ end=+"+ syn match readlineNumber contained display \ '[+-]\d\+\>' syn keyword readlineEditingMode contained \ emacs \ vi syn match readlineKeymap contained display \ 'emacs\%(-\%(standard\|meta\|ctlx\)\)\=\|vi\%(-\%(move\|command\|insert\)\)\=' syn keyword readlineFunction contained \ beginning-of-line \ end-of-line \ forward-char \ backward-char \ forward-word \ backward-word \ clear-screen \ redraw-current-line \ \ accept-line \ previous-history \ next-history \ beginning-of-history \ end-of-history \ reverse-search-history \ forward-search-history \ non-incremental-reverse-search-history \ non-incremental-forward-search-history \ history-search-forward \ history-search-backward \ yank-nth-arg \ yank-last-arg \ \ delete-char \ backward-delete-char \ forward-backward-delete-char \ quoted-insert \ tab-insert \ self-insert \ transpose-chars \ transpose-words \ upcase-word \ downcase-word \ capitalize-word \ overwrite-mode \ \ kill-line \ backward-kill-line \ unix-line-discard \ kill-whole-line \ kill-word \ backward-kill-word \ unix-word-rubout \ unix-filename-rubout \ delete-horizontal-space \ kill-region \ copy-region-as-kill \ copy-backward-word \ copy-forward-word \ yank \ yank-pop \ \ digit-argument \ universal-argument \ \ complete \ possible-completions \ insert-completions \ menu-complete \ menu-complete-backward \ delete-char-or-list \ \ start-kbd-macro \ end-kbd-macro \ call-last-kbd-macro \ \ re-read-init-file \ abort \ do-uppercase-version \ prefix-meta \ undo \ revert-line \ tilde-expand \ set-mark \ exchange-point-and-mark \ character-search \ character-search-backward \ skip-csi-sequence \ insert-comment \ dump-functions \ dump-variables \ dump-macros \ emacs-editing-mode \ vi-editing-mode \ \ vi-eof-maybe \ vi-movement-mode \ vi-undo \ vi-match \ vi-tilde-expand \ vi-complete \ vi-char-search \ vi-redo \ vi-search \ vi-arg-digit \ vi-append-eol \ vi-prev-word \ vi-change-to \ vi-delete-to \ vi-end-word \ vi-char-search \ vi-fetch-history \ vi-insert-beg \ vi-search-again \ vi-put \ vi-replace \ vi-subst \ vi-char-search \ vi-next-word \ vi-yank-to \ vi-first-print \ vi-yank-arg \ vi-goto-mark \ vi-append-mode \ vi-prev-word \ vi-change-to \ vi-delete-to \ vi-end-word \ vi-char-search \ vi-insert-mode \ vi-set-mark \ vi-search-again \ vi-put \ vi-change-char \ vi-subst \ vi-char-search \ vi-undo \ vi-next-word \ vi-delete \ vi-yank-to \ vi-column \ vi-change-case if exists("readline_has_bash") syn keyword readlineFunction contained \ shell-expand-line \ history-expand-line \ magic-space \ alias-expand-line \ history-and-alias-expand-line \ insert-last-argument \ operate-and-get-next \ forward-backward-delete-char \ delete-char-or-list \ complete-filename \ possible-filename-completions \ complete-username \ possible-username-completions \ complete-variable \ possible-variable-completions \ complete-hostname \ possible-hostname-completions \ complete-command \ possible-command-completions \ dynamic-complete-history \ complete-into-braces \ glob-expand-word \ glob-list-expansions \ display-shell-version \ glob-complete-word \ edit-and-execute-command endif hi def link readlineKey readlineKeySeq hi def link readlineComment Comment hi def link readlineTodo Todo hi def link readlineConditional Conditional hi def link readlineTest Type hi def link readlineDelimiter Delimiter hi def link readlineTestModeEq readlineEq hi def link readlineTestTermEq readlineEq hi def link readlineTestTerm readlineString hi def link readlineTestAppEq readlineEq hi def link readlineTestApp readlineString hi def link readlineInclude Include hi def link readlinePath String hi def link readlineKeyName SpecialChar hi def link readlineKeySeparator readlineKeySeq hi def link readlineKeyTerminator readlineDelimiter hi def link readlineKeySeq String hi def link readlineKeyEscape SpecialChar hi def link readlineKeyword Keyword hi def link readlineVariable Identifier hi def link readlineBellStyle Constant hi def link readlineBoolean Boolean hi def link readlineString String hi def link readlineStringDelimiter readlineString hi def link readlineNumber Number hi def link readlineEditingMode Constant hi def link readlineKeymap Constant hi def link readlineFunction Function let b:current_syntax = 'readline' let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/rebol.vim000066400000000000000000000157771320401574200176600ustar00rootroot00000000000000" Vim syntax file " Language: Rebol " Maintainer: Mike Williams " Filenames: *.r " Last Change: 27th June 2002 " URL: http://www.eandem.co.uk/mrw/vim " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Rebol is case insensitive syn case ignore " As per current users documentation setlocal isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ " Yer TODO highlighter syn keyword rebolTodo contained TODO " Comments syn match rebolComment ";.*$" contains=rebolTodo " Words syn match rebolWord "\a\k*" syn match rebolWordPath "[^[:space:]]/[^[:space]]"ms=s+1,me=e-1 " Booleans syn keyword rebolBoolean true false on off yes no " Values " Integers syn match rebolInteger "\<[+-]\=\d\+\('\d*\)*\>" " Decimals syn match rebolDecimal "[+-]\=\(\d\+\('\d*\)*\)\=[,.]\d*\(e[+-]\=\d\+\)\=" syn match rebolDecimal "[+-]\=\d\+\('\d*\)*\(e[+-]\=\d\+\)\=" " Time syn match rebolTime "[+-]\=\(\d\+\('\d*\)*\:\)\{1,2}\d\+\('\d*\)*\([.,]\d\+\)\=\([AP]M\)\=\>" syn match rebolTime "[+-]\=:\d\+\([.,]\d*\)\=\([AP]M\)\=\>" " Dates " DD-MMM-YY & YYYY format syn match rebolDate "\d\{1,2}\([/-]\)\(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)\1\(\d\{2}\)\{1,2}\>" " DD-month-YY & YYYY format syn match rebolDate "\d\{1,2}\([/-]\)\(January\|February\|March\|April\|May\|June\|July\|August\|September\|October\|November\|December\)\1\(\d\{2}\)\{1,2}\>" " DD-MM-YY & YY format syn match rebolDate "\d\{1,2}\([/-]\)\d\{1,2}\1\(\d\{2}\)\{1,2}\>" " YYYY-MM-YY format syn match rebolDate "\d\{4}-\d\{1,2}-\d\{1,2}\>" " DD.MM.YYYY format syn match rebolDate "\d\{1,2}\.\d\{1,2}\.\d\{4}\>" " Money syn match rebolMoney "\a*\$\d\+\('\d*\)*\([,.]\d\+\)\=" " Strings syn region rebolString oneline start=+"+ skip=+^"+ end=+"+ contains=rebolSpecialCharacter syn region rebolString start=+[^#]{+ end=+}+ skip=+{[^}]*}+ contains=rebolSpecialCharacter " Binary syn region rebolBinary start=+\d*#{+ end=+}+ contains=rebolComment " Email syn match rebolEmail "\<\k\+@\(\k\+\.\)*\k\+\>" " File syn match rebolFile "%\(\k\+/\)*\k\+[/]\=" contains=rebolSpecialCharacter syn region rebolFile oneline start=+%"+ end=+"+ contains=rebolSpecialCharacter " URLs syn match rebolURL "http://\k\+\(\.\k\+\)*\(:\d\+\)\=\(/\(\k\+/\)*\(\k\+\)\=\)*" syn match rebolURL "file://\k\+\(\.\k\+\)*/\(\k\+/\)*\k\+" syn match rebolURL "ftp://\(\k\+:\k\+@\)\=\k\+\(\.\k\+\)*\(:\d\+\)\=/\(\k\+/\)*\k\+" syn match rebolURL "mailto:\k\+\(\.\k\+\)*@\k\+\(\.\k\+\)*" " Issues syn match rebolIssue "#\(\d\+-\)*\d\+" " Tuples syn match rebolTuple "\(\d\+\.\)\{2,}" " Characters syn match rebolSpecialCharacter contained "\^[^[:space:][]" syn match rebolSpecialCharacter contained "%\d\+" " Operators " Math operators syn match rebolMathOperator "\(\*\{1,2}\|+\|-\|/\{1,2}\)" syn keyword rebolMathFunction abs absolute add arccosine arcsine arctangent cosine syn keyword rebolMathFunction divide exp log-10 log-2 log-e max maximum min syn keyword rebolMathFunction minimum multiply negate power random remainder sine syn keyword rebolMathFunction square-root subtract tangent " Binary operators syn keyword rebolBinaryOperator complement and or xor ~ " Logic operators syn match rebolLogicOperator "[<>=]=\=" syn match rebolLogicOperator "<>" syn keyword rebolLogicOperator not syn keyword rebolLogicFunction all any syn keyword rebolLogicFunction head? tail? syn keyword rebolLogicFunction negative? positive? zero? even? odd? syn keyword rebolLogicFunction binary? block? char? date? decimal? email? empty? syn keyword rebolLogicFunction file? found? function? integer? issue? logic? money? syn keyword rebolLogicFunction native? none? object? paren? path? port? series? syn keyword rebolLogicFunction string? time? tuple? url? word? syn keyword rebolLogicFunction exists? input? same? value? " Datatypes syn keyword rebolType binary! block! char! date! decimal! email! file! syn keyword rebolType function! integer! issue! logic! money! native! syn keyword rebolType none! object! paren! path! port! string! time! syn keyword rebolType tuple! url! word! syn keyword rebolTypeFunction type? " Control statements syn keyword rebolStatement break catch exit halt reduce return shield syn keyword rebolConditional if else syn keyword rebolRepeat for forall foreach forskip loop repeat while until do " Series statements syn keyword rebolStatement change clear copy fifth find first format fourth free syn keyword rebolStatement func function head insert last match next parse past syn keyword rebolStatement pick remove second select skip sort tail third trim length? " Context syn keyword rebolStatement alias bind use " Object syn keyword rebolStatement import make make-object rebol info? " I/O statements syn keyword rebolStatement delete echo form format import input load mold prin syn keyword rebolStatement print probe read save secure send write syn keyword rebolOperator size? modified? " Debug statement syn keyword rebolStatement help probe trace " Misc statements syn keyword rebolStatement func function free " Constants syn keyword rebolConstant none " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link rebolTodo Todo hi def link rebolStatement Statement hi def link rebolLabel Label hi def link rebolConditional Conditional hi def link rebolRepeat Repeat hi def link rebolOperator Operator hi def link rebolLogicOperator rebolOperator hi def link rebolLogicFunction rebolLogicOperator hi def link rebolMathOperator rebolOperator hi def link rebolMathFunction rebolMathOperator hi def link rebolBinaryOperator rebolOperator hi def link rebolBinaryFunction rebolBinaryOperator hi def link rebolType Type hi def link rebolTypeFunction rebolOperator hi def link rebolWord Identifier hi def link rebolWordPath rebolWord hi def link rebolFunction Function hi def link rebolCharacter Character hi def link rebolSpecialCharacter SpecialChar hi def link rebolString String hi def link rebolNumber Number hi def link rebolInteger rebolNumber hi def link rebolDecimal rebolNumber hi def link rebolTime rebolNumber hi def link rebolDate rebolNumber hi def link rebolMoney rebolNumber hi def link rebolBinary rebolNumber hi def link rebolEmail rebolString hi def link rebolFile rebolString hi def link rebolURL rebolString hi def link rebolIssue rebolNumber hi def link rebolTuple rebolNumber hi def link rebolFloat Float hi def link rebolBoolean Boolean hi def link rebolConstant Constant hi def link rebolComment Comment hi def link rebolError Error if exists("my_rebol_file") if file_readable(expand(my_rebol_file)) execute "source " . my_rebol_file endif endif let b:current_syntax = "rebol" " vim: ts=8 neovim-0.2.2/runtime/syntax/redif.vim000066400000000000000000002536071320401574200176420ustar00rootroot00000000000000" Vim syntax file " Language: ReDIF " Maintainer: Axel Castellane " Last Change: 2013 April 17 " Original Author: Axel Castellane " Source: http://openlib.org/acmes/root/docu/redif_1.html " File Extension: rdf " Note: The ReDIF format is used by RePEc. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " ReDIF is case-insensitive syntax case ignore " Structure: Some fields determine what fields can come next. For example: " Template-Type " *-Name " File-URL " *-Institution " Those fields span a syntax region over several lines so that these regions " can only contain their respective items. " Any line which is not a correct template or part of an argument is an error. " This comes at the very beginning, so it has the lowest priority and will " only match if nothing else did. syntax match redifWrongLine /^.\+/ display highlight def link redifWrongLine redifError " Comments must start with # and it must be the first character of the line, " otherwise I believe that they are considered as part of an argument. syntax match redifComment /^#.*/ containedin=ALL display " Defines the 9 possible multi-lines regions of Template-Type and the fields " they can contain. syntax region redifRegionTemplatePaper start=/^Template-Type:\_s*ReDIF-Paper \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsPaper,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile fold syntax region redifRegionTemplateArticle start=/^Template-Type:\_s*ReDIF-Article \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsArticle,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile fold syntax region redifRegionTemplateChapter start=/^Template-Type:\_s*ReDIF-Chapter \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsChapter,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile,redifRegionClusterProvider,redifRegionClusterPublisher,redifRegionClusterEditor fold syntax region redifRegionTemplateBook start=/^Template-Type:\_s*ReDIF-Book \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsBook,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile,redifRegionClusterProvider,redifRegionClusterPublisher,redifRegionClusterEditor fold syntax region redifRegionTemplateSoftware start=/^Template-Type:\_s*ReDIF-Software \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsSoftware,redifWrongLine,redifRegionClusterAuthor,redifRegionClusterFile fold syntax region redifRegionTemplateArchive start=/^Template-Type:\_s*ReDIF-Archive \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsArchive,redifWrongLine fold syntax region redifRegionTemplateSeries start=/^Template-Type:\_s*ReDIF-Series \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsSeries,redifWrongLine,redifRegionClusterProvider,redifRegionClusterPublisher,redifRegionClusterEditor fold syntax region redifRegionTemplateInstitution start=/^Template-Type:\_s*ReDIF-Institution \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsInstitution,redifWrongLine,redifRegionClusterPrimary,redifRegionClusterSecondary,redifRegionClusterTertiary,redifRegionClusterQuaternary fold syntax region redifRegionTemplatePerson start=/^Template-Type:\_s*ReDIF-Person \d\+\.\d\+/ end=/^Template-Type:/me=s-1 contains=redifContainerFieldsPerson,redifWrongLine,redifRegionClusterWorkplace fold " All fields are foldable (These come before clusters, so they have lower " priority). So they are contained in a foldable syntax region. syntax region redifContainerFieldsPaper start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTitle,redifFieldHandleOfWork,redifFieldLanguage,redifFieldContactEmail,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldNumber,redifFieldCreationDate,redifFieldRevisionDate,redifFieldPublicationStatus,redifFieldNote,redifFieldLength,redifFieldSeries,redifFieldAvailability,redifFieldOrderURL,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldRestriction,redifFieldPrice,redifFieldNotification,redifFieldPublicationType,redifFieldTemplateType,redifWrongLine contained transparent fold syntax region redifContainerFieldsArticle start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTitle,redifFieldHandleOfWork,redifFieldLanguage,redifFieldContactEmail,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldNumber,redifFieldCreationDate,redifFieldPublicationStatus,redifFieldOrderURL,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldRestriction,redifFieldPrice,redifFieldNotification,redifFieldPublicationType,redifFieldJournal,redifFieldVolume,redifFieldYear,redifFieldIssue,redifFieldMonth,redifFieldPages,redifFieldNumber,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold syntax region redifContainerFieldsChapter start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfWork,redifFieldTitle,redifFieldContactEmail,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldBookTitle,redifFieldYear,redifFieldMonth,redifFieldPages,redifFieldChapter,redifFieldVolume,redifFieldEdition,redifFieldSeries,redifFieldISBN,redifFieldPublicationStatus,redifFieldNote,redifFieldInBook,redifFieldOrderURL,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold syntax region redifContainerFieldsBook start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTitle,redifFieldHandleOfWork,redifFieldContactEmail,redifFieldYear,redifFieldMonth,redifFieldVolume,redifFieldEdition,redifFieldSeries,redifFieldISBN,redifFieldPublicationStatus,redifFieldNote,redifFieldAbstract,redifFieldClassificationJEL,redifFieldKeywords,redifFieldHasChapter,redifFieldPrice,redifFieldOrderURL,redifFieldNumber,redifFieldCreationDate,redifFieldPublicationDate,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold syntax region redifContainerFieldsSoftware start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfWork,redifFieldTitle,redifFieldProgrammingLanguage,redifFieldAbstract,redifFieldNumber,redifFieldVersion,redifFieldClassificationJEL,redifFieldKeywords,redifFieldSize,redifFieldSeries,redifFieldCreationDate,redifFieldRevisionDate,redifFieldNote,redifFieldRequires,redifFieldArticleHandle,redifFieldBookHandle,redifFieldChapterHandle,redifFieldPaperHandle,redifFieldSoftwareHandle,redifFieldTemplateType,redifWrongLine contained transparent fold syntax region redifContainerFieldsArchive start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfArchive,redifFieldURL,redifFieldMaintainerEmail,redifFieldName,redifFieldMaintainerName,redifFieldMaintainerPhone,redifFieldMaintainerFax,redifFieldClassificationJEL,redifFieldHomepage,redifFieldDescription,redifFieldNotification,redifFieldRestriction,redifFieldTemplateType,redifWrongLine contained transparent fold syntax region redifContainerFieldsSeries start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldName,redifFieldHandleOfSeries,redifFieldMaintainerEmail,redifFieldType,redifFieldOrderEmail,redifFieldOrderHomepage,redifFieldOrderPostal,redifFieldPrice,redifFieldRestriction,redifFieldMaintainerPhone,redifFieldMaintainerFax,redifFieldMaintainerName,redifFieldDescription,redifFieldClassificationJEL,redifFieldKeywords,redifFieldNotification,redifFieldISSN,redifFieldFollowup,redifFieldPredecessor,redifFieldTemplateType,redifWrongLine contained transparent fold syntax region redifContainerFieldsInstitution start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfInstitution,redifFieldPrimaryDefunct,redifFieldSecondaryDefunct,redifFieldTertiaryDefunct,redifFieldTemplateType,redifWrongLine contained transparent fold syntax region redifContainerFieldsPerson start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldHandleOfPerson,redifFieldNameFull,redifFieldNameFirst,redifFieldNameLast,redifFieldNamePrefix,redifFieldNameMiddle,redifFieldNameSuffix,redifFieldNameASCII,redifFieldEmail,redifFieldHomepage,redifFieldFax,redifFieldPostal,redifFieldPhone,redifFieldWorkplaceOrganization,redifFieldAuthorPaper,redifFieldAuthorArticle,redifFieldAuthorSoftware,redifFieldAuthorBook,redifFieldAuthorChapter,redifFieldEditorBook,redifFieldEditorSeries,redifFieldClassificationJEL,redifFieldShortId,redifFieldLastLoginDate,redifFieldRegisteredDate,redifWrongLine contained transparent fold " Defines the 10 possible clusters and what they can contain " A field not in the cluster ends the cluster. syntax region redifRegionClusterWorkplace start=/^Workplace-Name:/ skip=/^Workplace-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsWorkplace fold syntax region redifRegionClusterPrimary start=/^Primary-Name:/ skip=/^Primary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsPrimary fold syntax region redifRegionClusterSecondary start=/^Secondary-Name:/ skip=/^Secondary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsSecondary fold syntax region redifRegionClusterTertiary start=/^Tertiary-Name:/ skip=/^Tertiary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsTertiary fold syntax region redifRegionClusterQuaternary start=/^Quaternary-Name:/ skip=/^Quaternary-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsQuaternary fold syntax region redifRegionClusterProvider start=/^Provider-Name:/ skip=/^Provider-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsProvider fold syntax region redifRegionClusterPublisher start=/^Publisher-Name:/ skip=/^Publisher-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsPublisher fold syntax region redifRegionClusterAuthor start=/^Author-Name:/ skip=/^Author-\%(Name\%(-First\|-Last\)\|Homepage\|Email\|Fax\|Postal\|Phone\|Person\|Workplace-Name\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifRegionClusterAuthorWorkplace,redifContainerFieldsAuthor fold syntax region redifRegionClusterEditor start=/^Editor-Name:/ skip=/^Editor-\%(Name\%(-First\|-Last\)\|Homepage\|Email\|Fax\|Postal\|Phone\|Person\|Workplace-Name\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifRegionClusterEditorWorkplace,redifContainerFieldsEditor fold syntax region redifRegionClusterFile start=/^File-URL:/ skip=/^File-\%(Format\|Function\|Size\|Restriction\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsFile fold " The foldable containers of the clusters. syntax region redifContainerFieldsWorkplace start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldWorkplaceName,redifFieldWorkplaceHomepage,redifFieldWorkplaceNameEnglish,redifFieldWorkplacePostal,redifFieldWorkplaceLocation,redifFieldWorkplaceEmail,redifFieldWorkplacePhone,redifFieldWorkplaceFax,redifFieldWorkplaceInstitution,redifWrongLine contained transparent fold syntax region redifContainerFieldsPrimary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldPrimaryName,redifFieldPrimaryHomepage,redifFieldPrimaryNameEnglish,redifFieldPrimaryPostal,redifFieldPrimaryLocation,redifFieldPrimaryEmail,redifFieldPrimaryPhone,redifFieldPrimaryFax,redifFieldPrimaryInstitution,redifWrongLine contained transparent fold syntax region redifContainerFieldsSecondary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldSecondaryName,redifFieldSecondaryHomepage,redifFieldSecondaryNameEnglish,redifFieldSecondaryPostal,redifFieldSecondaryLocation,redifFieldSecondaryEmail,redifFieldSecondaryPhone,redifFieldSecondaryFax,redifFieldSecondaryInstitution,redifWrongLine contained transparent fold syntax region redifContainerFieldsTertiary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldTertiaryName,redifFieldTertiaryHomepage,redifFieldTertiaryNameEnglish,redifFieldTertiaryPostal,redifFieldTertiaryLocation,redifFieldTertiaryEmail,redifFieldTertiaryPhone,redifFieldTertiaryFax,redifFieldTertiaryInstitution,redifWrongLine contained transparent fold syntax region redifContainerFieldsQuaternary start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldQuaternaryName,redifFieldQuaternaryHomepage,redifFieldQuaternaryNameEnglish,redifFieldQuaternaryPostal,redifFieldQuaternaryLocation,redifFieldQuaternaryEmail,redifFieldQuaternaryPhone,redifFieldQuaternaryFax,redifFieldQuaternaryInstitution,redifWrongLine contained transparent fold syntax region redifContainerFieldsProvider start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldProviderName,redifFieldProviderHomepage,redifFieldProviderNameEnglish,redifFieldProviderPostal,redifFieldProviderLocation,redifFieldProviderEmail,redifFieldProviderPhone,redifFieldProviderFax,redifFieldProviderInstitution,redifWrongLine contained transparent fold syntax region redifContainerFieldsPublisher start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldPublisherName,redifFieldPublisherHomepage,redifFieldPublisherNameEnglish,redifFieldPublisherPostal,redifFieldPublisherLocation,redifFieldPublisherEmail,redifFieldPublisherPhone,redifFieldPublisherFax,redifFieldPublisherInstitution,redifWrongLine contained transparent fold syntax region redifContainerFieldsAuthor start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldAuthorName,redifFieldAuthorNameFirst,redifFieldAuthorNameLast,redifFieldAuthorHomepage,redifFieldAuthorEmail,redifFieldAuthorFax,redifFieldAuthorPostal,redifFieldAuthorPhone,redifFieldAuthorPerson,redifWrongLine contained transparent fold syntax region redifContainerFieldsEditor start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldEditorName,redifFieldEditorNameFirst,redifFieldEditorNameLast,redifFieldEditorHomepage,redifFieldEditorEmail,redifFieldEditorFax,redifFieldEditorPostal,redifFieldEditorPhone,redifFieldEditorPerson,redifWrongLine contained transparent fold syntax region redifContainerFieldsFile start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldFileURL,redifFieldFileFormat,redifFieldFileFunction,redifFieldFileSize,redifFieldFileRestriction,redifWrongLine contained transparent fold " The two clusters in cluster (must be presented after to have priority over " fields containers) syntax region redifRegionClusterAuthorWorkplace start=/^Author-Workplace-Name:/ skip=/^Author-Workplace-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsAuthorWorkplace fold syntax region redifRegionClusterEditorWorkplace start=/^Editor-Workplace-Name:/ skip=/^Editor-Workplace-\%(Name-English\|Homepage\|Postal\|Location\|Email\|Phone\|Fax\|Institution\):/ end=/^\S\{-}:/me=s-1 contained contains=redifWrongLine,redifContainerFieldsEditorWorkplace fold " Their foldable fields containers syntax region redifContainerFieldsAuthorWorkplace start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldAuthorWorkplaceName,redifFieldAuthorWorkplaceHomepage,redifFieldAuthorWorkplaceNameEnglish,redifFieldAuthorWorkplacePostal,redifFieldAuthorWorkplaceLocation,redifFieldAuthorWorkplaceEmail,redifFieldAuthorWorkplacePhone,redifFieldAuthorWorkplaceFax,redifFieldAuthorWorkplaceInstitution,redifWrongLine contained transparent fold syntax region redifContainerFieldsEditorWorkplace start=/^\S\{-}:/ end=/^\S\{-}:/me=s-1 contains=redifFieldEditorWorkplaceName,redifFieldEditorWorkplaceHomepage,redifFieldEditorWorkplaceNameEnglish,redifFieldEditorWorkplacePostal,redifFieldEditorWorkplaceLocation,redifFieldEditorWorkplaceEmail,redifFieldEditorWorkplacePhone,redifFieldEditorWorkplaceFax,redifFieldEditorWorkplaceInstitution,redifWrongLine contained transparent fold " All the possible fields " Note: The "Handle" field is handled a little bit differently, because it " does not have the same meaning depending on the Template-Type. See: " /redifFieldHandleOf.... syntax match redifFieldAbstract /^Abstract:/ skipwhite skipempty nextgroup=redifArgumentAbstract contained syntax match redifFieldArticleHandle /^Article-Handle:/ skipwhite skipempty nextgroup=redifArgumentArticleHandle contained syntax match redifFieldAuthorArticle /^Author-Article:/ skipwhite skipempty nextgroup=redifArgumentAuthorArticle contained syntax match redifFieldAuthorBook /^Author-Book:/ skipwhite skipempty nextgroup=redifArgumentAuthorBook contained syntax match redifFieldAuthorChapter /^Author-Chapter:/ skipwhite skipempty nextgroup=redifArgumentAuthorChapter contained syntax match redifFieldAuthorEmail /^Author-Email:/ skipwhite skipempty nextgroup=redifArgumentAuthorEmail contained syntax match redifFieldAuthorFax /^Author-Fax:/ skipwhite skipempty nextgroup=redifArgumentAuthorFax contained syntax match redifFieldAuthorHomepage /^Author-Homepage:/ skipwhite skipempty nextgroup=redifArgumentAuthorHomepage contained syntax match redifFieldAuthorName /^Author-Name:/ skipwhite skipempty nextgroup=redifArgumentAuthorName contained syntax match redifFieldAuthorNameFirst /^Author-Name-First:/ skipwhite skipempty nextgroup=redifArgumentAuthorNameFirst contained syntax match redifFieldAuthorNameLast /^Author-Name-Last:/ skipwhite skipempty nextgroup=redifArgumentAuthorNameLast contained syntax match redifFieldAuthorPaper /^Author-Paper:/ skipwhite skipempty nextgroup=redifArgumentAuthorPaper contained syntax match redifFieldAuthorPerson /^Author-Person:/ skipwhite skipempty nextgroup=redifArgumentAuthorPerson contained syntax match redifFieldAuthorPhone /^Author-Phone:/ skipwhite skipempty nextgroup=redifArgumentAuthorPhone contained syntax match redifFieldAuthorPostal /^Author-Postal:/ skipwhite skipempty nextgroup=redifArgumentAuthorPostal contained syntax match redifFieldAuthorSoftware /^Author-Software:/ skipwhite skipempty nextgroup=redifArgumentAuthorSoftware contained syntax match redifFieldAuthorWorkplaceEmail /^Author-Workplace-Email:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceEmail contained syntax match redifFieldAuthorWorkplaceFax /^Author-Workplace-Fax:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceFax contained syntax match redifFieldAuthorWorkplaceHomepage /^Author-Workplace-Homepage:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceHomepage contained syntax match redifFieldAuthorWorkplaceInstitution /^Author-Workplace-Institution:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceInstitution contained syntax match redifFieldAuthorWorkplaceLocation /^Author-Workplace-Location:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceLocation contained syntax match redifFieldAuthorWorkplaceName /^Author-Workplace-Name:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceName contained syntax match redifFieldAuthorWorkplaceNameEnglish /^Author-Workplace-Name-English:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplaceNameEnglish contained syntax match redifFieldAuthorWorkplacePhone /^Author-Workplace-Phone:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplacePhone contained syntax match redifFieldAuthorWorkplacePostal /^Author-Workplace-Postal:/ skipwhite skipempty nextgroup=redifArgumentAuthorWorkplacePostal contained syntax match redifFieldAvailability /^Availability:/ skipwhite skipempty nextgroup=redifArgumentAvailability contained syntax match redifFieldBookHandle /^Book-Handle:/ skipwhite skipempty nextgroup=redifArgumentBookHandle contained syntax match redifFieldBookTitle /^Book-Title:/ skipwhite skipempty nextgroup=redifArgumentBookTitle contained syntax match redifFieldChapterHandle /^Chapter-Handle:/ skipwhite skipempty nextgroup=redifArgumentChapterHandle contained syntax match redifFieldChapter /^Chapter:/ skipwhite skipempty nextgroup=redifArgumentChapter contained syntax match redifFieldClassificationJEL /^Classification-JEL:/ skipwhite skipempty nextgroup=redifArgumentClassificationJEL contained syntax match redifFieldContactEmail /^Contact-Email:/ skipwhite skipempty nextgroup=redifArgumentContactEmail contained syntax match redifFieldCreationDate /^Creation-Date:/ skipwhite skipempty nextgroup=redifArgumentCreationDate contained syntax match redifFieldDescription /^Description:/ skipwhite skipempty nextgroup=redifArgumentDescription contained syntax match redifFieldEdition /^Edition:/ skipwhite skipempty nextgroup=redifArgumentEdition contained syntax match redifFieldEditorBook /^Editor-Book:/ skipwhite skipempty nextgroup=redifArgumentEditorBook contained syntax match redifFieldEditorEmail /^Editor-Email:/ skipwhite skipempty nextgroup=redifArgumentEditorEmail contained syntax match redifFieldEditorFax /^Editor-Fax:/ skipwhite skipempty nextgroup=redifArgumentEditorFax contained syntax match redifFieldEditorHomepage /^Editor-Homepage:/ skipwhite skipempty nextgroup=redifArgumentEditorHomepage contained syntax match redifFieldEditorName /^Editor-Name:/ skipwhite skipempty nextgroup=redifArgumentEditorName contained syntax match redifFieldEditorNameFirst /^Editor-Name-First:/ skipwhite skipempty nextgroup=redifArgumentEditorNameFirst contained syntax match redifFieldEditorNameLast /^Editor-Name-Last:/ skipwhite skipempty nextgroup=redifArgumentEditorNameLast contained syntax match redifFieldEditorPerson /^Editor-Person:/ skipwhite skipempty nextgroup=redifArgumentEditorPerson contained syntax match redifFieldEditorPhone /^Editor-Phone:/ skipwhite skipempty nextgroup=redifArgumentEditorPhone contained syntax match redifFieldEditorPostal /^Editor-Postal:/ skipwhite skipempty nextgroup=redifArgumentEditorPostal contained syntax match redifFieldEditorSeries /^Editor-Series:/ skipwhite skipempty nextgroup=redifArgumentEditorSeries contained syntax match redifFieldEditorWorkplaceEmail /^Editor-Workplace-Email:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceEmail contained syntax match redifFieldEditorWorkplaceFax /^Editor-Workplace-Fax:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceFax contained syntax match redifFieldEditorWorkplaceHomepage /^Editor-Workplace-Homepage:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceHomepage contained syntax match redifFieldEditorWorkplaceInstitution /^Editor-Workplace-Institution:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceInstitution contained syntax match redifFieldEditorWorkplaceLocation /^Editor-Workplace-Location:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceLocation contained syntax match redifFieldEditorWorkplaceName /^Editor-Workplace-Name:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceName contained syntax match redifFieldEditorWorkplaceNameEnglish /^Editor-Workplace-Name-English:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplaceNameEnglish contained syntax match redifFieldEditorWorkplacePhone /^Editor-Workplace-Phone:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplacePhone contained syntax match redifFieldEditorWorkplacePostal /^Editor-Workplace-Postal:/ skipwhite skipempty nextgroup=redifArgumentEditorWorkplacePostal contained syntax match redifFieldEmail /^Email:/ skipwhite skipempty nextgroup=redifArgumentEmail contained syntax match redifFieldFax /^Fax:/ skipwhite skipempty nextgroup=redifArgumentFax contained syntax match redifFieldFileFormat /^File-Format:/ skipwhite skipempty nextgroup=redifArgumentFileFormat contained syntax match redifFieldFileFunction /^File-Function:/ skipwhite skipempty nextgroup=redifArgumentFileFunction contained syntax match redifFieldFileRestriction /^File-Restriction:/ skipwhite skipempty nextgroup=redifArgumentFileRestriction contained syntax match redifFieldFileSize /^File-Size:/ skipwhite skipempty nextgroup=redifArgumentFileSize contained syntax match redifFieldFileURL /^File-URL:/ skipwhite skipempty nextgroup=redifArgumentFileURL contained syntax match redifFieldFollowup /^Followup:/ skipwhite skipempty nextgroup=redifArgumentFollowup contained syntax match redifFieldHandleOfArchive /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfArchive contained syntax match redifFieldHandleOfInstitution /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfInstitution contained syntax match redifFieldHandleOfPerson /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfPerson contained syntax match redifFieldHandleOfSeries /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfSeries contained syntax match redifFieldHandleOfWork /^Handle:/ skipwhite skipempty nextgroup=redifArgumentHandleOfWork contained syntax match redifFieldHasChapter /^HasChapter:/ skipwhite skipempty nextgroup=redifArgumentHasChapter contained syntax match redifFieldHomepage /^Homepage:/ skipwhite skipempty nextgroup=redifArgumentHomepage contained syntax match redifFieldInBook /^In-Book:/ skipwhite skipempty nextgroup=redifArgumentInBook contained syntax match redifFieldISBN /^ISBN:/ skipwhite skipempty nextgroup=redifArgumentISBN contained syntax match redifFieldISSN /^ISSN:/ skipwhite skipempty nextgroup=redifArgumentISSN contained syntax match redifFieldIssue /^Issue:/ skipwhite skipempty nextgroup=redifArgumentIssue contained syntax match redifFieldJournal /^Journal:/ skipwhite skipempty nextgroup=redifArgumentJournal contained syntax match redifFieldKeywords /^Keywords:/ skipwhite skipempty nextgroup=redifArgumentKeywords contained syntax match redifFieldKeywords /^Keywords:/ skipwhite skipempty nextgroup=redifArgumentKeywords contained syntax match redifFieldLanguage /^Language:/ skipwhite skipempty nextgroup=redifArgumentLanguage contained syntax match redifFieldLastLoginDate /^Last-Login-Date:/ skipwhite skipempty nextgroup=redifArgumentLastLoginDate contained syntax match redifFieldLength /^Length:/ skipwhite skipempty nextgroup=redifArgumentLength contained syntax match redifFieldMaintainerEmail /^Maintainer-Email:/ skipwhite skipempty nextgroup=redifArgumentMaintainerEmail contained syntax match redifFieldMaintainerFax /^Maintainer-Fax:/ skipwhite skipempty nextgroup=redifArgumentMaintainerFax contained syntax match redifFieldMaintainerName /^Maintainer-Name:/ skipwhite skipempty nextgroup=redifArgumentMaintainerName contained syntax match redifFieldMaintainerPhone /^Maintainer-Phone:/ skipwhite skipempty nextgroup=redifArgumentMaintainerPhone contained syntax match redifFieldMonth /^Month:/ skipwhite skipempty nextgroup=redifArgumentMonth contained syntax match redifFieldNameASCII /^Name-ASCII:/ skipwhite skipempty nextgroup=redifArgumentNameASCII contained syntax match redifFieldNameFirst /^Name-First:/ skipwhite skipempty nextgroup=redifArgumentNameFirst contained syntax match redifFieldNameFull /^Name-Full:/ skipwhite skipempty nextgroup=redifArgumentNameFull contained syntax match redifFieldNameLast /^Name-Last:/ skipwhite skipempty nextgroup=redifArgumentNameLast contained syntax match redifFieldNameMiddle /^Name-Middle:/ skipwhite skipempty nextgroup=redifArgumentNameMiddle contained syntax match redifFieldNamePrefix /^Name-Prefix:/ skipwhite skipempty nextgroup=redifArgumentNamePrefix contained syntax match redifFieldNameSuffix /^Name-Suffix:/ skipwhite skipempty nextgroup=redifArgumentNameSuffix contained syntax match redifFieldName /^Name:/ skipwhite skipempty nextgroup=redifArgumentName contained syntax match redifFieldNote /^Note:/ skipwhite skipempty nextgroup=redifArgumentNote contained syntax match redifFieldNotification /^Notification:/ skipwhite skipempty nextgroup=redifArgumentNotification contained syntax match redifFieldNumber /^Number:/ skipwhite skipempty nextgroup=redifArgumentNumber contained syntax match redifFieldOrderEmail /^Order-Email:/ skipwhite skipempty nextgroup=redifArgumentOrderEmail contained syntax match redifFieldOrderHomepage /^Order-Homepage:/ skipwhite skipempty nextgroup=redifArgumentOrderHomepage contained syntax match redifFieldOrderPostal /^Order-Postal:/ skipwhite skipempty nextgroup=redifArgumentOrderPostal contained syntax match redifFieldOrderURL /^Order-URL:/ skipwhite skipempty nextgroup=redifArgumentOrderURL contained syntax match redifFieldPages /^Pages:/ skipwhite skipempty nextgroup=redifArgumentPages contained syntax match redifFieldPaperHandle /^Paper-Handle:/ skipwhite skipempty nextgroup=redifArgumentPaperHandle contained syntax match redifFieldPhone /^Phone:/ skipwhite skipempty nextgroup=redifArgumentPhone contained syntax match redifFieldPostal /^Postal:/ skipwhite skipempty nextgroup=redifArgumentPostal contained syntax match redifFieldPredecessor /^Predecessor:/ skipwhite skipempty nextgroup=redifArgumentPredecessor contained syntax match redifFieldPrice /^Price:/ skipwhite skipempty nextgroup=redifArgumentPrice contained syntax match redifFieldPrimaryDefunct /^Primary-Defunct:/ skipwhite skipempty nextgroup=redifArgumentPrimaryDefunct contained syntax match redifFieldPrimaryEmail /^Primary-Email:/ skipwhite skipempty nextgroup=redifArgumentPrimaryEmail contained syntax match redifFieldPrimaryFax /^Primary-Fax:/ skipwhite skipempty nextgroup=redifArgumentPrimaryFax contained syntax match redifFieldPrimaryHomepage /^Primary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentPrimaryHomepage contained syntax match redifFieldPrimaryInstitution /^Primary-Institution:/ skipwhite skipempty nextgroup=redifArgumentPrimaryInstitution contained syntax match redifFieldPrimaryLocation /^Primary-Location:/ skipwhite skipempty nextgroup=redifArgumentPrimaryLocation contained syntax match redifFieldPrimaryName /^Primary-Name:/ skipwhite skipempty nextgroup=redifArgumentPrimaryName contained syntax match redifFieldPrimaryNameEnglish /^Primary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentPrimaryNameEnglish contained syntax match redifFieldPrimaryPhone /^Primary-Phone:/ skipwhite skipempty nextgroup=redifArgumentPrimaryPhone contained syntax match redifFieldPrimaryPostal /^Primary-Postal:/ skipwhite skipempty nextgroup=redifArgumentPrimaryPostal contained syntax match redifFieldProgrammingLanguage /^Programming-Language:/ skipwhite skipempty nextgroup=redifArgumentProgrammingLanguage contained syntax match redifFieldProviderEmail /^Provider-Email:/ skipwhite skipempty nextgroup=redifArgumentProviderEmail contained syntax match redifFieldProviderFax /^Provider-Fax:/ skipwhite skipempty nextgroup=redifArgumentProviderFax contained syntax match redifFieldProviderHomepage /^Provider-Homepage:/ skipwhite skipempty nextgroup=redifArgumentProviderHomepage contained syntax match redifFieldProviderInstitution /^Provider-Institution:/ skipwhite skipempty nextgroup=redifArgumentProviderInstitution contained syntax match redifFieldProviderLocation /^Provider-Location:/ skipwhite skipempty nextgroup=redifArgumentProviderLocation contained syntax match redifFieldProviderName /^Provider-Name:/ skipwhite skipempty nextgroup=redifArgumentProviderName contained syntax match redifFieldProviderNameEnglish /^Provider-Name-English:/ skipwhite skipempty nextgroup=redifArgumentProviderNameEnglish contained syntax match redifFieldProviderPhone /^Provider-Phone:/ skipwhite skipempty nextgroup=redifArgumentProviderPhone contained syntax match redifFieldProviderPostal /^Provider-Postal:/ skipwhite skipempty nextgroup=redifArgumentProviderPostal contained syntax match redifFieldPublicationDate /^Publication-Date:/ skipwhite skipempty nextgroup=redifArgumentPublicationDate contained syntax match redifFieldPublicationStatus /^Publication-Status:/ skipwhite skipempty nextgroup=redifArgumentPublicationStatus contained syntax match redifFieldPublicationType /^Publication-Type:/ skipwhite skipempty nextgroup=redifArgumentPublicationType contained syntax match redifFieldQuaternaryEmail /^Quaternary-Email:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryEmail contained syntax match redifFieldQuaternaryFax /^Quaternary-Fax:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryFax contained syntax match redifFieldQuaternaryHomepage /^Quaternary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryHomepage contained syntax match redifFieldQuaternaryInstitution /^Quaternary-Institution:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryInstitution contained syntax match redifFieldQuaternaryLocation /^Quaternary-Location:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryLocation contained syntax match redifFieldQuaternaryName /^Quaternary-Name:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryName contained syntax match redifFieldQuaternaryNameEnglish /^Quaternary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryNameEnglish contained syntax match redifFieldQuaternaryPhone /^Quaternary-Phone:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryPhone contained syntax match redifFieldQuaternaryPostal /^Quaternary-Postal:/ skipwhite skipempty nextgroup=redifArgumentQuaternaryPostal contained syntax match redifFieldRegisteredDate /^Registered-Date:/ skipwhite skipempty nextgroup=redifArgumentRegisteredDate contained syntax match redifFieldRequires /^Requires:/ skipwhite skipempty nextgroup=redifArgumentRequires contained syntax match redifFieldRestriction /^Restriction:/ skipwhite skipempty nextgroup=redifArgumentRestriction contained syntax match redifFieldRevisionDate /^Revision-Date:/ skipwhite skipempty nextgroup=redifArgumentRevisionDate contained syntax match redifFieldSecondaryDefunct /^Secondary-Defunct:/ skipwhite skipempty nextgroup=redifArgumentSecondaryDefunct contained syntax match redifFieldSecondaryEmail /^Secondary-Email:/ skipwhite skipempty nextgroup=redifArgumentSecondaryEmail contained syntax match redifFieldSecondaryFax /^Secondary-Fax:/ skipwhite skipempty nextgroup=redifArgumentSecondaryFax contained syntax match redifFieldSecondaryHomepage /^Secondary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentSecondaryHomepage contained syntax match redifFieldSecondaryInstitution /^Secondary-Institution:/ skipwhite skipempty nextgroup=redifArgumentSecondaryInstitution contained syntax match redifFieldSecondaryLocation /^Secondary-Location:/ skipwhite skipempty nextgroup=redifArgumentSecondaryLocation contained syntax match redifFieldSecondaryName /^Secondary-Name:/ skipwhite skipempty nextgroup=redifArgumentSecondaryName contained syntax match redifFieldSecondaryNameEnglish /^Secondary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentSecondaryNameEnglish contained syntax match redifFieldSecondaryPhone /^Secondary-Phone:/ skipwhite skipempty nextgroup=redifArgumentSecondaryPhone contained syntax match redifFieldSecondaryPostal /^Secondary-Postal:/ skipwhite skipempty nextgroup=redifArgumentSecondaryPostal contained syntax match redifFieldSeries /^Series:/ skipwhite skipempty nextgroup=redifArgumentSeries contained syntax match redifFieldShortId /^Short-Id:/ skipwhite skipempty nextgroup=redifArgumentShortId contained syntax match redifFieldSize /^Size:/ skipwhite skipempty nextgroup=redifArgumentSize contained syntax match redifFieldSoftwareHandle /^Software-Handle:/ skipwhite skipempty nextgroup=redifArgumentSoftwareHandle contained syntax match redifFieldTemplateType /^Template-Type:/ skipwhite skipempty nextgroup=redifArgumentTemplateType contained syntax match redifFieldTertiaryDefunct /^Tertiary-Defunct:/ skipwhite skipempty nextgroup=redifArgumentTertiaryDefunct contained syntax match redifFieldTertiaryEmail /^Tertiary-Email:/ skipwhite skipempty nextgroup=redifArgumentTertiaryEmail contained syntax match redifFieldTertiaryFax /^Tertiary-Fax:/ skipwhite skipempty nextgroup=redifArgumentTertiaryFax contained syntax match redifFieldTertiaryHomepage /^Tertiary-Homepage:/ skipwhite skipempty nextgroup=redifArgumentTertiaryHomepage contained syntax match redifFieldTertiaryInstitution /^Tertiary-Institution:/ skipwhite skipempty nextgroup=redifArgumentTertiaryInstitution contained syntax match redifFieldTertiaryLocation /^Tertiary-Location:/ skipwhite skipempty nextgroup=redifArgumentTertiaryLocation contained syntax match redifFieldTertiaryName /^Tertiary-Name:/ skipwhite skipempty nextgroup=redifArgumentTertiaryName contained syntax match redifFieldTertiaryNameEnglish /^Tertiary-Name-English:/ skipwhite skipempty nextgroup=redifArgumentTertiaryNameEnglish contained syntax match redifFieldTertiaryPhone /^Tertiary-Phone:/ skipwhite skipempty nextgroup=redifArgumentTertiaryPhone contained syntax match redifFieldTertiaryPostal /^Tertiary-Postal:/ skipwhite skipempty nextgroup=redifArgumentTertiaryPostal contained syntax match redifFieldTitle /^Title:/ skipwhite skipempty nextgroup=redifArgumentTitle contained syntax match redifFieldType /^Type:/ skipwhite skipempty nextgroup=redifArgumentType contained syntax match redifFieldURL /^URL:/ skipwhite skipempty nextgroup=redifArgumentURL contained syntax match redifFieldVersion /^Version:/ skipwhite skipempty nextgroup=redifArgumentVersion contained syntax match redifFieldVolume /^Volume:/ skipwhite skipempty nextgroup=redifArgumentVolume contained syntax match redifFieldWorkplaceEmail /^Workplace-Email:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceEmail contained syntax match redifFieldWorkplaceFax /^Workplace-Fax:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceFax contained syntax match redifFieldWorkplaceHomepage /^Workplace-Homepage:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceHomepage contained syntax match redifFieldWorkplaceInstitution /^Workplace-Institution:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceInstitution contained syntax match redifFieldWorkplaceLocation /^Workplace-Location:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceLocation contained syntax match redifFieldWorkplaceName /^Workplace-Name:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceName contained syntax match redifFieldWorkplaceNameEnglish /^Workplace-Name-English:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceNameEnglish contained syntax match redifFieldWorkplaceOrganization /^Workplace-Organization:/ skipwhite skipempty nextgroup=redifArgumentWorkplaceOrganization contained syntax match redifFieldWorkplacePhone /^Workplace-Phone:/ skipwhite skipempty nextgroup=redifArgumentWorkplacePhone contained syntax match redifFieldWorkplacePostal /^Workplace-Postal:/ skipwhite skipempty nextgroup=redifArgumentWorkplacePostal contained syntax match redifFieldYear /^Year:/ skipwhite skipempty nextgroup=redifArgumentYear contained highlight def link redifFieldAbstract redifField highlight def link redifFieldArticleHandle redifField highlight def link redifFieldAuthorArticle redifField highlight def link redifFieldAuthorBook redifField highlight def link redifFieldAuthorChapter redifField highlight def link redifFieldAuthorEmail redifField highlight def link redifFieldAuthorFax redifField highlight def link redifFieldAuthorHomepage redifField highlight def link redifFieldAuthorName redifField highlight def link redifFieldAuthorNameFirst redifField highlight def link redifFieldAuthorNameLast redifField highlight def link redifFieldAuthorPaper redifField highlight def link redifFieldAuthorPerson redifField highlight def link redifFieldAuthorPhone redifField highlight def link redifFieldAuthorPostal redifField highlight def link redifFieldAuthorSoftware redifField highlight def link redifFieldAuthorWorkplaceEmail redifField highlight def link redifFieldAuthorWorkplaceFax redifField highlight def link redifFieldAuthorWorkplaceHomepage redifField highlight def link redifFieldAuthorWorkplaceInstitution redifField highlight def link redifFieldAuthorWorkplaceLocation redifField highlight def link redifFieldAuthorWorkplaceName redifField highlight def link redifFieldAuthorWorkplaceNameEnglish redifField highlight def link redifFieldAuthorWorkplacePhone redifField highlight def link redifFieldAuthorWorkplacePostal redifField highlight def link redifFieldAvailability redifField highlight def link redifFieldBookHandle redifField highlight def link redifFieldBookTitle redifField highlight def link redifFieldChapterHandle redifField highlight def link redifFieldChapter redifField highlight def link redifFieldClassificationJEL redifField highlight def link redifFieldContactEmail redifField highlight def link redifFieldCreationDate redifField highlight def link redifFieldDescription redifField highlight def link redifFieldEdition redifField highlight def link redifFieldEditorBook redifField highlight def link redifFieldEditorEmail redifField highlight def link redifFieldEditorFax redifField highlight def link redifFieldEditorHomepage redifField highlight def link redifFieldEditorName redifField highlight def link redifFieldEditorNameFirst redifField highlight def link redifFieldEditorNameLast redifField highlight def link redifFieldEditorPerson redifField highlight def link redifFieldEditorPhone redifField highlight def link redifFieldEditorPostal redifField highlight def link redifFieldEditorSeries redifField highlight def link redifFieldEditorWorkplaceEmail redifField highlight def link redifFieldEditorWorkplaceFax redifField highlight def link redifFieldEditorWorkplaceHomepage redifField highlight def link redifFieldEditorWorkplaceInstitution redifField highlight def link redifFieldEditorWorkplaceLocation redifField highlight def link redifFieldEditorWorkplaceName redifField highlight def link redifFieldEditorWorkplaceNameEnglish redifField highlight def link redifFieldEditorWorkplacePhone redifField highlight def link redifFieldEditorWorkplacePostal redifField highlight def link redifFieldEmail redifField highlight def link redifFieldFax redifField highlight def link redifFieldFileFormat redifField highlight def link redifFieldFileFunction redifField highlight def link redifFieldFileRestriction redifField highlight def link redifFieldFileSize redifField highlight def link redifFieldFileURL redifField highlight def link redifFieldFollowup redifField highlight def link redifFieldHandleOfArchive redifField highlight def link redifFieldHandleOfInstitution redifField highlight def link redifFieldHandleOfPerson redifField highlight def link redifFieldHandleOfSeries redifField highlight def link redifFieldHandleOfWork redifField highlight def link redifFieldHasChapter redifField highlight def link redifFieldHomepage redifField highlight def link redifFieldInBook redifField highlight def link redifFieldISBN redifField highlight def link redifFieldISSN redifField highlight def link redifFieldIssue redifField highlight def link redifFieldJournal redifField highlight def link redifFieldKeywords redifField highlight def link redifFieldKeywords redifField highlight def link redifFieldLanguage redifField highlight def link redifFieldLastLoginDate redifField highlight def link redifFieldLength redifField highlight def link redifFieldMaintainerEmail redifField highlight def link redifFieldMaintainerFax redifField highlight def link redifFieldMaintainerName redifField highlight def link redifFieldMaintainerPhone redifField highlight def link redifFieldMonth redifField highlight def link redifFieldNameASCII redifField highlight def link redifFieldNameFirst redifField highlight def link redifFieldNameFull redifField highlight def link redifFieldNameLast redifField highlight def link redifFieldNameMiddle redifField highlight def link redifFieldNamePrefix redifField highlight def link redifFieldNameSuffix redifField highlight def link redifFieldName redifField highlight def link redifFieldNote redifField highlight def link redifFieldNotification redifField highlight def link redifFieldNumber redifField highlight def link redifFieldOrderEmail redifField highlight def link redifFieldOrderHomepage redifField highlight def link redifFieldOrderPostal redifField highlight def link redifFieldOrderURL redifField highlight def link redifFieldPages redifField highlight def link redifFieldPaperHandle redifField highlight def link redifFieldPhone redifField highlight def link redifFieldPostal redifField highlight def link redifFieldPredecessor redifField highlight def link redifFieldPrice redifField highlight def link redifFieldPrimaryDefunct redifField highlight def link redifFieldPrimaryEmail redifField highlight def link redifFieldPrimaryFax redifField highlight def link redifFieldPrimaryHomepage redifField highlight def link redifFieldPrimaryInstitution redifField highlight def link redifFieldPrimaryLocation redifField highlight def link redifFieldPrimaryName redifField highlight def link redifFieldPrimaryNameEnglish redifField highlight def link redifFieldPrimaryPhone redifField highlight def link redifFieldPrimaryPostal redifField highlight def link redifFieldProgrammingLanguage redifField highlight def link redifFieldProviderEmail redifField highlight def link redifFieldProviderFax redifField highlight def link redifFieldProviderHomepage redifField highlight def link redifFieldProviderInstitution redifField highlight def link redifFieldProviderLocation redifField highlight def link redifFieldProviderName redifField highlight def link redifFieldProviderNameEnglish redifField highlight def link redifFieldProviderPhone redifField highlight def link redifFieldProviderPostal redifField highlight def link redifFieldPublicationDate redifField highlight def link redifFieldPublicationStatus redifField highlight def link redifFieldPublicationType redifField highlight def link redifFieldQuaternaryEmail redifField highlight def link redifFieldQuaternaryFax redifField highlight def link redifFieldQuaternaryHomepage redifField highlight def link redifFieldQuaternaryInstitution redifField highlight def link redifFieldQuaternaryLocation redifField highlight def link redifFieldQuaternaryName redifField highlight def link redifFieldQuaternaryNameEnglish redifField highlight def link redifFieldQuaternaryPhone redifField highlight def link redifFieldQuaternaryPostal redifField highlight def link redifFieldRegisteredDate redifField highlight def link redifFieldRequires redifField highlight def link redifFieldRestriction redifField highlight def link redifFieldRevisionDate redifField highlight def link redifFieldSecondaryDefunct redifField highlight def link redifFieldSecondaryEmail redifField highlight def link redifFieldSecondaryFax redifField highlight def link redifFieldSecondaryHomepage redifField highlight def link redifFieldSecondaryInstitution redifField highlight def link redifFieldSecondaryLocation redifField highlight def link redifFieldSecondaryName redifField highlight def link redifFieldSecondaryNameEnglish redifField highlight def link redifFieldSecondaryPhone redifField highlight def link redifFieldSecondaryPostal redifField highlight def link redifFieldSeries redifField highlight def link redifFieldShortId redifField highlight def link redifFieldSize redifField highlight def link redifFieldSoftwareHandle redifField highlight def link redifFieldTemplateType redifField highlight def link redifFieldTertiaryDefunct redifField highlight def link redifFieldTertiaryEmail redifField highlight def link redifFieldTertiaryFax redifField highlight def link redifFieldTertiaryHomepage redifField highlight def link redifFieldTertiaryInstitution redifField highlight def link redifFieldTertiaryLocation redifField highlight def link redifFieldTertiaryName redifField highlight def link redifFieldTertiaryNameEnglish redifField highlight def link redifFieldTertiaryPhone redifField highlight def link redifFieldTertiaryPostal redifField highlight def link redifFieldTitle redifField highlight def link redifFieldTitle redifField highlight def link redifFieldType redifField highlight def link redifFieldURL redifField highlight def link redifFieldVersion redifField highlight def link redifFieldVolume redifField highlight def link redifFieldWorkplaceEmail redifField highlight def link redifFieldWorkplaceFax redifField highlight def link redifFieldWorkplaceHomepage redifField highlight def link redifFieldWorkplaceInstitution redifField highlight def link redifFieldWorkplaceLocation redifField highlight def link redifFieldWorkplaceName redifField highlight def link redifFieldWorkplaceNameEnglish redifField highlight def link redifFieldWorkplaceOrganization redifField highlight def link redifFieldWorkplacePhone redifField highlight def link redifFieldWorkplacePostal redifField highlight def link redifFieldYear redifField " Deprecated " same as Provider-* " nextgroup=redifArgumentProvider* syntax match redifFieldPublisherEmail /^Publisher-Email:/ skipwhite skipempty nextgroup=redifArgumentProviderEmail contained syntax match redifFieldPublisherFax /^Publisher-Fax:/ skipwhite skipempty nextgroup=redifArgumentProviderFax contained syntax match redifFieldPublisherHomepage /^Publisher-Homepage:/ skipwhite skipempty nextgroup=redifArgumentProviderHomepage contained syntax match redifFieldPublisherInstitution /^Publisher-Institution:/ skipwhite skipempty nextgroup=redifArgumentProviderInstitution contained syntax match redifFieldPublisherLocation /^Publisher-Location:/ skipwhite skipempty nextgroup=redifArgumentProviderLocation contained syntax match redifFieldPublisherName /^Publisher-Name:/ skipwhite skipempty nextgroup=redifArgumentProviderName contained syntax match redifFieldPublisherNameEnglish /^Publisher-Name-English:/ skipwhite skipempty nextgroup=redifArgumentProviderNameEnglish contained syntax match redifFieldPublisherPhone /^Publisher-Phone:/ skipwhite skipempty nextgroup=redifArgumentProviderPhone contained syntax match redifFieldPublisherPostal /^Publisher-Postal:/ skipwhite skipempty nextgroup=redifArgumentProviderPostal contained highlight def link redifFieldPublisherEmail redifFieldDeprecated highlight def link redifFieldPublisherFax redifFieldDeprecated highlight def link redifFieldPublisherHomepage redifFieldDeprecated highlight def link redifFieldPublisherInstitution redifFieldDeprecated highlight def link redifFieldPublisherLocation redifFieldDeprecated highlight def link redifFieldPublisherName redifFieldDeprecated highlight def link redifFieldPublisherNameEnglish redifFieldDeprecated highlight def link redifFieldPublisherPhone redifFieldDeprecated highlight def link redifFieldPublisherPostal redifFieldDeprecated " Standard arguments " By default, they contain all the argument until another field is started: " start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 " For arguments that must not span more than one line, use a match: " /\%(^\S\{-}:\)\@!\S.*/ " AND ADD "display" " This is faster. " " Those arguments are not highlighted so far. They are here for future " extensions. " TODO Find more RegEx for these arguments " TODO Fax, Phone " TODO URL, Homepage " TODO Keywords " TODO Classification-JEL " TODO Short-Id, Author-Person, Editor-Person " " Arguments that may span several lines: syntax region redifArgumentAuthorWorkplaceLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorWorkplacePostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorWorkplacePostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentFileFunction start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentIssue start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentJournal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentOrderPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentPrice start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentPrimaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentPrimaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentProviderLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentProviderPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentQuaternaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentQuaternaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentRequires start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentSecondaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentSecondaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentSize start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentTertiaryLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentTertiaryPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentVersion start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentWorkplaceLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentWorkplacePhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentWorkplacePostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained " Arguments that may not span several lines: " If you are sure that these arguments cannot span several lines, change " them to a match: " /\%(^\S\{-}:\)\@!\S.*/ " AND ADD "display" after "contained" " You can use this command on each line that you want to change: " :s+\Vregion \(\w\+\) start=/\\%(^\\S\\{-}:\\)\\@!\\S/ end=/^\\S\\{-}:/me=s-1 contained+match \1 /\\%(^\\S\\{-}:\\)\\@!\\S.*/ contained display syntax region redifArgumentAuthorFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorNameFirst start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorNameLast start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorPerson start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorPostal start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorWorkplaceFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorWorkplaceHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorWorkplaceName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorWorkplaceNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentAuthorWorkplacePhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorNameFirst start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorNameLast start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorPerson start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorWorkplaceFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorWorkplaceHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorWorkplaceLocation start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorWorkplaceName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorWorkplaceNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentEditorWorkplacePhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentFileURL start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentMaintainerFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentMaintainerName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentMaintainerPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentNameFirst start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentNameFull start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentNameLast start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentNameMiddle start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentNamePrefix start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentNameSuffix start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentNumber start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentOrderHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentOrderURL start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentPrimaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentPrimaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentPrimaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentPrimaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentPrimaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentProviderFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentProviderHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentProviderName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentProviderNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentProviderPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentQuaternaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentQuaternaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentQuaternaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentQuaternaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentQuaternaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentSecondaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentSecondaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentSecondaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentSecondaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentSecondaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentSeries start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentShortId start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentTertiaryFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentTertiaryHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentTertiaryName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentTertiaryNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentTertiaryPhone start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentURL start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentWorkplaceFax start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentWorkplaceHomepage start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentWorkplaceName start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentWorkplaceNameEnglish start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained syntax region redifArgumentWorkplaceOrganization start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contained " Special arguments " Those arguments require special values " TODO Improve some RegEx " TODO Improve Emails " TODO Improve ISBN " TODO Improve ISSN " TODO Improve spell check (add words from economics. " expl=macroeconometrics, Schumpeterian, IS-LM, etc.) " " Template-Type syntax match redifArgumentTemplateType /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectTemplateType contained display syntax match redifCorrectTemplateType /ReDIF-\%(Paper\|Article\|Chapter\|Book\|Software\|Archive\|Series\|Institution\|Person\)/ nextgroup=redifTemplateVersionNumberContainer contained display syntax match redifTemplateVersionNumberContainer /.\+/ contains=redifTemplateVersionNumber contained display syntax match redifTemplateVersionNumber / \d\+\.\d\+/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentTemplateType redifError highlight def link redifCorrectTemplateType Constant highlight def link redifTemplateVersionNumber Number highlight def link redifTemplateVersionNumberContainer redifError " Handles: " " Handles of Works: syntax match redifArgumentHandleOfWork /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentAuthorArticle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentAuthorBook /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentAuthorChapter /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentAuthorPaper /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentAuthorSoftware /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentEditorBook /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentEditorSeries /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentInBook /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentHasChapter /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentArticleHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentBookHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentChapterHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentPaperHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifArgumentSoftwareHandle /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfWork contained display syntax match redifCorrectHandleOfWork /RePEc:\a\a\a:\%(_\@!\w\)\{6}:\S\+/ contains=redifForbiddenCharactersInHandle,redifBestPracticeInHandle nextgroup=redifWrongLineEnding contained display " TODO Are those characters really forbidden??? syntax match redifForbiddenCharactersInHandle /[\/*?"<>|]/ contained display syntax match redifBestPracticeInHandle /\<\%([vi]:[1-9]\d*\|y:[1-9]\d\{3}\|p:[1-9]\d*-[1-9]\d*\|i:\%(jan\|feb\|mar\|apr\|may\|jun\|jul\|aug\|sep\|oct\|nov\|dec\|spr\|sum\|aut\|win\|spe\|Q[1-4]\|\d\d-\d\d\)\|Q:[1-4]\)\>/ contained display highlight def link redifArgumentHandleOfWork redifError highlight def link redifArgumentAuthorArticle redifError highlight def link redifArgumentAuthorBook redifError highlight def link redifArgumentAuthorChapter redifError highlight def link redifArgumentAuthorPaper redifError highlight def link redifArgumentAuthorSoftware redifError highlight def link redifArgumentEditorBook redifError highlight def link redifArgumentEditorSeries redifError highlight def link redifArgumentInBook redifError highlight def link redifArgumentHasChapter redifError highlight def link redifArgumentArticleHandle redifError highlight def link redifArgumentBookHandle redifError highlight def link redifArgumentChapterHandle redifError highlight def link redifArgumentPaperHandle redifError highlight def link redifArgumentSoftwareHandle redifError highlight def link redifForbiddenCharactersInHandle redifError highlight def link redifBestPracticeInHandle redifSpecial " Handles of Series: syntax match redifArgumentHandleOfSeries /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfSeries contained display syntax match redifArgumentFollowup /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfSeries contained display syntax match redifArgumentPredecessor /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfSeries contained display syntax match redifCorrectHandleOfSeries /RePEc:\a\a\a:\%(_\@!\w\)\{6}/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentHandleOfSeries redifError highlight def link redifArgumentFollowup redifError highlight def link redifArgumentPredecessor redifError " Handles of Archives: syntax match redifArgumentHandleOfArchive /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfArchive contained display syntax match redifCorrectHandleOfArchive /RePEc:\a\a\a/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentHandleOfArchive redifError " Handles of Person: syntax match redifArgumentHandleOfPerson /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfPerson contained display syntax match redifCorrectHandleOfPerson /\%(\%(:\@!\S\)\{-}:\)\{2}[1-9]\d\{3}\%(-02\%(-[12]\d\|-0[1-9]\)\|-\%(0[469]\|11\)\%(-30\|-[12]\d\|-0[1-9]\)\|-\%(0[13578]\|1[02]\)\%(-3[01]\|-[12]\d\|-0[1-9]\)\):\S\+/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentHandleOfPerson redifError " Handles of Institution: syntax match redifArgumentAuthorWorkplaceInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentEditorWorkplaceInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentPrimaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentProviderInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentPublisherInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentQuaternaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentSecondaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentTertiaryInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentWorkplaceInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentHandleOfInstitution /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentPrimaryDefunct /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentSecondaryDefunct /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display syntax match redifArgumentTertiaryDefunct /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectHandleOfInstitution contained display " TODO Are digits authorized? Apparently not. " Country codes: " http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm syntax match redifCorrectHandleOfInstitution /RePEc:\a\a\a:\a\{5}\(ea\|af\|ax\|al\|dz\|as\|ad\|ao\|ai\|aq\|ag\|ar\|am\|aw\|au\|at\|az\|bs\|bh\|bd\|bb\|by\|be\|bz\|bj\|bm\|bt\|bo\|bq\|ba\|bw\|bv\|br\|io\|bn\|bg\|bf\|bi\|kh\|cm\|ca\|cv\|ky\|cf\|td\|cl\|cn\|cx\|cc\|co\|km\|cg\|cd\|ck\|cr\|ci\|hr\|cu\|cw\|cy\|cz\|dk\|dj\|dm\|do\|ec\|eg\|sv\|gq\|er\|ee\|et\|fk\|fo\|fj\|fi\|fr\|gf\|pf\|tf\|ga\|gm\|ge\|de\|gh\|gi\|gr\|gl\|gd\|gp\|gu\|gt\|gg\|gn\|gw\|gy\|ht\|hm\|va\|hn\|hk\|hu\|is\|in\|id\|ir\|iq\|ie\|im\|il\|it\|jm\|jp\|je\|jo\|kz\|ke\|ki\|kp\|kr\|kw\|kg\|la\|lv\|lb\|ls\|lr\|ly\|li\|lt\|lu\|mo\|mk\|mg\|mw\|my\|mv\|ml\|mt\|mh\|mq\|mr\|mu\|yt\|mx\|fm\|md\|mc\|mn\|me\|ms\|ma\|mz\|mm\|na\|nr\|np\|nl\|nc\|nz\|ni\|ne\|ng\|nu\|nf\|mp\|no\|om\|pk\|pw\|ps\|pa\|pg\|py\|pe\|ph\|pn\|pl\|pt\|pr\|qa\|re\|ro\|ru\|rw\|bl\|sh\|kn\|lc\|mf\|pm\|vc\|ws\|sm\|st\|sa\|sn\|rs\|sc\|sl\|sg\|sx\|sk\|si\|sb\|so\|za\|gs\|ss\|es\|lk\|sd\|sr\|sj\|sz\|se\|ch\|sy\|tw\|tj\|tz\|th\|tl\|tg\|tk\|to\|tt\|tn\|tr\|tm\|tc\|tv\|ug\|ua\|ae\|gb\|us\|um\|uy\|uz\|vu\|ve\|vn\|vg\|vi\|wf\|eh\|ye\|zm\|zw\)/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentHandleOfInstitution redifError highlight def link redifArgumentPrimaryDefunct redifError highlight def link redifArgumentSecondaryDefunct redifError highlight def link redifArgumentTertiaryDefunct redifError " Emails: syntax match redifArgumentAuthorEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentAuthorWorkplaceEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentContactEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentEditorEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentEditorWorkplaceEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentMaintainerEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentOrderEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentPrimaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentProviderEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentPublisherEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentQuaternaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentSecondaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentTertiaryEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifArgumentWorkplaceEmail /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectEmail contained display syntax match redifCorrectEmail /\%(@\@!\S\)\+@\%(@\@!\S\)\+/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentAuthorEmail redifError highlight def link redifArgumentAuthorWorkplaceEmail redifError highlight def link redifArgumentContactEmail redifError highlight def link redifArgumentEditorEmail redifError highlight def link redifArgumentEditorWorkplaceEmail redifError highlight def link redifArgumentEmail redifError highlight def link redifArgumentMaintainerEmail redifError highlight def link redifArgumentOrderEmail redifError highlight def link redifArgumentPrimaryEmail redifError highlight def link redifArgumentProviderEmail redifError highlight def link redifArgumentPublisherEmail redifError highlight def link redifArgumentQuaternaryEmail redifError highlight def link redifArgumentSecondaryEmail redifError highlight def link redifArgumentTertiaryEmail redifError highlight def link redifArgumentWorkplaceEmail redifError " Language " Source: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes syntax match redifArgumentLanguage /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectLanguage contained display syntax match redifCorrectLanguage /\<\(aa\|ab\|af\|ak\|als\|am\|an\|ang\|ar\|arc\|as\|ast\|av\|ay\|az\|ba\|bar\|bat-smg\|bcl\|be\|be-x-old\|bg\|bh\|bi\|bm\|bn\|bo\|bpy\|br\|bs\|bug\|bxr\|ca\|ce\|ceb\|ch\|cho\|chr\|chy\|co\|cr\|cs\|csb\|cu\|cv\|cy\|da\|de\|diq\|dsb\|dv\|dz\|ee\|el\|en\|eo\|es\|et\|eu\|ext\|fa\|ff\|fi\|fiu-vro\|fj\|fo\|fr\|frp\|fur\|fy\|ga\|gd\|gil\|gl\|gn\|got\|gu\|gv\|ha\|haw\|he\|hi\|ho\|hr\|ht\|hu\|hy\|hz\|ia\|id\|ie\|ig\|ii\|ik\|ilo\|io\|is\|it\|iu\|ja\|jbo\|jv\|ka\|kg\|ki\|kj\|kk\|kl\|km\|kn\|khw\|ko\|kr\|ks\|ksh\|ku\|kv\|kw\|ky\|la\|lad\|lan\|lb\|lg\|li\|lij\|lmo\|ln\|lo\|lt\|lv\|map-bms\|mg\|mh\|mi\|mk\|ml\|mn\|mo\|mr\|ms\|mt\|mus\|my\|na\|nah\|nap\|nd\|nds\|nds-nl\|ne\|new\|ng\|nl\|nn\|no\|nr\|nso\|nrm\|nv\|ny\|oc\|oj\|om\|or\|os\|pa\|pag\|pam\|pap\|pdc\|pi\|pih\|pl\|pms\|ps\|pt\|qu\|rm\|rmy\|rn\|ro\|roa-rup\|ru\|rw\|sa\|sc\|scn\|sco\|sd\|se\|sg\|sh\|si\|simple\|sk\|sl\|sm\|sn\|so\|sq\|sr\|ss\|st\|su\|sv\|sw\|ta\|te\|tet\|tg\|th\|ti\|tk\|tl\|tlh\|tn\|to\|tpi\|tr\|ts\|tt\|tum\|tw\|ty\|udm\|ug\|uk\|ur\|uz\|ve\|vi\|vec\|vls\|vo\|wa\|war\|wo\|xal\|xh\|yi\|yo\|za\|zh\|zh-min-nan\|zh-yue\|zu\)\>/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentLanguage redifError highlight def link redifCorrectLanguage redifSpecial " Length " Based on the example in the documentation. But apparently any field is " possible syntax region redifArgumentLength start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=redifGoodLength contained syntax match redifGoodLength /1 page\|[1-9]\d*\%( pages\)\=/ contained display highlight def link redifGoodLength redifSpecial " Publication-Type syntax match redifArgumentPublicationType /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectPublicationType contained display syntax match redifCorrectPublicationType /\<\(journal article\|book\|book chapter\|working paper\|conference paper\|report\|other\)\>/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentPublicationType redifError highlight def link redifCorrectPublicationType redifSpecial " Publication-Status syntax region redifArgumentPublicationStatus start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=redifSpecialPublicationStatus contained syntax match redifSpecialPublicationStatus /published\|forthcoming/ nextgroup=redifCorrectPublicationStatus contained display syntax region redifCorrectPublicationStatus start=/./ end=/^\S\{-}:/me=s-1 contained highlight def link redifArgumentPublicationStatus redifError highlight def link redifSpecialPublicationStatus redifSpecial " Month " TODO Are numbers also allowed? syntax match redifArgumentMonth /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodMonth contained display syntax match redifGoodMonth /\<\(Jan\%(uary\)\=\|Feb\%(ruary\)\=\|Mar\%(ch\)\=\|Apr\%(il\)\=\|May\|June\=\|July\=\|Aug\%(ust\)\=\|Sep\%(tember\)\=\|Oct\%(ober\)\=\|Nov\%(ember\)\=\|Dec\%(ember\)\=\)\>/ contained display highlight def link redifGoodMonth redifSpecial " Integers: Volume, Chapter syntax match redifArgumentVolume /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectInteger contained display syntax match redifArgumentChapter /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectInteger contained display syntax match redifCorrectInteger /[1-9]\d*/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentVolume redifError highlight def link redifArgumentChapter redifError " Year syntax match redifArgumentYear /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectYear contained display syntax match redifCorrectYear /[1-9]\d\{3}/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentYear redifError " Edition " Based on the example in the documentation. syntax match redifArgumentEdition /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodEdition contained display syntax match redifGoodEdition /1st\|2nd\|3rd\|[4-9]th\|[1-9]\d*\%(1st\|2nd\|3rd\|[4-9]th\)\|[1-9]\d*/ contained display highlight def link redifGoodEdition redifSpecial " ISBN syntax match redifArgumentISBN /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodISBN contained display syntax match redifGoodISBN /\d[0-9-]\{8,15}\d/ contained display highlight def link redifGoodISBN redifSpecial " ISSN syntax match redifArgumentISSN /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodISSN contained display syntax match redifGoodISSN /\d\{4}-\d\{3}[0-9X]/ contained display highlight def link redifGoodISSN redifSpecial " File-Size " Based on the example in the documentation. syntax region redifArgumentFileSize start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=redifGoodSize contained syntax match redifGoodSize /kb\|bytes/ contained display highlight def link redifGoodSize redifSpecial " Type syntax match redifArgumentType /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectType contained display syntax match redifCorrectType /ReDIF-Paper\|ReDIF-Software\|ReDIF-Article\|ReDIF-Chapter\|ReDIF-Book/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentType redifError highlight def link redifCorrectType redifSpecial " Dates: Publication-Date, Creation-Date, Revision-Date, " Last-Login-Date, Registration-Date syntax match redifArgumentCreationDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display syntax match redifArgumentLastLoginDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display syntax match redifArgumentPublicationDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display syntax match redifArgumentRegisteredDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display syntax match redifArgumentRevisionDate /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectDate contained display syntax match redifCorrectDate /[1-9]\d\{3}\%(-02\%(-[12]\d\|-0[1-9]\)\=\|-\%(0[469]\|11\)\%(-30\|-[12]\d\|-0[1-9]\)\=\|-\%(0[13578]\|1[02]\)\%(-3[01]\|-[12]\d\|-0[1-9]\)\=\)\=/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentCreationDate redifError highlight def link redifArgumentLastLoginDate redifError highlight def link redifArgumentPublicationDate redifError highlight def link redifArgumentRegisteredDate redifError highlight def link redifArgumentRevisionDate redifError " Classification-JEL syntax match redifArgumentClassificationJEL /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectJEL contained display syntax match redifCorrectJEL /\<\%(\u\d\{,2}[,; \t]\s*\)*\u\d\{,2}/ contains=redifSpecialJEL nextgroup=redifWrongLineEnding contained display syntax match redifSpecialJEL /\<\u\d\{,2}/ contained display highlight def link redifArgumentClassificationJEL redifError highlight def link redifSpecialJEL redifSpecial " Pages syntax match redifArgumentPages /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectPages contained display syntax match redifCorrectPages /[1-9]\d*-[1-9]\d*/ nextgroup=redifWrongLineEnding contained display highlight def link redifArgumentPages redifError " Name-ASCII syntax match redifArgumentNameASCII /\%(^\S\{-}:\)\@!\S.*/ contains=redifCorrectNameASCII contained display syntax match redifCorrectNameASCII /[ -~]/ contained display highlight def link redifArgumentNameASCII redifError " Programming-Language syntax match redifArgumentProgrammingLanguage /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodProgrammingLanguage contained display syntax match redifGoodProgrammingLanguage /\/ nextgroup=redifWrongLineEnding contained display highlight def link redifGoodProgrammingLanguage redifSpecial " File-Format " TODO The link in the documentation that gives the list of possible formats is broken. " ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types " These are based on the examples in the documentation. syntax match redifArgumentFileFormat /\%(^\S\{-}:\)\@!\S.*/ contains=redifGoodFormat contained display syntax match redifGoodFormat "\a\+/[[:alpha:]+-]\+" nextgroup=redifWrongLineEnding contains=redifSpecialFormat contained display syntax match redifSpecialFormat "application/atom+xml\|application/ecmascript\|application/EDI-X12\|application/EDIFACT\|application/json\|application/javascript\|application/octet-stream\|application/ogg\|application/pdf\|application/postscript\|application/rdf+xml\|application/rss+xml\|application/soap+xml\|application/font-woff\|application/xhtml+xml\|application/xml\|application/xml-dtd\|application/xop+xml\|application/zip\|application/gzip\|audio/basic\|audio/L24\|audio/mp4\|audio/mpeg\|audio/ogg\|audio/vorbis\|audio/vnd.rn-realaudio\|audio/vnd.wave\|audio/webm\|image/gif\|image/jpeg\|image/pjpeg\|image/png\|image/svg+xml\|image/tiff\|image/vnd.microsoft.icon\|message/http\|message/imdn+xml\|message/partial\|message/rfc822\|model/example\|model/iges\|model/mesh\|model/vrml\|model/x3d+binary\|model/x3d+vrml\|model/x3d+xml\|multipart/mixed\|multipart/alternative\|multipart/related\|multipart/form-data\|multipart/signed\|multipart/encrypted\|text/cmd\|text/css\|text/csv\|text/html\|text/javascript\|text/plain\|text/vcard\|text/xml\|video/mpeg\|video/mp4\|video/ogg\|video/quicktime\|video/webm\|video/x-matroska\|video/x-ms-wmv\|video/x-flv" contained display highlight def link redifSpecialFormat redifSpecial highlight def link redifArgumentFileFormat redifError " Keywords " Spell checked syntax match redifArgumentKeywords /\%(^\S\{-}:\)\@!\S.*/ contains=@Spell,redifKeywordsSemicolon contained syntax match redifKeywordsSemicolon /;/ contained highlight def link redifKeywordsSemicolon redifSpecial " Other spell-checked arguments " Very useful when copy-pasting abstracts that may contain hyphens or " ligatures. syntax region redifArgumentAbstract start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained syntax region redifArgumentAvailability start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained syntax region redifArgumentBookTitle start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained syntax region redifArgumentDescription start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained syntax region redifArgumentFileRestriction start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained syntax region redifArgumentNote start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained syntax region redifArgumentNotification start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained syntax region redifArgumentRestriction start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained syntax region redifArgumentTitle start=/\%(^\S\{-}:\)\@!\S/ end=/^\S\{-}:/me=s-1 contains=@Spell contained " Wrong line ending syntax match redifWrongLineEnding /.\+/ contained display highlight def link redifWrongLineEnding redifError " Final highlight highlight def link redifComment Comment highlight def link redifError Error highlight def link redifField Identifier highlight def link redifFieldDeprecated Identifier highlight def link redifSpecial Special " For deprecated fields: highlight redifFieldDeprecated term=undercurl cterm=undercurl gui=undercurl guisp=DarkGrey " Sync: The template-type (ReDIF-Paper, ReDIF-Archive, etc.) influences which " fields can follow. Thus sync must search backwards for it. " " I would like to simply ask VIM to search backward for the first occurrence of " /^Template-Type:/, but it does not seem to be possible, so I have to start " from the beginning of the file... This might slow down a lot for files that " contain a lot of Template-Type statements. syntax sync fromstart " The problem with syntax sync match (tried below), it is that, for example, " it cannot realize when it is inside a Author-Name cluster, which is inside a " Template-Type template... " " TODO Is this linecont pattern really useful? It seems to work anyway... "syntax sync linecont /^\(Template-Type:\)\=\s*$/ " TODO This sync is surprising... It seems to work on several lines even " though I replaced \_s* by \s*, even without the linecont pattern... "syntax sync match redifSyncForTemplatePaper groupthere redifRegionTemplatePaper /^Template-Type:\s*ReDIF-Paper \d\+\.\d\+/ "syntax sync match redifSyncForTemplateArticle groupthere redifRegionTemplateArticle /^Template-Type:\s*ReDIF-Article \d\+\.\d\+/ "syntax sync match redifSyncForTemplateChapter groupthere redifRegionTemplateChapter /^Template-Type:\s*ReDIF-Chapter \d\+\.\d\+/ "syntax sync match redifSyncForTemplateBook groupthere redifRegionTemplateBook /^Template-Type:\s*ReDIF-Book \d\+\.\d\+/ "syntax sync match redifSyncForTemplateSoftware groupthere redifRegionTemplateSoftware /^Template-Type:\s*ReDIF-Software \d\+\.\d\+/ "syntax sync match redifSyncForTemplateArchive groupthere redifRegionTemplateArchive /^Template-Type:\s*ReDIF-Archive \d\+\.\d\+/ "syntax sync match redifSyncForTemplateSeries groupthere redifRegionTemplateSeries /^Template-Type:\s*ReDIF-Series \d\+\.\d\+/ "syntax sync match redifSyncForTemplateInstitution groupthere redifRegionTemplateInstitution /^Template-Type:\s*ReDIF-Institution \d\+\.\d\+/ "syntax sync match redifSyncForTemplatePerson groupthere redifRegionTemplatePerson /^Template-Type:\s*ReDIF-Person \d\+\.\d\+/ " I do not really know how sync linebreaks works, but it helps when making " changes on the argument when this argument is not on the same line than its " field. I just assume that people won't leave more than one line of " whitespace between fields and arguments (which is already very unlikely) " hence the value of 2. syntax sync linebreaks=2 " Since folding is defined by the syntax, set foldmethod to syntax. set foldmethod=syntax " Set "b:current_syntax" to the name of the syntax at the end: let b:current_syntax="redif" neovim-0.2.2/runtime/syntax/registry.vim000066400000000000000000000064331320401574200204120ustar00rootroot00000000000000" Vim syntax file " Language: Windows Registry export with regedit (*.reg) " Maintainer: Dominique Stéphan (dominique@mggen.com) " URL: http://www.mggen.com/vim/syntax/registry.zip (doesn't work) " Last change: 2014 Oct 31 " Included patch from Alexander A. Ulitin " clear any unwanted syntax defs " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " shut case off syn case ignore " Head of regedit .reg files, it's REGEDIT4 on Win9#/NT syn match registryHead "^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$" " Comment syn match registryComment "^;.*$" " Registry Key constant syn keyword registryHKEY HKEY_LOCAL_MACHINE HKEY_CLASSES_ROOT HKEY_CURRENT_USER syn keyword registryHKEY HKEY_USERS HKEY_CURRENT_CONFIG HKEY_DYN_DATA " Registry Key shortcuts syn keyword registryHKEY HKLM HKCR HKCU HKU HKCC HKDD " Some values often found in the registry " GUID (Global Unique IDentifier) syn match registryGUID "{[0-9A-Fa-f]\{8}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{12}}" contains=registrySpecial " Disk " syn match registryDisk "[a-zA-Z]:\\\\" " Special and Separator characters syn match registrySpecial "\\" syn match registrySpecial "\\\\" syn match registrySpecial "\\\"" syn match registrySpecial "\." syn match registrySpecial "," syn match registrySpecial "\/" syn match registrySpecial ":" syn match registrySpecial "-" " String syn match registryString "\".*\"" contains=registryGUID,registrySpecial " Path syn region registryPath start="\[" end="\]" contains=registryHKEY,registryGUID,registrySpecial " Path to remove " like preceding path but with a "-" at begin syn region registryRemove start="\[\-" end="\]" contains=registryHKEY,registryGUID,registrySpecial " Subkey syn match registrySubKey "^\".*\"=" " Default value syn match registrySubKey "^@=" " Numbers " Hex or Binary " The format can be precised between () : " 0 REG_NONE " 1 REG_SZ " 2 REG_EXPAND_SZ " 3 REG_BINARY " 4 REG_DWORD, REG_DWORD_LITTLE_ENDIAN " 5 REG_DWORD_BIG_ENDIAN " 6 REG_LINK " 7 REG_MULTI_SZ " 8 REG_RESOURCE_LIST " 9 REG_FULL_RESOURCE_DESCRIPTOR " 10 REG_RESOURCE_REQUIREMENTS_LIST " The value can take several lines, if \ ends the line " The limit to 999 matches is arbitrary, it avoids Vim crashing on a very long " line of hex values that ends in a comma. "syn match registryHex "hex\(([0-9]\{0,2})\)\=:\([0-9a-fA-F]\{2},\)\{0,999}\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial syn match registryHex "hex\(([0-9]\{0,2})\)\=:\([0-9a-fA-F]\{2},\)*\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial syn match registryHex "^\s*\([0-9a-fA-F]\{2},\)\{0,999}\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial " Dword (32 bits) syn match registryDword "dword:[0-9a-fA-F]\{8}$" contains=registrySpecial " The default methods for highlighting. Can be overridden later hi def link registryComment Comment hi def link registryHead Constant hi def link registryHKEY Constant hi def link registryPath Special hi def link registryRemove PreProc hi def link registryGUID Identifier hi def link registrySpecial Special hi def link registrySubKey Type hi def link registryString String hi def link registryHex Number hi def link registryDword Number let b:current_syntax = "registry" " vim:ts=8 neovim-0.2.2/runtime/syntax/remind.vim000066400000000000000000000052311320401574200200130ustar00rootroot00000000000000" Vim syntax file " Language: Remind " Maintainer: Davide Alberani " Last Change: 02 Nov 2015 " Version: 0.7 " URL: http://ismito.it/vim/syntax/remind.vim " " Remind is a sophisticated calendar and alarm program. " You can download remind from: " https://www.roaringpenguin.com/products/remind " " Changelog " version 0.7: updated email and link " version 0.6: added THROUGH keyword (courtesy of Ben Orchard) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " shut case off. syn case ignore syn keyword remindCommands REM OMIT SET FSET UNSET syn keyword remindExpiry UNTIL FROM SCANFROM SCAN WARN SCHED THROUGH syn keyword remindTag PRIORITY TAG syn keyword remindTimed AT DURATION syn keyword remindMove ONCE SKIP BEFORE AFTER syn keyword remindSpecial INCLUDE INC BANNER PUSH-OMIT-CONTEXT PUSH CLEAR-OMIT-CONTEXT CLEAR POP-OMIT-CONTEXT POP COLOR syn keyword remindRun MSG MSF RUN CAL SATISFY SPECIAL PS PSFILE SHADE MOON syn keyword remindConditional IF ELSE ENDIF IFTRIG syn keyword remindDebug DEBUG DUMPVARS DUMP ERRMSG FLUSH PRESERVE syn match remindComment "#.*$" syn region remindString start=+'+ end=+'+ skip=+\\\\\|\\'+ oneline syn region remindString start=+"+ end=+"+ skip=+\\\\\|\\"+ oneline syn match remindVar "\$[_a-zA-Z][_a-zA-Z0-9]*" syn match remindSubst "%[^ ]" syn match remindAdvanceNumber "\(\*\|+\|-\|++\|--\)[0-9]\+" " XXX: use different separators for dates and times? syn match remindDateSeparators "[/:@\.-]" contained syn match remindTimes "[0-9]\{1,2}[:\.][0-9]\{1,2}" contains=remindDateSeparators " XXX: why not match only valid dates? Ok, checking for 'Feb the 30' would " be impossible, but at least check for valid months and times. syn match remindDates "'[0-9]\{4}[/-][0-9]\{1,2}[/-][0-9]\{1,2}\(@[0-9]\{1,2}[:\.][0-9]\{1,2}\)\?'" contains=remindDateSeparators " This will match trailing whitespaces that seem to break rem2ps. " Courtesy of Michael Dunn. syn match remindWarning display excludenl "\S\s\+$"ms=s+1 hi def link remindCommands Function hi def link remindExpiry Repeat hi def link remindTag Label hi def link remindTimed Statement hi def link remindMove Statement hi def link remindSpecial Include hi def link remindRun Function hi def link remindConditional Conditional hi def link remindComment Comment hi def link remindTimes String hi def link remindString String hi def link remindDebug Debug hi def link remindVar Identifier hi def link remindSubst Constant hi def link remindAdvanceNumber Number hi def link remindDateSeparators Comment hi def link remindDates String hi def link remindWarning Error let b:current_syntax = "remind" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/resolv.vim000066400000000000000000000057131320401574200200540ustar00rootroot00000000000000" Vim syntax file " Language: resolver configuration file " Maintainer: Radu Dineiu " URL: https://raw.github.com/rid9/vim-resolv/master/resolv.vim " Last Change: 2013 May 21 " Version: 1.0 " " Credits: " David Necas (Yeti) " Stefano Zacchiroli " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Errors, comments and operators syn match resolvError /./ syn match resolvComment /\s*[#;].*$/ syn match resolvOperator /[\/:]/ contained " IP syn cluster resolvIPCluster contains=resolvIPError,resolvIPSpecial syn match resolvIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained syn match resolvIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained " General syn match resolvIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@resolvIPCluster syn match resolvIPNetmask contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?/ contains=resolvOperator,@resolvIPCluster syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_\.]*/ " Particular syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\+/ contains=@resolvIPCluster syn match resolvHostnameSearch contained /\%(\%([-0-9A-Za-z_]\+\.\)*[-0-9A-Za-z_]\+\.\?\%(\s\|$\)\)\+/ syn match resolvIPNetmaskSortList contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?\%(\s\|$\)\)\+/ contains=resolvOperator,@resolvIPCluster " Identifiers syn match resolvNameserver /^\s*nameserver\>/ nextgroup=resolvIPNameserver skipwhite syn match resolvLwserver /^\s*lwserver\>/ nextgroup=resolvIPNameserver skipwhite syn match resolvDomain /^\s*domain\>/ nextgroup=resolvHostname skipwhite syn match resolvSearch /^\s*search\>/ nextgroup=resolvHostnameSearch skipwhite syn match resolvSortList /^\s*sortlist\>/ nextgroup=resolvIPNetmaskSortList skipwhite syn match resolvOptions /^\s*options\>/ nextgroup=resolvOption skipwhite " Options syn match resolvOption /\<\%(debug\|no_tld_query\|rotate\|no-check-names\|inet6\)\>/ contained nextgroup=resolvOption skipwhite syn match resolvOption /\<\%(ndots\|timeout\|attempts\):\d\+\>/ contained contains=resolvOperator nextgroup=resolvOption skipwhite " Additional errors syn match resolvError /^search .\{257,}/ hi def link resolvIP Number hi def link resolvIPNetmask Number hi def link resolvHostname String hi def link resolvOption String hi def link resolvIPNameserver Number hi def link resolvHostnameSearch String hi def link resolvIPNetmaskSortList Number hi def link resolvNameServer Identifier hi def link resolvLwserver Identifier hi def link resolvDomain Identifier hi def link resolvSearch Identifier hi def link resolvSortList Identifier hi def link resolvOptions Identifier hi def link resolvComment Comment hi def link resolvOperator Operator hi def link resolvError Error hi def link resolvIPError Error hi def link resolvIPSpecial Special let b:current_syntax = "resolv" " vim: ts=8 ft=vim neovim-0.2.2/runtime/syntax/reva.vim000066400000000000000000000166351320401574200175040ustar00rootroot00000000000000" Vim syntax file " Language: Reva Forth " Version: 2011.2 " Last Change: 2012/02/13 " Maintainer: Ron Aaron " URL: http://ronware.org/reva/ " Filetypes: *.rf *.frt " NOTE: You should also have the ftplugin/reva.vim file to set 'isk' " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn clear " Synchronization method syn sync ccomment syn sync maxlines=100 syn case ignore " Some special, non-FORTH keywords "syn keyword revaTodo contained todo fixme bugbug todo: bugbug: note: syn match revaTodo contained '\(todo\|fixme\|bugbug\|note\)[:]*' syn match revaTodo contained 'copyright\(\s(c)\)\=\(\s[0-9]\{2,4}\)\=' syn match revaHelpDesc '\S.*' contained syn match revaHelpStuff '\<\(def\|stack\|ctx\|ver\|os\|related\):\s.*' syn region revaHelpStuff start='\' end='^\S' contains=revaHelpDesc syn region revaEOF start='\<|||\>' end='{$}' contains=revaHelpStuff syn case match " basic mathematical and logical operators syn keyword revaoperators + - * / mod /mod negate abs min max umin umax syn keyword revaoperators and or xor not invert 1+ 1- syn keyword revaoperators m+ */ */mod m* um* m*/ um/mod fm/mod sm/rem syn keyword revaoperators d+ d- dnegate dabs dmin dmax > < = >> << u< <> " stack manipulations syn keyword revastack drop nip dup over tuck swap rot -rot ?dup pick roll syn keyword revastack 2drop 2nip 2dup 2over 2swap 2rot 3drop syn keyword revastack >r r> r@ rdrop " syn keyword revastack sp@ sp! rp@ rp! " address operations syn keyword revamemory @ ! +! c@ c! 2@ 2! align aligned allot allocate here free resize syn keyword revaadrarith chars char+ cells cell+ cell cell- 2cell+ 2cell- 3cell+ 4cell+ syn keyword revamemblks move fill " conditionals syn keyword revacond if else then =if >if if if0 ;; catch throw " iterations syn keyword revaloop while repeat until again syn keyword revaloop do loop i j leave unloop skip more " new words syn match revaColonDef '\ immediate syn keyword revadefine compile literal ' ['] " Built in words com! -nargs=+ Builtin syn keyword revaBuiltin Builtin execute ahead interp bye >body here pad words make Builtin accept close cr creat delete ekey emit fsize ioerr key? Builtin mtime open/r open/rw read rename seek space spaces stat Builtin tell type type_ write (seek) (argv) (save) 0; 0drop; Builtin >class >lz >name >xt alias alias: appname argc asciiz, asciizl, Builtin body> clamp depth disassemble findprev fnvhash getenv here, Builtin iterate last! last@ later link lz> lzmax os parse/ peek Builtin peek-n pop prior push put rp@ rpick save setenv slurp Builtin stack-empty? stack-iterate stack-size stack: THROW_BADFUNC Builtin THROW_BADLIB THROW_GENERIC used xt>size z, Builtin +lplace +place -chop /char /string bounds c+lplace c+place Builtin chop cmp cmpi count lc lcount lplace place quote rsplit search split Builtin zcount zt \\char Builtin chdir g32 k32 u32 getcwd getpid hinst osname stdin stdout Builtin (-lib) (bye) (call) (else) (find) (func) (here) (if (lib) (s0) (s^) Builtin (to~) (while) >in >rel ?literal appstart cold compiling? context? d0 default_class Builtin defer? dict dolstr dostr find-word h0 if) interp isa onexit Builtin onstartup pdoes pop>ebx prompt rel> rp0 s0 src srcstr state str0 then,> then> tib Builtin tp vector vector! word? xt? .ver revaver revaver# && '' 'constant 'context Builtin 'create 'defer 'does 'forth 'inline 'macro 'macront 'notail 'value 'variable Builtin (.r) (context) (create) (header) (hide) (inline) (p.r) (words~) (xfind) Builtin ++ -- , -2drop -2nip -link -swap . .2x .classes .contexts .funcs .libs .needs .r Builtin .rs .x 00; 0do 0if 1, 2, 3, 2* 2/ 2constant 2variable 3dup 4dup ;then >base >defer Builtin >rr ? ?do @execute @rem appdir argv as back base base! between chain cleanup-libs Builtin cmove> context?? ctrl-c ctx>name data: defer: defer@def dictgone do_cr eleave Builtin endcase endof eval exception exec false find func: header heapgone help help/ Builtin hex# hide inline{ last lastxt lib libdir literal, makeexename mnotail ms ms@ Builtin newclass noop nosavedict notail nul of off on p: padchar parse parseln Builtin parsews rangeof rdepth remains reset reva revaused rol8 rr> scratch setclass sp Builtin strof super> temp time&date true turnkey? undo vfunc: w! w@ Builtin xchg xchg2 xfind xt>name xwords { {{ }} } _+ _1+ _1- pathsep case \|| " p[ [''] [ ['] " debugging syn keyword revadebug .s dump see " basic character operations " syn keyword revaCharOps (.) CHAR EXPECT FIND WORD TYPE -TRAILING EMIT KEY " syn keyword revaCharOps KEY? TIB CR " syn match revaCharOps '\d >digit digit> >single >double >number >float " contexts syn keyword revavocs forth macro inline syn keyword revavocs context: syn match revavocs /\<\~[^~ ]*/ syn match revavocs /[^~ ]*\~\>/ " numbers syn keyword revamath decimal hex base binary octal syn match revainteger '\<-\=[0-9.]*[0-9.]\+\>' " recognize hex and binary numbers, the '$' and '%' notation is for greva syn match revainteger '\<\$\x*\x\+\>' " *1* --- dont't mess syn match revainteger '\<\x*\d\x*\>' " *2* --- this order! syn match revainteger '\<%[0-1]*[0-1]\+\>' syn match revainteger "\<'.\>" " Strings " syn region revaString start=+\.\?\"+ end=+"+ end=+$+ syn region revaString start=/"/ skip=/\\"/ end=/"/ " Comments syn region revaComment start='\\S\s' end='.*' contains=revaTodo syn match revaComment '\.(\s[^)]\{-})' contains=revaTodo syn region revaComment start='(\s' skip='\\)' end=')' contains=revaTodo syn match revaComment '(\s[^\-]*\-\-[^\-]\{-})' contains=revaTodo syn match revaComment '\<|\s.*$' contains=revaTodo syn match revaColonDef '\<:m\?\s*[^ \t]\+\>' contains=revaComment " Include files syn match revaInclude '\<\(include\|needs\)\s\+\S\+' " Define the default highlighting. if !exists("did_reva_syntax_inits") let did_reva_syntax_inits=1 " The default methods for highlighting. Can be overriden later. hi def link revaEOF cIf0 hi def link revaHelpStuff special hi def link revaHelpDesc Comment hi def link revaTodo Todo hi def link revaOperators Operator hi def link revaMath Number hi def link revaInteger Number hi def link revaStack Special hi def link revaFStack Special hi def link revaSP Special hi def link revaMemory Operator hi def link revaAdrArith Function hi def link revaMemBlks Function hi def link revaCond Conditional hi def link revaLoop Repeat hi def link revaColonDef Define hi def link revaEndOfColonDef Define hi def link revaDefine Define hi def link revaDebug Debug hi def link revaCharOps Character hi def link revaConversion String hi def link revaForth Statement hi def link revaVocs Statement hi def link revaString String hi def link revaComment Comment hi def link revaClassDef Define hi def link revaEndOfClassDef Define hi def link revaObjectDef Define hi def link revaEndOfObjectDef Define hi def link revaInclude Include hi def link revaBuiltin Keyword endif let b:current_syntax = "reva" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8:sw=4:nocindent:smartindent: neovim-0.2.2/runtime/syntax/rexx.vim000066400000000000000000000357431320401574200175360ustar00rootroot00000000000000" Vim syntax file " Language: Rexx " Maintainer: Thomas Geulig " Last Change: 2012 Sep 14, added support for new ooRexx 4.0 features " URL: http://www.geulig.de/vim/rexx.vim " Special Thanks to Dan Sharp and Rony G. Flatscher " for comments and additions " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " add to valid identifier chars setlocal iskeyword+=. setlocal iskeyword+=! setlocal iskeyword+=? " ---rgf, position important: must be before comments etc. ! syn match rexxOperator "[=|\/\\\+\*\[\],;:<>&\~%\-]" " rgf syn match rexxIdentifier "\<[a-zA-Z\!\?_]\([a-zA-Z0-9._?!]\)*\>" syn match rexxIdentifier "\<\K\k*\>" syn match rexxEnvironmentSymbol "\<\.\k\+\>" " A Keyword is the first symbol in a clause. A clause begins at the start " of a line or after a semicolon. THEN, ELSE, OTHERWISE, and colons are always " followed by an implied semicolon. syn match rexxClause "\(^\|;\|:\|then \|else \|when \|otherwise \)\s*\S*" contains=ALLBUT,rexxParse2,rexxRaise2,rexxForward2 " Considered keywords when used together in a phrase and begin a clause syn match rexxParse "\\|version\)\>" containedin=rexxClause contains=rexxParse2 syn match rexxParse2 "\" containedin=rexxParse syn match rexxKeyword contained "\" syn match rexxKeyword contained "\<\(address\|trace\)\( value\)\?\>" syn match rexxKeyword contained "\" syn match rexxKeyword contained "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\(\s\+forever\)\?\>" syn match rexxKeyword contained "\\s*\(strict\s*\)\?\" " Another keyword phrase, separated to aid highlighting in rexxFunction syn match rexxRegularCallSignal contained "\<\(call\|signal\)\s\(\s*on\>\|\s*off\>\)\@!\(\k\+\ze\|\ze(\)\(\s*\|;\|$\|(\)" syn region rexxLabel contained start="\<\(call\|signal\)\>\s*\zs\(\k*\|(\)" end="\ze\(\s*\|;\|$\|(\)" containedin=rexxRegularCallSignal syn match rexxExceptionHandling contained "\<\(call\|signal\)\>\s\+\<\(on\|off\)\>.*\(;\|$\)" contains=rexxComment " hilite label given after keyword "name" syn match rexxLabel "name\s\+\zs\k\+\ze" containedin=rexxExceptionHandling " hilite condition name (serves as label) syn match rexxLabel "\<\(call\|signal\)\>\s\+\<\(on\|off\)\>\s*\zs\k\+\ze\s*\(;\|$\)" containedin=rexxExceptionHandling " user exception handling, hilite user defined name syn region rexxLabel contained start="user\s\+\zs\k" end="\ze\(\s\|;\|$\)" containedin=rexxExceptionHandling " Considered keywords when they begin a clause syn match rexxKeywordStatements "\<\(arg\|catch\|do\|drop\|end\|exit\|expose\|finally\|forward\|if\|interpret\|iterate\|leave\|loop\|nop\)\>" syn match rexxKeywordStatements "\<\(options\|pull\|push\|queue\|raise\|reply\|return\|say\|select\|trace\)\>" " Conditional keywords starting a new statement syn match rexxConditional "\<\(then\|else\|when\|otherwise\)\(\s*\|;\|\_$\|\)\>" contains=rexxKeywordStatements " Conditional phrases syn match rexxLoopKeywords "\<\(to\|by\|for\|until\|while\|over\)\>" containedin=doLoopSelectLabelRegion " must be after Conditional phrases! syn match doLoopSelectLabelRegion "\<\(do\|loop\|select\)\>\s\+\(label\s\+\)\?\(\s\+\k\+\s\+\zs\\)\?\k*\(\s\+forever\)\?\(\s\|;\|$\)" contains=doLoopSelectLabelRegion,rexxStartValueAssignment,rexxLoopKeywords " color label's name syn match rexxLabel2 "\<\(do\|loop\|select\)\>\s\+label\s\+\zs\k*\ze" containedin=doLoopSelectLabelRegion " make sure control variable is normal " TODO: re-activate ? "rgf syn match rexxControlVariable "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\s\+\" containedin=doLoopSelectLabelRegion " make sure control variable assignment is normal syn match rexxStartValueAssignment "\<\(do\|loop\)\>\(\s\+label\s\+\k*\)\?\s\+\zs.*\ze\(=.*\)\?\s\+\" containedin=doLoopSelectLabelRegion " highlight label name syn match endIterateLeaveLabelRegion "\<\(end\|leave\|iterate\)\>\(\s\+\K\k*\)" contains=rexxLabel2 syn match rexxLabel2 "\<\(end\|leave\|iterate\)\>\s\+\zs\k*\ze" containedin=endIterateLeaveLabelRegion " Guard statement syn match rexxGuard "\(^\|;\|:\)\s*\\s\+\<\(on\|off\)\>" " Trace statement syn match rexxTrace "\(^\|;\|:\)\s*\\s\+\<\K\k*\>" " Raise statement " syn match rexxRaise "\(^\|;\|:\)\s\+\\s*\<\(propagate\|error\|failure\|syntax\|user\)\>\?" contains=rexxRaise2 syn match rexxRaise "\(^\|;\|:\)\s*\\s*\<\(propagate\|error\|failure\|syntax\|user\)\>\?" contains=rexxRaise2 syn match rexxRaise2 "\<\(additional\|array\|description\|exit\|propagate\|return\)\>" containedin=rexxRaise " Forward statement syn match rexxForward "\(^\|;\|:\)\\s*" contains=rexxForward2 syn match rexxForward2 "\<\(arguments\|array\|continue\|message\|class\|to\)\>" contained " Functions/Procedures syn match rexxFunction "\<\<[a-zA-Z\!\?_]\k*\>("me=e-1 syn match rexxFunction "[()]" " String constants syn region rexxString start=+"+ skip=+""+ end=+"\(x\|b\)\?+ oneline syn region rexxString start=+'+ skip=+''+ end=+'\(x\|b\)\?+ oneline syn region rexxParen transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxTodo,rexxLabel,rexxKeyword " Catch errors caused by wrong parenthesis syn match rexxParenError ")" syn match rexxInParen "[\\[\\]{}]" " Comments syn region rexxComment start="/\*" end="\*/" contains=rexxTodo,rexxComment syn match rexxCommentError "\*/" syn region rexxLineComment start="--" end="\_$" oneline " Highlight User Labels " check for labels between comments, labels stated in a statement in the middle of a line syn match rexxLabel "\(\_^\|;\)\s*\(\/\*.*\*\/\)*\s*\k\+\s*\(\/\*.*\*\/\)*\s*:"me=e-1 contains=rexxTodo,rexxComment syn keyword rexxTodo contained TODO FIXME XXX " ooRexx messages syn region rexxMessageOperator start="\(\~\|\~\~\)" end="\(\S\|\s\)"me=e-1 syn match rexxMessage "\(\~\|\~\~\)\s*\<\.*[a-zA-Z]\([a-zA-Z0-9._?!]\)*\>" contains=rexxMessageOperator " line continuations, take care of (line-)comments after it syn match rexxLineContinue ",\ze\s*\(--.*\|\/\*.*\)*$" " the following is necessary, otherwise three consecutive dashes will cause it to highlight the first one syn match rexxLineContinue "-\ze-\@!\s*\(--.*\|\s*\/\*.*\)\?$" " Special Variables syn keyword rexxSpecialVariable sigl rc result self super syn keyword rexxSpecialVariable .environment .error .input .local .methods .output .rs .stderr .stdin .stdout .stdque " Constants syn keyword rexxConst .true .false .nil .endOfLine .line .context " Rexx numbers " int like number syn match rexxNumber '\d\+' contained syn match rexxNumber '[-+]\s*\d\+' contained " Floating point number with decimal syn match rexxNumber '\d\+\.\d*' contained syn match rexxNumber '[-+]\s*\d\+\.\d*' contained " Floating point like number with E syn match rexxNumber '[-+]\s*\d*[eE][\-+]\d\+' contained syn match rexxNumber '\d*[eE][\-+]\d\+' contained " Floating point like number with E and decimal point (+,-) syn match rexxNumber '[-+]\s*\d*\.\d*[eE][\-+]\d\+' contained syn match rexxNumber '\d*\.\d*[eE][\-+]\d\+' contained " ooRexx builtin classes (as of version 3.2.0, fall 2007), first define dot to be o.k. in keywords syn keyword rexxBuiltinClass .Alarm .ArgUtil .Array .Bag .CaselessColumnComparator syn keyword rexxBuiltinClass .CaselessComparator .CaselessDescendingComparator .CircularQueue syn keyword rexxBuiltinClass .Class .Collection .ColumnComparator .Comparable .Comparator syn keyword rexxBuiltinClass .DateTime .DescendingComparator .Directory .File .InputOutputStream syn keyword rexxBuiltinClass .InputStream .InvertingComparator .List .MapCollection syn keyword rexxBuiltinClass .Message .Method .Monitor .MutableBuffer .Object syn keyword rexxBuiltinClass .OrderedCollection .OutputStream .Package .Properties .Queue syn keyword rexxBuiltinClass .RegularExpression .Relation .RexxContext .RexxQueue .Routine syn keyword rexxBuiltinClass .Set .SetCollection .Stem .Stream syn keyword rexxBuiltinClass .StreamSupplier .String .Supplier .Table .TimeSpan " Windows-only classes syn keyword rexxBuiltinClass .AdvancedControls .AnimatedButton .BaseDialog .ButtonControl syn keyword rexxBuiltinClass .CategoryDialog .CheckBox .CheckList .ComboBox .DialogControl syn keyword rexxBuiltinClass .DialogExtensions .DlgArea .DlgAreaU .DynamicDialog syn keyword rexxBuiltinClass .EditControl .InputBox .IntegerBox .ListBox .ListChoice syn keyword rexxBuiltinClass .ListControl .MenuObject .MessageExtensions .MultiInputBox syn keyword rexxBuiltinClass .MultiListChoice .OLEObject .OLEVariant syn keyword rexxBuiltinClass .PasswordBox .PlainBaseDialog .PlainUserDialog syn keyword rexxBuiltinClass .ProgressBar .ProgressIndicator .PropertySheet .RadioButton syn keyword rexxBuiltinClass .RcDialog .ResDialog .ScrollBar .SingleSelection .SliderControl syn keyword rexxBuiltinClass .StateIndicator .StaticControl .TabControl .TimedMessage syn keyword rexxBuiltinClass .TreeControl .UserDialog .VirtualKeyCodes .WindowBase syn keyword rexxBuiltinClass .WindowExtensions .WindowObject .WindowsClassesBase .WindowsClipboard syn keyword rexxBuiltinClass .WindowsEventLog .WindowsManager .WindowsProgramManager .WindowsRegistry " BSF4ooRexx classes syn keyword rexxBuiltinClass .BSF .bsf.dialog .bsf_proxy syn keyword rexxBuiltinClass .UNO .UNO_ENUM .UNO_CONSTANTS .UNO_PROPERTIES " ooRexx directives, ---rgf location important, otherwise directives in top of file not matched! syn region rexxClassDirective start="::\s*class\s*"ms=e+1 end="\ze\(\s\|;\|$\)" syn region rexxMethodDirective start="::\s*method\s*"ms=e+1 end="\ze\(\s\|;\|$\)" syn region rexxRequiresDirective start="::\s*requires\s*"ms=e+1 end="\ze\(\s\|;\|$\)" syn region rexxRoutineDirective start="::\s*routine\s*"ms=e+1 end="\ze\(\s\|;\|$\)" syn region rexxAttributeDirective start="::\s*attribute\s*"ms=e+1 end="\ze\(\s\|;\|$\)" " rgf, 2012-09-09 syn region rexxOptionsDirective start="::\s*options\s*"ms=e+1 end="\ze\(\s\|;\|$\)" syn region rexxConstantDirective start="::\s*constant\s*"ms=e+1 end="\ze\(\s\|;\|$\)" syn region rexxDirective start="\(^\|;\)\s*::\s*\w\+" end="\($\|;\)" contains=rexxString,rexxNumber,rexxComment,rexxLineComment,rexxClassDirective,rexxMethodDirective,rexxRoutineDirective,rexxRequiresDirective,rexxAttributeDirective,rexxOptionsDirective,rexxConstantDirective keepend syn match rexxOptionsDirective2 "\<\(digits\|form\|fuzz\|trace\)\>" containedin = rexxOptionsDirective3 syn region rexxOptionsDirective3 start="\(^\|;\)\s*::\s*options\s"ms=e+1 end="\($\|;\)" contains=rexxString,rexxNumber,rexxVariable,rexxComment,rexxLineComment containedin = rexxDirective syn region rexxVariable start="\zs\<\(\.\)\@!\K\k\+\>\ze\s*\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)" end="\(\_$\|.\)"me=e-1 syn match rexxVariable "\(=\|,\|)\|%\|\]\|\\\||\|&\|+=\|-=\|<\|>\)\s*\zs\K\k*\ze" " rgf, 2007-07-22: unfortunately, the entire region is colored (not only the " patterns), hence useless (vim 7.0)! (syntax-docs hint that that should work) " attempt: just colorize the parenthesis in matching colors, keep content " transparent to keep the formatting already done to it! " TODO: test on 7.3 " syn region par1 matchgroup=par1 start="(" matchgroup=par1 end=")" transparent contains=par2 " syn region par2 matchgroup=par2 start="(" matchgroup=par2 end=")" transparent contains=par3 contained " syn region par3 matchgroup=par3 start="(" matchgroup=par3 end=")" transparent contains=par4 contained " syn region par4 matchgroup=par4 start="(" matchgroup=par4 end=")" transparent contains=par5 contained " syn region par5 matchgroup=par5 start="(" matchgroup=par5 end=")" transparent contains=par1 contained " this will colorize the entire region, removing any colorizing already done! " syn region par1 matchgroup=par1 start="(" end=")" contains=par2 " syn region par2 matchgroup=par2 start="(" end=")" contains=par3 contained " syn region par3 matchgroup=par3 start="(" end=")" contains=par4 contained " syn region par4 matchgroup=par4 start="(" end=")" contains=par5 contained " syn region par5 matchgroup=par5 start="(" end=")" contains=par1 contained hi par1 ctermfg=red guifg=red "guibg=grey hi par2 ctermfg=blue guifg=blue "guibg=grey hi par3 ctermfg=darkgreen guifg=darkgreen "guibg=grey hi par4 ctermfg=darkyellow guifg=darkyellow "guibg=grey hi par5 ctermfg=darkgrey guifg=darkgrey "guibg=grey " line continuation (trailing comma or single dash) syn sync linecont "\(,\|-\ze-\@!\)\ze\s*\(--.*\|\/\*.*\)*$" " if !exists("rexx_minlines") " let rexx_minlines = 500 " endif " exec "syn sync ccomment rexxComment minlines=" . rexx_minlines " always scan from start, PCs have long become to be powerful enough for that exec "syn sync fromstart" " Define the default highlighting. " Only when an item doesn't have highlighting yet " make binary and hex strings stand out hi rexxStringConstant term=bold,underline ctermfg=5 cterm=bold guifg=darkMagenta gui=bold hi def link rexxLabel2 Function hi def link doLoopSelectLabelRegion rexxKeyword hi def link endIterateLeaveLabelRegion rexxKeyword hi def link rexxLoopKeywords rexxKeyword " Todo hi def link rexxNumber Normal "DiffChange " hi def link rexxIdentifier DiffChange hi def link rexxRegularCallSignal Statement hi def link rexxExceptionHandling Statement hi def link rexxLabel Function hi def link rexxCharacter Character hi def link rexxParenError rexxError hi def link rexxInParen rexxError hi def link rexxCommentError rexxError hi def link rexxError Error hi def link rexxKeyword Statement hi def link rexxKeywordStatements Statement hi def link rexxFunction Function hi def link rexxString String hi def link rexxComment Comment hi def link rexxTodo Todo hi def link rexxSpecialVariable Special hi def link rexxConditional rexxKeyword hi def link rexxOperator Operator hi def link rexxMessageOperator rexxOperator hi def link rexxLineComment Comment hi def link rexxLineContinue WildMenu hi def link rexxDirective rexxKeyword hi def link rexxClassDirective Type hi def link rexxMethodDirective rexxFunction hi def link rexxAttributeDirective rexxFunction hi def link rexxRequiresDirective Include hi def link rexxRoutineDirective rexxFunction " rgf, 2012-09-09 hi def link rexxOptionsDirective rexxFunction hi def link rexxOptionsDirective2 rexxOptionsDirective hi def link rexxOptionsDirective3 Normal " rexxOptionsDirective hi def link rexxConstantDirective rexxFunction hi def link rexxConst Constant hi def link rexxTypeSpecifier Type hi def link rexxBuiltinClass rexxTypeSpecifier hi def link rexxEnvironmentSymbol rexxConst hi def link rexxMessage rexxFunction hi def link rexxParse rexxKeyword hi def link rexxParse2 rexxParse hi def link rexxGuard rexxKeyword hi def link rexxTrace rexxKeyword hi def link rexxRaise rexxKeyword hi def link rexxRaise2 rexxRaise hi def link rexxForward rexxKeyword hi def link rexxForward2 rexxForward let b:current_syntax = "rexx" "vim: ts=8 neovim-0.2.2/runtime/syntax/rhelp.vim000066400000000000000000000275461320401574200176640ustar00rootroot00000000000000" Vim syntax file " Language: R Help File " Maintainer: Jakson Aquino " Former Maintainer: Johannes Ranke " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Tue Jun 28, 2016 08:53AM " Remarks: - Includes R syntax highlighting in the appropriate " sections if an r.vim file is in the same directory or in the " default debian location. " - There is no Latex markup in equations " - Thanks to Will Gray for finding and fixing a bug " - No support for \var tag within quoted string " Version Clears: {{{1 if exists("b:current_syntax") finish endif scriptencoding utf-8 syn case match " R help identifiers {{{1 syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}" syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}" syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}" contains=rhelpLink syn region rhelpIdentifier matchgroup=rhelpSection start="\\CRANpkg{" end="}" contains=rhelpLink syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}" " Highlighting of R code using an existing r.vim syntax file if available {{{1 syn include @R syntax/r.vim " Strings {{{1 syn region rhelpString start=/"/ skip=/\\"/ end=/"/ contains=rhelpSpecialChar,rhelpCodeSpecial,rhelpLink contained " Special characters in R strings syn match rhelpCodeSpecial display contained "\\\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\" " Special characters ( \$ \& \% \# \{ \} \_) syn match rhelpSpecialChar "\\[$&%#{}_]" " R code {{{1 syn match rhelpDots "\\dots" containedin=@R syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpLink,rhelpIdentifier,rhelpString,rhelpSpecialChar,rhelpSection syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpIdentifier,rhelpS4method syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end="}" contains=@R syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end="}" contains=@R if v:version > 703 syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@1" syn match rhelpKeyword "\\ldots\>" syn match rhelpKeyword "\\sspace\>" syn match rhelpKeyword "--" syn match rhelpKeyword "---" " Condition Keywords {{{2 syn match rhelpKeyword "\\if\>" syn match rhelpKeyword "\\ifelse\>" syn match rhelpKeyword "\\out\>" " Examples of usage: " \ifelse{latex}{\eqn{p = 5 + 6 - 7 \times 8}}{\eqn{p = 5 + 6 - 7 * 8}} " \ifelse{latex}{\out{$\alpha$}}{\ifelse{html}{\out{α}}{alpha}} " Keywords and operators valid only if in math mode {{{2 syn match rhelpMathOp "<" contained syn match rhelpMathOp ">" contained syn match rhelpMathOp "+" contained syn match rhelpMathOp "-" contained syn match rhelpMathOp "=" contained " Conceal function based on syntax/tex.vim {{{2 if exists("g:tex_conceal") let s:tex_conceal = g:tex_conceal else let s:tex_conceal = 'gm' endif function s:HideSymbol(pat, cchar, hide) if a:hide exe "syn match rhelpMathSymb '" . a:pat . "' contained conceal cchar=" . a:cchar else exe "syn match rhelpMathSymb '" . a:pat . "' contained" endif endfunction " Math symbols {{{2 if s:tex_conceal =~ 'm' let s:hd = 1 else let s:hd = 0 endif call s:HideSymbol('\\infty\>', '∞', s:hd) call s:HideSymbol('\\ge\>', '≥', s:hd) call s:HideSymbol('\\le\>', '≤', s:hd) call s:HideSymbol('\\prod\>', '∏', s:hd) call s:HideSymbol('\\sum\>', '∑', s:hd) syn match rhelpMathSymb "\\sqrt\>" contained " Greek letters {{{2 if s:tex_conceal =~ 'g' let s:hd = 1 else let s:hd = 0 endif call s:HideSymbol('\\alpha\>', 'α', s:hd) call s:HideSymbol('\\beta\>', 'β', s:hd) call s:HideSymbol('\\gamma\>', 'γ', s:hd) call s:HideSymbol('\\delta\>', 'δ', s:hd) call s:HideSymbol('\\epsilon\>', 'ϵ', s:hd) call s:HideSymbol('\\zeta\>', 'ζ', s:hd) call s:HideSymbol('\\eta\>', 'η', s:hd) call s:HideSymbol('\\theta\>', 'θ', s:hd) call s:HideSymbol('\\iota\>', 'ι', s:hd) call s:HideSymbol('\\kappa\>', 'κ', s:hd) call s:HideSymbol('\\lambda\>', 'λ', s:hd) call s:HideSymbol('\\mu\>', 'μ', s:hd) call s:HideSymbol('\\nu\>', 'ν', s:hd) call s:HideSymbol('\\xi\>', 'ξ', s:hd) call s:HideSymbol('\\pi\>', 'π', s:hd) call s:HideSymbol('\\rho\>', 'ρ', s:hd) call s:HideSymbol('\\sigma\>', 'σ', s:hd) call s:HideSymbol('\\tau\>', 'τ', s:hd) call s:HideSymbol('\\upsilon\>', 'υ', s:hd) call s:HideSymbol('\\phi\>', 'ϕ', s:hd) call s:HideSymbol('\\chi\>', 'χ', s:hd) call s:HideSymbol('\\psi\>', 'ψ', s:hd) call s:HideSymbol('\\omega\>', 'ω', s:hd) call s:HideSymbol('\\Gamma\>', 'Γ', s:hd) call s:HideSymbol('\\Delta\>', 'Δ', s:hd) call s:HideSymbol('\\Theta\>', 'Θ', s:hd) call s:HideSymbol('\\Lambda\>', 'Λ', s:hd) call s:HideSymbol('\\Xi\>', 'Ξ', s:hd) call s:HideSymbol('\\Pi\>', 'Π', s:hd) call s:HideSymbol('\\Sigma\>', 'Σ', s:hd) call s:HideSymbol('\\Upsilon\>', 'Υ', s:hd) call s:HideSymbol('\\Phi\>', 'Φ', s:hd) call s:HideSymbol('\\Psi\>', 'Ψ', s:hd) call s:HideSymbol('\\Omega\>', 'Ω', s:hd) delfunction s:HideSymbol " Note: The letters 'omicron', 'Alpha', 'Beta', 'Epsilon', 'Zeta', 'Eta', " 'Iota', 'Kappa', 'Mu', 'Nu', 'Omicron', 'Rho', 'Tau' and 'Chi' are listed " at src/library/tools/R/Rd2txt.R because they are valid in HTML, although " they do not make valid LaTeX code (e.g. Α versus \Alpha). " Links {{{1 syn region rhelpLink matchgroup=rhelpType start="\\link{" end="}" contained keepend extend syn region rhelpLink matchgroup=rhelpType start="\\link\[.\{-}\]{" end="}" contained keepend extend syn region rhelpLink matchgroup=rhelpType start="\\linkS4class{" end="}" contained keepend extend syn region rhelpLink matchgroup=rhelpType start="\\url{" end="}" contained keepend extend syn region rhelpLink matchgroup=rhelpType start="\\href{" end="}" contained keepend extend syn region rhelpLink matchgroup=rhelpType start="\\figure{" end="}" contained keepend extend " Verbatim like {{{1 syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1" syn match rhelpType "\\strong\>" syn match rhelpType "\\bold\>" syn match rhelpType "\\sQuote\>" syn match rhelpType "\\dQuote\>" syn match rhelpType "\\preformatted\>" syn match rhelpType "\\kbd\>" syn match rhelpType "\\file\>" syn match rhelpType "\\email\>" syn match rhelpType "\\enc\>" syn match rhelpType "\\var\>" syn match rhelpType "\\env\>" syn match rhelpType "\\option\>" syn match rhelpType "\\command\>" syn match rhelpType "\\newcommand\>" syn match rhelpType "\\renewcommand\>" syn match rhelpType "\\dfn\>" syn match rhelpType "\\cite\>" syn match rhelpType "\\acronym\>" syn match rhelpType "\\doi\>" " rhelp sections {{{1 syn match rhelpSection "\\encoding\>" syn match rhelpSection "\\title\>" syn match rhelpSection "\\item\>" syn match rhelpSection "\\description\>" syn match rhelpSection "\\concept\>" syn match rhelpSection "\\arguments\>" syn match rhelpSection "\\details\>" syn match rhelpSection "\\value\>" syn match rhelpSection "\\references\>" syn match rhelpSection "\\note\>" syn match rhelpSection "\\author\>" syn match rhelpSection "\\seealso\>" syn match rhelpSection "\\keyword\>" syn match rhelpSection "\\docType\>" syn match rhelpSection "\\format\>" syn match rhelpSection "\\source\>" syn match rhelpSection "\\itemize\>" syn match rhelpSection "\\describe\>" syn match rhelpSection "\\enumerate\>" syn match rhelpSection "\\item " syn match rhelpSection "\\item$" syn match rhelpSection "\\tabular{[lcr]*}" syn match rhelpSection "\\dontrun\>" syn match rhelpSection "\\dontshow\>" syn match rhelpSection "\\testonly\>" syn match rhelpSection "\\donttest\>" " Freely named Sections {{{1 syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end="}" syn region rhelpFreesubsec matchgroup=Delimiter start="\\subsection{" matchgroup=Delimiter transparent end="}" syn match rhelpDelimiter "{\|\[\|(\|)\|\]\|}" " R help file comments {{{1 syn match rhelpComment /%.*$/ " Error {{{1 syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation syn match rhelpError /[)\]}]/ syn match rhelpBraceError /[)}]/ contained syn match rhelpCurlyError /[)\]]/ contained syn match rhelpParenError /[\]}]/ contained syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{" " Define the default highlighting {{{1 hi def link rhelpVerbatim String hi def link rhelpDelimiter Delimiter hi def link rhelpIdentifier Identifier hi def link rhelpString String hi def link rhelpCodeSpecial Special hi def link rhelpKeyword Keyword hi def link rhelpDots Keyword hi def link rhelpLink Underlined hi def link rhelpType Type hi def link rhelpSection PreCondit hi def link rhelpError Error hi def link rhelpBraceError Error hi def link rhelpCurlyError Error hi def link rhelpParenError Error hi def link rhelpPreProc PreProc hi def link rhelpDelimiter Delimiter hi def link rhelpComment Comment hi def link rhelpRComment Comment hi def link rhelpSpecialChar SpecialChar hi def link rhelpMathSymb Special hi def link rhelpMathOp Operator let b:current_syntax = "rhelp" " vim: foldmethod=marker sw=2 neovim-0.2.2/runtime/syntax/rib.vim000066400000000000000000000042201320401574200173060ustar00rootroot00000000000000" Vim syntax file " Language: Renderman Interface Bytestream " Maintainer: Andrew Bromage " Last Change: 2003 May 11 " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match " Comments syn match ribLineComment "#.*$" syn match ribStructureComment "##.*$" syn case ignore syn match ribCommand /[A-Z][a-zA-Z]*/ syn case match syn region ribString start=/"/ skip=/\\"/ end=/"/ syn match ribStructure "[A-Z][a-zA-Z]*Begin\>\|[A-Z][a-zA-Z]*End" syn region ribSectionFold start="FrameBegin" end="FrameEnd" fold transparent keepend extend syn region ribSectionFold start="WorldBegin" end="WorldEnd" fold transparent keepend extend syn region ribSectionFold start="TransformBegin" end="TransformEnd" fold transparent keepend extend syn region ribSectionFold start="AttributeBegin" end="AttributeEnd" fold transparent keepend extend syn region ribSectionFold start="MotionBegin" end="MotionEnd" fold transparent keepend extend syn region ribSectionFold start="SolidBegin" end="SolidEnd" fold transparent keepend extend syn region ribSectionFold start="ObjectBegin" end="ObjectEnd" fold transparent keepend extend syn sync fromstart "integer number, or floating point number without a dot and with "f". syn case ignore syn match ribNumbers display transparent "[-]\=\<\d\|\.\d" contains=ribNumber,ribFloat syn match ribNumber display contained "[-]\=\d\+\>" "floating point number, with dot, optional exponent syn match ribFloat display contained "[-]\=\d\+\.\d*\(e[-+]\=\d\+\)\=" "floating point number, starting with a dot, optional exponent syn match ribFloat display contained "[-]\=\.\d\+\(e[-+]\=\d\+\)\=\>" "floating point number, without dot, with exponent syn match ribFloat display contained "[-]\=\d\+e[-+]\d\+\>" syn case match hi def link ribStructure Structure hi def link ribCommand Statement hi def link ribStructureComment SpecialComment hi def link ribLineComment Comment hi def link ribString String hi def link ribNumber Number hi def link ribFloat Float let b:current_syntax = "rib" " Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim neovim-0.2.2/runtime/syntax/rmd.vim000066400000000000000000000104661320401574200173250ustar00rootroot00000000000000" markdown Text with R statements " Language: markdown with R code chunks " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Sat Jan 28, 2017 10:06PM " " CONFIGURATION: " To highlight chunk headers as R code, put in your vimrc (e.g. .config/nvim/init.vim): " let rmd_syn_hl_chunk = 1 " " For highlighting pandoc extensions to markdown like citations and TeX and " many other advanced features like folding of markdown sections, it is " recommended to install the vim-pandoc filetype plugin as well as the " vim-pandoc-syntax filetype plugin from https://github.com/vim-pandoc. " " TODO: " - Provide highlighting for rmarkdown parameters in yaml header if exists("b:current_syntax") finish endif " load all of pandoc info, e.g. from " https://github.com/vim-pandoc/vim-pandoc-syntax runtime syntax/pandoc.vim if exists("b:current_syntax") let rmdIsPandoc = 1 unlet b:current_syntax else let rmdIsPandoc = 0 runtime syntax/markdown.vim if exists("b:current_syntax") unlet b:current_syntax endif " load all of the yaml syntax highlighting rules into @yaml syntax include @yaml syntax/yaml.vim if exists("b:current_syntax") unlet b:current_syntax endif " highlight yaml block commonly used for front matter syntax region rmdYamlBlock matchgroup=rmdYamlBlockDelim start="^---" matchgroup=rmdYamlBlockDelim end="^---" contains=@yaml keepend fold endif if !exists("g:rmd_syn_langs") let g:rmd_syn_langs = ["r"] else let s:hasr = 0 for s:lng in g:rmd_syn_langs if s:lng == "r" let s:hasr = 1 endif endfor if s:hasr == 0 let g:rmd_syn_langs += ["r"] endif endif for s:lng in g:rmd_syn_langs exe 'syntax include @' . toupper(s:lng) . ' syntax/'. s:lng . '.vim' if exists("b:current_syntax") unlet b:current_syntax endif exe 'syntax region rmd' . toupper(s:lng) . 'Chunk start="^[ \t]*``` *{\(' . s:lng . '\|r.*engine\s*=\s*["' . "']" . s:lng . "['" . '"]\).*}$" end="^[ \t]*```$" contains=@' . toupper(s:lng) . ',rmd' . toupper(s:lng) . 'ChunkDelim keepend fold' if exists("g:rmd_syn_hl_chunk") && s:lng == "r" " highlight R code inside chunk header syntax match rmdRChunkDelim "^[ \t]*```{r" contained syntax match rmdRChunkDelim "}$" contained else exe 'syntax match rmd' . toupper(s:lng) . 'ChunkDelim "^[ \t]*```{\(' . s:lng . '\|r.*engine\s*=\s*["' . "']" . s:lng . "['" . '"]\).*}$" contained' endif exe 'syntax match rmd' . toupper(s:lng) . 'ChunkDelim "^[ \t]*```$" contained' endfor " also match and syntax highlight in-line R code syntax region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@R containedin=pandocLaTeXRegion,yamlFlowString keepend " I was not able to highlight rmdrInline inside a pandocLaTeXCommand, although " highlighting works within pandocLaTeXRegion and yamlFlowString. syntax cluster texMathZoneGroup add=rmdrInline " match slidify special marker syntax match rmdSlidifySpecial "\*\*\*" if rmdIsPandoc == 0 syn match rmdBlockQuote /^\s*>.*\n\(.*\n\@" contains=@texMathZoneGroup " Region syntax match rmdLaTeXRegDelim "\$\$" contained syntax match rmdLaTeXRegDelim "\$\$latex$" contained syntax match rmdLaTeXSt "\\[a-zA-Z]\+" syntax region rmdLaTeXRegion start="^\$\$" skip="\\\$" end="\$\$$" contains=@LaTeX,rmdLaTeXRegDelim keepend syntax region rmdLaTeXRegion2 start="^\\\[" end="\\\]" contains=@LaTeX,rmdLaTeXRegDelim keepend hi def link rmdBlockQuote Comment hi def link rmdLaTeXSt Statement hi def link rmdLaTeXInlDelim Special hi def link rmdLaTeXRegDelim Special endif for s:lng in g:rmd_syn_langs exe 'syn sync match rmd' . toupper(s:lng) . 'SyncChunk grouphere rmd' . toupper(s:lng) . 'Chunk /^[ \t]*``` *{\(' . s:lng . '\|r.*engine\s*=\s*["' . "']" . s:lng . "['" . '"]\)/' endfor hi def link rmdYamlBlockDelim Delim for s:lng in g:rmd_syn_langs exe 'hi def link rmd' . toupper(s:lng) . 'ChunkDelim Special' endfor hi def link rmdInlineDelim Special hi def link rmdSlidifySpecial Special let b:current_syntax = "rmd" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/rnc.vim000066400000000000000000000043271320401574200173240ustar00rootroot00000000000000" Vim syntax file " Language: Relax NG compact syntax " Previous Maintainer: Nikolai Weibull " Latest Revision: 2007-06-17 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=-,. syn keyword rncTodo contained TODO FIXME XXX NOTE syn region rncComment display oneline start='^\s*#' end='$' \ contains=rncTodo,@Spell syn match rncOperator display '[-|,&+?*~]' syn match rncOperator display '\%(|&\)\==' syn match rncOperator display '>>' syn match rncNamespace display '\<\k\+:' syn match rncQuoted display '\\\k\+\>' syn match rncSpecial display '\\x{\x\+}' syn region rncAnnotation transparent start='\[' end='\]' \ contains=ALLBUT,rncComment,rncTodo syn region rncLiteral display oneline start=+"+ end=+"+ \ contains=rncSpecial syn region rncLiteral display oneline start=+'+ end=+'+ syn region rncLiteral display oneline start=+"""+ end=+"""+ \ contains=rncSpecial syn region rncLiteral display oneline start=+'''+ end=+'''+ syn match rncDelimiter display '[{},()]' syn keyword rncKeyword datatypes default div empty external grammar syn keyword rncKeyword include inherit list mixed name namespace syn keyword rncKeyword notAllowed parent start string text token syn match rncIdentifier display '\k\+\_s*\%(=\|&=\||=\)\@=' \ nextgroup=rncOperator syn keyword rncKeyword element attribute \ nextgroup=rncIdName skipwhite skipempty syn match rncIdName contained '\k\+' hi def link rncTodo Todo hi def link rncComment Comment hi def link rncOperator Operator hi def link rncNamespace Identifier hi def link rncQuoted Special hi def link rncSpecial SpecialChar hi def link rncAnnotation Special hi def link rncLiteral String hi def link rncDelimiter Delimiter hi def link rncKeyword Keyword hi def link rncIdentifier Identifier hi def link rncIdName Identifier let b:current_syntax = "rnc" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/rng.vim000066400000000000000000000014611320401574200173240ustar00rootroot00000000000000" Vim syntax file " Language: RELAX NG " Maintainer: Jaromir Hradilek " URL: https://github.com/jhradilek/vim-rng " Last Change: 25 March 2013 " Description: A syntax file for RELAX NG, a schema language for XML if exists('b:current_syntax') finish endif do Syntax xml syn spell toplevel syn cluster xmlTagHook add=rngTagName syn case match syn keyword rngTagName anyName attribute choice data define div contained syn keyword rngTagName element empty except externalRef grammar contained syn keyword rngTagName group include interleave list mixed name contained syn keyword rngTagName notAllowed nsName oneOrMore optional param contained syn keyword rngTagName parentRef ref start text value zeroOrMore contained hi def link rngTagName Statement let b:current_syntax = 'rng' neovim-0.2.2/runtime/syntax/rnoweb.vim000066400000000000000000000035641320401574200200400ustar00rootroot00000000000000" Vim syntax file " Language: R noweb Files " Maintainer: Johannes Ranke " Last Change: Sat Feb 06, 2016 06:47AM " Version: 0.9.1 " Remarks: - This file is inspired by the proposal of " Fernando Henrique Ferraz Pereira da Rosa " http://www.ime.usp.br/~feferraz/en/sweavevim.html " if exists("b:current_syntax") finish endif syn case match " Extension of Tex clusters {{{1 runtime syntax/tex.vim unlet b:current_syntax syn cluster texMatchGroup add=@rnoweb syn cluster texMathMatchGroup add=rnowebSexpr syn cluster texMathZoneGroup add=rnowebSexpr syn cluster texEnvGroup add=@rnoweb syn cluster texFoldGroup add=@rnoweb syn cluster texDocGroup add=@rnoweb syn cluster texPartGroup add=@rnoweb syn cluster texChapterGroup add=@rnoweb syn cluster texSectionGroup add=@rnoweb syn cluster texSubSectionGroup add=@rnoweb syn cluster texSubSubSectionGroup add=@rnoweb syn cluster texParaGroup add=@rnoweb " Highlighting of R code using an existing r.vim syntax file if available {{{1 syn include @rnowebR syntax/r.vim syn region rnowebChunk matchgroup=rnowebDelimiter start="^<<.*>>=" matchgroup=rnowebDelimiter end="^@" contains=@rnowebR,rnowebChunkReference,rnowebChunk fold keepend syn match rnowebChunkReference "^<<.*>>$" contained syn region rnowebSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter end="}" contains=@rnowebR contained " Sweave options command {{{1 syn region rnowebSweaveopts matchgroup=Delimiter start="\\SweaveOpts{" matchgroup=Delimiter end="}" " rnoweb Cluster {{{1 syn cluster rnoweb contains=rnowebChunk,rnowebChunkReference,rnowebDelimiter,rnowebSexpr,rnowebSweaveopts " Highlighting {{{1 hi def link rnowebDelimiter Delimiter hi def link rnowebSweaveOpts Statement hi def link rnowebChunkReference Delimiter let b:current_syntax = "rnoweb" " vim: foldmethod=marker: neovim-0.2.2/runtime/syntax/robots.vim000066400000000000000000000027711320401574200200530ustar00rootroot00000000000000" Vim syntax file " Language: "Robots.txt" files " Robots.txt files indicate to WWW robots which parts of a web site should not be accessed. " Maintainer: Dominique Stphan (dominique@mggen.com) " URL: http://www.mggen.com/vim/syntax/robots.zip " Last change: 2001 May 09 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " shut case off syn case ignore " Comment syn match robotsComment "#.*$" contains=robotsUrl,robotsMail,robotsString " Star * (means all spiders) syn match robotsStar "\*" " : syn match robotsDelimiter ":" " The keywords " User-agent syn match robotsAgent "^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]" " Disallow syn match robotsDisallow "^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]" " Disallow: or User-Agent: and the rest of the line before an eventual comment synt match robotsLine "\(^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]\|^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]\):[^#]*" contains=robotsAgent,robotsDisallow,robotsStar,robotsDelimiter " Some frequent things in comments syn match robotsUrl "http[s]\=://\S*" syn match robotsMail "\S*@\S*" syn region robotsString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ hi def link robotsComment Comment hi def link robotsAgent Type hi def link robotsDisallow Statement hi def link robotsLine Special hi def link robotsStar Operator hi def link robotsDelimiter Delimiter hi def link robotsUrl String hi def link robotsMail String hi def link robotsString String let b:current_syntax = "robots" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/rpcgen.vim000066400000000000000000000032021320401574200200070ustar00rootroot00000000000000" Vim syntax file " Language: rpcgen " Maintainer: Charles E. Campbell " Last Change: Aug 31, 2016 " Version: 12 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_RPCGEN if exists("b:current_syntax") finish endif " Read the C syntax to start with runtime! syntax/c.vim syn keyword rpcProgram program skipnl skipwhite nextgroup=rpcProgName syn match rpcProgName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcProgZone syn region rpcProgZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\(\d\+\|0x[23]\x\{7}\)\s*;"me=e-1 contains=rpcVersion,cComment,rpcProgNmbrErr syn keyword rpcVersion contained version skipnl skipwhite nextgroup=rpcVersName syn match rpcVersName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcVersZone syn region rpcVersZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\d\+\s*;"me=e-1 contains=cType,cStructure,cStorageClass,rpcDecl,rpcProcNmbr,cComment syn keyword rpcDecl contained string syn match rpcProcNmbr contained "=\s*\d\+;"me=e-1 syn match rpcProgNmbrErr contained "=\s*0x[^23]\x*"ms=s+1 syn match rpcPassThru "^\s*%.*$" " Define the default highlighting. if !exists("skip_rpcgen_syntax_inits") hi def link rpcProgName rpcName hi def link rpcProgram rpcStatement hi def link rpcVersName rpcName hi def link rpcVersion rpcStatement hi def link rpcDecl cType hi def link rpcPassThru cComment hi def link rpcName Special hi def link rpcProcNmbr Delimiter hi def link rpcProgNmbrErr Error hi def link rpcStatement Statement endif let b:current_syntax = "rpcgen" " vim: ts=8 neovim-0.2.2/runtime/syntax/rpl.vim000066400000000000000000000621431320401574200173370ustar00rootroot00000000000000" Vim syntax file " Language: RPL/2 " Version: 0.15.15 against RPL/2 version 4.00pre7i " Last Change: 2012 Feb 03 by Thilo Six " Maintainer: Jol BERTRAND " URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim " Credits: Nothing " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Keyword characters (not used) " set iskeyword=33-127 " Case sensitive syntax case match " Constants syntax match rplConstant "\(^\|\s\+\)\(e\|i\)\ze\($\|\s\+\)" " Any binary number syntax match rplBinaryError "\(^\|\s\+\)#\s*\S\+b\ze" syntax match rplBinary "\(^\|\s\+\)#\s*[01]\+b\ze\($\|\s\+\)" syntax match rplOctalError "\(^\|\s\+\)#\s*\S\+o\ze" syntax match rplOctal "\(^\|\s\+\)#\s*\o\+o\ze\($\|\s\+\)" syntax match rplDecimalError "\(^\|\s\+\)#\s*\S\+d\ze" syntax match rplDecimal "\(^\|\s\+\)#\s*\d\+d\ze\($\|\s\+\)" syntax match rplHexadecimalError "\(^\|\s\+\)#\s*\S\+h\ze" syntax match rplHexadecimal "\(^\|\s\+\)#\s*\x\+h\ze\($\|\s\+\)" " Case unsensitive syntax case ignore syntax match rplControl "\(^\|\s\+\)abort\ze\($\|\s\+\)" syntax match rplControl "\(^\|\s\+\)kill\ze\($\|\s\+\)" syntax match rplControl "\(^\|\s\+\)cont\ze\($\|\s\+\)" syntax match rplControl "\(^\|\s\+\)halt\ze\($\|\s\+\)" syntax match rplControl "\(^\|\s\+\)cmlf\ze\($\|\s\+\)" syntax match rplControl "\(^\|\s\+\)sst\ze\($\|\s\+\)" syntax match rplConstant "\(^\|\s\+\)pi\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)return\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)last\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)syzeval\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)wait\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)type\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)kind\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)eval\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)use\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)remove\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)external\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)dup\([2n]\|\)\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)drop\([2n]\|\)\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)depth\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)roll\(d\|\)\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)pick\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)rot\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)swap\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)over\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)clear\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)warranty\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)copyright\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)convert\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)date\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)time\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)mem\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)clmf\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)->num\ze\($\|\s\+\)" syntax match rplStatement "\(^\|\s\+\)help\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)get\(i\|r\|c\|\)\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)put\(i\|r\|c\|\)\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)rcl\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)purge\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)sinv\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)sneg\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)sconj\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)steq\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)rceq\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)vars\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)clusr\ze\($\|\s\+\)" syntax match rplStorage "\(^\|\s\+\)sto\([+-/\*]\|\)\ze\($\|\s\+\)" syntax match rplAlgConditional "\(^\|\s\+\)ift\(e\|\)\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)and\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)\(x\|\)or\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)not\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)same\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)==\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)<=\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)=<\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)=>\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)>=\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)<>\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)>\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)<\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)[+-]\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)[/\*]\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)\^\ze\($\|\s\+\)" syntax match rplOperator "\(^\|\s\+\)\*\*\ze\($\|\s\+\)" syntax match rplBoolean "\(^\|\s\+\)true\ze\($\|\s\+\)" syntax match rplBoolean "\(^\|\s\+\)false\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)store\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)recall\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)\(\|wf\|un\)lock\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)open\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)close\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)delete\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)create\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)format\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)rewind\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)backspace\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)\(\|re\)write\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)read\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)inquire\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)sync\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)append\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)suppress\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)seek\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)pr\(1\|int\|st\|stc\|lcd\|var\|usr\|md\)\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)paper\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)cr\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)erase\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)disp\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)input\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)prompt\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)key\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)cllcd\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)\(\|re\)draw\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)drax\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)indep\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)depnd\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)res\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)axes\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)label\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)pmin\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)pmax\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)centr\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)persist\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)title\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)\(slice\|auto\|log\|\)scale\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)eyept\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)\(p\|s\)par\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)function\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)polar\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)scatter\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)plotter\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)wireframe\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)parametric\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)slice\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)\*w\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)\*h\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)\*d\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)\*s\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)->lcd\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)lcd->\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)edit\ze\($\|\s\+\)" syntax match rplReadWrite "\(^\|\s\+\)visit\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)abs\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)arg\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)conj\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)re\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)im\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)mant\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)xpon\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)ceil\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)fact\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)fp\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)floor\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)inv\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)ip\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)max\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)min\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)mod\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)neg\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)relax\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)sign\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)sq\(\|rt\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)xroot\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)cos\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)sin\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)tan\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)tg\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)a\(\|rc\)cos\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)a\(\|rc\)sin\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)atan\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)arctg\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)cosh\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)sinh\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)tanh\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|arg\)th\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)arg[cst]h\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)log\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)ln\(\|1\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)exp\(\|m\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)trn\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)con\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)idn\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)rdm\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)rsd\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)cnrm\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)cross\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)d[eo]t\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)[cr]swp\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)rci\(j\|\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(in\|de\)cr\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)bessel\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|g\)egvl\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|g\)\(\|l\|r\)egv\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)rnrm\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(std\|fix\|sci\|eng\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(rad\|deg\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|n\)rand\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)rdz\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|i\)fft\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(dec\|bin\|oct\|hex\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)rclf\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)stof\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)[cs]f\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)chr\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)num\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)pos\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)sub\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)size\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(st\|rc\)ws\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(r\|s\)\(r\|l\)\(\|b\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)as\(r\|l\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(int\|der\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)stos\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|r\)cls\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)drws\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)scls\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)ns\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)tot\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)mean\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)sdev\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)var\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)maxs\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)mins\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)cov\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)cols\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)s\(x\(\|y\|2\)\|y\(\|2\)\)\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(x\|y\)col\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)corr\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)utp[cfnt]\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)comb\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)perm\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)lu\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)[lu]chol\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)schur\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)%\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)%ch\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)%t\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)hms->\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)->hms\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)hms+\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)hms-\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)d->r\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)r->d\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)b->r\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)r->b\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)c->r\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)r->c\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)r->p\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)p->r\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)str->\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)->str\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)array->\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)->array\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)list->\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)->list\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)s+\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)s-\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)col-\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)col+\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)row-\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)row+\ze\($\|\s\+\)" syntax match rplIntrinsic "\(^\|\s\+\)->q\ze\($\|\s\+\)" syntax match rplObsolete "\(^\|\s\+\)arry->\ze\($\|\s\+\)"hs=e-5 syntax match rplObsolete "\(^\|\s\+\)->arry\ze\($\|\s\+\)"hs=e-5 " Conditional structures syntax match rplConditionalError "\(^\|\s\+\)case\ze\($\|\s\+\)"hs=e-3 syntax match rplConditionalError "\(^\|\s\+\)then\ze\($\|\s\+\)"hs=e-3 syntax match rplConditionalError "\(^\|\s\+\)else\ze\($\|\s\+\)"hs=e-3 syntax match rplConditionalError "\(^\|\s\+\)elseif\ze\($\|\s\+\)"hs=e-5 syntax match rplConditionalError "\(^\|\s\+\)end\ze\($\|\s\+\)"hs=e-2 syntax match rplConditionalError "\(^\|\s\+\)\(step\|next\)\ze\($\|\s\+\)"hs=e-3 syntax match rplConditionalError "\(^\|\s\+\)until\ze\($\|\s\+\)"hs=e-4 syntax match rplConditionalError "\(^\|\s\+\)repeat\ze\($\|\s\+\)"hs=e-5 syntax match rplConditionalError "\(^\|\s\+\)default\ze\($\|\s\+\)"hs=e-6 " FOR/(CYCLE)/(EXIT)/NEXT " FOR/(CYCLE)/(EXIT)/STEP " START/(CYCLE)/(EXIT)/NEXT " START/(CYCLE)/(EXIT)/STEP syntax match rplCycle "\(^\|\s\+\)\(cycle\|exit\)\ze\($\|\s\+\)" syntax region rplForNext matchgroup=rplRepeat start="\(^\|\s\+\)\(for\|start\)\ze\($\|\s\+\)" end="\(^\|\s\+\)\(next\|step\)\ze\($\|\s\+\)" contains=ALL keepend extend " ELSEIF/END syntax region rplElseifEnd matchgroup=rplConditional start="\(^\|\s\+\)elseif\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained contains=ALLBUT,rplElseEnd keepend " ELSE/END syntax region rplElseEnd matchgroup=rplConditional start="\(^\|\s\+\)else\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained contains=ALLBUT,rplElseEnd,rplThenEnd,rplElseifEnd keepend " THEN/END syntax region rplThenEnd matchgroup=rplConditional start="\(^\|\s\+\)then\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained containedin=rplIfEnd contains=ALLBUT,rplThenEnd keepend " IF/END syntax region rplIfEnd matchgroup=rplConditional start="\(^\|\s\+\)if\(err\|\)\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplElseEnd,rplElseifEnd keepend extend " if end is accepted ! " select end too ! " CASE/THEN syntax region rplCaseThen matchgroup=rplConditional start="\(^\|\s\+\)case\ze\($\|\s\+\)" end="\(^\|\s\+\)then\ze\($\|\s\+\)" contains=ALLBUT,rplCaseThen,rplCaseEnd,rplThenEnd keepend extend contained containedin=rplCaseEnd " CASE/END syntax region rplCaseEnd matchgroup=rplConditional start="\(^\|\s\+\)case\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplCaseEnd,rplThenEnd,rplElseEnd keepend extend contained containedin=rplSelectEnd " DEFAULT/END syntax region rplDefaultEnd matchgroup=rplConditional start="\(^\|\s\+\)default\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplDefaultEnd keepend contained containedin=rplSelectEnd " SELECT/END syntax region rplSelectEnd matchgroup=rplConditional start="\(^\|\s\+\)select\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplThenEnd keepend extend " select end is accepted ! " DO/UNTIL/END syntax region rplUntilEnd matchgroup=rplConditional start="\(^\|\s\+\)until\ze\($\|\s\+\)" end="\(^\|\s\+\)\zsend\ze\($\|\s\+\)" contains=ALLBUT,rplUntilEnd contained containedin=rplDoUntil extend keepend syntax region rplDoUntil matchgroup=rplConditional start="\(^\|\s\+\)do\ze\($\|\s\+\)" end="\(^\|\s\+\)until\ze\($\|\s\+\)" contains=ALL keepend extend " WHILE/REPEAT/END syntax region rplRepeatEnd matchgroup=rplConditional start="\(^\|\s\+\)repeat\ze\($\|\s\+\)" end="\(^\|\s\+\)\zsend\ze\($\|\s\+\)" contains=ALLBUT,rplRepeatEnd contained containedin=rplWhileRepeat extend keepend syntax region rplWhileRepeat matchgroup=rplConditional start="\(^\|\s\+\)while\ze\($\|\s\+\)" end="\(^\|\s\+\)repeat\ze\($\|\s\+\)" contains=ALL keepend extend " Comments syntax match rplCommentError "\*/" syntax region rplCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1 syntax region rplCommentLine start="\(^\|\s\+\)//\ze" skip="\\$" end="$" contains=NONE keepend extend syntax region rplComment start="\(^\|\s\+\)/\*\ze" end="\*/" contains=rplCommentString keepend extend " Catch errors caused by too many right parentheses syntax region rplParen transparent start="(" end=")" contains=ALLBUT,rplParenError,rplComplex,rplIncluded keepend extend syntax match rplParenError ")" " Subroutines " Catch errors caused by too many right '>>' syntax match rplSubError "\(^\|\s\+\)>>\ze\($\|\s\+\)"hs=e-1 syntax region rplSub matchgroup=rplSubDelimitor start="\(^\|\s\+\)<<\ze\($\|\s\+\)" end="\(^\|\s\+\)>>\ze\($\|\s\+\)" contains=ALLBUT,rplSubError,rplIncluded,rplDefaultEnd,rplStorageSub keepend extend " Expressions syntax region rplExpr start="\(^\|\s\+\)'" end="'\ze\($\|\s\+\)" contains=rplParen,rplParenError " Local variables syntax match rplStorageError "\(^\|\s\+\)->\ze\($\|\s\+\)"hs=e-1 syntax region rplStorageSub matchgroup=rplStorage start="\(^\|\s\+\)<<\ze\($\|\s\+\)" end="\(^\|\s\+\)>>\ze\($\|\s\+\)" contains=ALLBUT,rplSubError,rplIncluded,rplDefaultEnd,rplStorageExpr contained containedin=rplLocalStorage keepend extend syntax region rplStorageExpr matchgroup=rplStorage start="\(^\|\s\+\)'" end="'\ze\($\|\s\+\)" contains=rplParen,rplParenError extend contained containedin=rplLocalStorage syntax region rplLocalStorage matchgroup=rplStorage start="\(^\|\s\+\)->\ze\($\|\s\+\)" end="\(^\|\s\+\)\(<<\ze\($\|\s\+\)\|'\)" contains=rplStorageSub,rplStorageExpr,rplComment,rplCommentLine keepend extend " Catch errors caused by too many right brackets syntax match rplArrayError "\]" syntax match rplArray "\]" contained containedin=rplArray syntax region rplArray matchgroup=rplArray start="\[" end="\]" contains=ALLBUT,rplArrayError keepend extend " Catch errors caused by too many right '}' syntax match rplListError "}" syntax match rplList "}" contained containedin=rplList syntax region rplList matchgroup=rplList start="{" end="}" contains=ALLBUT,rplListError,rplIncluded keepend extend " cpp is used by RPL/2 syntax match rplPreProc "\_^#\s*\(define\|undef\)\>" syntax match rplPreProc "\_^#\s*\(warning\|error\)\>" syntax match rplPreCondit "\_^#\s*\(if\|ifdef\|ifndef\|elif\|else\|endif\)\>" syntax match rplIncluded contained "\<<\s*\S*\s*>\>" syntax match rplInclude "\_^#\s*include\>\s*["<]" contains=rplIncluded,rplString "syntax match rplExecPath "\%^\_^#!\s*\S*" syntax match rplExecPath "\%^\_^#!\p*\_$" " Any integer syntax match rplInteger "\(^\|\s\+\)[-+]\=\d\+\ze\($\|\s\+\)" " Floating point number " [S][ip].[fp] syntax match rplFloat "\(^\|\s\+\)[-+]\=\(\d*\)\=[\.,]\(\d*\)\=\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign " [S]ip[.fp]E[S]exp syntax match rplFloat "\(^\|\s\+\)[-+]\=\d\+\([\.,]\d*\)\=[eE]\([-+]\)\=\d\+\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign " [S].fpE[S]exp syntax match rplFloat "\(^\|\s\+\)[-+]\=\(\d*\)\=[\.,]\d\+[eE]\([-+]\)\=\d\+\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign syntax match rplPoint "\<[\.,]\>" syntax match rplSign "\<[+-]\>" " Complex number " (x,y) syntax match rplComplex "\(^\|\s\+\)([-+]\=\(\d*\)\=\.\=\d*\([eE][-+]\=\d\+\)\=\s*,\s*[-+]\=\(\d*\)\=\.\=\d*\([eE][-+]\=\d\+\)\=)\ze\($\|\s\+\)" " (x.y) syntax match rplComplex "\(^\|\s\+\)([-+]\=\(\d*\)\=,\=\d*\([eE][-+]\=\d\+\)\=\s*\.\s*[-+]\=\(\d*\)\=,\=\d*\([eE][-+]\=\d\+\)\=)\ze\($\|\s\+\)" " Strings syntax match rplStringGuilles "\\\"" syntax match rplStringAntislash "\\\\" syntax region rplString start=+\(^\|\s\+\)"+ end=+"\ze\($\|\s\+\)+ contains=rplStringGuilles,rplStringAntislash syntax match rplTab "\t" transparent " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default highlighting. hi def link rplControl Statement hi def link rplStatement Statement hi def link rplAlgConditional Conditional hi def link rplConditional Repeat hi def link rplConditionalError Error hi def link rplRepeat Repeat hi def link rplCycle Repeat hi def link rplUntil Repeat hi def link rplIntrinsic Special hi def link rplStorage StorageClass hi def link rplStorageExpr StorageClass hi def link rplStorageError Error hi def link rplReadWrite rplIntrinsic hi def link rplOperator Operator hi def link rplList Special hi def link rplArray Special hi def link rplConstant Identifier hi def link rplExpr Type hi def link rplString String hi def link rplStringGuilles String hi def link rplStringAntislash String hi def link rplBinary Boolean hi def link rplOctal Boolean hi def link rplDecimal Boolean hi def link rplHexadecimal Boolean hi def link rplInteger Number hi def link rplFloat Float hi def link rplComplex Float hi def link rplBoolean Identifier hi def link rplObsolete Todo hi def link rplPreCondit PreCondit hi def link rplInclude Include hi def link rplIncluded rplString hi def link rplInclude Include hi def link rplExecPath Include hi def link rplPreProc PreProc hi def link rplComment Comment hi def link rplCommentLine Comment hi def link rplCommentString Comment hi def link rplSubDelimitor rplStorage hi def link rplCommentError Error hi def link rplParenError Error hi def link rplSubError Error hi def link rplArrayError Error hi def link rplListError Error hi def link rplTab Error hi def link rplBinaryError Error hi def link rplOctalError Error hi def link rplDecimalError Error hi def link rplHexadecimalError Error let b:current_syntax = "rpl" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 tw=132 neovim-0.2.2/runtime/syntax/rrst.vim000066400000000000000000000024311320401574200175260ustar00rootroot00000000000000" reStructured Text with R statements " Language: reST with R code chunks " Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu " Homepage: https://github.com/jalvesaq/R-Vim-runtime " Last Change: Tue Jun 28, 2016 08:53AM " " CONFIGURATION: " To highlight chunk headers as R code, put in your vimrc: " let rrst_syn_hl_chunk = 1 if exists("b:current_syntax") finish endif " load all of the rst info runtime syntax/rst.vim unlet b:current_syntax " load all of the r syntax highlighting rules into @R syntax include @R syntax/r.vim " highlight R chunks if exists("g:rrst_syn_hl_chunk") " highlight R code inside chunk header syntax match rrstChunkDelim "^\.\. {r" contained syntax match rrstChunkDelim "}$" contained else syntax match rrstChunkDelim "^\.\. {r .*}$" contained endif syntax match rrstChunkDelim "^\.\. \.\.$" contained syntax region rrstChunk start="^\.\. {r.*}$" end="^\.\. \.\.$" contains=@R,rrstChunkDelim keepend transparent fold " also highlight in-line R code syntax match rrstInlineDelim "`" contained syntax match rrstInlineDelim ":r:" contained syntax region rrstInline start=":r: *`" skip=/\\\\\|\\`/ end="`" contains=@R,rrstInlineDelim keepend hi def link rrstChunkDelim Special hi def link rrstInlineDelim Special let b:current_syntax = "rrst" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/rst.vim000066400000000000000000000212021320401574200173410ustar00rootroot00000000000000" Vim syntax file " Language: reStructuredText documentation format " Maintainer: Marshall Ward " Previous Maintainer: Nikolai Weibull " Website: https://github.com/marshallward/vim-restructuredtext " Latest Revision: 2016-08-18 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case ignore syn match rstTransition /^[=`:.'"~^_*+#-]\{4,}\s*$/ syn cluster rstCruft contains=rstEmphasis,rstStrongEmphasis, \ rstInterpretedText,rstInlineLiteral,rstSubstitutionReference, \ rstInlineInternalTargets,rstFootnoteReference,rstHyperlinkReference syn region rstLiteralBlock matchgroup=rstDelimiter \ start='::\_s*\n\ze\z(\s\+\)' skip='^$' end='^\z1\@!' \ contains=@NoSpell syn region rstQuotedLiteralBlock matchgroup=rstDelimiter \ start="::\_s*\n\ze\z([!\"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]\)" \ end='^\z1\@!' contains=@NoSpell syn region rstDoctestBlock oneline display matchgroup=rstDelimiter \ start='^>>>\s' end='^$' syn region rstTable transparent start='^\n\s*+[-=+]\+' end='^$' \ contains=rstTableLines,@rstCruft syn match rstTableLines contained display '|\|+\%(=\+\|-\+\)\=' syn region rstSimpleTable transparent \ start='^\n\%(\s*\)\@>\%(\%(=\+\)\@>\%(\s\+\)\@>\)\%(\%(\%(=\+\)\@>\%(\s*\)\@>\)\+\)\@>$' \ end='^$' \ contains=rstSimpleTableLines,@rstCruft syn match rstSimpleTableLines contained display \ '^\%(\s*\)\@>\%(\%(=\+\)\@>\%(\s\+\)\@>\)\%(\%(\%(=\+\)\@>\%(\s*\)\@>\)\+\)\@>$' syn match rstSimpleTableLines contained display \ '^\%(\s*\)\@>\%(\%(-\+\)\@>\%(\s\+\)\@>\)\%(\%(\%(-\+\)\@>\%(\s*\)\@>\)\+\)\@>$' syn cluster rstDirectives contains=rstFootnote,rstCitation, \ rstHyperlinkTarget,rstExDirective syn match rstExplicitMarkup '^\s*\.\.\_s' \ nextgroup=@rstDirectives,rstComment,rstSubstitutionDefinition let s:ReferenceName = '[[:alnum:]]\+\%([_.-][[:alnum:]]\+\)*' syn keyword rstTodo contained FIXME TODO XXX NOTE execute 'syn region rstComment contained' . \ ' start=/.*/' \ ' end=/^\s\@!/ contains=rstTodo' execute 'syn region rstFootnote contained matchgroup=rstDirective' . \ ' start=+\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]\_s+' . \ ' skip=+^$+' . \ ' end=+^\s\@!+ contains=@rstCruft,@NoSpell' execute 'syn region rstCitation contained matchgroup=rstDirective' . \ ' start=+\[' . s:ReferenceName . '\]\_s+' . \ ' skip=+^$+' . \ ' end=+^\s\@!+ contains=@rstCruft,@NoSpell' syn region rstHyperlinkTarget contained matchgroup=rstDirective \ start='_\%(_\|[^:\\]*\%(\\.[^:\\]*\)*\):\_s' skip=+^$+ end=+^\s\@!+ syn region rstHyperlinkTarget contained matchgroup=rstDirective \ start='_`[^`\\]*\%(\\.[^`\\]*\)*`:\_s' skip=+^$+ end=+^\s\@!+ syn region rstHyperlinkTarget matchgroup=rstDirective \ start=+^__\_s+ skip=+^$+ end=+^\s\@!+ execute 'syn region rstExDirective contained matchgroup=rstDirective' . \ ' start=+' . s:ReferenceName . '::\_s+' . \ ' skip=+^$+' . \ ' end=+^\s\@!+ contains=@rstCruft,rstLiteralBlock' execute 'syn match rstSubstitutionDefinition contained' . \ ' /|' . s:ReferenceName . '|\_s\+/ nextgroup=@rstDirectives' function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_right) execute 'syn region rst' . a:name . \ ' start=+' . a:char_left . '\zs' . a:start . \ '\ze[^[:space:]' . a:char_right . a:start[strlen(a:start) - 1] . ']+' . \ a:middle . \ ' end=+\S' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+' endfunction function! s:DefineInlineMarkup(name, start, middle, end) let middle = a:middle != "" ? \ (' skip=+\\\\\|\\' . a:middle . '+') : \ "" call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, "'", "'") call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '"', '"') call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '(', ')') call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\[', '\]') call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}') call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>') call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '’', '’') " TODO: Additional Unicode Pd, Po, Pi, Pf, Ps characters call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|[/:]\)', '') execute 'syn match rst' . a:name . \ ' +\%(^\|\s\|[''"([{/:.,;!?\\-]\)+' execute 'hi def link rst' . a:name . 'Delimiter' . ' rst' . a:name endfunction call s:DefineInlineMarkup('Emphasis', '\*', '\*', '\*') call s:DefineInlineMarkup('StrongEmphasis', '\*\*', '\*', '\*\*') call s:DefineInlineMarkup('InterpretedTextOrHyperlinkReference', '`', '`', '`_\{0,2}') call s:DefineInlineMarkup('InlineLiteral', '``', "", '``') call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}') call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`') syn match rstSections "^\%(\([=`:.'"~^_*+#-]\)\1\+\n\)\=.\+\n\([=`:.'"~^_*+#-]\)\2\+$" " TODO: Can’t remember why these two can’t be defined like the ones above. execute 'syn match rstFootnoteReference contains=@NoSpell' . \ ' +\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+' execute 'syn match rstCitationReference contains=@NoSpell' . \ ' +\[' . s:ReferenceName . '\]_\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' execute 'syn match rstHyperlinkReference' . \ ' /\<' . s:ReferenceName . '__\=\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)/' syn match rstStandaloneHyperlink contains=@NoSpell \ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]" syn region rstCodeBlock contained matchgroup=rstDirective \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+\w*\_s*\n\ze\z(\s\+\)+ \ skip=+^$+ \ end=+^\z1\@!+ \ contains=@NoSpell syn cluster rstDirectives add=rstCodeBlock if !exists('g:rst_syntax_code_list') let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php', \ 'python', 'perl', 'sh'] endif for code in g:rst_syntax_code_list unlet! b:current_syntax " guard against setting 'isk' option which might cause problems (issue #108) let prior_isk = &l:iskeyword exe 'syn include @rst'.code.' syntax/'.code.'.vim' exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold' \.' start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)#' \.' skip=#^$#' \.' end=#^\z1\@!#' \.' contains=@NoSpell,@rst'.code exe 'syn cluster rstDirectives add=rstDirective'.code " reset 'isk' setting, if it has been changed if &l:iskeyword !=# prior_isk let &l:iskeyword = prior_isk endif unlet! prior_isk endfor " TODO: Use better syncing. syn sync minlines=50 linebreaks=2 hi def link rstTodo Todo hi def link rstComment Comment hi def link rstSections Title hi def link rstTransition rstSections hi def link rstLiteralBlock String hi def link rstQuotedLiteralBlock String hi def link rstDoctestBlock PreProc hi def link rstTableLines rstDelimiter hi def link rstSimpleTableLines rstTableLines hi def link rstExplicitMarkup rstDirective hi def link rstDirective Keyword hi def link rstFootnote String hi def link rstCitation String hi def link rstHyperlinkTarget String hi def link rstExDirective String hi def link rstSubstitutionDefinition rstDirective hi def link rstDelimiter Delimiter hi def rstEmphasis ctermfg=13 term=italic cterm=italic gui=italic hi def rstStrongEmphasis ctermfg=1 term=bold cterm=bold gui=bold hi def link rstInterpretedTextOrHyperlinkReference Identifier hi def link rstInlineLiteral String hi def link rstSubstitutionReference PreProc hi def link rstInlineInternalTargets Identifier hi def link rstFootnoteReference Identifier hi def link rstCitationReference Identifier hi def link rstHyperLinkReference Identifier hi def link rstStandaloneHyperlink Identifier hi def link rstCodeBlock String let b:current_syntax = "rst" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/rtf.vim000066400000000000000000000044321320401574200173320ustar00rootroot00000000000000" Vim syntax file " Language: Rich Text Format " "*.rtf" files " " The Rich Text Format (RTF) Specification is a method of encoding formatted " text and graphics for easy transfer between applications. " .hlp (windows help files) use compiled rtf files " rtf documentation at http://night.primate.wisc.edu/software/RTF/ " " Maintainer: Dominique Stphan (dominique@mggen.com) " URL: http://www.mggen.com/vim/syntax/rtf.zip " Last change: 2001 Mai 02 " TODO: render underline, italic, bold " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " case on (all controls must be lower case) syn case match " Control Words syn match rtfControlWord "\\[a-z]\+[\-]\=[0-9]*" " New Control Words (not in the 1987 specifications) syn match rtfNewControlWord "\\\*\\[a-z]\+[\-]\=[0-9]*" " Control Symbol : any \ plus a non alpha symbol, *, \, { and } and ' syn match rtfControlSymbol "\\[^a-zA-Z\*\{\}\\']" " { } and \ are special characters, to use them " we add a backslash \ syn match rtfCharacter "\\\\" syn match rtfCharacter "\\{" syn match rtfCharacter "\\}" " Escaped characters (for 8 bytes characters upper than 127) syn match rtfCharacter "\\'[A-Za-z0-9][A-Za-z0-9]" " Unicode syn match rtfUnicodeCharacter "\\u[0-9][0-9]*" " Color values, we will put this value in Red, Green or Blue syn match rtfRed "\\red[0-9][0-9]*" syn match rtfGreen "\\green[0-9][0-9]*" syn match rtfBlue "\\blue[0-9][0-9]*" " Some stuff for help files syn match rtfFootNote "[#$K+]{\\footnote.*}" contains=rtfControlWord,rtfNewControlWord " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link rtfControlWord Statement hi def link rtfNewControlWord Special hi def link rtfControlSymbol Constant hi def link rtfCharacter Character hi def link rtfUnicodeCharacter SpecialChar hi def link rtfFootNote Comment " Define colors for the syntax file hi rtfRed term=underline cterm=underline ctermfg=DarkRed gui=underline guifg=DarkRed hi rtfGreen term=underline cterm=underline ctermfg=DarkGreen gui=underline guifg=DarkGreen hi rtfBlue term=underline cterm=underline ctermfg=DarkBlue gui=underline guifg=DarkBlue hi def link rtfRed rtfRed hi def link rtfGreen rtfGreen hi def link rtfBlue rtfBlue let b:current_syntax = "rtf" " vim:ts=8 neovim-0.2.2/runtime/syntax/ruby.vim000066400000000000000000001173031320401574200175220ustar00rootroot00000000000000" Vim syntax file " Language: Ruby " Maintainer: Doug Kearns " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns " ---------------------------------------------------------------------------- " " Previous Maintainer: Mirko Nasato " Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN) " ---------------------------------------------------------------------------- " Prelude {{{1 if exists("b:current_syntax") finish endif " this file uses line continuations let s:cpo_sav = &cpo set cpo&vim " Folding Config {{{1 if has("folding") && exists("ruby_fold") setlocal foldmethod=syntax endif let s:foldable_groups = split( \ get( \ b:, \ 'ruby_foldable_groups', \ get(g:, 'ruby_foldable_groups', 'ALL') \ ) \ ) function! s:foldable(...) abort if index(s:foldable_groups, 'ALL') > -1 return 1 endif for l:i in a:000 if index(s:foldable_groups, l:i) > -1 return 1 endif endfor return 0 endfunction " }}} syn cluster rubyNotTop contains=@rubyExtendedStringSpecial,@rubyRegexpSpecial,@rubyDeclaration,rubyConditional,rubyExceptional,rubyMethodExceptional,rubyTodo " Whitespace Errors {{{1 if exists("ruby_space_errors") if !exists("ruby_no_trail_space_error") syn match rubySpaceError display excludenl "\s\+$" endif if !exists("ruby_no_tab_space_error") syn match rubySpaceError display " \+\t"me=e-1 endif endif " Operators {{{1 if exists("ruby_operators") syn match rubyOperator "[~!^|*/%+-]\|&\.\@!\|\%(class\s*\)\@\|<=\|\%(<\|\>\|>=\|=\@1\|\*\*\|\.\.\.\|\.\.\|::" syn match rubyOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=" syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@2<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop endif " Expression Substitution and Backslash Notation {{{1 syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display syn match rubyQuoteEscape "\\[\\']" contained display syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,@rubyNotTop syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable syn match rubyInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained syn region rubyNoInterpolation start="\\#{" end="}" contained syn match rubyNoInterpolation "\\#{" display contained syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained syn match rubyNoInterpolation "\\#\$\W" display contained syn match rubyDelimiterEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained " Regular Expression Metacharacters {{{1 " These are mostly Oniguruma ready syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\)" end=")" contained syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@rubyRegexpSpecial syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass oneline syn match rubyRegexpCharClass "\\[DdHhSsWw]" contained display syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained syn match rubyRegexpQuantifier "[*?+][?+]\=" contained display syn match rubyRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display syn match rubyRegexpAnchor "[$^]\|\\[ABbGZz]" contained display syn match rubyRegexpDot "\." contained display syn match rubyRegexpSpecial "|" contained display syn match rubyRegexpSpecial "\\[1-9]\d\=\d\@!" contained display syn match rubyRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display syn match rubyRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display syn match rubyRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment " Numbers and ASCII Codes {{{1 syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@1" display syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@" display syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@" display " Identifiers {{{1 syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent syn match rubyConstant "\%(\%(^\|[^.]\)\.\s*\)\@\%(\s*(\)\@!" syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)" syn match rubySymbol "[]})\"':]\@1\|<=\|<\|===\|[=!]=\|[=!]\~\|!@\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" syn match rubySymbol "[]})\"':]\@1_,;:!?/.'"@$*\&+0]\)" syn match rubySymbol "[]})\"':]\@1\@!\)\=" if s:foldable(':') syn region rubySymbol start="[]})\"':]\@1\%(\s*(\)*\s*(\@=" syn match rubyBlockParameter "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" contained syn region rubyBlockParameterList start="\%(\%(\\|{\)\_s*\)\@32<=|" end="|" oneline display contains=rubyBlockParameter syn match rubyInvalidVariable "$[^ A-Za-z_-]" syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]# syn match rubyPredefinedVariable "$\d\+" display syn match rubyPredefinedVariable "$_\>" display syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@\%(\s*(\)\@!" syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@\%(\s*(\)\@!" " Normal Regular Expression {{{1 if s:foldable('/') syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold else syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial endif " Generalized Regular Expression {{{1 if s:foldable('%') syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z(\s\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold else syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z(\s\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial endif " Normal String {{{1 let s:spell_cluster = exists('ruby_spellcheck_strings') ? ',@Spell' : '' exe 'syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" ' . \ (s:foldable('%') ? 'fold' : '') . ' contains=@rubyStringSpecial' . s:spell_cluster exe 'syn region rubyString matchgroup=rubyStringDelimiter start="''" end="''" skip="\\\\\|\\''" ' . \ (s:foldable('%') ? 'fold' : '') . ' contains=rubyQuoteEscape' . s:spell_cluster " Shell Command Output {{{1 if s:foldable('%') syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold else syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial endif " Generalized Single Quoted String, Symbol and Array of Strings {{{1 if s:foldable('%') syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%q\z(\s\)" end="\z1" skip="\\\\\|\\\z1" fold syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%s\z(\s\)" end="\z1" skip="\\\\\|\\\z1" fold else syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" contains=rubyNestedCurlyBraces,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" contains=rubyNestedAngleBrackets,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" contains=rubyNestedSquareBrackets,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" contains=rubyNestedParentheses,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%q\z(\s\)" end="\z1" skip="\\\\\|\\\z1" syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" contains=rubyNestedCurlyBraces,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" contains=rubyNestedAngleBrackets,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" contains=rubyNestedSquareBrackets,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" contains=rubyNestedParentheses,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%s\z(\s\)" end="\z1" skip="\\\\\|\\\z1" endif " Generalized Double Quoted String and Array of Strings and Shell Command Output {{{1 " Note: %= is not matched here as the beginning of a double quoted string if s:foldable('%') syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape fold syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape fold syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape fold syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape fold syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx]\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold else syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx]\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial endif " Array of Symbols {{{1 if s:foldable('%') " Array of Symbols syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimiterEscape " Array of interpolated Symbols syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I{" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape fold syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape fold syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape fold syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape fold else " Array of Symbols syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" contains=rubyNestedCurlyBraces,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" contains=rubyNestedAngleBrackets,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" contains=rubyNestedSquareBrackets,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" contains=rubyNestedParentheses,rubyDelimiterEscape " Array of interpolated Symbols syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I{" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape endif " Here Document {{{1 syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter " Keywords {{{1 " Note: the following keywords have already been defined: " begin case class def do end for if module unless until while syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!" syn match rubyOperator "\[?!]\@!" syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!" syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__dir__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!" " Expensive Mode {{{1 " Match 'end' with the appropriate opening keyword for syntax based folding " and special highlighting of module/class/method definitions if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") syn match rubyDefine "\" nextgroup=rubyAliasDeclaration skipwhite skipnl syn match rubyDefine "\" nextgroup=rubyMethodDeclaration skipwhite skipnl syn match rubyDefine "\" nextgroup=rubyFunction skipwhite skipnl syn match rubyClass "\" nextgroup=rubyClassDeclaration skipwhite skipnl syn match rubyModule "\" nextgroup=rubyModuleDeclaration skipwhite skipnl if s:foldable('def') syn region rubyMethodBlock start="\" matchgroup=rubyDefine end="\%(\" contains=ALLBUT,@rubyNotTop fold else syn region rubyMethodBlock start="\" matchgroup=rubyDefine end="\%(\" contains=ALLBUT,@rubyNotTop endif if s:foldable('class') syn region rubyBlock start="\" matchgroup=rubyClass end="\" contains=ALLBUT,@rubyNotTop fold else syn region rubyBlock start="\" matchgroup=rubyClass end="\" contains=ALLBUT,@rubyNotTop endif if s:foldable('module') syn region rubyBlock start="\" matchgroup=rubyModule end="\" contains=ALLBUT,@rubyNotTop fold else syn region rubyBlock start="\" matchgroup=rubyModule end="\" contains=ALLBUT,@rubyNotTop endif " modifiers syn match rubyLineContinuation "\\$" nextgroup=rubyConditionalModifier,rubyRepeatModifier skipwhite skipnl syn match rubyConditionalModifier "\<\%(if\|unless\)\>" syn match rubyRepeatModifier "\<\%(while\|until\)\>" if s:foldable('do') syn region rubyDoBlock matchgroup=rubyControl start="\" end="\" contains=ALLBUT,@rubyNotTop fold else syn region rubyDoBlock matchgroup=rubyControl start="\" end="\" contains=ALLBUT,@rubyNotTop endif " curly bracket block or hash literal if s:foldable('{') syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop fold else syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop endif if s:foldable('[') syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@" end="\" contains=ALLBUT,@rubyNotTop fold else syn region rubyBlockExpression matchgroup=rubyControl start="\" end="\" contains=ALLBUT,@rubyNotTop endif if s:foldable('case') syn region rubyCaseExpression matchgroup=rubyConditional start="\" end="\" contains=ALLBUT,@rubyNotTop fold else syn region rubyCaseExpression matchgroup=rubyConditional start="\" end="\" contains=ALLBUT,@rubyNotTop endif if s:foldable('if') syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\%(\%(\%(\.\@1" contains=ALLBUT,@rubyNotTop fold else syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\%(\%(\%(\.\@1" contains=ALLBUT,@rubyNotTop endif syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression syn match rubyExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyBlockExpression syn match rubyMethodExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyMethodBlock " statements with optional 'do' syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyOptionalDo end="\%(\\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop if s:foldable('for') syn region rubyRepeatExpression start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyRepeat end="\" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold else syn region rubyRepeatExpression start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyRepeat end="\" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine endif if !exists("ruby_minlines") let ruby_minlines = 500 endif exec "syn sync minlines=" . ruby_minlines else syn match rubyControl "\[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl syn match rubyControl "\[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl syn match rubyControl "\[?!]\@!" nextgroup=rubyModuleDeclaration skipwhite skipnl syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|ensure\|then\|when\|end\)\>[?!]\@!" syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!" endif " Special Methods {{{1 if !exists("ruby_no_special_methods") syn keyword rubyAccess public protected private public_class_method private_class_method public_constant private_constant module_function " attr is a common variable name syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" syn keyword rubyAttribute attr_accessor attr_reader attr_writer syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)" syn keyword rubyEval eval class_eval instance_eval module_eval syn keyword rubyException raise fail catch throw " false positive with 'include?' syn match rubyInclude "\[?!]\@!" syn keyword rubyInclude autoload extend load prepend refine require require_relative using syn keyword rubyKeyword callcc caller lambda proc endif " Comments and Documentation {{{1 syn match rubySharpBang "\%^#!.*" display syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE HACK REVIEW XXX todo contained syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell if !exists("ruby_no_comment_fold") && s:foldable('#') syn region rubyMultilineComment start="^\s*#.*\n\%(^\s*#\)\@=" end="^\s*#.*\n\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend syn region rubyDocumentation start="^=begin\ze\%(\s.*\)\=$" end="^=end\%(\s.*\)\=$" contains=rubySpaceError,rubyTodo,@Spell fold else syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell endif " Keyword Nobbling {{{1 " Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver syn match rubyKeywordAsMethod "\%(\%(\.\@1\)" transparent contains=NONE syn match rubyKeywordAsMethod "\(defined?\|exit!\)\@!\<[_[:lower:]][_[:alnum:]]*[?!]" transparent contains=NONE " More Symbols {{{1 syn match rubySymbol "\%([{(,]\_s*\)\zs\l\w*[!?]\=::\@!"he=e-1 syn match rubySymbol "[]})\"':]\@1 " Maintainer: Ben Blum " Maintainer: Chris Morgan " Last Change: Feb 24, 2016 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Syntax definitions {{{1 " Basic keywords {{{2 syn keyword rustConditional match if else syn keyword rustRepeat for loop while syn keyword rustTypedef type nextgroup=rustIdentifier skipwhite skipempty syn keyword rustStructure struct enum nextgroup=rustIdentifier skipwhite skipempty syn keyword rustUnion union nextgroup=rustIdentifier skipwhite skipempty contained syn match rustUnionContextual /\/ syn keyword rustInvalidBareKeyword crate syn keyword rustPubScopeCrate crate contained syn match rustPubScopeDelim /[()]/ contained syn match rustPubScope /([^()]*)/ contained contains=rustPubScopeDelim,rustPubScopeCrate,rustSuper,rustModPath,rustModPathSep,rustSelf transparent syn keyword rustExternCrate crate contained nextgroup=rustIdentifier,rustExternCrateString skipwhite skipempty " This is to get the `bar` part of `extern crate "foo" as bar;` highlighting. syn match rustExternCrateString /".*"\_s*as/ contained nextgroup=rustIdentifier skipwhite transparent skipempty contains=rustString,rustOperator syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite skipempty syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained syn region rustBoxPlacement matchgroup=rustBoxPlacementParens start="(" end=")" contains=TOP contained " Ideally we'd have syntax rules set up to match arbitrary expressions. Since " we don't, we'll just define temporary contained rules to handle balancing " delimiters. syn region rustBoxPlacementBalance start="(" end=")" containedin=rustBoxPlacement transparent syn region rustBoxPlacementBalance start="\[" end="\]" containedin=rustBoxPlacement transparent " {} are handled by rustFoldBraces syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end=")" contains=TOP nextgroup=rustMacroRepeatCount syn match rustMacroRepeatCount ".\?[*+]" contained syn match rustMacroVariable "$\w\+" " Reserved (but not yet used) keywords {{{2 syn keyword rustReservedKeyword alignof become do offsetof priv pure sizeof typeof unsized yield abstract virtual final override macro " Built-in types {{{2 syn keyword rustType isize usize char bool u8 u16 u32 u64 u128 f32 syn keyword rustType f64 i8 i16 i32 i64 i128 str Self " Things from the libstd v1 prelude (src/libstd/prelude/v1.rs) {{{2 " This section is just straight transformation of the contents of the prelude, " to make it easy to update. " Reexported core operators {{{3 syn keyword rustTrait Copy Send Sized Sync syn keyword rustTrait Drop Fn FnMut FnOnce " Reexported functions {{{3 " There’s no point in highlighting these; when one writes drop( or drop::< it " gets the same highlighting anyway, and if someone writes `let drop = …;` we " don’t really want *that* drop to be highlighted. "syn keyword rustFunction drop " Reexported types and traits {{{3 syn keyword rustTrait Box syn keyword rustTrait ToOwned syn keyword rustTrait Clone syn keyword rustTrait PartialEq PartialOrd Eq Ord syn keyword rustTrait AsRef AsMut Into From syn keyword rustTrait Default syn keyword rustTrait Iterator Extend IntoIterator syn keyword rustTrait DoubleEndedIterator ExactSizeIterator syn keyword rustEnum Option syn keyword rustEnumVariant Some None syn keyword rustEnum Result syn keyword rustEnumVariant Ok Err syn keyword rustTrait SliceConcatExt syn keyword rustTrait String ToString syn keyword rustTrait Vec " Other syntax {{{2 syn keyword rustSelf self syn keyword rustBoolean true false " If foo::bar changes to foo.bar, change this ("::" to "\."). " If foo::bar changes to Foo::bar, change this (first "\w" to "\u"). syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3 syn match rustModPathSep "::" syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1 syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::(); " This is merely a convention; note also the use of [A-Z], restricting it to " latin identifiers rather than the full Unicode uppercase. I have not used " [:upper:] as it depends upon 'noignorecase' "syn match rustCapsIdent display "[A-Z]\w\(\w\)*" syn match rustOperator display "\%(+\|-\|/\|*\|=\|\^\|&\||\|!\|>\|<\|%\)=\?" " This one isn't *quite* right, as we could have binary-& with a reference syn match rustSigil display /&\s\+[&~@*][^)= \t\r\n]/he=e-1,me=e-1 syn match rustSigil display /[&~@*][^)= \t\r\n]/he=e-1,me=e-1 " This isn't actually correct; a closure with no arguments can be `|| { }`. " Last, because the & in && isn't a sigil syn match rustOperator display "&&\|||" " This is rustArrowCharacter rather than rustArrow for the sake of matchparen, " so it skips the ->; see http://stackoverflow.com/a/30309949 for details. syn match rustArrowCharacter display "->" syn match rustQuestionMark display "?\([a-zA-Z]\+\)\@!" syn match rustMacro '\w\(\w\)*!' contains=rustAssert,rustPanic syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic syn match rustEscapeError display contained /\\./ syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/ syn match rustEscapeUnicode display contained /\\u{\x\{1,6}}/ syn match rustStringContinuation display contained /\\\n\s*/ syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell syn region rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDerive,rustCommentLine,rustCommentBlock,rustCommentLineDocError,rustCommentBlockDocError syn region rustDerive start="derive(" end=")" contained contains=rustDeriveTrait " This list comes from src/libsyntax/ext/deriving/mod.rs " Some are deprecated (Encodable, Decodable) or to be removed after a new snapshot (Show). syn keyword rustDeriveTrait contained Clone Hash RustcEncodable RustcDecodable Encodable Decodable PartialEq Eq PartialOrd Ord Rand Show Debug Default FromPrimitive Send Sync Copy " Number literals syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\=" syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\=" syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\=" syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\=" " Special case for numbers of the form "1." which are float literals, unless followed by " an identifier, which makes them integer literals with a method call or field access, " or by another ".", which makes them integer literals followed by the ".." token. " (This must go first so the others take precedence.) syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\|\.\)\@!" " To mark a number as a normal float, it must have at least one of the three things integral values don't have: " a decimal point and more numbers; an exponent; and a type suffix. syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\=" syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\(f32\|f64\)\=" syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)" " For the benefit of delimitMate syn region rustLifetimeCandidate display start=/&'\%(\([^'\\]\|\\\(['nrt0\\\"]\|x\x\{2}\|u{\x\{1,6}}\)\)'\)\@!/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime syn region rustGenericRegion display start=/<\%('\|[^[cntrl:][:space:][:punct:]]\)\@=')\S\@=/ end=/>/ contains=rustGenericLifetimeCandidate syn region rustGenericLifetimeCandidate display start=/\%(<\|,\s*\)\@<='/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime "rustLifetime must appear before rustCharacter, or chars will get the lifetime highlighting syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" syn match rustLabel display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*:" syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/ " The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII). syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/ syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u{\x\{1,6}}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid syn match rustShebang /\%^#![^[].*/ syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell syn region rustCommentLineDocError start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell contained syn region rustCommentBlock matchgroup=rustCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell syn region rustCommentBlockDoc matchgroup=rustCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell syn region rustCommentBlockDocError matchgroup=rustCommentBlockDocError start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained syn region rustCommentBlockNest matchgroup=rustCommentBlock start="/\*" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell contained transparent syn region rustCommentBlockDocNest matchgroup=rustCommentBlockDoc start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell contained transparent syn region rustCommentBlockDocNestError matchgroup=rustCommentBlockDocError start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained transparent " FIXME: this is a really ugly and not fully correct implementation. Most " importantly, a case like ``/* */*`` should have the final ``*`` not being in " a comment, but in practice at present it leaves comments open two levels " deep. But as long as you stay away from that particular case, I *believe* " the highlighting is correct. Due to the way Vim's syntax engine works " (greedy for start matches, unlike Rust's tokeniser which is searching for " the earliest-starting match, start or end), I believe this cannot be solved. " Oh you who would fix it, don't bother with things like duplicating the Block " rules and putting ``\*\@ " URL: http://rgarciasuarez.free.fr/vim/syntax/samba.vim " Last change: 2009 Aug 06 " " New maintainer wanted! " " Don't forget to run your config file through testparm(1)! " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore syn match sambaParameter /^[a-zA-Z \t]\+=/ contains=sambaKeyword syn match sambaSection /^\s*\[[a-zA-Z0-9_\-.$ ]\+\]/ syn match sambaMacro /%[SPugUGHvhmLMNpRdaITD]/ syn match sambaMacro /%$([a-zA-Z0-9_]\+)/ syn match sambaComment /^\s*[;#].*/ syn match sambaContinue /\\$/ syn keyword sambaBoolean true false yes no " Keywords for Samba 2.0.5a syn keyword sambaKeyword contained account acl action add address admin aliases syn keyword sambaKeyword contained allow alternate always announce anonymous syn keyword sambaKeyword contained archive as auto available bind blocking syn keyword sambaKeyword contained bmpx break browsable browse browseable ca syn keyword sambaKeyword contained cache case casesignames cert certDir syn keyword sambaKeyword contained certFile change char character chars chat syn keyword sambaKeyword contained ciphers client clientcert code coding syn keyword sambaKeyword contained command comment compatibility config syn keyword sambaKeyword contained connections contention controller copy syn keyword sambaKeyword contained create deadtime debug debuglevel default syn keyword sambaKeyword contained delete deny descend dfree dir directory syn keyword sambaKeyword contained disk dns domain domains dont dos dot drive syn keyword sambaKeyword contained driver encrypt encrypted equiv exec fake syn keyword sambaKeyword contained file files filetime filetimes filter follow syn keyword sambaKeyword contained force fstype getwd group groups guest syn keyword sambaKeyword contained hidden hide home homedir hosts include syn keyword sambaKeyword contained interfaces interval invalid keepalive syn keyword sambaKeyword contained kernel key ldap length level level2 limit syn keyword sambaKeyword contained links list lm load local location lock syn keyword sambaKeyword contained locking locks log logon logons logs lppause syn keyword sambaKeyword contained lpq lpresume lprm machine magic mangle syn keyword sambaKeyword contained mangled mangling map mask master max mem syn keyword sambaKeyword contained message min mode modes mux name names syn keyword sambaKeyword contained netbios nis notify nt null offset ok ole syn keyword sambaKeyword contained only open oplock oplocks options order os syn keyword sambaKeyword contained output packet page panic passwd password syn keyword sambaKeyword contained passwords path permissions pipe port ports syn keyword sambaKeyword contained postexec postscript prediction preexec syn keyword sambaKeyword contained preferred preload preserve print syn keyword sambaKeyword contained printable printcap printer printers syn keyword sambaKeyword contained printing program protocol proxy public syn keyword sambaKeyword contained queuepause queueresume raw read readonly syn keyword sambaKeyword contained realname remote require resign resolution syn keyword sambaKeyword contained resolve restrict revalidate rhosts root syn keyword sambaKeyword contained script security sensitive server servercert syn keyword sambaKeyword contained service services set share shared short syn keyword sambaKeyword contained size smb smbrun socket space ssl stack stat syn keyword sambaKeyword contained status strict string strip suffix support syn keyword sambaKeyword contained symlinks sync syslog system time timeout syn keyword sambaKeyword contained times timestamp to trusted ttl unix update syn keyword sambaKeyword contained use user username users valid version veto syn keyword sambaKeyword contained volume wait wide wins workgroup writable syn keyword sambaKeyword contained write writeable xmit " New keywords for Samba 2.0.6 syn keyword sambaKeyword contained hook hires pid uid close rootpreexec " New keywords for Samba 2.0.7 syn keyword sambaKeyword contained utmp wtmp hostname consolidate syn keyword sambaKeyword contained inherit source environment " New keywords for Samba 2.2.0 syn keyword sambaKeyword contained addprinter auth browsing deleteprinter syn keyword sambaKeyword contained enhanced enumports filemode gid host jobs syn keyword sambaKeyword contained lanman msdfs object os2 posix processes syn keyword sambaKeyword contained scope separator shell show smbd template syn keyword sambaKeyword contained total vfs winbind wizard " New keywords for Samba 2.2.1 syn keyword sambaKeyword contained large obey pam readwrite restrictions syn keyword sambaKeyword contained unreadable " New keywords for Samba 2.2.2 - 2.2.4 syn keyword sambaKeyword contained acls allocate bytes count csc devmode syn keyword sambaKeyword contained disable dn egd entropy enum extensions mmap syn keyword sambaKeyword contained policy spin spoolss " Since Samba 3.0.2 syn keyword sambaKeyword contained abort afs algorithmic backend syn keyword sambaKeyword contained charset cups defer display syn keyword sambaKeyword contained enable idmap kerberos lookups syn keyword sambaKeyword contained methods modules nested NIS ntlm NTLMv2 syn keyword sambaKeyword contained objects paranoid partners passdb syn keyword sambaKeyword contained plaintext prefix primary private syn keyword sambaKeyword contained profile quota realm replication syn keyword sambaKeyword contained reported rid schannel sendfile sharing syn keyword sambaKeyword contained shutdown signing special spnego syn keyword sambaKeyword contained store unknown unwriteable " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link sambaParameter Normal hi def link sambaKeyword Type hi def link sambaSection Statement hi def link sambaMacro PreProc hi def link sambaComment Comment hi def link sambaContinue Operator hi def link sambaBoolean Constant let b:current_syntax = "samba" " vim: ts=8 neovim-0.2.2/runtime/syntax/sas.vim000066400000000000000000001024471320401574200173320ustar00rootroot00000000000000" Vim syntax file " Language: SAS " Maintainer: Zhen-Huan Hu " Original Maintainer: James Kidd " Version: 3.0.0 " Last Change: Aug 26, 2017 " " 2017 Mar 7 " " Upgrade version number to 3.0. Improvements include: " - Improve sync speed " - Largely enhance precision " - Update keywords in the latest SAS (as of Mar 2017) " - Add syntaxes for date/time constants " - Add syntax for data lines " - Add (back) syntax for TODO in comments " " 2017 Feb 9 " " Add syntax folding " " 2016 Oct 10 " " Add highlighting for functions " " 2016 Sep 14 " " Change the implementation of syntaxing " macro function names so that macro parameters same " as SAS keywords won't be highlighted " (Thank Joug Raw for the suggestion) " Add section highlighting: " - Use /** and **/ to define a section " - It functions the same as a comment but " with different highlighting " " 2016 Jun 14 " " Major changes so upgrade version number to 2.0 " Overhaul the entire script (again). Improvements include: " - Higher precision " - Faster synchronization " - Separate color for control statements " - Highlight hash and java objects " - Highlight macro variables in double quoted strings " - Update all syntaxes based on SAS 9.4 " - Add complete SAS/GRAPH and SAS/STAT procedure syntaxes " - Add Proc TEMPLATE and GTL syntaxes " - Add complete DS2 syntaxes " - Add basic IML syntaxes " - Many other improvements and bug fixes " Drop support for VIM version < 600 if version < 600 syntax clear elseif exists('b:current_syntax') finish endif let s:cpo_save = &cpo set cpo&vim syn case ignore " Basic SAS syntaxes syn keyword sasOperator and eq ge gt in le lt ne not of or syn keyword sasReserved _all_ _automatic_ _char_ _character_ _data_ _infile_ _last_ _n_ _name_ _null_ _num_ _numeric_ _temporary_ _user_ _webout_ " Strings syn region sasString start=+'+ skip=+''+ end=+'+ contains=@Spell syn region sasString start=+"+ skip=+""+ end=+"+ contains=sasMacroVariable,@Spell " Constants syn match sasNumber /\v<\d+%(\.\d+)=%(>|e[\-+]=\d+>)/ display syn match sasDateTime /\v(['"])\d{2}%(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d{2}%(\d{2})=:\d{2}:\d{2}%(:\d{2})=%(am|pm)\1dt>/ display syn match sasDateTime /\v(['"])\d{2}%(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d{2}%(\d{2})=\1d>/ display syn match sasDateTime /\v(['"])\d{2}:\d{2}%(:\d{2})=%(am|pm)\1t>/ display " Comments syn keyword sasTodo todo tbd fixme contained syn region sasComment start='/\*' end='\*/' contains=sasTodo syn region sasComment start='\v%(^|;)\s*\zs\%=\*' end=';'me=s-1 contains=sasTodo syn region sasSectLbl matchgroup=sasSectLblEnds start='/\*\*\s*' end='\s*\*\*/' concealends " Macros syn match sasMacroVariable '\v\&+\w+%(\.\w+)=' display syn match sasMacroReserved '\v\%%(abort|by|copy|display|do|else|end|global|goto|if|include|input|let|list|local|macro|mend|put|return|run|symdel|syscall|sysexec|syslput|sysrput|then|to|until|window|while)>' display syn region sasMacroFunction matchgroup=sasMacroFunctionName start='\v\%\w+\ze\(' end=')'he=s-1 contains=@sasBasicSyntax,sasMacroFunction syn region sasMacroFunction matchgroup=sasMacroFunctionName start='\v\%q=sysfunc\ze\(' end=')'he=s-1 contains=@sasBasicSyntax,sasMacroFunction,sasDataStepFunction " Syntax cluster for basic SAS syntaxes syn cluster sasBasicSyntax contains=sasOperator,sasReserved,sasNumber,sasDateTime,sasString,sasComment,sasMacroReserved,sasMacroFunction,sasMacroVariable,sasSectLbl " Formats syn match sasFormat '\v\$\w+\.' display contained syn match sasFormat '\v<\w+\.%(\d+>)=' display contained syn region sasFormatContext start='.' end=';'me=s-1 contained contains=@sasBasicSyntax,sasFormat " Define global statements that can be accessed out of data step or procedures syn keyword sasGlobalStatementKeyword catname dm endsas filename footnote footnote1 footnote2 footnote3 footnote4 footnote5 footnote6 footnote7 footnote8 footnote9 footnote10 missing libname lock ods options page quit resetline run sasfile skip sysecho title title1 title2 title3 title4 title5 title6 title7 title8 title9 title10 contained syn keyword sasGlobalStatementODSKeyword chtml csvall docbook document escapechar epub epub2 epub3 exclude excel graphics html html3 html5 htmlcss imode listing markup output package path pcl pdf preferences phtml powerpoint printer proclabel proctitle ps results rtf select show tagsets trace usegopt verify wml contained syn match sasGlobalStatement '\v%(^|;)\s*\zs\h\w*>' display transparent contains=sasGlobalStatementKeyword syn match sasGlobalStatement '\v%(^|;)\s*\zsods>' display transparent contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty " Data step statements, 9.4 syn keyword sasDataStepFunctionName abs addr addrlong airy allcomb allperm anyalnum anyalpha anycntrl anydigit anyfirst anygraph anylower anyname anyprint anypunct anyspace anyupper anyxdigit arcos arcosh arsin arsinh artanh atan atan2 attrc attrn band beta betainv blackclprc blackptprc blkshclprc blkshptprc blshift bnot bor brshift bxor byte cat catq cats catt catx cdf ceil ceilz cexist char choosec choosen cinv close cmiss cnonct coalesce coalescec collate comb compare compbl compfuzz compged complev compound compress constant convx convxp cos cosh cot count countc countw csc css cumipmt cumprinc curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datdif date datejul datepart datetime day dclose dcreate depdb depdbsl depsl depsyd deptab dequote deviance dhms dif digamma dim dinfo divide dnum dopen doptname doptnum dosubl dread dropnote dsname dsncatlgd dur durp effrate envlen erf erfc euclid exist exp fact fappend fclose fcol fcopy fdelete fetch fetchobs fexist fget fileexist filename fileref finance find findc findw finfo finv fipname fipnamel fipstate first floor floorz fmtinfo fnonct fnote fopen foptname foptnum fpoint fpos fput fread frewind frlen fsep fuzz fwrite gaminv gamma garkhclprc garkhptprc gcd geodist geomean geomeanz getoption getvarc getvarn graycode harmean harmeanz hbound hms holiday holidayck holidaycount holidayname holidaynx holidayny holidaytest hour htmldecode htmlencode ibessel ifc ifn index indexc indexw input inputc inputn int intcindex intck intcycle intfit intfmt intget intindex intnx intrr intseas intshift inttest intz iorcmsg ipmt iqr irr jbessel juldate juldate7 kurtosis lag largest lbound lcm lcomb left length lengthc lengthm lengthn lexcomb lexcombi lexperk lexperm lfact lgamma libname libref log log1px log10 log2 logbeta logcdf logistic logpdf logsdf lowcase lperm lpnorm mad margrclprc margrptprc max md5 mdy mean median min minute missing mod modexist module modulec modulen modz month mopen mort msplint mvalid contained syn keyword sasDataStepFunctionName n netpv nliteral nmiss nomrate normal notalnum notalpha notcntrl notdigit note notfirst notgraph notlower notname notprint notpunct notspace notupper notxdigit npv nvalid nwkdom open ordinal pathname pctl pdf peek peekc peekclong peeklong perm pmt point poisson ppmt probbeta probbnml probbnrm probchi probf probgam probhypr probit probmc probnegb probnorm probt propcase prxchange prxmatch prxparen prxparse prxposn ptrlongadd put putc putn pvp qtr quantile quote ranbin rancau rand ranexp rangam range rank rannor ranpoi rantbl rantri ranuni rename repeat resolve reverse rewind right rms round rounde roundz saving savings scan sdf sec second sha256 sha256hex sha256hmachex sign sin sinh skewness sleep smallest soapweb soapwebmeta soapwipservice soapwipsrs soapws soapwsmeta soundex spedis sqrt squantile std stderr stfips stname stnamel strip subpad substr substrn sum sumabs symexist symget symglobl symlocal sysexist sysget sysmsg sysparm sysprocessid sysprocessname sysprod sysrc system tan tanh time timepart timevalue tinv tnonct today translate transtrn tranwrd trigamma trim trimn trunc tso typeof tzoneid tzonename tzoneoff tzones2u tzoneu2s uniform upcase urldecode urlencode uss uuidgen var varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vtype vtypex vvalue vvaluex week weekday whichc whichn wto year yieldp yrdif yyq zipcity zipcitydistance zipfips zipname zipnamel zipstate contained syn keyword sasDataStepCallRoutineName allcomb allcombi allperm cats catt catx compcost execute graycode is8601_convert label lexcomb lexcombi lexperk lexperm logistic missing module poke pokelong prxchange prxdebug prxfree prxnext prxposn prxsubstr ranbin rancau rancomb ranexp rangam rannor ranperk ranperm ranpoi rantbl rantri ranuni scan set sleep softmax sortc sortn stdize streaminit symput symputx system tanh tso vname vnext wto contained syn region sasDataStepFunctionContext start='(' end=')' contained contains=@sasBasicSyntax,sasDataStepFunction syn region sasDataStepFunctionFormatContext start='(' end=')' contained contains=@sasBasicSyntax,sasDataStepFunction,sasFormat syn match sasDataStepFunction '\v<\w+\ze\(' contained contains=sasDataStepFunctionName,sasDataStepCallRoutineName nextgroup=sasDataStepFunctionContext syn match sasDataStepFunction '\v%(input|put)\ze\(' contained contains=sasDataStepFunctionName nextgroup=sasDataStepFunctionFormatContext syn keyword sasDataStepHashMethodName add check clear definedata definedone definekey delete do_over equals find find_next find_prev first has_next has_prev last next output prev ref remove removedup replace replacedup reset_dup setcur sum sumdup contained syn region sasDataStepHashMethodContext start='(' end=')' contained contains=@sasBasicSyntax,sasDataStepFunction syn match sasDataStepHashMethod '\v\.\w+\ze\(' contained contains=sasDataStepHashMethodName nextgroup=sasDataStepHashMethodContext syn keyword sasDataStepHashAttributeName item_size num_items contained syn match sasDataStepHashAttribute '\v\.\w+>\ze\_[^(]' display contained contains=sasDataStepHashAttributeName syn keyword sasDataStepControl continue do end go goto if leave link otherwise over return select to until when while contained syn keyword sasDataStepControl else then contained nextgroup=sasDataStepStatementKeyword skipwhite skipnl skipempty syn keyword sasDataStepHashOperator _new_ contained syn keyword sasDataStepStatementKeyword abort array attrib by call cards cards4 datalines datalines4 dcl declare delete describe display drop error execute file format infile informat input keep label length lines lines4 list lostcard merge modify output put putlog redirect remove rename replace retain set stop update where window contained syn keyword sasDataStepStatementHashKeyword hash hiter javaobj contained syn match sasDataStepStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasDataStepStatementKeyword,sasGlobalStatementKeyword syn match sasDataStepStatement '\v%(^|;)\s*\zs%(dcl|declare)>' display contained contains=sasDataStepStatementKeyword nextgroup=sasDataStepStatementHashKeyword skipwhite skipnl skipempty syn match sasDataStepStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty syn match sasDataStepStatement '\v%(^|;)\s*\zs%(format|informat|input|put)>' display contained contains=sasDataStepStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty syn match sasDataStepStatement '\v%(^|;)\s*\zs%(cards|datalines|lines)4=\s*;' display contained contains=sasDataStepStatementKeyword nextgroup=sasDataLine skipwhite skipnl skipempty syn region sasDataLine start='^' end='^\s*;'me=s-1 contained syn region sasDataStep matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsdata>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,@sasDataStepSyntax syn cluster sasDataStepSyntax contains=sasDataStepFunction,sasDataStepHashOperator,sasDataStepHashAttribute,sasDataStepHashMethod,sasDataStepControl,sasDataStepStatement " Procedures, base SAS, 9.4 syn keyword sasProcStatementKeyword abort age append array attrib audit block break by calid cdfplot change checkbox class classlev column compute contents copy create datarow dbencoding define delete deletefunc deletesubr delimiter device dialog dur endcomp exact exchange exclude explore fin fmtlib fontfile fontpath format formats freq function getnames guessingrows hbar hdfs histogram holidur holifin holistart holivar id idlabel informat inset invalue item key keylabel keyword label line link listfunc listsubr mapmiss mapreduce mean menu messages meta modify opentype outargs outdur outfin output outstart pageby partial picture pie pig plot ppplot printer probplot profile prompter qqplot radiobox ranks rbreak rbutton rebuild record remove rename repair report roptions save select selection separator source star start statistics struct submenu subroutine sum sumby table tables test text trantab truetype type1 types value var vbar ways weight where with write contained syn match sasProcStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasProcStatementKeyword,sasGlobalStatementKeyword syn match sasProcStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty syn match sasProcStatement '\v%(^|;)\s*\zs%(format|informat)>' display contained contains=sasProcStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty syn region sasProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc%(\s+\h\w*)=>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepFunction,sasProcStatement syn region sasProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(catalog|chart|datasets|document|plot)>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepFunction,sasProcStatement " Procedures, SAS/GRAPH, 9.4 syn keyword sasGraphProcStatementKeyword add area axis bar block bubble2 byline cc ccopy cdef cdelete chart cmap choro copy delete device dial donut exclude flow format fs goptions gout grid group hbar hbar3d hbullet hslider htrafficlight id igout label legend list modify move nobyline note pattern pie pie3d plot plot2 preview prism quit rename replay select scatter speedometer star surface symbol tc tcopy tdef tdelete template tile toggle treplay vbar vbar3d vtrafficlight vbullet vslider where contained syn match sasGraphProcStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasGraphProcStatementKeyword,sasGlobalStatementKeyword syn match sasGraphProcStatement '\v%(^|;)\s*\zsformat>' display contained contains=sasGraphProcStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty syn region sasGraphProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(g3d|g3grid|ganno|gcontour|gdevice|geocode|gfont|ginside|goptions|gproject|greduce|gremove|mapimport)>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepFunction,sasGraphProcStatement syn region sasGraphProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(gareabar|gbarline|gchart|gkpi|gmap|gplot|gradar|greplay|gslide|gtile)>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepFunction,sasGraphProcStatement " Procedures, SAS/STAT, 14.1 syn keyword sasAnalyticalProcStatementKeyword absorb add array assess baseline bayes beginnodata bivar bootstrap bounds by cdfplot cells class cluster code compute condition contrast control coordinates copy cosan cov covtest coxreg der design determ deviance direct directions domain effect effectplot effpart em endnodata equality estimate exact exactoptions factor factors fcs filter fitindex format freq fwdlink gender grid group grow hazardratio height hyperprior id impjoint inset insetgroup invar invlink ippplot lincon lineqs lismod lmtests location logistic loglin lpredplot lsmeans lsmestimate manova matings matrix mcmc mean means missmodel mnar model modelaverage modeleffects monotone mstruct mtest multreg name nlincon nloptions oddsratio onecorr onesamplefreq onesamplemeans onewayanova outfiles output paired pairedfreq pairedmeans parameters parent parms partial partition path pathdiagram pcov performance plot population poststrata power preddist predict predpplot priors process probmodel profile prune pvar ram random ratio reference refit refmodel renameparm repeated replicate repweights response restore restrict retain reweight ridge rmsstd roc roccontrast rules samplesize samplingunit seed size scale score selection show simtests simulate slice std stderr store strata structeq supplementary table tables test testclass testfreq testfunc testid time transform treatments trend twosamplefreq twosamplemeans towsamplesurvival twosamplewilcoxon uds units univar var variance varnames weight where with zeromodel contained syn match sasAnalyticalProcStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasAnalyticalProcStatementKeyword,sasGlobalStatementKeyword syn match sasAnalyticalProcStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty syn match sasAnalyticalProcStatement '\v%(^|;)\s*\zsformat>' display contained contains=sasAnalyticalProcStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty syn region sasAnalyticalProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(aceclus|adaptivereg|bchoice|boxplot|calis|cancorr|candisc|cluster|corresp|discrim|distance|factor|fastclus|fmm|freq|gam|gampl|gee|genmod|glimmix|glmmod|glmpower|glmselect|hpcandisc|hpfmm|hpgenselect|hplmixed|hplogistic|hpmixed|hpnlmod|hppls|hpprincomp|hpquantselect|hpreg|hpsplit|iclifetest|icphreg|inbreed|irt|kde|krige2d|lattice|lifereg|lifetest|loess|logistic|mcmc|mds|mi|mianalyze|mixed|modeclus|multtest|nested|nlin|nlmixed|npar1way|orthoreg|phreg|plm|pls|power|princomp|prinqual|probit|quantlife|quantreg|quantselect|robustreg|rsreg|score|seqdesign|seqtest|sim2d|simnormal|spp|stdize|stdrate|stepdisc|surveyfreq|surveyimpute|surveylogistic|surveymeans|surveyphreg|surveyreg|surveyselect|tpspline|transreg|tree|ttest|varclus|varcomp|variogram)>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepControl,sasDataStepFunction,sasAnalyticalProcStatement syn region sasAnalyticalProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(anova|arima|catmod|factex|glm|model|optex|plan|reg)>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepControl,sasDataStepFunction,sasAnalyticalProcStatement " Procedures, ODS graphics, 9.4 syn keyword sasODSGraphicsProcStatementKeyword band block bubble by colaxis compare dattrvar density dot dropline dynamic ellipse ellipseparm format fringe gradlegend hbar hbarbasic hbarparm hbox heatmap heatmapparm highlow histogram hline inset keylegend label lineparm loess matrix needle parent panelby pbspline plot polygon refline reg rowaxis scatter series spline step style styleattrs symbolchar symbolimage text vbar vbarbasic vbarparm vbox vector vline waterfall where xaxis x2axis yaxis y2axis yaxistable contained syn match sasODSGraphicsProcStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasODSGraphicsProcStatementKeyword,sasGlobalStatementKeyword syn match sasODSGraphicsProcStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty syn match sasODSGraphicsProcStatement '\v%(^|;)\s*\zsformat>' display contained contains=sasODSGraphicsProcStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty syn region sasODSGraphicsProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(sgdesign|sgpanel|sgplot|sgrender|sgscatter)>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepFunction,sasODSGraphicsProcStatement " Proc TEMPLATE, 9.4 syn keyword sasProcTemplateClause as into syn keyword sasProcTemplateStatementKeyword block break cellstyle class close column compute continue define delete delstream do done dynamic edit else end eval flush footer header import iterate link list mvar ndent next nmvar notes open path put putl putlog putq putstream putvars replace set source stop style test text text2 text3 translate trigger unblock unset xdent contained syn keyword sasProcTemplateStatementComplexKeyword cellvalue column crosstabs event footer header statgraph style table tagset contained syn keyword sasProcTemplateGTLStatementKeyword axislegend axistable bandplot barchart barchartparm begingraph beginpolygon beginpolyline bihistogram3dparm blockplot boxplot boxplotparm bubbleplot continuouslegend contourplotparm dendrogram discretelegend drawarrow drawimage drawline drawoval drawrectangle drawtext dropline ellipse ellipseparm endgraph endinnermargin endlayout endpolygon endpolyline endsidebar entry entryfootnote entrytitle fringeplot heatmap heatmapparm highlowplot histogram histogramparm innermargin layout legenditem legendtextitems linechart lineparm loessplot mergedlegend modelband needleplot pbsplineplot polygonplot referenceline regressionplot scatterplot seriesplot sidebar stepplot surfaceplotparm symbolchar symbolimage textplot vectorplot waterfallchart contained syn keyword sasProcTemplateGTLComplexKeyword datalattice datapanel globallegend gridded lattice overlay overlayequated overlay3d region contained syn match sasProcTemplateStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasProcTemplateStatementKeyword,sasProcTemplateGTLStatementKeyword,sasGlobalStatementKeyword syn match sasProcTemplateStatement '\v%(^|;)\s*\zsdefine>' display contained contains=sasProcTemplateStatementKeyword nextgroup=sasProcTemplateStatementComplexKeyword skipwhite skipnl skipempty syn match sasProcTemplateStatement '\v%(^|;)\s*\zslayout>' display contained contains=sasProcTemplateGTLStatementKeyword nextgroup=sasProcTemplateGTLComplexKeyword skipwhite skipnl skipempty syn match sasProcTemplateStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty syn region sasProcTemplate matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+template>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasProcTemplateClause,sasProcTemplateStatement " Proc SQL, 9.4 syn keyword sasProcSQLFunctionName avg count css cv freq max mean median min n nmiss prt range std stderr sum sumwgt t uss var contained syn region sasProcSQLFunctionContext start='(' end=')' contained contains=@sasBasicSyntax,sasProcSQLFunction syn match sasProcSQLFunction '\v<\w+\ze\(' contained contains=sasProcSQLFunctionName,sasDataStepFunctionName nextgroup=sasProcSQLFunctionContext syn keyword sasProcSQLClause add asc between by calculated cascade case check connection constraint cross desc distinct drop else end escape except exists foreign from full group having in inner intersect into is join key left libname like modify natural newline notrim null on order outer primary references restrict right separated set then to trimmed union unique user using values when where contained syn keyword sasProcSQLClause as contained nextgroup=sasProcSQLStatementKeyword skipwhite skipnl skipempty syn keyword sasProcSQLStatementKeyword connect delete disconnect execute insert reset select update validate contained syn keyword sasProcSQLStatementComplexKeyword alter create describe drop contained nextgroup=sasProcSQLStatementNextKeyword skipwhite skipnl skipempty syn keyword sasProcSQLStatementNextKeyword index table view contained syn match sasProcSQLStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasProcSQLStatementKeyword,sasGlobalStatementKeyword syn match sasProcSQLStatement '\v%(^|;)\s*\zs%(alter|create|describe|drop)>' display contained contains=sasProcSQLStatementComplexKeyword nextgroup=sasProcSQLStatementNextKeyword skipwhite skipnl skipempty syn match sasProcSQLStatement '\v%(^|;)\s*\zsvalidate>' display contained contains=sasProcSQLStatementKeyword nextgroup=sasProcSQLStatementKeyword,sasProcSQLStatementComplexKeyword skipwhite skipnl skipempty syn match sasProcSQLStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty syn region sasProcSQL matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+sql>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasProcSQLFunction,sasProcSQLClause,sasProcSQLStatement " SAS/DS2, 9.4 syn keyword sasDS2FunctionName abs anyalnum anyalpha anycntrl anydigit anyfirst anygraph anylower anyname anyprint anypunct anyspace anyupper anyxdigit arcos arcosh arsin arsinh artanh atan atan2 band beta betainv blackclprc blackptprc blkshclprc blkshptprc blshift bnot bor brshift bxor byte cat cats catt catx ceil ceilz choosec choosen cmp cmpt coalesce coalescec comb compare compbl compfuzz compound compress constant convx convxp cos cosh count countc countw css cumipmt cumprinc cv datdif date datejul datepart datetime day dequote deviance dhms dif digamma dim divide dur durp effrate erf erfc exp fact find findc findw floor floorz fmtinfo fuzz gaminv gamma garkhclprc garkhptprc gcd geodist geomean geomeanz harmean harmeanz hbound hms holiday hour index indexc indexw inputc inputn int intcindex intck intcycle intdt intfit intget intindex intnest intnx intrr intseas intshift inttest intts intz ipmt iqr irr juldate juldate7 kcount kstrcat kstrip kupdate kupdates kurtosis lag largest lbound lcm left length lengthc lengthm lengthn lgamma log logbeta log10 log1px log2 lowcase mad margrclprc margrptprc max md5 mdy mean median min minute missing mod modz month mort n ndims netpv nmiss nomrate notalnum notalpha notcntrl notdigit notfirst notgraph notlower notname notprint notpunct notspace notupper notxdigit npv null nwkdom ordinal pctl perm pmt poisson power ppmt probbeta probbnml probbnrm probchi probdf probf probgam probhypr probit probmc probmed probnegb probnorm probt prxchange prxmatch prxparse prxposn put pvp qtr quote ranbin rancau rand ranexp rangam range rank rannor ranpoi rantbl rantri ranuni repeat reverse right rms round rounde roundz savings scan sec second sha256hex sha256hmachex sign sin sinh skewness sleep smallest sqlexec sqrt std stderr streaminit strip substr substrn sum sumabs tan tanh time timepart timevalue tinv to_date to_double to_time to_timestamp today translate transtrn tranwrd trigamma trim trimn trunc uniform upcase uss uuidgen var verify vformat vinarray vinformat vlabel vlength vname vtype week weekday whichc whichn year yieldp yrdif yyq contained syn region sasDS2FunctionContext start='(' end=')' contained contains=@sasBasicSyntax,sasDS2Function syn match sasDS2Function '\v<\w+\ze\(' contained contains=sasDS2FunctionName nextgroup=sasDS2FunctionContext syn keyword sasDS2Control continue data dcl declare do drop else end enddata endpackage endthread from go goto if leave method otherwise package point return select then thread to until when while contained syn keyword sasDS2StatementKeyword array by forward keep merge output put rename retain set stop vararray varlist contained syn keyword sasDS2StatementComplexKeyword package thread contained syn match sasDS2Statement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasDS2StatementKeyword,sasGlobalStatementKeyword syn match sasDS2Statement '\v%(^|;)\s*\zs%(dcl|declare|drop)>' display contained contains=sasDS2StatementKeyword nextgroup=sasDS2StatementComplexKeyword skipwhite skipnl skipempty syn match sasDS2Statement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty syn region sasDS2 matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+ds2>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDS2Function,sasDS2Control,sasDS2Statement " SAS/IML, 14.1 syn keyword sasIMLFunctionName abs all allcomb allperm any apply armasim bin blankstr block branks bspline btran byte char choose col colvec concat contents convexit corr corr2cov countmiss countn countunique cov cov2corr covlag cshape cusum cuprod cv cvexhull datasets design designf det diag dif dimension distance do duration echelon eigval eigvec element exp expmatrix expandgrid fft forward froot full gasetup geomean ginv hadamard half hankel harmean hdir hermite homogen i ifft insert int inv invupdt isempty isskipped j jroot kurtosis lag length loc log logabsdet mad magic mahalanobis max mean median min mod moduleic modulein name ncol ndx2sub nleng norm normal nrow num opscal orpol parentname palette polyroot prod product pv quartile rancomb randdirichlet randfun randmultinomial randmvt randnormal randwishart ranperk ranperm range rank ranktie rates ratio remove repeat root row rowcat rowcatc rowvec rsubstr sample setdif shape shapecol skewness solve sparse splinev spot sqrsym sqrt sqrvech ssq standard std storage sub2ndx substr sum sweep symsqr t toeplitz trace trisolv type uniform union unique uniqueby value var vecdiag vech xmult xsect yield contained syn keyword sasIMLCallRoutineName appcort armacov armalik bar box change comport delete eigen execute exportdatasettor exportmatrixtor farmacov farmafit farmalik farmasim fdif gaend gagetmem gagetval gainit gareeval garegen gasetcro gasetmut gasetobj gasetsel gblkvp gblkvpd gclose gdelete gdraw gdrawl geneig ggrid ginclude gopen gpie gpiexy gpoint gpoly gport gportpop gportstk gscale gscript gset gshow gsorth gstart gstop gstrlen gtext gvtext gwindow gxaxis gyaxis heatmapcont heatmapdisc histogram importdatasetfromr importmatrixfromr ipf itsolver kalcvf kalcvs kaldff kaldfs lav lcp lms lp lpsolve lts lupdt marg maxqform mcd milpsolve modulei mve nlpcg nlpdd nlpfdd nlpfea nlphqn nlplm nlpnms nlpnra nlpnrr nlpqn nlpqua nlptr ode odsgraph ortvec pgraf push qntl qr quad queue randgen randseed rdodt rupdt rename rupdt rzlind scatter seq seqscale seqshift seqscale seqshift series solvelin sort sortndx sound spline splinec svd tabulate tpspline tpsplnev tsbaysea tsdecomp tsmlocar tsmlomar tsmulmar tspears tspred tsroot tstvcar tsunimar valset varmacov varmalik varmasim vnormal vtsroot wavft wavget wavift wavprint wavthrsh contained syn region sasIMLFunctionContext start='(' end=')' contained contains=@sasBasicSyntax,sasIMLFunction syn match sasIMLFunction '\v<\w+\ze\(' contained contains=sasIMLFunctionName,sasDataStepFunction nextgroup=sasIMLFunctionContext syn keyword sasIMLControl abort by do else end finish goto if link pause quit resume return run start stop then to until while contained syn keyword sasIMLStatementKeyword append call close closefile create delete display edit file find force free index infile input list load mattrib print purge read remove replace reset save setin setout show sort store summary use window contained syn match sasIMLStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasIMLStatementKeyword,sasGlobalStatementKeyword syn match sasIMLStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty syn region sasIML matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+iml>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasIMLFunction,sasIMLControl,sasIMLStatement " Macro definition syn region sasMacro start='\v\%macro>' end='\v\%mend>' fold keepend contains=@sasBasicSyntax,@sasDataStepSyntax,sasDataStep,sasProc,sasODSGraphicsProc,sasGraphProc,sasAnalyticalProc,sasProcTemplate,sasProcSQL,sasDS2,sasIML " Define default highlighting hi def link sasComment Comment hi def link sasTodo Delimiter hi def link sasSectLbl Title hi def link sasSectLblEnds Comment hi def link sasNumber Number hi def link sasDateTime Constant hi def link sasString String hi def link sasDataStepControl Keyword hi def link sasProcTemplateClause Keyword hi def link sasProcSQLClause Keyword hi def link sasDS2Control Keyword hi def link sasIMLControl Keyword hi def link sasOperator Operator hi def link sasGlobalStatementKeyword Statement hi def link sasGlobalStatementODSKeyword Statement hi def link sasSectionKeyword Statement hi def link sasDataStepFunctionName Function hi def link sasDataStepCallRoutineName Function hi def link sasDataStepStatementKeyword Statement hi def link sasDataStepStatementHashKeyword Statement hi def link sasDataStepHashOperator Operator hi def link sasDataStepHashMethodName Function hi def link sasDataStepHashAttributeName Identifier hi def link sasProcStatementKeyword Statement hi def link sasODSGraphicsProcStatementKeyword Statement hi def link sasGraphProcStatementKeyword Statement hi def link sasAnalyticalProcStatementKeyword Statement hi def link sasProcTemplateStatementKeyword Statement hi def link sasProcTemplateStatementComplexKeyword Statement hi def link sasProcTemplateGTLStatementKeyword Statement hi def link sasProcTemplateGTLComplexKeyword Statement hi def link sasProcSQLFunctionName Function hi def link sasProcSQLStatementKeyword Statement hi def link sasProcSQLStatementComplexKeyword Statement hi def link sasProcSQLStatementNextKeyword Statement hi def link sasDS2FunctionName Function hi def link sasDS2StatementKeyword Statement hi def link sasIMLFunctionName Function hi def link sasIMLCallRoutineName Function hi def link sasIMLStatementKeyword Statement hi def link sasMacroReserved PreProc hi def link sasMacroVariable Define hi def link sasMacroFunctionName Define hi def link sasDataLine SpecialChar hi def link sasFormat SpecialChar hi def link sasReserved Special " Syncronize from beginning to keep large blocks from losing " syntax coloring while moving through code. syn sync fromstart let b:current_syntax = "sas" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/sass.vim000066400000000000000000000142631320401574200175130ustar00rootroot00000000000000" Vim syntax file " Language: Sass " Maintainer: Tim Pope " Filenames: *.sass " Last Change: 2016 Aug 29 if exists("b:current_syntax") finish endif runtime! syntax/css.vim syn case ignore syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp syn cluster sassCssAttributes contains=css.*Attr,sassEndOfLineComment,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP syn match sassProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:" contains=css.*Prop skipwhite nextgroup=sassCssAttribute contained containedin=sassDefinition syn match sassProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute syn match sassProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute syn match sassCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@sassCssAttributes,sassVariable,sassFunction,sassInterpolation syn match sassDefault "!default\>" contained syn match sassVariable "!\%(important\>\|default\>\)\@![[:alnum:]_-]\+" syn match sassVariable "$[[:alnum:]_-]\+" syn match sassVariableAssignment "\%([!$][[:alnum:]_-]\+\s*\)\@<=\%(||\)\==" nextgroup=sassCssAttribute skipwhite syn match sassVariableAssignment "\%([!$][[:alnum:]_-]\+\s*\)\@<=:" nextgroup=sassCssAttribute skipwhite syn match sassFunction "\<\%(rgb\|rgba\|red\|green\|blue\|mix\)\>(\@=" contained syn match sassFunction "\<\%(hsl\|hsla\|hue\|saturation\|lightness\|adjust-hue\|lighten\|darken\|saturate\|desaturate\|grayscale\|complement\)\>(\@=" contained syn match sassFunction "\<\%(alpha\|opacity\|rgba\|opacify\|fade-in\|transparentize\|fade-out\)\>(\@=" contained syn match sassFunction "\<\%(unquote\|quote\)\>(\@=" contained syn match sassFunction "\<\%(percentage\|round\|ceil\|floor\|abs\)\>(\@=" contained syn match sassFunction "\<\%(type-of\|unit\|unitless\|comparable\)\>(\@=" contained syn region sassInterpolation matchgroup=sassInterpolationDelimiter start="#{" end="}" contains=@sassCssAttributes,sassVariable,sassFunction containedin=cssStringQ,cssStringQQ,cssPseudoClass,sassProperty syn match sassMixinName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute syn match sassMixin "^=" nextgroup=sassMixinName skipwhite syn match sassMixin "\%([{};]\s*\|^\s*\)\@<=@mixin" nextgroup=sassMixinName skipwhite syn match sassMixing "^\s\+\zs+" nextgroup=sassMixinName syn match sassMixing "\%([{};]\s*\|^\s*\)\@<=@include" nextgroup=sassMixinName skipwhite syn match sassExtend "\%([{};]\s*\|^\s*\)\@<=@extend" syn match sassPlaceholder "\%([{};]\s*\|^\s*\)\@<=%" nextgroup=sassMixinName skipwhite syn match sassFunctionName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute syn match sassFunctionDecl "\%([{};]\s*\|^\s*\)\@<=@function" nextgroup=sassFunctionName skipwhite syn match sassReturn "\%([{};]\s*\|^\s*\)\@<=@return" syn match sassEscape "^\s*\zs\\" syn match sassIdChar "#[[:alnum:]_-]\@=" nextgroup=sassId syn match sassId "[[:alnum:]_-]\+" contained syn match sassClassChar "\.[[:alnum:]_-]\@=" nextgroup=sassClass syn match sassClass "[[:alnum:]_-]\+" contained syn match sassAmpersand "&" " TODO: Attribute namespaces " TODO: Arithmetic (including strings and concatenation) syn region sassMediaQuery matchgroup=sassMedia start="@media" end="[{};]\@=\|$" contains=sassMediaOperators syn keyword sassMediaOperators and not only contained syn region sassCharset start="@charset" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType syn region sassDebugLine end=";\|$" matchgroup=sassDebug start="@debug\>" contains=@sassCssAttributes,sassVariable,sassFunction syn region sassWarnLine end=";\|$" matchgroup=sassWarn start="@warn\>" contains=@sassCssAttributes,sassVariable,sassFunction syn region sassControlLine matchgroup=sassControl start="@\%(if\|else\%(\s\+if\)\=\|while\|for\|each\)\>" end="[{};]\@=\|$" contains=sassFor,@sassCssAttributes,sassVariable,sassFunction syn keyword sassFor from to through in contained syn keyword sassTodo FIXME NOTE TODO OPTIMIZE XXX contained syn region sassComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell syn region sassCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell syn match sassEndOfLineComment "//.*" contains=sassComment,sassTodo,@Spell hi def link sassEndOfLineComment sassComment hi def link sassCssComment sassComment hi def link sassComment Comment hi def link sassDefault cssImportant hi def link sassVariable Identifier hi def link sassFunction Function hi def link sassMixing PreProc hi def link sassMixin PreProc hi def link sassPlaceholder PreProc hi def link sassExtend PreProc hi def link sassFunctionDecl PreProc hi def link sassReturn PreProc hi def link sassTodo Todo hi def link sassCharset PreProc hi def link sassMedia PreProc hi def link sassMediaOperators PreProc hi def link sassInclude Include hi def link sassDebug sassControl hi def link sassWarn sassControl hi def link sassControl PreProc hi def link sassFor PreProc hi def link sassEscape Special hi def link sassIdChar Special hi def link sassClassChar Special hi def link sassInterpolationDelimiter Delimiter hi def link sassAmpersand Character hi def link sassId Identifier hi def link sassClass Type let b:current_syntax = "sass" " vim:set sw=2: neovim-0.2.2/runtime/syntax/sather.vim000066400000000000000000000066411320401574200200310ustar00rootroot00000000000000" Vim syntax file " Language: Sather/pSather " Maintainer: Claudio Fleiner " URL: http://www.fleiner.com/vim/syntax/sather.vim " Last Change: 2003 May 11 " Sather is a OO-language developed at the International Computer Science " Institute (ICSI) in Berkeley, CA. pSather is a parallel extension to Sather. " Homepage: http://www.icsi.berkeley.edu/~sather " Sather files use .sa as suffix " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " keyword definitions syn keyword satherExternal extern syn keyword satherBranch break continue syn keyword satherLabel when then syn keyword satherConditional if else elsif end case typecase assert with syn match satherConditional "near$" syn match satherConditional "far$" syn match satherConditional "near *[^(]"he=e-1 syn match satherConditional "far *[^(]"he=e-1 syn keyword satherSynchronize lock guard sync syn keyword satherRepeat loop parloop do syn match satherRepeat "while!" syn match satherRepeat "break!" syn match satherRepeat "until!" syn keyword satherBoolValue true false syn keyword satherValue self here cluster syn keyword satherOperator new "== != & ^ | && || syn keyword satherOperator and or not syn match satherOperator "[#!]" syn match satherOperator ":-" syn keyword satherType void attr where syn match satherType "near *("he=e-1 syn match satherType "far *("he=e-1 syn keyword satherStatement return syn keyword satherStorageClass static const syn keyword satherExceptions try raise catch syn keyword satherMethodDecl is pre post syn keyword satherClassDecl abstract value class include syn keyword satherScopeDecl public private readonly syn match satherSpecial contained "\\\d\d\d\|\\." syn region satherString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=satherSpecial syn match satherCharacter "'[^\\]'" syn match satherSpecialCharacter "'\\.'" syn match satherNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" syn match satherCommentSkip contained "^\s*\*\($\|\s\+\)" syn region satherComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+$\|"+ contains=satherSpecial syn match satherComment "--.*" contains=satherComment2String,satherCharacter,satherNumber syn sync ccomment satherComment " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link satherBranch satherStatement hi def link satherLabel satherStatement hi def link satherConditional satherStatement hi def link satherSynchronize satherStatement hi def link satherRepeat satherStatement hi def link satherExceptions satherStatement hi def link satherStorageClass satherDeclarative hi def link satherMethodDecl satherDeclarative hi def link satherClassDecl satherDeclarative hi def link satherScopeDecl satherDeclarative hi def link satherBoolValue satherValue hi def link satherSpecial satherValue hi def link satherString satherValue hi def link satherCharacter satherValue hi def link satherSpecialCharacter satherValue hi def link satherNumber satherValue hi def link satherStatement Statement hi def link satherOperator Statement hi def link satherComment Comment hi def link satherType Type hi def link satherValue String hi def link satherString String hi def link satherSpecial String hi def link satherCharacter String hi def link satherDeclarative Type hi def link satherExternal PreCondit let b:current_syntax = "sather" " vim: ts=8 neovim-0.2.2/runtime/syntax/sbt.vim000066400000000000000000000015601320401574200173260ustar00rootroot00000000000000" Vim syntax file " Language: sbt " Maintainer: Steven Dobay " Last Change: 2017.04.30 if exists("b:current_syntax") finish endif runtime! syntax/scala.vim syn region sbtString start="\"[^"]" skip="\\\"" end="\"" contains=sbtStringEscape syn match sbtStringEscape "\\u[0-9a-fA-F]\{4}" contained syn match sbtStringEscape "\\[nrfvb\\\"]" contained syn match sbtIdentitifer "^\S\+\ze\s*\(:=\|++=\|+=\|<<=\|<+=\)" syn match sbtBeginningSeq "^[Ss]eq\>" syn match sbtSpecial "\(:=\|++=\|+=\|<<=\|<+=\)" syn match sbtLineComment "//.*" syn region sbtComment start="/\*" end="\*/" syn region sbtDocComment start="/\*\*" end="\*/" keepend hi link sbtString String hi link sbtIdentitifer Keyword hi link sbtBeginningSeq Keyword hi link sbtSpecial Special hi link sbtComment Comment hi link sbtLineComment Comment hi link sbtDocComment Comment neovim-0.2.2/runtime/syntax/scala.vim000066400000000000000000000260531320401574200176250ustar00rootroot00000000000000" Vim syntax file " Language: Scala " Maintainer: Derek Wyatt " URL: https://github.com/derekwyatt/vim-scala " License: Same as Vim " Last Change: 20 May 2016 " ---------------------------------------------------------------------------- if !exists('main_syntax') " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let main_syntax = 'scala' endif scriptencoding utf-8 let b:current_syntax = "scala" " Allows for embedding, see #59; main_syntax convention instead? Refactor TOP " " The @Spell here is a weird hack, it means *exclude* if the first group is " TOP. Otherwise we get spelling errors highlighted on code elements that " match scalaBlock, even with `syn spell notoplevel`. function! s:ContainedGroup() try silent syn list @scala return '@scala,@NoSpell' catch /E392/ return 'TOP,@Spell' endtry endfunction unlet! b:current_syntax syn case match syn sync minlines=200 maxlines=1000 syn keyword scalaKeyword catch do else final finally for forSome if syn keyword scalaKeyword match return throw try while yield macro syn keyword scalaKeyword class trait object extends with nextgroup=scalaInstanceDeclaration skipwhite syn keyword scalaKeyword case nextgroup=scalaKeyword,scalaCaseFollowing skipwhite syn keyword scalaKeyword val nextgroup=scalaNameDefinition,scalaQuasiQuotes skipwhite syn keyword scalaKeyword def var nextgroup=scalaNameDefinition skipwhite hi link scalaKeyword Keyword exe 'syn region scalaBlock start=/{/ end=/}/ contains=' . s:ContainedGroup() . ' fold' syn keyword scalaAkkaSpecialWord when goto using startWith initialize onTransition stay become unbecome hi link scalaAkkaSpecialWord PreProc syn keyword scalatestSpecialWord shouldBe syn match scalatestShouldDSLA /^\s\+\zsit should/ syn match scalatestShouldDSLB /\/ hi link scalatestSpecialWord PreProc hi link scalatestShouldDSLA PreProc hi link scalatestShouldDSLB PreProc syn match scalaSymbol /'[_A-Za-z0-9$]\+/ hi link scalaSymbol Number syn match scalaChar /'.'/ syn match scalaChar /'\\[\\"'ntbrf]'/ contains=scalaEscapedChar syn match scalaChar /'\\u[A-Fa-f0-9]\{4}'/ contains=scalaUnicodeChar syn match scalaEscapedChar /\\[\\"'ntbrf]/ syn match scalaUnicodeChar /\\u[A-Fa-f0-9]\{4}/ hi link scalaChar Character hi link scalaEscapedChar Function hi link scalaUnicodeChar Special syn match scalaOperator "||" syn match scalaOperator "&&" syn match scalaOperator "|" syn match scalaOperator "&" hi link scalaOperator Special syn match scalaNameDefinition /\<[_A-Za-z0-9$]\+\>/ contained nextgroup=scalaPostNameDefinition,scalaVariableDeclarationList syn match scalaNameDefinition /`[^`]\+`/ contained nextgroup=scalaPostNameDefinition syn match scalaVariableDeclarationList /\s*,\s*/ contained nextgroup=scalaNameDefinition syn match scalaPostNameDefinition /\_s*:\_s*/ contained nextgroup=scalaTypeDeclaration hi link scalaNameDefinition Function syn match scalaInstanceDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaInstanceHash syn match scalaInstanceDeclaration /`[^`]\+`/ contained syn match scalaInstanceHash /#/ contained nextgroup=scalaInstanceDeclaration hi link scalaInstanceDeclaration Special hi link scalaInstanceHash Type syn match scalaUnimplemented /???/ hi link scalaUnimplemented ERROR syn match scalaCapitalWord /\<[A-Z][A-Za-z0-9$]*\>/ hi link scalaCapitalWord Special " Handle type declarations specially syn region scalaTypeStatement matchgroup=Keyword start=/\\)\ze/ contained nextgroup=scalaTypeTypeDeclaration contains=scalaTypeTypeExtension skipwhite syn match scalaTypeTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypeExtension,scalaTypeTypeEquals skipwhite syn match scalaTypeTypeEquals /=\ze[^>]/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite syn match scalaTypeTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained nextgroup=scalaTypeTypeDeclaration skipwhite syn match scalaTypeTypePostDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypePostExtension skipwhite syn match scalaTypeTypePostExtension /\%(⇒\|=>\|<:\|:>\|=:=\|::\)/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite hi link scalaTypeTypeDeclaration Type hi link scalaTypeTypeExtension Keyword hi link scalaTypeTypePostDeclaration Special hi link scalaTypeTypePostExtension Keyword syn match scalaTypeDeclaration /(/ contained nextgroup=scalaTypeExtension contains=scalaRoundBrackets skipwhite syn match scalaTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeDeclaration contains=scalaTypeExtension skipwhite syn match scalaTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeExtension skipwhite syn match scalaTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained nextgroup=scalaTypeDeclaration skipwhite hi link scalaTypeDeclaration Type hi link scalaTypeExtension Keyword hi link scalaTypePostExtension Keyword syn match scalaTypeAnnotation /\%([_a-zA-Z0-9$\s]:\_s*\)\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration contains=scalaRoundBrackets syn match scalaTypeAnnotation /)\_s*:\_s*\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration hi link scalaTypeAnnotation Normal syn match scalaCaseFollowing /\<[_\.A-Za-z0-9$]\+\>/ contained syn match scalaCaseFollowing /`[^`]\+`/ contained hi link scalaCaseFollowing Special syn keyword scalaKeywordModifier abstract override final lazy implicit implicitly private protected sealed null require super hi link scalaKeywordModifier Function syn keyword scalaSpecial this true false ne eq syn keyword scalaSpecial new nextgroup=scalaInstanceDeclaration skipwhite syn match scalaSpecial "\%(=>\|⇒\|<-\|←\|->\|→\)" syn match scalaSpecial /`[^`]\+`/ " Backtick literals hi link scalaSpecial PreProc syn keyword scalaExternal package import hi link scalaExternal Include syn match scalaStringEmbeddedQuote /\\"/ contained syn region scalaString start=/"/ end=/"/ contains=scalaStringEmbeddedQuote,scalaEscapedChar,scalaUnicodeChar hi link scalaString String hi link scalaStringEmbeddedQuote String syn region scalaIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\ze\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar hi link scalaIString String hi link scalaTripleIString String syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained exe 'syn region scalaInterpolationB matchgroup=scalaInterpolationBoundary start=/\${/ end=/}/ contained contains=' . s:ContainedGroup() hi link scalaInterpolation Function hi link scalaInterpolationB Normal syn region scalaFString matchgroup=scalaInterpolationBrackets start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained exe 'syn region scalaFInterpolationB matchgroup=scalaInterpolationBoundary start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=' . s:ContainedGroup() hi link scalaFString String hi link scalaFInterpolation Function hi link scalaFInterpolationB Normal syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar syn region scalaTripleFString matchgroup=scalaInterpolationBrackets start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar hi link scalaTripleString String hi link scalaTripleFString String hi link scalaInterpolationBrackets Special hi link scalaInterpolationBoundary Function syn match scalaNumber /\<0[dDfFlL]\?\>/ " Just a bare 0 syn match scalaNumber /\<[1-9]\d*[dDfFlL]\?\>/ " A multi-digit number - octal numbers with leading 0's are deprecated in Scala syn match scalaNumber /\<0[xX][0-9a-fA-F]\+[dDfFlL]\?\>/ " Hex number syn match scalaNumber /\%(\<\d\+\.\d*\|\.\d\+\)\%([eE][-+]\=\d\+\)\=[fFdD]\=/ " exponential notation 1 syn match scalaNumber /\<\d\+[eE][-+]\=\d\+[fFdD]\=\>/ " exponential notation 2 syn match scalaNumber /\<\d\+\%([eE][-+]\=\d\+\)\=[fFdD]\>/ " exponential notation 3 hi link scalaNumber Number syn region scalaRoundBrackets start="(" end=")" skipwhite contained contains=scalaTypeDeclaration,scalaSquareBrackets,scalaRoundBrackets syn region scalaSquareBrackets matchgroup=scalaSquareBracketsBrackets start="\[" end="\]" skipwhite nextgroup=scalaTypeExtension contains=scalaTypeDeclaration,scalaSquareBrackets,scalaTypeOperator,scalaTypeAnnotationParameter syn match scalaTypeOperator /[-+=:<>]\+/ contained syn match scalaTypeAnnotationParameter /@\<[`_A-Za-z0-9$]\+\>/ contained hi link scalaSquareBracketsBrackets Type hi link scalaTypeOperator Keyword hi link scalaTypeAnnotationParameter Function syn match scalaShebang "\%^#!.*" display syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@Spell keepend fold syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained syn match scalaParameterAnnotation "\%(@tparam\|@param\|@see\)" nextgroup=scalaParamAnnotationValue skipwhite contained syn match scalaParamAnnotationValue /[.`_A-Za-z0-9$]\+/ contained syn region scalaDocLinks start="\[\[" end="\]\]" contained syn region scalaCommentCodeBlock matchgroup=Keyword start="{{{" end="}}}" contained syn match scalaTodo "\vTODO|FIXME|XXX" contained hi link scalaShebang Comment hi link scalaMultilineComment Comment hi link scalaDocLinks Function hi link scalaParameterAnnotation Function hi link scalaParamAnnotationValue Keyword hi link scalaCommentAnnotation Function hi link scalaCommentCodeBlockBrackets String hi link scalaCommentCodeBlock String hi link scalaTodo Todo syn match scalaAnnotation /@\<[`_A-Za-z0-9$]\+\>/ hi link scalaAnnotation PreProc syn match scalaTrailingComment "//.*$" contains=scalaTodo,@Spell hi link scalaTrailingComment Comment syn match scalaAkkaFSM /goto([^)]*)\_s\+\/ contains=scalaAkkaFSMGotoUsing syn match scalaAkkaFSM /stay\_s\+using/ syn match scalaAkkaFSM /^\s*stay\s*$/ syn match scalaAkkaFSM /when\ze([^)]*)/ syn match scalaAkkaFSM /startWith\ze([^)]*)/ syn match scalaAkkaFSM /initialize\ze()/ syn match scalaAkkaFSM /onTransition/ syn match scalaAkkaFSM /onTermination/ syn match scalaAkkaFSM /whenUnhandled/ syn match scalaAkkaFSMGotoUsing /\/ syn match scalaAkkaFSMGotoUsing /\/ hi link scalaAkkaFSM PreProc hi link scalaAkkaFSMGotoUsing PreProc let b:current_syntax = 'scala' if main_syntax ==# 'scala' unlet main_syntax endif " vim:set sw=2 sts=2 ts=8 et: neovim-0.2.2/runtime/syntax/scheme.vim000066400000000000000000000427271320401574200200140ustar00rootroot00000000000000" Vim syntax file " Language: Scheme (R5RS + some R6RS extras) " Last Change: 2016 May 23 " Maintainer: Sergey Khorev " Original author: Dirk van Deun " This script incorrectly recognizes some junk input as numerals: " parsing the complete system of Scheme numerals using the pattern " language is practically impossible: I did a lax approximation. " MzScheme extensions can be activated with setting is_mzscheme variable " Suggestions and bug reports are solicited by the author. " Initializing: " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case ignore " Fascist highlighting: everything that doesn't fit the rules is an error... syn match schemeError ![^ \t()\[\]";]*! syn match schemeError ")" " Quoted and backquoted stuff syn region schemeQuoted matchgroup=Delimiter start="['`]" end=![ \t()\[\]";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc " Popular Scheme extension: " using [] as well as () syn region schemeStrucRestricted matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeStrucRestricted matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeUnquote matchgroup=Delimiter start="," end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeUnquote matchgroup=Delimiter start=",@" end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeUnquote matchgroup=Delimiter start=",(" end=")" contains=ALL syn region schemeUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALL syn region schemeUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeUnquote matchgroup=Delimiter start=",\[" end="\]" contains=ALL syn region schemeUnquote matchgroup=Delimiter start=",@\[" end="\]" contains=ALL syn region schemeUnquote matchgroup=Delimiter start=",#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc syn region schemeUnquote matchgroup=Delimiter start=",@#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc " R5RS Scheme Functions and Syntax: setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ syn keyword schemeSyntax lambda and or if cond case define let let* letrec syn keyword schemeSyntax begin do delay set! else => syn keyword schemeSyntax quote quasiquote unquote unquote-splicing syn keyword schemeSyntax define-syntax let-syntax letrec-syntax syntax-rules " R6RS syn keyword schemeSyntax define-record-type fields protocol syn keyword schemeFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car! syn keyword schemeFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr syn keyword schemeFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr syn keyword schemeFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr syn keyword schemeFunc cddaar cddadr cdddar cddddr null? list? list length syn keyword schemeFunc append reverse list-ref memq memv member assq assv assoc syn keyword schemeFunc symbol? symbol->string string->symbol number? complex? syn keyword schemeFunc real? rational? integer? exact? inexact? = < > <= >= syn keyword schemeFunc zero? positive? negative? odd? even? max min + * - / abs syn keyword schemeFunc quotient remainder modulo gcd lcm numerator denominator syn keyword schemeFunc floor ceiling truncate round rationalize exp log sin cos syn keyword schemeFunc tan asin acos atan sqrt expt make-rectangular make-polar syn keyword schemeFunc real-part imag-part magnitude angle exact->inexact syn keyword schemeFunc inexact->exact number->string string->number char=? syn keyword schemeFunc char-ci=? char? char-ci>? char<=? syn keyword schemeFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char? syn keyword schemeFunc char-numeric? char-whitespace? char-upper-case? syn keyword schemeFunc char-lower-case? syn keyword schemeFunc char->integer integer->char char-upcase char-downcase syn keyword schemeFunc string? make-string string string-length string-ref syn keyword schemeFunc string-set! string=? string-ci=? string? string-ci>? string<=? string-ci<=? string>=? syn keyword schemeFunc string-ci>=? substring string-append vector? make-vector syn keyword schemeFunc vector vector-length vector-ref vector-set! procedure? syn keyword schemeFunc apply map for-each call-with-current-continuation syn keyword schemeFunc call-with-input-file call-with-output-file input-port? syn keyword schemeFunc output-port? current-input-port current-output-port syn keyword schemeFunc open-input-file open-output-file close-input-port syn keyword schemeFunc close-output-port eof-object? read read-char peek-char syn keyword schemeFunc write display newline write-char call/cc syn keyword schemeFunc list-tail string->list list->string string-copy syn keyword schemeFunc string-fill! vector->list list->vector vector-fill! syn keyword schemeFunc force with-input-from-file with-output-to-file syn keyword schemeFunc char-ready? load transcript-on transcript-off eval syn keyword schemeFunc dynamic-wind port? values call-with-values syn keyword schemeFunc scheme-report-environment null-environment syn keyword schemeFunc interaction-environment " R6RS syn keyword schemeFunc make-eq-hashtable make-eqv-hashtable make-hashtable syn keyword schemeFunc hashtable? hashtable-size hashtable-ref hashtable-set! syn keyword schemeFunc hashtable-delete! hashtable-contains? hashtable-update! syn keyword schemeFunc hashtable-copy hashtable-clear! hashtable-keys syn keyword schemeFunc hashtable-entries hashtable-equivalence-function hashtable-hash-function syn keyword schemeFunc hashtable-mutable? equal-hash string-hash string-ci-hash symbol-hash syn keyword schemeFunc find for-all exists filter partition fold-left fold-right syn keyword schemeFunc remp remove remv remq memp assp cons* " ... so that a single + or -, inside a quoted context, would not be " interpreted as a number (outside such contexts, it's a schemeFunc) syn match schemeDelimiter !\.[ \t\[\]()";]!me=e-1 syn match schemeDelimiter !\.$! " ... and a single dot is not a number but a delimiter " This keeps all other stuff unhighlighted, except *stuff* and : syn match schemeOther ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*, syn match schemeError ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, syn match schemeOther "\.\.\." syn match schemeError !\.\.\.[^ \t\[\]()";]\+! " ... a special identifier syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*[ \t\[\]()";],me=e-1 syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*$, syn match schemeError ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t\[\]()";],me=e-1 syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$, syn match schemeError ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, " Non-quoted lists, and strings: syn region schemeStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL syn region schemeStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL syn region schemeStruc matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALL syn region schemeStruc matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALL " Simple literals: syn region schemeString start=+\%(\\\)\@?^_~0-9+.@#%]\+" " anything limited by |'s is identifier syn match schemeOther "|[^|]\+|" syn match schemeCharacter "#\\\%(return\|tab\)" " Modules require stmt syn keyword schemeExtSyntax module require dynamic-require lib prefix all-except prefix-all-except rename " modules provide stmt syn keyword schemeExtSyntax provide struct all-from all-from-except all-defined all-defined-except " Other from MzScheme syn keyword schemeExtSyntax with-handlers when unless instantiate define-struct case-lambda syntax-case syn keyword schemeExtSyntax free-identifier=? bound-identifier=? module-identifier=? syntax-object->datum syn keyword schemeExtSyntax datum->syntax-object syn keyword schemeExtSyntax let-values let*-values letrec-values set!-values fluid-let parameterize begin0 syn keyword schemeExtSyntax error raise opt-lambda define-values unit unit/sig define-signature syn keyword schemeExtSyntax invoke-unit/sig define-values/invoke-unit/sig compound-unit/sig import export syn keyword schemeExtSyntax link syntax quasisyntax unsyntax with-syntax syn keyword schemeExtFunc format system-type current-extension-compiler current-extension-linker syn keyword schemeExtFunc use-standard-linker use-standard-compiler syn keyword schemeExtFunc find-executable-path append-object-suffix append-extension-suffix syn keyword schemeExtFunc current-library-collection-paths current-extension-compiler-flags make-parameter syn keyword schemeExtFunc current-directory build-path normalize-path current-extension-linker-flags syn keyword schemeExtFunc file-exists? directory-exists? delete-directory/files delete-directory delete-file syn keyword schemeExtFunc system compile-file system-library-subpath getenv putenv current-standard-link-libraries syn keyword schemeExtFunc remove* file-size find-files fold-files directory-list shell-execute split-path syn keyword schemeExtFunc current-error-port process/ports process printf fprintf open-input-string open-output-string syn keyword schemeExtFunc get-output-string " exceptions syn keyword schemeExtFunc exn exn:application:arity exn:application:continuation exn:application:fprintf:mismatch syn keyword schemeExtFunc exn:application:mismatch exn:application:type exn:application:mismatch exn:break exn:i/o:filesystem exn:i/o:port syn keyword schemeExtFunc exn:i/o:port:closed exn:i/o:tcp exn:i/o:udp exn:misc exn:misc:application exn:misc:unsupported exn:module exn:read syn keyword schemeExtFunc exn:read:non-char exn:special-comment exn:syntax exn:thread exn:user exn:variable exn:application:mismatch syn keyword schemeExtFunc exn? exn:application:arity? exn:application:continuation? exn:application:fprintf:mismatch? exn:application:mismatch? syn keyword schemeExtFunc exn:application:type? exn:application:mismatch? exn:break? exn:i/o:filesystem? exn:i/o:port? exn:i/o:port:closed? syn keyword schemeExtFunc exn:i/o:tcp? exn:i/o:udp? exn:misc? exn:misc:application? exn:misc:unsupported? exn:module? exn:read? exn:read:non-char? syn keyword schemeExtFunc exn:special-comment? exn:syntax? exn:thread? exn:user? exn:variable? exn:application:mismatch? " Command-line parsing syn keyword schemeExtFunc command-line current-command-line-arguments once-any help-labels multi once-each " syntax quoting, unquoting and quasiquotation syn region schemeUnquote matchgroup=Delimiter start="#," end=![ \t\[\]()";]!me=e-1 contains=ALL syn region schemeUnquote matchgroup=Delimiter start="#,@" end=![ \t\[\]()";]!me=e-1 contains=ALL syn region schemeUnquote matchgroup=Delimiter start="#,(" end=")" contains=ALL syn region schemeUnquote matchgroup=Delimiter start="#,@(" end=")" contains=ALL syn region schemeUnquote matchgroup=Delimiter start="#,\[" end="\]" contains=ALL syn region schemeUnquote matchgroup=Delimiter start="#,@\[" end="\]" contains=ALL syn region schemeQuoted matchgroup=Delimiter start="#['`]" end=![ \t()\[\]";]!me=e-1 contains=ALL syn region schemeQuoted matchgroup=Delimiter start="#['`](" matchgroup=Delimiter end=")" contains=ALL " Identifiers are very liberal in MzScheme/Racket syn match schemeOther ![^()[\]{}",'`;#|\\ ]\+! " Language setting syn match schemeLang "#lang [-+_/A-Za-z0-9]\+\>" " Various number forms syn match schemeNumber "[-+]\=[0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\>" syn match schemeNumber "[-+]\=\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>" syn match schemeNumber "[-+]\=[0-9]\+/[0-9]\+\>" syn match schemeNumber "\([-+]\=\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\)\=[-+]\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\=i\>" endif if exists("b:is_chicken") || exists("is_chicken") " multiline comment syntax region schemeMultilineComment start=/#|/ end=/|#/ contains=@Spell,schemeMultilineComment syn match schemeOther "##[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" syn match schemeExtSyntax "#:[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" syn keyword schemeExtSyntax unit uses declare hide foreign-declare foreign-parse foreign-parse/spec syn keyword schemeExtSyntax foreign-lambda foreign-lambda* define-external define-macro load-library syn keyword schemeExtSyntax let-values let*-values letrec-values ->string require-extension syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable define-record syn keyword schemeExtSyntax pointer tag-pointer tagged-pointer? define-foreign-type syn keyword schemeExtSyntax require require-for-syntax cond-expand and-let* receive argc+argv syn keyword schemeExtSyntax fixnum? fx= fx> fx< fx>= fx<= fxmin fxmax syn keyword schemeExtFunc ##core#inline ##sys#error ##sys#update-errno " here-string syn region schemeString start=+#<<\s*\z(.*\)+ end=+^\z1$+ contains=@Spell if filereadable(expand(":p:h")."/cpp.vim") unlet! b:current_syntax syn include @ChickenC :p:h/cpp.vim syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-declare "+ end=+")\@=+ contains=@ChickenC syn region ChickenC matchgroup=schemeComment start=+foreign-declare\s*#<<\z(.*\)$+hs=s+15 end=+^\z1$+ contains=@ChickenC syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse "+ end=+")\@=+ contains=@ChickenC syn region ChickenC matchgroup=schemeComment start=+foreign-parse\s*#<<\z(.*\)$+hs=s+13 end=+^\z1$+ contains=@ChickenC syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse/spec "+ end=+")\@=+ contains=@ChickenC syn region ChickenC matchgroup=schemeComment start=+foreign-parse/spec\s*#<<\z(.*\)$+hs=s+18 end=+^\z1$+ contains=@ChickenC syn region ChickenC matchgroup=schemeComment start=+#>+ end=+<#+ contains=@ChickenC syn region ChickenC matchgroup=schemeComment start=+#>?+ end=+<#+ contains=@ChickenC syn region ChickenC matchgroup=schemeComment start=+#>!+ end=+<#+ contains=@ChickenC syn region ChickenC matchgroup=schemeComment start=+#>\$+ end=+<#+ contains=@ChickenC syn region ChickenC matchgroup=schemeComment start=+#>%+ end=+<#+ contains=@ChickenC endif " suggested by Alex Queiroz syn match schemeExtSyntax "#![-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" syn region schemeString start=+#<#\s*\z(.*\)+ end=+^\z1$+ contains=@Spell endif " Synchronization and the wrapping up... syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link schemeSyntax Statement hi def link schemeFunc Function hi def link schemeString String hi def link schemeCharacter Character hi def link schemeNumber Number hi def link schemeBoolean Boolean hi def link schemeDelimiter Delimiter hi def link schemeConstant Constant hi def link schemeComment Comment hi def link schemeMultilineComment Comment hi def link schemeError Error hi def link schemeExtSyntax Type hi def link schemeExtFunc PreProc hi def link schemeLang PreProc let b:current_syntax = "scheme" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/scilab.vim000066400000000000000000000062121320401574200177720ustar00rootroot00000000000000" " Vim syntax file " Language : Scilab " Maintainer : Benoit Hamelin " File type : *.sci (see :help filetype) " History " 28jan2002 benoith 0.1 Creation. Adapted from matlab.vim. " 04feb2002 benoith 0.5 Fixed bugs with constant highlighting. " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Reserved words. syn keyword scilabStatement abort clear clearglobal end exit global mode predef quit resume syn keyword scilabStatement return syn keyword scilabFunction function endfunction funptr syn keyword scilabPredicate null iserror isglobal syn keyword scilabKeyword typename syn keyword scilabDebug debug pause what where whereami whereis who whos syn keyword scilabRepeat for while break syn keyword scilabConditional if then else elseif syn keyword scilabMultiplex select case " Reserved constants. syn match scilabConstant "\(%\)[0-9A-Za-z?!#$]\+" syn match scilabBoolean "\(%\)[FTft]\>" " Delimiters and operators. syn match scilabDelimiter "[][;,()]" syn match scilabComparison "[=~]=" syn match scilabComparison "[<>]=\=" syn match scilabComparison "<>" syn match scilabLogical "[&|~]" syn match scilabAssignment "=" syn match scilabArithmetic "[+-]" syn match scilabArithmetic "\.\=[*/\\]\.\=" syn match scilabArithmetic "\.\=^" syn match scilabRange ":" syn match scilabMlistAccess "\." syn match scilabLineContinuation "\.\{2,}" syn match scilabTransposition "[])a-zA-Z0-9?!_#$.]'"lc=1 " Comments and tools. syn keyword scilabTodo TODO todo FIXME fixme TBD tbd contained syn match scilabComment "//.*$" contains=scilabTodo " Constants. syn match scilabNumber "[0-9]\+\(\.[0-9]*\)\=\([DEde][+-]\=[0-9]\+\)\=" syn match scilabNumber "\.[0-9]\+\([DEde][+-]\=[0-9]\+\)\=" syn region scilabString start=+'+ skip=+''+ end=+'+ oneline syn region scilabString start=+"+ end=+"+ oneline " Identifiers. syn match scilabIdentifier "\<[A-Za-z?!_#$][A-Za-z0-9?!_#$]*\>" syn match scilabOverload "%[A-Za-z0-9?!_#$]\+_[A-Za-z0-9?!_#$]\+" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link scilabStatement Statement hi def link scilabFunction Keyword hi def link scilabPredicate Keyword hi def link scilabKeyword Keyword hi def link scilabDebug Debug hi def link scilabRepeat Repeat hi def link scilabConditional Conditional hi def link scilabMultiplex Conditional hi def link scilabConstant Constant hi def link scilabBoolean Boolean hi def link scilabDelimiter Delimiter hi def link scilabMlistAccess Delimiter hi def link scilabComparison Operator hi def link scilabLogical Operator hi def link scilabAssignment Operator hi def link scilabArithmetic Operator hi def link scilabRange Operator hi def link scilabLineContinuation Underlined hi def link scilabTransposition Operator hi def link scilabTodo Todo hi def link scilabComment Comment hi def link scilabNumber Number hi def link scilabString String hi def link scilabIdentifier Identifier hi def link scilabOverload Special let b:current_syntax = "scilab" "EOF vim: ts=4 noet tw=100 sw=4 sts=0 neovim-0.2.2/runtime/syntax/screen.vim000066400000000000000000000216201320401574200200140ustar00rootroot00000000000000" Vim syntax file " Language: screen(1) configuration file " Maintainer: Dmitri Vereshchagin " Previous Maintainer: Nikolai Weibull " Latest Revision: 2015-09-24 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match screenEscape '\\.' syn keyword screenTodo contained TODO FIXME XXX NOTE syn region screenComment display oneline start='#' end='$' \ contains=screenTodo,@Spell syn region screenString display oneline start=+"+ skip=+\\"+ end=+"+ \ contains=screenVariable,screenSpecial syn region screenLiteral display oneline start=+'+ skip=+\\'+ end=+'+ syn match screenVariable contained display '$\%(\h\w*\|{\h\w*}\)' syn keyword screenBoolean on off syn match screenNumbers display '\<\d\+\>' syn match screenSpecials contained \ '%\%([%aAdDhlmMstuwWyY?:{]\|[0-9]*n\|0?cC\)' syn keyword screenCommands \ acladd \ aclchg \ acldel \ aclgrp \ aclumask \ activity \ addacl \ allpartial \ altscreen \ at \ attrcolor \ autodetach \ autonuke \ backtick \ bce \ bd_bc_down \ bd_bc_left \ bd_bc_right \ bd_bc_up \ bd_bell \ bd_braille_table \ bd_eightdot \ bd_info \ bd_link \ bd_lower_left \ bd_lower_right \ bd_ncrc \ bd_port \ bd_scroll \ bd_skip \ bd_start_braille \ bd_type \ bd_upper_left \ bd_upper_right \ bd_width \ bell \ bell_msg \ bind \ bindkey \ blanker \ blankerprg \ break \ breaktype \ bufferfile \ bumpleft \ bumpright \ c1 \ caption \ chacl \ charset \ chdir \ cjkwidth \ clear \ collapse \ colon \ command \ compacthist \ console \ copy \ crlf \ debug \ defautonuke \ defbce \ defbreaktype \ defc1 \ defcharset \ defencoding \ defescape \ defflow \ defgr \ defhstatus \ defkanji \ deflog \ deflogin \ defmode \ defmonitor \ defmousetrack \ defnonblock \ defobuflimit \ defscrollback \ defshell \ defsilence \ defslowpaste \ defutf8 \ defwrap \ defwritelock \ defzombie \ detach \ digraph \ dinfo \ displays \ dumptermcap \ echo \ encoding \ escape \ eval \ exec \ fit \ flow \ focus \ focusminsize \ gr \ group \ hardcopy \ hardcopy_append \ hardcopydir \ hardstatus \ height \ help \ history \ hstatus \ idle \ ignorecase \ info \ kanji \ kill \ lastmsg \ layout \ license \ lockscreen \ log \ logfile \ login \ logtstamp \ mapdefault \ mapnotnext \ maptimeout \ markkeys \ maxwin \ meta \ monitor \ mousetrack \ msgminwait \ msgwait \ multiuser \ nethack \ next \ nonblock \ number \ obuflimit \ only \ other \ partial \ password \ paste \ pastefont \ pow_break \ pow_detach \ pow_detach_msg \ prev \ printcmd \ process \ quit \ readbuf \ readreg \ redisplay \ register \ remove \ removebuf \ rendition \ reset \ resize \ screen \ scrollback \ select \ sessionname \ setenv \ setsid \ shell \ shelltitle \ silence \ silencewait \ sleep \ slowpaste \ sorendition \ sort \ source \ split \ startup_message \ stuff \ su \ suspend \ term \ termcap \ termcapinfo \ terminfo \ time \ title \ umask \ unbindall \ unsetenv \ utf8 \ vbell \ vbell_msg \ vbellwait \ verbose \ version \ wall \ width \ windowlist \ windows \ wrap \ writebuf \ writelock \ xoff \ xon \ zmodem \ zombie \ zombie_timeout hi def link screenEscape Special hi def link screenComment Comment hi def link screenTodo Todo hi def link screenString String hi def link screenLiteral String hi def link screenVariable Identifier hi def link screenBoolean Boolean hi def link screenNumbers Number hi def link screenSpecials Special hi def link screenCommands Keyword let b:current_syntax = "screen" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/scss.vim000066400000000000000000000006311320401574200175070ustar00rootroot00000000000000" Vim syntax file " Language: SCSS " Maintainer: Tim Pope " Filenames: *.scss " Last Change: 2010 Jul 26 if exists("b:current_syntax") finish endif runtime! syntax/sass.vim syn match scssComment "//.*" contains=sassTodo,@Spell syn region scssComment start="/\*" end="\*/" contains=sassTodo,@Spell hi def link scssComment sassComment let b:current_syntax = "scss" " vim:set sw=2: neovim-0.2.2/runtime/syntax/sd.vim000066400000000000000000000042571320401574200171520ustar00rootroot00000000000000" Language: streaming descriptor file " Maintainer: Puria Nafisi Azizi (pna) " License: This file can be redistribued and/or modified under the same terms " as Vim itself. " URL: http://netstudent.polito.it/vim_syntax/ " Last Change: 2012 Feb 03 by Thilo Six " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Always ignore case syn case ignore " Comments syn match sdComment /\s*[#;].*$/ " IP Adresses syn cluster sdIPCluster contains=sdIPError,sdIPSpecial syn match sdIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained syn match sdIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained syn match sdIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@sdIPCluster " Statements syn keyword sdStatement AGGREGATE AUDIO_CHANNELS syn keyword sdStatement BYTE_PER_PCKT BIT_PER_SAMPLE BITRATE syn keyword sdStatement CLOCK_RATE CODING_TYPE CREATOR syn match sdStatement /^\s*CODING_TYPE\>/ nextgroup=sdCoding skipwhite syn match sdStatement /^\s*ENCODING_NAME\>/ nextgroup=sdEncoding skipwhite syn keyword sdStatement FILE_NAME FRAME_LEN FRAME_RATE FORCE_FRAME_RATE syn keyword sdStatement LICENSE syn match sdStatement /^\s*MEDIA_SOURCE\>/ nextgroup=sdSource skipwhite syn match sdStatement /^\s*MULTICAST\>/ nextgroup=sdIP skipwhite syn keyword sdStatement PAYLOAD_TYPE PKT_LEN PRIORITY syn keyword sdStatement SAMPLE_RATE syn keyword sdStatement TITLE TWIN syn keyword sdStatement VERIFY " Known Options syn keyword sdEncoding H26L MPV MP2T MP4V-ES syn keyword sdCoding FRAME SAMPLE syn keyword sdSource STORED LIVE "Specials syn keyword sdSpecial TRUE FALSE NULL syn keyword sdDelimiter STREAM STREAM_END syn match sdError /^search .\{257,}/ hi def link sdIP Number hi def link sdHostname Type hi def link sdEncoding Identifier hi def link sdCoding Identifier hi def link sdSource Identifier hi def link sdComment Comment hi def link sdIPError Error hi def link sdError Error hi def link sdStatement Statement hi def link sdIPSpecial Special hi def link sdSpecial Special hi def link sdDelimiter Delimiter let b:current_syntax = "sd" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/sdc.vim000066400000000000000000000025571320401574200173160ustar00rootroot00000000000000" Vim syntax file " Language: SDC - Synopsys Design Constraints " Maintainer: Maurizio Tranchero - maurizio.tranchero@gmail.com " Last Change: Thu Mar 25 17:35:16 CET 2009 " Credits: based on TCL Vim syntax file " Version: 0.3 " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Read the TCL syntax to start with runtime! syntax/tcl.vim " SDC-specific keywords syn keyword sdcCollections foreach_in_collection syn keyword sdcObjectsQuery get_clocks get_ports syn keyword sdcObjectsInfo get_point_info get_node_info get_path_info syn keyword sdcObjectsInfo get_timing_paths set_attribute syn keyword sdcConstraints set_false_path syn keyword sdcNonIdealities set_min_delay set_max_delay syn keyword sdcNonIdealities set_input_delay set_output_delay syn keyword sdcNonIdealities set_load set_min_capacitance set_max_capacitance syn keyword sdcCreateOperations create_clock create_timing_netlist update_timing_netlist " command flags highlighting syn match sdcFlags "[[:space:]]-[[:alpha:]]*\>" " Define the default highlighting. hi def link sdcCollections Repeat hi def link sdcObjectsInfo Operator hi def link sdcCreateOperations Operator hi def link sdcObjectsQuery Operator hi def link sdcConstraints Operator hi def link sdcNonIdealities Operator hi def link sdcFlags Special let b:current_syntax = "sdc" " vim: ts=8 neovim-0.2.2/runtime/syntax/sdl.vim000066400000000000000000000146431320401574200173260ustar00rootroot00000000000000" Vim syntax file " Language: SDL " Maintainer: Michael Piefel " Last Change: 2 May 2001 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("sdl_2000") syntax case ignore endif " A bunch of useful SDL keywords syn keyword sdlStatement task else nextstate syn keyword sdlStatement in out with from interface syn keyword sdlStatement to via env and use syn keyword sdlStatement process procedure block system service type syn keyword sdlStatement endprocess endprocedure endblock endsystem syn keyword sdlStatement package endpackage connection endconnection syn keyword sdlStatement channel endchannel connect syn keyword sdlStatement synonym dcl signal gate timer signallist signalset syn keyword sdlStatement create output set reset call syn keyword sdlStatement operators literals syn keyword sdlStatement active alternative any as atleast constants syn keyword sdlStatement default endalternative endmacro endoperator syn keyword sdlStatement endselect endsubstructure external syn keyword sdlStatement if then fi for import macro macrodefinition syn keyword sdlStatement macroid mod nameclass nodelay not operator or syn keyword sdlStatement parent provided referenced rem syn keyword sdlStatement select spelling substructure xor syn keyword sdlNewState state endstate syn keyword sdlInput input start stop return none save priority syn keyword sdlConditional decision enddecision join syn keyword sdlVirtual virtual redefined finalized adding inherits syn keyword sdlExported remote exported export if !exists("sdl_no_96") syn keyword sdlStatement all axioms constant endgenerator endrefinement endservice syn keyword sdlStatement error fpar generator literal map noequality ordering syn keyword sdlStatement refinement returns revealed reverse service signalroute syn keyword sdlStatement view viewed syn keyword sdlExported imported endif if exists("sdl_2000") syn keyword sdlStatement abstract aggregation association break choice composition syn keyword sdlStatement continue endmethod handle method syn keyword sdlStatement ordered private protected public syn keyword sdlException exceptionhandler endexceptionhandler onexception syn keyword sdlException catch new raise " The same in uppercase syn keyword sdlStatement TASK ELSE NEXTSTATE syn keyword sdlStatement IN OUT WITH FROM INTERFACE syn keyword sdlStatement TO VIA ENV AND USE syn keyword sdlStatement PROCESS PROCEDURE BLOCK SYSTEM SERVICE TYPE syn keyword sdlStatement ENDPROCESS ENDPROCEDURE ENDBLOCK ENDSYSTEM syn keyword sdlStatement PACKAGE ENDPACKAGE CONNECTION ENDCONNECTION syn keyword sdlStatement CHANNEL ENDCHANNEL CONNECT syn keyword sdlStatement SYNONYM DCL SIGNAL GATE TIMER SIGNALLIST SIGNALSET syn keyword sdlStatement CREATE OUTPUT SET RESET CALL syn keyword sdlStatement OPERATORS LITERALS syn keyword sdlStatement ACTIVE ALTERNATIVE ANY AS ATLEAST CONSTANTS syn keyword sdlStatement DEFAULT ENDALTERNATIVE ENDMACRO ENDOPERATOR syn keyword sdlStatement ENDSELECT ENDSUBSTRUCTURE EXTERNAL syn keyword sdlStatement IF THEN FI FOR IMPORT MACRO MACRODEFINITION syn keyword sdlStatement MACROID MOD NAMECLASS NODELAY NOT OPERATOR OR syn keyword sdlStatement PARENT PROVIDED REFERENCED REM syn keyword sdlStatement SELECT SPELLING SUBSTRUCTURE XOR syn keyword sdlNewState STATE ENDSTATE syn keyword sdlInput INPUT START STOP RETURN NONE SAVE PRIORITY syn keyword sdlConditional DECISION ENDDECISION JOIN syn keyword sdlVirtual VIRTUAL REDEFINED FINALIZED ADDING INHERITS syn keyword sdlExported REMOTE EXPORTED EXPORT syn keyword sdlStatement ABSTRACT AGGREGATION ASSOCIATION BREAK CHOICE COMPOSITION syn keyword sdlStatement CONTINUE ENDMETHOD ENDOBJECT ENDVALUE HANDLE METHOD OBJECT syn keyword sdlStatement ORDERED PRIVATE PROTECTED PUBLIC syn keyword sdlException EXCEPTIONHANDLER ENDEXCEPTIONHANDLER ONEXCEPTION syn keyword sdlException CATCH NEW RAISE endif " String and Character contstants " Highlight special characters (those which have a backslash) differently syn match sdlSpecial contained "\\\d\d\d\|\\." syn region sdlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial syn region sdlString start=+'+ skip=+''+ end=+'+ " No, this doesn't happen, I just wanted to scare you. SDL really allows all " these characters for identifiers; fortunately, keywords manage without them. " set iskeyword=@,48-57,_,192-214,216-246,248-255,- syn region sdlComment start="/\*" end="\*/" syn region sdlComment start="comment" end=";" syn region sdlComment start="--" end="--\|$" syn match sdlCommentError "\*/" syn keyword sdlOperator present syn keyword sdlType integer real natural duration pid boolean time syn keyword sdlType character charstring ia5string syn keyword sdlType self now sender offspring syn keyword sdlStructure asntype endasntype syntype endsyntype struct if !exists("sdl_no_96") syn keyword sdlStructure newtype endnewtype endif if exists("sdl_2000") syn keyword sdlStructure object endobject value endvalue " The same in uppercase syn keyword sdlStructure OBJECT ENDOBJECT VALUE ENDVALUE syn keyword sdlOperator PRESENT syn keyword sdlType INTEGER NATURAL DURATION PID BOOLEAN TIME syn keyword sdlType CHARSTRING IA5STRING syn keyword sdlType SELF NOW SENDER OFFSPRING syn keyword sdlStructure ASNTYPE ENDASNTYPE SYNTYPE ENDSYNTYPE STRUCT endif " ASN.1 in SDL syn case match syn keyword sdlType SET OF BOOLEAN INTEGER REAL BIT OCTET syn keyword sdlType SEQUENCE CHOICE syn keyword sdlType STRING OBJECT IDENTIFIER NULL syn sync ccomment sdlComment " Define the default highlighting. " Only when an item doesn't have highlighting yet command -nargs=+ Hi hi def hi def link sdlException Label hi def link sdlConditional sdlStatement hi def link sdlVirtual sdlStatement hi def link sdlExported sdlFlag hi def link sdlCommentError sdlError hi def link sdlOperator Operator hi def link sdlStructure sdlType Hi sdlStatement term=bold ctermfg=4 guifg=Blue Hi sdlFlag term=bold ctermfg=4 guifg=Blue gui=italic Hi sdlNewState term=italic ctermfg=2 guifg=Magenta gui=underline Hi sdlInput term=bold guifg=Red hi def link sdlType Type hi def link sdlString String hi def link sdlComment Comment hi def link sdlSpecial Special hi def link sdlError Error delcommand Hi let b:current_syntax = "sdl" " vim: ts=8 neovim-0.2.2/runtime/syntax/sed.vim000066400000000000000000000116511320401574200173130ustar00rootroot00000000000000" Vim syntax file " Language: sed " Maintainer: Haakon Riiser " URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim " Last Change: 2010 May 29 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match sedError "\S" syn match sedWhitespace "\s\+" contained syn match sedSemicolon ";" syn match sedAddress "[[:digit:]$]" syn match sedAddress "\d\+\~\d\+" syn region sedAddress matchgroup=Special start="[{,;]\s*/\(\\/\)\="lc=1 skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta syn region sedAddress matchgroup=Special start="^\s*/\(\\/\)\=" skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta syn match sedComment "^\s*#.*$" syn match sedFunction "[dDgGhHlnNpPqQx=]\s*\($\|;\)" contains=sedSemicolon,sedWhitespace syn match sedLabel ":[^;]*" syn match sedLineCont "^\(\\\\\)*\\$" contained syn match sedLineCont "[^\\]\(\\\\\)*\\$"ms=e contained syn match sedSpecial "[{},!]" if exists("highlight_sedtabs") syn match sedTab "\t" contained endif " Append/Change/Insert syn region sedACI matchgroup=sedFunction start="[aci]\\$" matchgroup=NONE end="^.*$" contains=sedLineCont,sedTab syn region sedBranch matchgroup=sedFunction start="[bt]" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace syn region sedRW matchgroup=sedFunction start="[rw]" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace " Substitution/transform with various delimiters syn region sedFlagwrite matchgroup=sedFlag start="w" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace contained syn match sedFlag "[[:digit:]gpI]*w\=" contains=sedFlagwrite contained syn match sedRegexpMeta "[.*^$]" contained syn match sedRegexpMeta "\\." contains=sedTab contained syn match sedRegexpMeta "\[.\{-}\]" contains=sedTab contained syn match sedRegexpMeta "\\{\d\*,\d*\\}" contained syn match sedRegexpMeta "\\(.\{-}\\)" contains=sedTab contained syn match sedReplaceMeta "&\|\\\($\|.\)" contains=sedTab contained " Metacharacters: $ * . \ ^ [ ~ " @ is used as delimiter and treated on its own below let __at = char2nr("@") let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64 if has("ebcdic") let __sed_last = 255 else let __sed_last = 126 endif let __sed_metacharacters = '$*.\^[~' while __sed_i <= __sed_last let __sed_delimiter = escape(nr2char(__sed_i), __sed_metacharacters) if __sed_i != __at exe 'syn region sedAddress matchgroup=Special start=@\\'.__sed_delimiter.'\(\\'.__sed_delimiter.'\)\=@ skip=@[^\\]\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'I\=@ contains=sedTab' exe 'syn region sedRegexp'.__sed_i 'matchgroup=Special start=@'.__sed_delimiter.'\(\\\\\|\\'.__sed_delimiter.'\)*@ skip=@[^\\'.__sed_delimiter.']\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'@me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement'.__sed_i exe 'syn region sedReplacement'.__sed_i 'matchgroup=Special start=@'.__sed_delimiter.'\(\\\\\|\\'.__sed_delimiter.'\)*@ skip=@[^\\'.__sed_delimiter.']\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'@ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag' endif let __sed_i = __sed_i + 1 endwhile syn region sedAddress matchgroup=Special start=+\\@\(\\@\)\=+ skip=+[^\\]\(\\\\\)*\\@+ end=+@I\=+ contains=sedTab,sedRegexpMeta syn region sedRegexp64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\\@]\(\\\\\)*\\@+ end=+@+me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement64 syn region sedReplacement64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\\@]\(\\\\\)*\\@+ end=+@+ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag " Since the syntax for the substituion command is very similar to the " syntax for the transform command, I use the same pattern matching " for both commands. There is one problem -- the transform command " (y) does not allow any flags. To save memory, I ignore this problem. syn match sedST "[sy]" nextgroup=sedRegexp\d\+ hi def link sedAddress Macro hi def link sedACI NONE hi def link sedBranch Label hi def link sedComment Comment hi def link sedDelete Function hi def link sedError Error hi def link sedFlag Type hi def link sedFlagwrite Constant hi def link sedFunction Function hi def link sedLabel Label hi def link sedLineCont Special hi def link sedPutHoldspc Function hi def link sedReplaceMeta Special hi def link sedRegexpMeta Special hi def link sedRW Constant hi def link sedSemicolon Special hi def link sedST Function hi def link sedSpecial Special hi def link sedWhitespace NONE if exists("highlight_sedtabs") hi def link sedTab Todo endif let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64 while __sed_i <= __sed_last exe "hi def link sedRegexp".__sed_i "Macro" exe "hi def link sedReplacement".__sed_i "NONE" let __sed_i = __sed_i + 1 endwhile unlet __sed_i __sed_last __sed_delimiter __sed_metacharacters let b:current_syntax = "sed" " vim: sts=4 sw=4 ts=8 neovim-0.2.2/runtime/syntax/sendpr.vim000066400000000000000000000016111320401574200200260ustar00rootroot00000000000000" Vim syntax file " Language: FreeBSD send-pr file " Maintainer: Hendrik Scholz " Last Change: 2012 Feb 03 " " http://raisdorf.net/files/misc/send-pr.vim " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match sendprComment /^SEND-PR:/ " email address syn match sendprType /<[a-zA-Z0-9\-\_\.]*@[a-zA-Z0-9\-\_\.]*>/ " ^> lines syn match sendprString /^>[a-zA-Z\-]*:/ syn region sendprLabel start="\[" end="\]" syn match sendprString /^To:/ syn match sendprString /^From:/ syn match sendprString /^Reply-To:/ syn match sendprString /^Cc:/ syn match sendprString /^X-send-pr-version:/ syn match sendprString /^X-GNATS-Notify:/ hi def link sendprComment Comment hi def link sendprType Type hi def link sendprString String hi def link sendprLabel Label let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/sensors.vim000066400000000000000000000027511320401574200202350ustar00rootroot00000000000000" Vim syntax file " Language: sensors.conf(5) - libsensors configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword sensorsTodo contained TODO FIXME XXX NOTE syn region sensorsComment display oneline start='#' end='$' \ contains=sensorsTodo,@Spell syn keyword sensorsKeyword bus chip label compute ignore set syn region sensorsName display oneline \ start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=sensorsNameSpecial syn match sensorsName display '\w\+' syn match sensorsNameSpecial display '\\["\\rnt]' syn match sensorsLineContinue '\\$' syn match sensorsNumber display '\d*.\d\+\>' syn match sensorsRealWorld display '@' syn match sensorsOperator display '[+*/-]' syn match sensorsDelimiter display '[()]' hi def link sensorsTodo Todo hi def link sensorsComment Comment hi def link sensorsKeyword Keyword hi def link sensorsName String hi def link sensorsNameSpecial SpecialChar hi def link sensorsLineContinue Special hi def link sensorsNumber Number hi def link sensorsRealWorld Identifier hi def link sensorsOperator Normal hi def link sensorsDelimiter Normal let b:current_syntax = "sensors" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/services.vim000066400000000000000000000034371320401574200203660ustar00rootroot00000000000000" Vim syntax file " Language: services(5) - Internet network services list " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match servicesBegin display '^' \ nextgroup=servicesName,servicesComment syn match servicesName contained display '[[:graph:]]\+' \ nextgroup=servicesPort skipwhite syn match servicesPort contained display '\d\+' \ nextgroup=servicesPPDiv,servicesPPDivDepr \ skipwhite syn match servicesPPDiv contained display '/' \ nextgroup=servicesProtocol skipwhite syn match servicesPPDivDepr contained display ',' \ nextgroup=servicesProtocol skipwhite syn match servicesProtocol contained display '\S\+' \ nextgroup=servicesAliases,servicesComment \ skipwhite syn match servicesAliases contained display '\S\+' \ nextgroup=servicesAliases,servicesComment \ skipwhite syn keyword servicesTodo contained TODO FIXME XXX NOTE syn region servicesComment display oneline start='#' end='$' \ contains=servicesTodo,@Spell hi def link servicesTodo Todo hi def link servicesComment Comment hi def link servicesName Identifier hi def link servicesPort Number hi def link servicesPPDiv Delimiter hi def link servicesPPDivDepr Error hi def link servicesProtocol Type hi def link servicesAliases Macro let b:current_syntax = "services" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/setserial.vim000066400000000000000000000121551320401574200205330ustar00rootroot00000000000000" Vim syntax file " Language: setserial(8) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match setserialBegin display '^' \ nextgroup=setserialDevice,setserialComment \ skipwhite syn match setserialDevice contained display '\%(/[^ \t/]*\)\+' \ nextgroup=setserialParameter skipwhite syn keyword setserialParameter contained port irq baud_base divisor \ close_delay closing_wait rx_trigger \ tx_trigger flow_off flow_on rx_timeout \ nextgroup=setserialNumber skipwhite syn keyword setserialParameter contained uart \ nextgroup=setserialUARTType skipwhite syn keyword setserialParameter contained autoconfig auto_irq skip_test \ spd_hi spd_vhi spd_shi spd_warp spd_cust \ spd_normal sak fourport session_lockout \ pgrp_lockout hup_notify split_termios \ callout_nohup low_latency \ nextgroup=setserialParameter skipwhite syn match setserialParameter contained display \ '\^\%(auto_irq\|skip_test\|sak\|fourport\)' \ contains=setserialNegation \ nextgroup=setserialParameter skipwhite syn match setserialParameter contained display \ '\^\%(session_lockout\|pgrp_lockout\)' \ contains=setserialNegation \ nextgroup=setserialParameter skipwhite syn match setserialParameter contained display \ '\^\%(hup_notify\|split_termios\)' \ contains=setserialNegation \ nextgroup=setserialParameter skipwhite syn match setserialParameter contained display \ '\^\%(callout_nohup\|low_latency\)' \ contains=setserialNegation \ nextgroup=setserialParameter skipwhite syn keyword setserialParameter contained set_multiport \ nextgroup=setserialMultiport skipwhite syn match setserialNumber contained display '\<\d\+\>' \ nextgroup=setserialParameter skipwhite syn match setserialNumber contained display '0x\x\+' \ nextgroup=setserialParameter skipwhite syn keyword setserialUARTType contained none syn match setserialUARTType contained display \ '8250\|16[4789]50\|16550A\=\|16650\%(V2\)\=' \ nextgroup=setserialParameter skipwhite syn match setserialUARTType contained display '166[59]4' \ nextgroup=setserialParameter skipwhite syn match setserialNegation contained display '\^' syn match setserialMultiport contained '\' \ nextgroup=setserialPort skipwhite syn match setserialPort contained display '\<\d\+\>' \ nextgroup=setserialMask skipwhite syn match setserialPort contained display '0x\x\+' \ nextgroup=setserialMask skipwhite syn match setserialMask contained '\' \ nextgroup=setserialBitMask skipwhite syn match setserialBitMask contained display '\<\d\+\>' \ nextgroup=setserialMatch skipwhite syn match setserialBitMask contained display '0x\x\+' \ nextgroup=setserialMatch skipwhite syn match setserialMatch contained '\' \ nextgroup=setserialMatchBits skipwhite syn match setserialMatchBits contained display '\<\d\+\>' \ nextgroup=setserialMultiport skipwhite syn match setserialMatchBits contained display '0x\x\+' \ nextgroup=setserialMultiport skipwhite syn keyword setserialTodo contained TODO FIXME XXX NOTE syn region setserialComment display oneline start='^\s*#' end='$' \ contains=setserialTodo,@Spell hi def link setserialTodo Todo hi def link setserialComment Comment hi def link setserialDevice Normal hi def link setserialParameter Identifier hi def link setserialNumber Number hi def link setserialUARTType Type hi def link setserialNegation Operator hi def link setserialMultiport Type hi def link setserialPort setserialNumber hi def link setserialMask Type hi def link setserialBitMask setserialNumber hi def link setserialMatch Type hi def link setserialMatchBits setserialNumber let b:current_syntax = "setserial" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/sgml.vim000066400000000000000000000212421320401574200174770ustar00rootroot00000000000000" Vim syntax file " Language: SGML " Maintainer: Johannes Zellner " Last Change: Tue, 27 Apr 2004 15:05:21 CEST " Filenames: *.sgml,*.sgm " $Id: sgml.vim,v 1.1 2004/06/13 17:52:57 vimboss Exp $ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:sgml_cpo_save = &cpo set cpo&vim syn case match " mark illegal characters syn match sgmlError "[<&]" " unicode numbers: " provide different highlithing for unicode characters " inside strings and in plain text (character data). " " EXAMPLE: " " \u4e88 " syn match sgmlUnicodeNumberAttr +\\u\x\{4}+ contained contains=sgmlUnicodeSpecifierAttr syn match sgmlUnicodeSpecifierAttr +\\u+ contained syn match sgmlUnicodeNumberData +\\u\x\{4}+ contained contains=sgmlUnicodeSpecifierData syn match sgmlUnicodeSpecifierData +\\u+ contained " strings inside character data or comments " syn region sgmlString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=sgmlEntity,sgmlUnicodeNumberAttr display syn region sgmlString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=sgmlEntity,sgmlUnicodeNumberAttr display " punctuation (within attributes) e.g. " ^ ^ syn match sgmlAttribPunct +[:.]+ contained display " no highlighting for sgmlEqual (sgmlEqual has no highlighting group) syn match sgmlEqual +=+ " attribute, everything before the '=' " " PROVIDES: @sgmlAttribHook " " EXAMPLE: " " " ^^^^^^^^^^^^^ " syn match sgmlAttrib \ +[^-'"<]\@<=\<[a-zA-Z0-9.:]\+\>\([^'">]\@=\|$\)+ \ contained \ contains=sgmlAttribPunct,@sgmlAttribHook \ display " UNQUOTED value (not including the '=' -- sgmlEqual) " " PROVIDES: @sgmlValueHook " " EXAMPLE: " " " ^^^^^ " syn match sgmlValue \ +[^"' =/!?<>][^ =/!?<>]*+ \ contained \ contains=sgmlEntity,sgmlUnicodeNumberAttr,@sgmlValueHook \ display " QUOTED value (not including the '=' -- sgmlEqual) " " PROVIDES: @sgmlValueHook " " EXAMPLE: " " " ^^^^^^^ " " ^^^^^^^ " syn region sgmlValue contained start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=sgmlEntity,sgmlUnicodeNumberAttr,@sgmlValueHook syn region sgmlValue contained start=+'+ skip=+\\\\\|\\'+ end=+'+ \ contains=sgmlEntity,sgmlUnicodeNumberAttr,@sgmlValueHook " value, everything after (and including) the '=' " no highlighting! " " EXAMPLE: " " " ^^^^^^^^^ " " ^^^^^^^ " syn match sgmlEqualValue \ +=\s*[^ =/!?<>]\++ \ contained \ contains=sgmlEqual,sgmlString,sgmlValue \ display " start tag " use matchgroup=sgmlTag to skip over the leading '<' " see also sgmlEmptyTag below. " " PROVIDES: @sgmlTagHook " syn region sgmlTag \ matchgroup=sgmlTag start=+<[^ /!?"']\@=+ \ matchgroup=sgmlTag end=+>+ \ contained \ contains=sgmlError,sgmlAttrib,sgmlEqualValue,@sgmlTagHook " tag content for empty tags. This is the same as sgmlTag " above, except the `matchgroup=sgmlEndTag for highlighting " the end '/>' differently. " " PROVIDES: @sgmlTagHook " syn region sgmlEmptyTag \ matchgroup=sgmlTag start=+<[^ /!?"']\@=+ \ matchgroup=sgmlEndTag end=+/>+ \ contained \ contains=sgmlError,sgmlAttrib,sgmlEqualValue,@sgmlTagHook " end tag " highlight everything but not the trailing '>' which " was already highlighted by the containing sgmlRegion. " " PROVIDES: @sgmlTagHook " (should we provide a separate @sgmlEndTagHook ?) " syn match sgmlEndTag \ +"']\+>+ \ contained \ contains=@sgmlTagHook " [-- SGML SPECIFIC --] " SGML specific " tag content for abbreviated regions " " PROVIDES: @sgmlTagHook " syn region sgmlAbbrTag \ matchgroup=sgmlTag start=+<[^ /!?"']\@=+ \ matchgroup=sgmlTag end=+/+ \ contained \ contains=sgmlError,sgmlAttrib,sgmlEqualValue,@sgmlTagHook " SGML specific " just highlight the trailing '/' syn match sgmlAbbrEndTag +/+ " SGML specific " abbreviated regions " " No highlighing, highlighing is done by contained elements. " " PROVIDES: @sgmlRegionHook " " EXAMPLE: " " "']\+/\_[^/]\+/+ \ contains=sgmlAbbrTag,sgmlAbbrEndTag,sgmlCdata,sgmlComment,sgmlEntity,sgmlUnicodeNumberData,@sgmlRegionHook " [-- END OF SGML SPECIFIC --] " real (non-empty) elements. We cannot do syntax folding " as in xml, because end tags may be optional in sgml depending " on the dtd. " No highlighing, highlighing is done by contained elements. " " PROVIDES: @sgmlRegionHook " " EXAMPLE: " " " " " " some data " " " SGML specific: " compared to xmlRegion: " - removed folding " - added a single '/'in the start pattern " syn region sgmlRegion \ start=+<\z([^ /!?>"']\+\)\(\(\_[^/>]*[^/!?]>\)\|>\)+ \ end=++ \ contains=sgmlTag,sgmlEndTag,sgmlCdata,@sgmlRegionCluster,sgmlComment,sgmlEntity,sgmlUnicodeNumberData,@sgmlRegionHook \ keepend \ extend " empty tags. Just a container, no highlighting. " Compare this with sgmlTag. " " EXAMPLE: " " " " TODO use sgmlEmptyTag intead of sgmlTag syn match sgmlEmptyRegion \ +<[^ /!?>"']\(\_[^"'<>]\|"\_[^"]*"\|'\_[^']*'\)*/>+ \ contains=sgmlEmptyTag " cluster which contains the above two elements syn cluster sgmlRegionCluster contains=sgmlRegion,sgmlEmptyRegion,sgmlAbbrRegion " &entities; compare with dtd syn match sgmlEntity "&[^; \t]*;" contains=sgmlEntityPunct syn match sgmlEntityPunct contained "[&.;]" " The real comments (this implements the comments as defined by sgml, " but not all sgml pages actually conform to it. Errors are flagged. syn region sgmlComment start=++ contains=sgmlCommentPart,sgmlString,sgmlCommentError,sgmlTodo syn keyword sgmlTodo contained TODO FIXME XXX display syn match sgmlCommentError contained "[^>+ \ contains=sgmlCdataStart,sgmlCdataEnd,@sgmlCdataHook \ keepend \ extend " using the following line instead leads to corrupt folding at CDATA regions " syn match sgmlCdata ++ contains=sgmlCdataStart,sgmlCdataEnd,@sgmlCdataHook syn match sgmlCdataStart ++ contained " Processing instructions " This allows "?>" inside strings -- good idea? syn region sgmlProcessing matchgroup=sgmlProcessingDelim start="" contains=sgmlAttrib,sgmlEqualValue " DTD -- we use dtd.vim here syn region sgmlDocType matchgroup=sgmlDocTypeDecl start="\c" contains=sgmlDocTypeKeyword,sgmlInlineDTD,sgmlString syn keyword sgmlDocTypeKeyword contained DOCTYPE PUBLIC SYSTEM syn region sgmlInlineDTD contained start="\[" end="]" contains=@sgmlDTD syn include @sgmlDTD :p:h/dtd.vim " synchronizing " TODO !!! to be improved !!! syn sync match sgmlSyncDT grouphere sgmlDocType +\_.\(+ syn sync match sgmlSync grouphere sgmlRegion +\_.\(<[^ /!?>"']\+\)\@=+ " syn sync match sgmlSync grouphere sgmlRegion "<[^ /!?>"']*>" syn sync match sgmlSync groupthere sgmlRegion +"']\+>+ syn sync minlines=100 " The default highlighting. hi def link sgmlTodo Todo hi def link sgmlTag Function hi def link sgmlEndTag Identifier " SGML specifig hi def link sgmlAbbrEndTag Identifier hi def link sgmlEmptyTag Function hi def link sgmlEntity Statement hi def link sgmlEntityPunct Type hi def link sgmlAttribPunct Comment hi def link sgmlAttrib Type hi def link sgmlValue String hi def link sgmlString String hi def link sgmlComment Comment hi def link sgmlCommentPart Comment hi def link sgmlCommentError Error hi def link sgmlError Error hi def link sgmlProcessingDelim Comment hi def link sgmlProcessing Type hi def link sgmlCdata String hi def link sgmlCdataCdata Statement hi def link sgmlCdataStart Type hi def link sgmlCdataEnd Type hi def link sgmlDocTypeDecl Function hi def link sgmlDocTypeKeyword Statement hi def link sgmlInlineDTD Function hi def link sgmlUnicodeNumberAttr Number hi def link sgmlUnicodeSpecifierAttr SpecialChar hi def link sgmlUnicodeNumberData Number hi def link sgmlUnicodeSpecifierData SpecialChar let b:current_syntax = "sgml" let &cpo = s:sgml_cpo_save unlet s:sgml_cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/sgmldecl.vim000066400000000000000000000037711320401574200203360ustar00rootroot00000000000000" Vim syntax file " Language: SGML (SGML Declaration ) " Last Change: jueves, 28 de diciembre de 2000, 13:51:44 CLST " Maintainer: "Daniel A. Molina W." " You can modify and maintain this file, in other case send comments " the maintainer email address. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:keepcpo= &cpo set cpo&vim syn case ignore syn region sgmldeclDeclBlock transparent start=++ syn region sgmldeclTagBlock transparent start=+<+ end=+>+ \ contains=ALLBUT, \ @sgmlTagError,@sgmlErrInTag syn region sgmldeclComment contained start=+--+ end=+--+ syn keyword sgmldeclDeclKeys SGML CHARSET CAPACITY SCOPE SYNTAX \ FEATURES syn keyword sgmldeclTypes BASESET DESCSET DOCUMENT NAMING DELIM \ NAMES QUANTITY SHUNCHAR DOCTYPE \ ELEMENT ENTITY ATTLIST NOTATION \ TYPE syn keyword sgmldeclStatem CONTROLS FUNCTION NAMECASE MINIMIZE \ LINK OTHER APPINFO REF ENTITIES syn keyword sgmldeclVariables TOTALCAP GRPCAP ENTCAP DATATAG OMITTAG RANK \ SIMPLE IMPLICIT EXPLICIT CONCUR SUBDOC FORMAL ATTCAP \ ATTCHCAP AVGRPCAP ELEMCAP ENTCHCAP IDCAP IDREFCAP \ SHORTTAG syn match sgmldeclNConst contained +[0-9]\++ syn region sgmldeclString contained start=+"+ end=+"+ syn keyword sgmldeclBool YES NO syn keyword sgmldeclSpecial SHORTREF SGMLREF UNUSED NONE GENERAL \ SEEALSO ANY syn sync lines=250 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link sgmldeclDeclKeys Keyword hi def link sgmldeclTypes Type hi def link sgmldeclConst Constant hi def link sgmldeclNConst Constant hi def link sgmldeclString String hi def link sgmldeclDeclBlock Normal hi def link sgmldeclBool Boolean hi def link sgmldeclSpecial Special hi def link sgmldeclComment Comment hi def link sgmldeclStatem Statement hi def link sgmldeclVariables Type let b:current_syntax = "sgmldecl" let &cpo = s:keepcpo unlet s:keepcpo " vim:set tw=78 ts=4: neovim-0.2.2/runtime/syntax/sgmllnx.vim000066400000000000000000000034731320401574200202270ustar00rootroot00000000000000" Vim syntax file " Language: SGML-linuxdoc (supported by old sgmltools-1.x) " Maintainer: SungHyun Nam " Last Change: 2013 May 13 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " tags syn region sgmllnxEndTag start=++ contains=sgmllnxTagN,sgmllnxTagError syn region sgmllnxTag start=+<[^/]+ end=+>+ contains=sgmllnxTagN,sgmllnxTagError syn match sgmllnxTagN contained +<\s*[-a-zA-Z0-9]\++ms=s+1 contains=sgmllnxTagName syn match sgmllnxTagN contained ++ syn region sgmllnxDocType start=++ " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link sgmllnxTag2 Function hi def link sgmllnxTagN2 Function hi def link sgmllnxTag Special hi def link sgmllnxEndTag Special hi def link sgmllnxParen Special hi def link sgmllnxEntity Type hi def link sgmllnxDocEnt Type hi def link sgmllnxTagName Statement hi def link sgmllnxComment Comment hi def link sgmllnxSpecial Special hi def link sgmllnxDocType PreProc hi def link sgmllnxTagError Error let b:current_syntax = "sgmllnx" " vim:set tw=78 ts=8 sts=2 sw=2 noet: neovim-0.2.2/runtime/syntax/sh.vim000066400000000000000000001156771320401574200171670ustar00rootroot00000000000000" Vim syntax file " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell " Previous Maintainer: Lennart Schultz " Last Change: Oct 02, 2017 " Version: 172 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) " quit when a syntax file was already loaded {{{1 if exists("b:current_syntax") finish endif " trying to answer the question: which shell is /bin/sh, really? " If the user has not specified any of g:is_kornshell, g:is_bash, g:is_posix, g:is_sh, then guess. if getline(1) =~ '\ fold else com! -nargs=* ShFoldFunctions endif if s:sh_fold_heredoc com! -nargs=* ShFoldHereDoc fold else com! -nargs=* ShFoldHereDoc endif if s:sh_fold_ifdofor com! -nargs=* ShFoldIfDoFor fold else com! -nargs=* ShFoldIfDoFor endif " sh syntax is case sensitive {{{1 syn case match " Clusters: contains=@... clusters {{{1 "================================== syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError,shOK if exists("b:is_kornshell") syn cluster ErrorList add=shDTestError endif syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor syn cluster shArithList contains=@shArithParenList,shParenError syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS syn cluster shDerefVarList contains=shDerefOff,shDerefOp,shDerefVarArray,shDerefOpError syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq if exists("b:is_kornshell") || exists("b:is_bash") syn cluster shFunctionList add=shRepeat syn cluster shFunctionList add=shDblBrace,shDblParen endif syn cluster shHereBeginList contains=@shCommandSubList syn cluster shHereList contains=shBeginHere,shHerePayload syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shHereString,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr,shTouch syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator syn cluster shTestList contains=shCharClass,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr syn cluster shNoZSList contains=shSpecialNoZS " Echo: {{{1 " ==== " This one is needed INSIDE a CommandSub, so that `echo bla` be correct syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment syn match shEchoQuote contained '\%(\\\\\)*\\["`'()]' " This must be after the strings, so that ... \" will be correct syn region shEmbeddedEcho contained matchgroup=shStatement start="\" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shExDoubleQuote,shDoubleQuote,shCharClass,shCtrlSeq " Alias: {{{1 " ===== if exists("b:is_kornshell") || exists("b:is_bash") syn match shStatement "\" syn region shAlias matchgroup=shStatement start="\\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" syn region shAlias matchgroup=shStatement start="\\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" " Touch: {{{1 " ===== syn match shTouch '\[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd,shDoubleQuote,shSingleQuote,shDeref,shDerefSimple syn match shTouchCmd '\' contained endif " Error Codes: {{{1 " ============ if !exists("g:sh_no_error") syn match shDoError "\" syn match shIfError "\" syn match shInError "\" syn match shCaseError ";;" syn match shEsacError "\" syn match shCurlyError "}" syn match shParenError ")" syn match shOK '\.\(done\|fi\|in\|esac\)' if exists("b:is_kornshell") syn match shDTestError "]]" endif syn match shTestError "]" endif " Options: {{{1 " ==================== syn match shOption "\s\zs[-+][-_a-zA-Z#@]\+" syn match shOption "\s\zs--[^ \t$`'"|);]\+" " File Redirection Highlighted As Operators: {{{1 "=========================================== syn match shRedir "\d\=>\(&[-0-9]\)\=" syn match shRedir "\d\=>>-\=" syn match shRedir "\d\=<\(&[-0-9]\)\=" syn match shRedir "\d<<-\=" " Operators: {{{1 " ========== syn match shOperator "<<\|>>" contained syn match shOperator "[!&;|]" contained syn match shOperator "\[[[^:]\|\]]" contained syn match shOperator "[-=/*+%]\==" skipwhite nextgroup=shPattern syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shDeref " Subshells: {{{1 " ========== syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shSpecialNxt syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shSpecialNxt " Tests: {{{1 "======= syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial syn region shTest transparent matchgroup=shStatement start="\+ end="\<;\_s*then\>" end="\" contains=@shIfList ShFoldIfDoFor syn region shFor matchgroup=shLoop start="\#\=" syn match shNumber "\<-\=\.\=\d\+\>#\=" syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained if exists("b:is_bash") syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained endif if exists("b:is_bash") syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial nextgroup=shSpecialNxt syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial nextgroup=shSpecialNxt elseif !exists("g:sh_no_error") syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial endif syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@" else syn keyword shTodo contained COMBAK FIXME TODO XXX endif syn match shComment "^\s*\zs#.*$" contains=@shCommentGroup syn match shComment "\s\zs#.*$" contains=@shCommentGroup syn match shComment contained "#.*$" contains=@shCommentGroup syn match shQuickComment contained "#.*$" " Here Documents: {{{1 " ========================================= ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t|>]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" " Here Strings: {{{1 " ============= " available for: bash; ksh (really should be ksh93 only) but not if its a posix if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("b:is_posix")) syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion endif " Identifiers: {{{1 "============= syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shVarAssign syn match shVarAssign "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote syn region shAtExpr contained start="@(" end=")" contains=@shIdList if exists("b:is_bash") syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="\ze[;|)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList elseif exists("b:is_kornshell") syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList else syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList endif " Functions: {{{1 if !exists("b:is_posix") syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo endif if exists("b:is_bash") ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*[A-Za-z_0-9:][-a-zA-Z_0-9:]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_0-9:][-a-zA-Z_0-9:]*\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*[A-Za-z_0-9:][-a-zA-Z_0-9:]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_0-9:][-a-zA-Z_0-9:]*\>\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment else ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment endif " Parameter Dereferencing: {{{1 " ======================== if !exists("g:sh_no_error") syn match shDerefWordError "[^}$[~]" contained endif syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray syn match shDerefSimple "\$[-#*@!?]" nextgroup=@shNoZSList syn match shDerefSimple "\$\$" nextgroup=@shNoZSList syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList if exists("b:is_bash") || exists("b:is_kornshell") syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS endif " ksh: ${!var[*]} array index list syntax: {{{1 " ======================================== if exists("b:is_kornshell") syn region shDeref matchgroup=PreProc start="\${!" end="}" contains=@shDerefVarArray endif " bash: ${!prefix*} and ${#parameter}: {{{1 " ==================================== if exists("b:is_bash") syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOff syn match shDerefVar contained "{\@<=!\h\w*" nextgroup=@shDerefVarList endif if exists("b:is_kornshell") syn match shDerefVar contained "{\@<=!\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList endif syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList syn match shDerefVar contained '\d' nextgroup=@shDerefVarList if exists("b:is_kornshell") syn match shDerefVar contained "{\@<=\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList endif " sh ksh bash : ${var[... ]...} array reference: {{{1 syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError " Special ${parameter OPERATOR word} handling: {{{1 " sh ksh bash : ${parameter:-word} word is default value " sh ksh bash : ${parameter:=word} assign word as default value " sh ksh bash : ${parameter:?word} display word if parameter is null " sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing " ksh bash : ${parameter#pattern} remove small left pattern " ksh bash : ${parameter##pattern} remove large left pattern " ksh bash : ${parameter%pattern} remove small right pattern " ksh bash : ${parameter%%pattern} remove large right pattern " bash : ${parameter^pattern} Case modification " bash : ${parameter^^pattern} Case modification " bash : ${parameter,pattern} Case modification " bash : ${parameter,,pattern} Case modification syn cluster shDerefPatternList contains=shDerefPattern,shDerefString if !exists("g:sh_no_error") syn match shDerefOpError contained ":[[:punct:]]" endif syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList if exists("b:is_bash") || exists("b:is_kornshell") syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern syn match shDerefEscape contained '\%(\\\\\)*\\.' endif if exists("b:is_bash") syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList endif syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@" syn sync match shCaseEsacSync groupthere shCaseEsac "\" syn sync match shDoSync grouphere shDo "\" syn sync match shDoSync groupthere shDo "\" syn sync match shForSync grouphere shFor "\" syn sync match shForSync groupthere shFor "\" syn sync match shIfSync grouphere shIf "\" syn sync match shIfSync groupthere shIf "\" syn sync match shUntilSync grouphere shRepeat "\" syn sync match shWhileSync grouphere shRepeat "\" " Default Highlighting: {{{1 " ===================== if !exists("skip_sh_syntax_inits") hi def link shArithRegion shShellVariables hi def link shAstQuote shDoubleQuote hi def link shAtExpr shSetList hi def link shBeginHere shRedir hi def link shCaseBar shConditional hi def link shCaseCommandSub shCommandSub hi def link shCaseDoubleQuote shDoubleQuote hi def link shCaseIn shConditional hi def link shQuote shOperator hi def link shCaseSingleQuote shSingleQuote hi def link shCaseStart shConditional hi def link shCmdSubRegion shShellVariables hi def link shColon shComment hi def link shDerefOp shOperator hi def link shDerefPOL shDerefOp hi def link shDerefPPS shDerefOp hi def link shDerefPSR shDerefOp hi def link shDeref shShellVariables hi def link shDerefDelim shOperator hi def link shDerefSimple shDeref hi def link shDerefSpecial shDeref hi def link shDerefString shDoubleQuote hi def link shDerefVar shDeref hi def link shDoubleQuote shString hi def link shEcho shString hi def link shEchoDelim shOperator hi def link shEchoQuote shString hi def link shForPP shLoop hi def link shFunction Function hi def link shEmbeddedEcho shString hi def link shEscape shCommandSub hi def link shExDoubleQuote shDoubleQuote hi def link shExSingleQuote shSingleQuote hi def link shHereDoc shString hi def link shHereString shRedir hi def link shHerePayload shHereDoc hi def link shLoop shStatement hi def link shSpecialNxt shSpecial hi def link shNoQuote shDoubleQuote hi def link shOption shCommandSub hi def link shPattern shString hi def link shParen shArithmetic hi def link shPosnParm shShellVariables hi def link shQuickComment shComment hi def link shRange shOperator hi def link shRedir shOperator hi def link shSetListDelim shOperator hi def link shSetOption shOption hi def link shSingleQuote shString hi def link shSource shOperator hi def link shStringSpecial shSpecial hi def link shSubShRegion shOperator hi def link shTestOpr shConditional hi def link shTestPattern shString hi def link shTestDoubleQuote shString hi def link shTestSingleQuote shString hi def link shTouchCmd shStatement hi def link shVariable shSetList hi def link shWrapLineOperator shOperator if exists("b:is_bash") hi def link bashAdminStatement shStatement hi def link bashSpecialVariables shShellVariables hi def link bashStatement shStatement hi def link shCharClass shSpecial hi def link shDerefOff shDerefOp hi def link shDerefLen shDerefOff endif if exists("b:is_kornshell") hi def link kshSpecialVariables shShellVariables hi def link kshStatement shStatement endif if !exists("g:sh_no_error") hi def link shCaseError Error hi def link shCondError Error hi def link shCurlyError Error hi def link shDerefOpError Error hi def link shDerefWordError Error hi def link shDoError Error hi def link shEsacError Error hi def link shIfError Error hi def link shInError Error hi def link shParenError Error hi def link shTestError Error if exists("b:is_kornshell") hi def link shDTestError Error endif endif hi def link shArithmetic Special hi def link shCharClass Identifier hi def link shSnglCase Statement hi def link shCommandSub Special hi def link shComment Comment hi def link shConditional Conditional hi def link shCtrlSeq Special hi def link shExprRegion Delimiter hi def link shFunctionKey Function hi def link shFunctionName Function hi def link shNumber Number hi def link shOperator Operator hi def link shRepeat Repeat hi def link shSet Statement hi def link shSetList Identifier hi def link shShellVariables PreProc hi def link shSpecial Special hi def link shSpecialNoZS shSpecial hi def link shStatement Statement hi def link shString String hi def link shTodo Todo hi def link shAlias Identifier hi def link shHereDoc01 shRedir hi def link shHereDoc02 shRedir hi def link shHereDoc03 shRedir hi def link shHereDoc04 shRedir hi def link shHereDoc05 shRedir hi def link shHereDoc06 shRedir hi def link shHereDoc07 shRedir hi def link shHereDoc08 shRedir hi def link shHereDoc09 shRedir hi def link shHereDoc10 shRedir hi def link shHereDoc11 shRedir hi def link shHereDoc12 shRedir hi def link shHereDoc13 shRedir hi def link shHereDoc14 shRedir hi def link shHereDoc15 shRedir endif " Delete shell folding commands {{{1 " ============================= delc ShFoldFunctions delc ShFoldHereDoc delc ShFoldIfDoFor " Set Current Syntax: {{{1 " =================== if exists("b:is_bash") let b:current_syntax = "bash" elseif exists("b:is_kornshell") let b:current_syntax = "ksh" else let b:current_syntax = "sh" endif " vim: ts=16 fdm=marker neovim-0.2.2/runtime/syntax/shada.vim000066400000000000000000000127261320401574200176240ustar00rootroot00000000000000if exists("b:current_syntax") finish endif syntax match ShaDaEntryHeader \ '^\u.\{-} with timestamp \d\{4}-\d\d-\d\dT\d\d:\d\d:\d\d:$' syntax match ShaDaEntryName '^\u.\{-}\ze with' contained \ containedin=ShaDaEntryHeader syntax match ShaDaEntryTimestamp 'timestamp \zs\d\{4}-\d\d-\d\dT\d\d:\d\d:\d\d' \ contained containedin=ShaDaEntryHeader syntax match ShaDaEntryTimestampNumber '\d\+' contained \ containedin=ShaDaEntryTimestamp syntax match ShaDaComment '^\s*#.*$' syntax region ShaDaEntryMapLong start='^ % Key_* Description_* Value$' \ end='^ %\|^\S'me=s-1 contains=ShaDaComment,ShaDaEntryMapLongEntryStart syntax region ShaDaEntryMapShort start='^ % Key_* Value$' \ end='^ %\|^\S'me=s-1 contains=ShaDaComment,ShaDaEntryMapShortEntryStart syntax match ShaDaEntryMapHeader '^ % Key_* \(Description_* \)\?Value$' \ contained containedin=ShaDaEntryMapLong,ShaDaEntryMapShort syntax match ShaDaEntryMapLongEntryStart '^ + 'hs=e-2,he=e-1 \ nextgroup=ShaDaEntryMapLongKey syntax match ShaDaEntryMapLongKey '\S\+ \+\ze\S'he=e-2 contained \ nextgroup=ShaDaEntryMapLongDescription syntax match ShaDaEntryMapLongDescription '.\{-} \ze\S'he=e-2 contained \ nextgroup=@ShaDaEntryMsgpackValue syntax match ShaDaEntryMapShortEntryStart '^ + 'hs=e-2,he=e-1 contained \ nextgroup=ShaDaEntryMapShortKey syntax match ShaDaEntryMapShortKey '\S\+ \+\ze\S'he=e-2 contained \ nextgroup=@ShaDaEntryMsgpackValue syntax match ShaDaEntryMapBinArrayStart '^ | - 'hs=e-4,he=e-1 contained \ containedin=ShaDaEntryMapLong,ShaDaEntryMapShort \ nextgroup=@ShaDaEntryMsgpackValue syntax region ShaDaEntryArray start='^ @ Description_* Value$' \ end='^\S'me=s-1 keepend \ contains=ShaDaComment,ShaDaEntryArrayEntryStart,ShaDaEntryArrayHeader syntax match ShaDaEntryArrayHeader '^ @ Description_* Value$' contained syntax match ShaDaEntryArrayEntryStart '^ - 'hs=e-2,he=e-1 \ nextgroup=ShaDaEntryArrayDescription syntax match ShaDaEntryArrayDescription '.\{-} \ze\S'he=e-2 contained \ nextgroup=@ShaDaEntryMsgpackValue syntax match ShaDaEntryRawMsgpack '^ = ' nextgroup=@ShaDaEntryMsgpackValue syntax cluster ShaDaEntryMsgpackValue \ add=ShaDaMsgpackKeyword,ShaDaMsgpackShaDaKeyword \ add=ShaDaMsgpackInteger,ShaDaMsgpackCharacter,ShaDaMsgpackFloat \ add=ShaDaMsgpackBinaryString,ShaDaMsgpackString,ShaDaMsgpackExt \ add=ShaDaMsgpackArray,ShaDaMsgpackMap \ add=ShaDaMsgpackMultilineArray syntax keyword ShaDaMsgpackKeyword contained NIL TRUE FALSE syntax keyword ShaDaMsgpackShaDaKeyword contained \ CMD SEARCH EXPR INPUT DEBUG \ CHARACTERWISE LINEWISE BLOCKWISE syntax region ShaDaMsgpackBinaryString matchgroup=ShaDaMsgpackStringQuotes \ start='"' skip='\\"' end='"' contained keepend syntax match ShaDaMsgpackBinaryStringEscape '\\[\\0n"]' \ contained containedin=ShaDaMsgpackBinaryString syntax match ShaDaMsgpackString '=' contained nextgroup=ShaDaMsgpackBinaryString syntax match ShaDaMsgpackExt '+(-\?\d\+)' contained \ nextgroup=ShaDaMsgpackBinaryString syntax match ShaDaMsgpackExtType '-\?\d\+' contained containedin=ShaDaMsgpackExt syntax match ShaDaMsgpackCharacter /'.'/ contained syntax match ShaDaMsgpackInteger '-\?\%(0x\x\{,16}\|\d\+\)' contained syntax match ShaDaMsgpackFloat '-\?\d\+\.\d\+\%(e[+-]\?\d\+\)\?' contained syntax region ShaDaMsgpackArray matchgroup=ShaDaMsgpackArrayBraces \ start='\[' end='\]' contained \ contains=@ShaDaEntryMsgpackValue,ShaDaMsgpackComma syntax region ShaDaMsgpackMap matchgroup=ShaDaMsgpackMapBraces \ start='{' end='}' contained \ contains=@ShaDaEntryMsgpackValue,ShaDaMsgpackComma,ShaDaMsgpackColon syntax match ShaDaMsgpackComma ',' contained syntax match ShaDaMsgpackColon ':' contained syntax match ShaDaMsgpackMultilineArray '@' contained hi def link ShaDaComment Comment hi def link ShaDaEntryNumber Number hi def link ShaDaEntryTimestamp Operator hi def link ShaDaEntryName Keyword hi def link ShaDaEntryMapHeader PreProc hi def link ShaDaEntryMapEntryStart Label hi def link ShaDaEntryMapLongEntryStart ShaDaEntryMapEntryStart hi def link ShaDaEntryMapShortEntryStart ShaDaEntryMapEntryStart hi def link ShaDaEntryMapBinArrayStart ShaDaEntryMapEntryStart hi def link ShaDaEntryArrayEntryStart ShaDaEntryMapEntryStart hi def link ShaDaEntryMapKey String hi def link ShaDaEntryMapLongKey ShaDaEntryMapKey hi def link ShaDaEntryMapShortKey ShaDaEntryMapKey hi def link ShaDaEntryMapDescription Comment hi def link ShaDaEntryMapLongDescription ShaDaEntryMapDescription hi def link ShaDaEntryMapShortDescription ShaDaEntryMapDescription hi def link ShaDaEntryArrayHeader PreProc hi def link ShaDaEntryArrayDescription ShaDaEntryMapDescription hi def link ShaDaMsgpackKeyword Keyword hi def link ShaDaMsgpackShaDaKeyword ShaDaMsgpackKeyword hi def link ShaDaMsgpackCharacter Character hi def link ShaDaMsgpackInteger Number hi def link ShaDaMsgpackFloat Float hi def link ShaDaMsgpackBinaryString String hi def link ShaDaMsgpackBinaryStringEscape SpecialChar hi def link ShaDaMsgpackExtType Typedef hi def link ShaDaMsgpackStringQuotes Operator hi def link ShaDaMsgpackString ShaDaMsgpackStringQuotes hi def link ShaDaMsgpackExt ShaDaMsgpackStringQuotes hi def link ShaDaMsgpackMapBraces Operator hi def link ShaDaMsgpackArrayBraces ShaDaMsgpackMapBraces hi def link ShaDaMsgpackComma Operator hi def link ShaDaMsgpackColon ShaDaMsgpackComma hi def link ShaDaMsgpackMultilineArray Operator let b:current_syntax = "shada" neovim-0.2.2/runtime/syntax/sicad.vim000066400000000000000000000440531320401574200176250ustar00rootroot00000000000000" Vim syntax file " Language: SiCAD (procedure language) " Maintainer: Zsolt Branyiczky " Last Change: 2003 May 11 " URL: http://lmark.mgx.hu:81/download/vim/sicad.vim " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " use SQL highlighting after 'sql' command syn include @SQL syntax/sql.vim unlet b:current_syntax " spaces are used in (auto)indents since sicad hates tabulator characters setlocal expandtab " ignore case syn case ignore " most important commands - not listed by ausku syn keyword sicadStatement define syn keyword sicadStatement dialog syn keyword sicadStatement do syn keyword sicadStatement dop contained syn keyword sicadStatement end syn keyword sicadStatement enddo syn keyword sicadStatement endp syn keyword sicadStatement erroff syn keyword sicadStatement erron syn keyword sicadStatement exitp syn keyword sicadGoto goto contained syn keyword sicadStatement hh syn keyword sicadStatement if syn keyword sicadStatement in syn keyword sicadStatement msgsup syn keyword sicadStatement out syn keyword sicadStatement padd syn keyword sicadStatement parbeg syn keyword sicadStatement parend syn keyword sicadStatement pdoc syn keyword sicadStatement pprot syn keyword sicadStatement procd syn keyword sicadStatement procn syn keyword sicadStatement psav syn keyword sicadStatement psel syn keyword sicadStatement psymb syn keyword sicadStatement ptrace syn keyword sicadStatement ptstat syn keyword sicadStatement set syn keyword sicadStatement sql contained syn keyword sicadStatement step syn keyword sicadStatement sys syn keyword sicadStatement ww " functions syn match sicadStatement "\"me=s+1 syn match sicadStatement "\"me=s+1 " logical operators syn match sicadOperator "\.and\." syn match sicadOperator "\.ne\." syn match sicadOperator "\.not\." syn match sicadOperator "\.eq\." syn match sicadOperator "\.ge\." syn match sicadOperator "\.gt\." syn match sicadOperator "\.le\." syn match sicadOperator "\.lt\." syn match sicadOperator "\.or\." syn match sicadOperator "\.eqv\." syn match sicadOperator "\.neqv\." " variable name syn match sicadIdentifier "%g\=[irpt][0-9]\{1,2}\>" syn match sicadIdentifier "%g\=l[0-9]\>" syn match sicadIdentifier "%g\=[irptl]("me=e-1 syn match sicadIdentifier "%error\>" syn match sicadIdentifier "%nsel\>" syn match sicadIdentifier "%nvar\>" syn match sicadIdentifier "%scl\>" syn match sicadIdentifier "%wd\>" syn match sicadIdentifier "\$[irt][0-9]\{1,2}\>" contained " label syn match sicadLabel1 "^ *\.[a-z][a-z0-9]\{0,7} \+[^ ]"me=e-1 syn match sicadLabel1 "^ *\.[a-z][a-z0-9]\{0,7}\*"me=e-1 syn match sicadLabel2 "\" contains=sicadGoto syn match sicadLabel2 "\" contains=sicadGoto " boolean syn match sicadBoolean "\.[ft]\." " integer without sign syn match sicadNumber "\<[0-9]\+\>" " floating point number, with dot, optional exponent syn match sicadFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\>" " floating point number, starting with a dot, optional exponent syn match sicadFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>" " floating point number, without dot, with exponent syn match sicadFloat "\<[0-9]\+e[-+]\=[0-9]\+\>" " without this extraString definition a ' ; ' could stop the comment syn region sicadString_ transparent start=+'+ end=+'+ oneline contained " string syn region sicadString start=+'+ end=+'+ oneline " comments - nasty ones in sicad " - ' * blabla' or ' * blabla;' syn region sicadComment start="^ *\*" skip='\\ *$' end=";"me=e-1 end="$" contains=sicadString_ " - ' .LABEL03 * blabla' or ' .LABEL03 * blabla;' syn region sicadComment start="^ *\.[a-z][a-z0-9]\{0,7} *\*" skip='\\ *$' end=";"me=e-1 end="$" contains=sicadLabel1,sicadString_ " - '; * blabla' or '; * blabla;' syn region sicadComment start="; *\*"ms=s+1 skip='\\ *$' end=";"me=e-1 end="$" contains=sicadString_ " - comments between docbeg and docend syn region sicadComment matchgroup=sicadStatement start="\" end="\" " catch \ at the end of line syn match sicadLineCont "\\ *$" " parameters in dop block - for the time being it is not used "syn match sicadParameter " [a-z][a-z0-9]*[=:]"me=e-1 contained " dop block - for the time being it is not used syn region sicadDopBlock transparent matchgroup=sicadStatement start='\' skip='\\ *$' end=';'me=e-1 end='$' contains=ALL " sql block - new highlighting mode is used (see syn include) syn region sicadSqlBlock transparent matchgroup=sicadStatement start='\' skip='\\ *$' end=';'me=e-1 end='$' contains=@SQL,sicadIdentifier,sicadLineCont " synchronizing syn sync clear " clear sync used in sql.vim syn sync match sicadSyncComment groupthere NONE "\" syn sync match sicadSyncComment grouphere sicadComment "\" " next line must be examined too syn sync linecont "\\ *$" " catch error caused by tabulator key syn match sicadError "\t" " catch errors caused by wrong parenthesis "syn region sicadParen transparent start='(' end=')' contains=ALLBUT,sicadParenError syn region sicadParen transparent start='(' skip='\\ *$' end=')' end='$' contains=ALLBUT,sicadParenError syn match sicadParenError ')' "syn region sicadApostrophe transparent start=+'+ end=+'+ contains=ALLBUT,sicadApostropheError "syn match sicadApostropheError +'+ " not closed apostrophe "syn region sicadError start=+'+ end=+$+ contains=ALLBUT,sicadApostropheError "syn match sicadApostropheError +'[^']*$+me=s+1 contained " SICAD keywords syn keyword sicadStatement abst add addsim adrin aib syn keyword sicadStatement aibzsn aidump aifgeo aisbrk alknam syn keyword sicadStatement alknr alksav alksel alktrc alopen syn keyword sicadStatement ansbo aractiv ararea arareao ararsfs syn keyword sicadStatement arbuffer archeck arcomv arcont arconv syn keyword sicadStatement arcopy arcopyo arcorr arcreate arerror syn keyword sicadStatement areval arflfm arflop arfrast argbkey syn keyword sicadStatement argenf argraph argrapho arinters arkompfl syn keyword sicadStatement arlasso arlcopy arlgraph arline arlining syn keyword sicadStatement arlisly armakea armemo arnext aroverl syn keyword sicadStatement arovers arparkmd arpars arrefp arselect syn keyword sicadStatement arset arstruct arunify arupdate arvector syn keyword sicadStatement arveinfl arvflfl arvoroni ausku basis syn keyword sicadStatement basisaus basisdar basisnr bebos befl syn keyword sicadStatement befla befli befls beo beorta syn keyword sicadStatement beortn bep bepan bepap bepola syn keyword sicadStatement bepoln bepsn bepsp ber berili syn keyword sicadStatement berk bewz bkl bli bma syn keyword sicadStatement bmakt bmakts bmbm bmerk bmerw syn keyword sicadStatement bmerws bminit bmk bmorth bmos syn keyword sicadStatement bmoss bmpar bmsl bmsum bmsums syn keyword sicadStatement bmver bmvero bmw bo bta syn keyword sicadStatement buffer bvl bw bza bzap syn keyword sicadStatement bzd bzgera bzorth cat catel syn keyword sicadStatement cdbdiff ce cgmparam close closesim syn keyword sicadStatement comgener comp comp conclose conclose coninfo syn keyword sicadStatement conopen conread contour conwrite cop syn keyword sicadStatement copar coparp coparp2 copel cr syn keyword sicadStatement cs cstat cursor d da syn keyword sicadStatement dal dasp dasps dataout dcol syn keyword sicadStatement dd defsr del delel deskrdef syn keyword sicadStatement df dfn dfns dfpos dfr syn keyword sicadStatement dgd dgm dgp dgr dh syn keyword sicadStatement diag diaus dir disbsd dkl syn keyword sicadStatement dktx dkur dlgfix dlgfre dma syn keyword sicadStatement dprio dr druse dsel dskinfo syn keyword sicadStatement dsr dv dve eba ebd syn keyword sicadStatement ebdmod ebs edbsdbin edbssnin edbsvtin syn keyword sicadStatement edt egaus egdef egdefs eglist syn keyword sicadStatement egloe egloenp egloes egxx eib syn keyword sicadStatement ekur ekuradd elel elpos epg syn keyword sicadStatement esau esauadd esek eta etap syn keyword sicadStatement etav feparam ficonv filse fl syn keyword sicadStatement fli flin flini flinit flins syn keyword sicadStatement flkor fln flnli flop flout syn keyword sicadStatement flowert flparam flraster flsy flsyd syn keyword sicadStatement flsym flsyms flsymt fmtatt fmtdia syn keyword sicadStatement fmtlib fpg gbadddb gbaim gbanrs syn keyword sicadStatement gbatw gbau gbaudit gbclosp gbcredic syn keyword sicadStatement gbcreem gbcreld gbcresdb gbcretd gbde syn keyword sicadStatement gbdeldb gbdeldic gbdelem gbdelld gbdelref syn keyword sicadStatement gbdeltd gbdisdb gbdisem gbdisld gbdistd syn keyword sicadStatement gbebn gbemau gbepsv gbgetdet gbgetes syn keyword sicadStatement gbgetmas gbgqel gbgqelr gbgqsa gbgrant syn keyword sicadStatement gbimpdic gbler gblerb gblerf gbles syn keyword sicadStatement gblocdic gbmgmg gbmntdb gbmoddb gbnam syn keyword sicadStatement gbneu gbopenp gbpoly gbpos gbpruef syn keyword sicadStatement gbpruefg gbps gbqgel gbqgsa gbrefdic syn keyword sicadStatement gbreftab gbreldic gbresem gbrevoke gbsav syn keyword sicadStatement gbsbef gbsddk gbsicu gbsrt gbss syn keyword sicadStatement gbstat gbsysp gbszau gbubp gbueb syn keyword sicadStatement gbunmdb gbuseem gbw gbweg gbwieh syn keyword sicadStatement gbzt gelp gera getvar hgw syn keyword sicadStatement hpg hr0 hra hrar icclchan syn keyword sicadStatement iccrecon icdescon icfree icgetcon icgtresp syn keyword sicadStatement icopchan icputcon icreacon icreqd icreqnw syn keyword sicadStatement icreqw icrespd icresrve icwricon imsget syn keyword sicadStatement imsgqel imsmget imsplot imsprint inchk syn keyword sicadStatement inf infd inst kbml kbmls syn keyword sicadStatement kbmm kbmms kbmt kbmtdps kbmts syn keyword sicadStatement khboe khbol khdob khe khetap syn keyword sicadStatement khfrw khktk khlang khld khmfrp syn keyword sicadStatement khmks khms khpd khpfeil khpl syn keyword sicadStatement khprofil khrand khsa khsabs khsaph syn keyword sicadStatement khsd khsdl khse khskbz khsna syn keyword sicadStatement khsnum khsob khspos khsvph khtrn syn keyword sicadStatement khver khzpe khzpl kib kldat syn keyword sicadStatement klleg klsch klsym klvert kmpg syn keyword sicadStatement kmtlage kmtp kmtps kodef kodefp syn keyword sicadStatement kodefs kok kokp kolae kom syn keyword sicadStatement kontly kopar koparp kopg kosy syn keyword sicadStatement kp kr krsek krtclose krtopen syn keyword sicadStatement ktk lad lae laesel language syn keyword sicadStatement lasso lbdes lcs ldesk ldesks syn keyword sicadStatement le leak leattdes leba lebas syn keyword sicadStatement lebaznp lebd lebm lebv lebvaus syn keyword sicadStatement lebvlist lede ledel ledepo ledepol syn keyword sicadStatement ledepos leder ledist ledm lee syn keyword sicadStatement leeins lees lege lekr lekrend syn keyword sicadStatement lekwa lekwas lel lelh lell syn keyword sicadStatement lelp lem lena lend lenm syn keyword sicadStatement lep lepe lepee lepko lepl syn keyword sicadStatement lepmko lepmkop lepos leposm leqs syn keyword sicadStatement leqsl leqssp leqsv leqsvov les syn keyword sicadStatement lesch lesr less lestd let syn keyword sicadStatement letaum letl lev levm levtm syn keyword sicadStatement levtp levtr lew lewm lexx syn keyword sicadStatement lfs li lining lldes lmode syn keyword sicadStatement loedk loepkt lop lose loses syn keyword sicadStatement lp lppg lppruef lr ls syn keyword sicadStatement lsop lsta lstat ly lyaus syn keyword sicadStatement lz lza lzae lzbz lze syn keyword sicadStatement lznr lzo lzpos ma ma0 syn keyword sicadStatement ma1 mad map mapoly mcarp syn keyword sicadStatement mccfr mccgr mcclr mccrf mcdf syn keyword sicadStatement mcdma mcdr mcdrp mcdve mcebd syn keyword sicadStatement mcgse mcinfo mcldrp md me syn keyword sicadStatement mefd mefds minmax mipg ml syn keyword sicadStatement mmcmdme mmdbf mmdellb mmdir mmdome syn keyword sicadStatement mmfsb mminfolb mmlapp mmlbf mmlistlb syn keyword sicadStatement mmloadcm mmmsg mmreadlb mmsetlb mmshowcm syn keyword sicadStatement mmstatme mnp mpo mr mra syn keyword sicadStatement ms msav msgout msgsnd msp syn keyword sicadStatement mspf mtd nasel ncomp new syn keyword sicadStatement nlist nlistlt nlistly nlistnp nlistpo syn keyword sicadStatement np npa npdes npe npem syn keyword sicadStatement npinfa npruef npsat npss npssa syn keyword sicadStatement ntz oa oan odel odf syn keyword sicadStatement odfx oj oja ojaddsk ojaed syn keyword sicadStatement ojaeds ojaef ojaefs ojaen ojak syn keyword sicadStatement ojaks ojakt ojakz ojalm ojatkis syn keyword sicadStatement ojatt ojatw ojbsel ojcasel ojckon syn keyword sicadStatement ojde ojdtl ojeb ojebd ojel syn keyword sicadStatement ojelpas ojesb ojesbd ojex ojezge syn keyword sicadStatement ojko ojlb ojloe ojlsb ojmerk syn keyword sicadStatement ojmos ojnam ojpda ojpoly ojprae syn keyword sicadStatement ojs ojsak ojsort ojstrukt ojsub syn keyword sicadStatement ojtdef ojvek ojx old oldd syn keyword sicadStatement op opa opa1 open opensim syn keyword sicadStatement opnbsd orth osanz ot otp syn keyword sicadStatement otrefp param paranf pas passw syn keyword sicadStatement pcatchf pda pdadd pg pg0 syn keyword sicadStatement pgauf pgaufsel pgb pgko pgm syn keyword sicadStatement pgr pgvs pily pkpg plot syn keyword sicadStatement plotf plotfr pmap pmdata pmdi syn keyword sicadStatement pmdp pmeb pmep pminfo pmlb syn keyword sicadStatement pmli pmlp pmmod pnrver poa syn keyword sicadStatement pos posa posaus post printfr syn keyword sicadStatement protect prs prssy prsym ps syn keyword sicadStatement psadd psclose psopen psparam psprw syn keyword sicadStatement psres psstat psw pswr qualif syn keyword sicadStatement rahmen raster rasterd rbbackup rbchang2 syn keyword sicadStatement rbchange rbcmd rbcoldst rbcolor rbcopy syn keyword sicadStatement rbcut rbcut2 rbdbcl rbdbload rbdbop syn keyword sicadStatement rbdbwin rbdefs rbedit rbfdel rbfill syn keyword sicadStatement rbfill2 rbfload rbfload2 rbfnew rbfnew2 syn keyword sicadStatement rbfpar rbfree rbg rbgetcol rbgetdst syn keyword sicadStatement rbinfo rbpaste rbpixel rbrstore rbsnap syn keyword sicadStatement rbsta rbtile rbtrpix rbvtor rcol syn keyword sicadStatement rd rdchange re reb rebmod syn keyword sicadStatement refunc ren renel rk rkpos syn keyword sicadStatement rohr rohrpos rpr rr rr0 syn keyword sicadStatement rra rrar rs samtosdb sav syn keyword sicadStatement savd savesim savx scol scopy syn keyword sicadStatement scopye sdbtosam sddk sdwr se syn keyword sicadStatement selaus selpos seman semi sesch syn keyword sicadStatement setscl setvar sfclntpf sfconn sffetchf syn keyword sicadStatement sffpropi sfftypi sfqugeoc sfquwhcl sfself syn keyword sicadStatement sfstat sftest sge sid sie syn keyword sicadStatement sig sigp skk skks sn syn keyword sicadStatement sn21 snpa snpar snparp snparps syn keyword sicadStatement snpars snpas snpd snpi snpkor syn keyword sicadStatement snpl snpm sob sob0 sobloe syn keyword sicadStatement sobs sof sop split spr syn keyword sicadStatement sqdadd sqdlad sqdold sqdsav syn keyword sicadStatement sr sres srt sset stat syn keyword sicadStatement stdtxt string strukt strupru suinfl syn keyword sicadStatement suinflk suinfls supo supo1 sva syn keyword sicadStatement svr sy sya syly sysout syn keyword sicadStatement syu syux taa tabeg tabl syn keyword sicadStatement tabm tam tanr tapg tapos syn keyword sicadStatement tarkd tas tase tb tbadd syn keyword sicadStatement tbd tbext tbget tbint tbout syn keyword sicadStatement tbput tbsat tbsel tbstr tcaux syn keyword sicadStatement tccable tcchkrep tccomm tccond tcdbg syn keyword sicadStatement tcgbnr tcgrpos tcinit tclconv tcmodel syn keyword sicadStatement tcnwe tcpairs tcpath tcrect tcrmdli syn keyword sicadStatement tcscheme tcschmap tcse tcselc tcstar syn keyword sicadStatement tcstrman tcsubnet tcsymbol tctable tcthrcab syn keyword sicadStatement tctrans tctst tdb tdbdel tdbget syn keyword sicadStatement tdblist tdbput tgmod titel tmoff syn keyword sicadStatement tmon tp tpa tps tpta syn keyword sicadStatement tra trans transkdo transopt transpro syn keyword sicadStatement triangle trm trpg trrkd trs syn keyword sicadStatement ts tsa tx txa txchk syn keyword sicadStatement txcng txju txl txp txpv syn keyword sicadStatement txtcmp txv txz uckon uiinfo syn keyword sicadStatement uistatus umdk umdk1 umdka umge syn keyword sicadStatement umges umr verbo verflli verif syn keyword sicadStatement verly versinfo vfg vpactive vpcenter syn keyword sicadStatement vpcreate vpdelete vpinfo vpmodify vpscroll syn keyword sicadStatement vpsta wabsym wzmerk zdrhf zdrhfn syn keyword sicadStatement zdrhfw zdrhfwn zefp zfl zflaus syn keyword sicadStatement zka zlel zlels zortf zortfn syn keyword sicadStatement zortfw zortfwn zortp zortpn zparb syn keyword sicadStatement zparbn zparf zparfn zparfw zparfwn syn keyword sicadStatement zparp zparpn zwinkp zwinkpn " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link sicadLabel PreProc hi def link sicadLabel1 sicadLabel hi def link sicadLabel2 sicadLabel hi def link sicadConditional Conditional hi def link sicadBoolean Boolean hi def link sicadNumber Number hi def link sicadFloat Float hi def link sicadOperator Operator hi def link sicadStatement Statement hi def link sicadParameter sicadStatement hi def link sicadGoto sicadStatement hi def link sicadLineCont sicadStatement hi def link sicadString String hi def link sicadComment Comment hi def link sicadSpecial Special hi def link sicadIdentifier Type " hi def link sicadIdentifier Identifier hi def link sicadError Error hi def link sicadParenError sicadError hi def link sicadApostropheError sicadError hi def link sicadStringError sicadError hi def link sicadCommentError sicadError " hi def link sqlStatement Special " modified highlight group in sql.vim let b:current_syntax = "sicad" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/sieve.vim000066400000000000000000000032071320401574200176510ustar00rootroot00000000000000" Vim syntax file " Language: Sieve filtering language input file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2007-10-25 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword sieveTodo contained TODO FIXME XXX NOTE syn region sieveComment start='/\*' end='\*/' contains=sieveTodo,@Spell syn region sieveComment display oneline start='#' end='$' \ contains=sieveTodo,@Spell syn case ignore syn match sieveTag display ':\h\w*' syn match sieveNumber display '\<\d\+[KMG]\=\>' syn match sieveSpecial display '\\["\\]' syn region sieveString start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=sieveSpecial syn region sieveString start='text:' end='\n.\n' syn keyword sieveConditional if elsif else syn keyword sieveTest address allof anyof envelope exists false header \ not size true syn keyword sievePreProc require stop syn keyword sieveAction reject fileinto redirect keep discard syn keyword sieveKeyword vacation syn case match hi def link sieveTodo Todo hi def link sieveComment Comment hi def link sieveTag Type hi def link sieveNumber Number hi def link sieveSpecial Special hi def link sieveString String hi def link sieveConditional Conditional hi def link sieveTest Keyword hi def link sievePreProc PreProc hi def link sieveAction Function hi def link sieveKeyword Keyword let b:current_syntax = "sieve" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/simula.vim000066400000000000000000000064531320401574200200360ustar00rootroot00000000000000" Vim syntax file " Language: Simula " Maintainer: Haakon Riiser " URL: http://folk.uio.no/hakonrk/vim/syntax/simula.vim " Last Change: 2001 May 15 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " No case sensitivity in Simula syn case ignore syn match simulaComment "^%.*$" contains=simulaTodo syn region simulaComment start="!\|\" end=";" contains=simulaTodo " Text between the keyword 'end' and either a semicolon or one of the " keywords 'end', 'else', 'when' or 'otherwise' is also a comment syn region simulaComment start="\"lc=3 matchgroup=Statement end=";\|\<\(end\|else\|when\|otherwise\)\>" syn match simulaCharError "'.\{-2,}'" syn match simulaCharacter "'.'" syn match simulaCharacter "'!\d\{-}!'" contains=simulaSpecialChar syn match simulaString '".\{-}"' contains=simulaSpecialChar,simulaTodo syn keyword simulaBoolean true false syn keyword simulaCompound begin end syn keyword simulaConditional else if otherwise then until when syn keyword simulaConstant none notext syn keyword simulaFunction procedure syn keyword simulaOperator eq eqv ge gt imp in is le lt ne new not qua syn keyword simulaRepeat while for syn keyword simulaReserved activate after at before delay go goto label prior reactivate switch to syn keyword simulaStatement do inner inspect step this syn keyword simulaStorageClass external hidden name protected value syn keyword simulaStructure class syn keyword simulaType array boolean character integer long real short text virtual syn match simulaAssigned "\<\h\w*\s*\((.*)\)\=\s*:\(=\|-\)"me=e-2 syn match simulaOperator "[&:=<>+\-*/]" syn match simulaOperator "\" syn match simulaOperator "\" syn match simulaReferenceType "\" " Real with optional exponent syn match simulaReal "-\=\<\d\+\(\.\d\+\)\=\(&&\=[+-]\=\d\+\)\=\>" " Real starting with a `.', optional exponent syn match simulaReal "-\=\.\d\+\(&&\=[+-]\=\d\+\)\=\>" hi def link simulaAssigned Identifier hi def link simulaBoolean Boolean hi def link simulaCharacter Character hi def link simulaCharError Error hi def link simulaComment Comment hi def link simulaCompound Statement hi def link simulaConditional Conditional hi def link simulaConstant Constant hi def link simulaFunction Function hi def link simulaNumber Number hi def link simulaOperator Operator hi def link simulaReal Float hi def link simulaReferenceType Type hi def link simulaRepeat Repeat hi def link simulaReserved Error hi def link simulaSemicolon Statement hi def link simulaSpecial Special hi def link simulaSpecialChar SpecialChar hi def link simulaSpecialCharErr Error hi def link simulaStatement Statement hi def link simulaStorageClass StorageClass hi def link simulaString String hi def link simulaStructure Structure hi def link simulaTodo Todo hi def link simulaType Type let b:current_syntax = "simula" " vim: sts=4 sw=4 ts=8 neovim-0.2.2/runtime/syntax/sinda.vim000066400000000000000000000071221320401574200176340ustar00rootroot00000000000000" Vim syntax file " Language: sinda85, sinda/fluint input file " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.sin " URL: http://www.naglenet.org/vim/syntax/sinda.vim " MAIN URL: http://www.naglenet.org/vim/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Ignore case syn case ignore " " " Begin syntax definitions for sinda input and output files. " " Force free-form fortran format let fortran_free_source=1 " Load FORTRAN syntax file runtime! syntax/fortran.vim unlet b:current_syntax " Define keywords for SINDA syn keyword sindaMacro BUILD BUILDF DEBON DEBOFF DEFMOD FSTART FSTOP syn keyword sindaOptions TITLE PPSAVE RSI RSO OUTPUT SAVE QMAP USER1 USER2 syn keyword sindaOptions MODEL PPOUT NOLIST MLINE NODEBUG DIRECTORIES syn keyword sindaOptions DOUBLEPR syn keyword sindaRoutine FORWRD FWDBCK STDSTL FASTIC syn keyword sindaControl ABSZRO ACCELX ACCELY ACCELZ ARLXCA ATMPCA syn keyword sindaControl BACKUP CSGFAC DRLXCA DTIMEH DTIMEI DTIMEL syn keyword sindaControl DTIMES DTMPCA EBALNA EBALSA EXTLIM ITEROT syn keyword sindaControl ITERXT ITHOLD NLOOPS NLOOPT OUTPUT OPEITR syn keyword sindaControl PATMOS SIGMA TIMEO TIMEND UID syn keyword sindaSubRoutine ASKERS ADARIN ADDARY ADDMOD ARINDV syn keyword sindaSubRoutine RYINV ARYMPY ARYSUB ARYTRN BAROC syn keyword sindaSubRoutine BELACC BNDDRV BNDGET CHENNB CHGFLD syn keyword sindaSubRoutine CHGLMP CHGSUC CHGVOL CHKCHL CHKCHP syn keyword sindaSubRoutine CNSTAB COMBAL COMPLQ COMPRS CONTRN syn keyword sindaSubRoutine CPRINT CRASH CRVINT CRYTRN CSIFLX syn keyword sindaSubRoutine CVTEMP D11CYL C11DAI D11DIM D11MCY syn keyword sindaSubRoutine D11MDA D11MDI D11MDT D12CYL D12MCY syn keyword sindaSubRoutine D12MDA D1D1DA D1D1IM D1D1WM D1D2DA syn keyword sindaSubRoutine D1D2WM D1DEG1 D1DEG2 D1DG1I D1IMD1 syn keyword sindaSubRoutine D1IMIM D1IMWM D1M1DA D1M2MD D1M2WM syn keyword sindaSubRoutine D1MDG1 D1MDG2 D2D1WM D1DEG1 D2DEG2 syn keyword sindaSubRoutine D2D2 syn keyword sindaIdentifier BIV CAL DIM DIV DPM DPV DTV GEN PER PIV PIM syn keyword sindaIdentifier SIM SIV SPM SPV TVS TVD " Define matches for SINDA syn match sindaFortran "^F[0-9 ]"me=e-1 syn match sindaMotran "^M[0-9 ]"me=e-1 syn match sindaComment "^C.*$" syn match sindaComment "^R.*$" syn match sindaComment "\$.*$" syn match sindaHeader "^header[^,]*" syn match sindaIncludeFile "include \+[^ ]\+"hs=s+8 contains=fortranInclude syn match sindaMacro "^PSTART" syn match sindaMacro "^PSTOP" syn match sindaMacro "^FAC" syn match sindaInteger "-\=\<[0-9]*\>" syn match sindaFloat "-\=\<[0-9]*\.[0-9]*" syn match sindaScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" syn match sindaEndData "^END OF DATA" if exists("thermal_todo") execute 'syn match sindaTodo ' . '"^'.thermal_todo.'.*$"' else syn match sindaTodo "^?.*$" endif " Define the default highlighting " Only when an item doesn't have highlighting yet hi def link sindaMacro Macro hi def link sindaOptions Special hi def link sindaRoutine Type hi def link sindaControl Special hi def link sindaSubRoutine Function hi def link sindaIdentifier Identifier hi def link sindaFortran PreProc hi def link sindaMotran PreProc hi def link sindaComment Comment hi def link sindaHeader Typedef hi def link sindaIncludeFile Type hi def link sindaInteger Number hi def link sindaFloat Float hi def link sindaScientific Float hi def link sindaEndData Macro hi def link sindaTodo Todo let b:current_syntax = "sinda" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/sindacmp.vim000066400000000000000000000023721320401574200203360ustar00rootroot00000000000000" Vim syntax file " Language: sinda85, sinda/fluint compare file " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.cmp " URL: http://www.naglenet.org/vim/syntax/sindacmp.vim " MAIN URL: http://www.naglenet.org/vim/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Ignore case syn case ignore " " Begin syntax definitions for compare files. " " Define keywords for sinda compare (sincomp) syn keyword sindacmpUnit celsius fahrenheit " Define matches for sinda compare (sincomp) syn match sindacmpTitle "Steady State Temperature Comparison" syn match sindacmpLabel "File [1-6] is" syn match sindacmpHeader "^ *Node\( *File \d\)* *Node Description" syn match sindacmpInteger "^ *-\=\<[0-9]*\>" syn match sindacmpFloat "-\=\<[0-9]*\.[0-9]*" " Define the default highlighting " Only when an item doesn't have highlighting yet hi def link sindacmpTitle Type hi def link sindacmpUnit PreProc hi def link sindacmpLabel Statement hi def link sindacmpHeader sindaHeader hi def link sindacmpInteger Number hi def link sindacmpFloat Special let b:current_syntax = "sindacmp" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/sindaout.vim000066400000000000000000000036511320401574200203670ustar00rootroot00000000000000" Vim syntax file " Language: sinda85, sinda/fluint output file " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.out " URL: http://www.naglenet.org/vim/syntax/sindaout.vim " MAIN URL: http://www.naglenet.org/vim/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Ignore case syn case match " Load SINDA syntax file runtime! syntax/sinda.vim unlet b:current_syntax " " " Begin syntax definitions for sinda output files. " " Define keywords for sinda output syn case match syn keyword sindaoutPos ON SI syn keyword sindaoutNeg OFF ENG " Define matches for sinda output syn match sindaoutFile ": \w*\.TAK"hs=s+2 syn match sindaoutInteger "T\=[0-9]*\>"ms=s+1 syn match sindaoutSectionDelim "[-<>]\{4,}" contains=sindaoutSectionTitle syn match sindaoutSectionDelim ":\=\.\{4,}:\=" contains=sindaoutSectionTitle syn match sindaoutSectionTitle "[-<:] \w[0-9A-Za-z_() ]\+ [->:]"hs=s+1,me=e-1 syn match sindaoutHeaderDelim "=\{5,}" syn match sindaoutHeaderDelim "|\{5,}" syn match sindaoutHeaderDelim "+\{5,}" syn match sindaoutLabel "Input File:" contains=sindaoutFile syn match sindaoutLabel "Begin Solution: Routine" syn match sindaoutError "<<< Error >>>" " Define the default highlighting " Only when an item doesn't have highlighting yet hi sindaHeaderDelim ctermfg=Black ctermbg=Green guifg=Black guibg=Green hi def link sindaoutPos Statement hi def link sindaoutNeg PreProc hi def link sindaoutTitle Type hi def link sindaoutFile sindaIncludeFile hi def link sindaoutInteger sindaInteger hi def link sindaoutSectionDelim Delimiter hi def link sindaoutSectionTitle Exception hi def link sindaoutHeaderDelim SpecialComment hi def link sindaoutLabel Identifier hi def link sindaoutError Error let b:current_syntax = "sindaout" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/sisu.vim000066400000000000000000000532441320401574200175270ustar00rootroot00000000000000" SiSU Vim syntax file " SiSU Maintainer: Ralph Amissah " SiSU Markup: SiSU (sisu-5.6.7) " Last Change: 2017 Jun 22 " URL: " "(originally looked at Ruby Vim by Mirko Nasato) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim "% "Errors: syn match sisu_error contains=sisu_link,sisu_error_wspace "" "% "Markers Identifiers: if !exists("sisu_no_identifiers") syn match sisu_mark_endnote "\~^" syn match sisu_break contains=@NoSpell " \\\\\( \|$\)\|
\|
" syn match sisu_control contains=@NoSpell "^\(-\\\\-\|=\\\\=\|-\.\.-\|<:p[bn]>\)\s*$" syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" syn match sisu_marktail contains=@NoSpell "^--[+~-]#\s*$" syn match sisu_marktail "[~-]#" syn match sisu_control "\"" syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" syn match sisu_link " \*\~\S\+" syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^./_-]\+\.ss[it]$" syn match sisu_structure "^:A\~$" "% "Document Sub Headers: syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content syn match sisu_sub_header_creator "^\s\+:\(author\|editor\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license syn match sisu_sub_header_classify "^\s\+:\(topic_register\|keywords\|subject\|dewey\|loc\):\s" syn match sisu_sub_header_identifier "^\s\+:\(oclc\|isbn\):\s" syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|stamp\|promo\|ad\|manpage\|home_button_text\|home_button_image\|cover_image\|footer\):\s" syn match sisu_sub_header_notes "^\s\+:\(description\|abstract\|comment\|coverage\|relation\|source\|history\|type\|format\|prefix\|prefix_[ab]\|suffix\):\s" syn match sisu_within_index_ignore "\S\+[:;]\(\s\+\|$\)" syn match sisu_within_index "[:|;]\|+\d\+" "% "semantic markers: (ignore) syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" endif "% "URLs Numbers And ASCII Codes: syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" "% "Tuned Error: (is error if not already matched) syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" syn match sisu_error contains=sisu_error "]" "% "Simple Paired Enclosed Markup: "url/link syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" "% "Document Header: " title syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " creator syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " dates syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " publisher syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " rights syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " classify document syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " identifier document syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_identifier matchgroup=sisu_header start="^[@]identifier:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " original language (depreciated) syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " notes syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " links of interest syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" " make, processing instructions syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" "% "Headings: syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-4]\|:\?[A-D]\)\~\(\S\+\|[^-]\)" end="$" "% "Block Group Text: " table syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" " table syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+table" end="^```\(\s\|$\)" syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" " block, group, poem, alt syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\z(block\|group\|poem\|alt\){" end="^}\z1" syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\(block\|group\|poem\|alt\)" end="^```\(\s\|$\)" " box syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^box\(\.[a-z]\+\)\?{" end="^}box" syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^```\s\+\box\(\.[a-z]\+\)\?" end="^```\(\s\|$\)" " code syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^code\(\.[a-z][0-9a-z_]\+\)\?{" end="^}code" syn region sisu_content_alt contains=sisu_error,@NoSpell matchgroup=sisu_contain start="^```\s\+code\(\.[a-z][0-9a-z_]\+\)\?" end="^```\(\s\|$\)" " quote syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_contain start="^```\s\+quote" end="^```\(\s\|$\)" "% "Endnotes: " regular endnote or asterisk or plus sign endnote syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" " numbered asterisk or plus sign endnote syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" " endnote content marker (for binary content marking) syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" "% "Links And Images: " image with url link (and possibly footnote of url) syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline " sisu outputs, short notation syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline " image syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline "% "Some Line Operations: " bold line syn region sisu_bold contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^!_ " end=" \\\\\|$" " indent and bullet paragraph syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" " indent and bullet (bold start) paragraph syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\)!_\? " end=" \\\\\|$" " hanging indent paragraph [proposed] syn region sisu_normal contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9] " end="$" " hanging indent (bold start/ definition) paragraph [proposed] syn region sisu_bold contains=sisu_fontface,sisu_bold,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_[0-9]\?_[0-9]!_\? " end=" \\\\\|$" " list numbering syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" "% "Font Face Curly Brackets: "syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline " book index: syn region sisu_index contains=sisu_within_index_ignore,sisu_within_index matchgroup=sisu_index_block start="^={" end="}" " emphasis: syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" " bold: syn region sisu_bold contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" " underscore: syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" " italics: syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" " added: syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" " superscript: syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" " subscript: syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," " monospace: syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_bold,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" " strikethrough: syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" "% "Single Words Bold Italicise Etc: (depreciated) syn region sisu_bold contains=sisu_error matchgroup=sisu_bold start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline "misc syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline "% "Expensive Mode: if !exists("sisu_no_expensive") else " not Expensive syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline endif " Expensive? "% "Headers And Headings: (Document Instructions) syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" "% "Errors: syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" syn match sisu_error contains=sisu_error_wspace "\t\+" syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" syn match sisu_error contains=sisu_error "\s\+.{{" syn match sisu_error contains=sisu_error "^\~\s*$" syn match sisu_error contains=sisu_error "^0\~.*" syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" syn match sisu_error contains=sisu_error "{\~^\S\+" syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" syn match sisu_error contains=sisu_error "" "errors for filetype sisu, though not error in 'metaverse': syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" syn match sisu_error "/\?<\([biu]\)>[^()]\{-}\n$" "% "Error Exceptions: syn match sisu_control "\n$" "contains=ALL "syn match sisu_control " //" syn match sisu_error "%{" syn match sisu_error "
_\?https\?:\S\+\|_\?https\?:\S\+
" syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" syn match sisu_comment "^%\{1,2\}.\+" "% "Definitions Default Highlighting: hi def link sisu_normal Normal hi def link sisu_bold Statement hi def link sisu_header PreProc hi def link sisu_header_content Normal hi def link sisu_sub_header_title Statement hi def link sisu_sub_header_creator Statement hi def link sisu_sub_header_date Statement hi def link sisu_sub_header_publisher Statement hi def link sisu_sub_header_rights Statement hi def link sisu_sub_header_classify Statement hi def link sisu_sub_header_identifier Statement hi def link sisu_sub_header_original Statement hi def link sisu_sub_header_links Statement hi def link sisu_sub_header_notes Statement hi def link sisu_sub_header_make Statement hi def link sisu_heading Title hi def link sisu_structure Operator hi def link sisu_contain Include hi def link sisu_mark_endnote Delimiter hi def link sisu_require NonText hi def link sisu_link NonText hi def link sisu_linked String hi def link sisu_fontface Delimiter hi def link sisu_strikeout DiffDelete hi def link sisu_content_alt Special hi def link sisu_sem_content SpecialKey hi def link sisu_sem_block Special hi def link sisu_sem_marker Visual "hi def link sisu_sem_marker Structure hi def link sisu_sem_marker_block MatchParen hi def link sisu_sem_ex_marker FoldColumn hi def link sisu_sem_ex_marker_block Folded hi def link sisu_sem_ex_content Comment "hi def link sisu_sem_ex_content SpecialKey hi def link sisu_sem_ex_block Comment hi def link sisu_index SpecialKey hi def link sisu_index_block Visual hi def link sisu_content_endnote Special hi def link sisu_control Delimiter hi def link sisu_within_index Delimiter hi def link sisu_within_index_ignore SpecialKey hi def link sisu_ocn Include hi def link sisu_number Number hi def link sisu_identifier Function hi def link sisu_underline Underlined hi def link sisu_markpara Include hi def link sisu_marktail Include hi def link sisu_mark Identifier hi def link sisu_break Structure hi def link sisu_html Type hi def link sisu_action Identifier hi def link sisu_comment Comment hi def link sisu_error_sem_marker Error hi def link sisu_error_wspace Error hi def link sisu_error Error let b:current_syntax = "sisu" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/skill.vim000066400000000000000000000622511320401574200176600ustar00rootroot00000000000000" Vim syntax file " Language: SKILL " Maintainer: Toby Schaffer " Last Change: 2003 May 11 " Comments: SKILL is a Lisp-like programming language for use in EDA " tools from Cadence Design Systems. It allows you to have " a programming environment within the Cadence environment " that gives you access to the complete tool set and design " database. This file also defines syntax highlighting for " certain Design Framework II interface functions. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn keyword skillConstants t nil unbound " enumerate all the SKILL reserved words/functions syn match skillFunction "(abs\>"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillConditional "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillConditional "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillRepeat "\"hs=s+1 syn match skillFunction "\<[fs]\=printf("he=e-1 syn match skillFunction "(f\=scanf\>"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillRepeat "\"hs=s+1 syn match skillConditional "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillKeywords "\<[mn]\=procedure("he=e-1 syn match skillFunction "(ncon[cs]\>"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillKeywords "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillConditional "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillConditional "\"hs=s+1 syn match skillRepeat "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillFunction "\"hs=s+1 syn match skillcdfFunctions "\"hs=s+1 syn match skillgeFunctions "\"hs=s+1 syn match skillhiFunctions "\"hs=s+1 syn match skillleFunctions "\"hs=s+1 syn match skilldbefFunctions "\"hs=s+1 syn match skillddFunctions "\"hs=s+1 syn match skillpcFunctions "\"hs=s+1 syn match skilltechFunctions "\<\(tech\|tc\)\u\a\+("he=e-1 " strings syn region skillString start=+"+ skip=+\\"+ end=+"+ syn keyword skillTodo contained TODO FIXME XXX syn keyword skillNote contained NOTE IMPORTANT " comments are either C-style or begin with a semicolon syn region skillComment start="/\*" end="\*/" contains=skillTodo,skillNote syn match skillComment ";.*" contains=skillTodo,skillNote syn match skillCommentError "\*/" syn sync ccomment skillComment minlines=10 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link skillcdfFunctions Function hi def link skillgeFunctions Function hi def link skillhiFunctions Function hi def link skillleFunctions Function hi def link skilldbefFunctions Function hi def link skillddFunctions Function hi def link skillpcFunctions Function hi def link skilltechFunctions Function hi def link skillConstants Constant hi def link skillFunction Function hi def link skillKeywords Statement hi def link skillConditional Conditional hi def link skillRepeat Repeat hi def link skillString String hi def link skillTodo Todo hi def link skillNote Todo hi def link skillComment Comment hi def link skillCommentError Error let b:current_syntax = "skill" " vim: ts=4 neovim-0.2.2/runtime/syntax/sl.vim000066400000000000000000000077641320401574200171700ustar00rootroot00000000000000" Vim syntax file " Language: Renderman shader language " Maintainer: Dan Piponi " Last Change: 2001 May 09 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " A bunch of useful Renderman keywords including special " RenderMan control structures syn keyword slStatement break return continue syn keyword slConditional if else syn keyword slRepeat while for syn keyword slRepeat illuminance illuminate solar syn keyword slTodo contained TODO FIXME XXX " String and Character constants " Highlight special characters (those which have a backslash) differently syn match slSpecial contained "\\[0-9][0-9][0-9]\|\\." syn region slString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=slSpecial syn match slCharacter "'[^\\]'" syn match slSpecialCharacter "'\\.'" syn match slSpecialCharacter "'\\[0-9][0-9]'" syn match slSpecialCharacter "'\\[0-9][0-9][0-9]'" "catch errors caused by wrong parenthesis syn region slParen transparent start='(' end=')' contains=ALLBUT,slParenError,slIncluded,slSpecial,slTodo,slUserLabel syn match slParenError ")" syn match slInParen contained "[{}]" "integer number, or floating point number without a dot and with "f". syn case ignore syn match slNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>" "floating point number, with dot, optional exponent syn match slFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=[fl]\=\>" "floating point number, starting with a dot, optional exponent syn match slFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match slFloat "\<[0-9]\+e[-+]\=[0-9]\+[fl]\=\>" "hex number syn match slNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" "syn match slIdentifier "\<[a-z_][a-z0-9_]*\>" syn case match if exists("sl_comment_strings") " A comment can contain slString, slCharacter and slNumber. " But a "*/" inside a slString in a slComment DOES end the comment! So we " need to use a special type of slString: slCommentString, which also ends on " "*/", and sees a "*" at the start of the line as comment again. " Unfortunately this doesn't very well work for // type of comments :-( syntax match slCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region slCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=slSpecial,slCommentSkip syntax region slComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=slSpecial syntax region slComment start="/\*" end="\*/" contains=slTodo,slCommentString,slCharacter,slNumber else syn region slComment start="/\*" end="\*/" contains=slTodo endif syntax match slCommentError "\*/" syn keyword slOperator sizeof syn keyword slType float point color string vector normal matrix void syn keyword slStorageClass varying uniform extern syn keyword slStorageClass light surface volume displacement transformation imager syn keyword slVariable Cs Os P dPdu dPdv N Ng u v du dv s t syn keyword slVariable L Cl Ol E I ncomps time Ci Oi syn keyword slVariable Ps alpha syn keyword slVariable dtime dPdtime syn sync ccomment slComment minlines=10 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link slLabel Label hi def link slUserLabel Label hi def link slConditional Conditional hi def link slRepeat Repeat hi def link slCharacter Character hi def link slSpecialCharacter slSpecial hi def link slNumber Number hi def link slFloat Float hi def link slParenError slError hi def link slInParen slError hi def link slCommentError slError hi def link slOperator Operator hi def link slStorageClass StorageClass hi def link slError Error hi def link slStatement Statement hi def link slType Type hi def link slCommentError slError hi def link slCommentString slString hi def link slComment2String slString hi def link slCommentSkip slComment hi def link slString String hi def link slComment Comment hi def link slSpecial SpecialChar hi def link slTodo Todo hi def link slVariable Identifier "hi def link slIdentifier Identifier let b:current_syntax = "sl" " vim: ts=8 neovim-0.2.2/runtime/syntax/slang.vim000066400000000000000000000063461320401574200176510ustar00rootroot00000000000000" Vim syntax file " Language: S-Lang " Maintainer: Jan Hlavacek " Last Change: 980216 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn keyword slangStatement break return continue EXECUTE_ERROR_BLOCK syn match slangStatement "\" syn keyword slangLabel case syn keyword slangConditional !if if else switch syn keyword slangRepeat while for _for loop do forever syn keyword slangDefinition define typedef variable struct syn keyword slangOperator or and andelse orelse shr shl xor not syn keyword slangBlock EXIT_BLOCK ERROR_BLOCK syn match slangBlock "\" syn keyword slangConstant NULL syn keyword slangType Integer_Type Double_Type Complex_Type String_Type Struct_Type Ref_Type Null_Type Array_Type DataType_Type syn match slangOctal "\<0\d\+\>" contains=slangOctalError syn match slangOctalError "[89]\+" contained syn match slangHex "\<0[xX][0-9A-Fa-f]*\>" syn match slangDecimal "\<[1-9]\d*\>" syn match slangFloat "\<\d\+\." syn match slangFloat "\<\d\+\.\d\+\([Ee][-+]\=\d\+\)\=\>" syn match slangFloat "\<\d\+\.[Ee][-+]\=\d\+\>" syn match slangFloat "\<\d\+[Ee][-+]\=\d\+\>" syn match slangFloat "\.\d\+\([Ee][-+]\=\d\+\)\=\>" syn match slangImaginary "\.\d\+\([Ee][-+]\=\d*\)\=[ij]\>" syn match slangImaginary "\<\d\+\(\.\d*\)\=\([Ee][-+]\=\d\+\)\=[ij]\>" syn region slangString oneline start='"' end='"' skip='\\"' syn match slangCharacter "'[^\\]'" syn match slangCharacter "'\\.'" syn match slangCharacter "'\\[0-7]\{1,3}'" syn match slangCharacter "'\\d\d\{1,3}'" syn match slangCharacter "'\\x[0-7a-fA-F]\{1,2}'" syn match slangDelim "[][{};:,]" syn match slangOperator "[-%+/&*=<>|!~^@]" "catch errors caused by wrong parenthesis syn region slangParen matchgroup=slangDelim transparent start='(' end=')' contains=ALLBUT,slangParenError syn match slangParenError ")" syn match slangComment "%.*$" syn keyword slangOperator sizeof syn region slangPreCondit start="^\s*#\s*\(ifdef\>\|ifndef\>\|iftrue\>\|ifnfalse\>\|iffalse\>\|ifntrue\>\|if\$\|ifn\$\|\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=cComment,slangString,slangCharacter,slangNumber " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link slangDefinition Type hi def link slangBlock slangDefinition hi def link slangLabel Label hi def link slangConditional Conditional hi def link slangRepeat Repeat hi def link slangCharacter Character hi def link slangFloat Float hi def link slangImaginary Float hi def link slangDecimal slangNumber hi def link slangOctal slangNumber hi def link slangHex slangNumber hi def link slangNumber Number hi def link slangParenError Error hi def link slangOctalError Error hi def link slangOperator Operator hi def link slangStructure Structure hi def link slangInclude Include hi def link slangPreCondit PreCondit hi def link slangError Error hi def link slangStatement Statement hi def link slangType Type hi def link slangString String hi def link slangConstant Constant hi def link slangRangeArray slangConstant hi def link slangComment Comment hi def link slangSpecial SpecialChar hi def link slangTodo Todo hi def link slangDelim Delimiter let b:current_syntax = "slang" " vim: ts=8 neovim-0.2.2/runtime/syntax/slice.vim000066400000000000000000000055601320401574200176410ustar00rootroot00000000000000" Vim syntax file " Language: Slice (ZeroC's Specification Language for Ice) " Maintainer: Morel Bodin " Last Change: 2005 Dec 03 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " The Slice keywords syn keyword sliceType bool byte double float int long short string void syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws syn keyword sliceConstruct class enum exception dictionary interface module LocalObject Object sequence struct syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws syn keyword sliceBoolean false true " Include directives syn region sliceIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match sliceIncluded display contained "<[^>]*>" syn match sliceInclude display "^\s*#\s*include\>\s*["<]" contains=sliceIncluded " Double-include guards syn region sliceGuard start="^#\(define\|ifndef\|endif\)" end="$" " Strings and characters syn region sliceString start=+"+ end=+"+ " Numbers (shamelessly ripped from c.vim, only slightly modified) "integer number, or floating point number without a dot and with "f". syn case ignore syn match sliceNumbers display transparent "\<\d\|\.\d" contains=sliceNumber,sliceFloat,sliceOctal syn match sliceNumber display contained "\d\+" "hex number syn match sliceNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" " Flag the first zero of an octal number as something special syn match sliceOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=sliceOctalZero syn match sliceOctalZero display contained "\<0" syn match sliceFloat display contained "\d\+f" "floating point number, with dot, optional exponent syn match sliceFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" "floating point number, starting with a dot, optional exponent syn match sliceFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match sliceFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" " flag an octal number with wrong digits syn case match " Comments syn region sliceComment start="/\*" end="\*/" syn match sliceComment "//.*" syn sync ccomment sliceComment " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link sliceComment Comment hi def link sliceConstruct Keyword hi def link sliceType Type hi def link sliceString String hi def link sliceIncluded String hi def link sliceQualifier Keyword hi def link sliceInclude Include hi def link sliceGuard PreProc hi def link sliceBoolean Boolean hi def link sliceFloat Number hi def link sliceNumber Number hi def link sliceOctal Number hi def link sliceOctalZero Special hi def link sliceNumberError Special let b:current_syntax = "slice" " vim: ts=8 neovim-0.2.2/runtime/syntax/slpconf.vim000066400000000000000000000270171320401574200202070ustar00rootroot00000000000000" Vim syntax file " Language: RFC 2614 - An API for Service Location configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword slpconfTodo contained TODO FIXME XXX NOTE syn region slpconfComment display oneline start='^[#;]' end='$' \ contains=slpconfTodo,@Spell syn match slpconfBegin display '^' \ nextgroup=slpconfTag, \ slpconfComment skipwhite syn keyword slpconfTag contained net \ nextgroup=slpconfNetTagDot syn match slpconfNetTagDot contained display '.' \ nextgroup=slpconfNetTag syn keyword slpconfNetTag contained slp \ nextgroup=slpconfNetSlpTagdot syn match slpconfNetSlpTagDot contained display '.' \ nextgroup=slpconfNetSlpTag syn keyword slpconfNetSlpTag contained isDA traceDATraffic traceMsg \ traceDrop traceReg isBroadcastOnly \ passiveDADetection securityEnabled \ nextgroup=slpconfBooleanEq,slpconfBooleanHome \ skipwhite syn match slpconfBooleanHome contained display \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfBooleanEq skipwhite syn match slpconfBooleanEq contained display '=' \ nextgroup=slpconfBoolean skipwhite syn keyword slpconfBoolean contained true false TRUE FALSE syn keyword slpconfNetSlpTag contained DAHeartBeat multicastTTL \ DAActiveDiscoveryInterval \ multicastMaximumWait multicastTimeouts \ randomWaitBound MTU maxResults \ nextgroup=slpconfIntegerEq,slpconfIntegerHome \ skipwhite syn match slpconfIntegerHome contained display \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfIntegerEq skipwhite syn match slpconfIntegerEq contained display '=' \ nextgroup=slpconfInteger skipwhite syn match slpconfInteger contained display '\<\d\+\>' syn keyword slpconfNetSlpTag contained DAAttributes SAAttributes \ nextgroup=slpconfAttrEq,slpconfAttrHome \ skipwhite syn match slpconfAttrHome contained display \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfAttrEq skipwhite syn match slpconfAttrEq contained display '=' \ nextgroup=slpconfAttrBegin skipwhite syn match slpconfAttrBegin contained display '(' \ nextgroup=slpconfAttrTag skipwhite syn match slpconfAttrTag contained display \ '[^* \t_(),\\!<=>~[:cntrl:]]\+' \ nextgroup=slpconfAttrTagEq skipwhite syn match slpconfAttrTagEq contained display '=' \ nextgroup=@slpconfAttrValue skipwhite syn cluster slpconfAttrValueCon contains=slpconfAttrValueSep,slpconfAttrEnd syn cluster slpconfAttrValue contains=slpconfAttrIValue,slpconfAttrSValue, \ slpconfAttrBValue,slpconfAttrSSValue syn match slpconfAttrSValue contained display '[^ (),\\!<=>~[:cntrl:]]\+' \ nextgroup=@slpconfAttrValueCon skipwhite syn match slpconfAttrSSValue contained display '\\FF\%(\\\x\x\)\+' \ nextgroup=@slpconfAttrValueCon skipwhite syn match slpconfAttrIValue contained display '[-]\=\d\+\>' \ nextgroup=@slpconfAttrValueCon skipwhite syn keyword slpconfAttrBValue contained true false \ nextgroup=@slpconfAttrValueCon skipwhite syn match slpconfAttrValueSep contained display ',' \ nextgroup=@slpconfAttrValue skipwhite syn match slpconfAttrEnd contained display ')' \ nextgroup=slpconfAttrSep skipwhite syn match slpconfAttrSep contained display ',' \ nextgroup=slpconfAttrBegin skipwhite syn keyword slpconfNetSlpTag contained useScopes typeHint \ nextgroup=slpconfStringsEq,slpconfStringsHome \ skipwhite syn match slpconfStringsHome contained display \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfStringsEq skipwhite syn match slpconfStringsEq contained display '=' \ nextgroup=slpconfStrings skipwhite syn match slpconfStrings contained display \ '\%([[:digit:][:alpha:]]\|[!-+./:-@[-`{-~-]\|\\\x\x\)\+' \ nextgroup=slpconfStringsSep skipwhite syn match slpconfStringsSep contained display ',' \ nextgroup=slpconfStrings skipwhite syn keyword slpconfNetSlpTag contained DAAddresses \ nextgroup=slpconfAddressesEq,slpconfAddrsHome \ skipwhite syn match slpconfAddrsHome contained display \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfAddressesEq skipwhite syn match slpconfAddressesEq contained display '=' \ nextgroup=@slpconfAddresses skipwhite syn cluster slpconfAddresses contains=slpconfFQDNs,slpconfHostnumbers syn match slpconfFQDNs contained display \ '\a[[:alnum:]-]*[[:alnum:]]\|\a' \ nextgroup=slpconfAddressesSep skipwhite syn match slpconfHostnumbers contained display \ '\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfAddressesSep skipwhite syn match slpconfAddressesSep contained display ',' \ nextgroup=@slpconfAddresses skipwhite syn keyword slpconfNetSlpTag contained serializedRegURL \ nextgroup=slpconfStringEq,slpconfStringHome \ skipwhite syn match slpconfStringHome contained display \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfStringEq skipwhite syn match slpconfStringEq contained display '=' \ nextgroup=slpconfString skipwhite syn match slpconfString contained display \ '\%([!-+./:-@[-`{-~-]\|\\\x\x\)\+\|[[:digit:][:alpha:]]' syn keyword slpconfNetSlpTag contained multicastTimeouts DADiscoveryTimeouts \ datagramTimeouts \ nextgroup=slpconfIntegersEq, \ slpconfIntegersHome skipwhite syn match slpconfIntegersHome contained display \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfIntegersEq skipwhite syn match slpconfIntegersEq contained display '=' \ nextgroup=slpconfIntegers skipwhite syn match slpconfIntegers contained display '\<\d\+\>' \ nextgroup=slpconfIntegersSep skipwhite syn match slpconfIntegersSep contained display ',' \ nextgroup=slpconfIntegers skipwhite syn keyword slpconfNetSlpTag contained interfaces \ nextgroup=slpconfHostnumsEq, \ slpconfHostnumsHome skipwhite syn match slpconfHostnumsHome contained display \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfHostnumsEq skipwhite syn match slpconfHostnumsEq contained display '=' \ nextgroup=slpconfOHostnumbers skipwhite syn match slpconfOHostnumbers contained display \ '\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfHostnumsSep skipwhite syn match slpconfHostnumsSep contained display ',' \ nextgroup=slpconfOHostnumbers skipwhite syn keyword slpconfNetSlpTag contained locale \ nextgroup=slpconfLocaleEq,slpconfLocaleHome \ skipwhite syn match slpconfLocaleHome contained display \ '\.\d\{1,3}\%(\.\d\{1,3}\)\{3}' \ nextgroup=slpconfLocaleEq skipwhite syn match slpconfLocaleEq contained display '=' \ nextgroup=slpconfLocale skipwhite syn match slpconfLocale contained display '\a\{1,8}\%(-\a\{1,8}\)\=' hi def link slpconfTodo Todo hi def link slpconfComment Comment hi def link slpconfTag Identifier hi def link slpconfDelimiter Delimiter hi def link slpconfNetTagDot slpconfDelimiter hi def link slpconfNetTag slpconfTag hi def link slpconfNetSlpTagDot slpconfNetTagDot hi def link slpconfNetSlpTag slpconfTag hi def link slpconfHome Special hi def link slpconfBooleanHome slpconfHome hi def link slpconfEq Operator hi def link slpconfBooleanEq slpconfEq hi def link slpconfBoolean Boolean hi def link slpconfIntegerHome slpconfHome hi def link slpconfIntegerEq slpconfEq hi def link slpconfInteger Number hi def link slpconfAttrHome slpconfHome hi def link slpconfAttrEq slpconfEq hi def link slpconfAttrBegin slpconfDelimiter hi def link slpconfAttrTag slpconfTag hi def link slpconfAttrTagEq slpconfEq hi def link slpconfAttrIValue slpconfInteger hi def link slpconfAttrSValue slpconfString hi def link slpconfAttrBValue slpconfBoolean hi def link slpconfAttrSSValue slpconfString hi def link slpconfSeparator slpconfDelimiter hi def link slpconfAttrValueSep slpconfSeparator hi def link slpconfAttrEnd slpconfAttrBegin hi def link slpconfAttrSep slpconfSeparator hi def link slpconfStringsHome slpconfHome hi def link slpconfStringsEq slpconfEq hi def link slpconfStrings slpconfString hi def link slpconfStringsSep slpconfSeparator hi def link slpconfAddrsHome slpconfHome hi def link slpconfAddressesEq slpconfEq hi def link slpconfFQDNs String hi def link slpconfHostnumbers Number hi def link slpconfAddressesSep slpconfSeparator hi def link slpconfStringHome slpconfHome hi def link slpconfStringEq slpconfEq hi def link slpconfString String hi def link slpconfIntegersHome slpconfHome hi def link slpconfIntegersEq slpconfEq hi def link slpconfIntegers slpconfInteger hi def link slpconfIntegersSep slpconfSeparator hi def link slpconfHostnumsHome slpconfHome hi def link slpconfHostnumsEq slpconfEq hi def link slpconfOHostnumbers slpconfHostnumbers hi def link slpconfHostnumsSep slpconfSeparator hi def link slpconfLocaleHome slpconfHome hi def link slpconfLocaleEq slpconfEq hi def link slpconfLocale slpconfString let b:current_syntax = "slpconf" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/slpreg.vim000066400000000000000000000123421320401574200200320ustar00rootroot00000000000000" Vim syntax file " Language: RFC 2614 - An API for Service Location registration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword slpregTodo contained TODO FIXME XXX NOTE syn region slpregComment display oneline start='^[#;]' end='$' \ contains=slpregTodo,@Spell syn match slpregBegin display '^' \ nextgroup=slpregServiceURL, \ slpregComment syn match slpregServiceURL contained display 'service:' \ nextgroup=slpregServiceType syn match slpregServiceType contained display '\a[[:alpha:][:digit:]+-]*\%(\.\a[[:alpha:][:digit:]+-]*\)\=\%(:\a[[:alpha:][:digit:]+-]*\)\=' \ nextgroup=slpregServiceSAPCol syn match slpregServiceSAPCol contained display ':' \ nextgroup=slpregSAP syn match slpregSAP contained '[^,]\+' \ nextgroup=slpregLangSep "syn match slpregSAP contained display '\%(//\%(\%([[:alpha:][:digit:]$-_.~!*\'(),+;&=]*@\)\=\%([[:alnum:]][[:alnum:]-]*[[:alnum:]]\|[[:alnum:]]\.\)*\%(\a[[:alnum:]-]*[[:alnum:]]\|\a\)\%(:\d\+\)\=\)\=\|/at/\%([[:alpha:][:digit:]$-_.~]\|\\\x\x\)\{1,31}:\%([[:alpha:][:digit:]$-_.~]\|\\\x\x\)\{1,31}\%([[:alpha:][:digit:]$-_.~]\|\\\x\x\)\{1,31}\|/ipx/\x\{8}:\x\{12}:\x\{4}\)\%(/\%([[:alpha:][:digit:]$-_.~!*\'()+;?:@&=+]\|\\\x\x\)*\)*\%(;[^()\\!<=>~[:cntrl:]* \t_]\+\%(=[^()\\!<=>~[:cntrl:] ]\+\)\=\)*' syn match slpregLangSep contained display ',' \ nextgroup=slpregLang syn match slpregLang contained display '\a\{1,8}\%(-\a\{1,8\}\)\=' \ nextgroup=slpregLTimeSep syn match slpregLTimeSep contained display ',' \ nextgroup=slpregLTime syn match slpregLTime contained display '\d\{1,5}' \ nextgroup=slpregType,slpregUNewline syn match slpregType contained display '\a[[:alpha:][:digit:]+-]*' \ nextgroup=slpregUNewLine syn match slpregUNewLine contained '\s*\n' \ nextgroup=slpregScopes,slpregAttrList skipnl syn keyword slpregScopes contained scopes \ nextgroup=slpregScopesEq syn match slpregScopesEq contained '=' nextgroup=slpregScopeName syn match slpregScopeName contained '[^(),\\!<=>[:cntrl:];*+ ]\+' \ nextgroup=slpregScopeNameSep, \ slpregScopeNewline syn match slpregScopeNameSep contained ',' \ nextgroup=slpregScopeName syn match slpregScopeNewline contained '\s*\n' \ nextgroup=slpregAttribute skipnl syn match slpregAttribute contained '[^(),\\!<=>[:cntrl:]* \t_]\+' \ nextgroup=slpregAttributeEq, \ slpregScopeNewline syn match slpregAttributeEq contained '=' \ nextgroup=@slpregAttrValue syn cluster slpregAttrValueCon contains=slpregAttribute,slpregAttrValueSep syn cluster slpregAttrValue contains=slpregAttrIValue,slpregAttrSValue, \ slpregAttrBValue,slpregAttrSSValue syn match slpregAttrSValue contained display '[^(),\\!<=>~[:cntrl:]]\+' \ nextgroup=@slpregAttrValueCon skipwhite skipnl syn match slpregAttrSSValue contained display '\\FF\%(\\\x\x\)\+' \ nextgroup=@slpregAttrValueCon skipwhite skipnl syn match slpregAttrIValue contained display '[-]\=\d\+\>' \ nextgroup=@slpregAttrValueCon skipwhite skipnl syn keyword slpregAttrBValue contained true false \ nextgroup=@slpregAttrValueCon skipwhite skipnl syn match slpregAttrValueSep contained display ',' \ nextgroup=@slpregAttrValue skipwhite skipnl hi def link slpregTodo Todo hi def link slpregComment Comment hi def link slpregServiceURL Type hi def link slpregServiceType slpregServiceURL hi def link slpregServiceSAPCol slpregServiceURL hi def link slpregSAP slpregServiceURL hi def link slpregDelimiter Delimiter hi def link slpregLangSep slpregDelimiter hi def link slpregLang String hi def link slpregLTimeSep slpregDelimiter hi def link slpregLTime Number hi def link slpregType Type hi def link slpregScopes Identifier hi def link slpregScopesEq Operator hi def link slpregScopeName String hi def link slpregScopeNameSep slpregDelimiter hi def link slpregAttribute Identifier hi def link slpregAttributeEq Operator hi def link slpregAttrSValue String hi def link slpregAttrSSValue slpregAttrSValue hi def link slpregAttrIValue Number hi def link slpregAttrBValue Boolean hi def link slpregAttrValueSep slpregDelimiter let b:current_syntax = "slpreg" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/slpspi.vim000066400000000000000000000022351320401574200200500ustar00rootroot00000000000000" Vim syntax file " Language: RFC 2614 - An API for Service Location SPI file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword slpspiTodo contained TODO FIXME XXX NOTE syn region slpspiComment display oneline start='^[#;]' end='$' \ contains=slpspiTodo,@Spell syn match slpspiBegin display '^' \ nextgroup=slpspiKeyType, \ slpspiComment skipwhite syn keyword slpspiKeyType contained PRIVATE PUBLIC \ nextgroup=slpspiString skipwhite syn match slpspiString contained '\S\+' \ nextgroup=slpspiKeyFile skipwhite syn match slpspiKeyFile contained '\S\+' hi def link slpspiTodo Todo hi def link slpspiComment Comment hi def link slpspiKeyType Type hi def link slpspiString Identifier hi def link slpspiKeyFile String let b:current_syntax = "slpspi" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/slrnrc.vim000066400000000000000000000310131320401574200200350ustar00rootroot00000000000000" Vim syntax file " Language: Slrn setup file (based on slrn 0.9.8.1) " Maintainer: Preben 'Peppe' Guldberg " Last Change: 23 April 2006 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn keyword slrnrcTodo contained Todo " In some places whitespace is illegal syn match slrnrcSpaceError contained "\s" syn match slrnrcNumber contained "-\=\<\d\+\>" syn match slrnrcNumber contained +'[^']\+'+ syn match slrnrcSpecKey contained +\(\\[er"']\|\^[^'"]\|\\\o\o\o\)+ syn match slrnrcKey contained "\S\+" contains=slrnrcSpecKey syn region slrnrcKey contained start=+"+ skip=+\\"+ end=+"+ oneline contains=slrnrcSpecKey syn region slrnrcKey contained start=+'+ skip=+\\'+ end=+'+ oneline contains=slrnrcSpecKey syn match slrnrcSpecChar contained +'+ syn match slrnrcSpecChar contained +\\[n"]+ syn match slrnrcSpecChar contained "%[dfmnrs%]" syn match slrnrcString contained /[^ \t%"']\+/ contains=slrnrcSpecChar syn region slrnrcString contained start=+"+ skip=+\\"+ end=+"+ oneline contains=slrnrcSpecChar syn match slrnSlangPreCondit "^#\s*ifn\=\(def\>\|false\>\|true\>\|\$\)" syn match slrnSlangPreCondit "^#\s*e\(lif\|lse\|ndif\)\>" syn match slrnrcComment "%.*$" contains=slrnrcTodo syn keyword slrnrcVarInt contained abort_unmodified_edits article_window_page_overlap auto_mark_article_as_read beep broken_xref broken_xref cc_followup check_new_groups syn keyword slrnrcVarInt contained color_by_score confirm_actions custom_sort_by_threads display_cursor_bar drop_bogus_groups editor_uses_mime_charset emphasized_text_mask syn keyword slrnrcVarInt contained emphasized_text_mode fold_headers fold_headers followup_strip_signature force_authentication force_authentication generate_date_header syn keyword slrnrcVarInt contained generate_email_from generate_email_from generate_message_id grouplens_port hide_pgpsignature hide_quotes hide_signature syn keyword slrnrcVarInt contained hide_verbatim_marks hide_verbatim_text highlight_unread_subjects highlight_urls ignore_signature kill_score lines_per_update syn keyword slrnrcVarInt contained mail_editor_is_mua max_low_score max_queued_groups min_high_score mouse netiquette_warnings new_subject_breaks_threads no_autosave syn keyword slrnrcVarInt contained no_backups prefer_head process_verbatim_marks query_next_article query_next_group query_read_group_cutoff read_active reject_long_lines syn keyword slrnrcVarInt contained scroll_by_page show_article show_thread_subject simulate_graphic_chars smart_quote sorting_method spoiler_char spoiler_char syn keyword slrnrcVarInt contained spoiler_display_mode spoiler_display_mode spool_check_up_on_nov spool_check_up_on_nov uncollapse_threads unsubscribe_new_groups use_blink syn keyword slrnrcVarInt contained use_color use_flow_control use_grouplens use_grouplens use_header_numbers use_inews use_inews use_localtime use_metamail use_mime use_mime syn keyword slrnrcVarInt contained use_recommended_msg_id use_slrnpull use_slrnpull use_tilde use_tmpdir use_uudeview use_uudeview warn_followup_to wrap_flags wrap_method syn keyword slrnrcVarInt contained write_newsrc_flags " Listed for removal syn keyword slrnrcVarInt contained author_display display_author_realname display_score group_dsc_start_column process_verbatum_marks prompt_next_group query_reconnect syn keyword slrnrcVarInt contained show_descriptions use_xgtitle " Match as a "string" too syn region slrnrcVarIntStr contained matchgroup=slrnrcVarInt start=+"+ end=+"+ oneline contains=slrnrcVarInt,slrnrcSpaceError syn keyword slrnrcVarStr contained Xbrowser art_help_line art_status_line cansecret_file cc_post_string charset custom_headers custom_sort_order decode_directory syn keyword slrnrcVarStr contained editor_command failed_posts_file followup_custom_headers followup_date_format followup_string followupto_string group_help_line syn keyword slrnrcVarStr contained group_status_line grouplens_host grouplens_pseudoname header_help_line header_status_line hostname inews_program macro_directory syn keyword slrnrcVarStr contained mail_editor_command metamail_command mime_charset non_Xbrowser organization overview_date_format post_editor_command post_object syn keyword slrnrcVarStr contained postpone_directory printer_name quote_string realname reply_custom_headers reply_string replyto save_directory save_posts save_replies syn keyword slrnrcVarStr contained score_editor_command scorefile sendmail_command server_object signature signoff_string spool_active_file spool_activetimes_file syn keyword slrnrcVarStr contained spool_inn_root spool_newsgroups_file spool_nov_file spool_nov_root spool_overviewfmt_file spool_root supersedes_custom_headers syn keyword slrnrcVarStr contained top_status_line username " Listed for removal syn keyword slrnrcVarStr contained followup cc_followup_string " Match as a "string" too syn region slrnrcVarStrStr contained matchgroup=slrnrcVarStr start=+"+ end=+"+ oneline contains=slrnrcVarStr,slrnrcSpaceError " Various commands syn region slrnrcCmdLine matchgroup=slrnrcCmd start="\<\(autobaud\|color\|compatible_charsets\|group_display_format\|grouplens_add\|header_display_format\|ignore_quotes\|include\|interpret\|mono\|nnrpaccess\|posting_host\|server\|set\|setkey\|strip_re_regexp\|strip_sig_regexp\|strip_was_regexp\|unsetkey\|visible_headers\)\>" end="$" oneline contains=slrnrc\(String\|Comment\) " Listed for removal syn region slrnrcCmdLine matchgroup=slrnrcCmd start="\<\(cc_followup_string\|decode_directory\|editor_command\|followup\|hostname\|organization\|quote_string\|realname\|replyto\|scorefile\|signature\|username\)\>" end="$" oneline contains=slrnrc\(String\|Comment\) " Setting variables syn keyword slrnrcSet contained set syn match slrnrcSetStr "^\s*set\s\+\S\+" skipwhite nextgroup=slrnrcString contains=slrnrcSet,slrnrcVarStr\(Str\)\= syn match slrnrcSetInt contained "^\s*set\s\+\S\+" contains=slrnrcSet,slrnrcVarInt\(Str\)\= syn match slrnrcSetIntLine "^\s*set\s\+\S\+\s\+\(-\=\d\+\>\|'[^']\+'\)" contains=slrnrcSetInt,slrnrcNumber,slrnrcVarInt " Color definitions syn match slrnrcColorObj contained "\" syn keyword slrnrcColorObj contained article author boldtext box cursor date description error frame from_myself group grouplens_display header_name header_number headers syn keyword slrnrcColorObj contained high_score italicstext menu menu_press message neg_score normal pgpsignature pos_score quotes response_char selection signature status syn keyword slrnrcColorObj contained subject thread_number tilde tree underlinetext unread_subject url verbatim " Listed for removal syn keyword slrnrcColorObj contained verbatum syn region slrnrcColorObjStr contained matchgroup=slrnrcColorObj start=+"+ end=+"+ oneline contains=slrnrcColorObj,slrnrcSpaceError syn keyword slrnrcColorVal contained default syn keyword slrnrcColorVal contained black blue brightblue brightcyan brightgreen brightmagenta brightred brown cyan gray green lightgray magenta red white yellow syn region slrnrcColorValStr contained matchgroup=slrnrcColorVal start=+"+ end=+"+ oneline contains=slrnrcColorVal,slrnrcSpaceError " Mathcing a function with three arguments syn keyword slrnrcColor contained color syn match slrnrcColorInit contained "^\s*color\s\+\S\+" skipwhite nextgroup=slrnrcColorVal\(Str\)\= contains=slrnrcColor\(Obj\|ObjStr\)\= syn match slrnrcColorLine "^\s*color\s\+\S\+\s\+\S\+" skipwhite nextgroup=slrnrcColorVal\(Str\)\= contains=slrnrcColor\(Init\|Val\|ValStr\) " Mono settings syn keyword slrnrcMonoVal contained blink bold none reverse underline syn region slrnrcMonoValStr contained matchgroup=slrnrcMonoVal start=+"+ end=+"+ oneline contains=slrnrcMonoVal,slrnrcSpaceError " Color object is inherited " Mono needs at least one argument syn keyword slrnrcMono contained mono syn match slrnrcMonoInit contained "^\s*mono\s\+\S\+" contains=slrnrcMono,slrnrcColorObj\(Str\)\= syn match slrnrcMonoLine "^\s*mono\s\+\S\+\s\+\S.*" contains=slrnrcMono\(Init\|Val\|ValStr\),slrnrcComment " Functions in article mode syn keyword slrnrcFunArt contained article_bob article_eob article_left article_line_down article_line_up article_page_down article_page_up article_right article_search syn keyword slrnrcFunArt contained author_search_backward author_search_forward browse_url cancel catchup catchup_all create_score decode delete delete_thread digit_arg syn keyword slrnrcFunArt contained enlarge_article_window evaluate_cmd exchange_mark expunge fast_quit followup forward forward_digest get_children_headers get_parent_header syn keyword slrnrcFunArt contained goto_article goto_last_read grouplens_rate_article header_bob header_eob header_line_down header_line_up header_page_down header_page_up syn keyword slrnrcFunArt contained help hide_article locate_article mark_spot next next_high_score next_same_subject pipe post post_postponed previous print quit redraw syn keyword slrnrcFunArt contained repeat_last_key reply request save show_spoilers shrink_article_window skip_quotes skip_to_next_group skip_to_previous_group syn keyword slrnrcFunArt contained subject_search_backward subject_search_forward supersede suspend tag_header toggle_collapse_threads toggle_header_formats syn keyword slrnrcFunArt contained toggle_header_tag toggle_headers toggle_pgpsignature toggle_quotes toggle_rot13 toggle_signature toggle_sort toggle_verbatim_marks syn keyword slrnrcFunArt contained toggle_verbatim_text uncatchup uncatchup_all undelete untag_headers view_scores wrap_article zoom_article_window " Listed for removal syn keyword slrnrcFunArt contained art_bob art_eob art_xpunge article_linedn article_lineup article_pagedn article_pageup down enlarge_window goto_beginning goto_end left syn keyword slrnrcFunArt contained locate_header_by_msgid pagedn pageup pipe_article prev print_article right scroll_dn scroll_up shrink_window skip_to_prev_group syn keyword slrnrcFunArt contained toggle_show_author up " Functions in group mode syn keyword slrnrcFunGroup contained add_group bob catchup digit_arg eob evaluate_cmd group_search group_search_backward group_search_forward help line_down line_up move_group syn keyword slrnrcFunGroup contained page_down page_up post post_postponed quit redraw refresh_groups repeat_last_key save_newsrc select_group subscribe suspend syn keyword slrnrcFunGroup contained toggle_group_formats toggle_hidden toggle_list_all toggle_scoring transpose_groups uncatchup unsubscribe " Listed for removal syn keyword slrnrcFunGroup contained down group_bob group_eob pagedown pageup toggle_group_display uncatch_up up " Functions in readline mode (actually from slang's slrline.c) syn keyword slrnrcFunRead contained bdel bol complete cycle del delbol delbow deleol down enter eol left quoted_insert right self_insert trim up " Binding keys syn keyword slrnrcSetkeyObj contained article group readline syn region slrnrcSetkeyObjStr contained matchgroup=slrnrcSetkeyObj start=+"+ end=+"+ oneline contains=slrnrcSetkeyObj syn match slrnrcSetkeyArt contained '\("\=\)\\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunArt syn match slrnrcSetkeyGroup contained '\("\=\)\\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunGroup syn match slrnrcSetkeyRead contained '\("\=\)\\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunRead syn match slrnrcSetkey "^\s*setkey\>" skipwhite nextgroup=slrnrcSetkeyArt,slrnrcSetkeyGroup,slrnrcSetkeyRead " Unbinding keys syn match slrnrcUnsetkey '^\s*unsetkey\s\+\("\)\=\(article\|group\|readline\)\>\1' skipwhite nextgroup=slrnrcKey contains=slrnrcSetkeyObj\(Str\)\= " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link slrnrcTodo Todo hi def link slrnrcSpaceError Error hi def link slrnrcNumber Number hi def link slrnrcSpecKey SpecialChar hi def link slrnrcKey String hi def link slrnrcSpecChar SpecialChar hi def link slrnrcString String hi def link slrnSlangPreCondit Special hi def link slrnrcComment Comment hi def link slrnrcVarInt Identifier hi def link slrnrcVarStr Identifier hi def link slrnrcCmd slrnrcSet hi def link slrnrcSet Operator hi def link slrnrcColor Keyword hi def link slrnrcColorObj Identifier hi def link slrnrcColorVal String hi def link slrnrcMono Keyword hi def link slrnrcMonoObj Identifier hi def link slrnrcMonoVal String hi def link slrnrcFunArt Macro hi def link slrnrcFunGroup Macro hi def link slrnrcFunRead Macro hi def link slrnrcSetkeyObj Identifier hi def link slrnrcSetkey Keyword hi def link slrnrcUnsetkey slrnrcSetkey let b:current_syntax = "slrnrc" "EOF vim: ts=8 noet tw=120 sw=8 sts=0 neovim-0.2.2/runtime/syntax/slrnsc.vim000066400000000000000000000060321320401574200200410ustar00rootroot00000000000000" Vim syntax file " Language: Slrn score file (based on slrn 0.9.8.0) " Maintainer: Preben 'Peppe' Guldberg " Last Change: 8 Oct 2004 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " characters in newsgroup names setlocal isk=@,48-57,.,-,_,+ syn match slrnscComment "%.*$" syn match slrnscSectionCom ".].*"lc=2 syn match slrnscGroup contained "\(\k\|\*\)\+" syn match slrnscNumber contained "\d\+" syn match slrnscDate contained "\(\d\{1,2}[-/]\)\{2}\d\{4}" syn match slrnscDelim contained ":" syn match slrnscComma contained "," syn match slrnscOper contained "\~" syn match slrnscEsc contained "\\[ecC<>.]" syn match slrnscEsc contained "[?^]" syn match slrnscEsc contained "[^\\]$\s*$"lc=1 syn keyword slrnscInclude contained include syn match slrnscIncludeLine "^\s*Include\s\+\S.*$" syn region slrnscSection matchgroup=slrnscSectionStd start="^\s*\[" end='\]' contains=slrnscGroup,slrnscComma,slrnscSectionCom syn region slrnscSection matchgroup=slrnscSectionNot start="^\s*\[\~" end='\]' contains=slrnscGroup,slrnscCommas,slrnscSectionCom syn keyword slrnscItem contained Age Bytes Date Expires From Has-Body Lines Message-Id Newsgroup References Subject Xref syn match slrnscScoreItem contained "%.*$" skipempty nextgroup=slrnscScoreItem contains=slrnscComment syn match slrnscScoreItem contained "^\s*Expires:\s*\(\d\{1,2}[-/]\)\{2}\d\{4}\s*$" skipempty nextgroup=slrnscScoreItem contains=slrnscItem,slrnscDelim,slrnscDate syn match slrnscScoreItem contained "^\s*\~\=\(Age\|Bytes\|Has-Body\|Lines\):\s*\d\+\s*$" skipempty nextgroup=slrnscScoreItem contains=slrnscOper,slrnscItem,slrnscDelim,slrnscNumber syn match slrnscScoreItemFill contained ".*$" skipempty nextgroup=slrnscScoreItem contains=slrnscEsc syn match slrnscScoreItem contained "^\s*\~\=\(Date\|From\|Message-Id\|Newsgroup\|References\|Subject\|Xref\):" nextgroup=slrnscScoreItemFill contains=slrnscOper,slrnscItem,slrnscDelim syn region slrnscScoreItem contained matchgroup=Special start="^\s*\~\={::\=" end="^\s*}" skipempty nextgroup=slrnscScoreItem contains=slrnscScoreItem syn keyword slrnscScore contained Score syn match slrnscScoreIdent contained "%.*" syn match slrnScoreLine "^\s*Score::\=\s\+=\=[-+]\=\d\+\s*\(%.*\)\=$" skipempty nextgroup=slrnscScoreItem contains=slrnscScore,slrnscDelim,slrnscOper,slrnscNumber,slrnscScoreIdent " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link slrnscComment Comment hi def link slrnscSectionCom slrnscComment hi def link slrnscGroup String hi def link slrnscNumber Number hi def link slrnscDate Special hi def link slrnscDelim Delimiter hi def link slrnscComma SpecialChar hi def link slrnscOper SpecialChar hi def link slrnscEsc String hi def link slrnscSectionStd Type hi def link slrnscSectionNot Delimiter hi def link slrnscItem Statement hi def link slrnscScore Keyword hi def link slrnscScoreIdent Identifier hi def link slrnscInclude Keyword let b:current_syntax = "slrnsc" "EOF vim: ts=8 noet tw=200 sw=8 sts=0 neovim-0.2.2/runtime/syntax/sm.vim000066400000000000000000000054421320401574200171600ustar00rootroot00000000000000" Vim syntax file " Language: sendmail " Maintainer: Charles E. Campbell " Last Change: Oct 25, 2016 " Version: 8 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM if exists("b:current_syntax") finish endif " Comments syn match smComment "^#.*$" contains=@Spell " Definitions, Classes, Files, Options, Precedence, Trusted Users, Mailers syn match smDefine "^[CDF]." syn match smDefine "^O[AaBcdDeFfgHiLmNoQqrSsTtuvxXyYzZ]" syn match smDefine "^O\s"he=e-1 syn match smDefine "^M[a-zA-Z0-9]\+,"he=e-1 syn match smDefine "^T" nextgroup=smTrusted syn match smDefine "^P" nextgroup=smMesg syn match smTrusted "\S\+$" contained syn match smMesg "\S*="he=e-1 contained nextgroup=smPrecedence syn match smPrecedence "-\=[0-9]\+" contained " Header Format H?list-of-mailer-flags?name: format syn match smHeaderSep contained "[?:]" syn match smHeader "^H\(?[a-zA-Z]\+?\)\=[-a-zA-Z_]\+:" contains=smHeaderSep " Variables syn match smVar "\$[a-z\.\|]" " Rulesets syn match smRuleset "^S\d*" " Rewriting Rules syn match smRewrite "^R" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsUser syn match smRewriteLhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsSep syn match smRewriteLhsToken contained "\(\$[-*+]\|\$[-=][A-Za-z]\|\$Y\)\+" skipwhite nextgroup=smRewriteLhsUser,smRewriteLhsSep syn match smRewriteLhsSep contained "\t\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsUser syn match smRewriteRhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsSep syn match smRewriteRhsToken contained "\(\$\d\|\$>\d\|\$#\|\$@\|\$:[-_a-zA-Z]\+\|\$[[\]]\|\$@\|\$:\|\$[A-Za-z]\)\+" skipwhite nextgroup=smRewriteRhsUser,smRewriteRhsSep syn match smRewriteRhsSep contained "\t\+" skipwhite nextgroup=smRewriteComment,smRewriteRhsSep syn match smRewriteRhsSep contained "$" syn match smRewriteComment contained "[^\t$]*$" " Clauses syn match smClauseError "\$\." syn match smElse contained "\$|" syn match smClauseCont contained "^\t" syn region smClause matchgroup=Delimiter start="\$?." matchgroup=Delimiter end="\$\." contains=smElse,smClause,smVar,smClauseCont " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link smClause Special hi def link smClauseError Error hi def link smComment Comment hi def link smDefine Statement hi def link smElse Delimiter hi def link smHeader Statement hi def link smHeaderSep String hi def link smMesg Special hi def link smPrecedence Number hi def link smRewrite Statement hi def link smRewriteComment Comment hi def link smRewriteLhsToken String hi def link smRewriteLhsUser Statement hi def link smRewriteRhsToken String hi def link smRuleset Preproc hi def link smTrusted Special hi def link smVar String let b:current_syntax = "sm" " vim: ts=18 neovim-0.2.2/runtime/syntax/smarty.vim000066400000000000000000000055031320401574200200560ustar00rootroot00000000000000" Vim syntax file " Language: Smarty Templates " Maintainer: Manfred Stienstra manfred.stienstra@dwerg.net " Last Change: Mon Nov 4 11:42:23 CET 2002 " Filenames: *.tpl " URL: http://www.dwerg.net/projects/vim/smarty.vim " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if !exists("main_syntax") " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let main_syntax = 'smarty' endif syn case ignore runtime! syntax/html.vim "syn cluster htmlPreproc add=smartyUnZone syn match smartyBlock contained "[\[\]]" syn keyword smartyTagName capture config_load include include_php syn keyword smartyTagName insert if elseif else ldelim rdelim literal syn keyword smartyTagName php section sectionelse foreach foreachelse syn keyword smartyTagName strip assign counter cycle debug eval fetch syn keyword smartyTagName html_options html_select_date html_select_time syn keyword smartyTagName math popup_init popup html_checkboxes html_image syn keyword smartyTagName html_radios html_table mailto textformat syn keyword smartyModifier cat capitalize count_characters count_paragraphs syn keyword smartyModifier count_sentences count_words date_format default syn keyword smartyModifier escape indent lower nl2br regex_replace replace syn keyword smartyModifier spacify string_format strip strip_tags truncate syn keyword smartyModifier upper wordwrap syn keyword smartyInFunc neq eq syn keyword smartyProperty contained "file=" syn keyword smartyProperty contained "loop=" syn keyword smartyProperty contained "name=" syn keyword smartyProperty contained "include=" syn keyword smartyProperty contained "skip=" syn keyword smartyProperty contained "section=" syn keyword smartyConstant "\$smarty" syn keyword smartyDot . syn region smartyZone matchgroup=Delimiter start="{" end="}" contains=smartyProperty, smartyString, smartyBlock, smartyTagName, smartyConstant, smartyInFunc, smartyModifier syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,smartyZone syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,smartyZone syn region htmlLink start="\_[^>]*\" end="
"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc,smartyZone hi def link smartyTagName Identifier hi def link smartyProperty Constant " if you want the text inside the braces to be colored, then " remove the comment in from of the next statement "hi def link smartyZone Include hi def link smartyInFunc Function hi def link smartyBlock Constant hi def link smartyDot SpecialChar hi def link smartyModifier Function let b:current_syntax = "smarty" if main_syntax == 'smarty' unlet main_syntax endif " vim: ts=8 neovim-0.2.2/runtime/syntax/smcl.vim000066400000000000000000000274131320401574200175010ustar00rootroot00000000000000" smcl.vim -- Vim syntax file for smcl files. " Language: SMCL -- Stata Markup and Control Language " Maintainer: Jeff Pitblado " Last Change: 26apr2006 " Version: 1.1.2 " Log: " 20mar2003 updated the match definition for cmdab " 14apr2006 'syntax clear' only under version control " check for 'b:current_syntax', removed 'did_smcl_syntax_inits' " 26apr2006 changed 'stata_smcl' to 'smcl' " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syntax case match syn keyword smclCCLword current_date contained syn keyword smclCCLword current_time contained syn keyword smclCCLword rmsg_time contained syn keyword smclCCLword stata_version contained syn keyword smclCCLword version contained syn keyword smclCCLword born_date contained syn keyword smclCCLword flavor contained syn keyword smclCCLword SE contained syn keyword smclCCLword mode contained syn keyword smclCCLword console contained syn keyword smclCCLword os contained syn keyword smclCCLword osdtl contained syn keyword smclCCLword machine_type contained syn keyword smclCCLword byteorder contained syn keyword smclCCLword sysdir_stata contained syn keyword smclCCLword sysdir_updates contained syn keyword smclCCLword sysdir_base contained syn keyword smclCCLword sysdir_site contained syn keyword smclCCLword sysdir_plus contained syn keyword smclCCLword sysdir_personal contained syn keyword smclCCLword sysdir_oldplace contained syn keyword smclCCLword adopath contained syn keyword smclCCLword pwd contained syn keyword smclCCLword dirsep contained syn keyword smclCCLword max_N_theory contained syn keyword smclCCLword max_N_current contained syn keyword smclCCLword max_k_theory contained syn keyword smclCCLword max_k_current contained syn keyword smclCCLword max_width_theory contained syn keyword smclCCLword max_width_current contained syn keyword smclCCLword max_matsize contained syn keyword smclCCLword min_matsize contained syn keyword smclCCLword max_macrolen contained syn keyword smclCCLword macrolen contained syn keyword smclCCLword max_cmdlen contained syn keyword smclCCLword cmdlen contained syn keyword smclCCLword namelen contained syn keyword smclCCLword mindouble contained syn keyword smclCCLword maxdouble contained syn keyword smclCCLword epsdouble contained syn keyword smclCCLword minfloat contained syn keyword smclCCLword maxfloat contained syn keyword smclCCLword epsfloat contained syn keyword smclCCLword minlong contained syn keyword smclCCLword maxlong contained syn keyword smclCCLword minint contained syn keyword smclCCLword maxint contained syn keyword smclCCLword minbyte contained syn keyword smclCCLword maxbyte contained syn keyword smclCCLword maxstrvarlen contained syn keyword smclCCLword memory contained syn keyword smclCCLword maxvar contained syn keyword smclCCLword matsize contained syn keyword smclCCLword N contained syn keyword smclCCLword k contained syn keyword smclCCLword width contained syn keyword smclCCLword changed contained syn keyword smclCCLword filename contained syn keyword smclCCLword filedate contained syn keyword smclCCLword more contained syn keyword smclCCLword rmsg contained syn keyword smclCCLword dp contained syn keyword smclCCLword linesize contained syn keyword smclCCLword pagesize contained syn keyword smclCCLword logtype contained syn keyword smclCCLword linegap contained syn keyword smclCCLword scrollbufsize contained syn keyword smclCCLword varlabelpos contained syn keyword smclCCLword reventries contained syn keyword smclCCLword graphics contained syn keyword smclCCLword scheme contained syn keyword smclCCLword printcolor contained syn keyword smclCCLword adosize contained syn keyword smclCCLword maxdb contained syn keyword smclCCLword virtual contained syn keyword smclCCLword checksum contained syn keyword smclCCLword timeout1 contained syn keyword smclCCLword timeout2 contained syn keyword smclCCLword httpproxy contained syn keyword smclCCLword h_current contained syn keyword smclCCLword max_matsize contained syn keyword smclCCLword min_matsize contained syn keyword smclCCLword max_macrolen contained syn keyword smclCCLword macrolen contained syn keyword smclCCLword max_cmdlen contained syn keyword smclCCLword cmdlen contained syn keyword smclCCLword namelen contained syn keyword smclCCLword mindouble contained syn keyword smclCCLword maxdouble contained syn keyword smclCCLword epsdouble contained syn keyword smclCCLword minfloat contained syn keyword smclCCLword maxfloat contained syn keyword smclCCLword epsfloat contained syn keyword smclCCLword minlong contained syn keyword smclCCLword maxlong contained syn keyword smclCCLword minint contained syn keyword smclCCLword maxint contained syn keyword smclCCLword minbyte contained syn keyword smclCCLword maxbyte contained syn keyword smclCCLword maxstrvarlen contained syn keyword smclCCLword memory contained syn keyword smclCCLword maxvar contained syn keyword smclCCLword matsize contained syn keyword smclCCLword N contained syn keyword smclCCLword k contained syn keyword smclCCLword width contained syn keyword smclCCLword changed contained syn keyword smclCCLword filename contained syn keyword smclCCLword filedate contained syn keyword smclCCLword more contained syn keyword smclCCLword rmsg contained syn keyword smclCCLword dp contained syn keyword smclCCLword linesize contained syn keyword smclCCLword pagesize contained syn keyword smclCCLword logtype contained syn keyword smclCCLword linegap contained syn keyword smclCCLword scrollbufsize contained syn keyword smclCCLword varlabelpos contained syn keyword smclCCLword reventries contained syn keyword smclCCLword graphics contained syn keyword smclCCLword scheme contained syn keyword smclCCLword printcolor contained syn keyword smclCCLword adosize contained syn keyword smclCCLword maxdb contained syn keyword smclCCLword virtual contained syn keyword smclCCLword checksum contained syn keyword smclCCLword timeout1 contained syn keyword smclCCLword timeout2 contained syn keyword smclCCLword httpproxy contained syn keyword smclCCLword httpproxyhost contained syn keyword smclCCLword httpproxyport contained syn keyword smclCCLword httpproxyauth contained syn keyword smclCCLword httpproxyuser contained syn keyword smclCCLword httpproxypw contained syn keyword smclCCLword trace contained syn keyword smclCCLword tracedepth contained syn keyword smclCCLword tracesep contained syn keyword smclCCLword traceindent contained syn keyword smclCCLword traceexapnd contained syn keyword smclCCLword tracenumber contained syn keyword smclCCLword type contained syn keyword smclCCLword level contained syn keyword smclCCLword seed contained syn keyword smclCCLword searchdefault contained syn keyword smclCCLword pi contained syn keyword smclCCLword rc contained " Directive for the contant and current-value class syn region smclCCL start=/{ccl / end=/}/ oneline contains=smclCCLword " The order of the following syntax definitions is roughly that of the on-line " documentation for smcl in Stata, from within Stata see help smcl. " Format directives for line and paragraph modes syn match smclFormat /{smcl}/ syn match smclFormat /{sf\(\|:[^}]\+\)}/ syn match smclFormat /{it\(\|:[^}]\+\)}/ syn match smclFormat /{bf\(\|:[^}]\+\)}/ syn match smclFormat /{inp\(\|:[^}]\+\)}/ syn match smclFormat /{input\(\|:[^}]\+\)}/ syn match smclFormat /{err\(\|:[^}]\+\)}/ syn match smclFormat /{error\(\|:[^}]\+\)}/ syn match smclFormat /{res\(\|:[^}]\+\)}/ syn match smclFormat /{result\(\|:[^}]\+\)}/ syn match smclFormat /{txt\(\|:[^}]\+\)}/ syn match smclFormat /{text\(\|:[^}]\+\)}/ syn match smclFormat /{com\(\|:[^}]\+\)}/ syn match smclFormat /{cmd\(\|:[^}]\+\)}/ syn match smclFormat /{cmdab:[^:}]\+:[^:}()]*\(\|:\|:(\|:()\)}/ syn match smclFormat /{hi\(\|:[^}]\+\)}/ syn match smclFormat /{hilite\(\|:[^}]\+\)}/ syn match smclFormat /{ul \(on\|off\)}/ syn match smclFormat /{ul:[^}]\+}/ syn match smclFormat /{hline\(\| \d\+\| -\d\+\|:[^}]\+\)}/ syn match smclFormat /{dup \d\+:[^}]\+}/ syn match smclFormat /{c [^}]\+}/ syn match smclFormat /{char [^}]\+}/ syn match smclFormat /{reset}/ " Formatting directives for line mode syn match smclFormat /{title:[^}]\+}/ syn match smclFormat /{center:[^}]\+}/ syn match smclFormat /{centre:[^}]\+}/ syn match smclFormat /{center \d\+:[^}]\+}/ syn match smclFormat /{centre \d\+:[^}]\+}/ syn match smclFormat /{right:[^}]\+}/ syn match smclFormat /{lalign \d\+:[^}]\+}/ syn match smclFormat /{ralign \d\+:[^}]\+}/ syn match smclFormat /{\.\.\.}/ syn match smclFormat /{col \d\+}/ syn match smclFormat /{space \d\+}/ syn match smclFormat /{tab}/ " Formatting directives for paragraph mode syn match smclFormat /{bind:[^}]\+}/ syn match smclFormat /{break}/ syn match smclFormat /{p}/ syn match smclFormat /{p \d\+}/ syn match smclFormat /{p \d\+ \d\+}/ syn match smclFormat /{p \d\+ \d\+ \d\+}/ syn match smclFormat /{pstd}/ syn match smclFormat /{psee}/ syn match smclFormat /{phang\(\|2\|3\)}/ syn match smclFormat /{pmore\(\|2\|3\)}/ syn match smclFormat /{pin\(\|2\|3\)}/ syn match smclFormat /{p_end}/ syn match smclFormat /{opt \w\+\(\|:\w\+\)\(\|([^)}]*)\)}/ syn match smclFormat /{opth \w*\(\|:\w\+\)(\w*)}/ syn match smclFormat /{opth "\w\+\((\w\+:[^)}]\+)\)"}/ syn match smclFormat /{opth \w\+:\w\+(\w\+:[^)}]\+)}/ syn match smclFormat /{dlgtab\s*\(\|\d\+\|\d\+\s\+\d\+\):[^}]\+}/ syn match smclFormat /{p2colset\s\+\d\+\s\+\d\+\s\+\d\+\s\+\d\+}/ syn match smclFormat /{p2col\s\+:[^{}]*}.*{p_end}/ syn match smclFormat /{p2col\s\+:{[^{}]*}}.*{p_end}/ syn match smclFormat /{p2coldent\s*:[^{}]*}.*{p_end}/ syn match smclFormat /{p2coldent\s*:{[^{}]*}}.*{p_end}/ syn match smclFormat /{p2line\s*\(\|\d\+\s\+\d\+\)}/ syn match smclFormat /{p2colreset}/ syn match smclFormat /{synoptset\s\+\d\+\s\+\w\+}/ syn match smclFormat /{synopt\s*:[^{}]*}.*{p_end}/ syn match smclFormat /{synopt\s*:{[^{}]*}}.*{p_end}/ syn match smclFormat /{syntab\s*:[^{}]*}/ syn match smclFormat /{synopthdr}/ syn match smclFormat /{synoptline}/ " Link directive for line and paragraph modes syn match smclLink /{help [^}]\+}/ syn match smclLink /{helpb [^}]\+}/ syn match smclLink /{help_d:[^}]\+}/ syn match smclLink /{search [^}]\+}/ syn match smclLink /{search_d:[^}]\+}/ syn match smclLink /{browse [^}]\+}/ syn match smclLink /{view [^}]\+}/ syn match smclLink /{view_d:[^}]\+}/ syn match smclLink /{news:[^}]\+}/ syn match smclLink /{net [^}]\+}/ syn match smclLink /{net_d:[^}]\+}/ syn match smclLink /{netfrom_d:[^}]\+}/ syn match smclLink /{ado [^}]\+}/ syn match smclLink /{ado_d:[^}]\+}/ syn match smclLink /{update [^}]\+}/ syn match smclLink /{update_d:[^}]\+}/ syn match smclLink /{dialog [^}]\+}/ syn match smclLink /{back:[^}]\+}/ syn match smclLink /{clearmore:[^}]\+}/ syn match smclLink /{stata [^}]\+}/ syn match smclLink /{newvar\(\|:[^}]\+\)}/ syn match smclLink /{var\(\|:[^}]\+\)}/ syn match smclLink /{varname\(\|:[^}]\+\)}/ syn match smclLink /{vars\(\|:[^}]\+\)}/ syn match smclLink /{varlist\(\|:[^}]\+\)}/ syn match smclLink /{depvar\(\|:[^}]\+\)}/ syn match smclLink /{depvars\(\|:[^}]\+\)}/ syn match smclLink /{depvarlist\(\|:[^}]\+\)}/ syn match smclLink /{indepvars\(\|:[^}]\+\)}/ syn match smclLink /{dtype}/ syn match smclLink /{ifin}/ syn match smclLink /{weight}/ " Comment syn region smclComment start=/{\*/ end=/}/ oneline " Strings syn region smclString matchgroup=Nothing start=/"/ end=/"/ oneline syn region smclEString matchgroup=Nothing start=/`"/ end=/"'/ oneline contains=smclEString " assign highlight groups hi def link smclEString smclString hi def link smclCCLword Statement hi def link smclCCL Type hi def link smclFormat Statement hi def link smclLink Underlined hi def link smclComment Comment hi def link smclString String let b:current_syntax = "smcl" " vim: ts=8 neovim-0.2.2/runtime/syntax/smil.vim000066400000000000000000000127601320401574200175060ustar00rootroot00000000000000" Vim syntax file " Language: SMIL (Synchronized Multimedia Integration Language) " Maintainer: Herve Foucher " URL: http://www.helio.org/vim/syntax/smil.vim " Last Change: 2012 Feb 03 by Thilo Six " To learn more about SMIL, please refer to http://www.w3.org/AudioVideo/ " and to http://www.helio.org/products/smil/tutorial/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " SMIL is case sensitive syn case match " illegal characters syn match smilError "[<>&]" syn match smilError "[()&]" if !exists("main_syntax") let main_syntax = 'smil' endif " tags syn match smilSpecial contained "\\\d\d\d\|\\." syn match smilSpecial contained "(" syn match smilSpecial contained "id(" syn match smilSpecial contained ")" syn keyword smilSpecial contained remove freeze true false on off overdub caption new pause replace syn keyword smilSpecial contained first last syn keyword smilSpecial contained fill meet slice scroll hidden syn region smilString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=smilSpecial syn region smilString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=smilSpecial syn match smilValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 syn region smilEndTag start=++ contains=smilTagN,smilTagError syn region smilTag start=+<[^/]+ end=+>+ contains=smilTagN,smilString,smilArg,smilValue,smilTagError,smilEvent,smilCssDefinition syn match smilTagN contained +<\s*[-a-zA-Z0-9]\++ms=s+1 contains=smilTagName,smilSpecialTagName syn match smilTagN contained +]<"ms=s+1 " tag names syn keyword smilTagName contained smil head body anchor a switch region layout meta syn match smilTagName contained "root-layout" syn keyword smilTagName contained par seq syn keyword smilTagName contained animation video img audio ref text textstream syn match smilTagName contained "\<\(head\|body\)\>" " legal arg names syn keyword smilArg contained dur begin end href target id coords show title abstract author copyright alt syn keyword smilArg contained left top width height fit src name content fill longdesc repeat type syn match smilArg contained "z-index" syn match smilArg contained " end-sync" syn match smilArg contained " region" syn match smilArg contained "background-color" syn match smilArg contained "system-bitrate" syn match smilArg contained "system-captions" syn match smilArg contained "system-overdub-or-caption" syn match smilArg contained "system-language" syn match smilArg contained "system-required" syn match smilArg contained "system-screen-depth" syn match smilArg contained "system-screen-size" syn match smilArg contained "clip-begin" syn match smilArg contained "clip-end" syn match smilArg contained "skip-content" " SMIL Boston ext. " This are new SMIL functionnalities seen on www.w3.org on August 3rd 1999 " Animation syn keyword smilTagName contained animate set move syn keyword smilArg contained calcMode from to by additive values origin path syn keyword smilArg contained accumulate hold attribute syn match smilArg contained "xml:link" syn keyword smilSpecial contained discrete linear spline parent layout syn keyword smilSpecial contained top left simple " Linking syn keyword smilTagName contained area syn keyword smilArg contained actuate behavior inline sourceVolume syn keyword smilArg contained destinationVolume destinationPlaystate tabindex syn keyword smilArg contained class style lang dir onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup shape nohref accesskey onfocus onblur syn keyword smilSpecial contained play pause stop rect circ poly child par seq " Media Object syn keyword smilTagName contained rtpmap syn keyword smilArg contained port transport encoding payload clipBegin clipEnd syn match smilArg contained "fmt-list" " Timing and Synchronization syn keyword smilTagName contained excl syn keyword smilArg contained beginEvent endEvent eventRestart endSync repeatCount repeatDur syn keyword smilArg contained syncBehavior syncTolerance syn keyword smilSpecial contained canSlip locked " special characters syn match smilSpecialChar "&[^;]*;" if exists("smil_wrong_comments") syn region smilComment start=++ else syn region smilComment start=++ contains=smilCommentPart,smilCommentError syn match smilCommentError contained "[^>+ " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link smilTag Function hi def link smilEndTag Identifier hi def link smilArg Type hi def link smilTagName smilStatement hi def link smilSpecialTagName Exception hi def link smilValue Value hi def link smilSpecialChar Special hi def link smilSpecial Special hi def link smilSpecialChar Special hi def link smilString String hi def link smilStatement Statement hi def link smilComment Comment hi def link smilCommentPart Comment hi def link smilPreProc PreProc hi def link smilValue String hi def link smilCommentError smilError hi def link smilTagError smilError hi def link smilError Error let b:current_syntax = "smil" if main_syntax == 'smil' unlet main_syntax endif let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/smith.vim000066400000000000000000000014311320401574200176570ustar00rootroot00000000000000" Vim syntax file " Language: SMITH " Maintainer: Rafal M. Sulejman " Last Change: 21.07.2000 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore syn match smithComment ";.*$" syn match smithNumber "\<[+-]*[0-9]\d*\>" syn match smithRegister "R[\[]*[0-9]*[\]]*" syn match smithKeyword "COR\|MOV\|MUL\|NOT\|STOP\|SUB\|NOP\|BLA\|REP" syn region smithString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn case match " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link smithRegister Identifier hi def link smithKeyword Keyword hi def link smithComment Comment hi def link smithString String hi def link smithNumber Number let b:current_syntax = "smith" " vim: ts=2 neovim-0.2.2/runtime/syntax/sml.vim000066400000000000000000000221601320401574200173300ustar00rootroot00000000000000" Vim syntax file " Language: SML " Filenames: *.sml *.sig " Maintainers: Markus Mottl " Fabrizio Zeno Cornelli " URL: http://www.ocaml.info/vim/syntax/sml.vim " Last Change: 2006 Oct 23 - Fixed character highlighting bug (MM) " 2002 Jun 02 - Fixed small typo (MM) " 2001 Nov 20 - Fixed small highlighting bug with modules (MM) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " SML is case sensitive. syn case match " lowercase identifier - the standard way to match syn match smlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/ syn match smlKeyChar "|" " Errors syn match smlBraceErr "}" syn match smlBrackErr "\]" syn match smlParenErr ")" syn match smlCommentErr "\*)" syn match smlThenErr "\" " Error-highlighting of "end" without synchronization: " as keyword or as error (default) if exists("sml_noend_error") syn match smlKeyword "\" else syn match smlEndErr "\" endif " Some convenient clusters syn cluster smlAllErrs contains=smlBraceErr,smlBrackErr,smlParenErr,smlCommentErr,smlEndErr,smlThenErr syn cluster smlAENoParen contains=smlBraceErr,smlBrackErr,smlCommentErr,smlEndErr,smlThenErr syn cluster smlContained contains=smlTodo,smlPreDef,smlModParam,smlModParam1,smlPreMPRestr,smlMPRestr,smlMPRestr1,smlMPRestr2,smlMPRestr3,smlModRHS,smlFuncWith,smlFuncStruct,smlModTypeRestr,smlModTRWith,smlWith,smlWithRest,smlModType,smlFullMod " Enclosing delimiters syn region smlEncl transparent matchgroup=smlKeyword start="(" matchgroup=smlKeyword end=")" contains=ALLBUT,@smlContained,smlParenErr syn region smlEncl transparent matchgroup=smlKeyword start="{" matchgroup=smlKeyword end="}" contains=ALLBUT,@smlContained,smlBraceErr syn region smlEncl transparent matchgroup=smlKeyword start="\[" matchgroup=smlKeyword end="\]" contains=ALLBUT,@smlContained,smlBrackErr syn region smlEncl transparent matchgroup=smlKeyword start="#\[" matchgroup=smlKeyword end="\]" contains=ALLBUT,@smlContained,smlBrackErr " Comments syn region smlComment start="(\*" end="\*)" contains=smlComment,smlTodo syn keyword smlTodo contained TODO FIXME XXX " let syn region smlEnd matchgroup=smlKeyword start="\" matchgroup=smlKeyword end="\" contains=ALLBUT,@smlContained,smlEndErr " local syn region smlEnd matchgroup=smlKeyword start="\" matchgroup=smlKeyword end="\" contains=ALLBUT,@smlContained,smlEndErr " abstype syn region smlNone matchgroup=smlKeyword start="\" matchgroup=smlKeyword end="\" contains=ALLBUT,@smlContained,smlEndErr " begin syn region smlEnd matchgroup=smlKeyword start="\" matchgroup=smlKeyword end="\" contains=ALLBUT,@smlContained,smlEndErr " if syn region smlNone matchgroup=smlKeyword start="\" matchgroup=smlKeyword end="\" contains=ALLBUT,@smlContained,smlThenErr "" Modules " "struct" syn region smlStruct matchgroup=smlModule start="\" matchgroup=smlModule end="\" contains=ALLBUT,@smlContained,smlEndErr " "sig" syn region smlSig matchgroup=smlModule start="\" matchgroup=smlModule end="\" contains=ALLBUT,@smlContained,smlEndErr,smlModule syn region smlModSpec matchgroup=smlKeyword start="\" matchgroup=smlModule end="\<\u\(\w\|'\)*\>" contained contains=@smlAllErrs,smlComment skipwhite skipempty nextgroup=smlModTRWith,smlMPRestr " "open" syn region smlNone matchgroup=smlKeyword start="\" matchgroup=smlModule end="\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*\>" contains=@smlAllErrs,smlComment " "structure" - somewhat complicated stuff ;-) syn region smlModule matchgroup=smlKeyword start="\<\(structure\|functor\)\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\>" contains=@smlAllErrs,smlComment skipwhite skipempty nextgroup=smlPreDef syn region smlPreDef start="."me=e-1 matchgroup=smlKeyword end="\l\|="me=e-1 contained contains=@smlAllErrs,smlComment,smlModParam,smlModTypeRestr,smlModTRWith nextgroup=smlModPreRHS syn region smlModParam start="([^*]" end=")" contained contains=@smlAENoParen,smlModParam1 syn match smlModParam1 "\<\u\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=smlPreMPRestr syn region smlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@smlAllErrs,smlComment,smlMPRestr,smlModTypeRestr syn region smlMPRestr start=":" end="."me=e-1 contained contains=@smlComment skipwhite skipempty nextgroup=smlMPRestr1,smlMPRestr2,smlMPRestr3 syn region smlMPRestr1 matchgroup=smlModule start="\ssig\s\=" matchgroup=smlModule end="\" contained contains=ALLBUT,@smlContained,smlEndErr,smlModule syn region smlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=smlKeyword end="->" contained contains=@smlAllErrs,smlComment,smlModParam skipwhite skipempty nextgroup=smlFuncWith syn match smlMPRestr3 "\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*" contained syn match smlModPreRHS "=" contained skipwhite skipempty nextgroup=smlModParam,smlFullMod syn region smlModRHS start="." end=".\w\|([^*]"me=e-2 contained contains=smlComment skipwhite skipempty nextgroup=smlModParam,smlFullMod syn match smlFullMod "\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=smlFuncWith syn region smlFuncWith start="([^*]"me=e-1 end=")" contained contains=smlComment,smlWith,smlFuncStruct syn region smlFuncStruct matchgroup=smlModule start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=smlModule end="\" contains=ALLBUT,@smlContained,smlEndErr syn match smlModTypeRestr "\<\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*\>" contained syn region smlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@smlAENoParen,smlWith syn match smlWith "\<\(\u\(\w\|'\)*\.\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=smlWithRest syn region smlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@smlContained " "signature" syn region smlKeyword start="\" matchgroup=smlModule end="\<\w\(\w\|'\)*\>" contains=smlComment skipwhite skipempty nextgroup=smlMTDef syn match smlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s syn keyword smlKeyword and andalso case syn keyword smlKeyword datatype else eqtype syn keyword smlKeyword exception fn fun handle syn keyword smlKeyword in infix infixl infixr syn keyword smlKeyword match nonfix of orelse syn keyword smlKeyword raise handle type syn keyword smlKeyword val where while with withtype syn keyword smlType bool char exn int list option syn keyword smlType real string unit syn keyword smlOperator div mod not or quot rem syn keyword smlBoolean true false syn match smlConstructor "(\s*)" syn match smlConstructor "\[\s*\]" syn match smlConstructor "#\[\s*\]" syn match smlConstructor "\u\(\w\|'\)*\>" " Module prefix syn match smlModPath "\u\(\w\|'\)*\."he=e-1 syn match smlCharacter +#"\\""\|#"."\|#"\\\d\d\d"+ syn match smlCharErr +#"\\\d\d"\|#"\\\d"+ syn region smlString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match smlFunDef "=>" syn match smlRefAssign ":=" syn match smlTopStop ";;" syn match smlOperator "\^" syn match smlOperator "::" syn match smlAnyVar "\<_\>" syn match smlKeyChar "!" syn match smlKeyChar ";" syn match smlKeyChar "\*" syn match smlKeyChar "=" syn match smlNumber "\<-\=\d\+\>" syn match smlNumber "\<-\=0[x|X]\x\+\>" syn match smlReal "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>" " Synchronization syn sync minlines=20 syn sync maxlines=500 syn sync match smlEndSync grouphere smlEnd "\" syn sync match smlEndSync groupthere smlEnd "\" syn sync match smlStructSync grouphere smlStruct "\" syn sync match smlStructSync groupthere smlStruct "\" syn sync match smlSigSync grouphere smlSig "\" syn sync match smlSigSync groupthere smlSig "\" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link smlBraceErr Error hi def link smlBrackErr Error hi def link smlParenErr Error hi def link smlCommentErr Error hi def link smlEndErr Error hi def link smlThenErr Error hi def link smlCharErr Error hi def link smlComment Comment hi def link smlModPath Include hi def link smlModule Include hi def link smlModParam1 Include hi def link smlModType Include hi def link smlMPRestr3 Include hi def link smlFullMod Include hi def link smlModTypeRestr Include hi def link smlWith Include hi def link smlMTDef Include hi def link smlConstructor Constant hi def link smlModPreRHS Keyword hi def link smlMPRestr2 Keyword hi def link smlKeyword Keyword hi def link smlFunDef Keyword hi def link smlRefAssign Keyword hi def link smlKeyChar Keyword hi def link smlAnyVar Keyword hi def link smlTopStop Keyword hi def link smlOperator Keyword hi def link smlBoolean Boolean hi def link smlCharacter Character hi def link smlNumber Number hi def link smlReal Float hi def link smlString String hi def link smlType Type hi def link smlTodo Todo hi def link smlEncl Keyword let b:current_syntax = "sml" " vim: ts=8 neovim-0.2.2/runtime/syntax/snnsnet.vim000066400000000000000000000046621320401574200202340ustar00rootroot00000000000000" Vim syntax file " Language: SNNS network file " Maintainer: Davide Alberani " Last Change: 28 Apr 2001 " Version: 0.2 " URL: http://digilander.iol.it/alberanid/vim/syntax/snnsnet.vim " " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ " is a simulator for neural networks. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match snnsnetTitle "no\." syn match snnsnetTitle "type name" syn match snnsnetTitle "unit name" syn match snnsnetTitle "act\( func\)\=" syn match snnsnetTitle "out func" syn match snnsnetTitle "site\( name\)\=" syn match snnsnetTitle "site function" syn match snnsnetTitle "source:weight" syn match snnsnetTitle "unitNo\." syn match snnsnetTitle "delta x" syn match snnsnetTitle "delta y" syn keyword snnsnetTitle typeName unitName bias st position subnet layer sites name target z LLN LUN Toff Soff Ctype syn match snnsnetType "SNNS network definition file [Vv]\d.\d.*" contains=snnsnetNumbers syn match snnsnetType "generated at.*" contains=snnsnetNumbers syn match snnsnetType "network name\s*:" syn match snnsnetType "source files\s*:" syn match snnsnetType "no\. of units\s*:.*" contains=snnsnetNumbers syn match snnsnetType "no\. of connections\s*:.*" contains=snnsnetNumbers syn match snnsnetType "no\. of unit types\s*:.*" contains=snnsnetNumbers syn match snnsnetType "no\. of site types\s*:.*" contains=snnsnetNumbers syn match snnsnetType "learning function\s*:" syn match snnsnetType "pruning function\s*:" syn match snnsnetType "subordinate learning function\s*:" syn match snnsnetType "update function\s*:" syn match snnsnetSection "unit definition section" syn match snnsnetSection "unit default section" syn match snnsnetSection "site definition section" syn match snnsnetSection "type definition section" syn match snnsnetSection "connection definition section" syn match snnsnetSection "layer definition section" syn match snnsnetSection "subnet definition section" syn match snnsnetSection "3D translation section" syn match snnsnetSection "time delay section" syn match snnsnetNumbers "\d" contained syn match snnsnetComment "#.*$" contains=snnsnetTodo syn keyword snnsnetTodo TODO XXX FIXME contained hi def link snnsnetType Type hi def link snnsnetComment Comment hi def link snnsnetNumbers Number hi def link snnsnetSection Statement hi def link snnsnetTitle Label hi def link snnsnetTodo Todo let b:current_syntax = "snnsnet" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/snnspat.vim000066400000000000000000000042641320401574200202300ustar00rootroot00000000000000" Vim syntax file " Language: SNNS pattern file " Maintainer: Davide Alberani " Last Change: 2012 Feb 03 by Thilo Six " Version: 0.2 " URL: http://digilander.iol.it/alberanid/vim/syntax/snnspat.vim " " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ " is a simulator for neural networks. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " anything that isn't part of the header, a comment or a number " is wrong syn match snnspatError ".*" " hoping that matches any kind of notation... syn match snnspatAccepted "\([-+]\=\(\d\+\.\|\.\)\=\d\+\([Ee][-+]\=\d\+\)\=\)" syn match snnspatAccepted "\s" syn match snnspatBrac "\[\s*\d\+\(\s\|\d\)*\]" contains=snnspatNumbers " the accepted fields in the header syn match snnspatNoHeader "No\. of patterns\s*:\s*" contained syn match snnspatNoHeader "No\. of input units\s*:\s*" contained syn match snnspatNoHeader "No\. of output units\s*:\s*" contained syn match snnspatNoHeader "No\. of variable input dimensions\s*:\s*" contained syn match snnspatNoHeader "No\. of variable output dimensions\s*:\s*" contained syn match snnspatNoHeader "Maximum input dimensions\s*:\s*" contained syn match snnspatNoHeader "Maximum output dimensions\s*:\s*" contained syn match snnspatGen "generated at.*" contained contains=snnspatNumbers syn match snnspatGen "SNNS pattern definition file [Vv]\d\.\d" contained contains=snnspatNumbers " the header, what is not an accepted field, is an error syn region snnspatHeader start="^SNNS" end="^\s*[-+\.]\=[0-9#]"me=e-2 contains=snnspatNoHeader,snnspatNumbers,snnspatGen,snnspatBrac " numbers inside the header syn match snnspatNumbers "\d" contained syn match snnspatComment "#.*$" contains=snnspatTodo syn keyword snnspatTodo TODO XXX FIXME contained hi def link snnspatGen Statement hi def link snnspatHeader Error hi def link snnspatNoHeader Define hi def link snnspatNumbers Number hi def link snnspatComment Comment hi def link snnspatError Error hi def link snnspatTodo Todo hi def link snnspatAccepted NONE hi def link snnspatBrac NONE let b:current_syntax = "snnspat" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/snnsres.vim000066400000000000000000000036151320401574200202340ustar00rootroot00000000000000" Vim syntax file " Language: SNNS result file " Maintainer: Davide Alberani " Last Change: 28 Apr 2001 " Version: 0.2 " URL: http://digilander.iol.it/alberanid/vim/syntax/snnsres.vim " " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ " is a simulator for neural networks. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " the accepted fields in the header syn match snnsresNoHeader "No\. of patterns\s*:\s*" contained syn match snnsresNoHeader "No\. of input units\s*:\s*" contained syn match snnsresNoHeader "No\. of output units\s*:\s*" contained syn match snnsresNoHeader "No\. of variable input dimensions\s*:\s*" contained syn match snnsresNoHeader "No\. of variable output dimensions\s*:\s*" contained syn match snnsresNoHeader "Maximum input dimensions\s*:\s*" contained syn match snnsresNoHeader "Maximum output dimensions\s*:\s*" contained syn match snnsresNoHeader "startpattern\s*:\s*" contained syn match snnsresNoHeader "endpattern\s*:\s*" contained syn match snnsresNoHeader "input patterns included" contained syn match snnsresNoHeader "teaching output included" contained syn match snnsresGen "generated at.*" contained contains=snnsresNumbers syn match snnsresGen "SNNS result file [Vv]\d\.\d" contained contains=snnsresNumbers " the header, what is not an accepted field, is an error syn region snnsresHeader start="^SNNS" end="^\s*[-+\.]\=[0-9#]"me=e-2 contains=snnsresNoHeader,snnsresNumbers,snnsresGen " numbers inside the header syn match snnsresNumbers "\d" contained syn match snnsresComment "#.*$" contains=snnsresTodo syn keyword snnsresTodo TODO XXX FIXME contained hi def link snnsresGen Statement hi def link snnsresHeader Statement hi def link snnsresNoHeader Define hi def link snnsresNumbers Number hi def link snnsresComment Comment hi def link snnsresTodo Todo let b:current_syntax = "snnsres" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/snobol4.vim000066400000000000000000000121761320401574200201230ustar00rootroot00000000000000" Vim syntax file " Language: SNOBOL4 " Maintainer: Rafal Sulejman " Site: http://rms.republika.pl/vim/syntax/snobol4.vim " Last change: 2006 may 10 " Changes: " - strict snobol4 mode (set snobol4_strict_mode to activate) " - incorrect HL of dots in strings corrected " - incorrect HL of dot-variables in parens corrected " - one character labels weren't displayed correctly. " - nonexistent Snobol4 keywords displayed as errors. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syntax case ignore " Snobol4 keywords syn keyword snobol4Keyword any apply arb arbno arg array syn keyword snobol4Keyword break syn keyword snobol4Keyword char clear code collect convert copy syn keyword snobol4Keyword data datatype date define detach differ dump dupl syn keyword snobol4Keyword endfile eq eval syn keyword snobol4Keyword field syn keyword snobol4Keyword ge gt ident syn keyword snobol4Keyword input integer item syn keyword snobol4Keyword le len lgt local lpad lt syn keyword snobol4Keyword ne notany syn keyword snobol4Keyword opsyn output syn keyword snobol4Keyword pos prototype syn keyword snobol4Keyword remdr replace rpad rpos rtab rewind syn keyword snobol4Keyword size span stoptr syn keyword snobol4Keyword tab table time trace trim terminal syn keyword snobol4Keyword unload syn keyword snobol4Keyword value " CSNOBOL keywords syn keyword snobol4ExtKeyword breakx syn keyword snobol4ExtKeyword char chop syn keyword snobol4ExtKeyword date delete syn keyword snobol4ExtKeyword exp syn keyword snobol4ExtKeyword freeze function syn keyword snobol4ExtKeyword host syn keyword snobol4ExtKeyword io_findunit syn keyword snobol4ExtKeyword label lpad leq lge lle llt lne log syn keyword snobol4ExtKeyword ord syn keyword snobol4ExtKeyword reverse rpad rsort rename syn keyword snobol4ExtKeyword serv_listen sset set sort sqrt substr syn keyword snobol4ExtKeyword thaw syn keyword snobol4ExtKeyword vdiffer syn region snobol4String matchgroup=Quote start=+"+ end=+"+ syn region snobol4String matchgroup=Quote start=+'+ end=+'+ syn match snobol4BogusStatement "^-[^ ][^ ]*" syn match snobol4Statement "^-\(include\|copy\|module\|line\|plusopts\|case\|error\|noerrors\|list\|unlist\|execute\|noexecute\|copy\)" syn match snobol4Constant /"[^a-z"']\.[a-z][a-z0-9\-]*"/hs=s+1 syn region snobol4Goto start=":[sf]\{0,1}(" end=")\|$\|;" contains=ALLBUT,snobol4ParenError syn match snobol4Number "\<\d*\(\.\d\d*\)*\>" syn match snobol4BogusSysVar "&\w\{1,}" syn match snobol4SysVar "&\(abort\|alphabet\|anchor\|arb\|bal\|case\|code\|dump\|errlimit\|errtext\|errtype\|fail\|fence\|fnclevel\|ftrace\|fullscan\|input\|lastno\|lcase\|maxlngth\|output\|parm\|rem\|rtntype\|stcount\|stfcount\|stlimit\|stno\|succeed\|trace\|trim\|ucase\)" syn match snobol4ExtSysVar "&\(gtrace\|line\|file\|lastline\|lastfile\)" syn match snobol4Label "\(^\|;\)[^-\.\+ \t\*\.]\{1,}[^ \t\*\;]*" syn match snobol4Comment "\(^\|;\)\([\*\|!;#].*$\)" " Parens matching syn cluster snobol4ParenGroup contains=snobol4ParenError syn region snobol4Paren transparent start='(' end=')' contains=ALLBUT,@snobol4ParenGroup,snobol4ErrInBracket syn match snobol4ParenError display "[\])]" syn match snobol4ErrInParen display contained "[\]{}]\|<%\|%>" syn region snobol4Bracket transparent start='\[\|<:' end=']\|:>' contains=ALLBUT,@snobol4ParenGroup,snobol4ErrInParen syn match snobol4ErrInBracket display contained "[){}]\|<%\|%>" " optional shell shebang line " syn match snobol4Comment "^\#\!.*$" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link snobol4Constant Constant hi def link snobol4Label Label hi def link snobol4Goto Repeat hi def link snobol4Conditional Conditional hi def link snobol4Repeat Repeat hi def link snobol4Number Number hi def link snobol4Error Error hi def link snobol4Statement PreProc hi def link snobol4BogusStatement snobol4Error hi def link snobol4String String hi def link snobol4Comment Comment hi def link snobol4Special Special hi def link snobol4Todo Todo hi def link snobol4Keyword Keyword hi def link snobol4Function Function hi def link snobol4MathsOperator Operator hi def link snobol4ParenError snobol4Error hi def link snobol4ErrInParen snobol4Error hi def link snobol4ErrInBracket snobol4Error hi def link snobol4SysVar Keyword hi def link snobol4BogusSysVar snobol4Error if exists("snobol4_strict_mode") hi def link snobol4ExtSysVar WarningMsg hi def link snobol4ExtKeyword WarningMsg else hi def link snobol4ExtSysVar snobol4SysVar hi def link snobol4ExtKeyword snobol4Keyword endif let b:current_syntax = "snobol4" " vim: ts=8 neovim-0.2.2/runtime/syntax/spec.vim000066400000000000000000000304461320401574200174750ustar00rootroot00000000000000" Filename: spec.vim " Purpose: Vim syntax file " Language: SPEC: Build/install scripts for Linux RPM packages " Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com " Former Maintainer: Donovan Rebbechi elflord@panix.com (until March 2014) " Last Change: Sat Apr 9 15:30 2016 Filip Szymański " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn sync minlines=1000 syn match specSpecialChar contained '[][!$()\\|>^;:{}]' syn match specColon contained ':' syn match specPercent contained '%' syn match specVariables contained '\$\h\w*' contains=specSpecialVariablesNames,specSpecialChar syn match specVariables contained '\${\w*}' contains=specSpecialVariablesNames,specSpecialChar syn match specMacroIdentifier contained '%\h\w*' contains=specMacroNameLocal,specMacroNameOther,specPercent syn match specMacroIdentifier contained '%{\w*}' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar syn match specSpecialVariables contained '\$[0-9]\|\${[0-9]}' syn match specCommandOpts contained '\s\(-\w\+\|--\w[a-zA-Z_-]\+\)'ms=s+1 syn match specComment '^\s*#.*$' syn case match "matches with no highlight syn match specNoNumberHilite 'X11\|X11R6\|[a-zA-Z]*\.\d\|[a-zA-Z][-/]\d' syn match specManpageFile '[a-zA-Z]\.1' "Day, Month and most used license acronyms syn keyword specLicense contained GPL LGPL BSD MIT GNU syn keyword specWeekday contained Mon Tue Wed Thu Fri Sat Sun syn keyword specMonth contained Jan Feb Mar Apr Jun Jul Aug Sep Oct Nov Dec syn keyword specMonth contained January February March April May June July August September October November December "#, @, www syn match specNumber '\(^-\=\|[ \t]-\=\|-\)[0-9.-]*[0-9]' syn match specEmail contained "<\=\<[A-Za-z0-9_.-]\+@\([A-Za-z0-9_-]\+\.\)\+[A-Za-z]\+\>>\=" syn match specURL contained '\<\(\(https\{0,1}\|ftp\)://\|\(www[23]\{0,1}\.\|ftp\.\)\)[A-Za-z0-9._/~:,#-]\+\>' syn match specURLMacro contained '\<\(\(https\{0,1}\|ftp\)://\|\(www[23]\{0,1}\.\|ftp\.\)\)[A-Za-z0-9._/~:,#%{}-]\+\>' contains=specMacroIdentifier "TODO take specSpecialVariables out of the cluster for the sh* contains (ALLBUT) "Special system directories syn match specListedFilesPrefix contained '/\(usr\|local\|opt\|X11R6\|X11\)/'me=e-1 syn match specListedFilesBin contained '/s\=bin/'me=e-1 syn match specListedFilesLib contained '/\(lib\|include\)/'me=e-1 syn match specListedFilesDoc contained '/\(man\d*\|doc\|info\)\>' syn match specListedFilesEtc contained '/etc/'me=e-1 syn match specListedFilesShare contained '/share/'me=e-1 syn cluster specListedFiles contains=specListedFilesBin,specListedFilesLib,specListedFilesDoc,specListedFilesEtc,specListedFilesShare,specListedFilesPrefix,specVariables,specSpecialChar "specComands syn match specConfigure contained '\./configure' syn match specTarCommand contained '\' "valid _macro names from /usr/lib/rpm/macros syn keyword specMacroNameLocal contained _arch _binary_payload _bindir _build _build_alias _build_cpu _builddir _build_os _buildshell _buildsubdir _build_vendor _bzip2bin _datadir _dbpath _dbpath_rebuild _defaultdocdir _docdir _excludedocs _exec_prefix _fixgroup _fixowner _fixperms _ftpport _ftpproxy _gpg_path _gzipbin _host _host_alias _host_cpu _host_os _host_vendor _httpport _httpproxy _includedir _infodir _install_langs _install_script_path _instchangelog _langpatt _lib _libdir _libexecdir _localstatedir _mandir _netsharedpath _oldincludedir _os _pgpbin _pgp_path _prefix _preScriptEnvironment _provides _rpmdir _rpmfilename _sbindir _sharedstatedir _signature _sourcedir _source_payload _specdir _srcrpmdir _sysconfdir _target _target_alias _target_cpu _target_os _target_platform _target_vendor _timecheck _tmppath _topdir _usr _usrsrc _var _vendor "------------------------------------------------------------------------------ " here's is all the spec sections definitions: PreAmble, Description, Package, " Scripts, Files and Changelog "One line macros - valid in all ScriptAreas "tip: remember do include new items on specScriptArea's skip section syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(define\|global\|patch\d*\|setup\|autosetup\|autopatch\|configure\|GNUconfigure\|find_lang\|make_build\|makeinstall\|make_install\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|make_build\|makeinstall\|make_install\)}' end='$' contains=specCommandOpts,specMacroIdentifier "%% Files Section %% "TODO %config valid parameters: missingok\|noreplace "TODO %verify valid parameters: \(not\)\= \(md5\|atime\|...\) syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>' skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier "tip: remember to include new itens in specFilesArea above syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' "valid options for certain section headers syn match specDescriptionOpts contained '\s-[ln]\s*\a'ms=s+1,me=e-1 syn match specPackageOpts contained '\s-n\s*\w'ms=s+1,me=e-1 syn match specFilesOpts contained '\s-f\s*\w'ms=s+1,me=e-1 syn case ignore "%% PreAmble Section %% "Copyright and Serial were deprecated by License and Epoch syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier "%% Description Section %% syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment "%% Package Section %% syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment "%% Scripts Section %% syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 "%% Changelog Section %% syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense "------------------------------------------------------------------------------ "here's the shell syntax for all the Script Sections syn case match "sh-like comment stile, only valid in script part syn match shComment contained '#.*$' syn region shQuote1 contained matchgroup=shQuoteDelim start=+'+ skip=+\\'+ end=+'+ contains=specMacroIdentifier syn region shQuote2 contained matchgroup=shQuoteDelim start=+"+ skip=+\\"+ end=+"+ contains=specVariables,specMacroIdentifier syn match shOperator contained '[><|!&;]\|[!=]=' syn region shDo transparent matchgroup=specBlock start="\" end="\" contains=ALLBUT,shFunction,shDoError,shCase,specPreAmble,@specListedFiles syn region specIf matchgroup=specBlock start="%ifosf\|%ifos\|%ifnos\|%ifarch\|%ifnarch\|%else" end='%endif' contains=ALLBUT, specIfError, shCase syn region shIf transparent matchgroup=specBlock start="\" end="\" contains=ALLBUT,shFunction,shIfError,shCase,@specListedFiles syn region shFor matchgroup=specBlock start="\" end="\" contains=ALLBUT,shFunction,shInError,shCase,@specListedFiles syn region shCaseEsac transparent matchgroup=specBlock start="\" matchgroup=NONE end="\"me=s-1 contains=ALLBUT,shFunction,shCaseError,@specListedFiles nextgroup=shCaseEsac syn region shCaseEsac matchgroup=specBlock start="\" end="\" contains=ALLBUT,shFunction,shCaseError,@specListedFilesBin syn region shCase matchgroup=specBlock contained start=")" end=";;" contains=ALLBUT,shFunction,shCaseError,shCase,@specListedFiles syn sync match shDoSync grouphere shDo "\" syn sync match shDoSync groupthere shDo "\" syn sync match shIfSync grouphere shIf "\" syn sync match shIfSync groupthere shIf "\" syn sync match specIfSync grouphere specIf "%ifarch\|%ifos\|%ifnos" syn sync match specIfSync groupthere specIf "%endIf" syn sync match shForSync grouphere shFor "\" syn sync match shForSync groupthere shFor "\" syn sync match shCaseEsacSync grouphere shCaseEsac "\" syn sync match shCaseEsacSync groupthere shCaseEsac "\" " Define the default highlighting. " Only when an item doesn't have highlighting yet "main types color definitions hi def link specSection Structure hi def link specSectionMacro Macro hi def link specWWWlink PreProc hi def link specOpts Operator "yes, it's ugly, but white is sooo cool if &background == "dark" hi def specGlobalMacro ctermfg=white else hi def link specGlobalMacro Identifier endif "sh colors hi def link shComment Comment hi def link shIf Statement hi def link shOperator Special hi def link shQuote1 String hi def link shQuote2 String hi def link shQuoteDelim Statement "spec colors hi def link specBlock Function hi def link specColon Special hi def link specCommand Statement hi def link specCommandOpts specOpts hi def link specCommandSpecial Special hi def link specComment Comment hi def link specConfigure specCommand hi def link specDate String hi def link specDescriptionOpts specOpts hi def link specEmail specWWWlink hi def link specError Error hi def link specFilesDirective specSectionMacro hi def link specFilesOpts specOpts hi def link specLicense String hi def link specMacroNameLocal specGlobalMacro hi def link specMacroNameOther specGlobalMacro hi def link specManpageFile NONE hi def link specMonth specDate hi def link specNoNumberHilite NONE hi def link specNumber Number hi def link specPackageOpts specOpts hi def link specPercent Special hi def link specSpecialChar Special hi def link specSpecialVariables specGlobalMacro hi def link specSpecialVariablesNames specGlobalMacro hi def link specTarCommand specCommand hi def link specURL specWWWlink hi def link specURLMacro specWWWlink hi def link specVariables Identifier hi def link specWeekday specDate hi def link specListedFilesBin Statement hi def link specListedFilesDoc Statement hi def link specListedFilesEtc Statement hi def link specListedFilesLib Statement hi def link specListedFilesPrefix Statement hi def link specListedFilesShare Statement let b:current_syntax = "spec" " vim: ts=8 neovim-0.2.2/runtime/syntax/specman.vim000066400000000000000000000162651320401574200201740ustar00rootroot00000000000000" Vim syntax file " Language: SPECMAN E-LANGUAGE " Maintainer: Or Freund " Last Update: Wed Oct 24 2001 "--------------------------------------------------------- "| If anyone found an error or fix the parenthesis part | "| I will be happy to hear about it | "| Thanks Or. | "--------------------------------------------------------- " Remove any old syntax stuff hanging around " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn keyword specmanTodo contained TODO todo ToDo FIXME XXX syn keyword specmanStatement var instance on compute start event expect check that routine syn keyword specmanStatement specman is also first only with like syn keyword specmanStatement list of all radix hex dec bin ignore illegal syn keyword specmanStatement traceable untraceable syn keyword specmanStatement cover using count_only trace_only at_least transition item ranges syn keyword specmanStatement cross text call task within syn keyword specmanMethod initialize non_terminal testgroup delayed exit finish syn keyword specmanMethod out append print outf appendf syn keyword specmanMethod post_generate pre_generate setup_test finalize_test extract_test syn keyword specmanMethod init run copy as_a set_config dut_error add clear lock quit syn keyword specmanMethod lock unlock release swap quit to_string value stop_run syn keyword specmanMethod crc_8 crc_32 crc_32_flip get_config add0 all_indices and_all syn keyword specmanMethod apply average count delete exists first_index get_indices syn keyword specmanMethod has insert is_a_permutation is_empty key key_exists key_index syn keyword specmanMethod last last_index max max_index max_value min min_index syn keyword specmanMethod min_value or_all pop pop0 push push0 product resize reverse syn keyword specmanMethod sort split sum top top0 unique clear is_all_iterations syn keyword specmanMethod get_enclosing_unit hdl_path exec deep_compare deep_compare_physical syn keyword specmanMethod pack unpack warning error fatal syn match specmanMethod "size()" syn keyword specmanPacking packing low high syn keyword specmanType locker address syn keyword specmanType body code vec chars syn keyword specmanType integer real bool int long uint byte bits bit time string syn keyword specmanType byte_array external_pointer syn keyword specmanBoolean TRUE FALSE syn keyword specmanPreCondit #ifdef #ifndef #else syn keyword specmanConditional choose matches syn keyword specmanConditional if then else when try syn keyword specmanLabel case casex casez default syn keyword specmanLogical and or not xor syn keyword specmanRepeat until repeat while for from to step each do break continue syn keyword specmanRepeat before next sequence always -kind network syn keyword specmanRepeat index it me in new return result select syn keyword specmanTemporal cycle sample events forever syn keyword specmanTemporal wait change negedge rise fall delay sync sim true detach eventually emit syn keyword specmanConstant MAX_INT MIN_INT NULL UNDEF syn keyword specmanDefine define as computed type extend syn keyword specmanDefine verilog vhdl variable global sys syn keyword specmanStructure struct unit syn keyword specmanInclude import syn keyword specmanConstraint gen keep keeping soft before syn keyword specmanSpecial untyped symtab ECHO DOECHO syn keyword specmanFile files load module ntv source_ref script read write syn keyword specmanFSM initial idle others posedge clock cycles syn match specmanOperator "[&|~>"hs=s+2 end="^<'"he=e-2 syn match specmanHDL "'[`.a-zA-Z0-9_@\[\]]\+\>'" syn match specmanCompare "==" syn match specmanCompare "!===" syn match specmanCompare "===" syn match specmanCompare "!=" syn match specmanCompare ">=" syn match specmanCompare "<=" syn match specmanNumber "[0-9]:[0-9]" syn match specmanNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>" syn match specmanNumber "0[bB]\s*[0-1_xXzZ?]\+\>" syn match specmanNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>" syn match specmanNumber "0[oO]\s*[0-9a-fA-F_xXzZ?]\+\>" syn match specmanNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>" syn match specmanNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>" syn match specmanNumber "0[xX]\s*[0-9a-fA-F_xXzZ?]\+\>" syn match specmanNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>" syn region specmanString start=+"+ end=+"+ "********************************************************************** " I took this section from c.vim, but I didn't succeed in making it work " ANY one who dares to jump into this deep water is more than welcome! "********************************************************************** ""catch errors caused by wrong parenthesis and brackets "syn cluster specmanParenGroup contains=specmanParenError "" ,specmanNumbera,specmanComment "if exists("specman_no_bracket_error") "syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup "syn match specmanParenError ")" "syn match specmanErrInParen contained "[{}]" "else "syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup,specmanErrInBracket "syn match specmanParenError "[\])]" "syn match specmanErrInParen contained "[\]{}]" "syn region specmanBracket transparent start='\[' end=']' contains=ALLBUT,@specmanParenGroup,specmanErrInParen "syn match specmanErrInBracket contained "[);{}]" "endif " "Modify the following as needed. The trade-off is performance versus "functionality. syn sync lines=50 " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later hi def link specmanConditional Conditional hi def link specmanConstraint Conditional hi def link specmanRepeat Repeat hi def link specmanString String hi def link specmanComment Comment hi def link specmanConstant Macro hi def link specmanNumber Number hi def link specmanCompare Operator hi def link specmanOperator Operator hi def link specmanLogical Operator hi def link specmanStatement Statement hi def link specmanHDL SpecialChar hi def link specmanMethod Function hi def link specmanInclude Include hi def link specmanStructure Structure hi def link specmanBoolean Boolean hi def link specmanFSM Label hi def link specmanSpecial Special hi def link specmanType Type hi def link specmanTemporal Type hi def link specmanFile Include hi def link specmanPreCondit Include hi def link specmanDefine Typedef hi def link specmanLabel Label hi def link specmanPacking keyword hi def link specmanTodo Todo hi def link specmanParenError Error hi def link specmanErrInParen Error hi def link specmanErrInBracket Error let b:current_syntax = "specman" neovim-0.2.2/runtime/syntax/spice.vim000066400000000000000000000043031320401574200176370ustar00rootroot00000000000000" Vim syntax file " Language: Spice circuit simulator input netlist " Maintainer: Noam Halevy " Last Change: 2012 Jun 01 " (Dominique Pelle added @Spell) " " This is based on sh.vim by Lennart Schultz " but greatly simplified " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " spice syntax is case INsensitive syn case ignore syn keyword spiceTodo contained TODO syn match spiceComment "^ \=\*.*$" contains=@Spell syn match spiceComment "\$.*$" contains=@Spell " Numbers, all with engineering suffixes and optional units "========================================================== "floating point number, with dot, optional exponent syn match spiceNumber "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\=" "floating point number, starting with a dot, optional exponent syn match spiceNumber "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\=" "integer number with optional exponent syn match spiceNumber "\<[0-9]\+\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\=" " Misc "===== syn match spiceWrapLineOperator "\\$" syn match spiceWrapLineOperator "^+" syn match spiceStatement "^ \=\.\I\+" " Matching pairs of parentheses "========================================== syn region spiceParen transparent matchgroup=spiceOperator start="(" end=")" contains=ALLBUT,spiceParenError syn region spiceSinglequote matchgroup=spiceOperator start=+'+ end=+'+ " Errors "======= syn match spiceParenError ")" " Syncs " ===== syn sync minlines=50 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link spiceTodo Todo hi def link spiceWrapLineOperator spiceOperator hi def link spiceSinglequote spiceExpr hi def link spiceExpr Function hi def link spiceParenError Error hi def link spiceStatement Statement hi def link spiceNumber Number hi def link spiceComment Comment hi def link spiceOperator Operator let b:current_syntax = "spice" " insert the following to $VIM/syntax/scripts.vim " to autodetect HSpice netlists and text listing output: " " " Spice netlists and text listings " elseif getline(1) =~ 'spice\>' || getline("$") =~ '^\.end' " so :p:h/spice.vim " vim: ts=8 neovim-0.2.2/runtime/syntax/splint.vim000066400000000000000000000366521320401574200200610ustar00rootroot00000000000000" Vim syntax file " Language: splint (C with lclint/splint Annotations) " Maintainer: Ralf Wildenhues " Splint Home: http://www.splint.org/ " Last Change: $Date: 2004/06/13 20:08:47 $ " $Revision: 1.1 $ " Note: Splint annotated files are not detected by default. " If you want to use this file for highlighting C code, " please make sure splint.vim is sourced instead of c.vim, " for example by putting " /* vim: set filetype=splint : */ " at the end of your code or something like " au! BufRead,BufNewFile *.c setfiletype splint " in your vimrc file or filetype.vim " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Read the C syntax to start with runtime! syntax/c.vim " FIXME: uses and changes several clusters defined in c.vim " so watch for changes there " TODO: make a little more grammar explicit " match flags with hyphen and underscore notation " match flag expanded forms " accept other comment char than @ syn case match " splint annotations (taken from 'splint -help annotations') syn match splintStateAnnot contained "\(pre\|post\):\(only\|shared\|owned\|dependent\|observer\|exposed\|isnull\|notnull\)" syn keyword splintSpecialAnnot contained special syn keyword splintSpecTag contained uses sets defines allocated releases syn keyword splintModifies contained modifies syn keyword splintRequires contained requires ensures syn keyword splintGlobals contained globals syn keyword splintGlobitem contained internalState fileSystem syn keyword splintGlobannot contained undef killed syn keyword splintWarning contained warn syn keyword splintModitem contained internalState fileSystem nothing syn keyword splintReqitem contained MaxSet MaxRead result syn keyword splintIter contained iter yield syn keyword splintConst contained constant syn keyword splintAlt contained alt syn keyword splintType contained abstract concrete mutable immutable refcounted numabstract syn keyword splintGlobalType contained unchecked checkmod checked checkedstrict syn keyword splintMemMgm contained dependent keep killref only owned shared temp syn keyword splintAlias contained unique returned syn keyword splintExposure contained observer exposed syn keyword splintDefState contained out in partial reldef syn keyword splintGlobState contained undef killed syn keyword splintNullState contained null notnull relnull syn keyword splintNullPred contained truenull falsenull nullwhentrue falsewhennull syn keyword splintExit contained exits mayexit trueexit falseexit neverexit syn keyword splintExec contained noreturn maynotreturn noreturnwhentrue noreturnwhenfalse alwaysreturns syn keyword splintSef contained sef syn keyword splintDecl contained unused external syn keyword splintCase contained fallthrough syn keyword splintBreak contained innerbreak loopbreak switchbreak innercontinue syn keyword splintUnreach contained notreached syn keyword splintSpecFunc contained printflike scanflike messagelike " TODO: make these region or match syn keyword splintErrSupp contained i ignore end t syn match splintErrSupp contained "[it]\d\+\>" syn keyword splintTypeAcc contained access noaccess syn keyword splintMacro contained notfunction syn match splintSpecType contained "\(\|unsigned\|signed\)integraltype" " Flags taken from 'splint -help flags full' divided in local and global flags " Local Flags: syn keyword splintFlag contained abstract abstractcompare accessall accessczech accessczechoslovak syn keyword splintFlag contained accessfile accessmodule accessslovak aliasunique allblock syn keyword splintFlag contained allempty allglobs allimponly allmacros alwaysexits syn keyword splintFlag contained annotationerror ansi89limits assignexpose badflag bitwisesigned syn keyword splintFlag contained boolcompare boolfalse boolint boolops booltrue syn keyword splintFlag contained booltype bounds boundscompacterrormessages boundsread boundswrite syn keyword splintFlag contained branchstate bufferoverflow bufferoverflowhigh bugslimit casebreak syn keyword splintFlag contained caseinsensitivefilenames castexpose castfcnptr charindex charint syn keyword splintFlag contained charintliteral charunsignedchar checkedglobalias checkmodglobalias checkpost syn keyword splintFlag contained checkstrictglobalias checkstrictglobs codeimponly commentchar commenterror syn keyword splintFlag contained compdef compdestroy compmempass constmacros constprefix syn keyword splintFlag contained constprefixexclude constuse continuecomment controlnestdepth cppnames syn keyword splintFlag contained csvoverwrite czech czechconsts czechfcns czechmacros syn keyword splintFlag contained czechoslovak czechoslovakconsts czechoslovakfcns czechoslovakmacros czechoslovaktypes syn keyword splintFlag contained czechoslovakvars czechtypes czechvars debugfcnconstraint declundef syn keyword splintFlag contained deepbreak deparrays dependenttrans distinctexternalnames distinctinternalnames syn keyword splintFlag contained duplicatecases duplicatequals elseifcomplete emptyret enumindex syn keyword splintFlag contained enumint enummembers enummemuse enumprefix enumprefixexclude syn keyword splintFlag contained evalorder evalorderuncon exitarg exportany exportconst syn keyword splintFlag contained exportfcn exportheader exportheadervar exportiter exportlocal syn keyword splintFlag contained exportmacro exporttype exportvar exposetrans externalnamecaseinsensitive syn keyword splintFlag contained externalnamelen externalprefix externalprefixexclude fcnderef fcnmacros syn keyword splintFlag contained fcnpost fcnuse fielduse fileextensions filestaticprefix syn keyword splintFlag contained filestaticprefixexclude firstcase fixedformalarray floatdouble forblock syn keyword splintFlag contained forcehints forempty forloopexec formalarray formatcode syn keyword splintFlag contained formatconst formattype forwarddecl freshtrans fullinitblock syn keyword splintFlag contained globalias globalprefix globalprefixexclude globimponly globnoglobs syn keyword splintFlag contained globs globsimpmodsnothing globstate globuse gnuextensions syn keyword splintFlag contained grammar hasyield hints htmlfileformat ifblock syn keyword splintFlag contained ifempty ignorequals ignoresigns immediatetrans impabstract syn keyword splintFlag contained impcheckedglobs impcheckedspecglobs impcheckedstatics impcheckedstrictglobs impcheckedstrictspecglobs syn keyword splintFlag contained impcheckedstrictstatics impcheckmodglobs impcheckmodinternals impcheckmodspecglobs impcheckmodstatics syn keyword splintFlag contained impconj implementationoptional implictconstraint impouts imptype syn keyword splintFlag contained includenest incompletetype incondefs incondefslib indentspaces syn keyword splintFlag contained infloops infloopsuncon initallelements initsize internalglobs syn keyword splintFlag contained internalglobsnoglobs internalnamecaseinsensitive internalnamelen internalnamelookalike iso99limits syn keyword splintFlag contained isoreserved isoreservedinternal iterbalance iterloopexec iterprefix syn keyword splintFlag contained iterprefixexclude iteryield its4low its4moderate its4mostrisky syn keyword splintFlag contained its4risky its4veryrisky keep keeptrans kepttrans syn keyword splintFlag contained legacy libmacros likelyboundsread likelyboundswrite likelybool syn keyword splintFlag contained likelybounds limit linelen lintcomments localprefix syn keyword splintFlag contained localprefixexclude locindentspaces longint longintegral longsignedintegral syn keyword splintFlag contained longunsignedintegral longunsignedunsignedintegral loopexec looploopbreak looploopcontinue syn keyword splintFlag contained loopswitchbreak macroassign macroconstdecl macrodecl macroempty syn keyword splintFlag contained macrofcndecl macromatchname macroparams macroparens macroredef syn keyword splintFlag contained macroreturn macrostmt macrounrecog macrovarprefix macrovarprefixexclude syn keyword splintFlag contained maintype matchanyintegral matchfields mayaliasunique memchecks syn keyword splintFlag contained memimp memtrans misplacedsharequal misscase modfilesys syn keyword splintFlag contained modglobs modglobsnomods modglobsunchecked modinternalstrict modnomods syn keyword splintFlag contained modobserver modobserveruncon mods modsimpnoglobs modstrictglobsnomods syn keyword splintFlag contained moduncon modunconnomods modunspec multithreaded mustdefine syn keyword splintFlag contained mustfree mustfreefresh mustfreeonly mustmod mustnotalias syn keyword splintFlag contained mutrep namechecks needspec nestcomment nestedextern syn keyword splintFlag contained newdecl newreftrans nextlinemacros noaccess nocomments syn keyword splintFlag contained noeffect noeffectuncon noparams nopp noret syn keyword splintFlag contained null nullassign nullderef nullinit nullpass syn keyword splintFlag contained nullptrarith nullret nullstate nullterminated syn keyword splintFlag contained numabstract numabstractcast numabstractindex numabstractlit numabstractprint syn keyword splintFlag contained numenummembers numliteral numstructfields observertrans obviousloopexec syn keyword splintFlag contained oldstyle onlytrans onlyunqglobaltrans orconstraint overload syn keyword splintFlag contained ownedtrans paramimptemp paramuse parenfileformat partial syn keyword splintFlag contained passunknown portability predassign predbool predboolint syn keyword splintFlag contained predboolothers predboolptr preproc protoparammatch protoparamname syn keyword splintFlag contained protoparamprefix protoparamprefixexclude ptrarith ptrcompare ptrnegate syn keyword splintFlag contained quiet readonlystrings readonlytrans realcompare redecl syn keyword splintFlag contained redef redundantconstraints redundantsharequal refcounttrans relaxquals syn keyword splintFlag contained relaxtypes repeatunrecog repexpose retalias retexpose syn keyword splintFlag contained retimponly retval retvalbool retvalint retvalother syn keyword splintFlag contained sefparams sefuncon shadow sharedtrans shiftimplementation syn keyword splintFlag contained shiftnegative shortint showallconjs showcolumn showconstraintlocation syn keyword splintFlag contained showconstraintparens showdeephistory showfunc showloadloc showscan syn keyword splintFlag contained showsourceloc showsummary sizeofformalarray sizeoftype skipisoheaders syn keyword splintFlag contained skipposixheaders slashslashcomment slovak slovakconsts slovakfcns syn keyword splintFlag contained slovakmacros slovaktypes slovakvars specglobimponly specimponly syn keyword splintFlag contained specmacros specretimponly specstructimponly specundecl specundef syn keyword splintFlag contained stackref statemerge statetransfer staticinittrans statictrans syn keyword splintFlag contained strictbranchstate strictdestroy strictops strictusereleased stringliterallen syn keyword splintFlag contained stringliteralnoroom stringliteralnoroomfinalnull stringliteralsmaller stringliteraltoolong structimponly syn keyword splintFlag contained superuser switchloopbreak switchswitchbreak syntax sysdirerrors syn keyword splintFlag contained sysdirexpandmacros sysunrecog tagprefix tagprefixexclude temptrans syn keyword splintFlag contained tmpcomments toctou topuse trytorecover type syn keyword splintFlag contained typeprefix typeprefixexclude typeuse uncheckedglobalias uncheckedmacroprefix syn keyword splintFlag contained uncheckedmacroprefixexclude uniondef unixstandard unqualifiedinittrans unqualifiedtrans syn keyword splintFlag contained unreachable unrecog unrecogcomments unrecogdirective unrecogflagcomments syn keyword splintFlag contained unsignedcompare unusedspecial usedef usereleased usevarargs syn keyword splintFlag contained varuse voidabstract warnflags warnlintcomments warnmissingglobs syn keyword splintFlag contained warnmissingglobsnoglobs warnposixheaders warnrc warnsysfiles warnunixlib syn keyword splintFlag contained warnuse whileblock whileempty whileloopexec zerobool syn keyword splintFlag contained zeroptr " Global Flags: syn keyword splintGlobalFlag contained csv dump errorstream errorstreamstderr errorstreamstdout syn keyword splintGlobalFlag contained expect f help i isolib syn keyword splintGlobalFlag contained larchpath lclexpect lclimportdir lcs lh syn keyword splintGlobalFlag contained load messagestream messagestreamstderr messagestreamstdout mts syn keyword splintGlobalFlag contained neverinclude nof nolib posixlib posixstrictlib syn keyword splintGlobalFlag contained showalluses singleinclude skipsysheaders stats streamoverwrite syn keyword splintGlobalFlag contained strictlib supcounts sysdirs timedist tmpdir syn keyword splintGlobalFlag contained unixlib unixstrictlib warningstream warningstreamstderr warningstreamstdout syn keyword splintGlobalFlag contained whichlib syn match splintFlagExpr contained "[\+\-\=]" nextgroup=splintFlag,splintGlobalFlag " detect missing /*@ and wrong */ syn match splintAnnError "@\*/" syn cluster cCommentGroup add=splintAnnError syn match splintAnnError2 "[^@]\*/"hs=s+1 contained syn region splintAnnotation start="/\*@" end="@\*/" contains=@splintAnnotElem,cType keepend syn match splintShortAnn "/\*@\*/" syn cluster splintAnnotElem contains=splintStateAnnot,splintSpecialAnnot,splintSpecTag,splintModifies,splintRequires,splintGlobals,splintGlobitem,splintGlobannot,splintWarning,splintModitem,splintIter,splintConst,splintAlt,splintType,splintGlobalType,splintMemMgm,splintAlias,splintExposure,splintDefState,splintGlobState,splintNullState,splintNullPred,splintExit,splintExec,splintSef,splintDecl,splintCase,splintBreak,splintUnreach,splintSpecFunc,splintErrSupp,splintTypeAcc,splintMacro,splintSpecType,splintAnnError2,splintFlagExpr syn cluster splintAllStuff contains=@splintAnnotElem,splintFlag,splintGlobalFlag syn cluster cParenGroup add=@splintAllStuff syn cluster cPreProcGroup add=@splintAllStuff syn cluster cMultiGroup add=@splintAllStuff " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link splintShortAnn splintAnnotation hi def link splintAnnotation Comment hi def link splintAnnError splintError hi def link splintAnnError2 splintError hi def link splintFlag SpecialComment hi def link splintGlobalFlag splintError hi def link splintSpecialAnnot splintAnnKey hi def link splintStateAnnot splintAnnKey hi def link splintSpecTag splintAnnKey hi def link splintModifies splintAnnKey hi def link splintRequires splintAnnKey hi def link splintGlobals splintAnnKey hi def link splintGlobitem Constant hi def link splintGlobannot splintAnnKey hi def link splintWarning splintAnnKey hi def link splintModitem Constant hi def link splintIter splintAnnKey hi def link splintConst splintAnnKey hi def link splintAlt splintAnnKey hi def link splintType splintAnnKey hi def link splintGlobalType splintAnnKey hi def link splintMemMgm splintAnnKey hi def link splintAlias splintAnnKey hi def link splintExposure splintAnnKey hi def link splintDefState splintAnnKey hi def link splintGlobState splintAnnKey hi def link splintNullState splintAnnKey hi def link splintNullPred splintAnnKey hi def link splintExit splintAnnKey hi def link splintExec splintAnnKey hi def link splintSef splintAnnKey hi def link splintDecl splintAnnKey hi def link splintCase splintAnnKey hi def link splintBreak splintAnnKey hi def link splintUnreach splintAnnKey hi def link splintSpecFunc splintAnnKey hi def link splintErrSupp splintAnnKey hi def link splintTypeAcc splintAnnKey hi def link splintMacro splintAnnKey hi def link splintSpecType splintAnnKey hi def link splintAnnKey Type hi def link splintError Error let b:current_syntax = "splint" " vim: ts=8 neovim-0.2.2/runtime/syntax/spup.vim000066400000000000000000000331471320401574200175330ustar00rootroot00000000000000" Vim syntax file " Language: Speedup, plant simulator from AspenTech " Maintainer: Stefan.Schwarzer " URL: http://www.ndh.net/home/sschwarzer/download/spup.vim " Last Change: 2012 Feb 03 by Thilo Six " Filename: spup.vim " Bugs " - in the appropriate sections keywords are always highlighted " even if they are not used with the appropriate meaning; " example: in " MODEL demonstration " TYPE " *area AS area " both "area" are highlighted as spupType. " " If you encounter problems or have questions or suggestions, mail me " Remove old syntax stuff " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " don't hightlight several keywords like subsections "let strict_subsections = 1 " highlight types usually found in DECLARE section if !exists("hightlight_types") let highlight_types = 1 endif " one line comment syntax (# comments) " 1. allow appended code after comment, do not complain " 2. show code beginning with the second # as an error " 3. show whole lines with more than one # as an error if !exists("oneline_comments") let oneline_comments = 2 endif " Speedup SECTION regions syn case ignore syn region spupCdi matchgroup=spupSection start="^CDI" end="^\*\*\*\*" contains=spupCdiSubs,@spupOrdinary syn region spupConditions matchgroup=spupSection start="^CONDITIONS" end="^\*\*\*\*" contains=spupConditionsSubs,@spupOrdinary,spupConditional,spupOperator,spupCode syn region spupDeclare matchgroup=spupSection start="^DECLARE" end="^\*\*\*\*" contains=spupDeclareSubs,@spupOrdinary,spupTypes,spupCode syn region spupEstimation matchgroup=spupSection start="^ESTIMATION" end="^\*\*\*\*" contains=spupEstimationSubs,@spupOrdinary syn region spupExternal matchgroup=spupSection start="^EXTERNAL" end="^\*\*\*\*" contains=spupExternalSubs,@spupOrdinary syn region spupFlowsheet matchgroup=spupSection start="^FLOWSHEET" end="^\*\*\*\*" contains=spupFlowsheetSubs,@spupOrdinary,spupStreams,@spupTextproc syn region spupFunction matchgroup=spupSection start="^FUNCTION" end="^\*\*\*\*" contains=spupFunctionSubs,@spupOrdinary,spupHelp,spupCode,spupTypes syn region spupGlobal matchgroup=spupSection start="^GLOBAL" end="^\*\*\*\*" contains=spupGlobalSubs,@spupOrdinary syn region spupHomotopy matchgroup=spupSection start="^HOMOTOPY" end="^\*\*\*\*" contains=spupHomotopySubs,@spupOrdinary syn region spupMacro matchgroup=spupSection start="^MACRO" end="^\*\*\*\*" contains=spupMacroSubs,@spupOrdinary,@spupTextproc,spupTypes,spupStreams,spupOperator syn region spupModel matchgroup=spupSection start="^MODEL" end="^\*\*\*\*" contains=spupModelSubs,@spupOrdinary,spupConditional,spupOperator,spupTypes,spupStreams,@spupTextproc,spupHelp syn region spupOperation matchgroup=spupSection start="^OPERATION" end="^\*\*\*\*" contains=spupOperationSubs,@spupOrdinary,@spupTextproc syn region spupOptions matchgroup=spupSection start="^OPTIONS" end="^\*\*\*\*" contains=spupOptionsSubs,@spupOrdinary syn region spupProcedure matchgroup=spupSection start="^PROCEDURE" end="^\*\*\*\*" contains=spupProcedureSubs,@spupOrdinary,spupHelp,spupCode,spupTypes syn region spupProfiles matchgroup=spupSection start="^PROFILES" end="^\*\*\*\*" contains=@spupOrdinary,@spupTextproc syn region spupReport matchgroup=spupSection start="^REPORT" end="^\*\*\*\*" contains=spupReportSubs,@spupOrdinary,spupHelp,@spupTextproc syn region spupTitle matchgroup=spupSection start="^TITLE" end="^\*\*\*\*" contains=spupTitleSubs,spupComment,spupConstant,spupError syn region spupUnit matchgroup=spupSection start="^UNIT" end="^\*\*\*\*" contains=spupUnitSubs,@spupOrdinary " Subsections syn keyword spupCdiSubs INPUT FREE OUTPUT LINEARTIME MINNONZERO CALCULATE FILES SCALING contained syn keyword spupDeclareSubs TYPE STREAM contained syn keyword spupEstimationSubs ESTIMATE SSEXP DYNEXP RESULT contained syn keyword spupExternalSubs TRANSMIT RECEIVE contained syn keyword spupFlowsheetSubs STREAM contained syn keyword spupFunctionSubs INPUT OUTPUT contained syn keyword spupGlobalSubs VARIABLES MAXIMIZE MINIMIZE CONSTRAINT contained syn keyword spupHomotopySubs VARY OPTIONS contained syn keyword spupMacroSubs MODEL FLOWSHEET contained syn keyword spupModelSubs CATEGORY SET TYPE STREAM EQUATION PROCEDURE contained syn keyword spupOperationSubs SET PRESET INITIAL SSTATE FREE contained syn keyword spupOptionsSubs ROUTINES TRANSLATE EXECUTION contained syn keyword spupProcedureSubs INPUT OUTPUT SPACE PRECALL POSTCALL DERIVATIVE STREAM contained " no subsections for Profiles syn keyword spupReportSubs SET INITIAL FIELDS FIELDMARK DISPLAY WITHIN contained syn keyword spupUnitSubs ROUTINES SET contained " additional keywords for subsections if !exists( "strict_subsections" ) syn keyword spupConditionsSubs STOP PRINT contained syn keyword spupDeclareSubs UNIT SET COMPONENTS THERMO OPTIONS contained syn keyword spupEstimationSubs VARY MEASURE INITIAL contained syn keyword spupFlowsheetSubs TYPE FEED PRODUCT INPUT OUTPUT CONNECTION OF IS contained syn keyword spupMacroSubs CONNECTION STREAM SET INPUT OUTPUT OF IS FEED PRODUCT TYPE contained syn keyword spupModelSubs AS ARRAY OF INPUT OUTPUT CONNECTION contained syn keyword spupOperationSubs WITHIN contained syn keyword spupReportSubs LEFT RIGHT CENTER CENTRE UOM TIME DATE VERSION RELDATE contained syn keyword spupUnitSubs IS A contained endif " Speedup data types if exists( "highlight_types" ) syn keyword spupTypes act_coeff_liq area coefficient concentration contained syn keyword spupTypes control_signal cond_liq cond_vap cp_mass_liq contained syn keyword spupTypes cp_mol_liq cp_mol_vap cv_mol_liq cv_mol_vap contained syn keyword spupTypes diffus_liq diffus_vap delta_p dens_mass contained syn keyword spupTypes dens_mass_sol dens_mass_liq dens_mass_vap dens_mol contained syn keyword spupTypes dens_mol_sol dens_mol_liq dens_mol_vap enthflow contained syn keyword spupTypes enth_mass enth_mass_liq enth_mass_vap enth_mol contained syn keyword spupTypes enth_mol_sol enth_mol_liq enth_mol_vap entr_mol contained syn keyword spupTypes entr_mol_sol entr_mol_liq entr_mol_vap fraction contained syn keyword spupTypes flow_mass flow_mass_liq flow_mass_vap flow_mol contained syn keyword spupTypes flow_mol_vap flow_mol_liq flow_vol flow_vol_vap contained syn keyword spupTypes flow_vol_liq fuga_vap fuga_liq fuga_sol contained syn keyword spupTypes gibb_mol_sol heat_react heat_trans_coeff contained syn keyword spupTypes holdup_heat holdup_heat_liq holdup_heat_vap contained syn keyword spupTypes holdup_mass holdup_mass_liq holdup_mass_vap contained syn keyword spupTypes holdup_mol holdup_mol_liq holdup_mol_vap k_value contained syn keyword spupTypes length length_delta length_short liqfraction contained syn keyword spupTypes liqmassfraction mass massfraction molefraction contained syn keyword spupTypes molweight moment_inertia negative notype percent contained syn keyword spupTypes positive pressure press_diff press_drop press_rise contained syn keyword spupTypes ratio reaction reaction_mass rotation surf_tens contained syn keyword spupTypes temperature temperature_abs temp_diff temp_drop contained syn keyword spupTypes temp_rise time vapfraction vapmassfraction contained syn keyword spupTypes velocity visc_liq visc_vap volume zmom_rate contained syn keyword spupTypes seg_rate smom_rate tmom_rate zmom_mass seg_mass contained syn keyword spupTypes smom_mass tmom_mass zmom_holdup seg_holdup contained syn keyword spupTypes smom_holdup tmom_holdup contained endif " stream types syn keyword spupStreams mainstream vapour liquid contained " "conditional" keywords syn keyword spupConditional IF THEN ELSE ENDIF contained " Operators, symbols etc. syn keyword spupOperator AND OR NOT contained syn match spupSymbol "[,\-+=:;*/\"<>@%()]" contained syn match spupSpecial "[&\$?]" contained " Surprisingly, Speedup allows no unary + instead of the - syn match spupError "[(=+\-*/]\s*+\d\+\([ed][+-]\=\d\+\)\=\>"lc=1 contained syn match spupError "[(=+\-*/]\s*+\d\+\.\([ed][+-]\=\d\+\)\=\>"lc=1 contained syn match spupError "[(=+\-*/]\s*+\d*\.\d\+\([ed][+-]\=\d\+\)\=\>"lc=1 contained " String syn region spupString start=+"+ end=+"+ oneline contained syn region spupString start=+'+ end=+'+ oneline contained " Identifier syn match spupIdentifier "\<[a-z][a-z0-9_]*\>" contained " Textprocessor directives syn match spupTextprocGeneric "?[a-z][a-z0-9_]*\>" contained syn region spupTextprocError matchgroup=spupTextprocGeneric start="?ERROR" end="?END"he=s-1 contained " Number, without decimal point syn match spupNumber "-\=\d\+\([ed][+-]\=\d\+\)\=" contained " Number, allows 1. before exponent syn match spupNumber "-\=\d\+\.\([ed][+-]\=\d\+\)\=" contained " Number allows .1 before exponent syn match spupNumber "-\=\d*\.\d\+\([ed][+-]\=\d\+\)\=" contained " Help subsections syn region spupHelp start="^HELP"hs=e+1 end="^\$ENDHELP"he=s-1 contained " Fortran code syn region spupCode start="^CODE"hs=e+1 end="^\$ENDCODE"he=s-1 contained " oneline comments if oneline_comments > 3 oneline_comments = 2 " default endif if oneline_comments == 1 syn match spupComment "#[^#]*#\=" elseif oneline_comments == 2 syn match spupError "#.*$" syn match spupComment "#[^#]*" nextgroup=spupError elseif oneline_comments == 3 syn match spupComment "#[^#]*" syn match spupError "#[^#]*#.*" endif " multiline comments syn match spupOpenBrace "{" contained syn match spupError "}" syn region spupComment matchgroup=spupComment2 start="{" end="}" keepend contains=spupOpenBrace syn cluster spupOrdinary contains=spupNumber,spupIdentifier,spupSymbol syn cluster spupOrdinary add=spupError,spupString,spupComment syn cluster spupTextproc contains=spupTextprocGeneric,spupTextprocError " define syncronizing; especially OPERATION sections can become very large syn sync clear syn sync minlines=100 syn sync maxlines=500 syn sync match spupSyncOperation grouphere spupOperation "^OPERATION" syn sync match spupSyncCdi grouphere spupCdi "^CDI" syn sync match spupSyncConditions grouphere spupConditions "^CONDITIONS" syn sync match spupSyncDeclare grouphere spupDeclare "^DECLARE" syn sync match spupSyncEstimation grouphere spupEstimation "^ESTIMATION" syn sync match spupSyncExternal grouphere spupExternal "^EXTERNAL" syn sync match spupSyncFlowsheet grouphere spupFlowsheet "^FLOWSHEET" syn sync match spupSyncFunction grouphere spupFunction "^FUNCTION" syn sync match spupSyncGlobal grouphere spupGlobal "^GLOBAL" syn sync match spupSyncHomotopy grouphere spupHomotopy "^HOMOTOPY" syn sync match spupSyncMacro grouphere spupMacro "^MACRO" syn sync match spupSyncModel grouphere spupModel "^MODEL" syn sync match spupSyncOperation grouphere spupOperation "^OPERATION" syn sync match spupSyncOptions grouphere spupOptions "^OPTIONS" syn sync match spupSyncProcedure grouphere spupProcedure "^PROCEDURE" syn sync match spupSyncProfiles grouphere spupProfiles "^PROFILES" syn sync match spupSyncReport grouphere spupReport "^REPORT" syn sync match spupSyncTitle grouphere spupTitle "^TITLE" syn sync match spupSyncUnit grouphere spupUnit "^UNIT" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link spupCdi spupSection hi def link spupConditions spupSection hi def link spupDeclare spupSection hi def link spupEstimation spupSection hi def link spupExternal spupSection hi def link spupFlowsheet spupSection hi def link spupFunction spupSection hi def link spupGlobal spupSection hi def link spupHomotopy spupSection hi def link spupMacro spupSection hi def link spupModel spupSection hi def link spupOperation spupSection hi def link spupOptions spupSection hi def link spupProcedure spupSection hi def link spupProfiles spupSection hi def link spupReport spupSection hi def link spupTitle spupConstant " this is correct, truly ;) hi def link spupUnit spupSection hi def link spupCdiSubs spupSubs hi def link spupConditionsSubs spupSubs hi def link spupDeclareSubs spupSubs hi def link spupEstimationSubs spupSubs hi def link spupExternalSubs spupSubs hi def link spupFlowsheetSubs spupSubs hi def link spupFunctionSubs spupSubs hi def link spupHomotopySubs spupSubs hi def link spupMacroSubs spupSubs hi def link spupModelSubs spupSubs hi def link spupOperationSubs spupSubs hi def link spupOptionsSubs spupSubs hi def link spupProcedureSubs spupSubs hi def link spupReportSubs spupSubs hi def link spupUnitSubs spupSubs hi def link spupCode Normal hi def link spupComment Comment hi def link spupComment2 spupComment hi def link spupConditional Statement hi def link spupConstant Constant hi def link spupError Error hi def link spupHelp Normal hi def link spupIdentifier Identifier hi def link spupNumber Constant hi def link spupOperator Special hi def link spupOpenBrace spupError hi def link spupSection Statement hi def link spupSpecial spupTextprocGeneric hi def link spupStreams Type hi def link spupString Constant hi def link spupSubs Statement hi def link spupSymbol Special hi def link spupTextprocError Normal hi def link spupTextprocGeneric PreProc hi def link spupTypes Type let b:current_syntax = "spup" let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8 neovim-0.2.2/runtime/syntax/spyce.vim000066400000000000000000000105471320401574200176660ustar00rootroot00000000000000" Vim syntax file " Language: SPYCE " Maintainer: Rimon Barr " URL: http://spyce.sourceforge.net " Last Change: 2009 Nov 11 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " we define it here so that included files can test for it if !exists("main_syntax") let main_syntax='spyce' endif " Read the HTML syntax to start with let b:did_indent = 1 " don't perform HTML indentation! let html_no_rendering = 1 " do not render ,, etc... runtime! syntax/html.vim unlet b:current_syntax syntax spell default " added by Bram " include python syn include @Python :p:h/python.vim syn include @Html :p:h/html.vim " spyce definitions syn keyword spyceDirectiveKeyword include compact module import contained syn keyword spyceDirectiveArg name names file contained syn region spyceDirectiveString start=+"+ end=+"+ contained syn match spyceDirectiveValue "=[\t ]*[^'", \t>][^, \t>]*"hs=s+1 contained syn match spyceBeginErrorS ,\[\[, syn match spyceBeginErrorA ,<%, syn cluster spyceBeginError contains=spyceBeginErrorS,spyceBeginErrorA syn match spyceEndErrorS ,\]\], syn match spyceEndErrorA ,%>, syn cluster spyceEndError contains=spyceEndErrorS,spyceEndErrorA syn match spyceEscBeginS ,\\\[\[, syn match spyceEscBeginA ,\\<%, syn cluster spyceEscBegin contains=spyceEscBeginS,spyceEscBeginA syn match spyceEscEndS ,\\\]\], syn match spyceEscEndA ,\\%>, syn cluster spyceEscEnd contains=spyceEscEndS,spyceEscEndA syn match spyceEscEndCommentS ,--\\\]\], syn match spyceEscEndCommentA ,--\\%>, syn cluster spyceEscEndComment contains=spyceEscEndCommentS,spyceEscEndCommentA syn region spyceStmtS matchgroup=spyceStmtDelim start=,\[\[, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend syn region spyceStmtA matchgroup=spyceStmtDelim start=,<%, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend syn region spyceChunkS matchgroup=spyceChunkDelim start=,\[\[\\, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend syn region spyceChunkA matchgroup=spyceChunkDelim start=,<%\\, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend syn region spyceEvalS matchgroup=spyceEvalDelim start=,\[\[=, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend syn region spyceEvalA matchgroup=spyceEvalDelim start=,<%=, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend syn region spyceDirectiveS matchgroup=spyceDelim start=,\[\[\., end=,\]\], contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend syn region spyceDirectiveA matchgroup=spyceDelim start=,<%@, end=,%>, contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend syn region spyceCommentS matchgroup=spyceCommentDelim start=,\[\[--, end=,--\]\], syn region spyceCommentA matchgroup=spyceCommentDelim start=,<%--, end=,--%>, syn region spyceLambdaS matchgroup=spyceLambdaDelim start=,\[\[spy!\?, end=,\]\], contains=@Html,@spyce extend syn region spyceLambdaA matchgroup=spyceLambdaDelim start=,<%spy!\?, end=,%>, contains=@Html,@spyce extend syn cluster spyce contains=spyceStmtS,spyceStmtA,spyceChunkS,spyceChunkA,spyceEvalS,spyceEvalA,spyceCommentS,spyceCommentA,spyceDirectiveS,spyceDirectiveA syn cluster htmlPreproc contains=@spyce hi link spyceDirectiveKeyword Special hi link spyceDirectiveArg Type hi link spyceDirectiveString String hi link spyceDirectiveValue String hi link spyceDelim Special hi link spyceStmtDelim spyceDelim hi link spyceChunkDelim spyceDelim hi link spyceEvalDelim spyceDelim hi link spyceLambdaDelim spyceDelim hi link spyceCommentDelim Comment hi link spyceBeginErrorS Error hi link spyceBeginErrorA Error hi link spyceEndErrorS Error hi link spyceEndErrorA Error hi link spyceStmtS spyce hi link spyceStmtA spyce hi link spyceChunkS spyce hi link spyceChunkA spyce hi link spyceEvalS spyce hi link spyceEvalA spyce hi link spyceDirectiveS spyce hi link spyceDirectiveA spyce hi link spyceCommentS Comment hi link spyceCommentA Comment hi link spyceLambdaS Normal hi link spyceLambdaA Normal hi link spyce Statement let b:current_syntax = "spyce" if main_syntax == 'spyce' unlet main_syntax endif neovim-0.2.2/runtime/syntax/sql.vim000066400000000000000000000021401320401574200173300ustar00rootroot00000000000000" Vim syntax file loader " Language: SQL " Maintainer: David Fishburn " Last Change: Thu Sep 15 2005 10:30:02 AM " Version: 1.0 " Description: Checks for a: " buffer local variable, " global variable, " If the above exist, it will source the type specified. " If none exist, it will source the default sql.vim file. " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Default to the standard Vim distribution file let filename = 'sqloracle' " Check for overrides. Buffer variables have the highest priority. if exists("b:sql_type_override") " Check the runtimepath to see if the file exists if globpath(&runtimepath, 'syntax/'.b:sql_type_override.'.vim') != '' let filename = b:sql_type_override endif elseif exists("g:sql_type_default") if globpath(&runtimepath, 'syntax/'.g:sql_type_default.'.vim') != '' let filename = g:sql_type_default endif endif " Source the appropriate file exec 'runtime syntax/'.filename.'.vim' " vim:sw=4: neovim-0.2.2/runtime/syntax/sqlanywhere.vim000066400000000000000000001217111320401574200211010ustar00rootroot00000000000000" Vim syntax file " Language: SQL, Adaptive Server Anywhere " Maintainer: David Fishburn " Last Change: 2013 May 13 " Version: 16.0.0 " Description: Updated to Adaptive Server Anywhere 16.0.0 " Updated to Adaptive Server Anywhere 12.0.1 (including spatial data) " Updated to Adaptive Server Anywhere 11.0.1 " Updated to Adaptive Server Anywhere 10.0.1 " Updated to Adaptive Server Anywhere 9.0.2 " Updated to Adaptive Server Anywhere 9.0.1 " Updated to Adaptive Server Anywhere 9.0.0 " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " The SQL reserved words, defined as keywords. syn keyword sqlSpecial false null true " common functions syn keyword sqlFunction abs argn avg bintohex bintostr syn keyword sqlFunction byte_length byte_substr char_length syn keyword sqlFunction compare count count_big datalength date syn keyword sqlFunction date_format dateadd datediff datename syn keyword sqlFunction datepart day dayname days debug_eng syn keyword sqlFunction dense_rank density dialect difference syn keyword sqlFunction dow estimate estimate_source evaluate syn keyword sqlFunction experience_estimate explanation syn keyword sqlFunction get_identity graphical_plan syn keyword sqlFunction graphical_ulplan greater grouping syn keyword sqlFunction hextobin hextoint hour hours identity syn keyword sqlFunction ifnull index_estimate inttohex isdate syn keyword sqlFunction isencrypted isnull isnumeric syn keyword sqlFunction lang_message length lesser like_end syn keyword sqlFunction like_start list long_ulplan lookup max syn keyword sqlFunction min minute minutes month monthname syn keyword sqlFunction months newid now nullif number syn keyword sqlFunction percent_rank plan quarter rand rank syn keyword sqlFunction regexp_compile regexp_compile_patindex syn keyword sqlFunction remainder rewrite rowid second seconds syn keyword sqlFunction short_ulplan similar sortkey soundex syn keyword sqlFunction stddev stack_trace str string strtobin strtouuid stuff syn keyword sqlFunction subpartition substr substring sum switchoffset sysdatetimeoffset syn keyword sqlFunction textptr todate todatetimeoffset today totimestamp traceback transactsql syn keyword sqlFunction ts_index_statistics ts_table_statistics syn keyword sqlFunction tsequal ulplan user_id user_name utc_now syn keyword sqlFunction uuidtostr varexists variance watcomsql syn keyword sqlFunction weeks wsql_state year years ymd " 9.0.1 functions syn keyword sqlFunction acos asin atan atn2 cast ceiling convert cos cot syn keyword sqlFunction char_length coalesce dateformat datetime degrees exp syn keyword sqlFunction floor getdate insertstr syn keyword sqlFunction log log10 lower mod pi power syn keyword sqlFunction property radians replicate round sign sin syn keyword sqlFunction sqldialect tan truncate truncnum syn keyword sqlFunction base64_encode base64_decode syn keyword sqlFunction hash compress decompress encrypt decrypt " 11.0.1 functions syn keyword sqlFunction connection_extended_property text_handle_vector_match syn keyword sqlFunction read_client_file write_client_file " 12.0.1 functions syn keyword sqlFunction http_response_header " string functions syn keyword sqlFunction ascii char left ltrim repeat syn keyword sqlFunction space right rtrim trim lcase ucase syn keyword sqlFunction locate charindex patindex replace syn keyword sqlFunction errormsg csconvert " property functions syn keyword sqlFunction db_id db_name property_name syn keyword sqlFunction property_description property_number syn keyword sqlFunction next_connection next_database property syn keyword sqlFunction connection_property db_property db_extended_property syn keyword sqlFunction event_parmeter event_condition event_condition_name " sa_ procedures syn keyword sqlFunction sa_add_index_consultant_analysis syn keyword sqlFunction sa_add_workload_query syn keyword sqlFunction sa_app_deregister syn keyword sqlFunction sa_app_get_infoStr syn keyword sqlFunction sa_app_get_status syn keyword sqlFunction sa_app_register syn keyword sqlFunction sa_app_registration_unlock syn keyword sqlFunction sa_app_set_infoStr syn keyword sqlFunction sa_audit_string syn keyword sqlFunction sa_check_commit syn keyword sqlFunction sa_checkpoint_execute syn keyword sqlFunction sa_conn_activity syn keyword sqlFunction sa_conn_compression_info syn keyword sqlFunction sa_conn_deregister syn keyword sqlFunction sa_conn_info syn keyword sqlFunction sa_conn_properties syn keyword sqlFunction sa_conn_properties_by_conn syn keyword sqlFunction sa_conn_properties_by_name syn keyword sqlFunction sa_conn_register syn keyword sqlFunction sa_conn_set_status syn keyword sqlFunction sa_create_analysis_from_query syn keyword sqlFunction sa_db_info syn keyword sqlFunction sa_db_properties syn keyword sqlFunction sa_disable_auditing_type syn keyword sqlFunction sa_disable_index syn keyword sqlFunction sa_disk_free_space syn keyword sqlFunction sa_enable_auditing_type syn keyword sqlFunction sa_enable_index syn keyword sqlFunction sa_end_forward_to syn keyword sqlFunction sa_eng_properties syn keyword sqlFunction sa_event_schedules syn keyword sqlFunction sa_exec_script syn keyword sqlFunction sa_flush_cache syn keyword sqlFunction sa_flush_statistics syn keyword sqlFunction sa_forward_to syn keyword sqlFunction sa_get_dtt syn keyword sqlFunction sa_get_histogram syn keyword sqlFunction sa_get_request_profile syn keyword sqlFunction sa_get_request_profile_sub syn keyword sqlFunction sa_get_request_times syn keyword sqlFunction sa_get_server_messages syn keyword sqlFunction sa_get_simulated_scale_factors syn keyword sqlFunction sa_get_workload_capture_status syn keyword sqlFunction sa_index_density syn keyword sqlFunction sa_index_levels syn keyword sqlFunction sa_index_statistics syn keyword sqlFunction sa_internal_alter_index_ability syn keyword sqlFunction sa_internal_create_analysis_from_query syn keyword sqlFunction sa_internal_disk_free_space syn keyword sqlFunction sa_internal_get_dtt syn keyword sqlFunction sa_internal_get_histogram syn keyword sqlFunction sa_internal_get_request_times syn keyword sqlFunction sa_internal_get_simulated_scale_factors syn keyword sqlFunction sa_internal_get_workload_capture_status syn keyword sqlFunction sa_internal_index_density syn keyword sqlFunction sa_internal_index_levels syn keyword sqlFunction sa_internal_index_statistics syn keyword sqlFunction sa_internal_java_loaded_classes syn keyword sqlFunction sa_internal_locks syn keyword sqlFunction sa_internal_pause_workload_capture syn keyword sqlFunction sa_internal_procedure_profile syn keyword sqlFunction sa_internal_procedure_profile_summary syn keyword sqlFunction sa_internal_read_backup_history syn keyword sqlFunction sa_internal_recommend_indexes syn keyword sqlFunction sa_internal_reset_identity syn keyword sqlFunction sa_internal_resume_workload_capture syn keyword sqlFunction sa_internal_start_workload_capture syn keyword sqlFunction sa_internal_stop_index_consultant syn keyword sqlFunction sa_internal_stop_workload_capture syn keyword sqlFunction sa_internal_table_fragmentation syn keyword sqlFunction sa_internal_table_page_usage syn keyword sqlFunction sa_internal_table_stats syn keyword sqlFunction sa_internal_virtual_sysindex syn keyword sqlFunction sa_internal_virtual_sysixcol syn keyword sqlFunction sa_java_loaded_classes syn keyword sqlFunction sa_jdk_version syn keyword sqlFunction sa_locks syn keyword sqlFunction sa_make_object syn keyword sqlFunction sa_pause_workload_capture syn keyword sqlFunction sa_proc_debug_attach_to_connection syn keyword sqlFunction sa_proc_debug_connect syn keyword sqlFunction sa_proc_debug_detach_from_connection syn keyword sqlFunction sa_proc_debug_disconnect syn keyword sqlFunction sa_proc_debug_get_connection_name syn keyword sqlFunction sa_proc_debug_release_connection syn keyword sqlFunction sa_proc_debug_request syn keyword sqlFunction sa_proc_debug_version syn keyword sqlFunction sa_proc_debug_wait_for_connection syn keyword sqlFunction sa_procedure_profile syn keyword sqlFunction sa_procedure_profile_summary syn keyword sqlFunction sa_read_backup_history syn keyword sqlFunction sa_recommend_indexes syn keyword sqlFunction sa_recompile_views syn keyword sqlFunction sa_remove_index_consultant_analysis syn keyword sqlFunction sa_remove_index_consultant_workload syn keyword sqlFunction sa_reset_identity syn keyword sqlFunction sa_resume_workload_capture syn keyword sqlFunction sa_server_option syn keyword sqlFunction sa_set_simulated_scale_factor syn keyword sqlFunction sa_setremoteuser syn keyword sqlFunction sa_setsubscription syn keyword sqlFunction sa_start_recording_commits syn keyword sqlFunction sa_start_workload_capture syn keyword sqlFunction sa_statement_text syn keyword sqlFunction sa_stop_index_consultant syn keyword sqlFunction sa_stop_recording_commits syn keyword sqlFunction sa_stop_workload_capture syn keyword sqlFunction sa_sync syn keyword sqlFunction sa_sync_sub syn keyword sqlFunction sa_table_fragmentation syn keyword sqlFunction sa_table_page_usage syn keyword sqlFunction sa_table_stats syn keyword sqlFunction sa_update_index_consultant_workload syn keyword sqlFunction sa_validate syn keyword sqlFunction sa_virtual_sysindex syn keyword sqlFunction sa_virtual_sysixcol " sp_ procedures syn keyword sqlFunction sp_addalias syn keyword sqlFunction sp_addauditrecord syn keyword sqlFunction sp_adddumpdevice syn keyword sqlFunction sp_addgroup syn keyword sqlFunction sp_addlanguage syn keyword sqlFunction sp_addlogin syn keyword sqlFunction sp_addmessage syn keyword sqlFunction sp_addremotelogin syn keyword sqlFunction sp_addsegment syn keyword sqlFunction sp_addserver syn keyword sqlFunction sp_addthreshold syn keyword sqlFunction sp_addtype syn keyword sqlFunction sp_adduser syn keyword sqlFunction sp_auditdatabase syn keyword sqlFunction sp_auditlogin syn keyword sqlFunction sp_auditobject syn keyword sqlFunction sp_auditoption syn keyword sqlFunction sp_auditsproc syn keyword sqlFunction sp_bindefault syn keyword sqlFunction sp_bindmsg syn keyword sqlFunction sp_bindrule syn keyword sqlFunction sp_changedbowner syn keyword sqlFunction sp_changegroup syn keyword sqlFunction sp_checknames syn keyword sqlFunction sp_checkperms syn keyword sqlFunction sp_checkreswords syn keyword sqlFunction sp_clearstats syn keyword sqlFunction sp_column_privileges syn keyword sqlFunction sp_columns syn keyword sqlFunction sp_commonkey syn keyword sqlFunction sp_configure syn keyword sqlFunction sp_cursorinfo syn keyword sqlFunction sp_databases syn keyword sqlFunction sp_datatype_info syn keyword sqlFunction sp_dboption syn keyword sqlFunction sp_dbremap syn keyword sqlFunction sp_depends syn keyword sqlFunction sp_diskdefault syn keyword sqlFunction sp_displaylogin syn keyword sqlFunction sp_dropalias syn keyword sqlFunction sp_dropdevice syn keyword sqlFunction sp_dropgroup syn keyword sqlFunction sp_dropkey syn keyword sqlFunction sp_droplanguage syn keyword sqlFunction sp_droplogin syn keyword sqlFunction sp_dropmessage syn keyword sqlFunction sp_dropremotelogin syn keyword sqlFunction sp_dropsegment syn keyword sqlFunction sp_dropserver syn keyword sqlFunction sp_dropthreshold syn keyword sqlFunction sp_droptype syn keyword sqlFunction sp_dropuser syn keyword sqlFunction sp_estspace syn keyword sqlFunction sp_extendsegment syn keyword sqlFunction sp_fkeys syn keyword sqlFunction sp_foreignkey syn keyword sqlFunction sp_getmessage syn keyword sqlFunction sp_help syn keyword sqlFunction sp_helpconstraint syn keyword sqlFunction sp_helpdb syn keyword sqlFunction sp_helpdevice syn keyword sqlFunction sp_helpgroup syn keyword sqlFunction sp_helpindex syn keyword sqlFunction sp_helpjoins syn keyword sqlFunction sp_helpkey syn keyword sqlFunction sp_helplanguage syn keyword sqlFunction sp_helplog syn keyword sqlFunction sp_helpprotect syn keyword sqlFunction sp_helpremotelogin syn keyword sqlFunction sp_helpsegment syn keyword sqlFunction sp_helpserver syn keyword sqlFunction sp_helpsort syn keyword sqlFunction sp_helptext syn keyword sqlFunction sp_helpthreshold syn keyword sqlFunction sp_helpuser syn keyword sqlFunction sp_indsuspect syn keyword sqlFunction sp_lock syn keyword sqlFunction sp_locklogin syn keyword sqlFunction sp_logdevice syn keyword sqlFunction sp_login_environment syn keyword sqlFunction sp_modifylogin syn keyword sqlFunction sp_modifythreshold syn keyword sqlFunction sp_monitor syn keyword sqlFunction sp_password syn keyword sqlFunction sp_pkeys syn keyword sqlFunction sp_placeobject syn keyword sqlFunction sp_primarykey syn keyword sqlFunction sp_procxmode syn keyword sqlFunction sp_recompile syn keyword sqlFunction sp_remap syn keyword sqlFunction sp_remote_columns syn keyword sqlFunction sp_remote_exported_keys syn keyword sqlFunction sp_remote_imported_keys syn keyword sqlFunction sp_remote_pcols syn keyword sqlFunction sp_remote_primary_keys syn keyword sqlFunction sp_remote_procedures syn keyword sqlFunction sp_remote_tables syn keyword sqlFunction sp_remoteoption syn keyword sqlFunction sp_rename syn keyword sqlFunction sp_renamedb syn keyword sqlFunction sp_reportstats syn keyword sqlFunction sp_reset_tsql_environment syn keyword sqlFunction sp_role syn keyword sqlFunction sp_server_info syn keyword sqlFunction sp_servercaps syn keyword sqlFunction sp_serverinfo syn keyword sqlFunction sp_serveroption syn keyword sqlFunction sp_setlangalias syn keyword sqlFunction sp_setreplicate syn keyword sqlFunction sp_setrepproc syn keyword sqlFunction sp_setreptable syn keyword sqlFunction sp_spaceused syn keyword sqlFunction sp_special_columns syn keyword sqlFunction sp_sproc_columns syn keyword sqlFunction sp_statistics syn keyword sqlFunction sp_stored_procedures syn keyword sqlFunction sp_syntax syn keyword sqlFunction sp_table_privileges syn keyword sqlFunction sp_tables syn keyword sqlFunction sp_tsql_environment syn keyword sqlFunction sp_tsql_feature_not_supported syn keyword sqlFunction sp_unbindefault syn keyword sqlFunction sp_unbindmsg syn keyword sqlFunction sp_unbindrule syn keyword sqlFunction sp_volchanged syn keyword sqlFunction sp_who syn keyword sqlFunction xp_scanf syn keyword sqlFunction xp_sprintf " server functions syn keyword sqlFunction col_length syn keyword sqlFunction col_name syn keyword sqlFunction index_col syn keyword sqlFunction object_id syn keyword sqlFunction object_name syn keyword sqlFunction proc_role syn keyword sqlFunction show_role syn keyword sqlFunction xp_cmdshell syn keyword sqlFunction xp_msver syn keyword sqlFunction xp_read_file syn keyword sqlFunction xp_real_cmdshell syn keyword sqlFunction xp_real_read_file syn keyword sqlFunction xp_real_sendmail syn keyword sqlFunction xp_real_startmail syn keyword sqlFunction xp_real_startsmtp syn keyword sqlFunction xp_real_stopmail syn keyword sqlFunction xp_real_stopsmtp syn keyword sqlFunction xp_real_write_file syn keyword sqlFunction xp_scanf syn keyword sqlFunction xp_sendmail syn keyword sqlFunction xp_sprintf syn keyword sqlFunction xp_startmail syn keyword sqlFunction xp_startsmtp syn keyword sqlFunction xp_stopmail syn keyword sqlFunction xp_stopsmtp syn keyword sqlFunction xp_write_file " http functions syn keyword sqlFunction http_header http_variable syn keyword sqlFunction next_http_header next_http_response_header next_http_variable syn keyword sqlFunction sa_set_http_header sa_set_http_option syn keyword sqlFunction sa_http_variable_info sa_http_header_info " http functions 9.0.1 syn keyword sqlFunction http_encode http_decode syn keyword sqlFunction html_encode html_decode " XML function support syn keyword sqlFunction openxml xmlelement xmlforest xmlgen xmlconcat xmlagg syn keyword sqlFunction xmlattributes " Spatial Compatibility Functions syn keyword sqlFunction ST_BdMPolyFromText syn keyword sqlFunction ST_BdMPolyFromWKB syn keyword sqlFunction ST_BdPolyFromText syn keyword sqlFunction ST_BdPolyFromWKB syn keyword sqlFunction ST_CPolyFromText syn keyword sqlFunction ST_CPolyFromWKB syn keyword sqlFunction ST_CircularFromTxt syn keyword sqlFunction ST_CircularFromWKB syn keyword sqlFunction ST_CompoundFromTxt syn keyword sqlFunction ST_CompoundFromWKB syn keyword sqlFunction ST_GeomCollFromTxt syn keyword sqlFunction ST_GeomCollFromWKB syn keyword sqlFunction ST_GeomFromText syn keyword sqlFunction ST_GeomFromWKB syn keyword sqlFunction ST_LineFromText syn keyword sqlFunction ST_LineFromWKB syn keyword sqlFunction ST_MCurveFromText syn keyword sqlFunction ST_MCurveFromWKB syn keyword sqlFunction ST_MLineFromText syn keyword sqlFunction ST_MLineFromWKB syn keyword sqlFunction ST_MPointFromText syn keyword sqlFunction ST_MPointFromWKB syn keyword sqlFunction ST_MPolyFromText syn keyword sqlFunction ST_MPolyFromWKB syn keyword sqlFunction ST_MSurfaceFromTxt syn keyword sqlFunction ST_MSurfaceFromWKB syn keyword sqlFunction ST_OrderingEquals syn keyword sqlFunction ST_PointFromText syn keyword sqlFunction ST_PointFromWKB syn keyword sqlFunction ST_PolyFromText syn keyword sqlFunction ST_PolyFromWKB " Spatial Structural Methods syn keyword sqlFunction ST_CoordDim syn keyword sqlFunction ST_CurveN syn keyword sqlFunction ST_Dimension syn keyword sqlFunction ST_EndPoint syn keyword sqlFunction ST_ExteriorRing syn keyword sqlFunction ST_GeometryN syn keyword sqlFunction ST_GeometryType syn keyword sqlFunction ST_InteriorRingN syn keyword sqlFunction ST_Is3D syn keyword sqlFunction ST_IsClosed syn keyword sqlFunction ST_IsEmpty syn keyword sqlFunction ST_IsMeasured syn keyword sqlFunction ST_IsRing syn keyword sqlFunction ST_IsSimple syn keyword sqlFunction ST_IsValid syn keyword sqlFunction ST_NumCurves syn keyword sqlFunction ST_NumGeometries syn keyword sqlFunction ST_NumInteriorRing syn keyword sqlFunction ST_NumPoints syn keyword sqlFunction ST_PointN syn keyword sqlFunction ST_StartPoint "Spatial Computation syn keyword sqlFunction ST_Length syn keyword sqlFunction ST_Area syn keyword sqlFunction ST_Centroid syn keyword sqlFunction ST_Area syn keyword sqlFunction ST_Centroid syn keyword sqlFunction ST_IsWorld syn keyword sqlFunction ST_Perimeter syn keyword sqlFunction ST_PointOnSurface syn keyword sqlFunction ST_Distance " Spatial Input/Output syn keyword sqlFunction ST_AsBinary syn keyword sqlFunction ST_AsGML syn keyword sqlFunction ST_AsGeoJSON syn keyword sqlFunction ST_AsSVG syn keyword sqlFunction ST_AsSVGAggr syn keyword sqlFunction ST_AsText syn keyword sqlFunction ST_AsWKB syn keyword sqlFunction ST_AsWKT syn keyword sqlFunction ST_AsXML syn keyword sqlFunction ST_GeomFromBinary syn keyword sqlFunction ST_GeomFromShape syn keyword sqlFunction ST_GeomFromText syn keyword sqlFunction ST_GeomFromWKB syn keyword sqlFunction ST_GeomFromWKT syn keyword sqlFunction ST_GeomFromXML " Spatial Cast Methods syn keyword sqlFunction ST_CurvePolyToPoly syn keyword sqlFunction ST_CurveToLine syn keyword sqlFunction ST_ToCircular syn keyword sqlFunction ST_ToCompound syn keyword sqlFunction ST_ToCurve syn keyword sqlFunction ST_ToCurvePoly syn keyword sqlFunction ST_ToGeomColl syn keyword sqlFunction ST_ToLineString syn keyword sqlFunction ST_ToMultiCurve syn keyword sqlFunction ST_ToMultiLine syn keyword sqlFunction ST_ToMultiPoint syn keyword sqlFunction ST_ToMultiPolygon syn keyword sqlFunction ST_ToMultiSurface syn keyword sqlFunction ST_ToPoint syn keyword sqlFunction ST_ToPolygon syn keyword sqlFunction ST_ToSurface " Array functions 16.x syn keyword sqlFunction array array_agg array_max_cardinality trim_array syn keyword sqlFunction error_line error_message error_procedure syn keyword sqlFunction error_sqlcode error_sqlstate error_stack_trace " keywords syn keyword sqlKeyword absolute accent access account action active activate add address admin syn keyword sqlKeyword aes_decrypt after aggregate algorithm allow_dup_row allow allowed alter syn keyword sqlKeyword always and angular ansi_substring any as append apply syn keyword sqlKeyword arbiter array asc ascii ase syn keyword sqlKeyword assign at atan2 atomic attended syn keyword sqlKeyword audit auditing authentication authorization axis syn keyword sqlKeyword autoincrement autostop batch bcp before syn keyword sqlKeyword between bit_and bit_length bit_or bit_substr bit_xor syn keyword sqlKeyword blank blanks block syn keyword sqlKeyword both bottom unbounded breaker bufferpool syn keyword sqlKeyword build bulk by byte bytes cache calibrate calibration syn keyword sqlKeyword cancel capability cardinality cascade cast syn keyword sqlKeyword catalog catch ceil change changes char char_convert syn keyword sqlKeyword check checkpointlog checksum class classes client cmp syn keyword sqlKeyword cluster clustered collation syn keyword sqlKeyword column columns syn keyword sqlKeyword command comments committed commitid comparisons syn keyword sqlKeyword compatible component compressed compute computes syn keyword sqlKeyword concat configuration confirm conflict connection syn keyword sqlKeyword console consolidate consolidated syn keyword sqlKeyword constraint constraints content syn keyword sqlKeyword convert coordinate coordinator copy count count_set_bits syn keyword sqlKeyword crc createtime critical cross cube cume_dist syn keyword sqlKeyword current cursor data data database syn keyword sqlKeyword current_timestamp current_user cycle syn keyword sqlKeyword databases datatype dba dbfile syn keyword sqlKeyword dbspace dbspaces dbspacename debug decoupled syn keyword sqlKeyword decrypted default defaults default_dbspace deferred syn keyword sqlKeyword definer definition syn keyword sqlKeyword delay deleting delimited dependencies desc syn keyword sqlKeyword description deterministic directory syn keyword sqlKeyword disable disabled disallow distinct disksandbox disk_sandbox syn keyword sqlKeyword dn do domain download duplicate syn keyword sqlKeyword dsetpass dttm dynamic each earth editproc effective ejb syn keyword sqlKeyword elimination ellipsoid else elseif syn keyword sqlKeyword email empty enable encapsulated encrypted encryption end syn keyword sqlKeyword encoding endif engine environment erase error errors escape escapes event syn keyword sqlKeyword event_parameter every exception exclude excluded exclusive exec syn keyword sqlKeyword existing exists expanded expiry express exprtype extended_property syn keyword sqlKeyword external externlogin factor failover false syn keyword sqlKeyword fastfirstrow feature fieldproc file files filler syn keyword sqlKeyword fillfactor final finish first first_keyword first_value syn keyword sqlKeyword flattening syn keyword sqlKeyword following force foreign format forjson forxml forxml_sep fp frame syn keyword sqlKeyword free freepage french fresh full function syn keyword sqlKeyword gb generic get_bit go global grid syn keyword sqlKeyword group handler hash having header hexadecimal syn keyword sqlKeyword hidden high history hg hng hold holdlock host syn keyword sqlKeyword hours http_body http_session_timeout id identified identity ignore syn keyword sqlKeyword ignore_dup_key ignore_dup_row immediate syn keyword sqlKeyword in inactiv inactive inactivity included increment incremental syn keyword sqlKeyword index index_enabled index_lparen indexonly info information syn keyword sqlKeyword inheritance inline inner inout insensitive inserting syn keyword sqlKeyword instead syn keyword sqlKeyword internal intersection into introduced inverse invoker syn keyword sqlKeyword iq is isolation syn keyword sqlKeyword jar java java_location java_main_userid java_vm_options syn keyword sqlKeyword jconnect jdk join json kb key keys keep language last syn keyword sqlKeyword last_keyword last_value lateral latitude syn keyword sqlKeyword ld ldap left len linear lf ln level like syn keyword sqlKeyword limit local location log syn keyword sqlKeyword logging logical login logscan long longitude low lru ls syn keyword sqlKeyword main major manage manual mark master syn keyword sqlKeyword match matched materialized max maxvalue maximum mb measure median membership syn keyword sqlKeyword merge metadata methods migrate minimum minor minutes minvalue mirror syn keyword sqlKeyword mode modify monitor move mru multiplex syn keyword sqlKeyword name named namespaces national native natural new next nextval syn keyword sqlKeyword ngram no noholdlock nolock nonclustered none normal not syn keyword sqlKeyword notify null nullable_constant nulls syn keyword sqlKeyword object objects oem_string of off offline offset olap syn keyword sqlKeyword old on online only openstring operator syn keyword sqlKeyword optimization optimizer option syn keyword sqlKeyword or order ordinality organization others out outer over owner syn keyword sqlKeyword package packetsize padding page pages syn keyword sqlKeyword paglock parallel parameter parent part partial syn keyword sqlKeyword partition partitions partner password path pctfree syn keyword sqlKeyword permissions perms plan planar policy polygon populate port postfilter preceding syn keyword sqlKeyword precisionprefetch prefilter prefix preserve preview previous syn keyword sqlKeyword primary prior priority priqty private privilege privileges procedure profile profiling syn keyword sqlKeyword property_is_cumulative property_is_numeric public publication publish publisher syn keyword sqlKeyword quiesce quote quotes range readclientfile readcommitted reader readfile readonly syn keyword sqlKeyword readpast readuncommitted readwrite rebuild syn keyword sqlKeyword received recompile recover recursive references syn keyword sqlKeyword referencing regex regexp regexp_substr relative relocate syn keyword sqlKeyword rename repeatable repeatableread replicate replication syn keyword sqlKeyword requests request_timeout required rereceive resend reserve reset syn keyword sqlKeyword resizing resolve resource respect restart syn keyword sqlKeyword restrict result retain retries syn keyword sqlKeyword returns reverse right role roles syn keyword sqlKeyword rollup root row row_number rowlock rows rowtype syn keyword sqlKeyword sa_index_hash sa_internal_fk_verify sa_internal_termbreak syn keyword sqlKeyword sa_order_preserving_hash sa_order_preserving_hash_big sa_order_preserving_hash_prefix syn keyword sqlKeyword sa_file_free_pages sa_internal_type_from_catalog sa_internal_valid_hash syn keyword sqlKeyword sa_internal_validate_value sa_json_element syn keyword sqlKeyword scale schedule schema scope script scripted scroll search seconds secqty security syn keyword sqlKeyword semi send sensitive sent sequence serializable syn keyword sqlKeyword server severity session set_bit set_bits sets syn keyword sqlKeyword shapefile share side simple since site size skip syn keyword sqlKeyword snap snapshot soapheader soap_header syn keyword sqlKeyword spatial split some sorted_data syn keyword sqlKeyword sql sqlcode sqlid sqlflagger sqlstate sqrt square syn keyword sqlKeyword stacker stale state statement statistics status stddev_pop stddev_samp syn keyword sqlKeyword stemmer stogroup stoplist storage store syn keyword sqlKeyword strip stripesizekb striping subpages subscribe subscription syn keyword sqlKeyword subtransaction suser_id suser_name suspend synchronization syn keyword sqlKeyword syntax_error table tables tablock syn keyword sqlKeyword tablockx target tb temp template temporary term then ties syn keyword sqlKeyword timezone timeout tls to to_char to_nchar tolerance top syn keyword sqlKeyword trace traced_plan tracing syn keyword sqlKeyword transfer transform transaction transactional treat tries syn keyword sqlKeyword true try tsequal type tune uncommitted unconditionally syn keyword sqlKeyword unenforced unicode unique unistr unit unknown unlimited unload syn keyword sqlKeyword unpartition unquiesce updatetime updating updlock upgrade upload syn keyword sqlKeyword upper usage use user syn keyword sqlKeyword using utc utilities validproc syn keyword sqlKeyword value values varchar variable syn keyword sqlKeyword varying var_pop var_samp vcat verbosity syn keyword sqlKeyword verify versions view virtual wait syn keyword sqlKeyword warning wd web when where with with_auto syn keyword sqlKeyword with_auto with_cube with_rollup without syn keyword sqlKeyword with_lparen within word work workload write writefile syn keyword sqlKeyword writeclientfile writer writers writeserver xlock syn keyword sqlKeyword war xml zeros zone " XML syn keyword sqlKeyword raw auto elements explicit " HTTP support syn keyword sqlKeyword authorization secure url service next_soap_header " HTTP 9.0.2 new procedure keywords syn keyword sqlKeyword namespace certificate certificates clientport proxy trusted_certificates_file " OLAP support 9.0.0 syn keyword sqlKeyword covar_pop covar_samp corr regr_slope regr_intercept syn keyword sqlKeyword regr_count regr_r2 regr_avgx regr_avgy syn keyword sqlKeyword regr_sxx regr_syy regr_sxy " Alternate keywords syn keyword sqlKeyword character dec options proc reference syn keyword sqlKeyword subtrans tran syn keyword " Login Mode Options syn keyword sqlKeywordLogin standard integrated kerberos LDAPUA syn keyword sqlKeywordLogin cloudadmin mixed " Spatial Predicates syn keyword sqlKeyword ST_Contains syn keyword sqlKeyword ST_ContainsFilter syn keyword sqlKeyword ST_CoveredBy syn keyword sqlKeyword ST_CoveredByFilter syn keyword sqlKeyword ST_Covers syn keyword sqlKeyword ST_CoversFilter syn keyword sqlKeyword ST_Crosses syn keyword sqlKeyword ST_Disjoint syn keyword sqlKeyword ST_Equals syn keyword sqlKeyword ST_EqualsFilter syn keyword sqlKeyword ST_Intersects syn keyword sqlKeyword ST_IntersectsFilter syn keyword sqlKeyword ST_IntersectsRect syn keyword sqlKeyword ST_OrderingEquals syn keyword sqlKeyword ST_Overlaps syn keyword sqlKeyword ST_Relate syn keyword sqlKeyword ST_Touches syn keyword sqlKeyword ST_Within syn keyword sqlKeyword ST_WithinFilter " Spatial Set operations syn keyword sqlKeyword ST_Affine syn keyword sqlKeyword ST_Boundary syn keyword sqlKeyword ST_Buffer syn keyword sqlKeyword ST_ConvexHull syn keyword sqlKeyword ST_ConvexHullAggr syn keyword sqlKeyword ST_Difference syn keyword sqlKeyword ST_Intersection syn keyword sqlKeyword ST_IntersectionAggr syn keyword sqlKeyword ST_SymDifference syn keyword sqlKeyword ST_Union syn keyword sqlKeyword ST_UnionAggr " Spatial Bounds syn keyword sqlKeyword ST_Envelope syn keyword sqlKeyword ST_EnvelopeAggr syn keyword sqlKeyword ST_Lat syn keyword sqlKeyword ST_LatMax syn keyword sqlKeyword ST_LatMin syn keyword sqlKeyword ST_Long syn keyword sqlKeyword ST_LongMax syn keyword sqlKeyword ST_LongMin syn keyword sqlKeyword ST_M syn keyword sqlKeyword ST_MMax syn keyword sqlKeyword ST_MMin syn keyword sqlKeyword ST_Point syn keyword sqlKeyword ST_X syn keyword sqlKeyword ST_XMax syn keyword sqlKeyword ST_XMin syn keyword sqlKeyword ST_Y syn keyword sqlKeyword ST_YMax syn keyword sqlKeyword ST_YMin syn keyword sqlKeyword ST_Z syn keyword sqlKeyword ST_ZMax syn keyword sqlKeyword ST_ZMin " Spatial Collection Aggregates syn keyword sqlKeyword ST_GeomCollectionAggr syn keyword sqlKeyword ST_LineStringAggr syn keyword sqlKeyword ST_MultiCurveAggr syn keyword sqlKeyword ST_MultiLineStringAggr syn keyword sqlKeyword ST_MultiPointAggr syn keyword sqlKeyword ST_MultiPolygonAggr syn keyword sqlKeyword ST_MultiSurfaceAggr syn keyword sqlKeyword ST_Perimeter syn keyword sqlKeyword ST_PointOnSurface " Spatial SRS syn keyword sqlKeyword ST_CompareWKT syn keyword sqlKeyword ST_FormatWKT syn keyword sqlKeyword ST_ParseWKT syn keyword sqlKeyword ST_TransformGeom syn keyword sqlKeyword ST_GeometryTypeFromBaseType syn keyword sqlKeyword ST_SnapToGrid syn keyword sqlKeyword ST_Transform syn keyword sqlKeyword ST_SRID syn keyword sqlKeyword ST_SRIDFromBaseType syn keyword sqlKeyword ST_LoadConfigurationData " Spatial Indexes syn keyword sqlKeyword ST_LinearHash syn keyword sqlKeyword ST_LinearUnHash syn keyword sqlOperator in any some all between exists syn keyword sqlOperator like escape not is and or syn keyword sqlOperator minus syn keyword sqlOperator prior distinct unnest syn keyword sqlStatement allocate alter attach backup begin break call case catch syn keyword sqlStatement checkpoint clear close comment commit configure connect syn keyword sqlStatement continue create deallocate declare delete describe syn keyword sqlStatement detach disconnect drop except execute exit explain fetch syn keyword sqlStatement for forward from get goto grant help if include syn keyword sqlStatement input insert install intersect leave load lock loop syn keyword sqlStatement message open output parameters passthrough syn keyword sqlStatement prepare print put raiserror read readtext refresh release syn keyword sqlStatement remote remove reorganize resignal restore resume syn keyword sqlStatement return revoke rollback save savepoint select syn keyword sqlStatement set setuser signal start stop synchronize syn keyword sqlStatement system trigger truncate try union unload update syn keyword sqlStatement validate waitfor whenever while window writetext syn keyword sqlType char nchar long varchar nvarchar text ntext uniqueidentifierstr xml syn keyword sqlType bigint bit decimal double varbit syn keyword sqlType float int integer numeric syn keyword sqlType smallint tinyint real syn keyword sqlType money smallmoney syn keyword sqlType date datetime datetimeoffset smalldatetime time timestamp syn keyword sqlType binary image varray varbinary uniqueidentifier syn keyword sqlType unsigned " Spatial types syn keyword sqlType st_geometry st_point st_curve st_surface st_geomcollection syn keyword sqlType st_linestring st_circularstring st_compoundcurve syn keyword sqlType st_curvepolygon st_polygon syn keyword sqlType st_multipoint st_multicurve st_multisurface syn keyword sqlType st_multilinestring st_multipolygon syn keyword sqlOption Allow_nulls_by_default syn keyword sqlOption Allow_read_client_file syn keyword sqlOption Allow_snapshot_isolation syn keyword sqlOption Allow_write_client_file syn keyword sqlOption Ansi_blanks syn keyword sqlOption Ansi_close_cursors_on_rollback syn keyword sqlOption Ansi_permissions syn keyword sqlOption Ansi_substring syn keyword sqlOption Ansi_update_constraints syn keyword sqlOption Ansinull syn keyword sqlOption Auditing syn keyword sqlOption Auditing_options syn keyword sqlOption Auto_commit_on_create_local_temp_index syn keyword sqlOption Background_priority syn keyword sqlOption Blocking syn keyword sqlOption Blocking_others_timeout syn keyword sqlOption Blocking_timeout syn keyword sqlOption Chained syn keyword sqlOption Checkpoint_time syn keyword sqlOption Cis_option syn keyword sqlOption Cis_rowset_size syn keyword sqlOption Close_on_endtrans syn keyword sqlOption Collect_statistics_on_dml_updates syn keyword sqlOption Conn_auditing syn keyword sqlOption Connection_authentication syn keyword sqlOption Continue_after_raiserror syn keyword sqlOption Conversion_error syn keyword sqlOption Cooperative_commit_timeout syn keyword sqlOption Cooperative_commits syn keyword sqlOption Database_authentication syn keyword sqlOption Date_format syn keyword sqlOption Date_order syn keyword sqlOption db_publisher syn keyword sqlOption Debug_messages syn keyword sqlOption Dedicated_task syn keyword sqlOption Default_dbspace syn keyword sqlOption Default_timestamp_increment syn keyword sqlOption Delayed_commit_timeout syn keyword sqlOption Delayed_commits syn keyword sqlOption Divide_by_zero_error syn keyword sqlOption Escape_character syn keyword sqlOption Exclude_operators syn keyword sqlOption Extended_join_syntax syn keyword sqlOption Extern_login_credentials syn keyword sqlOption Fire_triggers syn keyword sqlOption First_day_of_week syn keyword sqlOption For_xml_null_treatment syn keyword sqlOption Force_view_creation syn keyword sqlOption Global_database_id syn keyword sqlOption Http_session_timeout syn keyword sqlOption Http_connection_pool_basesize syn keyword sqlOption Http_connection_pool_timeout syn keyword sqlOption Integrated_server_name syn keyword sqlOption Isolation_level syn keyword sqlOption Java_class_path syn keyword sqlOption Java_location syn keyword sqlOption Java_main_userid syn keyword sqlOption Java_vm_options syn keyword sqlOption Lock_rejected_rows syn keyword sqlOption Log_deadlocks syn keyword sqlOption Login_mode syn keyword sqlOption Login_procedure syn keyword sqlOption Materialized_view_optimization syn keyword sqlOption Max_client_statements_cached syn keyword sqlOption Max_cursor_count syn keyword sqlOption Max_hash_size syn keyword sqlOption Max_plans_cached syn keyword sqlOption Max_priority syn keyword sqlOption Max_query_tasks syn keyword sqlOption Max_recursive_iterations syn keyword sqlOption Max_statement_count syn keyword sqlOption Max_temp_space syn keyword sqlOption Min_password_length syn keyword sqlOption Min_role_admins syn keyword sqlOption Nearest_century syn keyword sqlOption Non_keywords syn keyword sqlOption Odbc_describe_binary_as_varbinary syn keyword sqlOption Odbc_distinguish_char_and_varchar syn keyword sqlOption Oem_string syn keyword sqlOption On_charset_conversion_failure syn keyword sqlOption On_tsql_error syn keyword sqlOption Optimization_goal syn keyword sqlOption Optimization_level syn keyword sqlOption Optimization_workload syn keyword sqlOption Pinned_cursor_percent_of_cache syn keyword sqlOption Post_login_procedure syn keyword sqlOption Precision syn keyword sqlOption Prefetch syn keyword sqlOption Preserve_source_format syn keyword sqlOption Prevent_article_pkey_update syn keyword sqlOption Priority syn keyword sqlOption Progress_messages syn keyword sqlOption Query_mem_timeout syn keyword sqlOption Quoted_identifier syn keyword sqlOption Read_past_deleted syn keyword sqlOption Recovery_time syn keyword sqlOption Remote_idle_timeout syn keyword sqlOption Replicate_all syn keyword sqlOption Request_timeout syn keyword sqlOption Reserved_keywords syn keyword sqlOption Return_date_time_as_string syn keyword sqlOption Rollback_on_deadlock syn keyword sqlOption Row_counts syn keyword sqlOption Scale syn keyword sqlOption Secure_feature_key syn keyword sqlOption Sort_collation syn keyword sqlOption Sql_flagger_error_level syn keyword sqlOption Sql_flagger_warning_level syn keyword sqlOption String_rtruncation syn keyword sqlOption st_geometry_asbinary_format syn keyword sqlOption st_geometry_astext_format syn keyword sqlOption st_geometry_asxml_format syn keyword sqlOption st_geometry_describe_type syn keyword sqlOption st_geometry_interpolation syn keyword sqlOption st_geometry_on_invalid syn keyword sqlOption Subsume_row_locks syn keyword sqlOption Suppress_tds_debugging syn keyword sqlOption Synchronize_mirror_on_commit syn keyword sqlOption Tds_empty_string_is_null syn keyword sqlOption Temp_space_limit_check syn keyword sqlOption Time_format syn keyword sqlOption Time_zone_adjustment syn keyword sqlOption Timestamp_format syn keyword sqlOption Timestamp_with_time_zone_format syn keyword sqlOption Truncate_timestamp_values syn keyword sqlOption Tsql_outer_joins syn keyword sqlOption Tsql_variables syn keyword sqlOption Updatable_statement_isolation syn keyword sqlOption Update_statistics syn keyword sqlOption Upgrade_database_capability syn keyword sqlOption User_estimates syn keyword sqlOption Uuid_has_hyphens syn keyword sqlOption Verify_password_function syn keyword sqlOption Wait_for_commit syn keyword sqlOption Webservice_namespace_host syn keyword sqlOption Webservice_sessionid_name " Strings and characters: syn region sqlString start=+"+ end=+"+ contains=@Spell syn region sqlString start=+'+ end=+'+ contains=@Spell " Numbers: syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" " Comments: syn region sqlDashComment start=/--/ end=/$/ contains=@Spell syn region sqlSlashComment start=/\/\// end=/$/ contains=@Spell syn region sqlMultiComment start="/\*" end="\*/" contains=sqlMultiComment,@Spell syn cluster sqlComment contains=sqlDashComment,sqlSlashComment,sqlMultiComment,@Spell syn sync ccomment sqlComment syn sync ccomment sqlDashComment syn sync ccomment sqlSlashComment hi def link sqlDashComment Comment hi def link sqlSlashComment Comment hi def link sqlMultiComment Comment hi def link sqlNumber Number hi def link sqlOperator Operator hi def link sqlSpecial Special hi def link sqlKeyword Keyword hi def link sqlStatement Statement hi def link sqlString String hi def link sqlType Type hi def link sqlFunction Function hi def link sqlOption PreProc let b:current_syntax = "sqlanywhere" " vim:sw=4: neovim-0.2.2/runtime/syntax/sqlforms.vim000066400000000000000000000151161320401574200204060ustar00rootroot00000000000000" Vim syntax file " Language: SQL*Forms (Oracle 7), based on sql.vim (vim5.0) " Maintainer: Austin Ziegler (austin@halostatue.ca) " Last Change: 2003 May 11 " Prev Change: 19980710 " URL: http://www.halostatue.ca/vim/syntax/proc.vim " " TODO Find a new maintainer who knows SQL*Forms. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syntax case ignore setlocal iskeyword=a-z,A-Z,48-57,_,.,-,> " The SQL reserved words, defined as keywords. syntax match sqlTriggers /on-.*$/ syntax match sqlTriggers /key-.*$/ syntax match sqlTriggers /post-.*$/ syntax match sqlTriggers /pre-.*$/ syntax match sqlTriggers /user-.*$/ syntax keyword sqlSpecial null false true syntax keyword sqlProcedure abort_query anchor_view bell block_menu break call syntax keyword sqlProcedure call_input call_query clear_block clear_eol syntax keyword sqlProcedure clear_field clear_form clear_record commit_form syntax keyword sqlProcedure copy count_query create_record default_value syntax keyword sqlProcedure delete_record display_error display_field down syntax keyword sqlProcedure duplicate_field duplicate_record edit_field syntax keyword sqlProcedure enter enter_query erase execute_query syntax keyword sqlProcedure execute_trigger exit_form first_Record go_block syntax keyword sqlProcedure go_field go_record help hide_menu hide_page host syntax keyword sqlProcedure last_record list_values lock_record message syntax keyword sqlProcedure move_view new_form next_block next_field next_key syntax keyword sqlProcedure next_record next_set pause post previous_block syntax keyword sqlProcedure previous_field previous_record print redisplay syntax keyword sqlProcedure replace_menu resize_view scroll_down scroll_up syntax keyword sqlProcedure set_field show_keys show_menu show_page syntax keyword sqlProcedure synchronize up user_exit syntax keyword sqlFunction block_characteristic error_code error_text syntax keyword sqlFunction error_type field_characteristic form_failure syntax keyword sqlFunction form_fatal form_success name_in syntax keyword sqlParameters hide no_hide replace no_replace ask_commit syntax keyword sqlParameters do_commit no_commit no_validate all_records syntax keyword sqlParameters for_update no_restrict restrict no_screen syntax keyword sqlParameters bar full_screen pull_down auto_help auto_skip syntax keyword sqlParameters fixed_length enterable required echo queryable syntax keyword sqlParameters updateable update_null upper_case attr_on syntax keyword sqlParameters attr_off base_table first_field last_field syntax keyword sqlParameters datatype displayed display_length field_length syntax keyword sqlParameters list page primary_key query_length x_pos y_pos syntax match sqlSystem /system\.block_status/ syntax match sqlSystem /system\.current_block/ syntax match sqlSystem /system\.current_field/ syntax match sqlSystem /system\.current_form/ syntax match sqlSystem /system\.current_value/ syntax match sqlSystem /system\.cursor_block/ syntax match sqlSystem /system\.cursor_field/ syntax match sqlSystem /system\.cursor_record/ syntax match sqlSystem /system\.cursor_value/ syntax match sqlSystem /system\.form_status/ syntax match sqlSystem /system\.last_query/ syntax match sqlSystem /system\.last_record/ syntax match sqlSystem /system\.message_level/ syntax match sqlSystem /system\.record_status/ syntax match sqlSystem /system\.trigger_block/ syntax match sqlSystem /system\.trigger_field/ syntax match sqlSystem /system\.trigger_record/ syntax match sqlSystem /\$\$date\$\$/ syntax match sqlSystem /\$\$time\$\$/ syntax keyword sqlKeyword accept access add as asc by check cluster column syntax keyword sqlKeyword compress connect current decimal default syntax keyword sqlKeyword desc exclusive file for from group syntax keyword sqlKeyword having identified immediate increment index syntax keyword sqlKeyword initial into is level maxextents mode modify syntax keyword sqlKeyword nocompress nowait of offline on online start syntax keyword sqlKeyword successful synonym table to trigger uid syntax keyword sqlKeyword unique user validate values view whenever syntax keyword sqlKeyword where with option order pctfree privileges syntax keyword sqlKeyword public resource row rowlabel rownum rows syntax keyword sqlKeyword session share size smallint sql\*forms_version syntax keyword sqlKeyword terse define form name title procedure begin syntax keyword sqlKeyword default_menu_application trigger block field syntax keyword sqlKeyword enddefine declare exception raise when cursor syntax keyword sqlKeyword definition base_table pragma syntax keyword sqlKeyword column_name global trigger_type text description syntax match sqlKeyword "<<<" syntax match sqlKeyword ">>>" syntax keyword sqlOperator not and or out to_number to_date message erase syntax keyword sqlOperator in any some all between exists substr nvl syntax keyword sqlOperator exception_init syntax keyword sqlOperator like escape trunc lpad rpad sum syntax keyword sqlOperator union intersect minus to_char greatest syntax keyword sqlOperator prior distinct decode least avg syntax keyword sqlOperator sysdate true false field_characteristic syntax keyword sqlOperator display_field call host syntax keyword sqlStatement alter analyze audit comment commit create syntax keyword sqlStatement delete drop explain grant insert lock noaudit syntax keyword sqlStatement rename revoke rollback savepoint select set syntax keyword sqlStatement truncate update if elsif loop then syntax keyword sqlStatement open fetch close else end syntax keyword sqlType char character date long raw mlslabel number rowid syntax keyword sqlType varchar varchar2 float integer boolean global syntax keyword sqlCodes sqlcode no_data_found too_many_rows others syntax keyword sqlCodes form_trigger_failure notfound found syntax keyword sqlCodes validate no_commit " Comments: syntax region sqlComment start="/\*" end="\*/" syntax match sqlComment "--.*" " Strings and characters: syntax region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ syntax region sqlString start=+'+ skip=+\\\\\|\\"+ end=+'+ " Numbers: syntax match sqlNumber "-\=\<[0-9]*\.\=[0-9_]\>" syntax sync ccomment sqlComment hi def link sqlComment Comment hi def link sqlKeyword Statement hi def link sqlNumber Number hi def link sqlOperator Statement hi def link sqlProcedure Statement hi def link sqlFunction Statement hi def link sqlSystem Identifier hi def link sqlSpecial Special hi def link sqlStatement Statement hi def link sqlString String hi def link sqlType Type hi def link sqlCodes Identifier hi def link sqlTriggers PreProc let b:current_syntax = "sqlforms" " vim: ts=8 sw=4 neovim-0.2.2/runtime/syntax/sqlhana.vim000066400000000000000000000254231320401574200201710ustar00rootroot00000000000000" Vim syntax file " Language: SQL, SAP HANA In Memory Database " Maintainer: David Fishburn " Last Change: 2012 Oct 23 " Version: SP4 b (Q2 2012) " Homepage: http://www.vim.org/scripts/script.php?script_id=4275 " Description: Updated to SAP HANA SP4 " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " The SQL reserved words, defined as keywords. " These were pulled from the following SQL reference: " http://help.sap.com/hana/hana_sql_en.pdf " An easy approach is to copy all text from the PDF " into a Vim buffer. The keywords are in UPPER case, " so you can run the following commands to be left with " mainly the UPPER case words: " 1. Delete all words that do not begin with a Capital " %s/\(\<[^A-Z]\w*\>\)//g " 2. Remove all words where the 2nd letter is not a Capital " %s/\(\<[A-Z][^A-Z]\w*\>\)//g " 3. Remove all non-word (or space) characters " %s/[^0-9A-Za-z_ ]*//g " 4. Remove some known words " %s/\<\(SAP\|HANA\|OK\|AG\|IBM\|DB2\|AIX\|POWER\d\+\|UNIX\)\>//g " 5. Remove blank lines and trailing spaces " %s/\s\+$//g " %s/^\s\+//g " %s/^$\n//g " 6. Convert spaces to newlines remove single character " %s/[ ]\+/\r/g " %g/^\w$/d " 7. Sort and remove duplicates " :sort " :Uniq " 8. Use the WhatsMissing plugin against the sqlhana.vim file. " 9. Generated a file of all UPPER cased words which should not " be in the syntax file. These items should be removed " from the list in step 7. You can use WhatsNotMissing " between step 7 and this new file to weed out the words " we know are not syntax related. " 10. Use the WhatsMissingRemoveMatches to remove the words " from step 9. syn keyword sqlSpecial false null true " Supported Functions for Date/Time types syn keyword sqlFunction ADD_DAYS ADD_MONTHS ADD_SECONDS ADD_YEARS COALESCE syn keyword sqlFunction CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_UTCDATE syn keyword sqlFunction CURRENT_UTCTIME CURRENT_UTCTIMESTAMP syn keyword sqlFunction DAYNAME DAYOFMONTH DAYOFYEAR DAYS_BETWEEN EXTRACT syn keyword sqlFunction GREATEST HOUR IFNULL ISOWEEK LAST_DAY LEAST LOCALTOUTC syn keyword sqlFunction MINUTE MONTH MONTHNAME NEXT_DAY NOW QUARTER SECOND syn keyword sqlFunction SECONDS_BETWEEN UTCTOLOCAL WEEK WEEKDAY YEAR syn keyword sqlFunction TO_CHAR TO_DATE TO_DATS TO_NCHAR TO_TIME TO_TIMESTAMP UTCTOLOCAL " Aggregate syn keyword sqlFunction COUNT MIN MAX SUM AVG STDDEV VAR " Datatype conversion syn keyword sqlFunction CAST TO_ALPHANUM TO_BIGINT TO_BINARY TO_BLOB TO_CHAR TO_CLOB syn keyword sqlFunction TO_DATE TO_DATS TO_DECIMAL TO_DOUBLE TO_INT TO_INTEGER TO_NCHAR syn keyword sqlFunction TO_NCLOB TO_NVARCHAR TO_REAL TO_SECONDDATE TO_SMALLDECIMAL syn keyword sqlFunction TO_SMALLINT TO_TIME TO_TIMESTAMP TO_TINYINT TO_VARCHAR TO_VARBINARY " Number functions syn keyword sqlFunction ABS ACOS ASIN ATAN ATAN2 BINTOHEX BITAND CEIL COS COSH COT syn keyword sqlFunction EXP FLOOR GREATEST HEXTOBIN LEAST LN LOG MOD POWER ROUND syn keyword sqlFunction SIGN SIN SINH SQRT TAN TANH UMINUS " String functions syn keyword sqlFunction ASCII CHAR CONCAT LCASE LENGTH LOCATE LOWER LPAD LTRIM syn keyword sqlFunction NCHAR REPLACE RPAD RTRIM SUBSTR_AFTER SUBSTR_BEFORE syn keyword sqlFunction SUBSTRING TRIM UCASE UNICODE UPPER " Miscellaneous functions syn keyword sqlFunction COALESCE CURRENT_CONNECTION CURRENT_SCHEMA CURRENT_USER syn keyword sqlFunction GROUPING_ID IFNULL MAP NULLIF SESSION_CONTEXT SESSION_USER SYSUUIDSQL syn keyword sqlFunction GET_NUM_SERVERS " sp_ procedures " syn keyword sqlFunction sp_addalias " Reserved keywords syn keyword sqlkeyword ALL AS AT BEFORE syn keyword sqlkeyword BEGIN BOTH BY syn keyword sqlkeyword CONDITION syn keyword sqlkeyword CURRVAL CURSOR DECLARE syn keyword sqlkeyword DISTINCT DO ELSE ELSEIF ELSIF syn keyword sqlkeyword END EXCEPTION EXEC syn keyword sqlkeyword FOR FROM GROUP syn keyword sqlkeyword HAVING IN syn keyword sqlkeyword INOUT INTO IS syn keyword sqlkeyword LEADING syn keyword sqlkeyword LOOP MINUS NATURAL NEXTVAL syn keyword sqlkeyword OF ON ORDER OUT syn keyword sqlkeyword PRIOR RETURN RETURNS REVERSE syn keyword sqlkeyword ROWID SELECT syn keyword sqlkeyword SQL START STOP SYSDATE syn keyword sqlkeyword SYSTIME SYSTIMESTAMP SYSUUID syn keyword sqlkeyword TRAILING USING UTCDATE syn keyword sqlkeyword UTCTIME UTCTIMESTAMP VALUES syn keyword sqlkeyword WHILE syn keyword sqlkeyword ANY SOME EXISTS ESCAPE " IF keywords syn keyword sqlkeyword IF " CASE keywords syn keyword sqlKeyword WHEN THEN " Syntax rules common to TEXT and SHORTTEXT keywords syn keyword sqlKeyword LANGUAGE DETECTION LINGUISTIC syn keyword sqlkeyword MIME TYPE syn keyword sqlkeyword EXACT WEIGHT FUZZY FUZZINESSTHRESHOLD SEARCH syn keyword sqlkeyword PHRASE INDEX RATIO REBUILD syn keyword sqlkeyword CONFIGURATION syn keyword sqlkeyword SEARCH ONLY syn keyword sqlkeyword FAST PREPROCESS syn keyword sqlkeyword SYNC SYNCHRONOUS ASYNC ASYNCHRONOUS FLUSH QUEUE syn keyword sqlkeyword EVERY AFTER MINUTES DOCUMENTS SUSPEND " Statement keywords (i.e. after ALTER or CREATE) syn keyword sqlkeyword AUDIT POLICY syn keyword sqlkeyword FULLTEXT syn keyword sqlkeyword SEQUENCE RESTART syn keyword sqlkeyword TABLE syn keyword sqlkeyword PROCEDURE STATISTICS syn keyword sqlkeyword SCHEMA syn keyword sqlkeyword SYNONYM syn keyword sqlkeyword VIEW syn keyword sqlkeyword COLUMN syn keyword sqlkeyword SYSTEM LICENSE syn keyword sqlkeyword SESSION syn keyword sqlkeyword CANCEL WORK syn keyword sqlkeyword PLAN CACHE syn keyword sqlkeyword LOGGING NOLOGGING RETENTION syn keyword sqlkeyword RECONFIGURE SERVICE syn keyword sqlkeyword RESET MONITORING syn keyword sqlkeyword SAVE DURATION PERFTRACE FUNCTION_PROFILER syn keyword sqlkeyword SAVEPOINT syn keyword sqlkeyword USER syn keyword sqlkeyword ROLE syn keyword sqlkeyword ASC DESC syn keyword sqlkeyword OWNED syn keyword sqlkeyword DEPENDENCIES SCRAMBLE " Create sequence syn keyword sqlkeyword INCREMENT MAXVALUE MINVALUE CYCLE " Create table syn keyword sqlkeyword HISTORY GLOBAL LOCAL TEMPORARY " Create trigger syn keyword sqlkeyword TRIGGER REFERENCING EACH DEFAULT syn keyword sqlkeyword SIGNAL RESIGNAL MESSAGE_TEXT OLD NEW syn keyword sqlkeyword EXIT HANDLER SQL_ERROR_CODE syn keyword sqlkeyword TARGET CONDITION SIGNAL " Alter table syn keyword sqlkeyword ADD DROP MODIFY GENERATED ALWAYS syn keyword sqlkeyword UNIQUE BTREE CPBTREE PRIMARY KEY syn keyword sqlkeyword CONSTRAINT PRELOAD NONE syn keyword sqlkeyword ROW THREADS BATCH syn keyword sqlkeyword MOVE PARTITION TO LOCATION PHYSICAL OTHERS syn keyword sqlkeyword ROUNDROBIN PARTITIONS HASH RANGE VALUE syn keyword sqlkeyword PERSISTENT DELTA AUTO AUTOMERGE " Create audit policy syn keyword sqlkeyword AUDITING SUCCESSFUL UNSUCCESSFUL syn keyword sqlkeyword PRIVILEGE STRUCTURED CHANGE LEVEL syn keyword sqlkeyword EMERGENCY ALERT CRITICAL WARNING INFO " Privileges syn keyword sqlkeyword DEBUG EXECUTE " Schema syn keyword sqlkeyword CASCADE RESTRICT PARAMETERS SCAN " Traces syn keyword sqlkeyword CLIENT CRASHDUMP EMERGENCYDUMP syn keyword sqlkeyword INDEXSERVER NAMESERVER DAEMON syn keyword sqlkeyword CLEAR REMOVE TRACES " Reclaim syn keyword sqlkeyword RECLAIM DATA VOLUME VERSION SPACE DEFRAGMENT SPARSIFY " Join syn keyword sqlkeyword INNER OUTER LEFT RIGHT FULL CROSS JOIN syn keyword sqlkeyword GROUPING SETS ROLLUP CUBE syn keyword sqlkeyword BEST LIMIT OFFSET syn keyword sqlkeyword WITH SUBTOTAL BALANCE TOTAL syn keyword sqlkeyword TEXT_FILTER FILL UP SORT MATCHES TOP syn keyword sqlkeyword RESULT OVERVIEW PREFIX MULTIPLE RESULTSETS " Lock syn keyword sqlkeyword EXCLUSIVE MODE NOWAIT " Transaction syn keyword sqlkeyword TRANSACTION ISOLATION READ COMMITTED syn keyword sqlkeyword REPEATABLE SERIALIZABLE WRITE " Saml syn keyword sqlkeyword SAML ASSERTION PROVIDER SUBJECT ISSUER " User syn keyword sqlkeyword PASSWORD IDENTIFIED EXTERNALLY ATTEMPTS ATTEMPTS syn keyword sqlkeyword ENABLE DISABLE OFF LIFETIME FORCE DEACTIVATE syn keyword sqlkeyword ACTIVATE IDENTITY KERBEROS " Grant syn keyword sqlkeyword ADMIN BACKUP CATALOG SCENARIO INIFILE MONITOR syn keyword sqlkeyword OPTIMIZER OPTION syn keyword sqlkeyword RESOURCE STRUCTUREDPRIVILEGE TRACE " Import syn keyword sqlkeyword CSV FILE CONTROL NO CHECK SKIP FIRST LIST syn keyword sqlkeyword RECORD DELIMITED FIELD OPTIONALLY ENCLOSED FORMAT " Roles syn keyword sqlkeyword PUBLIC CONTENT_ADMIN MODELING MONITORING " Miscellaneous syn keyword sqlkeyword APPLICATION BINARY IMMEDIATE COREFILE SECURITY DEFINER syn keyword sqlkeyword DUMMY INVOKER MATERIALIZED MESSEGE_TEXT PARAMETER PARAMETERS syn keyword sqlkeyword PART syn keyword sqlkeyword CONSTANT SQLEXCEPTION SQLWARNING syn keyword sqlOperator WHERE BETWEEN LIKE NULL CONTAINS syn keyword sqlOperator AND OR NOT CASE syn keyword sqlOperator UNION INTERSECT EXCEPT syn keyword sqlStatement ALTER CALL CALLS CREATE DROP RENAME TRUNCATE syn keyword sqlStatement DELETE INSERT UPDATE EXPLAIN syn keyword sqlStatement MERGE REPLACE UPSERT SELECT syn keyword sqlStatement SET UNSET LOAD UNLOAD syn keyword sqlStatement CONNECT DISCONNECT COMMIT LOCK ROLLBACK syn keyword sqlStatement GRANT REVOKE syn keyword sqlStatement EXPORT IMPORT syn keyword sqlType DATE TIME SECONDDATE TIMESTAMP TINYINT SMALLINT syn keyword sqlType INT INTEGER BIGINT SMALLDECIMAL DECIMAL syn keyword sqlType REAL DOUBLE FLOAT syn keyword sqlType VARCHAR NVARCHAR ALPHANUM SHORTTEXT VARBINARY syn keyword sqlType BLOB CLOB NCLOB TEXT DAYDATE syn keyword sqlOption Webservice_namespace_host " Strings and characters: syn region sqlString start=+"+ end=+"+ contains=@Spell syn region sqlString start=+'+ end=+'+ contains=@Spell " Numbers: syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" " Comments: syn region sqlDashComment start=/--/ end=/$/ contains=@Spell syn region sqlSlashComment start=/\/\// end=/$/ contains=@Spell syn region sqlMultiComment start="/\*" end="\*/" contains=sqlMultiComment,@Spell syn cluster sqlComment contains=sqlDashComment,sqlSlashComment,sqlMultiComment,@Spell syn sync ccomment sqlComment syn sync ccomment sqlDashComment syn sync ccomment sqlSlashComment hi def link sqlDashComment Comment hi def link sqlSlashComment Comment hi def link sqlMultiComment Comment hi def link sqlNumber Number hi def link sqlOperator Operator hi def link sqlSpecial Special hi def link sqlKeyword Keyword hi def link sqlStatement Statement hi def link sqlString String hi def link sqlType Type hi def link sqlFunction Function hi def link sqlOption PreProc let b:current_syntax = "sqlhana" " vim:sw=4: neovim-0.2.2/runtime/syntax/sqlinformix.vim000066400000000000000000000134151320401574200211130ustar00rootroot00000000000000" Vim syntax file " Informix Structured Query Language (SQL) and Stored Procedure Language (SPL) " Language: SQL, SPL (Informix Dynamic Server 2000 v9.2) " Maintainer: Dean Hill " Last Change: 2004 Aug 30 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " === Comment syntax group === syn region sqlComment start="{" end="}" contains=sqlTodo syn match sqlComment "--.*$" contains=sqlTodo syn sync ccomment sqlComment " === Constant syntax group === " = Boolean subgroup = syn keyword sqlBoolean true false syn keyword sqlBoolean null syn keyword sqlBoolean public user syn keyword sqlBoolean current today syn keyword sqlBoolean year month day hour minute second fraction " = String subgroup = syn region sqlString start=+"+ end=+"+ syn region sqlString start=+'+ end=+'+ " = Numbers subgroup = syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" " === Statement syntax group === " SQL syn keyword sqlStatement allocate alter syn keyword sqlStatement begin syn keyword sqlStatement close commit connect create syn keyword sqlStatement database deallocate declare delete describe disconnect drop syn keyword sqlStatement execute fetch flush free get grant info insert syn keyword sqlStatement load lock open output syn keyword sqlStatement prepare put syn keyword sqlStatement rename revoke rollback select set start stop syn keyword sqlStatement truncate unload unlock update syn keyword sqlStatement whenever " SPL syn keyword sqlStatement call continue define syn keyword sqlStatement exit syn keyword sqlStatement let syn keyword sqlStatement return system trace " = Conditional subgroup = " SPL syn keyword sqlConditional elif else if then syn keyword sqlConditional case " Highlight "end if" with one or more separating spaces syn match sqlConditional "end \+if" " = Repeat subgroup = " SQL/SPL " Handle SQL triggers' "for each row" clause and SPL "for" loop syn match sqlRepeat "for\( \+each \+row\)\=" " SPL syn keyword sqlRepeat foreach while " Highlight "end for", etc. with one or more separating spaces syn match sqlRepeat "end \+for" syn match sqlRepeat "end \+foreach" syn match sqlRepeat "end \+while" " = Exception subgroup = " SPL syn match sqlException "on \+exception" syn match sqlException "end \+exception" syn match sqlException "end \+exception \+with \+resume" syn match sqlException "raise \+exception" " = Keyword subgroup = " SQL syn keyword sqlKeyword aggregate add as authorization autofree by syn keyword sqlKeyword cache cascade check cluster collation syn keyword sqlKeyword column connection constraint cross syn keyword sqlKeyword dataskip debug default deferred_prepare syn keyword sqlKeyword descriptor diagnostics syn keyword sqlKeyword each escape explain external syn keyword sqlKeyword file foreign fragment from function syn keyword sqlKeyword group having syn keyword sqlKeyword immediate index inner into isolation syn keyword sqlKeyword join key syn keyword sqlKeyword left level log syn keyword sqlKeyword mode modify mounting new no syn keyword sqlKeyword object of old optical option syn keyword sqlKeyword optimization order outer syn keyword sqlKeyword pdqpriority pload primary procedure syn keyword sqlKeyword references referencing release reserve syn keyword sqlKeyword residency right role routine row syn keyword sqlKeyword schedule schema scratch session set syn keyword sqlKeyword statement statistics synonym syn keyword sqlKeyword table temp temporary timeout to transaction trigger syn keyword sqlKeyword using values view violations syn keyword sqlKeyword where with work " Highlight "on" (if it's not followed by some words we've already handled) syn match sqlKeyword "on \+\(exception\)\@!" " SPL " Highlight "end" (if it's not followed by some words we've already handled) syn match sqlKeyword "end \+\(if\|for\|foreach\|while\|exception\)\@!" syn keyword sqlKeyword resume returning " = Operator subgroup = " SQL syn keyword sqlOperator not and or syn keyword sqlOperator in is any some all between exists syn keyword sqlOperator like matches syn keyword sqlOperator union intersect syn keyword sqlOperator distinct unique " === Identifier syntax group === " = Function subgroup = " SQL syn keyword sqlFunction abs acos asin atan atan2 avg syn keyword sqlFunction cardinality cast char_length character_length cos count syn keyword sqlFunction exp filetoblob filetoclob hex syn keyword sqlFunction initcap length logn log10 lower lpad syn keyword sqlFunction min max mod octet_length pow range replace root round rpad syn keyword sqlFunction sin sqrt stdev substr substring sum syn keyword sqlFunction to_char tan to_date trim trunc upper variance " === Type syntax group === " SQL syn keyword sqlType blob boolean byte char character clob syn keyword sqlType date datetime dec decimal double syn keyword sqlType float int int8 integer interval list lvarchar syn keyword sqlType money multiset nchar numeric nvarchar syn keyword sqlType real serial serial8 smallfloat smallint syn keyword sqlType text varchar varying " === Todo syntax group === syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE " Define the default highlighting. " Only when an item doesn't have highlighting yet " === Comment syntax group === hi def link sqlComment Comment " === Constant syntax group === hi def link sqlNumber Number hi def link sqlBoolean Boolean hi def link sqlString String " === Statment syntax group === hi def link sqlStatement Statement hi def link sqlConditional Conditional hi def link sqlRepeat Repeat hi def link sqlKeyword Keyword hi def link sqlOperator Operator hi def link sqlException Exception " === Identifier syntax group === hi def link sqlFunction Function " === Type syntax group === hi def link sqlType Type " === Todo syntax group === hi def link sqlTodo Todo let b:current_syntax = "sqlinformix" neovim-0.2.2/runtime/syntax/sqlj.vim000066400000000000000000000056321320401574200175130ustar00rootroot00000000000000" Vim syntax file " Language: sqlj " Maintainer: Andreas Fischbach " This file is based on sql.vim && java.vim (thanx) " with a handful of additional sql words and still " a subset of whatever standard " Last change: 31th Dec 2001 " au BufNewFile,BufRead *.sqlj so $VIM/syntax/sqlj.vim " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Read the Java syntax to start with source :p:h/java.vim " SQLJ extentions " The SQL reserved words, defined as keywords. syn case ignore syn keyword sqljSpecial null syn keyword sqljKeyword access add as asc by check cluster column syn keyword sqljKeyword compress connect current decimal default syn keyword sqljKeyword desc else exclusive file for from group syn keyword sqljKeyword having identified immediate increment index syn keyword sqljKeyword initial into is level maxextents mode modify syn keyword sqljKeyword nocompress nowait of offline on online start syn keyword sqljKeyword successful synonym table then to trigger uid syn keyword sqljKeyword unique user validate values view whenever syn keyword sqljKeyword where with option order pctfree privileges syn keyword sqljKeyword public resource row rowlabel rownum rows syn keyword sqljKeyword session share size smallint syn keyword sqljKeyword fetch database context iterator field join syn keyword sqljKeyword foreign outer inner isolation left right syn keyword sqljKeyword match primary key syn keyword sqljOperator not and or syn keyword sqljOperator in any some all between exists syn keyword sqljOperator like escape syn keyword sqljOperator union intersect minus syn keyword sqljOperator prior distinct syn keyword sqljOperator sysdate syn keyword sqljOperator max min avg sum count hex syn keyword sqljStatement alter analyze audit comment commit create syn keyword sqljStatement delete drop explain grant insert lock noaudit syn keyword sqljStatement rename revoke rollback savepoint select set syn keyword sqljStatement truncate update begin work syn keyword sqljType char character date long raw mlslabel number syn keyword sqljType rowid varchar varchar2 float integer syn keyword sqljType byte text serial " Strings and characters: syn region sqljString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region sqljString start=+'+ skip=+\\\\\|\\"+ end=+'+ " Numbers: syn match sqljNumber "-\=\<\d*\.\=[0-9_]\>" " PreProc syn match sqljPre "#sql" " Comments: syn region sqljComment start="/\*" end="\*/" syn match sqlComment "--.*" syn sync ccomment sqljComment " The default methods for highlighting. Can be overridden later. hi def link sqljComment Comment hi def link sqljKeyword sqljSpecial hi def link sqljNumber Number hi def link sqljOperator sqljStatement hi def link sqljSpecial Special hi def link sqljStatement Statement hi def link sqljString String hi def link sqljType Type hi def link sqljPre PreProc let b:current_syntax = "sqlj" neovim-0.2.2/runtime/syntax/sqloracle.vim000066400000000000000000000161131320401574200205230ustar00rootroot00000000000000" Vim syntax file " Language: SQL, PL/SQL (Oracle 11g) " Maintainer: Christian Brabandt " Repository: https://github.com/chrisbra/vim-sqloracle-syntax " License: Vim " Previous Maintainer: Paul Moore " Last Change: 2016 Jul 22 " Changes: " 02.04.2016: Support for when keyword " 03.04.2016: Support for join related keywords " 22.07.2016: Support Oracle Q-Quote-Syntax if exists("b:current_syntax") finish endif syn case ignore " The SQL reserved words, defined as keywords. syn keyword sqlSpecial false null true syn keyword sqlKeyword access add as asc begin by case check cluster column syn keyword sqlKeyword cache compress connect current cursor decimal default desc syn keyword sqlKeyword else elsif end exception exclusive file for from syn keyword sqlKeyword function group having identified if immediate increment syn keyword sqlKeyword index initial initrans into is level link logging loop syn keyword sqlKeyword maxextents maxtrans mode modify monitoring syn keyword sqlKeyword nocache nocompress nologging noparallel nowait of offline on online start syn keyword sqlKeyword parallel successful synonym table tablespace then to trigger uid syn keyword sqlKeyword unique user validate values view when whenever syn keyword sqlKeyword where with option order pctfree pctused privileges procedure syn keyword sqlKeyword public resource return row rowlabel rownum rows syn keyword sqlKeyword session share size smallint type using syn keyword sqlKeyword join cross inner outer left right syn keyword sqlOperator not and or syn keyword sqlOperator in any some all between exists syn keyword sqlOperator like escape syn keyword sqlOperator union intersect minus syn keyword sqlOperator prior distinct syn keyword sqlOperator sysdate out syn keyword sqlStatement analyze audit comment commit syn keyword sqlStatement delete drop execute explain grant lock noaudit syn keyword sqlStatement rename revoke rollback savepoint set syn keyword sqlStatement truncate " next ones are contained, so folding works. syn keyword sqlStatement create update alter select insert contained syn keyword sqlType boolean char character date float integer long syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray " Strings: syn region sqlString matchgroup=Quote start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region sqlString matchgroup=Quote start=+'+ skip=+\\\\\|\\'+ end=+'+ syn region sqlString matchgroup=Quote start=+n\?q'\z([^[(<{]\)+ end=+\z1'+ syn region sqlString matchgroup=Quote start=+n\?q'<+ end=+>'+ syn region sqlString matchgroup=Quote start=+n\?q'{+ end=+}'+ syn region sqlString matchgroup=Quote start=+n\?q'(+ end=+)'+ syn region sqlString matchgroup=Quote start=+n\?q'\[+ end=+]'+ " Numbers: syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" " Comments: syn region sqlComment start="/\*" end="\*/" contains=sqlTodo,@Spell fold syn match sqlComment "--.*$" contains=sqlTodo,@Spell " Setup Folding: " this is a hack, to get certain statements folded. " the keywords create/update/alter/select/insert need to " have contained option. syn region sqlFold start='^\s*\zs\c\(Create\|Update\|Alter\|Select\|Insert\)' end=';$\|^$' transparent fold contains=ALL syn sync ccomment sqlComment " Functions: " (Oracle 11g) " Aggregate Functions syn keyword sqlFunction avg collect corr corr_s corr_k count covar_pop covar_samp cume_dist dense_rank first syn keyword sqlFunction group_id grouping grouping_id last max median min percentile_cont percentile_disc percent_rank rank syn keyword sqlFunction regr_slope regr_intercept regr_count regr_r2 regr_avgx regr_avgy regr_sxx regr_syy regr_sxy syn keyword sqlFunction stats_binomial_test stats_crosstab stats_f_test stats_ks_test stats_mode stats_mw_test syn keyword sqlFunction stats_one_way_anova stats_t_test_one stats_t_test_paired stats_t_test_indep stats_t_test_indepu syn keyword sqlFunction stats_wsr_test stddev stddev_pop stddev_samp sum syn keyword sqlFunction sys_xmlagg var_pop var_samp variance xmlagg " Char Functions syn keyword sqlFunction ascii chr concat initcap instr length lower lpad ltrim syn keyword sqlFunction nls_initcap nls_lower nlssort nls_upper regexp_instr regexp_replace syn keyword sqlFunction regexp_substr replace rpad rtrim soundex substr translate treat trim upper " Comparison Functions syn keyword sqlFunction greatest least " Conversion Functions syn keyword sqlFunction asciistr bin_to_num cast chartorowid compose convert syn keyword sqlFunction decompose hextoraw numtodsinterval numtoyminterval rawtohex rawtonhex rowidtochar syn keyword sqlFunction rowidtonchar scn_to_timestamp timestamp_to_scn to_binary_double to_binary_float syn keyword sqlFunction to_char to_char to_char to_clob to_date to_dsinterval to_lob to_multi_byte syn keyword sqlFunction to_nchar to_nchar to_nchar to_nclob to_number to_dsinterval to_single_byte syn keyword sqlFunction to_timestamp to_timestamp_tz to_yminterval to_yminterval translate unistr " DataMining Functions syn keyword sqlFunction cluster_id cluster_probability cluster_set feature_id feature_set syn keyword sqlFunction feature_value prediction prediction_bounds prediction_cost syn keyword sqlFunction prediction_details prediction_probability prediction_set " Datetime Functions syn keyword sqlFunction add_months current_date current_timestamp dbtimezone extract syn keyword sqlFunction from_tz last_day localtimestamp months_between new_time syn keyword sqlFunction next_day numtodsinterval numtoyminterval round sessiontimezone syn keyword sqlFunction sys_extract_utc sysdate systimestamp to_char to_timestamp syn keyword sqlFunction to_timestamp_tz to_dsinterval to_yminterval trunc tz_offset " Numeric Functions syn keyword sqlFunction abs acos asin atan atan2 bitand ceil cos cosh exp syn keyword sqlFunction floor ln log mod nanvl power remainder round sign syn keyword sqlFunction sin sinh sqrt tan tanh trunc width_bucket " NLS Functions syn keyword sqlFunction ls_charset_decl_len nls_charset_id nls_charset_name " Various Functions syn keyword sqlFunction bfilename cardin coalesce collect decode dump empty_blob empty_clob syn keyword sqlFunction lnnvl nullif nvl nvl2 ora_hash powermultiset powermultiset_by_cardinality syn keyword sqlFunction sys_connect_by_path sys_context sys_guid sys_typeid uid user userenv vsizeality " XML Functions syn keyword sqlFunction appendchildxml deletexml depth extract existsnode extractvalue insertchildxml syn keyword sqlFunction insertxmlbefore path sys_dburigen sys_xmlagg sys_xmlgen updatexml xmlagg xmlcast syn keyword sqlFunction xmlcdata xmlcolattval xmlcomment xmlconcat xmldiff xmlelement xmlexists xmlforest syn keyword sqlFunction xmlparse xmlpatch xmlpi xmlquery xmlroot xmlsequence xmlserialize xmltable xmltransform " Todo: syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE contained " Define the default highlighting. hi def link Quote Special hi def link sqlComment Comment hi def link sqlFunction Function hi def link sqlKeyword sqlSpecial hi def link sqlNumber Number hi def link sqlOperator sqlStatement hi def link sqlSpecial Special hi def link sqlStatement Statement hi def link sqlString String hi def link sqlType Type hi def link sqlTodo Todo let b:current_syntax = "sql" " vim: ts=8 neovim-0.2.2/runtime/syntax/sqr.vim000066400000000000000000000313241320401574200173440ustar00rootroot00000000000000" Vim syntax file " Language: Structured Query Report Writer (SQR) " Maintainer: Nathan Stratton Treadway (nathanst at ontko dot com) " URL: http://www.ontko.com/sqr/#editor_config_files " " Modification History: " 2002-Apr-12: Updated for SQR v6.x " 2002-Jul-30: Added { and } to iskeyword definition " 2003-Oct-15: Allow "." in variable names " highlight entire open '... literal when it contains " "''" inside it (e.g. "'I can''t say" is treated " as one open string, not one terminated and one open) " {} variables can occur inside of '...' literals " " Thanks to the previous maintainer of this file, Jeff Lanzarotta: " http://lanzarotta.tripod.com/vim.html " jefflanzarotta at yahoo dot com " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword=@,48-57,_,-,#,$,{,} syn case ignore " BEGIN GENERATED SECTION ============================================ " Generated by generate_vim_syntax.sqr at 2002/04/11 13:04 " (based on the UltraEdit syntax file for SQR 6.1.4 " found at http://www.ontko.com/sqr/#editor_config_files ) syn keyword sqrSection begin-footing begin-heading begin-procedure syn keyword sqrSection begin-program begin-report begin-setup syn keyword sqrSection end-footing end-heading end-procedure syn keyword sqrSection end-program end-report end-setup syn keyword sqrParagraph alter-color-map alter-connection syn keyword sqrParagraph alter-locale alter-printer alter-report syn keyword sqrParagraph begin-document begin-execute begin-select syn keyword sqrParagraph begin-sql declare-chart declare-image syn keyword sqrParagraph declare-color-map declare-connection syn keyword sqrParagraph declare-layout declare-printer syn keyword sqrParagraph declare-report declare-procedure syn keyword sqrParagraph declare-toc declare-variable end-declare syn keyword sqrParagraph end-document end-select exit-select end-sql syn keyword sqrParagraph load-lookup syn keyword sqrReserved #current-column #current-date #current-line syn keyword sqrReserved #end-file #page-count #return-status syn keyword sqrReserved #sql-count #sql-status #sqr-max-columns syn keyword sqrReserved #sqr-max-lines #sqr-pid #sqr-toc-level syn keyword sqrReserved #sqr-toc-page $sqr-database {sqr-database} syn keyword sqrReserved $sqr-dbcs {sqr-dbcs} $sqr-encoding syn keyword sqrReserved {sqr-encoding} $sqr-encoding-console syn keyword sqrReserved {sqr-encoding-console} syn keyword sqrReserved $sqr-encoding-database syn keyword sqrReserved {sqr-encoding-database} syn keyword sqrReserved $sqr-encoding-file-input syn keyword sqrReserved {sqr-encoding-file-input} syn keyword sqrReserved $sqr-encoding-file-output syn keyword sqrReserved {sqr-encoding-file-output} syn keyword sqrReserved $sqr-encoding-report-input syn keyword sqrReserved {sqr-encoding-report-input} syn keyword sqrReserved $sqr-encoding-report-output syn keyword sqrReserved {sqr-encoding-report-output} syn keyword sqrReserved $sqr-encoding-source {sqr-encoding-source} syn keyword sqrReserved $sql-error $sqr-hostname {sqr-hostname} syn keyword sqrReserved $sqr-locale $sqr-platform {sqr-platform} syn keyword sqrReserved $sqr-program $sqr-report $sqr-toc-text syn keyword sqrReserved $sqr-ver $username syn keyword sqrPreProc #define #else #end-if #endif #if #ifdef syn keyword sqrPreProc #ifndef #include syn keyword sqrCommand add array-add array-divide array-multiply syn keyword sqrCommand array-subtract ask break call clear-array syn keyword sqrCommand close columns commit concat connect syn keyword sqrCommand create-array create-color-palette date-time syn keyword sqrCommand display divide do dollar-symbol else encode syn keyword sqrCommand end-evaluate end-if end-while evaluate syn keyword sqrCommand execute extract find get get-color goto syn keyword sqrCommand graphic if input last-page let lookup syn keyword sqrCommand lowercase mbtosbs money-symbol move syn keyword sqrCommand multiply new-page new-report next-column syn keyword sqrCommand next-listing no-formfeed open page-number syn keyword sqrCommand page-size position print print-bar-code syn keyword sqrCommand print-chart print-direct print-image syn keyword sqrCommand printer-deinit printer-init put read syn keyword sqrCommand rollback security set-color set-delay-print syn keyword sqrCommand set-generations set-levels set-members syn keyword sqrCommand sbtombs show stop string subtract toc-entry syn keyword sqrCommand unstring uppercase use use-column syn keyword sqrCommand use-printer-type use-procedure use-report syn keyword sqrCommand while write syn keyword sqrParam 3d-effects after after-bold after-page syn keyword sqrParam after-report after-toc and as at-end before syn keyword sqrParam background batch-mode beep before-bold syn keyword sqrParam before-page before-report before-toc blink syn keyword sqrParam bold border bottom-margin box break by syn keyword sqrParam caption center char char-size char-width syn keyword sqrParam chars-inch chart-size checksum cl syn keyword sqrParam clear-line clear-screen color color-palette syn keyword sqrParam cs color_ data-array syn keyword sqrParam data-array-column-count syn keyword sqrParam data-array-column-labels syn keyword sqrParam data-array-row-count data-labels date syn keyword sqrParam date-edit-mask date-seperator syn keyword sqrParam day-of-week-case day-of-week-full syn keyword sqrParam day-of-week-short decimal decimal-seperator syn keyword sqrParam default-numeric delay distinct dot-leader syn keyword sqrParam edit-option-ad edit-option-am syn keyword sqrParam edit-option-bc edit-option-na syn keyword sqrParam edit-option-pm encoding entry erase-page syn keyword sqrParam extent field fill fixed fixed_nolf float syn keyword sqrParam font font-style font-type footing syn keyword sqrParam footing-size foreground for-append syn keyword sqrParam for-reading for-reports for-tocs syn keyword sqrParam for-writing format formfeed from goto-top syn keyword sqrParam group having heading heading-size height syn keyword sqrParam horz-line image-size in indentation syn keyword sqrParam init-string input-date-edit-mask insert syn keyword sqrParam integer into item-color item-size key syn keyword sqrParam layout left-margin legend legend-placement syn keyword sqrParam legend-presentation legend-title level syn keyword sqrParam line-height line-size line-width lines-inch syn keyword sqrParam local locale loops max-columns max-lines syn keyword sqrParam maxlen money money-edit-mask money-sign syn keyword sqrParam money-sign-location months-case months-full syn keyword sqrParam months-short name need newline newpage syn keyword sqrParam no-advance nolf noline noprompt normal not syn keyword sqrParam nowait number number-edit-mask on-break syn keyword sqrParam on-error or order orientation page-depth syn keyword sqrParam paper-size pie-segment-explode syn keyword sqrParam pie-segment-percent-display syn keyword sqrParam pie-segment-quantity-display pitch syn keyword sqrParam point-markers point-size printer syn keyword sqrParam printer-type quiet record reset-string syn keyword sqrParam return_value reverse right-margin rows save syn keyword sqrParam select size skip skiplines sort source syn keyword sqrParam sqr-database sqr-platform startup-file syn keyword sqrParam status stop sub-title symbol-set system syn keyword sqrParam table text thousand-seperator syn keyword sqrParam time-seperator times title to toc syn keyword sqrParam top-margin type underline update using syn keyword sqrParam value vary vert-line wait warn when syn keyword sqrParam when-other where with x-axis-grid syn keyword sqrParam x-axis-label x-axis-major-increment syn keyword sqrParam x-axis-major-tick-marks x-axis-max-value syn keyword sqrParam x-axis-min-value x-axis-minor-increment syn keyword sqrParam x-axis-minor-tick-marks x-axis-rotate syn keyword sqrParam x-axis-scale x-axis-tick-mark-placement xor syn keyword sqrParam y-axis-grid y-axis-label syn keyword sqrParam y-axis-major-increment syn keyword sqrParam y-axis-major-tick-marks y-axis-max-value syn keyword sqrParam y-axis-min-value y-axis-minor-increment syn keyword sqrParam y-axis-minor-tick-marks y-axis-scale syn keyword sqrParam y-axis-tick-mark-placement y2-type syn keyword sqrParam y2-data-array y2-data-array-row-count syn keyword sqrParam y2-data-array-column-count syn keyword sqrParam y2-data-array-column-labels syn keyword sqrParam y2-axis-color-palette y2-axis-label syn keyword sqrParam y2-axis-major-increment syn keyword sqrParam y2-axis-major-tick-marks y2-axis-max-value syn keyword sqrParam y2-axis-min-value y2-axis-minor-increment syn keyword sqrParam y2-axis-minor-tick-marks y2-axis-scale syn keyword sqrFunction abs acos asin atan array ascii asciic ceil syn keyword sqrFunction cos cosh chr cond deg delete dateadd syn keyword sqrFunction datediff datenow datetostr e10 exp edit syn keyword sqrFunction exists floor getenv instr instrb isblank syn keyword sqrFunction isnull log log10 length lengthb lengthp syn keyword sqrFunction lengtht lower lpad ltrim mod nvl power rad syn keyword sqrFunction round range replace roman rpad rtrim rename syn keyword sqrFunction sign sin sinh sqrt substr substrb substrp syn keyword sqrFunction substrt strtodate tan tanh trunc to_char syn keyword sqrFunction to_multi_byte to_number to_single_byte syn keyword sqrFunction transform translate unicode upper wrapdepth " END GENERATED SECTION ============================================== " Variables syn match sqrVariable /\(\$\|#\|&\)\(\k\|\.\)*/ " Debug compiler directives syn match sqrPreProc /\s*#debug\a\=\(\s\|$\)/ syn match sqrSubstVar /{\k*}/ " Strings " Note: if an undoubled ! is found, this is not a valid string " (SQR will treat the end of the line as a comment) syn match sqrString /'\(!!\|[^!']\)*'/ contains=sqrSubstVar syn match sqrStrOpen /'\(!!\|''\|[^!']\)*$/ " If we find a ' followed by an unmatched ! before a matching ', " flag the error. syn match sqrError /'\(!!\|[^'!]\)*![^!]/me=e-1 syn match sqrError /'\(!!\|[^'!]\)*!$/ " Numbers: syn match sqrNumber /-\=\<\d*\.\=[0-9_]\>/ " Comments: " Handle comments that start with "!=" specially; they are only valid " in the first column of the source line. Also, "!!" is only treated " as a start-comment if there is only whitespace ahead of it on the line. syn keyword sqrTodo TODO FIXME XXX DEBUG NOTE ### syn match sqrTodo /???/ " See also the sqrString section above for handling of ! characters " inside of strings. (Those patterns override the ones below.) syn match sqrComment /!\@ " Last Change: 2005 Jun 12 " URL: http://www.hampft.de/vim/syntax/squid.vim " ThanksTo: Ilya Sher , " Michael Dotzler " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " squid.conf syntax seems to be case insensitive syn case ignore syn keyword squidTodo contained TODO syn match squidComment "#.*$" contains=squidTodo,squidTag syn match squidTag contained "TAG: .*$" " Lots & lots of Keywords! syn keyword squidConf acl always_direct announce_host announce_period syn keyword squidConf announce_port announce_to anonymize_headers syn keyword squidConf append_domain as_whois_server auth_param_basic syn keyword squidConf authenticate_children authenticate_program syn keyword squidConf authenticate_ttl broken_posts buffered_logs syn keyword squidConf cache_access_log cache_announce cache_dir syn keyword squidConf cache_dns_program cache_effective_group syn keyword squidConf cache_effective_user cache_host cache_host_acl syn keyword squidConf cache_host_domain cache_log cache_mem syn keyword squidConf cache_mem_high cache_mem_low cache_mgr syn keyword squidConf cachemgr_passwd cache_peer cache_peer_access syn keyword squidConf cahce_replacement_policy cache_stoplist syn keyword squidConf cache_stoplist_pattern cache_store_log cache_swap syn keyword squidConf cache_swap_high cache_swap_log cache_swap_low syn keyword squidConf client_db client_lifetime client_netmask syn keyword squidConf connect_timeout coredump_dir dead_peer_timeout syn keyword squidConf debug_options delay_access delay_class syn keyword squidConf delay_initial_bucket_level delay_parameters syn keyword squidConf delay_pools deny_info dns_children dns_defnames syn keyword squidConf dns_nameservers dns_testnames emulate_httpd_log syn keyword squidConf err_html_text fake_user_agent firewall_ip syn keyword squidConf forwarded_for forward_snmpd_port fqdncache_size syn keyword squidConf ftpget_options ftpget_program ftp_list_width syn keyword squidConf ftp_passive ftp_user half_closed_clients syn keyword squidConf header_access header_replace hierarchy_stoplist syn keyword squidConf high_response_time_warning high_page_fault_warning syn keyword squidConf htcp_port http_access http_anonymizer httpd_accel syn keyword squidConf httpd_accel_host httpd_accel_port syn keyword squidConf httpd_accel_uses_host_header syn keyword squidConf httpd_accel_with_proxy http_port http_reply_access syn keyword squidConf icp_access icp_hit_stale icp_port syn keyword squidConf icp_query_timeout ident_lookup ident_lookup_access syn keyword squidConf ident_timeout incoming_http_average syn keyword squidConf incoming_icp_average inside_firewall ipcache_high syn keyword squidConf ipcache_low ipcache_size local_domain local_ip syn keyword squidConf logfile_rotate log_fqdn log_icp_queries syn keyword squidConf log_mime_hdrs maximum_object_size syn keyword squidConf maximum_single_addr_tries mcast_groups syn keyword squidConf mcast_icp_query_timeout mcast_miss_addr syn keyword squidConf mcast_miss_encode_key mcast_miss_port memory_pools syn keyword squidConf memory_pools_limit memory_replacement_policy syn keyword squidConf mime_table min_http_poll_cnt min_icp_poll_cnt syn keyword squidConf minimum_direct_hops minimum_object_size syn keyword squidConf minimum_retry_timeout miss_access negative_dns_ttl syn keyword squidConf negative_ttl neighbor_timeout neighbor_type_domain syn keyword squidConf netdb_high netdb_low netdb_ping_period syn keyword squidConf netdb_ping_rate never_direct no_cache syn keyword squidConf passthrough_proxy pconn_timeout pid_filename syn keyword squidConf pinger_program positive_dns_ttl prefer_direct syn keyword squidConf proxy_auth proxy_auth_realm query_icmp quick_abort syn keyword squidConf quick_abort quick_abort_max quick_abort_min syn keyword squidConf quick_abort_pct range_offset_limit read_timeout syn keyword squidConf redirect_children redirect_program syn keyword squidConf redirect_rewrites_host_header reference_age syn keyword squidConf reference_age refresh_pattern reload_into_ims syn keyword squidConf request_body_max_size request_size request_timeout syn keyword squidConf shutdown_lifetime single_parent_bypass syn keyword squidConf siteselect_timeout snmp_access syn keyword squidConf snmp_incoming_address snmp_port source_ping syn keyword squidConf ssl_proxy store_avg_object_size syn keyword squidConf store_objects_per_bucket strip_query_terms syn keyword squidConf swap_level1_dirs swap_level2_dirs syn keyword squidConf tcp_incoming_address tcp_outgoing_address syn keyword squidConf tcp_recv_bufsize test_reachability udp_hit_obj syn keyword squidConf udp_hit_obj_size udp_incoming_address syn keyword squidConf udp_outgoing_address unique_hostname syn keyword squidConf unlinkd_program uri_whitespace useragent_log syn keyword squidConf visible_hostname wais_relay wais_relay_host syn keyword squidConf wais_relay_port syn keyword squidOpt proxy-only weight ttl no-query default syn keyword squidOpt round-robin multicast-responder syn keyword squidOpt on off all deny allow syn keyword squidopt via parent no-digest heap lru realm syn keyword squidopt children credentialsttl none disable syn keyword squidopt offline_toggle diskd q1 q2 " Security Actions for cachemgr_passwd syn keyword squidAction shutdown info parameter server_list syn keyword squidAction client_list syn match squidAction "stats/\(objects\|vm_objects\|utilization\|ipcache\|fqdncache\|dns\|redirector\|io\|reply_headers\|filedescriptors\|netdb\)" syn match squidAction "log\(/\(status\|enable\|disable\|clear\)\)\=" syn match squidAction "squid\.conf" " Keywords for the acl-config syn keyword squidAcl url_regex urlpath_regex referer_regex port proto syn keyword squidAcl req_mime_type rep_mime_type syn keyword squidAcl method browser user src dst syn keyword squidAcl time dstdomain ident snmp_community syn match squidNumber "\<\d\+\>" syn match squidIP "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>" syn match squidStr "\(^\s*acl\s\+\S\+\s\+\(\S*_regex\|re[pq]_mime_type\|browser\|_domain\|user\)\+\s\+\)\@<=.*" contains=squidRegexOpt syn match squidRegexOpt contained "\(^\s*acl\s\+\S\+\s\+\S\+\(_regex\|_mime_type\)\s\+\)\@<=[-+]i\s\+" " All config is in one line, so this has to be sufficient " Make it fast like hell :) syn sync minlines=3 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link squidTodo Todo hi def link squidComment Comment hi def link squidTag Special hi def link squidConf Keyword hi def link squidOpt Constant hi def link squidAction String hi def link squidNumber Number hi def link squidIP Number hi def link squidAcl Keyword hi def link squidStr String hi def link squidRegexOpt Special let b:current_syntax = "squid" " vim: ts=8 neovim-0.2.2/runtime/syntax/srec.vim000066400000000000000000000073471320401574200175030ustar00rootroot00000000000000" Vim syntax file " Language: Motorola S-Record " Maintainer: Markus Heidelberg " Last Change: 2015 Feb 24 " Each record (line) is built as follows: " " field digits states " " +----------+ " | start | 1 ('S') srecRecStart " +----------+ " | type | 1 srecRecType, (srecRecTypeUnknown) " +----------+ " | count | 2 srecByteCount " +----------+ " | address | 4/6/8 srecNoAddress, srecDataAddress, srecRecCount, srecStartAddress, (srecAddressFieldUnknown) " +----------+ " | data | 0..504/502/500 srecDataOdd, srecDataEven, (srecDataUnexpected) " +----------+ " | checksum | 2 srecChecksum " +----------+ " " States in parentheses in the upper format description indicate that they " should not appear in a valid file. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match srecRecStart "^S" syn match srecRecTypeUnknown "^S." contains=srecRecStart syn match srecRecType "^S[0-35-9]" contains=srecRecStart syn match srecByteCount "^S.[0-9a-fA-F]\{2}" contains=srecRecTypeUnknown nextgroup=srecAddressFieldUnknown,srecChecksum syn match srecByteCount "^S[0-35-9][0-9a-fA-F]\{2}" contains=srecRecType syn match srecAddressFieldUnknown "[0-9a-fA-F]\{2}" contained nextgroup=srecAddressFieldUnknown,srecChecksum syn match srecNoAddress "^S0[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum syn match srecDataAddress "^S1[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum syn match srecDataAddress "^S2[0-9a-fA-F]\{8}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum syn match srecDataAddress "^S3[0-9a-fA-F]\{10}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum syn match srecRecCount "^S5[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum syn match srecRecCount "^S6[0-9a-fA-F]\{8}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum syn match srecStartAddress "^S7[0-9a-fA-F]\{10}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum syn match srecStartAddress "^S8[0-9a-fA-F]\{8}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum syn match srecStartAddress "^S9[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum " alternating highlight per byte for easier reading syn match srecDataOdd "[0-9a-fA-F]\{2}" contained nextgroup=srecDataEven,srecChecksum syn match srecDataEven "[0-9a-fA-F]\{2}" contained nextgroup=srecDataOdd,srecChecksum " data bytes which should not exist syn match srecDataUnexpected "[0-9a-fA-F]\{2}" contained nextgroup=srecDataUnexpected,srecChecksum " Data digit pair regex usage also results in only highlighting the checksum " if the number of data characters is even. syn match srecChecksum "[0-9a-fA-F]\{2}$" contained " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later hi def link srecRecStart srecRecType hi def link srecRecTypeUnknown srecRecType hi def link srecRecType WarningMsg hi def link srecByteCount Constant hi def srecAddressFieldUnknown term=italic cterm=italic gui=italic hi def link srecNoAddress DiffAdd hi def link srecDataAddress Comment hi def link srecRecCount srecNoAddress hi def link srecStartAddress srecDataAddress hi def srecDataOdd term=bold cterm=bold gui=bold hi def srecDataEven term=NONE cterm=NONE gui=NONE hi def link srecDataUnexpected Error hi def link srecChecksum DiffChange let b:current_syntax = "srec" " vim: ts=8 neovim-0.2.2/runtime/syntax/sshconfig.vim000066400000000000000000000245231320401574200205250ustar00rootroot00000000000000" Vim syntax file " Language: OpenSSH client configuration file (ssh_config) " Author: David Necas (Yeti) " Maintainer: Dominik Fischer " Contributor: Leonard Ehrenfried " Contributor: Karsten Hopp " Contributor: Dean, Adam Kenneth " Last Change: 2016 Dec 28 " SSH Version: 7.4p1 " " Setup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword=_,-,a-z,A-Z,48-57 " case on syn case match " Comments syn match sshconfigComment "^#.*$" contains=sshconfigTodo syn match sshconfigComment "\s#.*$" contains=sshconfigTodo syn keyword sshconfigTodo TODO FIXME NOTE contained " Constants syn keyword sshconfigYesNo yes no ask confirm syn keyword sshconfigYesNo any auto syn keyword sshconfigYesNo force autoask none syn keyword sshconfigCipher 3des blowfish syn keyword sshconfigCiphers 3des-cbc syn keyword sshconfigCiphers blowfish-cbc syn keyword sshconfigCiphers cast128-cbc syn keyword sshconfigCiphers arcfour syn keyword sshconfigCiphers arcfour128 syn keyword sshconfigCiphers arcfour256 syn keyword sshconfigCiphers aes128-cbc syn keyword sshconfigCiphers aes192-cbc syn keyword sshconfigCiphers aes256-cbc syn match sshconfigCiphers "\" syn keyword sshconfigCiphers aes128-ctr syn keyword sshconfigCiphers aes192-ctr syn keyword sshconfigCiphers aes256-ctr syn match sshconfigCiphers "\" syn match sshconfigCiphers "\" syn match sshconfigCiphers "\" syn keyword sshconfigMAC hmac-sha1 syn keyword sshconfigMAC mac-sha1-96 syn keyword sshconfigMAC mac-sha2-256 syn keyword sshconfigMAC mac-sha2-512 syn keyword sshconfigMAC mac-md5 syn keyword sshconfigMAC mac-md5-96 syn keyword sshconfigMAC mac-ripemd160 syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn match sshconfigMAC "\" syn keyword sshconfigHostKeyAlgo ssh-ed25519 syn match sshconfigHostKeyAlgo "\" syn keyword sshconfigHostKeyAlgo ssh-rsa syn keyword sshconfigHostKeyAlgo ssh-dss syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp256 syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp384 syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp521 syn match sshconfigHostKeyAlgo "\" syn match sshconfigHostKeyAlgo "\" syn match sshconfigHostKeyAlgo "\" syn match sshconfigHostKeyAlgo "\" syn match sshconfigHostKeyAlgo "\" syn keyword sshconfigPreferredAuth hostbased publickey password gssapi-with-mic syn keyword sshconfigPreferredAuth keyboard-interactive syn keyword sshconfigLogLevel QUIET FATAL ERROR INFO VERBOSE syn keyword sshconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3 syn keyword sshconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1 syn keyword sshconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 syn keyword sshconfigAddressFamily inet inet6 syn match sshconfigIPQoS "af1[123]" syn match sshconfigIPQoS "af2[123]" syn match sshconfigIPQoS "af3[123]" syn match sshconfigIPQoS "af4[123]" syn match sshconfigIPQoS "cs[0-7]" syn keyword sshconfigIPQoS ef lowdelay throughput reliability syn keyword sshconfigKbdInteractive bsdauth pam skey syn keyword sshconfigKexAlgo diffie-hellman-group1-sha1 syn keyword sshconfigKexAlgo diffie-hellman-group14-sha1 syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha1 syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha256 syn keyword sshconfigKexAlgo ecdh-sha2-nistp256 syn keyword sshconfigKexAlgo ecdh-sha2-nistp384 syn keyword sshconfigKexAlgo ecdh-sha2-nistp521 syn match sshconfigKexAlgo "\" syn keyword sshconfigTunnel point-to-point ethernet syn match sshconfigVar "%[rhplLdun]\>" syn match sshconfigSpecial "[*?]" syn match sshconfigNumber "\d\+" syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>" syn match sshconfigHostPort "\(Host \)\@<=.\+" syn match sshconfigHostPort "\(HostName \)\@<=.\+" " case off syn case ignore " Keywords syn keyword sshconfigHostSect Host syn keyword sshconfigMatch canonical exec host originalhost user localuser all syn keyword sshconfigKeyword AddressFamily syn keyword sshconfigKeyword AddKeysToAgent syn keyword sshconfigKeyword BatchMode syn keyword sshconfigKeyword BindAddress syn keyword sshconfigKeyword CanonicalDomains syn keyword sshconfigKeyword CanonicalizeFallbackLocal syn keyword sshconfigKeyword CanonicalizeHostname syn keyword sshconfigKeyword CanonicalizeMaxDots syn keyword sshconfigKeyword CertificateFile syn keyword sshconfigKeyword ChallengeResponseAuthentication syn keyword sshconfigKeyword CheckHostIP syn keyword sshconfigKeyword Cipher syn keyword sshconfigKeyword Ciphers syn keyword sshconfigKeyword ClearAllForwardings syn keyword sshconfigKeyword Compression syn keyword sshconfigKeyword CompressionLevel syn keyword sshconfigKeyword ConnectTimeout syn keyword sshconfigKeyword ConnectionAttempts syn keyword sshconfigKeyword ControlMaster syn keyword sshconfigKeyword ControlPath syn keyword sshconfigKeyword ControlPersist syn keyword sshconfigKeyword DynamicForward syn keyword sshconfigKeyword EnableSSHKeysign syn keyword sshconfigKeyword EscapeChar syn keyword sshconfigKeyword ExitOnForwardFailure syn keyword sshconfigKeyword ForwardAgent syn keyword sshconfigKeyword ForwardX11 syn keyword sshconfigKeyword ForwardX11Timeout syn keyword sshconfigKeyword ForwardX11Trusted syn keyword sshconfigKeyword GSSAPIAuthentication syn keyword sshconfigKeyword GSSAPIClientIdentity syn keyword sshconfigKeyword GSSAPIDelegateCredentials syn keyword sshconfigKeyword GSSAPIKeyExchange syn keyword sshconfigKeyword GSSAPIRenewalForcesRekey syn keyword sshconfigKeyword GSSAPIServerIdentity syn keyword sshconfigKeyword GSSAPITrustDNS syn keyword sshconfigKeyword GSSAPITrustDns syn keyword sshconfigKeyword GatewayPorts syn keyword sshconfigKeyword GlobalKnownHostsFile syn keyword sshconfigKeyword HashKnownHosts syn keyword sshconfigKeyword HostKeyAlgorithms syn keyword sshconfigKeyword HostKeyAlias syn keyword sshconfigKeyword HostName syn keyword sshconfigKeyword HostbasedAuthentication syn keyword sshconfigKeyword HostbasedKeyTypes syn keyword sshconfigKeyword IPQoS syn keyword sshconfigKeyword IdentitiesOnly syn keyword sshconfigKeyword IdentityFile syn keyword sshconfigKeyword IgnoreUnknown syn keyword sshconfigKeyword Include syn keyword sshconfigKeyword IPQoS syn keyword sshconfigKeyword KbdInteractiveAuthentication syn keyword sshconfigKeyword KbdInteractiveDevices syn keyword sshconfigKeyword KexAlgorithms syn keyword sshconfigKeyword LocalCommand syn keyword sshconfigKeyword LocalForward syn keyword sshconfigKeyword LogLevel syn keyword sshconfigKeyword MACs syn keyword sshconfigKeyword Match syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost syn keyword sshconfigKeyword NumberOfPasswordPrompts syn keyword sshconfigKeyword PKCS11Provider syn keyword sshconfigKeyword PasswordAuthentication syn keyword sshconfigKeyword PermitLocalCommand syn keyword sshconfigKeyword Port syn keyword sshconfigKeyword PreferredAuthentications syn keyword sshconfigKeyword Protocol syn keyword sshconfigKeyword ProxyCommand syn keyword sshconfigKeyword ProxyJump syn keyword sshconfigKeyword ProxyUseFDPass syn keyword sshconfigKeyword PubkeyAcceptedKeyTypes syn keyword sshconfigKeyword PubkeyAuthentication syn keyword sshconfigKeyword RSAAuthentication syn keyword sshconfigKeyword RekeyLimit syn keyword sshconfigKeyword RemoteForward syn keyword sshconfigKeyword RequestTTY syn keyword sshconfigKeyword RhostsRSAAuthentication syn keyword sshconfigKeyword SendEnv syn keyword sshconfigKeyword ServerAliveCountMax syn keyword sshconfigKeyword ServerAliveInterval syn keyword sshconfigKeyword SmartcardDevice syn keyword sshconfigKeyword StrictHostKeyChecking syn keyword sshconfigKeyword TCPKeepAlive syn keyword sshconfigKeyword Tunnel syn keyword sshconfigKeyword TunnelDevice syn keyword sshconfigKeyword UseBlacklistedKeys syn keyword sshconfigKeyword UsePrivilegedPort syn keyword sshconfigKeyword User syn keyword sshconfigKeyword UserKnownHostsFile syn keyword sshconfigKeyword UseRoaming syn keyword sshconfigKeyword VerifyHostKeyDNS syn keyword sshconfigKeyword VisualHostKey syn keyword sshconfigKeyword XAuthLocation " Define the default highlighting hi def link sshconfigComment Comment hi def link sshconfigTodo Todo hi def link sshconfigHostPort sshconfigConstant hi def link sshconfigNumber sshconfigConstant hi def link sshconfigConstant Constant hi def link sshconfigYesNo sshconfigEnum hi def link sshconfigCipher sshconfigEnum hi def link sshconfigCiphers sshconfigEnum hi def link sshconfigMAC sshconfigEnum hi def link sshconfigHostKeyAlgo sshconfigEnum hi def link sshconfigLogLevel sshconfigEnum hi def link sshconfigSysLogFacility sshconfigEnum hi def link sshconfigAddressFamily sshconfigEnum hi def link sshconfigIPQoS sshconfigEnum hi def link sshconfigKbdInteractive sshconfigEnum hi def link sshconfigKexAlgo sshconfigEnum hi def link sshconfigTunnel sshconfigEnum hi def link sshconfigPreferredAuth sshconfigEnum hi def link sshconfigVar sshconfigEnum hi def link sshconfigEnum Identifier hi def link sshconfigSpecial Special hi def link sshconfigKeyword Keyword hi def link sshconfigHostSect Type hi def link sshconfigMatch Type let b:current_syntax = "sshconfig" " vim:set ts=8 sw=2 sts=2: neovim-0.2.2/runtime/syntax/sshdconfig.vim000066400000000000000000000255241320401574200206730ustar00rootroot00000000000000" Vim syntax file " Language: OpenSSH server configuration file (sshd_config) " Author: David Necas (Yeti) " Maintainer: Dominik Fischer " Contributor: Thilo Six " Contributor: Leonard Ehrenfried " Contributor: Karsten Hopp " Originally: 2009-07-09 " Last Change: 2017 Oct 25 " SSH Version: 7.6p1 " " Setup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword=_,-,a-z,A-Z,48-57 " case on syn case match " Comments syn match sshdconfigComment "^#.*$" contains=sshdconfigTodo syn match sshdconfigComment "\s#.*$" contains=sshdconfigTodo syn keyword sshdconfigTodo TODO FIXME NOTE contained " Constants syn keyword sshdconfigYesNo yes no none syn keyword sshdconfigAddressFamily any inet inet6 syn keyword sshdconfigPrivilegeSeparation sandbox syn keyword sshdconfigTcpForwarding local remote syn keyword sshdconfigRootLogin prohibit-password without-password forced-commands-only syn keyword sshdconfigCiphers 3des-cbc syn keyword sshdconfigCiphers blowfish-cbc syn keyword sshdconfigCiphers cast128-cbc syn keyword sshdconfigCiphers arcfour syn keyword sshdconfigCiphers arcfour128 syn keyword sshdconfigCiphers arcfour256 syn keyword sshdconfigCiphers aes128-cbc syn keyword sshdconfigCiphers aes192-cbc syn keyword sshdconfigCiphers aes256-cbc syn match sshdconfigCiphers "\" syn keyword sshdconfigCiphers aes128-ctr syn keyword sshdconfigCiphers aes192-ctr syn keyword sshdconfigCiphers aes256-ctr syn match sshdconfigCiphers "\" syn match sshdconfigCiphers "\" syn match sshdconfigCiphers "\" syn keyword sshdconfigMAC hmac-sha1 syn keyword sshdconfigMAC mac-sha1-96 syn keyword sshdconfigMAC mac-sha2-256 syn keyword sshdconfigMAC mac-sha2-512 syn keyword sshdconfigMAC mac-md5 syn keyword sshdconfigMAC mac-md5-96 syn keyword sshdconfigMAC mac-ripemd160 syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn match sshdconfigMAC "\" syn keyword sshdconfigHostKeyAlgo ssh-ed25519 syn match sshdconfigHostKeyAlgo "\" syn keyword sshdconfigHostKeyAlgo ssh-rsa syn keyword sshdconfigHostKeyAlgo ssh-dss syn keyword sshdconfigHostKeyAlgo ecdsa-sha2-nistp256 syn keyword sshdconfigHostKeyAlgo ecdsa-sha2-nistp384 syn keyword sshdconfigHostKeyAlgo ecdsa-sha2-nistp521 syn match sshdconfigHostKeyAlgo "\" syn match sshdconfigHostKeyAlgo "\" syn match sshdconfigHostKeyAlgo "\" syn match sshdconfigHostKeyAlgo "\" syn match sshdconfigHostKeyAlgo "\" syn keyword sshdconfigRootLogin prohibit-password without-password forced-commands-only syn keyword sshdconfigLogLevel QUIET FATAL ERROR INFO VERBOSE syn keyword sshdconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3 syn keyword sshdconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1 syn keyword sshdconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 syn keyword sshdconfigCompression delayed syn match sshdconfigIPQoS "af1[123]" syn match sshdconfigIPQoS "af2[123]" syn match sshdconfigIPQoS "af3[123]" syn match sshdconfigIPQoS "af4[123]" syn match sshdconfigIPQoS "cs[0-7]" syn keyword sshdconfigIPQoS ef lowdelay throughput reliability syn keyword sshdconfigKexAlgo diffie-hellman-group1-sha1 syn keyword sshdconfigKexAlgo diffie-hellman-group14-sha1 syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha1 syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha256 syn keyword sshdconfigKexAlgo ecdh-sha2-nistp256 syn keyword sshdconfigKexAlgo ecdh-sha2-nistp384 syn keyword sshdconfigKexAlgo ecdh-sha2-nistp521 syn match sshdconfigKexAlgo "\" syn keyword sshdconfigTunnel point-to-point ethernet syn keyword sshdconfigSubsystem internal-sftp syn match sshdconfigVar "%[hu]\>" syn match sshdconfigVar "%%" syn match sshdconfigSpecial "[*?]" syn match sshdconfigNumber "\d\+" syn match sshdconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" syn match sshdconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" " FIXME: this matches quite a few things which are NOT valid IPv6 addresses syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>" syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>" " case off syn case ignore " Keywords syn keyword sshdconfigMatch Host User Group Address syn keyword sshdconfigKeyword AcceptEnv syn keyword sshdconfigKeyword AddressFamily syn keyword sshdconfigKeyword AllowAgentForwarding syn keyword sshdconfigKeyword AllowGroups syn keyword sshdconfigKeyword AllowStreamLocalForwarding syn keyword sshdconfigKeyword AllowTcpForwarding syn keyword sshdconfigKeyword AllowUsers syn keyword sshdconfigKeyword AuthenticationMethods syn keyword sshdconfigKeyword AuthorizedKeysFile syn keyword sshdconfigKeyword AuthorizedKeysCommand syn keyword sshdconfigKeyword AuthorizedKeysCommandUser syn keyword sshdconfigKeyword AuthorizedPrincipalsFile syn keyword sshdconfigKeyword Banner syn keyword sshdconfigKeyword ChallengeResponseAuthentication syn keyword sshdconfigKeyword ChrootDirectory syn keyword sshdconfigKeyword Ciphers syn keyword sshdconfigKeyword ClientAliveCountMax syn keyword sshdconfigKeyword ClientAliveInterval syn keyword sshdconfigKeyword Compression syn keyword sshdconfigKeyword DebianBanner syn keyword sshdconfigKeyword DenyGroups syn keyword sshdconfigKeyword DenyUsers syn keyword sshdconfigKeyword DisableForwarding syn keyword sshdconfigKeyword ForceCommand syn keyword sshdconfigKeyword GSSAPIAuthentication syn keyword sshdconfigKeyword GSSAPICleanupCredentials syn keyword sshdconfigKeyword GSSAPIKeyExchange syn keyword sshdconfigKeyword GSSAPIStoreCredentialsOnRekey syn keyword sshdconfigKeyword GSSAPIStrictAcceptorCheck syn keyword sshdconfigKeyword GatewayPorts syn keyword sshdconfigKeyword HostCertificate syn keyword sshdconfigKeyword HostKey syn keyword sshdconfigKeyword HostKeyAgent syn keyword sshdconfigKeyword HostKeyAlgorithms syn keyword sshdconfigKeyword HostbasedAcceptedKeyTypes syn keyword sshdconfigKeyword HostbasedAuthentication syn keyword sshdconfigKeyword HostbasedUsesNameFromPacketOnly syn keyword sshdconfigKeyword IPQoS syn keyword sshdconfigKeyword IgnoreRhosts syn keyword sshdconfigKeyword IgnoreUserKnownHosts syn keyword sshdconfigKeyword KbdInteractiveAuthentication syn keyword sshdconfigKeyword KerberosAuthentication syn keyword sshdconfigKeyword KerberosGetAFSToken syn keyword sshdconfigKeyword KerberosOrLocalPasswd syn keyword sshdconfigKeyword KerberosTicketCleanup syn keyword sshdconfigKeyword KexAlgorithms syn keyword sshdconfigKeyword KeyRegenerationInterval syn keyword sshdconfigKeyword ListenAddress syn keyword sshdconfigKeyword LogLevel syn keyword sshdconfigKeyword LoginGraceTime syn keyword sshdconfigKeyword MACs syn keyword sshdconfigKeyword Match syn keyword sshdconfigKeyword MaxAuthTries syn keyword sshdconfigKeyword MaxSessions syn keyword sshdconfigKeyword MaxStartups syn keyword sshdconfigKeyword PasswordAuthentication syn keyword sshdconfigKeyword PermitBlacklistedKeys syn keyword sshdconfigKeyword PermitEmptyPasswords syn keyword sshdconfigKeyword PermitOpen syn keyword sshdconfigKeyword PermitRootLogin syn keyword sshdconfigKeyword PermitTTY syn keyword sshdconfigKeyword PermitTunnel syn keyword sshdconfigKeyword PermitUserEnvironment syn keyword sshdconfigKeyword PermitUserRC syn keyword sshdconfigKeyword PidFile syn keyword sshdconfigKeyword Port syn keyword sshdconfigKeyword PrintLastLog syn keyword sshdconfigKeyword PrintMotd syn keyword sshdconfigKeyword Protocol syn keyword sshdconfigKeyword PubkeyAcceptedKeyTypes syn keyword sshdconfigKeyword PubkeyAuthentication syn keyword sshdconfigKeyword RSAAuthentication syn keyword sshdconfigKeyword RekeyLimit syn keyword sshdconfigKeyword RevokedKeys syn keyword sshdconfigKeyword RhostsRSAAuthentication syn keyword sshdconfigKeyword ServerKeyBits syn keyword sshdconfigKeyword ShowPatchLevel syn keyword sshdconfigKeyword StrictModes syn keyword sshdconfigKeyword Subsystem syn keyword sshdconfigKeyword SyslogFacility syn keyword sshdconfigKeyword TCPKeepAlive syn keyword sshdconfigKeyword TrustedUserCAKeys syn keyword sshdconfigKeyword UseDNS syn keyword sshdconfigKeyword UseLogin syn keyword sshdconfigKeyword UsePAM syn keyword sshdconfigKeyword VersionAddendum syn keyword sshdconfigKeyword X11DisplayOffset syn keyword sshdconfigKeyword X11Forwarding syn keyword sshdconfigKeyword X11UseLocalhost syn keyword sshdconfigKeyword XAuthLocation " Define the default highlighting hi def link sshdconfigComment Comment hi def link sshdconfigTodo Todo hi def link sshdconfigHostPort sshdconfigConstant hi def link sshdconfigTime sshdconfigConstant hi def link sshdconfigNumber sshdconfigConstant hi def link sshdconfigConstant Constant hi def link sshdconfigYesNo sshdconfigEnum hi def link sshdconfigAddressFamily sshdconfigEnum hi def link sshdconfigPrivilegeSeparation sshdconfigEnum hi def link sshdconfigTcpForwarding sshdconfigEnum hi def link sshdconfigRootLogin sshdconfigEnum hi def link sshdconfigCiphers sshdconfigEnum hi def link sshdconfigMAC sshdconfigEnum hi def link sshdconfigHostKeyAlgo sshdconfigEnum hi def link sshdconfigRootLogin sshdconfigEnum hi def link sshdconfigLogLevel sshdconfigEnum hi def link sshdconfigSysLogFacility sshdconfigEnum hi def link sshdconfigVar sshdconfigEnum hi def link sshdconfigCompression sshdconfigEnum hi def link sshdconfigIPQoS sshdconfigEnum hi def link sshdconfigKexAlgo sshdconfigEnum hi def link sshdconfigTunnel sshdconfigEnum hi def link sshdconfigSubsystem sshdconfigEnum hi def link sshdconfigEnum Function hi def link sshdconfigSpecial Special hi def link sshdconfigKeyword Keyword hi def link sshdconfigMatch Type let b:current_syntax = "sshdconfig" " vim:set ts=8 sw=2 sts=2: neovim-0.2.2/runtime/syntax/st.vim000066400000000000000000000053001320401574200171600ustar00rootroot00000000000000" Vim syntax file " Language: Smalltalk " Maintainer: Arndt Hesse " Last Change: 2012 Feb 12 by Thilo Six " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " some Smalltalk keywords and standard methods syn keyword stKeyword super self class true false new not syn keyword stKeyword notNil isNil inspect out nil syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" syn match stMethod "\:" " the block of local variables of a method syn region stLocalVariables start="^[ \t]*|" end="|" " the Smalltalk comment syn region stComment start="\"" end="\"" " the Smalltalk strings and single characters syn region stString start='\'' skip="''" end='\'' syn match stCharacter "$." syn case ignore " the symols prefixed by a '#' syn match stSymbol "\(#\<[a-z_][a-z0-9_]*\>\)" syn match stSymbol "\(#'[^']*'\)" " the variables in a statement block for loops syn match stBlockVariable "\(:[ \t]*\<[a-z_][a-z0-9_]*\>[ \t]*\)\+|" contained " some representations of numbers syn match stNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" syn match stFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" syn match stFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" syn case match " a try to higlight paren mismatches syn region stParen transparent start='(' end=')' contains=ALLBUT,stParenError syn match stParenError ")" syn region stBlock transparent start='\[' end='\]' contains=ALLBUT,stBlockError syn match stBlockError "\]" syn region stSet transparent start='{' end='}' contains=ALLBUT,stSetError syn match stSetError "}" hi link stParenError stError hi link stSetError stError hi link stBlockError stError " synchronization for syntax analysis syn sync minlines=50 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link stKeyword Statement hi def link stMethod Statement hi def link stComment Comment hi def link stCharacter Constant hi def link stString Constant hi def link stSymbol Special hi def link stNumber Type hi def link stFloat Type hi def link stError Error hi def link stLocalVariables Identifier hi def link stBlockVariable Identifier let b:current_syntax = "st" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/stata.vim000066400000000000000000000646601320401574200176640ustar00rootroot00000000000000" stata.vim -- Vim syntax file for Stata do, ado, and class files. " Language: Stata and/or Mata " Maintainer: Jeff Pitblado " Last Change: 26apr2006 " Version: 1.1.4 " Log: " 14apr2006 renamed syntax groups st* to stata* " 'syntax clear' only under version control " check for 'b:current_syntax', removed 'did_stata_syntax_inits' " 17apr2006 fixed start expression for stataFunc " 26apr2006 fixed brace confusion in stataErrInParen and stataErrInBracket " fixed paren/bracket confusion in stataFuncGroup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syntax case match " comments - single line " note that the triple slash continuing line comment comes free syn region stataStarComment start=/^\s*\*/ end=/$/ contains=stataComment oneline syn region stataSlashComment start="\s//" end=/$/ contains=stataComment oneline syn region stataSlashComment start="^//" end=/$/ contains=stataComment oneline " comments - multiple line syn region stataComment start="/\*" end="\*/" contains=stataComment " global macros - simple case syn match stataGlobal /\$\a\w*/ " global macros - general case syn region stataGlobal start=/\${/ end=/}/ oneline contains=@stataMacroGroup " local macros - general case syn region stataLocal start=/`/ end=/'/ oneline contains=@stataMacroGroup " numeric formats syn match stataFormat /%-\=\d\+\.\d\+[efg]c\=/ " numeric hex format syn match stataFormat /%-\=21x/ " string format syn match stataFormat /%\(\|-\|\~\)\d\+s/ " Statements syn keyword stataConditional else if syn keyword stataRepeat foreach syn keyword stataRepeat forv[alues] syn keyword stataRepeat while " Common programming commands syn keyword stataCommand about syn keyword stataCommand adopath syn keyword stataCommand adoupdate syn keyword stataCommand assert syn keyword stataCommand break syn keyword stataCommand by syn keyword stataCommand cap[ture] syn keyword stataCommand cd syn keyword stataCommand chdir syn keyword stataCommand checksum syn keyword stataCommand class syn keyword stataCommand classutil syn keyword stataCommand compress syn keyword stataCommand conf[irm] syn keyword stataCommand conren syn keyword stataCommand continue syn keyword stataCommand cou[nt] syn keyword stataCommand cscript syn keyword stataCommand cscript_log syn keyword stataCommand #delimit syn keyword stataCommand d[escribe] syn keyword stataCommand dir syn keyword stataCommand discard syn keyword stataCommand di[splay] syn keyword stataCommand do syn keyword stataCommand doedit syn keyword stataCommand drop syn keyword stataCommand edit syn keyword stataCommand end syn keyword stataCommand erase syn keyword stataCommand eret[urn] syn keyword stataCommand err[or] syn keyword stataCommand e[xit] syn keyword stataCommand expand syn keyword stataCommand expandcl syn keyword stataCommand file syn keyword stataCommand findfile syn keyword stataCommand format syn keyword stataCommand g[enerate] syn keyword stataCommand gettoken syn keyword stataCommand gl[obal] syn keyword stataCommand help syn keyword stataCommand hexdump syn keyword stataCommand include syn keyword stataCommand infile syn keyword stataCommand infix syn keyword stataCommand input syn keyword stataCommand insheet syn keyword stataCommand joinby syn keyword stataCommand la[bel] syn keyword stataCommand levelsof syn keyword stataCommand list syn keyword stataCommand loc[al] syn keyword stataCommand log syn keyword stataCommand ma[cro] syn keyword stataCommand mark syn keyword stataCommand markout syn keyword stataCommand marksample syn keyword stataCommand mata syn keyword stataCommand matrix syn keyword stataCommand memory syn keyword stataCommand merge syn keyword stataCommand mkdir syn keyword stataCommand more syn keyword stataCommand net syn keyword stataCommand nobreak syn keyword stataCommand n[oisily] syn keyword stataCommand note[s] syn keyword stataCommand numlist syn keyword stataCommand outfile syn keyword stataCommand outsheet syn keyword stataCommand _parse syn keyword stataCommand pause syn keyword stataCommand plugin syn keyword stataCommand post syn keyword stataCommand postclose syn keyword stataCommand postfile syn keyword stataCommand preserve syn keyword stataCommand print syn keyword stataCommand printer syn keyword stataCommand profiler syn keyword stataCommand pr[ogram] syn keyword stataCommand q[uery] syn keyword stataCommand qui[etly] syn keyword stataCommand rcof syn keyword stataCommand reg[ress] syn keyword stataCommand rename syn keyword stataCommand repeat syn keyword stataCommand replace syn keyword stataCommand reshape syn keyword stataCommand ret[urn] syn keyword stataCommand _rmcoll syn keyword stataCommand _rmcoll syn keyword stataCommand _rmcollright syn keyword stataCommand rmdir syn keyword stataCommand _robust syn keyword stataCommand save syn keyword stataCommand sca[lar] syn keyword stataCommand search syn keyword stataCommand serset syn keyword stataCommand set syn keyword stataCommand shell syn keyword stataCommand sleep syn keyword stataCommand sort syn keyword stataCommand split syn keyword stataCommand sret[urn] syn keyword stataCommand ssc syn keyword stataCommand su[mmarize] syn keyword stataCommand syntax syn keyword stataCommand sysdescribe syn keyword stataCommand sysdir syn keyword stataCommand sysuse syn keyword stataCommand token[ize] syn keyword stataCommand translate syn keyword stataCommand type syn keyword stataCommand unab syn keyword stataCommand unabcmd syn keyword stataCommand update syn keyword stataCommand use syn keyword stataCommand vers[ion] syn keyword stataCommand view syn keyword stataCommand viewsource syn keyword stataCommand webdescribe syn keyword stataCommand webseek syn keyword stataCommand webuse syn keyword stataCommand which syn keyword stataCommand who syn keyword stataCommand window " Literals syn match stataQuote /"/ syn region stataEString matchgroup=Nothing start=/`"/ end=/"'/ oneline contains=@stataMacroGroup,stataQuote,stataString,stataEString syn region stataString matchgroup=Nothing start=/"/ end=/"/ oneline contains=@stataMacroGroup " define clusters syn cluster stataFuncGroup contains=@stataMacroGroup,stataFunc,stataString,stataEstring,stataParen,stataBracket syn cluster stataMacroGroup contains=stataGlobal,stataLocal syn cluster stataParenGroup contains=stataParenError,stataBracketError,stataBraceError,stataSpecial,stataFormat " Stata functions " Math syn region stataFunc matchgroup=Function start=/\" " Conditional. syn keyword stpConditional if else elseif then syn match stpConditional "\" " Repeats. syn keyword stpRepeat for while loop syn match stpRepeat "\" " Operators. syn keyword stpOperator asc not and or desc group having in is any some all syn keyword stpOperator between exists like escape with union intersect minus syn keyword stpOperator out prior distinct sysdate " Statements. syn keyword stpStatement alter analyze as audit avg by close clustered comment syn keyword stpStatement commit continue count create cursor declare delete syn keyword stpStatement drop exec execute explain fetch from index insert syn keyword stpStatement into lock max min next noaudit nonclustered open syn keyword stpStatement order output print raiserror recompile rename revoke syn keyword stpStatement rollback savepoint select set sum transaction syn keyword stpStatement truncate unique update values where " Functions. syn keyword stpFunction abs acos ascii asin atan atn2 avg ceiling charindex syn keyword stpFunction charlength convert col_name col_length cos cot count syn keyword stpFunction curunreservedpgs datapgs datalength dateadd datediff syn keyword stpFunction datename datepart db_id db_name degree difference syn keyword stpFunction exp floor getdate hextoint host_id host_name index_col syn keyword stpFunction inttohex isnull lct_admin log log10 lower ltrim max syn keyword stpFunction min now object_id object_name patindex pi pos power syn keyword stpFunction proc_role radians rand replace replicate reserved_pgs syn keyword stpFunction reverse right rtrim rowcnt round show_role sign sin syn keyword stpFunction soundex space sqrt str stuff substr substring sum syn keyword stpFunction suser_id suser_name tan tsequal upper used_pgs user syn keyword stpFunction user_id user_name valid_name valid_user message " Types. syn keyword stpType binary bit char datetime decimal double float image syn keyword stpType int integer long money nchar numeric precision real syn keyword stpType smalldatetime smallint smallmoney text time tinyint syn keyword stpType timestamp varbinary varchar " Globals. syn match stpGlobals '@@char_convert' syn match stpGlobals '@@cient_csname' syn match stpGlobals '@@client_csid' syn match stpGlobals '@@connections' syn match stpGlobals '@@cpu_busy' syn match stpGlobals '@@error' syn match stpGlobals '@@identity' syn match stpGlobals '@@idle' syn match stpGlobals '@@io_busy' syn match stpGlobals '@@isolation' syn match stpGlobals '@@langid' syn match stpGlobals '@@language' syn match stpGlobals '@@max_connections' syn match stpGlobals '@@maxcharlen' syn match stpGlobals '@@ncharsize' syn match stpGlobals '@@nestlevel' syn match stpGlobals '@@pack_received' syn match stpGlobals '@@pack_sent' syn match stpGlobals '@@packet_errors' syn match stpGlobals '@@procid' syn match stpGlobals '@@rowcount' syn match stpGlobals '@@servername' syn match stpGlobals '@@spid' syn match stpGlobals '@@sqlstatus' syn match stpGlobals '@@testts' syn match stpGlobals '@@textcolid' syn match stpGlobals '@@textdbid' syn match stpGlobals '@@textobjid' syn match stpGlobals '@@textptr' syn match stpGlobals '@@textsize' syn match stpGlobals '@@thresh_hysteresis' syn match stpGlobals '@@timeticks' syn match stpGlobals '@@total_error' syn match stpGlobals '@@total_read' syn match stpGlobals '@@total_write' syn match stpGlobals '@@tranchained' syn match stpGlobals '@@trancount' syn match stpGlobals '@@transtate' syn match stpGlobals '@@version' " Todos. syn keyword stpTodo TODO FIXME XXX DEBUG NOTE " Strings and characters. syn match stpStringError "'.*$" syn match stpString "'\([^']\|''\)*'" " Numbers. syn match stpNumber "-\=\<\d*\.\=[0-9_]\>" " Comments. syn region stpComment start="/\*" end="\*/" contains=stpTodo syn match stpComment "--.*" contains=stpTodo syn sync ccomment stpComment " Parens. syn region stpParen transparent start='(' end=')' contains=ALLBUT,stpParenError syn match stpParenError ")" " Syntax Synchronizing. syn sync minlines=10 maxlines=100 " Define the default highlighting. " Only when and item doesn't have highlighting yet. hi def link stpConditional Conditional hi def link stpComment Comment hi def link stpKeyword Keyword hi def link stpNumber Number hi def link stpOperator Operator hi def link stpSpecial Special hi def link stpStatement Statement hi def link stpString String hi def link stpStringError Error hi def link stpType Type hi def link stpTodo Todo hi def link stpFunction Function hi def link stpGlobals Macro hi def link stpParen Normal hi def link stpParenError Error hi def link stpSQLKeyword Function hi def link stpRepeat Repeat let b:current_syntax = "stp" " vim ts=8 sw=2 neovim-0.2.2/runtime/syntax/strace.vim000066400000000000000000000036621320401574200200240ustar00rootroot00000000000000" Vim syntax file " This is a GENERATED FILE. Please always refer to source file at the URI below. " Language: strace output " Maintainer: David Necas (Yeti) " Last Change: 2015-01-16 " Setup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match " Parse the line syn match straceSpecialChar "\\\o\{1,3}\|\\." contained syn region straceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=straceSpecialChar oneline syn match straceNumber "\W[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="lc=1 syn match straceNumber "\W0x\x\+"lc=1 syn match straceNumberRHS "\W\(0x\x\+\|-\=\d\+\)"lc=1 contained syn match straceOtherRHS "?" contained syn match straceConstant "[A-Z_]\{2,}" syn region straceVerbosed start="(" end=")" matchgroup=Normal contained oneline syn region straceReturned start="\s=\s" end="$" contains=StraceEquals,straceNumberRHS,straceOtherRHS,straceConstant,straceVerbosed oneline transparent syn match straceEquals "\s=\s"ms=s+1,me=e-1 syn match straceParenthesis "[][(){}]" syn match straceSysCall "^\w\+" syn match straceOtherPID "^\[[^]]*\]" contains=stracePID,straceNumber nextgroup=straceSysCallEmbed skipwhite syn match straceSysCallEmbed "\w\+" contained syn keyword stracePID pid contained syn match straceOperator "[-+=*/!%&|:,]" syn region straceComment start="/\*" end="\*/" oneline " Define the default highlighting hi def link straceComment Comment hi def link straceVerbosed Comment hi def link stracePID PreProc hi def link straceNumber Number hi def link straceNumberRHS Type hi def link straceOtherRHS Type hi def link straceString String hi def link straceConstant Function hi def link straceEquals Type hi def link straceSysCallEmbed straceSysCall hi def link straceSysCall Statement hi def link straceParenthesis Statement hi def link straceOperator Normal hi def link straceSpecialChar Special hi def link straceOtherPID PreProc let b:current_syntax = "strace" neovim-0.2.2/runtime/syntax/sudoers.vim000066400000000000000000000530451320401574200202270ustar00rootroot00000000000000" Vim syntax file " Language: sudoers(5) configuration files " Previous Maintainer: Nikolai Weibull " Latest Revision: 2011-02-24 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " TODO: instead of 'skipnl', we would like to match a specific group that would " match \\$ and then continue with the nextgroup, actually, the skipnl doesn't " work... " TODO: treat 'ALL' like a special (yay, a bundle of new rules!!!) syn match sudoersUserSpec '^' nextgroup=@sudoersUserInSpec skipwhite syn match sudoersSpecEquals contained '=' nextgroup=@sudoersCmndSpecList skipwhite syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersPASSWD,@sudoersCmndInSpec syn keyword sudoersTodo contained TODO FIXME XXX NOTE syn region sudoersComment display oneline start='#' end='$' contains=sudoersTodo syn keyword sudoersAlias User_Alias Runas_Alias nextgroup=sudoersUserAlias skipwhite skipnl syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skipwhite skipnl syn keyword sudoersAlias Cmnd_Alias nextgroup=sudoersCmndAlias skipwhite skipnl syn match sudoersUserAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersUserAliasEquals skipwhite skipnl syn match sudoersUserNameInList contained '\<\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl syn match sudoersUIDInList contained '#\d\+\>' nextgroup=@sudoersUserList skipwhite skipnl syn match sudoersGroupInList contained '%\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl syn match sudoersUserNetgroupInList contained '+\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl syn match sudoersUserAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl syn match sudoersUserName contained '\<\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl syn match sudoersUID contained '#\d\+\>' nextgroup=@sudoersParameter skipwhite skipnl syn match sudoersGroup contained '%\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl syn match sudoersUserNetgroup contained '+\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl syn match sudoersUserAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl syn match sudoersUserNameInSpec contained '\<\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl syn match sudoersUIDInSpec contained '#\d\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl syn match sudoersGroupInSpec contained '%\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl syn match sudoersUserNetgroupInSpec contained '+\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl syn match sudoersUserAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl syn match sudoersUserNameInRunas contained '\<\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl syn match sudoersUIDInRunas contained '#\d\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl syn match sudoersGroupInRunas contained '%\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl syn match sudoersUserNetgroupInRunas contained '+\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl syn match sudoersUserAliasInRunas contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl syn match sudoersHostAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersHostAliasEquals skipwhite skipnl syn match sudoersHostNameInList contained '\<\l\+\>' nextgroup=@sudoersHostList skipwhite skipnl syn match sudoersIPAddrInList contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersHostList skipwhite skipnl syn match sudoersNetworkInList contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersHostList skipwhite skipnl syn match sudoersHostNetgroupInList contained '+\l\+\>' nextgroup=@sudoersHostList skipwhite skipnl syn match sudoersHostAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersHostList skipwhite skipnl syn match sudoersHostName contained '\<\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl syn match sudoersIPAddr contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersParameter skipwhite skipnl syn match sudoersNetwork contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersParameter skipwhite skipnl syn match sudoersHostNetgroup contained '+\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl syn match sudoersHostAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl syn match sudoersHostNameInSpec contained '\<\l\+\>' nextgroup=@sudoersHostSpec skipwhite skipnl syn match sudoersIPAddrInSpec contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersHostSpec skipwhite skipnl syn match sudoersNetworkInSpec contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersHostSpec skipwhite skipnl syn match sudoersHostNetgroupInSpec contained '+\l\+\>' nextgroup=@sudoersHostSpec skipwhite skipnl syn match sudoersHostAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersHostSpec skipwhite skipnl syn match sudoersCmndAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersCmndAliasEquals skipwhite skipnl syn match sudoersCmndNameInList contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=@sudoersCmndList,sudoersCommandEmpty,sudoersCommandArgs skipwhite syn match sudoersCmndAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersCmndList skipwhite skipnl syn match sudoersCmndNameInSpec contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=@sudoersCmndSpec,sudoersCommandEmptyInSpec,sudoersCommandArgsInSpec skipwhite syn match sudoersCmndAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersCmndSpec skipwhite skipnl syn match sudoersUserAliasEquals contained '=' nextgroup=@sudoersUserInList skipwhite skipnl syn match sudoersUserListComma contained ',' nextgroup=@sudoersUserInList skipwhite skipnl syn match sudoersUserListColon contained ':' nextgroup=sudoersUserAlias skipwhite skipnl syn cluster sudoersUserList contains=sudoersUserListComma,sudoersUserListColon syn match sudoersUserSpecComma contained ',' nextgroup=@sudoersUserInSpec skipwhite skipnl syn cluster sudoersUserSpec contains=sudoersUserSpecComma,@sudoersHostInSpec syn match sudoersUserRunasBegin contained '(' nextgroup=@sudoersUserInRunas skipwhite skipnl syn match sudoersUserRunasComma contained ',' nextgroup=@sudoersUserInRunas skipwhite skipnl syn match sudoersUserRunasEnd contained ')' nextgroup=sudoersPASSWD,@sudoersCmndInSpec skipwhite skipnl syn cluster sudoersUserRunas contains=sudoersUserRunasComma,@sudoersUserInRunas,sudoersUserRunasEnd syn match sudoersHostAliasEquals contained '=' nextgroup=@sudoersHostInList skipwhite skipnl syn match sudoersHostListComma contained ',' nextgroup=@sudoersHostInList skipwhite skipnl syn match sudoersHostListColon contained ':' nextgroup=sudoersHostAlias skipwhite skipnl syn cluster sudoersHostList contains=sudoersHostListComma,sudoersHostListColon syn match sudoersHostSpecComma contained ',' nextgroup=@sudoersHostInSpec skipwhite skipnl syn cluster sudoersHostSpec contains=sudoersHostSpecComma,sudoersSpecEquals syn match sudoersCmndAliasEquals contained '=' nextgroup=@sudoersCmndInList skipwhite skipnl syn match sudoersCmndListComma contained ',' nextgroup=@sudoersCmndInList skipwhite skipnl syn match sudoersCmndListColon contained ':' nextgroup=sudoersCmndAlias skipwhite skipnl syn cluster sudoersCmndList contains=sudoersCmndListComma,sudoersCmndListColon syn match sudoersCmndSpecComma contained ',' nextgroup=@sudoersCmndSpecList skipwhite skipnl syn match sudoersCmndSpecColon contained ':' nextgroup=@sudoersUserInSpec skipwhite skipnl syn cluster sudoersCmndSpec contains=sudoersCmndSpecComma,sudoersCmndSpecColon syn cluster sudoersUserInList contains=sudoersUserNegationInList,sudoersUserNameInList,sudoersUIDInList,sudoersGroupInList,sudoersUserNetgroupInList,sudoersUserAliasInList syn cluster sudoersHostInList contains=sudoersHostNegationInList,sudoersHostNameInList,sudoersIPAddrInList,sudoersNetworkInList,sudoersHostNetgroupInList,sudoersHostAliasInList syn cluster sudoersCmndInList contains=sudoersCmndNegationInList,sudoersCmndNameInList,sudoersCmndAliasInList syn cluster sudoersUser contains=sudoersUserNegation,sudoersUserName,sudoersUID,sudoersGroup,sudoersUserNetgroup,sudoersUserAliasRef syn cluster sudoersHost contains=sudoersHostNegation,sudoersHostName,sudoersIPAddr,sudoersNetwork,sudoersHostNetgroup,sudoersHostAliasRef syn cluster sudoersUserInSpec contains=sudoersUserNegationInSpec,sudoersUserNameInSpec,sudoersUIDInSpec,sudoersGroupInSpec,sudoersUserNetgroupInSpec,sudoersUserAliasInSpec syn cluster sudoersHostInSpec contains=sudoersHostNegationInSpec,sudoersHostNameInSpec,sudoersIPAddrInSpec,sudoersNetworkInSpec,sudoersHostNetgroupInSpec,sudoersHostAliasInSpec syn cluster sudoersUserInRunas contains=sudoersUserNegationInRunas,sudoersUserNameInRunas,sudoersUIDInRunas,sudoersGroupInRunas,sudoersUserNetgroupInRunas,sudoersUserAliasInRunas syn cluster sudoersCmndInSpec contains=sudoersCmndNegationInSpec,sudoersCmndNameInSpec,sudoersCmndAliasInSpec syn match sudoersUserNegationInList contained '!\+' nextgroup=@sudoersUserInList skipwhite skipnl syn match sudoersHostNegationInList contained '!\+' nextgroup=@sudoersHostInList skipwhite skipnl syn match sudoersCmndNegationInList contained '!\+' nextgroup=@sudoersCmndInList skipwhite skipnl syn match sudoersUserNegation contained '!\+' nextgroup=@sudoersUser skipwhite skipnl syn match sudoersHostNegation contained '!\+' nextgroup=@sudoersHost skipwhite skipnl syn match sudoersUserNegationInSpec contained '!\+' nextgroup=@sudoersUserInSpec skipwhite skipnl syn match sudoersHostNegationInSpec contained '!\+' nextgroup=@sudoersHostInSpec skipwhite skipnl syn match sudoersUserNegationInRunas contained '!\+' nextgroup=@sudoersUserInRunas skipwhite skipnl syn match sudoersCmndNegationInSpec contained '!\+' nextgroup=@sudoersCmndInSpec skipwhite skipnl syn match sudoersCommandArgs contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersCommandArgs,@sudoersCmndList skipwhite syn match sudoersCommandEmpty contained '""' nextgroup=@sudoersCmndList skipwhite skipnl syn match sudoersCommandArgsInSpec contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersCommandArgsInSpec,@sudoersCmndSpec skipwhite syn match sudoersCommandEmptyInSpec contained '""' nextgroup=@sudoersCmndSpec skipwhite skipnl syn keyword sudoersDefaultEntry Defaults nextgroup=sudoersDefaultTypeAt,sudoersDefaultTypeColon,sudoersDefaultTypeGreaterThan,@sudoersParameter skipwhite skipnl syn match sudoersDefaultTypeAt contained '@' nextgroup=@sudoersHost skipwhite skipnl syn match sudoersDefaultTypeColon contained ':' nextgroup=@sudoersUser skipwhite skipnl syn match sudoersDefaultTypeGreaterThan contained '>' nextgroup=@sudoersUser skipwhite skipnl " TODO: could also deal with special characters here syn match sudoersBooleanParameter contained '!' nextgroup=sudoersBooleanParameter skipwhite skipnl syn keyword sudoersBooleanParameter contained skipwhite skipnl \ always_set_home \ authenticate \ closefrom_override \ env_editor \ env_reset \ fqdn \ ignore_dot \ ignore_local_sudoers \ insults \ log_host \ log_year \ long_otp_prompt \ mail_always \ mail_badpass \ mail_no_host \ mail_no_perms \ mail_no_user \ noexec \ path_info \ passprompt_override \ preserve_groups \ requiretty \ root_sudo \ rootpw \ runaspw \ set_home \ set_logname \ setenv \ shell_noargs \ stay_setuid \ targetpw \ tty_tickets \ visiblepw syn keyword sudoersIntegerParameter contained \ nextgroup=sudoersIntegerParameterEquals \ skipwhite skipnl \ closefrom \ passwd_tries \ loglinelen \ passwd_timeout \ timestamp_timeout \ umask syn keyword sudoersStringParameter contained \ nextgroup=sudoersStringParameterEquals \ skipwhite skipnl \ badpass_message \ editor \ mailsub \ noexec_file \ passprompt \ runas_default \ syslog_badpri \ syslog_goodpri \ sudoers_locale \ timestampdir \ timestampowner \ askpass \ env_file \ exempt_group \ lecture \ lecture_file \ listpw \ logfile \ mailerflags \ mailerpath \ mailfrom \ mailto \ secure_path \ syslog \ verifypw syn keyword sudoersListParameter contained \ nextgroup=sudoersListParameterEquals \ skipwhite skipnl \ env_check \ env_delete \ env_keep syn match sudoersParameterListComma contained ',' nextgroup=@sudoersParameter skipwhite skipnl syn cluster sudoersParameter contains=sudoersBooleanParameter,sudoersIntegerParameter,sudoersStringParameter,sudoersListParameter syn match sudoersIntegerParameterEquals contained '[+-]\==' nextgroup=sudoersIntegerValue skipwhite skipnl syn match sudoersStringParameterEquals contained '[+-]\==' nextgroup=sudoersStringValue skipwhite skipnl syn match sudoersListParameterEquals contained '[+-]\==' nextgroup=sudoersListValue skipwhite skipnl syn match sudoersIntegerValue contained '\d\+' nextgroup=sudoersParameterListComma skipwhite skipnl syn match sudoersStringValue contained '[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl syn region sudoersStringValue contained start=+"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl syn match sudoersListValue contained '[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl syn region sudoersListValue contained start=+"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl syn match sudoersPASSWD contained '\%(NO\)\=PASSWD:' nextgroup=@sudoersCmndInSpec skipwhite hi def link sudoersSpecEquals Operator hi def link sudoersTodo Todo hi def link sudoersComment Comment hi def link sudoersAlias Keyword hi def link sudoersUserAlias Identifier hi def link sudoersUserNameInList String hi def link sudoersUIDInList Number hi def link sudoersGroupInList PreProc hi def link sudoersUserNetgroupInList PreProc hi def link sudoersUserAliasInList PreProc hi def link sudoersUserName String hi def link sudoersUID Number hi def link sudoersGroup PreProc hi def link sudoersUserNetgroup PreProc hi def link sudoersUserAliasRef PreProc hi def link sudoersUserNameInSpec String hi def link sudoersUIDInSpec Number hi def link sudoersGroupInSpec PreProc hi def link sudoersUserNetgroupInSpec PreProc hi def link sudoersUserAliasInSpec PreProc hi def link sudoersUserNameInRunas String hi def link sudoersUIDInRunas Number hi def link sudoersGroupInRunas PreProc hi def link sudoersUserNetgroupInRunas PreProc hi def link sudoersUserAliasInRunas PreProc hi def link sudoersHostAlias Identifier hi def link sudoersHostNameInList String hi def link sudoersIPAddrInList Number hi def link sudoersNetworkInList Number hi def link sudoersHostNetgroupInList PreProc hi def link sudoersHostAliasInList PreProc hi def link sudoersHostName String hi def link sudoersIPAddr Number hi def link sudoersNetwork Number hi def link sudoersHostNetgroup PreProc hi def link sudoersHostAliasRef PreProc hi def link sudoersHostNameInSpec String hi def link sudoersIPAddrInSpec Number hi def link sudoersNetworkInSpec Number hi def link sudoersHostNetgroupInSpec PreProc hi def link sudoersHostAliasInSpec PreProc hi def link sudoersCmndAlias Identifier hi def link sudoersCmndNameInList String hi def link sudoersCmndAliasInList PreProc hi def link sudoersCmndNameInSpec String hi def link sudoersCmndAliasInSpec PreProc hi def link sudoersUserAliasEquals Operator hi def link sudoersUserListComma Delimiter hi def link sudoersUserListColon Delimiter hi def link sudoersUserSpecComma Delimiter hi def link sudoersUserRunasBegin Delimiter hi def link sudoersUserRunasComma Delimiter hi def link sudoersUserRunasEnd Delimiter hi def link sudoersHostAliasEquals Operator hi def link sudoersHostListComma Delimiter hi def link sudoersHostListColon Delimiter hi def link sudoersHostSpecComma Delimiter hi def link sudoersCmndAliasEquals Operator hi def link sudoersCmndListComma Delimiter hi def link sudoersCmndListColon Delimiter hi def link sudoersCmndSpecComma Delimiter hi def link sudoersCmndSpecColon Delimiter hi def link sudoersUserNegationInList Operator hi def link sudoersHostNegationInList Operator hi def link sudoersCmndNegationInList Operator hi def link sudoersUserNegation Operator hi def link sudoersHostNegation Operator hi def link sudoersUserNegationInSpec Operator hi def link sudoersHostNegationInSpec Operator hi def link sudoersUserNegationInRunas Operator hi def link sudoersCmndNegationInSpec Operator hi def link sudoersCommandArgs String hi def link sudoersCommandEmpty Special hi def link sudoersDefaultEntry Keyword hi def link sudoersDefaultTypeAt Special hi def link sudoersDefaultTypeColon Special hi def link sudoersDefaultTypeGreaterThan Special hi def link sudoersBooleanParameter Identifier hi def link sudoersIntegerParameter Identifier hi def link sudoersStringParameter Identifier hi def link sudoersListParameter Identifier hi def link sudoersParameterListComma Delimiter hi def link sudoersIntegerParameterEquals Operator hi def link sudoersStringParameterEquals Operator hi def link sudoersListParameterEquals Operator hi def link sudoersIntegerValue Number hi def link sudoersStringValue String hi def link sudoersListValue String hi def link sudoersPASSWD Special let b:current_syntax = "sudoers" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/svg.vim000066400000000000000000000006641320401574200173410ustar00rootroot00000000000000" Vim syntax file " Language: SVG (Scalable Vector Graphics) " Maintainer: Vincent Berthoux " File Types: .svg (used in Web and vector programs) " " Directly call the xml syntax, because SVG is an XML " dialect. But as some plugins base their effect on filetype, " providing a distinct filetype from xml is better. if exists("b:current_syntax") finish endif runtime! syntax/xml.vim let b:current_syntax = "svg" neovim-0.2.2/runtime/syntax/svn.vim000066400000000000000000000034741320401574200173520ustar00rootroot00000000000000" Vim syntax file " Language: Subversion (svn) commit file " Maintainer: Dmitry Vasiliev " URL: https://github.com/hdima/vim-scripts/blob/master/syntax/svn.vim " Last Change: 2013-11-08 " Filenames: svn-commit*.tmp " Version: 1.10 " Contributors: " " List of the contributors in alphabetical order: " " A. S. Budden " Ingo Karkat " Myk Taylor " Stefano Zacchiroli " quit when a syntax file was already loaded. if exists("b:current_syntax") finish endif syn spell toplevel syn match svnFirstLine "\%^.*" nextgroup=svnRegion,svnBlank skipnl syn match svnSummary "^.\{0,50\}" contained containedin=svnFirstLine nextgroup=svnOverflow contains=@Spell syn match svnOverflow ".*" contained contains=@Spell syn match svnBlank "^.*" contained contains=@Spell syn region svnRegion end="\%$" matchgroup=svnDelimiter start="^--.*--$" contains=svnRemoved,svnRenamed,svnAdded,svnModified,svnProperty,@NoSpell syn match svnRemoved "^D .*$" contained contains=@NoSpell syn match svnRenamed "^R[ M][ U][ +] .*$" contained contains=@NoSpell syn match svnAdded "^A[ M][ U][ +] .*$" contained contains=@NoSpell syn match svnModified "^M[ M][ U] .*$" contained contains=@NoSpell syn match svnProperty "^_M[ U] .*$" contained contains=@NoSpell " Synchronization. syn sync clear syn sync match svnSync grouphere svnRegion "^--.*--$"me=s-1 " Define the default highlighting. " Only when an item doesn't have highlighting yet. hi def link svnSummary Keyword hi def link svnBlank Error hi def link svnRegion Comment hi def link svnDelimiter NonText hi def link svnRemoved Constant hi def link svnAdded Identifier hi def link svnModified Special hi def link svnProperty Special hi def link svnRenamed Special let b:current_syntax = "svn" neovim-0.2.2/runtime/syntax/syncolor.vim000066400000000000000000000077751320401574200204240ustar00rootroot00000000000000" Vim syntax support file " Maintainer: Bram Moolenaar " Last Change: 2001 Sep 12 " This file sets up the default methods for highlighting. " It is loaded from "synload.vim" and from Vim for ":syntax reset". " Also used from init_highlight(). if !exists("syntax_cmd") || syntax_cmd == "on" " ":syntax on" works like in Vim 5.7: set colors but keep links command -nargs=* SynColor hi command -nargs=* SynLink hi link else if syntax_cmd == "enable" " ":syntax enable" keeps any existing colors command -nargs=* SynColor hi def command -nargs=* SynLink hi def link elseif syntax_cmd == "reset" " ":syntax reset" resets all colors to the default command -nargs=* SynColor hi command -nargs=* SynLink hi! link else " User defined syncolor file has already set the colors. finish endif endif " Many terminals can only use six different colors (plus black and white). " Therefore the number of colors used is kept low. It doesn't look nice with " too many colors anyway. " Careful with "cterm=bold", it changes the color to bright for some terminals. " There are two sets of defaults: for a dark and a light background. if &background == "dark" SynColor Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#80a0ff guibg=NONE SynColor Constant term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE SynColor Special term=bold cterm=NONE ctermfg=LightRed ctermbg=NONE gui=NONE guifg=Orange guibg=NONE SynColor Identifier term=underline cterm=bold ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#40ffff guibg=NONE SynColor Statement term=bold cterm=NONE ctermfg=Yellow ctermbg=NONE gui=bold guifg=#ffff60 guibg=NONE SynColor PreProc term=underline cterm=NONE ctermfg=LightBlue ctermbg=NONE gui=NONE guifg=#ff80ff guibg=NONE SynColor Type term=underline cterm=NONE ctermfg=LightGreen ctermbg=NONE gui=bold guifg=#60ff60 guibg=NONE SynColor Underlined term=underline cterm=underline ctermfg=LightBlue gui=underline guifg=#80a0ff SynColor Ignore term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg guibg=NONE else SynColor Comment term=bold cterm=NONE ctermfg=DarkBlue ctermbg=NONE gui=NONE guifg=Blue guibg=NONE SynColor Constant term=underline cterm=NONE ctermfg=DarkRed ctermbg=NONE gui=NONE guifg=Magenta guibg=NONE SynColor Special term=bold cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=SlateBlue guibg=NONE SynColor Identifier term=underline cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE SynColor Statement term=bold cterm=NONE ctermfg=Brown ctermbg=NONE gui=bold guifg=Brown guibg=NONE SynColor PreProc term=underline cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=Purple guibg=NONE SynColor Type term=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE SynColor Underlined term=underline cterm=underline ctermfg=DarkMagenta gui=underline guifg=SlateBlue SynColor Ignore term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg guibg=NONE endif SynColor Error term=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red SynColor Todo term=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow " Common groups that link to default highlighting. " You can specify other highlighting easily. SynLink String Constant SynLink Character Constant SynLink Number Constant SynLink Boolean Constant SynLink Float Number SynLink Function Identifier SynLink Conditional Statement SynLink Repeat Statement SynLink Label Statement SynLink Operator Statement SynLink Keyword Statement SynLink Exception Statement SynLink Include PreProc SynLink Define PreProc SynLink Macro PreProc SynLink PreCondit PreProc SynLink StorageClass Type SynLink Structure Type SynLink Typedef Type SynLink Tag Special SynLink SpecialChar Special SynLink Delimiter Special SynLink SpecialComment Special SynLink Debug Special delcommand SynColor delcommand SynLink neovim-0.2.2/runtime/syntax/synload.vim000066400000000000000000000037001320401574200202050ustar00rootroot00000000000000" Vim syntax support file " Maintainer: Bram Moolenaar " Last Change: 2016 Nov 04 " This file sets up for syntax highlighting. " It is loaded from "syntax.vim" and "manual.vim". " 1. Set the default highlight groups. " 2. Install Syntax autocommands for all the available syntax files. if !has("syntax") finish endif " let others know that syntax has been switched on let syntax_on = 1 " Set the default highlighting colors. Use a color scheme if specified. if exists("colors_name") exe "colors " . colors_name else runtime! syntax/syncolor.vim endif " Line continuation is used here, remove 'C' from 'cpoptions' let s:cpo_save = &cpo set cpo&vim " First remove all old syntax autocommands. au! Syntax au Syntax * call s:SynSet() fun! s:SynSet() " clear syntax for :set syntax=OFF and any syntax name that doesn't exist syn clear if exists("b:current_syntax") unlet b:current_syntax endif let s = expand("") if s == "ON" " :set syntax=ON if &filetype == "" echohl ErrorMsg echo "filetype unknown" echohl None endif let s = &filetype elseif s == "OFF" let s = "" endif if s != "" " Load the syntax file(s). When there are several, separated by dots, " load each in sequence. for name in split(s, '\.') exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" endfor endif endfun " Handle adding doxygen to other languages (C, C++, C#, IDL, java, php, DataScript) au Syntax c,cpp,cs,idl,java,php,datascript \ if (exists('b:load_doxygen_syntax') && b:load_doxygen_syntax) \ || (exists('g:load_doxygen_syntax') && g:load_doxygen_syntax) \ | runtime! syntax/doxygen.vim \ | endif " Source the user-specified syntax highlighting file if exists("mysyntaxfile") let s:fname = expand(mysyntaxfile) if filereadable(s:fname) execute "source " . fnameescape(s:fname) endif endif " Restore 'cpoptions' let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/syntax.vim000066400000000000000000000023141320401574200200620ustar00rootroot00000000000000" Vim syntax support file " Maintainer: Bram Moolenaar " Last Change: 2001 Sep 04 " This file is used for ":syntax on". " It installs the autocommands and starts highlighting for all buffers. if !has("syntax") finish endif " If Syntax highlighting appears to be on already, turn it off first, so that " any leftovers are cleared. if exists("syntax_on") || exists("syntax_manual") so :p:h/nosyntax.vim endif " Load the Syntax autocommands and set the default methods for highlighting. runtime syntax/synload.vim " Load the FileType autocommands if not done yet. if exists("did_load_filetypes") let s:did_ft = 1 else filetype on let s:did_ft = 0 endif " Set up the connection between FileType and Syntax autocommands. " This makes the syntax automatically set when the file type is detected. augroup syntaxset au! FileType * exe "set syntax=" . expand("") augroup END " Execute the syntax autocommands for the each buffer. " If the filetype wasn't detected yet, do that now. " Always do the syntaxset autocommands, for buffers where the 'filetype' " already was set manually (e.g., help buffers). doautoall syntaxset FileType if !s:did_ft doautoall filetypedetect BufRead endif neovim-0.2.2/runtime/syntax/sysctl.vim000066400000000000000000000022011320401574200200500ustar00rootroot00000000000000" Vim syntax file " Language: sysctl.conf(5) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2011-05-02 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match sysctlBegin display '^' \ nextgroup=sysctlToken,sysctlComment skipwhite syn match sysctlToken contained display '[^=]\+' \ nextgroup=sysctlTokenEq skipwhite syn match sysctlTokenEq contained display '=' nextgroup=sysctlValue skipwhite syn region sysctlValue contained display oneline \ matchgroup=sysctlValue start='\S' \ matchgroup=Normal end='\s*$' syn keyword sysctlTodo contained TODO FIXME XXX NOTE syn region sysctlComment display oneline start='^\s*[#;]' end='$' \ contains=sysctlTodo,@Spell hi def link sysctlTodo Todo hi def link sysctlComment Comment hi def link sysctlToken Identifier hi def link sysctlTokenEq Operator hi def link sysctlValue String let b:current_syntax = "sysctl" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/systemd.vim000066400000000000000000000002701320401574200202230ustar00rootroot00000000000000" Vim syntax file " Language: systemd.unit(5) if !exists('b:current_syntax') " Looks a lot like dosini files. runtime! syntax/dosini.vim let b:current_syntax = 'systemd' endif neovim-0.2.2/runtime/syntax/systemverilog.vim000066400000000000000000000067231320401574200214600ustar00rootroot00000000000000" Vim syntax file " Language: SystemVerilog " Maintainer: kocha " Last Change: 12-Aug-2013. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Read in Verilog syntax files runtime! syntax/verilog.vim unlet b:current_syntax " IEEE1800-2005 syn keyword systemverilogStatement always_comb always_ff always_latch syn keyword systemverilogStatement class endclass new syn keyword systemverilogStatement virtual local const protected syn keyword systemverilogStatement package endpackage syn keyword systemverilogStatement rand randc constraint randomize syn keyword systemverilogStatement with inside dist syn keyword systemverilogStatement sequence endsequence randsequence syn keyword systemverilogStatement srandom syn keyword systemverilogStatement logic bit byte syn keyword systemverilogStatement int longint shortint syn keyword systemverilogStatement struct packed syn keyword systemverilogStatement final syn keyword systemverilogStatement import export syn keyword systemverilogStatement context pure syn keyword systemverilogStatement void shortreal chandle string syn keyword systemverilogStatement clocking endclocking iff syn keyword systemverilogStatement interface endinterface modport syn keyword systemverilogStatement cover covergroup coverpoint endgroup syn keyword systemverilogStatement property endproperty syn keyword systemverilogStatement program endprogram syn keyword systemverilogStatement bins binsof illegal_bins ignore_bins syn keyword systemverilogStatement alias matches solve static assert syn keyword systemverilogStatement assume super before expect bind syn keyword systemverilogStatement extends null tagged extern this syn keyword systemverilogStatement first_match throughout timeprecision syn keyword systemverilogStatement timeunit type union syn keyword systemverilogStatement uwire var cross ref wait_order intersect syn keyword systemverilogStatement wildcard within syn keyword systemverilogTypeDef typedef enum syn keyword systemverilogConditional randcase syn keyword systemverilogConditional unique priority syn keyword systemverilogRepeat return break continue syn keyword systemverilogRepeat do foreach syn keyword systemverilogLabel join_any join_none forkjoin " IEEE1800-2009 add syn keyword systemverilogStatement checker endchecker syn keyword systemverilogStatement accept_on reject_on syn keyword systemverilogStatement sync_accept_on sync_reject_on syn keyword systemverilogStatement eventually nexttime until until_with syn keyword systemverilogStatement s_always s_eventually s_nexttime s_until s_until_with syn keyword systemverilogStatement let untyped syn keyword systemverilogStatement strong weak syn keyword systemverilogStatement restrict global implies syn keyword systemverilogConditional unique0 " IEEE1800-2012 add syn keyword systemverilogStatement implements syn keyword systemverilogStatement interconnect soft nettype " Define the default highlighting. " The default highlighting. hi def link systemverilogStatement Statement hi def link systemverilogTypeDef TypeDef hi def link systemverilogConditional Conditional hi def link systemverilogRepeat Repeat hi def link systemverilogLabel Label hi def link systemverilogGlobal Define hi def link systemverilogNumber Number let b:current_syntax = "systemverilog" " vim: ts=8 neovim-0.2.2/runtime/syntax/tads.vim000066400000000000000000000153161320401574200174750ustar00rootroot00000000000000" Vim syntax file " Language: TADS " Maintainer: Amir Karger " $Date: 2004/06/13 19:28:45 $ " $Revision: 1.1 $ " Stolen from: Bram Moolenaar's C language file " Newest version at: http://www.hec.utah.edu/~karger/vim/syntax/tads.vim " History info at the bottom of the file " TODO lots more keywords " global, self, etc. are special *objects*, not functions. They should " probably be a different color than the special functions " Actually, should cvtstr etc. be functions?! (change tadsFunction) " Make global etc. into Identifiers, since we don't have regular variables? " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " A bunch of useful keywords syn keyword tadsStatement goto break return continue pass syn keyword tadsLabel case default syn keyword tadsConditional if else switch syn keyword tadsRepeat while for do syn keyword tadsStorageClass local compoundWord formatstring specialWords syn keyword tadsBoolean nil true " TADS keywords syn keyword tadsKeyword replace modify syn keyword tadsKeyword global self inherited " builtin functions syn keyword tadsKeyword cvtstr cvtnum caps lower upper substr syn keyword tadsKeyword say length syn keyword tadsKeyword setit setscore syn keyword tadsKeyword datatype proptype syn keyword tadsKeyword car cdr syn keyword tadsKeyword defined isclass syn keyword tadsKeyword find firstobj nextobj syn keyword tadsKeyword getarg argcount syn keyword tadsKeyword input yorn askfile syn keyword tadsKeyword rand randomize syn keyword tadsKeyword restart restore quit save undo syn keyword tadsException abort exit exitobj syn keyword tadsTodo contained TODO FIXME XXX " String and Character constants " Highlight special characters (those which have a backslash) differently syn match tadsSpecial contained "\\." syn region tadsDoubleString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tadsSpecial,tadsEmbedded syn region tadsSingleString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=tadsSpecial " Embedded expressions in strings syn region tadsEmbedded contained start="<<" end=">>" contains=tadsKeyword " TADS doesn't have \xxx, right? "syn match cSpecial contained "\\[0-7][0-7][0-7]\=\|\\." "syn match cSpecialCharacter "'\\[0-7][0-7]'" "syn match cSpecialCharacter "'\\[0-7][0-7][0-7]'" "catch errors caused by wrong parenthesis "syn region cParen transparent start='(' end=')' contains=ALLBUT,cParenError,cIncluded,cSpecial,cTodo,cUserCont,cUserLabel "syn match cParenError ")" "syn match cInParen contained "[{}]" syn region tadsBrace transparent start='{' end='}' contains=ALLBUT,tadsBraceError,tadsIncluded,tadsSpecial,tadsTodo syn match tadsBraceError "}" "integer number (TADS has no floating point numbers) syn case ignore syn match tadsNumber "\<[0-9]\+\>" "hex number syn match tadsNumber "\<0x[0-9a-f]\+\>" syn match tadsIdentifier "\<[a-z][a-z0-9_$]*\>" syn case match " flag an octal number with wrong digits syn match tadsOctalError "\<0[0-7]*[89]" " Removed complicated c_comment_strings syn region tadsComment start="/\*" end="\*/" contains=tadsTodo syn match tadsComment "//.*" contains=tadsTodo syntax match tadsCommentError "\*/" syn region tadsPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=tadsComment,tadsString,tadsNumber,tadsCommentError syn region tadsIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match tadsIncluded contained "<[^>]*>" syn match tadsInclude "^\s*#\s*include\>\s*["<]" contains=tadsIncluded syn region tadsDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,tadsPreCondit,tadsIncluded,tadsInclude,tadsDefine,tadsInBrace,tadsIdentifier syn region tadsPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,tadsPreCondit,tadsIncluded,tadsInclude,tadsDefine,tadsInParen,tadsIdentifier " Highlight User Labels " TODO labels for gotos? "syn region cMulti transparent start='?' end=':' contains=ALLBUT,cIncluded,cSpecial,cTodo,cUserCont,cUserLabel,cBitField " Avoid matching foo::bar() in C++ by requiring that the next char is not ':' "syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel "syn match cUserCont ";\s*\I\i*\s*:$" contains=cUserLabel "syn match cUserCont "^\s*\I\i*\s*:[^:]" contains=cUserLabel "syn match cUserCont ";\s*\I\i*\s*:[^:]" contains=cUserLabel "syn match cUserLabel "\I\i*" contained " identifier: class-name [, class-name [...]] [property-list] ; " Don't highlight comment in class def syn match tadsClassDef "\[^/]*" contains=tadsObjectDef,tadsClass syn match tadsClass contained "\" syn match tadsObjectDef "\<[a-zA-Z][a-zA-Z0-9_$]*\s*:\s*[a-zA-Z0-9_$]\+\(\s*,\s*[a-zA-Z][a-zA-Z0-9_$]*\)*\(\s*;\)\=" syn keyword tadsFunction contained function syn match tadsFunctionDef "\<[a-zA-Z][a-zA-Z0-9_$]*\s*:\s*function[^{]*" contains=tadsFunction "syn region tadsObject transparent start = '[a-zA-Z][\i$]\s*:\s*' end=";" contains=tadsBrace,tadsObjectDef " How far back do we go to find matching groups if !exists("tads_minlines") let tads_minlines = 15 endif exec "syn sync ccomment tadsComment minlines=" . tads_minlines if !exists("tads_sync_dist") let tads_sync_dist = 100 endif execute "syn sync maxlines=" . tads_sync_dist " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later hi def link tadsFunctionDef Function hi def link tadsFunction Structure hi def link tadsClass Structure hi def link tadsClassDef Identifier hi def link tadsObjectDef Identifier " no highlight for tadsEmbedded, so it prints as normal text w/in the string hi def link tadsOperator Operator hi def link tadsStructure Structure hi def link tadsTodo Todo hi def link tadsLabel Label hi def link tadsConditional Conditional hi def link tadsRepeat Repeat hi def link tadsException Exception hi def link tadsStatement Statement hi def link tadsStorageClass StorageClass hi def link tadsKeyWord Keyword hi def link tadsSpecial SpecialChar hi def link tadsNumber Number hi def link tadsBoolean Boolean hi def link tadsDoubleString tadsString hi def link tadsSingleString tadsString hi def link tadsOctalError tadsError hi def link tadsCommentError tadsError hi def link tadsBraceError tadsError hi def link tadsInBrace tadsError hi def link tadsError Error hi def link tadsInclude Include hi def link tadsPreProc PreProc hi def link tadsDefine Macro hi def link tadsIncluded tadsString hi def link tadsPreCondit PreCondit hi def link tadsString String hi def link tadsComment Comment let b:current_syntax = "tads" " Changes: " 11/18/99 Added a bunch of TADS functions, tadsException " 10/22/99 Misspelled Moolenaar (sorry!), c_minlines to tads_minlines " " vim: ts=8 neovim-0.2.2/runtime/syntax/tags.vim000066400000000000000000000022031320401574200174670ustar00rootroot00000000000000" Language: tags " Maintainer: Charles E. Campbell " Last Change: Oct 26, 2016 " Version: 7 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TAGS " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match tagName "^[^\t]\+" skipwhite nextgroup=tagPath syn match tagPath "[^\t]\+" contained skipwhite nextgroup=tagAddr contains=tagBaseFile syn match tagBaseFile "[a-zA-Z_]\+[\.a-zA-Z_0-9]*\t"me=e-1 contained syn match tagAddr "\d*" contained skipwhite nextgroup=tagComment syn region tagAddr matchgroup=tagDelim start="/" skip="\(\\\\\)*\\/" matchgroup=tagDelim end="$\|/" oneline contained skipwhite nextgroup=tagComment syn match tagComment ";.*$" contained contains=tagField syn match tagComment "^!_TAG_.*$" syn match tagField contained "[a-z]*:" " Define the default highlighting. if !exists("skip_drchip_tags_inits") hi def link tagBaseFile PreProc hi def link tagComment Comment hi def link tagDelim Delimiter hi def link tagField Number hi def link tagName Identifier hi def link tagPath PreProc endif let b:current_syntax = "tags" neovim-0.2.2/runtime/syntax/tak.vim000066400000000000000000000055501320401574200173200ustar00rootroot00000000000000" Vim syntax file " Language: TAK2, TAK3, TAK2000 thermal modeling input file " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.tak " URL: http://www.naglenet.org/vim/syntax/tak.vim " MAIN URL: http://www.naglenet.org/vim/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Ignore case syn case ignore " " " Begin syntax definitions for tak input file. " " Force free-form fortran format let fortran_free_source=1 " Load FORTRAN syntax file runtime! syntax/fortran.vim unlet b:current_syntax " Define keywords for TAK and TAKOUT syn keyword takOptions AUTODAMP CPRINT CSGDUMP GPRINT HPRINT LODTMP syn keyword takOptions LOGIC LPRINT NCVPRINT PLOTQ QPRINT QDUMP syn keyword takOptions SUMMARY SOLRTN UID DICTIONARIES syn keyword takRoutine SSITER FWDWRD FWDBCK BCKWRD syn keyword takControl ABSZRO BACKUP DAMP DTIMEI DTIMEL DTIMEH IFC syn keyword takControl MAXTEMP NLOOPS NLOOPT NODELIST OUTPUT PLOT syn keyword takControl SCALE SIGMA SSCRIT TIMEND TIMEN TIMEO TRCRIT syn keyword takControl PLOT syn keyword takSolids PLATE CYL syn keyword takSolidsArg ID MATNAM NTYPE TEMP XL YL ZL ISTRN ISTRG NNX syn keyword takSolidsArg NNY NNZ INCX INCY INCZ IAK IAC DIFF ARITH BOUN syn keyword takSolidsArg RMIN RMAX AXMAX NNR NNTHETA INCR INCTHETA END syn case ignore syn keyword takMacro fac pstart pstop syn keyword takMacro takcommon fstart fstop syn keyword takIdentifier flq flx gen ncv per sim siv stf stv tvd tvs syn keyword takIdentifier tvt pro thm " Define matches for TAK syn match takFortran "^F[0-9 ]"me=e-1 syn match takMotran "^M[0-9 ]"me=e-1 syn match takComment "^C.*$" syn match takComment "^R.*$" syn match takComment "\$.*$" syn match takHeader "^header[^,]*" syn match takIncludeFile "include \+[^ ]\+"hs=s+8 contains=fortranInclude syn match takInteger "-\=\<[0-9]*\>" syn match takFloat "-\=\<[0-9]*\.[0-9]*" syn match takScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" syn match takEndData "END OF DATA" if exists("thermal_todo") execute 'syn match takTodo ' . '"^'.thermal_todo.'.*$"' else syn match takTodo "^?.*$" endif " Define the default highlighting " Only when an item doesn't have highlighting yet hi def link takMacro Macro hi def link takOptions Special hi def link takRoutine Type hi def link takControl Special hi def link takSolids Special hi def link takSolidsArg Statement hi def link takIdentifier Identifier hi def link takFortran PreProc hi def link takMotran PreProc hi def link takComment Comment hi def link takHeader Typedef hi def link takIncludeFile Type hi def link takInteger Number hi def link takFloat Float hi def link takScientific Float hi def link takEndData Macro hi def link takTodo Todo let b:current_syntax = "tak" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/takcmp.vim000066400000000000000000000030711320401574200200140ustar00rootroot00000000000000" Vim syntax file " Language: TAK2, TAK3, TAK2000 thermal modeling compare file " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.cmp " URL: http://www.naglenet.org/vim/syntax/takcmp.vim " MAIN URL: http://www.naglenet.org/vim/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Ignore case syn case ignore " " " Begin syntax definitions for compare files. " " Define keywords for TAK compare syn keyword takcmpUnit celsius fahrenheit " Define matches for TAK compare syn match takcmpTitle "Steady State Temperature Comparison" syn match takcmpLabel "Run Date:" syn match takcmpLabel "Run Time:" syn match takcmpLabel "Temp. File \d Units:" syn match takcmpLabel "Filename:" syn match takcmpLabel "Output Units:" syn match takcmpHeader "^ *Node\( *File \d\)* *Node Description" syn match takcmpDate "\d\d\/\d\d\/\d\d" syn match takcmpTime "\d\d:\d\d:\d\d" syn match takcmpInteger "^ *-\=\<[0-9]*\>" syn match takcmpFloat "-\=\<[0-9]*\.[0-9]*" " Define the default highlighting " Only when an item doesn't have highlighting yet hi def link takcmpTitle Type hi def link takcmpUnit PreProc hi def link takcmpLabel Statement hi def link takcmpHeader takHeader hi def link takcmpDate Identifier hi def link takcmpTime Identifier hi def link takcmpInteger Number hi def link takcmpFloat Special let b:current_syntax = "takcmp" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/takout.vim000066400000000000000000000037201320401574200200450ustar00rootroot00000000000000" Vim syntax file " Language: TAK2, TAK3, TAK2000 thermal modeling output file " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.out " URL: http://www.naglenet.org/vim/syntax/takout.vim " MAIN URL: http://www.naglenet.org/vim/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Ignore case syn case match " Load TAK syntax file runtime! syntax/tak.vim unlet b:current_syntax " " " Begin syntax definitions for tak output files. " " Define keywords for TAK output syn case match syn keyword takoutPos ON SI syn keyword takoutNeg OFF ENG " Define matches for TAK output syn match takoutTitle "TAK III" syn match takoutTitle "Release \d.\d\d" syn match takoutTitle " K & K Associates *Thermal Analysis Kit III *Serial Number \d\d-\d\d\d" syn match takoutFile ": \w*\.TAK"hs=s+2 syn match takoutInteger "T\=[0-9]*\>"ms=s+1 syn match takoutSectionDelim "[-<>]\{4,}" contains=takoutSectionTitle syn match takoutSectionDelim ":\=\.\{4,}:\=" contains=takoutSectionTitle syn match takoutSectionTitle "[-<:] \w[0-9A-Za-z_() ]\+ [->:]"hs=s+1,me=e-1 syn match takoutHeaderDelim "=\{5,}" syn match takoutHeaderDelim "|\{5,}" syn match takoutHeaderDelim "+\{5,}" syn match takoutLabel "Input File:" contains=takoutFile syn match takoutLabel "Begin Solution: Routine" syn match takoutError "<<< Error >>>" " Define the default highlighting " Only when an item doesn't have highlighting yet hi def link takoutPos Statement hi def link takoutNeg PreProc hi def link takoutTitle Type hi def link takoutFile takIncludeFile hi def link takoutInteger takInteger hi def link takoutSectionDelim Delimiter hi def link takoutSectionTitle Exception hi def link takoutHeaderDelim SpecialComment hi def link takoutLabel Identifier hi def link takoutError Error let b:current_syntax = "takout" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/tap.vim000066400000000000000000000104121320401574200173160ustar00rootroot00000000000000" Vim syntax file " Language: Verbose TAP Output " Maintainer: Rufus Cable " Remark: Simple syntax highlighting for TAP output " License: " Copyright: (c) 2008-2013 Rufus Cable " Last Change: 2014-12-13 if exists("b:current_syntax") finish endif syn match tapTestDiag /^ *#.*/ contains=tapTestTodo syn match tapTestTime /^ *\[\d\d:\d\d:\d\d\].*/ contains=tapTestFile syn match tapTestFile /\w\+\/[^. ]*/ contained syn match tapTestFileWithDot /\w\+\/[^ ]*/ contained syn match tapTestPlan /^ *\d\+\.\.\d\+$/ " tapTest is a line like 'ok 1', 'not ok 2', 'ok 3 - xxxx' syn match tapTest /^ *\(not \)\?ok \d\+.*/ contains=tapTestStatusOK,tapTestStatusNotOK,tapTestLine " tapTestLine is the line without the ok/not ok status - i.e. number and " optional message syn match tapTestLine /\d\+\( .*\|$\)/ contains=tapTestNumber,tapTestLoadMessage,tapTestTodo,tapTestSkip contained " turn ok/not ok messages green/red respectively syn match tapTestStatusOK /ok/ contained syn match tapTestStatusNotOK /not ok/ contained " highlight todo tests syn match tapTestTodo /\(# TODO\|Failed (TODO)\) .*$/ contained contains=tapTestTodoRev syn match tapTestTodoRev /\/ contained " highlight skipped tests syn match tapTestSkip /# skip .*$/ contained contains=tapTestSkipTag syn match tapTestSkipTag /\(# \)\@<=skip\>/ contained " look behind so "ok 123" and "not ok 124" match test number syn match tapTestNumber /\(ok \)\@<=\d\d*/ contained syn match tapTestLoadMessage /\*\*\*.*\*\*\*/ contained contains=tapTestThreeStars,tapTestFileWithDot syn match tapTestThreeStars /\*\*\*/ contained syn region tapTestRegion start=/^ *\(not \)\?ok.*$/me=e+1 end=/^\(\(not \)\?ok\|# Looks like you planned \|All tests successful\|Bailout called\)/me=s-1 fold transparent excludenl syn region tapTestResultsOKRegion start=/^\(All tests successful\|Result: PASS\)/ end=/$/ syn region tapTestResultsNotOKRegion start=/^\(# Looks like you planned \|Bailout called\|# Looks like you failed \|Result: FAIL\)/ end=/$/ syn region tapTestResultsSummaryRegion start=/^Test Summary Report/ end=/^Files=.*$/ contains=tapTestResultsSummaryHeading,tapTestResultsSummaryNotOK syn region tapTestResultsSummaryHeading start=/^Test Summary Report/ end=/^-\+$/ contained syn region tapTestResultsSummaryNotOK start=/TODO passed:/ end=/$/ contained syn region tapTestInstructionsRegion start=/\%1l/ end=/^$/ set foldtext=TAPTestLine_foldtext() function! TAPTestLine_foldtext() let line = getline(v:foldstart) let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g') return sub endfunction set foldminlines=5 set foldcolumn=2 set foldenable set foldmethod=syntax syn sync fromstart if !exists("did_tapverboseoutput_syntax_inits") let did_tapverboseoutput_syntax_inits = 1 hi tapTestStatusOK term=bold ctermfg=green guifg=Green hi tapTestStatusNotOK term=reverse ctermfg=black ctermbg=red guifg=Black guibg=Red hi tapTestTodo term=bold ctermfg=yellow ctermbg=black guifg=Yellow guibg=Black hi tapTestTodoRev term=reverse ctermfg=black ctermbg=yellow guifg=Black guibg=Yellow hi tapTestSkip term=bold ctermfg=lightblue guifg=LightBlue hi tapTestSkipTag term=reverse ctermfg=black ctermbg=lightblue guifg=Black guibg=LightBlue hi tapTestTime term=bold ctermfg=blue guifg=Blue hi tapTestFile term=reverse ctermfg=black ctermbg=yellow guibg=Black guifg=Yellow hi tapTestLoadedFile term=bold ctermfg=black ctermbg=cyan guibg=Cyan guifg=Black hi tapTestThreeStars term=reverse ctermfg=blue guifg=Blue hi tapTestPlan term=bold ctermfg=yellow guifg=Yellow hi link tapTestFileWithDot tapTestLoadedFile hi link tapTestNumber Number hi link tapTestDiag Comment hi tapTestRegion ctermbg=green hi tapTestResultsOKRegion ctermbg=green ctermfg=black hi tapTestResultsNotOKRegion ctermbg=red ctermfg=black hi tapTestResultsSummaryHeading ctermbg=blue ctermfg=white hi tapTestResultsSummaryNotOK ctermbg=red ctermfg=black hi tapTestInstructionsRegion ctermbg=lightmagenta ctermfg=black endif let b:current_syntax="tapVerboseOutput" neovim-0.2.2/runtime/syntax/tar.vim000066400000000000000000000005651320401574200173300ustar00rootroot00000000000000" Language : Tar Listing Syntax " Maintainer : Bram Moolenaar " Last change: Sep 08, 2004 if exists("b:current_syntax") finish endif syn match tarComment '^".*' contains=tarFilename syn match tarFilename 'tarfile \zs.*' contained syn match tarDirectory '.*/$' hi def link tarComment Comment hi def link tarFilename Constant hi def link tarDirectory Type " vim: ts=8 neovim-0.2.2/runtime/syntax/taskdata.vim000066400000000000000000000022671320401574200203370ustar00rootroot00000000000000" Vim syntax file " Language: task data " Maintainer: John Florian " Updated: Wed Jul 8 19:46:20 EDT 2009 " quit when a syntax file was already loaded. if exists("b:current_syntax") finish endif let s:keepcpo= &cpo set cpo&vim " Key Names for values. syn keyword taskdataKey description due end entry imask mask parent syn keyword taskdataKey priority project recur start status tags uuid syn match taskdataKey "annotation_\d\+" syn match taskdataUndo "^time.*$" syn match taskdataUndo "^\(old \|new \|---\)" " Values associated with key names. " " Strings syn region taskdataString matchgroup=Normal start=+"+ end=+"+ \ contains=taskdataEncoded,taskdataUUID,@Spell " " Special Embedded Characters (e.g., ",") syn match taskdataEncoded "&\a\+;" contained " UUIDs syn match taskdataUUID "\x\{8}-\(\x\{4}-\)\{3}\x\{12}" contained " The default methods for highlighting. Can be overridden later. hi def link taskdataEncoded Function hi def link taskdataKey Statement hi def link taskdataString String hi def link taskdataUUID Special hi def link taskdataUndo Type let b:current_syntax = "taskdata" let &cpo = s:keepcpo unlet s:keepcpo " vim:noexpandtab neovim-0.2.2/runtime/syntax/taskedit.vim000066400000000000000000000021521320401574200203440ustar00rootroot00000000000000" Vim syntax file " Language: support for 'task 42 edit' " Maintainer: John Florian " Updated: Wed Jul 8 19:46:32 EDT 2009 " quit when a syntax file was already loaded. if exists("b:current_syntax") finish endif let s:keepcpo= &cpo set cpo&vim syn match taskeditHeading "^\s*#\s*Name\s\+Editable details\s*$" contained syn match taskeditHeading "^\s*#\s*-\+\s\+-\+\s*$" contained syn match taskeditReadOnly "^\s*#\s*\(UU\)\?ID:.*$" contained syn match taskeditReadOnly "^\s*#\s*Status:.*$" contained syn match taskeditReadOnly "^\s*#\s*i\?Mask:.*$" contained syn match taskeditKey "^ *.\{-}:" nextgroup=taskeditString syn match taskeditComment "^\s*#.*$" \ contains=taskeditReadOnly,taskeditHeading syn match taskeditString ".*$" contained contains=@Spell " The default methods for highlighting. Can be overridden later. hi def link taskeditComment Comment hi def link taskeditHeading Function hi def link taskeditKey Statement hi def link taskeditReadOnly Special hi def link taskeditString String let b:current_syntax = "taskedit" let &cpo = s:keepcpo unlet s:keepcpo " vim:noexpandtab neovim-0.2.2/runtime/syntax/tasm.vim000066400000000000000000000130501320401574200174770ustar00rootroot00000000000000" Vim syntax file " Language: TASM: turbo assembler by Borland " Maintaner: FooLman of United Force " Last Change: 2012 Feb 03 by Thilo Six " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case ignore syn match tasmLabel "^[\ \t]*[@a-z_$][a-z0-9_$@]*\ *:" syn keyword tasmDirective ALIAS ALIGN ARG ASSUME %BIN CATSRT CODESEG syn match tasmDirective "\<\(byte\|word\|dword\|qword\)\ ptr\>" " CALL extended syntax syn keyword tasmDirective COMM %CONDS CONST %CREF %CREFALL %CREFREF syn keyword tasmDirective %CREFUREF %CTLS DATASEG DB DD %DEPTH DF DISPLAY syn keyword tasmDirective DOSSEG DP DQ DT DW ELSE EMUL END ENDIF " IF XXXX syn keyword tasmDirective ENDM ENDP ENDS ENUM EQU ERR EVEN EVENDATA EXITCODE syn keyword tasmDirective EXITM EXTRN FARDATA FASTIMUL FLIPFLAG GETFIELD GLOBAL syn keyword tasmDirective GOTO GROUP IDEAL %INCL INCLUDE INCLUDELIB INSTR IRP "JMP syn keyword tasmDirective IRPC JUMPS LABEL LARGESTACK %LINUM %LIST LOCAL syn keyword tasmDirective LOCALS MACRO %MACS MASKFLAG MASM MASM51 MODEL syn keyword tasmDirective MULTERRS NAME %NEWPAGE %NOCONDS %NOCREF %NOCTLS syn keyword tasmDirective NOEMUL %NOINCL NOJUMPS %NOLIST NOLOCALS %NOMACS syn keyword tasmDirective NOMASM51 NOMULTERRS NOSMART %NOSYMS %NOTRUNC NOWARN syn keyword tasmDirective %PAGESIZE %PCNT PNO87 %POPLCTL POPSTATE PROC PROCDESC syn keyword tasmDirective PROCTYPE PUBLIC PUBLICDLL PURGE %PUSHCTL PUSHSTATE "rept, ret syn keyword tasmDirective QUIRKS RADIX RECORD RETCODE SEGMENT SETFIELD syn keyword tasmDirective SETFLAG SIZESTR SMALLSTACK SMART STACK STARTUPCODE syn keyword tasmDirective STRUC SUBSTR %SUBTTL %SYMS TABLE %TABSIZE TBLINIT syn keyword tasmDirective TBLINST TBLPTR TESTFLAG %TEXT %TITLE %TRUNC TYPEDEF syn keyword tasmDirective UDATASEG UFARDATA UNION USES VERSION WAR WHILE ?DEBUG syn keyword tasmInstruction AAA AAD AAM AAS ADC ADD AND ARPL BOUND BSF BSR syn keyword tasmInstruction BSWAP BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS syn keyword tasmInstruction CMC CMP CMPXCHG CMPXCHG8B CPUID CWD CDQ CWDE syn keyword tasmInstruction DAA DAS DEC DIV ENTER RETN RETF F2XM1 syn keyword tasmCoprocInstr FABS FADD FADDP FBLD FBSTP FCHG FCOM FCOM2 FCOMI syn keyword tasmCoprocInstr FCOMIP FCOMP FCOMP3 FCOMP5 FCOMPP FCOS FDECSTP syn keyword tasmCoprocInstr FDISI FDIV FDIVP FDIVR FENI FFREE FFREEP FIADD syn keyword tasmCoprocInstr FICOM FICOMP FIDIV FIDIVR FILD FIMUL FINIT FINCSTP syn keyword tasmCoprocInstr FIST FISTP FISUB FISUBR FLD FLD1 FLDCW FLDENV syn keyword tasmCoprocInstr FLDL2E FLDL2T FLDLG2 FLDLN2 FLDPI FLDZ FMUL FMULP syn keyword tasmCoprocInstr FNCLEX FNINIT FNOP FNSAVE FNSTCW FNSTENV FNSTSW syn keyword tasmCoprocInstr FPATAN FPREM FPREM1 FPTAN FRNDINT FRSTOR FSCALE syn keyword tasmCoprocInstr FSETPM FSIN FSINCOM FSQRT FST FSTP FSTP1 FSTP8 syn keyword tasmCoprocInstr FSTP9 FSUB FSUBP FSUBR FSUBRP FTST FUCOM FUCOMI syn keyword tasmCoprocInstr FUCOMPP FWAIT FXAM FXCH FXCH4 FXCH7 FXTRACT FYL2X syn keyword tasmCoprocInstr FYL2XP1 FSTCW FCHS FSINCOS syn keyword tasmInstruction IDIV IMUL IN INC INT INTO INVD INVLPG IRET JMP syn keyword tasmInstruction LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT syn keyword tasmInstruction LMSW LOCK LODSB LSL LSS LTR MOV MOVSX MOVZX MUL syn keyword tasmInstruction NEG NOP NOT OR OUT POP POPA POPAD POPF POPFD PUSH syn keyword tasmInstruction PUSHA PUSHAD PUSHF PUSHFD RCL RCR RDMSR RDPMC RDTSC syn keyword tasmInstruction REP RET ROL ROR RSM SAHF SAR SBB SGDT SHL SAL SHLD syn keyword tasmInstruction SHR SHRD SIDT SMSW STC STD STI STR SUB TEST VERR syn keyword tasmInstruction VERW WBINVD WRMSR XADD XCHG XLAT XOR syn keyword tasmMMXinst EMMS MOVD MOVQ PACKSSDW PACKSSWB PACKUSWB PADDB syn keyword tasmMMXinst PADDD PADDSB PADDSB PADDSW PADDUSB PADDUSW PADDW syn keyword tasmMMXinst PAND PANDN PCMPEQB PCMPEQD PCMPEQW PCMPGTB PCMPGTD syn keyword tasmMMXinst PCMPGTW PMADDWD PMULHW PMULLW POR PSLLD PSLLQ syn keyword tasmMMXinst PSLLW PSRAD PSRAW PSRLD PSRLQ PSRLW PSUBB PSUBD syn keyword tasmMMXinst PSUBSB PSUBSW PSUBUSB PSUBUSW PSUBW PUNPCKHBW syn keyword tasmMMXinst PUNPCKHBQ PUNPCKHWD PUNPCKLBW PUNPCKLDQ PUNPCKLWD syn keyword tasmMMXinst PXOR "FCMOV syn match tasmInstruction "\<\(CMPS\|MOVS\|OUTS\|SCAS\|STOS\|LODS\|INS\)[BWD]" syn match tasmInstruction "\<\(CMOV\|SET\|J\)N\=[ABCGLESXZ]\>" syn match tasmInstruction "\<\(CMOV\|SET\|J\)N\=[ABGL]E\>" syn match tasmInstruction "\<\(LOOP\|REP\)N\=[EZ]\=\>" syn match tasmRegister "\<[A-D][LH]\>" syn match tasmRegister "\" syn match tasmRegister "\<[C-GS]S\>" syn region tasmComment start=";" end="$" "HACK! comment ? ... selection syn region tasmComment start="comment \+\$" end="\$" syn region tasmComment start="comment \+\~" end="\~" syn region tasmComment start="comment \+#" end="#" syn region tasmString start="'" end="'" syn region tasmString start='"' end='"' syn match tasmDec "\<-\=[0-9]\+\.\=[0-9]*\>" syn match tasmHex "\<[0-9][0-9A-F]*H\>" syn match tasmOct "\<[0-7]\+O\>" syn match tasmBin "\<[01]\+B\>" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link tasmString String hi def link tasmDec Number hi def link tasmHex Number hi def link tasmOct Number hi def link tasmBin Number hi def link tasmInstruction Keyword hi def link tasmCoprocInstr Keyword hi def link tasmMMXInst Keyword hi def link tasmDirective PreProc hi def link tasmRegister Identifier hi def link tasmProctype PreProc hi def link tasmComment Comment hi def link tasmLabel Label let b:curret_syntax = "tasm" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/tcl.vim000066400000000000000000000416061320401574200173250ustar00rootroot00000000000000" Vim syntax file " Language: Tcl/Tk " Maintainer: Taylor Venable " (previously Brett Cannon ) " (previously Dean Copsey ) " (previously Matt Neumann ) " (previously Allan Kelly ) " Original: Robin Becker " Last Change: 2014-02-12 " Version: 1.14 " URL: http://bitbucket.org/taylor_venable/metasyntax/src/tip/Config/vim/syntax/tcl.vim " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Basic Tcl commands: http://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm syn keyword tclCommand after append array bgerror binary cd chan clock close concat syn keyword tclCommand dde dict encoding eof error eval exec exit expr fblocked syn keyword tclCommand fconfigure fcopy file fileevent flush format gets glob syn keyword tclCommand global history http incr info interp join lappend lassign syn keyword tclCommand lindex linsert list llength lmap load lrange lrepeat syn keyword tclCommand lreplace lreverse lsearch lset lsort memory my namespace syn keyword tclCommand next nextto open package pid puts pwd read refchan regexp syn keyword tclCommand registry regsub rename scan seek self set socket source syn keyword tclCommand split string subst tell time trace unknown unload unset syn keyword tclCommand update uplevel upvar variable vwait " The 'Tcl Standard Library' commands: http://www.tcl.tk/man/tcl8.6/TclCmd/library.htm syn keyword tclCommand auto_execok auto_import auto_load auto_mkindex auto_reset syn keyword tclCommand auto_qualify tcl_findLibrary parray tcl_endOfWord syn keyword tclCommand tcl_startOfNextWord tcl_startOfPreviousWord syn keyword tclCommand tcl_wordBreakAfter tcl_wordBreakBefore " Global variables used by Tcl: http://www.tcl.tk/man/tcl8.6/TclCmd/tclvars.htm syn keyword tclVars auto_path env errorCode errorInfo tcl_library tcl_patchLevel syn keyword tclVars tcl_pkgPath tcl_platform tcl_precision tcl_rcFileName syn keyword tclVars tcl_traceCompile tcl_traceExec tcl_wordchars syn keyword tclVars tcl_nonwordchars tcl_version argc argv argv0 tcl_interactive " Strings which expr accepts as boolean values, aside from zero / non-zero. syn keyword tclBoolean true false on off yes no syn keyword tclProcCommand apply coroutine proc return tailcall yield yieldto syn keyword tclConditional if then else elseif switch syn keyword tclConditional catch try throw finally syn keyword tclLabel default syn keyword tclRepeat while for foreach break continue syn keyword tcltkSwitch contained insert create polygon fill outline tag " WIDGETS " commands associated with widgets syn keyword tcltkWidgetSwitch contained background highlightbackground insertontime cget syn keyword tcltkWidgetSwitch contained selectborderwidth borderwidth highlightcolor insertwidth syn keyword tcltkWidgetSwitch contained selectforeground cursor highlightthickness padx setgrid syn keyword tcltkWidgetSwitch contained exportselection insertbackground pady takefocus syn keyword tcltkWidgetSwitch contained font insertborderwidth relief xscrollcommand syn keyword tcltkWidgetSwitch contained foreground insertofftime selectbackground yscrollcommand syn keyword tcltkWidgetSwitch contained height spacing1 spacing2 spacing3 syn keyword tcltkWidgetSwitch contained state tabs width wrap " button syn keyword tcltkWidgetSwitch contained command default " canvas syn keyword tcltkWidgetSwitch contained closeenough confine scrollregion xscrollincrement yscrollincrement orient " checkbutton, radiobutton syn keyword tcltkWidgetSwitch contained indicatoron offvalue onvalue selectcolor selectimage state variable " entry, frame syn keyword tcltkWidgetSwitch contained show class colormap container visual " listbox, menu syn keyword tcltkWidgetSwitch contained selectmode postcommand selectcolor tearoff tearoffcommand title type " menubutton, message syn keyword tcltkWidgetSwitch contained direction aspect justify " scale syn keyword tcltkWidgetSwitch contained bigincrement digits from length resolution showvalue sliderlength sliderrelief tickinterval to " scrollbar syn keyword tcltkWidgetSwitch contained activerelief elementborderwidth " image syn keyword tcltkWidgetSwitch contained delete names types create " variable reference " ::optional::namespaces syn match tclVarRef "$\(\(::\)\?\([[:alnum:]_]*::\)*\)\a[[:alnum:]_]*" " ${...} may contain any character except '}' syn match tclVarRef "${[^}]*}" " Used to facilitate hack to utilize string background for certain color " schemes, e.g. inkpot and lettuce. syn cluster tclVarRefC add=tclVarRef syn cluster tclSpecialC add=tclSpecial " The syntactic unquote-splicing replacement for [expand]. syn match tclExpand '\s{\*}' syn match tclExpand '^{\*}' " menu, mane add syn keyword tcltkWidgetSwitch contained active end last none cascade checkbutton command radiobutton separator syn keyword tcltkWidgetSwitch contained activebackground actveforeground accelerator background bitmap columnbreak syn keyword tcltkWidgetSwitch contained font foreground hidemargin image indicatoron label menu offvalue onvalue syn keyword tcltkWidgetSwitch contained selectcolor selectimage state underline value variable syn keyword tcltkWidgetSwitch contained add clone configure delete entrycget entryconfigure index insert invoke syn keyword tcltkWidgetSwitch contained post postcascade type unpost yposition activate "syn keyword tcltkWidgetSwitch contained "syn match tcltkWidgetSwitch contained syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef " These words are dual purpose. " match switches "syn match tcltkWidgetSwitch contained "-text"hs=s+1 syn match tcltkWidgetSwitch contained "-text\(var\)\?"hs=s+1 syn match tcltkWidgetSwitch contained "-menu"hs=s+1 syn match tcltkWidgetSwitch contained "-label"hs=s+1 " match commands - 2 lines for pretty match. "variable " Special case - If a number follows a variable region, it must be at the end of " the pattern, by definition. Therefore, (1) either include a number as the region " end and exclude tclNumber from the contains list, or (2) make variable " keepend. As (1) would put variable out of step with everything else, use (2). syn region tcltkCommand matchgroup=tcltkCommandColor start="^\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tclString,tclNumber,tclVarRef,tcltkCommand syn region tcltkCommand matchgroup=tcltkCommandColor start="\s\\|\[\"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tclString,tclNumber,tclVarRef,tcltkCommand " menu syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\\|\[\"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef " label syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\\|\[\"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef " text syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidget,tcltkWidgetSwitch,tcltkSwitch,tclNumber,tclVarRef,tclString syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\\|\[\"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidget,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef " This isn't contained (I don't think) so it's OK to just associate with the Color group. " TODO: This could be wrong. syn keyword tcltkWidgetColor toplevel syn region tcltkPackConf matchgroup=tcltkPackConfColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tcltkPackConfSwitch,tclNumber,tclVarRef keepend syn region tcltkPackConf matchgroup=tcltkPackConfColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tcltkPackConfSwitch,tclNumber,tclVarRef " NAMESPACE " commands associated with namespace syn keyword tcltkNamespaceSwitch contained children code current delete eval syn keyword tcltkNamespaceSwitch contained export forget import inscope origin syn keyword tcltkNamespaceSwitch contained parent qualifiers tail which command variable syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="{\|}\|]\|\"\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkNamespaceSwitch " EXPR " commands associated with expr syn keyword tcltkMaths contained abs acos asin atan atan2 bool ceil cos cosh double entier syn keyword tcltkMaths contained exp floor fmod hypot int isqrt log log10 max min pow rand syn keyword tcltkMaths contained round sin sinh sqrt srand tan tanh wide syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkMaths,tclNumber,tclVarRef,tclString,tcltlWidgetSwitch,tcltkCommand,tcltkPackConf " format syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkMaths,tclNumber,tclVarRef,tclString,tcltlWidgetSwitch,tcltkCommand,tcltkPackConf " PACK " commands associated with pack syn keyword tcltkPackSwitch contained forget info propagate slaves syn keyword tcltkPackConfSwitch contained after anchor before expand fill in ipadx ipady padx pady side syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkPackSwitch,tcltkPackConf,tcltkPackConfSwitch,tclNumber,tclVarRef,tclString,tcltkCommand keepend " STRING " commands associated with string syn keyword tcltkStringSwitch contained compare first index last length match range tolower toupper trim trimleft trimright wordstart wordend syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkStringSwitch,tclNumber,tclVarRef,tclString,tcltkCommand " ARRAY " commands associated with array syn keyword tcltkArraySwitch contained anymore donesearch exists get names nextelement size startsearch set " match from command name to ] or EOL syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkArraySwitch,tclNumber,tclVarRef,tclString,tcltkCommand " LSORT " switches for lsort syn keyword tcltkLsortSwitch contained ascii dictionary integer real command increasing decreasing index " match from command name to ] or EOL syn region tcltkCommand matchgroup=tcltkCommandColor start="\" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkLsortSwitch,tclNumber,tclVarRef,tclString,tcltkCommand syn keyword tclTodo contained TODO " Sequences which are backslash-escaped: http://www.tcl.tk/man/tcl8.5/TclCmd/Tcl.htm#M16 " Octal, hexadecimal, unicode codepoints, and the classics. " Tcl takes as many valid characters in a row as it can, so \xAZ in a string is newline followed by 'Z'. syn match tclSpecial contained '\\\([0-7]\{1,3}\|x\x\{1,2}\|u\x\{1,4}\|[abfnrtv]\)' syn match tclSpecial contained '\\[\[\]\{\}\"\$]' " Command appearing inside another command or inside a string. syn region tclEmbeddedStatement start='\[' end='\]' contained contains=tclCommand,tclNumber,tclLineContinue,tclString,tclVarRef,tclEmbeddedStatement " A string needs the skip argument as it may legitimately contain \". " Match at start of line syn region tclString start=+^"+ end=+"+ contains=@tclSpecialC skip=+\\\\\|\\"+ "Match all other legal strings. syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=@tclSpecialC,@tclVarRefC,tclEmbeddedStatement skip=+\\\\\|\\"+ " Line continuation is backslash immediately followed by newline. syn match tclLineContinue '\\$' if exists('g:tcl_warn_continuation') syn match tclNotLineContinue '\\\s\+$' endif "integer number, or floating point number without a dot and with "f". syn case ignore syn match tclNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" "floating point number, with dot, optional exponent syn match tclNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, starting with a dot, optional exponent syn match tclNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match tclNumber "\<\d\+e[-+]\=\d\+[fl]\=\>" "hex number syn match tclNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" "syn match tclIdentifier "\<[a-z_][a-z0-9_]*\>" syn case match syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo "syn match tclComment /^\s*\#.*$/ "syn match tclComment /;\s*\#.*$/hs=s+1 "syn sync ccomment tclComment " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link tcltkSwitch Special hi def link tclExpand Special hi def link tclLabel Label hi def link tclConditional Conditional hi def link tclRepeat Repeat hi def link tclNumber Number hi def link tclError Error hi def link tclCommand Statement hi def link tclProcCommand Type hi def link tclString String hi def link tclComment Comment hi def link tclSpecial Special hi def link tclTodo Todo " Below here are the commands and their options. hi def link tcltkCommandColor Statement hi def link tcltkWidgetColor Structure hi def link tclLineContinue WarningMsg if exists('g:tcl_warn_continuation') hi def link tclNotLineContinue ErrorMsg endif hi def link tcltkStringSwitch Special hi def link tcltkArraySwitch Special hi def link tcltkLsortSwitch Special hi def link tcltkPackSwitch Special hi def link tcltkPackConfSwitch Special hi def link tcltkMaths Special hi def link tcltkNamespaceSwitch Special hi def link tcltkWidgetSwitch Special hi def link tcltkPackConfColor Identifier hi def link tclVarRef Identifier let b:current_syntax = "tcl" " vim: ts=8 noet nolist neovim-0.2.2/runtime/syntax/tcsh.vim000066400000000000000000000317251320401574200175050ustar00rootroot00000000000000" tcsh.vim: Vim syntax file for tcsh scripts " Maintainer: Gautam Iyer " Modified: Thu 17 Dec 2009 06:05:07 PM EST " " Description: We break up each statement into a "command" and an "end" part. " All groups are either a "command" or part of the "end" of a statement (ie " everything after the "command"). This is because blindly highlighting tcsh " statements as keywords caused way too many false positives. Eg: " " set history=200 " " causes history to come up as a keyword, which we want to avoid. " Quit when a syntax file was already loaded if exists('b:current_syntax') finish endif let s:oldcpo = &cpo set cpo&vim " Line continuation is used setlocal iskeyword+=- syn case match " ----- Clusters ----- syn cluster tcshModifiers contains=tcshModifier,tcshModifierError syn cluster tcshQuoteList contains=tcshDQuote,tcshSQuote,tcshBQuote syn cluster tcshStatementEnds contains=@tcshQuoteList,tcshComment,@tcshVarList,tcshRedir,tcshMeta,tcshHereDoc,tcshSpecial,tcshArguement syn cluster tcshStatements contains=tcshBuiltin,tcshCommands,tcshIf,tcshWhile syn cluster tcshVarList contains=tcshUsrVar,tcshArgv,tcshSubst syn cluster tcshConditions contains=tcshCmdSubst,tcshParenExpr,tcshOperator,tcshNumber,@tcshVarList " ----- Errors ----- " Define first, so can be easily overridden. syn match tcshError contained '\v\S.+' " ----- Statements ----- " Tcsh commands: Any filename / modifiable variable (must be first!) syn match tcshCommands '\v[a-zA-Z0-9\\./_$:-]+' contains=tcshSpecial,tcshUsrVar,tcshArgv,tcshVarError nextgroup=tcshStatementEnd " Builtin commands except those treated specially. Currently (un)set(env), " (un)alias, if, while, else, bindkey syn keyword tcshBuiltin nextgroup=tcshStatementEnd alloc bg break breaksw builtins bye case cd chdir complete continue default dirs echo echotc end endif endsw eval exec exit fg filetest foreach getspath getxvers glob goto hashstat history hup inlib jobs kill limit log login logout ls ls-F migrate newgrp nice nohup notify onintr popd printenv pushd rehash repeat rootnode sched setpath setspath settc setty setxvers shift source stop suspend switch telltc time umask uncomplete unhash universe unlimit ver wait warp watchlog where which " StatementEnd is anything after a built-in / command till the lexical end of a " statement (;, |, ||, |&, && or end of line) syn region tcshStatementEnd transparent contained matchgroup=tcshBuiltin start='' end='\v\\@|$' contains=@tcshConditions,tcshSpecial,@tcshStatementEnds syn region tcshIfEnd contained matchgroup=tcshBuiltin contains=@tcshConditions,tcshSpecial start='(' end='\v\)%(\s+then>)?' skipwhite nextgroup=@tcshStatementEnds syn region tcshIfEnd contained matchgroup=tcshBuiltin contains=tcshCommands,tcshSpecial start='\v\{\s+' end='\v\s+\}%(\s+then>)?' skipwhite nextgroup=@tcshStatementEnds keepend " else statements syn keyword tcshBuiltin nextgroup=tcshIf skipwhite else " while statements (contains expressions / operators) syn keyword tcshBuiltin nextgroup=@tcshConditions,tcshSpecial skipwhite while " Conditions (for if and while) syn region tcshParenExpr contained contains=@tcshConditions,tcshSpecial matchgroup=tcshBuiltin start='(' end=')' syn region tcshCmdSubst contained contains=tcshCommands matchgroup=tcshBuiltin start='\v\{\s+' end='\v\s+\}' keepend " Bindkey. Internal editor functions syn keyword tcshBindkeyFuncs contained backward-char backward-delete-char \ backward-delete-word backward-kill-line backward-word \ beginning-of-line capitalize-word change-case \ change-till-end-of-line clear-screen complete-word \ complete-word-fwd complete-word-back complete-word-raw \ copy-prev-word copy-region-as-kill dabbrev-expand delete-char \ delete-char-or-eof delete-char-or-list \ delete-char-or-list-or-eof delete-word digit digit-argument \ down-history downcase-word end-of-file end-of-line \ exchange-point-and-mark expand-glob expand-history expand-line \ expand-variables forward-char forward-word \ gosmacs-transpose-chars history-search-backward \ history-search-forward insert-last-word i-search-fwd \ i-search-back keyboard-quit kill-line kill-region \ kill-whole-line list-choices list-choices-raw list-glob \ list-or-eof load-average magic-space newline normalize-path \ normalize-command overwrite-mode prefix-meta quoted-insert \ redisplay run-fg-editor run-help self-insert-command \ sequence-lead-in set-mark-command spell-word spell-line \ stuff-char toggle-literal-history transpose-chars \ transpose-gosling tty-dsusp tty-flush-output tty-sigintr \ tty-sigquit tty-sigtsusp tty-start-output tty-stop-output \ undefined-key universal-argument up-history upcase-word \ vi-beginning-of-next-word vi-add vi-add-at-eol vi-chg-case \ vi-chg-meta vi-chg-to-eol vi-cmd-mode vi-cmd-mode-complete \ vi-delprev vi-delmeta vi-endword vi-eword vi-char-back \ vi-char-fwd vi-charto-back vi-charto-fwd vi-insert \ vi-insert-at-bol vi-repeat-char-fwd vi-repeat-char-back \ vi-repeat-search-fwd vi-repeat-search-back vi-replace-char \ vi-replace-mode vi-search-back vi-search-fwd vi-substitute-char \ vi-substitute-line vi-word-back vi-word-fwd vi-undo vi-zero \ which-command yank yank-pop e_copy_to_clipboard \ e_paste_from_clipboard e_dosify_next e_dosify_prev e_page_up \ e_page_down syn keyword tcshBuiltin nextgroup=tcshBindkeyEnd bindkey syn region tcshBindkeyEnd contained transparent matchgroup=tcshBuiltin start='' skip='\\$' end='$' contains=@tcshQuoteList,tcshComment,@tcshVarList,tcshMeta,tcshSpecial,tcshArguement,tcshBindkeyFuncs " Expressions start with @. syn match tcshExprStart '\v\@\s+' nextgroup=tcshExprVar syn match tcshExprVar contained '\v\h\w*%(\[\d+\])?' contains=tcshShellVar,tcshEnvVar nextgroup=tcshExprOp syn match tcshExprOp contained '++\|--' syn match tcshExprOp contained '\v\s*\=' nextgroup=tcshExprEnd syn match tcshExprEnd contained '\v.*$'hs=e+1 contains=@tcshConditions syn match tcshExprEnd contained '\v.{-};'hs=e contains=@tcshConditions " ----- Comments: ----- syn match tcshComment '#\s.*' contains=tcshTodo,tcshCommentTi,@Spell syn match tcshComment '\v#($|\S.*)' contains=tcshTodo,tcshCommentTi syn match tcshSharpBang '^#! .*$' syn match tcshCommentTi contained '\v#\s*\u\w*(\s+\u\w*)*:'hs=s+1 contains=tcshTodo syn match tcshTodo contained '\v\c' " ----- Strings ----- " Tcsh does not allow \" in strings unless the "backslash_quote" shell " variable is set. Set the vim variable "tcsh_backslash_quote" to 0 if you " want VIM to assume that no backslash quote constructs exist. " Backquotes are treated as commands, and are not contained in anything if(exists('tcsh_backslash_quote') && tcsh_backslash_quote == 0) syn region tcshSQuote keepend contained start="\v\\@, >>, >>&, >>!, >>&!] syn match tcshRedir contained '\v\<|\>\>?\&?!?' " Meta-chars syn match tcshMeta contained '\v[]{}*?[]' " Here documents (<<) syn region tcshHereDoc contained matchgroup=tcshShellVar start='\v\<\<\s*\z(\h\w*)' end='^\z1$' contains=@tcshVarList,tcshSpecial syn region tcshHereDoc contained matchgroup=tcshShellVar start="\v\<\<\s*'\z(\h\w*)'" start='\v\<\<\s*"\z(\h\w*)"$' start='\v\<\<\s*\\\z(\h\w*)$' end='^\z1$' " Operators syn match tcshOperator contained '&&\|!\~\|!=\|<<\|<=\|==\|=\~\|>=\|>>\|\*\|\^\|\~\|||\|!\|%\|&\|+\|-\|/\|<\|>\||' "syn match tcshOperator contained '[(){}]' " Numbers syn match tcshNumber contained '\v<-?\d+>' " Arguments syn match tcshArguement contained '\v\s@<=-(\w|-)*' " Special characters. \xxx, or backslashed characters. "syn match tcshSpecial contained '\v\\@" syn match ttlNumber "\%(\<\d\+\|\$\x\+\)\>" syn match ttlString "'[^']*'" contains=@Spell syn match ttlString '"[^"]*"' contains=@Spell syn cluster ttlConstant contains=ttlCharacter,ttlNumber,ttlString syn match ttlLabel ":\s*\w\{1,32}\>" syn keyword ttlOperator and or xor not syn match ttlVar "\" syn match ttlVar "\" syn keyword ttlVar inputstr matchstr paramcnt params result timeout mtimeout syn match ttlLine nextgroup=ttlStatement "^" syn match ttlStatement contained "\s*" \ nextgroup=ttlIf,ttlElseIf,ttlConditional,ttlRepeat, \ ttlFirstComment,ttlComment,ttlLabel,@ttlCommand syn cluster ttlCommand contains=ttlControlCommand,ttlCommunicationCommand, \ ttlStringCommand,ttlFileCommand,ttlPasswordCommand, \ ttlMiscCommand syn keyword ttlIf contained nextgroup=ttlIfExpression if syn keyword ttlElseIf contained nextgroup=ttlElseIfExpression elseif syn match ttlIfExpression contained "\s.*" \ contains=@ttlConstant,ttlVar,ttlOperator,ttlComment,ttlThen, \ @ttlCommand syn match ttlElseIfExpression contained "\s.*" \ contains=@ttlConstant,ttlVar,ttlOperator,ttlComment,ttlThen syn keyword ttlThen contained then syn keyword ttlConditional contained else endif syn keyword ttlRepeat contained for next until enduntil while endwhile syn match ttlRepeat contained \ "\<\%(do\|loop\)\%(\s\+\%(while\|until\)\)\?\>" syn keyword ttlControlCommand contained \ break call continue end execcmnd exit goto include \ mpause pause return syn keyword ttlCommunicationCommand contained \ bplusrecv bplussend callmenu changedir clearscreen \ closett connect cygconnect disconnect dispstr \ enablekeyb flushrecv gethostname getmodemstatus \ gettitle kmtfinish kmtget kmtrecv kmtsend loadkeymap \ logautoclosemode logclose loginfo logopen logpause \ logrotate logstart logwrite quickvanrecv \ quickvansend recvln restoresetup scprecv scpsend \ send sendbreak sendbroadcast sendfile sendkcode \ sendln sendlnbroadcast sendmulticast setbaud \ setdebug setdtr setecho setmulticastname setrts \ setsync settitle showtt testlink unlink wait \ wait4all waitevent waitln waitn waitrecv waitregex \ xmodemrecv xmodemsend ymodemrecv ymodemsend \ zmodemrecv zmodemsend syn keyword ttlStringCommand contained \ code2str expandenv int2str regexoption sprintf \ sprintf2 str2code str2int strcompare strconcat \ strcopy strinsert strjoin strlen strmatch strremove \ strreplace strscan strspecial strsplit strtrim \ tolower toupper syn keyword ttlFileCommand contained \ basename dirname fileclose fileconcat filecopy \ filecreate filedelete filelock filemarkptr fileopen \ filereadln fileread filerename filesearch fileseek \ fileseekback filestat filestrseek filestrseek2 \ filetruncate fileunlock filewrite filewriteln \ findfirst findnext findclose foldercreate \ folderdelete foldersearch getdir getfileattr makepath \ setdir setfileattr syn keyword ttlPasswordCommand contained \ delpassword getpassword ispassword passwordbox \ setpassword syn keyword ttlMiscCommand contained \ beep bringupbox checksum8 checksum8file checksum16 \ checksum16file checksum32 checksum32file closesbox \ clipb2var crc16 crc16file crc32 crc32file exec \ dirnamebox filenamebox getdate getenv getipv4addr \ getipv6addr getspecialfolder gettime getttdir getver \ ifdefined inputbox intdim listbox messagebox random \ rotateleft rotateright setdate setdlgpos setenv \ setexitcode settime show statusbox strdim uptime \ var2clipb yesnobox hi def link ttlCharacter Character hi def link ttlNumber Number hi def link ttlComment Comment hi def link ttlFirstComment Comment hi def link ttlString String hi def link ttlLabel Label hi def link ttlIf Conditional hi def link ttlElseIf Conditional hi def link ttlThen Conditional hi def link ttlConditional Conditional hi def link ttlRepeat Repeat hi def link ttlControlCommand Keyword hi def link ttlVar Identifier hi def link ttlOperator Operator hi def link ttlCommunicationCommand Keyword hi def link ttlStringCommand Keyword hi def link ttlFileCommand Keyword hi def link ttlPasswordCommand Keyword hi def link ttlMiscCommand Keyword let b:current_syntax = "teraterm" let &cpo = s:save_cpo unlet s:save_cpo " vim: ts=8 sw=2 sts=2 neovim-0.2.2/runtime/syntax/terminfo.vim000066400000000000000000000113031320401574200203550ustar00rootroot00000000000000" Vim syntax file " Language: terminfo(5) definition " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match terminfoKeywords '[,=#|]' syn keyword terminfoTodo contained TODO FIXME XXX NOTE syn region terminfoComment display oneline start='^#' end='$' \ contains=terminfoTodo,@Spell syn match terminfoNumbers '\<[0-9]\+\>' syn match terminfoSpecialChar '\\\(\o\{3}\|[Eenlrtbfs^\,:0]\)' syn match terminfoSpecialChar '\^\a' syn match terminfoDelay '$<[0-9]\+>' syn keyword terminfoBooleans bw am bce ccc xhp xhpa cpix crxw xt xenl eo gn \ hc chts km daisy hs hls in lpix da db mir \ msgr nxon xsb npc ndscr nrrmc os mc5i xcpa \ sam eslok hz ul xon syn keyword terminfoNumerics cols it lh lw lines lm xmc ma colors pairs wnum \ ncv nlab pb vt wsl bitwin bitype bufsz btns \ spinh spinv maddr mjump mcs npins orc orhi \ orl orvi cps widcs syn keyword terminfoStrings acsc cbt bel cr cpi lpi chr cvr csr rmp tbc mgc \ clear el1 el ed hpa cmdch cwin cup cud1 home \ civis cub1 mrcup cnorm cuf1 ll cuu1 cvvis \ defc dch1 dl1 dial dsl dclk hd enacs smacs \ smam blink bold smcup smdc dim swidm sdrfq \ smir sitm slm smicm snlq snrmq prot rev \ invis sshm smso ssubm ssupm smul sum smxon \ ech rmacs rmam sgr0 rmcup rmdc rwidm rmir \ ritm rlm rmicm rshm rmso rsubm rsupm rmul \ rum rmxon pause hook flash ff fsl wingo hup \ is1 is2 is3 if iprog initc initp ich1 il1 ip \ ka1 ka3 kb2 kbs kbeg kcbt kc1 kc3 kcan ktbc \ kclr kclo kcmd kcpy kcrt kctab kdch1 kdl1 \ kcud1 krmir kend kent kel ked kext kfnd khlp \ khome kich1 kil1 kcub1 kll kmrk kmsg kmov \ knxt knp kopn kopt kpp kprv kprt krdo kref \ krfr krpl krst kres kcuf1 ksav kBEG kCAN \ kCMD kCPY kCRT kDC kDL kslt kEND kEOL kEXT \ kind kFND kHLP kHOM kIC kLFT kMSG kMOV kNXT \ kOPT kPRV kPRT kri kRDO kRPL kRIT kRES kSAV \ kSPD khts kUND kspd kund kcuu1 rmkx smkx \ lf0 lf1 lf10 lf2 lf3 lf4 lf5 lf6 lf7 lf8 lf9 \ fln rmln smln rmm smm mhpa mcud1 mcub1 mcuf1 \ mvpa mcuu1 nel porder oc op pad dch dl cud \ mcud ich indn il cub mcub cuf mcuf rin cuu \ mccu pfkey pfloc pfx pln mc0 mc5p mc4 mc5 \ pulse qdial rmclk rep rfi rs1 rs2 rs3 rf rc \ vpa sc ind ri scs sgr setbsmgb smgbp sclk \ scp setb setf smgl smglp smgr smgrp hts smgt \ smgtp wind sbim scsd rbim rcsd subcs supcs \ ht docr tsl tone uc hu u0 u1 u2 u3 u4 u5 u6 \ u7 u8 u9 wait xoffc xonc zerom scesa bicr \ binel birep csnm csin colornm defbi devt \ dispc endbi smpch smsc rmpch rmsc getm kmous \ minfo pctrm pfxl reqmp scesc s0ds s1ds s2ds \ s3ds setab setaf setcolor smglr slines smgtb \ ehhlm elhlm erhlm ethlm evhlm sgr1 slengthsL syn match terminfoStrings display '\' syn match terminfoParameters '%[%dcspl+*/mAO&|^=<>!~i?te;-]' syn match terminfoParameters "%\('[A-Z]'\|{[0-9]\{1,2}}\|p[1-9]\|P[a-z]\|g[A-Z]\)" hi def link terminfoComment Comment hi def link terminfoTodo Todo hi def link terminfoNumbers Number hi def link terminfoSpecialChar SpecialChar hi def link terminfoDelay Special hi def link terminfoBooleans Type hi def link terminfoNumerics Type hi def link terminfoStrings Type hi def link terminfoParameters Keyword hi def link terminfoKeywords Keyword let b:current_syntax = "terminfo" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/tex.vim000066400000000000000000001760231320401574200173450ustar00rootroot00000000000000" Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell " Last Change: Oct 12, 2017 " Version: 105 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 " " 1. If you have a \begin{verbatim} that appears to overrun its boundaries, " use %stopzone. " " 2. Run-on equations ($..$ and $$..$$, particularly) can also be stopped " by suitable use of %stopzone. " " 3. If you have a slow computer, you may wish to modify " " syn sync maxlines=200 " syn sync minlines=50 " " to values that are more to your liking. " " 4. There is no match-syncing for $...$ and $$...$$; hence large " equation blocks constructed that way may exhibit syncing problems. " (there's no difference between begin/end patterns) " " 5. If you have the variable "g:tex_no_error" defined then none of the " lexical error-checking will be done. " " ie. let g:tex_no_error=1 " " 6. Please see :help latex-syntax for information on " syntax folding :help tex-folding " spell checking :help tex-nospell " commands and mathzones :help tex-runon " new command highlighting :help tex-morecommands " error highlighting :help tex-error " new math groups :help tex-math " new styles :help tex-style " using conceal mode :help tex-conceal " Version Clears: {{{1 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:keepcpo= &cpo set cpo&vim scriptencoding utf-8 " by default, enable all region-based highlighting let s:tex_fast= "bcmMprsSvV" if exists("g:tex_fast") if type(g:tex_fast) != 1 " g:tex_fast exists and is not a string, so " turn off all optional region-based highighting let s:tex_fast= "" else let s:tex_fast= g:tex_fast endif endif " let user determine which classes of concealment will be supported " a=accents/ligatures d=delimiters m=math symbols g=Greek s=superscripts/subscripts if !exists("g:tex_conceal") let s:tex_conceal= 'abdmgsS' else let s:tex_conceal= g:tex_conceal endif if !exists("g:tex_superscripts") let s:tex_superscripts= '[0-9a-zA-W.,:;+-<>/()=]' else let s:tex_superscripts= g:tex_superscripts endif if !exists("g:tex_subscripts") let s:tex_subscripts= '[0-9aehijklmnoprstuvx,+-/().]' else let s:tex_subscripts= g:tex_subscripts endif " Determine whether or not to use "*.sty" mode {{{1 " The user may override the normal determination by setting " g:tex_stylish to 1 (for "*.sty" mode) " or to 0 else (normal "*.tex" mode) " or on a buffer-by-buffer basis with b:tex_stylish let s:extfname=expand("%:e") if exists("g:tex_stylish") let b:tex_stylish= g:tex_stylish elseif !exists("b:tex_stylish") if s:extfname == "sty" || s:extfname == "cls" || s:extfname == "clo" || s:extfname == "dtx" || s:extfname == "ltx" let b:tex_stylish= 1 else let b:tex_stylish= 0 endif endif " handle folding {{{1 if !exists("g:tex_fold_enabled") let s:tex_fold_enabled= 0 elseif g:tex_fold_enabled && !has("folding") let s:tex_fold_enabled= 0 echomsg "Ignoring g:tex_fold_enabled=".g:tex_fold_enabled."; need to re-compile vim for +fold support" else let s:tex_fold_enabled= 1 endif if s:tex_fold_enabled && &fdm == "manual" setl fdm=syntax endif if s:tex_fold_enabled && has("folding") com! -nargs=* TexFold fold else com! -nargs=* TexFold endif " (La)TeX keywords: uses the characters 0-9,a-z,A-Z,192-255 only... {{{1 " but _ is the only one that causes problems. " One may override this iskeyword setting by providing " g:tex_isk if exists("g:tex_isk") if b:tex_stylish && g:tex_isk !~ '@' let b:tex_isk= '@,'.g:tex_isk else let b:tex_isk= g:tex_isk endif elseif b:tex_stylish let b:tex_isk="@,48-57,a-z,A-Z,192-255" else let b:tex_isk="48-57,a-z,A-Z,192-255" endif if v:version > 704 || (v:version == 704 && has("patch-7.4.1142")) exe "syn iskeyword ".b:tex_isk else exe "setl isk=".b:tex_isk endif if exists("g:tex_no_error") && g:tex_no_error let s:tex_no_error= 1 else let s:tex_no_error= 0 endif if exists("g:tex_comment_nospell") && g:tex_comment_nospell let s:tex_comment_nospell= 1 else let s:tex_comment_nospell= 0 endif if exists("g:tex_nospell") && g:tex_nospell let s:tex_nospell = 1 else let s:tex_nospell = 0 endif " Clusters: {{{1 " -------- syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,@texMathZones if !s:tex_no_error syn cluster texCmdGroup add=texMathError endif syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement syn cluster texFoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texItalStyle,texNoSpell syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texBoldItalStyle,texNoSpell syn cluster texItalGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texItalStyle,texItalBoldStyle,texNoSpell if !s:tex_nospell syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher else syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher endif syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter if !exists("g:tex_no_math") syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ syn cluster texMatchGroup add=@texMathZones syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2 syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texMathSymbol,texMathText,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle if !s:tex_no_error syn cluster texMathMatchGroup add=texMathError syn cluster texMathZoneGroup add=texMathError endif syn cluster texMathZoneGroup add=@NoSpell " following used in the \part \chapter \section \subsection \subsubsection " \paragraph \subparagraph \author \title highlighting syn cluster texDocGroup contains=texPartZone,@texPartGroup syn cluster texPartGroup contains=texChapterZone,texSectionZone,texParaZone syn cluster texChapterGroup contains=texSectionZone,texParaZone syn cluster texSectionGroup contains=texSubSectionZone,texParaZone syn cluster texSubSectionGroup contains=texSubSubSectionZone,texParaZone syn cluster texSubSubSectionGroup contains=texParaZone syn cluster texParaGroup contains=texSubParaZone if has("conceal") && &enc == 'utf-8' syn cluster texMathZoneGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol syn cluster texMathMatchGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol endif endif " Try to flag {} and () mismatches: {{{1 if s:tex_fast =~# 'm' if !s:tex_no_error syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell else syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup endif if !s:tex_nospell syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell else syn region texParen start="(" end=")" transparent contains=@texMatchGroup endif endif if !s:tex_no_error syn match texError "[}\])]" endif if s:tex_fast =~# 'M' if !exists("g:tex_no_math") if !s:tex_no_error syn match texMathError "}" contained endif syn region texMathMatcher matchgroup=Delimiter start="{" skip="\%(\\\\\)*\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup endif endif " TeX/LaTeX keywords: {{{1 " Instead of trying to be All Knowing, I just match \..alphameric.. " Note that *.tex files may not have "@" in their \commands if exists("g:tex_tex") || b:tex_stylish syn match texStatement "\\[a-zA-Z@]\+" else syn match texStatement "\\\a\+" if !s:tex_no_error syn match texError "\\\a*@[a-zA-Z@]*" endif endif " TeX/LaTeX delimiters: {{{1 syn match texDelimiter "&" syn match texDelimiter "\\\\" " Tex/Latex Options: {{{1 syn match texOption "[^\\]\zs#\d\+\|^#\d\+" " texAccent (tnx to Karim Belabas) avoids annoying highlighting for accents: {{{1 if b:tex_stylish syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1 syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1 else syn match texAccent "\\[bcdvuH]\A"me=e-1 syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)\A"me=e-1 endif syn match texAccent "\\[bcdvuH]$" syn match texAccent +\\[=^.\~"`']+ syn match texAccent +\\['=t'.c^ud"vb~Hr]{\a}+ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$" " \begin{}/\end{} section markers: {{{1 syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName if s:tex_fast =~# 'm' syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@texMathZones,@NoSpell endif " \documentclass, \documentstyle, \usepackage: {{{1 syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texBeginEndName,texDocTypeArgs if s:tex_fast =~# 'm' syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texBeginEndName contains=texComment,@NoSpell endif " Preamble syntax-based folding support: {{{1 if s:tex_fold_enabled && has("folding") syn region texPreamble transparent fold start='\zs\\documentclass\>' end='\ze\\begin{document}' contains=texStyle,@texPreambleMatchGroup endif " TeX input: {{{1 syn match texInput "\\input\s\+[a-zA-Z/.0-9_^]\+"hs=s+7 contains=texStatement syn match texInputFile "\\include\(graphics\|list\)\=\(\[.\{-}\]\)\=\s*{.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt syn match texInputFile "\\\(epsfig\|input\|usepackage\)\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt syn match texInputCurlies "[{}]" contained if s:tex_fast =~# 'm' syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained contains=texComment endif " Type Styles (LaTeX 2.09): {{{1 syn match texTypeStyle "\\rm\>" syn match texTypeStyle "\\em\>" syn match texTypeStyle "\\bf\>" syn match texTypeStyle "\\it\>" syn match texTypeStyle "\\sl\>" syn match texTypeStyle "\\sf\>" syn match texTypeStyle "\\sc\>" syn match texTypeStyle "\\tt\>" " Type Styles: attributes, commands, families, etc (LaTeX2E): {{{1 if s:tex_conceal !~# 'b' syn match texTypeStyle "\\textbf\>" syn match texTypeStyle "\\textit\>" endif syn match texTypeStyle "\\textmd\>" syn match texTypeStyle "\\textrm\>" syn match texTypeStyle "\\textsc\>" syn match texTypeStyle "\\textsf\>" syn match texTypeStyle "\\textsl\>" syn match texTypeStyle "\\texttt\>" syn match texTypeStyle "\\textup\>" syn match texTypeStyle "\\emph\>" syn match texTypeStyle "\\mathbb\>" syn match texTypeStyle "\\mathbf\>" syn match texTypeStyle "\\mathcal\>" syn match texTypeStyle "\\mathfrak\>" syn match texTypeStyle "\\mathit\>" syn match texTypeStyle "\\mathnormal\>" syn match texTypeStyle "\\mathrm\>" syn match texTypeStyle "\\mathsf\>" syn match texTypeStyle "\\mathtt\>" syn match texTypeStyle "\\rmfamily\>" syn match texTypeStyle "\\sffamily\>" syn match texTypeStyle "\\ttfamily\>" syn match texTypeStyle "\\itshape\>" syn match texTypeStyle "\\scshape\>" syn match texTypeStyle "\\slshape\>" syn match texTypeStyle "\\upshape\>" syn match texTypeStyle "\\bfseries\>" syn match texTypeStyle "\\mdseries\>" " Some type sizes: {{{1 syn match texTypeSize "\\tiny\>" syn match texTypeSize "\\scriptsize\>" syn match texTypeSize "\\footnotesize\>" syn match texTypeSize "\\small\>" syn match texTypeSize "\\normalsize\>" syn match texTypeSize "\\large\>" syn match texTypeSize "\\Large\>" syn match texTypeSize "\\LARGE\>" syn match texTypeSize "\\huge\>" syn match texTypeSize "\\Huge\>" " Spacecodes (TeX'isms): {{{1 " \mathcode`\^^@="2201 \delcode`\(="028300 \sfcode`\)=0 \uccode`X=`X \lccode`x=`x syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=texSpaceCodeChar syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained " Sections, subsections, etc: {{{1 if s:tex_fast =~# 'p' if !s:tex_nospell TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell TexFold syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell TexFold syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell TexFold syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell TexFold syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell TexFold syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell TexFold syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell TexFold syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell TexFold syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell else TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup TexFold syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup TexFold syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup TexFold syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup TexFold syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup TexFold syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup TexFold syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup TexFold syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup TexFold syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup endif endif " particular support for bold and italic {{{1 if s:tex_fast =~# 'b' if s:tex_conceal =~# 'b' if !exists("g:tex_nospell") || !g:tex_nospell syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell else syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup endif endif endif " Bad Math (mismatched): {{{1 if !exists("g:tex_no_math") && !s:tex_no_error syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}" syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}" syn match texBadMath "\\[\])]" endif " Math Zones: {{{1 if !exists("g:tex_no_math") " TexNewMathZone: function creates a mathzone with the given suffix and mathzone name. {{{2 " Starred forms are created if starform is true. Starred " forms have syntax group and synchronization groups with a " "S" appended. Handles: cluster, syntax, sync, and highlighting. fun! TexNewMathZone(sfx,mathzone,starform) let grpname = "texMathZone".a:sfx let syncname = "texSyncMathZone".a:sfx if s:tex_fold_enabled let foldcmd= " fold" else let foldcmd= "" endif exe "syn cluster texMathZones add=".grpname if s:tex_fast =~# 'M' exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' endif exe 'hi def link '.grpname.' texMath' if a:starform let grpname = "texMathZone".a:sfx.'S' let syncname = "texSyncMathZone".a:sfx.'S' exe "syn cluster texMathZones add=".grpname if s:tex_fast =~# 'M' exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' endif exe 'hi def link '.grpname.' texMath' endif endfun " Standard Math Zones: {{{2 call TexNewMathZone("A","align",1) call TexNewMathZone("B","alignat",1) call TexNewMathZone("C","displaymath",1) call TexNewMathZone("D","eqnarray",1) call TexNewMathZone("E","equation",1) call TexNewMathZone("F","flalign",1) call TexNewMathZone("G","gather",1) call TexNewMathZone("H","math",1) call TexNewMathZone("I","multline",1) call TexNewMathZone("J","xalignat",1) call TexNewMathZone("K","xxalignat",0) " Inline Math Zones: {{{2 if s:tex_fast =~# 'M' if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'd' syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend concealends contains=@texMathZoneGroup else syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\%(\\\\\)*\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup endif syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup endif syn match texMathOper "[_^=]" contained " Text Inside Math Zones: {{{2 if s:tex_fast =~# 'M' if !exists("g:tex_nospell") || !g:tex_nospell syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell else syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup endif endif " \left..something.. and \right..something.. support: {{{2 syn match texMathDelimBad contained "\S" if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'm' syn match texMathDelim contained "\\left\[" syn match texMathDelim contained "\\left\\{" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={ syn match texMathDelim contained "\\right\\}" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=} let s:texMathDelimList=[ \ ['<' , '<'] , \ ['>' , '>'] , \ ['(' , '('] , \ [')' , ')'] , \ ['\[' , '['] , \ [']' , ']'] , \ ['\\{' , '{'] , \ ['\\}' , '}'] , \ ['|' , '|'] , \ ['\\|' , '‖'] , \ ['\\backslash' , '\'] , \ ['\\downarrow' , '↓'] , \ ['\\Downarrow' , '⇓'] , \ ['\\lbrace' , '['] , \ ['\\lceil' , '⌈'] , \ ['\\lfloor' , '⌊'] , \ ['\\lgroup' , '⌊'] , \ ['\\lmoustache' , '⎛'] , \ ['\\rbrace' , ']'] , \ ['\\rceil' , '⌉'] , \ ['\\rfloor' , '⌋'] , \ ['\\rgroup' , '⌋'] , \ ['\\rmoustache' , '⎞'] , \ ['\\uparrow' , '↑'] , \ ['\\Uparrow' , '↑'] , \ ['\\updownarrow', '↕'] , \ ['\\Updownarrow', '⇕']] if &ambw == "double" || exists("g:tex_usedblwidth") let s:texMathDelimList= s:texMathDelimList + [ \ ['\\langle' , '〈'] , \ ['\\rangle' , '〉']] else let s:texMathDelimList= s:texMathDelimList + [ \ ['\\langle' , '<'] , \ ['\\rangle' , '>']] endif syn match texMathDelim '\\[bB]igg\=[lr]' contained nextgroup=texMathDelimBad for texmath in s:texMathDelimList exe "syn match texMathDelim '\\\\[bB]igg\\=[lr]\\=".texmath[0]."' contained conceal cchar=".texmath[1] endfor else syn match texMathDelim contained "\\\(left\|right\)\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad syn match texMathDelim contained "\\[bB]igg\=[lr]\=\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad syn match texMathDelimSet2 contained "\\" nextgroup=texMathDelimKey,texMathDelimBad syn match texMathDelimSet1 contained "[<>()[\]|/.]\|\\[{}|]" syn keyword texMathDelimKey contained backslash lceil lVert rgroup uparrow syn keyword texMathDelimKey contained downarrow lfloor rangle rmoustache Uparrow syn keyword texMathDelimKey contained Downarrow lgroup rbrace rvert updownarrow syn keyword texMathDelimKey contained langle lmoustache rceil rVert Updownarrow syn keyword texMathDelimKey contained lbrace lvert rfloor endif syn match texMathDelim contained "\\\(left\|right\)arrow\>\|\<\([aA]rrow\|brace\)\=vert\>" syn match texMathDelim contained "\\lefteqn\>" endif " Special TeX characters ( \$ \& \% \# \{ \} \_ \S \P ) : {{{1 syn match texSpecialChar "\\[$&%#{}_]" if b:tex_stylish syn match texSpecialChar "\\[SP@][^a-zA-Z@]"me=e-1 else syn match texSpecialChar "\\[SP@]\A"me=e-1 endif syn match texSpecialChar "\\\\" if !exists("g:tex_no_math") syn match texOnlyMath "[_^]" endif syn match texSpecialChar "\^\^[0-9a-f]\{2}\|\^\^\S" if s:tex_conceal !~# 'S' syn match texSpecialChar '\\glq\>' contained conceal cchar=‚ syn match texSpecialChar '\\grq\>' contained conceal cchar=‘ syn match texSpecialChar '\\glqq\>' contained conceal cchar=„ syn match texSpecialChar '\\grqq\>' contained conceal cchar=“ syn match texSpecialChar '\\hyp\>' contained conceal cchar=- endif " Comments: {{{1 " Normal TeX LaTeX : %.... " Documented TeX Format: ^^A... -and- leading %s (only) if !s:tex_comment_nospell syn cluster texCommentGroup contains=texTodo,@Spell else syn cluster texCommentGroup contains=texTodo,@NoSpell endif syn case ignore syn keyword texTodo contained combak fixme todo xxx syn case match if s:extfname == "dtx" syn match texComment "\^\^A.*$" contains=@texCommentGroup syn match texComment "^%\+" contains=@texCommentGroup else if s:tex_fold_enabled " allows syntax-folding of 2 or more contiguous comment lines " single-line comments are not folded syn match texComment "%.*$" contains=@texCommentGroup if s:tex_fast =~# 'c' TexFold syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' contains=@texCommentGroup TexFold syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell endif else syn match texComment "%.*$" contains=@texCommentGroup if s:tex_fast =~# 'c' syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell endif endif endif " %begin-include ... %end-include acts like a texDocZone for \include'd files. Permits spell checking, for example, in such files. if !s:tex_nospell TexFold syn region texDocZone matchgroup=texSection start='^\s*%begin-include\>' end='^\s*%end-include\>' contains=@texFoldGroup,@texDocGroup,@Spell else TexFold syn region texDocZone matchgroup=texSection start='^\s*%begin-include\>' end='^\s*%end-include\>' contains=@texFoldGroup,@texDocGroup endif " Separate lines used for verb` and verb# so that the end conditions {{{1 " will appropriately terminate. " If g:tex_verbspell exists, then verbatim texZones will permit spellchecking there. if s:tex_fast =~# 'v' if exists("g:tex_verbspell") && g:tex_verbspell syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell " listings package: syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell if b:tex_stylish syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell else syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell endif else syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" if b:tex_stylish syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" else syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" endif endif endif " Tex Reference Zones: {{{1 if s:tex_fast =~# 'r' syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup syn region texRefZone matchgroup=texStatement start="\\label{" end="}\|%stopzone\>" contains=@texRefGroup syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite endif syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite " Handle newcommand, newenvironment : {{{1 syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl if s:tex_fast =~# 'V' syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup endif syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl if s:tex_fast =~# 'V' syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup endif " Definitions/Commands: {{{1 syn match texDefCmd "\\def\>" nextgroup=texDefName skipwhite skipnl if b:tex_stylish syn match texDefName contained "\\[a-zA-Z@]\+" nextgroup=texDefParms,texCmdBody skipwhite skipnl syn match texDefName contained "\\[^a-zA-Z@]" nextgroup=texDefParms,texCmdBody skipwhite skipnl else syn match texDefName contained "\\\a\+" nextgroup=texDefParms,texCmdBody skipwhite skipnl syn match texDefName contained "\\\A" nextgroup=texDefParms,texCmdBody skipwhite skipnl endif syn match texDefParms contained "#[^{]*" contains=texDefParm nextgroup=texCmdBody skipwhite skipnl syn match texDefParm contained "#\d\+" " TeX Lengths: {{{1 syn match texLength "\<\d\+\([.,]\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\|ex\|in\|mm\|pc\|pt\|sp\)\>" " TeX String Delimiters: {{{1 syn match texString "\(``\|''\|,,\)" " makeatletter -- makeatother sections if !s:tex_no_error if s:tex_fast =~# 'S' syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained endif syn match texStyleStatement "\\[a-zA-Z@]\+" contained if s:tex_fast =~# 'S' syn region texStyleMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained endif endif " Conceal mode support (supports set cole=2) {{{1 if has("conceal") && &enc == 'utf-8' " Math Symbols {{{2 " (many of these symbols were contributed by Björn Winckler) if s:tex_conceal =~# 'm' let s:texMathList=[ \ ['|' , '‖'], \ ['aleph' , 'ℵ'], \ ['amalg' , '∐'], \ ['angle' , '∠'], \ ['approx' , '≈'], \ ['ast' , '∗'], \ ['asymp' , '≍'], \ ['backepsilon' , '∍'], \ ['backsimeq' , '≃'], \ ['backslash' , '∖'], \ ['barwedge' , '⊼'], \ ['because' , '∵'], \ ['beth' , 'ܒ'], \ ['between' , '≬'], \ ['bigcap' , '∩'], \ ['bigcirc' , '○'], \ ['bigcup' , '∪'], \ ['bigodot' , '⊙'], \ ['bigoplus' , '⊕'], \ ['bigotimes' , '⊗'], \ ['bigsqcup' , '⊔'], \ ['bigtriangledown', '∇'], \ ['bigtriangleup' , '∆'], \ ['bigvee' , '⋁'], \ ['bigwedge' , '⋀'], \ ['blacksquare' , '∎'], \ ['bot' , '⊥'], \ ['bowtie' , '⋈'], \ ['boxdot' , '⊡'], \ ['boxminus' , '⊟'], \ ['boxplus' , '⊞'], \ ['boxtimes' , '⊠'], \ ['Box' , '☐'], \ ['bullet' , '•'], \ ['bumpeq' , '≏'], \ ['Bumpeq' , '≎'], \ ['cap' , '∩'], \ ['Cap' , '⋒'], \ ['cdot' , '·'], \ ['cdots' , '⋯'], \ ['circ' , '∘'], \ ['circeq' , '≗'], \ ['circlearrowleft', '↺'], \ ['circlearrowright', '↻'], \ ['circledast' , '⊛'], \ ['circledcirc' , '⊚'], \ ['clubsuit' , '♣'], \ ['complement' , '∁'], \ ['cong' , '≅'], \ ['coprod' , '∐'], \ ['copyright' , '©'], \ ['cup' , '∪'], \ ['Cup' , '⋓'], \ ['curlyeqprec' , '⋞'], \ ['curlyeqsucc' , '⋟'], \ ['curlyvee' , '⋎'], \ ['curlywedge' , '⋏'], \ ['dagger' , '†'], \ ['dashv' , '⊣'], \ ['ddagger' , '‡'], \ ['ddots' , '⋱'], \ ['diamond' , '⋄'], \ ['diamondsuit' , '♢'], \ ['div' , '÷'], \ ['doteq' , '≐'], \ ['doteqdot' , '≑'], \ ['dotplus' , '∔'], \ ['dots' , '…'], \ ['dotsb' , '⋯'], \ ['dotsc' , '…'], \ ['dotsi' , '⋯'], \ ['dotso' , '…'], \ ['doublebarwedge' , '⩞'], \ ['downarrow' , '↓'], \ ['Downarrow' , '⇓'], \ ['ell' , 'ℓ'], \ ['emptyset' , '∅'], \ ['eqcirc' , '≖'], \ ['eqsim' , '≂'], \ ['eqslantgtr' , '⪖'], \ ['eqslantless' , '⪕'], \ ['equiv' , '≡'], \ ['eth' , 'ð'], \ ['exists' , '∃'], \ ['fallingdotseq' , '≒'], \ ['flat' , '♭'], \ ['forall' , '∀'], \ ['frown' , '⁔'], \ ['ge' , '≥'], \ ['geq' , '≥'], \ ['geqq' , '≧'], \ ['gets' , '←'], \ ['gimel' , 'ℷ'], \ ['gg' , '⟫'], \ ['gneqq' , '≩'], \ ['gtrdot' , '⋗'], \ ['gtreqless' , '⋛'], \ ['gtrless' , '≷'], \ ['gtrsim' , '≳'], \ ['hbar' , 'ℏ'], \ ['heartsuit' , '♡'], \ ['hookleftarrow' , '↩'], \ ['hookrightarrow' , '↪'], \ ['iff' , '⇔'], \ ['iiint' , '∭'], \ ['iint' , '∬'], \ ['Im' , 'ℑ'], \ ['imath' , 'ɩ'], \ ['implies' , '⇒'], \ ['in' , '∈'], \ ['infty' , '∞'], \ ['int' , '∫'], \ ['jmath' , '𝚥'], \ ['land' , '∧'], \ ['lceil' , '⌈'], \ ['ldots' , '…'], \ ['le' , '≤'], \ ['leadsto' , '↝'], \ ['left(' , '('], \ ['left\[' , '['], \ ['left\\{' , '{'], \ ['leftarrow' , '←'], \ ['Leftarrow' , '⇐'], \ ['leftarrowtail' , '↢'], \ ['leftharpoondown', '↽'], \ ['leftharpoonup' , '↼'], \ ['leftrightarrow' , '↔'], \ ['Leftrightarrow' , '⇔'], \ ['leftrightsquigarrow', '↭'], \ ['leftthreetimes' , '⋋'], \ ['leq' , '≤'], \ ['leq' , '≤'], \ ['leqq' , '≦'], \ ['lessdot' , '⋖'], \ ['lesseqgtr' , '⋚'], \ ['lesssim' , '≲'], \ ['lfloor' , '⌊'], \ ['ll' , '≪'], \ ['lmoustache' , '╭'], \ ['lneqq' , '≨'], \ ['lor' , '∨'], \ ['ltimes' , '⋉'], \ ['mapsto' , '↦'], \ ['measuredangle' , '∡'], \ ['mid' , '∣'], \ ['models' , '╞'], \ ['mp' , '∓'], \ ['nabla' , '∇'], \ ['natural' , '♮'], \ ['ncong' , '≇'], \ ['ne' , '≠'], \ ['nearrow' , '↗'], \ ['neg' , '¬'], \ ['neq' , '≠'], \ ['nexists' , '∄'], \ ['ngeq' , '≱'], \ ['ngeqq' , '≱'], \ ['ngtr' , '≯'], \ ['ni' , '∋'], \ ['nleftarrow' , '↚'], \ ['nLeftarrow' , '⇍'], \ ['nLeftrightarrow', '⇎'], \ ['nleq' , '≰'], \ ['nleqq' , '≰'], \ ['nless' , '≮'], \ ['nmid' , '∤'], \ ['notin' , '∉'], \ ['nparallel' , '∦'], \ ['nprec' , '⊀'], \ ['nrightarrow' , '↛'], \ ['nRightarrow' , '⇏'], \ ['nsim' , '≁'], \ ['nsucc' , '⊁'], \ ['ntriangleleft' , '⋪'], \ ['ntrianglelefteq', '⋬'], \ ['ntriangleright' , '⋫'], \ ['ntrianglerighteq', '⋭'], \ ['nvdash' , '⊬'], \ ['nvDash' , '⊭'], \ ['nVdash' , '⊮'], \ ['nwarrow' , '↖'], \ ['odot' , '⊙'], \ ['oint' , '∮'], \ ['ominus' , '⊖'], \ ['oplus' , '⊕'], \ ['oslash' , '⊘'], \ ['otimes' , '⊗'], \ ['owns' , '∋'], \ ['P' , '¶'], \ ['parallel' , '║'], \ ['partial' , '∂'], \ ['perp' , '⊥'], \ ['pitchfork' , '⋔'], \ ['pm' , '±'], \ ['prec' , '≺'], \ ['precapprox' , '⪷'], \ ['preccurlyeq' , '≼'], \ ['preceq' , '⪯'], \ ['precnapprox' , '⪹'], \ ['precneqq' , '⪵'], \ ['precsim' , '≾'], \ ['prime' , '′'], \ ['prod' , '∏'], \ ['propto' , '∝'], \ ['rceil' , '⌉'], \ ['Re' , 'ℜ'], \ ['rfloor' , '⌋'], \ ['right)' , ')'], \ ['right]' , ']'], \ ['right\\}' , '}'], \ ['rightarrow' , '→'], \ ['Rightarrow' , '⇒'], \ ['rightarrowtail' , '↣'], \ ['rightleftharpoons', '⇌'], \ ['rightsquigarrow', '↝'], \ ['rightthreetimes', '⋌'], \ ['risingdotseq' , '≓'], \ ['rmoustache' , '╮'], \ ['rtimes' , '⋊'], \ ['S' , '§'], \ ['searrow' , '↘'], \ ['setminus' , '∖'], \ ['sharp' , '♯'], \ ['sim' , '∼'], \ ['simeq' , '⋍'], \ ['smile' , '‿'], \ ['spadesuit' , '♠'], \ ['sphericalangle' , '∢'], \ ['sqcap' , '⊓'], \ ['sqcup' , '⊔'], \ ['sqsubset' , '⊏'], \ ['sqsubseteq' , '⊑'], \ ['sqsupset' , '⊐'], \ ['sqsupseteq' , '⊒'], \ ['star' , '✫'], \ ['subset' , '⊂'], \ ['Subset' , '⋐'], \ ['subseteq' , '⊆'], \ ['subseteqq' , '⫅'], \ ['subsetneq' , '⊊'], \ ['subsetneqq' , '⫋'], \ ['succ' , '≻'], \ ['succapprox' , '⪸'], \ ['succcurlyeq' , '≽'], \ ['succeq' , '⪰'], \ ['succnapprox' , '⪺'], \ ['succneqq' , '⪶'], \ ['succsim' , '≿'], \ ['sum' , '∑'], \ ['supset' , '⊃'], \ ['Supset' , '⋑'], \ ['supseteq' , '⊇'], \ ['supseteqq' , '⫆'], \ ['supsetneq' , '⊋'], \ ['supsetneqq' , '⫌'], \ ['surd' , '√'], \ ['swarrow' , '↙'], \ ['therefore' , '∴'], \ ['times' , '×'], \ ['to' , '→'], \ ['top' , '⊤'], \ ['triangle' , '∆'], \ ['triangleleft' , '⊲'], \ ['trianglelefteq' , '⊴'], \ ['triangleq' , '≜'], \ ['triangleright' , '⊳'], \ ['trianglerighteq', '⊵'], \ ['twoheadleftarrow', '↞'], \ ['twoheadrightarrow', '↠'], \ ['ulcorner' , '⌜'], \ ['uparrow' , '↑'], \ ['Uparrow' , '⇑'], \ ['updownarrow' , '↕'], \ ['Updownarrow' , '⇕'], \ ['urcorner' , '⌝'], \ ['varnothing' , '∅'], \ ['vartriangle' , '∆'], \ ['vdash' , '⊢'], \ ['vDash' , '⊨'], \ ['Vdash' , '⊩'], \ ['vdots' , '⋮'], \ ['vee' , '∨'], \ ['veebar' , '⊻'], \ ['Vvdash' , '⊪'], \ ['wedge' , '∧'], \ ['wp' , '℘'], \ ['wr' , '≀']] " \ ['jmath' , 'X'] " \ ['uminus' , 'X'] " \ ['uplus' , 'X'] if &ambw == "double" || exists("g:tex_usedblwidth") let s:texMathList= s:texMathList + [ \ ['right\\rangle' , '〉'], \ ['left\\langle' , '〈']] else let s:texMathList= s:texMathList + [ \ ['right\\rangle' , '>'], \ ['left\\langle' , '<']] endif for texmath in s:texMathList if texmath[0] =~# '\w$' exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1] else exe "syn match texMathSymbol '\\\\".texmath[0]."' contained conceal cchar=".texmath[1] endif endfor if &ambw == "double" syn match texMathSymbol '\\gg\>' contained conceal cchar=≫ syn match texMathSymbol '\\ll\>' contained conceal cchar=≪ else syn match texMathSymbol '\\gg\>' contained conceal cchar=⟫ syn match texMathSymbol '\\ll\>' contained conceal cchar=⟪ endif syn match texMathSymbol '\\hat{a}' contained conceal cchar=â syn match texMathSymbol '\\hat{A}' contained conceal cchar= syn match texMathSymbol '\\hat{c}' contained conceal cchar=ĉ syn match texMathSymbol '\\hat{C}' contained conceal cchar=Ĉ syn match texMathSymbol '\\hat{e}' contained conceal cchar=ê syn match texMathSymbol '\\hat{E}' contained conceal cchar=Ê syn match texMathSymbol '\\hat{g}' contained conceal cchar=ĝ syn match texMathSymbol '\\hat{G}' contained conceal cchar=Ĝ syn match texMathSymbol '\\hat{i}' contained conceal cchar=î syn match texMathSymbol '\\hat{I}' contained conceal cchar=Î syn match texMathSymbol '\\hat{o}' contained conceal cchar=ô syn match texMathSymbol '\\hat{O}' contained conceal cchar=Ô syn match texMathSymbol '\\hat{s}' contained conceal cchar=ŝ syn match texMathSymbol '\\hat{S}' contained conceal cchar=Ŝ syn match texMathSymbol '\\hat{u}' contained conceal cchar=û syn match texMathSymbol '\\hat{U}' contained conceal cchar=Û syn match texMathSymbol '\\hat{w}' contained conceal cchar=ŵ syn match texMathSymbol '\\hat{W}' contained conceal cchar=Ŵ syn match texMathSymbol '\\hat{y}' contained conceal cchar=ŷ syn match texMathSymbol '\\hat{Y}' contained conceal cchar=Ŷ " syn match texMathSymbol '\\bar{a}' contained conceal cchar=a̅ endif " Greek {{{2 if s:tex_conceal =~# 'g' fun! s:Greek(group,pat,cchar) exe 'syn match '.a:group." '".a:pat."' contained conceal cchar=".a:cchar endfun call s:Greek('texGreek','\\alpha\>' ,'α') call s:Greek('texGreek','\\beta\>' ,'β') call s:Greek('texGreek','\\gamma\>' ,'γ') call s:Greek('texGreek','\\delta\>' ,'δ') call s:Greek('texGreek','\\epsilon\>' ,'ϵ') call s:Greek('texGreek','\\varepsilon\>' ,'ε') call s:Greek('texGreek','\\zeta\>' ,'ζ') call s:Greek('texGreek','\\eta\>' ,'η') call s:Greek('texGreek','\\theta\>' ,'θ') call s:Greek('texGreek','\\vartheta\>' ,'ϑ') call s:Greek('texGreek','\\kappa\>' ,'κ') call s:Greek('texGreek','\\lambda\>' ,'λ') call s:Greek('texGreek','\\mu\>' ,'μ') call s:Greek('texGreek','\\nu\>' ,'ν') call s:Greek('texGreek','\\xi\>' ,'ξ') call s:Greek('texGreek','\\pi\>' ,'π') call s:Greek('texGreek','\\varpi\>' ,'ϖ') call s:Greek('texGreek','\\rho\>' ,'ρ') call s:Greek('texGreek','\\varrho\>' ,'ϱ') call s:Greek('texGreek','\\sigma\>' ,'σ') call s:Greek('texGreek','\\varsigma\>' ,'ς') call s:Greek('texGreek','\\tau\>' ,'τ') call s:Greek('texGreek','\\upsilon\>' ,'υ') call s:Greek('texGreek','\\phi\>' ,'ϕ') call s:Greek('texGreek','\\varphi\>' ,'φ') call s:Greek('texGreek','\\chi\>' ,'χ') call s:Greek('texGreek','\\psi\>' ,'ψ') call s:Greek('texGreek','\\omega\>' ,'ω') call s:Greek('texGreek','\\Gamma\>' ,'Γ') call s:Greek('texGreek','\\Delta\>' ,'Δ') call s:Greek('texGreek','\\Theta\>' ,'Θ') call s:Greek('texGreek','\\Lambda\>' ,'Λ') call s:Greek('texGreek','\\Xi\>' ,'Χ') call s:Greek('texGreek','\\Pi\>' ,'Π') call s:Greek('texGreek','\\Sigma\>' ,'Σ') call s:Greek('texGreek','\\Upsilon\>' ,'Υ') call s:Greek('texGreek','\\Phi\>' ,'Φ') call s:Greek('texGreek','\\Psi\>' ,'Ψ') call s:Greek('texGreek','\\Omega\>' ,'Ω') delfun s:Greek endif " Superscripts/Subscripts {{{2 if s:tex_conceal =~# 's' if s:tex_fast =~# 's' syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher endif " s:SuperSub: fun! s:SuperSub(group,leader,pat,cchar) if a:pat =~# '^\\' || (a:leader == '\^' && a:pat =~# s:tex_superscripts) || (a:leader == '_' && a:pat =~# s:tex_subscripts) " call Decho("SuperSub: group<".a:group."> leader<".a:leader."> pat<".a:pat."> cchar<".a:cchar.">") exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar exe 'syn match '.a:group."s '".a:pat ."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s' endif endfun call s:SuperSub('texSuperscript','\^','0','⁰') call s:SuperSub('texSuperscript','\^','1','¹') call s:SuperSub('texSuperscript','\^','2','²') call s:SuperSub('texSuperscript','\^','3','³') call s:SuperSub('texSuperscript','\^','4','⁴') call s:SuperSub('texSuperscript','\^','5','⁵') call s:SuperSub('texSuperscript','\^','6','⁶') call s:SuperSub('texSuperscript','\^','7','⁷') call s:SuperSub('texSuperscript','\^','8','⁸') call s:SuperSub('texSuperscript','\^','9','⁹') call s:SuperSub('texSuperscript','\^','a','ᵃ') call s:SuperSub('texSuperscript','\^','b','ᵇ') call s:SuperSub('texSuperscript','\^','c','ᶜ') call s:SuperSub('texSuperscript','\^','d','ᵈ') call s:SuperSub('texSuperscript','\^','e','ᵉ') call s:SuperSub('texSuperscript','\^','f','ᶠ') call s:SuperSub('texSuperscript','\^','g','ᵍ') call s:SuperSub('texSuperscript','\^','h','ʰ') call s:SuperSub('texSuperscript','\^','i','ⁱ') call s:SuperSub('texSuperscript','\^','j','ʲ') call s:SuperSub('texSuperscript','\^','k','ᵏ') call s:SuperSub('texSuperscript','\^','l','ˡ') call s:SuperSub('texSuperscript','\^','m','ᵐ') call s:SuperSub('texSuperscript','\^','n','ⁿ') call s:SuperSub('texSuperscript','\^','o','ᵒ') call s:SuperSub('texSuperscript','\^','p','ᵖ') call s:SuperSub('texSuperscript','\^','r','ʳ') call s:SuperSub('texSuperscript','\^','s','ˢ') call s:SuperSub('texSuperscript','\^','t','ᵗ') call s:SuperSub('texSuperscript','\^','u','ᵘ') call s:SuperSub('texSuperscript','\^','v','ᵛ') call s:SuperSub('texSuperscript','\^','w','ʷ') call s:SuperSub('texSuperscript','\^','x','ˣ') call s:SuperSub('texSuperscript','\^','y','ʸ') call s:SuperSub('texSuperscript','\^','z','ᶻ') call s:SuperSub('texSuperscript','\^','A','ᴬ') call s:SuperSub('texSuperscript','\^','B','ᴮ') call s:SuperSub('texSuperscript','\^','D','ᴰ') call s:SuperSub('texSuperscript','\^','E','ᴱ') call s:SuperSub('texSuperscript','\^','G','ᴳ') call s:SuperSub('texSuperscript','\^','H','ᴴ') call s:SuperSub('texSuperscript','\^','I','ᴵ') call s:SuperSub('texSuperscript','\^','J','ᴶ') call s:SuperSub('texSuperscript','\^','K','ᴷ') call s:SuperSub('texSuperscript','\^','L','ᴸ') call s:SuperSub('texSuperscript','\^','M','ᴹ') call s:SuperSub('texSuperscript','\^','N','ᴺ') call s:SuperSub('texSuperscript','\^','O','ᴼ') call s:SuperSub('texSuperscript','\^','P','ᴾ') call s:SuperSub('texSuperscript','\^','R','ᴿ') call s:SuperSub('texSuperscript','\^','T','ᵀ') call s:SuperSub('texSuperscript','\^','U','ᵁ') call s:SuperSub('texSuperscript','\^','W','ᵂ') call s:SuperSub('texSuperscript','\^',',','︐') call s:SuperSub('texSuperscript','\^',':','︓') call s:SuperSub('texSuperscript','\^',';','︔') call s:SuperSub('texSuperscript','\^','+','⁺') call s:SuperSub('texSuperscript','\^','-','⁻') call s:SuperSub('texSuperscript','\^','<','˂') call s:SuperSub('texSuperscript','\^','>','˃') call s:SuperSub('texSuperscript','\^','/','ˊ') call s:SuperSub('texSuperscript','\^','(','⁽') call s:SuperSub('texSuperscript','\^',')','⁾') call s:SuperSub('texSuperscript','\^','\.','˙') call s:SuperSub('texSuperscript','\^','=','˭') call s:SuperSub('texSubscript','_','0','₀') call s:SuperSub('texSubscript','_','1','₁') call s:SuperSub('texSubscript','_','2','₂') call s:SuperSub('texSubscript','_','3','₃') call s:SuperSub('texSubscript','_','4','₄') call s:SuperSub('texSubscript','_','5','₅') call s:SuperSub('texSubscript','_','6','₆') call s:SuperSub('texSubscript','_','7','₇') call s:SuperSub('texSubscript','_','8','₈') call s:SuperSub('texSubscript','_','9','₉') call s:SuperSub('texSubscript','_','a','ₐ') call s:SuperSub('texSubscript','_','e','ₑ') call s:SuperSub('texSubscript','_','h','ₕ') call s:SuperSub('texSubscript','_','i','ᵢ') call s:SuperSub('texSubscript','_','j','ⱼ') call s:SuperSub('texSubscript','_','k','ₖ') call s:SuperSub('texSubscript','_','l','ₗ') call s:SuperSub('texSubscript','_','m','ₘ') call s:SuperSub('texSubscript','_','n','ₙ') call s:SuperSub('texSubscript','_','o','ₒ') call s:SuperSub('texSubscript','_','p','ₚ') call s:SuperSub('texSubscript','_','r','ᵣ') call s:SuperSub('texSubscript','_','s','ₛ') call s:SuperSub('texSubscript','_','t','ₜ') call s:SuperSub('texSubscript','_','u','ᵤ') call s:SuperSub('texSubscript','_','v','ᵥ') call s:SuperSub('texSubscript','_','x','ₓ') call s:SuperSub('texSubscript','_',',','︐') call s:SuperSub('texSubscript','_','+','₊') call s:SuperSub('texSubscript','_','-','₋') call s:SuperSub('texSubscript','_','/','ˏ') call s:SuperSub('texSubscript','_','(','₍') call s:SuperSub('texSubscript','_',')','₎') call s:SuperSub('texSubscript','_','\.','‸') call s:SuperSub('texSubscript','_','r','ᵣ') call s:SuperSub('texSubscript','_','v','ᵥ') call s:SuperSub('texSubscript','_','x','ₓ') call s:SuperSub('texSubscript','_','\\beta\>' ,'ᵦ') call s:SuperSub('texSubscript','_','\\delta\>','ᵨ') call s:SuperSub('texSubscript','_','\\phi\>' ,'ᵩ') call s:SuperSub('texSubscript','_','\\gamma\>','ᵧ') call s:SuperSub('texSubscript','_','\\chi\>' ,'ᵪ') delfun s:SuperSub endif " Accented characters and Ligatures: {{{2 if s:tex_conceal =~# 'a' if b:tex_stylish syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1 syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1 syn match texLigature '--' syn match texLigature '---' else fun! s:Accents(chr,...) let i= 1 for accent in ["`","\\'","^",'"','\~','\.','=',"c","H","k","r","u","v"] if i > a:0 break endif if strlen(a:{i}) == 0 || a:{i} == ' ' || a:{i} == '?' let i= i + 1 continue endif if accent =~# '\a' exe "syn match texAccent '".'\\'.accent.'\(\s*{'.a:chr.'}\|\s\+'.a:chr.'\)'."' conceal cchar=".a:{i} else exe "syn match texAccent '".'\\'.accent.'\s*\({'.a:chr.'}\|'.a:chr.'\)'."' conceal cchar=".a:{i} endif let i= i + 1 endfor endfun " \` \' \^ \" \~ \. \= \c \H \k \r \u \v call s:Accents('a','à','á','â','ä','ã','ȧ','ā',' ',' ','ą','å','ă','ǎ') call s:Accents('A','À','Á','Â','Ä','Ã','Ȧ','Ā',' ',' ','Ą','Å','Ă','Ǎ') call s:Accents('c',' ','ć','ĉ',' ',' ','ċ',' ','ç',' ',' ',' ',' ','č') call s:Accents('C',' ','Ć','Ĉ',' ',' ','Ċ',' ','Ç',' ',' ',' ',' ','Č') call s:Accents('d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ď') call s:Accents('D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ď') call s:Accents('e','è','é','ê','ë','ẽ','ė','ē','ȩ',' ','ę',' ','ĕ','ě') call s:Accents('E','È','É','Ê','Ë','Ẽ','Ė','Ē','Ȩ',' ','Ę',' ','Ĕ','Ě') call s:Accents('g',' ','ǵ','ĝ',' ',' ','ġ',' ','ģ',' ',' ',' ','ğ','ǧ') call s:Accents('G',' ','Ǵ','Ĝ',' ',' ','Ġ',' ','Ģ',' ',' ',' ','Ğ','Ǧ') call s:Accents('h',' ',' ','ĥ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ȟ') call s:Accents('H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ȟ') call s:Accents('i','ì','í','î','ï','ĩ','į','ī',' ',' ','į',' ','ĭ','ǐ') call s:Accents('I','Ì','Í','Î','Ï','Ĩ','İ','Ī',' ',' ','Į',' ','Ĭ','Ǐ') call s:Accents('J',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ǰ') call s:Accents('k',' ',' ',' ',' ',' ',' ',' ','ķ',' ',' ',' ',' ','ǩ') call s:Accents('K',' ',' ',' ',' ',' ',' ',' ','Ķ',' ',' ',' ',' ','Ǩ') call s:Accents('l',' ','ĺ','ľ',' ',' ',' ',' ','ļ',' ',' ',' ',' ','ľ') call s:Accents('L',' ','Ĺ','Ľ',' ',' ',' ',' ','Ļ',' ',' ',' ',' ','Ľ') call s:Accents('n',' ','ń',' ',' ','ñ',' ',' ','ņ',' ',' ',' ',' ','ň') call s:Accents('N',' ','Ń',' ',' ','Ñ',' ',' ','Ņ',' ',' ',' ',' ','Ň') call s:Accents('o','ò','ó','ô','ö','õ','ȯ','ō',' ','ő','ǫ',' ','ŏ','ǒ') call s:Accents('O','Ò','Ó','Ô','Ö','Õ','Ȯ','Ō',' ','Ő','Ǫ',' ','Ŏ','Ǒ') call s:Accents('r',' ','ŕ',' ',' ',' ',' ',' ','ŗ',' ',' ',' ',' ','ř') call s:Accents('R',' ','Ŕ',' ',' ',' ',' ',' ','Ŗ',' ',' ',' ',' ','Ř') call s:Accents('s',' ','ś','ŝ',' ',' ',' ',' ','ş',' ','ȿ',' ',' ','š') call s:Accents('S',' ','Ś','Ŝ',' ',' ',' ',' ','Ş',' ',' ',' ',' ','Š') call s:Accents('t',' ',' ',' ',' ',' ',' ',' ','ţ',' ',' ',' ',' ','ť') call s:Accents('T',' ',' ',' ',' ',' ',' ',' ','Ţ',' ',' ',' ',' ','Ť') call s:Accents('u','ù','ú','û','ü','ũ',' ','ū',' ','ű','ų','ů','ŭ','ǔ') call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ','Ū',' ','Ű','Ų','Ů','Ŭ','Ǔ') call s:Accents('w',' ',' ','ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ') call s:Accents('W',' ',' ','Ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ') call s:Accents('y','ỳ','ý','ŷ','ÿ','ỹ',' ',' ',' ',' ',' ',' ',' ',' ') call s:Accents('Y','Ỳ','Ý','Ŷ','Ÿ','Ỹ',' ',' ',' ',' ',' ',' ',' ',' ') call s:Accents('z',' ','ź',' ',' ',' ','ż',' ',' ',' ',' ',' ',' ','ž') call s:Accents('Z',' ','Ź',' ',' ',' ','Ż',' ',' ',' ',' ',' ',' ','Ž') call s:Accents('\\i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ',' ','ĭ',' ') " \` \' \^ \" \~ \. \= \c \H \k \r \u \v delfun s:Accents syn match texAccent '\\aa\>' conceal cchar=å syn match texAccent '\\AA\>' conceal cchar=Å syn match texAccent '\\o\>' conceal cchar=ø syn match texAccent '\\O\>' conceal cchar=Ø syn match texLigature '\\AE\>' conceal cchar=Æ syn match texLigature '\\ae\>' conceal cchar=æ syn match texLigature '\\oe\>' conceal cchar=œ syn match texLigature '\\OE\>' conceal cchar=Œ syn match texLigature '\\ss\>' conceal cchar=ß syn match texLigature '--' conceal cchar=– syn match texLigature '---' conceal cchar=— endif endif endif " --------------------------------------------------------------------- " LaTeX synchronization: {{{1 syn sync maxlines=200 syn sync minlines=50 syn sync match texSyncStop groupthere NONE "%stopzone\>" " Synchronization: {{{1 " The $..$ and $$..$$ make for impossible sync patterns " (one can't tell if a "$$" starts or stops a math zone by itself) " The following grouptheres coupled with minlines above " help improve the odds of good syncing. if !exists("g:tex_no_math") syn sync match texSyncMathZoneA groupthere NONE "\\end{abstract}" syn sync match texSyncMathZoneA groupthere NONE "\\end{center}" syn sync match texSyncMathZoneA groupthere NONE "\\end{description}" syn sync match texSyncMathZoneA groupthere NONE "\\end{enumerate}" syn sync match texSyncMathZoneA groupthere NONE "\\end{itemize}" syn sync match texSyncMathZoneA groupthere NONE "\\end{table}" syn sync match texSyncMathZoneA groupthere NONE "\\end{tabular}" syn sync match texSyncMathZoneA groupthere NONE "\\\(sub\)*section\>" endif " --------------------------------------------------------------------- " Highlighting: {{{1 " Define the default highlighting. {{{1 if !exists("skip_tex_syntax_inits") " TeX highlighting groups which should share similar highlighting if !exists("g:tex_no_error") if !exists("g:tex_no_math") hi def link texBadMath texError hi def link texMathDelimBad texError hi def link texMathError texError if !b:tex_stylish hi def link texOnlyMath texError endif endif hi def link texError Error endif hi texBoldStyle gui=bold cterm=bold hi texItalStyle gui=italic cterm=italic hi texBoldItalStyle gui=bold,italic cterm=bold,italic hi texItalBoldStyle gui=bold,italic cterm=bold,italic hi def link texCite texRefZone hi def link texDefCmd texDef hi def link texDefName texDef hi def link texDocType texCmdName hi def link texDocTypeArgs texCmdArgs hi def link texInputFileOpt texCmdArgs hi def link texInputCurlies texDelimiter hi def link texLigature texSpecialChar if !exists("g:tex_no_math") hi def link texMathDelimSet1 texMathDelim hi def link texMathDelimSet2 texMathDelim hi def link texMathDelimKey texMathDelim hi def link texMathMatcher texMath hi def link texAccent texStatement hi def link texGreek texStatement hi def link texSuperscript texStatement hi def link texSubscript texStatement hi def link texSuperscripts texSuperscript hi def link texSubscripts texSubscript hi def link texMathSymbol texStatement hi def link texMathZoneV texMath hi def link texMathZoneW texMath hi def link texMathZoneX texMath hi def link texMathZoneY texMath hi def link texMathZoneV texMath hi def link texMathZoneZ texMath endif hi def link texBeginEnd texCmdName hi def link texBeginEndName texSection hi def link texSpaceCode texStatement hi def link texStyleStatement texStatement hi def link texTypeSize texType hi def link texTypeStyle texType " Basic TeX highlighting groups hi def link texCmdArgs Number hi def link texCmdName Statement hi def link texComment Comment hi def link texDef Statement hi def link texDefParm Special hi def link texDelimiter Delimiter hi def link texInput Special hi def link texInputFile Special hi def link texLength Number hi def link texMath Special hi def link texMathDelim Statement hi def link texMathOper Operator hi def link texNewCmd Statement hi def link texNewEnv Statement hi def link texOption Number hi def link texRefZone Special hi def link texSection PreCondit hi def link texSpaceCodeChar Special hi def link texSpecialChar SpecialChar hi def link texStatement Statement hi def link texString String hi def link texTodo Todo hi def link texType Type hi def link texZone PreCondit endif " Cleanup: {{{1 delc TexFold unlet s:extfname let b:current_syntax = "tex" let &cpo = s:keepcpo unlet s:keepcpo " vim: ts=8 fdm=marker neovim-0.2.2/runtime/syntax/texinfo.vim000066400000000000000000000617401320401574200202200ustar00rootroot00000000000000" Vim syntax file " Language: Texinfo (macro package for TeX) " Maintainer: Sandor Kopanyi " URL: <-> " Last Change: 2004 Jun 23 " " the file follows the Texinfo manual structure; this file is based " on manual for Texinfo version 4.0, 28 September 1999 " since @ can have special meanings, everything is 'match'-ed and 'region'-ed " (including @ in 'iskeyword' option has unexpected effects) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'texinfo' endif "in Texinfo can be real big things, like tables; sync for that syn sync lines=200 "some general stuff "syn match texinfoError "\S" contained TODO syn match texinfoIdent "\k\+" contained "IDENTifier syn match texinfoAssignment "\k\+\s*=\s*\k\+\s*$" contained "assigment statement ( var = val ) syn match texinfoSinglePar "\k\+\s*$" contained "single parameter (used for several @-commands) syn match texinfoIndexPar "\k\k\s*$" contained "param. used for different *index commands (+ @documentlanguage command) "marking words and phrases (chap. 9 in Texinfo manual) "(almost) everything appears as 'contained' too; is for tables (@table) "this chapter is at the beginning of this file to avoid overwritings syn match texinfoSpecialChar "@acronym" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@acronym{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@b" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@b{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@cite" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@cite{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@code" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@code{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@command" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@command{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@dfn" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@dfn{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@email" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@email{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@emph" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@emph{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@env" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@env{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@file" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@file{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@i" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@i{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@kbd" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@kbd{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@key" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@key{" end="}" contains=texinfoSpecialChar syn match texinfoSpecialChar "@option" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@option{" end="}" contains=texinfoSpecialChar syn match texinfoSpecialChar "@r" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@r{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@samp" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@samp{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@sc" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@sc{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@strong" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@strong{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@t" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@t{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@url" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@url{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoSpecialChar "@var" contained syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@var{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn match texinfoAtCmd "^@kbdinputstyle" nextgroup=texinfoSinglePar skipwhite "overview of Texinfo (chap. 1 in Texinfo manual) syn match texinfoComment "@c .*" syn match texinfoComment "@c$" syn match texinfoComment "@comment .*" syn region texinfoMltlnAtCmd matchgroup=texinfoComment start="^@ignore\s*$" end="^@end ignore\s*$" contains=ALL "beginning a Texinfo file (chap. 3 in Texinfo manual) syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="@center " skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd oneline syn region texinfoMltlnDMAtCmd matchgroup=texinfoAtCmd start="^@detailmenu\s*$" end="^@end detailmenu\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@setfilename " skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@settitle " skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@shorttitlepage " skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@title " skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@titlefont{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@titlepage\s*$" end="^@end titlepage\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoMltlnDMAtCmd,texinfoAtCmd,texinfoPrmAtCmd,texinfoMltlnAtCmd syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@vskip " skip="\\$" end="$" contains=texinfoSpecialChar oneline syn match texinfoAtCmd "^@exampleindent" nextgroup=texinfoSinglePar skipwhite syn match texinfoAtCmd "^@headings" nextgroup=texinfoSinglePar skipwhite syn match texinfoAtCmd "^\\input" nextgroup=texinfoSinglePar skipwhite syn match texinfoAtCmd "^@paragraphindent" nextgroup=texinfoSinglePar skipwhite syn match texinfoAtCmd "^@setchapternewpage" nextgroup=texinfoSinglePar skipwhite "ending a Texinfo file (chap. 4 in Texinfo manual) syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="@author " skip="\\$" end="$" contains=texinfoSpecialChar oneline "all below @bye should be comment TODO syn match texinfoAtCmd "^@bye\s*$" syn match texinfoAtCmd "^@contents\s*$" syn match texinfoAtCmd "^@printindex" nextgroup=texinfoIndexPar skipwhite syn match texinfoAtCmd "^@setcontentsaftertitlepage\s*$" syn match texinfoAtCmd "^@setshortcontentsaftertitlepage\s*$" syn match texinfoAtCmd "^@shortcontents\s*$" syn match texinfoAtCmd "^@summarycontents\s*$" "chapter structuring (chap. 5 in Texinfo manual) syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendix" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsubsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@centerchap" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@chapheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@chapter" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@heading" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@majorheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@section" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subheading " skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsubheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsubsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subtitle" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumbered" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsubsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn match texinfoAtCmd "^@lowersections\s*$" syn match texinfoAtCmd "^@raisesections\s*$" "nodes (chap. 6 in Texinfo manual) syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@anchor{" end="}" syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@top" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@node" skip="\\$" end="$" contains=texinfoSpecialChar oneline "menus (chap. 7 in Texinfo manual) syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@menu\s*$" end="^@end menu\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoMltlnDMAtCmd "cross references (chap. 8 in Texinfo manual) syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@inforef{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@pxref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@ref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@uref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@xref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd "marking words and phrases (chap. 9 in Texinfo manual) "(almost) everything appears as 'contained' too; is for tables (@table) "this chapter is at the beginning of this file to avoid overwritings "quotations and examples (chap. 10 in Texinfo manual) syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@cartouche\s*$" end="^@end cartouche\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@display\s*$" end="^@end display\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@example\s*$" end="^@end example\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@flushleft\s*$" end="^@end flushleft\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@flushright\s*$" end="^@end flushright\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@format\s*$" end="^@end format\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@lisp\s*$" end="^@end lisp\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@quotation\s*$" end="^@end quotation\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smalldisplay\s*$" end="^@end smalldisplay\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smallexample\s*$" end="^@end smallexample\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smallformat\s*$" end="^@end smallformat\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smalllisp\s*$" end="^@end smalllisp\s*$" contains=ALL syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@exdent" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn match texinfoAtCmd "^@noindent\s*$" syn match texinfoAtCmd "^@smallbook\s*$" "lists and tables (chap. 11 in Texinfo manual) syn match texinfoAtCmd "@asis" contained syn match texinfoAtCmd "@columnfractions" contained syn match texinfoAtCmd "@item" contained syn match texinfoAtCmd "@itemx" contained syn match texinfoAtCmd "@tab" contained syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@enumerate" end="^@end enumerate\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ftable" end="^@end ftable\s*$" contains=ALL syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@itemize" end="^@end itemize\s*$" contains=ALL syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@multitable" end="^@end multitable\s*$" contains=ALL syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@table" end="^@end table\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@vtable" end="^@end vtable\s*$" contains=ALL "indices (chap. 12 in Texinfo manual) syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@\(c\|f\|k\|p\|t\|v\)index" skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@..index" skip="\\$" end="$" contains=texinfoSpecialChar oneline "@defcodeindex and @defindex is defined after chap. 15's @def* commands (otherwise those ones will overwrite these ones) syn match texinfoSIPar "\k\k\s*\k\k\s*$" contained syn match texinfoAtCmd "^@syncodeindex" nextgroup=texinfoSIPar skipwhite syn match texinfoAtCmd "^@synindex" nextgroup=texinfoSIPar skipwhite "special insertions (chap. 13 in Texinfo manual) syn match texinfoSpecialChar "@\(!\|?\|@\|\s\)" syn match texinfoSpecialChar "@{" syn match texinfoSpecialChar "@}" "accents syn match texinfoSpecialChar "@=." syn match texinfoSpecialChar "@\('\|\"\|\^\|`\)[aeiouyAEIOUY]" syn match texinfoSpecialChar "@\~[aeinouyAEINOUY]" syn match texinfoSpecialChar "@dotaccent{.}" syn match texinfoSpecialChar "@H{.}" syn match texinfoSpecialChar "@,{[cC]}" syn match texinfoSpecialChar "@AA{}" syn match texinfoSpecialChar "@aa{}" syn match texinfoSpecialChar "@L{}" syn match texinfoSpecialChar "@l{}" syn match texinfoSpecialChar "@O{}" syn match texinfoSpecialChar "@o{}" syn match texinfoSpecialChar "@ringaccent{.}" syn match texinfoSpecialChar "@tieaccent{..}" syn match texinfoSpecialChar "@u{.}" syn match texinfoSpecialChar "@ubaraccent{.}" syn match texinfoSpecialChar "@udotaccent{.}" syn match texinfoSpecialChar "@v{.}" "ligatures syn match texinfoSpecialChar "@AE{}" syn match texinfoSpecialChar "@ae{}" syn match texinfoSpecialChar "@copyright{}" syn match texinfoSpecialChar "@bullet" contained "for tables and lists syn match texinfoSpecialChar "@bullet{}" syn match texinfoSpecialChar "@dotless{i}" syn match texinfoSpecialChar "@dotless{j}" syn match texinfoSpecialChar "@dots{}" syn match texinfoSpecialChar "@enddots{}" syn match texinfoSpecialChar "@equiv" contained "for tables and lists syn match texinfoSpecialChar "@equiv{}" syn match texinfoSpecialChar "@error{}" syn match texinfoSpecialChar "@exclamdown{}" syn match texinfoSpecialChar "@expansion{}" syn match texinfoSpecialChar "@minus" contained "for tables and lists syn match texinfoSpecialChar "@minus{}" syn match texinfoSpecialChar "@OE{}" syn match texinfoSpecialChar "@oe{}" syn match texinfoSpecialChar "@point" contained "for tables and lists syn match texinfoSpecialChar "@point{}" syn match texinfoSpecialChar "@pounds{}" syn match texinfoSpecialChar "@print{}" syn match texinfoSpecialChar "@questiondown{}" syn match texinfoSpecialChar "@result" contained "for tables and lists syn match texinfoSpecialChar "@result{}" syn match texinfoSpecialChar "@ss{}" syn match texinfoSpecialChar "@TeX{}" "other syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@dmn{" end="}" syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@footnote{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@image{" end="}" syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@math{" end="}" syn match texinfoAtCmd "@footnotestyle" nextgroup=texinfoSinglePar skipwhite "making and preventing breaks (chap. 14 in Texinfo manual) syn match texinfoSpecialChar "@\(\*\|-\|\.\)" syn match texinfoAtCmd "^@need" nextgroup=texinfoSinglePar skipwhite syn match texinfoAtCmd "^@page\s*$" syn match texinfoAtCmd "^@sp" nextgroup=texinfoSinglePar skipwhite syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@group\s*$" end="^@end group\s*$" contains=ALL syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@hyphenation{" end="}" syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@w{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd "definition commands (chap. 15 in Texinfo manual) syn match texinfoMltlnAtCmdFLine "^@def\k\+" contained syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@def\k\+" end="^@end def\k\+$" contains=ALL "next 2 commands are from chap. 12; must be defined after @def* commands above to overwrite them syn match texinfoAtCmd "@defcodeindex" nextgroup=texinfoIndexPar skipwhite syn match texinfoAtCmd "@defindex" nextgroup=texinfoIndexPar skipwhite "conditionally visible text (chap. 16 in Texinfo manual) syn match texinfoAtCmd "^@clear" nextgroup=texinfoSinglePar skipwhite syn region texinfoMltln2AtCmd matchgroup=texinfoAtCmd start="^@html\s*$" end="^@end html\s*$" syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifclear" end="^@end ifclear\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifhtml" end="^@end ifhtml\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifinfo" end="^@end ifinfo\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnothtml" end="^@end ifnothtml\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnotinfo" end="^@end ifnotinfo\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnottex" end="^@end ifnottex\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifset" end="^@end ifset\s*$" contains=ALL syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@iftex" end="^@end iftex\s*$" contains=ALL syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@set " skip="\\$" end="$" contains=texinfoSpecialChar oneline syn region texinfoTexCmd start="\$\$" end="\$\$" contained syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@tex" end="^@end tex\s*$" contains=texinfoTexCmd syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@value{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd "internationalization (chap. 17 in Texinfo manual) syn match texinfoAtCmd "@documentencoding" nextgroup=texinfoSinglePar skipwhite syn match texinfoAtCmd "@documentlanguage" nextgroup=texinfoIndexPar skipwhite "defining new texinfo commands (chap. 18 in Texinfo manual) syn match texinfoAtCmd "@alias" nextgroup=texinfoAssignment skipwhite syn match texinfoDIEPar "\S*\s*,\s*\S*\s*,\s*\S*\s*$" contained syn match texinfoAtCmd "@definfoenclose" nextgroup=texinfoDIEPar skipwhite syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@macro" end="^@end macro\s*$" contains=ALL "formatting hardcopy (chap. 19 in Texinfo manual) syn match texinfoAtCmd "^@afourlatex\s*$" syn match texinfoAtCmd "^@afourpaper\s*$" syn match texinfoAtCmd "^@afourwide\s*$" syn match texinfoAtCmd "^@finalout\s*$" syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@pagesizes" end="$" oneline "creating and installing Info Files (chap. 20 in Texinfo manual) syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@dircategory" skip="\\$" end="$" oneline syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@direntry\s*$" end="^@end direntry\s*$" contains=texinfoSpecialChar syn match texinfoAtCmd "^@novalidate\s*$" "include files (appendix E in Texinfo manual) syn match texinfoAtCmd "^@include" nextgroup=texinfoSinglePar skipwhite "page headings (appendix F in Texinfo manual) syn match texinfoHFSpecialChar "@|" contained syn match texinfoThisAtCmd "@thischapter" contained syn match texinfoThisAtCmd "@thischaptername" contained syn match texinfoThisAtCmd "@thisfile" contained syn match texinfoThisAtCmd "@thispage" contained syn match texinfoThisAtCmd "@thistitle" contained syn match texinfoThisAtCmd "@today{}" contained syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@evenfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@evenheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@everyfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@everyheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@oddfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@oddheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline "refilling paragraphs (appendix H in Texinfo manual) syn match texinfoAtCmd "@refill" syn cluster texinfoAll contains=ALLBUT,texinfoThisAtCmd,texinfoHFSpecialChar syn cluster texinfoReducedAll contains=texinfoSpecialChar,texinfoBrcPrmAtCmd "============================================================================== " highlighting " Only when an item doesn't have highlighting yet hi def link texinfoSpecialChar Special hi def link texinfoHFSpecialChar Special hi def link texinfoError Error hi def link texinfoIdent Identifier hi def link texinfoAssignment Identifier hi def link texinfoSinglePar Identifier hi def link texinfoIndexPar Identifier hi def link texinfoSIPar Identifier hi def link texinfoDIEPar Identifier hi def link texinfoTexCmd PreProc hi def link texinfoAtCmd Statement "@-command hi def link texinfoPrmAtCmd String "@-command in one line with unknown nr. of parameters "is String because is found as a region and is 'matchgroup'-ed "to texinfoAtCmd hi def link texinfoBrcPrmAtCmd String "@-command with parameter(s) in braces ({}) "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd hi def link texinfoMltlnAtCmdFLine texinfoAtCmd "repeated embedded First lines in @-commands hi def link texinfoMltlnAtCmd String "@-command in multiple lines "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd hi def link texinfoMltln2AtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) hi def link texinfoMltlnDMAtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors; used for @detailmenu, which can be included in @menu) hi def link texinfoMltlnNAtCmd Normal "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) hi def link texinfoThisAtCmd Statement "@-command used in headers and footers (@this... series) hi def link texinfoComment Comment let b:current_syntax = "texinfo" if main_syntax == 'texinfo' unlet main_syntax endif " vim: ts=8 neovim-0.2.2/runtime/syntax/texmf.vim000066400000000000000000000043511320401574200176620ustar00rootroot00000000000000" Vim syntax file " This is a GENERATED FILE. Please always refer to source file at the URI below. " Language: Web2C TeX texmf.cnf configuration file " Maintainer: David Ne\v{c}as (Yeti) " Last Change: 2001-05-13 " URL: http://physics.muni.cz/~yeti/download/syntax/texmf.vim " Setup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match " Comments syn match texmfComment "%..\+$" contains=texmfTodo syn match texmfComment "%\s*$" contains=texmfTodo syn keyword texmfTodo TODO FIXME XXX NOT contained " Constants and parameters syn match texmfPassedParameter "[-+]\=%\w\W" syn match texmfPassedParameter "[-+]\=%\w$" syn match texmfNumber "\<\d\+\>" syn match texmfVariable "\$\(\w\k*\|{\w\k*}\)" syn match texmfSpecial +\\"\|\\$+ syn region texmfString start=+"+ end=+"+ skip=+\\"\\\\+ contains=texmfVariable,texmfSpecial,texmfPassedParameter " Assignments syn match texmfLHSStart "^\s*\w\k*" nextgroup=texmfLHSDot,texmfEquals syn match texmfLHSVariable "\w\k*" contained nextgroup=texmfLHSDot,texmfEquals syn match texmfLHSDot "\." contained nextgroup=texmfLHSVariable syn match texmfEquals "\s*=" contained " Specialities syn match texmfComma "," contained syn match texmfColons ":\|;" syn match texmfDoubleExclam "!!" contained " Catch errors caused by wrong parenthesization syn region texmfBrace matchgroup=texmfBraceBrace start="{" end="}" contains=ALLBUT,texmfTodo,texmfBraceError,texmfLHSVariable,texmfLHSDot transparent syn match texmfBraceError "}" " Define the default highlighting hi def link texmfComment Comment hi def link texmfTodo Todo hi def link texmfPassedParameter texmfVariable hi def link texmfVariable Identifier hi def link texmfNumber Number hi def link texmfString String hi def link texmfLHSStart texmfLHS hi def link texmfLHSVariable texmfLHS hi def link texmfLHSDot texmfLHS hi def link texmfLHS Type hi def link texmfEquals Normal hi def link texmfBraceBrace texmfDelimiter hi def link texmfComma texmfDelimiter hi def link texmfColons texmfDelimiter hi def link texmfDelimiter Preproc hi def link texmfDoubleExclam Statement hi def link texmfSpecial Special hi def link texmfBraceError texmfError hi def link texmfError Error let b:current_syntax = "texmf" neovim-0.2.2/runtime/syntax/tf.vim000066400000000000000000000153701320401574200171530ustar00rootroot00000000000000" Vim syntax file " Language: tf " Maintainer: Lutz Eymers " URL: http://www.isp.de/data/tf.vim " Email: send syntax_vim.tgz " Last Change: 2001 May 10 " " Options lite_minlines = x to sync at least x lines backwards " Remove any old syntax stuff hanging around " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match if !exists("main_syntax") let main_syntax = 'tf' endif " Special global variables syn keyword tfVar HOME LANG MAIL SHELL TERM TFHELP TFLIBDIR TFLIBRARY TZ contained syn keyword tfVar background backslash contained syn keyword tfVar bamf bg_output borg clearfull cleardone clock connect contained syn keyword tfVar emulation end_color gag gethostbyname gpri hook hilite contained syn keyword tfVar hiliteattr histsize hpri insert isize istrip kecho contained syn keyword tfVar kprefix login lp lpquote maildelay matching max_iter contained syn keyword tfVar max_recur mecho more mprefix oldslash promt_sec contained syn keyword tfVar prompt_usec proxy_host proxy_port ptime qecho qprefix contained syn keyword tfVar quite quitdone redef refreshtime scroll shpause snarf sockmload contained syn keyword tfVar start_color tabsize telopt sub time_format visual contained syn keyword tfVar watch_dog watchname wordpunct wrap wraplog wrapsize contained syn keyword tfVar wrapspace contained " Worldvar syn keyword tfWorld world_name world_character world_password world_host contained syn keyword tfWorld world_port world_mfile world_type contained " Number syn match tfNumber "-\=\<\d\+\>" " Float syn match tfFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" " Operator syn match tfOperator "[-+=?:&|!]" syn match tfOperator "/[^*~@]"he=e-1 syn match tfOperator ":=" syn match tfOperator "[^/%]\*"hs=s+1 syn match tfOperator "$\+[([{]"he=e-1,me=e-1 syn match tfOperator "\^\[\+"he=s+1 contains=tfSpecialCharEsc " Relational syn match tfRelation "&&" syn match tfRelation "||" syn match tfRelation "[<>/!=]=" syn match tfRelation "[<>]" syn match tfRelation "[!=]\~" syn match tfRelation "[=!]/" " Readonly Var syn match tfReadonly "[#*]" contained syn match tfReadonly "\<-\=L\=\d\{-}\>" contained syn match tfReadonly "\" contained syn match tfReadonly "\" contained " Identifier syn match tfIdentifier "%\+[a-zA-Z_#*-0-9]\w*" contains=tfVar,tfReadonly syn match tfIdentifier "%\+[{]"he=e-1,me=e-1 syn match tfIdentifier "\$\+{[a-zA-Z_#*-0-9]\w*}" contains=tfWorld " Function names syn keyword tfFunctions ascii char columns echo filename ftime fwrite getopts syn keyword tfFunctions getpid idle kbdel kbgoto kbhead kblen kbmatch kbpoint syn keyword tfFunctions kbtail kbwordleft kbwordright keycode lines mod syn keyword tfFunctions moresize pad rand read regmatch send strcat strchr syn keyword tfFunctions strcmp strlen strncmp strrchr strrep strstr substr syn keyword tfFunctions systype time tolower toupper syn keyword tfStatement addworld bamf beep bind break cat changes connect contained syn keyword tfStatement dc def dokey echo edit escape eval export expr fg for contained syn keyword tfStatement gag getfile grab help hilite histsize hook if input contained syn keyword tfStatement kill lcd let list listsockets listworlds load contained syn keyword tfStatement localecho log nohilite not partial paste ps purge contained syn keyword tfStatement purgeworld putfile quit quote recall recordline save contained syn keyword tfStatement saveworld send sh shift sub substitute contained syn keyword tfStatement suspend telnet test time toggle trig trigger unbind contained syn keyword tfStatement undef undefn undeft unhook untrig unworld contained syn keyword tfStatement version watchdog watchname while world contained " Hooks syn keyword tfHook ACTIVITY BACKGROUND BAMF CONFAIL CONFLICT CONNECT DISCONNECT syn keyword tfHook KILL LOAD LOADFAIL LOG LOGIN MAIL MORE PENDING PENDING syn keyword tfHook PROCESS PROMPT PROXY REDEF RESIZE RESUME SEND SHADOW SHELL syn keyword tfHook SIGHUP SIGTERM SIGUSR1 SIGUSR2 WORLD " Conditional syn keyword tfConditional if endif then else elseif contained " Repeat syn keyword tfRepeat while do done repeat for contained " Statement syn keyword tfStatement break quit contained " Include syn keyword tfInclude require load save loaded contained " Define syn keyword tfDefine bind unbind def undef undefn undefn purge hook unhook trig untrig contained syn keyword tfDefine set unset setenv contained " Todo syn keyword tfTodo TODO Todo todo contained " SpecialChar syn match tfSpecialChar "\\[abcfnrtyv\\]" contained syn match tfSpecialChar "\\\d\{3}" contained contains=tfOctalError syn match tfSpecialChar "\\x[0-9a-fA-F]\{2}" contained syn match tfSpecialCharEsc "\[\+" contained syn match tfOctalError "[89]" contained " Comment syn region tfComment start="^;" end="$" contains=tfTodo " String syn region tfString oneline matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=tfIdentifier,tfSpecialChar,tfEscape syn region tfString matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tfIdentifier,tfSpecialChar,tfEscape syn match tfParentError "[)}\]]" " Parents syn region tfParent matchgroup=Delimiter start="(" end=")" contains=ALLBUT,tfReadonly syn region tfParent matchgroup=Delimiter start="\[" end="\]" contains=ALL syn region tfParent matchgroup=Delimiter start="{" end="}" contains=ALL syn match tfEndCommand "%%\{-};" syn match tfJoinLines "\\$" " Types syn match tfType "/[a-zA-Z_~@][a-zA-Z0-9_]*" contains=tfConditional,tfRepeat,tfStatement,tfInclude,tfDefine,tfStatement " Catch /quote .. ' syn match tfQuotes "/quote .\{-}'" contains=ALLBUT,tfString " Catch $(/escape ) syn match tfEscape "(/escape .*)" " sync if exists("tf_minlines") exec "syn sync minlines=" . tf_minlines else syn sync minlines=100 endif " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link tfComment Comment hi def link tfString String hi def link tfNumber Number hi def link tfFloat Float hi def link tfIdentifier Identifier hi def link tfVar Identifier hi def link tfWorld Identifier hi def link tfReadonly Identifier hi def link tfHook Identifier hi def link tfFunctions Function hi def link tfRepeat Repeat hi def link tfConditional Conditional hi def link tfLabel Label hi def link tfStatement Statement hi def link tfType Type hi def link tfInclude Include hi def link tfDefine Define hi def link tfSpecialChar SpecialChar hi def link tfSpecialCharEsc SpecialChar hi def link tfParentError Error hi def link tfTodo Todo hi def link tfEndCommand Delimiter hi def link tfJoinLines Delimiter hi def link tfOperator Operator hi def link tfRelation Operator let b:current_syntax = "tf" if main_syntax == 'tf' unlet main_syntax endif " vim: ts=8 neovim-0.2.2/runtime/syntax/tidy.vim000066400000000000000000000134471320401574200175160ustar00rootroot00000000000000" Vim syntax file " Language: HMTL Tidy configuration file (/etc/tidyrc ~/.tidyrc) " Maintainer: Doug Kearns " Last Change: 2016 Apr 24 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn iskeyword @,48-57,-,_ syn case ignore syn keyword tidyBoolean contained t[rue] f[alse] y[es] n[o] 1 0 syn keyword tidyAutoBoolean contained t[rue] f[alse] y[es] n[o] 1 0 auto syn case match syn keyword tidyDoctype contained html5 omit auto strict loose transitional user syn keyword tidyEncoding contained raw ascii latin0 latin1 utf8 iso2022 mac win1252 ibm858 utf16le utf16be utf16 big5 shiftjis syn keyword tidyNewline contained LF CRLF CR syn match tidyNumber contained "\<\d\+\>" syn keyword tidyRepeat contained keep-first keep-last syn keyword tidySorter contained alpha none syn region tidyString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline syn region tidyString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline syn match tidyTags contained "\<\w\+\(\s*,\s*\w\+\)*\>" syn keyword tidyBooleanOption add-xml-decl add-xml-pi add-xml-space \ anchor-as-name ascii-chars assume-xml-procins bare break-before-br \ clean coerce-endtags decorate-inferred-ul drop-empty-paras \ drop-empty-elements drop-font-tags drop-proprietary-attributes \ enclose-block-text enclose-text escape-cdata escape-scripts \ fix-backslash fix-bad-comments fix-uri force-output gdoc gnu-emacs \ hide-comments hide-endtags indent-attributes indent-cdata \ indent-with-tabs input-xml join-classes join-styles keep-time \ language literal-attributes logical-emphasis lower-literals markup \ merge-emphasis ncr numeric-entities omit-optional-tags output-html \ output-xhtml output-xml preserve-entities punctuation-wrap quiet \ quote-ampersand quote-marks quote-nbsp raw replace-color show-info \ show-warnings skip-nested split strict-tags-attributes tidy-mark \ uppercase-attributes uppercase-tags word-2000 wrap-asp \ wrap-attributes wrap-jste wrap-php wrap-script-literals \ wrap-sections write-back \ contained nextgroup=tidyBooleanDelimiter syn match tidyBooleanDelimiter ":" nextgroup=tidyBoolean contained skipwhite syn keyword tidyAutoBooleanOption indent merge-divs merge-spans output-bom show-body-only vertical-space contained nextgroup=tidyAutoBooleanDelimiter syn match tidyAutoBooleanDelimiter ":" nextgroup=tidyAutoBoolean contained skipwhite syn keyword tidyCSSSelectorOption css-prefix contained nextgroup=tidyCSSSelectorDelimiter syn match tidyCSSSelectorDelimiter ":" nextgroup=tidyCSSSelector contained skipwhite syn keyword tidyDoctypeOption doctype contained nextgroup=tidyDoctypeDelimiter syn match tidyDoctypeDelimiter ":" nextgroup=tidyDoctype contained skipwhite syn keyword tidyEncodingOption char-encoding input-encoding output-encoding contained nextgroup=tidyEncodingDelimiter syn match tidyEncodingDelimiter ":" nextgroup=tidyEncoding contained skipwhite syn keyword tidyIntegerOption accessibility-check doctype-mode indent-spaces show-errors tab-size wrap contained nextgroup=tidyIntegerDelimiter syn match tidyIntegerDelimiter ":" nextgroup=tidyNumber contained skipwhite syn keyword tidyNameOption slide-style contained nextgroup=tidyNameDelimiter syn match tidyNameDelimiter ":" nextgroup=tidyName contained skipwhite syn keyword tidyNewlineOption newline contained nextgroup=tidyNewlineDelimiter syn match tidyNewlineDelimiter ":" nextgroup=tidyNewline contained skipwhite syn keyword tidyTagsOption new-blocklevel-tags new-empty-tags new-inline-tags new-pre-tags contained nextgroup=tidyTagsDelimiter syn match tidyTagsDelimiter ":" nextgroup=tidyTags contained skipwhite syn keyword tidyRepeatOption repeated-attributes contained nextgroup=tidyRepeatDelimiter syn match tidyRepeatDelimiter ":" nextgroup=tidyRepeat contained skipwhite syn keyword tidySorterOption sort-attributes contained nextgroup=tidySorterDelimiter syn match tidySorterDelimiter ":" nextgroup=tidySorter contained skipwhite syn keyword tidyStringOption alt-text error-file gnu-emacs-file output-file contained nextgroup=tidyStringDelimiter syn match tidyStringDelimiter ":" nextgroup=tidyString contained skipwhite syn cluster tidyOptions contains=tidy.*Option syn match tidyStart "^" nextgroup=@tidyOptions syn match tidyComment "^\s*//.*$" contains=tidyTodo syn match tidyComment "^\s*#.*$" contains=tidyTodo syn keyword tidyTodo TODO NOTE FIXME XXX contained hi def link tidyAutoBooleanOption Identifier hi def link tidyBooleanOption Identifier hi def link tidyCSSSelectorOption Identifier hi def link tidyDoctypeOption Identifier hi def link tidyEncodingOption Identifier hi def link tidyIntegerOption Identifier hi def link tidyNameOption Identifier hi def link tidyNewlineOption Identifier hi def link tidyTagsOption Identifier hi def link tidyRepeatOption Identifier hi def link tidySorterOption Identifier hi def link tidyStringOption Identifier hi def link tidyAutoBooleanDelimiter Special hi def link tidyBooleanDelimiter Special hi def link tidyCSSSelectorDelimiter Special hi def link tidyDoctypeDelimiter Special hi def link tidyEncodingDelimiter Special hi def link tidyIntegerDelimiter Special hi def link tidyNameDelimiter Special hi def link tidyNewlineDelimiter Special hi def link tidyTagsDelimiter Special hi def link tidyRepeatDelimiter Special hi def link tidySorterDelimiter Special hi def link tidyStringDelimiter Special hi def link tidyAutoBoolean Boolean hi def link tidyBoolean Boolean hi def link tidyDoctype Constant hi def link tidyEncoding Constant hi def link tidyNewline Constant hi def link tidyTags Constant hi def link tidyNumber Number hi def link tidyRepeat Constant hi def link tidySorter Constant hi def link tidyString String hi def link tidyComment Comment hi def link tidyTodo Todo let b:current_syntax = "tidy" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/tilde.vim000066400000000000000000000030021320401574200176300ustar00rootroot00000000000000" Vim syntax file " This file works only for Vim6.x " Language: Tilde " Maintainer: Tobias Rundstrm " URL: http://www.tildesoftware.net " CVS: $Id: tilde.vim,v 1.1 2004/06/13 19:31:51 vimboss Exp $ if exists("b:current_syntax") finish endif "tilde dosent care ... syn case ignore syn match tildeFunction "\~[a-z_0-9]\+"ms=s+1 syn region tildeParen start="(" end=")" contains=tildeString,tildeNumber,tildeVariable,tildeField,tildeSymtab,tildeFunction,tildeParen,tildeHexNumber,tildeOperator syn region tildeString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ keepend syn region tildeString contained start=+'+ skip=+\\\\\|\\"+ end=+'+ keepend syn match tildeNumber "\d" contained syn match tildeOperator "or\|and" contained syn match tildeHexNumber "0x[a-z0-9]\+" contained syn match tildeVariable "$[a-z_0-9]\+" contained syn match tildeField "%[a-z_0-9]\+" contained syn match tildeSymtab "@[a-z_0-9]\+" contained syn match tildeComment "^#.*" syn region tildeCurly start=+{+ end=+}+ contained contains=tildeLG,tildeString,tildeNumber,tildeVariable,tildeField,tildeFunction,tildeSymtab,tildeHexNumber syn match tildeLG "=>" contained hi def link tildeComment Comment hi def link tildeFunction Operator hi def link tildeOperator Operator hi def link tildeString String hi def link tildeNumber Number hi def link tildeHexNumber Number hi def link tildeVariable Identifier hi def link tildeField Identifier hi def link tildeSymtab Identifier hi def link tildeError Error let b:current_syntax = "tilde" neovim-0.2.2/runtime/syntax/tli.vim000066400000000000000000000031721320401574200173270ustar00rootroot00000000000000" Vim syntax file " Language: TealInfo source files (*.tli) " Maintainer: Kurt W. Andrews " Last Change: 2001 May 10 " Version: 1.0 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " TealInfo Objects syn keyword tliObject LIST POPLIST WINDOW POPWINDOW OUTLINE CHECKMARK GOTO syn keyword tliObject LABEL IMAGE RECT TRES PASSWORD POPEDIT POPIMAGE CHECKLIST " TealInfo Fields syn keyword tliField X Y W H BX BY BW BH SX SY FONT BFONT CYCLE DELAY TABS syn keyword tliField STYLE BTEXT RECORD DATABASE KEY TARGET DEFAULT TEXT syn keyword tliField LINKS MAXVAL " TealInfo Styles syn keyword tliStyle INVERTED HORIZ_RULE VERT_RULE NO_SCROLL NO_BORDER BOLD_BORDER syn keyword tliStyle ROUND_BORDER ALIGN_RIGHT ALIGN_CENTER ALIGN_LEFT_START ALIGN_RIGHT_START syn keyword tliStyle ALIGN_CENTER_START ALIGN_LEFT_END ALIGN_RIGHT_END ALIGN_CENTER_END syn keyword tliStyle LOCKOUT BUTTON_SCROLL BUTTON_SELECT STROKE_FIND FILLED REGISTER " String and Character constants syn match tliSpecial "@" syn region tliString start=+"+ end=+"+ "TealInfo Numbers, identifiers and comments syn case ignore syn match tliNumber "\d*" syn match tliIdentifier "\<\h\w*\>" syn match tliComment "#.*" syn case match " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link tliNumber Number hi def link tliString String hi def link tliComment Comment hi def link tliSpecial SpecialChar hi def link tliIdentifier Identifier hi def link tliObject Statement hi def link tliField Type hi def link tliStyle PreProc let b:current_syntax = "tli" " vim: ts=8 neovim-0.2.2/runtime/syntax/tmux.vim000066400000000000000000000144151320401574200175360ustar00rootroot00000000000000" Language: tmux(1) configuration file " Version: 2.3 (git-14dc2ac) " URL: https://github.com/ericpruitt/tmux.vim/ " Maintainer: Eric Pruitt " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause) if exists("b:current_syntax") finish endif " Explicitly change compatiblity options to Vim's defaults because this file " uses line continuations. let s:original_cpo = &cpo set cpo&vim let b:current_syntax = "tmux" setlocal iskeyword+=- syntax case match syn keyword tmuxAction none any current other syn keyword tmuxBoolean off on syn keyword tmuxTodo FIXME NOTE TODO XXX contained syn match tmuxColour /\ 231 && s:i < 235)) ? 15 : "none" exec "syn match tmuxColour" . s:i . " /\\/ display" \ " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg endfor syn keyword tmuxOptions \ buffer-limit command-alias default-terminal escape-time exit-unattached \ focus-events history-file message-limit set-clipboard terminal-overrides \ assume-paste-time base-index bell-action bell-on-alert default-command \ default-shell destroy-unattached detach-on-destroy \ display-panes-active-colour display-panes-colour display-panes-time \ display-time history-limit key-table lock-after-time lock-command \ message-attr message-bg message-command-attr message-command-bg \ message-command-fg message-command-style message-fg message-style mouse \ prefix prefix2 renumber-windows repeat-time set-titles set-titles-string \ status status-attr status-bg status-fg status-interval status-justify \ status-keys status-left status-left-attr status-left-bg status-left-fg \ status-left-length status-left-style status-position status-right \ status-right-attr status-right-bg status-right-fg status-right-length \ status-right-style status-style update-environment visual-activity \ visual-bell visual-silence word-separators aggressive-resize allow-rename \ alternate-screen automatic-rename automatic-rename-format \ clock-mode-colour clock-mode-style force-height force-width \ main-pane-height main-pane-width mode-attr mode-bg mode-fg mode-keys \ mode-style monitor-activity monitor-silence other-pane-height \ other-pane-width pane-active-border-bg pane-active-border-fg \ pane-active-border-style pane-base-index pane-border-bg pane-border-fg \ pane-border-format pane-border-status pane-border-style remain-on-exit \ synchronize-panes window-active-style window-style \ window-status-activity-attr window-status-activity-bg \ window-status-activity-fg window-status-activity-style window-status-attr \ window-status-bell-attr window-status-bell-bg window-status-bell-fg \ window-status-bell-style window-status-bg window-status-current-attr \ window-status-current-bg window-status-current-fg \ window-status-current-format window-status-current-style window-status-fg \ window-status-format window-status-last-attr window-status-last-bg \ window-status-last-fg window-status-last-style window-status-separator \ window-status-style wrap-search xterm-keys syn keyword tmuxCommands \ attach-session attach bind-key bind break-pane breakp capture-pane \ capturep clear-history clearhist choose-buffer choose-client choose-tree \ choose-session choose-window command-prompt confirm-before confirm \ copy-mode clock-mode detach-client detach suspend-client suspendc \ display-message display display-panes displayp find-window findw if-shell \ if join-pane joinp move-pane movep kill-pane killp kill-server \ start-server start kill-session kill-window killw unlink-window unlinkw \ list-buffers lsb list-clients lsc list-keys lsk list-commands lscm \ list-panes lsp list-sessions ls list-windows lsw load-buffer loadb \ lock-server lock lock-session locks lock-client lockc move-window movew \ link-window linkw new-session new has-session has new-window neww \ paste-buffer pasteb pipe-pane pipep refresh-client refresh rename-session \ rename rename-window renamew resize-pane resizep respawn-pane respawnp \ respawn-window respawnw rotate-window rotatew run-shell run save-buffer \ saveb show-buffer showb select-layout selectl next-layout nextl \ previous-layout prevl select-pane selectp last-pane lastp select-window \ selectw next-window next previous-window prev last-window last send-keys \ send send-prefix set-buffer setb delete-buffer deleteb set-environment \ setenv set-hook show-hooks set-option set set-window-option setw \ show-environment showenv show-messages showmsgs show-options show \ show-window-options showw source-file source split-window splitw swap-pane \ swapp swap-window swapw switch-client switchc unbind-key unbind wait-for \ wait let &cpo = s:original_cpo unlet! s:original_cpo s:bg s:i neovim-0.2.2/runtime/syntax/tpp.vim000066400000000000000000000066311320401574200173450ustar00rootroot00000000000000" Vim syntax file " Language: tpp - Text Presentation Program " Maintainer: Debian Vim Maintainers " Former Maintainer: Gerfried Fuchs " Last Change: 2007-10-14 " URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/tpp.vim;hb=debian " Filenames: *.tpp " License: BSD " " XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain " it only because patches have been submitted for it by Debian users and the " former maintainer was MIA (Missing In Action), taking over its " maintenance was thus the only way to include those patches. " If you care about this file, and have time to maintain it please do so! " " Comments are very welcome - but please make sure that you are commenting on " the latest version of this file. " SPAM is _NOT_ welcome - be ready to be reported! " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'tpp' endif "" list of the legal switches/options syn match tppAbstractOptionKey contained "^--\%(author\|title\|date\|footer\) *" nextgroup=tppString syn match tppPageLocalOptionKey contained "^--\%(heading\|center\|right\|huge\|sethugefont\|exec\) *" nextgroup=tppString syn match tppPageLocalSwitchKey contained "^--\%(horline\|-\|\%(begin\|end\)\%(\%(shell\)\?output\|slide\%(left\|right\|top\|bottom\)\)\|\%(bold\|rev\|ul\)\%(on\|off\)\|withborder\)" syn match tppNewPageOptionKey contained "^--newpage *" nextgroup=tppString syn match tppColorOptionKey contained "^--\%(\%(bg\|fg\)\?color\) *" syn match tppTimeOptionKey contained "^--sleep *" syn match tppString contained ".*" syn match tppColor contained "\%(white\|yellow\|red\|green\|blue\|cyan\|magenta\|black\|default\)" syn match tppTime contained "\d\+" syn region tppPageLocalSwitch start="^--" end="$" contains=tppPageLocalSwitchKey oneline syn region tppColorOption start="^--\%(\%(bg\|fg\)\?color\)" end="$" contains=tppColorOptionKey,tppColor oneline syn region tppTimeOption start="^--sleep" end="$" contains=tppTimeOptionKey,tppTime oneline syn region tppNewPageOption start="^--newpage" end="$" contains=tppNewPageOptionKey oneline syn region tppPageLocalOption start="^--\%(heading\|center\|right\|huge\|sethugefont\|exec\)" end="$" contains=tppPageLocalOptionKey oneline syn region tppAbstractOption start="^--\%(author\|title\|date\|footer\)" end="$" contains=tppAbstractOptionKey oneline if main_syntax != 'sh' " shell command syn include @tppShExec syntax/sh.vim unlet b:current_syntax syn region shExec matchgroup=tppPageLocalOptionKey start='^--exec *' keepend end='$' contains=@tppShExec endif syn match tppComment "^--##.*$" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link tppAbstractOptionKey Special hi def link tppPageLocalOptionKey Keyword hi def link tppPageLocalSwitchKey Keyword hi def link tppColorOptionKey Keyword hi def link tppTimeOptionKey Comment hi def link tppNewPageOptionKey PreProc hi def link tppString String hi def link tppColor String hi def link tppTime Number hi def link tppComment Comment hi def link tppAbstractOption Error hi def link tppPageLocalOption Error hi def link tppPageLocalSwitch Error hi def link tppColorOption Error hi def link tppNewPageOption Error hi def link tppTimeOption Error let b:current_syntax = "tpp" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/trasys.vim000066400000000000000000000116511320401574200200650ustar00rootroot00000000000000" Vim syntax file " Language: TRASYS input file " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.inp " URL: http://www.naglenet.org/vim/syntax/trasys.vim " MAIN URL: http://www.naglenet.org/vim/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Force free-form fortran format let fortran_free_source=1 " Load FORTRAN syntax file runtime! syntax/fortran.vim unlet b:current_syntax " Ignore case syn case ignore " Define keywords for TRASYS syn keyword trasysOptions model rsrec info maxfl nogo dmpdoc syn keyword trasysOptions rsi rti rso rto bcdou cmerg emerg syn keyword trasysOptions user1 nnmin erplot syn keyword trasysSurface icsn tx ty tz rotx roty rotz inc bcsn syn keyword trasysSurface nnx nny nnz nnax nnr nnth unnx syn keyword trasysSurface unny unnz unnax unnr unnth type idupsf syn keyword trasysSurface imagsf act active com shade bshade axmin syn keyword trasysSurface axmax zmin zmax rmin rmax thmin thmin syn keyword trasysSurface thmax alpha emiss trani trans spri sprs syn keyword trasysSurface refno posit com dupbcs dimensions syn keyword trasysSurface dimension position prop surfn syn keyword trasysSurfaceType rect trap disk cyl cone sphere parab syn keyword trasysSurfaceType box5 box6 shpero tor ogiv elem tape poly syn keyword trasysSurfaceArgs ff di top bottom in out both no only syn keyword trasysArgs fig smn nodea zero only ir sol syn keyword trasysArgs both wband stepn initl syn keyword trasysOperations orbgen build "syn keyword trasysSubRoutine call syn keyword trasysSubRoutine chgblk ndata ndatas odata odatas syn keyword trasysSubRoutine pldta ffdata cmdata adsurf rbdata syn keyword trasysSubRoutine rtdata pffshd orbit1 orbit2 orient syn keyword trasysSubRoutine didt1 didt1s didt2 didt2s spin syn keyword trasysSubRoutine spinav dicomp distab drdata gbdata syn keyword trasysSubRoutine gbaprx rkdata rcdata aqdata stfaq syn keyword trasysSubRoutine qodata qoinit modar modpr modtr syn keyword trasysSubRoutine modprs modshd moddat rstoff rston syn keyword trasysSubRoutine rsmerg ffread diread ffusr1 diusr1 syn keyword trasysSubRoutine surfp didt3 didt3s romain stfrc syn keyword trasysSubRoutine rornt rocstr romove flxdata title syn keyword trassyPrcsrSegm nplot oplot plot cmcal ffcal rbcal syn keyword trassyPrcsrSegm rtcal dical drcal sfcal gbcal rccal syn keyword trassyPrcsrSegm rkcal aqcal qocal " Define matches for TRASYS syn match trasysOptions "list source" syn match trasysOptions "save source" syn match trasysOptions "no print" "syn match trasysSurface "^K *.* [^$]" "syn match trasysSurface "^D *[0-9]*\.[0-9]\+" "syn match trasysSurface "^I *.*[0-9]\+\.\=" "syn match trasysSurface "^N *[0-9]\+" "syn match trasysSurface "^M *[a-z[A-Z0-9]\+" "syn match trasysSurface "^B[C][S] *[a-zA-Z0-9]*" "syn match trasysSurface "^S *SURFN.*[0-9]" syn match trasysSurface "P[0-9]* *="he=e-1 syn match trasysIdentifier "^L "he=e-1 syn match trasysIdentifier "^K "he=e-1 syn match trasysIdentifier "^D "he=e-1 syn match trasysIdentifier "^I "he=e-1 syn match trasysIdentifier "^N "he=e-1 syn match trasysIdentifier "^M "he=e-1 syn match trasysIdentifier "^B[C][S]" syn match trasysIdentifier "^S "he=e-1 syn match trasysComment "^C.*$" syn match trasysComment "^R.*$" syn match trasysComment "\$.*$" syn match trasysHeader "^header[^,]*" syn match trasysMacro "^FAC" syn match trasysInteger "-\=\<[0-9]*\>" syn match trasysFloat "-\=\<[0-9]*\.[0-9]*" syn match trasysScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" syn match trasysBlank "' \+'"hs=s+1,he=e-1 syn match trasysEndData "^END OF DATA" if exists("thermal_todo") execute 'syn match trasysTodo ' . '"^'.thermal_todo.'.*$"' else syn match trasysTodo "^?.*$" endif " Define regions for TRASYS syn region trasysComment matchgroup=trasysHeader start="^HEADER DOCUMENTATION DATA" end="^HEADER[^,]*" " Define synchronizing patterns for TRASYS syn sync maxlines=500 syn sync match trasysSync grouphere trasysComment "^HEADER DOCUMENTATION DATA" " Define the default highlighting " Only when an item doesn't have highlighting yet hi def link trasysOptions Special hi def link trasysSurface Special hi def link trasysSurfaceType Constant hi def link trasysSurfaceArgs Constant hi def link trasysArgs Constant hi def link trasysOperations Statement hi def link trasysSubRoutine Statement hi def link trassyPrcsrSegm PreProc hi def link trasysIdentifier Identifier hi def link trasysComment Comment hi def link trasysHeader Typedef hi def link trasysMacro Macro hi def link trasysInteger Number hi def link trasysFloat Float hi def link trasysScientific Float hi def link trasysBlank SpecialChar hi def link trasysEndData Macro hi def link trasysTodo Todo let b:current_syntax = "trasys" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/treetop.vim000066400000000000000000000071241320401574200202220ustar00rootroot00000000000000" Vim syntax file " Language: Treetop " Previous Maintainer: Nikolai Weibull " Latest Revision: 2011-03-14 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword treetopTodo \ contained \ TODO \ FIXME \ XXX \ NOTE syn match treetopComment \ '#.*' \ display \ contains=treetopTodo syn include @treetopRuby syntax/ruby.vim unlet b:current_syntax syn keyword treetopKeyword \ require \ end syn region treetopKeyword \ matchgroup=treetopKeyword \ start='\<\%(grammar\|include\|module\)\>\ze\s' \ end='$' \ transparent \ oneline \ keepend \ contains=@treetopRuby syn keyword treetopKeyword \ rule \ nextgroup=treetopRuleName \ skipwhite skipnl syn match treetopGrammarName \ '\u\w*' \ contained syn match treetopRubyModuleName \ '\u\w*' \ contained syn match treetopRuleName \ '\h\w*' \ contained syn region treetopString \ matchgroup=treetopStringDelimiter \ start=+"+ \ end=+"+ syn region treetopString \ matchgroup=treetopStringDelimiter \ start=+'+ \ end=+'+ syn region treetopCharacterClass \ matchgroup=treetopCharacterClassDelimiter \ start=+\[+ \ skip=+\\\]+ \ end=+\]+ syn region treetopRubyBlock \ matchgroup=treetopRubyBlockDelimiter \ start=+{+ \ end=+}+ \ contains=@treetopRuby syn region treetopSemanticPredicate \ matchgroup=treetopSemanticPredicateDelimiter \ start=+[!&]{+ \ end=+}+ \ contains=@treetopRuby syn region treetopSubclassDeclaration \ matchgroup=treetopSubclassDeclarationDelimiter \ start=+<+ \ end=+>+ \ contains=@treetopRuby syn match treetopEllipsis \ +''+ hi def link treetopTodo Todo hi def link treetopComment Comment hi def link treetopKeyword Keyword hi def link treetopGrammarName Constant hi def link treetopRubyModuleName Constant hi def link treetopRuleName Identifier hi def link treetopString String hi def link treetopStringDelimiter treetopString hi def link treetopCharacterClass treetopString hi def link treetopCharacterClassDelimiter treetopCharacterClass hi def link treetopRubyBlockDelimiter PreProc hi def link treetopSemanticPredicateDelimiter PreProc hi def link treetopSubclassDeclarationDelimiter PreProc hi def link treetopEllipsis Special let b:current_syntax = 'treetop' let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/trustees.vim000066400000000000000000000030121320401574200204060ustar00rootroot00000000000000" Vim syntax file " Language: trustees " Maintainer: Nima Talebi " Last Change: 2005-10-12 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syntax case match syntax sync minlines=0 maxlines=0 " Errors & Comments syntax match tfsError /.*/ highlight link tfsError Error syntax keyword tfsSpecialComment TODO XXX FIXME contained highlight link tfsSpecialComment Todo syntax match tfsComment ~\s*#.*~ contains=tfsSpecialComment highlight link tfsComment Comment " Operators & Delimiters highlight link tfsSpecialChar Operator syntax match tfsSpecialChar ~[*!+]~ contained highlight link tfsDelimiter Delimiter syntax match tfsDelimiter ~:~ contained " Trustees Rules - Part 1 of 3 - The Device syntax region tfsRuleDevice matchgroup=tfsDeviceContainer start=~\[/~ end=~\]~ nextgroup=tfsRulePath oneline highlight link tfsRuleDevice Label highlight link tfsDeviceContainer PreProc " Trustees Rules - Part 2 of 3 - The Path syntax match tfsRulePath ~/[-_a-zA-Z0-9/]*~ nextgroup=tfsRuleACL contained contains=tfsDelimiter highlight link tfsRulePath String " Trustees Rules - Part 3 of 3 - The ACLs syntax match tfsRuleACL ~\(:\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\):[RWEBXODCU!]\+\)\+$~ contained contains=tfsDelimiter,tfsRuleWho,tfsRuleWhat syntax match tfsRuleWho ~\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\)~ contained contains=tfsSpecialChar highlight link tfsRuleWho Identifier syntax match tfsRuleWhat ~[RWEBXODCU!]\+~ contained contains=tfsSpecialChar highlight link tfsRuleWhat Structure neovim-0.2.2/runtime/syntax/tsalt.vim000066400000000000000000000202051320401574200176620ustar00rootroot00000000000000" Vim syntax file " Language: Telix (Modem Comm Program) SALT Script " Maintainer: Sean M. McKee " Last Change: 2012 Feb 03 by Thilo Six " Version Info: @(#)tsalt.vim 1.5 97/12/16 08:11:15 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " turn case matching off syn case ignore "FUNCTIONS " Character Handling Functions syn keyword tsaltFunction IsAscii IsAlNum IsAlpha IsCntrl IsDigit syn keyword tsaltFunction IsLower IsUpper ToLower ToUpper " Connect Device Operations syn keyword tsaltFunction Carrier cInp_Cnt cGetC cGetCT cPutC cPutN syn keyword tsaltFunction cPutS cPutS_TR FlushBuf Get_Baud syn keyword tsaltFunction Get_DataB Get_Port Get_StopB Hangup syn keyword tsaltFunction KillConnectDevice MakeConnectDevice syn keyword tsaltFunction Send_Brk Set_ConnectDevice Set_Port " File Input/Output Operations syn keyword tsaltFunction fClearErr fClose fDelete fError fEOF fFlush syn keyword tsaltFunction fGetC fGetS FileAttr FileFind FileSize syn keyword tsaltFunction FileTime fnStrip fOpen fPutC fPutS fRead syn keyword tsaltFunction fRename fSeek fTell fWrite " File Transfers and Logs syn keyword tsaltFunction Capture Capture_Stat Printer Receive Send syn keyword tsaltFunction Set_DefProt UsageLog Usage_Stat UStamp " Input String Matching syn keyword tsaltFunction Track Track_AddChr Track_Free Track_Hit syn keyword tsaltFunction WaitFor " Keyboard Operations syn keyword tsaltFunction InKey InKeyW KeyGet KeyLoad KeySave KeySet " Miscellaneous Functions syn keyword tsaltFunction ChatMode Dos Dial DosFunction ExitTelix syn keyword tsaltFunction GetEnv GetFon HelpScreen LoadFon NewDir syn keyword tsaltFunction Randon Redial RedirectDOS Run syn keyword tsaltFunction Set_Terminal Show_Directory TelixVersion syn keyword tsaltFunction Terminal TransTab Update_Term " Script Management syn keyword tsaltFunction ArgCount Call CallD CompileScript GetRunPath syn keyword tsaltFunction Is_Loaded Load_Scr ScriptVersion syn keyword tsaltFunction TelixForWindows Unload_Scr " Sound Functions syn keyword tsaltFunction Alarm PlayWave Tone " String Handling syn keyword tsaltFunction CopyChrs CopyStr DelChrs GetS GetSXY syn keyword tsaltFunction InputBox InsChrs ItoS SetChr StoI StrCat syn keyword tsaltFunction StrChr StrCompI StrLen StrLower StrMaxLen syn keyword tsaltFunction StrPos StrPosI StrUpper SubChr SubChrs syn keyword tsaltFunction SubStr " Time, Date, and Timer Operations syn keyword tsaltFunction CurTime Date Delay Delay_Scr Get_OnlineTime syn keyword tsaltFunction tDay tHour tMin tMonth tSec tYear Time syn keyword tsaltFunction Time_Up Timer_Free Time_Restart syn keyword tsaltFunction Time_Start Time_Total " Video Operations syn keyword tsaltFunction Box CNewLine Cursor_OnOff Clear_Scr syn keyword tsaltFunction GetTermHeight GetTermWidth GetX GetY syn keyword tsaltFunction GotoXY MsgBox NewLine PrintC PrintC_Trm syn keyword tsaltFunction PrintN PrintN_Trm PrintS PrintS_Trm syn keyword tsaltFunction PrintSC PRintSC_Trm syn keyword tsaltFunction PStrA PStrAXY Scroll Status_Wind vGetChr syn keyword tsaltFunction vGetChrs vGetChrsA vPutChr vPutChrs syn keyword tsaltFunction vPutChrsA vRstrArea vSaveArea " Dynamic Data Exchange (DDE) Operations syn keyword tsaltFunction DDEExecute DDEInitate DDEPoke DDERequest syn keyword tsaltFunction DDETerminate DDETerminateAll "END FUNCTIONS "PREDEFINED VARAIABLES syn keyword tsaltSysVar _add_lf _alarm_on _answerback_str _asc_rcrtrans syn keyword tsaltSysVar _asc_remabort _asc_rlftrans _asc_scpacing syn keyword tsaltSysVar _asc_scrtrans _asc_secho _asc_slpacing syn keyword tsaltSysVar _asc_spacechr _asc_striph _back_color syn keyword tsaltSysVar _capture_fname _connect_str _dest_bs syn keyword tsaltSysVar _dial_pause _dial_time _dial_post syn keyword tsaltSysVar _dial_pref1 _dial_pref2 _dial_pref3 syn keyword tsaltSysVar _dial_pref4 _dir_prog _down_dir syn keyword tsaltSysVar _entry_bbstype _entry_comment _entry_enum syn keyword tsaltSysVar _entry_name _entry_num _entry_logonname syn keyword tsaltSysVar _entry_pass _fore_color _image_file syn keyword tsaltSysVar _local_echo _mdm_hang_str _mdm_init_str syn keyword tsaltSysVar _no_connect1 _no_connect2 _no_connect3 syn keyword tsaltSysVar _no_connect4 _no_connect5 _redial_stop syn keyword tsaltSysVar _scr_chk_key _script_dir _sound_on syn keyword tsaltSysVar _strip_high _swap_bs _telix_dir _up_dir syn keyword tsaltSysVar _usage_fname _zmodauto _zmod_rcrash syn keyword tsaltSysVar _zmod_scrash "END PREDEFINED VARAIABLES "TYPE syn keyword tsaltType str int "END TYPE "KEYWORDS syn keyword tsaltStatement goto break return continue syn keyword tsaltConditional if then else syn keyword tsaltRepeat while for do "END KEYWORDS syn keyword tsaltTodo contained TODO " the rest is pretty close to C ----------------------------------------- " String and Character constants " Highlight special characters (those which have a backslash) differently syn match tsaltSpecial contained "\^\d\d\d\|\^." syn region tsaltString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tsaltSpecial syn match tsaltCharacter "'[^\\]'" syn match tsaltSpecialCharacter "'\\.'" "catch errors caused by wrong parenthesis syn region tsaltParen transparent start='(' end=')' contains=ALLBUT,tsaltParenError,tsaltIncluded,tsaltSpecial,tsaltTodo syn match tsaltParenError ")" syn match tsaltInParen contained "[{}]" hi link tsaltParenError tsaltError hi link tsaltInParen tsaltError "integer number, or floating point number without a dot and with "f". syn match tsaltNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" "floating point number, with dot, optional exponent syn match tsaltFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, starting with a dot, optional exponent syn match tsaltFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match tsaltFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" "hex number syn match tsaltNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" "syn match cIdentifier "\<[a-z_][a-z0-9_]*\>" syn region tsaltComment start="/\*" end="\*/" contains=cTodo syn match tsaltComment "//.*" contains=cTodo syn match tsaltCommentError "\*/" syn region tsaltPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=tsaltComment,tsaltString,tsaltCharacter,tsaltNumber,tsaltCommentError syn region tsaltIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match tsaltIncluded contained "<[^>]*>" syn match tsaltInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=tsaltIncluded "syn match TelixSalyLineSkip "\\$" syn region tsaltDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,tsaltPreCondit,tsaltIncluded,tsaltInclude,tsaltDefine,tsaltInParen syn region tsaltPreProc start="^[ \t]*#[ \t]*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,tsaltPreCondit,tsaltIncluded,tsaltInclude,tsaltDefine,tsaltInParen " Highlight User Labels syn region tsaltMulti transparent start='?' end=':' contains=ALLBUT,tsaltIncluded,tsaltSpecial,tsaltTodo syn sync ccomment tsaltComment " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link tsaltFunction Statement hi def link tsaltSysVar Type "hi def link tsaltLibFunc UserDefFunc "hi def link tsaltConstants Type "hi def link tsaltFuncArg Type "hi def link tsaltOperator Operator "hi def link tsaltLabel Label "hi def link tsaltUserLabel Label hi def link tsaltConditional Conditional hi def link tsaltRepeat Repeat hi def link tsaltCharacter SpecialChar hi def link tsaltSpecialCharacter SpecialChar hi def link tsaltNumber Number hi def link tsaltFloat Float hi def link tsaltCommentError tsaltError hi def link tsaltInclude Include hi def link tsaltPreProc PreProc hi def link tsaltDefine Macro hi def link tsaltIncluded tsaltString hi def link tsaltError Error hi def link tsaltStatement Statement hi def link tsaltPreCondit PreCondit hi def link tsaltType Type hi def link tsaltString String hi def link tsaltComment Comment hi def link tsaltSpecial Special hi def link tsaltTodo Todo let b:current_syntax = "tsalt" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/tsscl.vim000066400000000000000000000120001320401574200176550ustar00rootroot00000000000000" Vim syntax file " Language: TSS (Thermal Synthesizer System) Command Line " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.tsscl " URL: http://www.naglenet.org/vim/syntax/tsscl.vim " MAIN URL: http://www.naglenet.org/vim/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Ignore case syn case ignore " " " Begin syntax definitions for tss geomtery file. " " Load TSS geometry syntax file "source $VIM/myvim/tssgm.vim "source $VIMRUNTIME/syntax/c.vim " Define keywords for TSS syn keyword tssclCommand begin radk list heatrates attr draw syn keyword tssclKeyword cells rays error nodes levels objects cpu syn keyword tssclKeyword units length positions energy time unit solar syn keyword tssclKeyword solar_constant albedo planet_power syn keyword tssclEnd exit syn keyword tssclUnits cm feet meters inches syn keyword tssclUnits Celsius Kelvin Fahrenheit Rankine " Define matches for TSS syn match tssclString /"[^"]\+"/ contains=ALLBUT,tssInteger,tssclKeyword,tssclCommand,tssclEnd,tssclUnits syn match tssclComment "#.*$" " rational and logical operators " < Less than " > Greater than " <= Less than or equal " >= Greater than or equal " == or = Equal to " != Not equal to " && or & Logical AND " || or | Logical OR " ! Logical NOT " " algebraic operators: " ^ or ** Exponentation " * Multiplication " / Division " % Remainder " + Addition " - Subtraction " syn match tssclOper "||\||\|&&\|&\|!=\|!\|>=\|<=\|>\|<\|+\|-\|^\|\*\*\|\*\|/\|%\|==\|=\|\." skipwhite " CLI Directive Commands, with arguments " " BASIC COMMAND LIST " *ADD input_source " *ARITHMETIC { [ON] | OFF } " *CLOSE unit_number " *CPU " *DEFINE " *ECHO[/qualifiers] { [ON] | OFF } " *ELSE [IF { 0 | 1 } ] " *END { IF | WHILE } " *EXIT " *IF { 0 | 1 } " *LIST/n list variable " *OPEN[/r | /r+ | /w | /w+ ] unit_number file_name " *PROMPT prompt_string sybol_name " *READ/unit=unit_number[/LOCAL | /GLOBAL ] sym1 [sym2, [sym3 ...]] " *REWIND " *STOP " *STRCMP string_1 string_2 difference " *SYSTEM command " *UNDEFINE[/LOCAL][/GLOBAL] symbol_name " *WHILE { 0 | 1 } " *WRITE[/unit=unit_number] output text " syn match tssclDirective "\*ADD" syn match tssclDirective "\*ARITHMETIC \+\(ON\|OFF\)" syn match tssclDirective "\*CLOSE" syn match tssclDirective "\*CPU" syn match tssclDirective "\*DEFINE" syn match tssclDirective "\*ECHO" syn match tssclConditional "\*ELSE" syn match tssclConditional "\*END \+\(IF\|WHILE\)" syn match tssclDirective "\*EXIT" syn match tssclConditional "\*IF" syn match tssclDirective "\*LIST" syn match tssclDirective "\*OPEN" syn match tssclDirective "\*PROMPT" syn match tssclDirective "\*READ" syn match tssclDirective "\*REWIND" syn match tssclDirective "\*STOP" syn match tssclDirective "\*STRCMP" syn match tssclDirective "\*SYSTEM" syn match tssclDirective "\*UNDEFINE" syn match tssclConditional "\*WHILE" syn match tssclDirective "\*WRITE" syn match tssclContChar "-$" " C library functoins " Bessel functions (jn, yn) " Error and complementary error fuctions (erf, erfc) " Exponential functions (exp) " Logrithm (log, log10) " Power (pow) " Square root (sqrt) " Floor (floor) " Ceiling (ceil) " Floating point remainder (fmod) " Floating point absolute value (fabs) " Gamma (gamma) " Euclidean distance function (hypot) " Hperbolic functions (sinh, cosh, tanh) " Trigometric functions in radians (sin, cos, tan, asin, acos, atan, atan2) " Trigometric functions in degrees (sind, cosd, tand, asind, acosd, atand, " atan2d) " " local varialbles: cl_arg1, cl_arg2, etc. (cl_arg is an array of arguments) " cl_args is the number of arguments " " " I/O: *PROMPT, *WRITE, *READ " " Conditional branching: " IF, ELSE IF, END " *IF value *IF I==10 " *ELSE IF value *ELSE IF I<10 " *ELSE *ELSE " *ENDIF *ENDIF " " " Iterative looping: " WHILE " *WHILE test " ..... " *END WHILE " " " EXAMPLE: " *DEFINE I = 1 " *WHILE (I <= 10) " *WRITE I = 'I' " *DEFINE I = (I + 1) " *END WHILE " syn match tssclQualifier "/[^/ ]\+"hs=s+1 syn match tssclSymbol "'\S\+'" "syn match tssclSymbol2 " \S\+ " contained syn match tssclInteger "-\=\<[0-9]*\>" syn match tssclFloat "-\=\<[0-9]*\.[0-9]*" syn match tssclScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " Define the default highlighting " Only when an item doesn't have highlighting yet hi def link tssclCommand Statement hi def link tssclKeyword Special hi def link tssclEnd Macro hi def link tssclUnits Special hi def link tssclComment Comment hi def link tssclDirective Statement hi def link tssclConditional Conditional hi def link tssclContChar Macro hi def link tssclQualifier Typedef hi def link tssclSymbol Identifier hi def link tssclSymbol2 Symbol hi def link tssclString String hi def link tssclOper Operator hi def link tssclInteger Number hi def link tssclFloat Number hi def link tssclScientific Number let b:current_syntax = "tsscl" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/tssgm.vim000066400000000000000000000053431320401574200176760ustar00rootroot00000000000000" Vim syntax file " Language: TSS (Thermal Synthesizer System) Geometry " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.tssgm " URL: http://www.naglenet.org/vim/syntax/tssgm.vim " MAIN URL: http://www.naglenet.org/vim/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Ignore case syn case ignore " " " Begin syntax definitions for tss geomtery file. " " Define keywords for TSS syn keyword tssgmParam units mirror param active sides submodel include syn keyword tssgmParam iconductor nbeta ngamma optics material thickness color syn keyword tssgmParam initial_temp syn keyword tssgmParam initial_id node_ids node_add node_type syn keyword tssgmParam gamma_boundaries gamma_add beta_boundaries syn keyword tssgmParam p1 p2 p3 p4 p5 p6 rot1 rot2 rot3 tx ty tz syn keyword tssgmSurfType rectangle trapezoid disc ellipse triangle syn keyword tssgmSurfType polygon cylinder cone sphere ellipic-cone syn keyword tssgmSurfType ogive torus box paraboloid hyperboloid ellipsoid syn keyword tssgmSurfType quadrilateral trapeziod syn keyword tssgmArgs OUT IN DOWN BOTH DOUBLE NONE SINGLE RADK CC FECC syn keyword tssgmArgs white red blue green yellow orange violet pink syn keyword tssgmArgs turquoise grey black syn keyword tssgmArgs Arithmetic Boundary Heater syn keyword tssgmDelim assembly syn keyword tssgmEnd end syn keyword tssgmUnits cm feet meters inches syn keyword tssgmUnits Celsius Kelvin Fahrenheit Rankine " Define matches for TSS syn match tssgmDefault "^DEFAULT/LENGTH = \(ft\|in\|cm\|m\)" syn match tssgmDefault "^DEFAULT/TEMP = [CKFR]" syn match tssgmComment /comment \+= \+".*"/ contains=tssParam,tssgmCommentString syn match tssgmCommentString /".*"/ contained syn match tssgmSurfIdent " \S\+\.\d\+ \=$" syn match tssgmString /"[^" ]\+"/ms=s+1,me=e-1 contains=ALLBUT,tssInteger syn match tssgmArgs / = [xyz],"/ms=s+3,me=e-2 syn match tssgmInteger "-\=\<[0-9]*\>" syn match tssgmFloat "-\=\<[0-9]*\.[0-9]*" syn match tssgmScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " Define the default highlighting " Only when an item doesn't have highlighting yet hi def link tssgmParam Statement hi def link tssgmSurfType Type hi def link tssgmArgs Special hi def link tssgmDelim Typedef hi def link tssgmEnd Macro hi def link tssgmUnits Special hi def link tssgmDefault SpecialComment hi def link tssgmComment Statement hi def link tssgmCommentString Comment hi def link tssgmSurfIdent Identifier hi def link tssgmString Delimiter hi def link tssgmInteger Number hi def link tssgmFloat Float hi def link tssgmScientific Float let b:current_syntax = "tssgm" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/tssop.vim000066400000000000000000000033711320401574200177100ustar00rootroot00000000000000" Vim syntax file " Language: TSS (Thermal Synthesizer System) Optics " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.tssop " URL: http://www.naglenet.org/vim/syntax/tssop.vim " MAIN URL: http://www.naglenet.org/vim/ " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Ignore case syn case ignore " " " Begin syntax definitions for tss optics file. " " Define keywords for TSS syn keyword tssopParam ir_eps ir_trans ir_spec ir_tspec ir_refract syn keyword tssopParam sol_eps sol_trans sol_spec sol_tspec sol_refract syn keyword tssopParam color "syn keyword tssopProp property syn keyword tssopArgs white red blue green yellow orange violet pink syn keyword tssopArgs turquoise grey black " Define matches for TSS syn match tssopComment /comment \+= \+".*"/ contains=tssopParam,tssopCommentString syn match tssopCommentString /".*"/ contained syn match tssopProp "property " syn match tssopProp "edit/optic " syn match tssopPropName "^property \S\+" contains=tssopProp syn match tssopPropName "^edit/optic \S\+$" contains=tssopProp syn match tssopInteger "-\=\<[0-9]*\>" syn match tssopFloat "-\=\<[0-9]*\.[0-9]*" syn match tssopScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " Define the default highlighting " Only when an item doesn't have highlighting yet hi def link tssopParam Statement hi def link tssopProp Identifier hi def link tssopArgs Special hi def link tssopComment Statement hi def link tssopCommentString Comment hi def link tssopPropName Typedef hi def link tssopInteger Number hi def link tssopFloat Float hi def link tssopScientific Float let b:current_syntax = "tssop" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/tt2.vim000066400000000000000000000173631320401574200172570ustar00rootroot00000000000000" Language: TT2 (Perl Template Toolkit) " Maintainer: vim-perl " Author: Moriki, Atsushi <4woods+vim@gmail.com> " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2015-04-25 " " Installation: " put tt2.vim and tt2html.vim in to your syntax directory. " " add below in your filetype.vim. " au BufNewFile,BufRead *.tt2 setf tt2 " or " au BufNewFile,BufRead *.tt2 " \ if ( getline(1) . getline(2) . getline(3) =~ '<\chtml' | " \ && getline(1) . getline(2) . getline(3) !~ '<[%?]' ) | " \ || getline(1) =~ '' " "PHP" " :let b:tt2_syn_tags = '' " "TT2 and HTML" " :let b:tt2_syn_tags = '\[% %] ' " " Changes: " 0.1.3 " Changed fileformat from 'dos' to 'unix' " Deleted 'echo' that print obstructive message " 0.1.2 " Added block comment syntax " e.g. [%# COMMENT " COMMENT TOO %] " [%# IT'S SAFE %] HERE IS OUTSIDE OF TT2 DIRECTIVE " [% # WRONG!! %] HERE STILL BE COMMENT " 0.1.1 " Release " 0.1.0 " Internal " " License: follow Vim :help uganda " if !exists("b:tt2_syn_tags") let b:tt2_syn_tags = '\[% %]' "let b:tt2_syn_tags = '\[% %] \[\* \*]' endif if !exists("b:tt2_syn_inc_perl") let b:tt2_syn_inc_perl = 1 endif if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case match syn cluster tt2_top_cluster contains=tt2_perlcode,tt2_tag_region " TT2 TAG Region if exists("b:tt2_syn_tags") let s:str = b:tt2_syn_tags . ' ' let s:str = substitute(s:str,'^ \+','','g') let s:str = substitute(s:str,' \+',' ','g') while stridx(s:str,' ') > 0 let s:st = strpart(s:str,0,stridx(s:str,' ')) let s:str = substitute(s:str,'[^ ]* ','',"") let s:ed = strpart(s:str,0,stridx(s:str,' ')) let s:str = substitute(s:str,'[^ ]* ','',"") exec 'syn region tt2_tag_region '. \ 'matchgroup=tt2_tag '. \ 'start=+\(' . s:st .'\)[-]\=+ '. \ 'end=+[-]\=\(' . s:ed . '\)+ '. \ 'contains=@tt2_statement_cluster keepend extend' exec 'syn region tt2_commentblock_region '. \ 'matchgroup=tt2_tag '. \ 'start=+\(' . s:st .'\)[-]\=\(#\)\@=+ '. \ 'end=+[-]\=\(' . s:ed . '\)+ '. \ 'keepend extend' "Include Perl syntax when 'PERL' 'RAWPERL' block if b:tt2_syn_inc_perl syn include @Perl $VIMRUNTIME/syntax/perl.vim exec 'syn region tt2_perlcode '. \ 'start=+\(\(RAW\)\=PERL\s*[-]\=' . s:ed . '\(\n\)\=\)\@<=+ ' . \ 'end=+' . s:st . '[-]\=\s*END+me=s-1 contains=@Perl keepend' endif "echo 'TAGS ' . s:st . ' ' . s:ed unlet s:st unlet s:ed endwhile else syn region tt2_tag_region \ matchgroup=tt2_tag \ start=+\(\[%\)[-]\=+ \ end=+[-]\=%\]+ \ contains=@tt2_statement_cluster keepend extend syn region tt2_commentblock_region \ matchgroup=tt2_tag \ start=+\(\[%\)[-]\=#+ \ end=+[-]\=%\]+ \ keepend extend "Include Perl syntax when 'PERL' 'RAWPERL' block if b:tt2_syn_inc_perl syn include @Perl $VIMRUNTIME/syntax/perl.vim syn region tt2_perlcode \ start=+\(\(RAW\)\=PERL\s*[-]\=%]\(\n\)\=\)\@<=+ \ end=+\[%[-]\=\s*END+me=s-1 \ contains=@Perl keepend endif endif " Directive syn keyword tt2_directive contained \ GET CALL SET DEFAULT DEBUG \ LAST NEXT BREAK STOP BLOCK \ IF IN UNLESS ELSIF FOR FOREACH WHILE SWITCH CASE \ USE PLUGIN MACRO META \ TRY FINAL RETURN LAST \ CLEAR TO STEP AND OR NOT MOD DIV \ ELSE PERL RAWPERL END syn match tt2_directive +|+ contained syn keyword tt2_directive contained nextgroup=tt2_string_q,tt2_string_qq,tt2_blockname skipwhite skipempty \ INSERT INCLUDE PROCESS WRAPPER FILTER \ THROW CATCH syn keyword tt2_directive contained nextgroup=tt2_def_tag skipwhite skipempty \ TAGS syn match tt2_def_tag "\S\+\s\+\S\+\|\<\w\+\>" contained syn match tt2_variable +\I\w*+ contained syn match tt2_operator "[+*/%:?-]" contained syn match tt2_operator "\<\(mod\|div\|or\|and\|not\)\>" contained syn match tt2_operator "[!=<>]=\=\|&&\|||" contained syn match tt2_operator "\(\s\)\@<=_\(\s\)\@=" contained syn match tt2_operator "=>\|," contained syn match tt2_deref "\([[:alnum:]_)\]}]\s*\)\@<=\." contained syn match tt2_comment +#.*$+ contained extend syn match tt2_func +\<\I\w*\(\s*(\)\@=+ contained nextgroup=tt2_bracket_r skipempty skipwhite " syn region tt2_bracket_r start=+(+ end=+)+ contained contains=@tt2_statement_cluster keepend extend syn region tt2_bracket_b start=+\[+ end=+]+ contained contains=@tt2_statement_cluster keepend extend syn region tt2_bracket_b start=+{+ end=+}+ contained contains=@tt2_statement_cluster keepend extend syn region tt2_string_qq start=+"+ end=+"+ skip=+\\"+ contained contains=tt2_ivariable keepend extend syn region tt2_string_q start=+'+ end=+'+ skip=+\\'+ contained keepend extend syn match tt2_ivariable +\$\I\w*\>\(\.\I\w*\>\)*+ contained syn match tt2_ivariable +\${\I\w*\>\(\.\I\w*\>\)*}+ contained syn match tt2_number "\d\+" contained syn match tt2_number "\d\+\.\d\+" contained syn match tt2_number "0x\x\+" contained syn match tt2_number "0\o\+" contained syn match tt2_blockname "\f\+" contained nextgroup=tt2_blockname_joint skipwhite skipempty syn match tt2_blockname "$\w\+" contained contains=tt2_ivariable nextgroup=tt2_blockname_joint skipwhite skipempty syn region tt2_blockname start=+"+ end=+"+ skip=+\\"+ contained contains=tt2_ivariable nextgroup=tt2_blockname_joint keepend skipwhite skipempty syn region tt2_blockname start=+'+ end=+'+ skip=+\\'+ contained nextgroup=tt2_blockname_joint keepend skipwhite skipempty syn match tt2_blockname_joint "+" contained nextgroup=tt2_blockname skipwhite skipempty syn cluster tt2_statement_cluster contains=tt2_directive,tt2_variable,tt2_operator,tt2_string_q,tt2_string_qq,tt2_deref,tt2_comment,tt2_func,tt2_bracket_b,tt2_bracket_r,tt2_number " Synchronizing syn sync minlines=50 hi def link tt2_tag Type hi def link tt2_tag_region Type hi def link tt2_commentblock_region Comment hi def link tt2_directive Statement hi def link tt2_variable Identifier hi def link tt2_ivariable Identifier hi def link tt2_operator Statement hi def link tt2_string_qq String hi def link tt2_string_q String hi def link tt2_blockname String hi def link tt2_comment Comment hi def link tt2_func Function hi def link tt2_number Number if exists("b:tt2_syn_tags") unlet b:tt2_syn_tags endif let b:current_syntax = "tt2" let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=4:sw=4 neovim-0.2.2/runtime/syntax/tt2html.vim000066400000000000000000000010041320401574200201250ustar00rootroot00000000000000" Language: TT2 embedded with HTML " Maintainer: vim-perl " Author: Moriki, Atsushi <4woods+vim@gmail.com> " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2013-07-21 if exists("b:current_syntax") finish endif runtime! syntax/html.vim unlet b:current_syntax runtime! syntax/tt2.vim unlet b:current_syntax syn cluster htmlPreProc add=@tt2_top_cluster let b:current_syntax = "tt2html" neovim-0.2.2/runtime/syntax/tt2js.vim000066400000000000000000000010121320401574200175740ustar00rootroot00000000000000" Language: TT2 embedded with Javascript " Maintainer: Andy Lester " Author: Yates, Peter " Homepage: http://github.com/vim-perl/vim-perl " Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Last Change: 2013-07-21 if exists("b:current_syntax") finish endif runtime! syntax/javascript.vim unlet b:current_syntax runtime! syntax/tt2.vim unlet b:current_syntax syn cluster javascriptPreProc add=@tt2_top_cluster let b:current_syntax = "tt2js" neovim-0.2.2/runtime/syntax/tutor.vim000066400000000000000000000060611320401574200177140ustar00rootroot00000000000000if exists("b:current_syntax") finish endif syn include @VIM syntax/vim.vim unlet b:current_syntax syn include @TUTORSHELL syntax/sh.vim unlet b:current_syntax syn include @VIMNORMAL syntax/vimnormal.vim syn match tutorLink /\[.\{-}\](.\{-})/ contains=tutorInlineNormal syn match tutorLinkBands /\[\|\]\|(\|)/ contained containedin=tutorLink,tutorLinkAnchor conceal syn match tutorLinkAnchor /(.\{-})/ contained containedin=tutorLink conceal syn match tutorURL /\(https\?\|file\):\/\/[[:graph:]]\+\>\/\?/ syn match tutorEmail /\<[[:graph:]]\+@[[:graph:]]\+\>/ syn match tutorInternalAnchor /\*[[:alnum:]-]\+\*/ contained conceal containedin=tutorSection syn match tutorSection /^#\{1,6}\s.\+$/ fold contains=tutorInlineNormal syn match tutorSectionBullet /#/ contained containedin=tutorSection syn match tutorTOC /\ctable of contents:/ syn match tutorConcealedEscapes /\\[`*!\[\]():$-]\@=/ conceal syn region tutorEmphasis matchgroup=Delimiter start=/[\*]\@ " URL: ftp://ftp.chaoticdreams.org/pub/ut/vim/uc.vim " Credits: Based on the java.vim syntax file by Claudio Fleiner " Last change: 2003 May 31 " Please check :help uc.vim for comments on some of the options available. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " some characters that cannot be in a UnrealScript program (outside a string) syn match ucError "[\\@`]" syn match ucError "<<<\|\.\.\|=>\|<>\|||=\|&&=\|[^-]->\|\*\/" " we define it here so that included files can test for it if !exists("main_syntax") let main_syntax='uc' endif syntax case ignore " keyword definitions syn keyword ucBranch break continue syn keyword ucConditional if else switch syn keyword ucRepeat while for do foreach syn keyword ucBoolean true false syn keyword ucConstant null syn keyword ucOperator new instanceof syn keyword ucType boolean char byte short int long float double syn keyword ucType void Pawn sound state auto exec function ipaddr syn keyword ucType ELightType actor ammo defaultproperties bool syn keyword ucType native noexport var out vector name local string syn keyword ucType event syn keyword ucStatement return syn keyword ucStorageClass static synchronized transient volatile final syn keyword ucMethodDecl synchronized throws " UnrealScript defines classes in sorta fscked up fashion syn match ucClassDecl "^[Cc]lass[\s$]*\S*[\s$]*expands[\s$]*\S*;" contains=ucSpecial,ucSpecialChar,ucClassKeys syn keyword ucClassKeys class expands extends syn match ucExternal "^\#exec.*" contains=ucCommentString,ucNumber syn keyword ucScopeDecl public protected private abstract " UnrealScript Functions syn match ucFuncDef "^.*function\s*[\(]*" contains=ucType,ucStorageClass syn match ucEventDef "^.*event\s*[\(]*" contains=ucType,ucStorageClass syn match ucClassLabel "[a-zA-Z0-9]*\'[a-zA-Z0-9]*\'" contains=ucCharacter syn region ucLabelRegion transparent matchgroup=ucLabel start="\" matchgroup=NONE end=":" contains=ucNumber syn match ucUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=ucLabel syn keyword ucLabel default " The following cluster contains all java groups except the contained ones syn cluster ucTop contains=ucExternal,ucError,ucError,ucBranch,ucLabelRegion,ucLabel,ucConditional,ucRepeat,ucBoolean,ucConstant,ucTypedef,ucOperator,ucType,ucType,ucStatement,ucStorageClass,ucMethodDecl,ucClassDecl,ucClassDecl,ucClassDecl,ucScopeDecl,ucError,ucError2,ucUserLabel,ucClassLabel " Comments syn keyword ucTodo contained TODO FIXME XXX syn region ucCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=ucSpecial,ucCommentStar,ucSpecialChar syn region ucComment2String contained start=+"+ end=+$\|"+ contains=ucSpecial,ucSpecialChar syn match ucCommentCharacter contained "'\\[^']\{1,6\}'" contains=ucSpecialChar syn match ucCommentCharacter contained "'\\''" contains=ucSpecialChar syn match ucCommentCharacter contained "'[^\\]'" syn region ucComment start="/\*" end="\*/" contains=ucCommentString,ucCommentCharacter,ucNumber,ucTodo syn match ucCommentStar contained "^\s*\*[^/]"me=e-1 syn match ucCommentStar contained "^\s*\*$" syn match ucLineComment "//.*" contains=ucComment2String,ucCommentCharacter,ucNumber,ucTodo hi link ucCommentString ucString hi link ucComment2String ucString hi link ucCommentCharacter ucCharacter syn cluster ucTop add=ucComment,ucLineComment " match the special comment /**/ syn match ucComment "/\*\*/" " Strings and constants syn match ucSpecialError contained "\\." "syn match ucSpecialCharError contained "[^']" syn match ucSpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)" syn region ucString start=+"+ end=+"+ contains=ucSpecialChar,ucSpecialError syn match ucStringError +"\([^"\\]\|\\.\)*$+ syn match ucCharacter "'[^']*'" contains=ucSpecialChar,ucSpecialCharError syn match ucCharacter "'\\''" contains=ucSpecialChar syn match ucCharacter "'[^\\]'" syn match ucNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" syn match ucNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" syn match ucNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" syn match ucNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" " unicode characters syn match ucSpecial "\\u\d\{4\}" syn cluster ucTop add=ucString,ucCharacter,ucNumber,ucSpecial,ucStringError " catch errors caused by wrong parenthesis syn region ucParen transparent start="(" end=")" contains=@ucTop,ucParen syn match ucParenError ")" hi link ucParenError ucError if !exists("uc_minlines") let uc_minlines = 10 endif exec "syn sync ccomment ucComment minlines=" . uc_minlines " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link ucFuncDef Conditional hi def link ucEventDef Conditional hi def link ucBraces Function hi def link ucBranch Conditional hi def link ucLabel Label hi def link ucUserLabel Label hi def link ucConditional Conditional hi def link ucRepeat Repeat hi def link ucStorageClass StorageClass hi def link ucMethodDecl ucStorageClass hi def link ucClassDecl ucStorageClass hi def link ucScopeDecl ucStorageClass hi def link ucBoolean Boolean hi def link ucSpecial Special hi def link ucSpecialError Error hi def link ucSpecialCharError Error hi def link ucString String hi def link ucCharacter Character hi def link ucSpecialChar SpecialChar hi def link ucNumber Number hi def link ucError Error hi def link ucStringError Error hi def link ucStatement Statement hi def link ucOperator Operator hi def link ucOverLoaded Operator hi def link ucComment Comment hi def link ucDocComment Comment hi def link ucLineComment Comment hi def link ucConstant ucBoolean hi def link ucTypedef Typedef hi def link ucTodo Todo hi def link ucCommentTitle SpecialComment hi def link ucDocTags Special hi def link ucDocParam Function hi def link ucCommentStar ucComment hi def link ucType Type hi def link ucExternal Include hi def link ucClassKeys Conditional hi def link ucClassLabel Conditional hi def link htmlComment Special hi def link htmlCommentPart Special let b:current_syntax = "uc" if main_syntax == 'uc' unlet main_syntax endif " vim: ts=8 neovim-0.2.2/runtime/syntax/udevconf.vim000066400000000000000000000023131320401574200203440ustar00rootroot00000000000000" Vim syntax file " Language: udev(8) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword udevconfTodo contained TODO FIXME XXX NOTE syn region udevconfComment display oneline start='^\s*#' end='$' \ contains=udevconfTodo,@Spell syn match udevconfBegin display '^' \ nextgroup=udevconfVariable,udevconfComment \ skipwhite syn keyword udevconfVariable contained udev_root udev_db udev_rules udev_log \ nextgroup=udevconfVariableEq syn match udevconfVariableEq contained '[[:space:]=]' \ nextgroup=udevconfString skipwhite syn region udevconfString contained display oneline start=+"+ end=+"+ hi def link udevconfTodo Todo hi def link udevconfComment Comment hi def link udevconfVariable Identifier hi def link udevconfVariableEq Operator hi def link udevconfString String let b:current_syntax = "udevconf" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/udevperm.vim000066400000000000000000000045511320401574200203700ustar00rootroot00000000000000" Vim syntax file " Language: udev(8) permissions file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match udevpermBegin display '^' nextgroup=udevpermDevice syn match udevpermDevice contained display '[^:]\+' \ contains=udevpermPattern \ nextgroup=udevpermUserColon syn match udevpermPattern contained '[*?]' syn region udevpermPattern contained start='\[!\=' end='\]' \ contains=udevpermPatRange syn match udevpermPatRange contained '[^[-]-[^]-]' syn match udevpermUserColon contained display ':' \ nextgroup=udevpermUser syn match udevpermUser contained display '[^:]\+' \ nextgroup=udevpermGroupColon syn match udevpermGroupColon contained display ':' \ nextgroup=udevpermGroup syn match udevpermGroup contained display '[^:]\+' \ nextgroup=udevpermPermColon syn match udevpermPermColon contained display ':' \ nextgroup=udevpermPerm syn match udevpermPerm contained display '\<0\=\o\+\>' \ contains=udevpermOctalZero syn match udevpermOctalZero contained display '\<0' syn match udevpermOctalError contained display '\<0\o*[89]\d*\>' syn keyword udevpermTodo contained TODO FIXME XXX NOTE syn region udevpermComment display oneline start='^\s*#' end='$' \ contains=udevpermTodo,@Spell hi def link udevpermTodo Todo hi def link udevpermComment Comment hi def link udevpermDevice String hi def link udevpermPattern SpecialChar hi def link udevpermPatRange udevpermPattern hi def link udevpermColon Normal hi def link udevpermUserColon udevpermColon hi def link udevpermUser Identifier hi def link udevpermGroupColon udevpermColon hi def link udevpermGroup Type hi def link udevpermPermColon udevpermColon hi def link udevpermPerm Number hi def link udevpermOctalZero PreProc hi def link udevpermOctalError Error let b:current_syntax = "udevperm" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/udevrules.vim000066400000000000000000000154601320401574200205600ustar00rootroot00000000000000" Vim syntax file " Language: udev(8) rules file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-12-18 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " TODO: Line continuations. syn keyword udevrulesTodo contained TODO FIXME XXX NOTE syn region udevrulesComment display oneline start='^\s*#' end='$' \ contains=udevrulesTodo,@Spell syn keyword udevrulesRuleKey ACTION DEVPATH KERNEL SUBSYSTEM KERNELS \ SUBSYSTEMS DRIVERS RESULT \ nextgroup=udevrulesRuleTest \ skipwhite syn keyword udevrulesRuleKey ATTRS nextgroup=udevrulesAttrsPath syn region udevrulesAttrsPath display transparent \ matchgroup=udevrulesDelimiter start='{' \ matchgroup=udevrulesDelimiter end='}' \ contains=udevrulesPath \ nextgroup=udevrulesRuleTest \ skipwhite syn keyword udevrulesRuleKey ENV nextgroup=udevrulesEnvVar syn region udevrulesEnvVar display transparent \ matchgroup=udevrulesDelimiter start='{' \ matchgroup=udevrulesDelimiter end='}' \ contains=udevrulesVariable \ nextgroup=udevrulesRuleTest,udevrulesRuleEq \ skipwhite syn keyword udevrulesRuleKey PROGRAM RESULT \ nextgroup=udevrulesEStringTest,udevrulesEStringEq \ skipwhite syn keyword udevrulesAssignKey NAME SYMLINK OWNER GROUP RUN \ nextgroup=udevrulesEStringEq \ skipwhite syn keyword udevrulesAssignKey MODE LABEL GOTO WAIT_FOR_SYSFS \ nextgroup=udevrulesRuleEq \ skipwhite syn keyword udevrulesAssignKey ATTR nextgroup=udevrulesAttrsPath syn region udevrulesAttrKey display transparent \ matchgroup=udevrulesDelimiter start='{' \ matchgroup=udevrulesDelimiter end='}' \ contains=udevrulesKey \ nextgroup=udevrulesRuleEq \ skipwhite syn keyword udevrulesAssignKey IMPORT nextgroup=udevrulesImport, \ udevrulesEStringEq \ skipwhite syn region udevrulesImport display transparent \ matchgroup=udevrulesDelimiter start='{' \ matchgroup=udevrulesDelimiter end='}' \ contains=udevrulesImportType \ nextgroup=udevrulesEStringEq \ skipwhite syn keyword udevrulesImportType program file parent syn keyword udevrulesAssignKey OPTIONS \ nextgroup=udevrulesOptionsEq syn match udevrulesPath contained display '[^}]\+' syn match udevrulesVariable contained display '[^}]\+' syn match udevrulesRuleTest contained display '[=!:]=' \ nextgroup=udevrulesString skipwhite syn match udevrulesEStringTest contained display '[=!+:]=' \ nextgroup=udevrulesEString skipwhite syn match udevrulesRuleEq contained display '+=\|=\ze[^=]' \ nextgroup=udevrulesString skipwhite syn match udevrulesEStringEq contained '+=\|=\ze[^=]' \ nextgroup=udevrulesEString skipwhite syn match udevrulesOptionsEq contained '+=\|=\ze[^=]' \ nextgroup=udevrulesOptions skipwhite syn region udevrulesEString contained display oneline start=+"+ end=+"+ \ contains=udevrulesStrEscapes,udevrulesStrVars syn match udevrulesStrEscapes contained '%[knpbMmcPrN%]' " TODO: This can actually stand alone (without {…}), so add a nextgroup here. syn region udevrulesStrEscapes contained start='%c{' end='}' \ contains=udevrulesStrNumber syn region udevrulesStrEscapes contained start='%s{' end='}' \ contains=udevrulesPath syn region udevrulesStrEscapes contained start='%E{' end='}' \ contains=udevrulesVariable syn match udevrulesStrNumber contained '\d\++\=' syn match udevrulesStrVars contained display '$\%(kernel\|number\|devpath\|id\|major\|minor\|result\|parent\|root\|tempnode\)\>' syn region udevrulesStrVars contained start='$attr{' end='}' \ contains=udevrulesPath syn region udevrulesStrVars contained start='$env{' end='}' \ contains=udevrulesVariable syn match udevrulesStrVars contained display '\$\$' syn region udevrulesString contained display oneline start=+"+ end=+"+ \ contains=udevrulesPattern syn match udevrulesPattern contained '[*?]' syn region udevrulesPattern contained start='\[!\=' end='\]' \ contains=udevrulesPatRange syn match udevrulesPatRange contained '[^[-]-[^]-]' syn region udevrulesOptions contained display oneline start=+"+ end=+"+ \ contains=udevrulesOption,udevrulesOptionSep syn keyword udevrulesOption contained last_rule ignore_device ignore_remove \ all_partitions syn match udevrulesOptionSep contained ',' hi def link udevrulesTodo Todo hi def link udevrulesComment Comment hi def link udevrulesRuleKey Keyword hi def link udevrulesDelimiter Delimiter hi def link udevrulesAssignKey Identifier hi def link udevrulesPath Identifier hi def link udevrulesVariable Identifier hi def link udevrulesAttrKey Identifier " XXX: setting this to Operator makes for extremely intense highlighting. hi def link udevrulesEq Normal hi def link udevrulesRuleEq udevrulesEq hi def link udevrulesEStringEq udevrulesEq hi def link udevrulesOptionsEq udevrulesEq hi def link udevrulesEString udevrulesString hi def link udevrulesStrEscapes SpecialChar hi def link udevrulesStrNumber Number hi def link udevrulesStrVars Identifier hi def link udevrulesString String hi def link udevrulesPattern SpecialChar hi def link udevrulesPatRange SpecialChar hi def link udevrulesOptions udevrulesString hi def link udevrulesOption Type hi def link udevrulesOptionSep Delimiter hi def link udevrulesImportType Type let b:current_syntax = "udevrules" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/uil.vim000066400000000000000000000054051320401574200173310ustar00rootroot00000000000000" Vim syntax file " Language: Motif UIL (User Interface Language) " Maintainer: Thomas Koehler " Please be aware: I'm often slow to answer email due to a high " non-computer related workload (sometimes 4-8 weeks) " Last Change: 2016 September 6 " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " A bunch of useful keywords syn keyword uilType arguments callbacks color syn keyword uilType compound_string controls end syn keyword uilType exported file include syn keyword uilType module object procedure syn keyword uilType user_defined xbitmapfile syn keyword uilTodo contained TODO " String and Character constants " Highlight special characters (those which have a backslash) differently syn match uilSpecial contained "\\\d\d\d\|\\." syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,uilSpecial syn match uilCharacter "'[^\\]'" syn region uilString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@Spell,uilSpecial syn match uilSpecialCharacter "'\\.'" syn match uilSpecialStatement "Xm[^ =(){}:;]*" syn match uilSpecialFunction "MrmNcreateCallback" syn match uilRessource "XmN[^ =(){}:;]*" syn match uilNumber "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>" syn match uilNumber "0[xX]\x\+\>" syn region uilComment start="/\*" end="\*/" contains=@Spell,uilTodo syn match uilComment "!.*" contains=@Spell,uilTodo syn match uilCommentError "\*/" syn region uilPreCondit start="^#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=uilComment,uilString,uilCharacter,uilNumber,uilCommentError syn match uilIncluded contained "<[^>]*>" syn match uilInclude "^#\s*include\s\+." contains=uilString,uilIncluded syn match uilLineSkip "\\$" syn region uilDefine start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLineSkip,uilComment,uilString,uilCharacter,uilNumber,uilCommentError syn sync ccomment uilComment " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default highlighting. hi def link uilCharacter uilString hi def link uilSpecialCharacter uilSpecial hi def link uilNumber uilString hi def link uilCommentError uilError hi def link uilInclude uilPreCondit hi def link uilDefine uilPreCondit hi def link uilIncluded uilString hi def link uilSpecialFunction uilRessource hi def link uilRessource Identifier hi def link uilSpecialStatement Keyword hi def link uilError Error hi def link uilPreCondit PreCondit hi def link uilType Type hi def link uilString String hi def link uilComment Comment hi def link uilSpecial Special hi def link uilTodo Todo let b:current_syntax = "uil" " vim: ts=8 neovim-0.2.2/runtime/syntax/updatedb.vim000066400000000000000000000023041320401574200203230ustar00rootroot00000000000000" Vim syntax file " Language: updatedb.conf(5) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2009-05-25 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword updatedbTodo contained TODO FIXME XXX NOTE syn region updatedbComment display oneline start='^\s*#' end='$' \ contains=updatedbTodo,@Spell syn match updatedbBegin display '^' \ nextgroup=updatedbName,updatedbComment skipwhite syn keyword updatedbName contained \ PRUNEFS \ PRUNENAMES \ PRUNEPATHS \ PRUNE_BIND_MOUNTS \ nextgroup=updatedbNameEq syn match updatedbNameEq contained display '=' nextgroup=updatedbValue syn region updatedbValue contained display oneline start='"' end='"' hi def link updatedbTodo Todo hi def link updatedbComment Comment hi def link updatedbName Identifier hi def link updatedbNameEq Operator hi def link updatedbValue String let b:current_syntax = "updatedb" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/upstart.vim000066400000000000000000000061171320401574200202430ustar00rootroot00000000000000" Vim syntax file " Language: Upstart job files " Maintainer: Michael Biebl " James Hunt " Last Change: 2012 Jan 16 " License: The Vim license " Version: 0.4 " Remark: Syntax highlighting for Upstart (init(8)) job files. " " It is inspired by the initng syntax file and includes sh.vim to do the " highlighting of script blocks. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let is_bash = 1 syn include @Shell syntax/sh.vim syn case match " avoid need to use 'match' for most events setlocal iskeyword+=- syn match upstartComment /#.*$/ contains=upstartTodo syn keyword upstartTodo TODO FIXME contained syn region upstartString start=/"/ end=/"/ skip=/\\"/ syn region upstartScript matchgroup=upstartStatement start="script" end="end script" contains=@upstartShellCluster syn cluster upstartShellCluster contains=@Shell " one argument syn keyword upstartStatement description author version instance expect syn keyword upstartStatement pid kill normal console env exit export syn keyword upstartStatement umask nice oom chroot chdir exec " two arguments syn keyword upstartStatement limit " one or more arguments (events) syn keyword upstartStatement emits syn keyword upstartStatement on start stop " flag, no parameter syn keyword upstartStatement respawn service instance manual debug task " prefix for exec or script syn keyword upstartOption pre-start post-start pre-stop post-stop " option for kill syn keyword upstartOption timeout " option for oom syn keyword upstartOption never " options for console syn keyword upstartOption output owner " options for expect syn keyword upstartOption fork daemon " options for limit syn keyword upstartOption unlimited " 'options' for start/stop on syn keyword upstartOption and or " Upstart itself and associated utilities syn keyword upstartEvent runlevel syn keyword upstartEvent started syn keyword upstartEvent starting syn keyword upstartEvent startup syn keyword upstartEvent stopped syn keyword upstartEvent stopping syn keyword upstartEvent control-alt-delete syn keyword upstartEvent keyboard-request syn keyword upstartEvent power-status-changed " D-Bus syn keyword upstartEvent dbus-activation " Display Manager (ie gdm) syn keyword upstartEvent desktop-session-start syn keyword upstartEvent login-session-start " mountall syn keyword upstartEvent all-swaps syn keyword upstartEvent filesystem syn keyword upstartEvent mounted syn keyword upstartEvent mounting syn keyword upstartEvent local-filesystems syn keyword upstartEvent remote-filesystems syn keyword upstartEvent virtual-filesystems " SysV umountnfs.sh syn keyword upstartEvent mounted-remote-filesystems " upstart-udev-bridge and ifup/down syn match upstartEvent /\<\i\{-1,}-device-\(added\|removed\|up\|down\)/ " upstart-socket-bridge syn keyword upstartEvent socket hi def link upstartComment Comment hi def link upstartTodo Todo hi def link upstartString String hi def link upstartStatement Statement hi def link upstartOption Type hi def link upstartEvent Define let b:current_syntax = "upstart" neovim-0.2.2/runtime/syntax/upstreamdat.vim000066400000000000000000000333401320401574200210700ustar00rootroot00000000000000" Vim syntax file " Language: Innovation Data Processing upstream.dat file " Maintainer: Rob Owens " Latest Revision: 2013-11-27 " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Parameters: syn keyword upstreamdat_Parameter ACCEPTPCREMOTE syn keyword upstreamdat_Parameter ACCEPTREMOTE syn keyword upstreamdat_Parameter ACTION syn keyword upstreamdat_Parameter ACTIVATEONENTRY syn keyword upstreamdat_Parameter ARCHIVEBIT syn keyword upstreamdat_Parameter ARCHIVEBIT syn keyword upstreamdat_Parameter ASCTOEBC syn keyword upstreamdat_Parameter ASRBACKUP syn keyword upstreamdat_Parameter ATTENDED syn keyword upstreamdat_Parameter AUTHORITATIVE syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE syn keyword upstreamdat_Parameter BACKUPPROFILE syn keyword upstreamdat_Parameter BACKUPPROFILE2 syn keyword upstreamdat_Parameter BACKUPREPARSEFILES syn keyword upstreamdat_Parameter BACKUPREPARSEFILES syn keyword upstreamdat_Parameter BACKUPVERIFY syn keyword upstreamdat_Parameter BLANKTRUNC syn keyword upstreamdat_Parameter CALCDASDSIZE syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS syn keyword upstreamdat_Parameter COMPRESSLEVEL syn keyword upstreamdat_Parameter CONTROLFILE syn keyword upstreamdat_Parameter DASDOVERRIDE syn keyword upstreamdat_Parameter DATELIMIT syn keyword upstreamdat_Parameter DATELIMIT syn keyword upstreamdat_Parameter DAYSOLD syn keyword upstreamdat_Parameter DAYSOLD syn keyword upstreamdat_Parameter DELETED syn keyword upstreamdat_Parameter DELETED syn keyword upstreamdat_Parameter DELETEPROMPTS syn keyword upstreamdat_Parameter DELETEPROMPTS syn keyword upstreamdat_Parameter DESTINATION syn keyword upstreamdat_Parameter DESTINATION syn keyword upstreamdat_Parameter DIRDELETE syn keyword upstreamdat_Parameter DIRECTORVMC syn keyword upstreamdat_Parameter DIRONLYRESTOREOK syn keyword upstreamdat_Parameter DIRSONLY syn keyword upstreamdat_Parameter DIRSONLY syn keyword upstreamdat_Parameter DISASTERRECOVERY syn keyword upstreamdat_Parameter DISPLAY syn keyword upstreamdat_Parameter DRIVEALIAS syn keyword upstreamdat_Parameter DRIVEALIAS syn keyword upstreamdat_Parameter DUALCOPY syn keyword upstreamdat_Parameter DUPDAYS syn keyword upstreamdat_Parameter DUPLICATE syn keyword upstreamdat_Parameter EBCTOASC syn keyword upstreamdat_Parameter ENCRYPT syn keyword upstreamdat_Parameter ENCRYPTLEVEL syn keyword upstreamdat_Parameter EXCLUDELISTNAME syn keyword upstreamdat_Parameter FAILBACKUPONERROR syn keyword upstreamdat_Parameter FAILBACKUPONERROR syn keyword upstreamdat_Parameter FAILIFNOFILES syn keyword upstreamdat_Parameter FAILIFNOFILES syn keyword upstreamdat_Parameter FAILIFSKIP syn keyword upstreamdat_Parameter FAILJOB syn keyword upstreamdat_Parameter FAILRESTOREONERROR syn keyword upstreamdat_Parameter FAILRESTOREONERROR syn keyword upstreamdat_Parameter FILEDATE syn keyword upstreamdat_Parameter FILEDATE syn keyword upstreamdat_Parameter FILEDELETE syn keyword upstreamdat_Parameter FILEDELETE syn keyword upstreamdat_Parameter FILES syn keyword upstreamdat_Parameter FILES syn keyword upstreamdat_Parameter FILESOPENFORUPDAT syn keyword upstreamdat_Parameter FILESOPENFORUPDAT syn keyword upstreamdat_Parameter FILETRANSFER syn keyword upstreamdat_Parameter GETREMOTEFILES syn keyword upstreamdat_Parameter HARDLINKDB syn keyword upstreamdat_Parameter HARDLINKS syn keyword upstreamdat_Parameter HARDLINKS syn keyword upstreamdat_Parameter HIDDENFILES syn keyword upstreamdat_Parameter HIDDENFILES syn keyword upstreamdat_Parameter HOLDTAPE syn keyword upstreamdat_Parameter HOLDUSERDIRS syn keyword upstreamdat_Parameter HOSTFILENAME syn keyword upstreamdat_Parameter HOSTRECORD syn keyword upstreamdat_Parameter HOSTSORT syn keyword upstreamdat_Parameter IGNOREPLUGINSFORRESTORE syn keyword upstreamdat_Parameter INCRDB syn keyword upstreamdat_Parameter INCRDBARCHIVEBIT syn keyword upstreamdat_Parameter INCRDBDELETEDFILES syn keyword upstreamdat_Parameter INCREMENTAL syn keyword upstreamdat_Parameter INCREMENTAL syn keyword upstreamdat_Parameter INQOPTIONS syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT syn keyword upstreamdat_Parameter JOBOPTIONS syn keyword upstreamdat_Parameter JOBRETURNCODEMAP syn keyword upstreamdat_Parameter JOBWAITTIMELIMIT syn keyword upstreamdat_Parameter KEEPALIVE syn keyword upstreamdat_Parameter LANINTERFACE syn keyword upstreamdat_Parameter LANWSNAME syn keyword upstreamdat_Parameter LANWSPASSWORD syn keyword upstreamdat_Parameter LASTACCESS syn keyword upstreamdat_Parameter LASTACCESS syn keyword upstreamdat_Parameter LATESTDATE syn keyword upstreamdat_Parameter LATESTDATE syn keyword upstreamdat_Parameter LATESTTIME syn keyword upstreamdat_Parameter LATESTTIME syn keyword upstreamdat_Parameter LATESTVERSION syn keyword upstreamdat_Parameter LINEBLOCK syn keyword upstreamdat_Parameter LINETRUNC syn keyword upstreamdat_Parameter LISTENFORREMOTE syn keyword upstreamdat_Parameter LOCALBACKUP syn keyword upstreamdat_Parameter LOCALBACKUPDIR syn keyword upstreamdat_Parameter LOCALBACKUPMAX syn keyword upstreamdat_Parameter LOCALBACKUPMAXFILESIZE syn keyword upstreamdat_Parameter LOCALBACKUPMAXSIZE syn keyword upstreamdat_Parameter LOCALEXCLUDEFILE syn keyword upstreamdat_Parameter LOCALPARAMETERS syn keyword upstreamdat_Parameter LOCALPASSWORD syn keyword upstreamdat_Parameter LOCALRESTORE syn keyword upstreamdat_Parameter LOCALUSER syn keyword upstreamdat_Parameter LOFS syn keyword upstreamdat_Parameter LOGNONFATAL syn keyword upstreamdat_Parameter MAXBACKUPFILESFAIL syn keyword upstreamdat_Parameter MAXBACKUPTIME syn keyword upstreamdat_Parameter MAXDUPS syn keyword upstreamdat_Parameter MAXFILENAMESIZE syn keyword upstreamdat_Parameter MAXKFILESIZE syn keyword upstreamdat_Parameter MAXLOGDAYS syn keyword upstreamdat_Parameter MAXRESTOREFILESFAIL syn keyword upstreamdat_Parameter MAXRESTORETIME syn keyword upstreamdat_Parameter MAXRETRY syn keyword upstreamdat_Parameter MAXRPTDAYS syn keyword upstreamdat_Parameter MERGE syn keyword upstreamdat_Parameter MIGRBITS syn keyword upstreamdat_Parameter MIGRBITS syn keyword upstreamdat_Parameter MINCOMPRESSSIZE syn keyword upstreamdat_Parameter MINIMIZE syn keyword upstreamdat_Parameter MODIFYFILE syn keyword upstreamdat_Parameter MOUNTPOINTS syn keyword upstreamdat_Parameter MOUNTPOINTS syn keyword upstreamdat_Parameter NDS syn keyword upstreamdat_Parameter NDS syn keyword upstreamdat_Parameter NEWFILECOMPARE syn keyword upstreamdat_Parameter NFSBELOW syn keyword upstreamdat_Parameter NODATAOK syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL syn keyword upstreamdat_Parameter NONFILEDATABITMAP syn keyword upstreamdat_Parameter NONFILEDATABITMAP syn keyword upstreamdat_Parameter NOPOINTRESTORE syn keyword upstreamdat_Parameter NOSPECINHERITANCE syn keyword upstreamdat_Parameter NOTIFYEVENTS syn keyword upstreamdat_Parameter NOTIFYFAILUREATTACHMENT syn keyword upstreamdat_Parameter NOTIFYSUCCESSATTACHMENT syn keyword upstreamdat_Parameter NOTIFYTARGETS syn keyword upstreamdat_Parameter NOUIDGIDNAMES syn keyword upstreamdat_Parameter NOUIDGIDNAMES syn keyword upstreamdat_Parameter NOVELLMIGRATE syn keyword upstreamdat_Parameter NOVELLMIGRATE syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT syn keyword upstreamdat_Parameter NOVELLPROFILE syn keyword upstreamdat_Parameter NOVELLRECALL syn keyword upstreamdat_Parameter NTFSADDPERMISSION syn keyword upstreamdat_Parameter NTFSADDPERMISSION syn keyword upstreamdat_Parameter NTREGRESTORE syn keyword upstreamdat_Parameter OSTYPE syn keyword upstreamdat_Parameter OUTPORT syn keyword upstreamdat_Parameter PACKFLUSHAFTERFILE syn keyword upstreamdat_Parameter PACKRECSIZE syn keyword upstreamdat_Parameter PARAMETER syn keyword upstreamdat_Parameter PASSWORD syn keyword upstreamdat_Parameter PATHNAME syn keyword upstreamdat_Parameter PATHNAME syn keyword upstreamdat_Parameter PERFORMBITMAP syn keyword upstreamdat_Parameter PERFORMNUMRECORDS syn keyword upstreamdat_Parameter PERFORMRECORDSIZE syn keyword upstreamdat_Parameter PLUGIN syn keyword upstreamdat_Parameter PLUGIN syn keyword upstreamdat_Parameter PLUGINPARAMETERS syn keyword upstreamdat_Parameter PLUGINPARAMETERS syn keyword upstreamdat_Parameter POSTJOB syn keyword upstreamdat_Parameter PREJOB syn keyword upstreamdat_Parameter PRTYCLASS syn keyword upstreamdat_Parameter PRTYLEVEL syn keyword upstreamdat_Parameter RECALLCLEANUP syn keyword upstreamdat_Parameter RECALLOFFLINEFILES syn keyword upstreamdat_Parameter RECALLOFFLINEFILES syn keyword upstreamdat_Parameter RECORDSIZE syn keyword upstreamdat_Parameter REMOTEADDR syn keyword upstreamdat_Parameter REMOTEAPPLPREF syn keyword upstreamdat_Parameter REMOTEAPPLRETRY syn keyword upstreamdat_Parameter REMOTECONNECTTYPE syn keyword upstreamdat_Parameter REMOTEFLAGS syn keyword upstreamdat_Parameter REMOTEIPADAPTER syn keyword upstreamdat_Parameter REMOTELOCALPARAMETERS syn keyword upstreamdat_Parameter REMOTELOGMODE syn keyword upstreamdat_Parameter REMOTELUNAME syn keyword upstreamdat_Parameter REMOTEMAXRETRIES syn keyword upstreamdat_Parameter REMOTEMODENAME syn keyword upstreamdat_Parameter REMOTEPARAMETERFILE syn keyword upstreamdat_Parameter REMOTEPORT syn keyword upstreamdat_Parameter REMOTEREQUEST syn keyword upstreamdat_Parameter REMOTERESTART syn keyword upstreamdat_Parameter REMOTEROUTE syn keyword upstreamdat_Parameter REMOTETARGETNAME syn keyword upstreamdat_Parameter REMOTETCP syn keyword upstreamdat_Parameter REMOTETIMEOUT syn keyword upstreamdat_Parameter REMOTETMAXRETRY syn keyword upstreamdat_Parameter REMOTETPN syn keyword upstreamdat_Parameter REMOTEUSAPPL syn keyword upstreamdat_Parameter REMOTEVERIFY syn keyword upstreamdat_Parameter REMOTEWTOCOMP syn keyword upstreamdat_Parameter REPORTNAME syn keyword upstreamdat_Parameter REPORTOPTIONS syn keyword upstreamdat_Parameter RESTARTLASTFILE syn keyword upstreamdat_Parameter RESTART syn keyword upstreamdat_Parameter RESTARTTYPE syn keyword upstreamdat_Parameter RESTARTVERSIONDATE syn keyword upstreamdat_Parameter RESTOREARCHIVEBIT syn keyword upstreamdat_Parameter RESTORECHECKPOINT syn keyword upstreamdat_Parameter RESTOREDATELIMIT syn keyword upstreamdat_Parameter RESTOREDATELIMIT syn keyword upstreamdat_Parameter RESTOREFILEFAIL syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS syn keyword upstreamdat_Parameter RESTORESEGMENTS syn keyword upstreamdat_Parameter RESTORESEGMENTS syn keyword upstreamdat_Parameter RESTORETODIFFFS syn keyword upstreamdat_Parameter RETAIN syn keyword upstreamdat_Parameter RETAIN syn keyword upstreamdat_Parameter ROOTENTRY syn keyword upstreamdat_Parameter ROOTENTRY syn keyword upstreamdat_Parameter SAN syn keyword upstreamdat_Parameter SCHEDULENAME syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE syn keyword upstreamdat_Parameter SEGMENTSIZE syn keyword upstreamdat_Parameter SEGMENTSIZE syn keyword upstreamdat_Parameter SENDHOSTDETAILS syn keyword upstreamdat_Parameter SINGLEFS syn keyword upstreamdat_Parameter SIZETRC syn keyword upstreamdat_Parameter SKIP syn keyword upstreamdat_Parameter SKIPBACKUPSCAN syn keyword upstreamdat_Parameter SKIPOLD syn keyword upstreamdat_Parameter SKIPOLD syn keyword upstreamdat_Parameter SMSTARGETSERVICENAME syn keyword upstreamdat_Parameter SMSTSA syn keyword upstreamdat_Parameter SOLO syn keyword upstreamdat_Parameter SORTBACKUP syn keyword upstreamdat_Parameter SOSDISK syn keyword upstreamdat_Parameter SOSDISK syn keyword upstreamdat_Parameter SOSTIMESTAMP syn keyword upstreamdat_Parameter SOSTIMESTAMP syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH syn keyword upstreamdat_Parameter SPECNUMBER syn keyword upstreamdat_Parameter SPECNUMBER syn keyword upstreamdat_Parameter SPECTYPE syn keyword upstreamdat_Parameter SPECTYPE syn keyword upstreamdat_Parameter STARTTIME syn keyword upstreamdat_Parameter STORAGETYPE syn keyword upstreamdat_Parameter SUBDIRECTORIES syn keyword upstreamdat_Parameter SUBDIRECTORIES syn keyword upstreamdat_Parameter SWITCHTOTAPEMB syn keyword upstreamdat_Parameter TCPADDRESS syn keyword upstreamdat_Parameter TCPTIMEOUT syn keyword upstreamdat_Parameter TIMEOVERRIDE syn keyword upstreamdat_Parameter TRACE syn keyword upstreamdat_Parameter TRANSLATE syn keyword upstreamdat_Parameter ULTRACOMP syn keyword upstreamdat_Parameter ULTREG syn keyword upstreamdat_Parameter ULTUPD syn keyword upstreamdat_Parameter UNCMACHINEALIAS syn keyword upstreamdat_Parameter UNCMACHINEALIAS syn keyword upstreamdat_Parameter USEALEBRA syn keyword upstreamdat_Parameter USECONTROLFILE syn keyword upstreamdat_Parameter USEGID syn keyword upstreamdat_Parameter USERID syn keyword upstreamdat_Parameter USEUID syn keyword upstreamdat_Parameter USNOUIDGIDERRORS syn keyword upstreamdat_Parameter UTF8 syn keyword upstreamdat_Parameter VAULTNUMBER syn keyword upstreamdat_Parameter VERSIONDATE syn keyword upstreamdat_Parameter WRITESPARSE syn keyword upstreamdat_Parameter XFERECORDSIZE syn keyword upstreamdat_Parameter XFERRECSEP syn keyword upstreamdat_Parameter XFERRECUSECR " File Specs: syn match upstreamdat_Filespec /file spec\c \d\{1,3}.*/ " Comments: syn match upstreamdat_Comment /^#.*/ hi def link upstreamdat_Parameter Type "hi def link upstreamdat_Filespec Underlined hi def link upstreamdat_Comment Comment let b:current_syntax = "upstreamdat" neovim-0.2.2/runtime/syntax/upstreaminstalllog.vim000066400000000000000000000017131320401574200224670ustar00rootroot00000000000000" Vim syntax file " Language: Innovation Data Processing UPSTREAMInstall.log file " Maintainer: Rob Owens " Latest Revision: 2013-06-17 " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Date: syn match upstreaminstalllog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ " Msg Types: syn match upstreaminstalllog_MsgD /Msg #MSI\d\{4,5}D/ syn match upstreaminstalllog_MsgE /Msg #MSI\d\{4,5}E/ syn match upstreaminstalllog_MsgI /Msg #MSI\d\{4,5}I/ syn match upstreaminstalllog_MsgW /Msg #MSI\d\{4,5}W/ " IP Address: syn match upstreaminstalllog_IPaddr / \d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ hi def link upstreaminstalllog_Date Underlined hi def link upstreaminstalllog_MsgD Type hi def link upstreaminstalllog_MsgE Error hi def link upstreaminstalllog_MsgW Constant hi def link upstreaminstalllog_IPaddr Identifier let b:current_syntax = "upstreaminstalllog" neovim-0.2.2/runtime/syntax/upstreamlog.vim000066400000000000000000000050741320401574200211040ustar00rootroot00000000000000" Vim syntax file " Language: Innovation Data Processing upstream.log file " Maintainer: Rob Owens " Latest Revision: 2013-09-19 " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Date: syn match upstreamlog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ " Msg Types: syn match upstreamlog_MsgD /Msg #\(Agt\|PC\|Srv\)\d\{4,5}D/ nextgroup=upstreamlog_Process skipwhite syn match upstreamlog_MsgE /Msg #\(Agt\|PC\|Srv\)\d\{4,5}E/ nextgroup=upstreamlog_Process skipwhite syn match upstreamlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=upstreamlog_Process skipwhite syn match upstreamlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=upstreamlog_Process skipwhite " Processes: syn region upstreamlog_Process start="(" end=")" contained " IP Address: syn match upstreamlog_IPaddr /\( \|(\)\zs\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ " Profile: syn match upstreamlog_Profile /Using default configuration for profile \zs\S\{1,8}\ze/ syn match upstreamlog_Profile /Now running profile \zs\S\{1,8}\ze/ syn match upstreamlog_Profile /in profile set \zs\S\{1,8}\ze/ syn match upstreamlog_Profile /Migrate disk backup from profile \zs\S\{1,8}\ze/ syn match upstreamlog_Profile /Profileset=\zs\S\{1,8}\ze,/ syn match upstreamlog_Profile /Vault \(disk\|tape\) backup to vault \d\{1,4} from profile \zs\S\{1,8}\ze/ syn match upstreamlog_Profile /Profile name \zs\"\S\{1,8}\"/ syn match upstreamlog_Profile / Profile: \zs\S\{1,8}/ syn match upstreamlog_Profile / Profile: \zs\S\{1,8}\ze, / syn match upstreamlog_Profile /, profile: \zs\S\{1,8}\ze,/ syn match upstreamlog_Profile /found Profile: \zs\S\{1,8}\ze,/ syn match upstreamlog_Profile /Backup Profile: \zs\S\{1,8}\ze Version date/ syn match upstreamlog_Profile /Backup profile: \zs\S\{1,8}\ze Version date/ syn match upstreamlog_Profile /Full of \zs\S\{1,8}\ze$/ syn match upstreamlog_Profile /Incr. of \zs\S\{1,8}\ze$/ syn match upstreamlog_Profile /Profile=\zs\S\{1,8}\ze,/ " Target: syn region upstreamlog_Target start="Computer: \zs" end="\ze[\]\)]" syn region upstreamlog_Target start="Computer name \zs\"" end="\"\ze" syn region upstreamlog_Target start="request to registered name \zs" end=" " hi def link upstreamlog_Date Underlined hi def link upstreamlog_MsgD Type hi def link upstreamlog_MsgE Error hi def link upstreamlog_MsgW Constant hi def link upstreamlog_Process Statement hi def link upstreamlog_IPaddr Identifier hi def link upstreamlog_Profile Identifier hi def link upstreamlog_Target Identifier let b:current_syntax = "upstreamlog" neovim-0.2.2/runtime/syntax/upstreamrpt.vim000066400000000000000000000335651320401574200211360ustar00rootroot00000000000000" Vim syntax file " Language: Innovation Data Processing upstream.rpt file " Maintainer: Rob Owens " Latest Revision: 2014-03-13 " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal foldmethod=syntax " Parameters: syn keyword upstreamdat_Parameter ACCEPTPCREMOTE syn keyword upstreamdat_Parameter ACCEPTREMOTE syn keyword upstreamdat_Parameter ACTION syn keyword upstreamdat_Parameter ACTIVATEONENTRY syn keyword upstreamdat_Parameter ARCHIVEBIT syn keyword upstreamdat_Parameter ARCHIVEBIT syn keyword upstreamdat_Parameter ASCTOEBC syn keyword upstreamdat_Parameter ASRBACKUP syn keyword upstreamdat_Parameter ATTENDED syn keyword upstreamdat_Parameter AUTHORITATIVE syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE syn keyword upstreamdat_Parameter BACKUPPROFILE syn keyword upstreamdat_Parameter BACKUPPROFILE2 syn keyword upstreamdat_Parameter BACKUPREPARSEFILES syn keyword upstreamdat_Parameter BACKUPREPARSEFILES syn keyword upstreamdat_Parameter BACKUPVERIFY syn keyword upstreamdat_Parameter BLANKTRUNC syn keyword upstreamdat_Parameter CALCDASDSIZE syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS syn keyword upstreamdat_Parameter COMPRESSLEVEL syn keyword upstreamdat_Parameter CONTROLFILE syn keyword upstreamdat_Parameter DASDOVERRIDE syn keyword upstreamdat_Parameter DATELIMIT syn keyword upstreamdat_Parameter DATELIMIT syn keyword upstreamdat_Parameter DAYSOLD syn keyword upstreamdat_Parameter DAYSOLD syn keyword upstreamdat_Parameter DELETED syn keyword upstreamdat_Parameter DELETED syn keyword upstreamdat_Parameter DELETEPROMPTS syn keyword upstreamdat_Parameter DELETEPROMPTS syn keyword upstreamdat_Parameter DESTINATION syn keyword upstreamdat_Parameter DESTINATION syn keyword upstreamdat_Parameter DIRDELETE syn keyword upstreamdat_Parameter DIRECTORVMC syn keyword upstreamdat_Parameter DIRONLYRESTOREOK syn keyword upstreamdat_Parameter DIRSONLY syn keyword upstreamdat_Parameter DIRSONLY syn keyword upstreamdat_Parameter DISASTERRECOVERY syn keyword upstreamdat_Parameter DISPLAY syn keyword upstreamdat_Parameter DRIVEALIAS syn keyword upstreamdat_Parameter DRIVEALIAS syn keyword upstreamdat_Parameter DUALCOPY syn keyword upstreamdat_Parameter DUPDAYS syn keyword upstreamdat_Parameter DUPLICATE syn keyword upstreamdat_Parameter EBCTOASC syn keyword upstreamdat_Parameter ENCRYPT syn keyword upstreamdat_Parameter ENCRYPTLEVEL syn keyword upstreamdat_Parameter EXCLUDELISTNAME syn keyword upstreamdat_Parameter FAILBACKUPONERROR syn keyword upstreamdat_Parameter FAILBACKUPONERROR syn keyword upstreamdat_Parameter FAILIFNOFILES syn keyword upstreamdat_Parameter FAILIFNOFILES syn keyword upstreamdat_Parameter FAILIFSKIP syn keyword upstreamdat_Parameter FAILJOB syn keyword upstreamdat_Parameter FAILRESTOREONERROR syn keyword upstreamdat_Parameter FAILRESTOREONERROR syn keyword upstreamdat_Parameter FILEDATE syn keyword upstreamdat_Parameter FILEDATE syn keyword upstreamdat_Parameter FILEDELETE syn keyword upstreamdat_Parameter FILEDELETE syn keyword upstreamdat_Parameter FILES syn keyword upstreamdat_Parameter FILES syn keyword upstreamdat_Parameter FILESOPENFORUPDAT syn keyword upstreamdat_Parameter FILESOPENFORUPDAT syn keyword upstreamdat_Parameter FILETRANSFER syn keyword upstreamdat_Parameter GETREMOTEFILES syn keyword upstreamdat_Parameter HARDLINKDB syn keyword upstreamdat_Parameter HARDLINKS syn keyword upstreamdat_Parameter HARDLINKS syn keyword upstreamdat_Parameter HIDDENFILES syn keyword upstreamdat_Parameter HIDDENFILES syn keyword upstreamdat_Parameter HOLDTAPE syn keyword upstreamdat_Parameter HOLDUSERDIRS syn keyword upstreamdat_Parameter HOSTFILENAME syn keyword upstreamdat_Parameter HOSTRECORD syn keyword upstreamdat_Parameter HOSTSORT syn keyword upstreamdat_Parameter IGNOREPLUGINSFORRESTORE syn keyword upstreamdat_Parameter INCRDB syn keyword upstreamdat_Parameter INCRDBARCHIVEBIT syn keyword upstreamdat_Parameter INCRDBDELETEDFILES syn keyword upstreamdat_Parameter INCREMENTAL syn keyword upstreamdat_Parameter INCREMENTAL syn keyword upstreamdat_Parameter INQOPTIONS syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT syn keyword upstreamdat_Parameter JOBOPTIONS syn keyword upstreamdat_Parameter JOBRETURNCODEMAP syn keyword upstreamdat_Parameter JOBWAITTIMELIMIT syn keyword upstreamdat_Parameter KEEPALIVE syn keyword upstreamdat_Parameter LANINTERFACE syn keyword upstreamdat_Parameter LANWSNAME syn keyword upstreamdat_Parameter LANWSPASSWORD syn keyword upstreamdat_Parameter LASTACCESS syn keyword upstreamdat_Parameter LASTACCESS syn keyword upstreamdat_Parameter LATESTDATE syn keyword upstreamdat_Parameter LATESTDATE syn keyword upstreamdat_Parameter LATESTTIME syn keyword upstreamdat_Parameter LATESTTIME syn keyword upstreamdat_Parameter LATESTVERSION syn keyword upstreamdat_Parameter LINEBLOCK syn keyword upstreamdat_Parameter LINETRUNC syn keyword upstreamdat_Parameter LISTENFORREMOTE syn keyword upstreamdat_Parameter LOCALBACKUP syn keyword upstreamdat_Parameter LOCALBACKUPDIR syn keyword upstreamdat_Parameter LOCALBACKUPMAX syn keyword upstreamdat_Parameter LOCALBACKUPMAXFILESIZE syn keyword upstreamdat_Parameter LOCALBACKUPMAXSIZE syn keyword upstreamdat_Parameter LOCALEXCLUDEFILE syn keyword upstreamdat_Parameter LOCALPARAMETERS syn keyword upstreamdat_Parameter LOCALPASSWORD syn keyword upstreamdat_Parameter LOCALRESTORE syn keyword upstreamdat_Parameter LOCALUSER syn keyword upstreamdat_Parameter LOFS syn keyword upstreamdat_Parameter LOGNONFATAL syn keyword upstreamdat_Parameter MAXBACKUPFILESFAIL syn keyword upstreamdat_Parameter MAXBACKUPTIME syn keyword upstreamdat_Parameter MAXDUPS syn keyword upstreamdat_Parameter MAXFILENAMESIZE syn keyword upstreamdat_Parameter MAXKFILESIZE syn keyword upstreamdat_Parameter MAXLOGDAYS syn keyword upstreamdat_Parameter MAXRESTOREFILESFAIL syn keyword upstreamdat_Parameter MAXRESTORETIME syn keyword upstreamdat_Parameter MAXRETRY syn keyword upstreamdat_Parameter MAXRPTDAYS syn keyword upstreamdat_Parameter MERGE syn keyword upstreamdat_Parameter MIGRBITS syn keyword upstreamdat_Parameter MIGRBITS syn keyword upstreamdat_Parameter MINCOMPRESSSIZE syn keyword upstreamdat_Parameter MINIMIZE syn keyword upstreamdat_Parameter MODIFYFILE syn keyword upstreamdat_Parameter MOUNTPOINTS syn keyword upstreamdat_Parameter MOUNTPOINTS syn keyword upstreamdat_Parameter NDS syn keyword upstreamdat_Parameter NDS syn keyword upstreamdat_Parameter NEWFILECOMPARE syn keyword upstreamdat_Parameter NFSBELOW syn keyword upstreamdat_Parameter NODATAOK syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL syn keyword upstreamdat_Parameter NONFILEDATABITMAP syn keyword upstreamdat_Parameter NONFILEDATABITMAP syn keyword upstreamdat_Parameter NOPOINTRESTORE syn keyword upstreamdat_Parameter NOSPECINHERITANCE syn keyword upstreamdat_Parameter NOTIFYEVENTS syn keyword upstreamdat_Parameter NOTIFYFAILUREATTACHMENT syn keyword upstreamdat_Parameter NOTIFYSUCCESSATTACHMENT syn keyword upstreamdat_Parameter NOTIFYTARGETS syn keyword upstreamdat_Parameter NOUIDGIDNAMES syn keyword upstreamdat_Parameter NOUIDGIDNAMES syn keyword upstreamdat_Parameter NOVELLMIGRATE syn keyword upstreamdat_Parameter NOVELLMIGRATE syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT syn keyword upstreamdat_Parameter NOVELLPROFILE syn keyword upstreamdat_Parameter NOVELLRECALL syn keyword upstreamdat_Parameter NTFSADDPERMISSION syn keyword upstreamdat_Parameter NTFSADDPERMISSION syn keyword upstreamdat_Parameter NTREGRESTORE syn keyword upstreamdat_Parameter OSTYPE syn keyword upstreamdat_Parameter OUTPORT syn keyword upstreamdat_Parameter PACKFLUSHAFTERFILE syn keyword upstreamdat_Parameter PACKRECSIZE syn keyword upstreamdat_Parameter PARAMETER syn keyword upstreamdat_Parameter PASSWORD syn keyword upstreamdat_Parameter PATHNAME syn keyword upstreamdat_Parameter PATHNAME syn keyword upstreamdat_Parameter PERFORMBITMAP syn keyword upstreamdat_Parameter PERFORMNUMRECORDS syn keyword upstreamdat_Parameter PERFORMRECORDSIZE syn keyword upstreamdat_Parameter PLUGIN syn keyword upstreamdat_Parameter PLUGIN syn keyword upstreamdat_Parameter PLUGINPARAMETERS syn keyword upstreamdat_Parameter PLUGINPARAMETERS syn keyword upstreamdat_Parameter POSTJOB syn keyword upstreamdat_Parameter PREJOB syn keyword upstreamdat_Parameter PRTYCLASS syn keyword upstreamdat_Parameter PRTYLEVEL syn keyword upstreamdat_Parameter RECALLCLEANUP syn keyword upstreamdat_Parameter RECALLOFFLINEFILES syn keyword upstreamdat_Parameter RECALLOFFLINEFILES syn keyword upstreamdat_Parameter RECORDSIZE syn keyword upstreamdat_Parameter REMOTEADDR syn keyword upstreamdat_Parameter REMOTEAPPLPREF syn keyword upstreamdat_Parameter REMOTEAPPLRETRY syn keyword upstreamdat_Parameter REMOTECONNECTTYPE syn keyword upstreamdat_Parameter REMOTEFLAGS syn keyword upstreamdat_Parameter REMOTEIPADAPTER syn keyword upstreamdat_Parameter REMOTELOCALPARAMETERS syn keyword upstreamdat_Parameter REMOTELOGMODE syn keyword upstreamdat_Parameter REMOTELUNAME syn keyword upstreamdat_Parameter REMOTEMAXRETRIES syn keyword upstreamdat_Parameter REMOTEMODENAME syn keyword upstreamdat_Parameter REMOTEPARAMETERFILE syn keyword upstreamdat_Parameter REMOTEPORT syn keyword upstreamdat_Parameter REMOTEREQUEST syn keyword upstreamdat_Parameter REMOTERESTART syn keyword upstreamdat_Parameter REMOTEROUTE syn keyword upstreamdat_Parameter REMOTETARGETNAME syn keyword upstreamdat_Parameter REMOTETCP syn keyword upstreamdat_Parameter REMOTETIMEOUT syn keyword upstreamdat_Parameter REMOTETMAXRETRY syn keyword upstreamdat_Parameter REMOTETPN syn keyword upstreamdat_Parameter REMOTEUSAPPL syn keyword upstreamdat_Parameter REMOTEVERIFY syn keyword upstreamdat_Parameter REMOTEWTOCOMP syn keyword upstreamdat_Parameter REPORTNAME syn keyword upstreamdat_Parameter REPORTOPTIONS syn keyword upstreamdat_Parameter RESTARTLASTFILE syn keyword upstreamdat_Parameter RESTART syn keyword upstreamdat_Parameter RESTARTTYPE syn keyword upstreamdat_Parameter RESTARTVERSIONDATE syn keyword upstreamdat_Parameter RESTOREARCHIVEBIT syn keyword upstreamdat_Parameter RESTORECHECKPOINT syn keyword upstreamdat_Parameter RESTOREDATELIMIT syn keyword upstreamdat_Parameter RESTOREDATELIMIT syn keyword upstreamdat_Parameter RESTOREFILEFAIL syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS syn keyword upstreamdat_Parameter RESTORESEGMENTS syn keyword upstreamdat_Parameter RESTORESEGMENTS syn keyword upstreamdat_Parameter RESTORETODIFFFS syn keyword upstreamdat_Parameter RETAIN syn keyword upstreamdat_Parameter RETAIN syn keyword upstreamdat_Parameter ROOTENTRY syn keyword upstreamdat_Parameter ROOTENTRY syn keyword upstreamdat_Parameter SAN syn keyword upstreamdat_Parameter SCHEDULENAME syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE syn keyword upstreamdat_Parameter SEGMENTSIZE syn keyword upstreamdat_Parameter SEGMENTSIZE syn keyword upstreamdat_Parameter SENDHOSTDETAILS syn keyword upstreamdat_Parameter SINGLEFS syn keyword upstreamdat_Parameter SIZETRC syn keyword upstreamdat_Parameter SKIP syn keyword upstreamdat_Parameter SKIPBACKUPSCAN syn keyword upstreamdat_Parameter SKIPOLD syn keyword upstreamdat_Parameter SKIPOLD syn keyword upstreamdat_Parameter SMSTARGETSERVICENAME syn keyword upstreamdat_Parameter SMSTSA syn keyword upstreamdat_Parameter SOLO syn keyword upstreamdat_Parameter SORTBACKUP syn keyword upstreamdat_Parameter SOSDISK syn keyword upstreamdat_Parameter SOSDISK syn keyword upstreamdat_Parameter SOSTIMESTAMP syn keyword upstreamdat_Parameter SOSTIMESTAMP syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH syn keyword upstreamdat_Parameter SPECNUMBER syn keyword upstreamdat_Parameter SPECNUMBER syn keyword upstreamdat_Parameter SPECTYPE syn keyword upstreamdat_Parameter SPECTYPE syn keyword upstreamdat_Parameter STARTTIME syn keyword upstreamdat_Parameter STORAGETYPE syn keyword upstreamdat_Parameter SUBDIRECTORIES syn keyword upstreamdat_Parameter SUBDIRECTORIES syn keyword upstreamdat_Parameter SWITCHTOTAPEMB syn keyword upstreamdat_Parameter TCPADDRESS syn keyword upstreamdat_Parameter TCPTIMEOUT syn keyword upstreamdat_Parameter TIMEOVERRIDE syn keyword upstreamdat_Parameter TRACE syn keyword upstreamdat_Parameter TRANSLATE syn keyword upstreamdat_Parameter ULTRACOMP syn keyword upstreamdat_Parameter ULTREG syn keyword upstreamdat_Parameter ULTUPD syn keyword upstreamdat_Parameter UNCMACHINEALIAS syn keyword upstreamdat_Parameter UNCMACHINEALIAS syn keyword upstreamdat_Parameter USEALEBRA syn keyword upstreamdat_Parameter USECONTROLFILE syn keyword upstreamdat_Parameter USEGID syn keyword upstreamdat_Parameter USERID syn keyword upstreamdat_Parameter USEUID syn keyword upstreamdat_Parameter USNOUIDGIDERRORS syn keyword upstreamdat_Parameter UTF8 syn keyword upstreamdat_Parameter VAULTNUMBER syn keyword upstreamdat_Parameter VERSIONDATE syn keyword upstreamdat_Parameter WRITESPARSE syn keyword upstreamdat_Parameter XFERECORDSIZE syn keyword upstreamdat_Parameter XFERRECSEP syn keyword upstreamdat_Parameter XFERRECUSECR " File Specs: syn match upstreamdat_Filespec /file spec\c \d\{1,3}.*/ " Comments: syn match upstreamdat_Comment /^#.*/ " List Of Parameters: syn region upstreamdat_Parms start="Current Parameters:" end="End Of Parameters" transparent fold hi def link upstreamdat_Parameter Type "hi def link upstreamdat_Filespec Underlined hi def link upstreamdat_Comment Comment let b:current_syntax = "upstreamdat" neovim-0.2.2/runtime/syntax/usserverlog.vim000066400000000000000000000060561320401574200211230ustar00rootroot00000000000000" Vim syntax file " Language: Innovation Data Processing usserver.log file " Maintainer: Rob Owens " Latest Revision: 2013-09-19 " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Date: syn match usserverlog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ " Msg Types: syn match usserverlog_MsgD /Msg #\(Agt\|PC\|Srv\)\d\{4,5}D/ nextgroup=usserverlog_Process skipwhite syn match usserverlog_MsgE /Msg #\(Agt\|PC\|Srv\)\d\{4,5}E/ nextgroup=usserverlog_Process skipwhite syn match usserverlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=usserverlog_Process skipwhite syn match usserverlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=usserverlog_Process skipwhite " Processes: syn region usserverlog_Process start="(" end=")" contained " IP Address: syn match usserverlog_IPaddr /\( \|(\)\zs\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ " Profile: syn match usserverlog_Profile /Using default configuration for profile \zs\S\{1,8}\ze/ syn match usserverlog_Profile /Now running profile \zs\S\{1,8}\ze/ syn match usserverlog_Profile /in profile set \zs\S\{1,8}\ze/ syn match usserverlog_Profile /Migrate disk backup from profile \zs\S\{1,8}\ze/ syn match usserverlog_Profile /Using profile prefix for profile \zs\S\{1,8}\ze/ syn match usserverlog_Profile /Add\/update profile \zs\S\{1,8}\ze/ syn match usserverlog_Profile /Profileset=\zs\S\{1,8}\ze,/ syn match usserverlog_Profile /profileset=\zs\S\{1,8}\ze/ syn match usserverlog_Profile /Vault \(disk\|tape\) backup to vault \d\{1,4} from profile \zs\S\{1,8}\ze/ syn match usserverlog_Profile /Profile name \zs\"\S\{1,8}\"/ syn match usserverlog_Profile / Profile: \zs\S\{1,8}/ syn match usserverlog_Profile / Profile: \zs\S\{1,8}\ze, / syn match usserverlog_Profile /, profile: \zs\S\{1,8}\ze,/ syn match usserverlog_Profile /Expecting Profile: \zs\S\{1,8}\ze,/ syn match usserverlog_Profile /found Profile: \zs\S\{1,8}\ze,/ syn match usserverlog_Profile /Profile \zs\S\{1,8} \zeis a member of group: / syn match upstreamlog_Profile /Backup Profile: \zs\S\{1,8}\ze Version date/ syn match upstreamlog_Profile /Backup profile: \zs\S\{1,8}\ze Version date/ syn match usserverlog_Profile /Full of \zs\S\{1,8}\ze$/ syn match usserverlog_Profile /Incr. of \zs\S\{1,8}\ze$/ syn match usserverlog_Profile /Profile=\zs\S\{1,8}\ze,/ " Target: syn region usserverlog_Target start="Computer: \zs" end="\ze[\]\)]" syn region usserverlog_Target start="Computer name \zs\"" end="\"\ze" syn region usserverlog_Target start="Registration add request successful \zs" end="$" syn region usserverlog_Target start="request to registered name \zs" end=" " syn region usserverlog_Target start=", sending to \zs" end="$" hi def link usserverlog_Date Underlined hi def link usserverlog_MsgD Type hi def link usserverlog_MsgE Error hi def link usserverlog_MsgW Constant hi def link usserverlog_Process Statement hi def link usserverlog_IPaddr Identifier hi def link usserverlog_Profile Identifier hi def link usserverlog_Target Identifier let b:current_syntax = "usserverlog" neovim-0.2.2/runtime/syntax/usw2kagtlog.vim000066400000000000000000000052161320401574200210110ustar00rootroot00000000000000" Vim syntax file " Language: Innovation Data Processing USW2KAgt.log file " Maintainer: Rob Owens " Latest Revision: 2014-04-01 " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Date: syn match usw2kagtlog_Date /\u\l\l \u\l\l\s\{1,2}\d\{1,2} \d\d:\d\d:\d\d \d\d\d\d/ " Msg Types: syn match usw2kagtlog_MsgD /Msg #\(Agt\|PC\|Srv\)\d\{4,5}D/ nextgroup=usw2kagtlog_Process skipwhite syn match usw2kagtlog_MsgE /Msg #\(Agt\|PC\|Srv\)\d\{4,5}E/ nextgroup=usw2kagtlog_Process skipwhite syn match usw2kagtlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=usw2kagtlog_Process skipwhite syn match usw2kagtlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=usw2kagtlog_Process skipwhite " Processes: syn region usw2kagtlog_Process start="(" end=")" contained "syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client request" "syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client request" "syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client\s\{0,1}\r\{0,1}\s\{1,9}request" "syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client\s\{0,1}\r\{0,1}\s\{1,9}request" syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client" syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client" " IP Address: syn match usw2kagtlog_IPaddr / \d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ " Profile: syn match usw2kagtlog_Profile /Profile name \zs\"\S\{1,8}\"/ syn match usw2kagtlog_Profile / Profile: \zs\S\{1,8}/ syn match usw2kagtlog_Profile / Profile: \zs\S\{1,8}\ze, / syn match upstreamlog_Profile /Backup Profile: \zs\S\{1,8}\ze Version date/ syn match upstreamlog_Profile /Backup profile: \zs\S\{1,8}\ze Version date/ syn match usw2kagtlog_Profile /Full of \zs\S\{1,8}\ze$/ syn match usw2kagtlog_Profile /Incr. of \zs\S\{1,8}\ze$/ syn match usw2kagtlog_Profile /profile name "\zs\S\{1,8}\ze"/ " Target: syn region usw2kagtlog_Target start="Computer: \zs" end="\ze[\]\)]" syn region usw2kagtlog_Target start="Computer name \zs\"" end="\"\ze" " Agent Keywords: syn keyword usw2kagtlog_Agentword opened closed hi def link usw2kagtlog_Date Underlined hi def link usw2kagtlog_MsgD Type hi def link usw2kagtlog_MsgE Error hi def link usw2kagtlog_MsgW Constant hi def link usw2kagtlog_Process Statement hi def link usw2kagtlog_IPaddr Identifier hi def link usw2kagtlog_Profile Identifier hi def link usw2kagtlog_Target Identifier hi def link usw2kagtlog_Agentword Special let b:current_syntax = "usw2kagentlog" neovim-0.2.2/runtime/syntax/valgrind.vim000066400000000000000000000062621320401574200203500ustar00rootroot00000000000000" Vim syntax file " Language: Valgrind Memory Debugger Output " Maintainer: Roger Luethi " Program URL: http://devel-home.kde.org/~sewardj/ " Last Change: 2015 Jan 27 " Included improvement by Dominique Pelle " " Notes: mostly based on strace.vim and xml.vim " " Contributors: Christoph Gysin " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:keepcpo= &cpo set cpo&vim " Lines can be long with demangled c++ functions. setlocal synmaxcol=8000 syn case match syn sync minlines=50 syn match valgrindSpecLine "^[+-]\{2}\d\+[+-]\{2}.*$" syn region valgrindRegion \ start=+^==\z(\d\+\)== \w.*$+ \ skip=+^==\z1==\( \| .*\)$+ \ end=+^+ \ fold \ keepend \ contains=valgrindPidChunk,valgrindLine syn region valgrindPidChunk \ start=+^==\zs+ \ end=+\ze==+ \ contained \ contains=valgrindPid0,valgrindPid1,valgrindPid2,valgrindPid3,valgrindPid4,valgrindPid5,valgrindPid6,valgrindPid7,valgrindPid8,valgrindPid9 \ keepend syn match valgrindPid0 "\d\+0=" contained syn match valgrindPid1 "\d\+1=" contained syn match valgrindPid2 "\d\+2=" contained syn match valgrindPid3 "\d\+3=" contained syn match valgrindPid4 "\d\+4=" contained syn match valgrindPid5 "\d\+5=" contained syn match valgrindPid6 "\d\+6=" contained syn match valgrindPid7 "\d\+7=" contained syn match valgrindPid8 "\d\+8=" contained syn match valgrindPid9 "\d\+9=" contained syn region valgrindLine \ start=+\(^==\d\+== \)\@<=+ \ end=+$+ \ keepend \ contained \ contains=valgrindOptions,valgrindMsg,valgrindLoc syn match valgrindOptions "[ ]\{3}-.*$" contained syn match valgrindMsg "\S.*$" contained \ contains=valgrindError,valgrindNote,valgrindSummary syn match valgrindError "\(Invalid\|\d\+ errors\|.* definitely lost\).*$" contained syn match valgrindNote ".*still reachable.*" contained syn match valgrindSummary ".*SUMMARY:" contained syn match valgrindLoc "\s\+\(by\|at\|Address\).*$" contained \ contains=valgrindAt,valgrindAddr,valgrindFunc,valgrindBin,valgrindSrc syn match valgrindAt "at\s\@=" contained syn match valgrindAddr "\W\zs0x\x\+" contained syn match valgrindFunc ": \zs\h[a-zA-Z0-9_:\[\]()<>&*+\-,=%!|^ ]*\ze([^)]*)$" contained syn match valgrindBin "(\(with\)\=in \zs\S\+)\@=" contained syn match valgrindSrc "(\zs[^)]*:\d\+)\@=" contained " Define the default highlighting hi def link valgrindSpecLine Type "hi def link valgrindRegion Special hi def link valgrindPid0 Special hi def link valgrindPid1 Comment hi def link valgrindPid2 Type hi def link valgrindPid3 Constant hi def link valgrindPid4 Number hi def link valgrindPid5 Identifier hi def link valgrindPid6 Statement hi def link valgrindPid7 Error hi def link valgrindPid8 LineNr hi def link valgrindPid9 Normal "hi def link valgrindLine Special hi def link valgrindOptions Type "hi def link valgrindMsg Special "hi def link valgrindLoc Special hi def link valgrindError Special hi def link valgrindNote Comment hi def link valgrindSummary Type hi def link valgrindAt Special hi def link valgrindAddr Number hi def link valgrindFunc Type hi def link valgrindBin Comment hi def link valgrindSrc Statement let b:current_syntax = "valgrind" let &cpo = s:keepcpo unlet s:keepcpo neovim-0.2.2/runtime/syntax/vb.vim000066400000000000000000000475131320401574200171550ustar00rootroot00000000000000" Vim syntax file " Language: Visual Basic " Maintainer: Tim Chase " Former Maintainer: Robert M. Cortopassi " (tried multiple times to contact, but email bounced) " Last Change: " 2005 May 25 Synched with work by Thomas Barthel " 2004 May 30 Added a few keywords " This was thrown together after seeing numerous requests on the " VIM and VIM-DEV mailing lists. It is by no means complete. " Send comments, suggestions and requests to the maintainer. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " VB is case insensitive syn case ignore syn keyword vbConditional If Then ElseIf Else Select Case syn keyword vbOperator AddressOf And ByRef ByVal Eqv Imp In syn keyword vbOperator Is Like Mod Not Or To Xor syn match vbOperator "[()+.,\-/*=&]" syn match vbOperator "[<>]=\=" syn match vbOperator "<>" syn match vbOperator "\s\+_$" syn keyword vbBoolean True False syn keyword vbConst Null Nothing syn keyword vbRepeat Do For ForEach Loop Next syn keyword vbRepeat Step To Until Wend While syn keyword vbEvents AccessKeyPress Activate ActiveRowChanged syn keyword vbEvents AfterAddFile AfterChangeFileName AfterCloseFile syn keyword vbEvents AfterColEdit AfterColUpdate AfterDelete syn keyword vbEvents AfterInsert AfterLabelEdit AfterRemoveFile syn keyword vbEvents AfterUpdate AfterWriteFile AmbientChanged syn keyword vbEvents ApplyChanges Associate AsyncProgress syn keyword vbEvents AsyncReadComplete AsyncReadProgress AxisActivated syn keyword vbEvents AxisLabelActivated AxisLabelSelected syn keyword vbEvents AxisLabelUpdated AxisSelected AxisTitleActivated syn keyword vbEvents AxisTitleSelected AxisTitleUpdated AxisUpdated syn keyword vbEvents BeforeClick BeforeColEdit BeforeColUpdate syn keyword vbEvents BeforeConnect BeforeDelete BeforeInsert syn keyword vbEvents BeforeLabelEdit BeforeLoadFile BeforeUpdate syn keyword vbEvents BeginRequest BeginTrans ButtonClick syn keyword vbEvents ButtonCompleted ButtonDropDown ButtonGotFocus syn keyword vbEvents ButtonLostFocus CallbackKeyDown Change Changed syn keyword vbEvents ChartActivated ChartSelected ChartUpdated Click syn keyword vbEvents Close CloseQuery CloseUp ColEdit ColResize syn keyword vbEvents Collapse ColumnClick CommitTrans Compare syn keyword vbEvents ConfigChageCancelled ConfigChanged syn keyword vbEvents ConfigChangedCancelled Connect ConnectionRequest syn keyword vbEvents CurrentRecordChanged DECommandAdded syn keyword vbEvents DECommandPropertyChanged DECommandRemoved syn keyword vbEvents DEConnectionAdded DEConnectionPropertyChanged syn keyword vbEvents DEConnectionRemoved DataArrival DataChanged syn keyword vbEvents DataUpdated DateClicked DblClick Deactivate syn keyword vbEvents DevModeChange DeviceArrival DeviceOtherEvent syn keyword vbEvents DeviceQueryRemove DeviceQueryRemoveFailed syn keyword vbEvents DeviceRemoveComplete DeviceRemovePending syn keyword vbEvents Disconnect DisplayChanged Dissociate syn keyword vbEvents DoGetNewFileName Done DonePainting DownClick syn keyword vbEvents DragDrop DragOver DropDown EditProperty EditQuery syn keyword vbEvents EndRequest EnterCell EnterFocus ExitFocus Expand syn keyword vbEvents FontChanged FootnoteActivated FootnoteSelected syn keyword vbEvents FootnoteUpdated Format FormatSize GotFocus syn keyword vbEvents HeadClick HeightChanged Hide InfoMessage syn keyword vbEvents IniProperties InitProperties Initialize syn keyword vbEvents ItemActivated ItemAdded ItemCheck ItemClick syn keyword vbEvents ItemReloaded ItemRemoved ItemRenamed syn keyword vbEvents ItemSeletected KeyDown KeyPress KeyUp LeaveCell syn keyword vbEvents LegendActivated LegendSelected LegendUpdated syn keyword vbEvents LinkClose LinkError LinkExecute LinkNotify syn keyword vbEvents LinkOpen Load LostFocus MouseDown MouseMove syn keyword vbEvents MouseUp NodeCheck NodeClick OLECompleteDrag syn keyword vbEvents OLEDragDrop OLEDragOver OLEGiveFeedback OLESetData syn keyword vbEvents OLEStartDrag ObjectEvent ObjectMove OnAddNew syn keyword vbEvents OnComm Paint PanelClick PanelDblClick PathChange syn keyword vbEvents PatternChange PlotActivated PlotSelected syn keyword vbEvents PlotUpdated PointActivated PointLabelActivated syn keyword vbEvents PointLabelSelected PointLabelUpdated PointSelected syn keyword vbEvents PointUpdated PowerQuerySuspend PowerResume syn keyword vbEvents PowerStatusChanged PowerSuspend ProcessTag syn keyword vbEvents ProcessingTimeout QueryChangeConfig QueryClose syn keyword vbEvents QueryComplete QueryCompleted QueryTimeout syn keyword vbEvents QueryUnload ReadProperties RepeatedControlLoaded syn keyword vbEvents RepeatedControlUnloaded Reposition syn keyword vbEvents RequestChangeFileName RequestWriteFile Resize syn keyword vbEvents ResultsChanged RetainedProject RollbackTrans syn keyword vbEvents RowColChange RowCurrencyChange RowResize syn keyword vbEvents RowStatusChanged Scroll SelChange SelectionChanged syn keyword vbEvents SendComplete SendProgress SeriesActivated syn keyword vbEvents SeriesSelected SeriesUpdated SettingChanged Show syn keyword vbEvents SplitChange Start StateChanged StatusUpdate syn keyword vbEvents SysColorsChanged Terminate TimeChanged Timer syn keyword vbEvents TitleActivated TitleSelected TitleUpdated syn keyword vbEvents UnboundAddData UnboundDeleteRow syn keyword vbEvents UnboundGetRelativeBookmark UnboundReadData syn keyword vbEvents UnboundWriteData Unformat Unload UpClick Updated syn keyword vbEvents UserEvent Validate ValidationError syn keyword vbEvents VisibleRecordChanged WillAssociate WillChangeData syn keyword vbEvents WillDissociate WillExecute WillUpdateRows syn keyword vbEvents WriteProperties syn keyword vbFunction Abs Array Asc AscB AscW Atn Avg BOF CBool CByte syn keyword vbFunction CCur CDate CDbl CInt CLng CSng CStr CVDate CVErr syn keyword vbFunction CVar CallByName Cdec Choose Chr ChrB ChrW Command syn keyword vbFunction Cos Count CreateObject CurDir DDB Date DateAdd syn keyword vbFunction DateDiff DatePart DateSerial DateValue Day Dir syn keyword vbFunction DoEvents EOF Environ Error Exp FV FileAttr syn keyword vbFunction FileDateTime FileLen FilterFix Fix Format syn keyword vbFunction FormatCurrency FormatDateTime FormatNumber syn keyword vbFunction FormatPercent FreeFile GetAllStrings GetAttr syn keyword vbFunction GetAutoServerSettings GetObject GetSetting Hex syn keyword vbFunction Hour IIf IMEStatus IPmt InStr Input InputB syn keyword vbFunction InputBox InstrB Int IsArray IsDate IsEmpty IsError syn keyword vbFunction IsMissing IsNull IsNumeric IsObject Join LBound syn keyword vbFunction LCase LOF LTrim Left LeftB Len LenB LoadPicture syn keyword vbFunction LoadResData LoadResPicture LoadResString Loc Log syn keyword vbFunction MIRR Max Mid MidB Min Minute Month MonthName syn keyword vbFunction MsgBox NPV NPer Now Oct PPmt PV Partition Pmt syn keyword vbFunction QBColor RGB RTrim Rate Replace Right RightB Rnd syn keyword vbFunction Round SLN SYD Second Seek Sgn Shell Sin Space Spc syn keyword vbFunction Split Sqr StDev StDevP Str StrComp StrConv syn keyword vbFunction StrReverse String Sum Switch Tab Tan Time syn keyword vbFunction TimeSerial TimeValue Timer Trim TypeName UBound syn keyword vbFunction UCase Val Var VarP VarType Weekday WeekdayName syn keyword vbFunction Year syn keyword vbMethods AboutBox Accept Activate Add AddCustom AddFile syn keyword vbMethods AddFromFile AddFromGuid AddFromString syn keyword vbMethods AddFromTemplate AddItem AddNew AddToAddInToolbar syn keyword vbMethods AddToolboxProgID Append AppendAppendChunk syn keyword vbMethods AppendChunk Arrange Assert AsyncRead BatchUpdate syn keyword vbMethods BeginQueryEdit BeginTrans Bind BuildPath syn keyword vbMethods CanPropertyChange Cancel CancelAsyncRead syn keyword vbMethods CancelBatch CancelUpdate CaptureImage CellText syn keyword vbMethods CellValue Circle Clear ClearFields ClearSel syn keyword vbMethods ClearSelCols ClearStructure Clone Close Cls syn keyword vbMethods ColContaining CollapseAll ColumnSize CommitTrans syn keyword vbMethods CompactDatabase Compose Connect Copy CopyFile syn keyword vbMethods CopyFolder CopyQueryDef Count CreateDatabase syn keyword vbMethods CreateDragImage CreateEmbed CreateField syn keyword vbMethods CreateFolder CreateGroup CreateIndex CreateLink syn keyword vbMethods CreatePreparedStatement CreatePropery CreateQuery syn keyword vbMethods CreateQueryDef CreateRelation CreateTableDef syn keyword vbMethods CreateTextFile CreateToolWindow CreateUser syn keyword vbMethods CreateWorkspace Customize Cut Delete syn keyword vbMethods DeleteColumnLabels DeleteColumns DeleteFile syn keyword vbMethods DeleteFolder DeleteLines DeleteRowLabels syn keyword vbMethods DeleteRows DeselectAll DesignerWindow DoVerb Drag syn keyword vbMethods Draw DriveExists Edit EditCopy EditPaste EndDoc syn keyword vbMethods EnsureVisible EstablishConnection Execute Exists syn keyword vbMethods Expand Export ExportReport ExtractIcon Fetch syn keyword vbMethods FetchVerbs FileExists Files FillCache Find syn keyword vbMethods FindFirst FindItem FindLast FindNext FindPrevious syn keyword vbMethods FolderExists Forward GetAbsolutePathName syn keyword vbMethods GetBaseName GetBookmark GetChunk GetClipString syn keyword vbMethods GetData GetDrive GetDriveName GetFile GetFileName syn keyword vbMethods GetFirstVisible GetFolder GetFormat GetHeader syn keyword vbMethods GetLineFromChar GetNumTicks GetParentFolderName syn keyword vbMethods GetRows GetSelectedPart GetSelection syn keyword vbMethods GetSpecialFolder GetTempName GetText syn keyword vbMethods GetVisibleCount GoBack GoForward Hide HitTest syn keyword vbMethods HoldFields Idle Import InitializeLabels Insert syn keyword vbMethods InsertColumnLabels InsertColumns InsertFile syn keyword vbMethods InsertLines InsertObjDlg InsertRowLabels syn keyword vbMethods InsertRows Item Keys KillDoc Layout Line Lines syn keyword vbMethods LinkExecute LinkPoke LinkRequest LinkSend Listen syn keyword vbMethods LoadFile LoadResData LoadResPicture LoadResString syn keyword vbMethods LogEvent MakeCompileFile MakeCompiledFile syn keyword vbMethods MakeReplica MoreResults Move MoveData MoveFile syn keyword vbMethods MoveFirst MoveFolder MoveLast MoveNext syn keyword vbMethods MovePrevious NavigateTo NewPage NewPassword syn keyword vbMethods NextRecordset OLEDrag OnAddinsUpdate OnConnection syn keyword vbMethods OnDisconnection OnStartupComplete Open syn keyword vbMethods OpenAsTextStream OpenConnection OpenDatabase syn keyword vbMethods OpenQueryDef OpenRecordset OpenResultset OpenURL syn keyword vbMethods Overlay PSet PaintPicture PastSpecialDlg Paste syn keyword vbMethods PeekData Play Point PopulatePartial PopupMenu syn keyword vbMethods Print PrintForm PrintReport PropertyChanged Quit syn keyword vbMethods Raise RandomDataFill RandomFillColumns syn keyword vbMethods RandomFillRows ReFill Read ReadAll ReadFromFile syn keyword vbMethods ReadLine ReadProperty Rebind Refresh RefreshLink syn keyword vbMethods RegisterDatabase ReleaseInstance Reload Remove syn keyword vbMethods RemoveAddInFromToolbar RemoveAll RemoveItem Render syn keyword vbMethods RepairDatabase ReplaceLine Reply ReplyAll Requery syn keyword vbMethods ResetCustom ResetCustomLabel ResolveName syn keyword vbMethods RestoreToolbar Resync Rollback RollbackTrans syn keyword vbMethods RowBookmark RowContaining RowTop Save SaveAs syn keyword vbMethods SaveFile SaveToFile SaveToOle1File SaveToolbar syn keyword vbMethods Scale ScaleX ScaleY Scroll SelPrint SelectAll syn keyword vbMethods SelectPart Send SendData Set SetAutoServerSettings syn keyword vbMethods SetData SetFocus SetOption SetSelection SetSize syn keyword vbMethods SetText SetViewport Show ShowColor ShowFont syn keyword vbMethods ShowHelp ShowOpen ShowPrinter ShowSave syn keyword vbMethods ShowWhatsThis SignOff SignOn Size Skip SkipLine syn keyword vbMethods Span Split SplitContaining StartLabelEdit syn keyword vbMethods StartLogging Stop Synchronize Tag TextHeight syn keyword vbMethods TextWidth ToDefaults Trace TwipsToChartPart syn keyword vbMethods TypeByChartType URLFor Update UpdateControls syn keyword vbMethods UpdateRecord UpdateRow Upto ValidateControls Value syn keyword vbMethods WhatsThisMode Write WriteBlankLines WriteLine syn keyword vbMethods WriteProperty WriteTemplate ZOrder syn keyword vbMethods rdoCreateEnvironment rdoRegisterDataSource syn keyword vbStatement Alias AppActivate As Base Beep Begin Call ChDir syn keyword vbStatement ChDrive Close Const Date Declare DefBool DefByte syn keyword vbStatement DefCur DefDate DefDbl DefDec DefInt DefLng DefObj syn keyword vbStatement DefSng DefStr DefVar Deftype DeleteSetting Dim Do syn keyword vbStatement Each ElseIf End Enum Erase Error Event Exit syn keyword vbStatement Explicit FileCopy For ForEach Function Get GoSub syn keyword vbStatement GoTo Gosub Implements Kill LSet Let Lib LineInput syn keyword vbStatement Load Lock Loop Mid MkDir Name Next On OnError Open syn keyword vbStatement Option Preserve Private Property Public Put RSet syn keyword vbStatement RaiseEvent Randomize ReDim Redim Reset Resume syn keyword vbStatement Return RmDir SavePicture SaveSetting Seek SendKeys syn keyword vbStatement Sendkeys Set SetAttr Static Step Stop Sub Time syn keyword vbStatement Type Unload Unlock Until Wend While Width With syn keyword vbStatement Write syn keyword vbKeyword As Binary ByRef ByVal Date Empty Error Friend Get syn keyword vbKeyword Input Is Len Lock Me Mid New Nothing Null On syn keyword vbKeyword Option Optional ParamArray Print Private Property syn keyword vbKeyword Public PublicNotCreateable OnNewProcessSingleUse syn keyword vbKeyword InSameProcessMultiUse GlobalMultiUse Resume Seek syn keyword vbKeyword Set Static Step String Time WithEvents syn keyword vbTodo contained TODO "Datatypes syn keyword vbTypes Boolean Byte Currency Date Decimal Double Empty syn keyword vbTypes Integer Long Object Single String Variant "VB defined values syn keyword vbDefine dbBigInt dbBinary dbBoolean dbByte dbChar syn keyword vbDefine dbCurrency dbDate dbDecimal dbDouble dbFloat syn keyword vbDefine dbGUID dbInteger dbLong dbLongBinary dbMemo syn keyword vbDefine dbNumeric dbSingle dbText dbTime dbTimeStamp syn keyword vbDefine dbVarBinary "VB defined values syn keyword vbDefine vb3DDKShadow vb3DFace vb3DHighlight vb3DLight syn keyword vbDefine vb3DShadow vbAbort vbAbortRetryIgnore syn keyword vbDefine vbActiveBorder vbActiveTitleBar vbAlias syn keyword vbDefine vbApplicationModal vbApplicationWorkspace syn keyword vbDefine vbAppTaskManager vbAppWindows vbArchive vbArray syn keyword vbDefine vbBack vbBinaryCompare vbBlack vbBlue vbBoolean syn keyword vbDefine vbButtonFace vbButtonShadow vbButtonText vbByte syn keyword vbDefine vbCalGreg vbCalHijri vbCancel vbCr vbCritical syn keyword vbDefine vbCrLf vbCurrency vbCyan vbDatabaseCompare syn keyword vbDefine vbDataObject vbDate vbDecimal vbDefaultButton1 syn keyword vbDefine vbDefaultButton2 vbDefaultButton3 vbDefaultButton4 syn keyword vbDefine vbDesktop vbDirectory vbDouble vbEmpty vbError syn keyword vbDefine vbExclamation vbFirstFourDays vbFirstFullWeek syn keyword vbDefine vbFirstJan1 vbFormCode vbFormControlMenu syn keyword vbDefine vbFormFeed vbFormMDIForm vbFriday vbFromUnicode syn keyword vbDefine vbGrayText vbGreen vbHidden vbHide vbHighlight syn keyword vbDefine vbHighlightText vbHiragana vbIgnore vbIMEAlphaDbl syn keyword vbDefine vbIMEAlphaSng vbIMEDisable vbIMEHiragana syn keyword vbDefine vbIMEKatakanaDbl vbIMEKatakanaSng vbIMEModeAlpha syn keyword vbDefine vbIMEModeAlphaFull vbIMEModeDisable syn keyword vbDefine vbIMEModeHangul vbIMEModeHangulFull syn keyword vbDefine vbIMEModeHiragana vbIMEModeKatakana syn keyword vbDefine vbIMEModeKatakanaHalf vbIMEModeNoControl syn keyword vbDefine vbIMEModeOff vbIMEModeOn vbIMENoOp vbIMEOff syn keyword vbDefine vbIMEOn vbInactiveBorder vbInactiveCaptionText syn keyword vbDefine vbInactiveTitleBar vbInfoBackground vbInformation syn keyword vbDefine vbInfoText vbInteger vbKatakana vbKey0 vbKey1 syn keyword vbDefine vbKey2 vbKey3 vbKey4 vbKey5 vbKey6 vbKey7 vbKey8 syn keyword vbDefine vbKey9 vbKeyA vbKeyAdd vbKeyB vbKeyBack vbKeyC syn keyword vbDefine vbKeyCancel vbKeyCapital vbKeyClear vbKeyControl syn keyword vbDefine vbKeyD vbKeyDecimal vbKeyDelete vbKeyDivide syn keyword vbDefine vbKeyDown vbKeyE vbKeyEnd vbKeyEscape vbKeyExecute syn keyword vbDefine vbKeyF vbKeyF1 vbKeyF10 vbKeyF11 vbKeyF12 vbKeyF13 syn keyword vbDefine vbKeyF14 vbKeyF15 vbKeyF16 vbKeyF2 vbKeyF3 vbKeyF4 syn keyword vbDefine vbKeyF5 vbKeyF6 vbKeyF7 vbKeyF8 vbKeyF9 vbKeyG syn keyword vbDefine vbKeyH vbKeyHelp vbKeyHome vbKeyI vbKeyInsert syn keyword vbDefine vbKeyJ vbKeyK vbKeyL vbKeyLButton vbKeyLeft vbKeyM syn keyword vbDefine vbKeyMButton vbKeyMenu vbKeyMultiply vbKeyN syn keyword vbDefine vbKeyNumlock vbKeyNumpad0 vbKeyNumpad1 syn keyword vbDefine vbKeyNumpad2 vbKeyNumpad3 vbKeyNumpad4 syn keyword vbDefine vbKeyNumpad5 vbKeyNumpad6 vbKeyNumpad7 syn keyword vbDefine vbKeyNumpad8 vbKeyNumpad9 vbKeyO vbKeyP syn keyword vbDefine vbKeyPageDown vbKeyPageUp vbKeyPause vbKeyPrint syn keyword vbDefine vbKeyQ vbKeyR vbKeyRButton vbKeyReturn vbKeyRight syn keyword vbDefine vbKeyS vbKeySelect vbKeySeparator vbKeyShift syn keyword vbDefine vbKeySnapshot vbKeySpace vbKeySubtract vbKeyT syn keyword vbDefine vbKeyTab vbKeyU vbKeyUp vbKeyV vbKeyW vbKeyX syn keyword vbDefine vbKeyY vbKeyZ vbLf vbLong vbLowerCase vbMagenta syn keyword vbDefine vbMaximizedFocus vbMenuBar vbMenuText syn keyword vbDefine vbMinimizedFocus vbMinimizedNoFocus vbMonday syn keyword vbDefine vbMsgBox vbMsgBoxHelpButton vbMsgBoxRight syn keyword vbDefine vbMsgBoxRtlReading vbMsgBoxSetForeground syn keyword vbDefine vbMsgBoxText vbNarrow vbNewLine vbNo vbNormal syn keyword vbDefine vbNormalFocus vbNormalNoFocus vbNull vbNullChar syn keyword vbDefine vbNullString vbObject vbObjectError vbOK syn keyword vbDefine vbOKCancel vbOKOnly vbProperCase vbQuestion syn keyword vbDefine vbReadOnly vbRed vbRetry vbRetryCancel vbSaturday syn keyword vbDefine vbScrollBars vbSingle vbString vbSunday vbSystem syn keyword vbDefine vbSystemModal vbTab vbTextCompare vbThursday syn keyword vbDefine vbTitleBarText vbTuesday vbUnicode vbUpperCase syn keyword vbDefine vbUseSystem vbUseSystemDayOfWeek vbVariant syn keyword vbDefine vbVerticalTab vbVolume vbWednesday vbWhite vbWide syn keyword vbDefine vbWindowBackground vbWindowFrame vbWindowText syn keyword vbDefine vbYellow vbYes vbYesNo vbYesNoCancel "Numbers "integer number, or floating point number without a dot. syn match vbNumber "\<\d\+\>" "floating point number, with dot syn match vbNumber "\<\d\+\.\d*\>" "floating point number, starting with a dot syn match vbNumber "\.\d\+\>" "syn match vbNumber "{[[:xdigit:]-]\+}\|&[hH][[:xdigit:]]\+&" "syn match vbNumber ":[[:xdigit:]]\+" "syn match vbNumber "[-+]\=\<\d\+\>" syn match vbFloat "[-+]\=\<\d\+[eE][\-+]\=\d\+" syn match vbFloat "[-+]\=\<\d\+\.\d*\([eE][\-+]\=\d\+\)\=" syn match vbFloat "[-+]\=\<\.\d\+\([eE][\-+]\=\d\+\)\=" " String and Character contstants syn region vbString start=+"+ end=+"\|$+ syn region vbComment start="\(^\|\s\)REM\s" end="$" contains=vbTodo syn region vbComment start="\(^\|\s\)\'" end="$" contains=vbTodo syn match vbLineNumber "^\d\+\(\s\|$\)" syn match vbTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 syn match vbTypeSpecifier "#[a-zA-Z0-9]"me=e-1 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link vbBoolean Boolean hi def link vbLineNumber Comment hi def link vbComment Comment hi def link vbConditional Conditional hi def link vbConst Constant hi def link vbDefine Constant hi def link vbError Error hi def link vbFunction Identifier hi def link vbIdentifier Identifier hi def link vbNumber Number hi def link vbFloat Float hi def link vbMethods PreProc hi def link vbOperator Operator hi def link vbRepeat Repeat hi def link vbString String hi def link vbStatement Statement hi def link vbKeyword Statement hi def link vbEvents Special hi def link vbTodo Todo hi def link vbTypes Type hi def link vbTypeSpecifier Type let b:current_syntax = "vb" " vim: ts=8 neovim-0.2.2/runtime/syntax/vera.vim000066400000000000000000000461401320401574200174760ustar00rootroot00000000000000" Vim syntax file " Language: Vera " Maintainer: Dave Eggum (opine at bluebottle dOt com) " Last Change: 2005 Dec 19 " NOTE: extra white space at the end of the line will be highlighted if you " add this line to your colorscheme: " highlight SpaceError guibg=#204050 " (change the value for guibg to any color you like) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " A bunch of useful Vera keywords syn keyword veraStatement break return continue fork join terminate syn keyword veraStatement breakpoint proceed syn keyword veraLabel bad_state bad_trans bind constraint coverage_group syn keyword veraLabel class CLOCK default function interface m_bad_state syn keyword veraLabel m_bad_trans m_state m_trans program randseq state syn keyword veraLabel task trans syn keyword veraConditional if else case casex casez randcase syn keyword veraRepeat repeat while for do foreach syn keyword veraModifier after all any around assoc_size async syn keyword veraModifier before big_endian bit_normal bit_reverse export syn keyword veraModifier extends extern little_endian local hdl_node hdl_task syn keyword veraModifier negedge none packed protected posedge public rules syn keyword veraModifier shadow soft static super this typedef unpacked var syn keyword veraModifier vca virtual virtuals wildcard with syn keyword veraType reg string enum event bit syn keyword veraType rand randc integer port prod syn keyword veraDeprecated call_func call_task close_conn get_bind get_bind_id syn keyword veraDeprecated get_conn_err mailbox_receive mailbox_send make_client syn keyword veraDeprecated make_server simwave_plot up_connections " predefined tasks and functions syn keyword veraTask alloc assoc_index cast_assign cm_coverage syn keyword veraTask cm_get_coverage cm_get_limit delay error error_mode syn keyword veraTask exit fclose feof ferror fflush flag fopen fprintf syn keyword veraTask freadb freadh freadstr get_cycle get_env get_memsize syn keyword veraTask get_plus_arg getstate get_systime get_time get_time_unit syn keyword veraTask initstate lock_file mailbox_get mailbox_put os_command syn keyword veraTask printf prodget prodset psprintf query query_str query_x syn keyword veraTask rand48 random region_enter region_exit rewind syn keyword veraTask semaphore_get semaphore_put setstate signal_connect syn keyword veraTask sprintf srandom sscanf stop suspend_thread sync syn keyword veraTask timeout trace trigger unit_delay unlock_file urand48 syn keyword veraTask urandom urandom_range vera_bit_reverse vera_crc syn keyword veraTask vera_pack vera_pack_big_endian vera_plot syn keyword veraTask vera_report_profile vera_unpack vera_unpack_big_endian syn keyword veraTask vsv_call_func vsv_call_task vsv_get_conn_err syn keyword veraTask vsv_make_client vsv_make_server vsv_up_connections syn keyword veraTask vsv_wait_for_done vsv_wait_for_input wait_child wait_var syn cluster veraOperGroup contains=veraOperator,veraOperParen,veraNumber,veraString,veraOperOk,veraType " syn match veraOperator "++\|--\|&\|\~&\||\|\~|\|^\|\~^\|\~\|><" " syn match veraOperator "*\|/\|%\|+\|-\|<<\|>>\|<\|<=\|>\|>=\|!in" " syn match veraOperator "=?=\|!?=\|==\|!=\|===\|!==\|&\~\|^\~\||\~" " syn match veraOperator "&&\|||\|=\|+=\|-=\|*=\|/=\|%=\|<<=\|>>=\|&=" " syn match veraOperator "|=\|^=\|\~&=\|\~|=\|\~^=" syn match veraOperator "[&|\~>" " "hex number " syn match veraNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" " syn match veraNumber "\(\<[0-9]\+\|\)'[bdoh][0-9a-fxzA-FXZ_]\+\>" syn match veraNumber "\<\(\<[0-9]\+\)\?\('[bdoh]\)\?[0-9a-fxz_]\+\>" " syn match veraNumber "\<[+-]\=[0-9]\+\>" " Flag the first zero of an octal number as something special syn match veraOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=veraOctalZero syn match veraOctalZero display contained "\<0" syn match veraFloat display contained "\d\+f" "floating point number, with dot, optional exponent syn match veraFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" "floating point number, starting with a dot, optional exponent syn match veraFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match veraFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" "hexadecimal floating point number, optional leading digits, with dot, with exponent syn match veraFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" "hexadecimal floating point number, with leading digits, optional dot, with exponent syn match veraFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" " flag an octal number with wrong digits syn match veraOctalError display contained "0\o*[89]\d*" syn case match let vera_comment_strings = 1 if exists("vera_comment_strings") " A comment can contain veraString, veraCharacter and veraNumber. " But a "*/" inside a veraString in a veraComment DOES end the comment! So we " need to use a special type of veraString: veraCommentString, which also ends on " "*/", and sees a "*" at the start of the line as comment again. " Unfortunately this doesn't work very well for // type of comments :-( syntax match veraCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region veraCommentString contained start=+L\=\\\@" syn match veraClass "\zs\w\+\ze::" syn match veraClass "\zs\w\+\ze\s\+\w\+\s*[=;,)\[]" contains=veraConstant,veraUserConstant syn match veraClass "\zs\w\+\ze\s\+\w\+\s*$" contains=veraConstant,veraUserConstant syn match veraUserMethod "\zs\w\+\ze\s*(" contains=veraConstant,veraUserConstant syn match veraObject "\zs\w\+\ze\.\w" syn match veraObject "\zs\w\+\ze\.\$\w" " Accept ` for # (Verilog) syn region veraPreCondit start="^\s*\(`\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=veraComment,veraCppString,veraCharacter,veraCppParen,veraParenError,veraNumbers,veraCommentError,veraSpaceError syn match veraPreCondit display "^\s*\(`\|#\)\s*\(else\|endif\)\>" if !exists("vera_no_if0") syn region veraCppOut start="^\s*\(`\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=veraCppOut2 syn region veraCppOut2 contained start="0" end="^\s*\(`\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=veraSpaceError,veraCppSkip syn region veraCppSkip contained start="^\s*\(`\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(`\|#\)\s*endif\>" contains=veraSpaceError,veraCppSkip endif syn region veraIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match veraIncluded display contained "<[^>]*>" syn match veraInclude display "^\s*\(`\|#\)\s*include\>\s*["<]" contains=veraIncluded "syn match veraLineSkip "\\$" syn cluster veraPreProcGroup contains=veraPreCondit,veraIncluded,veraInclude,veraDefine,veraErrInParen,veraErrInBracket,veraUserLabel,veraSpecial,veraOctalZero,veraCppOut,veraCppOut2,veraCppSkip,veraFormat,veraNumber,veraFloat,veraOctal,veraOctalError,veraNumbersCom,veraString,veraCommentSkip,veraCommentString,veraComment2String,@veraCommentGroup,veraCommentStartError,veraParen,veraBracket,veraMulti syn region veraDefine start="^\s*\(`\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@veraPreProcGroup,@Spell syn region veraPreProc start="^\s*\(`\|#\)\s*\(pragma\>\|line\>\|warning\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@veraPreProcGroup,@Spell " Highlight User Labels syn cluster veraMultiGroup contains=veraIncluded,veraSpecial,veraCommentSkip,veraCommentString,veraComment2String,@veraCommentGroup,veraCommentStartError,veraUserCont,veraUserLabel,veraBitField,veraOctalZero,veraCppOut,veraCppOut2,veraCppSkip,veraFormat,veraNumber,veraFloat,veraOctal,veraOctalError,veraNumbersCom,veraCppParen,veraCppBracket,veraCppString syn region veraMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@veraMultiGroup,@Spell " syn region veraMulti transparent start='?' skip='::' end=':' contains=ALL " The above causes veraCppOut2 to catch on: " i = (isTrue) ? 0 : 1; " which ends up commenting the rest of the file " Avoid matching foo::bar() by requiring that the next char is not ':' syn cluster veraLabelGroup contains=veraUserLabel syn match veraUserCont display "^\s*\I\i*\s*:$" contains=@veraLabelGroup syn match veraUserCont display ";\s*\I\i*\s*:$" contains=@veraLabelGroup syn match veraUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@veraLabelGroup syn match veraUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@veraLabelGroup syn match veraUserLabel display "\I\i*" contained " Avoid recognizing most bitfields as labels syn match veraBitField display "^\s*\I\i*\s*:\s*[1-9]"me=e-1 syn match veraBitField display ";\s*\I\i*\s*:\s*[1-9]"me=e-1 if exists("vera_minlines") let b:vera_minlines = vera_minlines else if !exists("vera_no_if0") let b:vera_minlines = 50 " #if 0 constructs can be long else let b:vera_minlines = 15 " mostly for () constructs endif endif exec "syn sync ccomment veraComment minlines=" . b:vera_minlines " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link veraClass Identifier hi def link veraObject Identifier hi def link veraUserMethod Function hi def link veraTask Keyword hi def link veraModifier Tag hi def link veraDeprecated veraError hi def link veraMethods Statement " hi def link veraInterface Label hi def link veraInterface Function hi def link veraFormat veraSpecial hi def link veraCppString veraString hi def link veraCommentL veraComment hi def link veraCommentStart veraComment hi def link veraLabel Label hi def link veraUserLabel Label hi def link veraConditional Conditional hi def link veraRepeat Repeat hi def link veraCharacter Character hi def link veraSpecialCharacter veraSpecial hi def link veraNumber Number hi def link veraOctal Number hi def link veraOctalZero PreProc " link this to Error if you want hi def link veraFloat Float hi def link veraOctalError veraError hi def link veraParenError veraError hi def link veraErrInParen veraError hi def link veraErrInBracket veraError hi def link veraCommentError veraError hi def link veraCommentStartError veraError hi def link veraSpaceError SpaceError hi def link veraSpecialError veraError hi def link veraOperator Operator hi def link veraStructure Structure hi def link veraInclude Include hi def link veraPreProc PreProc hi def link veraDefine Macro hi def link veraIncluded veraString hi def link veraError Error hi def link veraStatement Statement hi def link veraPreCondit PreCondit hi def link veraType Type " hi def link veraConstant Constant hi def link veraConstant Keyword hi def link veraUserConstant Constant hi def link veraCommentString veraString hi def link veraComment2String veraString hi def link veraCommentSkip veraComment hi def link veraString String hi def link veraComment Comment hi def link veraSpecial SpecialChar hi def link veraTodo Todo hi def link veraCppSkip veraCppOut hi def link veraCppOut2 veraCppOut hi def link veraCppOut Comment let b:current_syntax = "vera" " vim: ts=8 neovim-0.2.2/runtime/syntax/verilog.vim000066400000000000000000000116771320401574200202170ustar00rootroot00000000000000" Vim syntax file " Language: Verilog " Maintainer: Mun Johl " Last Update: Wed Jul 20 16:04:19 PDT 2011 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Set the local value of the 'iskeyword' option. " NOTE: '?' was added so that verilogNumber would be processed correctly when " '?' is the last character of the number. setlocal iskeyword=@,48-57,63,_,192-255 " A bunch of useful Verilog keywords syn keyword verilogStatement always and assign automatic buf syn keyword verilogStatement bufif0 bufif1 cell cmos syn keyword verilogStatement config deassign defparam design syn keyword verilogStatement disable edge endconfig syn keyword verilogStatement endfunction endgenerate endmodule syn keyword verilogStatement endprimitive endspecify endtable endtask syn keyword verilogStatement event force function syn keyword verilogStatement generate genvar highz0 highz1 ifnone syn keyword verilogStatement incdir include initial inout input syn keyword verilogStatement instance integer large liblist syn keyword verilogStatement library localparam macromodule medium syn keyword verilogStatement module nand negedge nmos nor syn keyword verilogStatement noshowcancelled not notif0 notif1 or syn keyword verilogStatement output parameter pmos posedge primitive syn keyword verilogStatement pull0 pull1 pulldown pullup syn keyword verilogStatement pulsestyle_onevent pulsestyle_ondetect syn keyword verilogStatement rcmos real realtime reg release syn keyword verilogStatement rnmos rpmos rtran rtranif0 rtranif1 syn keyword verilogStatement scalared showcancelled signed small syn keyword verilogStatement specify specparam strong0 strong1 syn keyword verilogStatement supply0 supply1 table task time tran syn keyword verilogStatement tranif0 tranif1 tri tri0 tri1 triand syn keyword verilogStatement trior trireg unsigned use vectored wait syn keyword verilogStatement wand weak0 weak1 wire wor xnor xor syn keyword verilogLabel begin end fork join syn keyword verilogConditional if else case casex casez default endcase syn keyword verilogRepeat forever repeat while for syn keyword verilogTodo contained TODO FIXME syn match verilogOperator "[&|~>" syn match verilogGlobal "`celldefine" syn match verilogGlobal "`default_nettype" syn match verilogGlobal "`define" syn match verilogGlobal "`else" syn match verilogGlobal "`elsif" syn match verilogGlobal "`endcelldefine" syn match verilogGlobal "`endif" syn match verilogGlobal "`ifdef" syn match verilogGlobal "`ifndef" syn match verilogGlobal "`include" syn match verilogGlobal "`line" syn match verilogGlobal "`nounconnected_drive" syn match verilogGlobal "`resetall" syn match verilogGlobal "`timescale" syn match verilogGlobal "`unconnected_drive" syn match verilogGlobal "`undef" syn match verilogGlobal "$[a-zA-Z0-9_]\+\>" syn match verilogConstant "\<[A-Z][A-Z0-9_]\+\>" syn match verilogNumber "\(\<\d\+\|\)'[sS]\?[bB]\s*[0-1_xXzZ?]\+\>" syn match verilogNumber "\(\<\d\+\|\)'[sS]\?[oO]\s*[0-7_xXzZ?]\+\>" syn match verilogNumber "\(\<\d\+\|\)'[sS]\?[dD]\s*[0-9_xXzZ?]\+\>" syn match verilogNumber "\(\<\d\+\|\)'[sS]\?[hH]\s*[0-9a-fA-F_xXzZ?]\+\>" syn match verilogNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>" syn region verilogString start=+"+ skip=+\\"+ end=+"+ contains=verilogEscape,@Spell syn match verilogEscape +\\[nt"\\]+ contained syn match verilogEscape "\\\o\o\=\o\=" contained " Directives syn match verilogDirective "//\s*synopsys\>.*$" syn region verilogDirective start="/\*\s*synopsys\>" end="\*/" syn region verilogDirective start="//\s*synopsys dc_script_begin\>" end="//\s*synopsys dc_script_end\>" syn match verilogDirective "//\s*\$s\>.*$" syn region verilogDirective start="/\*\s*\$s\>" end="\*/" syn region verilogDirective start="//\s*\$s dc_script_begin\>" end="//\s*\$s dc_script_end\>" "Modify the following as needed. The trade-off is performance versus "functionality. syn sync minlines=50 " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default highlighting. hi def link verilogCharacter Character hi def link verilogConditional Conditional hi def link verilogRepeat Repeat hi def link verilogString String hi def link verilogTodo Todo hi def link verilogComment Comment hi def link verilogConstant Constant hi def link verilogLabel Label hi def link verilogNumber Number hi def link verilogOperator Special hi def link verilogStatement Statement hi def link verilogGlobal Define hi def link verilogDirective SpecialComment hi def link verilogEscape Special let b:current_syntax = "verilog" " vim: ts=8 neovim-0.2.2/runtime/syntax/verilogams.vim000066400000000000000000000137031320401574200207100ustar00rootroot00000000000000" Vim syntax file " Language: Verilog-AMS " Maintainer: S. Myles Prather " " Version 1.1 S. Myles Prather " Moved some keywords to the type category. " Added the metrix suffixes to the number matcher. " Version 1.2 Prasanna Tamhankar " Minor reserved keyword updates. " Last Update: Thursday September 15 15:36:03 CST 2005 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Set the local value of the 'iskeyword' option setlocal iskeyword=@,48-57,_,192-255 " Annex B.1 'All keywords' syn keyword verilogamsStatement above abs absdelay acos acosh ac_stim syn keyword verilogamsStatement always analog analysis and asin syn keyword verilogamsStatement asinh assign atan atan2 atanh syn keyword verilogamsStatement buf bufif0 bufif1 ceil cmos connectmodule syn keyword verilogamsStatement connectrules cos cosh cross ddt ddx deassign syn keyword verilogamsStatement defparam disable discipline syn keyword verilogamsStatement driver_update edge enddiscipline syn keyword verilogamsStatement endconnectrules endmodule endfunction endgenerate syn keyword verilogamsStatement endnature endparamset endprimitive endspecify syn keyword verilogamsStatement endtable endtask event exp final_step syn keyword verilogamsStatement flicker_noise floor flow force fork syn keyword verilogamsStatement function generate highz0 syn keyword verilogamsStatement highz1 hypot idt idtmod if ifnone inf initial syn keyword verilogamsStatement initial_step inout input join syn keyword verilogamsStatement laplace_nd laplace_np laplace_zd laplace_zp syn keyword verilogamsStatement large last_crossing limexp ln localparam log syn keyword verilogamsStatement macromodule max medium min module nand nature syn keyword verilogamsStatement negedge net_resolution nmos noise_table nor not syn keyword verilogamsStatement notif0 notif1 or output paramset pmos syn keyword verilogamsType parameter real integer electrical input output syn keyword verilogamsType inout reg tri tri0 tri1 triand trior trireg syn keyword verilogamsType string from exclude aliasparam ground genvar syn keyword verilogamsType branch time realtime syn keyword verilogamsStatement posedge potential pow primitive pull0 pull1 syn keyword verilogamsStatement pullup pulldown rcmos release syn keyword verilogamsStatement rnmos rpmos rtran rtranif0 rtranif1 syn keyword verilogamsStatement scalared sin sinh slew small specify specparam syn keyword verilogamsStatement sqrt strong0 strong1 supply0 supply1 syn keyword verilogamsStatement table tan tanh task timer tran tranif0 syn keyword verilogamsStatement tranif1 transition syn keyword verilogamsStatement vectored wait wand weak0 weak1 syn keyword verilogamsStatement white_noise wire wor wreal xnor xor zi_nd syn keyword verilogamsStatement zi_np zi_zd zi_zp syn keyword verilogamsRepeat forever repeat while for syn keyword verilogamsLabel begin end syn keyword verilogamsConditional if else case casex casez default endcase syn match verilogamsConstant ":inf"lc=1 syn match verilogamsConstant "-inf"lc=1 " Annex B.2 Discipline/nature syn keyword verilogamsStatement abstol access continuous ddt_nature discrete syn keyword verilogamsStatement domain idt_nature units " Annex B.3 Connect Rules syn keyword verilogamsStatement connect merged resolveto split syn match verilogamsOperator "[&|~>" syn match verilogamsConstant "\<[A-Z][A-Z0-9_]\+\>" syn match verilogamsNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>" syn match verilogamsNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>" syn match verilogamsNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>" syn match verilogamsNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>" syn match verilogamsNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)[TGMKkmunpfa]\=\>" syn region verilogamsString start=+"+ skip=+\\"+ end=+"+ contains=verilogamsEscape syn match verilogamsEscape +\\[nt"\\]+ contained syn match verilogamsEscape "\\\o\o\=\o\=" contained "Modify the following as needed. The trade-off is performance versus "functionality. syn sync lines=50 " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default highlighting. hi def link verilogamsCharacter Character hi def link verilogamsConditional Conditional hi def link verilogamsRepeat Repeat hi def link verilogamsString String hi def link verilogamsTodo Todo hi def link verilogamsComment Comment hi def link verilogamsConstant Constant hi def link verilogamsLabel Label hi def link verilogamsNumber Number hi def link verilogamsOperator Special hi def link verilogamsStatement Statement hi def link verilogamsGlobal Define hi def link verilogamsDirective SpecialComment hi def link verilogamsEscape Special hi def link verilogamsType Type hi def link verilogamsSystask Function let b:current_syntax = "verilogams" " vim: ts=8 neovim-0.2.2/runtime/syntax/vgrindefs.vim000066400000000000000000000022761320401574200205320ustar00rootroot00000000000000" Vim syntax file " Language: Vgrindefs " Maintainer: Bram Moolenaar " Last Change: 2005 Jun 20 " The Vgrindefs file is used to specify a language for vgrind " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif " Comments syn match vgrindefsComment "^#.*" " The fields that vgrind recognizes syn match vgrindefsField ":ab=" syn match vgrindefsField ":ae=" syn match vgrindefsField ":pb=" syn match vgrindefsField ":bb=" syn match vgrindefsField ":be=" syn match vgrindefsField ":cb=" syn match vgrindefsField ":ce=" syn match vgrindefsField ":sb=" syn match vgrindefsField ":se=" syn match vgrindefsField ":lb=" syn match vgrindefsField ":le=" syn match vgrindefsField ":nc=" syn match vgrindefsField ":tl" syn match vgrindefsField ":oc" syn match vgrindefsField ":kw=" " Also find the ':' at the end of the line, so all ':' are highlighted syn match vgrindefsField ":\\$" syn match vgrindefsField ":$" syn match vgrindefsField "\\$" " Define the default highlighting. " Only used when an item doesn't have highlighting yet hi def link vgrindefsField Statement hi def link vgrindefsComment Comment let b:current_syntax = "vgrindefs" " vim: ts=8 neovim-0.2.2/runtime/syntax/vhdl.vim000066400000000000000000000222551320401574200174770ustar00rootroot00000000000000" Vim syntax file " Language: VHDL [VHSIC (Very High Speed Integrated Circuit) Hardware Description Language] " Maintainer: Daniel Kho " Previous Maintainer: Czo " Credits: Stephan Hegel " Last Changed: 2016 Mar 05 by Daniel Kho " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " case is not significant syn case ignore " VHDL keywords syn keyword vhdlStatement access after alias all assert syn keyword vhdlStatement architecture array attribute syn keyword vhdlStatement assume assume_guarantee syn keyword vhdlStatement begin block body buffer bus syn keyword vhdlStatement case component configuration constant syn keyword vhdlStatement context cover syn keyword vhdlStatement default disconnect downto syn keyword vhdlStatement elsif end entity exit syn keyword vhdlStatement file for function syn keyword vhdlStatement fairness force syn keyword vhdlStatement generate generic group guarded syn keyword vhdlStatement impure in inertial inout is syn keyword vhdlStatement label library linkage literal loop syn keyword vhdlStatement map syn keyword vhdlStatement new next null syn keyword vhdlStatement of on open others out syn keyword vhdlStatement package port postponed procedure process pure syn keyword vhdlStatement parameter property protected syn keyword vhdlStatement range record register reject report return syn keyword vhdlStatement release restrict restrict_guarantee syn keyword vhdlStatement select severity signal shared syn keyword vhdlStatement subtype syn keyword vhdlStatement sequence strong syn keyword vhdlStatement then to transport type syn keyword vhdlStatement unaffected units until use syn keyword vhdlStatement variable syn keyword vhdlStatement vmode vprop vunit syn keyword vhdlStatement wait when while with syn keyword vhdlStatement note warning error failure " Linting of conditionals. syn match vhdlStatement "\<\(if\|else\)\>" syn match vhdlError "\" " Types and type qualifiers " Predefined standard VHDL types syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" "syn keyword vhdlType severity_level syn keyword vhdlType line syn keyword vhdlType text " Predefined standard IEEE VHDL types syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" syn match vhdlType "\\'\=" " array attributes syn match vhdlAttribute "\'high" syn match vhdlAttribute "\'left" syn match vhdlAttribute "\'length" syn match vhdlAttribute "\'low" syn match vhdlAttribute "\'range" syn match vhdlAttribute "\'reverse_range" syn match vhdlAttribute "\'right" syn match vhdlAttribute "\'ascending" " block attributes syn match vhdlAttribute "\'simple_name" syn match vhdlAttribute "\'instance_name" syn match vhdlAttribute "\'path_name" syn match vhdlAttribute "\'foreign" " VHPI " signal attribute syn match vhdlAttribute "\'active" syn match vhdlAttribute "\'delayed" syn match vhdlAttribute "\'event" syn match vhdlAttribute "\'last_active" syn match vhdlAttribute "\'last_event" syn match vhdlAttribute "\'last_value" syn match vhdlAttribute "\'quiet" syn match vhdlAttribute "\'stable" syn match vhdlAttribute "\'transaction" syn match vhdlAttribute "\'driving" syn match vhdlAttribute "\'driving_value" " type attributes syn match vhdlAttribute "\'base" syn match vhdlAttribute "\'subtype" syn match vhdlAttribute "\'element" syn match vhdlAttribute "\'leftof" syn match vhdlAttribute "\'pos" syn match vhdlAttribute "\'pred" syn match vhdlAttribute "\'rightof" syn match vhdlAttribute "\'succ" syn match vhdlAttribute "\'val" syn match vhdlAttribute "\'image" syn match vhdlAttribute "\'value" syn keyword vhdlBoolean true false " for this vector values case is significant syn case match " Values for standard VHDL types syn match vhdlVector "\'[0L1HXWZU\-\?]\'" syn case ignore syn match vhdlVector "B\"[01_]\+\"" syn match vhdlVector "O\"[0-7_]\+\"" syn match vhdlVector "X\"[0-9a-f_]\+\"" syn match vhdlCharacter "'.'" syn region vhdlString start=+"+ end=+"+ " floating numbers syn match vhdlNumber "-\=\<\d\+\.\d\+\(E[+\-]\=\d\+\)\>" syn match vhdlNumber "-\=\<\d\+\.\d\+\>" syn match vhdlNumber "0*2#[01_]\+\.[01_]\+#\(E[+\-]\=\d\+\)\=" syn match vhdlNumber "0*16#[0-9a-f_]\+\.[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" " integer numbers syn match vhdlNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>" syn match vhdlNumber "-\=\<\d\+\>" syn match vhdlNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\=" syn match vhdlNumber "0*16#[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" " operators syn keyword vhdlOperator and nand or nor xor xnor syn keyword vhdlOperator rol ror sla sll sra srl syn keyword vhdlOperator mod rem abs not " Concatenation and math operators syn match vhdlOperator "&\|+\|-\|\*\|\/" " Equality and comparison operators syn match vhdlOperator "=\|\/=\|>\|<\|>=" " Assignment operators syn match vhdlOperator "<=\|:=" syn match vhdlOperator "=>" " VHDL-2008 conversion, matching equality/non-equality operators syn match vhdlOperator "??\|?=\|?\/=\|?<\|?<=\|?>\|?>=" " VHDL-2008 external names syn match vhdlOperator "<<\|>>" " Linting for illegal operators " '=' syn match vhdlError "\(=\)[<=&+\-\*\/\\]\+" syn match vhdlError "[=&+\-\*\\]\+\(=\)" " '>', '<' " Allow external names: '<< ... >>' syn match vhdlError "\(>\)[<&+\-\/\\]\+" syn match vhdlError "[&+\-\/\\]\+\(>\)" syn match vhdlError "\(<\)[&+\-\/\\]\+" syn match vhdlError "[>=&+\-\/\\]\+\(<\)" " Covers most operators " support negative sign after operators. E.g. q<=-b; syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|<=\|:=\|=>\)[<>=&+\*\\?:]\+" syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\|=>\)" syn match vhdlError "\(?<\|?>\)[<>&+\*\/\\?:]\+" syn match vhdlError "\(<<\|>>\)[<>&+\*\/\\?:]\+" "syn match vhdlError "[?]\+\(&\|+\|\-\|\*\*\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|:=\|=>\)" " '/' syn match vhdlError "\(\/\)[<>&+\-\*\/\\?:]\+" syn match vhdlError "[<>=&+\-\*\/\\:]\+\(\/\)" syn match vhdlSpecial "<>" syn match vhdlSpecial "[().,;]" " time syn match vhdlTime "\<\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>" syn match vhdlTime "\<\d\+\.\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>" syn case match syn keyword vhdlTodo contained TODO NOTE syn keyword vhdlFixme contained FIXME syn case ignore syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,vhdlFixme,@Spell syn match vhdlComment "\(^\|\s\)--.*" contains=vhdlTodo,vhdlFixme,@Spell " Standard IEEE P1076.6 preprocessor directives (metacomments). syn match vhdlPreProc "/\*\s*rtl_synthesis\s\+\(on\|off\)\s*\*/" syn match vhdlPreProc "\(^\|\s\)--\s*rtl_synthesis\s\+\(on\|off\)\s*" syn match vhdlPreProc "/\*\s*rtl_syn\s\+\(on\|off\)\s*\*/" syn match vhdlPreProc "\(^\|\s\)--\s*rtl_syn\s\+\(on\|off\)\s*" " Industry-standard directives. These are not standard VHDL, but are commonly " used in the industry. syn match vhdlPreProc "/\*\s*synthesis\s\+translate_\(on\|off\)\s*\*/" "syn match vhdlPreProc "/\*\s*simulation\s\+translate_\(on\|off\)\s*\*/" syn match vhdlPreProc "/\*\s*pragma\s\+translate_\(on\|off\)\s*\*/" syn match vhdlPreProc "/\*\s*pragma\s\+synthesis_\(on\|off\)\s*\*/" syn match vhdlPreProc "/\*\s*synopsys\s\+translate_\(on\|off\)\s*\*/" syn match vhdlPreProc "\(^\|\s\)--\s*synthesis\s\+translate_\(on\|off\)\s*" "syn match vhdlPreProc "\(^\|\s\)--\s*simulation\s\+translate_\(on\|off\)\s*" syn match vhdlPreProc "\(^\|\s\)--\s*pragma\s\+translate_\(on\|off\)\s*" syn match vhdlPreProc "\(^\|\s\)--\s*pragma\s\+synthesis_\(on\|off\)\s*" syn match vhdlPreProc "\(^\|\s\)--\s*synopsys\s\+translate_\(on\|off\)\s*" "Modify the following as needed. The trade-off is performance versus functionality. syn sync minlines=600 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link vhdlSpecial Special hi def link vhdlStatement Statement hi def link vhdlCharacter Character hi def link vhdlString String hi def link vhdlVector Number hi def link vhdlBoolean Number hi def link vhdlTodo Todo hi def link vhdlFixme Fixme hi def link vhdlComment Comment hi def link vhdlNumber Number hi def link vhdlTime Number hi def link vhdlType Type hi def link vhdlOperator Operator hi def link vhdlError Error hi def link vhdlAttribute Special hi def link vhdlPreProc PreProc let b:current_syntax = "vhdl" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/vim.vim000066400000000000000000001371661320401574200173450ustar00rootroot00000000000000" Vim syntax file " ############################################################################# " ############################################################################# " Note: Be careful when merging the upstream version of this file. " Much of this is generated by scripts/genvimvim.lua " (installs to $VIMRUNTIME/syntax/vim/generated.vim) " ############################################################################# " ############################################################################# " Quit when a syntax file was already loaded {{{2 if exists("b:current_syntax") finish endif let s:keepcpo= &cpo set cpo&vim " vimTodo: contains common special-notices for comments {{{2 " Use the vimCommentGroup cluster to add your own. syn keyword vimTodo contained COMBAK FIXME TODO XXX syn cluster vimCommentGroup contains=vimTodo,@Spell " Special and plugin vim commands {{{2 syn match vimCommand contained "\" syn keyword vimOnlyCommand contained fix[del] op[en] sh[ell] P[rint] syn keyword vimStdPlugin contained DiffOrig Man N[ext] S TOhtml XMLent XMLns " Vim-specific options {{{2 syn keyword vimOnlyOption contained biosk bioskey cp compatible consk conskey cm cryptmethod edcompatible guipty key macatsui mzq mzquantum osfiletype oft renderoptions rop st shelltype sn shortname tenc termencoding ta textauto tx textmode tf ttyfast ttym ttymouse tbi ttybuiltin wiv weirdinvert " Turn-off setting variants syn keyword vimOnlyOption contained nobiosk nobioskey noconsk noconskey nocp nocompatible noguipty nomacatsui nosn noshortname nota notextauto notx notextmode notf nottyfast notbi nottybuiltin nowiv noweirdinvert " Invertible setting variants syn keyword vimOnlyOption contained invbiosk invbioskey invconsk invconskey invcp invcompatible invguipty invmacatsui invsn invshortname invta invtextauto invtx invtextmode invtf invttyfast invtbi invttybuiltin invwiv invweirdinvert " termcap codes (which can also be set) {{{2 syn keyword vimTermOption contained t_8b t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RB t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR syn keyword vimTermOption contained t_8f t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_EI syn match vimTermOption contained "t_%1" syn match vimTermOption contained "t_#2" syn match vimTermOption contained "t_#4" syn match vimTermOption contained "t_@7" syn match vimTermOption contained "t_*7" syn match vimTermOption contained "t_&8" syn match vimTermOption contained "t_%i" syn match vimTermOption contained "t_k;" " unsupported settings: these are supported by vi but don't do anything in vim {{{2 syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600 "}}}2 syn case ignore " Highlight commonly used Groupnames {{{2 syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo " Default highlighting groups {{{2 syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual WarningMsg WildMenu syn match vimHLGroup contained "Conceal" syn keyword vimOnlyHLGroup contained VisualNOS syn keyword nvimHLGroup contained Substitute TermCursor TermCursorNC QuickFixLine "}}}2 syn case match " Special Vim Highlighting (not automatic) {{{1 " Set up folding commands if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[aflmpPrt]' if g:vimsyn_folding =~# 'a' com! -nargs=* VimFolda fold else com! -nargs=* VimFolda endif if g:vimsyn_folding =~# 'f' com! -nargs=* VimFoldf fold else com! -nargs=* VimFoldf endif if g:vimsyn_folding =~# 'l' com! -nargs=* VimFoldl fold else com! -nargs=* VimFoldl endif if g:vimsyn_folding =~# 'm' com! -nargs=* VimFoldm fold else com! -nargs=* VimFoldm endif if g:vimsyn_folding =~# 'p' com! -nargs=* VimFoldp fold else com! -nargs=* VimFoldp endif if g:vimsyn_folding =~# 'P' com! -nargs=* VimFoldP fold else com! -nargs=* VimFoldP endif if g:vimsyn_folding =~# 'r' com! -nargs=* VimFoldr fold else com! -nargs=* VimFoldr endif if g:vimsyn_folding =~# 't' com! -nargs=* VimFoldt fold else com! -nargs=* VimFoldt endif else com! -nargs=* VimFolda com! -nargs=* VimFoldf com! -nargs=* VimFoldl com! -nargs=* VimFoldm com! -nargs=* VimFoldp com! -nargs=* VimFoldP com! -nargs=* VimFoldr com! -nargs=* VimFoldt endif " commands not picked up by the generator (due to non-standard format) syn keyword vimCommand contained py3 " Deprecated variable options {{{2 if exists("g:vim_minlines") let g:vimsyn_minlines= g:vim_minlines endif if exists("g:vim_maxlines") let g:vimsyn_maxlines= g:vim_maxlines endif if exists("g:vimsyntax_noerror") let g:vimsyn_noerror= g:vimsyntax_noerror endif " Variable options {{{2 if exists("g:vim_maxlines") let s:vimsyn_maxlines= g:vim_maxlines else let s:vimsyn_maxlines= 60 endif " Numbers {{{2 " ======= syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand syn match vimNumber "\<0[xX]\x\+" syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}" " All vimCommands are contained by vimIsCommands. {{{2 syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd syn match vimIsCommand "\<\h\w*\>" contains=vimCommand syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" syn keyword vimCommand contained in " Insertions And Appends: insert append {{{2 " ======================= syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" " Behave! {{{2 " ======= syn match vimBehave "\" skipwhite nextgroup=vimBehaveModel,vimBehaveError syn keyword vimBehaveModel contained mswin xterm if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror") syn match vimBehaveError contained "[^ ]\+" endif " Filetypes {{{2 " ========= syn match vimFiletype "\\s\+[eE][nN][dD]\>" endif syn keyword vimAugroupKey contained aug[roup] " Operators: {{{2 " ========= syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") syn match vimOperError ")" endif " Functions : Tag is provided for those who wish to highlight tagged functions {{{2 " ========= syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand syn match vimFunction "\\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList else syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList endif syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)" syn match vimFuncSID contained "\c\|\" nextgroup=vimSpecFileMod,vimSubst syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst syn match vimSpecFileMod "\(:[phtre]\)\+" contained " User-Specified Commands: {{{2 " ======================= syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine syn keyword vimUserCommand contained com[mand] syn match vimUserCmd "\.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList syn match vimUserAttrbError contained "-\a\+\ze\s" syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError syn match vimUserAttrb contained "-range\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey syn match vimUserAttrb contained "-count\(=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey syn match vimUserAttrb contained "-bang\>" contains=vimOper,vimUserAttrbKey syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey syn match vimUserAttrb contained "-buffer\>" contains=vimOper,vimUserAttrbKey syn match vimUserAttrb contained "-register\>" contains=vimOper,vimUserAttrbKey if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror") syn match vimUserCmdError contained "\S\+\>" endif syn case ignore syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister] syn keyword vimUserAttrbCmplt contained augroup buffer behave color command compiler cscope dir environment event expression file file_in_path filetype function help highlight history locale mapping menu option packadd shellcmd sign syntax syntime tag tag_listfiles user var syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%(#\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError syn case match syn match vimUserAttrbCmplt contained "custom,\u\w*" " Lower Priority Comments: after some vim commands... {{{2 " ======================= syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString syn match vimComment +\!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+ syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+ " Substitutions: {{{2 " ============= syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation syn cluster vimSubstList add=vimCollection syn match vimSubst "\(:\+\s*\|^\s*\||\s*\)\<\%(\\|\\|\\)[:#[:alpha:]]\@!" nextgroup=vimSubstPat syn match vimSubst "\%(^\|[^\\]\)\[:#[:alpha:]]\@!" nextgroup=vimSubstPat contained syn match vimSubst "/\zs\\ze/" nextgroup=vimSubstPat syn match vimSubst "\(:\+\s*\|^\s*\)s\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat syn match vimSubst1 contained "\" nextgroup=vimSubstPat syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z( \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline syn region vimCollection contained transparent start="\\\@]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark ",\zs'[<>]\ze" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark "\'lc=1 syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' " Set command and associated set-options (vimOptions) with comment {{{2 syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand syn match vimSetMod contained "&vim\=\|[!&?<]\|all&" " Let {{{2 " === syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar " Abbreviations {{{2 " ============= syn keyword vimAbb ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbrev] ia[bbrev] skipwhite nextgroup=vimMapMod,vimMapLhs " Autocmd {{{2 " ======= syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent,nvimAutoEvent nextgroup=vimAutoCmdSpace syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList syn match vimAutoCmdSfxList contained "\S*" syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList " Echo and Execute -- prefer strings! {{{2 " ================ syn region vimEcho oneline excludenl matchgroup=vimCommand start="\" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimFuncVar,vimString,vimVar syn region vimExecute oneline excludenl matchgroup=vimCommand start="\" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimFuncVar,vimIsCommand,vimOper,vimNotation,vimOperParen,vimString,vimVar syn match vimEchoHL "echohl\=" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone,vimOnlyHLGroup,nvimHLGroup syn case ignore syn keyword vimEchoHLNone none syn case match " Maps {{{2 " ==== syn match vimMap "\!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn keyword nvimMap tn[oremap] tm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn keyword vimMap mapc[lear] smapc[lear] syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn keyword nvimUnmap tunm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue syn case ignore syn keyword vimMapModKey contained buffer expr leader localleader nowait plug script sid silent unique syn case match " Menus {{{2 " ===== syn cluster vimMenuList contains=vimMenuBang,vimMenuPriority,vimMenuName,vimMenuMod syn keyword vimCommand am[enu] an[oremenu] aun[menu] cme[nu] cnoreme[nu] cunme[nu] ime[nu] inoreme[nu] iunme[nu] me[nu] nme[nu] nnoreme[nu] noreme[nu] nunme[nu] ome[nu] onoreme[nu] ounme[nu] unme[nu] vme[nu] vnoreme[nu] vunme[nu] skipwhite nextgroup=@vimMenuList syn match vimMenuName "[^ \t\\<]\+" contained nextgroup=vimMenuNameMore,vimMenuMap syn match vimMenuPriority "\d\+\(\.\d\+\)*" contained skipwhite nextgroup=vimMenuName syn match vimMenuNameMore "\c\\\s\|\|\\\." contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation syn match vimMenuMod contained "\c<\(script\|silent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMenuList syn match vimMenuMap "\s" contained skipwhite nextgroup=vimMenuRhs syn match vimMenuRhs ".*$" contained contains=vimString,vimComment,vimIsCommand syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList " Angle-Bracket Notation (tnx to Michael Geddes) {{{2 " ====================== syn case ignore syn match vimNotation "\(\\\|\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket syn match vimNotation "\(\\\|\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket syn match vimNotation "\(\\\|\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket syn match vimNotation '\(\\\|\)\=[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket syn match vimNotation '\(\\\|\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket syn match vimNotation "\(\\\|\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket syn match vimBracket contained "[\\<>]" syn case match " User Function Highlighting {{{2 " (following Gautam Iyer's suggestion) " ========================== syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\" contains=vimNotation syn match vimNotFunc "\\|\\|\\|\" " Errors And Warnings: {{{2 " ==================== if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank " syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)[0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank syn match vimElseIfErr "\" syn match vimBufnrWarn /\" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment syn match vimAuSyntax contained "\s+sy\%[ntax]" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment syn cluster vimFuncBodyList add=vimSyntax " Syntax: case {{{2 syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror") syn match vimSynCaseError contained "\i\+" endif syn keyword vimSynCase contained ignore match " Syntax: clear {{{2 syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList " Syntax: cluster {{{2 syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName syn region vimClusterName contained matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError syn match vimGroupAdd contained "add=" nextgroup=vimGroupList syn match vimGroupRem contained "remove=" nextgroup=vimGroupList syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem " Syntax: iskeyword {{{2 syn keyword vimSynType contained iskeyword skipwhite nextgroup=vimIskList syn match vimIskList contained '\S\+' contains=vimIskSep syn match vimIskSep contained ',' " Syntax: include {{{2 syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList syn cluster vimFuncBodyList add=vimSynType " Syntax: keyword {{{2 syn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup syn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" syn cluster vimFuncBodyList add=vimSynType " Syntax: match {{{2 syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" if has("conceal") syn match vimSynMtchOpt contained "\" syn match vimSynReg contained "\(start\|skip\|end\)="he=e-1 nextgroup=vimSynRegPat syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup,vimOnlyHLGroup,nvimHLGroup syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=" syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod syn match vimSynPatMod contained "lc=\d\+" syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]" syn match vimSynNotPatRange contained "\\\\\|\\\[" syn match vimMtchComment contained '"[^"]\+$' syn cluster vimFuncBodyList add=vimSynType " Syntax: sync {{{2 " ============ syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinebreak,vimSyncLinecont,vimSyncRegion if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror") syn match vimSyncError contained "\i\+" endif syn keyword vimSyncC contained ccomment clear fromstart syn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynReg syn match vimSyncLinebreak contained "\" skipwhite nextgroup=vimSyncGroup syn match vimSyncGroup contained "\h\w*" skipwhite nextgroup=vimSynRegPat,vimSyncNone syn keyword vimSyncNone contained NONE " Additional IsCommand, here by reasons of precedence {{{2 " ==================== syn match vimIsCommand "\s*\a\+" transparent contains=vimCommand,vimNotation " Highlighting {{{2 " ============ syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") syn match vimHiCtermError contained "[^0-9]\i*" endif syn match vimHighlight "\" skipwhite nextgroup=vimHiBang,@vimHighlightCluster syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster syn match vimHiGroup contained "\i\+" syn case ignore syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl syn keyword vimFgBgAttrib contained none bg background fg foreground syn case match syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList syn case ignore syn keyword vimHiCtermColor contained black blue brown cyan darkblue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred magenta red white yellow syn match vimHiCtermColor contained "\" syn case match syn match vimHiFontname contained "[a-zA-Z\-*]\+" syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'" syn match vimHiGuiRgb contained "#\x\{6}" " Highlighting: hi group key=arg ... {{{2 syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation syn region vimHiKeyList contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||" contains=@vimHiCluster if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror") syn match vimHiKeyError contained "\i\+="he=e-1 endif syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList syn match vimHiStartStop contained "\c\(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib syn match vimHiTermcap contained "\S\+" contains=vimNotation syn match vimHiNmbr contained '\d\+' " Highlight: clear {{{2 syn keyword vimHiClear contained clear nextgroup=vimHiGroup " Highlight: link {{{2 syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\\|\\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation,vimOnlyHLGroup,nvimHLGroup syn cluster vimFuncBodyList add=vimHiLink " Control Characters {{{2 " ================== syn match vimCtrlChar "[- -]" " Beginners - Patterns that involve ^ {{{2 " ========= syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup syn match vimContinue "^\s*\\" syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained " Searches And Globals: {{{2 " ==================== syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained syn region vimGlobal matchgroup=Statement start='\:p:h")."/lua.vim") if !filereadable(s:luapath) for s:luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n") if filereadable(fnameescape(s:luapath)) let s:luapath= fnameescape(s:luapath) break endif endfor endif if g:vimsyn_embed =~# 'l' && filereadable(s:luapath) unlet! b:current_syntax exe "syn include @vimLuaScript ".s:luapath VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript syn cluster vimFuncBodyList add=vimLuaRegion else syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+ endif unlet s:luapath " [-- perl --] {{{3 let s:perlpath= fnameescape(expand(":p:h")."/perl.vim") if !filereadable(s:perlpath) for s:perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n") if filereadable(fnameescape(s:perlpath)) let s:perlpath= fnameescape(s:perlpath) break endif endfor endif if g:vimsyn_embed =~# 'p' && filereadable(s:perlpath) unlet! b:current_syntax let s:foldmethod = &l:foldmethod exe "syn include @vimPerlScript ".s:perlpath let &l:foldmethod = s:foldmethod VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript syn cluster vimFuncBodyList add=vimPerlRegion else syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ endif unlet s:perlpath " [-- ruby --] {{{3 let s:rubypath= fnameescape(expand(":p:h")."/ruby.vim") if !filereadable(s:rubypath) for s:rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n") if filereadable(fnameescape(s:rubypath)) let s:rubypath= fnameescape(s:rubypath) break endif endfor endif if g:vimsyn_embed =~# 'r' && filereadable(s:rubypath) unlet! b:current_syntax let s:foldmethod = &l:foldmethod exe "syn include @vimRubyScript ".s:rubypath let &l:foldmethod = s:foldmethod VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript syn cluster vimFuncBodyList add=vimRubyRegion else syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ syn region vimEmbedError start=+rub[y]\s*<<\s*$+ end=+\.$+ endif unlet s:rubypath " [-- python --] {{{3 let s:pythonpath= fnameescape(expand(":p:h")."/python.vim") if !filereadable(s:pythonpath) for s:pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n") if filereadable(fnameescape(s:pythonpath)) let s:pythonpath= fnameescape(s:pythonpath) break endif endfor endif if g:vimsyn_embed =~# 'P' && filereadable(s:pythonpath) unlet! b:current_syntax exe "syn include @vimPythonScript ".s:pythonpath VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript syn cluster vimFuncBodyList add=vimPythonRegion else syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ endif unlet s:pythonpath " [-- tcl --] {{{3 if has("win32") || has("win95") || has("win64") || has("win16") " apparently has("tcl") has been hanging vim on some windows systems with cygwin let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\\%(\.exe\)\=$') else let s:trytcl= 1 endif if s:trytcl let s:tclpath= fnameescape(expand(":p:h")."/tcl.vim") if !filereadable(s:tclpath) for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n") if filereadable(fnameescape(s:tclpath)) let s:tclpath= fnameescape(s:tclpath) break endif endfor endif if g:vimsyn_embed =~# 't' && filereadable(s:tclpath) unlet! b:current_syntax exe "syn include @vimTclScript ".s:tclpath VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript syn cluster vimFuncBodyList add=vimTclScript else syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+ endif unlet s:tclpath else syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+ endif unlet s:trytcl " [-- mzscheme --] {{{3 let s:mzschemepath= fnameescape(expand(":p:h")."/scheme.vim") if !filereadable(s:mzschemepath) for s:mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n") if filereadable(fnameescape(s:mzschemepath)) let s:mzschemepath= fnameescape(s:mzschemepath) break endif endfor endif if g:vimsyn_embed =~# 'm' && filereadable(s:mzschemepath) unlet! b:current_syntax let s:iskKeep= &isk exe "syn include @vimMzSchemeScript ".s:mzschemepath let &isk= s:iskKeep unlet s:iskKeep VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript syn cluster vimFuncBodyList add=vimMzSchemeRegion else syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ endif unlet s:mzschemepath " Synchronize (speed) {{{2 "============ if exists("g:vimsyn_minlines") exe "syn sync minlines=".g:vimsyn_minlines endif exe "syn sync maxlines=".s:vimsyn_maxlines syn sync linecont "^\s\+\\" syn sync match vimAugroupSyncA groupthere NONE "\\s\+[eE][nN][dD]" " ==================== " Highlighting Settings {{{2 " ==================== if !exists("skip_vim_syntax_inits") if !exists("g:vimsyn_noerror") hi def link vimBehaveError vimError hi def link vimCollClassErr vimError hi def link vimErrSetting vimError hi def link vimEmbedError Normal hi def link vimFTError vimError hi def link vimFunctionError vimError hi def link vimFunc vimError hi def link vimHiAttribList vimError hi def link vimHiCtermError vimError hi def link vimHiKeyError vimError hi def link vimKeyCodeError vimError hi def link vimMapModErr vimError hi def link vimSubstFlagErr vimError hi def link vimSynCaseError vimError hi def link vimBufnrWarn vimWarn endif hi def link vimAbb vimCommand hi def link vimAddress vimMark hi def link vimAugroupError vimError hi def link vimAugroupKey vimCommand hi def link vimAuHighlight vimHighlight hi def link vimAutoCmdOpt vimOption hi def link vimAutoCmd vimCommand hi def link vimAutoEvent Type hi def link vimAutoSet vimCommand hi def link vimBehaveModel vimBehave hi def link vimBehave vimCommand hi def link vimBracket Delimiter hi def link vimCmplxRepeat SpecialChar hi def link vimCommand Statement hi def link vimComment Comment hi def link vimCommentString vimString hi def link vimCommentTitle PreProc hi def link vimCondHL vimCommand hi def link vimContinue Special hi def link vimCtrlChar SpecialChar hi def link vimEchoHLNone vimGroup hi def link vimEchoHL vimCommand hi def link vimElseIfErr Error hi def link vimElseif vimCondHL hi def link vimEnvvar PreProc hi def link vimError Error hi def link vimFBVar vimVar hi def link vimFgBgAttrib vimHiAttrib hi def link vimFold Folded hi def link vimFTCmd vimCommand hi def link vimFTOption vimSynType hi def link vimFuncKey vimCommand hi def link vimFuncName Function hi def link vimFuncSID Special hi def link vimFuncVar Identifier hi def link vimGroupAdd vimSynOption hi def link vimGroupName vimGroup hi def link vimGroupRem vimSynOption hi def link vimGroupSpecial Special hi def link vimGroup Type hi def link vimHiAttrib PreProc hi def link vimHiClear vimHighlight hi def link vimHiCtermFgBg vimHiTerm hi def link vimHiCTerm vimHiTerm hi def link vimHighlight vimCommand hi def link vimHiGroup vimGroupName hi def link vimHiGuiFgBg vimHiTerm hi def link vimHiGuiFont vimHiTerm hi def link vimHiGuiRgb vimNumber hi def link vimHiGui vimHiTerm hi def link vimHiNmbr Number hi def link vimHiStartStop vimHiTerm hi def link vimHiTerm Type hi def link vimHLGroup vimGroup hi def link vimHLMod PreProc hi def link vimInsert vimString hi def link vimIskSep Delimiter hi def link vimKeyCode vimSpecFile hi def link vimKeyword Statement hi def link vimLet vimCommand hi def link vimLineComment vimComment hi def link vimMapBang vimCommand hi def link vimMapModKey vimFuncSID hi def link vimMapMod vimBracket hi def link vimMap vimCommand hi def link vimMark Number hi def link vimMarkNumber vimNumber hi def link vimMenuMod vimMapMod hi def link vimMenuNameMore vimMenuName hi def link vimMenuName PreProc hi def link vimMtchComment vimComment hi def link vimNorm vimCommand hi def link vimNotation Special hi def link vimNotFunc vimCommand hi def link vimNotPatSep vimString hi def link vimNumber Number hi def link vimOperError Error hi def link vimOper Operator hi def link vimOption PreProc hi def link vimParenSep Delimiter hi def link vimPatSepErr vimPatSep hi def link vimPatSepR vimPatSep hi def link vimPatSep SpecialChar hi def link vimPatSepZone vimString hi def link vimPatSepZ vimPatSep hi def link vimPattern Type hi def link vimPlainMark vimMark hi def link vimPlainRegister vimRegister hi def link vimRegister SpecialChar hi def link vimScriptDelim Comment hi def link vimSearchDelim Statement hi def link vimSearch vimString hi def link vimSep Delimiter hi def link vimSetMod vimOption hi def link vimSetSep Statement hi def link vimSetString vimString hi def link vimSpecFile Identifier hi def link vimSpecFileMod vimSpecFile hi def link vimSpecial Type hi def link vimStatement Statement hi def link vimStringCont vimString hi def link vimString String hi def link vimSubst1 vimSubst hi def link vimSubstDelim Delimiter hi def link vimSubstFlags Special hi def link vimSubstSubstr SpecialChar hi def link vimSubstTwoBS vimString hi def link vimSubst vimCommand hi def link vimSynCaseError Error hi def link vimSynCase Type hi def link vimSyncC Type hi def link vimSyncError Error hi def link vimSyncGroupName vimGroupName hi def link vimSyncGroup vimGroupName hi def link vimSyncKey Type hi def link vimSyncNone Type hi def link vimSynContains vimSynOption hi def link vimSynError Error hi def link vimSynKeyContainedin vimSynContains hi def link vimSynKeyOpt vimSynOption hi def link vimSynMtchGrp vimSynOption hi def link vimSynMtchOpt vimSynOption hi def link vimSynNextgroup vimSynOption hi def link vimSynNotPatRange vimSynRegPat hi def link vimSynOption Special hi def link vimSynPatRange vimString hi def link vimSynRegOpt vimSynOption hi def link vimSynRegPat vimString hi def link vimSynReg Type hi def link vimSyntax vimCommand hi def link vimSynType vimSpecial hi def link vimTodo Todo hi def link vimUnmap vimMap hi def link vimUserAttrbCmpltFunc Special hi def link vimUserAttrbCmplt vimSpecial hi def link vimUserAttrbKey vimOption hi def link vimUserAttrb vimSpecial hi def link vimUserAttrbError Error hi def link vimUserCmdError Error hi def link vimUserCommand vimCommand hi def link vimUserFunc Normal hi def link vimVar Identifier hi def link vimWarn WarningMsg hi def link nvimAutoEvent vimAutoEvent hi def link nvimHLGroup vimHLGroup hi def link nvimMap vimMap hi def link nvimUnmap vimUnmap endif " Current Syntax Variable: {{{2 let b:current_syntax = "vim" " --------------------------------------------------------------------- " Cleanup: {{{1 delc VimFolda delc VimFoldf delc VimFoldl delc VimFoldm delc VimFoldp delc VimFoldP delc VimFoldr delc VimFoldt let &cpo = s:keepcpo unlet s:keepcpo " vim:ts=18 fdm=marker neovim-0.2.2/runtime/syntax/viminfo.vim000066400000000000000000000023311320401574200202020ustar00rootroot00000000000000" Vim syntax file " Language: Vim .viminfo file " Maintainer: Bram Moolenaar " Last Change: 2016 Jun 05 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " The lines that are NOT recognized syn match viminfoError "^[^\t].*" " The one-character one-liners that are recognized syn match viminfoStatement "^[/&$@:?=%!<]" " The two-character one-liners that are recognized syn match viminfoStatement "^[-'>"]." syn match viminfoStatement +^"".+ syn match viminfoStatement "^\~[/&]" syn match viminfoStatement "^\~[hH]" syn match viminfoStatement "^\~[mM][sS][lL][eE]\d\+\~\=[/&]" syn match viminfoOption "^\*.*=" contains=viminfoOptionName syn match viminfoOptionName "\*\a*"ms=s+1 contained " Comments syn match viminfoComment "^#.*" " New style lines. TODO: highlight numbers and strings. syn match viminfoNew "^|.*" " Define the default highlighting. " Only used when an item doesn't have highlighting yet hi def link viminfoComment Comment hi def link viminfoError Error hi def link viminfoStatement Statement hi def link viminfoNew String let b:current_syntax = "viminfo" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/vimnormal.vim000066400000000000000000000013041320401574200205360ustar00rootroot00000000000000syn match normalOp /[dcrypoaxv!"#%&.-\/:<>=?@ABCDGHIJKLMNOPQRSUVWXYZgmqstz~iu]/ nextgroup=normalMod syn match normalMod /m\@BW\[\]`bstweE{}ftFT;,$]/ syn match normalCount /[0-9]/ syn region normalSearch start=/[/?]\@<=./ end=/.\@=/ contains=normalKey keepend syn region normalChange start=/\([cr][wWbBeE()\[\]{}pst]\)\@<=./ end=/.\@=/ contains=normalKey keepend syn match normalCharSearch /\c[ftr]\@<=\w/ syn match normalMark /\(f\@'\@!/ hi! link normalOp Operator hi! link normalMod PreProc hi! link normalObject Structure hi! link normalCount Number hi! link normalMark Identifier hi! link normalKey Special neovim-0.2.2/runtime/syntax/virata.vim000066400000000000000000000265351320401574200200350ustar00rootroot00000000000000" Vim syntax file " Language: Virata AConfig Configuration Script " Maintainer: Manuel M.H. Stol " Last Change: 2003 May 11 " Vim URL: http://www.vim.org/lang.html " Virata URL: http://www.globespanvirata.com/ " Virata AConfig Configuration Script syntax " Can be detected by: 1) Extension .hw, .sw, .pkg and .module " 2) The file name pattern "mk.*\.cfg" " 3) The string "Virata" in the first 5 lines " Setup Syntax: " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Virata syntax is case insensitive (mostly) syn case ignore " Comments: " Virata comments start with %, but % is not a keyword character syn region virataComment start="^%" start="\s%"lc=1 keepend end="$" contains=@virataGrpInComments syn region virataSpclComment start="^%%" start="\s%%"lc=1 keepend end="$" contains=@virataGrpInComments syn keyword virataInCommentTodo contained TODO FIXME XXX[XXXXX] REVIEW TBD syn cluster virataGrpInComments contains=virataInCommentTodo syn cluster virataGrpComments contains=@virataGrpInComments,virataComment,virataSpclComment " Constants: syn match virataStringError +["]+ syn region virataString start=+"+ skip=+\(\\\\\|\\"\)+ end=+"+ oneline contains=virataSpclCharError,virataSpclChar,@virataGrpDefSubsts syn match virataCharacter +'[^']\{-}'+ contains=virataSpclCharError,virataSpclChar syn match virataSpclChar contained +\\\(x\x\+\|\o\{1,3}\|['\"?\\abefnrtv]\)+ syn match virataNumberError "\<\d\{-1,}\I\{-1,}\>" syn match virataNumberError "\<0x\x*\X\x*\>" syn match virataNumberError "\<\d\+\.\d*\(e[+-]\=\d\+\)\=\>" syn match virataDecNumber "\<\d\+U\=L\=\>" syn match virataHexNumber "\<0x\x\+U\=L\=\>" syn match virataSizeNumber "\<\d\+[BKM]\>"he=e-1 syn match virataSizeNumber "\<\d\+[KM]B\>"he=e-2 syn cluster virataGrpNumbers contains=virataNumberError,virataDecNumber,virataHexNumber,virataSizeNumber syn cluster virataGrpConstants contains=@virataGrpNumbers,virataStringError,virataString,virataCharacter,virataSpclChar " Identifiers: syn match virataIdentError contained "\<\D\S*\>" syn match virataIdentifier contained "\<\I\i\{-}\(\-\i\{-1,}\)*\>" contains=@virataGrpDefSubsts syn match virataFileIdent contained "\F\f*" contains=@virataGrpDefSubsts syn cluster virataGrpIdents contains=virataIdentifier,virataIdentError syn cluster virataGrpFileIdents contains=virataFileIdent,virataIdentError " Statements: syn match virataStatement "^\s*Config\(\(/Kernel\)\=\.\(hs\=\|s\)\)\=\>" syn match virataStatement "^\s*Config\s\+\I\i\{-}\(\-\i\{-1,}\)*\.\(hs\=\|s\)\>" syn match virataStatement "^\s*Make\.\I\i\{-}\(\-\i\{-1}\)*\>" skipwhite nextgroup=@virataGrpIdents syn match virataStatement "^\s*Make\.c\(at\)\=++\s"me=e-1 skipwhite nextgroup=@virataGrpIdents syn match virataStatement "^\s*\(Architecture\|GetEnv\|Reserved\|\(Un\)\=Define\|Version\)\>" skipwhite nextgroup=@virataGrpIdents syn match virataStatement "^\s*\(Hardware\|ModuleSource\|\(Release\)\=Path\|Software\)\>" skipwhite nextgroup=@virataGrpFileIdents syn match virataStatement "^\s*\(DefaultPri\|Hydrogen\)\>" skipwhite nextgroup=virataDecNumber,virataNumberError syn match virataStatement "^\s*\(NoInit\|PCI\|SysLink\)\>" syn match virataStatement "^\s*Allow\s\+\(ModuleConfig\)\>" syn match virataStatement "^\s*NoWarn\s\+\(Export\|Parse\=able\|Relative]\)\>" syn match virataStatement "^\s*Debug\s\+O\(ff\|n\)\>" " Import (Package |Module from ) syn region virataImportDef transparent matchgroup=virataStatement start="^\s*Import\>" keepend end="$" contains=virataInImport,virataModuleDef,virataNumberError,virataStringError,@virataGrpDefSubsts syn match virataInImport contained "\<\(Module\|Package\|from\)\>" skipwhite nextgroup=@virataGrpFileIdents " Export (Header
|SLibrary ) syn region virataExportDef transparent matchgroup=virataStatement start="^\s*Export\>" keepend end="$" contains=virataInExport,virataNumberError,virataStringError,@virataGrpDefSubsts syn match virataInExport contained "\<\(Header\|[SU]Library\)\>" skipwhite nextgroup=@virataGrpFileIdents " Process is syn region virataProcessDef transparent matchgroup=virataStatement start="^\s*Process\>" keepend end="$" contains=virataInProcess,virataInExec,virataNumberError,virataStringError,@virataGrpDefSubsts,@virataGrpIdents syn match virataInProcess contained "\" " Instance of syn region virataInstanceDef transparent matchgroup=virataStatement start="^\s*Instance\>" keepend end="$" contains=virataInInstance,virataNumberError,virataStringError,@virataGrpDefSubsts,@virataGrpIdents syn match virataInInstance contained "\" " Module from syn region virataModuleDef transparent matchgroup=virataStatement start="^\s*\(Package\|Module\)\>" keepend end="$" contains=virataInModule,virataNumberError,virataStringError,@virataGrpDefSubsts syn match virataInModule contained "^\s*Package\>"hs=e-7 skipwhite nextgroup=@virataGrpIdents syn match virataInModule contained "^\s*Module\>"hs=e-6 skipwhite nextgroup=@virataGrpIdents syn match virataInModule contained "\" skipwhite nextgroup=@virataGrpFileIdents " Colour from syn region virataColourDef transparent matchgroup=virataStatement start="^\s*Colour\>" keepend end="$" contains=virataInColour,virataNumberError,virataStringError,@virataGrpDefSubsts syn match virataInColour contained "^\s*Colour\>"hs=e-6 skipwhite nextgroup=@virataGrpIdents syn match virataInColour contained "\" skipwhite nextgroup=@virataGrpFileIdents " Link {} " Object {Executable []} syn match virataStatement "^\s*\(Link\|Object\)" " Executable [] syn region virataExecDef transparent matchgroup=virataStatement start="^\s*Executable\>" keepend end="$" contains=virataInExec,virataNumberError,virataStringError syn match virataInExec contained "^\s*Executable\>" skipwhite nextgroup=@virataGrpDefSubsts,@virataGrpIdents syn match virataInExec contained "\<\(epilogue\|pro\(logue\|cess\)\|qhandler\)\>" skipwhite nextgroup=@virataGrpDefSubsts,@virataGrpIdents syn match virataInExec contained "\<\(priority\|stack\)\>" skipwhite nextgroup=@virataGrpDefSubsts,@virataGrpNumbers " Message {} " MessageId syn match virataStatement "^\s*Message\(Id\)\=\>" skipwhite nextgroup=@virataGrpNumbers " MakeRule {} syn region virataMakeDef transparent matchgroup=virataStatement start="^\s*MakeRule\>" keepend end="$" contains=virataInMake,@virataGrpDefSubsts syn case match syn match virataInMake contained "\" syn case ignore " (Append|Edit|Copy)Rule syn match virataStatement "^\s*\(Append\|Copy\|Edit\)Rule\>" " AlterRules in syn region virataAlterDef transparent matchgroup=virataStatement start="^\s*AlterRules\>" keepend end="$" contains=virataInAlter,@virataGrpDefSubsts syn match virataInAlter contained "\" skipwhite nextgroup=@virataGrpIdents " Clustering syn cluster virataGrpInStatmnts contains=virataInImport,virataInExport,virataInExec,virataInProcess,virataInAlter,virataInInstance,virataInModule,virataInColour syn cluster virataGrpStatements contains=@virataGrpInStatmnts,virataStatement,virataImportDef,virataExportDef,virataExecDef,virataProcessDef,virataAlterDef,virataInstanceDef,virataModuleDef,virataColourDef " MkFlash.Cfg File Statements: syn region virataCfgFileDef transparent matchgroup=virataCfgStatement start="^\s*Dir\>" start="^\s*\a\{-}File\>" start="^\s*OutputFile\d\d\=\>" start="^\s*\a\w\{-}[NP]PFile\>" keepend end="$" contains=@virataGrpFileIdents syn region virataCfgSizeDef transparent matchgroup=virataCfgStatement start="^\s*\a\{-}Size\>" start="^\s*ConfigInfo\>" keepend end="$" contains=@virataGrpNumbers,@virataGrpDefSubsts,virataIdentError syn region virataCfgNumberDef transparent matchgroup=virataCfgStatement start="^\s*FlashchipNum\(b\(er\=\)\=\)\=\>" start="^\s*Granularity\>" keepend end="$" contains=@virataGrpNumbers,@virataGrpDefSubsts syn region virataCfgMacAddrDef transparent matchgroup=virataCfgStatement start="^\s*MacAddress\>" keepend end="$" contains=virataNumberError,virataStringError,virataIdentError,virataInMacAddr,@virataGrpDefSubsts syn match virataInMacAddr contained "\x[:]\x\{1,2}\>"lc=2 syn match virataInMacAddr contained "\s\x\{1,2}[:]\x"lc=1,me=e-1,he=e-2 nextgroup=virataInMacAddr syn match virataCfgStatement "^\s*Target\>" skipwhite nextgroup=@virataGrpIdents syn cluster virataGrpCfgs contains=virataCfgStatement,virataCfgFileDef,virataCfgSizeDef,virataCfgNumberDef,virataCfgMacAddrDef,virataInMacAddr " PreProcessor Instructions: " Defines syn match virataDefine "^\s*\(Un\)\=Set\>" skipwhite nextgroup=@virataGrpIdents syn match virataInclude "^\s*Include\>" skipwhite nextgroup=@virataGrpFileIdents syn match virataDefSubstError "[^$]\$"lc=1 syn match virataDefSubstError "\$\(\w\|{\(.\{-}}\)\=\)" syn case match syn match virataDefSubst "\$\(\d\|[DINORS]\|{\I\i\{-}\(\-\i\{-1,}\)*}\)" syn case ignore " Conditionals syn cluster virataGrpCntnPreCon contains=ALLBUT,@virataGrpInComments,@virataGrpFileIdents,@virataGrpInStatmnts syn region virataPreConDef transparent matchgroup=virataPreCondit start="^\s*If\>" end="^\s*Endif\>" contains=@virataGrpCntnPreCon syn match virataPreCondit contained "^\s*Else\(\s\+If\)\=\>" syn region virataPreConDef transparent matchgroup=virataPreCondit start="^\s*ForEach\>" end="^\s*Done\>" contains=@virataGrpCntnPreCon " Pre-Processors syn region virataPreProc start="^\s*Error\>" start="^\s*Warning\>" oneline end="$" contains=@virataGrpConstants,@virataGrpDefSubsts syn cluster virataGrpDefSubsts contains=virataDefSubstError,virataDefSubst syn cluster virataGrpPreProcs contains=@virataGrpDefSubsts,virataDefine,virataInclude,virataPreConDef,virataPreCondit,virataPreProc " Synchronize Syntax: syn sync clear syn sync minlines=50 "for multiple region nesting " Define the default highlighting. " Only when an item doesn't have highlighting yet " Sub Links: hi def link virataDefSubstError virataPreProcError hi def link virataDefSubst virataPreProc hi def link virataInAlter virataOperator hi def link virataInExec virataOperator hi def link virataInExport virataOperator hi def link virataInImport virataOperator hi def link virataInInstance virataOperator hi def link virataInMake virataOperator hi def link virataInModule virataOperator hi def link virataInProcess virataOperator hi def link virataInMacAddr virataHexNumber " Comment Group: hi def link virataComment Comment hi def link virataSpclComment SpecialComment hi def link virataInCommentTodo Todo " Constant Group: hi def link virataString String hi def link virataStringError Error hi def link virataCharacter Character hi def link virataSpclChar Special hi def link virataDecNumber Number hi def link virataHexNumber Number hi def link virataSizeNumber Number hi def link virataNumberError Error " Identifier Group: hi def link virataIdentError Error " PreProc Group: hi def link virataPreProc PreProc hi def link virataDefine Define hi def link virataInclude Include hi def link virataPreCondit PreCondit hi def link virataPreProcError Error hi def link virataPreProcWarn Todo " Directive Group: hi def link virataStatement Statement hi def link virataCfgStatement Statement hi def link virataOperator Operator hi def link virataDirective Keyword let b:current_syntax = "virata" " vim:ts=8:sw=2:noet: neovim-0.2.2/runtime/syntax/vmasm.vim000066400000000000000000000205001320401574200176540ustar00rootroot00000000000000" Vim syntax file " Language: (VAX) Macro Assembly " Maintainer: Tom Uijldert " Last change: 2004 May 16 " " This is incomplete. Feel free to contribute... " " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " Partial list of register symbols syn keyword vmasmReg r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 syn keyword vmasmReg ap fp sp pc iv dv " All matches - order is important! syn keyword vmasmOpcode adawi adwc ashl ashq bitb bitw bitl decb decw decl syn keyword vmasmOpcode ediv emul incb incw incl mcomb mcomw mcoml syn keyword vmasmOpcode movzbw movzbl movzwl popl pushl rotl sbwc syn keyword vmasmOpcode cmpv cmpzv cmpc3 cmpc5 locc matchc movc3 movc5 syn keyword vmasmOpcode movtc movtuc scanc skpc spanc crc extv extzv syn keyword vmasmOpcode ffc ffs insv aobleq aoblss bbc bbs bbcci bbssi syn keyword vmasmOpcode blbc blbs brb brw bsbb bsbw caseb casew casel syn keyword vmasmOpcode jmp jsb rsb sobgeq sobgtr callg calls ret syn keyword vmasmOpcode bicpsw bispsw bpt halt index movpsl nop popr pushr xfc syn keyword vmasmOpcode insqhi insqti insque remqhi remqti remque syn keyword vmasmOpcode addp4 addp6 ashp cmpp3 cmpp4 cvtpl cvtlp cvtps cvtpt syn keyword vmasmOpcode cvtsp cvttp divp movp mulp subp4 subp6 editpc syn keyword vmasmOpcode prober probew rei ldpctx svpctx mfpr mtpr bugw bugl syn keyword vmasmOpcode vldl vldq vgathl vgathq vstl vstq vscatl vscatq syn keyword vmasmOpcode vvcvt iota mfvp mtvp vsync syn keyword vmasmOpcode beql[u] bgtr[u] blss[u] syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" syn match vmasmOpcode "\" " Various number formats syn match vmasmdecNumber "[+-]\=[0-9]\+\>" syn match vmasmdecNumber "^d[0-9]\+\>" syn match vmasmhexNumber "^x[0-9a-f]\+\>" syn match vmasmoctNumber "^o[0-7]\+\>" syn match vmasmbinNumber "^b[01]\+\>" syn match vmasmfloatNumber "[-+]\=[0-9]\+E[-+]\=[0-9]\+" syn match vmasmfloatNumber "[-+]\=[0-9]\+\.[0-9]*\(E[-+]\=[0-9]\+\)\=" " Valid labels syn match vmasmLabel "^[a-z_$.][a-z0-9_$.]\{,30}::\=" syn match vmasmLabel "\<[0-9]\{1,5}\$:\=" " Local label " Character string constants " Too complex really. Could be "<...>" but those could also be " expressions. Don't know how to handle chosen delimiters " ("^...") " syn region vmasmString start="<" end=">" oneline " Operators syn match vmasmOperator "[-+*/@&!\\]" syn match vmasmOperator "=" syn match vmasmOperator "==" " Global assignment syn match vmasmOperator "%length(.*)" syn match vmasmOperator "%locate(.*)" syn match vmasmOperator "%extract(.*)" syn match vmasmOperator "^[amfc]" syn match vmasmOperator "[bwlg]^" syn match vmasmOperator "\<\(not_\)\=equal\>" syn match vmasmOperator "\" syn match vmasmOperator "\" syn match vmasmOperator "\" syn match vmasmOperator "\<\(not_\)\=defined\>" syn match vmasmOperator "\<\(not_\)\=blank\>" syn match vmasmOperator "\" syn match vmasmOperator "\" syn match vmasmOperator "\" syn match vmasmOperator "\<[gl]t\>" syn match vmasmOperator "\" syn match vmasmOperator "\" syn match vmasmOperator "\" syn match vmasmOperator "\<[nlg]e\>" syn match vmasmOperator "\" " Special items for comments syn keyword vmasmTodo contained todo " Comments syn match vmasmComment ";.*" contains=vmasmTodo " Include syn match vmasmInclude "\.library\>" " Macro definition syn match vmasmMacro "\.macro\>" syn match vmasmMacro "\.mexit\>" syn match vmasmMacro "\.endm\>" syn match vmasmMacro "\.mcall\>" syn match vmasmMacro "\.mdelete\>" " Conditional assembly syn match vmasmPreCond "\.iff\=\>" syn match vmasmPreCond "\.if_false\>" syn match vmasmPreCond "\.iftf\=\>" syn match vmasmPreCond "\.if_true\(_false\)\=\>" syn match vmasmPreCond "\.iif\>" " Loop control syn match vmasmRepeat "\.irpc\=\>" syn match vmasmRepeat "\.repeat\>" syn match vmasmRepeat "\.rept\>" syn match vmasmRepeat "\.endr\>" " Directives syn match vmasmDirective "\.address\>" syn match vmasmDirective "\.align\>" syn match vmasmDirective "\.asci[cdiz]\>" syn match vmasmDirective "\.blk[abdfghloqw]\>" syn match vmasmDirective "\.\(signed_\)\=byte\>" syn match vmasmDirective "\.\(no\)\=cross\>" syn match vmasmDirective "\.debug\>" syn match vmasmDirective "\.default displacement\>" syn match vmasmDirective "\.[dfgh]_floating\>" syn match vmasmDirective "\.disable\>" syn match vmasmDirective "\.double\>" syn match vmasmDirective "\.dsabl\>" syn match vmasmDirective "\.enable\=\>" syn match vmasmDirective "\.endc\=\>" syn match vmasmDirective "\.entry\>" syn match vmasmDirective "\.error\>" syn match vmasmDirective "\.even\>" syn match vmasmDirective "\.external\>" syn match vmasmDirective "\.extrn\>" syn match vmasmDirective "\.float\>" syn match vmasmDirective "\.globa\=l\>" syn match vmasmDirective "\.ident\>" syn match vmasmDirective "\.link\>" syn match vmasmDirective "\.list\>" syn match vmasmDirective "\.long\>" syn match vmasmDirective "\.mask\>" syn match vmasmDirective "\.narg\>" syn match vmasmDirective "\.nchr\>" syn match vmasmDirective "\.nlist\>" syn match vmasmDirective "\.ntype\>" syn match vmasmDirective "\.octa\>" syn match vmasmDirective "\.odd\>" syn match vmasmDirective "\.opdef\>" syn match vmasmDirective "\.packed\>" syn match vmasmDirective "\.page\>" syn match vmasmDirective "\.print\>" syn match vmasmDirective "\.psect\>" syn match vmasmDirective "\.quad\>" syn match vmasmDirective "\.ref[1248]\>" syn match vmasmDirective "\.ref16\>" syn match vmasmDirective "\.restore\(_psect\)\=\>" syn match vmasmDirective "\.save\(_psect\)\=\>" syn match vmasmDirective "\.sbttl\>" syn match vmasmDirective "\.\(no\)\=show\>" syn match vmasmDirective "\.\(sub\)\=title\>" syn match vmasmDirective "\.transfer\>" syn match vmasmDirective "\.warn\>" syn match vmasmDirective "\.weak\>" syn match vmasmDirective "\.\(signed_\)\=word\>" syn case match " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default methods for highlighting. Can be overridden later " Comment Constant Error Identifier PreProc Special Statement Todo Type " " Constant Boolean Character Number String " Identifier Function " PreProc Define Include Macro PreCondit " Special Debug Delimiter SpecialChar SpecialComment Tag " Statement Conditional Exception Keyword Label Operator Repeat " Type StorageClass Structure Typedef hi def link vmasmComment Comment hi def link vmasmTodo Todo hi def link vmasmhexNumber Number " Constant hi def link vmasmoctNumber Number " Constant hi def link vmasmbinNumber Number " Constant hi def link vmasmdecNumber Number " Constant hi def link vmasmfloatNumber Number " Constant " hi def link vmasmString String " Constant hi def link vmasmReg Identifier hi def link vmasmOperator Identifier hi def link vmasmInclude Include " PreProc hi def link vmasmMacro Macro " PreProc " hi def link vmasmMacroParam Keyword " Statement hi def link vmasmDirective Special hi def link vmasmPreCond Special hi def link vmasmOpcode Statement hi def link vmasmCond Conditional " Statement hi def link vmasmRepeat Repeat " Statement hi def link vmasmLabel Type let b:current_syntax = "vmasm" " vim: ts=8 sw=2 neovim-0.2.2/runtime/syntax/voscm.vim000066400000000000000000000154771320401574200177010ustar00rootroot00000000000000" Vim syntax file " Language: VOS CM macro " Maintainer: Andrew McGill andrewm at lunch.za.net " Last Change: Apr 06, 2007 " Version: 1 " URL: http://lunch.za.net/ " " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match " set iskeyword=48-57,_,a-z,A-Z syn match voscmStatement "^!" syn match voscmStatement "&\(label\|begin_parameters\|end_parameters\|goto\|attach_input\|break\|continue\|control\|detach_input\|display_line\|display_line_partial\|echo\|eof\|eval\|if\|mode\|return\|while\|set\|set_string\|then\|else\|do\|done\|end\)\>" syn match voscmJump "\(&label\|&goto\) *" nextgroup=voscmLabelId syn match voscmLabelId contained "\<[A-Za-z][A-Z_a-z0-9]* *$" syn match voscmSetvar "\(&set_string\|&set\) *" nextgroup=voscmVariable syn match voscmError "\(&set_string\|&set\) *&" syn match voscmVariable contained "\<[A-Za-z][A-Z_a-z0-9]\+\>" syn keyword voscmParamKeyword contained number req string switch allow byte disable_input hidden length longword max min no_abbrev output_path req required req_for_form word syn region voscmParamList matchgroup=voscmParam start="&begin_parameters" end="&end_parameters" contains=voscmParamKeyword,voscmString,voscmParamName,voscmParamId syn match voscmParamName contained "\(^\s*[A-Za-z_0-9]\+\s\+\)\@<=\k\+" syn match voscmParamId contained "\(^\s*\)\@<=\k\+" syn region par1 matchgroup=par1 start=/(/ end=/)/ contains=voscmFunction,voscmIdentifier,voscmString transparent " FIXME: functions should only be allowed after a bracket ... ie (ask ...): syn keyword voscmFunction contained abs access after ask before break byte calc ceil command_status concat syn keyword voscmFunction contained contents path_name copy count current_dir current_module date date_time syn keyword voscmFunction contained decimal directory_name end_of_file exists file_info floor given group_name syn keyword voscmFunction contained has_access hexadecimal home_dir index iso_date iso_date_time language_name syn keyword voscmFunction contained length lock_type locked ltrim master_disk max message min mod module_info syn keyword voscmFunction contained module_name object_name online path_name person_name process_dir process_info syn keyword voscmFunction contained process_type quote rank referencing_dir reverse rtrim search syn keyword voscmFunction contained software_purchased string substitute substr system_name terminal_info syn keyword voscmFunction contained terminal_name time translate trunc unique_string unquote user_name verify syn keyword voscmFunction contained where_path syn keyword voscmTodo contained TODO FIXME XXX DEBUG NOTE syn match voscmTab "\t\+" syn keyword voscmCommand add_entry_names add_library_path add_profile analyze_pc_samples attach_default_output attach_port batch bind break_process c c_preprocess call_thru cancel_batch_requests cancel_device_reservation cancel_print_requests cc change_current_dir check_posix cobol comment_on_manual compare_dirs compare_files convert_text_file copy_dir copy_file copy_tape cpp create_data_object create_deleted_record_index create_dir create_file create_index create_record_index create_tape_volumes cvt_fixed_to_stream cvt_stream_to_fixed debug delete_dir delete_file delete_index delete_library_path detach_default_output detach_port dismount_tape display display_access display_access_list display_batch_status display_current_dir display_current_module display_date_time display_default_access_list display_device_info display_dir_status display_disk_info display_disk_usage display_error display_file display_file_status display_line display_notices display_object_module_info display_print_defaults display_print_status display_program_module display_system_usage display_tape_params display_terminal_parameters dump_file dump_record dump_tape edit edit_form emacs enforce_region_locks fortran get_external_variable give_access give_default_access handle_sig_dfl harvest_pc_samples help kill line_edit link link_dirs list list_batch_requests list_devices list_gateways list_library_paths list_modules list_port_attachments list_print_requests list_process_cmd_limits list_save_tape list_systems list_tape list_terminal_types list_users locate_files locate_large_files login logout mount_tape move_device_reservation move_dir move_file mp_debug nls_edit_form pascal pl1 position_tape preprocess_file print profile propagate_access read_tape ready remove_access remove_default_access rename reserve_device restore_object save_object send_message set set_cpu_time_limit set_expiration_date set_external_variable set_file_allocation set_implicit_locking set_index_flags set_language set_library_paths set_line_wrap_width set_log_protected_file set_owner_access set_pipe_file set_priority set_ready set_safety_switch set_second_tape set_tape_drive_params set_tape_file_params set_tape_mount_params set_terminal_parameters set_text_file set_time_zone sleep sort start_logging start_process stop_logging stop_process tail_file text_data_merge translate_links truncate_file unlink update_batch_requests update_print_requests update_process_cmd_limits use_abbreviations use_message_file vcc verify_posix_access verify_save verify_system_access walk_dir where_command where_path who_locked write_tape syn match voscmIdentifier "&[A-Za-z][a-z0-9_A-Z]*&" syn match voscmString "'[^']*'" " Number formats syn match voscmNumber "\<\d\+\>" "Floating point number part only syn match voscmDecimalNumber "\.\d\+\([eE][-+]\=\d\)\=\>" "syn region voscmComment start="^[ ]*&[ ]+" end="$" "syn match voscmComment "^[ ]*&[ ].*$" "syn match voscmComment "^&$" syn region voscmComment start="^[ ]*&[ ]" end="$" contains=voscmTodo syn match voscmComment "^&$" syn match voscmContinuation "&+$" "syn match voscmIdentifier "[A-Za-z0-9&._-]\+" "Synchronization with Statement terminator $ " syn sync maxlines=100 hi def link voscmConditional Conditional hi def link voscmStatement Statement hi def link voscmSetvar Statement hi def link voscmNumber Number hi def link voscmDecimalNumber Float hi def link voscmString String hi def link voscmIdentifier Identifier hi def link voscmVariable Identifier hi def link voscmComment Comment hi def link voscmJump Statement hi def link voscmContinuation Macro hi def link voscmLabelId String hi def link voscmParamList NONE hi def link voscmParamId Identifier hi def link voscmParamName String hi def link voscmParam Statement hi def link voscmParamKeyword Statement hi def link voscmFunction Function hi def link voscmCommand Structure "hi def link voscmIdentifier NONE "hi def link voscmSpecial Special " not used hi def link voscmTodo Todo hi def link voscmTab Error hi def link voscmError Error let b:current_syntax = "voscm" " vim: ts=8 neovim-0.2.2/runtime/syntax/vrml.vim000066400000000000000000000307641320401574200175260ustar00rootroot00000000000000" Vim syntax file " Language: VRML97 " Modified from: VRML 1.0C by David Brown " Maintainer: vacancy! " Former Maintainer: Gregory Seidman " Last change: 2006 May 03 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " keyword definitions syn keyword VRMLFields ambientIntensity appearance attenuation syn keyword VRMLFields autoOffset avatarSize axisOfRotation backUrl syn keyword VRMLFields bboxCenter bboxSize beamWidth beginCap syn keyword VRMLFields bottom bottomRadius bottomUrl ccw center syn keyword VRMLFields children choice collide color colorIndex syn keyword VRMLFields colorPerVertex convex coord coordIndex syn keyword VRMLFields creaseAngle crossSection cutOffAngle syn keyword VRMLFields cycleInterval description diffuseColor syn keyword VRMLFields directOutput direction diskAngle syn keyword VRMLFields emissiveColor enabled endCap family syn keyword VRMLFields fieldOfView fogType fontStyle frontUrl syn keyword VRMLFields geometry groundAngle groundColor headlight syn keyword VRMLFields height horizontal info intensity jump syn keyword VRMLFields justify key keyValue language leftToRight syn keyword VRMLFields leftUrl length level location loop material syn keyword VRMLFields maxAngle maxBack maxExtent maxFront syn keyword VRMLFields maxPosition minAngle minBack minFront syn keyword VRMLFields minPosition mustEvaluate normal normalIndex syn keyword VRMLFields normalPerVertex offset on orientation syn keyword VRMLFields parameter pitch point position priority syn keyword VRMLFields proxy radius range repeatS repeatT rightUrl syn keyword VRMLFields rotation scale scaleOrientation shininess syn keyword VRMLFields side size skyAngle skyColor solid source syn keyword VRMLFields spacing spatialize specularColor speed spine syn keyword VRMLFields startTime stopTime string style texCoord syn keyword VRMLFields texCoordIndex texture textureTransform title syn keyword VRMLFields top topToBottom topUrl translation syn keyword VRMLFields transparency type url vector visibilityLimit syn keyword VRMLFields visibilityRange whichChoice xDimension syn keyword VRMLFields xSpacing zDimension zSpacing syn match VRMLFields "\<[A-Za-z_][A-Za-z0-9_]*\>" contains=VRMLComment,VRMLProtos,VRMLfTypes " syn match VRMLFields "\<[A-Za-z_][A-Za-z0-9_]*\>\(,\|\s\)*\(#.*$\)*\\(#.*$\)*\(,\|\s\)*\<[A-Za-z_][A-Za-z0-9_]*\>\(,\|\s\)*\(#.*$\)*" contains=VRMLComment,VRMLProtos " syn region VRMLFields start="\<[A-Za-z_][A-Za-z0-9_]*\>" end=+\(,\|#\|\s\)+me=e-1 contains=VRMLComment,VRMLProtos syn keyword VRMLEvents addChildren ambientIntensity_changed syn keyword VRMLEvents appearance_changed attenuation_changed syn keyword VRMLEvents autoOffset_changed avatarSize_changed syn keyword VRMLEvents axisOfRotation_changed backUrl_changed syn keyword VRMLEvents beamWidth_changed bindTime bottomUrl_changed syn keyword VRMLEvents center_changed children_changed syn keyword VRMLEvents choice_changed collideTime collide_changed syn keyword VRMLEvents color_changed coord_changed syn keyword VRMLEvents cutOffAngle_changed cycleInterval_changed syn keyword VRMLEvents cycleTime description_changed syn keyword VRMLEvents diffuseColor_changed direction_changed syn keyword VRMLEvents diskAngle_changed duration_changed syn keyword VRMLEvents emissiveColor_changed enabled_changed syn keyword VRMLEvents enterTime exitTime fogType_changed syn keyword VRMLEvents fontStyle_changed fraction_changed syn keyword VRMLEvents frontUrl_changed geometry_changed syn keyword VRMLEvents groundAngle_changed headlight_changed syn keyword VRMLEvents hitNormal_changed hitPoint_changed syn keyword VRMLEvents hitTexCoord_changed intensity_changed syn keyword VRMLEvents isActive isBound isOver jump_changed syn keyword VRMLEvents keyValue_changed key_changed leftUrl_changed syn keyword VRMLEvents length_changed level_changed syn keyword VRMLEvents location_changed loop_changed syn keyword VRMLEvents material_changed maxAngle_changed syn keyword VRMLEvents maxBack_changed maxExtent_changed syn keyword VRMLEvents maxFront_changed maxPosition_changed syn keyword VRMLEvents minAngle_changed minBack_changed syn keyword VRMLEvents minFront_changed minPosition_changed syn keyword VRMLEvents normal_changed offset_changed on_changed syn keyword VRMLEvents orientation_changed parameter_changed syn keyword VRMLEvents pitch_changed point_changed position_changed syn keyword VRMLEvents priority_changed radius_changed syn keyword VRMLEvents removeChildren rightUrl_changed syn keyword VRMLEvents rotation_changed scaleOrientation_changed syn keyword VRMLEvents scale_changed set_ambientIntensity syn keyword VRMLEvents set_appearance set_attenuation syn keyword VRMLEvents set_autoOffset set_avatarSize syn keyword VRMLEvents set_axisOfRotation set_backUrl set_beamWidth syn keyword VRMLEvents set_bind set_bottomUrl set_center syn keyword VRMLEvents set_children set_choice set_collide syn keyword VRMLEvents set_color set_colorIndex set_coord syn keyword VRMLEvents set_coordIndex set_crossSection syn keyword VRMLEvents set_cutOffAngle set_cycleInterval syn keyword VRMLEvents set_description set_diffuseColor syn keyword VRMLEvents set_direction set_diskAngle syn keyword VRMLEvents set_emissiveColor set_enabled set_fogType syn keyword VRMLEvents set_fontStyle set_fraction set_frontUrl syn keyword VRMLEvents set_geometry set_groundAngle set_headlight syn keyword VRMLEvents set_height set_intensity set_jump set_key syn keyword VRMLEvents set_keyValue set_leftUrl set_length syn keyword VRMLEvents set_level set_location set_loop set_material syn keyword VRMLEvents set_maxAngle set_maxBack set_maxExtent syn keyword VRMLEvents set_maxFront set_maxPosition set_minAngle syn keyword VRMLEvents set_minBack set_minFront set_minPosition syn keyword VRMLEvents set_normal set_normalIndex set_offset set_on syn keyword VRMLEvents set_orientation set_parameter set_pitch syn keyword VRMLEvents set_point set_position set_priority syn keyword VRMLEvents set_radius set_rightUrl set_rotation syn keyword VRMLEvents set_scale set_scaleOrientation set_shininess syn keyword VRMLEvents set_size set_skyAngle set_skyColor syn keyword VRMLEvents set_source set_specularColor set_speed syn keyword VRMLEvents set_spine set_startTime set_stopTime syn keyword VRMLEvents set_string set_texCoord set_texCoordIndex syn keyword VRMLEvents set_texture set_textureTransform set_topUrl syn keyword VRMLEvents set_translation set_transparency set_type syn keyword VRMLEvents set_url set_vector set_visibilityLimit syn keyword VRMLEvents set_visibilityRange set_whichChoice syn keyword VRMLEvents shininess_changed size_changed syn keyword VRMLEvents skyAngle_changed skyColor_changed syn keyword VRMLEvents source_changed specularColor_changed syn keyword VRMLEvents speed_changed startTime_changed syn keyword VRMLEvents stopTime_changed string_changed syn keyword VRMLEvents texCoord_changed textureTransform_changed syn keyword VRMLEvents texture_changed time topUrl_changed syn keyword VRMLEvents touchTime trackPoint_changed syn keyword VRMLEvents translation_changed transparency_changed syn keyword VRMLEvents type_changed url_changed value_changed syn keyword VRMLEvents vector_changed visibilityLimit_changed syn keyword VRMLEvents visibilityRange_changed whichChoice_changed syn region VRMLEvents start="\S+[^0-9]+\.[A-Za-z_]+"ms=s+1 end="\(,\|$\|\s\)"me=e-1 syn keyword VRMLNodes Anchor Appearance AudioClip Background syn keyword VRMLNodes Billboard Box Collision Color syn keyword VRMLNodes ColorInterpolator Cone Coordinate syn keyword VRMLNodes CoordinateInterpolator Cylinder syn keyword VRMLNodes CylinderSensor DirectionalLight syn keyword VRMLNodes ElevationGrid Extrusion Fog FontStyle syn keyword VRMLNodes Group ImageTexture IndexedFaceSet syn keyword VRMLNodes IndexedLineSet Inline LOD Material syn keyword VRMLNodes MovieTexture NavigationInfo Normal syn keyword VRMLNodes NormalInterpolator OrientationInterpolator syn keyword VRMLNodes PixelTexture PlaneSensor PointLight syn keyword VRMLNodes PointSet PositionInterpolator syn keyword VRMLNodes ProximitySensor ScalarInterpolator syn keyword VRMLNodes Script Shape Sound Sphere SphereSensor syn keyword VRMLNodes SpotLight Switch Text TextureCoordinate syn keyword VRMLNodes TextureTransform TimeSensor TouchSensor syn keyword VRMLNodes Transform Viewpoint VisibilitySensor syn keyword VRMLNodes WorldInfo " the following line doesn't catch since \n " doesn't match as an atom yet :-( syn match VRMLNodes "[A-Za-z_][A-Za-z0-9_]*\(,\|\s\)*{"me=e-1 syn region VRMLNodes start="\\(,\|\s\)*[A-Za-z_]"ms=e start="\\(,\|\s\)*" end="[\s]*\["me=e-1 contains=VRMLProtos,VRMLComment syn region VRMLNodes start="PROTO\>\(,\|\s\)*[A-Za-z_]"ms=e start="PROTO\>\(,\|\s\)*" end="[\s]*\["me=e-1 contains=VRMLProtos,VRMLComment syn keyword VRMLTypes SFBool SFColor MFColor SFFloat MFFloat syn keyword VRMLTypes SFImage SFInt32 MFInt32 SFNode MFNode syn keyword VRMLTypes SFRotation MFRotation SFString MFString syn keyword VRMLTypes SFTime MFTime SFVec2f MFVec2f SFVec3f MFVec3f syn keyword VRMLfTypes field exposedField eventIn eventOut syn keyword VRMLValues TRUE FALSE NULL syn keyword VRMLProtos contained EXTERNPROTO PROTO IS syn keyword VRMLRoutes contained ROUTE TO "containment! syn include @jscript $VIMRUNTIME/syntax/javascript.vim syn region VRMLjScriptString contained start=+"\(\(javascript\)\|\(vrmlscript\)\|\(ecmascript\)\):+ms=e+1 skip=+\\\\\|\\"+ end=+"+me=e-1 contains=@jscript " match definitions. syn match VRMLSpecial contained "\\[0-9][0-9][0-9]\|\\." syn region VRMLString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=VRMLSpecial,VRMLjScriptString syn match VRMLCharacter "'[^\\]'" syn match VRMLSpecialCharacter "'\\.'" syn match VRMLNumber "[-+]\=\<[0-9]\+\(\.[0-9]\+\)\=\([eE]\{1}[-+]\=[0-9]\+\)\=\>\|0[xX][0-9a-fA-F]\+\>" syn match VRMLNumber "0[xX][0-9a-fA-F]\+\>" syn match VRMLComment "#.*$" " newlines should count as whitespace, but they can't be matched yet :-( syn region VRMLRouteNode start="[^O]TO\(,\|\s\)*" end="\."me=e-1 contains=VRMLRoutes,VRMLComment syn region VRMLRouteNode start="ROUTE\(,\|\s\)*" end="\."me=e-1 contains=VRMLRoutes,VRMLComment syn region VRMLInstName start="DEF\>"hs=e+1 skip="DEF\(,\|\s\)*" end="[A-Za-z0-9_]\(\s\|$\|,\)"me=e contains=VRMLInstances,VRMLComment syn region VRMLInstName start="USE\>"hs=e+1 skip="USE\(,\|\s\)*" end="[A-Za-z0-9_]\(\s\|$\|,\)"me=e contains=VRMLInstances,VRMLComment syn keyword VRMLInstances contained DEF USE syn sync minlines=1 "FOLDS! syn sync fromstart "setlocal foldmethod=syntax syn region braceFold start="{" end="}" transparent fold contains=TOP syn region bracketFold start="\[" end="]" transparent fold contains=TOP syn region VRMLString start=+"+ skip=+\\\\\|\\"+ end=+"+ fold contains=VRMLSpecial,VRMLjScriptString " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link VRMLCharacter VRMLString hi def link VRMLSpecialCharacter VRMLSpecial hi def link VRMLNumber VRMLString hi def link VRMLValues VRMLString hi def link VRMLString String hi def link VRMLSpecial Special hi def link VRMLComment Comment hi def link VRMLNodes Statement hi def link VRMLFields Type hi def link VRMLEvents Type hi def link VRMLfTypes LineNr " hi VRMLfTypes ctermfg=6 guifg=Brown hi def link VRMLInstances PreCondit hi def link VRMLRoutes PreCondit hi def link VRMLProtos PreProc hi def link VRMLRouteNode Identifier hi def link VRMLInstName Identifier hi def link VRMLTypes Identifier let b:current_syntax = "vrml" " vim: ts=8 neovim-0.2.2/runtime/syntax/vroom.vim000066400000000000000000000066441320401574200177100ustar00rootroot00000000000000" Vim syntax file " Language: Vroom (vim testing and executable documentation) " Maintainer: David Barnett (https://github.com/google/vim-ft-vroom) " Last Change: 2014 Jul 23 " quit when a syntax file was already loaded if exists('b:current_syntax') finish endif let s:cpo_save = &cpo set cpo-=C syn include @vroomVim syntax/vim.vim syn include @vroomShell syntax/sh.vim syntax region vroomAction \ matchgroup=vroomOutput \ start='\m^ ' end='\m$' keepend \ contains=vroomControlBlock syntax region vroomAction \ matchgroup=vroomOutput \ start='\m^ & ' end='\m$' keepend \ contains=vroomControlBlock syntax match vroomOutput '\m^ &$' syntax region vroomMessageBody \ matchgroup=vroomMessage \ start='\m^ \~ ' end='\m$' keepend \ contains=vroomControlBlock syntax region vroomColoredAction \ matchgroup=vroomInput \ start='\m^ > ' end='\m$' keepend \ contains=vimNotation,vroomControlBlock syntax region vroomAction \ matchgroup=vroomInput \ start='\m^ % ' end='\m$' keepend \ contains=vimNotation,vroomControlBlock syntax region vroomAction \ matchgroup=vroomContinuation \ start='\m^ |' end='\m$' keepend syntax region vroomAction \ start='\m^ \ze:' end='\m$' keepend \ contains=@vroomVim,vroomControlBlock syntax region vroomAction \ matchgroup=vroomDirective \ start='\m^ @\i\+' end='\m$' keepend \ contains=vroomControlBlock syntax region vroomSystemAction \ matchgroup=vroomSystem \ start='\m^ ! ' end='\m$' keepend \ contains=@vroomShell,vroomControlBlock syntax region vroomHijackAction \ matchgroup=vroomHijack \ start='\m^ \$ ' end='\m$' keepend \ contains=vroomControlBlock syntax match vroomControlBlock contains=vroomControlEscape,@vroomControls \ '\v \([^&()][^()]*\)$' syntax match vroomControlEscape '\m&' contained syntax cluster vroomControls \ contains=vroomDelay,vroomMode,vroomBuffer,vroomRange \,vroomChannel,vroomBind,vroomStrictness syntax match vroomRange '\v\.(,\+?(\d+|\$)?)?' contained syntax match vroomRange '\v\d*,\+?(\d+|\$)?' contained syntax match vroomBuffer '\v\d+,@!' contained syntax match vroomDelay '\v\d+(\.\d+)?s' contained syntax match vroomMode '\v<%(regex|glob|verbatim)' contained syntax match vroomChannel '\v<%(stderr|stdout|command|status)>' contained syntax match vroomBind '\v' contained syntax match vroomStrictness '\v\<%(STRICT|RELAXED|GUESS-ERRORS)\>' contained highlight default link vroomInput Identifier highlight default link vroomDirective vroomInput highlight default link vroomControlBlock vroomInput highlight default link vroomSystem vroomInput highlight default link vroomOutput Statement highlight default link vroomContinuation Constant highlight default link vroomHijack Special highlight default link vroomColoredAction Statement highlight default link vroomSystemAction vroomSystem highlight default link vroomHijackAction vroomHijack highlight default link vroomMessage vroomOutput highlight default link vroomMessageBody Constant highlight default link vroomControlEscape Special highlight default link vroomBuffer vroomInput highlight default link vroomRange Include highlight default link vroomMode Constant highlight default link vroomDelay Type highlight default link vroomStrictness vroomMode highlight default link vroomChannel vroomMode highlight default link vroomBind vroomMode let b:current_syntax = 'vroom' let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/vsejcl.vim000066400000000000000000000017541320401574200200310ustar00rootroot00000000000000" Vim syntax file " Language: JCL job control language - DOS/VSE " Maintainer: Davyd Ondrejko " URL: " Last change: 2001 May 10 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " tags syn keyword vsejclKeyword DLBL EXEC JOB ASSGN EOJ syn keyword vsejclField JNM CLASS DISP USER SYSID JSEP SIZE syn keyword vsejclField VSAM syn region vsejclComment start="^/\*" end="$" syn region vsejclComment start="^[\* ]\{}$" end="$" syn region vsejclMisc start="^ " end="$" contains=Jparms syn match vsejclString /'.\{-}'/ syn match vsejclParms /(.\{-})/ contained " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link vsejclComment Comment hi def link vsejclField Type hi def link vsejclKeyword Statement hi def link vsejclObject Constant hi def link vsejclString Constant hi def link vsejclMisc Special hi def link vsejclParms Constant let b:current_syntax = "vsejcl" " vim: ts=4 neovim-0.2.2/runtime/syntax/wdiff.vim000066400000000000000000000013141320401574200176320ustar00rootroot00000000000000" Vim syntax file " Language: wDiff (wordwise diff) " Maintainer: Gerfried Fuchs " Last Change: 25 Apr 2001 " URL: http://alfie.ist.org/vim/syntax/wdiff.vim " " Comments are very welcome - but please make sure that you are commenting on " the latest version of this file. " SPAM is _NOT_ welcome - be ready to be reported! " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn region wdiffOld start=+\[-+ end=+-]+ syn region wdiffNew start="{+" end="+}" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link wdiffOld Special hi def link wdiffNew Identifier let b:current_syntax = "wdiff" neovim-0.2.2/runtime/syntax/web.vim000066400000000000000000000021321320401574200173070ustar00rootroot00000000000000" Vim syntax file " Language: WEB " Maintainer: Andreas Scherer " Last Change: April 30, 2001 " Details of the WEB language can be found in the article by Donald E. Knuth, " "The WEB System of Structured Documentation", included as "webman.tex" in " the standard WEB distribution, available for anonymous ftp at " ftp://labrea.stanford.edu/pub/tex/web/. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " Although WEB is the ur-language for the "Literate Programming" paradigm, " we base this syntax file on the modern superset, CWEB. Note: This shortcut " may introduce some illegal constructs, e.g., CWEB's "@c" does _not_ start a " code section in WEB. Anyway, I'm not a WEB programmer. runtime! syntax/cweb.vim unlet b:current_syntax " Replace C/C++ syntax by Pascal syntax. syntax include @webIncludedC :p:h/pascal.vim " Double-@ means single-@, anywhere in the WEB source (as in CWEB). " Don't misinterpret "@'" as the start of a Pascal string. syntax match webIgnoredStuff "@[@']" let b:current_syntax = "web" " vim: ts=8 neovim-0.2.2/runtime/syntax/webmacro.vim000066400000000000000000000060721320401574200203400ustar00rootroot00000000000000" WebMacro syntax file " Language: WebMacro " Maintainer: Claudio Fleiner " URL: http://www.fleiner.com/vim/syntax/webmacro.vim " Last Change: 2003 May 11 " webmacro is a nice little language that you should " check out if you use java servlets. " webmacro: http://www.webmacro.org " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if !exists("main_syntax") " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let main_syntax = 'webmacro' endif runtime! syntax/html.vim unlet b:current_syntax syn cluster htmlPreProc add=webmacroIf,webmacroUse,webmacroBraces,webmacroParse,webmacroInclude,webmacroSet,webmacroForeach,webmacroComment syn match webmacroVariable "\$[a-zA-Z0-9.()]*;\=" syn match webmacroNumber "[-+]\=\d\+[lL]\=" contained syn keyword webmacroBoolean true false contained syn match webmacroSpecial "\\." contained syn region webmacroString contained start=+"+ end=+"+ contains=webmacroSpecial,webmacroVariable syn region webmacroString contained start=+'+ end=+'+ contains=webmacroSpecial,webmacroVariable syn region webmacroList contained matchgroup=Structure start="\[" matchgroup=Structure end="\]" contains=webmacroString,webmacroVariable,webmacroNumber,webmacroBoolean,webmacroList syn region webmacroIf start="#if" start="#else" end="{"me=e-1 contains=webmacroVariable,webmacroNumber,webmacroString,webmacroBoolean,webmacroList nextgroup=webmacroBraces syn region webmacroForeach start="#foreach" end="{"me=e-1 contains=webmacroVariable,webmacroNumber,webmacroString,webmacroBoolean,webmacroList nextgroup=webmacroBraces syn match webmacroSet "#set .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList syn match webmacroInclude "#include .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList syn match webmacroParse "#parse .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList syn region webmacroUse matchgroup=PreProc start="#use .*" matchgroup=PreProc end="^-.*" contains=webmacroHash,@HtmlTop syn region webmacroBraces matchgroup=Structure start="{" matchgroup=Structure end="}" contained transparent syn match webmacroBracesError "[{}]" syn match webmacroComment "##.*$" syn match webmacroHash "[#{}\$]" contained " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link webmacroComment CommentTitle hi def link webmacroVariable PreProc hi def link webmacroIf webmacroStatement hi def link webmacroForeach webmacroStatement hi def link webmacroSet webmacroStatement hi def link webmacroInclude webmacroStatement hi def link webmacroParse webmacroStatement hi def link webmacroStatement Function hi def link webmacroNumber Number hi def link webmacroBoolean Boolean hi def link webmacroSpecial Special hi def link webmacroString String hi def link webmacroBracesError Error let b:current_syntax = "webmacro" if main_syntax == 'webmacro' unlet main_syntax endif neovim-0.2.2/runtime/syntax/wget.vim000066400000000000000000000075711320401574200175140ustar00rootroot00000000000000" Vim syntax file " Language: Wget configuration file (/etc/wgetrc ~/.wgetrc) " Maintainer: Doug Kearns " Last Change: 2013 Jun 1 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match wgetComment "#.*$" contains=wgetTodo contained syn keyword wgetTodo TODO NOTE FIXME XXX contained syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline syn case ignore syn keyword wgetBoolean on off contained syn keyword wgetNumber inf contained syn case match syn match wgetNumber "\<\%(\d\+\|inf\)\>" contained syn match wgetQuota "\<\d\+[kKmM]\>" contained syn match wgetTime "\<\d\+[smhdw]\>" contained "{{{ Commands let s:commands = map([ \ "accept", \ "add_hostdir", \ "adjust_extension", \ "always_rest", \ "ask_password", \ "auth_no_challenge", \ "background", \ "backup_converted", \ "backups", \ "base", \ "bind_address", \ "ca_certificate", \ "ca_directory", \ "cache", \ "certificate", \ "certificate_type", \ "check_certificate", \ "connect_timeout", \ "content_disposition", \ "continue", \ "convert_links", \ "cookies", \ "cut_dirs", \ "debug", \ "default_page", \ "delete_after", \ "dns_cache", \ "dns_timeout", \ "dir_prefix", \ "dir_struct", \ "domains", \ "dot_bytes", \ "dots_in_line", \ "dot_spacing", \ "dot_style", \ "egd_file", \ "exclude_directories", \ "exclude_domains", \ "follow_ftp", \ "follow_tags", \ "force_html", \ "ftp_passwd", \ "ftp_password", \ "ftp_user", \ "ftp_proxy", \ "glob", \ "header", \ "html_extension", \ "htmlify", \ "http_keep_alive", \ "http_passwd", \ "http_password", \ "http_proxy", \ "https_proxy", \ "http_user", \ "ignore_case", \ "ignore_length", \ "ignore_tags", \ "include_directories", \ "inet4_only", \ "inet6_only", \ "input", \ "iri", \ "keep_session_cookies", \ "kill_longer", \ "limit_rate", \ "load_cookies", \ "locale", \ "local_encoding", \ "logfile", \ "login", \ "max_redirect", \ "mirror", \ "netrc", \ "no_clobber", \ "no_parent", \ "no_proxy", \ "numtries", \ "output_document", \ "page_requisites", \ "passive_ftp", \ "passwd", \ "password", \ "post_data", \ "post_file", \ "prefer_family", \ "preserve_permissions", \ "private_key", \ "private_key_type", \ "progress", \ "protocol_directories", \ "proxy_passwd", \ "proxy_password", \ "proxy_user", \ "quiet", \ "quota", \ "random_file", \ "random_wait", \ "read_timeout", \ "reclevel", \ "recursive", \ "referer", \ "reject", \ "relative_only", \ "remote_encoding", \ "remove_listing", \ "restrict_file_names", \ "retr_symlinks", \ "retry_connrefused", \ "robots", \ "save_cookies", \ "save_headers", \ "secure_protocol", \ "server_response", \ "show_all_dns_entries", \ "simple_host_check", \ "span_hosts", \ "spider", \ "strict_comments", \ "sslcertfile", \ "sslcertkey", \ "timeout", \ "time_stamping", \ "use_server_timestamps", \ "tries", \ "trust_server_names", \ "user", \ "use_proxy", \ "user_agent", \ "verbose", \ "wait", \ "wait_retry"], \ "substitute(v:val, '_', '[-_]\\\\=', 'g')") "}}} syn case ignore for cmd in s:commands exe 'syn match wgetCommand "' . cmd . '" nextgroup=wgetAssignmentOperator skipwhite contained' endfor syn case match syn match wgetStart "^" nextgroup=wgetCommand,wgetComment skipwhite syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained hi def link wgetAssignmentOperator Special hi def link wgetBoolean Boolean hi def link wgetCommand Identifier hi def link wgetComment Comment hi def link wgetNumber Number hi def link wgetQuota Number hi def link wgetString String hi def link wgetTodo Todo let b:current_syntax = "wget" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 fdm=marker: neovim-0.2.2/runtime/syntax/whitespace.vim000066400000000000000000000005451320401574200206740ustar00rootroot00000000000000" Simplistic way to make spaces and Tabs visible " This can be added to an already active syntax. syn match Space " " syn match Tab "\t" if &background == "dark" hi def Space ctermbg=darkred guibg=#500000 hi def Tab ctermbg=darkgreen guibg=#003000 else hi def Space ctermbg=lightred guibg=#ffd0d0 hi def Tab ctermbg=lightgreen guibg=#d0ffd0 endif neovim-0.2.2/runtime/syntax/winbatch.vim000066400000000000000000000275701320401574200203460ustar00rootroot00000000000000" Vim syntax file " Language: WinBatch/Webbatch (*.wbt, *.web) " Maintainer: dominique@mggen.com " URL: http://www.mggen.com/vim/syntax/winbatch.zip " Last change: 2001 May 10 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore syn keyword winbatchCtl if then else endif break end return exit next syn keyword winbatchCtl while for gosub goto switch select to case syn keyword winbatchCtl endselect endwhile endselect endswitch " String syn region winbatchVar start=+%+ end=+%+ " %var% in strings syn region winbatchString start=+"+ end=+"+ contains=winbatchVar syn match winbatchComment ";.*$" syn match winbatchLabel "^\ *:[0-9a-zA-Z_\-]\+\>" " constant (bezgin by @) syn match winbatchConstant "@[0_9a-zA-Z_\-]\+" " number syn match winbatchNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>" syn keyword winbatchImplicit aboveicons acc_attrib acc_chng_nt acc_control acc_create syn keyword winbatchImplicit acc_delete acc_full_95 acc_full_nt acc_list acc_pfull_nt syn keyword winbatchImplicit acc_pmang_nt acc_print_nt acc_read acc_read_95 acc_read_nt syn keyword winbatchImplicit acc_write amc arrange ascending attr_a attr_a attr_ci attr_ci syn keyword winbatchImplicit attr_dc attr_dc attr_di attr_di attr_dm attr_dm attr_h attr_h syn keyword winbatchImplicit attr_ic attr_ic attr_p attr_p attr_ri attr_ri attr_ro attr_ro syn keyword winbatchImplicit attr_sh attr_sh attr_sy attr_sy attr_t attr_t attr_x attr_x syn keyword winbatchImplicit avogadro backscan boltzmann cancel capslock check columns syn keyword winbatchImplicit commonformat cr crlf ctrl default default deg2rad descending syn keyword winbatchImplicit disable drive electric enable eulers false faraday float8 syn keyword winbatchImplicit fwdscan gftsec globalgroup gmtsec goldenratio gravitation hidden syn keyword winbatchImplicit icon lbutton lclick ldblclick lf lightmps lightmtps localgroup syn keyword winbatchImplicit magfield major mbokcancel mbutton mbyesno mclick mdblclick minor syn keyword winbatchImplicit msformat multiple ncsaformat no none none noresize normal syn keyword winbatchImplicit notify nowait numlock off on open parsec parseonly pi syn keyword winbatchImplicit planckergs planckjoules printer rad2deg rbutton rclick rdblclick syn keyword winbatchImplicit regclasses regcurrent regmachine regroot regusers rows save syn keyword winbatchImplicit scrolllock server shift single sorted stack string tab tile syn keyword winbatchImplicit true uncheck unsorted wait wholesection word1 word2 word4 yes syn keyword winbatchImplicit zoomed about abs acos addextender appexist appwaitclose asin syn keyword winbatchImplicit askfilename askfiletext askitemlist askline askpassword askyesno syn keyword winbatchImplicit atan average beep binaryalloc binarycopy binaryeodget binaryeodset syn keyword winbatchImplicit binaryfree binaryhashrec binaryincr binaryincr2 binaryincr4 syn keyword winbatchImplicit binaryincrflt binaryindex binaryindexnc binaryoletype binarypeek syn keyword winbatchImplicit binarypeek2 binarypeek4 binarypeekflt binarypeekstr binarypoke syn keyword winbatchImplicit binarypoke2 binarypoke4 binarypokeflt binarypokestr binaryread syn keyword winbatchImplicit binarysort binarystrcnt binarywrite boxbuttondraw boxbuttonkill syn keyword winbatchImplicit boxbuttonstat boxbuttonwait boxcaption boxcolor syn keyword winbatchImplicit boxdataclear boxdatatag syn keyword winbatchImplicit boxdestroy boxdrawcircle boxdrawline boxdrawrect boxdrawtext syn keyword winbatchImplicit boxesup boxmapmode boxnew boxopen boxpen boxshut boxtext boxtextcolor syn keyword winbatchImplicit boxtextfont boxtitle boxupdates break buttonnames by call syn keyword winbatchImplicit callext ceiling char2num clipappend clipget clipput syn keyword winbatchImplicit continue cos cosh datetime syn keyword winbatchImplicit ddeexecute ddeinitiate ddepoke dderequest ddeterminate syn keyword winbatchImplicit ddetimeout debug debugdata decimals delay dialog syn keyword winbatchImplicit dialogbox dirattrget dirattrset dirchange direxist syn keyword winbatchImplicit dirget dirhome diritemize dirmake dirremove dirrename syn keyword winbatchImplicit dirwindows diskexist diskfree diskinfo diskscan disksize syn keyword winbatchImplicit diskvolinfo display dllcall dllfree dllhinst dllhwnd dllload syn keyword winbatchImplicit dosboxcursorx dosboxcursory dosboxgetall dosboxgetdata syn keyword winbatchImplicit dosboxheight dosboxscrmode dosboxversion dosboxwidth dosversion syn keyword winbatchImplicit drop edosgetinfo edosgetvar edoslistvars edospathadd edospathchk syn keyword winbatchImplicit edospathdel edossetvar syn keyword winbatchImplicit endsession envgetinfo envgetvar environment syn keyword winbatchImplicit environset envitemize envlistvars envpathadd envpathchk syn keyword winbatchImplicit envpathdel envsetvar errormode exclusive execute exetypeinfo syn keyword winbatchImplicit exp fabs fileappend fileattrget fileattrset fileclose syn keyword winbatchImplicit filecompare filecopy filedelete fileexist fileextension filefullname syn keyword winbatchImplicit fileitemize filelocate filemapname filemove filenameeval1 syn keyword winbatchImplicit filenameeval2 filenamelong filenameshort fileopen filepath syn keyword winbatchImplicit fileread filerename fileroot filesize filetimecode filetimeget syn keyword winbatchImplicit filetimeset filetimetouch fileverinfo filewrite fileymdhms syn keyword winbatchImplicit findwindow floor getexacttime gettickcount syn keyword winbatchImplicit iconarrange iconreplace ignoreinput inidelete inideletepvt syn keyword winbatchImplicit iniitemize iniitemizepvt iniread inireadpvt iniwrite iniwritepvt syn keyword winbatchImplicit installfile int intcontrol isdefined isfloat isint iskeydown syn keyword winbatchImplicit islicensed isnumber itemcount itemextract iteminsert itemlocate syn keyword winbatchImplicit itemremove itemselect itemsort keytoggleget keytoggleset syn keyword winbatchImplicit lasterror log10 logdisk loge max message min mod mouseclick syn keyword winbatchImplicit mouseclickbtn mousedrag mouseinfo mousemove msgtextget n3attach syn keyword winbatchImplicit n3captureend n3captureprt n3chgpassword n3detach n3dirattrget syn keyword winbatchImplicit n3dirattrset n3drivepath n3drivepath2 n3drivestatus n3fileattrget syn keyword winbatchImplicit n3fileattrset n3getloginid n3getmapped n3getnetaddr n3getuser syn keyword winbatchImplicit n3getuserid n3logout n3map n3mapdelete n3mapdir n3maproot n3memberdel syn keyword winbatchImplicit n3memberget n3memberset n3msgsend n3msgsendall n3serverinfo syn keyword winbatchImplicit n3serverlist n3setsrchdrv n3usergroups n3version n4attach syn keyword winbatchImplicit n4captureend n4captureprt n4chgpassword n4detach n4dirattrget syn keyword winbatchImplicit n4dirattrset n4drivepath n4drivestatus n4fileattrget n4fileattrset syn keyword winbatchImplicit n4getloginid n4getmapped n4getnetaddr n4getuser n4getuserid syn keyword winbatchImplicit n4login n4logout n4map n4mapdelete n4mapdir n4maproot n4memberdel syn keyword winbatchImplicit n4memberget n4memberset n4msgsend n4msgsendall n4serverinfo syn keyword winbatchImplicit n4serverlist n4setsrchdrv n4usergroups n4version netadddrive syn keyword winbatchImplicit netaddprinter netcancelcon netdirdialog netgetcon netgetuser syn keyword winbatchImplicit netinfo netresources netversion num2char objectclose syn keyword winbatchImplicit objectopen parsedata pause playmedia playmidi playwaveform syn keyword winbatchImplicit print random regapp regclosekey regconnect regcreatekey syn keyword winbatchImplicit regdeletekey regdelvalue regentrytype regloadhive regopenkey syn keyword winbatchImplicit regquerybin regquerydword regqueryex regqueryexpsz regqueryitem syn keyword winbatchImplicit regquerykey regquerymulsz regqueryvalue regsetbin syn keyword winbatchImplicit regsetdword regsetex regsetexpsz regsetmulsz regsetvalue syn keyword winbatchImplicit regunloadhive reload reload rtstatus run runenviron syn keyword winbatchImplicit runexit runhide runhidewait runicon runiconwait runshell runwait syn keyword winbatchImplicit runzoom runzoomwait sendkey sendkeyschild sendkeysto syn keyword winbatchImplicit sendmenusto shellexecute shortcutedit shortcutextra shortcutinfo syn keyword winbatchImplicit shortcutmake sin sinh snapshot sounds sqrt syn keyword winbatchImplicit srchfree srchinit srchnext strcat strcharcount strcmp syn keyword winbatchImplicit strfill strfix strfixchars stricmp strindex strlen syn keyword winbatchImplicit strlower strreplace strscan strsub strtrim strupper syn keyword winbatchImplicit tan tanh tcpaddr2host tcpftpchdir tcpftpclose tcpftpget syn keyword winbatchImplicit tcpftplist tcpftpmode tcpftpopen tcpftpput tcphost2addr tcphttpget syn keyword winbatchImplicit tcphttppost tcpparmget tcpparmset tcpping tcpsmtp terminate syn keyword winbatchImplicit textbox textboxsort textoutbufdel textoutbuffer textoutdebug syn keyword winbatchImplicit textoutfree textoutinfo textoutreset textouttrack textouttrackb syn keyword winbatchImplicit textouttrackp textoutwait textselect timeadd timedate syn keyword winbatchImplicit timedelay timediffdays timediffsecs timejulianday timejultoymd syn keyword winbatchImplicit timesubtract timewait timeymdhms version versiondll syn keyword winbatchImplicit w3addcon w3cancelcon w3dirbrowse w3getcaps w3getcon w3netdialog syn keyword winbatchImplicit w3netgetuser w3prtbrowse w3version w95accessadd w95accessdel syn keyword winbatchImplicit w95adddrive w95addprinter w95cancelcon w95dirdialog w95getcon syn keyword winbatchImplicit w95getuser w95resources w95shareadd w95sharedel w95shareset syn keyword winbatchImplicit w95version waitforkey wallpaper webbaseconv webcloselog syn keyword winbatchImplicit webcmddata webcondata webcounter webdatdata webdumperror webhashcode syn keyword winbatchImplicit webislocal weblogline webopenlog webout weboutfile webparamdata syn keyword winbatchImplicit webparamnames websettimeout webverifycard winactivate syn keyword winbatchImplicit winactivchild winarrange winclose winclosenot winconfig winexename syn keyword winbatchImplicit winexist winparset winparget winexistchild wingetactive syn keyword winbatchImplicit winhelp winhide winiconize winidget winisdos winitemchild syn keyword winbatchImplicit winitemize winitemnameid winmetrics winname winparmget syn keyword winbatchImplicit winparmset winplace winplaceget winplaceset syn keyword winbatchImplicit winposition winresources winshow winstate winsysinfo syn keyword winbatchImplicit wintitle winversion winwaitchild winwaitclose winwaitexist syn keyword winbatchImplicit winzoom wnaddcon wncancelcon wncmptrinfo wndialog syn keyword winbatchImplicit wndlgbrowse wndlgcon wndlgcon2 wndlgcon3 syn keyword winbatchImplicit wndlgcon4 wndlgdiscon wndlgnoshare wndlgshare wngetcaps syn keyword winbatchImplicit wngetcon wngetuser wnnetnames wnrestore wnservers wnsharecnt syn keyword winbatchImplicit wnsharename wnsharepath wnshares wntaccessadd wntaccessdel syn keyword winbatchImplicit wntaccessget wntadddrive wntaddprinter wntcancelcon wntdirdialog syn keyword winbatchImplicit wntgetcon wntgetuser wntlistgroups wntmemberdel wntmemberget syn keyword winbatchImplicit wntmembergrps wntmemberlist wntmemberset wntresources wntshareadd syn keyword winbatchImplicit wntsharedel wntshareset wntversion wnversion wnwrkgroups wwenvunload syn keyword winbatchImplicit xbaseconvert xcursorset xdisklabelget xdriveready xextenderinfo syn keyword winbatchImplicit xgetchildhwnd xgetelapsed xhex xmemcompact xmessagebox syn keyword winbatchImplicit xsendmessage xverifyccard yield " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link winbatchLabel PreProc hi def link winbatchCtl Operator hi def link winbatchStatement Statement hi def link winbatchTodo Todo hi def link winbatchString String hi def link winbatchVar Type hi def link winbatchComment Comment hi def link winbatchImplicit Special hi def link winbatchNumber Number hi def link winbatchConstant StorageClass let b:current_syntax = "winbatch" " vim: ts=8 neovim-0.2.2/runtime/syntax/wml.vim000066400000000000000000000131431320401574200173350ustar00rootroot00000000000000" Vim syntax file " Language: WML - Website MetaLanguage " Maintainer: Gerfried Fuchs " Filenames: *.wml " Last Change: 07 Feb 2002 " URL: http://alfie.ist.org/software/vim/syntax/wml.vim " " Original Version: Craig Small " Comments are very welcome - but please make sure that you are commenting on " the latest version of this file. " SPAM is _NOT_ welcome - be ready to be reported! " If you are looking for the "Wireless Markup Language" syntax file, " please take a look at the wap.vim file done by Ralf Schandl, soon in a " vim-package around your corner :) " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " A lot of the web stuff looks like HTML so we load that first runtime! syntax/html.vim unlet b:current_syntax if !exists("main_syntax") let main_syntax = 'wml' endif " special character syn match wmlNextLine "\\$" " Redfine htmlTag syn clear htmlTag syn region htmlTag start=+<[^/<]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition " " Add in extra Arguments used by wml syn keyword htmlTagName contained gfont imgbg imgdot lowsrc syn keyword htmlTagName contained navbar:define navbar:header syn keyword htmlTagName contained navbar:footer navbar:prolog syn keyword htmlTagName contained navbar:epilog navbar:button syn keyword htmlTagName contained navbar:filter navbar:debug syn keyword htmlTagName contained navbar:render syn keyword htmlTagName contained preload rollover syn keyword htmlTagName contained space hspace vspace over syn keyword htmlTagName contained ps ds pi ein big sc spaced headline syn keyword htmlTagName contained ue subheadline zwue verbcode syn keyword htmlTagName contained isolatin pod sdf text url verbatim syn keyword htmlTagName contained xtable syn keyword htmlTagName contained csmap fsview import box syn keyword htmlTagName contained case:upper case:lower syn keyword htmlTagName contained grid cell info lang: logo page syn keyword htmlTagName contained set-var restore syn keyword htmlTagName contained array:push array:show set-var ifdef syn keyword htmlTagName contained say m4 symbol dump enter divert syn keyword htmlTagName contained toc syn keyword htmlTagName contained wml card do refresh oneevent catch spawn " " The wml arguments syn keyword htmlArg contained adjust background base bdcolor bdspace syn keyword htmlArg contained bdwidth complete copyright created crop syn keyword htmlArg contained direction description domainname eperlfilter syn keyword htmlArg contained file hint imgbase imgstar interchar interline syn keyword htmlArg contained keephr keepindex keywords layout spacing syn keyword htmlArg contained padding nonetscape noscale notag notypo syn keyword htmlArg contained onload oversrc pos select slices style syn keyword htmlArg contained subselected txtcol_select txtcol_normal syn keyword htmlArg contained txtonly via syn keyword htmlArg contained mode columns localsrc ordered " Lines starting with an # are usually comments syn match wmlComment "^\s*#.*" " The different exceptions to comments syn match wmlSharpBang "^#!.*" syn match wmlUsed contained "\s\s*[A-Za-z:_-]*" syn match wmlUse "^\s*#\s*use\s\+" contains=wmlUsed syn match wmlInclude "^\s*#\s*include.+" syn region wmlBody contained start=+<<+ end=+>>+ syn match wmlLocationId contained "[A-Za-z]\+" syn region wmlLocation start=+<<+ end=+>>+ contains=wmlLocationId "syn region wmlLocation start=+{#+ end=+#}+ contains=wmlLocationId "syn region wmlLocationed contained start=+<<+ end=+>>+ contains=wmlLocationId syn match wmlDivert "\.\.[a-zA-Z_]\+>>" syn match wmlDivertEnd "<<\.\." " new version "syn match wmlDivert "{#[a-zA-Z_]\+#:" "syn match wmlDivertEnd ":##}" syn match wmlDefineName contained "\s\+[A-Za-z-]\+" syn region htmlTagName start="\<\(define-tag\|define-region\)" end="\>" contains=wmlDefineName " The perl include stuff if main_syntax != 'perl' " Perl script syn include @wmlPerlScript syntax/perl.vim unlet b:current_syntax syn region perlScript start=++ keepend end=++ contains=@wmlPerlScript,wmlPerlTag " eperl between '<:' and ':>' -- Alfie [1999-12-26] syn region perlScript start=+<:+ keepend end=+:>+ contains=@wmlPerlScript,wmlPerlTag syn match wmlPerlTag contained "" contains=wmlPerlTagN syn keyword wmlPerlTagN contained perl hi link wmlPerlTag htmlTag hi link wmlPerlTagN htmlStatement endif " verbatim tags -- don't highlight anything in between -- Alfie [2002-02-07] syn region wmlVerbatimText start=++ keepend end=++ contains=wmlVerbatimTag syn match wmlVerbatimTag contained "" contains=wmlVerbatimTagN syn keyword wmlVerbatimTagN contained verbatim hi link wmlVerbatimTag htmlTag hi link wmlVerbatimTagN htmlStatement if main_syntax == "html" syn sync match wmlHighlight groupthere NONE "" syn sync match wmlHighlightSkip "^.*['\"].*$" syn sync minlines=10 endif " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link wmlNextLine Special hi def link wmlUse Include hi def link wmlUsed String hi def link wmlBody Special hi def link wmlDiverted Label hi def link wmlDivert Delimiter hi def link wmlDivertEnd Delimiter hi def link wmlLocationId Label hi def link wmlLocation Delimiter " hi def link wmlLocationed Delimiter hi def link wmlDefineName String hi def link wmlComment Comment hi def link wmlInclude Include hi def link wmlSharpBang PreProc let b:current_syntax = "wml" neovim-0.2.2/runtime/syntax/wsh.vim000066400000000000000000000023321320401574200173350ustar00rootroot00000000000000" Vim syntax file " Language: Windows Scripting Host " Maintainer: Paul Moore " Last Change: Fre, 24 Nov 2000 21:54:09 +0100 " This reuses the XML, VB and JavaScript syntax files. While VB is not " VBScript, it's close enough for us. No attempt is made to handle " other languages. " Send comments, suggestions and requests to the maintainer. " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:wsh_cpo_save = &cpo set cpo&vim runtime! syntax/xml.vim unlet b:current_syntax syn case ignore syn include @wshVBScript :p:h/vb.vim unlet b:current_syntax syn include @wshJavaScript :p:h/javascript.vim unlet b:current_syntax syn region wshVBScript \ matchgroup=xmlTag start="]*VBScript\(>\|[^>]*[^/>]>\)" \ matchgroup=xmlEndTag end="" \ fold \ contains=@wshVBScript \ keepend syn region wshJavaScript \ matchgroup=xmlTag start="]*J\(ava\)\=Script\(>\|[^>]*[^/>]>\)" \ matchgroup=xmlEndTag end="" \ fold \ contains=@wshJavaScript \ keepend syn cluster xmlRegionHook add=wshVBScript,wshJavaScript let b:current_syntax = "wsh" let &cpo = s:wsh_cpo_save unlet s:wsh_cpo_save neovim-0.2.2/runtime/syntax/wsml.vim000066400000000000000000000124301320401574200175160ustar00rootroot00000000000000" Vim syntax file " Language: WSML " Maintainer: Thomas Haselwanter " URL: none " Last Change: 2006 Apr 30 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " WSML syn keyword wsmlHeader wsmlVariant syn keyword wsmlNamespace namespace syn keyword wsmlTopLevel concept instance relationInstance ofType usesMediator usesService relation sharedVariables importsOntology syn keyword wsmlOntology hasValue memberOf ofType impliesType subConceptOf syn keyword wsmlAxiom axiom definedBy syn keyword wsmlService assumption effect postcondition precondition capability interface syn keyword wsmlTopLevel ooMediator wwMediator wgMediator ggMediator syn keyword wsmlMediation usesService source target syn match wsmlDataTypes "\( _string\| _decimal\| _integer\| _float\| _double\| _iri\| _sqname\| _boolean\| _duration\| _dateTime\| _time\| _date\| _gyearmonth\| _gyear\| _gmonthday\| _gday\| _gmonth\| _hexbinary\| _base64binary\)\((\S*)\)\?" contains=wsmlString,wsmlNumber,wsmlCharacter syn keyword wsmlTopLevel goal webService ontology syn keyword wsmlKeywordsInsideLEs true false memberOf hasValue subConceptOf ofType impliesType and or implies impliedBy equivalent neg naf forall exists syn keyword wsmlNFP nfp endnfp nonFunctionalProperties endNonFunctionalProperties syn region wsmlNFPregion start="nfp\|nonFunctionalProperties" end="endnfp\|endNonFunctionalProperties" contains=ALL syn region wsmlNamespace start="namespace" end="}" contains=wsmlIdentifier syn match wsmlOperator "!=\|:=:\|=<\|>=\|=\|+\|\*\|/\|<->\|->\|<-\|:-\|!-\|-\|<\|>" syn match wsmlBrace "(\|)\|\[\|\]\|{\|}" syn match wsmlIdentifier +_"\S*"+ syn match wsmlIdentifier "_#\d*" syn match wsmlSqName "[0-9A-Za-z]\+#[0-9A-Za-z]\+" syn match wsmlVariable "?[0-9A-Za-z]\+" " ASM-specific code syn keyword wsmlBehavioral choreography orchestration transitionRules syn keyword wsmlChoreographyPri stateSignature in out shared static controlled syn keyword wsmlChoreographySec with do withGrounding forall endForall choose if then endIf syn match wsmlChoreographyTer "\(\s\|\_^\)\(add\|delete\|update\)\s*(.*)" contains=wsmlKeywordsInsideLEs,wsmlIdentifier,wsmlSqName,wsmlString,wsmlNumber,wsmlDataTypes,wsmlVariable " Comments syn keyword wsmlTodo contained TODO syn keyword wsmlFixMe contained FIXME if exists("wsml_comment_strings") syn region wsmlCommentString contained start=+"+ end=+"+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=wsmlSpecial,wsmlCommentStar,wsmlSpecialChar,@Spell syn region wsmlComment2String contained start=+"+ end=+$\|"+ contains=wsmlSpecial,wsmlSpecialChar,@Spell syn match wsmlCommentCharacter contained "'\\[^']\{1,6\}'" contains=wsmlSpecialChar syn match wsmlCommentCharacter contained "'\\''" contains=wsmlSpecialChar syn match wsmlCommentCharacter contained "'[^\\]'" syn cluster wsmlCommentSpecial add=wsmlCommentString,wsmlCommentCharacter,wsmlNumber syn cluster wsmlCommentSpecial2 add=wsmlComment2String,wsmlCommentCharacter,wsmlNumber endif syn region wsmlComment start="/\*" end="\*/" contains=@wsmlCommentSpecial,wsmlTodo,wsmlFixMe,@Spell syn match wsmlCommentStar contained "^\s*\*[^/]"me=e-1 syn match wsmlCommentStar contained "^\s*\*$" syn match wsmlLineComment "//.*" contains=@wsmlCommentSpecial2,wsmlTodo,@Spell syn cluster wsmlTop add=wsmlComment,wsmlLineComment "match the special comment /**/ syn match wsmlComment "/\*\*/" " Strings syn region wsmlString start=+"+ end=+"+ contains=wsmlSpecialChar,wsmlSpecialError,@Spell syn match wsmlCharacter "'[^']*'" contains=javaSpecialChar,javaSpecialCharError syn match wsmlCharacter "'\\''" contains=javaSpecialChar syn match wsmlCharacter "'[^\\]'" syn match wsmlNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" syn match wsmlNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" syn match wsmlNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" syn match wsmlNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" " unicode characters syn match wsmlSpecial "\\u\d\{4\}" syn cluster wsmlTop add=wsmlString,wsmlCharacter,wsmlNumber,wsmlSpecial,wsmlStringError " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link wsmlHeader TypeDef hi def link wsmlNamespace TypeDef hi def link wsmlOntology Statement hi def link wsmlAxiom TypeDef hi def link wsmlService TypeDef hi def link wsmlNFP TypeDef hi def link wsmlTopLevel TypeDef hi def link wsmlMediation TypeDef hi def link wsmlBehavioral TypeDef hi def link wsmlChoreographyPri TypeDef hi def link wsmlChoreographySec Operator hi def link wsmlChoreographyTer Special hi def link wsmlString String hi def link wsmlIdentifier Normal hi def link wsmlSqName Normal hi def link wsmlVariable Define hi def link wsmlKeywordsInsideLEs Operator hi def link wsmlOperator Operator hi def link wsmlBrace Operator hi def link wsmlCharacter Character hi def link wsmlNumber Number hi def link wsmlDataTypes Special hi def link wsmlComment Comment hi def link wsmlDocComment Comment hi def link wsmlLineComment Comment hi def link wsmlTodo Todo hi def link wsmlFixMe Error hi def link wsmlCommentTitle SpecialComment hi def link wsmlCommentStar wsmlComment let b:current_syntax = "wsml" let b:spell_options="contained" neovim-0.2.2/runtime/syntax/wvdial.vim000066400000000000000000000021051320401574200200200ustar00rootroot00000000000000" Vim syntax file " Language: Configuration file for WvDial " Maintainer: Prahlad Vaidyanathan " Last Update: Mon, 15 Oct 2001 09:39:03 Indian Standard Time " Quit if syntax file is already loaded if exists("b:current_syntax") finish endif syn match wvdialComment "^;.*$"lc=1 syn match wvdialComment "[^\\];.*$"lc=1 syn match wvdialSection "^\s*\[.*\]" syn match wvdialValue "=.*$"ms=s+1 syn match wvdialValue "\s*[^ ;"' ]\+"lc=1 syn match wvdialVar "^\s*\(Inherits\|Modem\|Baud\|Init.\|Phone\|Area\ Code\|Dial\ Prefix\|Dial\ Command\|Login\|Login\| Prompt\|Password\|Password\ Prompt\|PPPD\ Path\|Force\ Address\|Remote\ Name\|Carrier\ Check\|Stupid\ [Mm]ode\|New\ PPPD\|Default\ Reply\|Auto\ Reconnect\|SetVolume\|Username\)" syn match wvdialEqual "=" " The default highlighting hi def link wvdialComment Comment hi def link wvdialSection PreProc hi def link wvdialVar Identifier hi def link wvdialValue String hi def link wvdialEqual Statement let b:current_syntax = "wvdial" "EOF vim: tw=78:ft=vim:ts=8 neovim-0.2.2/runtime/syntax/xbl.vim000066400000000000000000000010701320401574200173170ustar00rootroot00000000000000" Vim syntax file " Language: XBL 1.0 " Maintainer: Doug Kearns " Latest Revision: 2007 November 5 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim runtime! syntax/xml.vim unlet b:current_syntax syn include @javascriptTop syntax/javascript.vim unlet b:current_syntax syn region xblJavascript \ matchgroup=xmlCdataStart start=++ \ contains=@javascriptTop keepend extend let b:current_syntax = "xbl" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/xdefaults.vim000066400000000000000000000133771320401574200205460ustar00rootroot00000000000000" Vim syntax file " Language: X resources files like ~/.Xdefaults (xrdb) " Maintainer: Johannes Zellner " Author and previous maintainer: " Gautam H. Mudunuri " Last Change: Di, 09 Mai 2006 23:10:23 CEST " $Id: xdefaults.vim,v 1.2 2007/05/05 17:19:40 vimboss Exp $ " " REFERENCES: " xrdb manual page " xrdb source: ftp://ftp.x.org/pub/R6.4/xc/programs/xrdb/xrdb.c " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " turn case on syn case match if !exists("xdefaults_no_colon_errors") " mark lines which do not contain a colon as errors. " This does not really catch all errors but only lines " which contain at least two WORDS and no colon. This " was done this way so that a line is not marked as " error while typing (which would be annoying). syntax match xdefaultsErrorLine "^\s*[a-zA-Z.*]\+\s\+[^: ]\+" endif " syn region xdefaultsLabel start=+^[^:]\{-}:+he=e-1 skip=+\\+ end="$" syn match xdefaultsLabel +^[^:]\{-}:+he=e-1 contains=xdefaultsPunct,xdefaultsSpecial,xdefaultsLineEnd syn region xdefaultsValue keepend start=+:+lc=1 skip=+\\+ end=+$+ contains=xdefaultsSpecial,xdefaultsLabel,xdefaultsLineEnd syn match xdefaultsSpecial contained +#override+ syn match xdefaultsSpecial contained +#augment+ syn match xdefaultsPunct contained +[.*:]+ syn match xdefaultsLineEnd contained +\\$+ syn match xdefaultsLineEnd contained +\\n\\$+ syn match xdefaultsLineEnd contained +\\n$+ " COMMENTS " note, that the '!' must be at the very first position of the line syn match xdefaultsComment "^!.*$" contains=xdefaultsTodo,@Spell " lines starting with a '#' mark and which are not preprocessor " lines are skipped. This is not part of the xrdb documentation. " It was reported by Bram Moolenaar and could be confirmed by " having a look at xrdb.c:GetEntries() syn match xdefaultsCommentH "^#.*$" "syn region xdefaultsComment start="^#" end="$" keepend contains=ALL syn region xdefaultsComment start="/\*" end="\*/" contains=xdefaultsTodo,@Spell syntax match xdefaultsCommentError "\*/" syn keyword xdefaultsTodo contained TODO FIXME XXX display " PREPROCESSOR STUFF syn region xdefaultsPreProc start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\|else\|endif\)\>" skip="\\$" end="$" contains=xdefaultsSymbol if !exists("xdefaults_no_if0") syn region xdefaultsCppOut start="^\s*#\s*if\s\+0\>" end=".\|$" contains=xdefaultsCppOut2 syn region xdefaultsCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=xdefaultsCppSkip syn region xdefaultsCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=xdefaultsCppSkip endif syn region xdefaultsIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match xdefaultsIncluded contained "<[^>]*>" syn match xdefaultsInclude "^\s*#\s*include\>\s*["<]" contains=xdefaultsIncluded syn cluster xdefaultsPreProcGroup contains=xdefaultsPreProc,xdefaultsIncluded,xdefaultsInclude,xdefaultsDefine,xdefaultsCppOut,xdefaultsCppOut2,xdefaultsCppSkip syn region xdefaultsDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine,xdefaultsLabel,xdefaultsValue syn region xdefaultsPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine,xdefaultsLabel,xdefaultsValue " symbols as defined by xrdb syn keyword xdefaultsSymbol contained SERVERHOST syn match xdefaultsSymbol contained "SRVR_[a-zA-Z0-9_]\+" syn keyword xdefaultsSymbol contained HOST syn keyword xdefaultsSymbol contained DISPLAY_NUM syn keyword xdefaultsSymbol contained CLIENTHOST syn match xdefaultsSymbol contained "CLNT_[a-zA-Z0-9_]\+" syn keyword xdefaultsSymbol contained RELEASE syn keyword xdefaultsSymbol contained REVISION syn keyword xdefaultsSymbol contained VERSION syn keyword xdefaultsSymbol contained VENDOR syn match xdefaultsSymbol contained "VNDR_[a-zA-Z0-9_]\+" syn match xdefaultsSymbol contained "EXT_[a-zA-Z0-9_]\+" syn keyword xdefaultsSymbol contained NUM_SCREENS syn keyword xdefaultsSymbol contained SCREEN_NUM syn keyword xdefaultsSymbol contained BITS_PER_RGB syn keyword xdefaultsSymbol contained CLASS syn keyword xdefaultsSymbol contained StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor syn match xdefaultsSymbol contained "CLASS_\(StaticGray\|GrayScale\|StaticColor\|PseudoColor\|TrueColor\|DirectColor\)" syn keyword xdefaultsSymbol contained COLOR syn match xdefaultsSymbol contained "CLASS_\(StaticGray\|GrayScale\|StaticColor\|PseudoColor\|TrueColor\|DirectColor\)_[0-9]\+" syn keyword xdefaultsSymbol contained HEIGHT syn keyword xdefaultsSymbol contained WIDTH syn keyword xdefaultsSymbol contained PLANES syn keyword xdefaultsSymbol contained X_RESOLUTION syn keyword xdefaultsSymbol contained Y_RESOLUTION " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link xdefaultsLabel Type hi def link xdefaultsValue Constant hi def link xdefaultsComment Comment hi def link xdefaultsCommentH xdefaultsComment hi def link xdefaultsPreProc PreProc hi def link xdefaultsInclude xdefaultsPreProc hi def link xdefaultsCppSkip xdefaultsCppOut hi def link xdefaultsCppOut2 xdefaultsCppOut hi def link xdefaultsCppOut Comment hi def link xdefaultsIncluded String hi def link xdefaultsDefine Macro hi def link xdefaultsSymbol Statement hi def link xdefaultsSpecial Statement hi def link xdefaultsErrorLine Error hi def link xdefaultsCommentError Error hi def link xdefaultsPunct Normal hi def link xdefaultsLineEnd Special hi def link xdefaultsTodo Todo let b:current_syntax = "xdefaults" " vim:ts=8 neovim-0.2.2/runtime/syntax/xf86conf.vim000066400000000000000000000346051320401574200202050ustar00rootroot00000000000000" Vim syntax file " This is a GENERATED FILE. Please always refer to source file at the URI below. " Language: XF86Config (XFree86 configuration file) " Former Maintainer: David Ne\v{c}as (Yeti) " Last Change: 2010 Nov 01 " URL: http://trific.ath.cx/Ftp/vim/syntax/xf86conf.vim " Required Vim Version: 6.0 " " Options: let xf86conf_xfree86_version = 3 or 4 " to force XFree86 3.x or 4.x XF86Config syntax " Setup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif if !exists("b:xf86conf_xfree86_version") if exists("xf86conf_xfree86_version") let b:xf86conf_xfree86_version = xf86conf_xfree86_version else let b:xf86conf_xfree86_version = 4 endif endif syn case ignore " Comments syn match xf86confComment "#.*$" contains=xf86confTodo syn case match syn keyword xf86confTodo FIXME TODO XXX NOT contained syn case ignore syn match xf86confTodo "???" contained " Sectioning errors syn keyword xf86confSectionError Section contained syn keyword xf86confSectionError EndSection syn keyword xf86confSubSectionError SubSection syn keyword xf86confSubSectionError EndSubSection syn keyword xf86confModeSubSectionError Mode syn keyword xf86confModeSubSectionError EndMode syn cluster xf86confSectionErrors contains=xf86confSectionError,xf86confSubSectionError,xf86confModeSubSectionError " Values if b:xf86conf_xfree86_version >= 4 syn region xf86confString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=xf86confSpecialChar,xf86confConstant,xf86confOptionName oneline keepend nextgroup=xf86confValue skipwhite else syn region xf86confString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=xf86confSpecialChar,xf86confOptionName oneline keepend endif syn match xf86confSpecialChar "\\\d\d\d\|\\." contained syn match xf86confDecimalNumber "\(\s\|-\)\zs\d*\.\=\d\+\>" syn match xf86confFrequency "\(\s\|-\)\zs\d\+\.\=\d*\(Hz\|k\|kHz\|M\|MHz\)" syn match xf86confOctalNumber "\<0\o\+\>" syn match xf86confOctalNumberError "\<0\o\+[89]\d*\>" syn match xf86confHexadecimalNumber "\<0x\x\+\>" syn match xf86confValue "\s\+.*$" contained contains=xf86confComment,xf86confString,xf86confFrequency,xf86conf\w\+Number,xf86confConstant syn keyword xf86confOption Option nextgroup=xf86confString skipwhite syn match xf86confModeLineValue "\"[^\"]\+\"\(\_s\+[0-9.]\+\)\{9}" nextgroup=xf86confSync skipwhite skipnl " Sections and subsections if b:xf86conf_xfree86_version >= 4 syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,xf86confSectionError syn region xf86confSectionModule matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Module\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOption,xf86confKeyword syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOption,xf86confKeyword syn region xf86confSectionModes matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Modes\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment syn region xf86confSectionScreen matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Screen\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionDisplay,xf86confComment,xf86confOption,xf86confKeyword syn region xf86confSubSectionAny matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"[^\"]\+\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors syn region xf86confSubSectionMode matchgroup=xf86confSectionDelim start="^\s*Mode\s\+\"[^\"]\+\"" end="^\s*EndMode\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confKeyword,@xf86confSectionErrors syn region xf86confSubSectionDisplay matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"Display\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors else syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Device\|Keyboard\|Pointer\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword syn region xf86confSectionMX matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Module\|Xinput\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword syn region xf86confSectionScreen matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Screen\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionDisplay,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword syn region xf86confSubSectionAny matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"[^\"]\+\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors syn region xf86confSubSectionMode matchgroup=xf86confSectionDelim start="^\s*Mode\s\+\"[^\"]\+\"" end="^\s*EndMode\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors syn region xf86confSubSectionDisplay matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"Display\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors endif " Options if b:xf86conf_xfree86_version >= 4 command -nargs=+ Xf86confdeclopt syn keyword xf86confOptionName contained else command -nargs=+ Xf86confdeclopt syn keyword xf86confOptionName contained nextgroup=xf86confValue,xf86confComment skipwhite endif Xf86confdeclopt 18bitBus AGPFastWrite AGPMode Accel AllowClosedownGrabs AllowDeactivateGrabs Xf86confdeclopt AllowMouseOpenFail AllowNonLocalModInDev AllowNonLocalXvidtune AlwaysCore Xf86confdeclopt AngleOffset AutoRepeat BaudRate BeamTimeout Beep BlankTime BlockWrite BottomX Xf86confdeclopt BottomY ButtonNumber ButtonThreshold Buttons ByteSwap CacheLines ChordMiddle Xf86confdeclopt ClearDTR ClearDTS ClickMode CloneDisplay CloneHSync CloneMode CloneVRefresh Xf86confdeclopt ColorKey Composite CompositeSync CoreKeyboard CorePointer Crt2Memory CrtScreen Xf86confdeclopt CrtcNumber CyberShadow CyberStretch DDC DDCMode DMAForXv DPMS Dac6Bit DacSpeed Xf86confdeclopt DataBits Debug DebugLevel DefaultServerLayout DeltaX DeltaY Device DeviceName Xf86confdeclopt DisableModInDev DisableVidModeExtension Display Display1400 DontVTSwitch Xf86confdeclopt DontZap DontZoom DoubleScan DozeMode DozeScan DozeTime DragLockButtons Xf86confdeclopt DualCount DualRefresh EarlyRasPrecharge Emulate3Buttons Emulate3Timeout Xf86confdeclopt EmulateWheel EmulateWheelButton EmulateWheelInertia EnablePageFlip EnterCount Xf86confdeclopt EstimateSizesAggressively ExternDisp FPClock16 FPClock24 FPClock32 Xf86confdeclopt FPClock8 FPDither FastDram FifoAggresive FifoConservative FifoModerate Xf86confdeclopt FireGL3000 FixPanelSize FlatPanel FlipXY FlowControl ForceCRT1 ForceCRT2Type Xf86confdeclopt ForceLegacyCRT ForcePCIMode FpmVRAM FrameBufferWC FullMMIO GammaBrightness Xf86confdeclopt HWClocks HWCursor HandleSpecialKeys HistorySize Interlace Interlaced InternDisp Xf86confdeclopt InvX InvY InvertX InvertY KeepShape LCDClock LateRasPrecharge LcdCenter Xf86confdeclopt LeftAlt Linear MGASDRAM MMIO MMIOCache MTTR MaxX MaxY MaximumXPosition Xf86confdeclopt MaximumYPosition MinX MinY MinimumXPosition MinimumYPosition NoAccel Xf86confdeclopt NoAllowMouseOpenFail NoAllowNonLocalModInDev NoAllowNonLocalXvidtune Xf86confdeclopt NoBlockWrite NoCompositeSync NoCompression NoCrtScreen NoCyberShadow NoDCC Xf86confdeclopt NoDDC NoDac6Bit NoDebug NoDisableModInDev NoDisableVidModeExtension NoDontZap Xf86confdeclopt NoDontZoom NoFireGL3000 NoFixPanelSize NoFpmVRAM NoFrameBufferWC NoHWClocks Xf86confdeclopt NoHWCursor NoHal NoLcdCenter NoLinear NoMGASDRAM NoMMIO NoMMIOCache NoMTTR Xf86confdeclopt NoOverClockMem NoOverlay NoPC98 NoPM NoPciBurst NoPciRetry NoProbeClock Xf86confdeclopt NoSTN NoSWCursor NoShadowFb NoShowCache NoSlowEDODRAM NoStretch NoSuspendHack Xf86confdeclopt NoTexturedVideo NoTrapSignals NoUseFBDev NoUseModeline NoUseVclk1 NoVTSysReq Xf86confdeclopt NoXVideo NvAGP OSMImageBuffers OffTime Origin OverClockMem Overlay Xf86confdeclopt PC98 PCIBurst PM PWMActive PWMSleep PanelDelayCompensation PanelHeight Xf86confdeclopt PanelOff PanelWidth Parity PciBurst PciRetry Pixmap Port PressDur PressPitch Xf86confdeclopt PressVol ProbeClocks ProgramFPRegs Protocol RGBBits ReleaseDur ReleasePitch Xf86confdeclopt ReportingMode Resolution RightAlt RightCtl Rotate STN SWCursor SampleRate Xf86confdeclopt ScreenNumber ScrollLock SendCoreEvents SendDragEvents Serial ServerNumLock Xf86confdeclopt SetLcdClk SetMClk SetRefClk ShadowFb ShadowStatus ShowCache SleepMode Xf86confdeclopt SleepScan SleepTime SlowDram SlowEDODRAM StandbyTime StopBits Stretch Xf86confdeclopt SuspendHack SuspendTime SwapXY SyncOnGreen TV TVOutput TVOverscan TVStandard Xf86confdeclopt TVXPosOffset TVYPosOffset TexturedVideo Threshold Tilt TopX TopY TouchTime Xf86confdeclopt TrapSignals Type USB UseBIOS UseFB UseFBDev UseFlatPanel UseModeline Xf86confdeclopt UseROMData UseVclk1 VTInit VTSysReq VTime VideoKey Vmin XAxisMapping Xf86confdeclopt XLeds XVideo XaaNoCPUToScreenColorExpandFill XaaNoColor8x8PatternFillRect Xf86confdeclopt XaaNoColor8x8PatternFillTrap XaaNoDashedBresenhamLine XaaNoDashedTwoPointLine Xf86confdeclopt XaaNoImageWriteRect XaaNoMono8x8PatternFillRect XaaNoMono8x8PatternFillTrap Xf86confdeclopt XaaNoOffscreenPixmaps XaaNoPixmapCache XaaNoScanlineCPUToScreenColorExpandFill Xf86confdeclopt XaaNoScanlineImageWriteRect XaaNoScreenToScreenColorExpandFill Xf86confdeclopt XaaNoScreenToScreenCopy XaaNoSolidBresenhamLine XaaNoSolidFillRect Xf86confdeclopt XaaNoSolidFillTrap XaaNoSolidHorVertLine XaaNoSolidTwoPointLine Xinerama Xf86confdeclopt XkbCompat XkbDisable XkbGeometry XkbKeycodes XkbKeymap XkbLayout XkbModel Xf86confdeclopt XkbOptions XkbRules XkbSymbols XkbTypes XkbVariant XvBskew XvHsync XvOnCRT2 Xf86confdeclopt XvRskew XvVsync YAxisMapping ZAxisMapping ZoomOnLCD delcommand Xf86confdeclopt " Keywords syn keyword xf86confKeyword Device Driver FontPath Group Identifier Load ModelName ModulePath Monitor RGBPath VendorName VideoAdaptor Visual nextgroup=xf86confComment,xf86confString skipwhite syn keyword xf86confKeyword BiosBase Black BoardName BusID ChipID ChipRev Chipset nextgroup=xf86confComment,xf86confValue syn keyword xf86confKeyword ClockChip Clocks DacSpeed DefaultDepth DefaultFbBpp nextgroup=xf86confComment,xf86confValue syn keyword xf86confKeyword DefaultColorDepth nextgroup=xf86confComment,xf86confValue syn keyword xf86confKeyword Depth DisplaySize DotClock FbBpp Flags Gamma HorizSync nextgroup=xf86confComment,xf86confValue syn keyword xf86confKeyword Hskew HTimings InputDevice IOBase MemBase Mode nextgroup=xf86confComment,xf86confValue syn keyword xf86confKeyword Modes Ramdac Screen TextClockFreq UseModes VendorName nextgroup=xf86confComment,xf86confValue syn keyword xf86confKeyword VertRefresh VideoRam ViewPort Virtual VScan VTimings nextgroup=xf86confComment,xf86confValue syn keyword xf86confKeyword Weight White nextgroup=xf86confComment,xf86confValue syn keyword xf86confModeLine ModeLine nextgroup=xf86confComment,xf86confModeLineValue skipwhite skipnl " Constants if b:xf86conf_xfree86_version >= 4 syn keyword xf86confConstant true false on off yes no omit contained else syn keyword xf86confConstant Meta Compose Control endif syn keyword xf86confConstant StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor contained syn keyword xf86confConstant Absolute RightOf LeftOf Above Below Relative StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor contained syn match xf86confSync "\(\s\+[+-][CHV]_*Sync\)\+" contained " Synchronization if b:xf86conf_xfree86_version >= 4 syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\"" syn sync match xf86confSyncSectionModule grouphere xf86confSectionModule "^\s*Section\s\+\"Module\"" syn sync match xf86confSyncSectionModes groupthere xf86confSectionModes "^\s*Section\s\+\"Modes\"" else syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Device\|Keyboard\|Pointer\)\"" syn sync match xf86confSyncSectionMX grouphere xf86confSectionMX "^\s*Section\s\+\"\(Module\|Xinput\)\"" endif syn sync match xf86confSyncSectionMonitor groupthere xf86confSectionMonitor "^\s*Section\s\+\"Monitor\"" syn sync match xf86confSyncSectionScreen groupthere xf86confSectionScreen "^\s*Section\s\+\"Screen\"" syn sync match xf86confSyncEndSection groupthere NONE "^\s*End_*Section\s*$" " Define the default highlighting hi def link xf86confComment Comment hi def link xf86confTodo Todo hi def link xf86confSectionDelim Statement hi def link xf86confOptionName Identifier hi def link xf86confSectionError xf86confError hi def link xf86confSubSectionError xf86confError hi def link xf86confModeSubSectionError xf86confError hi def link xf86confOctalNumberError xf86confError hi def link xf86confError Error hi def link xf86confOption xf86confKeyword hi def link xf86confModeLine xf86confKeyword hi def link xf86confKeyword Type hi def link xf86confDecimalNumber xf86confNumber hi def link xf86confOctalNumber xf86confNumber hi def link xf86confHexadecimalNumber xf86confNumber hi def link xf86confFrequency xf86confNumber hi def link xf86confModeLineValue Constant hi def link xf86confNumber Constant hi def link xf86confSync xf86confConstant hi def link xf86confConstant Special hi def link xf86confSpecialChar Special hi def link xf86confString String hi def link xf86confValue Constant let b:current_syntax = "xf86conf" neovim-0.2.2/runtime/syntax/xhtml.vim000066400000000000000000000002721320401574200176710ustar00rootroot00000000000000" Vim syntax file " Language: XHTML " Maintainer: noone " Last Change: 2003 Feb 04 " Load the HTML syntax for now. runtime! syntax/html.vim let b:current_syntax = "xhtml" " vim: ts=8 neovim-0.2.2/runtime/syntax/xinetd.vim000066400000000000000000000336001320401574200200310ustar00rootroot00000000000000" Vim syntax file " Language: xinetd.conf(5) configuration file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword xinetdTodo contained TODO FIXME XXX NOTE syn region xinetdComment display oneline start='^\s*#' end='$' \ contains=xinetdTodo,@Spell syn match xinetdService '^\s*service\>' \ nextgroup=xinetdServiceName skipwhite syn match xinetdServiceName contained '\S\+' \ nextgroup=xinetdServiceGroup skipwhite skipnl syn match xinetdDefaults '^\s*defaults' \ nextgroup=xinetdServiceGroup skipwhite skipnl syn region xinetdServiceGroup contained transparent \ matchgroup=xinetdServiceGroupD start='{' \ matchgroup=xinetdServiceGroupD end='}' \ contains=xinetdAttribute,xinetdReqAttribute, \ xinetdDisable syn keyword xinetdReqAttribute contained user server protocol \ nextgroup=xinetdStringEq skipwhite syn keyword xinetdAttribute contained id group bind \ interface \ nextgroup=xinetdStringEq skipwhite syn match xinetdStringEq contained display '=' \ nextgroup=xinetdString skipwhite syn match xinetdString contained display '\S\+' syn keyword xinetdAttribute contained type nextgroup=xinetdTypeEq skipwhite syn match xinetdTypeEq contained display '=' \ nextgroup=xinetdType skipwhite syn keyword xinetdType contained RPC INTERNAL TCPMUX TCPMUXPLUS \ UNLISTED \ nextgroup=xinetdType skipwhite syn keyword xinetdAttribute contained flags \ nextgroup=xinetdFlagsEq skipwhite syn cluster xinetdFlagsC contains=xinetdFlags,xinetdDeprFlags syn match xinetdFlagsEq contained display '=' \ nextgroup=@xinetdFlagsC skipwhite syn keyword xinetdFlags contained INTERCEPT NORETRY IDONLY NAMEINARGS \ NODELAY KEEPALIVE NOLIBWRAP SENSOR IPv4 IPv6 \ nextgroup=@xinetdFlagsC skipwhite syn keyword xinetdDeprFlags contained REUSE nextgroup=xinetdFlagsC skipwhite syn keyword xinetdDisable contained disable \ nextgroup=xinetdBooleanEq skipwhite syn match xinetdBooleanEq contained display '=' \ nextgroup=xinetdBoolean skipwhite syn keyword xinetdBoolean contained yes no syn keyword xinetdReqAttribute contained socket_type \ nextgroup=xinetdSocketTypeEq skipwhite syn match xinetdSocketTypeEq contained display '=' \ nextgroup=xinetdSocketType skipwhite syn keyword xinetdSocketType contained stream dgram raw seqpacket syn keyword xinetdReqAttribute contained wait \ nextgroup=xinetdBooleanEq skipwhite syn keyword xinetdAttribute contained groups mdns \ nextgroup=xinetdBooleanEq skipwhite syn keyword xinetdAttribute contained instances per_source rlimit_cpu \ rlimit_data rlimit_rss rlimit_stack \ nextgroup=xinetdUNumberEq skipwhite syn match xinetdUNumberEq contained display '=' \ nextgroup=xinetdUnlimited,xinetdNumber \ skipwhite syn keyword xinetdUnlimited contained UNLIMITED syn match xinetdNumber contained display '\<\d\+\>' syn keyword xinetdAttribute contained nice \ nextgroup=xinetdSignedNumEq skipwhite syn match xinetdSignedNumEq contained display '=' \ nextgroup=xinetdSignedNumber skipwhite syn match xinetdSignedNumber contained display '[+-]\=\d\+\>' syn keyword xinetdAttribute contained server_args \ enabled \ nextgroup=xinetdStringsEq skipwhite syn match xinetdStringsEq contained display '=' \ nextgroup=xinetdStrings skipwhite syn match xinetdStrings contained display '\S\+' \ nextgroup=xinetdStrings skipwhite syn keyword xinetdAttribute contained only_from no_access passenv \ nextgroup=xinetdStringsAdvEq skipwhite syn match xinetdStringsAdvEq contained display '[+-]\==' \ nextgroup=xinetdStrings skipwhite syn keyword xinetdAttribute contained access_times \ nextgroup=xinetdTimeRangesEq skipwhite syn match xinetdTimeRangesEq contained display '=' \ nextgroup=xinetdTimeRanges skipwhite syn match xinetdTimeRanges contained display \ '\%(0?\d\|1\d\|2[0-3]\):\%(0?\d\|[1-5]\d\)-\%(0?\d\|1\d\|2[0-3]\):\%(0?\d\|[1-5]\d\)' \ nextgroup=xinetdTimeRanges skipwhite syn keyword xinetdAttribute contained log_type nextgroup=xinetdLogTypeEq \ skipwhite syn match xinetdLogTypeEq contained display '=' \ nextgroup=xinetdLogType skipwhite syn keyword xinetdLogType contained SYSLOG nextgroup=xinetdSyslogType \ skipwhite syn keyword xinetdLogType contained FILE nextgroup=xinetdLogFile skipwhite syn keyword xinetdSyslogType contained daemon auth authpriv user mail lpr \ news uucp ftp local0 local1 local2 local3 \ local4 local5 local6 local7 \ nextgroup=xinetdSyslogLevel skipwhite syn keyword xinetdSyslogLevel contained emerg alert crit err warning notice \ info debug syn match xinetdLogFile contained display '\S\+' \ nextgroup=xinetdLogSoftLimit skipwhite syn match xinetdLogSoftLimit contained display '\<\d\+\>' \ nextgroup=xinetdLogHardLimit skipwhite syn match xinetdLogHardLimit contained display '\<\d\+\>' syn keyword xinetdAttribute contained log_on_success \ nextgroup=xinetdLogSuccessEq skipwhite syn match xinetdLogSuccessEq contained display '[+-]\==' \ nextgroup=xinetdLogSuccess skipwhite syn keyword xinetdLogSuccess contained PID HOST USERID EXIT DURATION TRAFFIC \ nextgroup=xinetdLogSuccess skipwhite syn keyword xinetdAttribute contained log_on_failure \ nextgroup=xinetdLogFailureEq skipwhite syn match xinetdLogFailureEq contained display '[+-]\==' \ nextgroup=xinetdLogFailure skipwhite syn keyword xinetdLogFailure contained HOST USERID ATTEMPT \ nextgroup=xinetdLogFailure skipwhite syn keyword xinetdReqAttribute contained rpc_version \ nextgroup=xinetdRPCVersionEq skipwhite syn match xinetdRPCVersionEq contained display '=' \ nextgroup=xinetdRPCVersion skipwhite syn match xinetdRPCVersion contained display '\d\+\%(-\d\+\)\=\>' syn keyword xinetdReqAttribute contained rpc_number port \ nextgroup=xinetdNumberEq skipwhite syn match xinetdNumberEq contained display '=' \ nextgroup=xinetdNumber skipwhite syn keyword xinetdAttribute contained env nextgroup=xinetdEnvEq skipwhite syn match xinetdEnvEq contained display '+\==' \ nextgroup=xinetdEnvName skipwhite syn match xinetdEnvName contained display '[^=]\+' \ nextgroup=xinetdEnvNameEq syn match xinetdEnvNameEq contained display '=' nextgroup=xinetdEnvValue syn match xinetdEnvValue contained display '\S\+' \ nextgroup=xinetdEnvName skipwhite syn keyword xinetdAttribute contained banner banner_success banner_failure \ nextgroup=xinetdPathEq skipwhite syn keyword xinetdPPAttribute include includedir \ nextgroup=xinetdPath skipwhite syn match xinetdPathEq contained display '=' \ nextgroup=xinetdPath skipwhite syn match xinetdPath contained display '\S\+' syn keyword xinetdAttribute contained redirect nextgroup=xinetdRedirectEq \ skipwhite syn match xinetdRedirectEq contained display '=' \ nextgroup=xinetdRedirectIP skipwhite syn match xinetdRedirectIP contained display '\S\+' \ nextgroup=xinetdNumber skipwhite syn keyword xinetdAttribute contained cps nextgroup=xinetdCPSEq skipwhite syn match xinetdCPSEq contained display '=' \ nextgroup=xinetdCPS skipwhite syn match xinetdCPS contained display '\<\d\+\>' \ nextgroup=xinetdNumber skipwhite syn keyword xinetdAttribute contained max_load nextgroup=xinetdFloatEq \ skipwhite syn match xinetdFloatEq contained display '=' \ nextgroup=xinetdFloat skipwhite syn match xinetdFloat contained display '\d\+\.\d*\|\.\d\+' syn keyword xinetdAttribute contained umask nextgroup=xinetdOctalEq \ skipwhite syn match xinetdOctalEq contained display '=' \ nextgroup=xinetdOctal,xinetdOctalError \ skipwhite syn match xinetdOctal contained display '\<0\o\+\>' \ contains=xinetdOctalZero syn match xinetdOctalZero contained display '\<0' syn match xinetdOctalError contained display '\<0\o*[89]\d*\>' syn keyword xinetdAttribute contained rlimit_as nextgroup=xinetdASEq \ skipwhite syn match xinetdASEq contained display '=' \ nextgroup=xinetdAS,xinetdUnlimited \ skipwhite syn match xinetdAS contained display '\d\+' nextgroup=xinetdASMult syn match xinetdASMult contained display '[KM]' syn keyword xinetdAttribute contained deny_time nextgroup=xinetdDenyTimeEq \ skipwhite syn match xinetdDenyTimeEq contained display '=' \ nextgroup=xinetdDenyTime,xinetdNumber \ skipwhite syn keyword xinetdDenyTime contained FOREVER NEVER hi def link xinetdTodo Todo hi def link xinetdComment Comment hi def link xinetdService Keyword hi def link xinetdServiceName String hi def link xinetdDefaults Keyword hi def link xinetdServiceGroupD Delimiter hi def link xinetdReqAttribute Keyword hi def link xinetdAttribute Type hi def link xinetdEq Operator hi def link xinetdStringEq xinetdEq hi def link xinetdString String hi def link xinetdTypeEq xinetdEq hi def link xinetdType Identifier hi def link xinetdFlagsEq xinetdEq hi def link xinetdFlags xinetdType hi def link xinetdDeprFlags WarningMsg hi def link xinetdDisable Special hi def link xinetdBooleanEq xinetdEq hi def link xinetdBoolean Boolean hi def link xinetdSocketTypeEq xinetdEq hi def link xinetdSocketType xinetdType hi def link xinetdUNumberEq xinetdEq hi def link xinetdUnlimited Define hi def link xinetdNumber Number hi def link xinetdSignedNumEq xinetdEq hi def link xinetdSignedNumber xinetdNumber hi def link xinetdStringsEq xinetdEq hi def link xinetdStrings xinetdString hi def link xinetdStringsAdvEq xinetdEq hi def link xinetdTimeRangesEq xinetdEq hi def link xinetdTimeRanges Number hi def link xinetdLogTypeEq xinetdEq hi def link xinetdLogType Keyword hi def link xinetdSyslogType xinetdType hi def link xinetdSyslogLevel Number hi def link xinetdLogFile xinetdPath hi def link xinetdLogSoftLimit xinetdNumber hi def link xinetdLogHardLimit xinetdNumber hi def link xinetdLogSuccessEq xinetdEq hi def link xinetdLogSuccess xinetdType hi def link xinetdLogFailureEq xinetdEq hi def link xinetdLogFailure xinetdType hi def link xinetdRPCVersionEq xinetdEq hi def link xinetdRPCVersion xinetdNumber hi def link xinetdNumberEq xinetdEq hi def link xinetdEnvEq xinetdEq hi def link xinetdEnvName Identifier hi def link xinetdEnvNameEq xinetdEq hi def link xinetdEnvValue String hi def link xinetdPPAttribute PreProc hi def link xinetdPathEq xinetdEq hi def link xinetdPath String hi def link xinetdRedirectEq xinetdEq hi def link xinetdRedirectIP String hi def link xinetdCPSEq xinetdEq hi def link xinetdCPS xinetdNumber hi def link xinetdFloatEq xinetdEq hi def link xinetdFloat xinetdNumber hi def link xinetdOctalEq xinetdEq hi def link xinetdOctal xinetdNumber hi def link xinetdOctalZero PreProc hi def link xinetdOctalError Error hi def link xinetdASEq xinetdEq hi def link xinetdAS xinetdNumber hi def link xinetdASMult PreProc hi def link xinetdDenyTimeEq xinetdEq hi def link xinetdDenyTime PreProc let b:current_syntax = "xinetd" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/xkb.vim000066400000000000000000000063701320401574200173260ustar00rootroot00000000000000" Vim syntax file " This is a GENERATED FILE. Please always refer to source file at the URI below. " Language: XKB (X Keyboard Extension) components " Maintainer: David Ne\v{c}as (Yeti) " Last Change: 2003-04-13 " URL: http://trific.ath.cx/Ftp/vim/syntax/xkb.vim " Setup " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case match syn sync minlines=100 " Comments syn region xkbComment start="//" skip="\\$" end="$" keepend contains=xkbTodo syn region xkbComment start="/\*" matchgroup=NONE end="\*/" contains=xkbCommentStartError,xkbTodo syn match xkbCommentError "\*/" syntax match xkbCommentStartError "/\*" contained syn sync ccomment xkbComment syn keyword xkbTodo TODO FIXME contained " Literal strings syn match xkbSpecialChar "\\\d\d\d\|\\." contained syn region xkbString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xkbSpecialChar oneline " Catch errors caused by wrong parenthesization syn region xkbParen start='(' end=')' contains=ALLBUT,xkbParenError,xkbSpecial,xkbTodo transparent syn match xkbParenError ")" syn region xkbBrace start='{' end='}' contains=ALLBUT,xkbBraceError,xkbSpecial,xkbTodo transparent syn match xkbBraceError "}" syn region xkbBracket start='\[' end='\]' contains=ALLBUT,xkbBracketError,xkbSpecial,xkbTodo transparent syn match xkbBracketError "\]" " Physical keys syn match xkbPhysicalKey "<\w\+>" " Keywords syn keyword xkbPreproc augment include replace syn keyword xkbConstant False True syn keyword xkbModif override replace syn keyword xkbIdentifier action affect alias allowExplicit approx baseColor button clearLocks color controls cornerRadius count ctrls description driveskbd font fontSize gap group groups height indicator indicatorDrivesKeyboard interpret key keys labelColor latchToLock latchMods left level_name map maximum minimum modifier_map modifiers name offColor onColor outline preserve priority repeat row section section setMods shape slant solid symbols text top type useModMapMods virtualModifier virtualMods virtual_modifiers weight whichModState width syn keyword xkbFunction AnyOf ISOLock LatchGroup LatchMods LockControls LockGroup LockMods LockPointerButton MovePtr NoAction PointerButton SetControls SetGroup SetMods SetPtrDflt Terminate syn keyword xkbTModif default hidden partial virtual syn keyword xkbSect alphanumeric_keys alternate_group function_keys keypad_keys modifier_keys xkb_compatibility xkb_geometry xkb_keycodes xkb_keymap xkb_semantics xkb_symbols xkb_types " Define the default highlighting hi def link xkbModif xkbPreproc hi def link xkbTModif xkbPreproc hi def link xkbPreproc Preproc hi def link xkbIdentifier Keyword hi def link xkbFunction Function hi def link xkbSect Type hi def link xkbPhysicalKey Identifier hi def link xkbKeyword Keyword hi def link xkbComment Comment hi def link xkbTodo Todo hi def link xkbConstant Constant hi def link xkbString String hi def link xkbSpecialChar xkbSpecial hi def link xkbSpecial Special hi def link xkbParenError xkbBalancingError hi def link xkbBraceError xkbBalancingError hi def link xkbBraketError xkbBalancingError hi def link xkbBalancingError xkbError hi def link xkbCommentStartError xkbCommentError hi def link xkbCommentError xkbError hi def link xkbError Error let b:current_syntax = "xkb" neovim-0.2.2/runtime/syntax/xmath.vim000066400000000000000000000251151320401574200176610ustar00rootroot00000000000000" Vim syntax file " Language: xmath (a simulation tool) " Maintainer: Charles E. Campbell " Last Change: Aug 31, 2016 " Version: 9 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XMATH " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " parenthesis sanity checker syn region xmathZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,xmathError,xmathBraceError,xmathCurlyError syn region xmathZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,xmathError,xmathBraceError,xmathParenError syn region xmathZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,xmathError,xmathCurlyError,xmathParenError syn match xmathError "[)\]}]" syn match xmathBraceError "[)}]" contained syn match xmathCurlyError "[)\]]" contained syn match xmathParenError "[\]}]" contained syn match xmathComma "[,;:]" syn match xmathComma "\.\.\.$" " A bunch of useful xmath keywords syn case ignore syn keyword xmathFuncCmd function endfunction command endcommand syn keyword xmathStatement abort beep debug default define syn keyword xmathStatement execute exit pause return undefine syn keyword xmathConditional if else elseif endif syn keyword xmathRepeat while for endwhile endfor syn keyword xmathCmd anigraph deletedatastore keep renamedatastore syn keyword xmathCmd autocode deletestd linkhyper renamestd syn keyword xmathCmd build deletesuperblock linksim renamesuperblock syn keyword xmathCmd comment deletetransition listusertype save syn keyword xmathCmd copydatastore deleteusertype load sbadisplay syn keyword xmathCmd copystd detailmodel lock set syn keyword xmathCmd copysuperblock display minmax_display setsbdefault syn keyword xmathCmd createblock documentit modifyblock show syn keyword xmathCmd createbubble editcatalog modifybubble showlicense syn keyword xmathCmd createconnection erase modifystd showsbdefault syn keyword xmathCmd creatertf expandsuperbubble modifysuperblock stop syn keyword xmathCmd createstd for modifytransition stopcosim syn keyword xmathCmd createsuperblock go modifyusertype syntax syn keyword xmathCmd createsuperbubble goto new unalias syn keyword xmathCmd createtransition hardcopy next unlock syn keyword xmathCmd createusertype help polargraph usertype syn keyword xmathCmd delete hyperbuild print whatis syn keyword xmathCmd deleteblock if printmodel while syn keyword xmathCmd deletebubble ifilter quit who syn keyword xmathCmd deleteconnection ipcwc remove xgraph syn keyword xmathFunc abcd eye irea querystdoptions syn keyword xmathFunc abs eyepattern is querysuperblock syn keyword xmathFunc acos feedback ISID querysuperblockopt syn keyword xmathFunc acosh fft ISID Models querytransition syn keyword xmathFunc adconversion fftpdm kronecker querytransitionopt syn keyword xmathFunc afeedback filter length qz syn keyword xmathFunc all find limit rampinvar syn keyword xmathFunc ambiguity firparks lin random syn keyword xmathFunc amdemod firremez lin30 randpdm syn keyword xmathFunc analytic firwind linearfm randpert syn keyword xmathFunc analyze fmdemod linfnorm randsys syn keyword xmathFunc any forwdiff lintodb rank syn keyword xmathFunc append fprintf list rayleigh syn keyword xmathFunc argn frac log rcepstrum syn keyword xmathFunc argv fracred log10 rcond syn keyword xmathFunc arma freq logm rdintegrate syn keyword xmathFunc arma2ss freqcircle lognormal read syn keyword xmathFunc armax freqcont logspace real syn keyword xmathFunc ascii frequencyhop lowpass rectify syn keyword xmathFunc asin fsesti lpopt redschur syn keyword xmathFunc asinh fslqgcomp lqgcomp reflect syn keyword xmathFunc atan fsregu lqgltr regulator syn keyword xmathFunc atan2 fwls ls residue syn keyword xmathFunc atanh gabor ls2unc riccati syn keyword xmathFunc attach_ac100 garb ls2var riccati_eig syn keyword xmathFunc backdiff gaussian lsjoin riccati_schur syn keyword xmathFunc balance gcexp lu ricean syn keyword xmathFunc balmoore gcos lyapunov rifd syn keyword xmathFunc bandpass gdfileselection makecontinuous rlinfo syn keyword xmathFunc bandstop gdmessage makematrix rlocus syn keyword xmathFunc bj gdselection makepoly rms syn keyword xmathFunc blknorm genconv margin rootlocus syn keyword xmathFunc bode get markoff roots syn keyword xmathFunc bpm get_info30 matchedpz round syn keyword xmathFunc bpm2inn get_inn max rref syn keyword xmathFunc bpmjoin gfdm maxlike rve_get syn keyword xmathFunc bpmsplit gfsk mean rve_info syn keyword xmathFunc bst gfskernel mergeseg rve_reset syn keyword xmathFunc buttconstr gfunction min rve_update syn keyword xmathFunc butterworth ggauss minimal samplehold syn keyword xmathFunc cancel giv mkpert schur syn keyword xmathFunc canform giv2var mkphase sdf syn keyword xmathFunc ccepstrum givjoin mma sds syn keyword xmathFunc char gpsk mmaget sdtrsp syn keyword xmathFunc chebconstr gpulse mmaput sec syn keyword xmathFunc chebyshev gqam mod sech syn keyword xmathFunc check gqpsk modal siginterp syn keyword xmathFunc cholesky gramp modalstate sign syn keyword xmathFunc chop gsawtooth modcarrier sim syn keyword xmathFunc circonv gsigmoid mreduce sim30 syn keyword xmathFunc circorr gsin mtxplt simin syn keyword xmathFunc clock gsinc mu simin30 syn keyword xmathFunc clocus gsqpsk mulhank simout syn keyword xmathFunc clsys gsquarewave multipath simout30 syn keyword xmathFunc coherence gstep musynfit simtransform syn keyword xmathFunc colorind GuiDialogCreate mxstr2xmstr sin syn keyword xmathFunc combinepf GuiDialogDestroy mxstring2xmstring singriccati syn keyword xmathFunc commentof GuiFlush names sinh syn keyword xmathFunc compare GuiGetValue nichols sinm syn keyword xmathFunc complementaryerf GuiManage noisefilt size syn keyword xmathFunc complexenvelope GuiPlot none smargin syn keyword xmathFunc complexfreqshift GuiPlotGet norm sns2sys syn keyword xmathFunc concatseg GuiSetValue numden sort syn keyword xmathFunc condition GuiShellCreate nyquist spectrad syn keyword xmathFunc conj GuiShellDeiconify obscf spectrum syn keyword xmathFunc conmap GuiShellDestroy observable spline syn keyword xmathFunc connect GuiShellIconify oe sprintf syn keyword xmathFunc conpdm GuiShellLower ones sqrt syn keyword xmathFunc constellation GuiShellRaise ophank sqrtm syn keyword xmathFunc consys GuiShellRealize optimize sresidualize syn keyword xmathFunc controllable GuiShellUnrealize optscale ss2arma syn keyword xmathFunc convolve GuiTimer orderfilt sst syn keyword xmathFunc correlate GuiToolCreate orderstate ssv syn keyword xmathFunc cos GuiToolDestroy orth stable syn keyword xmathFunc cosh GuiToolExist oscmd stair syn keyword xmathFunc cosm GuiUnmanage oscope starp syn keyword xmathFunc cot GuiWidgetExist osscale step syn keyword xmathFunc coth h2norm padcrop stepinvar syn keyword xmathFunc covariance h2syn partialsum string syn keyword xmathFunc csc hadamard pdm stringex syn keyword xmathFunc csch hankelsv pdmslice substr syn keyword xmathFunc csum hessenberg pem subsys syn keyword xmathFunc ctrcf highpass perfplots sum syn keyword xmathFunc ctrlplot hilbert period svd syn keyword xmathFunc daug hilberttransform pfscale svplot syn keyword xmathFunc dbtolin hinfcontr phaseshift sweep syn keyword xmathFunc dct hinfnorm pinv symbolmap syn keyword xmathFunc decimate hinfsyn plot sys2sns syn keyword xmathFunc defFreqRange histogram plot30 sysic syn keyword xmathFunc defTimeRange idfreq pmdemod Sysid syn keyword xmathFunc delay idimpulse poisson system syn keyword xmathFunc delsubstr idsim poissonimpulse tan syn keyword xmathFunc det ifft poleplace tanh syn keyword xmathFunc detrend imag poles taper syn keyword xmathFunc dht impinvar polezero tfid syn keyword xmathFunc diagonal impplot poltrend toeplitz syn keyword xmathFunc differentiate impulse polyfit trace syn keyword xmathFunc directsequence index polynomial tril syn keyword xmathFunc discretize indexlist polyval trim syn keyword xmathFunc divide initial polyvalm trim30 syn keyword xmathFunc domain initmodel prbs triu syn keyword xmathFunc dst initx0 product trsp syn keyword xmathFunc eig inn2bpm psd truncate syn keyword xmathFunc ellipconstr inn2pe put_inn tustin syn keyword xmathFunc elliptic inn2unc qpopt uniform syn keyword xmathFunc erf insertseg qr val syn keyword xmathFunc error int quantize variance syn keyword xmathFunc estimator integrate queryblock videolines syn keyword xmathFunc etfe integratedump queryblockoptions wcbode syn keyword xmathFunc exist interp querybubble wcgain syn keyword xmathFunc exp interpolate querybubbleoptionswindow syn keyword xmathFunc expm inv querycatalog wtbalance syn keyword xmathFunc extractchan invhilbert queryconnection zeros syn keyword xmathFunc extractseg iqmix querystd syn case match " Labels (supports xmath's goto) syn match xmathLabel "^\s*<[a-zA-Z_][a-zA-Z0-9]*>" " String and Character constants " Highlight special characters (those which have a backslash) differently syn match xmathSpecial contained "\\\d\d\d\|\\." syn region xmathString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xmathSpecial,@Spell syn match xmathCharacter "'[^\\]'" syn match xmathSpecialChar "'\\.'" syn match xmathNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" " Comments: " xmath supports #... (like Unix shells) " and #{ ... }# comment blocks syn cluster xmathCommentGroup contains=xmathString,xmathTodo,@Spell syn keyword xmathTodo contained COMBAK DEBUG FIXME Todo TODO XXX syn match xmathComment "#.*$" contains=@xmathCommentGroup syn region xmathCommentBlock start="#{" end="}#" contains=@xmathCommentGroup " synchronizing syn sync match xmathSyncComment grouphere xmathCommentBlock "#{" syn sync match xmathSyncComment groupthere NONE "}#" " Define the default highlighting. if !exists("skip_xmath_syntax_inits") hi def link xmathBraceError xmathError hi def link xmathCmd xmathStatement hi def link xmathCommentBlock xmathComment hi def link xmathCurlyError xmathError hi def link xmathFuncCmd xmathStatement hi def link xmathParenError xmathError " The default methods for highlighting. Can be overridden later hi def link xmathCharacter Character hi def link xmathComma Delimiter hi def link xmathComment Comment hi def link xmathCommentBlock Comment hi def link xmathConditional Conditional hi def link xmathError Error hi def link xmathFunc Function hi def link xmathLabel PreProc hi def link xmathNumber Number hi def link xmathRepeat Repeat hi def link xmathSpecial Type hi def link xmathSpecialChar SpecialChar hi def link xmathStatement Statement hi def link xmathString String hi def link xmathTodo Todo endif let b:current_syntax = "xmath" " vim: ts=17 neovim-0.2.2/runtime/syntax/xml.vim000066400000000000000000000206411320401574200173370ustar00rootroot00000000000000" Vim syntax file " Language: XML " Maintainer: Johannes Zellner " Author and previous maintainer: " Paul Siegmann " Last Change: 2013 Jun 07 " Filenames: *.xml " $Id: xml.vim,v 1.3 2006/04/11 21:32:00 vimboss Exp $ " CONFIGURATION: " syntax folding can be turned on by " " let g:xml_syntax_folding = 1 " " before the syntax file gets loaded (e.g. in ~/.vimrc). " This might slow down syntax highlighting significantly, " especially for large files. " " CREDITS: " The original version was derived by Paul Siegmann from " Claudio Fleiner's html.vim. " " REFERENCES: " [1] http://www.w3.org/TR/2000/REC-xml-20001006 " [2] http://www.w3.org/XML/1998/06/xmlspec-report-19980910.htm " " as pointed out according to reference [1] " " 2.3 Common Syntactic Constructs " [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender " [5] Name ::= (Letter | '_' | ':') (NameChar)* " " NOTE: " 1) empty tag delimiters "/>" inside attribute values (strings) " confuse syntax highlighting. " 2) for large files, folding can be pretty slow, especially when " loading a file the first time and viewoptions contains 'folds' " so that folds of previous sessions are applied. " Don't use 'foldmethod=syntax' in this case. " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:xml_cpo_save = &cpo set cpo&vim syn case match " mark illegal characters syn match xmlError "[<&]" " strings (inside tags) aka VALUES " " EXAMPLE: " " " ^^^^^^^ syn region xmlString contained start=+"+ end=+"+ contains=xmlEntity,@Spell display syn region xmlString contained start=+'+ end=+'+ contains=xmlEntity,@Spell display " punctuation (within attributes) e.g. " ^ ^ " syn match xmlAttribPunct +[-:._]+ contained display syn match xmlAttribPunct +[:.]+ contained display " no highlighting for xmlEqual (xmlEqual has no highlighting group) syn match xmlEqual +=+ display " attribute, everything before the '=' " " PROVIDES: @xmlAttribHook " " EXAMPLE: " " " ^^^^^^^^^^^^^ " syn match xmlAttrib \ +[-'"<]\@1\%(['">]\@!\|$\)+ \ contained \ contains=xmlAttribPunct,@xmlAttribHook \ display " namespace spec " " PROVIDES: @xmlNamespaceHook " " EXAMPLE: " " " ^^^ " if exists("g:xml_namespace_transparent") syn match xmlNamespace \ +\(<\|"':]\+[:]\@=+ \ contained \ contains=@xmlNamespaceHook \ transparent \ display else syn match xmlNamespace \ +\(<\|"':]\+[:]\@=+ \ contained \ contains=@xmlNamespaceHook \ display endif " tag name " " PROVIDES: @xmlTagHook " " EXAMPLE: " " " ^^^ " syn match xmlTagName \ +<\@1<=[^ /!?<>"']\++ \ contained \ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook \ display if exists('g:xml_syntax_folding') " start tag " use matchgroup=xmlTag to skip over the leading '<' " " PROVIDES: @xmlStartTagHook " " EXAMPLE: " " " s^^^^^^^^^^^^^^^e " syn region xmlTag \ matchgroup=xmlTag start=+<[^ /!?<>"']\@=+ \ matchgroup=xmlTag end=+>+ \ contained \ contains=xmlError,xmlTagName,xmlAttrib,xmlEqual,xmlString,@xmlStartTagHook " highlight the end tag " " PROVIDES: @xmlTagHook " (should we provide a separate @xmlEndTagHook ?) " " EXAMPLE: " " " ^^^^^^ " syn match xmlEndTag \ +"']\+>+ \ contained \ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook " tag elements with syntax-folding. " NOTE: NO HIGHLIGHTING -- highlighting is done by contained elements " " PROVIDES: @xmlRegionHook " " EXAMPLE: " " " " " " some data " " syn region xmlRegion \ start=+<\z([^ /!?<>"']\+\)+ \ skip=++ \ end=++ \ matchgroup=xmlEndTag end=+/>+ \ fold \ contains=xmlTag,xmlEndTag,xmlCdata,xmlRegion,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook,@Spell \ keepend \ extend else " no syntax folding: " - contained attribute removed " - xmlRegion not defined " syn region xmlTag \ matchgroup=xmlTag start=+<[^ /!?<>"']\@=+ \ matchgroup=xmlTag end=+>+ \ contains=xmlError,xmlTagName,xmlAttrib,xmlEqual,xmlString,@xmlStartTagHook syn match xmlEndTag \ +"']\+>+ \ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook endif " &entities; compare with dtd syn match xmlEntity "&[^; \t]*;" contains=xmlEntityPunct syn match xmlEntityPunct contained "[&.;]" if exists('g:xml_syntax_folding') " The real comments (this implements the comments as defined by xml, " but not all xml pages actually conform to it. Errors are flagged. syn region xmlComment \ start=++ \ contains=xmlCommentStart,xmlCommentError \ extend \ fold else " no syntax folding: " - fold attribute removed " syn region xmlComment \ start=++ \ contains=xmlCommentStart,xmlCommentError \ extend endif syn match xmlCommentStart contained "+ \ contains=xmlCdataStart,xmlCdataEnd,@xmlCdataHook,@Spell \ keepend \ extend " using the following line instead leads to corrupt folding at CDATA regions " syn match xmlCdata ++ contains=xmlCdataStart,xmlCdataEnd,@xmlCdataHook syn match xmlCdataStart ++ contained " Processing instructions " This allows "?>" inside strings -- good idea? syn region xmlProcessing matchgroup=xmlProcessingDelim start="" contains=xmlAttrib,xmlEqual,xmlString if exists('g:xml_syntax_folding') " DTD -- we use dtd.vim here syn region xmlDocType matchgroup=xmlDocTypeDecl \ start="" \ fold \ contains=xmlDocTypeKeyword,xmlInlineDTD,xmlString else " no syntax folding: " - fold attribute removed " syn region xmlDocType matchgroup=xmlDocTypeDecl \ start="" \ contains=xmlDocTypeKeyword,xmlInlineDTD,xmlString endif syn keyword xmlDocTypeKeyword contained DOCTYPE PUBLIC SYSTEM syn region xmlInlineDTD contained matchgroup=xmlDocTypeDecl start="\[" end="]" contains=@xmlDTD syn include @xmlDTD :p:h/dtd.vim unlet b:current_syntax " synchronizing " TODO !!! to be improved !!! syn sync match xmlSyncDT grouphere xmlDocType +\_.\(+ if exists('g:xml_syntax_folding') syn sync match xmlSync grouphere xmlRegion +\_.\(<[^ /!?<>"']\+\)\@=+ " syn sync match xmlSync grouphere xmlRegion "<[^ /!?<>"']*>" syn sync match xmlSync groupthere xmlRegion +"']\+>+ endif syn sync minlines=100 " The default highlighting. hi def link xmlTodo Todo hi def link xmlTag Function hi def link xmlTagName Function hi def link xmlEndTag Identifier if !exists("g:xml_namespace_transparent") hi def link xmlNamespace Tag endif hi def link xmlEntity Statement hi def link xmlEntityPunct Type hi def link xmlAttribPunct Comment hi def link xmlAttrib Type hi def link xmlString String hi def link xmlComment Comment hi def link xmlCommentStart xmlComment hi def link xmlCommentPart Comment hi def link xmlCommentError Error hi def link xmlError Error hi def link xmlProcessingDelim Comment hi def link xmlProcessing Type hi def link xmlCdata String hi def link xmlCdataCdata Statement hi def link xmlCdataStart Type hi def link xmlCdataEnd Type hi def link xmlDocTypeDecl Function hi def link xmlDocTypeKeyword Statement hi def link xmlInlineDTD Function let b:current_syntax = "xml" let &cpo = s:xml_cpo_save unlet s:xml_cpo_save " vim: ts=8 neovim-0.2.2/runtime/syntax/xmodmap.vim000066400000000000000000001326571320401574200202170ustar00rootroot00000000000000" Vim syntax file " Language: xmodmap(1) definition file " Previous Maintainer: Nikolai Weibull " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword xmodmapTodo contained TODO FIXME XXX NOTE syn region xmodmapComment display oneline start='^!' end='$' \ contains=xmodmapTodo,@Spell syn case ignore syn match xmodmapInt display '\<\d\+\>' syn match xmodmapHex display '\<0x\x\+\>' syn match xmodmapOctal display '\<0\o\+\>' syn match xmodmapOctalError display '\<0\o*[89]\d*' syn case match syn match xmodmapKeySym display '\<[A-Za-z]\>' " #include syn keyword xmodmapKeySym XK_VoidSymbol XK_BackSpace XK_Tab XK_Linefeed \ XK_Clear XK_Return XK_Pause XK_Scroll_Lock \ XK_Sys_Req XK_Escape XK_Delete XK_Multi_key \ XK_Codeinput XK_SingleCandidate \ XK_MultipleCandidate XK_PreviousCandidate \ XK_Kanji XK_Muhenkan XK_Henkan_Mode \ XK_Henkan XK_Romaji XK_Hiragana XK_Katakana \ XK_Hiragana_Katakana XK_Zenkaku XK_Hankaku \ XK_Zenkaku_Hankaku XK_Touroku XK_Massyo \ XK_Kana_Lock XK_Kana_Shift XK_Eisu_Shift \ XK_Eisu_toggle XK_Kanji_Bangou XK_Zen_Koho \ XK_Mae_Koho XK_Home XK_Left XK_Up XK_Right \ XK_Down XK_Prior XK_Page_Up XK_Next \ XK_Page_Down XK_End XK_Begin XK_Select \ XK_Print XK_Execute XK_Insert XK_Undo XK_Redo \ XK_Menu XK_Find XK_Cancel XK_Help XK_Break \ XK_Mode_switch XK_script_switch XK_Num_Lock \ XK_KP_Space XK_KP_Tab XK_KP_Enter XK_KP_F1 \ XK_KP_F2 XK_KP_F3 XK_KP_F4 XK_KP_Home \ XK_KP_Left XK_KP_Up XK_KP_Right XK_KP_Down \ XK_KP_Prior XK_KP_Page_Up XK_KP_Next \ XK_KP_Page_Down XK_KP_End XK_KP_Begin \ XK_KP_Insert XK_KP_Delete XK_KP_Equal \ XK_KP_Multiply XK_KP_Add XK_KP_Separator \ XK_KP_Subtract XK_KP_Decimal XK_KP_Divide \ XK_KP_0 XK_KP_1 XK_KP_2 XK_KP_3 XK_KP_4 \ XK_KP_5 XK_KP_6 XK_KP_7 XK_KP_8 XK_KP_9 XK_F1 \ XK_F2 XK_F3 XK_F4 XK_F5 XK_F6 XK_F7 XK_F8 \ XK_F9 XK_F10 XK_F11 XK_L1 XK_F12 XK_L2 XK_F13 \ XK_L3 XK_F14 XK_L4 XK_F15 XK_L5 XK_F16 XK_L6 \ XK_F17 XK_L7 XK_F18 XK_L8 XK_F19 XK_L9 XK_F20 \ XK_L10 XK_F21 XK_R1 XK_F22 XK_R2 XK_F23 \ XK_R3 XK_F24 XK_R4 XK_F25 XK_R5 XK_F26 \ XK_R6 XK_F27 XK_R7 XK_F28 XK_R8 XK_F29 \ XK_R9 XK_F30 XK_R10 XK_F31 XK_R11 XK_F32 \ XK_R12 XK_F33 XK_R13 XK_F34 XK_R14 XK_F35 \ XK_R15 XK_Shift_L XK_Shift_R XK_Control_L \ XK_Control_R XK_Caps_Lock XK_Shift_Lock \ XK_Meta_L XK_Meta_R XK_Alt_L XK_Alt_R \ XK_Super_L XK_Super_R XK_Hyper_L XK_Hyper_R \ XK_dead_hook XK_dead_horn XK_3270_Duplicate \ XK_3270_FieldMark XK_3270_Right2 XK_3270_Left2 \ XK_3270_BackTab XK_3270_EraseEOF \ XK_3270_EraseInput XK_3270_Reset \ XK_3270_Quit XK_3270_PA1 XK_3270_PA2 \ XK_3270_PA3 XK_3270_Test XK_3270_Attn \ XK_3270_CursorBlink XK_3270_AltCursor \ XK_3270_KeyClick XK_3270_Jump \ XK_3270_Ident XK_3270_Rule XK_3270_Copy \ XK_3270_Play XK_3270_Setup XK_3270_Record \ XK_3270_ChangeScreen XK_3270_DeleteWord \ XK_3270_ExSelect XK_3270_CursorSelect \ XK_3270_PrintScreen XK_3270_Enter XK_space \ XK_exclam XK_quotedbl XK_numbersign XK_dollar \ XK_percent XK_ampersand XK_apostrophe \ XK_quoteright XK_parenleft XK_parenright \ XK_asterisk XK_plus XK_comma XK_minus \ XK_period XK_slash XK_0 XK_1 XK_2 XK_3 \ XK_4 XK_5 XK_6 XK_7 XK_8 XK_9 XK_colon \ XK_semicolon XK_less XK_equal XK_greater \ XK_question XK_at XK_A XK_B XK_C XK_D XK_E \ XK_F XK_G XK_H XK_I XK_J XK_K XK_L XK_M XK_N \ XK_O XK_P XK_Q XK_R XK_S XK_T XK_U XK_V XK_W \ XK_X XK_Y XK_Z XK_bracketleft XK_backslash \ XK_bracketright XK_asciicircum XK_underscore \ XK_grave XK_quoteleft XK_a XK_b XK_c XK_d \ XK_e XK_f XK_g XK_h XK_i XK_j XK_k XK_l \ XK_m XK_n XK_o XK_p XK_q XK_r XK_s XK_t XK_u \ XK_v XK_w XK_x XK_y XK_z XK_braceleft XK_bar \ XK_braceright XK_asciitilde XK_nobreakspace \ XK_exclamdown XK_cent XK_sterling XK_currency \ XK_yen XK_brokenbar XK_section XK_diaeresis \ XK_copyright XK_ordfeminine XK_guillemotleft \ XK_notsign XK_hyphen XK_registered XK_macron \ XK_degree XK_plusminus XK_twosuperior \ XK_threesuperior XK_acute XK_mu XK_paragraph \ XK_periodcentered XK_cedilla XK_onesuperior \ XK_masculine XK_guillemotright XK_onequarter \ XK_onehalf XK_threequarters XK_questiondown \ XK_Agrave XK_Aacute XK_Acircumflex XK_Atilde \ XK_Adiaeresis XK_Aring XK_AE XK_Ccedilla \ XK_Egrave XK_Eacute XK_Ecircumflex \ XK_Ediaeresis XK_Igrave XK_Iacute \ XK_Icircumflex XK_Idiaeresis XK_ETH XK_Eth \ XK_Ntilde XK_Ograve XK_Oacute XK_Ocircumflex \ XK_Otilde XK_Odiaeresis XK_multiply \ XK_Ooblique XK_Ugrave XK_Uacute XK_Ucircumflex \ XK_Udiaeresis XK_Yacute XK_THORN XK_Thorn \ XK_ssharp XK_agrave XK_aacute XK_acircumflex \ XK_atilde XK_adiaeresis XK_aring XK_ae \ XK_ccedilla XK_egrave XK_eacute XK_ecircumflex \ XK_ediaeresis XK_igrave XK_iacute \ XK_icircumflex XK_idiaeresis XK_eth XK_ntilde \ XK_ograve XK_oacute XK_ocircumflex XK_otilde \ XK_odiaeresis XK_division XK_oslash XK_ugrave \ XK_uacute XK_ucircumflex XK_udiaeresis \ XK_yacute XK_thorn XK_ydiaeresis XK_Aogonek \ XK_breve XK_Lstroke XK_Lcaron XK_Sacute \ XK_Scaron XK_Scedilla XK_Tcaron XK_Zacute \ XK_Zcaron XK_Zabovedot XK_aogonek XK_ogonek \ XK_lstroke XK_lcaron XK_sacute XK_caron \ XK_scaron XK_scedilla XK_tcaron XK_zacute \ XK_doubleacute XK_zcaron XK_zabovedot \ XK_Racute XK_Abreve XK_Lacute XK_Cacute \ XK_Ccaron XK_Eogonek XK_Ecaron XK_Dcaron \ XK_Dstroke XK_Nacute XK_Ncaron XK_Odoubleacute \ XK_Rcaron XK_Uring XK_Udoubleacute \ XK_Tcedilla XK_racute XK_abreve XK_lacute \ XK_cacute XK_ccaron XK_eogonek XK_ecaron \ XK_dcaron XK_dstroke XK_nacute XK_ncaron \ XK_odoubleacute XK_udoubleacute XK_rcaron \ XK_uring XK_tcedilla XK_abovedot XK_Hstroke \ XK_Hcircumflex XK_Iabovedot XK_Gbreve \ XK_Jcircumflex XK_hstroke XK_hcircumflex \ XK_idotless XK_gbreve XK_jcircumflex \ XK_Cabovedot XK_Ccircumflex XK_Gabovedot \ XK_Gcircumflex XK_Ubreve XK_Scircumflex \ XK_cabovedot XK_ccircumflex XK_gabovedot \ XK_gcircumflex XK_ubreve XK_scircumflex XK_kra \ XK_kappa XK_Rcedilla XK_Itilde XK_Lcedilla \ XK_Emacron XK_Gcedilla XK_Tslash XK_rcedilla \ XK_itilde XK_lcedilla XK_emacron XK_gcedilla \ XK_tslash XK_ENG XK_eng XK_Amacron XK_Iogonek \ XK_Eabovedot XK_Imacron XK_Ncedilla XK_Omacron \ XK_Kcedilla XK_Uogonek XK_Utilde XK_Umacron \ XK_amacron XK_iogonek XK_eabovedot XK_imacron \ XK_ncedilla XK_omacron XK_kcedilla XK_uogonek \ XK_utilde XK_umacron XK_Babovedot XK_babovedot \ XK_Dabovedot XK_Wgrave XK_Wacute XK_dabovedot \ XK_Ygrave XK_Fabovedot XK_fabovedot \ XK_Mabovedot XK_mabovedot XK_Pabovedot \ XK_wgrave XK_pabovedot XK_wacute XK_Sabovedot \ XK_ygrave XK_Wdiaeresis XK_wdiaeresis \ XK_sabovedot XK_Wcircumflex XK_Tabovedot \ XK_Ycircumflex XK_wcircumflex \ XK_tabovedot XK_ycircumflex XK_OE XK_oe \ XK_Ydiaeresis XK_overline XK_kana_fullstop \ XK_kana_openingbracket XK_kana_closingbracket \ XK_kana_comma XK_kana_conjunctive \ XK_kana_middledot XK_kana_WO XK_kana_a \ XK_kana_i XK_kana_u XK_kana_e XK_kana_o \ XK_kana_ya XK_kana_yu XK_kana_yo \ XK_kana_tsu XK_kana_tu XK_prolongedsound \ XK_kana_A XK_kana_I XK_kana_U XK_kana_E \ XK_kana_O XK_kana_KA XK_kana_KI XK_kana_KU \ XK_kana_KE XK_kana_KO XK_kana_SA XK_kana_SHI \ XK_kana_SU XK_kana_SE XK_kana_SO XK_kana_TA \ XK_kana_CHI XK_kana_TI XK_kana_TSU \ XK_kana_TU XK_kana_TE XK_kana_TO XK_kana_NA \ XK_kana_NI XK_kana_NU XK_kana_NE XK_kana_NO \ XK_kana_HA XK_kana_HI XK_kana_FU XK_kana_HU \ XK_kana_HE XK_kana_HO XK_kana_MA XK_kana_MI \ XK_kana_MU XK_kana_ME XK_kana_MO XK_kana_YA \ XK_kana_YU XK_kana_YO XK_kana_RA XK_kana_RI \ XK_kana_RU XK_kana_RE XK_kana_RO XK_kana_WA \ XK_kana_N XK_voicedsound XK_semivoicedsound \ XK_kana_switch XK_Farsi_0 XK_Farsi_1 \ XK_Farsi_2 XK_Farsi_3 XK_Farsi_4 XK_Farsi_5 \ XK_Farsi_6 XK_Farsi_7 XK_Farsi_8 XK_Farsi_9 \ XK_Arabic_percent XK_Arabic_superscript_alef \ XK_Arabic_tteh XK_Arabic_peh XK_Arabic_tcheh \ XK_Arabic_ddal XK_Arabic_rreh XK_Arabic_comma \ XK_Arabic_fullstop XK_Arabic_0 XK_Arabic_1 \ XK_Arabic_2 XK_Arabic_3 XK_Arabic_4 \ XK_Arabic_5 XK_Arabic_6 XK_Arabic_7 \ XK_Arabic_8 XK_Arabic_9 XK_Arabic_semicolon \ XK_Arabic_question_mark XK_Arabic_hamza \ XK_Arabic_maddaonalef XK_Arabic_hamzaonalef \ XK_Arabic_hamzaonwaw XK_Arabic_hamzaunderalef \ XK_Arabic_hamzaonyeh XK_Arabic_alef \ XK_Arabic_beh XK_Arabic_tehmarbuta \ XK_Arabic_teh XK_Arabic_theh XK_Arabic_jeem \ XK_Arabic_hah XK_Arabic_khah XK_Arabic_dal \ XK_Arabic_thal XK_Arabic_ra XK_Arabic_zain \ XK_Arabic_seen XK_Arabic_sheen \ XK_Arabic_sad XK_Arabic_dad XK_Arabic_tah \ XK_Arabic_zah XK_Arabic_ain XK_Arabic_ghain \ XK_Arabic_tatweel XK_Arabic_feh XK_Arabic_qaf \ XK_Arabic_kaf XK_Arabic_lam XK_Arabic_meem \ XK_Arabic_noon XK_Arabic_ha XK_Arabic_heh \ XK_Arabic_waw XK_Arabic_alefmaksura \ XK_Arabic_yeh XK_Arabic_fathatan \ XK_Arabic_dammatan XK_Arabic_kasratan \ XK_Arabic_fatha XK_Arabic_damma \ XK_Arabic_kasra XK_Arabic_shadda \ XK_Arabic_sukun XK_Arabic_madda_above \ XK_Arabic_hamza_above XK_Arabic_hamza_below \ XK_Arabic_jeh XK_Arabic_veh XK_Arabic_keheh \ XK_Arabic_gaf XK_Arabic_noon_ghunna \ XK_Arabic_heh_doachashmee XK_Farsi_yeh \ XK_Arabic_yeh_baree XK_Arabic_heh_goal \ XK_Arabic_switch XK_Cyrillic_GHE_bar \ XK_Cyrillic_ghe_bar XK_Cyrillic_ZHE_descender \ XK_Cyrillic_zhe_descender \ XK_Cyrillic_KA_descender \ XK_Cyrillic_ka_descender \ XK_Cyrillic_KA_vertstroke \ XK_Cyrillic_ka_vertstroke \ XK_Cyrillic_EN_descender \ XK_Cyrillic_en_descender \ XK_Cyrillic_U_straight XK_Cyrillic_u_straight \ XK_Cyrillic_U_straight_bar \ XK_Cyrillic_u_straight_bar \ XK_Cyrillic_HA_descender \ XK_Cyrillic_ha_descender \ XK_Cyrillic_CHE_descender \ XK_Cyrillic_che_descender \ XK_Cyrillic_CHE_vertstroke \ XK_Cyrillic_che_vertstroke XK_Cyrillic_SHHA \ XK_Cyrillic_shha XK_Cyrillic_SCHWA \ XK_Cyrillic_schwa XK_Cyrillic_I_macron \ XK_Cyrillic_i_macron XK_Cyrillic_O_bar \ XK_Cyrillic_o_bar XK_Cyrillic_U_macron \ XK_Cyrillic_u_macron XK_Serbian_dje \ XK_Macedonia_gje XK_Cyrillic_io \ XK_Ukrainian_ie XK_Ukranian_je \ XK_Macedonia_dse XK_Ukrainian_i XK_Ukranian_i \ XK_Ukrainian_yi XK_Ukranian_yi XK_Cyrillic_je \ XK_Serbian_je XK_Cyrillic_lje XK_Serbian_lje \ XK_Cyrillic_nje XK_Serbian_nje XK_Serbian_tshe \ XK_Macedonia_kje XK_Ukrainian_ghe_with_upturn \ XK_Byelorussian_shortu XK_Cyrillic_dzhe \ XK_Serbian_dze XK_numerosign \ XK_Serbian_DJE XK_Macedonia_GJE \ XK_Cyrillic_IO XK_Ukrainian_IE XK_Ukranian_JE \ XK_Macedonia_DSE XK_Ukrainian_I XK_Ukranian_I \ XK_Ukrainian_YI XK_Ukranian_YI XK_Cyrillic_JE \ XK_Serbian_JE XK_Cyrillic_LJE XK_Serbian_LJE \ XK_Cyrillic_NJE XK_Serbian_NJE XK_Serbian_TSHE \ XK_Macedonia_KJE XK_Ukrainian_GHE_WITH_UPTURN \ XK_Byelorussian_SHORTU XK_Cyrillic_DZHE \ XK_Serbian_DZE XK_Cyrillic_yu \ XK_Cyrillic_a XK_Cyrillic_be XK_Cyrillic_tse \ XK_Cyrillic_de XK_Cyrillic_ie XK_Cyrillic_ef \ XK_Cyrillic_ghe XK_Cyrillic_ha XK_Cyrillic_i \ XK_Cyrillic_shorti XK_Cyrillic_ka \ XK_Cyrillic_el XK_Cyrillic_em XK_Cyrillic_en \ XK_Cyrillic_o XK_Cyrillic_pe XK_Cyrillic_ya \ XK_Cyrillic_er XK_Cyrillic_es XK_Cyrillic_te \ XK_Cyrillic_u XK_Cyrillic_zhe XK_Cyrillic_ve \ XK_Cyrillic_softsign XK_Cyrillic_yeru \ XK_Cyrillic_ze XK_Cyrillic_sha XK_Cyrillic_e \ XK_Cyrillic_shcha XK_Cyrillic_che \ XK_Cyrillic_hardsign XK_Cyrillic_YU \ XK_Cyrillic_A XK_Cyrillic_BE XK_Cyrillic_TSE \ XK_Cyrillic_DE XK_Cyrillic_IE XK_Cyrillic_EF \ XK_Cyrillic_GHE XK_Cyrillic_HA XK_Cyrillic_I \ XK_Cyrillic_SHORTI XK_Cyrillic_KA \ XK_Cyrillic_EL XK_Cyrillic_EM XK_Cyrillic_EN \ XK_Cyrillic_O XK_Cyrillic_PE XK_Cyrillic_YA \ XK_Cyrillic_ER XK_Cyrillic_ES XK_Cyrillic_TE \ XK_Cyrillic_U XK_Cyrillic_ZHE XK_Cyrillic_VE \ XK_Cyrillic_SOFTSIGN XK_Cyrillic_YERU \ XK_Cyrillic_ZE XK_Cyrillic_SHA XK_Cyrillic_E \ XK_Cyrillic_SHCHA XK_Cyrillic_CHE \ XK_Cyrillic_HARDSIGN XK_Greek_ALPHAaccent \ XK_Greek_EPSILONaccent XK_Greek_ETAaccent \ XK_Greek_IOTAaccent XK_Greek_IOTAdieresis \ XK_Greek_OMICRONaccent XK_Greek_UPSILONaccent \ XK_Greek_UPSILONdieresis \ XK_Greek_OMEGAaccent XK_Greek_accentdieresis \ XK_Greek_horizbar XK_Greek_alphaaccent \ XK_Greek_epsilonaccent XK_Greek_etaaccent \ XK_Greek_iotaaccent XK_Greek_iotadieresis \ XK_Greek_iotaaccentdieresis \ XK_Greek_omicronaccent XK_Greek_upsilonaccent \ XK_Greek_upsilondieresis \ XK_Greek_upsilonaccentdieresis \ XK_Greek_omegaaccent XK_Greek_ALPHA \ XK_Greek_BETA XK_Greek_GAMMA XK_Greek_DELTA \ XK_Greek_EPSILON XK_Greek_ZETA XK_Greek_ETA \ XK_Greek_THETA XK_Greek_IOTA XK_Greek_KAPPA \ XK_Greek_LAMDA XK_Greek_LAMBDA XK_Greek_MU \ XK_Greek_NU XK_Greek_XI XK_Greek_OMICRON \ XK_Greek_PI XK_Greek_RHO XK_Greek_SIGMA \ XK_Greek_TAU XK_Greek_UPSILON XK_Greek_PHI \ XK_Greek_CHI XK_Greek_PSI XK_Greek_OMEGA \ XK_Greek_alpha XK_Greek_beta XK_Greek_gamma \ XK_Greek_delta XK_Greek_epsilon XK_Greek_zeta \ XK_Greek_eta XK_Greek_theta XK_Greek_iota \ XK_Greek_kappa XK_Greek_lamda XK_Greek_lambda \ XK_Greek_mu XK_Greek_nu XK_Greek_xi \ XK_Greek_omicron XK_Greek_pi XK_Greek_rho \ XK_Greek_sigma XK_Greek_finalsmallsigma \ XK_Greek_tau XK_Greek_upsilon XK_Greek_phi \ XK_Greek_chi XK_Greek_psi XK_Greek_omega \ XK_Greek_switch XK_leftradical \ XK_topleftradical XK_horizconnector \ XK_topintegral XK_botintegral \ XK_vertconnector XK_topleftsqbracket \ XK_botleftsqbracket XK_toprightsqbracket \ XK_botrightsqbracket XK_topleftparens \ XK_botleftparens XK_toprightparens \ XK_botrightparens XK_leftmiddlecurlybrace \ XK_rightmiddlecurlybrace \ XK_topleftsummation XK_botleftsummation \ XK_topvertsummationconnector \ XK_botvertsummationconnector \ XK_toprightsummation XK_botrightsummation \ XK_rightmiddlesummation XK_lessthanequal \ XK_notequal XK_greaterthanequal XK_integral \ XK_therefore XK_variation XK_infinity \ XK_nabla XK_approximate XK_similarequal \ XK_ifonlyif XK_implies XK_identical XK_radical \ XK_includedin XK_includes XK_intersection \ XK_union XK_logicaland XK_logicalor \ XK_partialderivative XK_function XK_leftarrow \ XK_uparrow XK_rightarrow XK_downarrow XK_blank \ XK_soliddiamond XK_checkerboard XK_ht XK_ff \ XK_cr XK_lf XK_nl XK_vt XK_lowrightcorner \ XK_uprightcorner XK_upleftcorner \ XK_lowleftcorner XK_crossinglines \ XK_horizlinescan1 XK_horizlinescan3 \ XK_horizlinescan5 XK_horizlinescan7 \ XK_horizlinescan9 XK_leftt XK_rightt XK_bott \ XK_topt XK_vertbar XK_emspace XK_enspace \ XK_em3space XK_em4space XK_digitspace \ XK_punctspace XK_thinspace XK_hairspace \ XK_emdash XK_endash XK_signifblank XK_ellipsis \ XK_doubbaselinedot XK_onethird XK_twothirds \ XK_onefifth XK_twofifths XK_threefifths \ XK_fourfifths XK_onesixth XK_fivesixths \ XK_careof XK_figdash XK_leftanglebracket \ XK_decimalpoint XK_rightanglebracket \ XK_marker XK_oneeighth XK_threeeighths \ XK_fiveeighths XK_seveneighths XK_trademark \ XK_signaturemark XK_trademarkincircle \ XK_leftopentriangle XK_rightopentriangle \ XK_emopencircle XK_emopenrectangle \ XK_leftsinglequotemark XK_rightsinglequotemark \ XK_leftdoublequotemark XK_rightdoublequotemark \ XK_prescription XK_minutes XK_seconds \ XK_latincross XK_hexagram XK_filledrectbullet \ XK_filledlefttribullet XK_filledrighttribullet \ XK_emfilledcircle XK_emfilledrect \ XK_enopencircbullet XK_enopensquarebullet \ XK_openrectbullet XK_opentribulletup \ XK_opentribulletdown XK_openstar \ XK_enfilledcircbullet XK_enfilledsqbullet \ XK_filledtribulletup XK_filledtribulletdown \ XK_leftpointer XK_rightpointer XK_club \ XK_diamond XK_heart XK_maltesecross \ XK_dagger XK_doubledagger XK_checkmark \ XK_ballotcross XK_musicalsharp XK_musicalflat \ XK_malesymbol XK_femalesymbol XK_telephone \ XK_telephonerecorder XK_phonographcopyright \ XK_caret XK_singlelowquotemark \ XK_doublelowquotemark XK_cursor \ XK_leftcaret XK_rightcaret XK_downcaret \ XK_upcaret XK_overbar XK_downtack XK_upshoe \ XK_downstile XK_underbar XK_jot XK_quad \ XK_uptack XK_circle XK_upstile XK_downshoe \ XK_rightshoe XK_leftshoe XK_lefttack \ XK_righttack XK_hebrew_doublelowline \ XK_hebrew_aleph XK_hebrew_bet XK_hebrew_beth \ XK_hebrew_gimel XK_hebrew_gimmel \ XK_hebrew_dalet XK_hebrew_daleth \ XK_hebrew_he XK_hebrew_waw XK_hebrew_zain \ XK_hebrew_zayin XK_hebrew_chet XK_hebrew_het \ XK_hebrew_tet XK_hebrew_teth XK_hebrew_yod \ XK_hebrew_finalkaph XK_hebrew_kaph \ XK_hebrew_lamed XK_hebrew_finalmem \ XK_hebrew_mem XK_hebrew_finalnun XK_hebrew_nun \ XK_hebrew_samech XK_hebrew_samekh \ XK_hebrew_ayin XK_hebrew_finalpe XK_hebrew_pe \ XK_hebrew_finalzade XK_hebrew_finalzadi \ XK_hebrew_zade XK_hebrew_zadi XK_hebrew_qoph \ XK_hebrew_kuf XK_hebrew_resh XK_hebrew_shin \ XK_hebrew_taw XK_hebrew_taf XK_Hebrew_switch \ XK_Thai_kokai XK_Thai_khokhai XK_Thai_khokhuat \ XK_Thai_khokhwai XK_Thai_khokhon \ XK_Thai_khorakhang XK_Thai_ngongu \ XK_Thai_chochan XK_Thai_choching \ XK_Thai_chochang XK_Thai_soso XK_Thai_chochoe \ XK_Thai_yoying XK_Thai_dochada XK_Thai_topatak \ XK_Thai_thothan XK_Thai_thonangmontho \ XK_Thai_thophuthao XK_Thai_nonen \ XK_Thai_dodek XK_Thai_totao XK_Thai_thothung \ XK_Thai_thothahan XK_Thai_thothong \ XK_Thai_nonu XK_Thai_bobaimai XK_Thai_popla \ XK_Thai_phophung XK_Thai_fofa XK_Thai_phophan \ XK_Thai_fofan XK_Thai_phosamphao XK_Thai_moma \ XK_Thai_yoyak XK_Thai_rorua XK_Thai_ru \ XK_Thai_loling XK_Thai_lu XK_Thai_wowaen \ XK_Thai_sosala XK_Thai_sorusi XK_Thai_sosua \ XK_Thai_hohip XK_Thai_lochula XK_Thai_oang \ XK_Thai_honokhuk XK_Thai_paiyannoi \ XK_Thai_saraa XK_Thai_maihanakat \ XK_Thai_saraaa XK_Thai_saraam XK_Thai_sarai \ XK_Thai_saraii XK_Thai_saraue XK_Thai_sarauee \ XK_Thai_sarau XK_Thai_sarauu XK_Thai_phinthu \ XK_Thai_maihanakat_maitho XK_Thai_baht \ XK_Thai_sarae XK_Thai_saraae XK_Thai_sarao \ XK_Thai_saraaimaimuan XK_Thai_saraaimaimalai \ XK_Thai_lakkhangyao XK_Thai_maiyamok \ XK_Thai_maitaikhu XK_Thai_maiek XK_Thai_maitho \ XK_Thai_maitri XK_Thai_maichattawa \ XK_Thai_thanthakhat XK_Thai_nikhahit \ XK_Thai_leksun XK_Thai_leknung XK_Thai_leksong \ XK_Thai_leksam XK_Thai_leksi XK_Thai_lekha \ XK_Thai_lekhok XK_Thai_lekchet XK_Thai_lekpaet \ XK_Thai_lekkao XK_Hangul XK_Hangul_Start \ XK_Hangul_End XK_Hangul_Hanja XK_Hangul_Jamo \ XK_Hangul_Romaja XK_Hangul_Codeinput \ XK_Hangul_Jeonja XK_Hangul_Banja \ XK_Hangul_PreHanja XK_Hangul_PostHanja \ XK_Hangul_SingleCandidate \ XK_Hangul_MultipleCandidate \ XK_Hangul_PreviousCandidate XK_Hangul_Special \ XK_Hangul_switch XK_Hangul_Kiyeog \ XK_Hangul_SsangKiyeog XK_Hangul_KiyeogSios \ XK_Hangul_Nieun XK_Hangul_NieunJieuj \ XK_Hangul_NieunHieuh XK_Hangul_Dikeud \ XK_Hangul_SsangDikeud XK_Hangul_Rieul \ XK_Hangul_RieulKiyeog XK_Hangul_RieulMieum \ XK_Hangul_RieulPieub XK_Hangul_RieulSios \ XK_Hangul_RieulTieut XK_Hangul_RieulPhieuf \ XK_Hangul_RieulHieuh XK_Hangul_Mieum \ XK_Hangul_Pieub XK_Hangul_SsangPieub \ XK_Hangul_PieubSios XK_Hangul_Sios \ XK_Hangul_SsangSios XK_Hangul_Ieung \ XK_Hangul_Jieuj XK_Hangul_SsangJieuj \ XK_Hangul_Cieuc XK_Hangul_Khieuq \ XK_Hangul_Tieut XK_Hangul_Phieuf \ XK_Hangul_Hieuh XK_Hangul_A XK_Hangul_AE \ XK_Hangul_YA XK_Hangul_YAE XK_Hangul_EO \ XK_Hangul_E XK_Hangul_YEO XK_Hangul_YE \ XK_Hangul_O XK_Hangul_WA XK_Hangul_WAE \ XK_Hangul_OE XK_Hangul_YO XK_Hangul_U \ XK_Hangul_WEO XK_Hangul_WE XK_Hangul_WI \ XK_Hangul_YU XK_Hangul_EU XK_Hangul_YI \ XK_Hangul_I XK_Hangul_J_Kiyeog \ XK_Hangul_J_SsangKiyeog XK_Hangul_J_KiyeogSios \ XK_Hangul_J_Nieun XK_Hangul_J_NieunJieuj \ XK_Hangul_J_NieunHieuh XK_Hangul_J_Dikeud \ XK_Hangul_J_Rieul XK_Hangul_J_RieulKiyeog \ XK_Hangul_J_RieulMieum XK_Hangul_J_RieulPieub \ XK_Hangul_J_RieulSios XK_Hangul_J_RieulTieut \ XK_Hangul_J_RieulPhieuf XK_Hangul_J_RieulHieuh \ XK_Hangul_J_Mieum XK_Hangul_J_Pieub \ XK_Hangul_J_PieubSios XK_Hangul_J_Sios \ XK_Hangul_J_SsangSios XK_Hangul_J_Ieung \ XK_Hangul_J_Jieuj XK_Hangul_J_Cieuc \ XK_Hangul_J_Khieuq XK_Hangul_J_Tieut \ XK_Hangul_J_Phieuf XK_Hangul_J_Hieuh \ XK_Hangul_RieulYeorinHieuh \ XK_Hangul_SunkyeongeumMieum \ XK_Hangul_SunkyeongeumPieub XK_Hangul_PanSios \ XK_Hangul_KkogjiDalrinIeung \ XK_Hangul_SunkyeongeumPhieuf \ XK_Hangul_YeorinHieuh XK_Hangul_AraeA \ XK_Hangul_AraeAE XK_Hangul_J_PanSios \ XK_Hangul_J_KkogjiDalrinIeung \ XK_Hangul_J_YeorinHieuh XK_Korean_Won \ XK_Armenian_eternity XK_Armenian_ligature_ew \ XK_Armenian_full_stop XK_Armenian_verjaket \ XK_Armenian_parenright XK_Armenian_parenleft \ XK_Armenian_guillemotright \ XK_Armenian_guillemotleft XK_Armenian_em_dash \ XK_Armenian_dot XK_Armenian_mijaket \ XK_Armenian_separation_mark XK_Armenian_but \ XK_Armenian_comma XK_Armenian_en_dash \ XK_Armenian_hyphen XK_Armenian_yentamna \ XK_Armenian_ellipsis XK_Armenian_exclam \ XK_Armenian_amanak XK_Armenian_accent \ XK_Armenian_shesht XK_Armenian_question \ XK_Armenian_paruyk XK_Armenian_AYB \ XK_Armenian_ayb XK_Armenian_BEN \ XK_Armenian_ben XK_Armenian_GIM \ XK_Armenian_gim XK_Armenian_DA XK_Armenian_da \ XK_Armenian_YECH XK_Armenian_yech \ XK_Armenian_ZA XK_Armenian_za XK_Armenian_E \ XK_Armenian_e XK_Armenian_AT XK_Armenian_at \ XK_Armenian_TO XK_Armenian_to \ XK_Armenian_ZHE XK_Armenian_zhe \ XK_Armenian_INI XK_Armenian_ini \ XK_Armenian_LYUN XK_Armenian_lyun \ XK_Armenian_KHE XK_Armenian_khe \ XK_Armenian_TSA XK_Armenian_tsa \ XK_Armenian_KEN XK_Armenian_ken XK_Armenian_HO \ XK_Armenian_ho XK_Armenian_DZA XK_Armenian_dza \ XK_Armenian_GHAT XK_Armenian_ghat \ XK_Armenian_TCHE XK_Armenian_tche \ XK_Armenian_MEN XK_Armenian_men XK_Armenian_HI \ XK_Armenian_hi XK_Armenian_NU XK_Armenian_nu \ XK_Armenian_SHA XK_Armenian_sha XK_Armenian_VO \ XK_Armenian_vo XK_Armenian_CHA XK_Armenian_cha \ XK_Armenian_PE XK_Armenian_pe XK_Armenian_JE \ XK_Armenian_je XK_Armenian_RA XK_Armenian_ra \ XK_Armenian_SE XK_Armenian_se XK_Armenian_VEV \ XK_Armenian_vev XK_Armenian_TYUN \ XK_Armenian_tyun XK_Armenian_RE \ XK_Armenian_re XK_Armenian_TSO \ XK_Armenian_tso XK_Armenian_VYUN \ XK_Armenian_vyun XK_Armenian_PYUR \ XK_Armenian_pyur XK_Armenian_KE XK_Armenian_ke \ XK_Armenian_O XK_Armenian_o XK_Armenian_FE \ XK_Armenian_fe XK_Armenian_apostrophe \ XK_Armenian_section_sign XK_Georgian_an \ XK_Georgian_ban XK_Georgian_gan \ XK_Georgian_don XK_Georgian_en XK_Georgian_vin \ XK_Georgian_zen XK_Georgian_tan \ XK_Georgian_in XK_Georgian_kan XK_Georgian_las \ XK_Georgian_man XK_Georgian_nar XK_Georgian_on \ XK_Georgian_par XK_Georgian_zhar \ XK_Georgian_rae XK_Georgian_san \ XK_Georgian_tar XK_Georgian_un \ XK_Georgian_phar XK_Georgian_khar \ XK_Georgian_ghan XK_Georgian_qar \ XK_Georgian_shin XK_Georgian_chin \ XK_Georgian_can XK_Georgian_jil \ XK_Georgian_cil XK_Georgian_char \ XK_Georgian_xan XK_Georgian_jhan \ XK_Georgian_hae XK_Georgian_he XK_Georgian_hie \ XK_Georgian_we XK_Georgian_har XK_Georgian_hoe \ XK_Georgian_fi XK_Ccedillaabovedot \ XK_Xabovedot XK_Qabovedot XK_IE XK_UO \ XK_Zstroke XK_ccedillaabovedot XK_xabovedot \ XK_qabovedot XK_ie XK_uo XK_zstroke XK_SCHWA \ XK_schwa XK_Lbelowdot XK_Lstrokebelowdot \ XK_lbelowdot XK_lstrokebelowdot XK_Gtilde \ XK_gtilde XK_Abelowdot XK_abelowdot \ XK_Ahook XK_ahook XK_Acircumflexacute \ XK_acircumflexacute XK_Acircumflexgrave \ XK_acircumflexgrave XK_Acircumflexhook \ XK_acircumflexhook XK_Acircumflextilde \ XK_acircumflextilde XK_Acircumflexbelowdot \ XK_acircumflexbelowdot XK_Abreveacute \ XK_abreveacute XK_Abrevegrave XK_abrevegrave \ XK_Abrevehook XK_abrevehook XK_Abrevetilde \ XK_abrevetilde XK_Abrevebelowdot \ XK_abrevebelowdot XK_Ebelowdot XK_ebelowdot \ XK_Ehook XK_ehook XK_Etilde XK_etilde \ XK_Ecircumflexacute XK_ecircumflexacute \ XK_Ecircumflexgrave XK_ecircumflexgrave \ XK_Ecircumflexhook XK_ecircumflexhook \ XK_Ecircumflextilde XK_ecircumflextilde \ XK_Ecircumflexbelowdot XK_ecircumflexbelowdot \ XK_Ihook XK_ihook XK_Ibelowdot XK_ibelowdot \ XK_Obelowdot XK_obelowdot XK_Ohook XK_ohook \ XK_Ocircumflexacute XK_ocircumflexacute \ XK_Ocircumflexgrave XK_ocircumflexgrave \ XK_Ocircumflexhook XK_ocircumflexhook \ XK_Ocircumflextilde XK_ocircumflextilde \ XK_Ocircumflexbelowdot XK_ocircumflexbelowdot \ XK_Ohornacute XK_ohornacute XK_Ohorngrave \ XK_ohorngrave XK_Ohornhook XK_ohornhook \ XK_Ohorntilde XK_ohorntilde XK_Ohornbelowdot \ XK_ohornbelowdot XK_Ubelowdot XK_ubelowdot \ XK_Uhook XK_uhook XK_Uhornacute XK_uhornacute \ XK_Uhorngrave XK_uhorngrave XK_Uhornhook \ XK_uhornhook XK_Uhorntilde XK_uhorntilde \ XK_Uhornbelowdot XK_uhornbelowdot XK_Ybelowdot \ XK_ybelowdot XK_Yhook XK_yhook XK_Ytilde \ XK_ytilde XK_Ohorn XK_ohorn XK_Uhorn XK_uhorn \ XK_combining_tilde XK_combining_grave \ XK_combining_acute XK_combining_hook \ XK_combining_belowdot XK_EcuSign XK_ColonSign \ XK_CruzeiroSign XK_FFrancSign XK_LiraSign \ XK_MillSign XK_NairaSign XK_PesetaSign \ XK_RupeeSign XK_WonSign XK_NewSheqelSign \ XK_DongSign XK_EuroSign " #include syn keyword xmodmapKeySym SunXK_Sys_Req SunXK_Print_Screen SunXK_Compose \ SunXK_AltGraph SunXK_PageUp SunXK_PageDown \ SunXK_Undo SunXK_Again SunXK_Find SunXK_Stop \ SunXK_Props SunXK_Front SunXK_Copy SunXK_Open \ SunXK_Paste SunXK_Cut SunXK_PowerSwitch \ SunXK_AudioLowerVolume SunXK_AudioMute \ SunXK_AudioRaiseVolume SunXK_VideoDegauss \ SunXK_VideoLowerBrightness \ SunXK_VideoRaiseBrightness \ SunXK_PowerSwitchShift " #include syn keyword xmodmapKeySym XF86XK_ModeLock XF86XK_Standby \ XF86XK_AudioLowerVolume XF86XK_AudioMute \ XF86XK_AudioRaiseVolume XF86XK_AudioPlay \ XF86XK_AudioStop XF86XK_AudioPrev \ XF86XK_AudioNext XF86XK_HomePage \ XF86XK_Mail XF86XK_Start XF86XK_Search \ XF86XK_AudioRecord XF86XK_Calculator \ XF86XK_Memo XF86XK_ToDoList XF86XK_Calendar \ XF86XK_PowerDown XF86XK_ContrastAdjust \ XF86XK_RockerUp XF86XK_RockerDown \ XF86XK_RockerEnter XF86XK_Back XF86XK_Forward \ XF86XK_Stop XF86XK_Refresh XF86XK_PowerOff \ XF86XK_WakeUp XF86XK_Eject XF86XK_ScreenSaver \ XF86XK_WWW XF86XK_Sleep XF86XK_Favorites \ XF86XK_AudioPause XF86XK_AudioMedia \ XF86XK_MyComputer XF86XK_VendorHome \ XF86XK_LightBulb XF86XK_Shop XF86XK_History \ XF86XK_OpenURL XF86XK_AddFavorite \ XF86XK_HotLinks XF86XK_BrightnessAdjust \ XF86XK_Finance XF86XK_Community \ XF86XK_AudioRewind XF86XK_XF86BackForward \ XF86XK_Launch0 XF86XK_Launch1 XF86XK_Launch2 \ XF86XK_Launch3 XF86XK_Launch4 XF86XK_Launch5 \ XF86XK_Launch6 XF86XK_Launch7 XF86XK_Launch8 \ XF86XK_Launch9 XF86XK_LaunchA XF86XK_LaunchB \ XF86XK_LaunchC XF86XK_LaunchD XF86XK_LaunchE \ XF86XK_LaunchF XF86XK_ApplicationLeft \ XF86XK_ApplicationRight XF86XK_Book \ XF86XK_CD XF86XK_Calculater XF86XK_Clear \ XF86XK_Close XF86XK_Copy XF86XK_Cut \ XF86XK_Display XF86XK_DOS XF86XK_Documents \ XF86XK_Excel XF86XK_Explorer XF86XK_Game \ XF86XK_Go XF86XK_iTouch XF86XK_LogOff \ XF86XK_Market XF86XK_Meeting XF86XK_MenuKB \ XF86XK_MenuPB XF86XK_MySites XF86XK_New \ XF86XK_News XF86XK_OfficeHome XF86XK_Open \ XF86XK_Option XF86XK_Paste XF86XK_Phone \ XF86XK_Q XF86XK_Reply XF86XK_Reload \ XF86XK_RotateWindows XF86XK_RotationPB \ XF86XK_RotationKB XF86XK_Save XF86XK_ScrollUp \ XF86XK_ScrollDown XF86XK_ScrollClick \ XF86XK_Send XF86XK_Spell XF86XK_SplitScreen \ XF86XK_Support XF86XK_TaskPane XF86XK_Terminal \ XF86XK_Tools XF86XK_Travel XF86XK_UserPB \ XF86XK_User1KB XF86XK_User2KB XF86XK_Video \ XF86XK_WheelButton XF86XK_Word XF86XK_Xfer \ XF86XK_ZoomIn XF86XK_ZoomOut XF86XK_Away \ XF86XK_Messenger XF86XK_WebCam \ XF86XK_MailForward XF86XK_Pictures \ XF86XK_Music XF86XK_Switch_VT_1 \ XF86XK_Switch_VT_2 XF86XK_Switch_VT_3 \ XF86XK_Switch_VT_4 XF86XK_Switch_VT_5 \ XF86XK_Switch_VT_6 XF86XK_Switch_VT_7 \ XF86XK_Switch_VT_8 XF86XK_Switch_VT_9 \ XF86XK_Switch_VT_10 XF86XK_Switch_VT_11 \ XF86XK_Switch_VT_12 XF86XK_Ungrab \ XF86XK_ClearGrab XF86XK_Next_VMode \ XF86XK_Prev_VMode syn keyword xmodmapKeyword keycode keysym clear add remove pointer hi def link xmodmapComment Comment hi def link xmodmapTodo Todo hi def link xmodmapInt Number hi def link xmodmapHex Number hi def link xmodmapOctal Number hi def link xmodmapOctalError Error hi def link xmodmapKeySym Constant hi def link xmodmapKeyword Keyword let b:current_syntax = "xmodmap" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/syntax/xpm.vim000066400000000000000000000104631320401574200173440ustar00rootroot00000000000000" Vim syntax file " Language: X Pixmap " Maintainer: Ronald Schild " Last Change: 2017 Feb 01 " Version: 5.4n.1 " Jemma Nelson added termguicolors support " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn keyword xpmType char syn keyword xpmStorageClass static syn keyword xpmTodo TODO FIXME XXX contained syn region xpmComment start="/\*" end="\*/" contains=xpmTodo syn region xpmPixelString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@xpmColors if has("gui_running") || has("termguicolors") && &termguicolors let color = "" let chars = "" let colors = 0 let cpp = 0 let n = 0 let i = 1 while i <= line("$") " scanning all lines let s = matchstr(getline(i), '".\{-1,}"') if s != "" " does line contain a string? if n == 0 " first string is the Values string " get the 3rd value: colors = number of colors let colors = substitute(s, '"\s*\d\+\s\+\d\+\s\+\(\d\+\).*"', '\1', '') " get the 4th value: cpp = number of character per pixel let cpp = substitute(s, '"\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\d\+\).*"', '\1', '') if cpp =~ '[^0-9]' break " if cpp is not made of digits there must be something wrong endif " Highlight the Values string as normal string (no pixel string). " Only when there is no slash, it would terminate the pattern. if s !~ '/' exe 'syn match xpmValues /' . s . '/' endif hi link xpmValues String let n = 1 " n = color index elseif n <= colors " string is a color specification " get chars = length string representing the pixels " (first incl. the following whitespace) let chars = substitute(s, '"\(.\{'.cpp.'}\s\).*"', '\1', '') " now get color, first try 'c' key if any (color visual) let color = substitute(s, '".*\sc\s\+\(.\{-}\)\s*\(\(g4\=\|[ms]\)\s.*\)*\s*"', '\1', '') if color == s " no 'c' key, try 'g' key (grayscale with more than 4 levels) let color = substitute(s, '".*\sg\s\+\(.\{-}\)\s*\(\(g4\|[ms]\)\s.*\)*\s*"', '\1', '') if color == s " next try: 'g4' key (4-level grayscale) let color = substitute(s, '".*\sg4\s\+\(.\{-}\)\s*\([ms]\s.*\)*\s*"', '\1', '') if color == s " finally try 'm' key (mono visual) let color = substitute(s, '".*\sm\s\+\(.\{-}\)\s*\(s\s.*\)*\s*"', '\1', '') if color == s let color = "" endif endif endif endif " Vim cannot handle RGB codes with more than 6 hex digits if color =~ '#\x\{10,}$' let color = substitute(color, '\(\x\x\)\x\x', '\1', 'g') elseif color =~ '#\x\{7,}$' let color = substitute(color, '\(\x\x\)\x', '\1', 'g') " nor with 3 digits elseif color =~ '#\x\{3}$' let color = substitute(color, '\(\x\)\(\x\)\(\x\)', '0\10\20\3', '') endif " escape meta characters in patterns let s = escape(s, '/\*^$.~[]') let chars = escape(chars, '/\*^$.~[]') " now create syntax items " highlight the color string as normal string (no pixel string) exe 'syn match xpmCol'.n.'Def /'.s.'/ contains=xpmCol'.n.'inDef' exe 'hi link xpmCol'.n.'Def String' " but highlight the first whitespace after chars in its color exe 'syn match xpmCol'.n.'inDef /"'.chars.'/hs=s+'.(cpp+1).' contained' exe 'hi link xpmCol'.n.'inDef xpmColor'.n " remove the following whitespace from chars let chars = substitute(chars, '.$', '', '') " and create the syntax item contained in the pixel strings exe 'syn match xpmColor'.n.' /'.chars.'/ contained' exe 'syn cluster xpmColors add=xpmColor'.n " if no color or color = "None" show background if color == "" || substitute(color, '.*', '\L&', '') == 'none' exe 'hi xpmColor'.n.' guifg=bg' exe 'hi xpmColor'.n.' guibg=NONE' elseif color !~ "'" exe 'hi xpmColor'.n." guifg='".color."'" exe 'hi xpmColor'.n." guibg='".color."'" endif let n = n + 1 else break " no more color string endif endif let i = i + 1 endwhile unlet color chars colors cpp n i s endif " has("gui_running") || has("termguicolors") && &termguicolors " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link xpmType Type hi def link xpmStorageClass StorageClass hi def link xpmTodo Todo hi def link xpmComment Comment hi def link xpmPixelString String let b:current_syntax = "xpm" " vim: ts=8:sw=3:noet: neovim-0.2.2/runtime/syntax/xpm2.vim000066400000000000000000000111311320401574200174170ustar00rootroot00000000000000" Vim syntax file " Language: X Pixmap v2 " Maintainer: Steve Wall (hitched97@velnet.com) " Last Change: 2017 Feb 01 " (Dominique Pelle added @Spell) " Version: 5.8 " Jemma Nelson added termguicolors support " " Made from xpm.vim by Ronald Schild " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn region xpm2PixelString start="^" end="$" contains=@xpm2Colors syn keyword xpm2Todo TODO FIXME XXX contained syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo command -nargs=+ Hi hi def if has("gui_running") || has("termguicolors") && &termguicolors let color = "" let chars = "" let colors = 0 let cpp = 0 let n = 0 let i = 1 while i <= line("$") " scanning all lines let s = getline(i) if match(s,"\!.*$") != -1 let s = matchstr(s, "^[^\!]*") endif if s != "" " does line contain a string? if n == 0 " first string is the Values string " get the 3rd value: colors = number of colors let colors = substitute(s, '\s*\d\+\s\+\d\+\s\+\(\d\+\).*', '\1', '') " get the 4th value: cpp = number of character per pixel let cpp = substitute(s, '\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\d\+\).*', '\1', '') if cpp =~ '[^0-9]' break " if cpp is not made of digits there must be something wrong endif " Highlight the Values string as normal string (no pixel string). " Only when there is no slash, it would terminate the pattern. if s !~ '/' exe 'syn match xpm2Values /' . s . '/' endif hi def link xpm2Values Statement let n = 1 " n = color index elseif n <= colors " string is a color specification " get chars = length string representing the pixels " (first incl. the following whitespace) let chars = substitute(s, '\(.\{'.cpp.'}\s\+\).*', '\1', '') " now get color, first try 'c' key if any (color visual) let color = substitute(s, '.*\sc\s\+\(.\{-}\)\s*\(\(g4\=\|[ms]\)\s.*\)*\s*', '\1', '') if color == s " no 'c' key, try 'g' key (grayscale with more than 4 levels) let color = substitute(s, '.*\sg\s\+\(.\{-}\)\s*\(\(g4\|[ms]\)\s.*\)*\s*', '\1', '') if color == s " next try: 'g4' key (4-level grayscale) let color = substitute(s, '.*\sg4\s\+\(.\{-}\)\s*\([ms]\s.*\)*\s*', '\1', '') if color == s " finally try 'm' key (mono visual) let color = substitute(s, '.*\sm\s\+\(.\{-}\)\s*\(s\s.*\)*\s*', '\1', '') if color == s let color = "" endif endif endif endif " Vim cannot handle RGB codes with more than 6 hex digits if color =~ '#\x\{10,}$' let color = substitute(color, '\(\x\x\)\x\x', '\1', 'g') elseif color =~ '#\x\{7,}$' let color = substitute(color, '\(\x\x\)\x', '\1', 'g') " nor with 3 digits elseif color =~ '#\x\{3}$' let color = substitute(color, '\(\x\)\(\x\)\(\x\)', '0\10\20\3', '') endif " escape meta characters in patterns let s = escape(s, '/\*^$.~[]') let chars = escape(chars, '/\*^$.~[]') " change whitespace to "\s\+" let s = substitute(s, "[ \t][ \t]*", "\\\\s\\\\+", "g") let chars = substitute(chars, "[ \t][ \t]*", "\\\\s\\\\+", "g") " now create syntax items " highlight the color string as normal string (no pixel string) exe 'syn match xpm2Col'.n.'Def /'.s.'/ contains=xpm2Col'.n.'inDef' exe 'hi def link xpm2Col'.n.'Def Constant' " but highlight the first whitespace after chars in its color exe 'syn match xpm2Col'.n.'inDef /^'.chars.'/hs=s+'.(cpp).' contained' exe 'hi def link xpm2Col'.n.'inDef xpm2Color'.n " remove the following whitespace from chars let chars = substitute(chars, '\\s\\+$', '', '') " and create the syntax item contained in the pixel strings exe 'syn match xpm2Color'.n.' /'.chars.'/ contained' exe 'syn cluster xpm2Colors add=xpm2Color'.n " if no color or color = "None" show background if color == "" || substitute(color, '.*', '\L&', '') == 'none' exe 'Hi xpm2Color'.n.' guifg=bg guibg=NONE' elseif color !~ "'" exe 'Hi xpm2Color'.n." guifg='".color."' guibg='".color."'" endif let n = n + 1 else break " no more color string endif endif let i = i + 1 endwhile unlet color chars colors cpp n i s endif " has("gui_running") || has("termguicolors") && &termguicolors " Define the default highlighting. " Only when an item doesn't have highlighting yet " The default highlighting. hi def link xpm2Type Type hi def link xpm2StorageClass StorageClass hi def link xpm2Todo Todo hi def link xpm2Comment Comment hi def link xpm2PixelString String delcommand Hi let b:current_syntax = "xpm2" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8:sw=2:noet: neovim-0.2.2/runtime/syntax/xquery.vim000066400000000000000000000160271320401574200200770ustar00rootroot00000000000000" Vim syntax file " Language: XQuery " Author: René Neumann " Author: Steve Spigarelli " Original Author: Jean-Marc Vanel " Last Change: mar jui 12 18:04:05 CEST 2005 " Filenames: *.xq " URL: http://jmvanel.free.fr/vim/xquery.vim " REFERENCES: " [1] http://www.w3.org/TR/xquery/ " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif " - is allowed in keywords setlocal iskeyword+=- runtime syntax/xml.vim syn case match " From XQuery grammar: syn keyword xqStatement ancestor ancestor-or-self and as ascending at attribute base-uri boundary-space by case cast castable child collation construction declare default descendant descendant-or-self descending div document element else empty encoding eq every except external following following-sibling for function ge greatest gt idiv if import in inherit-namespaces instance intersect is le least let lt mod module namespace ne no of or order ordered ordering parent preceding preceding-sibling preserve return satisfies schema self some stable strip then to treat typeswitch union unordered validate variable version where xmlspace xquery yes " TODO contains clashes with vim keyword syn keyword xqFunction abs adjust-date-to-timezone adjust-date-to-timezone adjust-dateTime-to-timezone adjust-dateTime-to-timezone adjust-time-to-timezone adjust-time-to-timezone avg base-uri base-uri boolean ceiling codepoint-equal codepoints-to-string collection collection compare concat count current-date current-dateTime current-time data dateTime day-from-date day-from-dateTime days-from-duration deep-equal deep-equal default-collation distinct-values distinct-values doc doc-available document-uri empty ends-with ends-with error error error error escape-uri exactly-one exists false floor hours-from-dateTime hours-from-duration hours-from-time id id idref idref implicit-timezone in-scope-prefixes index-of index-of insert-before lang lang last local-name local-name local-name-from-QName lower-case matches matches max max min min minutes-from-dateTime minutes-from-duration minutes-from-time month-from-date month-from-dateTime months-from-duration name name namespace-uri namespace-uri namespace-uri-for-prefix namespace-uri-from-QName nilled node-name normalize-space normalize-space normalize-unicode normalize-unicode not number number one-or-more position prefix-from-QName QName remove replace replace resolve-QName resolve-uri resolve-uri reverse root root round round-half-to-even round-half-to-even seconds-from-dateTime seconds-from-duration seconds-from-time starts-with starts-with static-base-uri string string string-join string-length string-length string-to-codepoints subsequence subsequence substring substring substring-after substring-after substring-before substring-before sum sum timezone-from-date timezone-from-dateTime timezone-from-time tokenize tokenize trace translate true unordered upper-case year-from-date year-from-dateTime years-from-duration zero-or-one syn keyword xqOperator add-dayTimeDuration-to-date add-dayTimeDuration-to-dateTime add-dayTimeDuration-to-time add-dayTimeDurations add-yearMonthDuration-to-date add-yearMonthDuration-to-dateTime add-yearMonthDurations base64Binary-equal boolean-equal boolean-greater-than boolean-less-than concatenate date-equal date-greater-than date-less-than dateTime-equal dateTime-greater-than dateTime-less-than dayTimeDuration-equal dayTimeDuration-greater-than dayTimeDuration-less-than divide-dayTimeDuration divide-dayTimeDuration-by-dayTimeDuration divide-yearMonthDuration divide-yearMonthDuration-by-yearMonthDuration except gDay-equal gMonth-equal gMonthDay-equal gYear-equal gYearMonth-equal hexBinary-equal intersect is-same-node multiply-dayTimeDuration multiply-yearMonthDuration node-after node-before NOTATION-equal numeric-add numeric-divide numeric-equal numeric-greater-than numeric-integer-divide numeric-less-than numeric-mod numeric-multiply numeric-subtract numeric-unary-minus numeric-unary-plus QName-equal subtract-dates-yielding-dayTimeDuration subtract-dateTimes-yielding-dayTimeDuration subtract-dayTimeDuration-from-date subtract-dayTimeDuration-from-dateTime subtract-dayTimeDuration-from-time subtract-dayTimeDurations subtract-times subtract-yearMonthDuration-from-date subtract-yearMonthDuration-from-dateTime subtract-yearMonthDurations time-equal time-greater-than time-less-than to union yearMonthDuration-equal yearMonthDuration-greater-than yearMonthDuration-less-than syn match xqType "xs:\(\|Datatype\|primitive\|string\|boolean\|float\|double\|decimal\|duration\|dateTime\|time\|date\|gYearMonth\|gYear\|gMonthDay\|gDay\|gMonth\|hexBinary\|base64Binary\|anyURI\|QName\|NOTATION\|\|normalizedString\|token\|language\|IDREFS\|ENTITIES\|NMTOKEN\|NMTOKENS\|Name\|NCName\|ID\|IDREF\|ENTITY\|integer\|nonPositiveInteger\|negativeInteger\|long\|int\|short\|byte\|nonNegativeInteger\|unsignedLong\|unsignedInt\|unsignedShort\|unsignedByte\|positiveInteger\)" " From XPath grammar: syn keyword xqXPath some every in in satisfies if then else to div idiv mod union intersect except instance of treat castable cast eq ne lt le gt ge is child descendant attribute self descendant-or-self following-sibling following namespace parent ancestor preceding-sibling preceding ancestor-or-self void item node document-node text comment processing-instruction attribute schema-attribute schema-element " eXist extensions syn match xqExist "&=" " XQdoc syn match XQdoc contained "@\(param\|return\|author\)\>" " floating point number, with dot, optional exponent syn match xqFloat "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" " floating point number, starting with a dot, optional exponent syn match xqFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" " floating point number, without dot, with exponent syn match xqFloat "\d\+e[-+]\=\d\+[fl]\=\>" syn match xqNumber "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" syn match xqNumber "\<\d\+\>" syn region xqString start=+\z(['"]\)+ skip=+\\.+ end=+\z1+ syn region xqComment start='(:' excludenl end=':)' contains=XQdoc syn match xqVariable "$\<[a-zA-Z:_][-.0-9a-zA-Z0-9:_]*\>" syn match xqSeparator ",\|;" syn region xqCode transparent contained start='{' excludenl end='}' contains=xqFunction,xqCode,xmlRegionBis,xqComment,xqStatement,xmlString,xqSeparator,xqNumber,xqVariable,xqString keepend extend syn region xmlRegionBis start=+<\z([^ /!?<>"']\+\)+ skip=++ end=++ end=+/>+ fold contains=xmlTag,xmlEndTag,xmlCdata,xmlRegionBis,xmlComment,xmlEntity,xmlProcessing,xqCode keepend extend hi def link xqNumber Number hi def link xqFloat Number hi def link xqString String hi def link xqVariable Identifier hi def link xqComment Comment hi def link xqSeparator Operator hi def link xqStatement Statement hi def link xqFunction Function hi def link xqOperator Operator hi def link xqType Type hi def link xqXPath Operator hi def link XQdoc Special hi def link xqExist Operator " override the xml highlighting "hi link xmlTag Structure "hi link xmlTagName Structure "hi link xmlEndTag Structure let b:current_syntax = "xquery" neovim-0.2.2/runtime/syntax/xs.vim000066400000000000000000007417311320401574200172030ustar00rootroot00000000000000" Vim syntax file " Language: XS (Perl extension interface language) " Author: Autogenerated from perl headers, on an original basis of Michael W. Dodge " Maintainer: vim-perl " Previous: Vincent Pit " Last Change: 2017-09-12 if exists("b:current_syntax") finish endif runtime! syntax/c.vim " Configuration: " let xs_superseded = 0 " mark C functions superseded by Perl replacements (ex. memcpy vs Copy) " let xs_not_core = 0 " mark private core functions if get(g:, 'xs_superseded', 0) syn keyword xsSuperseded atof atol calloc clearerr exit fclose feof ferror syn keyword xsSuperseded fflush fgetc fgetpos fgets fopen fprintf fputc fputs syn keyword xsSuperseded fread free freopen fseek fsetpos fwrite getc getenv syn keyword xsSuperseded isalnum isalpha iscntrl isdigit isgraph islower syn keyword xsSuperseded isprint ispunct isspace isupper isxdigit malloc syn keyword xsSuperseded memcpy memmove memset printf putc rand realloc syn keyword xsSuperseded rewind setenv sprintf srand stderr stdin stdout syn keyword xsSuperseded strcat strcmp strcpy strdup strlen strncat strncmp syn keyword xsSuperseded strncpy strstr strtod strtol strtoul system tolower syn keyword xsSuperseded toupper ungetc endif if get(g:, 'xs_not_core', 0) syn keyword xsPrivate F0convert Perl__add_range_to_invlist syn keyword xsPrivate Perl__core_swash_init Perl__get_encoding syn keyword xsPrivate Perl__get_swash_invlist Perl__invlist_contents syn keyword xsPrivate Perl__invlist_dump syn keyword xsPrivate Perl__invlist_intersection_maybe_complement_2nd syn keyword xsPrivate Perl__invlist_invert Perl__invlist_populate_swatch syn keyword xsPrivate Perl__invlist_search syn keyword xsPrivate Perl__invlist_union_maybe_complement_2nd syn keyword xsPrivate Perl__load_PL_utf8_foldclosures Perl__new_invlist syn keyword xsPrivate Perl__setup_canned_invlist Perl__swash_inversion_hash syn keyword xsPrivate Perl__swash_to_invlist Perl__to_fold_latin1 syn keyword xsPrivate Perl__warn_problematic_locale Perl_av_reify syn keyword xsPrivate Perl_current_re_engine Perl_cv_ckproto_len_flags syn keyword xsPrivate Perl_emulate_cop_io Perl_find_rundefsvoffset syn keyword xsPrivate Perl_get_re_arg Perl_grok_atoUV Perl_isALNUM_lazy syn keyword xsPrivate Perl_isIDFIRST_lazy Perl_is_uni_alnum syn keyword xsPrivate Perl_is_uni_alnum_lc Perl_is_uni_alnumc syn keyword xsPrivate Perl_is_uni_alnumc_lc Perl_is_uni_alpha syn keyword xsPrivate Perl_is_uni_alpha_lc Perl_is_uni_ascii syn keyword xsPrivate Perl_is_uni_ascii_lc Perl_is_uni_blank syn keyword xsPrivate Perl_is_uni_blank_lc Perl_is_uni_cntrl syn keyword xsPrivate Perl_is_uni_cntrl_lc Perl_is_uni_digit syn keyword xsPrivate Perl_is_uni_digit_lc Perl_is_uni_graph syn keyword xsPrivate Perl_is_uni_graph_lc Perl_is_uni_idfirst syn keyword xsPrivate Perl_is_uni_idfirst_lc Perl_is_uni_lower syn keyword xsPrivate Perl_is_uni_lower_lc Perl_is_uni_print syn keyword xsPrivate Perl_is_uni_print_lc Perl_is_uni_punct syn keyword xsPrivate Perl_is_uni_punct_lc Perl_is_uni_space syn keyword xsPrivate Perl_is_uni_space_lc Perl_is_uni_upper syn keyword xsPrivate Perl_is_uni_upper_lc Perl_is_uni_xdigit syn keyword xsPrivate Perl_is_uni_xdigit_lc Perl_is_utf8_alnum syn keyword xsPrivate Perl_is_utf8_alnumc Perl_is_utf8_alpha syn keyword xsPrivate Perl_is_utf8_ascii Perl_is_utf8_blank Perl_is_utf8_char syn keyword xsPrivate Perl_is_utf8_cntrl Perl_is_utf8_digit syn keyword xsPrivate Perl_is_utf8_graph Perl_is_utf8_idcont syn keyword xsPrivate Perl_is_utf8_idfirst Perl_is_utf8_lower syn keyword xsPrivate Perl_is_utf8_mark Perl_is_utf8_perl_space syn keyword xsPrivate Perl_is_utf8_perl_word Perl_is_utf8_posix_digit syn keyword xsPrivate Perl_is_utf8_print Perl_is_utf8_punct syn keyword xsPrivate Perl_is_utf8_space Perl_is_utf8_upper syn keyword xsPrivate Perl_is_utf8_xdigit Perl_is_utf8_xidcont syn keyword xsPrivate Perl_is_utf8_xidfirst Perl_mg_find_mglob Perl_mg_length syn keyword xsPrivate Perl_multideref_stringify Perl_new_warnings_bitfield syn keyword xsPrivate Perl_op_clear Perl_ptr_table_clear Perl_qerror syn keyword xsPrivate Perl_reg_named_buff Perl_reg_named_buff_iter syn keyword xsPrivate Perl_reg_numbered_buff_fetch syn keyword xsPrivate Perl_reg_numbered_buff_length syn keyword xsPrivate Perl_reg_numbered_buff_store Perl_reg_qr_package syn keyword xsPrivate Perl_reg_temp_copy Perl_regprop Perl_report_uninit syn keyword xsPrivate Perl_sv_magicext_mglob Perl_sv_setsv_cow syn keyword xsPrivate Perl_to_uni_lower_lc Perl_to_uni_title_lc syn keyword xsPrivate Perl_to_uni_upper_lc Perl_try_amagic_bin syn keyword xsPrivate Perl_try_amagic_un Perl_utf8_to_uvchr syn keyword xsPrivate Perl_utf8_to_uvuni Perl_utf8_to_uvuni_buf syn keyword xsPrivate Perl_valid_utf8_to_uvuni Perl_validate_proto syn keyword xsPrivate Perl_vivify_defelem Perl_yylex S_F0convert syn keyword xsPrivate S__append_range_to_invlist S__make_exactf_invlist syn keyword xsPrivate S_add_above_Latin1_folds S_add_data S_add_multi_match syn keyword xsPrivate S_add_utf16_textfilter S_adjust_size_and_find_bucket syn keyword xsPrivate S_advance_one_SB S_advance_one_WB S_amagic_cmp syn keyword xsPrivate S_amagic_cmp_locale S_amagic_i_ncmp S_amagic_ncmp syn keyword xsPrivate S_anonymise_cv_maybe S_ao S_apply_attrs syn keyword xsPrivate S_apply_attrs_my S_assert_uft8_cache_coherent syn keyword xsPrivate S_assignment_type S_backup_one_SB S_backup_one_WB syn keyword xsPrivate S_bad_type_gv S_bad_type_pv syn keyword xsPrivate S_check_locale_boundary_crossing S_check_type_and_open syn keyword xsPrivate S_check_uni S_checkcomma S_ckwarn_common syn keyword xsPrivate S_clear_placeholders S_clear_special_blocks syn keyword xsPrivate S_cntrl_to_mnemonic S_construct_ahocorasick_from_trie syn keyword xsPrivate S_cop_free S_could_it_be_a_POSIX_class S_cr_textfilter syn keyword xsPrivate S_curse S_cv_dump S_deb_curcv S_deb_stack_n S_debprof syn keyword xsPrivate S_debug_start_match S_del_sv syn keyword xsPrivate S_deprecate_commaless_var_list S_destroy_matcher syn keyword xsPrivate S_div128 S_do_chomp S_do_delete_local S_do_oddball syn keyword xsPrivate S_do_smartmatch S_do_trans_complex syn keyword xsPrivate S_do_trans_complex_utf8 S_do_trans_count syn keyword xsPrivate S_do_trans_count_utf8 S_do_trans_simple syn keyword xsPrivate S_do_trans_simple_utf8 S_docatch S_doeval S_dofindlabel syn keyword xsPrivate S_doform S_dooneliner S_doopen_pm S_doparseform syn keyword xsPrivate S_dopoptoeval S_dopoptogiven S_dopoptolabel syn keyword xsPrivate S_dopoptoloop S_dopoptosub_at S_dopoptowhen syn keyword xsPrivate S_dump_exec_pos S_dump_trie S_dump_trie_interim_list syn keyword xsPrivate S_dump_trie_interim_table S_dumpuntil S_dup_attrlist syn keyword xsPrivate S_exec_failed S_expect_number S_filter_gets syn keyword xsPrivate S_finalize_op S_find_and_forget_pmops syn keyword xsPrivate S_find_array_subscript S_find_beginning S_find_byclass syn keyword xsPrivate S_find_default_stash S_find_hash_subscript syn keyword xsPrivate S_find_in_my_stash S_find_uninit_var S_first_symbol syn keyword xsPrivate S_fixup_errno_string S_fold_constants S_forbid_setid syn keyword xsPrivate S_force_ident S_force_ident_maybe_lex S_force_list syn keyword xsPrivate S_force_next S_force_strict_version S_force_version syn keyword xsPrivate S_force_word S_forget_pmop S_form_short_octal_warning syn keyword xsPrivate S_gen_constant_list S_get_ANYOF_cp_list_for_ssc syn keyword xsPrivate S_get_aux_mg S_get_num S_glob_2number syn keyword xsPrivate S_glob_assign_glob S_grok_bslash_N S_grok_bslash_c syn keyword xsPrivate S_grok_bslash_o S_group_end S_gv_init_svtype syn keyword xsPrivate S_gv_is_in_main S_gv_magicalize S_gv_magicalize_isa syn keyword xsPrivate S_handle_regex_sets S_hfreeentries S_hsplit syn keyword xsPrivate S_hv_auxinit S_hv_auxinit_internal S_hv_delete_common syn keyword xsPrivate S_hv_free_ent_ret S_hv_magic_check S_hv_notallowed syn keyword xsPrivate S_incline S_incpush S_incpush_if_exists syn keyword xsPrivate S_incpush_use_sep S_ingroup S_init_ids S_init_interp syn keyword xsPrivate S_init_main_stash S_init_perllib syn keyword xsPrivate S_init_postdump_symbols S_init_predump_symbols syn keyword xsPrivate S_inplace_aassign S_intuit_method S_intuit_more syn keyword xsPrivate S_invlist_extend S_invlist_iternext syn keyword xsPrivate S_invoke_exception_hook S_isFOO_lc S_isFOO_utf8_lc syn keyword xsPrivate S_isGCB S_isSB S_isWB S_is_an_int syn keyword xsPrivate S_is_handle_constructor S_is_ssc_worth_it S_isa_lookup syn keyword xsPrivate S_join_exact S_leave_common S_listkids syn keyword xsPrivate S_looks_like_bool S_magic_methcall1 S_make_matcher syn keyword xsPrivate S_make_trie S_matcher_matches_sv S_maybe_multimagic_gv syn keyword xsPrivate S_mayberelocate S_measure_struct S_mem_log_common syn keyword xsPrivate S_mess_alloc S_minus_v S_missingterm S_modkids syn keyword xsPrivate S_more_sv S_move_proto_attr S_mro_clean_isarev syn keyword xsPrivate S_mro_gather_and_rename S_mro_get_linear_isa_dfs syn keyword xsPrivate S_mul128 S_mulexp10 S_my_bytes_to_utf8 S_my_exit_jump syn keyword xsPrivate S_my_kid S_need_utf8 S_newGIVWHENOP S_new_constant syn keyword xsPrivate S_new_he S_new_logop S_next_symbol S_nextchar syn keyword xsPrivate S_no_bareword_allowed S_no_fh_allowed S_no_op syn keyword xsPrivate S_not_a_number S_not_incrementable S_nuke_stacks syn keyword xsPrivate S_num_overflow S_open_script S_openn_cleanup syn keyword xsPrivate S_openn_setup S_pack_rec S_pad_alloc_name syn keyword xsPrivate S_pad_check_dup S_pad_findlex S_pad_reset S_parse_body syn keyword xsPrivate S_parse_gv_stash_name S_parse_ident syn keyword xsPrivate S_parse_lparen_question_flags S_pending_ident S_pidgone syn keyword xsPrivate S_pm_description S_pmtrans syn keyword xsPrivate S_populate_ANYOF_from_invlist S_printbuf syn keyword xsPrivate S_process_special_blocks S_ptr_table_find syn keyword xsPrivate S_put_charclass_bitmap_innards S_put_code_point syn keyword xsPrivate S_put_range S_qsortsvu S_re_croak2 S_ref_array_or_hash syn keyword xsPrivate S_refcounted_he_value S_refkids S_refto S_reg syn keyword xsPrivate S_reg2Lanode S_reg_check_named_buff_matched S_reg_node syn keyword xsPrivate S_reg_recode S_reg_scan_name S_reganode S_regatom syn keyword xsPrivate S_regbranch S_regclass S_regcppop S_regcppush syn keyword xsPrivate S_regdump_extflags S_regdump_intflags syn keyword xsPrivate S_regex_set_precedence S_reghop3 S_reghop4 syn keyword xsPrivate S_reghopmaybe3 S_reginclass S_reginsert S_regmatch syn keyword xsPrivate S_regnode_guts S_regpatws S_regpiece S_regrepeat syn keyword xsPrivate S_regtail S_regtail_study S_regtry S_require_tie_mod syn keyword xsPrivate S_restore_magic S_run_body S_run_user_filter syn keyword xsPrivate S_rxres_free S_rxres_restore S_save_hek_flags syn keyword xsPrivate S_save_lines S_save_magic_flags S_save_pushptri32ptr syn keyword xsPrivate S_save_scalar_at S_scalar_mod_type S_scalarboolean syn keyword xsPrivate S_scalarkids S_scalarseq S_scan_commit S_scan_const syn keyword xsPrivate S_scan_formline S_scan_heredoc S_scan_ident syn keyword xsPrivate S_scan_inputsymbol S_scan_pat S_scan_str S_scan_subst syn keyword xsPrivate S_scan_trans S_scan_word S_search_const S_sequence_num syn keyword xsPrivate S_set_ANYOF_arg S_share_hek_flags S_simplify_sort syn keyword xsPrivate S_skipspace_flags S_sortcv S_sortcv_stacked syn keyword xsPrivate S_sortcv_xsub S_space_join_names_mortal S_ssc_and syn keyword xsPrivate S_ssc_anything S_ssc_finalize S_ssc_init syn keyword xsPrivate S_ssc_is_anything S_ssc_is_cp_posixl_init S_ssc_or syn keyword xsPrivate S_stdize_locale S_strip_return S_study_chunk syn keyword xsPrivate S_sublex_done S_sublex_push S_sublex_start syn keyword xsPrivate S_sv_2iuv_common S_sv_2iuv_non_preserve S_sv_add_arena syn keyword xsPrivate S_sv_buf_to_rw S_sv_display S_sv_dup_common syn keyword xsPrivate S_sv_dup_inc_multiple S_sv_exp_grow S_sv_i_ncmp syn keyword xsPrivate S_sv_ncmp S_sv_pos_b2u_midway S_sv_pos_u2b_cached syn keyword xsPrivate S_sv_pos_u2b_forwards S_sv_pos_u2b_midway syn keyword xsPrivate S_sv_release_COW S_swallow_bom S_swash_scan_list_line syn keyword xsPrivate S_swatch_get S_to_byte_substr S_to_lower_latin1 syn keyword xsPrivate S_to_utf8_substr S_tokenize_use S_tokeq S_tokereport syn keyword xsPrivate S_too_few_arguments_pv S_too_many_arguments_pv syn keyword xsPrivate S_uiv_2buf S_unpack_rec S_unreferenced_to_tmp_stack syn keyword xsPrivate S_unshare_hek_or_pvn S_unwind_handler_stack syn keyword xsPrivate S_update_debugger_info S_usage S_utf16_textfilter syn keyword xsPrivate S_utf8_mg_len_cache_update S_utf8_mg_pos_cache_update syn keyword xsPrivate S_validate_suid S_visit S_with_queued_errors syn keyword xsPrivate S_xs_version_bootcheck S_yywarn _add_range_to_invlist syn keyword xsPrivate _append_range_to_invlist _core_swash_init _get_encoding syn keyword xsPrivate _get_swash_invlist _invlist_array_init syn keyword xsPrivate _invlist_contains_cp _invlist_contents _invlist_dump syn keyword xsPrivate _invlist_intersection syn keyword xsPrivate _invlist_intersection_maybe_complement_2nd syn keyword xsPrivate _invlist_invert _invlist_len _invlist_populate_swatch syn keyword xsPrivate _invlist_search _invlist_subtract _invlist_union syn keyword xsPrivate _invlist_union_maybe_complement_2nd syn keyword xsPrivate _load_PL_utf8_foldclosures _make_exactf_invlist syn keyword xsPrivate _new_invlist _setup_canned_invlist syn keyword xsPrivate _swash_inversion_hash _swash_to_invlist _to_fold_latin1 syn keyword xsPrivate _warn_problematic_locale add_above_Latin1_folds syn keyword xsPrivate add_cp_to_invlist add_data add_multi_match syn keyword xsPrivate add_utf16_textfilter adjust_size_and_find_bucket syn keyword xsPrivate advance_one_SB advance_one_WB syn keyword xsPrivate alloc_maybe_populate_EXACT amagic_cmp amagic_cmp_locale syn keyword xsPrivate amagic_i_ncmp amagic_ncmp anonymise_cv_maybe ao syn keyword xsPrivate apply_attrs apply_attrs_my assert_uft8_cache_coherent syn keyword xsPrivate assignment_type av_reify backup_one_SB backup_one_WB syn keyword xsPrivate bad_type_gv bad_type_pv check_locale_boundary_crossing syn keyword xsPrivate check_type_and_open check_uni checkcomma ckwarn_common syn keyword xsPrivate clear_placeholders clear_special_blocks syn keyword xsPrivate cntrl_to_mnemonic compute_EXACTish syn keyword xsPrivate construct_ahocorasick_from_trie cop_free syn keyword xsPrivate could_it_be_a_POSIX_class cr_textfilter syn keyword xsPrivate current_re_engine curse cv_ckproto_len_flags cv_dump syn keyword xsPrivate deb_curcv deb_stack_n debprof debug_start_match del_sv syn keyword xsPrivate deprecate_commaless_var_list destroy_matcher div128 syn keyword xsPrivate do_aexec do_chomp do_delete_local do_exec do_oddball syn keyword xsPrivate do_smartmatch do_trans_complex do_trans_complex_utf8 syn keyword xsPrivate do_trans_count do_trans_count_utf8 do_trans_simple syn keyword xsPrivate do_trans_simple_utf8 docatch doeval dofindlabel doform syn keyword xsPrivate dooneliner doopen_pm doparseform dopoptoeval syn keyword xsPrivate dopoptogiven dopoptolabel dopoptoloop dopoptosub_at syn keyword xsPrivate dopoptowhen dump_exec_pos dump_trie syn keyword xsPrivate dump_trie_interim_list dump_trie_interim_table syn keyword xsPrivate dumpuntil dup_attrlist exec_failed expect_number syn keyword xsPrivate filter_gets finalize_op find_and_forget_pmops syn keyword xsPrivate find_array_subscript find_beginning find_byclass syn keyword xsPrivate find_default_stash find_hash_subscript find_in_my_stash syn keyword xsPrivate find_rundefsvoffset find_uninit_var first_symbol syn keyword xsPrivate fixup_errno_string fold_constants forbid_setid syn keyword xsPrivate force_ident force_ident_maybe_lex force_list force_next syn keyword xsPrivate force_strict_version force_version force_word syn keyword xsPrivate forget_pmop form_short_octal_warning free_c_backtrace syn keyword xsPrivate gen_constant_list get_ANYOF_cp_list_for_ssc get_aux_mg syn keyword xsPrivate get_invlist_iter_addr get_invlist_offset_addr syn keyword xsPrivate get_invlist_previous_index_addr get_num glob_2number syn keyword xsPrivate glob_assign_glob grok_atoUV grok_bslash_N grok_bslash_c syn keyword xsPrivate grok_bslash_o grok_bslash_x group_end gv_init_svtype syn keyword xsPrivate gv_is_in_main gv_magicalize gv_magicalize_isa syn keyword xsPrivate handle_regex_sets hfreeentries hsplit hv_auxinit syn keyword xsPrivate hv_auxinit_internal hv_delete_common hv_free_ent_ret syn keyword xsPrivate hv_magic_check hv_notallowed incline incpush syn keyword xsPrivate incpush_if_exists incpush_use_sep ingroup init_ids syn keyword xsPrivate init_interp init_main_stash init_perllib syn keyword xsPrivate init_postdump_symbols init_predump_symbols syn keyword xsPrivate inplace_aassign intuit_method intuit_more invlist_array syn keyword xsPrivate invlist_clone invlist_extend invlist_highest syn keyword xsPrivate invlist_is_iterating invlist_iterfinish syn keyword xsPrivate invlist_iterinit invlist_iternext invlist_max syn keyword xsPrivate invlist_previous_index invlist_set_len syn keyword xsPrivate invlist_set_previous_index invlist_trim syn keyword xsPrivate invoke_exception_hook isALNUM_lazy isFOO_lc syn keyword xsPrivate isFOO_utf8_lc isGCB isIDFIRST_lazy isSB isWB is_an_int syn keyword xsPrivate is_handle_constructor is_ssc_worth_it is_uni_alnum syn keyword xsPrivate is_uni_alnum_lc is_uni_alnumc is_uni_alnumc_lc syn keyword xsPrivate is_uni_alpha is_uni_alpha_lc is_uni_ascii syn keyword xsPrivate is_uni_ascii_lc is_uni_blank is_uni_blank_lc syn keyword xsPrivate is_uni_cntrl is_uni_cntrl_lc is_uni_digit syn keyword xsPrivate is_uni_digit_lc is_uni_graph is_uni_graph_lc syn keyword xsPrivate is_uni_idfirst is_uni_idfirst_lc is_uni_lower syn keyword xsPrivate is_uni_lower_lc is_uni_print is_uni_print_lc syn keyword xsPrivate is_uni_punct is_uni_punct_lc is_uni_space syn keyword xsPrivate is_uni_space_lc is_uni_upper is_uni_upper_lc syn keyword xsPrivate is_uni_xdigit is_uni_xdigit_lc is_utf8_alnum syn keyword xsPrivate is_utf8_alnumc is_utf8_alpha is_utf8_ascii syn keyword xsPrivate is_utf8_blank is_utf8_char is_utf8_cntrl is_utf8_digit syn keyword xsPrivate is_utf8_graph is_utf8_idcont is_utf8_idfirst syn keyword xsPrivate is_utf8_lower is_utf8_mark is_utf8_perl_space syn keyword xsPrivate is_utf8_perl_word is_utf8_posix_digit is_utf8_print syn keyword xsPrivate is_utf8_punct is_utf8_space is_utf8_upper syn keyword xsPrivate is_utf8_xdigit is_utf8_xidcont is_utf8_xidfirst syn keyword xsPrivate isa_lookup join_exact leave_common listkids syn keyword xsPrivate looks_like_bool magic_methcall1 make_matcher make_trie syn keyword xsPrivate matcher_matches_sv maybe_multimagic_gv mayberelocate syn keyword xsPrivate measure_struct mem_log_common mess_alloc mg_find_mglob syn keyword xsPrivate mg_length minus_v missingterm modkids more_sv syn keyword xsPrivate move_proto_attr mro_clean_isarev mro_gather_and_rename syn keyword xsPrivate mro_get_linear_isa_dfs mul128 mulexp10 syn keyword xsPrivate multideref_stringify my_bytes_to_utf8 my_exit_jump syn keyword xsPrivate my_kid need_utf8 newGIVWHENOP new_he new_logop syn keyword xsPrivate next_symbol nextchar no_bareword_allowed no_fh_allowed syn keyword xsPrivate no_op not_a_number not_incrementable nuke_stacks syn keyword xsPrivate num_overflow op_clear open_script openn_cleanup syn keyword xsPrivate openn_setup pack_rec pad_alloc_name pad_check_dup syn keyword xsPrivate pad_findlex pad_reset parse_body parse_gv_stash_name syn keyword xsPrivate parse_ident parse_lparen_question_flags pending_ident syn keyword xsPrivate pidgone pm_description pmtrans syn keyword xsPrivate populate_ANYOF_from_invlist printbuf syn keyword xsPrivate process_special_blocks ptr_table_clear ptr_table_find syn keyword xsPrivate put_charclass_bitmap_innards put_code_point put_range syn keyword xsPrivate qerror qsortsvu re_croak2 ref_array_or_hash syn keyword xsPrivate refcounted_he_value refkids refto reg reg2Lanode syn keyword xsPrivate reg_check_named_buff_matched reg_named_buff syn keyword xsPrivate reg_named_buff_iter reg_node reg_numbered_buff_fetch syn keyword xsPrivate reg_numbered_buff_length reg_numbered_buff_store syn keyword xsPrivate reg_qr_package reg_recode reg_scan_name reg_skipcomment syn keyword xsPrivate reg_temp_copy reganode regatom regbranch regclass syn keyword xsPrivate regcppop regcppush regcurly regdump_extflags syn keyword xsPrivate regdump_intflags regex_set_precedence reghop3 reghop4 syn keyword xsPrivate reghopmaybe3 reginclass reginsert regmatch regnode_guts syn keyword xsPrivate regpatws regpiece regpposixcc regprop regrepeat regtail syn keyword xsPrivate regtail_study regtry report_uninit require_tie_mod syn keyword xsPrivate restore_magic run_body run_user_filter rxres_free syn keyword xsPrivate rxres_restore save_hek_flags save_lines syn keyword xsPrivate save_magic_flags save_pushptri32ptr save_scalar_at syn keyword xsPrivate scalar_mod_type scalarboolean scalarkids scalarseq syn keyword xsPrivate scan_commit scan_const scan_formline scan_heredoc syn keyword xsPrivate scan_ident scan_inputsymbol scan_pat scan_str syn keyword xsPrivate scan_subst scan_trans scan_word search_const syn keyword xsPrivate sequence_num set_ANYOF_arg share_hek_flags syn keyword xsPrivate simplify_sort skipspace_flags sortcv sortcv_stacked syn keyword xsPrivate sortcv_xsub space_join_names_mortal ssc_add_range syn keyword xsPrivate ssc_and ssc_anything ssc_clear_locale ssc_cp_and syn keyword xsPrivate ssc_finalize ssc_init ssc_intersection ssc_is_anything syn keyword xsPrivate ssc_is_cp_posixl_init ssc_or ssc_union stdize_locale syn keyword xsPrivate strip_return study_chunk sublex_done sublex_push syn keyword xsPrivate sublex_start sv_2iuv_common sv_2iuv_non_preserve syn keyword xsPrivate sv_add_arena sv_buf_to_rw sv_copypv sv_display syn keyword xsPrivate sv_dup_common sv_dup_inc_multiple sv_exp_grow sv_i_ncmp syn keyword xsPrivate sv_magicext_mglob sv_ncmp sv_only_taint_gmagic syn keyword xsPrivate sv_or_pv_pos_u2b sv_pos_b2u_midway sv_pos_u2b_cached syn keyword xsPrivate sv_pos_u2b_forwards sv_pos_u2b_midway sv_release_COW syn keyword xsPrivate sv_setsv_cow swallow_bom swash_scan_list_line syn keyword xsPrivate swatch_get to_byte_substr to_lower_latin1 syn keyword xsPrivate to_uni_lower_lc to_uni_title_lc to_uni_upper_lc syn keyword xsPrivate to_utf8_substr tokenize_use tokeq tokereport syn keyword xsPrivate too_few_arguments_pv too_many_arguments_pv uiv_2buf syn keyword xsPrivate unpack_rec unreferenced_to_tmp_stack unshare_hek_or_pvn syn keyword xsPrivate unwind_handler_stack update_debugger_info usage syn keyword xsPrivate utf16_textfilter utf8_mg_len_cache_update syn keyword xsPrivate utf8_mg_pos_cache_update utf8_to_uvchr utf8_to_uvuni syn keyword xsPrivate utf8_to_uvuni_buf valid_utf8_to_uvuni validate_proto syn keyword xsPrivate visit vivify_defelem with_queued_errors yylex yywarn endif syn keyword xsType AMT AMTS ANY AV BHK BINOP BLOCK CHECKPOINT CLONE_PARAMS syn keyword xsType COP COPHH CV DB_Hash_t DB_Prefix_t DEBUG_t Direntry_t syn keyword xsType Fpos_t Free_t GCB_enum GP GV Gid_t Groups_t HE HEK HV I16 syn keyword xsType I32 I64 I8 IO IV Int64 JMPENV LISTOP LOGOP LOOP MAGIC syn keyword xsType METHOP MGS MGVTBL Malloc_t Mmap_t Mode_t NV Netdb_hlen_t syn keyword xsType Netdb_host_t Netdb_name_t Netdb_net_t OP OPCODE OPSLAB syn keyword xsType OPSLOT Off_t Optype PAD PADLIST PADNAME PADNAMELIST syn keyword xsType PADOFFSET PADOP PERL_CONTEXT PERL_DRAND48_T PERL_SI PMOP syn keyword xsType PTR_TBL_ENT_t PTR_TBL_t PVOP PerlHandShakeInterpreter syn keyword xsType PerlIO PerlIO_funcs PerlIO_list_s PerlIO_list_t PerlIOl syn keyword xsType PerlInterpreter Pid_t Quad_t REGEXP RExC_state_t syn keyword xsType Rand_seed_t SB_enum SSize_t STRLEN STRUCT_SV SUBLEXINFO SV syn keyword xsType SVOP Select_fd_set_t Shmat_t Signal_t Sigsave_t Size_t syn keyword xsType Sock_size_t Stat_t TM64 Time64_T Time_t U16 U32 U64 U8 syn keyword xsType UNOP UNOP_AUX UV Uid_t Uquad_t WB_enum XINVLIST XOP XPV syn keyword xsType XPVAV XPVBM XPVCV XPVFM XPVGV XPVHV XPVIO XPVIV XPVLV syn keyword xsType XPVMG XPVNV XPVUV Year _PerlIO _PerlIO_funcs syn keyword xsType _char_class_number _pMY_CXT _pTHX _reg_ac_data syn keyword xsType _reg_trie_data _reg_trie_state _reg_trie_trans syn keyword xsType _reg_trie_trans_list_elem _sublex_info _xhvnameu _xivu syn keyword xsType _xmgu _xnvu am_table am_table_short block_eval syn keyword xsType block_format block_givwhen block_hooks block_loop syn keyword xsType block_sub bound_type clone_params custom_op cv_flags_t syn keyword xsType expectation gccbug_semun line_t magic mem_log_type methop syn keyword xsType mgvtbl mro_alg mro_meta my_cxt_t opcode opslab opslot p5rx syn keyword xsType pMY_CXT pMY_CXT_ pTHX pTHX_ padlist padname syn keyword xsType padname_with_str padnamelist padtidy_type perl_cond syn keyword xsType perl_debug_pad perl_drand48_t perl_key syn keyword xsType perl_memory_debug_header perl_mstats perl_mstats_t syn keyword xsType perl_mutex perl_os_thread perl_phase perl_vars syn keyword xsType pthread_addr_t ptr_tbl ptr_tbl_ent refcounted_he syn keyword xsType reg_ac_data reg_code_block reg_data reg_substr_data syn keyword xsType reg_substr_datum reg_trie_data reg_trie_state syn keyword xsType reg_trie_trans reg_trie_trans_le regex_charset regnode syn keyword xsType regnode_1 regnode_2 regnode_2L regnode_charclass syn keyword xsType regnode_charclass_class regnode_charclass_posixl syn keyword xsType regnode_ssc regnode_string semun shared_he svtype ufuncs syn keyword xsType unop_aux xop_flags_enum xpv xpvav xpvcv xpvfm xpvgv xpvhv syn keyword xsType xpvhv_aux xpvinvlist xpvio xpviv xpvlv xpvmg xpvnv xpvuv syn keyword xsType yytokentype syn keyword xsString IVdf NVef NVff NVgf SVf SVf256 SVf32 SVf_ UVof UVuf UVxf syn keyword xsConstant CXt_BLOCK CXt_EVAL CXt_FORMAT CXt_GIVEN CXt_LOOP_FOR syn keyword xsConstant CXt_LOOP_LAZYIV CXt_LOOP_LAZYSV CXt_LOOP_PLAIN syn keyword xsConstant CXt_NULL CXt_SUB CXt_SUBST CXt_WHEN GCB_BOUND GCB_CR syn keyword xsConstant GCB_Control GCB_EDGE GCB_Extend GCB_L GCB_LF GCB_LV syn keyword xsConstant GCB_LVT GCB_Other GCB_Prepend GCB_Regional_Indicator syn keyword xsConstant GCB_SpacingMark GCB_T GCB_V G_ARRAY G_DISCARD G_EVAL syn keyword xsConstant G_FAKINGEVAL G_KEEPERR G_METHOD G_METHOD_NAMED syn keyword xsConstant G_NOARGS G_NODEBUG G_RE_REPARSING G_SCALAR syn keyword xsConstant G_UNDEF_FILL G_VOID G_WANT G_WARN_ALL_MASK syn keyword xsConstant G_WARN_ALL_OFF G_WARN_ALL_ON G_WARN_OFF G_WARN_ON syn keyword xsConstant G_WARN_ONCE G_WRITING_TO_STDERR OA_AVREF OA_BASEOP syn keyword xsConstant OA_BASEOP_OR_UNOP OA_BINOP OA_CLASS_MASK OA_COP syn keyword xsConstant OA_CVREF OA_DANGEROUS OA_DEFGV OA_FILEREF syn keyword xsConstant OA_FILESTATOP OA_FOLDCONST OA_HVREF OA_LIST OA_LISTOP syn keyword xsConstant OA_LOGOP OA_LOOP OA_LOOPEXOP OA_MARK OA_METHOP syn keyword xsConstant OA_OPTIONAL OA_OTHERINT OA_PADOP OA_PMOP syn keyword xsConstant OA_PVOP_OR_SVOP OA_RETSCALAR OA_SCALAR OA_SCALARREF syn keyword xsConstant OA_SVOP OA_TARGET OA_TARGLEX OA_UNOP OA_UNOP_AUX syn keyword xsConstant OP_AASSIGN OP_ABS OP_ACCEPT OP_ADD OP_AEACH OP_AELEM syn keyword xsConstant OP_AELEMFAST OP_AELEMFAST_LEX OP_AKEYS OP_ALARM OP_AND syn keyword xsConstant OP_ANDASSIGN OP_ANONCODE OP_ANONCONST OP_ANONHASH syn keyword xsConstant OP_ANONLIST OP_ASLICE OP_ATAN2 OP_AV2ARYLEN OP_AVALUES syn keyword xsConstant OP_BACKTICK OP_BIND OP_BINMODE OP_BIT_AND OP_BIT_OR syn keyword xsConstant OP_BIT_XOR OP_BLESS OP_BREAK OP_CALLER OP_CHDIR syn keyword xsConstant OP_CHMOD OP_CHOMP OP_CHOP OP_CHOWN OP_CHR OP_CHROOT syn keyword xsConstant OP_CLONECV OP_CLOSE OP_CLOSEDIR OP_COMPLEMENT syn keyword xsConstant OP_CONCAT OP_COND_EXPR OP_CONNECT OP_CONST OP_CONTINUE syn keyword xsConstant OP_COREARGS OP_COS OP_CRYPT OP_CUSTOM OP_DBMCLOSE syn keyword xsConstant OP_DBMOPEN OP_DBSTATE OP_DEFINED OP_DELETE OP_DIE syn keyword xsConstant OP_DIVIDE OP_DOFILE OP_DOR OP_DORASSIGN OP_DUMP syn keyword xsConstant OP_EACH OP_EGRENT OP_EHOSTENT OP_ENETENT OP_ENTER syn keyword xsConstant OP_ENTEREVAL OP_ENTERGIVEN OP_ENTERITER OP_ENTERLOOP syn keyword xsConstant OP_ENTERSUB OP_ENTERTRY OP_ENTERWHEN OP_ENTERWRITE syn keyword xsConstant OP_EOF OP_EPROTOENT OP_EPWENT OP_EQ OP_ESERVENT syn keyword xsConstant OP_EXEC OP_EXISTS OP_EXIT OP_EXP OP_FC OP_FCNTL syn keyword xsConstant OP_FILENO OP_FLIP OP_FLOCK OP_FLOP OP_FORK OP_FORMLINE syn keyword xsConstant OP_FTATIME OP_FTBINARY OP_FTBLK OP_FTCHR OP_FTCTIME syn keyword xsConstant OP_FTDIR OP_FTEEXEC OP_FTEOWNED OP_FTEREAD OP_FTEWRITE syn keyword xsConstant OP_FTFILE OP_FTIS OP_FTLINK OP_FTMTIME OP_FTPIPE syn keyword xsConstant OP_FTREXEC OP_FTROWNED OP_FTRREAD OP_FTRWRITE syn keyword xsConstant OP_FTSGID OP_FTSIZE OP_FTSOCK OP_FTSUID OP_FTSVTX syn keyword xsConstant OP_FTTEXT OP_FTTTY OP_FTZERO OP_GE OP_GELEM OP_GETC syn keyword xsConstant OP_GETLOGIN OP_GETPEERNAME OP_GETPGRP OP_GETPPID syn keyword xsConstant OP_GETPRIORITY OP_GETSOCKNAME OP_GGRENT OP_GGRGID syn keyword xsConstant OP_GGRNAM OP_GHBYADDR OP_GHBYNAME OP_GHOSTENT OP_GLOB syn keyword xsConstant OP_GMTIME OP_GNBYADDR OP_GNBYNAME OP_GNETENT OP_GOTO syn keyword xsConstant OP_GPBYNAME OP_GPBYNUMBER OP_GPROTOENT OP_GPWENT syn keyword xsConstant OP_GPWNAM OP_GPWUID OP_GREPSTART OP_GREPWHILE syn keyword xsConstant OP_GSBYNAME OP_GSBYPORT OP_GSERVENT OP_GSOCKOPT OP_GT syn keyword xsConstant OP_GV OP_GVSV OP_HELEM OP_HEX OP_HINTSEVAL OP_HSLICE syn keyword xsConstant OP_INDEX OP_INT OP_INTROCV OP_IOCTL OP_ITER OP_I_ADD syn keyword xsConstant OP_I_DIVIDE OP_I_EQ OP_I_GE OP_I_GT OP_I_LE OP_I_LT syn keyword xsConstant OP_I_MODULO OP_I_MULTIPLY OP_I_NCMP OP_I_NE syn keyword xsConstant OP_I_NEGATE OP_I_POSTDEC OP_I_POSTINC OP_I_PREDEC syn keyword xsConstant OP_I_PREINC OP_I_SUBTRACT OP_JOIN OP_KEYS OP_KILL syn keyword xsConstant OP_KVASLICE OP_KVHSLICE OP_LAST OP_LC OP_LCFIRST OP_LE syn keyword xsConstant OP_LEAVE OP_LEAVEEVAL OP_LEAVEGIVEN OP_LEAVELOOP syn keyword xsConstant OP_LEAVESUB OP_LEAVESUBLV OP_LEAVETRY OP_LEAVEWHEN syn keyword xsConstant OP_LEAVEWRITE OP_LEFT_SHIFT OP_LENGTH OP_LINESEQ syn keyword xsConstant OP_LINK OP_LIST OP_LISTEN OP_LOCALTIME OP_LOCK OP_LOG syn keyword xsConstant OP_LSLICE OP_LSTAT OP_LT OP_LVAVREF OP_LVREF syn keyword xsConstant OP_LVREFSLICE OP_MAPSTART OP_MAPWHILE OP_MATCH syn keyword xsConstant OP_METHOD OP_METHOD_NAMED OP_METHOD_REDIR syn keyword xsConstant OP_METHOD_REDIR_SUPER OP_METHOD_SUPER OP_MKDIR syn keyword xsConstant OP_MODULO OP_MSGCTL OP_MSGGET OP_MSGRCV OP_MSGSND syn keyword xsConstant OP_MULTIDEREF OP_MULTIPLY OP_NBIT_AND OP_NBIT_OR syn keyword xsConstant OP_NBIT_XOR OP_NCMP OP_NCOMPLEMENT OP_NE OP_NEGATE syn keyword xsConstant OP_NEXT OP_NEXTSTATE OP_NOT OP_NULL OP_OCT OP_ONCE syn keyword xsConstant OP_OPEN OP_OPEN_DIR OP_OR OP_ORASSIGN OP_ORD OP_PACK syn keyword xsConstant OP_PADANY OP_PADAV OP_PADCV OP_PADHV OP_PADRANGE syn keyword xsConstant OP_PADSV OP_PIPE_OP OP_POP OP_POS OP_POSTDEC syn keyword xsConstant OP_POSTINC OP_POW OP_PREDEC OP_PREINC OP_PRINT syn keyword xsConstant OP_PROTOTYPE OP_PRTF OP_PUSH OP_PUSHMARK OP_PUSHRE syn keyword xsConstant OP_QR OP_QUOTEMETA OP_RAND OP_RANGE OP_RCATLINE syn keyword xsConstant OP_REACH OP_READ OP_READDIR OP_READLINE OP_READLINK syn keyword xsConstant OP_RECV OP_REDO OP_REF OP_REFASSIGN OP_REFGEN syn keyword xsConstant OP_REGCMAYBE OP_REGCOMP OP_REGCRESET OP_RENAME syn keyword xsConstant OP_REPEAT OP_REQUIRE OP_RESET OP_RETURN OP_REVERSE syn keyword xsConstant OP_REWINDDIR OP_RIGHT_SHIFT OP_RINDEX OP_RKEYS syn keyword xsConstant OP_RMDIR OP_RUNCV OP_RV2AV OP_RV2CV OP_RV2GV OP_RV2HV syn keyword xsConstant OP_RV2SV OP_RVALUES OP_SASSIGN OP_SAY OP_SBIT_AND syn keyword xsConstant OP_SBIT_OR OP_SBIT_XOR OP_SCALAR OP_SCHOMP OP_SCHOP syn keyword xsConstant OP_SCMP OP_SCOMPLEMENT OP_SCOPE OP_SEEK OP_SEEKDIR syn keyword xsConstant OP_SELECT OP_SEMCTL OP_SEMGET OP_SEMOP OP_SEND OP_SEQ syn keyword xsConstant OP_SETPGRP OP_SETPRIORITY OP_SGE OP_SGRENT OP_SGT syn keyword xsConstant OP_SHIFT OP_SHMCTL OP_SHMGET OP_SHMREAD OP_SHMWRITE syn keyword xsConstant OP_SHOSTENT OP_SHUTDOWN OP_SIN OP_SLE OP_SLEEP OP_SLT syn keyword xsConstant OP_SMARTMATCH OP_SNE OP_SNETENT OP_SOCKET OP_SOCKPAIR syn keyword xsConstant OP_SORT OP_SPLICE OP_SPLIT OP_SPRINTF OP_SPROTOENT syn keyword xsConstant OP_SPWENT OP_SQRT OP_SRAND OP_SREFGEN OP_SSELECT syn keyword xsConstant OP_SSERVENT OP_SSOCKOPT OP_STAT OP_STRINGIFY OP_STUB syn keyword xsConstant OP_STUDY OP_SUBST OP_SUBSTCONT OP_SUBSTR OP_SUBTRACT syn keyword xsConstant OP_SYMLINK OP_SYSCALL OP_SYSOPEN OP_SYSREAD OP_SYSSEEK syn keyword xsConstant OP_SYSTEM OP_SYSWRITE OP_TELL OP_TELLDIR OP_TIE syn keyword xsConstant OP_TIED OP_TIME OP_TMS OP_TRANS OP_TRANSR OP_TRUNCATE syn keyword xsConstant OP_UC OP_UCFIRST OP_UMASK OP_UNDEF OP_UNLINK OP_UNPACK syn keyword xsConstant OP_UNSHIFT OP_UNSTACK OP_UNTIE OP_UTIME OP_VALUES syn keyword xsConstant OP_VEC OP_WAIT OP_WAITPID OP_WANTARRAY OP_WARN OP_XOR syn keyword xsConstant OP_max OPf_FOLDED OPf_KIDS OPf_KNOW OPf_LIST OPf_MOD syn keyword xsConstant OPf_PARENS OPf_REF OPf_SPECIAL OPf_STACKED OPf_WANT syn keyword xsConstant OPf_WANT_LIST OPf_WANT_SCALAR OPf_WANT_VOID syn keyword xsConstant OPpALLOW_FAKE OPpARG1_MASK OPpARG2_MASK OPpARG3_MASK syn keyword xsConstant OPpARG4_MASK OPpASSIGN_BACKWARDS OPpASSIGN_COMMON syn keyword xsConstant OPpASSIGN_CV_TO_GV OPpCONST_BARE OPpCONST_ENTERED syn keyword xsConstant OPpCONST_NOVER OPpCONST_SHORTCIRCUIT OPpCONST_STRICT syn keyword xsConstant OPpCOREARGS_DEREF1 OPpCOREARGS_DEREF2 syn keyword xsConstant OPpCOREARGS_PUSHMARK OPpCOREARGS_SCALARMOD OPpDEREF syn keyword xsConstant OPpDEREF_AV OPpDEREF_HV OPpDEREF_SV OPpDONT_INIT_GV syn keyword xsConstant OPpEARLY_CV OPpENTERSUB_AMPER OPpENTERSUB_DB syn keyword xsConstant OPpENTERSUB_HASTARG OPpENTERSUB_INARGS syn keyword xsConstant OPpENTERSUB_LVAL_MASK OPpENTERSUB_NOPAREN syn keyword xsConstant OPpEVAL_BYTES OPpEVAL_COPHH OPpEVAL_HAS_HH syn keyword xsConstant OPpEVAL_RE_REPARSING OPpEVAL_UNICODE OPpEXISTS_SUB syn keyword xsConstant OPpFLIP_LINENUM OPpFT_ACCESS OPpFT_AFTER_t syn keyword xsConstant OPpFT_STACKED OPpFT_STACKING OPpGREP_LEX syn keyword xsConstant OPpHINT_STRICT_REFS OPpHUSH_VMSISH OPpITER_DEF syn keyword xsConstant OPpITER_REVERSED OPpLIST_GUESSED OPpLVALUE syn keyword xsConstant OPpLVAL_DEFER OPpLVAL_INTRO OPpLVREF_AV OPpLVREF_CV syn keyword xsConstant OPpLVREF_ELEM OPpLVREF_HV OPpLVREF_ITER OPpLVREF_SV syn keyword xsConstant OPpLVREF_TYPE OPpMAYBE_LVSUB OPpMAYBE_TRUEBOOL syn keyword xsConstant OPpMAY_RETURN_CONSTANT OPpMULTIDEREF_DELETE syn keyword xsConstant OPpMULTIDEREF_EXISTS OPpOFFBYONE OPpOPEN_IN_CRLF syn keyword xsConstant OPpOPEN_IN_RAW OPpOPEN_OUT_CRLF OPpOPEN_OUT_RAW syn keyword xsConstant OPpOUR_INTRO OPpPADRANGE_COUNTMASK syn keyword xsConstant OPpPADRANGE_COUNTSHIFT OPpPAD_STATE OPpPV_IS_UTF8 syn keyword xsConstant OPpREFCOUNTED OPpREPEAT_DOLIST OPpREVERSE_INPLACE syn keyword xsConstant OPpRUNTIME OPpSLICE OPpSLICEWARNING OPpSORT_DESCEND syn keyword xsConstant OPpSORT_INPLACE OPpSORT_INTEGER OPpSORT_NUMERIC syn keyword xsConstant OPpSORT_QSORT OPpSORT_REVERSE OPpSORT_STABLE syn keyword xsConstant OPpSPLIT_IMPLIM OPpSUBSTR_REPL_FIRST OPpTARGET_MY syn keyword xsConstant OPpTRANS_ALL OPpTRANS_COMPLEMENT OPpTRANS_DELETE syn keyword xsConstant OPpTRANS_FROM_UTF OPpTRANS_GROWS OPpTRANS_IDENTICAL syn keyword xsConstant OPpTRANS_SQUASH OPpTRANS_TO_UTF OPpTRUEBOOL syn keyword xsConstant PERL_MAGIC_READONLY_ACCEPTABLE syn keyword xsConstant PERL_MAGIC_TYPE_IS_VALUE_MAGIC syn keyword xsConstant PERL_MAGIC_TYPE_READONLY_ACCEPTABLE syn keyword xsConstant PERL_MAGIC_UTF8_CACHESIZE PERL_MAGIC_VALUE_MAGIC syn keyword xsConstant PERL_MAGIC_VTABLE_MASK PERL_MAGIC_arylen syn keyword xsConstant PERL_MAGIC_arylen_p PERL_MAGIC_backref PERL_MAGIC_bm syn keyword xsConstant PERL_MAGIC_checkcall PERL_MAGIC_collxfrm syn keyword xsConstant PERL_MAGIC_dbfile PERL_MAGIC_dbline syn keyword xsConstant PERL_MAGIC_debugvar PERL_MAGIC_defelem PERL_MAGIC_env syn keyword xsConstant PERL_MAGIC_envelem PERL_MAGIC_ext PERL_MAGIC_fm syn keyword xsConstant PERL_MAGIC_hints PERL_MAGIC_hintselem PERL_MAGIC_isa syn keyword xsConstant PERL_MAGIC_isaelem PERL_MAGIC_lvref PERL_MAGIC_nkeys syn keyword xsConstant PERL_MAGIC_overload_table PERL_MAGIC_pos PERL_MAGIC_qr syn keyword xsConstant PERL_MAGIC_regdata PERL_MAGIC_regdatum syn keyword xsConstant PERL_MAGIC_regex_global PERL_MAGIC_rhash syn keyword xsConstant PERL_MAGIC_shared PERL_MAGIC_shared_scalar syn keyword xsConstant PERL_MAGIC_sig PERL_MAGIC_sigelem PERL_MAGIC_substr syn keyword xsConstant PERL_MAGIC_sv PERL_MAGIC_symtab PERL_MAGIC_taint syn keyword xsConstant PERL_MAGIC_tied PERL_MAGIC_tiedelem syn keyword xsConstant PERL_MAGIC_tiedscalar PERL_MAGIC_utf8 PERL_MAGIC_uvar syn keyword xsConstant PERL_MAGIC_uvar_elem PERL_MAGIC_vec PERL_MAGIC_vstring syn keyword xsConstant REGEX_ASCII_MORE_RESTRICTED_CHARSET syn keyword xsConstant REGEX_ASCII_RESTRICTED_CHARSET REGEX_DEPENDS_CHARSET syn keyword xsConstant REGEX_LOCALE_CHARSET REGEX_UNICODE_CHARSET SB_ATerm syn keyword xsConstant SB_BOUND SB_CR SB_Close SB_EDGE SB_Extend SB_Format syn keyword xsConstant SB_LF SB_Lower SB_Numeric SB_OLetter SB_Other syn keyword xsConstant SB_SContinue SB_STerm SB_Sep SB_Sp SB_Upper SVfARG syn keyword xsConstant SVf_AMAGIC SVf_BREAK SVf_FAKE SVf_IOK SVf_IVisUV syn keyword xsConstant SVf_IsCOW SVf_NOK SVf_OK SVf_OOK SVf_POK SVf_PROTECT syn keyword xsConstant SVf_READONLY SVf_ROK SVf_THINKFIRST SVf_UTF8 SVp_IOK syn keyword xsConstant SVp_NOK SVp_POK SVp_SCREAM SVpad_OUR SVpad_STATE syn keyword xsConstant SVpad_TYPED SVpav_REAL SVpav_REIFY SVpbm_TAIL syn keyword xsConstant SVpbm_VALID SVpgv_GP SVphv_CLONEABLE SVphv_HASKFLAGS syn keyword xsConstant SVphv_LAZYDEL SVphv_SHAREKEYS SVprv_PCS_IMPORTED syn keyword xsConstant SVprv_WEAKREF SVs_GMG SVs_OBJECT SVs_PADMY syn keyword xsConstant SVs_PADSTALE SVs_PADTMP SVs_RMG SVs_SMG SVs_TEMP syn keyword xsConstant SVt_INVLIST SVt_IV SVt_LAST SVt_NULL SVt_NV SVt_PV syn keyword xsConstant SVt_PVAV SVt_PVBM SVt_PVCV SVt_PVFM SVt_PVGV SVt_PVHV syn keyword xsConstant SVt_PVIO SVt_PVIV SVt_PVLV SVt_PVMG SVt_PVNV syn keyword xsConstant SVt_REGEXP SVt_RV TRADITIONAL_BOUND WB_ALetter syn keyword xsConstant WB_BOUND WB_CR WB_Double_Quote WB_EDGE WB_Extend syn keyword xsConstant WB_ExtendNumLet WB_Format WB_Hebrew_Letter WB_Katakana syn keyword xsConstant WB_LF WB_MidLetter WB_MidNum WB_MidNumLet WB_Newline syn keyword xsConstant WB_Numeric WB_Other WB_Regional_Indicator syn keyword xsConstant WB_Single_Quote WB_UNKNOWN XATTRBLOCK XATTRTERM XBLOCK syn keyword xsConstant XBLOCKTERM XOPERATOR XOPe_xop_class XOPe_xop_desc syn keyword xsConstant XOPe_xop_name XOPe_xop_peep XOPe_xop_ptr XPOSTDEREF syn keyword xsConstant XREF XSTATE XTERM XTERMBLOCK XTERMORDORDOR syn keyword xsConstant _CC_ENUM_ALPHA _CC_ENUM_ALPHANUMERIC _CC_ENUM_ASCII syn keyword xsConstant _CC_ENUM_BLANK _CC_ENUM_CASED _CC_ENUM_CNTRL syn keyword xsConstant _CC_ENUM_DIGIT _CC_ENUM_GRAPH _CC_ENUM_LOWER syn keyword xsConstant _CC_ENUM_PRINT _CC_ENUM_PUNCT _CC_ENUM_SPACE syn keyword xsConstant _CC_ENUM_UPPER _CC_ENUM_VERTSPACE _CC_ENUM_WORDCHAR syn keyword xsConstant _CC_ENUM_XDIGIT padtidy_FORMAT padtidy_SUB syn keyword xsConstant padtidy_SUBCLONE syn keyword xsException XCPT_CATCH XCPT_RETHROW XCPT_TRY_END XCPT_TRY_START syn keyword xsException dXCPT syn keyword xsKeyword ALIAS: BOOT: CASE: CLEANUP: CODE: C_ARGS: DISABLE syn keyword xsKeyword ENABLE FALLBACK: IN INCLUDE: INIT: INPUT: INTERFACE: syn keyword xsKeyword INTERFACE_MACRO: IN_OUT IN_OUTLIST MODULE NO_INIT: syn keyword xsKeyword NO_OUTPUT: OUT OUTLIST OUTPUT: OVERLOAD: PACKAGE syn keyword xsKeyword POSTCALL: PPCODE: PREFIX PREINIT: PROTOTYPE: syn keyword xsKeyword PROTOTYPES: REQUIRE: SCOPE: VERSIONCHECK: length syn keyword xsFunction GetVars Gv_AMupdate PerlIO_clearerr PerlIO_close syn keyword xsFunction PerlIO_eof PerlIO_error PerlIO_fileno PerlIO_fill syn keyword xsFunction PerlIO_flush PerlIO_get_base PerlIO_get_bufsiz syn keyword xsFunction PerlIO_get_cnt PerlIO_get_ptr PerlIO_read PerlIO_seek syn keyword xsFunction PerlIO_set_cnt PerlIO_set_ptrcnt PerlIO_setlinebuf syn keyword xsFunction PerlIO_stderr PerlIO_stdin PerlIO_stdout PerlIO_tell syn keyword xsFunction PerlIO_unread PerlIO_write Perl_GetVars syn keyword xsFunction Perl_Gv_AMupdate Perl_PerlIO_clearerr syn keyword xsFunction Perl_PerlIO_close Perl_PerlIO_context_layers syn keyword xsFunction Perl_PerlIO_eof Perl_PerlIO_error Perl_PerlIO_fileno syn keyword xsFunction Perl_PerlIO_fill Perl_PerlIO_flush syn keyword xsFunction Perl_PerlIO_get_base Perl_PerlIO_get_bufsiz syn keyword xsFunction Perl_PerlIO_get_cnt Perl_PerlIO_get_ptr syn keyword xsFunction Perl_PerlIO_read Perl_PerlIO_seek Perl_PerlIO_set_cnt syn keyword xsFunction Perl_PerlIO_set_ptrcnt Perl_PerlIO_setlinebuf syn keyword xsFunction Perl_PerlIO_stderr Perl_PerlIO_stdin syn keyword xsFunction Perl_PerlIO_stdout Perl_PerlIO_tell Perl_PerlIO_unread syn keyword xsFunction Perl_PerlIO_write Perl__get_regclass_nonbitmap_data syn keyword xsFunction Perl__is_cur_LC_category_utf8 syn keyword xsFunction Perl__is_in_locale_category Perl__is_uni_FOO syn keyword xsFunction Perl__is_uni_perl_idcont Perl__is_uni_perl_idstart syn keyword xsFunction Perl__is_utf8_FOO Perl__is_utf8_idcont syn keyword xsFunction Perl__is_utf8_idstart Perl__is_utf8_mark syn keyword xsFunction Perl__is_utf8_perl_idcont Perl__is_utf8_perl_idstart syn keyword xsFunction Perl__is_utf8_xidcont Perl__is_utf8_xidstart syn keyword xsFunction Perl__new_invlist_C_array Perl__to_uni_fold_flags syn keyword xsFunction Perl__to_utf8_fold_flags Perl__to_utf8_lower_flags syn keyword xsFunction Perl__to_utf8_title_flags Perl__to_utf8_upper_flags syn keyword xsFunction Perl_alloccopstash Perl_amagic_call syn keyword xsFunction Perl_amagic_deref_call Perl_any_dup syn keyword xsFunction Perl_apply_attrs_string Perl_atfork_lock syn keyword xsFunction Perl_atfork_unlock Perl_av_arylen_p Perl_av_clear syn keyword xsFunction Perl_av_create_and_push Perl_av_create_and_unshift_one syn keyword xsFunction Perl_av_delete Perl_av_exists Perl_av_extend syn keyword xsFunction Perl_av_fetch Perl_av_fill Perl_av_iter_p Perl_av_len syn keyword xsFunction Perl_av_make Perl_av_pop Perl_av_push Perl_av_shift syn keyword xsFunction Perl_av_store Perl_av_undef Perl_av_unshift syn keyword xsFunction Perl_block_end Perl_block_gimme Perl_block_start syn keyword xsFunction Perl_blockhook_register Perl_bytes_cmp_utf8 syn keyword xsFunction Perl_bytes_from_utf8 Perl_bytes_to_utf8 Perl_call_argv syn keyword xsFunction Perl_call_atexit Perl_call_list Perl_call_method syn keyword xsFunction Perl_call_pv Perl_call_sv Perl_caller_cx Perl_calloc syn keyword xsFunction Perl_cast_i32 Perl_cast_iv Perl_cast_ulong syn keyword xsFunction Perl_cast_uv Perl_ck_entersub_args_list syn keyword xsFunction Perl_ck_entersub_args_proto syn keyword xsFunction Perl_ck_entersub_args_proto_or_list Perl_ck_warner syn keyword xsFunction Perl_ck_warner_d Perl_ckwarn Perl_ckwarn_d syn keyword xsFunction Perl_clone_params_del Perl_clone_params_new syn keyword xsFunction Perl_cop_fetch_label Perl_cop_store_label Perl_croak syn keyword xsFunction Perl_croak_no_modify Perl_croak_nocontext syn keyword xsFunction Perl_croak_sv Perl_croak_xs_usage Perl_csighandler syn keyword xsFunction Perl_custom_op_desc Perl_custom_op_name syn keyword xsFunction Perl_custom_op_register Perl_cv_clone Perl_cv_const_sv syn keyword xsFunction Perl_cv_get_call_checker Perl_cv_name syn keyword xsFunction Perl_cv_set_call_checker syn keyword xsFunction Perl_cv_set_call_checker_flags Perl_cv_undef syn keyword xsFunction Perl_cx_dump Perl_cx_dup Perl_cxinc Perl_deb syn keyword xsFunction Perl_deb_nocontext Perl_debop Perl_debprofdump syn keyword xsFunction Perl_debstack Perl_debstackptrs Perl_delimcpy syn keyword xsFunction Perl_despatch_signals Perl_die Perl_die_nocontext syn keyword xsFunction Perl_die_sv Perl_dirp_dup Perl_do_aspawn syn keyword xsFunction Perl_do_binmode Perl_do_close Perl_do_gv_dump syn keyword xsFunction Perl_do_gvgv_dump Perl_do_hv_dump Perl_do_join syn keyword xsFunction Perl_do_magic_dump Perl_do_op_dump Perl_do_open9 syn keyword xsFunction Perl_do_openn Perl_do_pmop_dump Perl_do_spawn syn keyword xsFunction Perl_do_spawn_nowait Perl_do_sprintf Perl_do_sv_dump syn keyword xsFunction Perl_doing_taint Perl_doref Perl_dounwind syn keyword xsFunction Perl_dowantarray Perl_dump_all Perl_dump_c_backtrace syn keyword xsFunction Perl_dump_eval Perl_dump_form Perl_dump_indent syn keyword xsFunction Perl_dump_mstats Perl_dump_packsubs Perl_dump_sub syn keyword xsFunction Perl_dump_vindent Perl_eval_pv Perl_eval_sv syn keyword xsFunction Perl_fbm_compile Perl_fbm_instr Perl_filter_add syn keyword xsFunction Perl_filter_del Perl_filter_read Perl_find_runcv syn keyword xsFunction Perl_find_rundefsv Perl_foldEQ Perl_foldEQ_latin1 syn keyword xsFunction Perl_foldEQ_locale Perl_foldEQ_utf8_flags Perl_form syn keyword xsFunction Perl_form_nocontext Perl_fp_dup Perl_fprintf_nocontext syn keyword xsFunction Perl_free_global_struct Perl_free_tmps Perl_get_av syn keyword xsFunction Perl_get_c_backtrace_dump Perl_get_context Perl_get_cv syn keyword xsFunction Perl_get_cvn_flags Perl_get_hv Perl_get_mstats syn keyword xsFunction Perl_get_op_descs Perl_get_op_names Perl_get_ppaddr syn keyword xsFunction Perl_get_sv Perl_get_vtbl Perl_getcwd_sv Perl_gp_dup syn keyword xsFunction Perl_gp_free Perl_gp_ref Perl_grok_bin Perl_grok_hex syn keyword xsFunction Perl_grok_infnan Perl_grok_number syn keyword xsFunction Perl_grok_number_flags Perl_grok_numeric_radix syn keyword xsFunction Perl_grok_oct Perl_gv_add_by_type Perl_gv_autoload_pv syn keyword xsFunction Perl_gv_autoload_pvn Perl_gv_autoload_sv Perl_gv_check syn keyword xsFunction Perl_gv_const_sv Perl_gv_dump Perl_gv_efullname syn keyword xsFunction Perl_gv_efullname4 Perl_gv_fetchfile syn keyword xsFunction Perl_gv_fetchfile_flags Perl_gv_fetchmeth_pv syn keyword xsFunction Perl_gv_fetchmeth_pv_autoload Perl_gv_fetchmeth_pvn syn keyword xsFunction Perl_gv_fetchmeth_pvn_autoload Perl_gv_fetchmeth_sv syn keyword xsFunction Perl_gv_fetchmeth_sv_autoload syn keyword xsFunction Perl_gv_fetchmethod_autoload syn keyword xsFunction Perl_gv_fetchmethod_pv_flags syn keyword xsFunction Perl_gv_fetchmethod_pvn_flags syn keyword xsFunction Perl_gv_fetchmethod_sv_flags Perl_gv_fetchpv syn keyword xsFunction Perl_gv_fetchpvn_flags Perl_gv_fetchsv syn keyword xsFunction Perl_gv_fullname Perl_gv_fullname4 Perl_gv_handler syn keyword xsFunction Perl_gv_init_pv Perl_gv_init_pvn Perl_gv_init_sv syn keyword xsFunction Perl_gv_name_set Perl_gv_stashpv Perl_gv_stashpvn syn keyword xsFunction Perl_gv_stashsv Perl_he_dup Perl_hek_dup syn keyword xsFunction Perl_hv_assert Perl_hv_clear syn keyword xsFunction Perl_hv_clear_placeholders Perl_hv_common syn keyword xsFunction Perl_hv_common_key_len Perl_hv_copy_hints_hv syn keyword xsFunction Perl_hv_delayfree_ent Perl_hv_eiter_p syn keyword xsFunction Perl_hv_eiter_set Perl_hv_fill Perl_hv_free_ent syn keyword xsFunction Perl_hv_iterinit Perl_hv_iterkey Perl_hv_iterkeysv syn keyword xsFunction Perl_hv_iternext_flags Perl_hv_iternextsv syn keyword xsFunction Perl_hv_iterval Perl_hv_ksplit Perl_hv_name_set syn keyword xsFunction Perl_hv_placeholders_get Perl_hv_placeholders_set syn keyword xsFunction Perl_hv_rand_set Perl_hv_riter_p Perl_hv_riter_set syn keyword xsFunction Perl_hv_scalar Perl_init_global_struct syn keyword xsFunction Perl_init_i18nl10n Perl_init_i18nl14n Perl_init_stacks syn keyword xsFunction Perl_init_tm Perl_instr Perl_intro_my syn keyword xsFunction Perl_is_invariant_string Perl_is_lvalue_sub syn keyword xsFunction Perl_is_utf8_string Perl_is_utf8_string_loclen syn keyword xsFunction Perl_isinfnan Perl_leave_scope Perl_lex_bufutf8 syn keyword xsFunction Perl_lex_discard_to Perl_lex_grow_linestr syn keyword xsFunction Perl_lex_next_chunk Perl_lex_peek_unichar syn keyword xsFunction Perl_lex_read_space Perl_lex_read_to syn keyword xsFunction Perl_lex_read_unichar Perl_lex_start Perl_lex_stuff_pv syn keyword xsFunction Perl_lex_stuff_pvn Perl_lex_stuff_sv Perl_lex_unstuff syn keyword xsFunction Perl_load_module Perl_load_module_nocontext syn keyword xsFunction Perl_looks_like_number Perl_magic_dump Perl_malloc syn keyword xsFunction Perl_markstack_grow Perl_mess Perl_mess_nocontext syn keyword xsFunction Perl_mess_sv Perl_mfree Perl_mg_clear Perl_mg_copy syn keyword xsFunction Perl_mg_dup Perl_mg_find Perl_mg_findext Perl_mg_free syn keyword xsFunction Perl_mg_free_type Perl_mg_get Perl_mg_magical syn keyword xsFunction Perl_mg_set Perl_mg_size Perl_mini_mktime syn keyword xsFunction Perl_moreswitches Perl_mro_get_from_name syn keyword xsFunction Perl_mro_get_linear_isa Perl_mro_get_private_data syn keyword xsFunction Perl_mro_method_changed_in Perl_mro_register syn keyword xsFunction Perl_mro_set_mro Perl_mro_set_private_data syn keyword xsFunction Perl_my_atof Perl_my_atof2 Perl_my_bcopy Perl_my_bzero syn keyword xsFunction Perl_my_chsize Perl_my_cxt_index Perl_my_cxt_init syn keyword xsFunction Perl_my_dirfd Perl_my_exit Perl_my_failure_exit syn keyword xsFunction Perl_my_fflush_all Perl_my_fork Perl_my_memcmp syn keyword xsFunction Perl_my_memset Perl_my_pclose Perl_my_popen syn keyword xsFunction Perl_my_popen_list Perl_my_setenv Perl_my_setlocale syn keyword xsFunction Perl_my_snprintf Perl_my_socketpair Perl_my_sprintf syn keyword xsFunction Perl_my_strerror Perl_my_strftime Perl_my_strlcat syn keyword xsFunction Perl_my_strlcpy Perl_my_vsnprintf Perl_newANONATTRSUB syn keyword xsFunction Perl_newANONHASH Perl_newANONLIST Perl_newANONSUB syn keyword xsFunction Perl_newASSIGNOP Perl_newAVREF Perl_newBINOP syn keyword xsFunction Perl_newCONDOP Perl_newCONSTSUB Perl_newCONSTSUB_flags syn keyword xsFunction Perl_newCVREF Perl_newDEFSVOP Perl_newFORM syn keyword xsFunction Perl_newFOROP Perl_newGIVENOP Perl_newGVOP syn keyword xsFunction Perl_newGVREF Perl_newGVgen_flags Perl_newHVREF syn keyword xsFunction Perl_newHVhv Perl_newLISTOP Perl_newLOGOP syn keyword xsFunction Perl_newLOOPEX Perl_newLOOPOP Perl_newMETHOP syn keyword xsFunction Perl_newMETHOP_named Perl_newMYSUB Perl_newNULLLIST syn keyword xsFunction Perl_newOP Perl_newPADNAMELIST Perl_newPADNAMEouter syn keyword xsFunction Perl_newPADNAMEpvn Perl_newPADOP Perl_newPMOP syn keyword xsFunction Perl_newPROG Perl_newPVOP Perl_newRANGE Perl_newRV syn keyword xsFunction Perl_newRV_noinc Perl_newSLICEOP Perl_newSTATEOP syn keyword xsFunction Perl_newSV Perl_newSVOP Perl_newSVREF Perl_newSV_type syn keyword xsFunction Perl_newSVhek Perl_newSViv Perl_newSVnv Perl_newSVpv syn keyword xsFunction Perl_newSVpv_share Perl_newSVpvf syn keyword xsFunction Perl_newSVpvf_nocontext Perl_newSVpvn syn keyword xsFunction Perl_newSVpvn_flags Perl_newSVpvn_share Perl_newSVrv syn keyword xsFunction Perl_newSVsv Perl_newSVuv Perl_newUNOP syn keyword xsFunction Perl_newUNOP_AUX Perl_newWHENOP Perl_newWHILEOP syn keyword xsFunction Perl_newXS Perl_newXS_flags Perl_new_collate syn keyword xsFunction Perl_new_ctype Perl_new_numeric Perl_new_stackinfo syn keyword xsFunction Perl_new_version Perl_ninstr Perl_nothreadhook syn keyword xsFunction Perl_op_append_elem Perl_op_append_list syn keyword xsFunction Perl_op_contextualize Perl_op_convert_list syn keyword xsFunction Perl_op_dump Perl_op_free Perl_op_linklist syn keyword xsFunction Perl_op_null Perl_op_parent Perl_op_prepend_elem syn keyword xsFunction Perl_op_refcnt_lock Perl_op_refcnt_unlock syn keyword xsFunction Perl_op_scope Perl_op_sibling_splice Perl_pack_cat syn keyword xsFunction Perl_packlist Perl_pad_add_anon Perl_pad_add_name_pv syn keyword xsFunction Perl_pad_add_name_pvn Perl_pad_add_name_sv syn keyword xsFunction Perl_pad_alloc Perl_pad_compname_type syn keyword xsFunction Perl_pad_findmy_pv Perl_pad_findmy_pvn syn keyword xsFunction Perl_pad_findmy_sv Perl_pad_new Perl_pad_setsv syn keyword xsFunction Perl_pad_sv Perl_pad_tidy Perl_padnamelist_fetch syn keyword xsFunction Perl_padnamelist_store Perl_parse_arithexpr syn keyword xsFunction Perl_parse_barestmt Perl_parse_block syn keyword xsFunction Perl_parse_fullexpr Perl_parse_fullstmt syn keyword xsFunction Perl_parse_label Perl_parse_listexpr syn keyword xsFunction Perl_parse_stmtseq Perl_parse_termexpr Perl_parser_dup syn keyword xsFunction Perl_pmop_dump Perl_pop_scope Perl_pregcomp syn keyword xsFunction Perl_pregexec Perl_pregfree Perl_pregfree2 syn keyword xsFunction Perl_prescan_version Perl_printf_nocontext syn keyword xsFunction Perl_ptr_table_fetch Perl_ptr_table_free syn keyword xsFunction Perl_ptr_table_new Perl_ptr_table_split syn keyword xsFunction Perl_ptr_table_store Perl_push_scope Perl_pv_display syn keyword xsFunction Perl_pv_escape Perl_pv_pretty Perl_pv_uni_display syn keyword xsFunction Perl_quadmath_format_needed syn keyword xsFunction Perl_quadmath_format_single Perl_re_compile syn keyword xsFunction Perl_re_dup_guts Perl_re_intuit_start syn keyword xsFunction Perl_re_intuit_string Perl_realloc Perl_reentrant_free syn keyword xsFunction Perl_reentrant_init Perl_reentrant_retry syn keyword xsFunction Perl_reentrant_size Perl_reg_named_buff_all syn keyword xsFunction Perl_reg_named_buff_exists Perl_reg_named_buff_fetch syn keyword xsFunction Perl_reg_named_buff_firstkey syn keyword xsFunction Perl_reg_named_buff_nextkey Perl_reg_named_buff_scalar syn keyword xsFunction Perl_regclass_swash Perl_regdump Perl_regdupe_internal syn keyword xsFunction Perl_regexec_flags Perl_regfree_internal syn keyword xsFunction Perl_reginitcolors Perl_regnext Perl_repeatcpy syn keyword xsFunction Perl_require_pv Perl_rninstr Perl_rsignal syn keyword xsFunction Perl_rsignal_state Perl_runops_debug syn keyword xsFunction Perl_runops_standard Perl_rv2cv_op_cv Perl_rvpv_dup syn keyword xsFunction Perl_safesyscalloc Perl_safesysfree Perl_safesysmalloc syn keyword xsFunction Perl_safesysrealloc Perl_save_I16 Perl_save_I32 syn keyword xsFunction Perl_save_I8 Perl_save_adelete Perl_save_aelem_flags syn keyword xsFunction Perl_save_alloc Perl_save_aptr Perl_save_ary syn keyword xsFunction Perl_save_bool Perl_save_clearsv Perl_save_delete syn keyword xsFunction Perl_save_destructor Perl_save_destructor_x syn keyword xsFunction Perl_save_generic_pvref Perl_save_generic_svref syn keyword xsFunction Perl_save_gp Perl_save_hash Perl_save_hdelete syn keyword xsFunction Perl_save_helem_flags Perl_save_hints Perl_save_hptr syn keyword xsFunction Perl_save_int Perl_save_item Perl_save_iv syn keyword xsFunction Perl_save_list Perl_save_long Perl_save_nogv syn keyword xsFunction Perl_save_padsv_and_mortalize Perl_save_pptr syn keyword xsFunction Perl_save_pushi32ptr Perl_save_pushptr syn keyword xsFunction Perl_save_pushptrptr Perl_save_re_context syn keyword xsFunction Perl_save_scalar Perl_save_set_svflags syn keyword xsFunction Perl_save_shared_pvref Perl_save_sptr Perl_save_svref syn keyword xsFunction Perl_save_vptr Perl_savepv Perl_savepvn syn keyword xsFunction Perl_savesharedpv Perl_savesharedpvn syn keyword xsFunction Perl_savesharedsvpv Perl_savestack_grow syn keyword xsFunction Perl_savestack_grow_cnt Perl_savesvpv Perl_scan_bin syn keyword xsFunction Perl_scan_hex Perl_scan_num Perl_scan_oct syn keyword xsFunction Perl_scan_version Perl_scan_vstring Perl_seed syn keyword xsFunction Perl_set_context Perl_set_numeric_local syn keyword xsFunction Perl_set_numeric_radix Perl_set_numeric_standard syn keyword xsFunction Perl_setdefout Perl_share_hek Perl_si_dup Perl_sortsv syn keyword xsFunction Perl_sortsv_flags Perl_ss_dup Perl_stack_grow syn keyword xsFunction Perl_start_subparse Perl_str_to_version syn keyword xsFunction Perl_sv_2bool_flags Perl_sv_2cv Perl_sv_2io syn keyword xsFunction Perl_sv_2iv_flags Perl_sv_2mortal Perl_sv_2nv_flags syn keyword xsFunction Perl_sv_2pv_flags Perl_sv_2pvbyte Perl_sv_2pvutf8 syn keyword xsFunction Perl_sv_2uv_flags Perl_sv_backoff Perl_sv_bless syn keyword xsFunction Perl_sv_cat_decode Perl_sv_catpv Perl_sv_catpv_flags syn keyword xsFunction Perl_sv_catpv_mg Perl_sv_catpvf Perl_sv_catpvf_mg syn keyword xsFunction Perl_sv_catpvf_mg_nocontext Perl_sv_catpvf_nocontext syn keyword xsFunction Perl_sv_catpvn_flags Perl_sv_catsv_flags Perl_sv_chop syn keyword xsFunction Perl_sv_clear Perl_sv_cmp Perl_sv_cmp_flags syn keyword xsFunction Perl_sv_cmp_locale Perl_sv_cmp_locale_flags syn keyword xsFunction Perl_sv_collxfrm_flags Perl_sv_copypv_flags syn keyword xsFunction Perl_sv_dec Perl_sv_dec_nomg Perl_sv_derived_from syn keyword xsFunction Perl_sv_derived_from_pv Perl_sv_derived_from_pvn syn keyword xsFunction Perl_sv_derived_from_sv Perl_sv_destroyable syn keyword xsFunction Perl_sv_does Perl_sv_does_pv Perl_sv_does_pvn syn keyword xsFunction Perl_sv_does_sv Perl_sv_dump Perl_sv_dup syn keyword xsFunction Perl_sv_dup_inc Perl_sv_eq_flags syn keyword xsFunction Perl_sv_force_normal_flags Perl_sv_free syn keyword xsFunction Perl_sv_get_backrefs Perl_sv_gets Perl_sv_grow syn keyword xsFunction Perl_sv_inc Perl_sv_inc_nomg Perl_sv_insert_flags syn keyword xsFunction Perl_sv_isa Perl_sv_isobject Perl_sv_iv Perl_sv_len syn keyword xsFunction Perl_sv_len_utf8 Perl_sv_magic Perl_sv_magicext syn keyword xsFunction Perl_sv_newmortal Perl_sv_newref Perl_sv_nosharing syn keyword xsFunction Perl_sv_nounlocking Perl_sv_nv Perl_sv_peek syn keyword xsFunction Perl_sv_pos_b2u Perl_sv_pos_b2u_flags Perl_sv_pos_u2b syn keyword xsFunction Perl_sv_pos_u2b_flags Perl_sv_pvbyten syn keyword xsFunction Perl_sv_pvbyten_force Perl_sv_pvn syn keyword xsFunction Perl_sv_pvn_force_flags Perl_sv_pvn_nomg syn keyword xsFunction Perl_sv_pvutf8n Perl_sv_pvutf8n_force syn keyword xsFunction Perl_sv_recode_to_utf8 Perl_sv_reftype Perl_sv_replace syn keyword xsFunction Perl_sv_report_used Perl_sv_reset Perl_sv_rvweaken syn keyword xsFunction Perl_sv_setiv Perl_sv_setiv_mg Perl_sv_setnv syn keyword xsFunction Perl_sv_setnv_mg Perl_sv_setpv Perl_sv_setpv_mg syn keyword xsFunction Perl_sv_setpvf Perl_sv_setpvf_mg syn keyword xsFunction Perl_sv_setpvf_mg_nocontext Perl_sv_setpvf_nocontext syn keyword xsFunction Perl_sv_setpviv Perl_sv_setpviv_mg Perl_sv_setpvn syn keyword xsFunction Perl_sv_setpvn_mg Perl_sv_setref_iv Perl_sv_setref_nv syn keyword xsFunction Perl_sv_setref_pv Perl_sv_setref_pvn Perl_sv_setref_uv syn keyword xsFunction Perl_sv_setsv_flags Perl_sv_setsv_mg Perl_sv_setuv syn keyword xsFunction Perl_sv_setuv_mg Perl_sv_tainted Perl_sv_true syn keyword xsFunction Perl_sv_uni_display Perl_sv_unmagic Perl_sv_unmagicext syn keyword xsFunction Perl_sv_unref_flags Perl_sv_untaint Perl_sv_upgrade syn keyword xsFunction Perl_sv_usepvn_flags Perl_sv_utf8_decode syn keyword xsFunction Perl_sv_utf8_downgrade Perl_sv_utf8_encode syn keyword xsFunction Perl_sv_utf8_upgrade_flags_grow Perl_sv_uv syn keyword xsFunction Perl_sv_vcatpvf Perl_sv_vcatpvf_mg Perl_sv_vcatpvfn syn keyword xsFunction Perl_sv_vcatpvfn_flags Perl_sv_vsetpvf syn keyword xsFunction Perl_sv_vsetpvf_mg Perl_sv_vsetpvfn Perl_swash_fetch syn keyword xsFunction Perl_swash_init Perl_sync_locale Perl_sys_init syn keyword xsFunction Perl_sys_init3 Perl_sys_intern_clear syn keyword xsFunction Perl_sys_intern_dup Perl_sys_intern_init Perl_sys_term syn keyword xsFunction Perl_taint_env Perl_taint_proper Perl_to_uni_lower syn keyword xsFunction Perl_to_uni_title Perl_to_uni_upper Perl_to_utf8_case syn keyword xsFunction Perl_unlnk Perl_unpack_str Perl_unpackstring syn keyword xsFunction Perl_unsharepvn Perl_upg_version Perl_utf16_to_utf8 syn keyword xsFunction Perl_utf16_to_utf8_reversed Perl_utf8_distance syn keyword xsFunction Perl_utf8_hop Perl_utf8_length Perl_utf8_to_bytes syn keyword xsFunction Perl_utf8n_to_uvchr Perl_utf8n_to_uvuni syn keyword xsFunction Perl_uvoffuni_to_utf8_flags Perl_uvuni_to_utf8 syn keyword xsFunction Perl_uvuni_to_utf8_flags Perl_valid_utf8_to_uvchr syn keyword xsFunction Perl_vcmp Perl_vcroak Perl_vdeb Perl_vform syn keyword xsFunction Perl_vload_module Perl_vmess Perl_vnewSVpvf syn keyword xsFunction Perl_vnormal Perl_vnumify Perl_vstringify Perl_vverify syn keyword xsFunction Perl_vwarn Perl_vwarner Perl_warn Perl_warn_nocontext syn keyword xsFunction Perl_warn_sv Perl_warner Perl_warner_nocontext syn keyword xsFunction Perl_whichsig_pv Perl_whichsig_pvn Perl_whichsig_sv syn keyword xsFunction Perl_wrap_op_checker _get_regclass_nonbitmap_data syn keyword xsFunction _is_cur_LC_category_utf8 _is_in_locale_category syn keyword xsFunction _is_uni_FOO _is_uni_perl_idcont _is_uni_perl_idstart syn keyword xsFunction _is_utf8_FOO _is_utf8_char_slow _is_utf8_idcont syn keyword xsFunction _is_utf8_idstart _is_utf8_mark _is_utf8_perl_idcont syn keyword xsFunction _is_utf8_perl_idstart _is_utf8_xidcont syn keyword xsFunction _is_utf8_xidstart _new_invlist_C_array syn keyword xsFunction _to_uni_fold_flags _to_utf8_fold_flags syn keyword xsFunction _to_utf8_lower_flags _to_utf8_title_flags syn keyword xsFunction _to_utf8_upper_flags alloccopstash amagic_call syn keyword xsFunction amagic_deref_call any_dup append_utf8_from_native_byte syn keyword xsFunction apply_attrs_string atfork_lock atfork_unlock av_clear syn keyword xsFunction av_delete av_exists av_extend av_fetch av_fill av_len syn keyword xsFunction av_make av_pop av_push av_shift av_store av_top_index syn keyword xsFunction av_undef av_unshift block_end block_gimme block_start syn keyword xsFunction bytes_cmp_utf8 bytes_from_utf8 bytes_to_utf8 call_argv syn keyword xsFunction call_atexit call_list call_method call_pv call_sv syn keyword xsFunction caller_cx cast_i32 cast_iv cast_ulong cast_uv syn keyword xsFunction ck_entersub_args_list ck_entersub_args_proto syn keyword xsFunction ck_entersub_args_proto_or_list ck_warner ck_warner_d syn keyword xsFunction croak croak_memory_wrap croak_no_modify syn keyword xsFunction croak_nocontext croak_sv croak_xs_usage csighandler syn keyword xsFunction custom_op_desc custom_op_name cv_clone cv_const_sv syn keyword xsFunction cv_get_call_checker cv_name cv_set_call_checker syn keyword xsFunction cv_set_call_checker_flags cv_undef cx_dump cx_dup syn keyword xsFunction cxinc deb deb_nocontext debop debprofdump debstack syn keyword xsFunction debstackptrs delimcpy despatch_signals die syn keyword xsFunction die_nocontext die_sv dirp_dup do_aspawn do_binmode syn keyword xsFunction do_close do_gv_dump do_gvgv_dump do_hv_dump do_join syn keyword xsFunction do_magic_dump do_op_dump do_open9 do_openn syn keyword xsFunction do_pmop_dump do_spawn do_spawn_nowait do_sprintf syn keyword xsFunction do_sv_dump doing_taint doref dounwind dowantarray syn keyword xsFunction dump_all dump_c_backtrace dump_eval dump_form syn keyword xsFunction dump_indent dump_mstats dump_packsubs dump_sub syn keyword xsFunction dump_vindent eval_pv eval_sv fbm_compile fbm_instr syn keyword xsFunction filter_add filter_del filter_read find_runcv syn keyword xsFunction find_rundefsv foldEQ foldEQ_latin1 foldEQ_locale syn keyword xsFunction foldEQ_utf8_flags form form_nocontext fp_dup syn keyword xsFunction fprintf_nocontext free_global_struct free_tmps get_av syn keyword xsFunction get_c_backtrace_dump get_context get_cv get_cvn_flags syn keyword xsFunction get_hv get_mstats get_op_descs get_op_names get_ppaddr syn keyword xsFunction get_sv get_vtbl getcwd_sv gp_dup gp_free gp_ref syn keyword xsFunction grok_bin grok_hex grok_infnan grok_number syn keyword xsFunction grok_number_flags grok_numeric_radix grok_oct syn keyword xsFunction gv_add_by_type gv_autoload_pv gv_autoload_pvn syn keyword xsFunction gv_autoload_sv gv_check gv_const_sv gv_dump syn keyword xsFunction gv_efullname gv_efullname4 gv_fetchfile syn keyword xsFunction gv_fetchfile_flags gv_fetchmeth_pv syn keyword xsFunction gv_fetchmeth_pv_autoload gv_fetchmeth_pvn syn keyword xsFunction gv_fetchmeth_pvn_autoload gv_fetchmeth_sv syn keyword xsFunction gv_fetchmeth_sv_autoload gv_fetchmethod_autoload syn keyword xsFunction gv_fetchmethod_pv_flags gv_fetchmethod_pvn_flags syn keyword xsFunction gv_fetchmethod_sv_flags gv_fetchpv gv_fetchpvn_flags syn keyword xsFunction gv_fetchsv gv_fullname gv_fullname4 gv_handler syn keyword xsFunction gv_init_pv gv_init_pvn gv_init_sv gv_name_set syn keyword xsFunction gv_stashpv gv_stashpvn gv_stashsv he_dup hek_dup syn keyword xsFunction hv_clear hv_clear_placeholders hv_common syn keyword xsFunction hv_common_key_len hv_copy_hints_hv hv_delayfree_ent syn keyword xsFunction hv_free_ent hv_iterinit hv_iterkey hv_iterkeysv syn keyword xsFunction hv_iternext_flags hv_iternextsv hv_iterval hv_ksplit syn keyword xsFunction hv_name_set hv_rand_set hv_scalar init_global_struct syn keyword xsFunction init_i18nl10n init_i18nl14n init_stacks init_tm instr syn keyword xsFunction intro_my is_invariant_string is_lvalue_sub syn keyword xsFunction is_safe_syscall is_utf8_string is_utf8_string_loclen syn keyword xsFunction isinfnan leave_scope lex_bufutf8 lex_discard_to syn keyword xsFunction lex_grow_linestr lex_next_chunk lex_peek_unichar syn keyword xsFunction lex_read_space lex_read_to lex_read_unichar lex_start syn keyword xsFunction lex_stuff_pv lex_stuff_pvn lex_stuff_sv lex_unstuff syn keyword xsFunction load_module load_module_nocontext looks_like_number syn keyword xsFunction magic_dump markstack_grow mess mess_nocontext mess_sv syn keyword xsFunction mg_clear mg_copy mg_dup mg_find mg_findext mg_free syn keyword xsFunction mg_free_type mg_get mg_magical mg_set mg_size syn keyword xsFunction mini_mktime moreswitches mro_get_linear_isa syn keyword xsFunction mro_method_changed_in my_atof my_atof2 my_bcopy syn keyword xsFunction my_bzero my_chsize my_dirfd my_exit my_failure_exit syn keyword xsFunction my_fflush_all my_fork my_memcmp my_memset my_pclose syn keyword xsFunction my_popen my_popen_list my_setenv my_setlocale syn keyword xsFunction my_socketpair my_strerror my_strftime newANONATTRSUB syn keyword xsFunction newANONHASH newANONLIST newANONSUB newASSIGNOP syn keyword xsFunction newAVREF newBINOP newCONDOP newCONSTSUB syn keyword xsFunction newCONSTSUB_flags newCVREF newDEFSVOP newFORM newFOROP syn keyword xsFunction newGIVENOP newGVOP newGVREF newGVgen_flags newHVREF syn keyword xsFunction newHVhv newLISTOP newLOGOP newLOOPEX newLOOPOP syn keyword xsFunction newMETHOP newMETHOP_named newMYSUB newNULLLIST newOP syn keyword xsFunction newPADNAMELIST newPADNAMEouter newPADNAMEpvn newPADOP syn keyword xsFunction newPMOP newPROG newPVOP newRANGE newRV newRV_noinc syn keyword xsFunction newSLICEOP newSTATEOP newSV newSVOP newSVREF syn keyword xsFunction newSV_type newSVhek newSViv newSVnv newSVpv syn keyword xsFunction newSVpv_share newSVpvf newSVpvf_nocontext newSVpvn syn keyword xsFunction newSVpvn_flags newSVpvn_share newSVrv newSVsv newSVuv syn keyword xsFunction newUNOP newUNOP_AUX newWHENOP newWHILEOP newXS syn keyword xsFunction newXS_flags new_collate new_ctype new_numeric syn keyword xsFunction new_stackinfo new_version ninstr nothreadhook syn keyword xsFunction op_append_elem op_append_list op_contextualize syn keyword xsFunction op_convert_list op_dump op_free op_linklist op_null syn keyword xsFunction op_parent op_prepend_elem op_refcnt_lock syn keyword xsFunction op_refcnt_unlock op_scope op_sibling_splice pack_cat syn keyword xsFunction packlist pad_add_anon pad_add_name_pv pad_add_name_pvn syn keyword xsFunction pad_add_name_sv pad_alloc pad_compname_type syn keyword xsFunction pad_findmy_pv pad_findmy_pvn pad_findmy_sv pad_new syn keyword xsFunction pad_setsv pad_sv pad_tidy padnamelist_fetch syn keyword xsFunction padnamelist_store parse_arithexpr parse_barestmt syn keyword xsFunction parse_block parse_fullexpr parse_fullstmt parse_label syn keyword xsFunction parse_listexpr parse_stmtseq parse_termexpr parser_dup syn keyword xsFunction pmop_dump pop_scope pregcomp pregexec pregfree syn keyword xsFunction pregfree2 prescan_version printf_nocontext syn keyword xsFunction ptr_table_fetch ptr_table_free ptr_table_new syn keyword xsFunction ptr_table_split ptr_table_store push_scope pv_display syn keyword xsFunction pv_escape pv_pretty pv_uni_display syn keyword xsFunction quadmath_format_needed quadmath_format_single syn keyword xsFunction re_compile re_dup_guts re_intuit_start syn keyword xsFunction re_intuit_string reentrant_free reentrant_init syn keyword xsFunction reentrant_retry reentrant_size reg_named_buff_all syn keyword xsFunction reg_named_buff_exists reg_named_buff_fetch syn keyword xsFunction reg_named_buff_firstkey reg_named_buff_nextkey syn keyword xsFunction reg_named_buff_scalar regclass_swash regdump syn keyword xsFunction regdupe_internal regexec_flags regfree_internal syn keyword xsFunction reginitcolors regnext repeatcpy require_pv rninstr syn keyword xsFunction rsignal rsignal_state runops_debug runops_standard syn keyword xsFunction rv2cv_op_cv rvpv_dup safesyscalloc safesysfree syn keyword xsFunction safesysmalloc safesysrealloc save_I16 save_I32 save_I8 syn keyword xsFunction save_adelete save_aelem_flags save_alloc save_aptr syn keyword xsFunction save_ary save_bool save_clearsv save_delete syn keyword xsFunction save_destructor save_destructor_x save_generic_pvref syn keyword xsFunction save_generic_svref save_gp save_hash save_hdelete syn keyword xsFunction save_helem_flags save_hints save_hptr save_int syn keyword xsFunction save_item save_iv save_list save_long save_nogv syn keyword xsFunction save_padsv_and_mortalize save_pptr save_pushi32ptr syn keyword xsFunction save_pushptr save_pushptrptr save_re_context syn keyword xsFunction save_scalar save_set_svflags save_shared_pvref syn keyword xsFunction save_sptr save_svref save_vptr savepv savepvn syn keyword xsFunction savesharedpv savesharedpvn savesharedsvpv syn keyword xsFunction savestack_grow savestack_grow_cnt savesvpv scan_bin syn keyword xsFunction scan_hex scan_num scan_oct scan_version scan_vstring syn keyword xsFunction seed set_context set_numeric_local set_numeric_radix syn keyword xsFunction set_numeric_standard setdefout share_hek si_dup sortsv syn keyword xsFunction sortsv_flags ss_dup stack_grow start_subparse syn keyword xsFunction str_to_version sv_2bool_flags sv_2cv sv_2io syn keyword xsFunction sv_2iv_flags sv_2mortal sv_2nv_flags sv_2pv_flags syn keyword xsFunction sv_2pvbyte sv_2pvutf8 sv_2uv_flags sv_backoff sv_bless syn keyword xsFunction sv_cat_decode sv_catpv sv_catpv_flags sv_catpv_mg syn keyword xsFunction sv_catpvf sv_catpvf_mg sv_catpvf_mg_nocontext syn keyword xsFunction sv_catpvf_nocontext sv_catpvn_flags sv_catsv_flags syn keyword xsFunction sv_chop sv_clear sv_cmp_flags sv_cmp_locale_flags syn keyword xsFunction sv_collxfrm_flags sv_copypv_flags sv_dec sv_dec_nomg syn keyword xsFunction sv_derived_from sv_derived_from_pv sv_derived_from_pvn syn keyword xsFunction sv_derived_from_sv sv_destroyable sv_does sv_does_pv syn keyword xsFunction sv_does_pvn sv_does_sv sv_dump sv_dup sv_dup_inc syn keyword xsFunction sv_eq_flags sv_force_normal_flags sv_free syn keyword xsFunction sv_get_backrefs sv_gets sv_grow sv_inc sv_inc_nomg syn keyword xsFunction sv_insert_flags sv_isa sv_isobject sv_iv sv_len syn keyword xsFunction sv_len_utf8 sv_magic sv_magicext sv_newmortal syn keyword xsFunction sv_newref sv_nosharing sv_nounlocking sv_nv sv_peek syn keyword xsFunction sv_pos_b2u sv_pos_b2u_flags sv_pos_u2b syn keyword xsFunction sv_pos_u2b_flags sv_pvbyten sv_pvbyten_force sv_pvn syn keyword xsFunction sv_pvn_force_flags sv_pvn_nomg sv_pvutf8n syn keyword xsFunction sv_pvutf8n_force sv_recode_to_utf8 sv_reftype syn keyword xsFunction sv_replace sv_report_used sv_reset sv_rvweaken syn keyword xsFunction sv_setiv sv_setiv_mg sv_setnv sv_setnv_mg sv_setpv syn keyword xsFunction sv_setpv_mg sv_setpvf sv_setpvf_mg syn keyword xsFunction sv_setpvf_mg_nocontext sv_setpvf_nocontext sv_setpviv syn keyword xsFunction sv_setpviv_mg sv_setpvn sv_setpvn_mg sv_setref_iv syn keyword xsFunction sv_setref_nv sv_setref_pv sv_setref_pvn sv_setref_uv syn keyword xsFunction sv_setsv_flags sv_setsv_mg sv_setuv sv_setuv_mg syn keyword xsFunction sv_tainted sv_true sv_uni_display sv_unmagic syn keyword xsFunction sv_unmagicext sv_unref_flags sv_untaint sv_upgrade syn keyword xsFunction sv_usepvn_flags sv_utf8_decode sv_utf8_downgrade syn keyword xsFunction sv_utf8_encode sv_utf8_upgrade_flags_grow sv_uv syn keyword xsFunction sv_vcatpvf sv_vcatpvf_mg sv_vcatpvfn sv_vcatpvfn_flags syn keyword xsFunction sv_vsetpvf sv_vsetpvf_mg sv_vsetpvfn swash_fetch syn keyword xsFunction swash_init sync_locale sys_intern_clear sys_intern_dup syn keyword xsFunction sys_intern_init taint_env taint_proper to_uni_lower syn keyword xsFunction to_uni_title to_uni_upper to_utf8_case unlnk syn keyword xsFunction unpack_str unpackstring unsharepvn upg_version syn keyword xsFunction utf16_to_utf8 utf16_to_utf8_reversed utf8_distance syn keyword xsFunction utf8_hop utf8_length utf8_to_bytes utf8n_to_uvchr syn keyword xsFunction utf8n_to_uvuni uvoffuni_to_utf8_flags uvuni_to_utf8 syn keyword xsFunction uvuni_to_utf8_flags valid_utf8_to_uvchr vcmp vcroak syn keyword xsFunction vdeb vform vload_module vmess vnewSVpvf vnormal syn keyword xsFunction vnumify vstringify vverify vwarn vwarner warn syn keyword xsFunction warn_nocontext warn_sv warner warner_nocontext syn keyword xsFunction whichsig_pv whichsig_pvn whichsig_sv wrap_op_checker syn keyword xsVariable MARK MY_CXT ORIGMARK PL_I PL_No PL_Vars PL_VarsPtr syn keyword xsVariable PL_Yes PL_a2e PL_bincompat_options PL_bitcount syn keyword xsVariable PL_block_type PL_bufend PL_bufptr PL_charclass syn keyword xsVariable PL_check PL_copline PL_core_reg_engine PL_cshname syn keyword xsVariable PL_e2a PL_e2utf PL_error_count PL_expect PL_fold syn keyword xsVariable PL_fold_latin1 PL_fold_locale PL_force_link_funcs syn keyword xsVariable PL_freq PL_global_struct_size PL_hexdigit PL_in_my syn keyword xsVariable PL_in_my_stash PL_interp_size PL_interp_size_5_18_0 syn keyword xsVariable PL_last_lop PL_last_lop_op PL_last_uni PL_latin1_lc syn keyword xsVariable PL_lex_allbrackets PL_lex_brackets PL_lex_brackstack syn keyword xsVariable PL_lex_casemods PL_lex_casestack PL_lex_defer syn keyword xsVariable PL_lex_dojoin PL_lex_fakeeof PL_lex_formbrack syn keyword xsVariable PL_lex_inpat PL_lex_inwhat PL_lex_op PL_lex_repl syn keyword xsVariable PL_lex_starts PL_lex_state PL_lex_stuff PL_linestart syn keyword xsVariable PL_linestr PL_magic_data PL_magic_vtable_names syn keyword xsVariable PL_memory_wrap PL_mod_latin1_uc PL_multi_close syn keyword xsVariable PL_multi_end PL_multi_open PL_multi_start PL_nexttoke syn keyword xsVariable PL_nexttype PL_nextval PL_no_aelem PL_no_dir_func syn keyword xsVariable PL_no_func PL_no_helem_sv PL_no_localize_ref PL_no_mem syn keyword xsVariable PL_no_modify PL_no_myglob PL_no_security syn keyword xsVariable PL_no_sock_func PL_no_symref PL_no_symref_sv syn keyword xsVariable PL_no_usym PL_no_wrongref PL_oldbufptr PL_oldoldbufptr syn keyword xsVariable PL_op_desc PL_op_name PL_op_private_bitdef_ix syn keyword xsVariable PL_op_private_bitdefs PL_op_private_bitfields syn keyword xsVariable PL_op_private_labels PL_op_private_valid PL_opargs syn keyword xsVariable PL_phase_names PL_ppaddr PL_preambled syn keyword xsVariable PL_reg_extflags_name PL_reg_intflags_name PL_reg_name syn keyword xsVariable PL_regkind PL_revision PL_rsfp PL_rsfp_filters syn keyword xsVariable PL_runops_dbg PL_runops_std PL_sh_path PL_sig_name syn keyword xsVariable PL_sig_num PL_simple PL_simple_bitmask PL_sublex_info syn keyword xsVariable PL_subversion PL_tokenbuf PL_utf2e PL_utf8skip syn keyword xsVariable PL_uudmap PL_uuemap PL_valid_types_IVX syn keyword xsVariable PL_valid_types_IV_set PL_valid_types_NVX syn keyword xsVariable PL_valid_types_NV_set PL_valid_types_PVX syn keyword xsVariable PL_valid_types_RV PL_varies PL_varies_bitmask syn keyword xsVariable PL_version PL_warn_nl PL_warn_nosemi PL_warn_reserved syn keyword xsVariable PL_warn_uninit PL_warn_uninit_sv RETVAL SP TARG syn keyword xsVariable _aMY_CXT _aTHX aMY_CXT aMY_CXT_ aTHX aTHX_ items syn keyword xsMacro ABORT ACCEPT ADDOP AHOCORASICK AHOCORASICKC syn keyword xsMacro ALLOC_THREAD_KEY AMG_CALLun AMG_CALLunary AMGf_assign syn keyword xsMacro AMGf_noleft AMGf_noright AMGf_numarg AMGf_numeric syn keyword xsMacro AMGf_set AMGf_unary AMGf_want_list AMGfallNEVER AMGfallNO syn keyword xsMacro AMGfallYES AMT_AMAGIC AMT_AMAGIC_off AMT_AMAGIC_on syn keyword xsMacro AMTf_AMAGIC ANDAND ANDOP ANGSTROM_SIGN ANONSUB ANYOF syn keyword xsMacro ANYOFL ANYOF_ALNUM ANYOF_ALNUML ANYOF_ALPHA syn keyword xsMacro ANYOF_ALPHANUMERIC ANYOF_ASCII ANYOF_BIT ANYOF_BITMAP syn keyword xsMacro ANYOF_BITMAP_BYTE ANYOF_BITMAP_CLEAR syn keyword xsMacro ANYOF_BITMAP_CLEARALL ANYOF_BITMAP_SET syn keyword xsMacro ANYOF_BITMAP_SETALL ANYOF_BITMAP_SIZE ANYOF_BITMAP_TEST syn keyword xsMacro ANYOF_BITMAP_ZERO ANYOF_BLANK ANYOF_CASED syn keyword xsMacro ANYOF_CLASS_CLEAR ANYOF_CLASS_OR ANYOF_CLASS_SET syn keyword xsMacro ANYOF_CLASS_SETALL ANYOF_CLASS_TEST syn keyword xsMacro ANYOF_CLASS_TEST_ANY_SET ANYOF_CLASS_ZERO ANYOF_CNTRL syn keyword xsMacro ANYOF_COMMON_FLAGS ANYOF_DIGIT ANYOF_FLAGS syn keyword xsMacro ANYOF_FLAGS_ALL ANYOF_FOLD_SHARP_S ANYOF_GRAPH syn keyword xsMacro ANYOF_HAS_NONBITMAP_NON_UTF8_MATCHES syn keyword xsMacro ANYOF_HAS_UTF8_NONBITMAP_MATCHES ANYOF_HORIZWS syn keyword xsMacro ANYOF_INVERT ANYOF_LOCALE_FLAGS ANYOF_LOC_FOLD syn keyword xsMacro ANYOF_LOWER ANYOF_MATCHES_ALL_ABOVE_BITMAP syn keyword xsMacro ANYOF_MATCHES_ALL_NON_UTF8_NON_ASCII ANYOF_MATCHES_POSIXL syn keyword xsMacro ANYOF_MAX ANYOF_NALNUM ANYOF_NALNUML ANYOF_NALPHA syn keyword xsMacro ANYOF_NALPHANUMERIC ANYOF_NASCII ANYOF_NBLANK syn keyword xsMacro ANYOF_NCASED ANYOF_NCNTRL ANYOF_NDIGIT ANYOF_NGRAPH syn keyword xsMacro ANYOF_NHORIZWS ANYOF_NLOWER ANYOF_NPRINT ANYOF_NPUNCT syn keyword xsMacro ANYOF_NSPACE ANYOF_NSPACEL ANYOF_NUPPER ANYOF_NVERTWS syn keyword xsMacro ANYOF_NWORDCHAR ANYOF_NXDIGIT ANYOF_ONLY_HAS_BITMAP syn keyword xsMacro ANYOF_POSIXL_AND ANYOF_POSIXL_CLEAR ANYOF_POSIXL_MAX syn keyword xsMacro ANYOF_POSIXL_OR ANYOF_POSIXL_SET ANYOF_POSIXL_SETALL syn keyword xsMacro ANYOF_POSIXL_SKIP ANYOF_POSIXL_SSC_TEST_ALL_SET syn keyword xsMacro ANYOF_POSIXL_SSC_TEST_ANY_SET ANYOF_POSIXL_TEST syn keyword xsMacro ANYOF_POSIXL_TEST_ALL_SET ANYOF_POSIXL_TEST_ANY_SET syn keyword xsMacro ANYOF_POSIXL_ZERO ANYOF_PRINT ANYOF_PUNCT ANYOF_SKIP syn keyword xsMacro ANYOF_SPACE ANYOF_SPACEL ANYOF_UNIPROP ANYOF_UPPER syn keyword xsMacro ANYOF_VERTWS ANYOF_WARN_SUPER ANYOF_WORDCHAR ANYOF_XDIGIT syn keyword xsMacro ARCHLIB ARCHLIB_EXP ARCHNAME ARG ARG1 ARG1_LOC ARG1_SET syn keyword xsMacro ARG2 ARG2L ARG2L_LOC ARG2L_SET ARG2_LOC ARG2_SET ARGTARG syn keyword xsMacro ARG_LOC ARG_SET ARG_VALUE ARG__SET ARROW syn keyword xsMacro ASCII_MORE_RESTRICT_PAT_MODS ASCII_RESTRICT_PAT_MOD syn keyword xsMacro ASCII_RESTRICT_PAT_MODS ASCII_TO_NATIVE ASCTIME_R_PROTO syn keyword xsMacro ASSERT_CURPAD_ACTIVE ASSERT_CURPAD_LEGAL ASSIGNOP ASSUME syn keyword xsMacro Atof Atol Atoul AvALLOC AvARRAY AvARYLEN AvFILL AvFILLp syn keyword xsMacro AvMAX AvREAL AvREALISH AvREAL_off AvREAL_on AvREAL_only syn keyword xsMacro AvREIFY AvREIFY_off AvREIFY_on AvREIFY_only BADVERSION syn keyword xsMacro BASEOP BHKf_bhk_eval BHKf_bhk_post_end BHKf_bhk_pre_end syn keyword xsMacro BHKf_bhk_start BIN BIN_EXP BITANDOP BITMAP_BYTE syn keyword xsMacro BITMAP_TEST BITOROP BIT_BUCKET BIT_DIGITS BOL syn keyword xsMacro BOM_UTF8_FIRST_BYTE BOM_UTF8_TAIL BOUND BOUNDA BOUNDL syn keyword xsMacro BOUNDU BRANCH BRANCHJ BRANCH_next BRANCH_next_fail syn keyword xsMacro BSD_GETPGRP BSD_SETPGRP BSDish BUFSIZ BYTEORDER syn keyword xsMacro BhkDISABLE BhkENABLE BhkENTRY BhkENTRY_set BhkFLAGS Bit syn keyword xsMacro BmFLAGS BmPREVIOUS BmRARE BmUSEFUL CALLREGCOMP syn keyword xsMacro CALLREGCOMP_ENG CALLREGDUPE CALLREGDUPE_PVT CALLREGEXEC syn keyword xsMacro CALLREGFREE CALLREGFREE_PVT CALLREG_INTUIT_START syn keyword xsMacro CALLREG_INTUIT_STRING CALLREG_NAMED_BUFF_ALL syn keyword xsMacro CALLREG_NAMED_BUFF_CLEAR CALLREG_NAMED_BUFF_COUNT syn keyword xsMacro CALLREG_NAMED_BUFF_DELETE CALLREG_NAMED_BUFF_EXISTS syn keyword xsMacro CALLREG_NAMED_BUFF_FETCH CALLREG_NAMED_BUFF_FIRSTKEY syn keyword xsMacro CALLREG_NAMED_BUFF_NEXTKEY CALLREG_NAMED_BUFF_SCALAR syn keyword xsMacro CALLREG_NAMED_BUFF_STORE CALLREG_NUMBUF_FETCH syn keyword xsMacro CALLREG_NUMBUF_LENGTH CALLREG_NUMBUF_STORE syn keyword xsMacro CALLREG_PACKAGE CALLRUNOPS CALL_BLOCK_HOOKS syn keyword xsMacro CALL_CHECKER_REQUIRE_GV CALL_FPTR CANY CAN_COW_FLAGS syn keyword xsMacro CAN_COW_MASK CAN_PROTOTYPE CAN_VAPROTO syn keyword xsMacro CASE_STD_PMMOD_FLAGS_PARSE_SET CASTFLAGS CASTNEGFLOAT syn keyword xsMacro CAT2 CATCH_GET CATCH_SET CHANGE_MULTICALL_FLAGS CHARBITS syn keyword xsMacro CHARSET_PAT_MODS CHECK_MALLOC_TAINT syn keyword xsMacro CHECK_MALLOC_TOO_LATE_FOR CHECK_MALLOC_TOO_LATE_FOR_ syn keyword xsMacro CLEAR_ARGARRAY CLEAR_ERRSV CLONEf_CLONE_HOST syn keyword xsMacro CLONEf_COPY_STACKS CLONEf_JOIN_IN CLONEf_KEEP_PTR_TABLE syn keyword xsMacro CLOSE CLUMP CLUMP_2IV CLUMP_2UV COLONATTR syn keyword xsMacro COMBINING_GRAVE_ACCENT_UTF8 COMMIT COMMIT_next syn keyword xsMacro COMMIT_next_fail COND_BROADCAST COND_DESTROY COND_INIT syn keyword xsMacro COND_SIGNAL COND_WAIT CONTINUE CONTINUE_PAT_MOD syn keyword xsMacro COPHH_KEY_UTF8 COP_SEQMAX_INC COP_SEQ_RANGE_HIGH syn keyword xsMacro COP_SEQ_RANGE_LOW CPERLarg CPERLarg_ CPERLscope CPPLAST syn keyword xsMacro CPPMINUS CPPRUN CPPSTDIN CRYPT_R_PROTO CR_NATIVE CSH syn keyword xsMacro CTERMID_R_PROTO CTIME_R_PROTO CTYPE256 CURLY CURLYM syn keyword xsMacro CURLYM_A CURLYM_A_fail CURLYM_B CURLYM_B_fail CURLYN syn keyword xsMacro CURLYX CURLYX_end CURLYX_end_fail CURLY_B_max syn keyword xsMacro CURLY_B_max_fail CURLY_B_min CURLY_B_min_fail syn keyword xsMacro CURLY_B_min_known CURLY_B_min_known_fail syn keyword xsMacro CURRENT_FEATURE_BUNDLE CURRENT_HINTS CUTGROUP syn keyword xsMacro CUTGROUP_next CUTGROUP_next_fail CV_NAME_NOTQUAL syn keyword xsMacro CV_UNDEF_KEEP_NAME CVf_ANON CVf_ANONCONST CVf_AUTOLOAD syn keyword xsMacro CVf_BUILTIN_ATTRS CVf_CLONE CVf_CLONED CVf_CONST syn keyword xsMacro CVf_CVGV_RC CVf_DYNFILE CVf_HASEVAL CVf_ISXSUB syn keyword xsMacro CVf_LEXICAL CVf_LVALUE CVf_METHOD CVf_NAMED CVf_NODEBUG syn keyword xsMacro CVf_SLABBED CVf_UNIQUE CVf_WEAKOUTSIDE CXINC CXTYPEMASK syn keyword xsMacro CX_CURPAD_SAVE CX_CURPAD_SV CXp_FOR_DEF CXp_FOR_LVREF syn keyword xsMacro CXp_HASARGS CXp_MULTICALL CXp_ONCE CXp_REAL CXp_SUB_RE syn keyword xsMacro CXp_SUB_RE_FAKE CXp_TRYBLOCK C_ARRAY_END C_ARRAY_LENGTH syn keyword xsMacro C_FAC_POSIX CopFILE CopFILEAV CopFILEAVx CopFILEGV syn keyword xsMacro CopFILEGV_set CopFILESV CopFILE_free CopFILE_set syn keyword xsMacro CopFILE_setn CopHINTHASH_get CopHINTHASH_set CopHINTS_get syn keyword xsMacro CopHINTS_set CopLABEL CopLABEL_alloc CopLABEL_len syn keyword xsMacro CopLABEL_len_flags CopLINE CopLINE_dec CopLINE_inc syn keyword xsMacro CopLINE_set CopSTASH CopSTASHPV CopSTASHPV_set syn keyword xsMacro CopSTASH_eq CopSTASH_ne CopSTASH_set Copy CopyD CowREFCNT syn keyword xsMacro Ctl CvANON CvANONCONST CvANONCONST_off CvANONCONST_on syn keyword xsMacro CvANON_off CvANON_on CvAUTOLOAD CvAUTOLOAD_off syn keyword xsMacro CvAUTOLOAD_on CvCLONE CvCLONED CvCLONED_off CvCLONED_on syn keyword xsMacro CvCLONE_off CvCLONE_on CvCONST CvCONST_off CvCONST_on syn keyword xsMacro CvCVGV_RC CvCVGV_RC_off CvCVGV_RC_on CvDEPTH syn keyword xsMacro CvDEPTHunsafe CvDYNFILE CvDYNFILE_off CvDYNFILE_on CvEVAL syn keyword xsMacro CvEVAL_off CvEVAL_on CvFILE CvFILEGV CvFILE_set_from_cop syn keyword xsMacro CvFLAGS CvGV CvGV_set CvHASEVAL CvHASEVAL_off syn keyword xsMacro CvHASEVAL_on CvHASGV CvHSCXT CvISXSUB CvISXSUB_off syn keyword xsMacro CvISXSUB_on CvLEXICAL CvLEXICAL_off CvLEXICAL_on CvLVALUE syn keyword xsMacro CvLVALUE_off CvLVALUE_on CvMETHOD CvMETHOD_off syn keyword xsMacro CvMETHOD_on CvNAMED CvNAMED_off CvNAMED_on CvNAME_HEK_set syn keyword xsMacro CvNODEBUG CvNODEBUG_off CvNODEBUG_on CvOUTSIDE syn keyword xsMacro CvOUTSIDE_SEQ CvPADLIST CvPADLIST_set CvPROTO CvPROTOLEN syn keyword xsMacro CvROOT CvSLABBED CvSLABBED_off CvSLABBED_on CvSPECIAL syn keyword xsMacro CvSPECIAL_off CvSPECIAL_on CvSTART CvSTASH CvSTASH_set syn keyword xsMacro CvUNIQUE CvUNIQUE_off CvUNIQUE_on CvWEAKOUTSIDE syn keyword xsMacro CvWEAKOUTSIDE_off CvWEAKOUTSIDE_on CvXSUB CvXSUBANY syn keyword xsMacro CxFOREACH CxFOREACHDEF CxHASARGS CxITERVAR syn keyword xsMacro CxITERVAR_PADSV CxLABEL CxLABEL_len CxLABEL_len_flags syn keyword xsMacro CxLVAL CxMULTICALL CxOLD_IN_EVAL CxOLD_OP_TYPE CxONCE syn keyword xsMacro CxPADLOOP CxPOPSUB_DONE CxREALEVAL CxTRYBLOCK CxTYPE syn keyword xsMacro CxTYPE_is_LOOP DBL_DIG DBL_MAX DBL_MIN DBM_ckFilter syn keyword xsMacro DBM_setFilter DBVARMG_COUNT DBVARMG_SIGNAL DBVARMG_SINGLE syn keyword xsMacro DBVARMG_TRACE DB_VERSION_MAJOR_CFG DB_VERSION_MINOR_CFG syn keyword xsMacro DB_VERSION_PATCH_CFG DEBUG_A DEBUG_A_FLAG DEBUG_A_TEST syn keyword xsMacro DEBUG_A_TEST_ DEBUG_B DEBUG_BUFFERS_r DEBUG_B_FLAG syn keyword xsMacro DEBUG_B_TEST DEBUG_B_TEST_ DEBUG_C DEBUG_COMPILE_r syn keyword xsMacro DEBUG_CX DEBUG_C_FLAG DEBUG_C_TEST DEBUG_C_TEST_ DEBUG_D syn keyword xsMacro DEBUG_DB_RECURSE_FLAG DEBUG_DUMP_r DEBUG_D_FLAG syn keyword xsMacro DEBUG_D_TEST DEBUG_D_TEST_ DEBUG_EXECUTE_r DEBUG_EXTRA_r syn keyword xsMacro DEBUG_FLAGS_r DEBUG_GPOS_r DEBUG_H DEBUG_H_FLAG syn keyword xsMacro DEBUG_H_TEST DEBUG_H_TEST_ DEBUG_INTUIT_r DEBUG_J_FLAG syn keyword xsMacro DEBUG_J_TEST DEBUG_J_TEST_ DEBUG_L DEBUG_L_FLAG syn keyword xsMacro DEBUG_L_TEST DEBUG_L_TEST_ DEBUG_M DEBUG_MASK syn keyword xsMacro DEBUG_MATCH_r DEBUG_M_FLAG DEBUG_M_TEST DEBUG_M_TEST_ syn keyword xsMacro DEBUG_OFFSETS_r DEBUG_OPTIMISE_MORE_r DEBUG_OPTIMISE_r syn keyword xsMacro DEBUG_P DEBUG_PARSE_r DEBUG_P_FLAG DEBUG_P_TEST syn keyword xsMacro DEBUG_P_TEST_ DEBUG_Pv DEBUG_Pv_TEST DEBUG_Pv_TEST_ syn keyword xsMacro DEBUG_R DEBUG_R_FLAG DEBUG_R_TEST DEBUG_R_TEST_ DEBUG_S syn keyword xsMacro DEBUG_SCOPE DEBUG_STACK_r DEBUG_STATE_r DEBUG_S_FLAG syn keyword xsMacro DEBUG_S_TEST DEBUG_S_TEST_ DEBUG_T DEBUG_TEST_r syn keyword xsMacro DEBUG_TOP_FLAG DEBUG_TRIE_COMPILE_MORE_r syn keyword xsMacro DEBUG_TRIE_COMPILE_r DEBUG_TRIE_EXECUTE_MORE_r syn keyword xsMacro DEBUG_TRIE_EXECUTE_r DEBUG_TRIE_r DEBUG_T_FLAG syn keyword xsMacro DEBUG_T_TEST DEBUG_T_TEST_ DEBUG_U DEBUG_U_FLAG syn keyword xsMacro DEBUG_U_TEST DEBUG_U_TEST_ DEBUG_Uv DEBUG_Uv_TEST syn keyword xsMacro DEBUG_Uv_TEST_ DEBUG_X DEBUG_X_FLAG DEBUG_X_TEST syn keyword xsMacro DEBUG_X_TEST_ DEBUG_Xv DEBUG_Xv_TEST DEBUG_Xv_TEST_ syn keyword xsMacro DEBUG__ DEBUG_c DEBUG_c_FLAG DEBUG_c_TEST DEBUG_c_TEST_ syn keyword xsMacro DEBUG_f DEBUG_f_FLAG DEBUG_f_TEST DEBUG_f_TEST_ DEBUG_l syn keyword xsMacro DEBUG_l_FLAG DEBUG_l_TEST DEBUG_l_TEST_ DEBUG_m syn keyword xsMacro DEBUG_m_FLAG DEBUG_m_TEST DEBUG_m_TEST_ DEBUG_o syn keyword xsMacro DEBUG_o_FLAG DEBUG_o_TEST DEBUG_o_TEST_ DEBUG_p syn keyword xsMacro DEBUG_p_FLAG DEBUG_p_TEST DEBUG_p_TEST_ DEBUG_q syn keyword xsMacro DEBUG_q_FLAG DEBUG_q_TEST DEBUG_q_TEST_ DEBUG_r syn keyword xsMacro DEBUG_r_FLAG DEBUG_r_TEST DEBUG_r_TEST_ DEBUG_s syn keyword xsMacro DEBUG_s_FLAG DEBUG_s_TEST DEBUG_s_TEST_ DEBUG_t_FLAG syn keyword xsMacro DEBUG_t_TEST DEBUG_t_TEST_ DEBUG_u DEBUG_u_FLAG syn keyword xsMacro DEBUG_u_TEST DEBUG_u_TEST_ DEBUG_v DEBUG_v_FLAG syn keyword xsMacro DEBUG_v_TEST DEBUG_v_TEST_ DEBUG_x DEBUG_x_FLAG syn keyword xsMacro DEBUG_x_TEST DEBUG_x_TEST_ syn keyword xsMacro DECLARATION_FOR_LC_NUMERIC_MANIPULATION syn keyword xsMacro DECLARATION_FOR_STORE_LC_NUMERIC_SET_TO_NEEDED syn keyword xsMacro DECLARE_STORE_LC_NUMERIC_SET_TO_NEEDED DEFAULT syn keyword xsMacro DEFAULT_PAT_MOD DEFINEP DEFSV DEFSV_set DEL_NATIVE syn keyword xsMacro DEPENDS_PAT_MOD DEPENDS_PAT_MODS DETACH DIE DM_ARRAY_ISA syn keyword xsMacro DM_DELAY DM_EGID DM_EUID DM_GID DM_RGID DM_RUID DM_UID DO syn keyword xsMacro DOINIT DOLSHARP DONT_DECLARE_STD DORDOR DOROP DOSISH syn keyword xsMacro DOTDOT DOUBLEKIND DOUBLESIZE DOUBLE_BIG_ENDIAN syn keyword xsMacro DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN syn keyword xsMacro DOUBLE_IS_IEEE_754_128_BIT_LITTLE_ENDIAN syn keyword xsMacro DOUBLE_IS_IEEE_754_32_BIT_BIG_ENDIAN syn keyword xsMacro DOUBLE_IS_IEEE_754_32_BIT_LITTLE_ENDIAN syn keyword xsMacro DOUBLE_IS_IEEE_754_64_BIT_BIG_ENDIAN syn keyword xsMacro DOUBLE_IS_IEEE_754_64_BIT_LITTLE_ENDIAN syn keyword xsMacro DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_BE_LE syn keyword xsMacro DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_LE_BE syn keyword xsMacro DOUBLE_IS_UNKNOWN_FORMAT DOUBLE_LITTLE_ENDIAN syn keyword xsMacro DOUBLE_MIX_ENDIAN DO_UTF8 DPTR2FPTR DRAND48_R_PROTO syn keyword xsMacro DUP_WARNINGS Drand01 ELSE ELSIF EMBEDMYMALLOC END syn keyword xsMacro ENDGRENT_R_PROTO ENDHOSTENT_R_PROTO ENDLIKE syn keyword xsMacro ENDNETENT_R_PROTO ENDPROTOENT_R_PROTO ENDPWENT_R_PROTO syn keyword xsMacro ENDSERVENT_R_PROTO END_EXTERN_C ENTER ENTER_with_name syn keyword xsMacro ENTRY_PROBE EOF EOL EOS EQOP ERRSV ESC_NATIVE EVAL syn keyword xsMacro EVAL_AB EVAL_AB_fail EVAL_INEVAL EVAL_INREQUIRE syn keyword xsMacro EVAL_KEEPERR EVAL_NULL EVAL_RE_REPARSING EVAL_WARNONLY syn keyword xsMacro EXACT EXACTF EXACTFA EXACTFA_NO_TRIE EXACTFL EXACTFLU8 syn keyword xsMacro EXACTFU EXACTFU_SS EXACTL EXEC_ARGV_CAST EXEC_PAT_MOD syn keyword xsMacro EXEC_PAT_MODS EXPECT EXT EXTCONST EXTEND EXTEND_MORTAL syn keyword xsMacro EXTERN_C EXTPERLIO EXTRA_SIZE EXTRA_STEP_2ARGS EXT_MGVTBL syn keyword xsMacro EXT_PAT_MODS FAKE_BIT_BUCKET FAKE_DEFAULT_SIGNAL_HANDLERS syn keyword xsMacro FAKE_PERSISTENT_SIGNAL_HANDLERS FALSE FBMcf_TAIL syn keyword xsMacro FBMcf_TAIL_DOLLAR FBMcf_TAIL_DOLLARM FBMcf_TAIL_Z syn keyword xsMacro FBMcf_TAIL_z FBMrf_MULTILINE FCNTL_CAN_LOCK FD_CLR syn keyword xsMacro FD_ISSET FD_SET FD_ZERO FEATURE_ARYBASE_IS_ENABLED syn keyword xsMacro FEATURE_BITWISE_IS_ENABLED FEATURE_BUNDLE_510 syn keyword xsMacro FEATURE_BUNDLE_511 FEATURE_BUNDLE_515 syn keyword xsMacro FEATURE_BUNDLE_CUSTOM FEATURE_BUNDLE_DEFAULT syn keyword xsMacro FEATURE_EVALBYTES_IS_ENABLED FEATURE_FC_IS_ENABLED syn keyword xsMacro FEATURE_IS_ENABLED FEATURE_LEXSUBS_IS_ENABLED syn keyword xsMacro FEATURE_POSTDEREF_IS_ENABLED syn keyword xsMacro FEATURE_POSTDEREF_QQ_IS_ENABLED syn keyword xsMacro FEATURE_REFALIASING_IS_ENABLED FEATURE_SAY_IS_ENABLED syn keyword xsMacro FEATURE_SIGNATURES_IS_ENABLED FEATURE_STATE_IS_ENABLED syn keyword xsMacro FEATURE_SWITCH_IS_ENABLED FEATURE_UNICODE_IS_ENABLED syn keyword xsMacro FEATURE_UNIEVAL_IS_ENABLED FEATURE___SUB___IS_ENABLED syn keyword xsMacro FFLUSH_NULL FF_0DECIMAL FF_BLANK FF_CHECKCHOP FF_CHECKNL syn keyword xsMacro FF_CHOP FF_DECIMAL FF_END FF_FETCH FF_HALFSPACE FF_ITEM syn keyword xsMacro FF_LINEGLOB FF_LINEMARK FF_LINESNGL FF_LITERAL FF_MORE syn keyword xsMacro FF_NEWLINE FF_SKIP FF_SPACE FILE FILE_base FILE_bufsiz syn keyword xsMacro FILE_cnt FILE_ptr FILL_ADVANCE_NODE syn keyword xsMacro FILL_ADVANCE_NODE_2L_ARG FILL_ADVANCE_NODE_ARG syn keyword xsMacro FILTER_DATA FILTER_ISREADER FILTER_READ syn keyword xsMacro FIND_RUNCV_level_eq FIND_RUNCV_padid_eq syn keyword xsMacro FIRST_SURROGATE_UTF8_FIRST_BYTE FITS_IN_8_BITS FLAGS syn keyword xsMacro FLEXFILENAMES FOLDEQ_LOCALE FOLDEQ_S1_ALREADY_FOLDED syn keyword xsMacro FOLDEQ_S1_FOLDS_SANE FOLDEQ_S2_ALREADY_FOLDED syn keyword xsMacro FOLDEQ_S2_FOLDS_SANE FOLDEQ_UTF8_NOMIX_ASCII syn keyword xsMacro FOLD_FLAGS_FULL FOLD_FLAGS_LOCALE FOLD_FLAGS_NOMIX_ASCII syn keyword xsMacro FOR FORMAT FORMLBRACK FORMRBRACK FPTR2DPTR FP_PINF syn keyword xsMacro FP_QNAN FREETMPS FREE_THREAD_KEY FSEEKSIZE FUNC FUNC0 syn keyword xsMacro FUNC0OP FUNC0SUB FUNC1 FUNCMETH FUNCTION__ F_atan2_amg syn keyword xsMacro F_cos_amg F_exp_amg F_log_amg F_pow_amg F_sin_amg syn keyword xsMacro F_sqrt_amg Fflush FmLINES FreeOp Fstat GCB_ENUM_COUNT syn keyword xsMacro GCC_DIAG_IGNORE GCC_DIAG_PRAGMA GCC_DIAG_RESTORE syn keyword xsMacro GDBMNDBM_H_USES_PROTOTYPES GETATARGET GETGRENT_R_PROTO syn keyword xsMacro GETGRGID_R_PROTO GETGRNAM_R_PROTO GETHOSTBYADDR_R_PROTO syn keyword xsMacro GETHOSTBYNAME_R_PROTO GETHOSTENT_R_PROTO GETLOGIN_R_PROTO syn keyword xsMacro GETNETBYADDR_R_PROTO GETNETBYNAME_R_PROTO syn keyword xsMacro GETNETENT_R_PROTO GETPROTOBYNAME_R_PROTO syn keyword xsMacro GETPROTOBYNUMBER_R_PROTO GETPROTOENT_R_PROTO syn keyword xsMacro GETPWENT_R_PROTO GETPWNAM_R_PROTO GETPWUID_R_PROTO syn keyword xsMacro GETSERVBYNAME_R_PROTO GETSERVBYPORT_R_PROTO syn keyword xsMacro GETSERVENT_R_PROTO GETSPNAM_R_PROTO GETTARGET syn keyword xsMacro GETTARGETSTACKED GET_RE_DEBUG_FLAGS syn keyword xsMacro GET_RE_DEBUG_FLAGS_DECL GIMME GIMME_V GIVEN syn keyword xsMacro GLOBAL_PAT_MOD GMTIME_MAX GMTIME_MIN GMTIME_R syn keyword xsMacro GMTIME_R_PROTO GOSTART GOSUB GPOS GPf_ALIASED_SV syn keyword xsMacro GRAMBARESTMT GRAMBLOCK GRAMEXPR GRAMFULLSTMT GRAMPROG syn keyword xsMacro GRAMSTMTSEQ GREEK_CAPITAL_LETTER_IOTA_UTF8 syn keyword xsMacro GREEK_CAPITAL_LETTER_MU GREEK_SMALL_LETTER_MU syn keyword xsMacro GREEK_SMALL_LETTER_MU_UTF8 GROK_NUMERIC_RADIX GROUPP syn keyword xsMacro GRPASSWD GV_ADD GV_ADDMG GV_ADDMULTI GV_ADDWARN syn keyword xsMacro GV_AUTOLOAD GV_AUTOLOAD_ISMETHOD GV_CACHE_ONLY GV_CROAK syn keyword xsMacro GV_NOADD_MASK GV_NOADD_NOINIT GV_NOEXPAND GV_NOINIT syn keyword xsMacro GV_NOTQUAL GV_NO_SVGMAGIC GV_SUPER GVf_ASSUMECV syn keyword xsMacro GVf_IMPORTED GVf_IMPORTED_AV GVf_IMPORTED_CV syn keyword xsMacro GVf_IMPORTED_HV GVf_IMPORTED_SV GVf_INTRO GVf_MULTI syn keyword xsMacro Gconvert Gid_t_f Gid_t_sign Gid_t_size GvALIASED_SV syn keyword xsMacro GvALIASED_SV_off GvALIASED_SV_on GvASSIGN_GENERATION syn keyword xsMacro GvASSIGN_GENERATION_set GvASSUMECV GvASSUMECV_off syn keyword xsMacro GvASSUMECV_on GvAV GvAVn GvCV GvCVGEN GvCV_set GvCVu syn keyword xsMacro GvEGV GvEGVx GvENAME GvENAMELEN GvENAMEUTF8 GvENAME_HEK syn keyword xsMacro GvESTASH GvFILE GvFILEGV GvFILE_HEK GvFILEx GvFLAGS syn keyword xsMacro GvFORM GvGP GvGPFLAGS GvGP_set GvHV GvHVn GvIMPORTED syn keyword xsMacro GvIMPORTED_AV GvIMPORTED_AV_off GvIMPORTED_AV_on syn keyword xsMacro GvIMPORTED_CV GvIMPORTED_CV_off GvIMPORTED_CV_on syn keyword xsMacro GvIMPORTED_HV GvIMPORTED_HV_off GvIMPORTED_HV_on syn keyword xsMacro GvIMPORTED_SV GvIMPORTED_SV_off GvIMPORTED_SV_on syn keyword xsMacro GvIMPORTED_off GvIMPORTED_on GvINTRO GvINTRO_off syn keyword xsMacro GvINTRO_on GvIN_PAD GvIN_PAD_off GvIN_PAD_on GvIO GvIOn syn keyword xsMacro GvIOp GvLINE GvMULTI GvMULTI_off GvMULTI_on GvNAME syn keyword xsMacro GvNAMELEN GvNAMELEN_get GvNAMEUTF8 GvNAME_HEK GvNAME_get syn keyword xsMacro GvREFCNT GvSTASH GvSV GvSVn GvXPVGV Gv_AMG HANDY_H syn keyword xsMacro HASATTRIBUTE_DEPRECATED HASATTRIBUTE_FORMAT syn keyword xsMacro HASATTRIBUTE_MALLOC HASATTRIBUTE_NONNULL syn keyword xsMacro HASATTRIBUTE_NORETURN HASATTRIBUTE_PURE syn keyword xsMacro HASATTRIBUTE_UNUSED HASATTRIBUTE_WARN_UNUSED_RESULT syn keyword xsMacro HASCONST HASHBRACK HASVOLATILE HAS_ACCESS HAS_ACOSH syn keyword xsMacro HAS_ALARM HAS_ASINH HAS_ATANH HAS_ATOLL HAS_BACKTRACE syn keyword xsMacro HAS_BCMP HAS_BCOPY HAS_BOOL HAS_BUILTIN_CHOOSE_EXPR syn keyword xsMacro HAS_BUILTIN_EXPECT HAS_BZERO HAS_C99 syn keyword xsMacro HAS_C99_VARIADIC_MACROS HAS_CBRT HAS_CHOWN HAS_CHROOT syn keyword xsMacro HAS_CLEARENV HAS_COPYSIGN HAS_COPYSIGNL HAS_CRYPT syn keyword xsMacro HAS_CTERMID HAS_CUSERID HAS_DBL_DIG HAS_DBMINIT_PROTO syn keyword xsMacro HAS_DIFFTIME HAS_DIRFD HAS_DLADDR HAS_DLERROR syn keyword xsMacro HAS_DRAND48_PROTO HAS_DUP2 HAS_EACCESS HAS_ENDGRENT syn keyword xsMacro HAS_ENDHOSTENT HAS_ENDNETENT HAS_ENDPROTOENT HAS_ENDPWENT syn keyword xsMacro HAS_ENDSERVENT HAS_ERF HAS_ERFC HAS_EXP2 HAS_EXPM1 syn keyword xsMacro HAS_FCHDIR HAS_FCHMOD HAS_FCHOWN HAS_FCNTL HAS_FDIM syn keyword xsMacro HAS_FD_SET HAS_FEGETROUND HAS_FGETPOS HAS_FINITE syn keyword xsMacro HAS_FINITEL HAS_FLOCK HAS_FLOCK_PROTO HAS_FMA HAS_FMAX syn keyword xsMacro HAS_FMIN HAS_FORK HAS_FPATHCONF HAS_FPCLASSIFY HAS_FREXPL syn keyword xsMacro HAS_FSEEKO HAS_FSETPOS HAS_FSTATFS HAS_FSTATVFS HAS_FSYNC syn keyword xsMacro HAS_FTELLO HAS_FUTIMES HAS_GETADDRINFO HAS_GETCWD syn keyword xsMacro HAS_GETGRENT HAS_GETGROUPS HAS_GETHOSTBYADDR syn keyword xsMacro HAS_GETHOSTBYNAME HAS_GETHOSTENT HAS_GETHOSTNAME syn keyword xsMacro HAS_GETHOST_PROTOS HAS_GETITIMER HAS_GETLOGIN syn keyword xsMacro HAS_GETMNTENT HAS_GETNAMEINFO HAS_GETNETBYADDR syn keyword xsMacro HAS_GETNETBYNAME HAS_GETNETENT HAS_GETNET_PROTOS syn keyword xsMacro HAS_GETPAGESIZE HAS_GETPGID HAS_GETPGRP HAS_GETPPID syn keyword xsMacro HAS_GETPRIORITY HAS_GETPROTOBYNAME HAS_GETPROTOBYNUMBER syn keyword xsMacro HAS_GETPROTOENT HAS_GETPROTO_PROTOS HAS_GETPWENT syn keyword xsMacro HAS_GETSERVBYNAME HAS_GETSERVBYPORT HAS_GETSERVENT syn keyword xsMacro HAS_GETSERV_PROTOS HAS_GETSPNAM HAS_GETTIMEOFDAY syn keyword xsMacro HAS_GNULIBC HAS_GROUP HAS_HASMNTOPT HAS_HTONL HAS_HTONS syn keyword xsMacro HAS_HYPOT HAS_ILOGB HAS_ILOGBL HAS_INETNTOP HAS_INETPTON syn keyword xsMacro HAS_INET_ATON HAS_INT64_T HAS_IOCTL HAS_IPV6_MREQ syn keyword xsMacro HAS_IP_MREQ HAS_IP_MREQ_SOURCE HAS_ISASCII HAS_ISBLANK syn keyword xsMacro HAS_ISFINITE HAS_ISINF HAS_ISINFL HAS_ISNAN HAS_ISNANL syn keyword xsMacro HAS_ISNORMAL HAS_J0 HAS_J0L HAS_KILL HAS_KILLPG syn keyword xsMacro HAS_LCHOWN HAS_LC_MONETARY_2008 HAS_LDBL_DIG HAS_LDEXPL syn keyword xsMacro HAS_LGAMMA HAS_LGAMMA_R HAS_LINK HAS_LLRINT HAS_LLRINTL syn keyword xsMacro HAS_LLROUND HAS_LLROUNDL HAS_LOCALECONV HAS_LOCKF syn keyword xsMacro HAS_LOG1P HAS_LOG2 HAS_LOGB HAS_LONG_DOUBLE HAS_LONG_LONG syn keyword xsMacro HAS_LRINT HAS_LRINTL HAS_LROUND HAS_LROUNDL syn keyword xsMacro HAS_LSEEK_PROTO HAS_LSTAT HAS_MADVISE HAS_MBLEN syn keyword xsMacro HAS_MBSTOWCS HAS_MBTOWC HAS_MEMCHR HAS_MEMCMP HAS_MEMCPY syn keyword xsMacro HAS_MEMMOVE HAS_MEMSET HAS_MKDIR HAS_MKDTEMP HAS_MKFIFO syn keyword xsMacro HAS_MKSTEMP HAS_MKSTEMPS HAS_MKTIME HAS_MMAP HAS_MODFL syn keyword xsMacro HAS_MODFL_PROTO HAS_MPROTECT HAS_MSG HAS_MSG_CTRUNC syn keyword xsMacro HAS_MSG_DONTROUTE HAS_MSG_OOB HAS_MSG_PEEK HAS_MSG_PROXY syn keyword xsMacro HAS_MSYNC HAS_MUNMAP HAS_NAN HAS_NEARBYINT HAS_NEXTAFTER syn keyword xsMacro HAS_NEXTTOWARD HAS_NICE HAS_NL_LANGINFO HAS_NTOHL syn keyword xsMacro HAS_NTOHS HAS_OPEN3 HAS_PASSWD HAS_PATHCONF HAS_PAUSE syn keyword xsMacro HAS_PIPE HAS_POLL HAS_PRCTL HAS_PRCTL_SET_NAME syn keyword xsMacro HAS_PROCSELFEXE HAS_PTHREAD_ATFORK syn keyword xsMacro HAS_PTHREAD_ATTR_SETSCOPE syn keyword xsMacro HAS_PTHREAD_UNCHECKED_GETSPECIFIC_NP HAS_PTHREAD_YIELD syn keyword xsMacro HAS_PTRDIFF_T HAS_READDIR HAS_READLINK HAS_READV syn keyword xsMacro HAS_RECVMSG HAS_REGCOMP HAS_REMAINDER HAS_REMQUO syn keyword xsMacro HAS_RENAME HAS_REWINDDIR HAS_RINT HAS_RMDIR HAS_ROUND syn keyword xsMacro HAS_SANE_MEMCMP HAS_SBRK_PROTO HAS_SCALBN HAS_SCALBNL syn keyword xsMacro HAS_SCHED_YIELD HAS_SCM_RIGHTS HAS_SEEKDIR HAS_SELECT syn keyword xsMacro HAS_SEM HAS_SENDMSG HAS_SETEGID HAS_SETEUID HAS_SETGRENT syn keyword xsMacro HAS_SETGROUPS HAS_SETHOSTENT HAS_SETITIMER HAS_SETLINEBUF syn keyword xsMacro HAS_SETLOCALE HAS_SETNETENT HAS_SETPGID HAS_SETPGRP syn keyword xsMacro HAS_SETPRIORITY HAS_SETPROTOENT HAS_SETPWENT HAS_SETREGID syn keyword xsMacro HAS_SETRESGID HAS_SETRESUID HAS_SETREUID HAS_SETSERVENT syn keyword xsMacro HAS_SETSID HAS_SETVBUF HAS_SHM HAS_SHMAT_PROTOTYPE syn keyword xsMacro HAS_SIGACTION HAS_SIGNBIT HAS_SIGPROCMASK HAS_SIGSETJMP syn keyword xsMacro HAS_SIN6_SCOPE_ID HAS_SKIP_LOCALE_INIT HAS_SNPRINTF syn keyword xsMacro HAS_SOCKADDR_IN6 HAS_SOCKATMARK HAS_SOCKATMARK_PROTO syn keyword xsMacro HAS_SOCKET HAS_SQRTL HAS_STAT HAS_STATIC_INLINE syn keyword xsMacro HAS_STRCHR HAS_STRCOLL HAS_STRFTIME HAS_STRTOD HAS_STRTOL syn keyword xsMacro HAS_STRTOLD HAS_STRTOLL HAS_STRTOQ HAS_STRTOUL syn keyword xsMacro HAS_STRTOULL HAS_STRTOUQ HAS_STRUCT_CMSGHDR syn keyword xsMacro HAS_STRUCT_MSGHDR HAS_STRUCT_STATFS syn keyword xsMacro HAS_STRUCT_STATFS_F_FLAGS HAS_STRXFRM HAS_SYMLINK syn keyword xsMacro HAS_SYSCALL HAS_SYSCALL_PROTO HAS_SYSCONF HAS_SYSTEM syn keyword xsMacro HAS_SYS_ERRLIST HAS_TCGETPGRP HAS_TCSETPGRP HAS_TELLDIR syn keyword xsMacro HAS_TELLDIR_PROTO HAS_TGAMMA HAS_TIME HAS_TIMEGM syn keyword xsMacro HAS_TIMES HAS_TM_TM_GMTOFF HAS_TM_TM_ZONE HAS_TRUNC syn keyword xsMacro HAS_TRUNCATE HAS_TRUNCL HAS_TZNAME HAS_UALARM HAS_UMASK syn keyword xsMacro HAS_UNAME HAS_UNSETENV HAS_USLEEP HAS_USLEEP_PROTO syn keyword xsMacro HAS_USTAT HAS_UTIME HAS_VPRINTF HAS_VSNPRINTF HAS_WAIT syn keyword xsMacro HAS_WAIT4 HAS_WAITPID HAS_WCSCMP HAS_WCSTOMBS HAS_WCSXFRM syn keyword xsMacro HAS_WCTOMB HAS_WRITEV HEK_BASESIZE HEK_FLAGS HEK_HASH syn keyword xsMacro HEK_KEY HEK_LEN HEK_UTF8 HEK_UTF8_off HEK_UTF8_on syn keyword xsMacro HEK_WASUTF8 HEK_WASUTF8_off HEK_WASUTF8_on HEKf HEKf256 syn keyword xsMacro HEKfARG HE_SVSLOT HEf_SVKEY HINTS_REFCNT_INIT syn keyword xsMacro HINTS_REFCNT_LOCK HINTS_REFCNT_TERM HINTS_REFCNT_UNLOCK syn keyword xsMacro HINT_BLOCK_SCOPE HINT_BYTES HINT_EXPLICIT_STRICT_REFS syn keyword xsMacro HINT_EXPLICIT_STRICT_SUBS HINT_EXPLICIT_STRICT_VARS syn keyword xsMacro HINT_FEATURE_MASK HINT_FEATURE_SHIFT HINT_FILETEST_ACCESS syn keyword xsMacro HINT_INTEGER HINT_LEXICAL_IO_IN HINT_LEXICAL_IO_OUT syn keyword xsMacro HINT_LOCALE HINT_LOCALE_PARTIAL HINT_LOCALIZE_HH syn keyword xsMacro HINT_NEW_BINARY HINT_NEW_FLOAT HINT_NEW_INTEGER syn keyword xsMacro HINT_NEW_RE HINT_NEW_STRING HINT_NO_AMAGIC HINT_RE_EVAL syn keyword xsMacro HINT_RE_FLAGS HINT_RE_TAINT HINT_SORT_MERGESORT syn keyword xsMacro HINT_SORT_QUICKSORT HINT_SORT_SORT_BITS HINT_SORT_STABLE syn keyword xsMacro HINT_STRICT_REFS HINT_STRICT_SUBS HINT_STRICT_VARS syn keyword xsMacro HINT_UNI_8_BIT HINT_UTF8 HS_APIVERLEN_MAX HS_CXT syn keyword xsMacro HS_GETAPIVERLEN HS_GETINTERPSIZE HS_GETXSVERLEN HS_KEY syn keyword xsMacro HS_KEYp HS_XSVERLEN_MAX HSf_IMP_CXT HSf_NOCHK HSf_POPMARK syn keyword xsMacro HSf_SETXSUBFN HSm_APIVERLEN HSm_INTRPSIZE HSm_KEY_MATCH syn keyword xsMacro HSm_XSVERLEN HV_DELETE HV_DISABLE_UVAR_XKEY syn keyword xsMacro HV_FETCH_EMPTY_HE HV_FETCH_ISEXISTS HV_FETCH_ISSTORE syn keyword xsMacro HV_FETCH_JUST_SV HV_FETCH_LVALUE syn keyword xsMacro HV_ITERNEXT_WANTPLACEHOLDERS HV_NAME_SETALL syn keyword xsMacro HVhek_ENABLEHVKFLAGS HVhek_FREEKEY HVhek_KEYCANONICAL syn keyword xsMacro HVhek_MASK HVhek_PLACEHOLD HVhek_UNSHARED HVhek_UTF8 syn keyword xsMacro HVhek_WASUTF8 HVrhek_IV HVrhek_PV HVrhek_PV_UTF8 syn keyword xsMacro HVrhek_UV HVrhek_delete HVrhek_typemask HVrhek_undef syn keyword xsMacro HYPHEN_UTF8 H_EBCDIC_TABLES H_PERL H_REGCHARCLASS syn keyword xsMacro H_UNICODE_CONSTANTS H_UTF8 HeHASH HeKEY HeKEY_hek syn keyword xsMacro HeKEY_sv HeKFLAGS HeKLEN HeKLEN_UTF8 HeKUTF8 HeKWASUTF8 syn keyword xsMacro HeNEXT HePV HeSVKEY HeSVKEY_force HeSVKEY_set HeUTF8 syn keyword xsMacro HeVAL HvAMAGIC HvAMAGIC_off HvAMAGIC_on HvARRAY HvAUX syn keyword xsMacro HvAUXf_NO_DEREF HvAUXf_SCAN_STASH HvEITER HvEITER_get syn keyword xsMacro HvEITER_set HvENAME HvENAMELEN HvENAMELEN_get HvENAMEUTF8 syn keyword xsMacro HvENAME_HEK HvENAME_HEK_NN HvENAME_get HvFILL HvHASKFLAGS syn keyword xsMacro HvHASKFLAGS_off HvHASKFLAGS_on HvKEYS HvLASTRAND_get syn keyword xsMacro HvLAZYDEL HvLAZYDEL_off HvLAZYDEL_on HvMAX HvMROMETA syn keyword xsMacro HvNAME HvNAMELEN HvNAMELEN_get HvNAMEUTF8 HvNAME_HEK syn keyword xsMacro HvNAME_HEK_NN HvNAME_get HvPLACEHOLDERS syn keyword xsMacro HvPLACEHOLDERS_get HvPLACEHOLDERS_set HvRAND_get HvRITER syn keyword xsMacro HvRITER_get HvRITER_set HvSHAREKEYS HvSHAREKEYS_off syn keyword xsMacro HvSHAREKEYS_on HvTOTALKEYS HvUSEDKEYS I16SIZE I16TYPE syn keyword xsMacro I16_MAX I16_MIN I32SIZE I32TYPE I32_MAX I32_MAX_P1 syn keyword xsMacro I32_MIN I64SIZE I64TYPE I8SIZE I8TYPE I8_TO_NATIVE syn keyword xsMacro I8_TO_NATIVE_UTF8 IF IFMATCH IFMATCH_A IFMATCH_A_fail syn keyword xsMacro IFTHEN IGNORE_PAT_MOD ILLEGAL_UTF8_BYTE INIT INIT_THREADS syn keyword xsMacro INIT_TRACK_MEMPOOL INSUBP INT2PTR INT32_MIN INT64_C syn keyword xsMacro INT64_MIN INTSIZE INT_64_T INT_PAT_MODS IN_BYTES syn keyword xsMacro IN_ENCODING IN_LC IN_LC_ALL_COMPILETIME IN_LC_ALL_RUNTIME syn keyword xsMacro IN_LC_COMPILETIME IN_LC_PARTIAL_COMPILETIME syn keyword xsMacro IN_LC_PARTIAL_RUNTIME IN_LC_RUNTIME IN_LOCALE syn keyword xsMacro IN_LOCALE_COMPILETIME IN_LOCALE_RUNTIME syn keyword xsMacro IN_PERL_COMPILETIME IN_PERL_RUNTIME IN_SOME_LOCALE_FORM syn keyword xsMacro IN_SOME_LOCALE_FORM_COMPILETIME syn keyword xsMacro IN_SOME_LOCALE_FORM_RUNTIME IN_UNI_8_BIT syn keyword xsMacro IN_UTF8_CTYPE_LOCALE IOCPARM_LEN IOf_ARGV IOf_DIDTOP syn keyword xsMacro IOf_FAKE_DIRP IOf_FLUSH IOf_NOLINE IOf_START IOf_UNTAINT syn keyword xsMacro ISA_VERSION_OBJ IS_ANYOF_TRIE syn keyword xsMacro IS_NUMBER_GREATER_THAN_UV_MAX IS_NUMBER_INFINITY syn keyword xsMacro IS_NUMBER_IN_UV IS_NUMBER_NAN IS_NUMBER_NEG syn keyword xsMacro IS_NUMBER_NOT_INT IS_NUMBER_TRAILING IS_NUMERIC_RADIX syn keyword xsMacro IS_PADCONST IS_PADGV IS_SAFE_PATHNAME IS_SAFE_SYSCALL syn keyword xsMacro IS_TRIE_AC IS_UTF8_CHAR IS_UTF8_CHAR_FAST IVSIZE IVTYPE syn keyword xsMacro IV_DIG IV_MAX IV_MAX_P1 IV_MIN I_32 I_ARPA_INET I_ASSERT syn keyword xsMacro I_BFD I_CRYPT I_DBM I_DIRENT I_DLFCN I_EXECINFO I_FENV syn keyword xsMacro I_FLOAT I_GDBM I_GDBMNDBM I_GRP I_INTTYPES I_LANGINFO syn keyword xsMacro I_LIMITS I_LOCALE I_MATH I_MNTENT I_NETDB I_NETINET_IN syn keyword xsMacro I_NETINET_TCP I_POLL I_PTHREAD I_PWD I_QUADMATH I_SHADOW syn keyword xsMacro I_STDARG I_STDBOOL I_STDDEF I_STDINT I_STDLIB I_STRING syn keyword xsMacro I_SYSLOG I_SYSUIO I_SYSUTSNAME I_SYS_DIR I_SYS_FILE syn keyword xsMacro I_SYS_IOCTL I_SYS_MOUNT I_SYS_PARAM I_SYS_POLL syn keyword xsMacro I_SYS_RESOURCE I_SYS_SELECT I_SYS_STAT I_SYS_STATFS syn keyword xsMacro I_SYS_STATVFS I_SYS_TIME I_SYS_TIMES I_SYS_TYPES I_SYS_UN syn keyword xsMacro I_SYS_VFS I_SYS_WAIT I_TERMIOS I_TIME I_UNISTD I_USTAT syn keyword xsMacro I_UTIME I_V I_VALUES IoANY IoBOTTOM_GV IoBOTTOM_NAME syn keyword xsMacro IoDIRP IoFLAGS IoFMT_GV IoFMT_NAME IoIFP IoLINES syn keyword xsMacro IoLINES_LEFT IoOFP IoPAGE IoPAGE_LEN IoTOP_GV IoTOP_NAME syn keyword xsMacro IoTYPE IoTYPE_APPEND IoTYPE_CLOSED IoTYPE_IMPLICIT syn keyword xsMacro IoTYPE_NUMERIC IoTYPE_PIPE IoTYPE_RDONLY IoTYPE_RDWR syn keyword xsMacro IoTYPE_SOCKET IoTYPE_STD IoTYPE_WRONLY IsSet syn keyword xsMacro JMPENV_BOOTSTRAP JMPENV_JUMP JMPENV_POP JMPENV_PUSH JOIN syn keyword xsMacro KEEPCOPY_PAT_MOD KEEPCOPY_PAT_MODS KEEPS KEEPS_next syn keyword xsMacro KEEPS_next_fail KELVIN_SIGN KEYWORD_PLUGIN_DECLINE syn keyword xsMacro KEYWORD_PLUGIN_EXPR KEYWORD_PLUGIN_STMT KEY_AUTOLOAD syn keyword xsMacro KEY_BEGIN KEY_CHECK KEY_DESTROY KEY_END KEY_INIT KEY_NULL syn keyword xsMacro KEY_UNITCHECK KEY___DATA__ KEY___END__ KEY___FILE__ syn keyword xsMacro KEY___LINE__ KEY___PACKAGE__ KEY___SUB__ KEY_abs syn keyword xsMacro KEY_accept KEY_alarm KEY_and KEY_atan2 KEY_bind syn keyword xsMacro KEY_binmode KEY_bless KEY_break KEY_caller KEY_chdir syn keyword xsMacro KEY_chmod KEY_chomp KEY_chop KEY_chown KEY_chr KEY_chroot syn keyword xsMacro KEY_close KEY_closedir KEY_cmp KEY_connect KEY_continue syn keyword xsMacro KEY_cos KEY_crypt KEY_dbmclose KEY_dbmopen KEY_default syn keyword xsMacro KEY_defined KEY_delete KEY_die KEY_do KEY_dump KEY_each syn keyword xsMacro KEY_else KEY_elsif KEY_endgrent KEY_endhostent syn keyword xsMacro KEY_endnetent KEY_endprotoent KEY_endpwent KEY_endservent syn keyword xsMacro KEY_eof KEY_eq KEY_eval KEY_evalbytes KEY_exec KEY_exists syn keyword xsMacro KEY_exit KEY_exp KEY_fc KEY_fcntl KEY_fileno KEY_flock syn keyword xsMacro KEY_for KEY_foreach KEY_fork KEY_format KEY_formline syn keyword xsMacro KEY_ge KEY_getc KEY_getgrent KEY_getgrgid KEY_getgrnam syn keyword xsMacro KEY_gethostbyaddr KEY_gethostbyname KEY_gethostent syn keyword xsMacro KEY_getlogin KEY_getnetbyaddr KEY_getnetbyname syn keyword xsMacro KEY_getnetent KEY_getpeername KEY_getpgrp KEY_getppid syn keyword xsMacro KEY_getpriority KEY_getprotobyname KEY_getprotobynumber syn keyword xsMacro KEY_getprotoent KEY_getpwent KEY_getpwnam KEY_getpwuid syn keyword xsMacro KEY_getservbyname KEY_getservbyport KEY_getservent syn keyword xsMacro KEY_getsockname KEY_getsockopt KEY_given KEY_glob syn keyword xsMacro KEY_gmtime KEY_goto KEY_grep KEY_gt KEY_hex KEY_if syn keyword xsMacro KEY_index KEY_int KEY_ioctl KEY_join KEY_keys KEY_kill syn keyword xsMacro KEY_last KEY_lc KEY_lcfirst KEY_le KEY_length KEY_link syn keyword xsMacro KEY_listen KEY_local KEY_localtime KEY_lock KEY_log syn keyword xsMacro KEY_lstat KEY_lt KEY_m KEY_map KEY_mkdir KEY_msgctl syn keyword xsMacro KEY_msgget KEY_msgrcv KEY_msgsnd KEY_my KEY_ne KEY_next syn keyword xsMacro KEY_no KEY_not KEY_oct KEY_open KEY_opendir KEY_or syn keyword xsMacro KEY_ord KEY_our KEY_pack KEY_package KEY_pipe KEY_pop syn keyword xsMacro KEY_pos KEY_print KEY_printf KEY_prototype KEY_push KEY_q syn keyword xsMacro KEY_qq KEY_qr KEY_quotemeta KEY_qw KEY_qx KEY_rand syn keyword xsMacro KEY_read KEY_readdir KEY_readline KEY_readlink syn keyword xsMacro KEY_readpipe KEY_recv KEY_redo KEY_ref KEY_rename syn keyword xsMacro KEY_require KEY_reset KEY_return KEY_reverse syn keyword xsMacro KEY_rewinddir KEY_rindex KEY_rmdir KEY_s KEY_say syn keyword xsMacro KEY_scalar KEY_seek KEY_seekdir KEY_select KEY_semctl syn keyword xsMacro KEY_semget KEY_semop KEY_send KEY_setgrent KEY_sethostent syn keyword xsMacro KEY_setnetent KEY_setpgrp KEY_setpriority KEY_setprotoent syn keyword xsMacro KEY_setpwent KEY_setservent KEY_setsockopt KEY_shift syn keyword xsMacro KEY_shmctl KEY_shmget KEY_shmread KEY_shmwrite syn keyword xsMacro KEY_shutdown KEY_sin KEY_sleep KEY_socket KEY_socketpair syn keyword xsMacro KEY_sort KEY_splice KEY_split KEY_sprintf KEY_sqrt syn keyword xsMacro KEY_srand KEY_stat KEY_state KEY_study KEY_sub KEY_substr syn keyword xsMacro KEY_symlink KEY_syscall KEY_sysopen KEY_sysread syn keyword xsMacro KEY_sysseek KEY_system KEY_syswrite KEY_tell KEY_telldir syn keyword xsMacro KEY_tie KEY_tied KEY_time KEY_times KEY_tr KEY_truncate syn keyword xsMacro KEY_uc KEY_ucfirst KEY_umask KEY_undef KEY_unless syn keyword xsMacro KEY_unlink KEY_unpack KEY_unshift KEY_untie KEY_until syn keyword xsMacro KEY_use KEY_utime KEY_values KEY_vec KEY_wait KEY_waitpid syn keyword xsMacro KEY_wantarray KEY_warn KEY_when KEY_while KEY_write KEY_x syn keyword xsMacro KEY_xor KEY_y LABEL LATIN1_TO_NATIVE syn keyword xsMacro LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE syn keyword xsMacro LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE_NATIVE syn keyword xsMacro LATIN_CAPITAL_LETTER_SHARP_S syn keyword xsMacro LATIN_CAPITAL_LETTER_SHARP_S_UTF8 syn keyword xsMacro LATIN_CAPITAL_LETTER_Y_WITH_DIAERESIS syn keyword xsMacro LATIN_SMALL_LETTER_A_WITH_RING_ABOVE syn keyword xsMacro LATIN_SMALL_LETTER_A_WITH_RING_ABOVE_NATIVE syn keyword xsMacro LATIN_SMALL_LETTER_LONG_S LATIN_SMALL_LETTER_LONG_S_UTF8 syn keyword xsMacro LATIN_SMALL_LETTER_SHARP_S syn keyword xsMacro LATIN_SMALL_LETTER_SHARP_S_NATIVE syn keyword xsMacro LATIN_SMALL_LETTER_Y_WITH_DIAERESIS syn keyword xsMacro LATIN_SMALL_LETTER_Y_WITH_DIAERESIS_NATIVE syn keyword xsMacro LATIN_SMALL_LIGATURE_LONG_S_T syn keyword xsMacro LATIN_SMALL_LIGATURE_LONG_S_T_UTF8 syn keyword xsMacro LATIN_SMALL_LIGATURE_ST LATIN_SMALL_LIGATURE_ST_UTF8 syn keyword xsMacro LDBL_DIG LEAVE LEAVESUB LEAVE_SCOPE LEAVE_with_name syn keyword xsMacro LEX_DONT_CLOSE_RSFP LEX_EVALBYTES LEX_IGNORE_UTF8_HINTS syn keyword xsMacro LEX_KEEP_PREVIOUS LEX_NOTPARSING LEX_START_COPIED syn keyword xsMacro LEX_START_FLAGS LEX_START_SAME_FILTER LEX_STUFF_UTF8 syn keyword xsMacro LF_NATIVE LIBERAL LIBM_LIB_VERSION LIB_INVARG LIKELY syn keyword xsMacro LINKLIST LNBREAK LOADED_FILE_PROBE LOADING_FILE_PROBE syn keyword xsMacro LOCAL LOCALE_PAT_MOD LOCALE_PAT_MODS LOCALTIME_MAX syn keyword xsMacro LOCALTIME_MIN LOCALTIME_R LOCALTIME_R_PROTO syn keyword xsMacro LOCAL_PATCH_COUNT LOCK_DOLLARZERO_MUTEX syn keyword xsMacro LOCK_LC_NUMERIC_STANDARD LOCK_NUMERIC_STANDARD LOC_SED syn keyword xsMacro LOGICAL LONGDOUBLE_BIG_ENDIAN LONGDOUBLE_DOUBLEDOUBLE syn keyword xsMacro LONGDOUBLE_LITTLE_ENDIAN LONGDOUBLE_X86_80_BIT LONGJMP syn keyword xsMacro LONGLONGSIZE LONGSIZE LONG_DOUBLEKIND LONG_DOUBLESIZE syn keyword xsMacro LONG_DOUBLE_EQUALS_DOUBLE LONG_DOUBLE_IS_DOUBLE syn keyword xsMacro LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BIG_ENDIAN syn keyword xsMacro LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LITTLE_ENDIAN syn keyword xsMacro LONG_DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN syn keyword xsMacro LONG_DOUBLE_IS_IEEE_754_128_BIT_LITTLE_ENDIAN syn keyword xsMacro LONG_DOUBLE_IS_UNKNOWN_FORMAT syn keyword xsMacro LONG_DOUBLE_IS_X86_80_BIT_BIG_ENDIAN syn keyword xsMacro LONG_DOUBLE_IS_X86_80_BIT_LITTLE_ENDIAN LOOPEX syn keyword xsMacro LOOP_PAT_MODS LSEEKSIZE LSTOP LSTOPSUB LVRET L_R_TZSET syn keyword xsMacro LvFLAGS LvSTARGOFF LvTARG LvTARGLEN LvTARGOFF LvTYPE syn keyword xsMacro MALLOC_CHECK_TAINT MALLOC_CHECK_TAINT2 MALLOC_CTL_H syn keyword xsMacro MALLOC_INIT MALLOC_OVERHEAD MALLOC_TERM syn keyword xsMacro MALLOC_TOO_LATE_FOR MARKPOINT MARKPOINT_next syn keyword xsMacro MARKPOINT_next_fail MASK MATCHOP MAXARG MAXO MAXPATHLEN syn keyword xsMacro MAXSYSFD MAX_CHARSET_NAME_LENGTH MAX_FEATURE_LEN syn keyword xsMacro MAX_PORTABLE_UTF8_TWO_BYTE syn keyword xsMacro MAX_PRINT_A_FOR_USE_ONLY_BY_REGCOMP_DOT_C syn keyword xsMacro MAX_RECURSE_EVAL_NOCHANGE_DEPTH MAX_UTF8_TWO_BYTE syn keyword xsMacro MAYBE_DEREF_GV MAYBE_DEREF_GV_flags MAYBE_DEREF_GV_nomg syn keyword xsMacro MBOL MB_CUR_MAX MDEREF_ACTION_MASK MDEREF_AV_gvav_aelem syn keyword xsMacro MDEREF_AV_gvsv_vivify_rv2av_aelem MDEREF_AV_padav_aelem syn keyword xsMacro MDEREF_AV_padsv_vivify_rv2av_aelem syn keyword xsMacro MDEREF_AV_pop_rv2av_aelem MDEREF_AV_vivify_rv2av_aelem syn keyword xsMacro MDEREF_FLAG_last MDEREF_HV_gvhv_helem syn keyword xsMacro MDEREF_HV_gvsv_vivify_rv2hv_helem MDEREF_HV_padhv_helem syn keyword xsMacro MDEREF_HV_padsv_vivify_rv2hv_helem syn keyword xsMacro MDEREF_HV_pop_rv2hv_helem MDEREF_HV_vivify_rv2hv_helem syn keyword xsMacro MDEREF_INDEX_MASK MDEREF_INDEX_const MDEREF_INDEX_gvsv syn keyword xsMacro MDEREF_INDEX_none MDEREF_INDEX_padsv MDEREF_MASK syn keyword xsMacro MDEREF_SHIFT MDEREF_reload MEMBER_TO_FPTR MEM_ALIGNBYTES syn keyword xsMacro MEM_LOG_ALLOC MEM_LOG_FREE MEM_LOG_REALLOC MEM_SIZE syn keyword xsMacro MEM_SIZE_MAX MEM_WRAP_CHECK MEM_WRAP_CHECK_ syn keyword xsMacro MEM_WRAP_CHECK_1 MEM_WRAP_CHECK_2 MEOL METHOD MEXTEND syn keyword xsMacro MGf_BYTES MGf_COPY MGf_DUP MGf_GSKIP MGf_LOCAL syn keyword xsMacro MGf_MINMATCH MGf_PERSIST MGf_REFCOUNTED MGf_REQUIRE_GV syn keyword xsMacro MGf_TAINTEDDIR MICRO_SIGN MICRO_SIGN_NATIVE MINMOD syn keyword xsMacro MJD_OFFSET_DEBUG MRO_GET_PRIVATE_DATA MSPAGAIN MULOP syn keyword xsMacro MULTICALL MULTILINE_PAT_MOD MULTIPLICITY MURMUR_C1 syn keyword xsMacro MURMUR_C2 MURMUR_C3 MURMUR_C4 MURMUR_C5 MURMUR_DOBLOCK syn keyword xsMacro MURMUR_DOBYTES MUTABLE_AV MUTABLE_CV MUTABLE_GV syn keyword xsMacro MUTABLE_HV MUTABLE_IO MUTABLE_PTR MUTABLE_SV syn keyword xsMacro MUTEX_DESTROY MUTEX_INIT MUTEX_INIT_NEEDS_MUTEX_ZEROED syn keyword xsMacro MUTEX_LOCK MUTEX_UNLOCK MY MY_CXT_CLONE MY_CXT_INDEX syn keyword xsMacro MY_CXT_INIT MY_CXT_INIT_ARG MY_CXT_INIT_INTERP M_PAT_MODS syn keyword xsMacro MgBYTEPOS MgBYTEPOS_set MgPV MgPV_const MgPV_nolen_const syn keyword xsMacro MgTAINTEDDIR MgTAINTEDDIR_off MgTAINTEDDIR_on Mkdir Move syn keyword xsMacro MoveD NAN_COMPARE_BROKEN NATIVE8_TO_UNI syn keyword xsMacro NATIVE_BYTE_IS_INVARIANT NATIVE_SKIP NATIVE_TO_ASCII syn keyword xsMacro NATIVE_TO_I8 NATIVE_TO_LATIN1 NATIVE_TO_UNI NATIVE_TO_UTF syn keyword xsMacro NATIVE_UTF8_TO_I8 NBOUND NBOUNDA NBOUNDL NBOUNDU syn keyword xsMacro NBSP_NATIVE NBSP_UTF8 NDBM_H_USES_PROTOTYPES NDEBUG syn keyword xsMacro NEED_PTHREAD_INIT NEED_VA_COPY NEGATIVE_INDICES_VAR syn keyword xsMacro NETDB_R_OBSOLETE NEWSV NEW_VERSION NEXTOPER syn keyword xsMacro NEXT_LINE_CHAR NEXT_OFF NGROUPP NOAMP NOCAPTURE_PAT_MOD syn keyword xsMacro NOCAPTURE_PAT_MODS NODE_ALIGN NODE_ALIGN_FILL NODE_STEP_B syn keyword xsMacro NODE_STEP_REGNODE NODE_SZ_STR NOLINE NONDESTRUCT_PAT_MOD syn keyword xsMacro NONDESTRUCT_PAT_MODS syn keyword xsMacro NON_OTHER_COUNT_FOR_USE_ONLY_BY_REGCOMP_DOT_C NOOP syn keyword xsMacro NORETURN_FUNCTION_END NORMAL NOTHING NOTOP NOT_IN_PAD syn keyword xsMacro NOT_REACHED NO_ENV_ARRAY_IN_MAIN NO_LOCALE syn keyword xsMacro NO_LOCALECONV_MON_THOUSANDS_SEP NO_TAINT_SUPPORT NPOSIXA syn keyword xsMacro NPOSIXD NPOSIXL NPOSIXU NREF NREFF NREFFA NREFFL NREFFU syn keyword xsMacro NSIG NUM2PTR NUM_ANYOF_CODE_POINTS NVSIZE NVTYPE syn keyword xsMacro NV_BIG_ENDIAN NV_DIG NV_EPSILON NV_INF NV_LITTLE_ENDIAN syn keyword xsMacro NV_MANT_DIG NV_MAX NV_MAX_10_EXP NV_MAX_EXP NV_MIN syn keyword xsMacro NV_MIN_10_EXP NV_MIN_EXP NV_MIX_ENDIAN NV_NAN syn keyword xsMacro NV_OVERFLOWS_INTEGERS_AT NV_PRESERVES_UV_BITS syn keyword xsMacro NV_WITHIN_IV NV_WITHIN_UV New NewOp NewOpSz Newc Newx syn keyword xsMacro Newxc Newxz Newz NofAMmeth Null Nullav Nullch Nullcv syn keyword xsMacro Nullfp Nullgv Nullhe Nullhek Nullhv Nullop Nullsv OASHIFT syn keyword xsMacro OCSHIFT OCTAL_VALUE OFFUNISKIP ONCE_PAT_MOD ONCE_PAT_MODS syn keyword xsMacro OPEN OPERAND OPFAIL OPSLOT_HEADER OPSLOT_HEADER_P syn keyword xsMacro OPTIMIZED OP_BINARY OP_CHECK_MUTEX_INIT syn keyword xsMacro OP_CHECK_MUTEX_LOCK OP_CHECK_MUTEX_TERM syn keyword xsMacro OP_CHECK_MUTEX_UNLOCK OP_CLASS OP_DESC OP_ENTRY_PROBE syn keyword xsMacro OP_FREED OP_GIMME OP_GIMME_REVERSE OP_IS_DIRHOP syn keyword xsMacro OP_IS_FILETEST OP_IS_FILETEST_ACCESS OP_IS_INFIX_BIT syn keyword xsMacro OP_IS_NUMCOMPARE OP_IS_SOCKET OP_LVALUE_NO_CROAK OP_NAME syn keyword xsMacro OP_REFCNT_INIT OP_REFCNT_LOCK OP_REFCNT_TERM syn keyword xsMacro OP_REFCNT_UNLOCK OP_SIBLING OP_TYPE_IS OP_TYPE_ISNT syn keyword xsMacro OP_TYPE_ISNT_AND_WASNT OP_TYPE_ISNT_AND_WASNT_NN syn keyword xsMacro OP_TYPE_ISNT_NN OP_TYPE_IS_NN OP_TYPE_IS_OR_WAS syn keyword xsMacro OP_TYPE_IS_OR_WAS_NN OROP OROR OSNAME OSVERS O_CREAT syn keyword xsMacro O_RDONLY O_RDWR O_TEXT O_WRONLY Off Off_t_size syn keyword xsMacro OpHAS_SIBLING OpLASTSIB_set OpMAYBESIB_set OpMORESIB_set syn keyword xsMacro OpREFCNT_dec OpREFCNT_inc OpREFCNT_set OpSIBLING OpSLAB syn keyword xsMacro OpSLOT OpslabREFCNT_dec OpslabREFCNT_dec_padok OutCopFILE syn keyword xsMacro PADNAME_FROM_PV PADNAMEt_LVALUE PADNAMEt_OUR syn keyword xsMacro PADNAMEt_OUTER PADNAMEt_STATE PADNAMEt_TYPED PAD_BASE_SV syn keyword xsMacro PAD_CLONE_VARS PAD_COMPNAME PAD_COMPNAME_FLAGS syn keyword xsMacro PAD_COMPNAME_FLAGS_isOUR PAD_COMPNAME_GEN syn keyword xsMacro PAD_COMPNAME_GEN_set PAD_COMPNAME_OURSTASH syn keyword xsMacro PAD_COMPNAME_PV PAD_COMPNAME_SV PAD_COMPNAME_TYPE syn keyword xsMacro PAD_FAKELEX_ANON PAD_FAKELEX_MULTI PAD_RESTORE_LOCAL syn keyword xsMacro PAD_SAVE_LOCAL PAD_SAVE_SETNULLPAD PAD_SETSV PAD_SET_CUR syn keyword xsMacro PAD_SET_CUR_NOSAVE PAD_SV PAD_SVl PARENT_FAKELEX_FLAGS syn keyword xsMacro PARENT_PAD_INDEX PARSE_OPTIONAL PASS1 PASS2 PATCHLEVEL syn keyword xsMacro PERLDB_ALL PERLDB_GOTO PERLDB_INTER PERLDB_LINE syn keyword xsMacro PERLDB_NAMEANON PERLDB_NAMEEVAL PERLDB_NOOPT syn keyword xsMacro PERLDB_SAVESRC PERLDB_SAVESRC_INVALID syn keyword xsMacro PERLDB_SAVESRC_NOSUBS PERLDB_SINGLE PERLDB_SUB syn keyword xsMacro PERLDB_SUBLINE PERLDB_SUB_NN PERLDBf_GOTO PERLDBf_INTER syn keyword xsMacro PERLDBf_LINE PERLDBf_NAMEANON PERLDBf_NAMEEVAL syn keyword xsMacro PERLDBf_NONAME PERLDBf_NOOPT PERLDBf_SAVESRC syn keyword xsMacro PERLDBf_SAVESRC_INVALID PERLDBf_SAVESRC_NOSUBS syn keyword xsMacro PERLDBf_SINGLE PERLDBf_SUB PERLDBf_SUBLINE syn keyword xsMacro PERLIOBUF_DEFAULT_BUFSIZ PERLIO_DUP_CLONE PERLIO_DUP_FD syn keyword xsMacro PERLIO_FUNCS_CAST PERLIO_FUNCS_CONST PERLIO_FUNCS_DECL syn keyword xsMacro PERLIO_F_APPEND PERLIO_F_CANREAD PERLIO_F_CANWRITE syn keyword xsMacro PERLIO_F_CLEARED PERLIO_F_CRLF PERLIO_F_EOF syn keyword xsMacro PERLIO_F_ERROR PERLIO_F_FASTGETS PERLIO_F_LINEBUF syn keyword xsMacro PERLIO_F_NOTREG PERLIO_F_OPEN PERLIO_F_RDBUF syn keyword xsMacro PERLIO_F_TEMP PERLIO_F_TRUNCATE PERLIO_F_TTY syn keyword xsMacro PERLIO_F_UNBUF PERLIO_F_UTF8 PERLIO_F_WRBUF PERLIO_INIT syn keyword xsMacro PERLIO_IS_STDIO PERLIO_K_BUFFERED PERLIO_K_CANCRLF syn keyword xsMacro PERLIO_K_DESTRUCT PERLIO_K_DUMMY PERLIO_K_FASTGETS syn keyword xsMacro PERLIO_K_MULTIARG PERLIO_K_RAW PERLIO_K_UTF8 syn keyword xsMacro PERLIO_LAYERS PERLIO_NOT_STDIO PERLIO_STDTEXT PERLIO_TERM syn keyword xsMacro PERLIO_USING_CRLF PERLSI_DESTROY PERLSI_DIEHOOK syn keyword xsMacro PERLSI_MAGIC PERLSI_MAIN PERLSI_OVERLOAD PERLSI_REQUIRE syn keyword xsMacro PERLSI_SIGNAL PERLSI_SORT PERLSI_UNDEF PERLSI_UNKNOWN syn keyword xsMacro PERLSI_WARNHOOK PERL_ABS PERL_ALLOC_CHECK PERL_ANY_COW syn keyword xsMacro PERL_API_REVISION PERL_API_SUBVERSION PERL_API_VERSION syn keyword xsMacro PERL_API_VERSION_STRING PERL_ARENA_ROOTS_SIZE syn keyword xsMacro PERL_ARENA_SIZE PERL_ARGS_ASSERT_ADD_ABOVE_LATIN1_FOLDS syn keyword xsMacro PERL_ARGS_ASSERT_ADD_DATA syn keyword xsMacro PERL_ARGS_ASSERT_ADD_MULTI_MATCH syn keyword xsMacro PERL_ARGS_ASSERT_ADD_UTF16_TEXTFILTER syn keyword xsMacro PERL_ARGS_ASSERT_ADJUST_SIZE_AND_FIND_BUCKET syn keyword xsMacro PERL_ARGS_ASSERT_ADVANCE_ONE_SB syn keyword xsMacro PERL_ARGS_ASSERT_ADVANCE_ONE_WB syn keyword xsMacro PERL_ARGS_ASSERT_ALLOCCOPSTASH PERL_ARGS_ASSERT_ALLOCMY syn keyword xsMacro PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT syn keyword xsMacro PERL_ARGS_ASSERT_AMAGIC_CALL PERL_ARGS_ASSERT_AMAGIC_CMP syn keyword xsMacro PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE syn keyword xsMacro PERL_ARGS_ASSERT_AMAGIC_DEREF_CALL syn keyword xsMacro PERL_ARGS_ASSERT_AMAGIC_I_NCMP syn keyword xsMacro PERL_ARGS_ASSERT_AMAGIC_NCMP syn keyword xsMacro PERL_ARGS_ASSERT_ANONYMISE_CV_MAYBE syn keyword xsMacro PERL_ARGS_ASSERT_ANY_DUP syn keyword xsMacro PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE syn keyword xsMacro PERL_ARGS_ASSERT_APPLY PERL_ARGS_ASSERT_APPLY_ATTRS syn keyword xsMacro PERL_ARGS_ASSERT_APPLY_ATTRS_MY syn keyword xsMacro PERL_ARGS_ASSERT_APPLY_ATTRS_STRING syn keyword xsMacro PERL_ARGS_ASSERT_ASSERT_UFT8_CACHE_COHERENT syn keyword xsMacro PERL_ARGS_ASSERT_AV_ARYLEN_P PERL_ARGS_ASSERT_AV_CLEAR syn keyword xsMacro PERL_ARGS_ASSERT_AV_CREATE_AND_PUSH syn keyword xsMacro PERL_ARGS_ASSERT_AV_CREATE_AND_UNSHIFT_ONE syn keyword xsMacro PERL_ARGS_ASSERT_AV_DELETE PERL_ARGS_ASSERT_AV_EXISTS syn keyword xsMacro PERL_ARGS_ASSERT_AV_EXTEND syn keyword xsMacro PERL_ARGS_ASSERT_AV_EXTEND_GUTS PERL_ARGS_ASSERT_AV_FETCH syn keyword xsMacro PERL_ARGS_ASSERT_AV_FILL PERL_ARGS_ASSERT_AV_ITER_P syn keyword xsMacro PERL_ARGS_ASSERT_AV_LEN PERL_ARGS_ASSERT_AV_MAKE syn keyword xsMacro PERL_ARGS_ASSERT_AV_POP PERL_ARGS_ASSERT_AV_PUSH syn keyword xsMacro PERL_ARGS_ASSERT_AV_REIFY PERL_ARGS_ASSERT_AV_SHIFT syn keyword xsMacro PERL_ARGS_ASSERT_AV_STORE PERL_ARGS_ASSERT_AV_TOP_INDEX syn keyword xsMacro PERL_ARGS_ASSERT_AV_UNDEF PERL_ARGS_ASSERT_AV_UNSHIFT syn keyword xsMacro PERL_ARGS_ASSERT_BACKUP_ONE_SB syn keyword xsMacro PERL_ARGS_ASSERT_BACKUP_ONE_WB syn keyword xsMacro PERL_ARGS_ASSERT_BAD_TYPE_GV PERL_ARGS_ASSERT_BAD_TYPE_PV syn keyword xsMacro PERL_ARGS_ASSERT_BIND_MATCH syn keyword xsMacro PERL_ARGS_ASSERT_BLOCKHOOK_REGISTER syn keyword xsMacro PERL_ARGS_ASSERT_BYTES_CMP_UTF8 syn keyword xsMacro PERL_ARGS_ASSERT_BYTES_FROM_UTF8 syn keyword xsMacro PERL_ARGS_ASSERT_BYTES_TO_UTF8 PERL_ARGS_ASSERT_CALL_ARGV syn keyword xsMacro PERL_ARGS_ASSERT_CALL_LIST PERL_ARGS_ASSERT_CALL_METHOD syn keyword xsMacro PERL_ARGS_ASSERT_CALL_PV PERL_ARGS_ASSERT_CALL_SV syn keyword xsMacro PERL_ARGS_ASSERT_CANDO PERL_ARGS_ASSERT_CHECKCOMMA syn keyword xsMacro PERL_ARGS_ASSERT_CHECK_LOCALE_BOUNDARY_CROSSING syn keyword xsMacro PERL_ARGS_ASSERT_CHECK_TYPE_AND_OPEN syn keyword xsMacro PERL_ARGS_ASSERT_CHECK_UTF8_PRINT syn keyword xsMacro PERL_ARGS_ASSERT_CK_ANONCODE PERL_ARGS_ASSERT_CK_BACKTICK syn keyword xsMacro PERL_ARGS_ASSERT_CK_BITOP PERL_ARGS_ASSERT_CK_CMP syn keyword xsMacro PERL_ARGS_ASSERT_CK_CONCAT PERL_ARGS_ASSERT_CK_DEFINED syn keyword xsMacro PERL_ARGS_ASSERT_CK_DELETE PERL_ARGS_ASSERT_CK_EACH syn keyword xsMacro PERL_ARGS_ASSERT_CK_ENTERSUB_ARGS_CORE syn keyword xsMacro PERL_ARGS_ASSERT_CK_ENTERSUB_ARGS_LIST syn keyword xsMacro PERL_ARGS_ASSERT_CK_ENTERSUB_ARGS_PROTO syn keyword xsMacro PERL_ARGS_ASSERT_CK_ENTERSUB_ARGS_PROTO_OR_LIST syn keyword xsMacro PERL_ARGS_ASSERT_CK_EOF PERL_ARGS_ASSERT_CK_EVAL syn keyword xsMacro PERL_ARGS_ASSERT_CK_EXEC PERL_ARGS_ASSERT_CK_EXISTS syn keyword xsMacro PERL_ARGS_ASSERT_CK_FTST PERL_ARGS_ASSERT_CK_FUN syn keyword xsMacro PERL_ARGS_ASSERT_CK_GLOB PERL_ARGS_ASSERT_CK_GREP syn keyword xsMacro PERL_ARGS_ASSERT_CK_INDEX PERL_ARGS_ASSERT_CK_JOIN syn keyword xsMacro PERL_ARGS_ASSERT_CK_LENGTH PERL_ARGS_ASSERT_CK_LFUN syn keyword xsMacro PERL_ARGS_ASSERT_CK_LISTIOB PERL_ARGS_ASSERT_CK_MATCH syn keyword xsMacro PERL_ARGS_ASSERT_CK_METHOD PERL_ARGS_ASSERT_CK_NULL syn keyword xsMacro PERL_ARGS_ASSERT_CK_OPEN PERL_ARGS_ASSERT_CK_PROTOTYPE syn keyword xsMacro PERL_ARGS_ASSERT_CK_READLINE syn keyword xsMacro PERL_ARGS_ASSERT_CK_REFASSIGN PERL_ARGS_ASSERT_CK_REPEAT syn keyword xsMacro PERL_ARGS_ASSERT_CK_REQUIRE PERL_ARGS_ASSERT_CK_RETURN syn keyword xsMacro PERL_ARGS_ASSERT_CK_RFUN PERL_ARGS_ASSERT_CK_RVCONST syn keyword xsMacro PERL_ARGS_ASSERT_CK_SASSIGN PERL_ARGS_ASSERT_CK_SELECT syn keyword xsMacro PERL_ARGS_ASSERT_CK_SHIFT PERL_ARGS_ASSERT_CK_SMARTMATCH syn keyword xsMacro PERL_ARGS_ASSERT_CK_SORT PERL_ARGS_ASSERT_CK_SPAIR syn keyword xsMacro PERL_ARGS_ASSERT_CK_SPLIT PERL_ARGS_ASSERT_CK_STRINGIFY syn keyword xsMacro PERL_ARGS_ASSERT_CK_SUBR PERL_ARGS_ASSERT_CK_SUBSTR syn keyword xsMacro PERL_ARGS_ASSERT_CK_SVCONST PERL_ARGS_ASSERT_CK_TELL syn keyword xsMacro PERL_ARGS_ASSERT_CK_TRUNC PERL_ARGS_ASSERT_CK_WARNER syn keyword xsMacro PERL_ARGS_ASSERT_CK_WARNER_D syn keyword xsMacro PERL_ARGS_ASSERT_CLEAR_PLACEHOLDERS syn keyword xsMacro PERL_ARGS_ASSERT_CLEAR_SPECIAL_BLOCKS syn keyword xsMacro PERL_ARGS_ASSERT_CLONE_PARAMS_DEL syn keyword xsMacro PERL_ARGS_ASSERT_CLONE_PARAMS_NEW syn keyword xsMacro PERL_ARGS_ASSERT_CLOSEST_COP syn keyword xsMacro PERL_ARGS_ASSERT_COMPUTE_EXACTISH syn keyword xsMacro PERL_ARGS_ASSERT_CONSTRUCT_AHOCORASICK_FROM_TRIE syn keyword xsMacro PERL_ARGS_ASSERT_COP_FETCH_LABEL syn keyword xsMacro PERL_ARGS_ASSERT_COP_FREE syn keyword xsMacro PERL_ARGS_ASSERT_COP_STORE_LABEL syn keyword xsMacro PERL_ARGS_ASSERT_CORESUB_OP syn keyword xsMacro PERL_ARGS_ASSERT_CORE_PROTOTYPE syn keyword xsMacro PERL_ARGS_ASSERT_COULD_IT_BE_A_POSIX_CLASS syn keyword xsMacro PERL_ARGS_ASSERT_CROAK_SV PERL_ARGS_ASSERT_CROAK_XS_USAGE syn keyword xsMacro PERL_ARGS_ASSERT_CURSE PERL_ARGS_ASSERT_CUSTOM_OP_DESC syn keyword xsMacro PERL_ARGS_ASSERT_CUSTOM_OP_GET_FIELD syn keyword xsMacro PERL_ARGS_ASSERT_CUSTOM_OP_NAME syn keyword xsMacro PERL_ARGS_ASSERT_CUSTOM_OP_REGISTER syn keyword xsMacro PERL_ARGS_ASSERT_CVGV_FROM_HEK PERL_ARGS_ASSERT_CVGV_SET syn keyword xsMacro PERL_ARGS_ASSERT_CVSTASH_SET syn keyword xsMacro PERL_ARGS_ASSERT_CV_CKPROTO_LEN_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_CV_CLONE PERL_ARGS_ASSERT_CV_CLONE_INTO syn keyword xsMacro PERL_ARGS_ASSERT_CV_DUMP syn keyword xsMacro PERL_ARGS_ASSERT_CV_GET_CALL_CHECKER syn keyword xsMacro PERL_ARGS_ASSERT_CV_NAME syn keyword xsMacro PERL_ARGS_ASSERT_CV_SET_CALL_CHECKER syn keyword xsMacro PERL_ARGS_ASSERT_CV_SET_CALL_CHECKER_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_CV_UNDEF PERL_ARGS_ASSERT_CV_UNDEF_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_CX_DUMP PERL_ARGS_ASSERT_CX_DUP syn keyword xsMacro PERL_ARGS_ASSERT_DEB PERL_ARGS_ASSERT_DEBOP syn keyword xsMacro PERL_ARGS_ASSERT_DEBPROF syn keyword xsMacro PERL_ARGS_ASSERT_DEBUG_START_MATCH syn keyword xsMacro PERL_ARGS_ASSERT_DEB_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_DEB_STACK_N syn keyword xsMacro PERL_ARGS_ASSERT_DEFELEM_TARGET PERL_ARGS_ASSERT_DELIMCPY syn keyword xsMacro PERL_ARGS_ASSERT_DEL_SV PERL_ARGS_ASSERT_DESTROY_MATCHER syn keyword xsMacro PERL_ARGS_ASSERT_DIE_SV PERL_ARGS_ASSERT_DIE_UNWIND syn keyword xsMacro PERL_ARGS_ASSERT_DIRP_DUP PERL_ARGS_ASSERT_DIV128 syn keyword xsMacro PERL_ARGS_ASSERT_DOFILE PERL_ARGS_ASSERT_DOFINDLABEL syn keyword xsMacro PERL_ARGS_ASSERT_DOFORM PERL_ARGS_ASSERT_DOONELINER syn keyword xsMacro PERL_ARGS_ASSERT_DOOPEN_PM PERL_ARGS_ASSERT_DOPARSEFORM syn keyword xsMacro PERL_ARGS_ASSERT_DOPOPTOLABEL syn keyword xsMacro PERL_ARGS_ASSERT_DOPOPTOSUB_AT PERL_ARGS_ASSERT_DOREF syn keyword xsMacro PERL_ARGS_ASSERT_DO_AEXEC PERL_ARGS_ASSERT_DO_AEXEC5 syn keyword xsMacro PERL_ARGS_ASSERT_DO_ASPAWN PERL_ARGS_ASSERT_DO_BINMODE syn keyword xsMacro PERL_ARGS_ASSERT_DO_CHOMP PERL_ARGS_ASSERT_DO_DUMP_PAD syn keyword xsMacro PERL_ARGS_ASSERT_DO_EOF PERL_ARGS_ASSERT_DO_EXEC syn keyword xsMacro PERL_ARGS_ASSERT_DO_EXEC3 PERL_ARGS_ASSERT_DO_GVGV_DUMP syn keyword xsMacro PERL_ARGS_ASSERT_DO_GV_DUMP PERL_ARGS_ASSERT_DO_HV_DUMP syn keyword xsMacro PERL_ARGS_ASSERT_DO_IPCCTL PERL_ARGS_ASSERT_DO_IPCGET syn keyword xsMacro PERL_ARGS_ASSERT_DO_JOIN PERL_ARGS_ASSERT_DO_MAGIC_DUMP syn keyword xsMacro PERL_ARGS_ASSERT_DO_MSGRCV PERL_ARGS_ASSERT_DO_MSGSND syn keyword xsMacro PERL_ARGS_ASSERT_DO_NCMP PERL_ARGS_ASSERT_DO_ODDBALL syn keyword xsMacro PERL_ARGS_ASSERT_DO_OPEN PERL_ARGS_ASSERT_DO_OPEN6 syn keyword xsMacro PERL_ARGS_ASSERT_DO_OPEN9 PERL_ARGS_ASSERT_DO_OPENN syn keyword xsMacro PERL_ARGS_ASSERT_DO_OPEN_RAW PERL_ARGS_ASSERT_DO_OP_DUMP syn keyword xsMacro PERL_ARGS_ASSERT_DO_PMOP_DUMP PERL_ARGS_ASSERT_DO_PRINT syn keyword xsMacro PERL_ARGS_ASSERT_DO_SEMOP PERL_ARGS_ASSERT_DO_SHMIO syn keyword xsMacro PERL_ARGS_ASSERT_DO_SPAWN syn keyword xsMacro PERL_ARGS_ASSERT_DO_SPAWN_NOWAIT syn keyword xsMacro PERL_ARGS_ASSERT_DO_SPRINTF PERL_ARGS_ASSERT_DO_SV_DUMP syn keyword xsMacro PERL_ARGS_ASSERT_DO_SYSSEEK PERL_ARGS_ASSERT_DO_TELL syn keyword xsMacro PERL_ARGS_ASSERT_DO_TRANS syn keyword xsMacro PERL_ARGS_ASSERT_DO_TRANS_COMPLEX syn keyword xsMacro PERL_ARGS_ASSERT_DO_TRANS_COMPLEX_UTF8 syn keyword xsMacro PERL_ARGS_ASSERT_DO_TRANS_COUNT syn keyword xsMacro PERL_ARGS_ASSERT_DO_TRANS_COUNT_UTF8 syn keyword xsMacro PERL_ARGS_ASSERT_DO_TRANS_SIMPLE syn keyword xsMacro PERL_ARGS_ASSERT_DO_TRANS_SIMPLE_UTF8 syn keyword xsMacro PERL_ARGS_ASSERT_DO_VECGET PERL_ARGS_ASSERT_DO_VECSET syn keyword xsMacro PERL_ARGS_ASSERT_DO_VOP PERL_ARGS_ASSERT_DRAND48_INIT_R syn keyword xsMacro PERL_ARGS_ASSERT_DRAND48_R PERL_ARGS_ASSERT_DUMPUNTIL syn keyword xsMacro PERL_ARGS_ASSERT_DUMP_C_BACKTRACE syn keyword xsMacro PERL_ARGS_ASSERT_DUMP_EXEC_POS PERL_ARGS_ASSERT_DUMP_FORM syn keyword xsMacro PERL_ARGS_ASSERT_DUMP_INDENT PERL_ARGS_ASSERT_DUMP_MSTATS syn keyword xsMacro PERL_ARGS_ASSERT_DUMP_PACKSUBS syn keyword xsMacro PERL_ARGS_ASSERT_DUMP_PACKSUBS_PERL syn keyword xsMacro PERL_ARGS_ASSERT_DUMP_SUB PERL_ARGS_ASSERT_DUMP_SUB_PERL syn keyword xsMacro PERL_ARGS_ASSERT_DUMP_SV_CHILD PERL_ARGS_ASSERT_DUMP_TRIE syn keyword xsMacro PERL_ARGS_ASSERT_DUMP_TRIE_INTERIM_LIST syn keyword xsMacro PERL_ARGS_ASSERT_DUMP_TRIE_INTERIM_TABLE syn keyword xsMacro PERL_ARGS_ASSERT_DUMP_VINDENT syn keyword xsMacro PERL_ARGS_ASSERT_DUP_ATTRLIST syn keyword xsMacro PERL_ARGS_ASSERT_EMULATE_COP_IO PERL_ARGS_ASSERT_EVAL_PV syn keyword xsMacro PERL_ARGS_ASSERT_EVAL_SV PERL_ARGS_ASSERT_EXEC_FAILED syn keyword xsMacro PERL_ARGS_ASSERT_EXPECT_NUMBER PERL_ARGS_ASSERT_F0CONVERT syn keyword xsMacro PERL_ARGS_ASSERT_FBM_COMPILE PERL_ARGS_ASSERT_FBM_INSTR syn keyword xsMacro PERL_ARGS_ASSERT_FEATURE_IS_ENABLED syn keyword xsMacro PERL_ARGS_ASSERT_FILTER_DEL PERL_ARGS_ASSERT_FILTER_GETS syn keyword xsMacro PERL_ARGS_ASSERT_FILTER_READ PERL_ARGS_ASSERT_FINALIZE_OP syn keyword xsMacro PERL_ARGS_ASSERT_FINALIZE_OPTREE syn keyword xsMacro PERL_ARGS_ASSERT_FIND_AND_FORGET_PMOPS syn keyword xsMacro PERL_ARGS_ASSERT_FIND_ARRAY_SUBSCRIPT syn keyword xsMacro PERL_ARGS_ASSERT_FIND_BEGINNING syn keyword xsMacro PERL_ARGS_ASSERT_FIND_BYCLASS syn keyword xsMacro PERL_ARGS_ASSERT_FIND_DEFAULT_STASH syn keyword xsMacro PERL_ARGS_ASSERT_FIND_HASH_SUBSCRIPT syn keyword xsMacro PERL_ARGS_ASSERT_FIND_IN_MY_STASH syn keyword xsMacro PERL_ARGS_ASSERT_FIND_RUNDEFSV2 syn keyword xsMacro PERL_ARGS_ASSERT_FIND_SCRIPT syn keyword xsMacro PERL_ARGS_ASSERT_FIND_UNINIT_VAR syn keyword xsMacro PERL_ARGS_ASSERT_FIRST_SYMBOL syn keyword xsMacro PERL_ARGS_ASSERT_FIXUP_ERRNO_STRING syn keyword xsMacro PERL_ARGS_ASSERT_FOLDEQ PERL_ARGS_ASSERT_FOLDEQ_LATIN1 syn keyword xsMacro PERL_ARGS_ASSERT_FOLDEQ_LOCALE syn keyword xsMacro PERL_ARGS_ASSERT_FOLDEQ_UTF8_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_FOLD_CONSTANTS syn keyword xsMacro PERL_ARGS_ASSERT_FORCE_IDENT syn keyword xsMacro PERL_ARGS_ASSERT_FORCE_STRICT_VERSION syn keyword xsMacro PERL_ARGS_ASSERT_FORCE_VERSION syn keyword xsMacro PERL_ARGS_ASSERT_FORCE_WORD PERL_ARGS_ASSERT_FORGET_PMOP syn keyword xsMacro PERL_ARGS_ASSERT_FORM PERL_ARGS_ASSERT_FORM_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_FORM_SHORT_OCTAL_WARNING syn keyword xsMacro PERL_ARGS_ASSERT_FPRINTF_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_FP_DUP syn keyword xsMacro PERL_ARGS_ASSERT_FREE_GLOBAL_STRUCT syn keyword xsMacro PERL_ARGS_ASSERT_GETCWD_SV PERL_ARGS_ASSERT_GETENV_LEN syn keyword xsMacro PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME syn keyword xsMacro PERL_ARGS_ASSERT_GET_ANYOF_CP_LIST_FOR_SSC syn keyword xsMacro PERL_ARGS_ASSERT_GET_AUX_MG PERL_ARGS_ASSERT_GET_AV syn keyword xsMacro PERL_ARGS_ASSERT_GET_CV PERL_ARGS_ASSERT_GET_CVN_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_GET_DB_SUB syn keyword xsMacro PERL_ARGS_ASSERT_GET_DEBUG_OPTS syn keyword xsMacro PERL_ARGS_ASSERT_GET_HASH_SEED PERL_ARGS_ASSERT_GET_HV syn keyword xsMacro PERL_ARGS_ASSERT_GET_INVLIST_ITER_ADDR syn keyword xsMacro PERL_ARGS_ASSERT_GET_INVLIST_OFFSET_ADDR syn keyword xsMacro PERL_ARGS_ASSERT_GET_INVLIST_PREVIOUS_INDEX_ADDR syn keyword xsMacro PERL_ARGS_ASSERT_GET_MSTATS PERL_ARGS_ASSERT_GET_NUM syn keyword xsMacro PERL_ARGS_ASSERT_GET_SV PERL_ARGS_ASSERT_GLOB_2NUMBER syn keyword xsMacro PERL_ARGS_ASSERT_GLOB_ASSIGN_GLOB PERL_ARGS_ASSERT_GP_DUP syn keyword xsMacro PERL_ARGS_ASSERT_GROK_ATOUV PERL_ARGS_ASSERT_GROK_BIN syn keyword xsMacro PERL_ARGS_ASSERT_GROK_BSLASH_N syn keyword xsMacro PERL_ARGS_ASSERT_GROK_BSLASH_O syn keyword xsMacro PERL_ARGS_ASSERT_GROK_BSLASH_X PERL_ARGS_ASSERT_GROK_HEX syn keyword xsMacro PERL_ARGS_ASSERT_GROK_INFNAN PERL_ARGS_ASSERT_GROK_NUMBER syn keyword xsMacro PERL_ARGS_ASSERT_GROK_NUMBER_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_GROK_NUMERIC_RADIX syn keyword xsMacro PERL_ARGS_ASSERT_GROK_OCT PERL_ARGS_ASSERT_GROUP_END syn keyword xsMacro PERL_ARGS_ASSERT_GV_AMUPDATE syn keyword xsMacro PERL_ARGS_ASSERT_GV_AUTOLOAD_PV syn keyword xsMacro PERL_ARGS_ASSERT_GV_AUTOLOAD_PVN syn keyword xsMacro PERL_ARGS_ASSERT_GV_AUTOLOAD_SV PERL_ARGS_ASSERT_GV_CHECK syn keyword xsMacro PERL_ARGS_ASSERT_GV_CONST_SV syn keyword xsMacro PERL_ARGS_ASSERT_GV_EFULLNAME syn keyword xsMacro PERL_ARGS_ASSERT_GV_EFULLNAME3 syn keyword xsMacro PERL_ARGS_ASSERT_GV_EFULLNAME4 syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHFILE syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHFILE_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETHOD syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETHOD_AUTOLOAD syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETHOD_PVN_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETHOD_PV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETHOD_SV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETH_PV syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETH_PVN syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETH_PVN_AUTOLOAD syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETH_PV_AUTOLOAD syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETH_SV syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHMETH_SV_AUTOLOAD syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHPV syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHPVN_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_GV_FETCHSV PERL_ARGS_ASSERT_GV_FULLNAME syn keyword xsMacro PERL_ARGS_ASSERT_GV_FULLNAME3 syn keyword xsMacro PERL_ARGS_ASSERT_GV_FULLNAME4 PERL_ARGS_ASSERT_GV_INIT_PV syn keyword xsMacro PERL_ARGS_ASSERT_GV_INIT_PVN PERL_ARGS_ASSERT_GV_INIT_SV syn keyword xsMacro PERL_ARGS_ASSERT_GV_INIT_SVTYPE syn keyword xsMacro PERL_ARGS_ASSERT_GV_IS_IN_MAIN syn keyword xsMacro PERL_ARGS_ASSERT_GV_MAGICALIZE syn keyword xsMacro PERL_ARGS_ASSERT_GV_MAGICALIZE_ISA syn keyword xsMacro PERL_ARGS_ASSERT_GV_NAME_SET PERL_ARGS_ASSERT_GV_OVERRIDE syn keyword xsMacro PERL_ARGS_ASSERT_GV_SETREF PERL_ARGS_ASSERT_GV_STASHPV syn keyword xsMacro PERL_ARGS_ASSERT_GV_STASHPVN syn keyword xsMacro PERL_ARGS_ASSERT_GV_STASHPVN_INTERNAL syn keyword xsMacro PERL_ARGS_ASSERT_GV_STASHSV syn keyword xsMacro PERL_ARGS_ASSERT_GV_TRY_DOWNGRADE syn keyword xsMacro PERL_ARGS_ASSERT_HANDLE_REGEX_SETS syn keyword xsMacro PERL_ARGS_ASSERT_HEK_DUP PERL_ARGS_ASSERT_HE_DUP syn keyword xsMacro PERL_ARGS_ASSERT_HFREEENTRIES syn keyword xsMacro PERL_ARGS_ASSERT_HFREE_NEXT_ENTRY PERL_ARGS_ASSERT_HSPLIT syn keyword xsMacro PERL_ARGS_ASSERT_HV_ASSERT PERL_ARGS_ASSERT_HV_AUXINIT syn keyword xsMacro PERL_ARGS_ASSERT_HV_AUXINIT_INTERNAL syn keyword xsMacro PERL_ARGS_ASSERT_HV_BACKREFERENCES_P syn keyword xsMacro PERL_ARGS_ASSERT_HV_CLEAR_PLACEHOLDERS syn keyword xsMacro PERL_ARGS_ASSERT_HV_COMMON_KEY_LEN syn keyword xsMacro PERL_ARGS_ASSERT_HV_DELAYFREE_ENT syn keyword xsMacro PERL_ARGS_ASSERT_HV_DELETE PERL_ARGS_ASSERT_HV_DELETE_ENT syn keyword xsMacro PERL_ARGS_ASSERT_HV_EITER_P PERL_ARGS_ASSERT_HV_EITER_SET syn keyword xsMacro PERL_ARGS_ASSERT_HV_ENAME_ADD syn keyword xsMacro PERL_ARGS_ASSERT_HV_ENAME_DELETE syn keyword xsMacro PERL_ARGS_ASSERT_HV_EXISTS PERL_ARGS_ASSERT_HV_EXISTS_ENT syn keyword xsMacro PERL_ARGS_ASSERT_HV_FETCH PERL_ARGS_ASSERT_HV_FETCH_ENT syn keyword xsMacro PERL_ARGS_ASSERT_HV_FILL PERL_ARGS_ASSERT_HV_FREE_ENT syn keyword xsMacro PERL_ARGS_ASSERT_HV_FREE_ENT_RET syn keyword xsMacro PERL_ARGS_ASSERT_HV_ITERINIT PERL_ARGS_ASSERT_HV_ITERKEY syn keyword xsMacro PERL_ARGS_ASSERT_HV_ITERKEYSV syn keyword xsMacro PERL_ARGS_ASSERT_HV_ITERNEXT syn keyword xsMacro PERL_ARGS_ASSERT_HV_ITERNEXTSV syn keyword xsMacro PERL_ARGS_ASSERT_HV_ITERNEXT_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_HV_ITERVAL syn keyword xsMacro PERL_ARGS_ASSERT_HV_KILL_BACKREFS syn keyword xsMacro PERL_ARGS_ASSERT_HV_KSPLIT PERL_ARGS_ASSERT_HV_MAGIC syn keyword xsMacro PERL_ARGS_ASSERT_HV_MAGIC_CHECK syn keyword xsMacro PERL_ARGS_ASSERT_HV_NAME_SET syn keyword xsMacro PERL_ARGS_ASSERT_HV_NOTALLOWED syn keyword xsMacro PERL_ARGS_ASSERT_HV_PLACEHOLDERS_GET syn keyword xsMacro PERL_ARGS_ASSERT_HV_PLACEHOLDERS_P syn keyword xsMacro PERL_ARGS_ASSERT_HV_PLACEHOLDERS_SET syn keyword xsMacro PERL_ARGS_ASSERT_HV_RAND_SET PERL_ARGS_ASSERT_HV_RITER_P syn keyword xsMacro PERL_ARGS_ASSERT_HV_RITER_SET PERL_ARGS_ASSERT_HV_SCALAR syn keyword xsMacro PERL_ARGS_ASSERT_INCLINE PERL_ARGS_ASSERT_INCPUSH syn keyword xsMacro PERL_ARGS_ASSERT_INCPUSH_IF_EXISTS syn keyword xsMacro PERL_ARGS_ASSERT_INCPUSH_USE_SEP syn keyword xsMacro PERL_ARGS_ASSERT_INIT_ARGV_SYMBOLS syn keyword xsMacro PERL_ARGS_ASSERT_INIT_POSTDUMP_SYMBOLS syn keyword xsMacro PERL_ARGS_ASSERT_INIT_TM PERL_ARGS_ASSERT_INPLACE_AASSIGN syn keyword xsMacro PERL_ARGS_ASSERT_INSTR PERL_ARGS_ASSERT_INTUIT_METHOD syn keyword xsMacro PERL_ARGS_ASSERT_INTUIT_MORE syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_ARRAY syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_CLONE syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_EXTEND syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_HIGHEST syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_IS_ITERATING syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_ITERFINISH syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_ITERINIT syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_ITERNEXT syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_MAX syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_PREVIOUS_INDEX syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_SET_LEN syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_SET_PREVIOUS_INDEX syn keyword xsMacro PERL_ARGS_ASSERT_INVLIST_TRIM PERL_ARGS_ASSERT_IO_CLOSE syn keyword xsMacro PERL_ARGS_ASSERT_ISALNUM_LAZY PERL_ARGS_ASSERT_ISA_LOOKUP syn keyword xsMacro PERL_ARGS_ASSERT_ISFOO_UTF8_LC syn keyword xsMacro PERL_ARGS_ASSERT_ISIDFIRST_LAZY syn keyword xsMacro PERL_ARGS_ASSERT_ISINFNANSV PERL_ARGS_ASSERT_ISSB syn keyword xsMacro PERL_ARGS_ASSERT_ISWB PERL_ARGS_ASSERT_IS_AN_INT syn keyword xsMacro PERL_ARGS_ASSERT_IS_HANDLE_CONSTRUCTOR syn keyword xsMacro PERL_ARGS_ASSERT_IS_INVARIANT_STRING syn keyword xsMacro PERL_ARGS_ASSERT_IS_SAFE_SYSCALL syn keyword xsMacro PERL_ARGS_ASSERT_IS_SSC_WORTH_IT syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_ALNUM syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_ALNUMC syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_ALPHA syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_ASCII syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_BLANK syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_CHAR syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_CHAR_BUF syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_CNTRL syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_COMMON syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_DIGIT syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_GRAPH syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_IDCONT syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_IDFIRST syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_LOWER syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_MARK syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_PERL_SPACE syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_PERL_WORD syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_POSIX_DIGIT syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_PRINT syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_PUNCT syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_SPACE syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_STRING syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_UPPER syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_XDIGIT syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_XIDCONT syn keyword xsMacro PERL_ARGS_ASSERT_IS_UTF8_XIDFIRST PERL_ARGS_ASSERT_JMAYBE syn keyword xsMacro PERL_ARGS_ASSERT_JOIN_EXACT PERL_ARGS_ASSERT_KEYWORD syn keyword xsMacro PERL_ARGS_ASSERT_KEYWORD_PLUGIN_STANDARD syn keyword xsMacro PERL_ARGS_ASSERT_LEAVE_COMMON syn keyword xsMacro PERL_ARGS_ASSERT_LEX_DISCARD_TO syn keyword xsMacro PERL_ARGS_ASSERT_LEX_READ_TO syn keyword xsMacro PERL_ARGS_ASSERT_LEX_STUFF_PV syn keyword xsMacro PERL_ARGS_ASSERT_LEX_STUFF_PVN syn keyword xsMacro PERL_ARGS_ASSERT_LEX_STUFF_SV syn keyword xsMacro PERL_ARGS_ASSERT_LEX_UNSTUFF PERL_ARGS_ASSERT_LOAD_MODULE syn keyword xsMacro PERL_ARGS_ASSERT_LOAD_MODULE_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_LOCALIZE syn keyword xsMacro PERL_ARGS_ASSERT_LOOKS_LIKE_BOOL syn keyword xsMacro PERL_ARGS_ASSERT_LOOKS_LIKE_NUMBER PERL_ARGS_ASSERT_LOP syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_CLEARARYLEN_P syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_CLEARENV syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_CLEARHINT syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_CLEARHINTS syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_CLEARISA syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_CLEARPACK syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_CLEARSIG syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_CLEAR_ALL_ENV syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_COPYCALLCHECKER syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_EXISTSPACK syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_FREEARYLEN_P syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_FREEOVRLD syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GET syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETARYLEN syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETDEBUGVAR syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETDEFELEM syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETNKEYS syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETPACK syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETPOS syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETSIG syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETSUBSTR syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETTAINT syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETUVAR syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_GETVEC syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_KILLBACKREFS syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_METHCALL syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_METHCALL1 syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_METHPACK syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_NEXTPACK syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_REGDATA_CNT syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_REGDATUM_GET syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SCALARPACK syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SET syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETARYLEN syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETCOLLXFRM syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETDBLINE syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETDEBUGVAR syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETDEFELEM syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETENV syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETHINT syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETISA syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETLVREF syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETMGLOB syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETNKEYS syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETPACK syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETPOS syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETREGEXP syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETSIG syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETSUBSTR syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETTAINT syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETUTF8 syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETUVAR syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SETVEC syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SET_ALL_ENV syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_SIZEPACK syn keyword xsMacro PERL_ARGS_ASSERT_MAGIC_WIPEPACK syn keyword xsMacro PERL_ARGS_ASSERT_MAKE_MATCHER PERL_ARGS_ASSERT_MAKE_TRIE syn keyword xsMacro PERL_ARGS_ASSERT_MALLOCED_SIZE syn keyword xsMacro PERL_ARGS_ASSERT_MATCHER_MATCHES_SV syn keyword xsMacro PERL_ARGS_ASSERT_MAYBERELOCATE syn keyword xsMacro PERL_ARGS_ASSERT_MAYBE_MULTIMAGIC_GV syn keyword xsMacro PERL_ARGS_ASSERT_MEASURE_STRUCT syn keyword xsMacro PERL_ARGS_ASSERT_MEM_COLLXFRM syn keyword xsMacro PERL_ARGS_ASSERT_MEM_LOG_COMMON PERL_ARGS_ASSERT_MESS syn keyword xsMacro PERL_ARGS_ASSERT_MESS_NOCONTEXT PERL_ARGS_ASSERT_MESS_SV syn keyword xsMacro PERL_ARGS_ASSERT_MG_CLEAR PERL_ARGS_ASSERT_MG_COPY syn keyword xsMacro PERL_ARGS_ASSERT_MG_DUP PERL_ARGS_ASSERT_MG_FIND_MGLOB syn keyword xsMacro PERL_ARGS_ASSERT_MG_FREE PERL_ARGS_ASSERT_MG_FREE_TYPE syn keyword xsMacro PERL_ARGS_ASSERT_MG_GET PERL_ARGS_ASSERT_MG_LENGTH syn keyword xsMacro PERL_ARGS_ASSERT_MG_LOCALIZE PERL_ARGS_ASSERT_MG_MAGICAL syn keyword xsMacro PERL_ARGS_ASSERT_MG_SET PERL_ARGS_ASSERT_MG_SIZE syn keyword xsMacro PERL_ARGS_ASSERT_MINI_MKTIME syn keyword xsMacro PERL_ARGS_ASSERT_MORESWITCHES syn keyword xsMacro PERL_ARGS_ASSERT_MOVE_PROTO_ATTR syn keyword xsMacro PERL_ARGS_ASSERT_MRO_CLEAN_ISAREV syn keyword xsMacro PERL_ARGS_ASSERT_MRO_GATHER_AND_RENAME syn keyword xsMacro PERL_ARGS_ASSERT_MRO_GET_FROM_NAME syn keyword xsMacro PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA syn keyword xsMacro PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA_DFS syn keyword xsMacro PERL_ARGS_ASSERT_MRO_GET_PRIVATE_DATA syn keyword xsMacro PERL_ARGS_ASSERT_MRO_ISA_CHANGED_IN syn keyword xsMacro PERL_ARGS_ASSERT_MRO_META_DUP syn keyword xsMacro PERL_ARGS_ASSERT_MRO_META_INIT syn keyword xsMacro PERL_ARGS_ASSERT_MRO_METHOD_CHANGED_IN syn keyword xsMacro PERL_ARGS_ASSERT_MRO_PACKAGE_MOVED syn keyword xsMacro PERL_ARGS_ASSERT_MRO_REGISTER syn keyword xsMacro PERL_ARGS_ASSERT_MRO_SET_MRO syn keyword xsMacro PERL_ARGS_ASSERT_MRO_SET_PRIVATE_DATA syn keyword xsMacro PERL_ARGS_ASSERT_MUL128 syn keyword xsMacro PERL_ARGS_ASSERT_MULTIDEREF_STRINGIFY syn keyword xsMacro PERL_ARGS_ASSERT_MY_ATOF PERL_ARGS_ASSERT_MY_ATOF2 syn keyword xsMacro PERL_ARGS_ASSERT_MY_ATTRS PERL_ARGS_ASSERT_MY_BCOPY syn keyword xsMacro PERL_ARGS_ASSERT_MY_BYTES_TO_UTF8 syn keyword xsMacro PERL_ARGS_ASSERT_MY_BZERO PERL_ARGS_ASSERT_MY_CXT_INDEX syn keyword xsMacro PERL_ARGS_ASSERT_MY_CXT_INIT PERL_ARGS_ASSERT_MY_KID syn keyword xsMacro PERL_ARGS_ASSERT_MY_MEMCMP PERL_ARGS_ASSERT_MY_MEMSET syn keyword xsMacro PERL_ARGS_ASSERT_MY_POPEN PERL_ARGS_ASSERT_MY_POPEN_LIST syn keyword xsMacro PERL_ARGS_ASSERT_MY_SNPRINTF PERL_ARGS_ASSERT_MY_SPRINTF syn keyword xsMacro PERL_ARGS_ASSERT_MY_STRFTIME syn keyword xsMacro PERL_ARGS_ASSERT_MY_VSNPRINTF PERL_ARGS_ASSERT_NEED_UTF8 syn keyword xsMacro PERL_ARGS_ASSERT_NEWAVREF PERL_ARGS_ASSERT_NEWCONDOP syn keyword xsMacro PERL_ARGS_ASSERT_NEWFOROP PERL_ARGS_ASSERT_NEWGIVENOP syn keyword xsMacro PERL_ARGS_ASSERT_NEWGIVWHENOP PERL_ARGS_ASSERT_NEWGP syn keyword xsMacro PERL_ARGS_ASSERT_NEWGVGEN_FLAGS PERL_ARGS_ASSERT_NEWGVOP syn keyword xsMacro PERL_ARGS_ASSERT_NEWHVREF PERL_ARGS_ASSERT_NEWLOGOP syn keyword xsMacro PERL_ARGS_ASSERT_NEWLOOPEX PERL_ARGS_ASSERT_NEWMETHOP syn keyword xsMacro PERL_ARGS_ASSERT_NEWMETHOP_NAMED syn keyword xsMacro PERL_ARGS_ASSERT_NEWMYSUB syn keyword xsMacro PERL_ARGS_ASSERT_NEWPADNAMEOUTER syn keyword xsMacro PERL_ARGS_ASSERT_NEWPADNAMEPVN PERL_ARGS_ASSERT_NEWPADOP syn keyword xsMacro PERL_ARGS_ASSERT_NEWPROG PERL_ARGS_ASSERT_NEWRANGE syn keyword xsMacro PERL_ARGS_ASSERT_NEWRV PERL_ARGS_ASSERT_NEWRV_NOINC syn keyword xsMacro PERL_ARGS_ASSERT_NEWSTUB PERL_ARGS_ASSERT_NEWSVAVDEFELEM syn keyword xsMacro PERL_ARGS_ASSERT_NEWSVOP PERL_ARGS_ASSERT_NEWSVPVF syn keyword xsMacro PERL_ARGS_ASSERT_NEWSVPVF_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_NEWSVREF PERL_ARGS_ASSERT_NEWSVRV syn keyword xsMacro PERL_ARGS_ASSERT_NEWWHENOP PERL_ARGS_ASSERT_NEWXS syn keyword xsMacro PERL_ARGS_ASSERT_NEWXS_DEFFILE syn keyword xsMacro PERL_ARGS_ASSERT_NEWXS_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_NEWXS_LEN_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_NEW_CONSTANT PERL_ARGS_ASSERT_NEW_CTYPE syn keyword xsMacro PERL_ARGS_ASSERT_NEW_LOGOP PERL_ARGS_ASSERT_NEW_VERSION syn keyword xsMacro PERL_ARGS_ASSERT_NEW_WARNINGS_BITFIELD syn keyword xsMacro PERL_ARGS_ASSERT_NEXTARGV PERL_ARGS_ASSERT_NEXTCHAR syn keyword xsMacro PERL_ARGS_ASSERT_NEXT_SYMBOL PERL_ARGS_ASSERT_NINSTR syn keyword xsMacro PERL_ARGS_ASSERT_NOPERL_DIE PERL_ARGS_ASSERT_NOT_A_NUMBER syn keyword xsMacro PERL_ARGS_ASSERT_NOT_INCREMENTABLE syn keyword xsMacro PERL_ARGS_ASSERT_NO_BAREWORD_ALLOWED syn keyword xsMacro PERL_ARGS_ASSERT_NO_FH_ALLOWED PERL_ARGS_ASSERT_NO_OP syn keyword xsMacro PERL_ARGS_ASSERT_OOPSAV PERL_ARGS_ASSERT_OOPSHV syn keyword xsMacro PERL_ARGS_ASSERT_OPENN_CLEANUP syn keyword xsMacro PERL_ARGS_ASSERT_OPENN_SETUP PERL_ARGS_ASSERT_OPEN_SCRIPT syn keyword xsMacro PERL_ARGS_ASSERT_OPMETHOD_STASH syn keyword xsMacro PERL_ARGS_ASSERT_OPSLAB_FORCE_FREE syn keyword xsMacro PERL_ARGS_ASSERT_OPSLAB_FREE syn keyword xsMacro PERL_ARGS_ASSERT_OPSLAB_FREE_NOPAD syn keyword xsMacro PERL_ARGS_ASSERT_OP_CLEAR syn keyword xsMacro PERL_ARGS_ASSERT_OP_CONTEXTUALIZE syn keyword xsMacro PERL_ARGS_ASSERT_OP_DUMP PERL_ARGS_ASSERT_OP_INTEGERIZE syn keyword xsMacro PERL_ARGS_ASSERT_OP_LINKLIST PERL_ARGS_ASSERT_OP_NULL syn keyword xsMacro PERL_ARGS_ASSERT_OP_PARENT PERL_ARGS_ASSERT_OP_REFCNT_DEC syn keyword xsMacro PERL_ARGS_ASSERT_OP_RELOCATE_SV syn keyword xsMacro PERL_ARGS_ASSERT_OP_STD_INIT PERL_ARGS_ASSERT_PACKAGE syn keyword xsMacro PERL_ARGS_ASSERT_PACKAGE_VERSION syn keyword xsMacro PERL_ARGS_ASSERT_PACKLIST PERL_ARGS_ASSERT_PACK_CAT syn keyword xsMacro PERL_ARGS_ASSERT_PACK_REC PERL_ARGS_ASSERT_PADLIST_DUP syn keyword xsMacro PERL_ARGS_ASSERT_PADLIST_STORE syn keyword xsMacro PERL_ARGS_ASSERT_PADNAMELIST_DUP syn keyword xsMacro PERL_ARGS_ASSERT_PADNAMELIST_FETCH syn keyword xsMacro PERL_ARGS_ASSERT_PADNAMELIST_FREE syn keyword xsMacro PERL_ARGS_ASSERT_PADNAMELIST_STORE syn keyword xsMacro PERL_ARGS_ASSERT_PADNAME_DUP syn keyword xsMacro PERL_ARGS_ASSERT_PADNAME_FREE syn keyword xsMacro PERL_ARGS_ASSERT_PAD_ADD_ANON syn keyword xsMacro PERL_ARGS_ASSERT_PAD_ADD_NAME_PV syn keyword xsMacro PERL_ARGS_ASSERT_PAD_ADD_NAME_PVN syn keyword xsMacro PERL_ARGS_ASSERT_PAD_ADD_NAME_SV syn keyword xsMacro PERL_ARGS_ASSERT_PAD_ADD_WEAKREF syn keyword xsMacro PERL_ARGS_ASSERT_PAD_ALLOC_NAME syn keyword xsMacro PERL_ARGS_ASSERT_PAD_CHECK_DUP syn keyword xsMacro PERL_ARGS_ASSERT_PAD_FINDLEX syn keyword xsMacro PERL_ARGS_ASSERT_PAD_FINDMY_PV syn keyword xsMacro PERL_ARGS_ASSERT_PAD_FINDMY_PVN syn keyword xsMacro PERL_ARGS_ASSERT_PAD_FINDMY_SV syn keyword xsMacro PERL_ARGS_ASSERT_PAD_FIXUP_INNER_ANONS syn keyword xsMacro PERL_ARGS_ASSERT_PAD_PUSH PERL_ARGS_ASSERT_PAD_SETSV syn keyword xsMacro PERL_ARGS_ASSERT_PARSER_DUP PERL_ARGS_ASSERT_PARSER_FREE syn keyword xsMacro PERL_ARGS_ASSERT_PARSER_FREE_NEXTTOKE_OPS syn keyword xsMacro PERL_ARGS_ASSERT_PARSE_GV_STASH_NAME syn keyword xsMacro PERL_ARGS_ASSERT_PARSE_IDENT syn keyword xsMacro PERL_ARGS_ASSERT_PARSE_LPAREN_QUESTION_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_PARSE_UNICODE_OPTS syn keyword xsMacro PERL_ARGS_ASSERT_PATH_IS_SEARCHABLE syn keyword xsMacro PERL_ARGS_ASSERT_PERLIO_READ syn keyword xsMacro PERL_ARGS_ASSERT_PERLIO_UNREAD syn keyword xsMacro PERL_ARGS_ASSERT_PERLIO_WRITE syn keyword xsMacro PERL_ARGS_ASSERT_PERL_ALLOC_USING syn keyword xsMacro PERL_ARGS_ASSERT_PERL_CLONE syn keyword xsMacro PERL_ARGS_ASSERT_PERL_CLONE_USING syn keyword xsMacro PERL_ARGS_ASSERT_PERL_CONSTRUCT syn keyword xsMacro PERL_ARGS_ASSERT_PERL_DESTRUCT PERL_ARGS_ASSERT_PERL_FREE syn keyword xsMacro PERL_ARGS_ASSERT_PERL_PARSE PERL_ARGS_ASSERT_PERL_RUN syn keyword xsMacro PERL_ARGS_ASSERT_PMRUNTIME PERL_ARGS_ASSERT_PMTRANS syn keyword xsMacro PERL_ARGS_ASSERT_PM_DESCRIPTION syn keyword xsMacro PERL_ARGS_ASSERT_POPULATE_ANYOF_FROM_INVLIST syn keyword xsMacro PERL_ARGS_ASSERT_POPULATE_ISA PERL_ARGS_ASSERT_PREGCOMP syn keyword xsMacro PERL_ARGS_ASSERT_PREGEXEC PERL_ARGS_ASSERT_PREGFREE2 syn keyword xsMacro PERL_ARGS_ASSERT_PRESCAN_VERSION syn keyword xsMacro PERL_ARGS_ASSERT_PRINTBUF syn keyword xsMacro PERL_ARGS_ASSERT_PRINTF_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_PROCESS_SPECIAL_BLOCKS syn keyword xsMacro PERL_ARGS_ASSERT_PTR_TABLE_FETCH syn keyword xsMacro PERL_ARGS_ASSERT_PTR_TABLE_FIND syn keyword xsMacro PERL_ARGS_ASSERT_PTR_TABLE_SPLIT syn keyword xsMacro PERL_ARGS_ASSERT_PTR_TABLE_STORE syn keyword xsMacro PERL_ARGS_ASSERT_PUT_CHARCLASS_BITMAP_INNARDS syn keyword xsMacro PERL_ARGS_ASSERT_PUT_CODE_POINT syn keyword xsMacro PERL_ARGS_ASSERT_PUT_RANGE PERL_ARGS_ASSERT_PV_DISPLAY syn keyword xsMacro PERL_ARGS_ASSERT_PV_ESCAPE PERL_ARGS_ASSERT_PV_PRETTY syn keyword xsMacro PERL_ARGS_ASSERT_PV_UNI_DISPLAY PERL_ARGS_ASSERT_QERROR syn keyword xsMacro PERL_ARGS_ASSERT_QSORTSVU syn keyword xsMacro PERL_ARGS_ASSERT_QUADMATH_FORMAT_NEEDED syn keyword xsMacro PERL_ARGS_ASSERT_QUADMATH_FORMAT_SINGLE syn keyword xsMacro PERL_ARGS_ASSERT_REENTRANT_RETRY syn keyword xsMacro PERL_ARGS_ASSERT_REFCOUNTED_HE_FETCH_PV syn keyword xsMacro PERL_ARGS_ASSERT_REFCOUNTED_HE_FETCH_PVN syn keyword xsMacro PERL_ARGS_ASSERT_REFCOUNTED_HE_FETCH_SV syn keyword xsMacro PERL_ARGS_ASSERT_REFCOUNTED_HE_NEW_PV syn keyword xsMacro PERL_ARGS_ASSERT_REFCOUNTED_HE_NEW_PVN syn keyword xsMacro PERL_ARGS_ASSERT_REFCOUNTED_HE_NEW_SV syn keyword xsMacro PERL_ARGS_ASSERT_REFCOUNTED_HE_VALUE syn keyword xsMacro PERL_ARGS_ASSERT_REFTO PERL_ARGS_ASSERT_REG syn keyword xsMacro PERL_ARGS_ASSERT_REG2LANODE PERL_ARGS_ASSERT_REGANODE syn keyword xsMacro PERL_ARGS_ASSERT_REGATOM PERL_ARGS_ASSERT_REGBRANCH syn keyword xsMacro PERL_ARGS_ASSERT_REGCLASS PERL_ARGS_ASSERT_REGCLASS_SWASH syn keyword xsMacro PERL_ARGS_ASSERT_REGCPPOP PERL_ARGS_ASSERT_REGCPPUSH syn keyword xsMacro PERL_ARGS_ASSERT_REGCURLY PERL_ARGS_ASSERT_REGDUMP syn keyword xsMacro PERL_ARGS_ASSERT_REGDUPE_INTERNAL syn keyword xsMacro PERL_ARGS_ASSERT_REGEXEC_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_REGFREE_INTERNAL syn keyword xsMacro PERL_ARGS_ASSERT_REGHOP3 PERL_ARGS_ASSERT_REGHOP4 syn keyword xsMacro PERL_ARGS_ASSERT_REGHOPMAYBE3 PERL_ARGS_ASSERT_REGINCLASS syn keyword xsMacro PERL_ARGS_ASSERT_REGINSERT PERL_ARGS_ASSERT_REGMATCH syn keyword xsMacro PERL_ARGS_ASSERT_REGNODE_GUTS PERL_ARGS_ASSERT_REGPATWS syn keyword xsMacro PERL_ARGS_ASSERT_REGPIECE PERL_ARGS_ASSERT_REGPPOSIXCC syn keyword xsMacro PERL_ARGS_ASSERT_REGPROP PERL_ARGS_ASSERT_REGREPEAT syn keyword xsMacro PERL_ARGS_ASSERT_REGTAIL PERL_ARGS_ASSERT_REGTAIL_STUDY syn keyword xsMacro PERL_ARGS_ASSERT_REGTRY syn keyword xsMacro PERL_ARGS_ASSERT_REG_CHECK_NAMED_BUFF_MATCHED syn keyword xsMacro PERL_ARGS_ASSERT_REG_NAMED_BUFF syn keyword xsMacro PERL_ARGS_ASSERT_REG_NAMED_BUFF_ALL syn keyword xsMacro PERL_ARGS_ASSERT_REG_NAMED_BUFF_EXISTS syn keyword xsMacro PERL_ARGS_ASSERT_REG_NAMED_BUFF_FETCH syn keyword xsMacro PERL_ARGS_ASSERT_REG_NAMED_BUFF_FIRSTKEY syn keyword xsMacro PERL_ARGS_ASSERT_REG_NAMED_BUFF_ITER syn keyword xsMacro PERL_ARGS_ASSERT_REG_NAMED_BUFF_NEXTKEY syn keyword xsMacro PERL_ARGS_ASSERT_REG_NAMED_BUFF_SCALAR syn keyword xsMacro PERL_ARGS_ASSERT_REG_NODE syn keyword xsMacro PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_FETCH syn keyword xsMacro PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_LENGTH syn keyword xsMacro PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_STORE syn keyword xsMacro PERL_ARGS_ASSERT_REG_QR_PACKAGE syn keyword xsMacro PERL_ARGS_ASSERT_REG_RECODE syn keyword xsMacro PERL_ARGS_ASSERT_REG_SCAN_NAME syn keyword xsMacro PERL_ARGS_ASSERT_REG_SKIPCOMMENT syn keyword xsMacro PERL_ARGS_ASSERT_REG_TEMP_COPY PERL_ARGS_ASSERT_REPEATCPY syn keyword xsMacro PERL_ARGS_ASSERT_REPORT_REDEFINED_CV syn keyword xsMacro PERL_ARGS_ASSERT_REQUIRE_PV syn keyword xsMacro PERL_ARGS_ASSERT_REQUIRE_TIE_MOD syn keyword xsMacro PERL_ARGS_ASSERT_RE_COMPILE PERL_ARGS_ASSERT_RE_CROAK2 syn keyword xsMacro PERL_ARGS_ASSERT_RE_DUP_GUTS syn keyword xsMacro PERL_ARGS_ASSERT_RE_INTUIT_START syn keyword xsMacro PERL_ARGS_ASSERT_RE_INTUIT_STRING syn keyword xsMacro PERL_ARGS_ASSERT_RE_OP_COMPILE PERL_ARGS_ASSERT_RNINSTR syn keyword xsMacro PERL_ARGS_ASSERT_RSIGNAL_SAVE syn keyword xsMacro PERL_ARGS_ASSERT_RUN_USER_FILTER syn keyword xsMacro PERL_ARGS_ASSERT_RV2CV_OP_CV PERL_ARGS_ASSERT_RVPV_DUP syn keyword xsMacro PERL_ARGS_ASSERT_RXRES_FREE syn keyword xsMacro PERL_ARGS_ASSERT_RXRES_RESTORE syn keyword xsMacro PERL_ARGS_ASSERT_RXRES_SAVE PERL_ARGS_ASSERT_SAME_DIRENT syn keyword xsMacro PERL_ARGS_ASSERT_SAVESHAREDSVPV PERL_ARGS_ASSERT_SAVESVPV syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_ADELETE syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_AELEM_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_ALIASED_SV syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_APTR PERL_ARGS_ASSERT_SAVE_ARY syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_BOOL PERL_ARGS_ASSERT_SAVE_CLEARSV syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_DELETE syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_DESTRUCTOR syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_GENERIC_PVREF syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_GENERIC_SVREF syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_GP PERL_ARGS_ASSERT_SAVE_HASH syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_HDELETE syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_HEK_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_HELEM_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_HPTR PERL_ARGS_ASSERT_SAVE_I16 syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_I32 PERL_ARGS_ASSERT_SAVE_I8 syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_INT PERL_ARGS_ASSERT_SAVE_ITEM syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_IV PERL_ARGS_ASSERT_SAVE_LINES syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_LIST PERL_ARGS_ASSERT_SAVE_LONG syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_MAGIC_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_MORTALIZESV syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_NOGV PERL_ARGS_ASSERT_SAVE_PPTR syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_SCALAR syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_SCALAR_AT syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_SET_SVFLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_SHARED_PVREF syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_SPTR PERL_ARGS_ASSERT_SAVE_STRLEN syn keyword xsMacro PERL_ARGS_ASSERT_SAVE_SVREF PERL_ARGS_ASSERT_SAVE_VPTR syn keyword xsMacro PERL_ARGS_ASSERT_SCALARBOOLEAN syn keyword xsMacro PERL_ARGS_ASSERT_SCALARVOID PERL_ARGS_ASSERT_SCAN_BIN syn keyword xsMacro PERL_ARGS_ASSERT_SCAN_COMMIT PERL_ARGS_ASSERT_SCAN_CONST syn keyword xsMacro PERL_ARGS_ASSERT_SCAN_FORMLINE syn keyword xsMacro PERL_ARGS_ASSERT_SCAN_HEREDOC PERL_ARGS_ASSERT_SCAN_HEX syn keyword xsMacro PERL_ARGS_ASSERT_SCAN_IDENT syn keyword xsMacro PERL_ARGS_ASSERT_SCAN_INPUTSYMBOL syn keyword xsMacro PERL_ARGS_ASSERT_SCAN_NUM PERL_ARGS_ASSERT_SCAN_OCT syn keyword xsMacro PERL_ARGS_ASSERT_SCAN_PAT PERL_ARGS_ASSERT_SCAN_STR syn keyword xsMacro PERL_ARGS_ASSERT_SCAN_SUBST PERL_ARGS_ASSERT_SCAN_TRANS syn keyword xsMacro PERL_ARGS_ASSERT_SCAN_VERSION syn keyword xsMacro PERL_ARGS_ASSERT_SCAN_VSTRING PERL_ARGS_ASSERT_SCAN_WORD syn keyword xsMacro PERL_ARGS_ASSERT_SEARCH_CONST PERL_ARGS_ASSERT_SETDEFOUT syn keyword xsMacro PERL_ARGS_ASSERT_SET_ANYOF_ARG syn keyword xsMacro PERL_ARGS_ASSERT_SET_CONTEXT PERL_ARGS_ASSERT_SET_PADLIST syn keyword xsMacro PERL_ARGS_ASSERT_SHARE_HEK syn keyword xsMacro PERL_ARGS_ASSERT_SHARE_HEK_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SHOULD_WARN_NL syn keyword xsMacro PERL_ARGS_ASSERT_SIMPLIFY_SORT PERL_ARGS_ASSERT_SI_DUP syn keyword xsMacro PERL_ARGS_ASSERT_SKIPSPACE_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SLAB_FREE PERL_ARGS_ASSERT_SLAB_TO_RO syn keyword xsMacro PERL_ARGS_ASSERT_SLAB_TO_RW PERL_ARGS_ASSERT_SOFTREF2XV syn keyword xsMacro PERL_ARGS_ASSERT_SORTCV PERL_ARGS_ASSERT_SORTCV_STACKED syn keyword xsMacro PERL_ARGS_ASSERT_SORTCV_XSUB PERL_ARGS_ASSERT_SORTSV syn keyword xsMacro PERL_ARGS_ASSERT_SORTSV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SPACE_JOIN_NAMES_MORTAL syn keyword xsMacro PERL_ARGS_ASSERT_SSC_ADD_RANGE PERL_ARGS_ASSERT_SSC_AND syn keyword xsMacro PERL_ARGS_ASSERT_SSC_ANYTHING syn keyword xsMacro PERL_ARGS_ASSERT_SSC_CLEAR_LOCALE syn keyword xsMacro PERL_ARGS_ASSERT_SSC_CP_AND PERL_ARGS_ASSERT_SSC_FINALIZE syn keyword xsMacro PERL_ARGS_ASSERT_SSC_INIT syn keyword xsMacro PERL_ARGS_ASSERT_SSC_INTERSECTION syn keyword xsMacro PERL_ARGS_ASSERT_SSC_IS_ANYTHING syn keyword xsMacro PERL_ARGS_ASSERT_SSC_IS_CP_POSIXL_INIT syn keyword xsMacro PERL_ARGS_ASSERT_SSC_OR PERL_ARGS_ASSERT_SSC_UNION syn keyword xsMacro PERL_ARGS_ASSERT_SS_DUP PERL_ARGS_ASSERT_STACK_GROW syn keyword xsMacro PERL_ARGS_ASSERT_START_GLOB syn keyword xsMacro PERL_ARGS_ASSERT_STDIZE_LOCALE syn keyword xsMacro PERL_ARGS_ASSERT_STRIP_RETURN syn keyword xsMacro PERL_ARGS_ASSERT_STR_TO_VERSION syn keyword xsMacro PERL_ARGS_ASSERT_STUDY_CHUNK syn keyword xsMacro PERL_ARGS_ASSERT_SUB_CRUSH_DEPTH syn keyword xsMacro PERL_ARGS_ASSERT_SV_2BOOL_FLAGS PERL_ARGS_ASSERT_SV_2CV syn keyword xsMacro PERL_ARGS_ASSERT_SV_2IO PERL_ARGS_ASSERT_SV_2IUV_COMMON syn keyword xsMacro PERL_ARGS_ASSERT_SV_2IUV_NON_PRESERVE syn keyword xsMacro PERL_ARGS_ASSERT_SV_2IV PERL_ARGS_ASSERT_SV_2IV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_2NUM PERL_ARGS_ASSERT_SV_2NV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_2PV PERL_ARGS_ASSERT_SV_2PVBYTE syn keyword xsMacro PERL_ARGS_ASSERT_SV_2PVBYTE_NOLEN syn keyword xsMacro PERL_ARGS_ASSERT_SV_2PVUTF8 syn keyword xsMacro PERL_ARGS_ASSERT_SV_2PVUTF8_NOLEN syn keyword xsMacro PERL_ARGS_ASSERT_SV_2PV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_2PV_NOLEN PERL_ARGS_ASSERT_SV_2UV syn keyword xsMacro PERL_ARGS_ASSERT_SV_2UV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_ADD_ARENA syn keyword xsMacro PERL_ARGS_ASSERT_SV_ADD_BACKREF syn keyword xsMacro PERL_ARGS_ASSERT_SV_BACKOFF PERL_ARGS_ASSERT_SV_BLESS syn keyword xsMacro PERL_ARGS_ASSERT_SV_BUF_TO_RO syn keyword xsMacro PERL_ARGS_ASSERT_SV_BUF_TO_RW PERL_ARGS_ASSERT_SV_CATPV syn keyword xsMacro PERL_ARGS_ASSERT_SV_CATPVF PERL_ARGS_ASSERT_SV_CATPVF_MG syn keyword xsMacro PERL_ARGS_ASSERT_SV_CATPVF_MG_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_SV_CATPVF_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_SV_CATPVN syn keyword xsMacro PERL_ARGS_ASSERT_SV_CATPVN_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_CATPVN_MG syn keyword xsMacro PERL_ARGS_ASSERT_SV_CATPV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_CATPV_MG PERL_ARGS_ASSERT_SV_CATSV syn keyword xsMacro PERL_ARGS_ASSERT_SV_CATSV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_CATSV_MG syn keyword xsMacro PERL_ARGS_ASSERT_SV_CAT_DECODE PERL_ARGS_ASSERT_SV_CHOP syn keyword xsMacro PERL_ARGS_ASSERT_SV_CLEAR syn keyword xsMacro PERL_ARGS_ASSERT_SV_COLLXFRM_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_COPYPV syn keyword xsMacro PERL_ARGS_ASSERT_SV_COPYPV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_DEL_BACKREF syn keyword xsMacro PERL_ARGS_ASSERT_SV_DERIVED_FROM syn keyword xsMacro PERL_ARGS_ASSERT_SV_DERIVED_FROM_PV syn keyword xsMacro PERL_ARGS_ASSERT_SV_DERIVED_FROM_PVN syn keyword xsMacro PERL_ARGS_ASSERT_SV_DERIVED_FROM_SV syn keyword xsMacro PERL_ARGS_ASSERT_SV_DISPLAY PERL_ARGS_ASSERT_SV_DOES syn keyword xsMacro PERL_ARGS_ASSERT_SV_DOES_PV PERL_ARGS_ASSERT_SV_DOES_PVN syn keyword xsMacro PERL_ARGS_ASSERT_SV_DOES_SV PERL_ARGS_ASSERT_SV_DUMP syn keyword xsMacro PERL_ARGS_ASSERT_SV_DUP PERL_ARGS_ASSERT_SV_DUP_COMMON syn keyword xsMacro PERL_ARGS_ASSERT_SV_DUP_INC syn keyword xsMacro PERL_ARGS_ASSERT_SV_DUP_INC_MULTIPLE syn keyword xsMacro PERL_ARGS_ASSERT_SV_EXP_GROW syn keyword xsMacro PERL_ARGS_ASSERT_SV_FORCE_NORMAL syn keyword xsMacro PERL_ARGS_ASSERT_SV_FORCE_NORMAL_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_FREE2 PERL_ARGS_ASSERT_SV_GETS syn keyword xsMacro PERL_ARGS_ASSERT_SV_GET_BACKREFS PERL_ARGS_ASSERT_SV_GROW syn keyword xsMacro PERL_ARGS_ASSERT_SV_INSERT syn keyword xsMacro PERL_ARGS_ASSERT_SV_INSERT_FLAGS PERL_ARGS_ASSERT_SV_ISA syn keyword xsMacro PERL_ARGS_ASSERT_SV_IV PERL_ARGS_ASSERT_SV_I_NCMP syn keyword xsMacro PERL_ARGS_ASSERT_SV_KILL_BACKREFS syn keyword xsMacro PERL_ARGS_ASSERT_SV_LEN_UTF8_NOMG syn keyword xsMacro PERL_ARGS_ASSERT_SV_MAGIC PERL_ARGS_ASSERT_SV_MAGICEXT syn keyword xsMacro PERL_ARGS_ASSERT_SV_MAGICEXT_MGLOB syn keyword xsMacro PERL_ARGS_ASSERT_SV_NCMP PERL_ARGS_ASSERT_SV_NV syn keyword xsMacro PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC syn keyword xsMacro PERL_ARGS_ASSERT_SV_OR_PV_POS_U2B syn keyword xsMacro PERL_ARGS_ASSERT_SV_POS_B2U syn keyword xsMacro PERL_ARGS_ASSERT_SV_POS_B2U_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_POS_B2U_MIDWAY syn keyword xsMacro PERL_ARGS_ASSERT_SV_POS_U2B syn keyword xsMacro PERL_ARGS_ASSERT_SV_POS_U2B_CACHED syn keyword xsMacro PERL_ARGS_ASSERT_SV_POS_U2B_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_POS_U2B_FORWARDS syn keyword xsMacro PERL_ARGS_ASSERT_SV_POS_U2B_MIDWAY PERL_ARGS_ASSERT_SV_PV syn keyword xsMacro PERL_ARGS_ASSERT_SV_PVBYTE PERL_ARGS_ASSERT_SV_PVBYTEN syn keyword xsMacro PERL_ARGS_ASSERT_SV_PVBYTEN_FORCE PERL_ARGS_ASSERT_SV_PVN syn keyword xsMacro PERL_ARGS_ASSERT_SV_PVN_FORCE syn keyword xsMacro PERL_ARGS_ASSERT_SV_PVN_FORCE_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_PVN_NOMG PERL_ARGS_ASSERT_SV_PVUTF8 syn keyword xsMacro PERL_ARGS_ASSERT_SV_PVUTF8N syn keyword xsMacro PERL_ARGS_ASSERT_SV_PVUTF8N_FORCE syn keyword xsMacro PERL_ARGS_ASSERT_SV_RECODE_TO_UTF8 syn keyword xsMacro PERL_ARGS_ASSERT_SV_REF PERL_ARGS_ASSERT_SV_REFTYPE syn keyword xsMacro PERL_ARGS_ASSERT_SV_RELEASE_COW syn keyword xsMacro PERL_ARGS_ASSERT_SV_REPLACE PERL_ARGS_ASSERT_SV_RESET syn keyword xsMacro PERL_ARGS_ASSERT_SV_RVWEAKEN PERL_ARGS_ASSERT_SV_SETHEK syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETIV PERL_ARGS_ASSERT_SV_SETIV_MG syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETNV PERL_ARGS_ASSERT_SV_SETNV_MG syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETPV PERL_ARGS_ASSERT_SV_SETPVF syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETPVF_MG syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETPVF_MG_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETPVF_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETPVIV syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETPVIV_MG PERL_ARGS_ASSERT_SV_SETPVN syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETPVN_MG syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETPV_MG syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETREF_IV syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETREF_NV syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETREF_PV syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETREF_PVN syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETREF_UV PERL_ARGS_ASSERT_SV_SETSV syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETSV_COW syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETSV_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETSV_MG PERL_ARGS_ASSERT_SV_SETUV syn keyword xsMacro PERL_ARGS_ASSERT_SV_SETUV_MG PERL_ARGS_ASSERT_SV_TAINT syn keyword xsMacro PERL_ARGS_ASSERT_SV_TAINTED PERL_ARGS_ASSERT_SV_UNGLOB syn keyword xsMacro PERL_ARGS_ASSERT_SV_UNI_DISPLAY syn keyword xsMacro PERL_ARGS_ASSERT_SV_UNMAGIC syn keyword xsMacro PERL_ARGS_ASSERT_SV_UNMAGICEXT PERL_ARGS_ASSERT_SV_UNREF syn keyword xsMacro PERL_ARGS_ASSERT_SV_UNREF_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_UNTAINT PERL_ARGS_ASSERT_SV_UPGRADE syn keyword xsMacro PERL_ARGS_ASSERT_SV_USEPVN syn keyword xsMacro PERL_ARGS_ASSERT_SV_USEPVN_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_USEPVN_MG syn keyword xsMacro PERL_ARGS_ASSERT_SV_UTF8_DECODE syn keyword xsMacro PERL_ARGS_ASSERT_SV_UTF8_DOWNGRADE syn keyword xsMacro PERL_ARGS_ASSERT_SV_UTF8_ENCODE syn keyword xsMacro PERL_ARGS_ASSERT_SV_UTF8_UPGRADE syn keyword xsMacro PERL_ARGS_ASSERT_SV_UTF8_UPGRADE_FLAGS_GROW syn keyword xsMacro PERL_ARGS_ASSERT_SV_UV PERL_ARGS_ASSERT_SV_VCATPVF syn keyword xsMacro PERL_ARGS_ASSERT_SV_VCATPVFN syn keyword xsMacro PERL_ARGS_ASSERT_SV_VCATPVFN_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_SV_VCATPVF_MG syn keyword xsMacro PERL_ARGS_ASSERT_SV_VSETPVF PERL_ARGS_ASSERT_SV_VSETPVFN syn keyword xsMacro PERL_ARGS_ASSERT_SV_VSETPVF_MG syn keyword xsMacro PERL_ARGS_ASSERT_SWALLOW_BOM PERL_ARGS_ASSERT_SWASH_FETCH syn keyword xsMacro PERL_ARGS_ASSERT_SWASH_INIT syn keyword xsMacro PERL_ARGS_ASSERT_SWASH_SCAN_LIST_LINE syn keyword xsMacro PERL_ARGS_ASSERT_SWATCH_GET PERL_ARGS_ASSERT_SYS_INIT syn keyword xsMacro PERL_ARGS_ASSERT_SYS_INIT3 syn keyword xsMacro PERL_ARGS_ASSERT_SYS_INTERN_DUP syn keyword xsMacro PERL_ARGS_ASSERT_TAINT_PROPER syn keyword xsMacro PERL_ARGS_ASSERT_TIED_METHOD syn keyword xsMacro PERL_ARGS_ASSERT_TOKENIZE_USE PERL_ARGS_ASSERT_TOKEQ syn keyword xsMacro PERL_ARGS_ASSERT_TOKEREPORT syn keyword xsMacro PERL_ARGS_ASSERT_TOO_FEW_ARGUMENTS_PV syn keyword xsMacro PERL_ARGS_ASSERT_TOO_MANY_ARGUMENTS_PV syn keyword xsMacro PERL_ARGS_ASSERT_TO_BYTE_SUBSTR syn keyword xsMacro PERL_ARGS_ASSERT_TO_UNI_LOWER syn keyword xsMacro PERL_ARGS_ASSERT_TO_UNI_TITLE syn keyword xsMacro PERL_ARGS_ASSERT_TO_UNI_UPPER syn keyword xsMacro PERL_ARGS_ASSERT_TO_UTF8_CASE syn keyword xsMacro PERL_ARGS_ASSERT_TO_UTF8_FOLD syn keyword xsMacro PERL_ARGS_ASSERT_TO_UTF8_LOWER syn keyword xsMacro PERL_ARGS_ASSERT_TO_UTF8_SUBSTR syn keyword xsMacro PERL_ARGS_ASSERT_TO_UTF8_TITLE syn keyword xsMacro PERL_ARGS_ASSERT_TO_UTF8_UPPER syn keyword xsMacro PERL_ARGS_ASSERT_TRANSLATE_SUBSTR_OFFSETS syn keyword xsMacro PERL_ARGS_ASSERT_UIV_2BUF PERL_ARGS_ASSERT_UNLNK syn keyword xsMacro PERL_ARGS_ASSERT_UNPACKSTRING PERL_ARGS_ASSERT_UNPACK_REC syn keyword xsMacro PERL_ARGS_ASSERT_UNPACK_STR syn keyword xsMacro PERL_ARGS_ASSERT_UNREFERENCED_TO_TMP_STACK syn keyword xsMacro PERL_ARGS_ASSERT_UPG_VERSION syn keyword xsMacro PERL_ARGS_ASSERT_UTF16_TEXTFILTER syn keyword xsMacro PERL_ARGS_ASSERT_UTF16_TO_UTF8 syn keyword xsMacro PERL_ARGS_ASSERT_UTF16_TO_UTF8_REVERSED syn keyword xsMacro PERL_ARGS_ASSERT_UTF8N_TO_UVCHR syn keyword xsMacro PERL_ARGS_ASSERT_UTF8N_TO_UVUNI syn keyword xsMacro PERL_ARGS_ASSERT_UTF8_DISTANCE PERL_ARGS_ASSERT_UTF8_HOP syn keyword xsMacro PERL_ARGS_ASSERT_UTF8_LENGTH syn keyword xsMacro PERL_ARGS_ASSERT_UTF8_MG_LEN_CACHE_UPDATE syn keyword xsMacro PERL_ARGS_ASSERT_UTF8_MG_POS_CACHE_UPDATE syn keyword xsMacro PERL_ARGS_ASSERT_UTF8_TO_BYTES syn keyword xsMacro PERL_ARGS_ASSERT_UTF8_TO_UVCHR syn keyword xsMacro PERL_ARGS_ASSERT_UTF8_TO_UVUNI syn keyword xsMacro PERL_ARGS_ASSERT_UTF8_TO_UVUNI_BUF syn keyword xsMacro PERL_ARGS_ASSERT_UTILIZE syn keyword xsMacro PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_UVUNI_TO_UTF8 syn keyword xsMacro PERL_ARGS_ASSERT_UVUNI_TO_UTF8_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT_VALIDATE_PROTO syn keyword xsMacro PERL_ARGS_ASSERT_VALIDATE_SUID syn keyword xsMacro PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR syn keyword xsMacro PERL_ARGS_ASSERT_VALID_UTF8_TO_UVUNI syn keyword xsMacro PERL_ARGS_ASSERT_VCMP PERL_ARGS_ASSERT_VDEB syn keyword xsMacro PERL_ARGS_ASSERT_VFORM PERL_ARGS_ASSERT_VISIT syn keyword xsMacro PERL_ARGS_ASSERT_VIVIFY_DEFELEM syn keyword xsMacro PERL_ARGS_ASSERT_VIVIFY_REF PERL_ARGS_ASSERT_VLOAD_MODULE syn keyword xsMacro PERL_ARGS_ASSERT_VMESS PERL_ARGS_ASSERT_VNEWSVPVF syn keyword xsMacro PERL_ARGS_ASSERT_VNORMAL PERL_ARGS_ASSERT_VNUMIFY syn keyword xsMacro PERL_ARGS_ASSERT_VSTRINGIFY PERL_ARGS_ASSERT_VVERIFY syn keyword xsMacro PERL_ARGS_ASSERT_VWARN PERL_ARGS_ASSERT_VWARNER syn keyword xsMacro PERL_ARGS_ASSERT_WAIT4PID PERL_ARGS_ASSERT_WARN syn keyword xsMacro PERL_ARGS_ASSERT_WARNER PERL_ARGS_ASSERT_WARNER_NOCONTEXT syn keyword xsMacro PERL_ARGS_ASSERT_WARN_NOCONTEXT PERL_ARGS_ASSERT_WARN_SV syn keyword xsMacro PERL_ARGS_ASSERT_WATCH PERL_ARGS_ASSERT_WHICHSIG_PV syn keyword xsMacro PERL_ARGS_ASSERT_WHICHSIG_PVN syn keyword xsMacro PERL_ARGS_ASSERT_WHICHSIG_SV syn keyword xsMacro PERL_ARGS_ASSERT_WIN32_CROAK_NOT_IMPLEMENTED syn keyword xsMacro PERL_ARGS_ASSERT_WITH_QUEUED_ERRORS syn keyword xsMacro PERL_ARGS_ASSERT_WRAP_OP_CHECKER syn keyword xsMacro PERL_ARGS_ASSERT_WRITE_TO_STDERR syn keyword xsMacro PERL_ARGS_ASSERT_XS_HANDSHAKE syn keyword xsMacro PERL_ARGS_ASSERT_XS_VERSION_BOOTCHECK syn keyword xsMacro PERL_ARGS_ASSERT_YYERROR PERL_ARGS_ASSERT_YYERROR_PV syn keyword xsMacro PERL_ARGS_ASSERT_YYERROR_PVN PERL_ARGS_ASSERT_YYWARN syn keyword xsMacro PERL_ARGS_ASSERT__APPEND_RANGE_TO_INVLIST syn keyword xsMacro PERL_ARGS_ASSERT__CORE_SWASH_INIT syn keyword xsMacro PERL_ARGS_ASSERT__GET_REGCLASS_NONBITMAP_DATA syn keyword xsMacro PERL_ARGS_ASSERT__GET_SWASH_INVLIST syn keyword xsMacro PERL_ARGS_ASSERT__INVLIST_ARRAY_INIT syn keyword xsMacro PERL_ARGS_ASSERT__INVLIST_CONTAINS_CP syn keyword xsMacro PERL_ARGS_ASSERT__INVLIST_CONTENTS syn keyword xsMacro PERL_ARGS_ASSERT__INVLIST_DUMP syn keyword xsMacro PERL_ARGS_ASSERT__INVLIST_INTERSECTION_MAYBE_COMPLEMENT_2ND syn keyword xsMacro PERL_ARGS_ASSERT__INVLIST_INVERT syn keyword xsMacro PERL_ARGS_ASSERT__INVLIST_LEN syn keyword xsMacro PERL_ARGS_ASSERT__INVLIST_POPULATE_SWATCH syn keyword xsMacro PERL_ARGS_ASSERT__INVLIST_SEARCH syn keyword xsMacro PERL_ARGS_ASSERT__INVLIST_UNION_MAYBE_COMPLEMENT_2ND syn keyword xsMacro PERL_ARGS_ASSERT__IS_UTF8_CHAR_SLOW syn keyword xsMacro PERL_ARGS_ASSERT__IS_UTF8_FOO syn keyword xsMacro PERL_ARGS_ASSERT__IS_UTF8_IDCONT syn keyword xsMacro PERL_ARGS_ASSERT__IS_UTF8_IDSTART syn keyword xsMacro PERL_ARGS_ASSERT__IS_UTF8_MARK syn keyword xsMacro PERL_ARGS_ASSERT__IS_UTF8_PERL_IDCONT syn keyword xsMacro PERL_ARGS_ASSERT__IS_UTF8_PERL_IDSTART syn keyword xsMacro PERL_ARGS_ASSERT__IS_UTF8_XIDCONT syn keyword xsMacro PERL_ARGS_ASSERT__IS_UTF8_XIDSTART syn keyword xsMacro PERL_ARGS_ASSERT__MAKE_EXACTF_INVLIST syn keyword xsMacro PERL_ARGS_ASSERT__NEW_INVLIST_C_ARRAY syn keyword xsMacro PERL_ARGS_ASSERT__SETUP_CANNED_INVLIST syn keyword xsMacro PERL_ARGS_ASSERT__SWASH_INVERSION_HASH syn keyword xsMacro PERL_ARGS_ASSERT__SWASH_TO_INVLIST syn keyword xsMacro PERL_ARGS_ASSERT__TO_FOLD_LATIN1 syn keyword xsMacro PERL_ARGS_ASSERT__TO_UNI_FOLD_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT__TO_UPPER_TITLE_LATIN1 syn keyword xsMacro PERL_ARGS_ASSERT__TO_UTF8_FOLD_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT__TO_UTF8_LOWER_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT__TO_UTF8_TITLE_FLAGS syn keyword xsMacro PERL_ARGS_ASSERT__TO_UTF8_UPPER_FLAGS PERL_ASYNC_CHECK syn keyword xsMacro PERL_BITFIELD16 PERL_BITFIELD32 PERL_BITFIELD8 syn keyword xsMacro PERL_CALLCONV PERL_CALLCONV_NO_RET PERL_CHECK_INITED syn keyword xsMacro PERL_CKDEF PERL_DEB PERL_DEB2 PERL_DEBUG PERL_DEBUG_PAD syn keyword xsMacro PERL_DEBUG_PAD_ZERO PERL_DECIMAL_VERSION syn keyword xsMacro PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION syn keyword xsMacro PERL_DONT_CREATE_GVSV PERL_DRAND48_QUAD syn keyword xsMacro PERL_ENABLE_EXPERIMENTAL_REGEX_OPTIMISATIONS syn keyword xsMacro PERL_ENABLE_EXTENDED_TRIE_OPTIMISATION syn keyword xsMacro PERL_ENABLE_POSITIVE_ASSERTION_STUDY syn keyword xsMacro PERL_ENABLE_TRIE_OPTIMISATION PERL_EXIT_ABORT syn keyword xsMacro PERL_EXIT_DESTRUCT_END PERL_EXIT_EXPECTED PERL_EXIT_WARN syn keyword xsMacro PERL_EXPORT_C PERL_FILE_IS_ABSOLUTE PERL_FILTER_EXISTS syn keyword xsMacro PERL_FLUSHALL_FOR_CHILD PERL_FPU_INIT PERL_FPU_POST_EXEC syn keyword xsMacro PERL_FPU_PRE_EXEC PERL_FS_VERSION PERL_FS_VER_FMT syn keyword xsMacro PERL_GCC_BRACE_GROUPS_FORBIDDEN PERL_GET_CONTEXT syn keyword xsMacro PERL_GET_INTERP PERL_GET_THX PERL_GET_VARS syn keyword xsMacro PERL_GIT_UNPUSHED_COMMITS PERL_GLOBAL_STRUCT syn keyword xsMacro PERL_GPROF_MONCONTROL PERL_HASH PERL_HASH_DEFAULT_HvMAX syn keyword xsMacro PERL_HASH_FUNC PERL_HASH_FUNC_ONE_AT_A_TIME_HARD syn keyword xsMacro PERL_HASH_INTERNAL PERL_HASH_ITER_BUCKET syn keyword xsMacro PERL_HASH_RANDOMIZE_KEYS PERL_HASH_SEED syn keyword xsMacro PERL_HASH_SEED_BYTES PERL_HASH_WITH_SEED syn keyword xsMacro PERL_HV_ALLOC_AUX_SIZE PERL_HV_ARRAY_ALLOC_BYTES syn keyword xsMacro PERL_IMPLICIT_CONTEXT PERL_INTERPRETER_SIZE_UPTO_MEMBER syn keyword xsMacro PERL_INT_MAX PERL_INT_MIN PERL_LOADMOD_DENY syn keyword xsMacro PERL_LOADMOD_IMPORT_OPS PERL_LOADMOD_NOIMPORT syn keyword xsMacro PERL_LONG_MAX PERL_LONG_MIN PERL_MALLOC_WRAP syn keyword xsMacro PERL_MEMORY_DEBUG_HEADER_SIZE PERL_MG_UFUNC syn keyword xsMacro PERL_MY_SNPRINTF_GUARDED PERL_MY_SNPRINTF_POST_GUARD syn keyword xsMacro PERL_MY_VSNPRINTF_GUARDED PERL_MY_VSNPRINTF_POST_GUARD syn keyword xsMacro PERL_NEW_COPY_ON_WRITE PERL_NO_DEV_RANDOM syn keyword xsMacro PERL_OBJECT_THIS PERL_OBJECT_THIS_ PERL_PADNAME_MINIMAL syn keyword xsMacro PERL_PADSEQ_INTRO PERL_PATCHNUM PERL_POISON_EXPR syn keyword xsMacro PERL_PPADDR_INITED PERL_PPDEF PERL_PRESERVE_IVUV syn keyword xsMacro PERL_PRIeldbl PERL_PRIfldbl PERL_PRIgldbl syn keyword xsMacro PERL_PV_ESCAPE_ALL PERL_PV_ESCAPE_DWIM syn keyword xsMacro PERL_PV_ESCAPE_FIRSTCHAR PERL_PV_ESCAPE_NOBACKSLASH syn keyword xsMacro PERL_PV_ESCAPE_NOCLEAR PERL_PV_ESCAPE_NONASCII syn keyword xsMacro PERL_PV_ESCAPE_QUOTE PERL_PV_ESCAPE_RE PERL_PV_ESCAPE_UNI syn keyword xsMacro PERL_PV_ESCAPE_UNI_DETECT PERL_PV_PRETTY_DUMP syn keyword xsMacro PERL_PV_PRETTY_ELLIPSES PERL_PV_PRETTY_EXACTSIZE syn keyword xsMacro PERL_PV_PRETTY_LTGT PERL_PV_PRETTY_NOCLEAR syn keyword xsMacro PERL_PV_PRETTY_QUOTE PERL_PV_PRETTY_REGPROP PERL_QUAD_MAX syn keyword xsMacro PERL_QUAD_MIN PERL_REENTR_API PERL_REGMATCH_SLAB_SLOTS syn keyword xsMacro PERL_RELOCATABLE_INC PERL_REVISION PERL_SAWAMPERSAND syn keyword xsMacro PERL_SCAN_ALLOW_UNDERSCORES PERL_SCAN_DISALLOW_PREFIX syn keyword xsMacro PERL_SCAN_GREATER_THAN_UV_MAX PERL_SCAN_SILENT_ILLDIGIT syn keyword xsMacro PERL_SCAN_SILENT_NON_PORTABLE PERL_SCAN_TRAILING syn keyword xsMacro PERL_SCNfldbl PERL_SCRIPT_MODE PERL_SEEN_HV_FUNC_H syn keyword xsMacro PERL_SET_CONTEXT PERL_SET_INTERP PERL_SET_PHASE syn keyword xsMacro PERL_SET_THX PERL_SHORT_MAX PERL_SHORT_MIN syn keyword xsMacro PERL_SIGNALS_UNSAFE_FLAG PERL_SNPRINTF_CHECK syn keyword xsMacro PERL_STACK_OVERFLOW_CHECK PERL_STATIC_INLINE syn keyword xsMacro PERL_STATIC_INLINE_NO_RET PERL_STATIC_NO_RET syn keyword xsMacro PERL_STRLEN_EXPAND_SHIFT PERL_STRLEN_ROUNDUP syn keyword xsMacro PERL_STRLEN_ROUNDUP_QUANTUM PERL_SUBVERSION syn keyword xsMacro PERL_SUB_DEPTH_WARN PERL_SYS_FPU_INIT PERL_SYS_INIT syn keyword xsMacro PERL_SYS_INIT3 PERL_SYS_INIT3_BODY PERL_SYS_INIT_BODY syn keyword xsMacro PERL_SYS_TERM PERL_SYS_TERM_BODY PERL_TARGETARCH syn keyword xsMacro PERL_UCHAR_MAX PERL_UCHAR_MIN PERL_UINT_MAX PERL_UINT_MIN syn keyword xsMacro PERL_ULONG_MAX PERL_ULONG_MIN PERL_UNICODE_ALL_FLAGS syn keyword xsMacro PERL_UNICODE_ARGV PERL_UNICODE_ARGV_FLAG syn keyword xsMacro PERL_UNICODE_DEFAULT_FLAGS PERL_UNICODE_IN syn keyword xsMacro PERL_UNICODE_INOUT PERL_UNICODE_INOUT_FLAG syn keyword xsMacro PERL_UNICODE_IN_FLAG PERL_UNICODE_LOCALE syn keyword xsMacro PERL_UNICODE_LOCALE_FLAG PERL_UNICODE_MAX syn keyword xsMacro PERL_UNICODE_OUT PERL_UNICODE_OUT_FLAG PERL_UNICODE_STD syn keyword xsMacro PERL_UNICODE_STDERR PERL_UNICODE_STDERR_FLAG syn keyword xsMacro PERL_UNICODE_STDIN PERL_UNICODE_STDIN_FLAG syn keyword xsMacro PERL_UNICODE_STDOUT PERL_UNICODE_STDOUT_FLAG syn keyword xsMacro PERL_UNICODE_STD_FLAG PERL_UNICODE_UTF8CACHEASSERT syn keyword xsMacro PERL_UNICODE_UTF8CACHEASSERT_FLAG syn keyword xsMacro PERL_UNICODE_WIDESYSCALLS PERL_UNICODE_WIDESYSCALLS_FLAG syn keyword xsMacro PERL_UNUSED_ARG PERL_UNUSED_CONTEXT PERL_UNUSED_DECL syn keyword xsMacro PERL_UNUSED_RESULT PERL_UNUSED_VAR PERL_UQUAD_MAX syn keyword xsMacro PERL_UQUAD_MIN PERL_USES_PL_PIDSTATUS syn keyword xsMacro PERL_USE_GCC_BRACE_GROUPS PERL_USHORT_MAX PERL_USHORT_MIN syn keyword xsMacro PERL_VERSION PERL_VERSION_DECIMAL PERL_VERSION_GE syn keyword xsMacro PERL_VERSION_LT PERL_VERSION_STRING syn keyword xsMacro PERL_WAIT_FOR_CHILDREN PERL_WARNHOOK_FATAL syn keyword xsMacro PERL_WRITE_MSG_TO_CONSOLE PERL_XS_EXPORT_C syn keyword xsMacro PHASE_CHANGE_PROBE PHOSTNAME PIPESOCK_MODE PIPE_OPEN_MODE syn keyword xsMacro PLUGEXPR PLUGSTMT PLUS PL_AboveLatin1 PL_Argv PL_Cmd syn keyword xsMacro PL_DBcontrol PL_DBcv PL_DBgv PL_DBline PL_DBsignal syn keyword xsMacro PL_DBsignal_iv PL_DBsingle PL_DBsingle_iv PL_DBsub syn keyword xsMacro PL_DBtrace PL_DBtrace_iv PL_Dir PL_Env PL_GCB_invlist syn keyword xsMacro PL_Gappctx PL_Gcheck PL_Gcheck_mutex PL_Gcsighandlerp syn keyword xsMacro PL_Gcurinterp PL_Gdo_undump PL_Gdollarzero_mutex syn keyword xsMacro PL_Gfold_locale PL_Ghash_seed PL_Ghash_seed_set syn keyword xsMacro PL_Ghints_mutex PL_Gkeyword_plugin PL_Gmalloc_mutex syn keyword xsMacro PL_Gmmap_page_size PL_Gmy_ctx_mutex PL_Gmy_cxt_index syn keyword xsMacro PL_Gop_mutex PL_Gop_seq PL_Gop_sequence syn keyword xsMacro PL_Gperlio_debug_fd PL_Gperlio_fd_refcnt syn keyword xsMacro PL_Gperlio_fd_refcnt_size PL_Gperlio_mutex PL_Gppaddr syn keyword xsMacro PL_Gsh_path PL_Gsig_defaulting PL_Gsig_handlers_initted syn keyword xsMacro PL_Gsig_ignoring PL_Gsig_trapped PL_Gsigfpe_saved syn keyword xsMacro PL_Gsv_placeholder PL_Gthr_key PL_Gtimesbase syn keyword xsMacro PL_Guse_safe_putenv PL_Gveto_cleanup PL_Gwatch_pvx syn keyword xsMacro PL_HASH_RAND_BITS_ENABLED PL_HasMultiCharFold PL_InBitmap syn keyword xsMacro PL_LIO PL_Latin1 PL_Mem PL_MemParse PL_MemShared syn keyword xsMacro PL_NonL1NonFinalFold PL_Posix_ptrs PL_Proc syn keyword xsMacro PL_RANDOM_STATE_TYPE PL_SB_invlist PL_Sock PL_StdIO PL_Sv syn keyword xsMacro PL_UpperLatin1 PL_WB_invlist PL_XPosix_ptrs PL_Xpv syn keyword xsMacro PL_amagic_generation PL_an PL_appctx PL_argvgv syn keyword xsMacro PL_argvout_stack PL_argvoutgv PL_basetime PL_beginav syn keyword xsMacro PL_beginav_save PL_blockhooks PL_body_arenas syn keyword xsMacro PL_body_roots PL_bodytarget PL_breakable_sub_gen syn keyword xsMacro PL_check_mutex PL_checkav PL_checkav_save PL_chopset syn keyword xsMacro PL_clocktick PL_collation_ix PL_collation_name syn keyword xsMacro PL_collation_standard PL_collxfrm_base PL_collxfrm_mult syn keyword xsMacro PL_colors PL_colorset PL_compcv PL_compiling PL_comppad syn keyword xsMacro PL_comppad_name PL_comppad_name_fill syn keyword xsMacro PL_comppad_name_floor PL_constpadix PL_cop_seqmax syn keyword xsMacro PL_cryptseen PL_cshlen PL_csighandlerp PL_curcop syn keyword xsMacro PL_curcopdb PL_curinterp PL_curpad PL_curpm PL_curstack syn keyword xsMacro PL_curstackinfo PL_curstash PL_curstname syn keyword xsMacro PL_custom_op_descs PL_custom_op_names PL_custom_ops syn keyword xsMacro PL_cv_has_eval PL_dbargs PL_debstash PL_debug syn keyword xsMacro PL_debug_pad PL_def_layerlist PL_defgv PL_defoutgv syn keyword xsMacro PL_defstash PL_delaymagic PL_delaymagic_egid syn keyword xsMacro PL_delaymagic_euid PL_delaymagic_gid PL_delaymagic_uid syn keyword xsMacro PL_destroyhook PL_diehook PL_dirty PL_do_undump syn keyword xsMacro PL_dollarzero_mutex PL_doswitches PL_dowarn PL_dumper_fd syn keyword xsMacro PL_dumpindent PL_e_script PL_efloatbuf PL_efloatsize syn keyword xsMacro PL_encoding PL_endav PL_envgv PL_errgv PL_errors syn keyword xsMacro PL_eval_root PL_eval_start PL_evalseq PL_exit_flags syn keyword xsMacro PL_exitlist PL_exitlistlen PL_fdpid PL_filemode syn keyword xsMacro PL_firstgv PL_forkprocess PL_formtarget PL_generation syn keyword xsMacro PL_gensym PL_globalstash PL_globhook PL_hash_rand_bits syn keyword xsMacro PL_hash_rand_bits_enabled PL_hash_seed PL_hash_seed_set syn keyword xsMacro PL_hintgv PL_hints PL_hints_mutex PL_hv_fetch_ent_mh syn keyword xsMacro PL_in_clean_all PL_in_clean_objs PL_in_eval syn keyword xsMacro PL_in_load_module PL_in_utf8_CTYPE_locale PL_incgv syn keyword xsMacro PL_initav PL_inplace PL_isarev PL_keyword_plugin syn keyword xsMacro PL_known_layers PL_last_in_gv PL_last_swash_hv syn keyword xsMacro PL_last_swash_key PL_last_swash_klen PL_last_swash_slen syn keyword xsMacro PL_last_swash_tmps PL_lastfd PL_lastgotoprobe syn keyword xsMacro PL_laststatval PL_laststype PL_lex_encoding PL_localizing syn keyword xsMacro PL_localpatches PL_lockhook PL_main_cv PL_main_root syn keyword xsMacro PL_main_start PL_mainstack PL_malloc_mutex PL_markstack syn keyword xsMacro PL_markstack_max PL_markstack_ptr PL_max_intro_pending syn keyword xsMacro PL_maxo PL_maxsysfd PL_memory_debug_header PL_mess_sv syn keyword xsMacro PL_min_intro_pending PL_minus_E PL_minus_F PL_minus_a syn keyword xsMacro PL_minus_c PL_minus_l PL_minus_n PL_minus_p syn keyword xsMacro PL_mmap_page_size PL_modcount PL_modglobal syn keyword xsMacro PL_multideref_pc PL_my_ctx_mutex PL_my_cxt_index syn keyword xsMacro PL_my_cxt_keys PL_my_cxt_list PL_my_cxt_size PL_nomemok syn keyword xsMacro PL_numeric_local PL_numeric_name PL_numeric_radix_sv syn keyword xsMacro PL_numeric_standard PL_ofsgv PL_oldname PL_op syn keyword xsMacro PL_op_exec_cnt PL_op_mask PL_op_mutex PL_op_seq syn keyword xsMacro PL_op_sequence PL_opfreehook PL_origalen PL_origargc syn keyword xsMacro PL_origargv PL_origenviron PL_origfilename PL_ors_sv syn keyword xsMacro PL_osname PL_pad_reset_pending PL_padix PL_padix_floor syn keyword xsMacro PL_padlist_generation PL_padname_const PL_padname_undef syn keyword xsMacro PL_parser PL_patchlevel PL_peepp PL_perl_destruct_level syn keyword xsMacro PL_perldb PL_perlio PL_perlio_debug_fd syn keyword xsMacro PL_perlio_fd_refcnt PL_perlio_fd_refcnt_size syn keyword xsMacro PL_perlio_mutex PL_phase PL_pidstatus PL_preambleav syn keyword xsMacro PL_profiledata PL_psig_name PL_psig_pend PL_psig_ptr syn keyword xsMacro PL_ptr_table PL_random_state PL_reentrant_buffer syn keyword xsMacro PL_reentrant_retint PL_reg_curpm PL_regex_pad syn keyword xsMacro PL_regex_padav PL_registered_mros PL_regmatch_slab syn keyword xsMacro PL_regmatch_state PL_replgv PL_restartjmpenv PL_restartop syn keyword xsMacro PL_rpeepp PL_rs PL_runops PL_savebegin PL_savestack syn keyword xsMacro PL_savestack_ix PL_savestack_max PL_sawalias syn keyword xsMacro PL_sawampersand PL_scopestack PL_scopestack_ix syn keyword xsMacro PL_scopestack_max PL_scopestack_name PL_secondgv syn keyword xsMacro PL_sharehook PL_sig_defaulting PL_sig_handlers_initted syn keyword xsMacro PL_sig_ignoring PL_sig_pending PL_sig_trapped syn keyword xsMacro PL_sigfpe_saved PL_sighandlerp PL_signalhook PL_signals syn keyword xsMacro PL_sort_RealCmp PL_sortcop PL_sortstash PL_splitstr syn keyword xsMacro PL_srand_called PL_stack_base PL_stack_max PL_stack_sp syn keyword xsMacro PL_start_env PL_stashcache PL_stashpad PL_stashpadix syn keyword xsMacro PL_stashpadmax PL_statbuf PL_statcache PL_statgv syn keyword xsMacro PL_statname PL_statusvalue PL_statusvalue_posix syn keyword xsMacro PL_statusvalue_vms PL_stderrgv PL_stdingv PL_strtab syn keyword xsMacro PL_sub_generation PL_subline PL_subname PL_sv_arenaroot syn keyword xsMacro PL_sv_consts PL_sv_count PL_sv_no PL_sv_placeholder syn keyword xsMacro PL_sv_root PL_sv_serial PL_sv_undef PL_sv_yes syn keyword xsMacro PL_sys_intern PL_taint_warn PL_tainted PL_tainting syn keyword xsMacro PL_thr_key PL_threadhook PL_timesbase PL_timesbuf syn keyword xsMacro PL_tmps_floor PL_tmps_ix PL_tmps_max PL_tmps_stack syn keyword xsMacro PL_top_env PL_toptarget PL_unicode PL_unitcheckav syn keyword xsMacro PL_unitcheckav_save PL_unlockhook PL_unsafe syn keyword xsMacro PL_use_safe_putenv PL_utf8_charname_begin syn keyword xsMacro PL_utf8_charname_continue PL_utf8_foldable syn keyword xsMacro PL_utf8_foldclosures PL_utf8_idcont PL_utf8_idstart syn keyword xsMacro PL_utf8_mark PL_utf8_perl_idcont PL_utf8_perl_idstart syn keyword xsMacro PL_utf8_swash_ptrs PL_utf8_tofold PL_utf8_tolower syn keyword xsMacro PL_utf8_totitle PL_utf8_toupper PL_utf8_xidcont syn keyword xsMacro PL_utf8_xidstart PL_utf8cache PL_utf8locale syn keyword xsMacro PL_veto_cleanup PL_vtbl_arylen PL_vtbl_arylen_p syn keyword xsMacro PL_vtbl_backref PL_vtbl_bm PL_vtbl_checkcall syn keyword xsMacro PL_vtbl_collxfrm PL_vtbl_dbline PL_vtbl_debugvar syn keyword xsMacro PL_vtbl_defelem PL_vtbl_env PL_vtbl_envelem PL_vtbl_fm syn keyword xsMacro PL_vtbl_hints PL_vtbl_hintselem PL_vtbl_isa syn keyword xsMacro PL_vtbl_isaelem PL_vtbl_lvref PL_vtbl_mglob PL_vtbl_nkeys syn keyword xsMacro PL_vtbl_ovrld PL_vtbl_pack PL_vtbl_packelem PL_vtbl_pos syn keyword xsMacro PL_vtbl_regdata PL_vtbl_regdatum PL_vtbl_regexp syn keyword xsMacro PL_vtbl_sigelem PL_vtbl_substr PL_vtbl_sv PL_vtbl_taint syn keyword xsMacro PL_vtbl_utf8 PL_vtbl_uvar PL_vtbl_vec PL_warn_locale syn keyword xsMacro PL_warnhook PL_watch_pvx PL_watchaddr PL_watchok syn keyword xsMacro PL_xsubfilename PMFUNC PM_GETRE PM_SETRE PMf_BASE_SHIFT syn keyword xsMacro PMf_CHARSET PMf_CODELIST_PRIVATE PMf_CONST PMf_CONTINUE syn keyword xsMacro PMf_EVAL PMf_EXTENDED PMf_EXTENDED_MORE PMf_FOLD syn keyword xsMacro PMf_GLOBAL PMf_HAS_CV PMf_IS_QR PMf_KEEP PMf_KEEPCOPY syn keyword xsMacro PMf_MULTILINE PMf_NOCAPTURE PMf_NONDESTRUCT PMf_ONCE syn keyword xsMacro PMf_RETAINT PMf_SINGLELINE PMf_SPLIT PMf_STRICT PMf_USED syn keyword xsMacro PMf_USE_RE_EVAL PNf PNfARG POPBLOCK POPEVAL POPFORMAT syn keyword xsMacro POPLOOP POPMARK POPSTACK POPSTACK_TO POPSUB POPSUBST syn keyword xsMacro POP_MULTICALL POP_SAVEARRAY POPi POPl POPn POPp POPpbytex syn keyword xsMacro POPpconstx POPpx POPs POPu POPul POSIXA POSIXD POSIXL syn keyword xsMacro POSIXU POSIX_CC_COUNT POSIX_SWASH_COUNT POSTDEC POSTINC syn keyword xsMacro POSTJOIN POWOP PP PREC_LOW PREDEC PREGf_ANCH syn keyword xsMacro PREGf_ANCH_GPOS PREGf_ANCH_MBOL PREGf_ANCH_SBOL syn keyword xsMacro PREGf_CANY_SEEN PREGf_CUTGROUP_SEEN PREGf_GPOS_FLOAT syn keyword xsMacro PREGf_GPOS_SEEN PREGf_IMPLICIT PREGf_NAUGHTY PREGf_NOSCAN syn keyword xsMacro PREGf_SKIP PREGf_USE_RE_EVAL PREGf_VERBARG_SEEN PREINC syn keyword xsMacro PRESCAN_VERSION PREVOPER PRINTF_FORMAT_NULL_OK PRIVATEREF syn keyword xsMacro PRIVLIB PRIVLIB_EXP PRIVSHIFT PROCSELFEXE_PATH PRUNE syn keyword xsMacro PSEUDO PTHREAD_ATFORK PTHREAD_ATTR_SETDETACHSTATE syn keyword xsMacro PTHREAD_CREATE PTHREAD_CREATE_JOINABLE syn keyword xsMacro PTHREAD_GETSPECIFIC PTHREAD_GETSPECIFIC_INT PTR2IV PTR2NV syn keyword xsMacro PTR2UV PTR2nat PTR2ul PTRSIZE PTRV PUSHBLOCK PUSHEVAL syn keyword xsMacro PUSHFORMAT PUSHGIVEN PUSHLOOP_FOR PUSHLOOP_PLAIN PUSHMARK syn keyword xsMacro PUSHSTACK PUSHSTACKi PUSHSUB PUSHSUBST PUSHSUB_BASE syn keyword xsMacro PUSHSUB_DB PUSHSUB_GET_LVALUE_MASK PUSHTARG PUSHWHEN syn keyword xsMacro PUSH_MULTICALL PUSH_MULTICALL_FLAGS PUSHi PUSHmortal syn keyword xsMacro PUSHn PUSHp PUSHs PUSHu PUTBACK PWGECOS PWPASSWD PadARRAY syn keyword xsMacro PadMAX PadlistARRAY PadlistMAX PadlistNAMES syn keyword xsMacro PadlistNAMESARRAY PadlistNAMESMAX PadlistREFCNT syn keyword xsMacro PadnameFLAGS PadnameIsOUR PadnameIsSTATE syn keyword xsMacro PadnameIsSTATE_on PadnameLEN PadnameLVALUE syn keyword xsMacro PadnameLVALUE_on PadnameOURSTASH PadnameOURSTASH_set syn keyword xsMacro PadnameOUTER PadnamePROTOCV PadnamePV PadnameREFCNT syn keyword xsMacro PadnameREFCNT_dec PadnameSV PadnameTYPE PadnameTYPE_set syn keyword xsMacro PadnameUTF8 PadnamelistARRAY PadnamelistMAX syn keyword xsMacro PadnamelistMAXNAMED PadnamelistREFCNT syn keyword xsMacro PadnamelistREFCNT_dec Pause PeRl_CaTiFy PeRl_INT64_C syn keyword xsMacro PeRl_StGiFy PeRl_UINT64_C PerlDir_chdir PerlDir_close syn keyword xsMacro PerlDir_mapA PerlDir_mapW PerlDir_mkdir PerlDir_open syn keyword xsMacro PerlDir_read PerlDir_rewind PerlDir_rmdir PerlDir_seek syn keyword xsMacro PerlDir_tell PerlEnv_ENVgetenv PerlEnv_ENVgetenv_len syn keyword xsMacro PerlEnv_clearenv PerlEnv_free_childdir syn keyword xsMacro PerlEnv_free_childenv PerlEnv_get_child_IO syn keyword xsMacro PerlEnv_get_childdir PerlEnv_get_childenv PerlEnv_getenv syn keyword xsMacro PerlEnv_getenv_len PerlEnv_lib_path PerlEnv_os_id syn keyword xsMacro PerlEnv_putenv PerlEnv_sitelib_path PerlEnv_uname syn keyword xsMacro PerlEnv_vendorlib_path PerlIOArg PerlIOBase PerlIONext syn keyword xsMacro PerlIOSelf PerlIOValid PerlIO_canset_cnt syn keyword xsMacro PerlIO_exportFILE PerlIO_fast_gets PerlIO_fdopen syn keyword xsMacro PerlIO_findFILE PerlIO_getc PerlIO_getname syn keyword xsMacro PerlIO_has_base PerlIO_has_cntptr PerlIO_importFILE syn keyword xsMacro PerlIO_isutf8 PerlIO_open PerlIO_printf PerlIO_putc syn keyword xsMacro PerlIO_puts PerlIO_releaseFILE PerlIO_reopen syn keyword xsMacro PerlIO_rewind PerlIO_stdoutf PerlIO_tmpfile PerlIO_ungetc syn keyword xsMacro PerlIO_vprintf PerlLIO_access PerlLIO_chmod PerlLIO_chown syn keyword xsMacro PerlLIO_chsize PerlLIO_close PerlLIO_dup PerlLIO_dup2 syn keyword xsMacro PerlLIO_flock PerlLIO_fstat PerlLIO_ioctl PerlLIO_isatty syn keyword xsMacro PerlLIO_link PerlLIO_lseek PerlLIO_lstat PerlLIO_mkstemp syn keyword xsMacro PerlLIO_mktemp PerlLIO_open PerlLIO_open3 PerlLIO_read syn keyword xsMacro PerlLIO_rename PerlLIO_setmode PerlLIO_stat syn keyword xsMacro PerlLIO_tmpnam PerlLIO_umask PerlLIO_unlink PerlLIO_utime syn keyword xsMacro PerlLIO_write PerlMemParse_calloc PerlMemParse_free syn keyword xsMacro PerlMemParse_free_lock PerlMemParse_get_lock syn keyword xsMacro PerlMemParse_is_locked PerlMemParse_malloc syn keyword xsMacro PerlMemParse_realloc PerlMemShared_calloc syn keyword xsMacro PerlMemShared_free PerlMemShared_free_lock syn keyword xsMacro PerlMemShared_get_lock PerlMemShared_is_locked syn keyword xsMacro PerlMemShared_malloc PerlMemShared_realloc PerlMem_calloc syn keyword xsMacro PerlMem_free PerlMem_free_lock PerlMem_get_lock syn keyword xsMacro PerlMem_is_locked PerlMem_malloc PerlMem_realloc syn keyword xsMacro PerlProc_DynaLoad PerlProc_GetOSError PerlProc__exit syn keyword xsMacro PerlProc_abort PerlProc_crypt PerlProc_execl syn keyword xsMacro PerlProc_execv PerlProc_execvp PerlProc_exit syn keyword xsMacro PerlProc_fork PerlProc_getegid PerlProc_geteuid syn keyword xsMacro PerlProc_getgid PerlProc_getlogin PerlProc_getpid syn keyword xsMacro PerlProc_gettimeofday PerlProc_getuid PerlProc_kill syn keyword xsMacro PerlProc_killpg PerlProc_lasthost PerlProc_longjmp syn keyword xsMacro PerlProc_pause PerlProc_pclose PerlProc_pipe syn keyword xsMacro PerlProc_popen PerlProc_popen_list PerlProc_setgid syn keyword xsMacro PerlProc_setjmp PerlProc_setuid PerlProc_signal syn keyword xsMacro PerlProc_sleep PerlProc_spawnvp PerlProc_times syn keyword xsMacro PerlProc_wait PerlProc_waitpid PerlSIO_canset_cnt syn keyword xsMacro PerlSIO_clearerr PerlSIO_fast_gets PerlSIO_fclose syn keyword xsMacro PerlSIO_fdopen PerlSIO_fdupopen PerlSIO_feof syn keyword xsMacro PerlSIO_ferror PerlSIO_fflush PerlSIO_fgetc syn keyword xsMacro PerlSIO_fgetpos PerlSIO_fgets PerlSIO_fileno syn keyword xsMacro PerlSIO_fopen PerlSIO_fputc PerlSIO_fputs PerlSIO_fread syn keyword xsMacro PerlSIO_freopen PerlSIO_fseek PerlSIO_fsetpos syn keyword xsMacro PerlSIO_ftell PerlSIO_fwrite PerlSIO_get_base syn keyword xsMacro PerlSIO_get_bufsiz PerlSIO_get_cnt PerlSIO_get_ptr syn keyword xsMacro PerlSIO_has_base PerlSIO_has_cntptr PerlSIO_init syn keyword xsMacro PerlSIO_printf PerlSIO_rewind PerlSIO_set_cnt syn keyword xsMacro PerlSIO_set_ptr PerlSIO_setbuf PerlSIO_setlinebuf syn keyword xsMacro PerlSIO_setvbuf PerlSIO_stderr PerlSIO_stdin syn keyword xsMacro PerlSIO_stdout PerlSIO_stdoutf PerlSIO_tmpfile syn keyword xsMacro PerlSIO_ungetc PerlSIO_vprintf PerlSock_accept syn keyword xsMacro PerlSock_bind PerlSock_closesocket PerlSock_connect syn keyword xsMacro PerlSock_endhostent PerlSock_endnetent syn keyword xsMacro PerlSock_endprotoent PerlSock_endservent syn keyword xsMacro PerlSock_gethostbyaddr PerlSock_gethostbyname syn keyword xsMacro PerlSock_gethostent PerlSock_gethostname syn keyword xsMacro PerlSock_getnetbyaddr PerlSock_getnetbyname syn keyword xsMacro PerlSock_getnetent PerlSock_getpeername syn keyword xsMacro PerlSock_getprotobyname PerlSock_getprotobynumber syn keyword xsMacro PerlSock_getprotoent PerlSock_getservbyname syn keyword xsMacro PerlSock_getservbyport PerlSock_getservent syn keyword xsMacro PerlSock_getsockname PerlSock_getsockopt PerlSock_htonl syn keyword xsMacro PerlSock_htons PerlSock_inet_addr PerlSock_inet_ntoa syn keyword xsMacro PerlSock_listen PerlSock_ntohl PerlSock_ntohs syn keyword xsMacro PerlSock_recv PerlSock_recvfrom PerlSock_select syn keyword xsMacro PerlSock_send PerlSock_sendto PerlSock_sethostent syn keyword xsMacro PerlSock_setnetent PerlSock_setprotoent syn keyword xsMacro PerlSock_setservent PerlSock_setsockopt PerlSock_shutdown syn keyword xsMacro PerlSock_socket PerlSock_socketpair Perl_acos Perl_asin syn keyword xsMacro Perl_assert Perl_atan Perl_atan2 Perl_atof Perl_atof2 syn keyword xsMacro Perl_ceil Perl_cos Perl_cosh Perl_custom_op_xop syn keyword xsMacro Perl_debug_log Perl_drand48 Perl_drand48_init syn keyword xsMacro Perl_error_log Perl_exp Perl_floor Perl_fmod syn keyword xsMacro Perl_fp_class_denorm Perl_fp_class_inf Perl_fp_class_nan syn keyword xsMacro Perl_fp_class_ndenorm Perl_fp_class_ninf syn keyword xsMacro Perl_fp_class_nnorm Perl_fp_class_norm syn keyword xsMacro Perl_fp_class_nzero Perl_fp_class_pdenorm syn keyword xsMacro Perl_fp_class_pinf Perl_fp_class_pnorm syn keyword xsMacro Perl_fp_class_pzero Perl_fp_class_qnan Perl_fp_class_snan syn keyword xsMacro Perl_fp_class_zero Perl_free_c_backtrace Perl_frexp syn keyword xsMacro Perl_isfinite Perl_isfinitel Perl_isinf Perl_isnan syn keyword xsMacro Perl_ldexp Perl_log Perl_log10 Perl_malloc_good_size syn keyword xsMacro Perl_modf Perl_pow Perl_pp_accept Perl_pp_aelemfast_lex syn keyword xsMacro Perl_pp_andassign Perl_pp_avalues Perl_pp_bind syn keyword xsMacro Perl_pp_bit_xor Perl_pp_chmod Perl_pp_chomp syn keyword xsMacro Perl_pp_connect Perl_pp_cos Perl_pp_custom syn keyword xsMacro Perl_pp_dbmclose Perl_pp_dofile Perl_pp_dor syn keyword xsMacro Perl_pp_dorassign Perl_pp_dump Perl_pp_egrent syn keyword xsMacro Perl_pp_enetent Perl_pp_eprotoent Perl_pp_epwent syn keyword xsMacro Perl_pp_eservent Perl_pp_exp Perl_pp_fcntl syn keyword xsMacro Perl_pp_ftatime Perl_pp_ftbinary Perl_pp_ftblk syn keyword xsMacro Perl_pp_ftchr Perl_pp_ftctime Perl_pp_ftdir syn keyword xsMacro Perl_pp_fteexec Perl_pp_fteowned Perl_pp_fteread syn keyword xsMacro Perl_pp_ftewrite Perl_pp_ftfile Perl_pp_ftmtime syn keyword xsMacro Perl_pp_ftpipe Perl_pp_ftrexec Perl_pp_ftrwrite syn keyword xsMacro Perl_pp_ftsgid Perl_pp_ftsize Perl_pp_ftsock syn keyword xsMacro Perl_pp_ftsuid Perl_pp_ftsvtx Perl_pp_ftzero syn keyword xsMacro Perl_pp_getpeername Perl_pp_getsockname Perl_pp_ggrgid syn keyword xsMacro Perl_pp_ggrnam Perl_pp_ghbyaddr Perl_pp_ghbyname syn keyword xsMacro Perl_pp_gnbyaddr Perl_pp_gnbyname Perl_pp_gpbyname syn keyword xsMacro Perl_pp_gpbynumber Perl_pp_gpwnam Perl_pp_gpwuid syn keyword xsMacro Perl_pp_gsbyname Perl_pp_gsbyport Perl_pp_gsockopt syn keyword xsMacro Perl_pp_hex Perl_pp_i_postdec Perl_pp_i_postinc syn keyword xsMacro Perl_pp_i_predec Perl_pp_i_preinc Perl_pp_keys syn keyword xsMacro Perl_pp_kill Perl_pp_lcfirst Perl_pp_lineseq syn keyword xsMacro Perl_pp_listen Perl_pp_localtime Perl_pp_log syn keyword xsMacro Perl_pp_lstat Perl_pp_mapstart Perl_pp_msgctl syn keyword xsMacro Perl_pp_msgget Perl_pp_msgrcv Perl_pp_msgsnd syn keyword xsMacro Perl_pp_nbit_xor Perl_pp_orassign Perl_pp_padany syn keyword xsMacro Perl_pp_pop Perl_pp_postdec Perl_pp_predec Perl_pp_reach syn keyword xsMacro Perl_pp_read Perl_pp_recv Perl_pp_regcmaybe syn keyword xsMacro Perl_pp_rindex Perl_pp_rv2hv Perl_pp_rvalues Perl_pp_say syn keyword xsMacro Perl_pp_sbit_xor Perl_pp_scalar Perl_pp_schomp syn keyword xsMacro Perl_pp_scope Perl_pp_seek Perl_pp_semop Perl_pp_send syn keyword xsMacro Perl_pp_sge Perl_pp_sgrent Perl_pp_sgt Perl_pp_shmctl syn keyword xsMacro Perl_pp_shmget Perl_pp_shmread Perl_pp_shutdown syn keyword xsMacro Perl_pp_slt Perl_pp_snetent Perl_pp_socket syn keyword xsMacro Perl_pp_sprotoent Perl_pp_spwent Perl_pp_sqrt syn keyword xsMacro Perl_pp_sservent Perl_pp_ssockopt Perl_pp_symlink syn keyword xsMacro Perl_pp_transr Perl_pp_unlink Perl_pp_utime syn keyword xsMacro Perl_pp_values Perl_safesysmalloc_size Perl_sharepvn syn keyword xsMacro Perl_signbit Perl_sin Perl_sinh Perl_sqrt Perl_strtod syn keyword xsMacro Perl_tan Perl_tanh Perl_va_copy PmopSTASH PmopSTASHPV syn keyword xsMacro PmopSTASHPV_set PmopSTASH_set Poison PoisonFree PoisonNew syn keyword xsMacro PoisonPADLIST PoisonWith QR_PAT_MODS QUADKIND QUAD_IS_INT syn keyword xsMacro QUAD_IS_INT64_T QUAD_IS_LONG QUAD_IS_LONG_LONG syn keyword xsMacro QUAD_IS___INT64 QUESTION_MARK_CTRL QWLIST RANDBITS syn keyword xsMacro RANDOM_R_PROTO RD_NODATA READDIR64_R_PROTO syn keyword xsMacro READDIR_R_PROTO READ_XDIGIT REENTRANT_PROTO_B_B syn keyword xsMacro REENTRANT_PROTO_B_BI REENTRANT_PROTO_B_BW syn keyword xsMacro REENTRANT_PROTO_B_CCD REENTRANT_PROTO_B_CCS syn keyword xsMacro REENTRANT_PROTO_B_IBI REENTRANT_PROTO_B_IBW syn keyword xsMacro REENTRANT_PROTO_B_SB REENTRANT_PROTO_B_SBI syn keyword xsMacro REENTRANT_PROTO_I_BI REENTRANT_PROTO_I_BW syn keyword xsMacro REENTRANT_PROTO_I_CCSBWR REENTRANT_PROTO_I_CCSD syn keyword xsMacro REENTRANT_PROTO_I_CII REENTRANT_PROTO_I_CIISD syn keyword xsMacro REENTRANT_PROTO_I_CSBI REENTRANT_PROTO_I_CSBIR syn keyword xsMacro REENTRANT_PROTO_I_CSBWR REENTRANT_PROTO_I_CSBWRE syn keyword xsMacro REENTRANT_PROTO_I_CSD REENTRANT_PROTO_I_CWISBWRE syn keyword xsMacro REENTRANT_PROTO_I_CWISD REENTRANT_PROTO_I_D syn keyword xsMacro REENTRANT_PROTO_I_H REENTRANT_PROTO_I_IBI syn keyword xsMacro REENTRANT_PROTO_I_IBW REENTRANT_PROTO_I_ICBI syn keyword xsMacro REENTRANT_PROTO_I_ICSBWR REENTRANT_PROTO_I_ICSD syn keyword xsMacro REENTRANT_PROTO_I_ID REENTRANT_PROTO_I_IISD syn keyword xsMacro REENTRANT_PROTO_I_ISBWR REENTRANT_PROTO_I_ISD syn keyword xsMacro REENTRANT_PROTO_I_LISBI REENTRANT_PROTO_I_LISD syn keyword xsMacro REENTRANT_PROTO_I_SB REENTRANT_PROTO_I_SBI syn keyword xsMacro REENTRANT_PROTO_I_SBIE REENTRANT_PROTO_I_SBIH syn keyword xsMacro REENTRANT_PROTO_I_SBIR REENTRANT_PROTO_I_SBWR syn keyword xsMacro REENTRANT_PROTO_I_SBWRE REENTRANT_PROTO_I_SD syn keyword xsMacro REENTRANT_PROTO_I_TISD REENTRANT_PROTO_I_TS syn keyword xsMacro REENTRANT_PROTO_I_TSBI REENTRANT_PROTO_I_TSBIR syn keyword xsMacro REENTRANT_PROTO_I_TSBWR REENTRANT_PROTO_I_TSR syn keyword xsMacro REENTRANT_PROTO_I_TsISBWRE REENTRANT_PROTO_I_UISBWRE syn keyword xsMacro REENTRANT_PROTO_I_uISBWRE REENTRANT_PROTO_S_CBI syn keyword xsMacro REENTRANT_PROTO_S_CCSBI REENTRANT_PROTO_S_CIISBIE syn keyword xsMacro REENTRANT_PROTO_S_CSBI REENTRANT_PROTO_S_CSBIE syn keyword xsMacro REENTRANT_PROTO_S_CWISBIE REENTRANT_PROTO_S_CWISBWIE syn keyword xsMacro REENTRANT_PROTO_S_ICSBI REENTRANT_PROTO_S_ISBI syn keyword xsMacro REENTRANT_PROTO_S_LISBI REENTRANT_PROTO_S_SBI syn keyword xsMacro REENTRANT_PROTO_S_SBIE REENTRANT_PROTO_S_SBW syn keyword xsMacro REENTRANT_PROTO_S_TISBI REENTRANT_PROTO_S_TSBI syn keyword xsMacro REENTRANT_PROTO_S_TSBIE REENTRANT_PROTO_S_TWISBIE syn keyword xsMacro REENTRANT_PROTO_V_D REENTRANT_PROTO_V_H syn keyword xsMacro REENTRANT_PROTO_V_ID REENTR_H REENTR_MEMZERO REF syn keyword xsMacro REFCOUNTED_HE_EXISTS REFCOUNTED_HE_KEY_UTF8 REFF REFFA syn keyword xsMacro REFFL REFFU REFGEN REF_HE_KEY REGMATCH_STATE_MAX syn keyword xsMacro REGNODE_MAX REGNODE_SIMPLE REGNODE_VARIES REG_ANY syn keyword xsMacro REG_CANY_SEEN REG_CUTGROUP_SEEN REG_EXTFLAGS_NAME_SIZE syn keyword xsMacro REG_GOSTART_SEEN REG_GPOS_SEEN REG_INFTY syn keyword xsMacro REG_INTFLAGS_NAME_SIZE REG_LOOKBEHIND_SEEN REG_MAGIC syn keyword xsMacro REG_RECURSE_SEEN REG_RUN_ON_COMMENT_SEEN syn keyword xsMacro REG_TOP_LEVEL_BRANCHES_SEEN REG_UNBOUNDED_QUANTIFIER_SEEN syn keyword xsMacro REG_UNFOLDED_MULTI_SEEN REG_VERBARG_SEEN syn keyword xsMacro REG_ZERO_LEN_SEEN RELOP RENUM REQUIRE RESTORE_ERRNO syn keyword xsMacro RESTORE_LC_NUMERIC RESTORE_LC_NUMERIC_STANDARD syn keyword xsMacro RESTORE_LC_NUMERIC_UNDERLYING RESTORE_NUMERIC_LOCAL syn keyword xsMacro RESTORE_NUMERIC_STANDARD RETPUSHNO RETPUSHUNDEF syn keyword xsMacro RETPUSHYES RETSETNO RETSETTARG RETSETUNDEF RETSETYES syn keyword xsMacro RETURN RETURNOP RETURNX RETURN_PROBE REXEC_CHECKED syn keyword xsMacro REXEC_COPY_SKIP_POST REXEC_COPY_SKIP_PRE REXEC_COPY_STR syn keyword xsMacro REXEC_FAIL_ON_UNDERFLOW REXEC_IGNOREPOS REXEC_NOT_FIRST syn keyword xsMacro REXEC_SCREAM RE_DEBUG_COMPILE_DUMP RE_DEBUG_COMPILE_FLAGS syn keyword xsMacro RE_DEBUG_COMPILE_MASK RE_DEBUG_COMPILE_OPTIMISE syn keyword xsMacro RE_DEBUG_COMPILE_PARSE RE_DEBUG_COMPILE_TEST syn keyword xsMacro RE_DEBUG_COMPILE_TRIE RE_DEBUG_EXECUTE_INTUIT syn keyword xsMacro RE_DEBUG_EXECUTE_MASK RE_DEBUG_EXECUTE_MATCH syn keyword xsMacro RE_DEBUG_EXECUTE_TRIE RE_DEBUG_EXTRA_BUFFERS syn keyword xsMacro RE_DEBUG_EXTRA_GPOS RE_DEBUG_EXTRA_MASK syn keyword xsMacro RE_DEBUG_EXTRA_OFFDEBUG RE_DEBUG_EXTRA_OFFSETS syn keyword xsMacro RE_DEBUG_EXTRA_OPTIMISE RE_DEBUG_EXTRA_STACK syn keyword xsMacro RE_DEBUG_EXTRA_STATE RE_DEBUG_EXTRA_TRIE RE_DEBUG_FLAG syn keyword xsMacro RE_DEBUG_FLAGS RE_PV_COLOR_DECL RE_PV_QUOTED_DECL syn keyword xsMacro RE_SV_DUMPLEN RE_SV_ESCAPE RE_SV_TAIL syn keyword xsMacro RE_TRACK_PATTERN_OFFSETS RE_TRIE_MAXBUF_INIT syn keyword xsMacro RE_TRIE_MAXBUF_NAME RMS_DIR RMS_FAC RMS_FEX RMS_FNF syn keyword xsMacro RMS_IFI RMS_ISI RMS_PRV ROTL32 ROTL64 ROTL_UV syn keyword xsMacro RUNOPS_DEFAULT RV2CVOPCV_FLAG_MASK RV2CVOPCV_MARK_EARLY syn keyword xsMacro RV2CVOPCV_MAYBE_NAME_GV RV2CVOPCV_RETURN_NAME_GV syn keyword xsMacro RV2CVOPCV_RETURN_STUB RX_ANCHORED_SUBSTR RX_ANCHORED_UTF8 syn keyword xsMacro RX_BUFF_IDX_CARET_FULLMATCH RX_BUFF_IDX_CARET_POSTMATCH syn keyword xsMacro RX_BUFF_IDX_CARET_PREMATCH RX_BUFF_IDX_FULLMATCH syn keyword xsMacro RX_BUFF_IDX_POSTMATCH RX_BUFF_IDX_PREMATCH syn keyword xsMacro RX_CHECK_SUBSTR RX_COMPFLAGS RX_ENGINE RX_EXTFLAGS syn keyword xsMacro RX_FLOAT_SUBSTR RX_FLOAT_UTF8 RX_GOFS RX_HAS_CUTGROUP syn keyword xsMacro RX_INTFLAGS RX_ISTAINTED RX_LASTCLOSEPAREN RX_LASTPAREN syn keyword xsMacro RX_MATCH_COPIED RX_MATCH_COPIED_off RX_MATCH_COPIED_on syn keyword xsMacro RX_MATCH_COPIED_set RX_MATCH_COPY_FREE RX_MATCH_TAINTED syn keyword xsMacro RX_MATCH_TAINTED_off RX_MATCH_TAINTED_on syn keyword xsMacro RX_MATCH_TAINTED_set RX_MATCH_UTF8 RX_MATCH_UTF8_off syn keyword xsMacro RX_MATCH_UTF8_on RX_MATCH_UTF8_set RX_MINLEN RX_MINLENRET syn keyword xsMacro RX_NPARENS RX_OFFS RX_PRECOMP RX_PRECOMP_const RX_PRELEN syn keyword xsMacro RX_REFCNT RX_SAVED_COPY RX_SUBBEG RX_SUBCOFFSET RX_SUBLEN syn keyword xsMacro RX_SUBOFFSET RX_TAINT_on RX_UTF8 RX_WRAPLEN RX_WRAPPED syn keyword xsMacro RX_WRAPPED_const RX_ZERO_LEN RXapif_ALL RXapif_CLEAR syn keyword xsMacro RXapif_DELETE RXapif_EXISTS RXapif_FETCH RXapif_FIRSTKEY syn keyword xsMacro RXapif_NEXTKEY RXapif_ONE RXapif_REGNAME RXapif_REGNAMES syn keyword xsMacro RXapif_REGNAMES_COUNT RXapif_SCALAR RXapif_STORE syn keyword xsMacro RXf_BASE_SHIFT RXf_CHECK_ALL RXf_COPY_DONE RXf_EVAL_SEEN syn keyword xsMacro RXf_INTUIT_TAIL RXf_IS_ANCHORED RXf_MATCH_UTF8 syn keyword xsMacro RXf_NO_INPLACE_SUBST RXf_NULL RXf_PMf_CHARSET syn keyword xsMacro RXf_PMf_COMPILETIME RXf_PMf_EXTENDED syn keyword xsMacro RXf_PMf_EXTENDED_MORE RXf_PMf_FLAGCOPYMASK RXf_PMf_FOLD syn keyword xsMacro RXf_PMf_KEEPCOPY RXf_PMf_MULTILINE RXf_PMf_NOCAPTURE syn keyword xsMacro RXf_PMf_SINGLELINE RXf_PMf_SPLIT RXf_PMf_STD_PMMOD syn keyword xsMacro RXf_PMf_STD_PMMOD_SHIFT RXf_PMf_STRICT RXf_SKIPWHITE syn keyword xsMacro RXf_SPLIT RXf_START_ONLY RXf_TAINTED RXf_TAINTED_SEEN syn keyword xsMacro RXf_UNBOUNDED_QUANTIFIER_SEEN RXf_USE_INTUIT syn keyword xsMacro RXf_USE_INTUIT_ML RXf_USE_INTUIT_NOML RXf_WHITE RXi_GET syn keyword xsMacro RXi_GET_DECL RXi_SET RXp_COMPFLAGS RXp_EXTFLAGS syn keyword xsMacro RXp_INTFLAGS RXp_MATCH_COPIED RXp_MATCH_COPIED_off syn keyword xsMacro RXp_MATCH_COPIED_on RXp_MATCH_TAINTED syn keyword xsMacro RXp_MATCH_TAINTED_on RXp_MATCH_UTF8 RXp_PAREN_NAMES ReANY syn keyword xsMacro ReREFCNT_dec ReREFCNT_inc Renew Renewc RsPARA RsRECORD syn keyword xsMacro RsSIMPLE RsSNARF SAFE_TRIE_NODENUM SANY SAVEADELETE syn keyword xsMacro SAVEBOOL SAVECLEARSV SAVECOMPILEWARNINGS SAVECOMPPAD syn keyword xsMacro SAVECOPFILE SAVECOPFILE_FREE SAVECOPLINE syn keyword xsMacro SAVECOPSTASH_FREE SAVEDELETE SAVEDESTRUCTOR syn keyword xsMacro SAVEDESTRUCTOR_X SAVEFREECOPHH SAVEFREEOP SAVEFREEPADNAME syn keyword xsMacro SAVEFREEPV SAVEFREESV SAVEGENERICPV SAVEGENERICSV syn keyword xsMacro SAVEHDELETE SAVEHINTS SAVEI16 SAVEI32 SAVEI8 SAVEINT syn keyword xsMacro SAVEIV SAVELONG SAVEMORTALIZESV SAVEOP syn keyword xsMacro SAVEPADSVANDMORTALIZE SAVEPARSER SAVEPPTR SAVESETSVFLAGS syn keyword xsMacro SAVESHAREDPV SAVESPTR SAVESTACK_POS SAVESWITCHSTACK syn keyword xsMacro SAVETMPS SAVEVPTR SAVE_DEFSV SAVE_ERRNO SAVE_MASK syn keyword xsMacro SAVE_TIGHT_SHIFT SAVEf_KEEPOLDELEM SAVEf_SETMAGIC syn keyword xsMacro SAVEt_ADELETE SAVEt_AELEM SAVEt_ALLOC SAVEt_APTR syn keyword xsMacro SAVEt_ARG0_MAX SAVEt_ARG1_MAX SAVEt_ARG2_MAX SAVEt_AV syn keyword xsMacro SAVEt_BOOL SAVEt_CLEARPADRANGE SAVEt_CLEARSV syn keyword xsMacro SAVEt_COMPILE_WARNINGS SAVEt_COMPPAD SAVEt_DELETE syn keyword xsMacro SAVEt_DESTRUCTOR SAVEt_DESTRUCTOR_X SAVEt_FREECOPHH syn keyword xsMacro SAVEt_FREEOP SAVEt_FREEPADNAME SAVEt_FREEPV SAVEt_FREESV syn keyword xsMacro SAVEt_GENERIC_PVREF SAVEt_GENERIC_SVREF SAVEt_GP syn keyword xsMacro SAVEt_GP_ALIASED_SV SAVEt_GVSLOT SAVEt_GVSV SAVEt_HELEM syn keyword xsMacro SAVEt_HINTS SAVEt_HPTR SAVEt_HV SAVEt_I16 SAVEt_I32 syn keyword xsMacro SAVEt_I32_SMALL SAVEt_I8 SAVEt_INT SAVEt_INT_SMALL syn keyword xsMacro SAVEt_ITEM SAVEt_IV SAVEt_LONG SAVEt_MORTALIZESV syn keyword xsMacro SAVEt_NSTAB SAVEt_OP SAVEt_PADSV_AND_MORTALIZE syn keyword xsMacro SAVEt_PARSER SAVEt_PPTR SAVEt_READONLY_OFF syn keyword xsMacro SAVEt_REGCONTEXT SAVEt_SAVESWITCHSTACK SAVEt_SET_SVFLAGS syn keyword xsMacro SAVEt_SHARED_PVREF SAVEt_SPTR SAVEt_STACK_POS syn keyword xsMacro SAVEt_STRLEN SAVEt_SV SAVEt_SVREF SAVEt_VPTR syn keyword xsMacro SAWAMPERSAND_LEFT SAWAMPERSAND_MIDDLE SAWAMPERSAND_RIGHT syn keyword xsMacro SBOL SB_ENUM_COUNT SCAN_DEF SCAN_REPL SCAN_TR syn keyword xsMacro SCAN_VERSION SCHED_YIELD SCOPE_SAVES_SIGNAL_MASK SEEK_CUR syn keyword xsMacro SEEK_END SEEK_SET SELECT_MIN_BITS SEOL SETERRNO syn keyword xsMacro SETGRENT_R_PROTO SETHOSTENT_R_PROTO SETLOCALE_R_PROTO syn keyword xsMacro SETNETENT_R_PROTO SETPROTOENT_R_PROTO SETPWENT_R_PROTO syn keyword xsMacro SETSERVENT_R_PROTO SETTARG SET_MARK_OFFSET syn keyword xsMacro SET_NUMERIC_LOCAL SET_NUMERIC_STANDARD syn keyword xsMacro SET_NUMERIC_UNDERLYING SET_THR SET_THREAD_SELF SETi SETn syn keyword xsMacro SETp SETs SETu SHARP_S_SKIP SHIFTOP SHORTSIZE SH_PATH syn keyword xsMacro SIGABRT SIGILL SIG_NAME SIG_NUM SIG_SIZE SINGLE_PAT_MOD syn keyword xsMacro SIPROUND SITEARCH SITEARCH_EXP SITELIB SITELIB_EXP syn keyword xsMacro SITELIB_STEM SIZE_ALIGN SIZE_ONLY SKIP SKIP_next syn keyword xsMacro SKIP_next_fail SLOPPYDIVIDE SOCKET_OPEN_MODE SPAGAIN syn keyword xsMacro SPRINTF_RETURNS_STRLEN SRAND48_R_PROTO SRANDOM_R_PROTO syn keyword xsMacro SSCHECK SSC_MATCHES_EMPTY_STRING SSGROW SSNEW SSNEWa syn keyword xsMacro SSNEWat SSNEWt SSPOPBOOL SSPOPDPTR SSPOPDXPTR SSPOPINT syn keyword xsMacro SSPOPIV SSPOPLONG SSPOPPTR SSPOPUV SSPTR SSPTRt syn keyword xsMacro SSPUSHBOOL SSPUSHDPTR SSPUSHDXPTR SSPUSHINT SSPUSHIV syn keyword xsMacro SSPUSHLONG SSPUSHPTR SSPUSHUV SS_ACCVIO SS_ADD_BOOL syn keyword xsMacro SS_ADD_DPTR SS_ADD_DXPTR SS_ADD_END SS_ADD_INT SS_ADD_IV syn keyword xsMacro SS_ADD_LONG SS_ADD_PTR SS_ADD_UV SS_BUFFEROVF syn keyword xsMacro SS_DEVOFFLINE SS_IVCHAN SS_MAXPUSH SS_NOPRIV SS_NORMAL syn keyword xsMacro SSize_t_MAX ST STANDARD_C STAR STARTPERL START_EXTERN_C syn keyword xsMacro START_MY_CXT STATIC STATIC_ASSERT_1 STATIC_ASSERT_2 syn keyword xsMacro STATIC_ASSERT_GLOBAL STATIC_ASSERT_STMT syn keyword xsMacro STATUS_ALL_FAILURE STATUS_ALL_SUCCESS STATUS_CURRENT syn keyword xsMacro STATUS_EXIT STATUS_EXIT_SET STATUS_NATIVE syn keyword xsMacro STATUS_NATIVE_CHILD_SET STATUS_UNIX STATUS_UNIX_EXIT_SET syn keyword xsMacro STATUS_UNIX_SET STDCHAR STDIO_STREAM_ARRAY STD_PAT_MODS syn keyword xsMacro STD_PMMOD_FLAGS_CLEAR STD_PMMOD_FLAGS_PARSE_X_WARN syn keyword xsMacro STMT_END STMT_START STORE_LC_NUMERIC_FORCE_TO_UNDERLYING syn keyword xsMacro STORE_LC_NUMERIC_SET_TO_NEEDED syn keyword xsMacro STORE_LC_NUMERIC_STANDARD_SET_UNDERLYING syn keyword xsMacro STORE_LC_NUMERIC_UNDERLYING_SET_STANDARD syn keyword xsMacro STORE_NUMERIC_LOCAL_SET_STANDARD syn keyword xsMacro STORE_NUMERIC_STANDARD_FORCE_LOCAL syn keyword xsMacro STORE_NUMERIC_STANDARD_SET_LOCAL STRERROR_R_PROTO STRING syn keyword xsMacro STRINGIFY STRUCT_OFFSET STRUCT_SV STR_LEN STR_SZ syn keyword xsMacro STR_WITH_LEN ST_INO_SIGN ST_INO_SIZE SUB syn keyword xsMacro SUBST_TAINT_BOOLRET SUBST_TAINT_PAT SUBST_TAINT_REPL syn keyword xsMacro SUBST_TAINT_RETAINT SUBST_TAINT_STR SUBVERSION SUCCEED syn keyword xsMacro SUSPEND SVTYPEMASK SV_CATBYTES SV_CATUTF8 syn keyword xsMacro SV_CHECK_THINKFIRST SV_CHECK_THINKFIRST_COW_DROP SV_CONST syn keyword xsMacro SV_CONSTS_COUNT SV_CONST_BINMODE SV_CONST_CLEAR syn keyword xsMacro SV_CONST_CLOSE SV_CONST_DELETE SV_CONST_DESTROY syn keyword xsMacro SV_CONST_EOF SV_CONST_EXISTS SV_CONST_EXTEND syn keyword xsMacro SV_CONST_FETCH SV_CONST_FETCHSIZE SV_CONST_FILENO syn keyword xsMacro SV_CONST_FIRSTKEY SV_CONST_GETC SV_CONST_NEXTKEY syn keyword xsMacro SV_CONST_OPEN SV_CONST_POP SV_CONST_PRINT SV_CONST_PRINTF syn keyword xsMacro SV_CONST_PUSH SV_CONST_READ SV_CONST_READLINE syn keyword xsMacro SV_CONST_RETURN SV_CONST_SCALAR SV_CONST_SEEK syn keyword xsMacro SV_CONST_SHIFT SV_CONST_SPLICE SV_CONST_STORE syn keyword xsMacro SV_CONST_STORESIZE SV_CONST_TELL SV_CONST_TIEARRAY syn keyword xsMacro SV_CONST_TIEHANDLE SV_CONST_TIEHASH SV_CONST_TIESCALAR syn keyword xsMacro SV_CONST_UNSHIFT SV_CONST_UNTIE SV_CONST_WRITE syn keyword xsMacro SV_COW_DROP_PV SV_COW_OTHER_PVS SV_COW_REFCNT_MAX syn keyword xsMacro SV_COW_SHARED_HASH_KEYS SV_DO_COW_SVSETSV syn keyword xsMacro SV_FORCE_UTF8_UPGRADE SV_GMAGIC SV_HAS_TRAILING_NUL syn keyword xsMacro SV_IMMEDIATE_UNREF SV_MUTABLE_RETURN SV_NOSTEAL syn keyword xsMacro SV_SAVED_COPY SV_SKIP_OVERLOAD SV_SMAGIC syn keyword xsMacro SV_UNDEF_RETURNS_NULL SV_UTF8_NO_ENCODING SVrepl_EVAL syn keyword xsMacro SVt_FIRST SVt_MASK SWITCHSTACK SYMBIAN SYSTEM_GMTIME_MAX syn keyword xsMacro SYSTEM_GMTIME_MIN SYSTEM_LOCALTIME_MAX syn keyword xsMacro SYSTEM_LOCALTIME_MIN S_IEXEC S_IFIFO S_IFMT S_IREAD syn keyword xsMacro S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISBLK syn keyword xsMacro S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISLNK S_ISREG S_ISSOCK syn keyword xsMacro S_ISUID S_IWGRP S_IWOTH S_IWRITE S_IWUSR S_IXGRP S_IXOTH syn keyword xsMacro S_IXUSR S_PAT_MODS Safefree Semctl Sigjmp_buf Siglongjmp syn keyword xsMacro Sigsetjmp Size_t_MAX Size_t_size StGiFy StashHANDLER Stat syn keyword xsMacro Strerror Strtol Strtoul StructCopy SvAMAGIC SvANY syn keyword xsMacro SvCANCOW SvCANEXISTDELETE SvCOMPILED SvCOMPILED_off syn keyword xsMacro SvCOMPILED_on SvCUR SvCUR_set SvDESTROYABLE SvEND syn keyword xsMacro SvEND_set SvENDx SvEVALED SvEVALED_off SvEVALED_on SvFAKE syn keyword xsMacro SvFAKE_off SvFAKE_on SvFLAGS SvGAMAGIC SvGETMAGIC SvGID syn keyword xsMacro SvGMAGICAL SvGMAGICAL_off SvGMAGICAL_on SvGROW syn keyword xsMacro SvGROW_mutable SvIMMORTAL SvIOK SvIOK_UV SvIOK_nog syn keyword xsMacro SvIOK_nogthink SvIOK_notUV SvIOK_off SvIOK_on SvIOK_only syn keyword xsMacro SvIOK_only_UV SvIOKp SvIOKp_on SvIS_FREED SvIV SvIVX syn keyword xsMacro SvIVXx SvIV_nomg SvIV_please SvIV_please_nomg SvIV_set syn keyword xsMacro SvIVx SvIsCOW SvIsCOW_normal SvIsCOW_off SvIsCOW_on syn keyword xsMacro SvIsCOW_shared_hash SvIsUV SvIsUV_off SvIsUV_on SvLEN syn keyword xsMacro SvLEN_set SvLENx SvLOCK SvMAGIC SvMAGICAL SvMAGICAL_off syn keyword xsMacro SvMAGICAL_on SvMAGIC_set SvNIOK SvNIOK_nog syn keyword xsMacro SvNIOK_nogthink SvNIOK_off SvNIOKp SvNOK SvNOK_nog syn keyword xsMacro SvNOK_nogthink SvNOK_off SvNOK_on SvNOK_only SvNOKp syn keyword xsMacro SvNOKp_on SvNV SvNVX SvNVXx SvNV_nomg SvNV_set SvNVx syn keyword xsMacro SvOBJECT SvOBJECT_off SvOBJECT_on SvOK SvOK_off syn keyword xsMacro SvOK_off_exc_UV SvOKp SvOOK SvOOK_off SvOOK_offset syn keyword xsMacro SvOOK_on SvOURSTASH SvOURSTASH_set SvPADMY SvPADMY_on syn keyword xsMacro SvPADSTALE SvPADSTALE_off SvPADSTALE_on SvPADTMP syn keyword xsMacro SvPADTMP_off SvPADTMP_on SvPAD_OUR SvPAD_OUR_on syn keyword xsMacro SvPAD_STATE SvPAD_STATE_on SvPAD_TYPED SvPAD_TYPED_on syn keyword xsMacro SvPCS_IMPORTED SvPCS_IMPORTED_off SvPCS_IMPORTED_on syn keyword xsMacro SvPEEK SvPOK SvPOK_byte_nog SvPOK_byte_nogthink syn keyword xsMacro SvPOK_byte_pure_nogthink SvPOK_nog SvPOK_nogthink syn keyword xsMacro SvPOK_off SvPOK_on SvPOK_only SvPOK_only_UTF8 syn keyword xsMacro SvPOK_pure_nogthink SvPOK_utf8_nog SvPOK_utf8_nogthink syn keyword xsMacro SvPOK_utf8_pure_nogthink SvPOKp SvPOKp_on SvPV SvPVX syn keyword xsMacro SvPVX_const SvPVX_mutable SvPVXtrue SvPVXx SvPV_const syn keyword xsMacro SvPV_flags SvPV_flags_const SvPV_flags_const_nolen syn keyword xsMacro SvPV_flags_mutable SvPV_force SvPV_force_flags syn keyword xsMacro SvPV_force_flags_mutable SvPV_force_flags_nolen syn keyword xsMacro SvPV_force_mutable SvPV_force_nolen SvPV_force_nomg syn keyword xsMacro SvPV_force_nomg_nolen SvPV_free SvPV_mutable SvPV_nolen syn keyword xsMacro SvPV_nolen_const SvPV_nomg SvPV_nomg_const syn keyword xsMacro SvPV_nomg_const_nolen SvPV_nomg_nolen SvPV_renew SvPV_set syn keyword xsMacro SvPV_shrink_to_cur SvPVbyte SvPVbyte_force SvPVbyte_nolen syn keyword xsMacro SvPVbytex SvPVbytex_force SvPVbytex_nolen SvPVutf8 syn keyword xsMacro SvPVutf8_force SvPVutf8_nolen SvPVutf8x SvPVutf8x_force syn keyword xsMacro SvPVx SvPVx_const SvPVx_force SvPVx_nolen syn keyword xsMacro SvPVx_nolen_const SvREADONLY SvREADONLY_off SvREADONLY_on syn keyword xsMacro SvREFCNT SvREFCNT_IMMORTAL SvREFCNT_dec SvREFCNT_dec_NN syn keyword xsMacro SvREFCNT_inc SvREFCNT_inc_NN SvREFCNT_inc_simple syn keyword xsMacro SvREFCNT_inc_simple_NN SvREFCNT_inc_simple_void syn keyword xsMacro SvREFCNT_inc_simple_void_NN SvREFCNT_inc_void syn keyword xsMacro SvREFCNT_inc_void_NN SvRELEASE_IVX SvRELEASE_IVX_ syn keyword xsMacro SvRMAGICAL SvRMAGICAL_off SvRMAGICAL_on SvROK SvROK_off syn keyword xsMacro SvROK_on SvRV SvRV_const SvRV_set SvRVx SvRX SvRXOK syn keyword xsMacro SvSCREAM SvSCREAM_off SvSCREAM_on SvSETMAGIC SvSHARE syn keyword xsMacro SvSHARED_HASH SvSHARED_HEK_FROM_PV SvSMAGICAL syn keyword xsMacro SvSMAGICAL_off SvSMAGICAL_on SvSTASH SvSTASH_set syn keyword xsMacro SvSetMagicSV SvSetMagicSV_nosteal SvSetSV SvSetSV_and syn keyword xsMacro SvSetSV_nosteal SvSetSV_nosteal_and SvTAIL SvTAIL_off syn keyword xsMacro SvTAIL_on SvTAINT SvTAINTED SvTAINTED_off SvTAINTED_on syn keyword xsMacro SvTEMP SvTEMP_off SvTEMP_on SvTHINKFIRST SvTIED_mg syn keyword xsMacro SvTIED_obj SvTRUE SvTRUE_NN SvTRUE_common SvTRUE_nomg syn keyword xsMacro SvTRUE_nomg_NN SvTRUEx SvTRUEx_nomg SvTYPE SvUID SvUNLOCK syn keyword xsMacro SvUOK SvUOK_nog SvUOK_nogthink SvUPGRADE SvUTF8 syn keyword xsMacro SvUTF8_off SvUTF8_on SvUV SvUVX SvUVXx SvUV_nomg SvUV_set syn keyword xsMacro SvUVx SvVALID SvVALID_off SvVALID_on SvVOK SvVSTRING_mg syn keyword xsMacro SvWEAKREF SvWEAKREF_off SvWEAKREF_on Sv_Grow TAIL TAINT syn keyword xsMacro TAINTING_get TAINTING_set TAINT_ENV TAINT_IF TAINT_NOT syn keyword xsMacro TAINT_PROPER TAINT_WARN_get TAINT_WARN_set TAINT_get syn keyword xsMacro TAINT_set THING THR THREAD_CREATE syn keyword xsMacro THREAD_CREATE_NEEDS_STACK THREAD_POST_CREATE syn keyword xsMacro THREAD_RET_CAST THREAD_RET_TYPE syn keyword xsMacro TIED_METHOD_ARGUMENTS_ON_STACK syn keyword xsMacro TIED_METHOD_MORTALIZE_NOT_NEEDED TIED_METHOD_SAY syn keyword xsMacro TIME64_CONFIG_H TIME64_H TM TMPNAM_R_PROTO TOO_LATE_FOR syn keyword xsMacro TOO_LATE_FOR_ TOPBLOCK TOPMARK TOPi TOPl TOPm1s TOPn TOPp syn keyword xsMacro TOPp1s TOPpx TOPs TOPu TOPul TRIE TRIEC TRIE_BITMAP syn keyword xsMacro TRIE_BITMAP_BYTE TRIE_BITMAP_CLEAR TRIE_BITMAP_SET syn keyword xsMacro TRIE_BITMAP_TEST TRIE_CHARCOUNT TRIE_NODEIDX TRIE_NODENUM syn keyword xsMacro TRIE_WORDS_OFFSET TRIE_next TRIE_next_fail TRUE syn keyword xsMacro TTYNAME_R_PROTO TWO_BYTE_UTF8_TO_NATIVE syn keyword xsMacro TWO_BYTE_UTF8_TO_UNI TYPE_CHARS TYPE_DIGITS Timeval syn keyword xsMacro U16SIZE U16TYPE U16_CONST U16_MAX U16_MIN U32SIZE U32TYPE syn keyword xsMacro U32_ALIGNMENT_REQUIRED U32_CONST U32_MAX U32_MAX_P1 syn keyword xsMacro U32_MAX_P1_HALF U32_MIN U64SIZE U64TYPE U64_CONST U8SIZE syn keyword xsMacro U8TO16_LE U8TO32_LE U8TO64_LE U8TYPE U8_MAX U8_MIN syn keyword xsMacro UCHARAT UINT32_MIN UINT64_C UINT64_MIN UMINUS syn keyword xsMacro UNALIGNED_SAFE UNDERBAR UNICODE_ALLOW_ANY syn keyword xsMacro UNICODE_ALLOW_SUPER UNICODE_ALLOW_SURROGATE syn keyword xsMacro UNICODE_BYTE_ORDER_MARK UNICODE_DISALLOW_FE_FF syn keyword xsMacro UNICODE_DISALLOW_ILLEGAL_INTERCHANGE syn keyword xsMacro UNICODE_DISALLOW_NONCHAR UNICODE_DISALLOW_SUPER syn keyword xsMacro UNICODE_DISALLOW_SURROGATE syn keyword xsMacro UNICODE_GREEK_CAPITAL_LETTER_SIGMA syn keyword xsMacro UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA syn keyword xsMacro UNICODE_GREEK_SMALL_LETTER_SIGMA syn keyword xsMacro UNICODE_IS_BYTE_ORDER_MARK UNICODE_IS_FE_FF syn keyword xsMacro UNICODE_IS_NONCHAR UNICODE_IS_REPLACEMENT syn keyword xsMacro UNICODE_IS_SUPER UNICODE_IS_SURROGATE UNICODE_LINE_SEPA_0 syn keyword xsMacro UNICODE_LINE_SEPA_1 UNICODE_LINE_SEPA_2 syn keyword xsMacro UNICODE_PARA_SEPA_0 UNICODE_PARA_SEPA_1 syn keyword xsMacro UNICODE_PARA_SEPA_2 UNICODE_PAT_MOD UNICODE_PAT_MODS syn keyword xsMacro UNICODE_REPLACEMENT UNICODE_SURROGATE_FIRST syn keyword xsMacro UNICODE_SURROGATE_LAST UNICODE_WARN_FE_FF syn keyword xsMacro UNICODE_WARN_ILLEGAL_INTERCHANGE UNICODE_WARN_NONCHAR syn keyword xsMacro UNICODE_WARN_SUPER UNICODE_WARN_SURROGATE UNIOP UNIOPSUB syn keyword xsMacro UNISKIP UNI_DISPLAY_BACKSLASH UNI_DISPLAY_ISPRINT syn keyword xsMacro UNI_DISPLAY_QQ UNI_DISPLAY_REGEX UNI_IS_INVARIANT syn keyword xsMacro UNI_TO_NATIVE UNKNOWN_ERRNO_MSG UNLESS UNLESSM UNLIKELY syn keyword xsMacro UNLINK UNLOCK_DOLLARZERO_MUTEX UNLOCK_LC_NUMERIC_STANDARD syn keyword xsMacro UNLOCK_NUMERIC_STANDARD UNOP_AUX_item_sv UNTIL syn keyword xsMacro UPG_VERSION USE USE_64_BIT_ALL USE_64_BIT_INT syn keyword xsMacro USE_64_BIT_RAWIO USE_64_BIT_STDIO USE_BSDPGRP syn keyword xsMacro USE_DYNAMIC_LOADING USE_ENVIRON_ARRAY USE_HASH_SEED syn keyword xsMacro USE_HEAP_INSTEAD_OF_STACK USE_LARGE_FILES USE_LEFT syn keyword xsMacro USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE syn keyword xsMacro USE_LOCALE_MESSAGES USE_LOCALE_MONETARY syn keyword xsMacro USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO syn keyword xsMacro USE_PERL_PERTURB_KEYS USE_REENTRANT_API syn keyword xsMacro USE_SEMCTL_SEMID_DS USE_SEMCTL_SEMUN USE_STAT_BLOCKS syn keyword xsMacro USE_STAT_RDEV USE_STDIO USE_STRUCT_COPY USE_SYSTEM_GMTIME syn keyword xsMacro USE_SYSTEM_LOCALTIME USE_THREADS USE_TM64 syn keyword xsMacro USE_UTF8_IN_NAMES USING_MSVC6 UTF8SKIP UTF8_ACCUMULATE syn keyword xsMacro UTF8_ALLOW_ANY UTF8_ALLOW_ANYUV UTF8_ALLOW_CONTINUATION syn keyword xsMacro UTF8_ALLOW_DEFAULT UTF8_ALLOW_EMPTY UTF8_ALLOW_FFFF syn keyword xsMacro UTF8_ALLOW_LONG UTF8_ALLOW_NON_CONTINUATION syn keyword xsMacro UTF8_ALLOW_SHORT UTF8_ALLOW_SURROGATE UTF8_CHECK_ONLY syn keyword xsMacro UTF8_DISALLOW_FE_FF UTF8_DISALLOW_ILLEGAL_INTERCHANGE syn keyword xsMacro UTF8_DISALLOW_NONCHAR UTF8_DISALLOW_SUPER syn keyword xsMacro UTF8_DISALLOW_SURROGATE UTF8_EIGHT_BIT_HI syn keyword xsMacro UTF8_EIGHT_BIT_LO syn keyword xsMacro UTF8_FIRST_PROBLEMATIC_CODE_POINT_FIRST_BYTE syn keyword xsMacro UTF8_IS_ABOVE_LATIN1 UTF8_IS_CONTINUATION syn keyword xsMacro UTF8_IS_CONTINUED UTF8_IS_DOWNGRADEABLE_START syn keyword xsMacro UTF8_IS_INVARIANT UTF8_IS_NEXT_CHAR_DOWNGRADEABLE syn keyword xsMacro UTF8_IS_NONCHAR_ syn keyword xsMacro UTF8_IS_NONCHAR_GIVEN_THAT_NON_SUPER_AND_GE_PROBLEMATIC syn keyword xsMacro UTF8_IS_REPLACEMENT UTF8_IS_START UTF8_IS_SUPER syn keyword xsMacro UTF8_IS_SURROGATE UTF8_MAXBYTES UTF8_MAXBYTES_CASE syn keyword xsMacro UTF8_MAXLEN UTF8_MAX_FOLD_CHAR_EXPAND UTF8_QUAD_MAX syn keyword xsMacro UTF8_TWO_BYTE_HI UTF8_TWO_BYTE_HI_nocast UTF8_TWO_BYTE_LO syn keyword xsMacro UTF8_TWO_BYTE_LO_nocast UTF8_WARN_FE_FF syn keyword xsMacro UTF8_WARN_ILLEGAL_INTERCHANGE UTF8_WARN_NONCHAR syn keyword xsMacro UTF8_WARN_SUPER UTF8_WARN_SURROGATE UTF8f UTF8fARG syn keyword xsMacro UTF_ACCUMULATION_OVERFLOW_MASK UTF_ACCUMULATION_SHIFT syn keyword xsMacro UTF_CONTINUATION_MARK UTF_CONTINUATION_MASK syn keyword xsMacro UTF_START_MARK UTF_START_MASK UTF_TO_NATIVE syn keyword xsMacro UVCHR_IS_INVARIANT UVCHR_SKIP UVSIZE UVTYPE UVXf UV_DIG syn keyword xsMacro UV_MAX UV_MAX_P1 UV_MAX_P1_HALF UV_MIN UVf U_32 U_I U_L syn keyword xsMacro U_S U_V Uid_t_f Uid_t_sign Uid_t_size VAL_EAGAIN syn keyword xsMacro VAL_O_NONBLOCK VCMP VERB VNORMAL VNUMIFY VOL VSTRINGIFY syn keyword xsMacro VTBL_amagic VTBL_amagicelem VTBL_arylen VTBL_bm syn keyword xsMacro VTBL_collxfrm VTBL_dbline VTBL_defelem VTBL_env syn keyword xsMacro VTBL_envelem VTBL_fm VTBL_glob VTBL_isa VTBL_isaelem syn keyword xsMacro VTBL_mglob VTBL_nkeys VTBL_pack VTBL_packelem VTBL_pos syn keyword xsMacro VTBL_regdata VTBL_regdatum VTBL_regexp VTBL_sigelem syn keyword xsMacro VTBL_substr VTBL_sv VTBL_taint VTBL_uvar VTBL_vec syn keyword xsMacro VT_NATIVE VUTIL_REPLACE_CORE VVERIFY WARN_ALL syn keyword xsMacro WARN_ALLstring WARN_AMBIGUOUS WARN_BAREWORD WARN_CLOSED syn keyword xsMacro WARN_CLOSURE WARN_DEBUGGING WARN_DEPRECATED WARN_DIGIT syn keyword xsMacro WARN_EXEC WARN_EXITING WARN_EXPERIMENTAL syn keyword xsMacro WARN_EXPERIMENTAL__AUTODEREF WARN_EXPERIMENTAL__BITWISE syn keyword xsMacro WARN_EXPERIMENTAL__CONST_ATTR syn keyword xsMacro WARN_EXPERIMENTAL__LEXICAL_SUBS syn keyword xsMacro WARN_EXPERIMENTAL__LEXICAL_TOPIC syn keyword xsMacro WARN_EXPERIMENTAL__POSTDEREF syn keyword xsMacro WARN_EXPERIMENTAL__REFALIASING syn keyword xsMacro WARN_EXPERIMENTAL__REGEX_SETS syn keyword xsMacro WARN_EXPERIMENTAL__RE_STRICT syn keyword xsMacro WARN_EXPERIMENTAL__SIGNATURES syn keyword xsMacro WARN_EXPERIMENTAL__SMARTMATCH syn keyword xsMacro WARN_EXPERIMENTAL__WIN32_PERLIO WARN_GLOB syn keyword xsMacro WARN_ILLEGALPROTO WARN_IMPRECISION WARN_INPLACE syn keyword xsMacro WARN_INTERNAL WARN_IO WARN_LAYER WARN_LOCALE WARN_MALLOC syn keyword xsMacro WARN_MISC WARN_MISSING WARN_NEWLINE WARN_NONCHAR syn keyword xsMacro WARN_NONEstring WARN_NON_UNICODE WARN_NUMERIC WARN_ONCE syn keyword xsMacro WARN_OVERFLOW WARN_PACK WARN_PARENTHESIS WARN_PIPE syn keyword xsMacro WARN_PORTABLE WARN_PRECEDENCE WARN_PRINTF WARN_PROTOTYPE syn keyword xsMacro WARN_QW WARN_RECURSION WARN_REDEFINE WARN_REDUNDANT syn keyword xsMacro WARN_REGEXP WARN_RESERVED WARN_SEMICOLON WARN_SEVERE syn keyword xsMacro WARN_SIGNAL WARN_SUBSTR WARN_SURROGATE WARN_SYNTAX syn keyword xsMacro WARN_SYSCALLS WARN_TAINT WARN_THREADS WARN_UNINITIALIZED syn keyword xsMacro WARN_UNOPENED WARN_UNPACK WARN_UNTIE WARN_UTF8 WARN_VOID syn keyword xsMacro WARNshift WARNsize WB_ENUM_COUNT WEXITSTATUS WHEN WHILE syn keyword xsMacro WHILEM WHILEM_A_max WHILEM_A_max_fail WHILEM_A_min syn keyword xsMacro WHILEM_A_min_fail WHILEM_A_pre WHILEM_A_pre_fail syn keyword xsMacro WHILEM_B_max WHILEM_B_max_fail WHILEM_B_min syn keyword xsMacro WHILEM_B_min_fail WIDEST_UTYPE WIFEXITED WIFSIGNALED syn keyword xsMacro WIFSTOPPED WIN32SCK_IS_STDSCK WNOHANG WORD WSTOPSIG syn keyword xsMacro WTERMSIG WUNTRACED XDIGIT_VALUE XHvTOTALKEYS syn keyword xsMacro XOPd_xop_class XOPd_xop_desc XOPd_xop_name XOPd_xop_peep syn keyword xsMacro XOPf_xop_class XOPf_xop_desc XOPf_xop_name XOPf_xop_peep syn keyword xsMacro XPUSHTARG XPUSHi XPUSHmortal XPUSHn XPUSHp XPUSHs XPUSHu syn keyword xsMacro XPUSHundef XS XSANY XSINTERFACE_CVT XSINTERFACE_CVT_ANON syn keyword xsMacro XSINTERFACE_FUNC XSINTERFACE_FUNC_SET XSPROTO XSRETURN syn keyword xsMacro XSRETURN_EMPTY XSRETURN_IV XSRETURN_NO XSRETURN_NV syn keyword xsMacro XSRETURN_PV XSRETURN_PVN XSRETURN_UNDEF XSRETURN_UV syn keyword xsMacro XSRETURN_YES XST_mIV XST_mNO XST_mNV XST_mPV XST_mPVN syn keyword xsMacro XST_mUNDEF XST_mUV XST_mYES XS_APIVERSION_BOOTCHECK syn keyword xsMacro XS_APIVERSION_POPMARK_BOOTCHECK syn keyword xsMacro XS_APIVERSION_SETXSUBFN_POPMARK_BOOTCHECK syn keyword xsMacro XS_BOTHVERSION_BOOTCHECK XS_BOTHVERSION_POPMARK_BOOTCHECK syn keyword xsMacro XS_BOTHVERSION_SETXSUBFN_POPMARK_BOOTCHECK syn keyword xsMacro XS_DYNAMIC_FILENAME XS_EXTERNAL XS_INTERNAL syn keyword xsMacro XS_SETXSUBFN_POPMARK XS_VERSION_BOOTCHECK XSprePUSH syn keyword xsMacro XTENDED_PAT_MOD XopDISABLE XopENABLE XopENTRY syn keyword xsMacro XopENTRYCUSTOM XopENTRY_set XopFLAGS YADAYADA YIELD syn keyword xsMacro YYEMPTY YYSTYPE_IS_DECLARED YYSTYPE_IS_TRIVIAL syn keyword xsMacro YYTOKENTYPE Zero ZeroD _ _CANNOT _CC_ALPHA syn keyword xsMacro _CC_ALPHANUMERIC _CC_ASCII _CC_BLANK _CC_CASED syn keyword xsMacro _CC_CHARNAME_CONT _CC_CNTRL _CC_DIGIT _CC_GRAPH syn keyword xsMacro _CC_IDFIRST _CC_IS_IN_SOME_FOLD _CC_LOWER syn keyword xsMacro _CC_MNEMONIC_CNTRL _CC_NONLATIN1_FOLD syn keyword xsMacro _CC_NONLATIN1_SIMPLE_FOLD _CC_NON_FINAL_FOLD _CC_PRINT syn keyword xsMacro _CC_PUNCT _CC_QUOTEMETA _CC_SPACE _CC_UPPER _CC_VERTSPACE syn keyword xsMacro _CC_WORDCHAR _CC_XDIGIT _CC_mask _CC_mask_A syn keyword xsMacro _CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG syn keyword xsMacro _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG syn keyword xsMacro _CHECK_AND_WARN_PROBLEMATIC_LOCALE syn keyword xsMacro _CORE_SWASH_INIT_ACCEPT_INVLIST syn keyword xsMacro _CORE_SWASH_INIT_RETURN_IF_UNDEF syn keyword xsMacro _CORE_SWASH_INIT_USER_DEFINED_PROPERTY _CPERLarg syn keyword xsMacro _FIRST_NON_SWASH_CC _GNU_SOURCE syn keyword xsMacro _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C syn keyword xsMacro _HAS_NONLATIN1_SIMPLE_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C syn keyword xsMacro _HIGHEST_REGCOMP_DOT_H_SYNC _INC_PERL_XSUB_H syn keyword xsMacro _IS_IN_SOME_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C syn keyword xsMacro _IS_MNEMONIC_CNTRL_ONLY_FOR_USE_BY_REGCOMP_DOT_C syn keyword xsMacro _IS_NON_FINAL_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C _LC_CAST syn keyword xsMacro _MEM_WRAP_NEEDS_RUNTIME_CHECK _MEM_WRAP_WILL_WRAP syn keyword xsMacro _NOT_IN_NUMERIC_STANDARD _NOT_IN_NUMERIC_UNDERLYING syn keyword xsMacro _NV_BODYLESS_UNION _OP_SIBPARENT_FIELDNAME _PERLIOL_H syn keyword xsMacro _PERLIO_H _PERL_OBJECT_THIS _REGEXP_COMMON syn keyword xsMacro _RXf_PMf_CHARSET_SHIFT _RXf_PMf_SHIFT_COMPILETIME syn keyword xsMacro _RXf_PMf_SHIFT_NEXT _STDIO_H _STDIO_INCLUDED _V syn keyword xsMacro _XPVCV_COMMON _XPV_HEAD __ASSERT_ __BASE_TWO_BYTE_HI syn keyword xsMacro __BASE_TWO_BYTE_LO __Inc__IPerl___ syn keyword xsMacro __PATCHLEVEL_H_INCLUDED__ __PL_inf_float_int32 syn keyword xsMacro __PL_nan_float_int32 __STDIO_LOADED syn keyword xsMacro __attribute__deprecated__ __attribute__format__ syn keyword xsMacro __attribute__format__null_ok__ __attribute__malloc__ syn keyword xsMacro __attribute__nonnull__ __attribute__noreturn__ syn keyword xsMacro __attribute__pure__ __attribute__unused__ syn keyword xsMacro __attribute__warn_unused_result__ __filbuf __flsbuf syn keyword xsMacro __has_builtin __perlapi_h__ _config_h_ _exit _filbuf syn keyword xsMacro _flsbuf _generic_LC _generic_LC_base syn keyword xsMacro _generic_LC_func_utf8 _generic_LC_swash_utf8 syn keyword xsMacro _generic_LC_swash_uvchr _generic_LC_underscore syn keyword xsMacro _generic_LC_utf8 _generic_LC_uvchr _generic_func_utf8 syn keyword xsMacro _generic_isCC _generic_isCC_A _generic_swash_uni syn keyword xsMacro _generic_swash_utf8 _generic_toFOLD_LC syn keyword xsMacro _generic_toLOWER_LC _generic_toUPPER_LC _generic_uni syn keyword xsMacro _generic_utf8 _generic_utf8_no_upper_latin1 _isQMC syn keyword xsMacro _isQUOTEMETA _swab_16_ _swab_32_ _swab_64_ aTHXa aTHXo syn keyword xsMacro aTHXo_ aTHXx aTHXx_ abort accept access syn keyword xsMacro anchored_end_shift anchored_offset anchored_substr syn keyword xsMacro anchored_utf8 asctime assert assert_ assert_not_ROK syn keyword xsMacro assert_not_glob atoll av_tindex bcmp bind blk_eval syn keyword xsMacro blk_format blk_gimme blk_givwhen blk_loop blk_oldcop syn keyword xsMacro blk_oldmarksp blk_oldpm blk_oldscopesp blk_oldsp blk_sub syn keyword xsMacro blk_u16 bool boolSV cBINOP cBINOPo cBINOPx cBOOL cCOP syn keyword xsMacro cCOPo cCOPx cGVOP_gv cGVOPo_gv cGVOPx_gv cLISTOP cLISTOPo syn keyword xsMacro cLISTOPx cLOGOP cLOGOPo cLOGOPx cLOOP cLOOPo cLOOPx syn keyword xsMacro cMETHOPx cMETHOPx_meth cMETHOPx_rclass cPADOP cPADOPo syn keyword xsMacro cPADOPx cPMOP cPMOPo cPMOPx cPVOP cPVOPo cPVOPx cSVOP syn keyword xsMacro cSVOP_sv cSVOPo cSVOPo_sv cSVOPx cSVOPx_sv cSVOPx_svp syn keyword xsMacro cUNOP cUNOP_AUX cUNOP_AUXo cUNOP_AUXx cUNOPo cUNOPx chdir syn keyword xsMacro check_end_shift check_offset_max check_offset_min syn keyword xsMacro check_substr check_utf8 child_offset_bits chmod chsize syn keyword xsMacro ckDEAD ckWARN ckWARN2 ckWARN2_d ckWARN3 ckWARN3_d ckWARN4 syn keyword xsMacro ckWARN4_d ckWARN_d close closedir connect cop_hints_2hv syn keyword xsMacro cop_hints_fetch_pv cop_hints_fetch_pvn syn keyword xsMacro cop_hints_fetch_pvs cop_hints_fetch_sv cophh_2hv syn keyword xsMacro cophh_copy cophh_delete_pv cophh_delete_pvn syn keyword xsMacro cophh_delete_pvs cophh_delete_sv cophh_fetch_pv syn keyword xsMacro cophh_fetch_pvn cophh_fetch_pvs cophh_fetch_sv cophh_free syn keyword xsMacro cophh_new_empty cophh_store_pv cophh_store_pvn syn keyword xsMacro cophh_store_pvs cophh_store_sv crypt ctermid ctime syn keyword xsMacro cv_ckproto cx_type cxstack cxstack_ix cxstack_max syn keyword xsMacro dATARGET dAX dAXMARK dEXT dEXTCONST dITEMS dJMPENV dMARK syn keyword xsMacro dMULTICALL dMY_CXT dMY_CXT_INTERP dMY_CXT_SV dNOOP syn keyword xsMacro dORIGMARK dPOPPOPiirl dPOPPOPnnrl dPOPPOPssrl dPOPTOPiirl syn keyword xsMacro dPOPTOPiirl_nomg dPOPTOPiirl_ul_nomg dPOPTOPnnrl syn keyword xsMacro dPOPTOPnnrl_nomg dPOPTOPssrl dPOPXiirl dPOPXiirl_ul_nomg syn keyword xsMacro dPOPXnnrl dPOPXssrl dPOPiv dPOPnv dPOPnv_nomg dPOPss syn keyword xsMacro dPOPuv dSAVEDERRNO dSAVE_ERRNO dSP dSS_ADD dTARG dTARGET syn keyword xsMacro dTARGETSTACKED dTHR dTHX dTHXa dTHXo dTHXoa dTHXs dTHXx syn keyword xsMacro dTOPiv dTOPnv dTOPss dTOPuv dUNDERBAR dVAR dXSARGS syn keyword xsMacro dXSBOOTARGSAPIVERCHK dXSBOOTARGSNOVERCHK syn keyword xsMacro dXSBOOTARGSXSAPIVERCHK dXSFUNCTION dXSI32 dXSTARG syn keyword xsMacro dXSUB_SYS deprecate djSP do_open dup dup2 endgrent syn keyword xsMacro endhostent endnetent endprotoent endpwent endservent syn keyword xsMacro environ execl execv execvp fcntl fd_set fdopen fileno syn keyword xsMacro float_end_shift float_max_offset float_min_offset syn keyword xsMacro float_substr float_utf8 flock flockfile foldEQ_utf8 syn keyword xsMacro frewind fscanf fstat ftell ftruncate ftrylockfile syn keyword xsMacro funlockfile fwrite1 get_cvs getc_unlocked getegid geteuid syn keyword xsMacro getgid getgrent getgrgid getgrnam gethostbyaddr syn keyword xsMacro gethostbyname gethostent gethostname getlogin syn keyword xsMacro getnetbyaddr getnetbyname getnetent getpeername getpid syn keyword xsMacro getprotobyname getprotobynumber getprotoent getpwent syn keyword xsMacro getpwnam getpwuid getservbyname getservbyport getservent syn keyword xsMacro getsockname getsockopt getspnam gettimeofday getuid getw syn keyword xsMacro gv_AVadd gv_HVadd gv_IOadd gv_SVadd gv_autoload4 syn keyword xsMacro gv_efullname3 gv_fetchmeth gv_fetchmeth_autoload syn keyword xsMacro gv_fetchmethod gv_fetchmethod_flags gv_fetchpvn syn keyword xsMacro gv_fetchpvs gv_fetchsv_nomg gv_fullname3 gv_init syn keyword xsMacro gv_method_changed gv_stashpvs htoni htonl htons htovl syn keyword xsMacro htovs hv_delete hv_delete_ent hv_deletehek hv_exists syn keyword xsMacro hv_exists_ent hv_fetch hv_fetch_ent hv_fetchhek hv_fetchs syn keyword xsMacro hv_iternext hv_magic hv_store hv_store_ent hv_store_flags syn keyword xsMacro hv_storehek hv_stores hv_undef ibcmp ibcmp_locale syn keyword xsMacro ibcmp_utf8 inet_addr inet_ntoa init_os_extras ioctl syn keyword xsMacro isALNUM isALNUMC isALNUMC_A isALNUMC_L1 isALNUMC_LC syn keyword xsMacro isALNUMC_LC_utf8 isALNUMC_LC_uvchr isALNUMC_uni syn keyword xsMacro isALNUMC_utf8 isALNUMU isALNUM_LC isALNUM_LC_utf8 syn keyword xsMacro isALNUM_LC_uvchr isALNUM_lazy_if isALNUM_uni isALNUM_utf8 syn keyword xsMacro isALPHA isALPHANUMERIC isALPHANUMERIC_A isALPHANUMERIC_L1 syn keyword xsMacro isALPHANUMERIC_LC isALPHANUMERIC_LC_utf8 syn keyword xsMacro isALPHANUMERIC_LC_uvchr isALPHANUMERIC_uni syn keyword xsMacro isALPHANUMERIC_utf8 isALPHAU isALPHA_A isALPHA_FOLD_EQ syn keyword xsMacro isALPHA_FOLD_NE isALPHA_L1 isALPHA_LC isALPHA_LC_utf8 syn keyword xsMacro isALPHA_LC_uvchr isALPHA_uni isALPHA_utf8 isASCII syn keyword xsMacro isASCII_A isASCII_L1 isASCII_LC isASCII_LC_utf8 syn keyword xsMacro isASCII_LC_uvchr isASCII_uni isASCII_utf8 isBLANK syn keyword xsMacro isBLANK_A isBLANK_L1 isBLANK_LC isBLANK_LC_uni syn keyword xsMacro isBLANK_LC_utf8 isBLANK_LC_uvchr isBLANK_uni isBLANK_utf8 syn keyword xsMacro isCHARNAME_CONT isCNTRL isCNTRL_A isCNTRL_L1 isCNTRL_LC syn keyword xsMacro isCNTRL_LC_utf8 isCNTRL_LC_uvchr isCNTRL_uni isCNTRL_utf8 syn keyword xsMacro isDIGIT isDIGIT_A isDIGIT_L1 isDIGIT_LC isDIGIT_LC_utf8 syn keyword xsMacro isDIGIT_LC_uvchr isDIGIT_uni isDIGIT_utf8 isGRAPH syn keyword xsMacro isGRAPH_A isGRAPH_L1 isGRAPH_LC isGRAPH_LC_utf8 syn keyword xsMacro isGRAPH_LC_uvchr isGRAPH_uni isGRAPH_utf8 isGV syn keyword xsMacro isGV_with_GP isGV_with_GP_off isGV_with_GP_on isIDCONT syn keyword xsMacro isIDCONT_A isIDCONT_L1 isIDCONT_LC isIDCONT_LC_utf8 syn keyword xsMacro isIDCONT_LC_uvchr isIDCONT_uni isIDCONT_utf8 isIDFIRST syn keyword xsMacro isIDFIRST_A isIDFIRST_L1 isIDFIRST_LC isIDFIRST_LC_utf8 syn keyword xsMacro isIDFIRST_LC_uvchr isIDFIRST_lazy_if isIDFIRST_uni syn keyword xsMacro isIDFIRST_utf8 isLEXWARN_off isLEXWARN_on isLOWER syn keyword xsMacro isLOWER_A isLOWER_L1 isLOWER_LC isLOWER_LC_utf8 syn keyword xsMacro isLOWER_LC_uvchr isLOWER_uni isLOWER_utf8 isOCTAL syn keyword xsMacro isOCTAL_A isOCTAL_L1 isPRINT isPRINT_A isPRINT_L1 syn keyword xsMacro isPRINT_LC isPRINT_LC_utf8 isPRINT_LC_uvchr isPRINT_uni syn keyword xsMacro isPRINT_utf8 isPSXSPC isPSXSPC_A isPSXSPC_L1 isPSXSPC_LC syn keyword xsMacro isPSXSPC_LC_utf8 isPSXSPC_LC_uvchr isPSXSPC_uni syn keyword xsMacro isPSXSPC_utf8 isPUNCT isPUNCT_A isPUNCT_L1 isPUNCT_LC syn keyword xsMacro isPUNCT_LC_utf8 isPUNCT_LC_uvchr isPUNCT_uni isPUNCT_utf8 syn keyword xsMacro isREGEXP isSPACE isSPACE_A isSPACE_L1 isSPACE_LC syn keyword xsMacro isSPACE_LC_utf8 isSPACE_LC_uvchr isSPACE_uni isSPACE_utf8 syn keyword xsMacro isUPPER isUPPER_A isUPPER_L1 isUPPER_LC isUPPER_LC_utf8 syn keyword xsMacro isUPPER_LC_uvchr isUPPER_uni isUPPER_utf8 isUTF8_CHAR syn keyword xsMacro isVERTWS_uni isVERTWS_utf8 isWARN_ONCE isWARN_on syn keyword xsMacro isWARNf_on isWORDCHAR isWORDCHAR_A isWORDCHAR_L1 syn keyword xsMacro isWORDCHAR_LC isWORDCHAR_LC_utf8 isWORDCHAR_LC_uvchr syn keyword xsMacro isWORDCHAR_lazy_if isWORDCHAR_uni isWORDCHAR_utf8 syn keyword xsMacro isXDIGIT isXDIGIT_A isXDIGIT_L1 isXDIGIT_LC syn keyword xsMacro isXDIGIT_LC_utf8 isXDIGIT_LC_uvchr isXDIGIT_uni syn keyword xsMacro isXDIGIT_utf8 is_ANYOF_SYNTHETIC is_FOLDS_TO_MULTI_utf8 syn keyword xsMacro is_HORIZWS_cp_high is_HORIZWS_high is_LAX_VERSION syn keyword xsMacro is_LNBREAK_latin1_safe is_LNBREAK_safe syn keyword xsMacro is_LNBREAK_utf8_safe is_MULTI_CHAR_FOLD_latin1_safe syn keyword xsMacro is_MULTI_CHAR_FOLD_utf8_safe syn keyword xsMacro is_MULTI_CHAR_FOLD_utf8_safe_part0 syn keyword xsMacro is_MULTI_CHAR_FOLD_utf8_safe_part1 is_NONCHAR_utf8 syn keyword xsMacro is_PATWS_cp is_PATWS_safe syn keyword xsMacro is_PROBLEMATIC_LOCALE_FOLDEDS_START_cp syn keyword xsMacro is_PROBLEMATIC_LOCALE_FOLDEDS_START_utf8 syn keyword xsMacro is_PROBLEMATIC_LOCALE_FOLD_cp syn keyword xsMacro is_PROBLEMATIC_LOCALE_FOLD_utf8 is_QUOTEMETA_high syn keyword xsMacro is_QUOTEMETA_high_part0 is_QUOTEMETA_high_part1 syn keyword xsMacro is_REPLACEMENT_utf8_safe is_STRICT_VERSION syn keyword xsMacro is_SURROGATE_utf8 is_UTF8_CHAR_utf8_no_length_checks syn keyword xsMacro is_VERTWS_cp_high is_VERTWS_high is_XDIGIT_cp_high syn keyword xsMacro is_XDIGIT_high is_XPERLSPACE_cp_high is_XPERLSPACE_high syn keyword xsMacro is_ascii_string is_utf8_char_buf is_utf8_string_loc syn keyword xsMacro isatty isnormal kBINOP kCOP kGVOP_gv kLISTOP kLOGOP kLOOP syn keyword xsMacro kPADOP kPMOP kPVOP kSVOP kSVOP_sv kUNOP kUNOP_AUX kill syn keyword xsMacro killpg lex_stuff_pvs link listen lockf longjmp lseek syn keyword xsMacro lstat mPUSHi mPUSHn mPUSHp mPUSHs mPUSHu mXPUSHi mXPUSHn syn keyword xsMacro mXPUSHp mXPUSHs mXPUSHu memEQ memEQs memNE memNEs memchr syn keyword xsMacro memcmp memzero mkdir mktemp my my_binmode my_lstat syn keyword xsMacro my_setlocale my_snprintf my_sprintf my_stat my_strlcat syn keyword xsMacro my_strlcpy my_vsnprintf newATTRSUB newAV newGVgen newHV syn keyword xsMacro newIO newRV_inc newSUB newSVpadname newSVpvn_utf8 syn keyword xsMacro newSVpvs newSVpvs_flags newSVpvs_share newXSproto ntohi syn keyword xsMacro ntohl ntohs opASSIGN op_lvalue open opendir pTHX_1 syn keyword xsMacro pTHX_12 pTHX_2 pTHX_3 pTHX_4 pTHX_5 pTHX_6 pTHX_7 pTHX_8 syn keyword xsMacro pTHX_9 pTHX_FORMAT pTHX_VALUE pTHX_VALUE_ pTHX__FORMAT syn keyword xsMacro pTHX__VALUE pTHX__VALUE_ pTHXo pTHXo_ pTHXx pTHXx_ pVAR syn keyword xsMacro pWARN_ALL pWARN_NONE pWARN_STD packWARN packWARN2 syn keyword xsMacro packWARN3 packWARN4 pad_add_name_pvs pad_findmy_pvs syn keyword xsMacro pad_peg padadd_NO_DUP_CHECK padadd_OUR padadd_STALEOK syn keyword xsMacro padadd_STATE padnew_CLONE padnew_SAVE padnew_SAVESUB syn keyword xsMacro panic_write2 pause pclose pipe popen prepare_SV_for_RV syn keyword xsMacro pthread_attr_init pthread_condattr_default pthread_create syn keyword xsMacro pthread_key_create pthread_keycreate syn keyword xsMacro pthread_mutexattr_default pthread_mutexattr_init syn keyword xsMacro pthread_mutexattr_settype putc_unlocked putenv putw read syn keyword xsMacro readdir readdir64 recv recvfrom ref syn keyword xsMacro refcounted_he_fetch_pvs refcounted_he_new_pvs rename syn keyword xsMacro rewinddir rmdir safecalloc safefree safemalloc syn keyword xsMacro saferealloc save_aelem save_freeop save_freepv syn keyword xsMacro save_freesv save_helem save_mortalizesv save_op savepvs syn keyword xsMacro savesharedpvs sb_dstr sb_iters sb_m sb_maxiters syn keyword xsMacro sb_oldsave sb_orig sb_rflags sb_rx sb_rxres sb_rxtainted syn keyword xsMacro sb_s sb_strend sb_targ seedDrand01 seekdir select send syn keyword xsMacro sendto set_ANYOF_SYNTHETIC setbuf setgid setgrent syn keyword xsMacro sethostent setjmp setlinebuf setlocale setmode setnetent syn keyword xsMacro setprotoent setpwent setregid setreuid setservent syn keyword xsMacro setsockopt setuid setvbuf share_hek_hek sharepvn shutdown syn keyword xsMacro signal sleep socket socketpair specialWARN stat stdoutf syn keyword xsMacro strEQ strGE strGT strLE strLT strNE strchr strerror syn keyword xsMacro strnEQ strnNE strrchr strtoll strtoull sv_2bool syn keyword xsMacro sv_2bool_nomg sv_2iv sv_2nv sv_2pv sv_2pv_nolen syn keyword xsMacro sv_2pv_nomg sv_2pvbyte_nolen sv_2pvutf8_nolen sv_2uv syn keyword xsMacro sv_cathek sv_catpv_nomg sv_catpvn sv_catpvn_mg syn keyword xsMacro sv_catpvn_nomg sv_catpvn_nomg_maybeutf8 syn keyword xsMacro sv_catpvn_nomg_utf8_upgrade sv_catpvs sv_catpvs_flags syn keyword xsMacro sv_catpvs_mg sv_catpvs_nomg sv_catsv sv_catsv_mg syn keyword xsMacro sv_catsv_nomg sv_catxmlpvs sv_cmp sv_cmp_locale syn keyword xsMacro sv_collxfrm sv_copypv_nomg sv_eq sv_force_normal syn keyword xsMacro sv_insert sv_mortalcopy sv_nolocking sv_nounlocking syn keyword xsMacro sv_or_pv_len_utf8 sv_pv sv_pvbyte sv_pvn_force syn keyword xsMacro sv_pvn_force_nomg sv_pvutf8 sv_setgid sv_setpvs syn keyword xsMacro sv_setpvs_mg sv_setref_pvs sv_setsv sv_setsv_nomg syn keyword xsMacro sv_setuid sv_taint sv_unref sv_usepvn sv_usepvn_mg syn keyword xsMacro sv_utf8_upgrade sv_utf8_upgrade_flags syn keyword xsMacro sv_utf8_upgrade_nomg tTHX telldir times tmpfile tmpnam syn keyword xsMacro toCTRL toFOLD toFOLD_A toFOLD_LC toFOLD_uni toFOLD_utf8 syn keyword xsMacro toLOWER toLOWER_A toLOWER_L1 toLOWER_LATIN1 toLOWER_LC syn keyword xsMacro toLOWER_uni toLOWER_utf8 toTITLE toTITLE_A toTITLE_uni syn keyword xsMacro toTITLE_utf8 toUPPER toUPPER_A toUPPER_LATIN1_MOD syn keyword xsMacro toUPPER_LC toUPPER_uni toUPPER_utf8 to_uni_fold syn keyword xsMacro to_utf8_fold to_utf8_lower to_utf8_title to_utf8_upper syn keyword xsMacro truncate tryAMAGICbin_MG tryAMAGICunDEREF syn keyword xsMacro tryAMAGICunTARGETlist tryAMAGICun_MG ttyname umask uname syn keyword xsMacro unlink unpackWARN1 unpackWARN2 unpackWARN3 unpackWARN4 syn keyword xsMacro utf8_to_uvchr_buf utime uvchr_to_utf8 uvchr_to_utf8_flags syn keyword xsMacro vTHX vfprintf vtohl vtohs wait want_vtbl_bm want_vtbl_fm syn keyword xsMacro whichsig write xio_any xio_dirp xiv_iv xlv_targoff syn keyword xsMacro xpv_len xuv_uv yystype " Define the default highlighting. hi def link xsPrivate Error hi def link xsSuperseded Error hi def link xsType Type hi def link xsString String hi def link xsConstant Constant hi def link xsException Exception hi def link xsKeyword Keyword hi def link xsFunction Function hi def link xsVariable Identifier hi def link xsMacro Macro let b:current_syntax = "xs" " vim: ts=8 neovim-0.2.2/runtime/syntax/xsd.vim000066400000000000000000000041151320401574200173330ustar00rootroot00000000000000" Vim syntax file " Language: XSD (XML Schema) " Maintainer: Johannes Zellner " Last Change: Tue, 27 Apr 2004 14:54:59 CEST " Filenames: *.xsd " $Id: xsd.vim,v 1.1 2004/06/13 18:20:48 vimboss Exp $ " REFERENCES: " [1] http://www.w3.org/TR/xmlschema-0 " " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif runtime syntax/xml.vim syn cluster xmlTagHook add=xsdElement syn case match syn match xsdElement '\%(xsd:\)\@<=all' syn match xsdElement '\%(xsd:\)\@<=annotation' syn match xsdElement '\%(xsd:\)\@<=any' syn match xsdElement '\%(xsd:\)\@<=anyAttribute' syn match xsdElement '\%(xsd:\)\@<=appInfo' syn match xsdElement '\%(xsd:\)\@<=attribute' syn match xsdElement '\%(xsd:\)\@<=attributeGroup' syn match xsdElement '\%(xsd:\)\@<=choice' syn match xsdElement '\%(xsd:\)\@<=complexContent' syn match xsdElement '\%(xsd:\)\@<=complexType' syn match xsdElement '\%(xsd:\)\@<=documentation' syn match xsdElement '\%(xsd:\)\@<=element' syn match xsdElement '\%(xsd:\)\@<=enumeration' syn match xsdElement '\%(xsd:\)\@<=extension' syn match xsdElement '\%(xsd:\)\@<=field' syn match xsdElement '\%(xsd:\)\@<=group' syn match xsdElement '\%(xsd:\)\@<=import' syn match xsdElement '\%(xsd:\)\@<=include' syn match xsdElement '\%(xsd:\)\@<=key' syn match xsdElement '\%(xsd:\)\@<=keyref' syn match xsdElement '\%(xsd:\)\@<=length' syn match xsdElement '\%(xsd:\)\@<=list' syn match xsdElement '\%(xsd:\)\@<=maxInclusive' syn match xsdElement '\%(xsd:\)\@<=maxLength' syn match xsdElement '\%(xsd:\)\@<=minInclusive' syn match xsdElement '\%(xsd:\)\@<=minLength' syn match xsdElement '\%(xsd:\)\@<=pattern' syn match xsdElement '\%(xsd:\)\@<=redefine' syn match xsdElement '\%(xsd:\)\@<=restriction' syn match xsdElement '\%(xsd:\)\@<=schema' syn match xsdElement '\%(xsd:\)\@<=selector' syn match xsdElement '\%(xsd:\)\@<=sequence' syn match xsdElement '\%(xsd:\)\@<=simpleContent' syn match xsdElement '\%(xsd:\)\@<=simpleType' syn match xsdElement '\%(xsd:\)\@<=union' syn match xsdElement '\%(xsd:\)\@<=unique' hi def link xsdElement Statement " vim: ts=8 neovim-0.2.2/runtime/syntax/xslt.vim000066400000000000000000000041661320401574200175350ustar00rootroot00000000000000" Vim syntax file " Language: XSLT " Maintainer: Johannes Zellner " Last Change: Sun, 28 Oct 2001 21:22:24 +0100 " Filenames: *.xsl " $Id: xslt.vim,v 1.1 2004/06/13 15:52:10 vimboss Exp $ " REFERENCES: " [1] http://www.w3.org/TR/xslt " " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif runtime syntax/xml.vim syn cluster xmlTagHook add=xslElement syn case match syn match xslElement '\%(xsl:\)\@<=apply-imports' syn match xslElement '\%(xsl:\)\@<=apply-templates' syn match xslElement '\%(xsl:\)\@<=attribute' syn match xslElement '\%(xsl:\)\@<=attribute-set' syn match xslElement '\%(xsl:\)\@<=call-template' syn match xslElement '\%(xsl:\)\@<=choose' syn match xslElement '\%(xsl:\)\@<=comment' syn match xslElement '\%(xsl:\)\@<=copy' syn match xslElement '\%(xsl:\)\@<=copy-of' syn match xslElement '\%(xsl:\)\@<=decimal-format' syn match xslElement '\%(xsl:\)\@<=document' syn match xslElement '\%(xsl:\)\@<=element' syn match xslElement '\%(xsl:\)\@<=fallback' syn match xslElement '\%(xsl:\)\@<=for-each' syn match xslElement '\%(xsl:\)\@<=if' syn match xslElement '\%(xsl:\)\@<=include' syn match xslElement '\%(xsl:\)\@<=import' syn match xslElement '\%(xsl:\)\@<=key' syn match xslElement '\%(xsl:\)\@<=message' syn match xslElement '\%(xsl:\)\@<=namespace-alias' syn match xslElement '\%(xsl:\)\@<=number' syn match xslElement '\%(xsl:\)\@<=otherwise' syn match xslElement '\%(xsl:\)\@<=output' syn match xslElement '\%(xsl:\)\@<=param' syn match xslElement '\%(xsl:\)\@<=processing-instruction' syn match xslElement '\%(xsl:\)\@<=preserve-space' syn match xslElement '\%(xsl:\)\@<=script' syn match xslElement '\%(xsl:\)\@<=sort' syn match xslElement '\%(xsl:\)\@<=strip-space' syn match xslElement '\%(xsl:\)\@<=stylesheet' syn match xslElement '\%(xsl:\)\@<=template' syn match xslElement '\%(xsl:\)\@<=transform' syn match xslElement '\%(xsl:\)\@<=text' syn match xslElement '\%(xsl:\)\@<=value-of' syn match xslElement '\%(xsl:\)\@<=variable' syn match xslElement '\%(xsl:\)\@<=when' syn match xslElement '\%(xsl:\)\@<=with-param' hi def link xslElement Statement " vim: ts=8 neovim-0.2.2/runtime/syntax/xxd.vim000066400000000000000000000013761320401574200173460ustar00rootroot00000000000000" Vim syntax file " Language: bin using xxd " Maintainer: Charles E. Campbell " Last Change: Aug 31, 2016 " Version: 10 " Notes: use :help xxd to see how to invoke it " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XXD " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match xxdAddress "^[0-9a-f]\+:" contains=xxdSep syn match xxdSep contained ":" syn match xxdAscii " .\{,16\}\r\=$"hs=s+2 contains=xxdDot syn match xxdDot contained "[.\r]" " Define the default highlighting. if !exists("skip_xxd_syntax_inits") hi def link xxdAddress Constant hi def link xxdSep Identifier hi def link xxdAscii Statement endif let b:current_syntax = "xxd" " vim: ts=4 neovim-0.2.2/runtime/syntax/yacc.vim000066400000000000000000000125751320401574200174650ustar00rootroot00000000000000" Vim syntax file " Language: Yacc " Maintainer: Charles E. Campbell " Last Change: Aug 31, 2016 " Version: 15 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_YACC " " Options: {{{1 " g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C " --------------------------------------------------------------------- " this version of syntax/yacc.vim requires 6.0 or later if exists("b:current_syntax") syntax clear endif " --------------------------------------------------------------------- " Folding Support {{{1 if has("folding") com! -nargs=+ SynFold fold else com! -nargs=+ SynFold endif " --------------------------------------------------------------------- " Read the C syntax to start with {{{1 " Read the C/C++ syntax to start with let s:Cpath= fnameescape(expand(":p:h").(exists("g:yacc_uses_cpp")? "/cpp.vim" : "/c.vim")) if !filereadable(s:Cpath) for s:Cpath in split(globpath(&rtp,(exists("g:yacc_uses_cpp")? "syntax/cpp.vim" : "syntax/c.vim")),"\n") if filereadable(fnameescape(s:Cpath)) let s:Cpath= fnameescape(s:Cpath) break endif endfor endif exe "syn include @yaccCode ".s:Cpath " --------------------------------------------------------------------- " Yacc Clusters: {{{1 syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam,yaccParseOption syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString " --------------------------------------------------------------------- " Yacc Sections: {{{1 SynFold syn region yaccInit start='.'ms=s-1,rs=s-1 matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=@yaccInitCluster nextgroup=yaccRules skipwhite skipempty contained SynFold syn region yaccInit2 start='\%^.'ms=s-1,rs=s-1 matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=@yaccInitCluster nextgroup=yaccRules skipwhite skipempty SynFold syn region yaccHeader2 matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty contained SynFold syn region yaccHeader matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty SynFold syn region yaccRules matchgroup=yaccSectionSep start='^%%$' end='^%%$'me=e-2,re=e-2 contains=@yaccRulesCluster nextgroup=yaccEndCode skipwhite skipempty contained SynFold syn region yaccEndCode matchgroup=yaccSectionSep start='^%%$' end='\%$' contains=@yaccCode contained " --------------------------------------------------------------------- " Yacc Commands: {{{1 syn match yaccDefines '^%define\s\+.*$' syn match yaccParseParam '%\(parse\|lex\)-param\>' skipwhite nextgroup=yaccParseParamStr syn match yaccParseOption '%\%(api\.pure\|pure-parser\|locations\|error-verbose\)\>' syn region yaccParseParamStr contained matchgroup=Delimiter start='{' end='}' contains=cStructure syn match yaccDelim "[:|]" contained syn match yaccOper "@\d\+" contained syn match yaccKey "^\s*%\(token\|type\|left\|right\|start\|ident\|nonassoc\)\>" contained syn match yaccKey "\s%\(prec\|expect\)\>" contained syn match yaccKey "\$\(<[a-zA-Z_][a-zA-Z_0-9]*>\)\=[\$0-9]\+" contained syn keyword yaccKeyActn yyerrok yyclearin contained syn match yaccUnionStart "^%union" skipwhite skipnl nextgroup=yaccUnion contained SynFold syn region yaccUnion matchgroup=yaccCurly start="{" matchgroup=yaccCurly end="}" contains=@yaccCode contained syn match yaccBrkt "[<>]" contained syn match yaccType "<[a-zA-Z_][a-zA-Z0-9_]*>" contains=yaccBrkt contained SynFold syn region yaccNonterminal start="^\s*\a\w*\ze\_s*\(/\*\_.\{-}\*/\)\=\_s*:" matchgroup=yaccDelim end=";" matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=yaccAction,yaccDelim,yaccString,yaccComment contained syn region yaccComment start="/\*" end="\*/" syn match yaccString "'[^']*'" contained " --------------------------------------------------------------------- " I'd really like to highlight just the outer {}. Any suggestions??? {{{1 syn match yaccCurlyError "[{}]" SynFold syn region yaccAction matchgroup=yaccCurly start="{" end="}" contains=@yaccCode,yaccVar contained syn match yaccVar '\$\d\+\|\$\$\|\$<\I\i*>\$\|\$<\I\i*>\d\+' containedin=cParen,cPreProc,cMulti contained " --------------------------------------------------------------------- " Yacc synchronization: {{{1 syn sync fromstart " --------------------------------------------------------------------- " Define the default highlighting. {{{1 if !exists("skip_yacc_syn_inits") hi def link yaccBrkt yaccStmt hi def link yaccComment Comment hi def link yaccCurly Delimiter hi def link yaccCurlyError Error hi def link yaccDefines cDefine hi def link yaccDelim Delimiter hi def link yaccKeyActn Special hi def link yaccKey yaccStmt hi def link yaccNonterminal Function hi def link yaccOper yaccStmt hi def link yaccParseOption cDefine hi def link yaccParseParam yaccParseOption hi def link yaccSectionSep Todo hi def link yaccSep Delimiter hi def link yaccStmt Statement hi def link yaccString String hi def link yaccType Type hi def link yaccUnionStart yaccKey hi def link yaccVar Special endif " --------------------------------------------------------------------- " Cleanup: {{{1 delcommand SynFold let b:current_syntax = "yacc" " --------------------------------------------------------------------- " Modelines: {{{1 " vim: ts=15 fdm=marker neovim-0.2.2/runtime/syntax/yaml.vim000066400000000000000000000311001320401574200174710ustar00rootroot00000000000000" Vim syntax file " Language: YAML (YAML Ain't Markup Language) 1.2 " Maintainer: Nikolai Pavlov " First author: Nikolai Weibull " Latest Revision: 2015-03-28 if exists('b:current_syntax') finish endif let s:cpo_save = &cpo set cpo&vim " Choose the schema to use " TODO: Validate schema if !exists('b:yaml_schema') if exists('g:yaml_schema') let b:yaml_schema = g:yaml_schema else let b:yaml_schema = 'core' endif endif let s:ns_char = '\%([\n\r\uFEFF \t]\@!\p\)' let s:ns_word_char = '[[:alnum:]_\-]' let s:ns_uri_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$,.!~*''()[\]]\)' let s:ns_tag_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$.~*''()]\)' let s:c_ns_anchor_char = '\%([\n\r\uFEFF \t,[\]{}]\@!\p\)' let s:c_indicator = '[\-?:,[\]{}#&*!|>''"%@`]' let s:c_flow_indicator = '[,[\]{}]' let s:ns_char_without_c_indicator = substitute(s:ns_char, '\v\C[\zs', '\=s:c_indicator[1:-2]', '') let s:_collection = '[^\@!\(\%(\\\.\|\[^\\\]]\)\+\)]' let s:_neg_collection = '[^\(\%(\\\.\|\[^\\\]]\)\+\)]' function s:SimplifyToAssumeAllPrintable(p) return substitute(a:p, '\V\C\\%('.s:_collection.'\\@!\\p\\)', '[^\1]', '') endfunction let s:ns_char = s:SimplifyToAssumeAllPrintable(s:ns_char) let s:ns_char_without_c_indicator = s:SimplifyToAssumeAllPrintable(s:ns_char_without_c_indicator) let s:c_ns_anchor_char = s:SimplifyToAssumeAllPrintable(s:c_ns_anchor_char) function s:SimplifyAdjacentCollections(p) return substitute(a:p, '\V\C'.s:_collection.'\\|'.s:_collection, '[\1\2]', 'g') endfunction let s:ns_uri_char = s:SimplifyAdjacentCollections(s:ns_uri_char) let s:ns_tag_char = s:SimplifyAdjacentCollections(s:ns_tag_char) let s:c_verbatim_tag = '!<'.s:ns_uri_char.'\+>' let s:c_named_tag_handle = '!'.s:ns_word_char.'\+!' let s:c_secondary_tag_handle = '!!' let s:c_primary_tag_handle = '!' let s:c_tag_handle = '\%('.s:c_named_tag_handle. \ '\|'.s:c_secondary_tag_handle. \ '\|'.s:c_primary_tag_handle.'\)' let s:c_ns_shorthand_tag = s:c_tag_handle . s:ns_tag_char.'\+' let s:c_non_specific_tag = '!' let s:c_ns_tag_property = s:c_verbatim_tag. \ '\|'.s:c_ns_shorthand_tag. \ '\|'.s:c_non_specific_tag let s:c_ns_anchor_name = s:c_ns_anchor_char.'\+' let s:c_ns_anchor_property = '&'.s:c_ns_anchor_name let s:c_ns_alias_node = '\*'.s:c_ns_anchor_name let s:ns_directive_name = s:ns_char.'\+' let s:ns_local_tag_prefix = '!'.s:ns_uri_char.'*' let s:ns_global_tag_prefix = s:ns_tag_char.s:ns_uri_char.'*' let s:ns_tag_prefix = s:ns_local_tag_prefix. \ '\|'.s:ns_global_tag_prefix let s:ns_plain_safe_out = s:ns_char let s:ns_plain_safe_in = '\%('.s:c_flow_indicator.'\@!'.s:ns_char.'\)' let s:ns_plain_safe_in = substitute(s:ns_plain_safe_in, '\V\C\\%('.s:_collection.'\\@!'.s:_neg_collection.'\\)', '[^\1\2]', '') let s:ns_plain_safe_in_without_colhash = substitute(s:ns_plain_safe_in, '\V\C'.s:_neg_collection, '[^\1:#]', '') let s:ns_plain_safe_out_without_colhash = substitute(s:ns_plain_safe_out, '\V\C'.s:_neg_collection, '[^\1:#]', '') let s:ns_plain_first_in = '\%('.s:ns_char_without_c_indicator.'\|[?:\-]\%('.s:ns_plain_safe_in.'\)\@=\)' let s:ns_plain_first_out = '\%('.s:ns_char_without_c_indicator.'\|[?:\-]\%('.s:ns_plain_safe_out.'\)\@=\)' let s:ns_plain_char_in = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_in.'\|'.s:ns_plain_safe_in_without_colhash.'\)' let s:ns_plain_char_out = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_out.'\|'.s:ns_plain_safe_out_without_colhash.'\)' let s:ns_plain_out = s:ns_plain_first_out . s:ns_plain_char_out.'*' let s:ns_plain_in = s:ns_plain_first_in . s:ns_plain_char_in.'*' syn keyword yamlTodo contained TODO FIXME XXX NOTE syn region yamlComment display oneline start='\%\(^\|\s\)#' end='$' \ contains=yamlTodo execute 'syn region yamlDirective oneline start='.string('^\ze%'.s:ns_directive_name.'\s\+').' '. \ 'end="$" '. \ 'contains=yamlTAGDirective,'. \ 'yamlYAMLDirective,'. \ 'yamlReservedDirective '. \ 'keepend' syn match yamlTAGDirective '%TAG\s\+' contained nextgroup=yamlTagHandle execute 'syn match yamlTagHandle contained nextgroup=yamlTagPrefix '.string(s:c_tag_handle.'\s\+') execute 'syn match yamlTagPrefix contained nextgroup=yamlComment ' . string(s:ns_tag_prefix) syn match yamlYAMLDirective '%YAML\s\+' contained nextgroup=yamlYAMLVersion syn match yamlYAMLVersion '\d\+\.\d\+' contained nextgroup=yamlComment execute 'syn match yamlReservedDirective contained nextgroup=yamlComment '. \string('%\%(\%(TAG\|YAML\)\s\)\@!'.s:ns_directive_name) syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start='"' skip='\\"' end='"' \ contains=yamlEscape \ nextgroup=yamlKeyValueDelimiter syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start="'" skip="''" end="'" \ contains=yamlSingleEscape \ nextgroup=yamlKeyValueDelimiter syn match yamlEscape contained '\\\%([\\"abefnrtv\^0_ NLP\n]\|x\x\x\|u\x\{4}\|U\x\{8}\)' syn match yamlSingleEscape contained "''" syn match yamlBlockScalarHeader contained '\s\+\zs[|>]\%([+-]\=[1-9]\|[1-9]\=[+-]\)\=' syn cluster yamlConstant contains=yamlBool,yamlNull syn cluster yamlFlow contains=yamlFlowString,yamlFlowMapping,yamlFlowCollection syn cluster yamlFlow add=yamlFlowMappingKey,yamlFlowMappingMerge syn cluster yamlFlow add=@yamlConstant,yamlPlainScalar,yamlFloat syn cluster yamlFlow add=yamlTimestamp,yamlInteger,yamlMappingKeyStart syn cluster yamlFlow add=yamlComment syn region yamlFlowMapping matchgroup=yamlFlowIndicator start='{' end='}' contains=@yamlFlow syn region yamlFlowCollection matchgroup=yamlFlowIndicator start='\[' end='\]' contains=@yamlFlow execute 'syn match yamlPlainScalar /'.s:ns_plain_out.'/' execute 'syn match yamlPlainScalar contained /'.s:ns_plain_in.'/' syn match yamlMappingKeyStart '?\ze\s' syn match yamlMappingKeyStart '?' contained execute 'syn match yamlFlowMappingKey /\%#=1'.s:ns_plain_in.'\%(\s\+'.s:ns_plain_in.'\)*\ze\s*:/ contained '. \'nextgroup=yamlKeyValueDelimiter' syn match yamlFlowMappingMerge /<<\ze\s*:/ contained nextgroup=yamlKeyValueDelimiter syn match yamlBlockCollectionItemStart '^\s*\zs-\%(\s\+-\)*\s' nextgroup=yamlBlockMappingKey,yamlBlockMappingMerge " Use the old regexp engine, the NFA engine doesn't like all the \@ items. execute 'syn match yamlBlockMappingKey /\%#=1^\s*\zs'.s:ns_plain_out.'\%(\s\+'.s:ns_plain_out.'\)*\ze\s*:\%(\s\|$\)/ '. \'nextgroup=yamlKeyValueDelimiter' execute 'syn match yamlBlockMappingKey /\%#=1\s*\zs'.s:ns_plain_out.'\%(\s\+'.s:ns_plain_out.'\)*\ze\s*:\%(\s\|$\)/ contained '. \'nextgroup=yamlKeyValueDelimiter' syn match yamlBlockMappingMerge /^\s*\zs<<\ze:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter syn match yamlBlockMappingMerge /<<\ze\s*:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter contained syn match yamlKeyValueDelimiter /\s*:/ contained syn match yamlKeyValueDelimiter /\s*:/ contained syn cluster yamlScalarWithSpecials contains=yamlPlainScalar,yamlBlockMappingKey,yamlFlowMappingKey let s:_bounder = s:SimplifyToAssumeAllPrintable('\%([[\]{}, \t]\@!\p\)') if b:yaml_schema is# 'json' syn keyword yamlNull null contained containedin=@yamlScalarWithSpecials syn keyword yamlBool true false exe 'syn match yamlInteger /'.s:_bounder.'\@1 " Last Change: 2003 May 11 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn case ignore " Common Z80 Assembly instructions syn keyword z8aInstruction adc add and bit ccf cp cpd cpdr cpi cpir cpl syn keyword z8aInstruction daa di djnz ei exx halt im in syn keyword z8aInstruction ind ini indr inir jp jr ld ldd lddr ldi ldir syn keyword z8aInstruction neg nop or otdr otir out outd outi syn keyword z8aInstruction res rl rla rlc rlca rld syn keyword z8aInstruction rr rra rrc rrca rrd sbc scf set sla sra syn keyword z8aInstruction srl sub xor " syn keyword z8aInstruction push pop call ret reti retn inc dec ex rst " Any other stuff syn match z8aIdentifier "[a-z_][a-z0-9_]*" " Instructions changing stack syn keyword z8aSpecInst push pop call ret reti retn rst syn match z8aInstruction "\" syn match z8aInstruction "\" syn match z8aInstruction "\" syn match z8aSpecInst "\"me=s+3 syn match z8aSpecInst "\"me=s+3 syn match z8aSpecInst "\"me=s+2 "Labels syn match z8aLabel "[a-z_][a-z0-9_]*:" syn match z8aSpecialLabel "[a-z_][a-z0-9_]*::" " PreProcessor commands syn match z8aPreProc "\.org" syn match z8aPreProc "\.globl" syn match z8aPreProc "\.db" syn match z8aPreProc "\.dw" syn match z8aPreProc "\.ds" syn match z8aPreProc "\.byte" syn match z8aPreProc "\.word" syn match z8aPreProc "\.blkb" syn match z8aPreProc "\.blkw" syn match z8aPreProc "\.ascii" syn match z8aPreProc "\.asciz" syn match z8aPreProc "\.module" syn match z8aPreProc "\.title" syn match z8aPreProc "\.sbttl" syn match z8aPreProc "\.even" syn match z8aPreProc "\.odd" syn match z8aPreProc "\.area" syn match z8aPreProc "\.page" syn match z8aPreProc "\.setdp" syn match z8aPreProc "\.radix" syn match z8aInclude "\.include" syn match z8aPreCondit "\.if" syn match z8aPreCondit "\.else" syn match z8aPreCondit "\.endif" " Common strings syn match z8aString "\".*\"" syn match z8aString "\'.*\'" " Numbers syn match z8aNumber "[0-9]\+" syn match z8aNumber "0[xXhH][0-9a-fA-F]\+" syn match z8aNumber "0[bB][0-1]*" syn match z8aNumber "0[oO\@qQ][0-7]\+" syn match z8aNumber "0[dD][0-9]\+" " Character constant syn match z8aString "\#\'."hs=s+1 " Comments syn match z8aComment ";.*" syn case match " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link z8aSection Special hi def link z8aLabel Label hi def link z8aSpecialLabel Label hi def link z8aComment Comment hi def link z8aInstruction Statement hi def link z8aSpecInst Statement hi def link z8aInclude Include hi def link z8aPreCondit PreCondit hi def link z8aPreProc PreProc hi def link z8aNumber Number hi def link z8aString String let b:current_syntax = "z8a" " vim: ts=8 neovim-0.2.2/runtime/syntax/zimbu.vim000066400000000000000000000144561320401574200176740ustar00rootroot00000000000000" Vim syntax file " Language: Zimbu " Maintainer: Bram Moolenaar " Last Change: 2014 Nov 23 if exists("b:current_syntax") finish endif syn include @Ccode syntax/c.vim syn keyword zimbuTodo TODO FIXME XXX contained syn match zimbuNoBar "|" contained syn match zimbuParam "|[^| ]\+|" contained contains=zimbuNoBar syn match zimbuNoBacktick "`" contained syn match zimbuCode "`[^`]\+`" contained contains=zimbuNoBacktick syn match zimbuComment "#.*$" contains=zimbuTodo,zimbuParam,zimbuCode,@Spell syn match zimbuComment "/\*.\{-}\*/" contains=zimbuTodo,zimbuParam,zimbuCode,@Spell syn match zimbuChar "'\\\=.'" syn keyword zimbuBasicType bool status syn keyword zimbuBasicType int1 int2 int3 int4 int5 int6 int7 syn keyword zimbuBasicType int9 int10 int11 int12 int13 int14 int15 syn keyword zimbuBasicType int int8 int16 int32 int64 bigInt syn keyword zimbuBasicType nat nat8 byte nat16 nat32 nat64 bigNat syn keyword zimbuBasicType nat1 nat2 nat3 nat4 nat5 nat6 nat7 syn keyword zimbuBasicType nat9 nat10 nat11 nat12 nat13 nat14 nat15 syn keyword zimbuBasicType float float32 float64 float80 float128 syn keyword zimbuBasicType fixed1 fixed2 fixed3 fixed4 fixed5 fixed6 syn keyword zimbuBasicType fixed7 fixed8 fixed9 fixed10 fixed11 fixed12 syn keyword zimbuBasicType fixed13 fixed14 fixed15 syn keyword zimbuCompType string varString syn keyword zimbuCompType byteString varByteString syn keyword zimbuCompType tuple array list dict dictList set callback syn keyword zimbuCompType sortedList multiDict multiDictList multiSet syn keyword zimbuCompType complex complex32 complex64 complex80 complex128 syn keyword zimbuCompType proc func def thread evalThread lock cond pipe syn keyword zimbuType VAR dyn type USE GET syn match zimbuType "IO.File" syn match zimbuType "IO.Stat" syn keyword zimbuStatement IF ELSE ELSEIF IFNIL WHILE REPEAT FOR IN TO STEP syn keyword zimbuStatement DO UNTIL SWITCH WITH syn keyword zimbuStatement TRY CATCH FINALLY syn keyword zimbuStatement GENERATE_IF GENERATE_ELSE GENERATE_ELSEIF syn keyword zimbuStatement GENERATE_ERROR syn keyword zimbuStatement BUILD_IF BUILD_ELSE BUILD_ELSEIF syn keyword zimbuStatement CASE DEFAULT FINAL ABSTRACT VIRTUAL DEFINE REPLACE syn keyword zimbuStatement IMPLEMENTS EXTENDS PARENT LOCAL syn keyword zimbuStatement PART ALIAS TYPE CONNECT WRAP syn keyword zimbuStatement BREAK CONTINUE PROCEED syn keyword zimbuStatement RETURN EXIT THROW DEFER syn keyword zimbuStatement IMPORT AS OPTIONS MAIN syn keyword zimbuStatement INTERFACE PIECE INCLUDE MODULE ENUM BITS syn keyword zimbuStatement SHARED STATIC syn keyword zimbuStatement LAMBDA syn match zimbuStatement "\<\(FUNC\|PROC\|DEF\)\>" syn match zimbuStatement "\" syn match zimbuStatement "}" syn match zimbuAttribute "@backtrace=no\>" syn match zimbuAttribute "@backtrace=yes\>" syn match zimbuAttribute "@abstract\>" syn match zimbuAttribute "@earlyInit\>" syn match zimbuAttribute "@default\>" syn match zimbuAttribute "@define\>" syn match zimbuAttribute "@replace\>" syn match zimbuAttribute "@final\>" syn match zimbuAttribute "@primitive\>" syn match zimbuAttribute "@notOnExit\>" syn match zimbuAttribute "@private\>" syn match zimbuAttribute "@protected\>" syn match zimbuAttribute "@public\>" syn match zimbuAttribute "@local\>" syn match zimbuAttribute "@file\>" syn match zimbuAttribute "@directory\>" syn match zimbuAttribute "@read=private\>" syn match zimbuAttribute "@read=protected\>" syn match zimbuAttribute "@read=public\>" syn match zimbuAttribute "@read=file\>" syn match zimbuAttribute "@read=directory\>" syn match zimbuAttribute "@items=private\>" syn match zimbuAttribute "@items=protected\>" syn match zimbuAttribute "@items=public\>" syn match zimbuAttribute "@items=file\>" syn match zimbuAttribute "@items=directory\>" syn keyword zimbuMethod NEW EQUAL COPY COMPARE SIZE GET SET INIT EARLYINIT syn keyword zimbuOperator IS ISNOT ISA ISNOTA syn keyword zimbuModule ARG CHECK E GC IO LOG PROTO SYS HTTP ZC ZWT T TIME THREAD syn match zimbuImport "\.\zsPROTO" syn match zimbuImport "\.\zsCHEADER" "syn match zimbuString +"\([^"\\]\|\\.\)*\("\|$\)+ contains=zimbuStringExpr syn region zimbuString start=+"+ skip=+[^"\\]\|\\.+ end=+"\|$+ contains=zimbuStringExpr syn match zimbuString +R"\([^"]\|""\)*\("\|$\)+ syn region zimbuLongString start=+''"+ end=+"''+ syn match zimbuStringExpr +\\([^)]*)+hs=s+2,he=e-1 contained contains=zimbuString,zimbuParenPairOuter syn region zimbuParenPairOuter start=+(+ms=s+1 end=+)+me=e-1 contained contains=zimbuString,zimbuParenPair syn region zimbuParenPair start=+(+ end=+)+ contained contains=zimbuString,zimbuParenPair syn keyword zimbuFixed TRUE FALSE NIL THIS THISTYPE FAIL OK syn keyword zimbuError NULL " trailing whitespace syn match zimbuSpaceError display excludenl "\S\s\+$"ms=s+1 " mixed tabs and spaces syn match zimbuSpaceError display " \+\t" syn match zimbuSpaceError display "\t\+ " syn match zimbuUses contained "\ " Previous Maintainer: Nikolai Weibull " Latest Revision: 2017-07-11 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-zsh if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim if v:version > 704 || (v:version == 704 && has("patch1142")) syn iskeyword @,48-57,_,192-255,#,- else setlocal iskeyword+=- endif if get(g:, 'zsh_fold_enable', 0) setlocal foldmethod=syntax endif syn keyword zshTodo contained TODO FIXME XXX NOTE syn region zshComment oneline start='\%(^\|\s\+\)#' end='$' \ contains=zshTodo,@Spell fold syn region zshComment start='^\s*#' end='^\%(\s*#\)\@!' \ contains=zshTodo,@Spell fold syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$' syn match zshQuoted '\\.' syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+ \ contains=zshQuoted,@zshDerefs,@zshSubst fold syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ fold " XXX: This should probably be more precise, but Zsh seems a bit confused about it itself syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+ \ end=+'+ contains=zshQuoted syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)' syn keyword zshPrecommand noglob nocorrect exec command builtin - time syn keyword zshDelimiter do done end syn keyword zshConditional if then elif else fi case in esac select syn keyword zshRepeat while until repeat syn keyword zshRepeat for foreach nextgroup=zshVariable skipwhite syn keyword zshException always syn keyword zshKeyword function nextgroup=zshKSHFunction skipwhite syn match zshKSHFunction contained '\w\S\+' syn match zshFunction '^\s*\k\+\ze\s*()' syn match zshOperator '||\|&&\|;\|&!\=' syn match zshRedir '\d\=\(<\|<>\|<<<\|<&\s*[0-9p-]\=\)' syn match zshRedir '\d\=\(>\|>>\|>&\s*[0-9p-]\=\|&>\|>>&\|&>>\)[|!]\=' syn match zshRedir '|&\=' syn region zshHereDoc matchgroup=zshRedir \ start='<\@' \ contains=@zshSubst syn region zshHereDoc matchgroup=zshRedir \ start='<\@' \ contains=@zshSubst syn region zshHereDoc matchgroup=zshRedir \ start='<\@' \ contains=@zshSubst syn region zshHereDoc matchgroup=zshRedir \ start=+<\@' syn region zshHereDoc matchgroup=zshRedir \ start=+<\@' syn match zshVariable '\<\h\w*' contained syn match zshVariableDef '\<\h\w*\ze+\==' " XXX: how safe is this? syn region zshVariableDef oneline \ start='\$\@' syn match zshLongDeref '\$\%(ARGC\|argv\|status\|pipestatus\|CPUTYPE\|EGID\|EUID\|ERRNO\|GID\|HOST\|LINENO\|LOGNAME\)' syn match zshLongDeref '\$\%(MACHTYPE\|OLDPWD OPTARG\|OPTIND\|OSTYPE\|PPID\|PWD\|RANDOM\|SECONDS\|SHLVL\|signals\)' syn match zshLongDeref '\$\%(TRY_BLOCK_ERROR\|TTY\|TTYIDLE\|UID\|USERNAME\|VENDOR\|ZSH_NAME\|ZSH_VERSION\|REPLY\|reply\|TERM\)' syn match zshDollarVar '\$\h\w*' syn match zshDeref '\$[=^~]*[#+]*\h\w*\>' syn match zshCommands '\%(^\|\s\)[.:]\ze\s' syn keyword zshCommands alias autoload bg bindkey break bye cap cd \ chdir clone comparguments compcall compctl \ compdescribe compfiles compgroups compquote \ comptags comptry compvalues continue dirs \ disable disown echo echotc echoti emulate \ enable eval exec exit export false fc fg \ functions getcap getln getopts hash history \ jobs kill let limit log logout popd print \ printf pushd pushln pwd r read readonly \ rehash return sched set setcap shift \ source stat suspend test times trap true \ ttyctl type ulimit umask unalias unfunction \ unhash unlimit unset vared wait \ whence where which zcompile zformat zftp zle \ zmodload zparseopts zprof zpty zregexparse \ zsocket zstyle ztcp " Options, generated by: echo ${(j:\n:)options[(I)*]} | sort " Create a list of option names from zsh source dir: " #!/bin/zsh " topdir=/path/to/zsh-xxx " grep '^pindex([A-Za-z_]*)$' $topdir/Src/Doc/Zsh/optionsyo | " while read opt " do " echo ${${(L)opt#pindex\(}%\)} " done syn case ignore syn match zshOptStart /^\s*\%(\%(\%(un\)\?setopt\)\|set\s+[-+]o\)/ nextgroup=zshOption skipwhite syn match zshOption / \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?all_export\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?always_last_prompt\>\)\|\%(\%(no_\?\)\?always_lastprompt\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?always_to_end\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?append_create\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?append_history\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?auto_cd\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?auto_continue\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?auto_list\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?auto_menu\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?auto_name_dirs\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?auto_param_keys\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?auto_param_slash\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?auto_pushd\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?auto_remove_slash\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?auto_resume\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?bad_pattern\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?bang_hist\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?bare_glob_qual\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?bash_auto_list\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?bash_rematch\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?bg_nice\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?brace_ccl\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?brace_expand\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?bsd_echo\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?case_glob\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?case_match\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?c_bases\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?cdable_vars\>\)\|\%(\%(no_\?\)\?cd_able_vars\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?chase_dots\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?chase_links\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?check_jobs\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?combining_chars\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?complete_aliases\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?complete_in_word\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?continue_on_error\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?correct_all\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?c_precedences\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?csh_junkie_history\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?csh_junkie_loops\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?csh_junkie_quotes\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?csh_null_cmd\>\)\|\%(\%(no_\?\)\?cshnullcmd\>\)\|\%(\%(no_\?\)\?csh_null_cmd\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?csh_null_glob\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?debug_before_cmd\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?dot_glob\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?err_exit\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?err_return\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?extended_glob\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?extended_history\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?flow_control\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?force_float\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?function_argzero\>\)\|\%(\%(no_\?\)\?function_arg_zero\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?global_export\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?global_rcs\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?glob_assign\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?glob_complete\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?glob_dots\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?globsubst\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?glob_star_short\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hash_all\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hash_cmds\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hash_dirs\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hash_executables_only\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hash_list_all\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_allow_clobber\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_append\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_beep\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?histexpand\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?histexpiredupsfirst\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_fcntl_lock\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_find_no_dups\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_ignore_all_dups\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_ignore_dups\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_ignore_space\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_lex_words\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_no_functions\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_no_store\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_reduce_blanks\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_save_by_copy\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_save_no_dups\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_subst_pattern\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?hist_verify\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?ignore_braces\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?ignore_close_braces\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?ignore_eof\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?inc_append_history\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?inc_append_history_time\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?interactive_comments\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?ksh_arrays\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?ksh_autoload\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?ksh_glob\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?ksh_option_print\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?ksh_typeset\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?ksh_zero_subscript\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?list_ambiguous\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?list_beep\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?list_packed\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?list_rows_first\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?list_types\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?local_loops\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?local_options\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?local_patterns\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?local_traps\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?long_list_jobs\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?magic_equal_subst\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?mail_warn\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?mail_warning\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?menu_complete\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?multi_byte\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?multi_func_def\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?multi_os\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?no_match\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?null_glob\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?numeric_glob_sort\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?octal_zeroes\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?one_cmd\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?over_strike\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?path_dirs\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?path_script\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?pipe_fail\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?posix_aliases\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?posix_arg_zero\>\)\|\%(\%(no_\?\)\?posix_argzero\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?posix_builtins\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?posix_cd\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?posix_identifiers\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?posix_jobs\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?posix_strings\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?posix_traps\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?print_eight_bit\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?print_exit_value\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?prompt_bang\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?prompt_cr\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?prompt_percent\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?prompt_sp\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?prompt_subst\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?prompt_vars\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?pushd_ignore_dups\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?pushd_minus\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?pushd_silent\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?pushd_to_home\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?rc_expandparam\>\)\|\%(\%(no_\?\)\?rc_expand_param\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?rc_quotes\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?rec_exact\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?re_match_pcre\>\)\|\%(\%(no_\?\)\?rematch_pcre\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?rm_star_silent\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?rm_star_wait\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?share_history\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?sh_file_expansion\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?sh_glob\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?shin_stdin\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?sh_nullcmd\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?sh_option_letters\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?short_loops\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?sh_word_split\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?single_command\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?single_line_zle\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?source_trace\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?sun_keyboard_hack\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?track_all\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?transient_rprompt\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?traps_async\>\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?type_set_silent\>\)\|\%(\%(no_\?\)\?typeset_silent\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)\| \ \%(\%(\\)\| \ \%(\%(\\)\|\%(\%(no_\?\)\?warn_create_global\>\)\| \ \%(\%(\\)\| \ \%(\%(\\)/ nextgroup=zshOption skipwhite contained syn keyword zshTypes float integer local typeset declare private " XXX: this may be too much " syn match zshSwitches '\s\zs--\=[a-zA-Z0-9-]\+' syn match zshNumber '[+-]\=\<\d\+\>' syn match zshNumber '[+-]\=\<0x\x\+\>' syn match zshNumber '[+-]\=\<0\o\+\>' syn match zshNumber '[+-]\=\d\+#[-+]\=\w\+\>' syn match zshNumber '[+-]\=\d\+\.\d\+\>' " TODO: $[...] is the same as $((...)), so add that as well. syn cluster zshSubst contains=zshSubst,zshOldSubst,zshMathSubst syn region zshSubst matchgroup=zshSubstDelim transparent \ start='\$(' skip='\\)' end=')' contains=TOP fold syn region zshParentheses transparent start='(' skip='\\)' end=')' fold syn region zshGlob start='(#' end=')' syn region zshMathSubst matchgroup=zshSubstDelim transparent \ start='\$((' skip='\\)' end='))' \ contains=zshParentheses,@zshSubst,zshNumber, \ @zshDerefs,zshString keepend fold syn region zshBrackets contained transparent start='{' skip='\\}' \ end='}' fold syn region zshBrackets transparent start='{' skip='\\}' \ end='}' contains=TOP fold syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}' \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+ \ end=+`+ contains=TOP,zshOldSubst fold syn sync minlines=50 maxlines=90 syn sync match zshHereDocSync grouphere NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)' syn sync match zshHereDocEndSync groupthere NONE '^\s*EO\a\+\>' hi def link zshTodo Todo hi def link zshComment Comment hi def link zshPreProc PreProc hi def link zshQuoted SpecialChar hi def link zshString String hi def link zshStringDelimiter zshString hi def link zshPOSIXString zshString hi def link zshJobSpec Special hi def link zshPrecommand Special hi def link zshDelimiter Keyword hi def link zshConditional Conditional hi def link zshException Exception hi def link zshRepeat Repeat hi def link zshKeyword Keyword hi def link zshFunction None hi def link zshKSHFunction zshFunction hi def link zshHereDoc String hi def link zshOperator None hi def link zshRedir Operator hi def link zshVariable None hi def link zshVariableDef zshVariable hi def link zshDereferencing PreProc hi def link zshShortDeref zshDereferencing hi def link zshLongDeref zshDereferencing hi def link zshDeref zshDereferencing hi def link zshDollarVar zshDereferencing hi def link zshCommands Keyword hi def link zshOptStart Keyword hi def link zshOption Constant hi def link zshTypes Type hi def link zshSwitches Special hi def link zshNumber Number hi def link zshSubst PreProc hi def link zshMathSubst zshSubst hi def link zshOldSubst zshSubst hi def link zshSubstDelim zshSubst hi def link zshGlob zshSubst let b:current_syntax = "zsh" let &cpo = s:cpo_save unlet s:cpo_save neovim-0.2.2/runtime/tutor/000077500000000000000000000000001320401574200156465ustar00rootroot00000000000000neovim-0.2.2/runtime/tutor/en/000077500000000000000000000000001320401574200162505ustar00rootroot00000000000000neovim-0.2.2/runtime/tutor/en/vim-01-beginner.tutor000066400000000000000000000767251320401574200221700ustar00rootroot00000000000000# Welcome to the VIM Tutor Vim is a very powerful editor that has many commands, too many to explain in a tutor such as this. This tutor is designed to describe enough of the commands that you will be able to easily use Vim as an all-purpose editor. It is IMPORTANT to remember that this tutor is set up to teach by use. That means that you need to do the exercises to learn them properly. If you only read the text, you will soon forget what is most important! For now, make sure that your Shift-Lock key is NOT depressed and press the `j`{normal} key enough times to move the cursor so that Lesson 0 completely fills the screen. # Lesson 0 NOTE: The commands in the lessons will modify the text, but those changes won't be saved. Don't worry about messing things up; just remember that pressing []() and then [u](u) will undo the latest change. This tutorial is interactive, and there are a few things you should know. Pressing []() over text highlighted [like this](holy-grail) will take you to some relevant help (hopefully), and pressing K over any word will try to do so too. Sometimes you will be required to modify text like this here Once you have done the changes correctly, the ✗ sign at the left will change to ✓. I imagine you can already see how neat Vim can be. ;) Other times, you'll be prompted to run a command (I'll explain this later): ~~~ cmd :help ~~~ or press a sequence of keys ~~~ normal 0fd3wP$P ~~~ Text within <'s and >'s (like ``{normal}) describes a key to press instead of text to type. Now, move to the next lesson (remember, use the `j`{normal} key to scroll down). ## Lesson 1.1: MOVING THE CURSOR ** To move the cursor, press the `h`, `j`, `k`, `l` keys as indicated. ** ↑ k Hint: The `h`{normal} key is at the left and moves left. ← h l → The `l`{normal} key is at the right and moves right. j The `j`{normal} key looks like a down arrow. ↓ 1. Move the cursor around the screen until you are comfortable. 2. Hold down the down key (`j`{normal}) until it repeats. Now you know how to move to the next lesson. 3. Using the down key, move to Lesson 1.2. NOTE: If you are ever unsure about something you typed, press to place you in Normal mode. Then retype the command you wanted. NOTE: The cursor keys should also work. But using hjkl you will be able to move around much faster, once you get used to it. Really! # Lesson 1.2: EXITING VIM !! NOTE: Before executing any of the steps below, read this entire lesson !! 1. Press the key (to make sure you are in [Normal mode](Normal-mode). 2. Type: `:q!`{vim} ``{normal}. This exits the editor, DISCARDING any changes you have made. 3. Open vim and get back here by executing the command that got you into this tutor. That might be: :Tutor 4. If you have these steps memorized and are confident, execute steps 1 through 3 to exit and re-enter the editor. NOTE: [:q!](:q) discards any changes you made. In a few lessons you will learn how to save the changes to a file. 5. Move the cursor down to Lesson 1.3. ## Lesson 1.3: TEXT EDITING - DELETION ** Press `x`{normal} to delete the character under the cursor. ** 1. Move the cursor to the line below marked --->. 2. To fix the errors, move the cursor until it is on top of the character to be deleted. 3. Press [the x key](x) to delete the unwanted character. 4. Repeat steps 2 through 4 until the sentence is correct. The ccow jumpedd ovverr thhe mooon. 5. Now that the line is correct, go on to Lesson 1.4. NOTE: As you go through this tutor, do not try to memorize, learn by usage. # Lesson 1.4: TEXT EDITING: INSERTION ** Press `i`{normal} to insert text. ** 1. Move the cursor to the first line below marked --->. 2. To make the first line the same as the second, move the cursor on top of the first character AFTER where the text is to be inserted. 3. Press `i`{normal} and type in the necessary additions. 4. As each error is fixed press ``{normal} to return to Normal mode. Repeat steps 2 through 4 to correct the sentence. There is text misng this . There is some text missing from this line. 5. When you are comfortable inserting text move to Lesson 1.5. # Lesson 1.5: TEXT EDITING: APPENDING ** Press `A`{normal} to append text. ** 1. Move the cursor to the first line below marked --->. It does not matter on what character the cursor is in that line. 2. Press [A](A) and type in the necessary additions. 3. As the text has been appended press ``{normal} to return to Normal mode. 4. Move the cursor to the second line marked ---> and repeat steps 2 and 3 to correct this sentence. There is some text missing from th There is some text missing from this line. There is also some text miss There is also some text missing here. 5. When you are comfortable appending text move to Lesson 1.6. # Lesson 1.6: EDITING A FILE ** Use `:wq`{vim} to save a file and exit. ** !! NOTE: Before executing any of the steps below, read this entire lesson !! 1. Exit this tutor as you did in Lesson 1.2: `:q!`{vim} Or, if you have access to another terminal, do the following there. 2. At the shell prompt type this command: ~~~ sh $ vim tutor ~~~ 'vim' is the command to start the Vim editor, 'tutor' is the name of the file you wish to edit. Use a file that may be changed. 3. Insert and delete text as you learned in the previous lessons. 4. Save the file with changes and exit Vim with: ~~~ cmd :wq ~~~ Note you'll need to press `` to execute the command. 5. If you have quit vimtutor in step 1 restart the vimtutor and move down to the following summary. 6. After reading the above steps and understanding them: do it. # Lesson 1 SUMMARY 1. The cursor is moved using either the arrow keys or the hjkl keys. h (left) j (down) k (up) l (right) 2. To start Vim from the shell prompt type: ~~~ sh $ vim FILENAME ~~~ 3. To exit Vim type: ``{normal} `:q!`{vim} ``{normal} to trash all changes. OR type: ``{normal} `:wq`{vim} ``{normal} to save the changes. 4. To delete the character at the cursor type: `x`{normal} 5. To insert or append text type: `i`{normal} insert text ``{normal} insert before the cursor. `A`{normal} append text ``{normal} append after the line. NOTE: Pressing ``{normal} will place you in Normal mode or will cancel an unwanted and partially completed command. Now continue with Lesson 2. # Lesson 2.1: DELETION COMMANDS ** Type `dw`{normal} to delete a word. ** 1. Press ``{normal} to make sure you are in Normal mode. 2. Move the cursor to the line below marked --->. 3. Move the cursor to the beginning of a word that needs to be deleted. 4. Type [d](d)[w](w) to make the word disappear. There are a some words fun that don't belong paper in this sentence. 5. Repeat steps 3 and 4 until the sentence is correct and go to Lesson 2.2. # Lesson 2.2: MORE DELETION COMMANDS ** Type `d$`{normal} to delete to the end of the line. ** 1. Press ``{normal} to make sure you are in Normal mode. 2. Move the cursor to the line below marked --->. 3. Move the cursor to the end of the correct line (AFTER the first . ). 4. Type `d$`{normal} to delete to the end of the line. Somebody typed the end of this line twice. end of this line twice. 5. Move on to Lesson 2.3 to understand what is happening. # Lesson 2.3: ON OPERATORS AND MOTIONS Many commands that change text are made from an [operator](operator) and a [motion](navigation). The format for a delete command with the [d](d) delete operator is as follows: d motion Where: d - is the delete operator. motion - is what the operator will operate on (listed below). A short list of motions: [w](w) - until the start of the next word, EXCLUDING its first character. [e](e) - to the end of the current word, INCLUDING the last character. [$]($) - to the end of the line, INCLUDING the last character. Thus typing `de`{normal} will delete from the cursor to the end of the word. NOTE: Pressing just the motion while in Normal mode without an operator will move the cursor as specified. # Lesson 2.4: USING A COUNT FOR A MOTION ** Typing a number before a motion repeats it that many times. ** 1. Move the cursor to the start of the line marked ---> below. 2. Type `2w`{normal} to move the cursor two words forward. 3. Type `3e`{normal} to move the cursor to the end of the third word forward. 4. Type `0`{normal} ([zero](0)) to move to the start of the line. 5. Repeat steps 2 and 3 with different numbers. This is just a line with words you can move around in. 6. Move on to Lesson 2.5. # Lesson 2.5: USING A COUNT TO DELETE MORE ** Typing a number with an operator repeats it that many times. ** In the combination of the delete operator and a motion mentioned above you insert a count before the motion to delete more: d number motion 1. Move the cursor to the first UPPER CASE word in the line marked --->. 2. Type `d2w`{normal} to delete the two UPPER CASE words 3. Repeat steps 1 and 2 with a different count to delete the consecutive UPPER CASE words with one command This ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up. # Lesson 2.6: OPERATING ON LINES ** Type `dd`{normal} to delete a whole line. ** Due to the frequency of whole line deletion, the designers of Vi decided it would be easier to simply type two d's to delete a line. 1. Move the cursor to the second line in the phrase below. 2. Type [dd](dd) to delete the line. 3. Now move to the fourth line. 4. Type `2dd`{normal} to delete two lines. 1) Roses are red, 2) Mud is fun, 3) Violets are blue, 4) I have a car, 5) Clocks tell time, 6) Sugar is sweet 7) And so are you. # Lesson 2.7: THE UNDO COMMAND ** Press `u`{normal} to undo the last commands, `U`{normal} to fix a whole line. ** 1. Move the cursor to the line below marked ---> and place it on the first error. 2. Type `x`{normal} to delete the first unwanted character. 3. Now type `u`{normal} to undo the last command executed. 4. This time fix all the errors on the line using the `x`{normal} command. 5. Now type a capital `U`{normal} to return the line to its original state. 6. Now type `u`{normal} a few times to undo the `U`{normal} and preceding commands. 7. Now type ``{normal} a few times to redo the commands (undo the undo's). Fiix the errors oon thhis line and reeplace them witth undo. 8. These are very useful commands. Now move on to the Lesson 2 Summary. # Lesson 2 SUMMARY 1. To delete from the cursor up to the next word type: `dw`{normal} 2. To delete from the cursor to the end of a line type: `d$`{normal} 3. To delete a whole line type: `dd`{normal} 4. To repeat a motion prepend it with a number: `2w`{normal} 5. The format for a change command is: operator [number] motion where: operator - is what to do, such as [d](d) for delete [number] - is an optional count to repeat the motion motion - moves over the text to operate on, such as: [w](w) (word), [$]($) (to the end of line), etc. 6. To move to the start of the line use a zero: [0](0) 7. To undo previous actions, type: `u`{normal} (lowercase u) To undo all the changes on a line, type: `U`{normal} (capital U) To undo the undo's, type: ``{normal} # Lesson 3.1: THE PUT COMMAND ** Type `p`{normal} to put previously deleted text after the cursor. ** 1. Move the cursor to the first ---> line below. 2. Type `dd`{normal} to delete the line and store it in a Vim register. 3. Move the cursor to the c) line, ABOVE where the deleted line should go. 4. Type `p`{normal} to put the line below the cursor. 5. Repeat steps 2 through 4 to put all the lines in correct order. d) Can you learn too? b) Violets are blue, c) Intelligence is learned, a) Roses are red, # Lesson 3.2: THE REPLACE COMMAND ** Type `rx`{normal} to replace the character at the cursor with x. ** 1. Move the cursor to the first line below marked --->. 2. Move the cursor so that it is on top of the first error. 3. Type `r`{normal} and then the character which should be there. 4. Repeat steps 2 and 3 until the first line is equal to the second one. Whan this lime was tuoed in, someone presswd some wrojg keys! When this line was typed in, someone pressed some wrong keys! 5. Now move on to Lesson 3.3. NOTE: Remember that you should be learning by doing, not memorization. # Lesson 3.3: THE CHANGE OPERATOR ** To change until the end of a word, type `ce`{normal}. ** 1. Move the cursor to the first line below marked --->. 2. Place the cursor on the "u" in "lubw". 3. Type `ce`{normal} and the correct word (in this case, type "ine" ). 4. Press ``{normal} and move to the next character that needs to be changed. 5. Repeat steps 3 and 4 until the first sentence is the same as the second. This lubw has a few wptfd that mrrf changing usf the change operator. This line has a few words that need changing using the change operator. Notice that [c](c)e deletes the word and places you in Insert mode. # Lesson 3.4: MORE CHANGES USING `c`{normal} ** The change operator is used with the same motions as delete. ** 1. The change operator works in the same way as delete. The format is: c [number] motion 2. The motions are the same, such as `w`{normal} (word) and `$`{normal} (end of line). 3. Move to the first line below marked --->. 4. Move the cursor to the first error. 5. Type `c$`{normal} and type the rest of the line like the second and press ``{normal}. The end of this line needs some help to make it like the second. The end of this line needs to be corrected using the `c$`{normal} command. NOTE: You can use the Backspace key to correct mistakes while typing. # Lesson 3 SUMMARY 1. To put back text that has just been deleted, type [p](p). This puts the deleted text AFTER the cursor (if a line was deleted it will go on the line below the cursor). 2. To replace the character under the cursor, type [r](r) and then the character you want to have there. 3. The [change operator](c) allows you to change from the cursor to where the motion takes you. Type `ce`{normal} to change from the cursor to the end of the word, `c$`{normal} to change to the end of a line. 4. The format for change is: c [number] motion Now go on to the next lesson. # Lesson 4.1: CURSOR LOCATION AND FILE STATUS ** Type ``{normal} to show your location in the file and the file status. Type `G`{normal} to move to a line in the file. ** NOTE: Read this entire lesson before executing any of the steps!! 1. Hold down the ``{normal} key and press `g`{normal}. We call this ``{normal}. A message will appear at the bottom of the page with the filename and the position in the file. Remember the line number for Step 3. NOTE: You may see the cursor position in the lower right corner of the screen This happens when the ['ruler']('ruler') option is set (see `:help 'ruler'`{vim} ). 2. Press [G](G) to move you to the bottom of the file. Type [gg](gg) to move you to the start of the file. 3. Type the number of the line you were on and then `G`{normal}. This will return you to the line you were on when you first pressed ``{normal}. 4. If you feel confident to do this, execute steps 1 through 3. # Lesson 4.2: THE SEARCH COMMAND ** Type `/`{normal} followed by a phrase to search for the phrase. ** 1. In Normal mode type the `/`{normal} character. Notice that it and the cursor appear at the bottom of the screen as with the `:`{normal} command. 2. Now type 'errroor' ``{normal}. This is the word you want to search for. 3. To search for the same phrase again, simply type [n](n). To search for the same phrase in the opposite direction, type [N](N). 4. To search for a phrase in the backward direction, use [?](?) instead of `/`{normal}. 5. To go back to where you came from press ``{normal} (keep ``{normal} pressed down while pressing the letter `o`{normal}). Repeat to go back further. ``{normal} goes forward. "errroor" is not the way to spell error; errroor is an error. NOTE: When the search reaches the end of the file it will continue at the start, unless the ['wrapscan']('wrapscan') option has been reset. # Lesson 4.3: MATCHING PARENTHESES SEARCH ** Type `%`{normal} to find a matching ),], or }. ** 1. Place the cursor on any (, [, or { in the line below marked --->. 2. Now type the [%](%) character. 3. The cursor will move to the matching parenthesis or bracket. 4. Type `%`{normal} to move the cursor to the other matching bracket. 5. Move the cursor to another (,),[,],{ or } and see what `%`{normal} does. This ( is a test line with ('s, ['s ] and {'s } in it. )) NOTE: This is very useful in debugging a program with unmatched parentheses! # Lesson 4.4: THE SUBSTITUTE COMMAND ** Type `:s/old/new/g` to substitute "new" for "old". ** 1. Move the cursor to the line below marked --->. 2. Type ~~~ cmd :s/thee/the/ ~~~ NOTE that the [:s](:s) command only changed the first occurrence of "thee" in the line. 3. Now type ~~~ cmd :s/thee/the/g ~~~ Adding the g [flag](:s_flags) means to substitute globally in the line, change all occurrences of "thee" in the line. Usually thee best time to see thee flowers is in thee spring. 4. To change every occurrence of a character string between two lines, type ~~~ cmd :#,#s/old/new/g ~~~ where #,# are the line numbers of the range of lines where the substitution is to be done. Type ~~~ cmd :%s/old/new/g ~~~ to change every occurrence in the whole file. Type ~~~ cmd :%s/old/new/gc ~~~ to find every occurrence in the whole file, with a prompt whether to substitute or not. # Lesson 4 SUMMARY 1. ``{normal} displays your location in the file and the file status. `G`{normal} moves to the end of the file. number `G`{normal} moves to that line number. `gg`{normal} moves to the first line. 2. Typing `/`{normal} followed by a phrase searches FORWARD for the phrase. Typing `?`{normal} followed by a phrase searches BACKWARD for the phrase. After a search type `n`{normal} to find the next occurrence in the same direction or `N`{normal} to search in the opposite direction. ``{normal} takes you back to older positions, ``{normal} to newer positions. 3. Typing `%`{normal} while the cursor is on a (,),[,],{, or } goes to its match. 4. To substitute new for the first old in a line type ~~~ cmd :s/old/new ~~~ To substitute new for all 'old's on a line type ~~~ cmd :s/old/new/g ~~~ To substitute phrases between two line #'s type ~~~ cmd :#,#s/old/new/g ~~~ To substitute all occurrences in the file type ~~~ cmd :%s/old/new/g ~~~ To ask for confirmation each time add 'c' ~~~ cmd :%s/old/new/gc ~~~ # Lesson 5.1: HOW TO EXECUTE AN EXTERNAL COMMAND ** Type `:!`{vim} followed by an external command to execute that command. ** 1. Type the familiar command `:`{normal} to set the cursor at the bottom of the screen. This allows you to enter a command-line command. 2. Now type the [!](!cmd) (exclamation point) character. This allows you to execute any external shell command. 3. As an example type "ls" following the "!" and then hit ``{normal}. This will show you a listing of your directory, just as if you were at the shell prompt. NOTE: It is possible to execute any external command this way, also with arguments. NOTE: All `:`{vim} commands must be finished by hitting ``{normal}. From here on we will not always mention it. # Lesson 5.2: MORE ON WRITING FILES ** To save the changes made to the text, type `:w`{vim} FILENAME. ** 1. Type `:!ls`{vim} to get a listing of your directory. You already know you must hit ``{normal} after this. 2. Choose a filename that does not exist yet, such as TEST. 3. Now type: ~~~ cmd :w TEST ~~~ (where TEST is the filename you chose.) 4. This saves the whole file (the Vim Tutor) under the name TEST. To verify this, type `:!ls`{vim} again to see your directory. NOTE: If you were to exit Vim and start it again with `nvim TEST`, the file would be an exact copy of the tutor when you saved it. 5. Now remove the file by typing: ~~~ cmd :!rm TEST ~~~ # Lesson 5.3: SELECTING TEXT TO WRITE ** To save part of the file, type `v`{normal} motion `:w FILENAME`{vim}. ** 1. Move the cursor to this line. 2. Press [v](v) and move the cursor to the fifth item below. Notice that the text is highlighted. 3. Press the `:`{normal} character. At the bottom of the screen :'<,'> will appear. 4. Type `:w TEST`{vim} where TEST is a filename that does not exist yet. Verify that you see `:'<,'>w TEST`{vim} before you press ``{normal}. 5. Vim will write the selected lines to the file TEST. Use `:!ls`{vim} to see it. Do not remove it yet! We will use it in the next lesson. NOTE: Pressing [v](v) starts [Visual selection](visual-mode). You can move the cursor around to make the selection bigger or smaller. Then you can use an operator to do something with the text. For example, `d`{normal} deletes the text. # Lesson 5.4: RETRIEVING AND MERGING FILES ** To insert the contents of a file, type `:r FILENAME`{vim}. ** 1. Place the cursor just above this line. NOTE: After executing Step 2 you will see text from Lesson 5.3. Then move DOWN to see this lesson again. 2. Now retrieve your TEST file using the command `:r TEST`{vim} where TEST is the name of the file you used. The file you retrieve is placed below the cursor line. 3. To verify that a file was retrieved, cursor back and notice that there are now two copies of Lesson 5.3, the original and the file version. NOTE: You can also read the output of an external command. For example, `:r !ls`{vim} reads the output of the `ls` command and puts it below the cursor. # Lesson 5 SUMMARY 1. [:!command](:!cmd) executes an external command. Some useful examples are: `:!ls`{vim} - shows a directory listing `:!rm FILENAME`{vim} - removes file FILENAME 2. [:w](:w) FILENAME writes the current Vim file to disk with name FILENAME. 3. [v](v) motion :w FILENAME saves the Visually selected lines in file FILENAME. 4. [:r](:r) FILENAME retrieves disk file FILENAME and puts it below the cursor position. 5. [:r !dir](:r!) reads the output of the dir command and puts it below the cursor position. # Lesson 6.1: THE OPEN COMMAND ** Type `o`{normal} to open a line below the cursor and place you in Insert mode. ** 1. Move the cursor to the line below marked --->. 2. Type the lowercase letter `o`{normal} to [open](o) up a line BELOW the cursor and place you in Insert mode. 3. Now type some text and press ``{normal} to exit Insert mode. After typing `o`{normal} the cursor is placed on the open line in Insert mode. 4. To open up a line ABOVE the cursor, simply type a [capital O](O), rather than a lowercase `o`{normal}. Try this on the line below. Open up a line above this by typing O while the cursor is on this line. # Lesson 6.2: THE APPEND COMMAND ** Type `a`{normal} to insert text AFTER the cursor. ** 1. Move the cursor to the start of the line below marked --->. 2. Press `e`{normal} until the cursor is on the end of "li". 3. Type the lowercase letter `a`{normal} to [append](a) text AFTER the cursor. 4. Complete the word like the line below it. Press ``{normal} to exit Insert mode. 5. Use `e`{normal} to move to the next incomplete word and repeat steps 3 and 4. This li will allow you to pract appendi text to a line. This line will allow you to practice appending text to a line. NOTE: [a](a), [i](i) and [A](A) all go to the same Insert mode, the only difference is where the characters are inserted. # Lesson 6.3: ANOTHER WAY TO REPLACE ** Type a capital `R`{normal} to replace more than one character. ** 1. Move the cursor to the first line below marked --->. Move the cursor to the beginning of the first "xxx". 2. Now press `R`{normal} ([capital R](R)) and type the number below it in the second line, so that it replaces the "xxx". 3. Press ``{normal} to leave [Replace mode](mode-replace). Notice that the rest of the line remains unmodified. 4. Repeat the steps to replace the remaining "xxx". Adding 123 to xxx gives you xxx. Adding 123 to 456 gives you 579. NOTE: Replace mode is like Insert mode, but every typed character deletes an existing character. # Lesson 6.4: COPY AND PASTE TEXT ** Use the `y`{normal} operator to copy text and `p`{normal} to paste it. ** 1. Go to the line marked with ---> below and place the cursor after "a)". 2. Start Visual mode with `v`{normal} and move the cursor to just before "first". 3. Type `y`{normal} to [yank](yank) (copy) the highlighted text. 4. Move the cursor to the end of the next line: `j$`{normal} 5. Type `p`{normal} to [put](put) (paste) the text. 6. Press `a`{normal} and then type "second". Press ``{normal} to leave Insert mode. 7. Use Visual mode to select " item.", yank it with `y`{normal}, move to the end of the next line with `j$`{normal} and put the text there with `p`{normal}. a) This is the first item. b) NOTE: you can also use `y`{normal} as an operator; `yw`{normal} yanks one word. # Lesson 6.5: SET OPTION ** Set an option so a search or substitute ignores case. ** 1. Search for 'ignore' by entering: `/ignore` Repeat several times by pressing `n`{normal}. 2. Set the 'ic' (Ignore case) option by entering: ~~~ cmd :set ic ~~~ 3. Now search for 'ignore' again by pressing `n`{normal}. Notice that Ignore and IGNORE are now also found. 4. Set the 'hlsearch' and 'incsearch' options: ~~~ cmd :set hls is ~~~ 5. Now type the search command again and see what happens: /ignore 6. To disable ignoring case enter: ~~~ cmd :set noic ~~~ 7. To toggle the value of a setting, prepend it with "inv": ~~~ cmd :set invic ~~~ NOTE: To remove the highlighting of matches enter: ~~~ cmd :nohlsearch ~~~ NOTE: If you want to ignore case for just one search command, use [\c](/\c) in the phrase: /ignore\c # Lesson 6 SUMMARY 1. Type `o`{normal} to open a line BELOW the cursor and start Insert mode. Type `O`{normal} to open a line ABOVE the cursor. 2. Type `a`{normal} to insert text AFTER the cursor. Type `A`{normal} to insert text after the end of the line. 3. The `e`{normal} command moves to the end of a word. 4. The `y`{normal} operator yanks (copies) text, `p`{normal} puts (pastes) it. 5. Typing a capital `R`{normal} enters Replace mode until ``{normal} is pressed. 6. Typing "[:set](:set) xxx" sets the option "xxx". Some options are: 'ic' 'ignorecase' ignore upper/lower case when searching 'is' 'incsearch' show partial matches for a search phrase 'hls' 'hlsearch' highlight all matching phrases You can either use the long or the short option name. 7. Prepend "no" to switch an option off: ~~~ cmd :set noic ~~~ 8. Prepend "inv" to toggle an option: ~~~ cmd :set invic ~~~ # Lesson 7.1: GETTING HELP ** Use the on-line help system. ** Vim has a comprehensive on-line help system. To get started, try one of these three: - press the ``{normal} key (if you have one) - press the ``{normal} key (if you have one) - type `:help`{vim} Read the text in the help window to find out how the help works. Type ``{normal} to jump from one window to another. Type `:q`{vim} to close the help window. You can find help on just about any subject, by giving an argument to the ":help" command. Try these (don't forget pressing ): ~~~ cmd :help w :help c_CTRL-D :help insert-index :help user-manual ~~~ # Lesson 7.2: CREATE A STARTUP SCRIPT ** Enable Vim features. ** Vim has many more features than Vi, but most of them are disabled by default. To start using more features you have to create a "vimrc" file. 1. Start editing the "vimrc" file. This depends on your system: `:e ~/.config/nvim/init.vim`{vim} for Unix-like systems 2. Now read the example "vimrc" file contents: `:r $VIMRUNTIME/vimrc_example.vim`{vim} 3. Write the file with: `:w`{vim} The next time you start Vim it will use syntax highlighting. You can add all your preferred settings to this "vimrc" file. For more information type `:help vimrc-intro`{vim}. # Lesson 7.3: COMPLETION ** Command line completion with ``{normal} and ``{normal}. ** 1. Look what files exist in the directory: `:!ls`{vim} 2. Type the start of a command: `:e`{vim} 3. Press ``{normal} and Vim will show a list of commands that start with "e". 4. Press ``{normal} and Vim will complete the command name to ":edit". 5. Now add a space and the start of an existing file name: `:edit FIL`{vim} 6. Press ``{normal}. Vim will complete the name (if it is unique). NOTE: Completion works for many commands. It is especially useful for `:help`{vim}. # Lesson 7 SUMMARY 1. Type `:help`{vim} or press ``{normal} or ``{normal} to open a help window. 2. Type `:help TOPIC`{vim} to find help on TOPIC. 3. Type ``{normal} to jump to another window 4. Type `:q`{vim} to close the help window 5. Create a vimrc startup script to keep your preferred settings. 6. While in command mode, press ``{normal} to see possible completions. Press ``{normal} to use one completion. # CONCLUSION This was intended to give a brief overview of the Vim editor, just enough to allow you to use the editor fairly easily. It is far from complete as Vim has many many more commands. Consult the help often. There are many resources online to learn more about vim. Here's a bunch of them: - *Learn Vim Progressively*: http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/ - *Learning Vim in 2014*: http://benmccormick.org/learning-vim-in-2014/ - *Vimcasts*: http://vimcasts.org/ - *Vim Video-Tutorials by Derek Wyatt*: http://derekwyatt.org/vim/tutorials/ - *Learn Vimscript the Hard Way*: http://learnvimscriptthehardway.stevelosh.com/ - *7 Habits of Effective Text Editing*: http://www.moolenaar.net/habits.html - *vim-galore*: https://github.com/mhinz/vim-galore If you prefer a book, *Practical Vim* by Drew Neil is recommended often (the sequel, *Modern Vim*, includes material specific to nvim). This tutorial was written by Michael C. Pierce and Robert K. Ware, Colorado School of Mines using ideas supplied by Charles Smith, Colorado State University. E-mail: bware@mines.colorado.edu. Modified for Vim by Bram Moolenaar. Modified for vim-tutor-mode by Felipe Morales. neovim-0.2.2/runtime/tutor/en/vim-01-beginner.tutor.json000066400000000000000000000032201320401574200231140ustar00rootroot00000000000000{ "expect": { "24": -1, "102": "The cow jumped over the moon.", "122": "There is some text missing from this line.", "123": "There is some text missing from this line.", "141": "There is some text missing from this line.", "142": "There is some text missing from this line.", "143": "There is also some text missing here.", "144": "There is also some text missing here.", "215": "There are some words that don't belong in this sentence.", "231": "Somebody typed the end of this line twice.", "271": -1, "290": "This line of words is cleaned up.", "304": -1, "305": -1, "306": -1, "307": -1, "308": -1, "309": -1, "310": -1, "325": "Fix the errors on this line and replace them with undo.", "365": -1, "366": -1, "367": -1, "368": -1, "382": "When this line was typed in, someone pressed some wrong keys!", "383": "When this line was typed in, someone pressed some wrong keys!", "403": "This line has a few words that need changing using the change operator.", "404": "This line has a few words that need changing using the change operator.", "424": "The end of this line needs to be corrected using the c$ command.", "425": "The end of this line needs to be corrected using the c$ command.", "487": -1, "506": -1, "531": "Usually the best time to see the flowers is in the spring.", "722": -1, "727": -1, "744": "This line will allow you to practice appending text to a line.", "745": "This line will allow you to practice appending text to a line.", "765": "Adding 123 to 456 gives you 579.", "766": "Adding 123 to 456 gives you 579.", "790": "a) This is the first item.", "791": " b) This is the second item." } } neovim-0.2.2/runtime/tutor/tutor.tutor000066400000000000000000000126071320401574200201300ustar00rootroot00000000000000# CREATING A VIM TUTORIAL WITH VIM-TUTOR-MODE This tutorial will guide you through the steps required to create a tutorial file for vim-tutor-mode. It is also meant as a demo of vim-tutor-mode capabilities. Table of contents: - [Setting up](*setting-up*) - [vim-tutor-mode's markup](*markup*) - [emphasis](*emphasis*) - [headers](*headers*) - [links](*links*) - [codeblocks](*codeblocks*) - [Interactive elements](*interactive*) - [expect](*expect*) ## SETTING UP *setting-up* First, you'll need to enable "debug" mode ~~~ cmd :let g:tutor_debug = 1 ~~~ This will allow saving changes to the tutor files and will disable conceals, so you can more easily check your changes. After this, create a new .tutor file (we will be practicing on this very file, so you don't need to do this now): ~~~ cmd :e new-tutorial.tutor ~~~ ## VIM-TUTOR-MODE's MARKDOWN *markup* vim-tutor-mode uses a subset of markdown's syntax to format the tutorials. The subset supported should be enough for most tutorials and the maintainers will try to keep it as small as possible (if regular markdown allows for several ways to do the same thing, tutor markdown will only provide the one the maintainers think is easier to handle). ### Emphasis *emphasis* For emphasized text (italics), as in normal markdown, you use \*. E.g.: \*text\* is displayed like *text* Note: The underscores variant is not supported. For strong emphasis (bold), you use \*\*. E.g.: \*\*this\*\* is displayed like **this** 1. Format the line below so it becomes a lesson description: This is text with important information This is text with **important information** Note: Some words (e.g., NOTE, IMPORTANT, tip, ATTENTION, etc.) will also be highlighted. You don't need to mark them specially. 2. Turn the line below into a TODO item: Document '&variable' TODO: Document '&variable' ### Headers *headers* 3. Practice fixing the lines below: This is a level 1 header # This is a level 1 header This is a level 3 header ### This is a level 3 header This is a header with a label # This is a header with a label {*label*} 4. Now, create a 4th level section here, and add a label like in the previous exercise: ATTENTION We will use this label later, so remember it. ### Links *links* It is good practice to include links in your tutorials to reference materials, like vim's own help or external documents. You can also link to other parts of the document. Links have the syntax \[label\]\(target\) #### Help links If the target of a link matches a help topic, opening it will open it. 5. Fix the following line: A link to help for the 'breakindent' option A link to help for the ['breakindent']('breakindent') option #### Anchor links A link can also lead to a place in the file itself. Anchors are written \*anchor\* and are hidden by default. Links to them look like \[label\]\(\*anchor\*\) 6. Add the appropiate link: A link to the Links section A link to the [Links](*links*) section 7. Now, create a link to the section you created on exercise 4 above. # Tutorial links You can also have links to other tutorials. For this, you'll write the anchor in the format @tutor:TUTORIAL 7. Create a link to this tutorial: A link to the vim-tutor-mode tutorial A link to [the vim-tutor-mode tutorial](@tutor:tutor) ### Codeblocks *codeblocks* vim-tutor-mode tutorials can include viml sections ~~~ cmd echom "hello" ~~~ is displayed as ~~~ cmd echom "hello" ~~~ 8. Copy the viml section below ~~~ viml echom 'the value of &number is'.string(&number) ~~~ You can inline viml code using "\`" and "\`{vim}": \`call myFunction()\`{vim} is displayed as `call myFunction()`{vim} [normal](Normal-mode) commands can also be embedded in tutorials. ~~~ normal ftdaW ~~~ is displayed as ~~~ normal ftdaW ~~~ Note: you can also write `norm` or `normal`. 9. Copy the normal section below ~~~ normal d2w ~~~ You can also inline normal commands by using "\`" and "\`{normal}": \`gq\`{normal} is very useful. is displayed: `gq`{normal} is very useful. 10. Complete the line as shown d `d2w`{normal} Commands to run in the system shell can be highlighted by indenting a line starting with "$". ~~~ sh $ vim --version ~~~ ## INTERACTIVE ELEMENTS *interactive* As visible in this very document, vim-tutor-mode includes some interactive elements to provide feedback to the user about his progress. If the text in these elements satisfies some set condition, a ✓ sign will appear in the gutter to the left. Otherwise, a ✗ sign is displayed. ### expect *expect* "expect" lines check that the contents of the line are identical to some preset text (like in the exercises above). These elements are specified in separate JSON files like this ~~~ json { "expect": { "1": "This is how this line should look.", "2": "This is how this line should look.", "3": -1 } } ~~~ These files contain an "expect" dictionary, for which the keys are line numbers and the values are the expected text. A value of -1 means that the condition for the line will always be satisfied, no matter what (this is useful for letting the user play a bit). This is an "expect" line that is always satisfied. Try changing it. These files conventionally have the same name as the tutorial document with the `.json` extension appended (for a full example, see the file that corresponds to this tutorial). neovim-0.2.2/runtime/tutor/tutor.tutor.json000066400000000000000000000022471320401574200210770ustar00rootroot00000000000000{ "expect": { "63": "This is text with **important information**", "64": "This is text with **important information**", "71": "Document '&variable'", "72": "Document '&variable'", "78": "# This is a level 1 header", "79": "# This is a level 1 header", "80": "### This is a level 3 header", "81": "### This is a level 3 header", "82": "# This is a header with a label {*label*}", "83": "# This is a header with a label {*label*}", "108": "A link to help for the ['breakindent']('breakindent') option", "109": "A link to help for the ['breakindent']('breakindent') option", "123": "A link to the [Links](*links*) section", "124": "A link to the [Links](*links*) section", "139": "A link to [the vim-tutor-mode tutorial](@tutor:tutor)", "140": "A link to [the vim-tutor-mode tutorial](@tutor:tutor)", "157": "~~~ viml", "158": "echom 'the value of &number is'.string(&number)", "159": "~~~", "161": "~~~ viml", "162": "echom 'the value of &number is'.string(&number)", "163": "~~~", "188": "~~~ normal", "189": "d2w", "190": "~~~", "192": "~~~ normal", "193": "d2w", "194": "~~~", "206": "`d2w`{normal}", "207": "`d2w`{normal}", "244": -1 } } neovim-0.2.2/scripts/000077500000000000000000000000001320401574200144755ustar00rootroot00000000000000neovim-0.2.2/scripts/check-includes.py000077500000000000000000000033761320401574200177440ustar00rootroot00000000000000#!/usr/bin/env python import sys import re import os from subprocess import Popen, PIPE from argparse import ArgumentParser GENERATED_INCLUDE_RE = re.compile( r'^\s*#\s*include\s*"([/a-z_0-9.]+\.generated\.h)"(\s+//.*)?$') def main(argv): argparser = ArgumentParser() argparser.add_argument('--generated-includes-dir', action='append', help='Directory where generated includes are located.') argparser.add_argument('--file', type=open, help='File to check.') argparser.add_argument('iwyu_args', nargs='*', help='IWYU arguments, must go after --.') args = argparser.parse_args(argv) with args.file: include_dirs = [] iwyu = Popen(['include-what-you-use', '-xc'] + args.iwyu_args + ['/dev/stdin'], stdin=PIPE, stdout=PIPE, stderr=PIPE) for line in args.file: match = GENERATED_INCLUDE_RE.match(line) if match: for d in args.generated_includes_dir: try: f = open(os.path.join(d, match.group(1))) except IOError: continue else: with f: for generated_line in f: iwyu.stdin.write(generated_line) break else: raise IOError('Failed to find {0}'.format(match.group(1))) else: iwyu.stdin.write(line) iwyu.stdin.close() out = iwyu.stdout.read() err = iwyu.stderr.read() ret = iwyu.wait() if ret != 2: print('IWYU failed with exit code {0}:'.format(ret)) print('{0} stdout {0}'.format('=' * ((80 - len(' stdout ')) // 2))) print(out) print('{0} stderr {0}'.format('=' * ((80 - len(' stderr ')) // 2))) print(err) return 1 return 0 if __name__ == '__main__': raise SystemExit(main(sys.argv[1:])) neovim-0.2.2/scripts/download-unicode-files.sh000077500000000000000000000017521320401574200213740ustar00rootroot00000000000000#!/bin/sh set -e data_files="UnicodeData.txt CaseFolding.txt EastAsianWidth.txt" emoji_files="emoji-data.txt" UNIDIR_DEFAULT=unicode DOWNLOAD_URL_BASE_DEFAULT='http://unicode.org/Public' if test x$1 = 'x--help' ; then echo 'Usage:' echo " $0[ TARGET_DIRECTORY[ URL_BASE]]" echo echo "Downloads files $files to TARGET_DIRECTORY." echo "Each file is downloaded from URL_BASE/\$filename." echo echo "Default target directory is $PWD/${UNIDIR_DEFAULT}." echo "Default URL base is ${DOWNLOAD_URL_BASE_DEFAULT}." fi UNIDIR=${1:-$UNIDIR_DEFAULT} DOWNLOAD_URL_BASE=${2:-$DOWNLOAD_URL_BASE_DEFAULT} for filename in $data_files ; do curl -L -o "$UNIDIR/$filename" "$DOWNLOAD_URL_BASE/UNIDATA/$filename" ( cd "$UNIDIR" git add $filename ) done for filename in $emoji_files ; do curl -L -o "$UNIDIR/$filename" "$DOWNLOAD_URL_BASE/emoji/latest/$filename" ( cd "$UNIDIR" git add $filename ) done ( cd "$UNIDIR" git commit -m "Update unicode files" -- $files ) neovim-0.2.2/scripts/finddeclarations.pl000077500000000000000000000017311320401574200203500ustar00rootroot00000000000000#!/usr/bin/perl use strict; use warnings; if ($ARGV[0] eq '--help') { print << "EOF"; Usage: $0 definitions.c EOF exit; } my ($cfname, $sfname, $gfname, $cpp) = @ARGV; my $F; open $F, "<", $cfname; my $text = join "", <$F>; close $F; my $s = qr/(?>\s*)/aso; my $w = qr/(?>\w+)/aso; my $argname = qr/$w(?:\[(?>\w+)\])?/aso; my $type_regex = qr/(?:$w$s\**$s)+/aso; my $arg_regex = qr/(?:$type_regex$s$argname)/aso; while ($text =~ / (?<=\n) # Definition starts at the start of line $type_regex # Return type $s$w # Function name $s\($s (?: $arg_regex(?:$s,$s$arg_regex)*+ ($s,$s\.\.\.)? # varargs function |void )? $s\) (?:$s FUNC_ATTR_$w(?:\((?>[^)]*)\))?)*+ # Optional attributes (?=$s;) # Ending semicolon /axsogp) { my $match = "${^MATCH}"; my $s = "${^PREMATCH}"; $s =~ s/[^\n]++//g; my $line = 1 + length $s; print "${cfname}:${line}: $match\n"; } neovim-0.2.2/scripts/gen_api_vimdoc.py000066400000000000000000000411731320401574200200200ustar00rootroot00000000000000#!/usr/bin/env python """Parses Doxygen XML output to generate Neovim's API documentation. This would be easier using lxml and XSLT, but: 1. This should avoid needing Python dependencies, especially ones that are C modules that have library dependencies (lxml requires libxml and libxslt). 2. I wouldn't know how to deal with nested indentation in tags using XSLT. Each function documentation is formatted with the following rules: - Maximum width of 78 characters (`text_width`). - Spaces for indentation. - Function signature and helptag are on the same line. - Helptag is right aligned. - Signature and helptag must have a minimum of 8 spaces between them. - If the signature is too long, it is placed on the line after the helptag. The signature wraps at `text_width - 8` characters with subsequent lines indented to the open parenthesis. - Documentation body will be indented by 16 spaces. - Subsection bodies are indented an additional 4 spaces. - Documentation body consists of the function description, parameter details, return description, and C declaration. - Parameters are omitted for the `void` and `Error *` types, or if the parameter is marked as [out]. - Each function documentation is separated by a single line. The C declaration is added to the end to show actual argument types. """ import os import re import sys import shutil import textwrap import subprocess from xml.dom import minidom if sys.version_info[0] < 3: print("use Python 3") sys.exit(1) doc_filename = 'api.txt' # String used to find the start of the generated part of the doc. section_start_token = '*api-global*' # Section name overrides. section_name = { 'vim.c': 'Global', } # Section ordering. section_order = ( 'vim.c', 'buffer.c', 'window.c', 'tabpage.c', 'ui.c', ) param_exclude = ( 'channel_id', ) # Annotations are displayed as line items after API function descriptions. annotation_map = { 'FUNC_API_ASYNC': '{async}', } text_width = 78 script_path = os.path.abspath(__file__) base_dir = os.path.dirname(os.path.dirname(script_path)) src_dir = os.path.join(base_dir, 'src/nvim/api') out_dir = os.path.join(base_dir, 'tmp-api-doc') filter_cmd = '%s %s' % (sys.executable, script_path) seen_funcs = set() # Tracks `xrefsect` titles. As of this writing, used only for separating # deprecated functions. xrefs = set() # XML Parsing Utilities {{{ def find_first(parent, name): """Finds the first matching node within parent.""" sub = parent.getElementsByTagName(name) if not sub: return None return sub[0] def get_children(parent, name): """Yield matching child nodes within parent.""" for child in parent.childNodes: if child.nodeType == child.ELEMENT_NODE and child.nodeName == name: yield child def get_child(parent, name): """Get the first matching child node.""" for child in get_children(parent, name): return child return None def clean_text(text): """Cleans text. Only cleans superfluous whitespace at the moment. """ return ' '.join(text.split()).strip() def clean_lines(text): """Removes superfluous lines. The beginning and end of the string is trimmed. Empty lines are collapsed. """ return re.sub(r'\A\n\s*\n*|\n\s*\n*\Z', '', re.sub(r'(\n\s*\n+)+', '\n\n', text)) def get_text(parent): """Combine all text in a node.""" if parent.nodeType == parent.TEXT_NODE: return parent.data out = '' for node in parent.childNodes: if node.nodeType == node.TEXT_NODE: out += clean_text(node.data) elif node.nodeType == node.ELEMENT_NODE: out += ' ' + get_text(node) return out def doc_wrap(text, prefix='', width=70, func=False): """Wraps text to `width`. The first line is prefixed with `prefix`, and subsequent lines are aligned. If `func` is True, only wrap at commas. """ if not width: return text indent_space = ' ' * len(prefix) if func: lines = [prefix] for part in text.split(', '): if part[-1] not in ');': part += ', ' if len(lines[-1]) + len(part) > width: lines.append(indent_space) lines[-1] += part return '\n'.join(x.rstrip() for x in lines).rstrip() return '\n'.join(textwrap.wrap(text.strip(), width=width, initial_indent=prefix, subsequent_indent=indent_space)) def parse_params(parent, width=62): """Parse Doxygen `parameterlist`.""" name_length = 0 items = [] for child in parent.childNodes: if child.nodeType == child.TEXT_NODE: continue name_node = find_first(child, 'parametername') if name_node.getAttribute('direction') == 'out': continue name = get_text(name_node) if name in param_exclude: continue name = '{%s}' % name name_length = max(name_length, len(name) + 2) desc = '' desc_node = get_child(child, 'parameterdescription') if desc_node: desc = parse_parblock(desc_node, width=None) items.append((name.strip(), desc.strip())) out = 'Parameters:~\n' for name, desc in items: name = ' %s' % name.ljust(name_length) out += doc_wrap(desc, prefix=name, width=width) + '\n' return out.strip() def parse_para(parent, width=62): """Parse doxygen `para` tag. I assume is a paragraph block or "a block of text". It can contain text nodes, or other tags. """ line = '' lines = [] for child in parent.childNodes: if child.nodeType == child.TEXT_NODE: line += child.data elif child.nodeName == 'computeroutput': line += '`%s`' % get_text(child) else: if line: lines.append(doc_wrap(line, width=width)) line = '' if child.nodeName == 'parameterlist': lines.append(parse_params(child, width=width)) elif child.nodeName == 'xrefsect': title = get_text(get_child(child, 'xreftitle')) xrefs.add(title) xrefdesc = parse_para(get_child(child, 'xrefdescription')) lines.append(doc_wrap(xrefdesc, prefix='%s: ' % title, width=width) + '\n') elif child.nodeName == 'simplesect': kind = child.getAttribute('kind') if kind == 'note': lines.append('Note:') lines.append(doc_wrap(parse_para(child), prefix=' ', width=width)) elif kind == 'return': lines.append('%s:~' % kind.title()) lines.append(doc_wrap(parse_para(child), prefix=' ', width=width)) else: lines.append(get_text(child)) if line: lines.append(doc_wrap(line, width=width)) return clean_lines('\n'.join(lines).strip()) def parse_parblock(parent, width=62): """Parses a nested block of `para` tags. Named after the \parblock command, but not directly related. """ paragraphs = [] for child in parent.childNodes: if child.nodeType == child.TEXT_NODE: paragraphs.append(doc_wrap(child.data, width=width)) elif child.nodeName == 'para': paragraphs.append(parse_para(child, width=width)) else: paragraphs.append(doc_wrap(get_text(child), width=width)) paragraphs.append('') return clean_lines('\n'.join(paragraphs).strip()) # }}} def parse_source_xml(filename): """Collects API functions. This returns two strings: 1. The API functions 2. The deprecated API functions The caller decides what to do with the deprecated documentation. """ global xrefs xrefs = set() functions = [] deprecated_functions = [] dom = minidom.parse(filename) for member in dom.getElementsByTagName('memberdef'): if member.getAttribute('static') == 'yes' or \ member.getAttribute('kind') != 'function': continue loc = find_first(member, 'location') if 'private' in loc.getAttribute('file'): continue return_type = get_text(get_child(member, 'type')) if return_type == '': continue if return_type.startswith(('ArrayOf', 'DictionaryOf')): parts = return_type.strip('_').split('_') return_type = '%s(%s)' % (parts[0], ', '.join(parts[1:])) name = get_text(get_child(member, 'name')) annotations = get_text(get_child(member, 'argsstring')) if annotations and ')' in annotations: annotations = annotations.rsplit(')', 1)[-1].strip() # XXX: (doxygen 1.8.11) 'argsstring' only includes FUNC_ATTR_* # attributes if the function signature is non-void. # Force attributes here for such functions. if name == 'nvim_get_mode' and len(annotations) == 0: annotations += 'FUNC_API_ASYNC' annotations = filter(None, map(lambda x: annotation_map.get(x), annotations.split())) vimtag = '*%s()*' % name args = [] type_length = 0 for param in get_children(member, 'param'): arg_type = get_text(get_child(param, 'type')).strip() arg_name = '' declname = get_child(param, 'declname') if declname: arg_name = get_text(declname).strip() if arg_name in param_exclude: continue if arg_type.endswith('*'): arg_type = arg_type.strip('* ') arg_name = '*' + arg_name type_length = max(type_length, len(arg_type)) args.append((arg_type, arg_name)) c_args = [] for arg_type, arg_name in args: c_args.append(' ' + ( '%s %s' % (arg_type.ljust(type_length), arg_name)).strip()) c_decl = textwrap.indent('%s %s(\n%s\n);' % (return_type, name, ',\n'.join(c_args)), ' ') prefix = '%s(' % name suffix = '%s)' % ', '.join('{%s}' % a[1] for a in args if a[0] not in ('void', 'Error')) # Minimum 8 chars between signature and vimtag lhs = (text_width - 8) - len(prefix) if len(prefix) + len(suffix) > lhs: signature = vimtag.rjust(text_width) + '\n' signature += doc_wrap(suffix, width=text_width-8, prefix=prefix, func=True) else: signature = prefix + suffix signature += vimtag.rjust(text_width - len(signature)) doc = '' desc = find_first(member, 'detaileddescription') if desc: doc = parse_parblock(desc) if 'DEBUG' in os.environ: print(textwrap.indent( re.sub(r'\n\s*\n+', '\n', desc.toprettyxml(indent=' ', newl='\n')), ' ' * 16)) if not doc: doc = 'TODO: Documentation' annotations = '\n'.join(annotations) if annotations: annotations = ('\n\nAttributes:~\n' + textwrap.indent(annotations, ' ')) i = doc.rfind('Parameters:~') if i == -1: doc += annotations else: doc = doc[:i] + annotations + '\n\n' + doc[i:] if 'INCLUDE_C_DECL' in os.environ: doc += '\n\nC Declaration:~\n>\n' doc += c_decl doc += '\n<' func_doc = signature + '\n' func_doc += textwrap.indent(clean_lines(doc), ' ' * 16) func_doc = re.sub(r'^\s+([<>])$', r'\1', func_doc, flags=re.M) if 'Deprecated' in xrefs: deprecated_functions.append(func_doc) else: functions.append(func_doc) xrefs.clear() return '\n\n'.join(functions), '\n\n'.join(deprecated_functions) def delete_lines_below(filename, tokenstr): """Deletes all lines below the line containing `tokenstr`, the line itself, and one line above it. """ lines = open(filename).readlines() i = 0 for i, line in enumerate(lines, 1): if tokenstr in line: break i = max(0, i - 2) with open(filename, 'wt') as fp: fp.writelines(lines[0:i]) def gen_docs(config): """Generate documentation. Doxygen is called and configured through stdin. """ p = subprocess.Popen(['doxygen', '-'], stdin=subprocess.PIPE) p.communicate(config.format(input=src_dir, output=out_dir, filter=filter_cmd).encode('utf8')) if p.returncode: sys.exit(p.returncode) sections = {} sep = '=' * text_width base = os.path.join(out_dir, 'xml') dom = minidom.parse(os.path.join(base, 'index.xml')) for compound in dom.getElementsByTagName('compound'): if compound.getAttribute('kind') != 'file': continue filename = get_text(find_first(compound, 'name')) if filename.endswith('.c'): functions, deprecated = parse_source_xml( os.path.join(base, '%s.xml' % compound.getAttribute('refid'))) if not functions and not deprecated: continue if functions or deprecated: name = os.path.splitext(os.path.basename(filename))[0] if name == 'ui': name = name.upper() else: name = name.title() doc = '' if functions: doc += '\n\n' + functions if 'INCLUDE_DEPRECATED' in os.environ and deprecated: doc += '\n\n\nDeprecated %s Functions:~\n\n' % name doc += deprecated if doc: filename = os.path.basename(filename) name = section_name.get(filename, name) title = '%s Functions' % name helptag = '*api-%s*' % name.lower() sections[filename] = (title, helptag, doc) if not sections: return docs = '' i = 0 for filename in section_order: if filename not in sections: continue title, helptag, section_doc = sections.pop(filename) i += 1 docs += sep docs += '\n%s%s' % (title, helptag.rjust(text_width - len(title))) docs += section_doc docs += '\n\n\n' if sections: # In case new API sources are added without updating the order dict. for title, helptag, section_doc in sections.values(): i += 1 docs += sep docs += '\n%s%s' % (title, helptag.rjust(text_width - len(title))) docs += section_doc docs += '\n\n\n' docs = docs.rstrip() + '\n\n' docs += ' vim:tw=78:ts=8:ft=help:norl:' doc_file = os.path.join(base_dir, 'runtime/doc', doc_filename) delete_lines_below(doc_file, section_start_token) with open(doc_file, 'ab') as fp: fp.write(docs.encode('utf8')) shutil.rmtree(out_dir) def filter_source(filename): """Filters the source to fix macros that confuse Doxygen.""" with open(filename, 'rt') as fp: print(re.sub(r'^(ArrayOf|DictionaryOf)(\(.*?\))', lambda m: m.group(1)+'_'.join( re.split(r'[^\w]+', m.group(2))), fp.read(), flags=re.M)) # Doxygen Config {{{ Doxyfile = ''' OUTPUT_DIRECTORY = {output} INPUT = {input} INPUT_ENCODING = UTF-8 FILE_PATTERNS = *.h *.c RECURSIVE = YES INPUT_FILTER = "{filter}" EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = */private/* EXCLUDE_SYMBOLS = GENERATE_HTML = NO GENERATE_DOCSET = NO GENERATE_HTMLHELP = NO GENERATE_QHP = NO GENERATE_TREEVIEW = NO GENERATE_LATEX = NO GENERATE_RTF = NO GENERATE_MAN = NO GENERATE_DOCBOOK = NO GENERATE_AUTOGEN_DEF = NO GENERATE_XML = YES XML_OUTPUT = xml XML_PROGRAMLISTING = NO ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = NO ''' # }}} if __name__ == "__main__": if len(sys.argv) > 1: filter_source(sys.argv[1]) else: gen_docs(Doxyfile) # vim: set ft=python ts=4 sw=4 tw=79 et fdm=marker : neovim-0.2.2/scripts/genappimage.sh000077500000000000000000000053271320401574200173200ustar00rootroot00000000000000#!/bin/bash ######################################################################## # Package the binaries built as an AppImage # By Simon Peter 2016 # For more information, see http://appimage.org/ ######################################################################## # App arch, used by generate_appimage. if [ -z "$ARCH" ]; then export ARCH="$(arch)" fi # App name, used by generate_appimage. APP=nvim ROOT_DIR="$(git rev-parse --show-toplevel)" APP_BUILD_DIR="$ROOT_DIR/build" APP_DIR="$APP.AppDir" ######################################################################## # Compile nvim and install it into AppDir ######################################################################## # Build and install nvim into the AppImage make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=${APP_DIR}/usr -DCMAKE_INSTALL_MANDIR=man" make install ######################################################################## # Get helper functions and move to AppDir ######################################################################## # App version, used by generate_appimage. VERSION=$("$ROOT_DIR"/build/bin/nvim --version | head -n 1 | grep -o 'v.*') cd "$APP_BUILD_DIR" curl -Lo "$APP_BUILD_DIR"/appimage_functions.sh https://github.com/probonopd/AppImages/raw/master/functions.sh . ./appimage_functions.sh # Copy desktop and icon file to AppDir for AppRun to pick them up. # get_apprun # get_desktop cp "$ROOT_DIR/runtime/nvim.desktop" "$APP_DIR/" cp "$ROOT_DIR/runtime/nvim.png" "$APP_DIR/" cd "$APP_DIR" # copy dependencies copy_deps # Move the libraries to usr/bin move_lib # Delete stuff that should not go into the AppImage. # Delete dangerous libraries; see # https://github.com/probonopd/AppImages/blob/master/excludelist delete_blacklisted ######################################################################## # AppDir complete. Now package it as an AppImage. ######################################################################## # No need for a fancy script. AppRun can just be a symlink to nvim. ln -s usr/bin/nvim AppRun cd "$APP_BUILD_DIR" # Get out of AppImage directory. # Generate AppImage. # - Expects: $ARCH, $APP, $VERSION env vars # - Expects: ./$APP.AppDir/ directory # - Produces: ../out/$APP-$VERSION.glibc$GLIBC_NEEDED-$ARCH.AppImage generate_appimage # NOTE: There is currently a bug in the `generate_appimage` function (see # https://github.com/probonopd/AppImages/issues/228) that causes repeated builds # that result in the same name to fail. # Moving the final executable to a different folder gets around this issue. mv "$ROOT_DIR"/out/*.AppImage "$ROOT_DIR"/build/bin # Remove the (now empty) folder the AppImage was built in rmdir "$ROOT_DIR"/out echo 'genappimage.sh: finished' neovim-0.2.2/scripts/genvimvim.lua000066400000000000000000000057361320401574200172140ustar00rootroot00000000000000mpack = require('mpack') if arg[1] == '--help' then print('Usage: lua genvimvim.lua src/nvim runtime/syntax/vim/generated.vim') os.exit(0) end local nvimsrcdir = arg[1] local syntax_file = arg[2] local funcs_file = arg[3] package.path = nvimsrcdir .. '/?.lua;' .. package.path local lld = {} local syn_fd = io.open(syntax_file, 'w') lld.line_length = 0 local w = function(s) syn_fd:write(s) if s:find('\n') then lld.line_length = #(s:gsub('.*\n', '')) else lld.line_length = lld.line_length + #s end end local options = require('options') local auevents = require('auevents') local ex_cmds = require('ex_cmds') local cmd_kw = function(prev_cmd, cmd) if not prev_cmd then return cmd:sub(1, 1) .. '[' .. cmd:sub(2) .. ']' else local shift = 1 while cmd:sub(shift, shift) == prev_cmd:sub(shift, shift) do shift = shift + 1 end if shift >= #cmd then return cmd else return cmd:sub(1, shift) .. '[' .. cmd:sub(shift + 1) .. ']' end end end vimcmd_start = 'syn keyword vimCommand contained ' w(vimcmd_start) local prev_cmd = nil for _, cmd_desc in ipairs(ex_cmds) do if lld.line_length > 850 then w('\n' .. vimcmd_start) end local cmd = cmd_desc.command if cmd:match('%w') and cmd ~= 'z' then w(' ' .. cmd_kw(prev_cmd, cmd)) end prev_cmd = cmd end local vimopt_start = 'syn keyword vimOption contained ' w('\n\n' .. vimopt_start) for _, opt_desc in ipairs(options.options) do if not opt_desc.varname or opt_desc.varname:sub(1, 7) ~= 'p_force' then if lld.line_length > 850 then w('\n' .. vimopt_start) end w(' ' .. opt_desc.full_name) if opt_desc.abbreviation then w(' ' .. opt_desc.abbreviation) end if opt_desc.type == 'bool' then w(' inv' .. opt_desc.full_name) w(' no' .. opt_desc.full_name) if opt_desc.abbreviation then w(' inv' .. opt_desc.abbreviation) w(' no' .. opt_desc.abbreviation) end end end end w('\n\nsyn case ignore') local vimau_start = 'syn keyword vimAutoEvent contained ' w('\n\n' .. vimau_start) for _, au in ipairs(auevents.events) do if not auevents.neovim_specific[au] then if lld.line_length > 850 then w('\n' .. vimau_start) end w(' ' .. au) end end for au, _ in pairs(auevents.aliases) do if not auevents.neovim_specific[au] then if lld.line_length > 850 then w('\n' .. vimau_start) end w(' ' .. au) end end local nvimau_start = 'syn keyword nvimAutoEvent contained ' w('\n\n' .. nvimau_start) for au, _ in pairs(auevents.neovim_specific) do if lld.line_length > 850 then w('\n' .. nvimau_start) end w(' ' .. au) end w('\n\nsyn case match') local vimfun_start = 'syn keyword vimFuncName contained ' w('\n\n' .. vimfun_start) funcs = mpack.unpack(io.open(funcs_file):read("*all")) local started = 0 for name, def in pairs(funcs) do if name then if lld.line_length > 850 then w('\n' .. vimfun_start) end w(' ' .. name) end end w('\n') syn_fd:close() neovim-0.2.2/scripts/git-log-pretty-since.sh000077500000000000000000000014441320401574200210250ustar00rootroot00000000000000#!/usr/bin/env bash # Shows a log with changes grouped next to their merge-commit. # # Parameters: # $1 "since" commit # $2 "inverse match" regex pattern set -e set -u set -o pipefail __SINCE=$1 __INVMATCH=$2 is_merge_commit() { git rev-parse $1 >/dev/null 2>&1 \ || { echo "ERROR: invalid commit: $1"; exit 1; } git log $1^2 >/dev/null 2>&1 && return 0 || return 1 } for commit in $(git log --format='%H' --first-parent "$__SINCE"..HEAD); do if is_merge_commit ${commit} ; then if [ -z "$__INVMATCH" ] || ! git log --oneline ${commit}^1..${commit}^2 \ | grep -E "$__INVMATCH" >/dev/null 2>&1 ; then git log -1 --oneline ${commit} git log --format=' %h %s' ${commit}^1..${commit}^2 fi else git log -1 --oneline ${commit} fi done neovim-0.2.2/scripts/legacy2luatest.pl000077500000000000000000000165751320401574200200030ustar00rootroot00000000000000#!/usr/bin/env perl use strict; use warnings; use 5.010; use autodie; use File::Basename; use File::Spec::Functions; sub read_in_file { my $in_file = $_[0]; # Will contain lines before first STARTTEST # as Lua comments. my @description_lines = (); # Will contain alternating blocks of lines of textual input # (text between ENDTEST and EOF/next STARTTEST) and test commands # (commands between STARTTEST and ENDTEST) as Lua code. my @test_body_lines = (); # Will contain current command block, i.e. lines # between STARTTEST and ENDTEST. my @command_lines = (); # Will contain current input block, i.e. lines # between ENDTEST and STARTTEST. my @input_lines = (); open my $in_file_handle, '<', $in_file; use constant EMIT_DESCRIPTION => 0; use constant EMIT_COMMAND => 1; use constant EMIT_INPUT => 2; # Push lines from current input and # command blocks into @test_body_lines # in the correct order. sub end_input { my $input_lines = $_[0]; my $command_lines = $_[1]; my $test_body_lines = $_[2]; # If there are input lines, wrap with an `insert` # command and add before the previous command block. if (@{$input_lines}) { my $last_input_line = pop @{$input_lines}; unshift @{$command_lines}, ''; unshift @{$command_lines}, $last_input_line . ']=])'; unshift @{$command_lines}, @{$input_lines}; unshift @{$command_lines}, "insert([=["; @{$input_lines} = (); } # Output remaining command lines. push @{$test_body_lines}, @{$command_lines}; @{$command_lines} = (); } sub format_comment { # Handle empty comments. if (/^$/) { return ''; } # Capitalize first character and emit as Lua comment. my $comment = '-- ' . ucfirst $_; # Add trailing dot if not already there. $comment .= '.' unless $comment =~ /\.$/; return $comment; } my %states = ( # Add test description to @description_lines. EMIT_DESCRIPTION() => sub { if (/^STARTTEST/) { return EMIT_COMMAND; } # If not an empty line, emit as Lua comment. if (!/^$/) { # Remove modeline s/vim:.*set f\w+=vim//g; # Remove trailing ":" s/\s*:\s*$//g; push @description_lines, '-- ' . $_; } return EMIT_DESCRIPTION; }, # Add test commands to @command_lines. EMIT_COMMAND() => sub { if (/^ENDTEST/) { return EMIT_INPUT; } # If line starts with ':"', emit a comment. if (/^:"/) { # Remove Vim comment prefix. s/^:"\s*//; push @command_lines, format_comment $_; return EMIT_COMMAND; } # Extract possible inline comment. if (/^[^"]*"[^"]*$/) { # Remove command part and prepended whitespace. s/^(.*?)\s*"\s*//; push @command_lines, format_comment $_; # Set implicit variable to command without comment. $_ = $1; } # Only continue if remaining command is not empty. if (!/^:?\s*$/) { # Replace terminal escape characters with . s/\e//g; my $startstr = "'"; my $endstr = "'"; # If line contains single quotes or backslashes, use double # square brackets to wrap string. if (/'/ || /\\/) { # If the line contains a closing square bracket, # wrap it with [=[...]=]. if (/\]/) { $startstr = '[=['; $endstr = ']=]'; } else { $startstr = '[['; $endstr = ']]'; } } # Emit 'feed' if not a search ('/') or ex (':') command. if (!/^\// && !/^:/) { # If command does not end with , insert trailing . my $command = 'feed(' . $startstr . $_; $command .= '' unless /$/; $command .= $endstr . ')'; push @command_lines, $command; } else { # Remove prepending ':'. s/^://; push @command_lines, 'execute(' . $startstr . $_ . $endstr . ')'; } } return EMIT_COMMAND; }, # Add input to @input_lines. EMIT_INPUT() => sub { if (/^STARTTEST/) { end_input \@input_lines, \@command_lines, \@test_body_lines; return EMIT_COMMAND; } # Skip initial lines if they are empty. if (@input_lines or !/^$/) { push @input_lines, ' ' . $_; } return EMIT_INPUT; }, ); my $state = EMIT_DESCRIPTION; while (<$in_file_handle>) { # Remove trailing newline character and process line. chomp; $state = $states{$state}->($_); } # If not all lines have been processed yet, # do it now. end_input \@input_lines, \@command_lines, \@test_body_lines; close $in_file_handle; return (\@description_lines, \@test_body_lines); } sub read_ok_file { my $ok_file = $_[0]; my @assertions = (); if (-f $ok_file) { push @assertions, ''; push @assertions, "-- Assert buffer contents."; push @assertions, "expect([=["; open my $ok_file_handle, '<', $ok_file; while (<$ok_file_handle>) { # Remove trailing newline character and process line. chomp; push @assertions, ' ' . $_; } close $ok_file_handle; $assertions[-1] .= "]=])"; } return \@assertions; } my $legacy_testfile = $ARGV[0]; my $out_dir = $ARGV[1]; if ($#ARGV != 1) { say "Convert a legacy Vim test to a Neovim lua spec."; say ''; say "Usage: $0 legacy-testfile output-directory"; say ''; say "legacy-testfile: Path to .in or .ok file."; say "output-directory: Directory where Lua spec will be saved to."; say ''; say "Note: Only works reliably for fairly simple tests."; say " Manual adjustments to generated spec files are required."; exit 1; } my @legacy_suffixes = ('.in', '.ok'); my ($base_name, $base_path, $suffix) = fileparse($legacy_testfile, @legacy_suffixes); my $in_file = catfile($base_path, $base_name . '.in'); my $ok_file = catfile($base_path, $base_name . '.ok'); # Remove leading 'test'. my $test_name = $base_name; $test_name =~ s/^test_?//; my $spec_file = do { if ($test_name =~ /^([0-9]+)/) { catfile($out_dir, sprintf('%03d', $1) . '_spec.lua') } else { catfile($out_dir, $test_name . '_spec.lua') } }; if (! -f $in_file) { say "Test input file $in_file not found."; exit 2; } if (! -d $out_dir) { say "Output directory $out_dir does not exist."; exit 3; } if (-f $spec_file) { say "Output file $spec_file already exists."; print "Overwrite (Y/n)? "; my $input = ; chomp($input); unless ($input =~ /^y|Y/) { say "Aborting."; exit 4; } } # Read .in and .ok files. my ($description_lines, $test_body_lines) = read_in_file $in_file; my $assertion_lines = read_ok_file $ok_file; # Append assertions to test body. push @{$test_body_lines}, @{$assertion_lines} if @{$assertion_lines}; # Write spec file. open my $spec_file_handle, ">", $spec_file; print $spec_file_handle <<"EOS"; @{[join "\n", @{$description_lines}]} local helpers = require('test.functional.helpers') local feed, insert, source = helpers.feed, helpers.insert, helpers.source local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect describe('$test_name', function() before_each(clear) it('is working', function() @{[join "\n", map { /^$/ ? '' : ' ' . $_ } @{$test_body_lines}]} end) end) EOS close $spec_file_handle; say "Written to $spec_file." neovim-0.2.2/scripts/movedocs.pl000077500000000000000000000065521320401574200166640ustar00rootroot00000000000000#!/usr/bin/perl use strict; use warnings; if ($ARGV[0] eq '--help') { print << "EOF"; Usage: $0 file.h file.c Removes documentation attached to function declarations in file.h and adds them to function definitions found in file.c. $0 file.c Moves documentation attached to function declaration present in the same file as the definition. EOF exit 0; } my $hfile = shift @ARGV; my @cfiles = @ARGV; my %docs = (); my $F; sub write_lines { my $file = shift; my @lines = @_; my $F; open $F, '>', $file; print $F (join "", @lines); close $F; } if (@cfiles) { open $F, '<', $hfile or die "Failed to open $hfile."; my @hlines = (); my $lastdoc = ''; while (<$F>) { if (/^\/\/\/?/) { $lastdoc .= $_; } elsif (/^\S.*?(\w+)\(.*(?:,|\);?|FUNC_ATTR_\w+;?)$/) { die "Documentation for $1 was already defined" if (defined $docs{$1}); if ($lastdoc ne '') { $docs{$1} = $lastdoc; $lastdoc = ''; } push @hlines, $_; } elsif ($lastdoc ne '') { push @hlines, $lastdoc; $lastdoc = ''; push @hlines, $_; } else { push @hlines, $_; } } close $F; my %clines_hash = (); for my $cfile (@cfiles) { open $F, '<', $cfile or die "Failed to open $cfile."; my @clines = (); while (<$F>) { if (/^\S.*?(\w+)\(.*[,)]$/ and defined $docs{$1}) { push @clines, $docs{$1}; delete $docs{$1}; } elsif (/^(?!static\s)\S.*?(\w+)\(.*[,)]$/ and not defined $docs{$1}) { print STDERR "Documentation not defined for $1\n"; } push @clines, $_; } close $F; $clines_hash{$cfile} = \@clines; } while (my ($func, $value) = each %docs) { die "Function not found: $func\n"; } write_lines($hfile, @hlines); while (my ($cfile, $clines) = each %clines_hash) { write_lines($cfile, @$clines); } } else { open $F, '<', $hfile; my @lines; my $lastdoc = ''; my $defstart = ''; my $funcname; sub clear_lastdoc { if ($lastdoc ne '') { push @lines, $lastdoc; $lastdoc = ''; } } sub record_lastdoc { my $funcname = shift; if ($lastdoc ne '') { $docs{$funcname} = $lastdoc; $lastdoc = ''; } } sub add_doc { my $funcname = shift; if (defined $docs{$funcname}) { push @lines, $docs{$funcname}; delete $docs{$funcname}; } } sub clear_defstart { push @lines, $defstart; $defstart = ''; } while (<$F>) { if (/\/\*/ .. /\*\// and not /\/\*.*?\*\//) { push @lines, $_; } elsif (/^\/\/\/?/) { $lastdoc .= $_; } elsif (/^\S.*?(\w+)\(.*(?:,|(\);?))$/) { if (not $2) { $defstart .= $_; $funcname = $1; } elsif ($2 eq ');') { record_lastdoc $1; push @lines, $_; } elsif ($2 eq ')') { clear_lastdoc; add_doc $1; push @lines, $_; } } elsif ($defstart ne '') { $defstart .= $_; if (/[{}]/) { clear_lastdoc; clear_defstart; } elsif (/\);$/) { record_lastdoc $funcname; clear_defstart; } elsif (/\)$/) { clear_lastdoc; add_doc $funcname; clear_defstart; } } else { clear_lastdoc; push @lines, $_; } } close $F; while (my ($func, $value) = each %docs) { die "Function not found: $func\n"; } write_lines($hfile, @lines); } neovim-0.2.2/scripts/pvscheck.sh000077500000000000000000000303341320401574200166450ustar00rootroot00000000000000#!/bin/sh # Assume that "local" is available. # shellcheck disable=SC2039 set -e # Note: -u causes problems with posh, it barks at “undefined” $@ when no # arguments provided. test -z "$POSH_VERSION" && set -u get_jobs_num() { if [ -n "${TRAVIS:-}" ] ; then # HACK: /proc/cpuinfo on Travis CI is misleading, so hardcode 1. echo 1 else echo $(( $(grep -c "^processor" /proc/cpuinfo) + 1 )) fi } help() { echo 'Usage:' echo ' pvscheck.sh [--pvs URL] [--deps] [--environment-cc]' echo ' [target-directory [branch]]' echo ' pvscheck.sh [--pvs URL] [--recheck] [--environment-cc]' echo ' [target-directory]' echo ' pvscheck.sh [--pvs URL] --only-analyse [target-directory]' echo ' pvscheck.sh [--pvs URL] --pvs-install {target-directory}' echo ' pvscheck.sh --patch [--only-build]' echo echo ' --pvs: Use the specified URL as a path to pvs-studio archive.' echo ' By default latest tested version is used.' echo echo ' May use "--pvs detect" to try detecting latest version.' echo ' That assumes certain viva64.com site properties and' echo ' may be broken by the site update.' echo echo ' --deps: (for regular run) Use top-level Makefile and build deps.' echo ' Without this it assumes all dependencies are already' echo ' installed.' echo echo ' --environment-cc: (for regular run and --recheck) Do not export' echo ' CC=clang. Build is still run with CFLAGS=-O0.' echo echo ' --only-build: (for --patch) Only patch files in ./build directory.' echo echo ' --pvs-install: Only install PVS-studio to the specified location.' echo echo ' --patch: patch sources in the current directory.' echo ' Does not patch already patched files.' echo ' Does not run analysis.' echo echo ' --recheck: run analysis on a prepared target directory.' echo echo ' --only-analyse: run analysis on a prepared target directory ' echo ' without building Neovim.' echo echo ' target-directory: Directory where build should occur.' echo ' Default: ../neovim-pvs' echo echo ' branch: Branch to check.' echo ' Default: master.' } getopts_error() { local msg="$1" ; shift local do_help= if test "$msg" = "--help" ; then msg="$1" ; shift do_help=1 fi printf '%s\n' "$msg" >&2 if test -n "$do_help" ; then printf '\n' >&2 help >&2 fi echo 'return 1' return 1 } # Usage `eval "$(getopts_long long_defs -- positionals_defs -- "$@")"` # # long_defs: list of pairs of arguments like `longopt action`. # positionals_defs: list of arguments like `action`. # # `action` is a space-separated commands: # # store_const [const] [varname] [default] # Store constant [const] (default 1) (note: eval’ed) if argument is present # (long options only). Assumes long option accepts no arguments. # store [varname] [default] # Store value. Assumes long option needs an argument. # run {func} [varname] [default] # Run function {func} and store its output to the [varname]. Assumes no # arguments accepted (long options only). # modify {func} [varname] [default] # Like run, but assumes a single argument, passed to function {func} as $1. # # All actions stores empty value if neither [varname] nor [default] are # present. [default] is evaled by top-level `eval`, so be careful. Also note # that no arguments may contain spaces, including [default] and [const]. getopts_long() { local positional= local opt_bases="" while test $# -gt 0 ; do local arg="$1" ; shift local opt_base= local act= local opt_name= if test -z "$positional" ; then if test "$arg" = "--" ; then positional=0 continue fi act="$1" ; shift opt_name="$(echo "$arg" | tr '-' '_')" opt_base="longopt_$opt_name" else if test "$arg" = "--" ; then break fi : $(( positional+=1 )) act="$arg" opt_name="arg_$positional" opt_base="positional_$positional" fi opt_bases="$opt_bases $opt_base" eval "local varname_$opt_base=$opt_name" local i=0 for act_subarg in $act ; do eval "local act_$(( i+=1 ))_$opt_base=\"\$act_subarg\"" done done # Process options local positional=0 local force_positional= while test $# -gt 0 ; do local argument="$1" ; shift local opt_base= local has_equal= local equal_arg= local is_positional= if test "$argument" = "--" ; then force_positional=1 continue elif test -z "$force_positional" && test "${argument#--}" != "$argument" then local opt_name="${argument#--}" local opt_name_striparg="${opt_name%%=*}" if test "$opt_name" = "$opt_name_striparg" ; then has_equal=0 else has_equal=1 equal_arg="${argument#*=}" opt_name="$opt_name_striparg" fi # Use trailing x to prevent stripping newlines opt_name="$(printf '%sx' "$opt_name" | tr '-' '_')" opt_name="${opt_name%x}" if test -n "$(printf '%sx' "$opt_name" | tr -d 'a-z_')" ; then getopts_error "Option contains invalid characters: $opt_name" fi opt_base="longopt_$opt_name" else : $(( positional+=1 )) opt_base="positional_$positional" is_positional=1 fi if test -n "$opt_base" ; then eval "local occurred_$opt_base=1" eval "local act_1=\"\${act_1_$opt_base:-}\"" eval "local varname=\"\${varname_$opt_base:-}\"" local need_val= local func= case "$act_1" in (store_const) eval "local const=\"\${act_2_${opt_base}:-1}\"" eval "local varname=\"\${act_3_${opt_base}:-$varname}\"" printf 'local %s=%s\n' "$varname" "$const" ;; (store) eval "varname=\"\${act_2_${opt_base}:-$varname}\"" need_val=1 ;; (run) eval "func=\"\${act_2_${opt_base}}\"" eval "varname=\"\${act_3_${opt_base}:-$varname}\"" printf 'local %s="$(%s)"\n' "$varname" "$func" ;; (modify) eval "func=\"\${act_2_${opt_base}}\"" eval "varname=\"\${act_3_${opt_base}:-$varname}\"" need_val=1 ;; ("") getopts_error --help "Wrong argument: $argument" ;; esac if test -n "$need_val" ; then local val= if test -z "$is_positional" ; then if test $has_equal = 1 ; then val="$equal_arg" else if test $# -eq 0 ; then getopts_error "Missing argument for $opt_name" fi val="$1" ; shift fi else val="$argument" fi local escaped_val="'$(printf "%s" "$val" | sed "s/'/'\\\\''/g")'" case "$act_1" in (store) printf 'local %s=%s\n' "$varname" "$escaped_val" ;; (modify) printf 'local %s="$(%s %s)"\n' "$varname" "$func" "$escaped_val" ;; esac fi fi done # Print default values when no values were provided local opt_base= for opt_base in $opt_bases ; do eval "local occurred=\"\${occurred_$opt_base:-}\"" if test -n "$occurred" ; then continue fi eval "local act_1=\"\$act_1_$opt_base\"" eval "local varname=\"\$varname_$opt_base\"" case "$act_1" in (store) eval "local varname=\"\${act_2_${opt_base}:-$varname}\"" eval "local default=\"\${act_3_${opt_base}:-}\"" printf 'local %s=%s\n' "$varname" "$default" ;; (store_const|run|modify) eval "local varname=\"\${act_3_${opt_base}:-$varname}\"" eval "local default=\"\${act_4_${opt_base}:-}\"" printf 'local %s=%s\n' "$varname" "$default" ;; esac done } get_pvs_comment() { local tgt="$1" ; shift cat > "$tgt/pvs-comment" << EOF // This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com EOF } install_pvs() {( local tgt="$1" ; shift local pvs_url="$1" ; shift cd "$tgt" mkdir pvs-studio cd pvs-studio curl -L -o pvs-studio.tar.gz "$pvs_url" tar xzf pvs-studio.tar.gz rm pvs-studio.tar.gz local pvsdir="$(find . -maxdepth 1 -mindepth 1)" find "$pvsdir" -maxdepth 1 -mindepth 1 -exec mv '{}' . \; rmdir "$pvsdir" )} create_compile_commands() {( local tgt="$1" ; shift local deps="$1" ; shift local environment_cc="$1" ; shift if test -z "$environment_cc" ; then export CC=clang fi export CFLAGS=' -O0 ' if test -z "$deps" ; then mkdir -p "$tgt/build" ( cd "$tgt/build" cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="$PWD/root" make -j"$(get_jobs_num)" ) else ( cd "$tgt" make -j"$(get_jobs_num)" CMAKE_EXTRA_FLAGS=" -DCMAKE_INSTALL_PREFIX=$PWD/root -DCMAKE_BUILD_TYPE=Debug " ) fi find "$tgt/build/src/nvim/auto" -name '*.test-include.c' -delete )} # Warning: realdir below only cares about directories unlike realpath. # # realpath is not available in Ubuntu trusty yet. realdir() {( local dir="$1" cd "$dir" printf '%s\n' "$PWD" )} patch_sources() {( local tgt="$1" ; shift local only_bulid="${1}" ; shift get_pvs_comment "$tgt" local sh_script=' pvs_comment="$(cat pvs-comment ; echo -n EOS)" filehead="$(head -c $(( ${#pvs_comment} - 3 )) "$1" ; echo -n EOS)" if test "x$filehead" != "x$pvs_comment" ; then cat pvs-comment "$1" > "$1.tmp" mv "$1.tmp" "$1" fi ' cd "$tgt" if test "$only_build" != "--only-build" ; then find \ src/nvim test/functional/fixtures test/unit/fixtures \ -name '*.c' \ -exec /bin/sh -c "$sh_script" - '{}' \; fi find \ build/src/nvim/auto build/config \ -name '*.c' -not -name '*.test-include.c' \ -exec /bin/sh -c "$sh_script" - '{}' \; rm pvs-comment )} run_analysis() {( local tgt="$1" ; shift cd "$tgt" pvs-studio-analyzer \ analyze \ --threads "$(get_jobs_num)" \ --output-file PVS-studio.log \ --verbose \ --file build/compile_commands.json \ --sourcetree-root . plog-converter -t xml -o PVS-studio.xml PVS-studio.log plog-converter -t errorfile -o PVS-studio.err PVS-studio.log plog-converter -t tasklist -o PVS-studio.tsk PVS-studio.log )} do_check() { local tgt="$1" ; shift local branch="$1" ; shift local pvs_url="$1" ; shift local deps="$1" ; shift local environment_cc="$1" ; shift git clone --branch="$branch" . "$tgt" install_pvs "$tgt" "$pvs_url" do_recheck "$tgt" "$deps" "$environment_cc" } do_recheck() { local tgt="$1" ; shift local deps="$1" ; shift local environment_cc="$1" ; shift create_compile_commands "$tgt" "$deps" "$environment_cc" do_analysis "$tgt" } do_analysis() { local tgt="$1" ; shift if test -d "$tgt/pvs-studio" ; then local saved_pwd="$PWD" cd "$tgt/pvs-studio" export PATH="$PWD/bin${PATH+:}${PATH}" cd "$saved_pwd" fi run_analysis "$tgt" } detect_url() { local url="${1:-detect}" if test "$url" = detect ; then curl -L 'https://www.viva64.com/en/pvs-studio-download-linux/' \ | grep -o 'https\{0,1\}://[^"<>]\{1,\}/pvs-studio[^/"<>]*\.tgz' else printf '%s' "$url" fi } main() { local def_pvs_url="http://files.viva64.com/pvs-studio-6.15.21741.1-x86_64.tgz" eval "$( getopts_long \ help store_const \ pvs 'modify detect_url pvs_url "${def_pvs_url}"' \ patch store_const \ only-build 'store_const --only-build' \ recheck store_const \ only-analyse store_const \ pvs-install store_const \ deps store_const \ environment-cc store_const \ -- \ 'modify realdir tgt "$PWD/../neovim-pvs"' \ 'store branch master' \ -- "$@" )" if test -n "$help" ; then help return 0 fi set -x if test -n "$patch" ; then patch_sources "$tgt" "$only_build" elif test -n "$pvs_install" ; then install_pvs "$tgt" "$pvs_url" elif test -n "$recheck" ; then do_recheck "$tgt" "$deps" "$environment_cc" elif test -n "$only_analyse" ; then do_analysis "$tgt" else do_check "$tgt" "$branch" "$pvs_url" "$deps" "$environment_cc" fi } main "$@" neovim-0.2.2/scripts/release.sh000077500000000000000000000052451320401574200164620ustar00rootroot00000000000000#!/usr/bin/env bash # Performs steps to tag a release. # # Steps: # Create the "release" commit: # - CMakeLists.txt: Unset NVIM_VERSION_PRERELEASE # - CMakeLists.txt: Unset NVIM_API_PRERELEASE # - Tag the commit. # Create the "version bump" commit: # - CMakeLists.txt: Set NVIM_VERSION_PRERELEASE to "-dev" # # Manual steps: # - CMakeLists.txt: Bump NVIM_VERSION_* as appropriate. # - git push --follow-tags set -e set -u set -o pipefail USE_CURRENT_COMMIT=${1:-no} __sed=$( [ "$(uname)" = Darwin ] && echo 'sed -E' || echo 'sed -r' ) cd "$(git rev-parse --show-toplevel)" __LAST_TAG=$(git describe --abbrev=0) [ -z "$__LAST_TAG" ] && { echo 'ERROR: no tag found'; exit 1; } __VERSION_MAJOR=$(grep 'set(NVIM_VERSION_MAJOR' CMakeLists.txt\ |$__sed 's/.*NVIM_VERSION_MAJOR ([[:digit:]]).*/\1/') __VERSION_MINOR=$(grep 'set(NVIM_VERSION_MINOR' CMakeLists.txt\ |$__sed 's/.*NVIM_VERSION_MINOR ([[:digit:]]).*/\1/') __VERSION_PATCH=$(grep 'set(NVIM_VERSION_PATCH' CMakeLists.txt\ |$__sed 's/.*NVIM_VERSION_PATCH ([[:digit:]]).*/\1/') __VERSION="${__VERSION_MAJOR}.${__VERSION_MINOR}.${__VERSION_PATCH}" __API_LEVEL=$(grep 'set(NVIM_API_LEVEL ' CMakeLists.txt\ |$__sed 's/.*NVIM_API_LEVEL ([[:digit:]]).*/\1/') { [ -z "$__VERSION_MAJOR" ] || [ -z "$__VERSION_MINOR" ] || [ -z "$__VERSION_PATCH" ]; } \ && { echo "ERROR: version parse failed: '${__VERSION}'"; exit 1; } __RELEASE_MSG="NVIM v${__VERSION} FEATURES: FIXES: CHANGES: " __BUMP_MSG="version bump" echo "Most recent tag: ${__LAST_TAG}" echo "Release version: ${__VERSION}" $__sed -i.bk 's/(NVIM_VERSION_PRERELEASE) "-dev"/\1 ""/' CMakeLists.txt if grep '(NVIM_API_PRERELEASE true)' CMakeLists.txt > /dev/null; then $__sed -i.bk 's/(NVIM_API_PRERELEASE) true/\1 false/' CMakeLists.txt build/bin/nvim --api-info > test/functional/fixtures/api_level_$__API_LEVEL.mpack git add test/functional/fixtures/api_level_$__API_LEVEL.mpack fi if ! test "$USE_CURRENT_COMMIT" = 'use-current-commit' ; then echo "Building changelog since ${__LAST_TAG}..." __CHANGELOG="$(./scripts/git-log-pretty-since.sh "$__LAST_TAG" 'vim-patch:\S')" git add CMakeLists.txt git commit --edit -m "${__RELEASE_MSG} ${__CHANGELOG}" fi git tag --sign -a v"${__VERSION}" -m "NVIM v${__VERSION}" $__sed -i.bk 's/(NVIM_VERSION_PRERELEASE) ""/\1 "-dev"/' CMakeLists.txt $__sed -i.bk 's/set\((NVIM_VERSION_PATCH) [[:digit:]]/set(\1 ?/' CMakeLists.txt nvim +'/NVIM_VERSION' +10new +'exe "norm! iUpdate version numbers!!!\"' \ +'norm! 10.' CMakeLists.txt git add CMakeLists.txt git commit -m "$__BUMP_MSG" echo " Next steps: - Double-check NVIM_VERSION_* in CMakeLists.txt - git push --follow-tags - update website: index.html" neovim-0.2.2/scripts/run-api-tests.exp000077500000000000000000000021301320401574200177250ustar00rootroot00000000000000#!/usr/bin/env expect if {$argc < 2} { puts "Need commands for running the tests and for starting nvim" exit 1 } set timeout 60 set run_tests [split [lindex $argv 0] " "] set run_nvim [split [lindex $argv 1] " "] # don't echo to stdout log_user 0 # set NVIM_LISTEN_ADDRESS, so nvim will listen on a known socket set env(NVIM_LISTEN_ADDRESS) "/tmp/nvim-[exec date +%s%N].sock" # start nvim spawn {*}$run_nvim # save the job descriptor set nvim_id $spawn_id # Reset function that can be invoked by test runners to put nvim in a cleaner # state send { :echo "read"."y" } # wait until nvim is ready expect "ready" # run tests spawn {*}$run_tests set tests_id $spawn_id set status 1 # listen for test output in the background expect_background { * { # show test output to the user send_user -- $expect_out(buffer) } eof { # collect the exit status code set spawn_id $tests_id catch wait result set status [lindex $result 3] set spawn_id $nvim_id # quit nvim send ":qa!\r" } } # switch back nvim and wait until it exits set spawn_id $nvim_id expect eof exit $status neovim-0.2.2/scripts/shadacat.py000077500000000000000000000045741320401574200166340ustar00rootroot00000000000000#!/usr/bin/env python3.4 import os import sys import codecs from enum import Enum from datetime import datetime from functools import reduce import msgpack class EntryTypes(Enum): Unknown = -1 Missing = 0 Header = 1 SearchPattern = 2 SubString = 3 HistoryEntry = 4 Register = 5 Variable = 6 GlobalMark = 7 Jump = 8 BufferList = 9 LocalMark = 10 Change = 11 def strtrans_errors(e): if not isinstance(e, UnicodeDecodeError): raise NotImplementedError('don’t know how to handle {0} error'.format( e.__class__.__name__)) return '<{0:x}>'.format(reduce((lambda a, b: a*0x100+b), list(e.object[e.start:e.end]))), e.end codecs.register_error('strtrans', strtrans_errors) def idfunc(o): return o class CharInt(int): def __repr__(self): return super(CharInt, self).__repr__() + ' (\'%s\')' % chr(self) ctable = { bytes: lambda s: s.decode('utf-8', 'strtrans'), dict: lambda d: dict((mnormalize(k), mnormalize(v)) for k, v in d.items()), list: lambda l: list(mnormalize(i) for i in l), int: lambda n: CharInt(n) if 0x20 <= n <= 0x7E else n, } def mnormalize(o): return ctable.get(type(o), idfunc)(o) fname = sys.argv[1] try: filt = sys.argv[2] except IndexError: filt = lambda entry: True else: _filt = filt filt = lambda entry: eval(_filt, globals(), {'entry': entry}) poswidth = len(str(os.stat(fname).st_size or 1000)) class FullEntry(dict): def __init__(self, val): self.__dict__.update(val) with open(fname, 'rb') as fp: unpacker = msgpack.Unpacker(file_like=fp, read_size=1) max_type = max(typ.value for typ in EntryTypes) while True: try: pos = fp.tell() typ = unpacker.unpack() except msgpack.OutOfData: break else: timestamp = unpacker.unpack() time = datetime.fromtimestamp(timestamp) length = unpacker.unpack() if typ > max_type: entry = fp.read(length) typ = EntryTypes.Unknown else: entry = unpacker.unpack() typ = EntryTypes(typ) full_entry = FullEntry({ 'value': entry, 'timestamp': timestamp, 'time': time, 'length': length, 'pos': pos, 'type': typ, }) if not filt(full_entry): continue print('%*u %13s %s %5u %r' % ( poswidth, pos, typ.name, time.isoformat(), length, mnormalize(entry))) neovim-0.2.2/scripts/stripdecls.py000077500000000000000000000101011320401574200172170ustar00rootroot00000000000000#!/usr/bin/python # vim: set fileencoding=utf-8: from __future__ import print_function, unicode_literals, division from clang.cindex import Index, CursorKind from collections import namedtuple, OrderedDict, defaultdict import sys import os DECL_KINDS = { CursorKind.FUNCTION_DECL, } Strip = namedtuple('Strip', 'start_line start_column end_line end_column') def main(progname, cfname, only_static, move_all): only_static = False cfname = os.path.abspath(os.path.normpath(cfname)) hfname1 = os.path.splitext(cfname)[0] + os.extsep + 'h' hfname2 = os.path.splitext(cfname)[0] + '_defs' + os.extsep + 'h' files_to_modify = (cfname, hfname1, hfname2) index = Index.create() src_dirname = os.path.join(os.path.dirname(__file__), '..', 'src') src_dirname = os.path.abspath(os.path.normpath(src_dirname)) relname = os.path.join(src_dirname, 'nvim') unit = index.parse(cfname, args=('-I' + src_dirname, '-DUNIX', '-DEXITFREE', '-DFEAT_USR_CMDS', '-DFEAT_CMDL_COMPL', '-DFEAT_COMPL_FUNC', '-DPROTO', '-DUSE_MCH_ERRMSG')) cursor = unit.cursor tostrip = defaultdict(OrderedDict) definitions = set() for child in cursor.get_children(): if not (child.location and child.location.file): continue fname = os.path.abspath(os.path.normpath(child.location.file.name)) if fname not in files_to_modify: continue if child.kind not in DECL_KINDS: continue if only_static and next(child.get_tokens()).spelling == 'static': continue if child.is_definition() and fname == cfname: definitions.add(child.spelling) else: stripdict = tostrip[fname] assert(child.spelling not in stripdict) stripdict[child.spelling] = Strip( child.extent.start.line, child.extent.start.column, child.extent.end.line, child.extent.end.column, ) for (fname, stripdict) in tostrip.items(): if not move_all: for name in set(stripdict) - definitions: stripdict.pop(name) if not stripdict: continue if fname.endswith('.h'): is_h_file = True include_line = next(reversed(stripdict.values())).start_line + 1 else: is_h_file = False include_line = next(iter(stripdict.values())).start_line lines = None generated_existed = os.path.exists(fname + '.generated.h') with open(fname, 'rb') as F: lines = list(F) stripped = [] for name, position in reversed(stripdict.items()): sl = slice(position.start_line - 1, position.end_line) if is_h_file: include_line -= sl.stop - sl.start stripped += lines[sl] lines[sl] = () if not generated_existed: lines[include_line:include_line] = [ '#ifdef INCLUDE_GENERATED_DECLARATIONS\n', '# include "{0}.generated.h"\n'.format(os.path.relpath(fname, relname)), '#endif\n', ] with open(fname, 'wb') as F: F.writelines(lines) if __name__ == '__main__': progname = sys.argv[0] args = sys.argv[1:] if not args or '--help' in args: print('Usage:') print('') print(' {0} [--static [--all]] file.c...'.format(progname)) print('') print('Stripts all declarations from file.c, file.h and file_defs.h.') print('If --static argument is given then only static declarations are') print('stripped. Declarations are stripped only if corresponding') print('definition is found unless --all argument was given.') print('') print('Note: it is assumed that static declarations starts with "static"') print(' keyword.') sys.exit(0 if args else 1) if args[0] == '--static': only_static = True args = args[1:] else: only_static = False if args[0] == '--all': move_all = True args = args[1:] else: move_all = False for cfname in args: print('Processing {0}'.format(cfname)) main(progname, cfname, only_static, move_all) neovim-0.2.2/scripts/vim-patch.sh000077500000000000000000000372221320401574200167320ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -u # Use privileged mode, which e.g. skips using CDPATH. set -p readonly NVIM_SOURCE_DIR="${NVIM_SOURCE_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" readonly VIM_SOURCE_DIR_DEFAULT="${NVIM_SOURCE_DIR}/.vim-src" readonly VIM_SOURCE_DIR="${VIM_SOURCE_DIR:-${VIM_SOURCE_DIR_DEFAULT}}" readonly BASENAME="$(basename "${0}")" readonly BRANCH_PREFIX="vim-" CREATED_FILES=() usage() { echo "Helper script for porting Vim patches. For more information, see" echo "https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-vim" echo echo "Usage: ${BASENAME} [-h | -l | -p vim-revision | -r pr-number]" echo echo "Options:" echo " -h Show this message and exit." echo " -l Show list of Vim patches missing from Neovim." echo " -p {vim-revision} Download and generate the specified Vim patch." echo " vim-revision can be a version number '8.0.xxx'" echo " or a valid Git ref (hash, tag, etc.)." echo " -P {vim-revision} Download, generate and apply the Vim patch." echo " -g {vim-revision} Download the Vim patch vim-revision." echo " vim-revision can be a version number of the " echo " format '7.4.xxx' or a Git commit hash." echo " -s Submit a vim-patch pull request to Neovim." echo " -r {pr-number} Review a vim-patch pull request to Neovim." echo echo "Set VIM_SOURCE_DIR to change where Vim's sources are stored." echo "Default is '${VIM_SOURCE_DIR_DEFAULT}'." } # Checks if a program is in the user's PATH, and is executable. check_executable() { test -x "$(command -v "${1}")" } require_executable() { if ! check_executable "${1}"; then >&2 echo "${BASENAME}: '${1}' not found in PATH or not executable." exit 1 fi } clean_files() { if [[ ${#CREATED_FILES[@]} -eq 0 ]]; then return fi echo echo "Created files:" local file for file in "${CREATED_FILES[@]}"; do echo " • ${file}" done read -p "Delete these files (Y/n)? " -n 1 -r reply echo if [[ "${reply}" == n ]]; then echo "You can use 'git clean' to remove these files when you're done." else rm -- "${CREATED_FILES[@]}" fi } get_vim_sources() { require_executable git if [[ ! -d ${VIM_SOURCE_DIR} ]]; then echo "Cloning Vim sources into '${VIM_SOURCE_DIR}'." git clone https://github.com/vim/vim.git "${VIM_SOURCE_DIR}" cd "${VIM_SOURCE_DIR}" else if [[ ! -d "${VIM_SOURCE_DIR}/.git" ]]; then echo "✘ ${VIM_SOURCE_DIR} does not appear to be a git repository." echo " Please remove it and try again." exit 1 fi cd "${VIM_SOURCE_DIR}" echo "Updating Vim sources in '${VIM_SOURCE_DIR}'." git pull && echo "✔ Updated Vim sources." || echo "✘ Could not update Vim sources; ignoring error." fi } commit_message() { printf 'vim-patch:%s\n\n%s\n\n%s' "${vim_version}" \ "${vim_message}" "${vim_commit_url}" } find_git_remote() { git remote -v \ | awk '$2 ~ /github.com[:\/]neovim\/neovim/ && $3 == "(fetch)" {print $1; exit}' } assign_commit_details() { if [[ ${1} =~ [0-9]\.[0-9]\.[0-9]{3,4} ]]; then # Interpret parameter as version number (tag). vim_version="${1}" vim_tag="v${1}" vim_commit=$(cd "${VIM_SOURCE_DIR}" \ && git log -1 --format="%H" "${vim_tag}") local strip_commit_line=true else # Interpret parameter as commit hash. vim_version="${1:0:12}" vim_commit=$(cd "${VIM_SOURCE_DIR}" \ && git log -1 --format="%H" "${vim_version}") local strip_commit_line=false fi vim_commit_url="https://github.com/vim/vim/commit/${vim_commit}" vim_message="$(cd "${VIM_SOURCE_DIR}" \ && git log -1 --pretty='format:%B' "${vim_commit}" \ | sed -e 's/\(#[0-9]*\)/vim\/vim\1/g')" if [[ ${strip_commit_line} == "true" ]]; then # Remove first line of commit message. vim_message="$(echo "${vim_message}" | sed -e '1d')" fi patch_file="vim-${vim_version}.patch" } # Patch surgery preprocess_patch() { local file="$1" local nvim="nvim -u NORC -i NONE --headless" # Remove *.proto, Make*, gui_*, some if_* local na_src='proto\|Make*\|gui_*\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%(testdir/\)\@/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\<\%('${na_doc}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" # Remove "Last change ..." changes in doc files. 2>/dev/null $nvim --cmd 'set dir=/tmp' +'%s/^@@.*\n.*For Vim version.*Last change.*\n.*For Vim version.*Last change.*//' +w +q "$file" # Remove some testdir/Make_*.mak files local na_src_testdir='Make_amiga.mak\|Make_dos.mak\|Make_ming.mak\|Make_vms.mms' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('${na_src_testdir}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" # Remove some *.po files. #5622 local na_po='sjiscorr.c\|ja.sjis.po\|ko.po\|pl.cp1250.po\|pl.po\|ru.cp1251.po\|uk.cp1251.po\|zh_CN.cp936.po\|zh_CN.po\|zh_TW.po' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/po/\<\%('${na_po}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" # Remove vimrc_example.vim local na_vimrcexample='vimrc_example\.vim' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('${na_vimrcexample}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" # Rename src/ paths to src/nvim/ LC_ALL=C sed -e 's/\( [ab]\/src\)/\1\/nvim/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename path to matchit plugin. LC_ALL=C sed -e 's@\( [ab]/runtime\)/pack/dist/opt/matchit/\(plugin/matchit.vim\)@\1/\2@g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" } get_vim_patch() { get_vim_sources assign_commit_details "${1}" git log -1 "${vim_commit}" -- >/dev/null 2>&1 || { >&2 echo "✘ Couldn't find Vim revision '${vim_commit}'." exit 3 } echo "✔ Found Vim revision '${vim_commit}'." local patch_content patch_content="$(git --no-pager show --color=never -1 --pretty=medium "${vim_commit}")" cd "${NVIM_SOURCE_DIR}" printf "Creating patch...\n" echo "$patch_content" > "${NVIM_SOURCE_DIR}/${patch_file}" printf "Pre-processing patch...\n" preprocess_patch "${NVIM_SOURCE_DIR}/${patch_file}" printf "✔ Saved patch to '${NVIM_SOURCE_DIR}/${patch_file}'.\n" } stage_patch() { get_vim_patch "$1" local try_apply="${2:-}" local git_remote git_remote="$(find_git_remote)" local checked_out_branch checked_out_branch="$(git rev-parse --abbrev-ref HEAD)" if [[ "${checked_out_branch}" == ${BRANCH_PREFIX}* ]]; then echo "✔ Current branch '${checked_out_branch}' seems to be a vim-patch" echo " branch; not creating a new branch." else printf "\nFetching '${git_remote}/master'.\n" output="$(git fetch "${git_remote}" master 2>&1)" && echo "✔ ${output}" || (echo "✘ ${output}"; false) local nvim_branch="${BRANCH_PREFIX}${vim_version}" echo echo "Creating new branch '${nvim_branch}' based on '${git_remote}/master'." cd "${NVIM_SOURCE_DIR}" output="$(git checkout -b "${nvim_branch}" "${git_remote}/master" 2>&1)" && echo "✔ ${output}" || (echo "✘ ${output}"; false) fi printf "\nCreating empty commit with correct commit message.\n" output="$(commit_message | git commit --allow-empty --file 2>&1 -)" && echo "✔ ${output}" || (echo "✘ ${output}"; false) if test -n "$try_apply" ; then if ! check_executable patch; then printf "\n✘ 'patch' command not found\n" else printf "\nApplying patch...\n" patch -p1 --posix < "${patch_file}" fi printf "\nInstructions:\n Proceed to port the patch.\n" else printf "\nInstructions:\n Proceed to port the patch.\n Try the 'patch' command (or use '${BASENAME} -P ...' next time):\n patch -p1 < ${patch_file}\n" fi printf " Stage your changes ('git add ...'), then use 'git commit --amend' to commit. To port more patches (if any) related to ${vim_version}, run '${BASENAME}' again. * Do this only for _related_ patches (otherwise it increases the size of the pull request, making it harder to review) When you're done, try '${BASENAME} -s' to create the pull request. See the wiki for more information: * https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-vim\n" } hub_pr() { hub pull-request -m "$1" } git_hub_pr() { git hub pull new -m "$1" } submit_pr() { require_executable git local push_first push_first=1 local submit_fn if check_executable hub; then submit_fn="hub_pr" elif check_executable git-hub; then push_first=0 submit_fn="git_hub_pr" else >&2 echo "${BASENAME}: 'hub' or 'git-hub' not found in PATH or not executable." exit 1 fi cd "${NVIM_SOURCE_DIR}" local checked_out_branch checked_out_branch="$(git rev-parse --abbrev-ref HEAD)" if [[ "${checked_out_branch}" != ${BRANCH_PREFIX}* ]]; then echo "✘ Current branch '${checked_out_branch}' doesn't seem to be a vim-patch branch." exit 1 fi local git_remote git_remote="$(find_git_remote)" local pr_body pr_body="$(git log --reverse --format='#### %s%n%n%b%n' "${git_remote}"/master..HEAD)" local patches patches=("$(git log --reverse --format='%s' "${git_remote}"/master..HEAD)") patches=(${patches[@]//vim-patch:}) # Remove 'vim-patch:' prefix for each item in array. local pr_title="${patches[*]}" # Create space-separated string from array. pr_title="${pr_title// /,}" # Replace spaces with commas. local pr_message pr_message="$(printf '[RFC] vim-patch:%s\n\n%s\n' "${pr_title#,}" "${pr_body}")" if [[ $push_first -ne 0 ]]; then echo "Pushing to 'origin/${checked_out_branch}'." output="$(git push origin "${checked_out_branch}" 2>&1)" && echo "✔ ${output}" || (echo "✘ ${output}"; false) echo fi echo "Creating pull request." output="$(${submit_fn} "${pr_message}" 2>&1)" && echo "✔ ${output}" || (echo "✘ ${output}"; false) echo echo "Cleaning up files." local patch_file for patch_file in "${patches[@]}"; do patch_file="vim-${patch_file}.patch" if [[ ! -f "${NVIM_SOURCE_DIR}/${patch_file}" ]]; then continue fi rm -- "${NVIM_SOURCE_DIR}/${patch_file}" echo "✔ Removed '${NVIM_SOURCE_DIR}/${patch_file}'." done } list_vim_patches() { get_vim_sources printf "\nVim patches missing from Neovim:\n" # Get missing Vim commits local vim_commits vim_commits="$(cd "${VIM_SOURCE_DIR}" && git log --reverse --format='%H' v8.0.0000..HEAD)" local vim_commit for vim_commit in ${vim_commits}; do local is_missing local vim_tag # This fails for untagged commits (e.g., runtime file updates) so mask the return status vim_tag="$(cd "${VIM_SOURCE_DIR}" && git describe --tags --exact-match "${vim_commit}" 2>/dev/null)" || true if [[ -n "${vim_tag}" ]]; then local patch_number="${vim_tag:5}" # Remove prefix like "v7.4." patch_number="$(echo ${patch_number} | sed 's/^0*//g')" # Remove prefix "0" # Tagged Vim patch, check version.c: is_missing="$(sed -n '/static const int included_patches/,/}/p' "${NVIM_SOURCE_DIR}/src/nvim/version.c" | grep -x -e "[[:space:]]*//[[:space:]]${patch_number} NA.*" -e "[[:space:]]*${patch_number}," >/dev/null && echo "false" || echo "true")" vim_commit="${vim_tag#v}" if (cd "${VIM_SOURCE_DIR}" && git --no-pager show --color=never --name-only "v${vim_commit}" 2>/dev/null) | grep -q ^runtime; then vim_commit="${vim_commit} (+runtime)" fi else # Untagged Vim patch (e.g. runtime updates), check the Neovim git log: is_missing="$(cd "${NVIM_SOURCE_DIR}" && git log -1 --no-merges --grep="vim\-patch:${vim_commit:0:7}" --pretty=format:false)" fi if [[ ${is_missing} != "false" ]]; then echo " • ${vim_commit}" fi done echo echo "Instructions:" echo echo " To port one of the above patches to Neovim, execute" echo " this script with the patch revision as argument and" echo " follow the instructions." echo echo " Examples: '${BASENAME} -p 7.4.487'" echo " '${BASENAME} -p 1e8ebf870720e7b671f98f22d653009826304c4f'" echo echo " NOTE: Please port the _oldest_ patch if you possibly can." echo " Out-of-order patches increase the possibility of bugs." } review_commit() { local nvim_commit_url="${1}" local nvim_patch_url="${nvim_commit_url}.patch" local git_patch_prefix='Subject: \[PATCH\] ' local nvim_patch nvim_patch="$(curl -Ssf "${nvim_patch_url}")" local vim_version vim_version="$(head -n 4 <<< "${nvim_patch}" | sed -n "s/${git_patch_prefix}vim-patch:\([a-z0-9.]*\)$/\1/p")" echo if [[ -n "${vim_version}" ]]; then echo "✔ Detected Vim patch '${vim_version}'." else echo "✘ Could not detect the Vim patch number." echo " This script assumes that the PR contains only commits" echo " with 'vim-patch:XXX' in their title." echo printf -- "$(head -n 4 <<< "${nvim_patch}")\n\n" local reply read -p "Continue reviewing (y/N)? " -n 1 -r reply if [[ "${reply}" == y ]]; then echo return fi exit 1 fi assign_commit_details "${vim_version}" local expected_commit_message expected_commit_message="$(commit_message)" local message_length message_length="$(wc -l <<< "${expected_commit_message}")" local commit_message commit_message="$(tail -n +4 <<< "${nvim_patch}" | head -n "${message_length}")" if [[ "${commit_message#${git_patch_prefix}}" == "${expected_commit_message}" ]]; then echo "✔ Found expected commit message." else echo "✘ Wrong commit message." echo " Expected:" echo "${expected_commit_message}" echo " Actual:" echo "${commit_message#${git_patch_prefix}}" fi echo echo "Creating files." echo "${nvim_patch}" > "${NVIM_SOURCE_DIR}/n${patch_file}" echo "✔ Saved pull request diff to '${NVIM_SOURCE_DIR}/n${patch_file}'." CREATED_FILES+=("${NVIM_SOURCE_DIR}/n${patch_file}") get_vim_patch "${vim_version}" CREATED_FILES+=("${NVIM_SOURCE_DIR}/${patch_file}") echo echo "Launching nvim." nvim -c "cd ${NVIM_SOURCE_DIR}" \ -O "${NVIM_SOURCE_DIR}/${patch_file}" "${NVIM_SOURCE_DIR}/n${patch_file}" } review_pr() { require_executable curl require_executable nvim require_executable jq get_vim_sources local pr="${1}" echo echo "Downloading data for pull request #${pr}." local pr_commit_urls=($(curl -Ssf "https://api.github.com/repos/neovim/neovim/pulls/${pr}/commits" \ | jq -r '.[].html_url')) echo "Found ${#pr_commit_urls[@]} commit(s)." local pr_commit_url local reply for pr_commit_url in "${pr_commit_urls[@]}"; do review_commit "${pr_commit_url}" if [[ "${pr_commit_url}" != "${pr_commit_urls[-1]}" ]]; then read -p "Continue with next commit (Y/n)? " -n 1 -r reply echo if [[ "${reply}" == n ]]; then break fi fi done clean_files } while getopts "hlp:P:g:r:s" opt; do case ${opt} in h) usage exit 0 ;; l) list_vim_patches exit 0 ;; p) stage_patch "${OPTARG}" exit 0 ;; P) stage_patch "${OPTARG}" TRY_APPLY exit 0 ;; g) get_vim_patch "${OPTARG}" exit 0 ;; r) review_pr "${OPTARG}" exit 0 ;; s) submit_pr exit 0 ;; *) exit 1 ;; esac done usage # vim: et sw=2 neovim-0.2.2/src/000077500000000000000000000000001320401574200135755ustar00rootroot00000000000000neovim-0.2.2/src/.asan-blacklist000066400000000000000000000001611320401574200164640ustar00rootroot00000000000000# multiqueue.h pointer arithmetic is not accepted by asan fun:multiqueue_node_data fun:tv_dict_watcher_node_data neovim-0.2.2/src/.clang-format000066400000000000000000000007551320401574200161570ustar00rootroot00000000000000BasedOnStyle: Google Language: Cpp ColumnLimit: 80 IndentWidth: 2 TabWidth: 2 UseTab: Never IndentCaseLabels: true BreakBeforeBraces: Linux AlignEscapedNewlinesLeft: false AllowShortFunctionsOnASingleLine: false SpacesBeforeTrailingComments: 2 PenaltyReturnTypeOnItsOwnLine: 200 AllowAllParametersOfDeclarationOnNextLine: false AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false BinPackParameters: false BreakBeforeBinaryOperators: true ContinuationIndentWidth: 4 neovim-0.2.2/src/.valgrind.supp000066400000000000000000000004041320401574200163700ustar00rootroot00000000000000{ nss_parse_service_list Memcheck:Leak fun:malloc fun:nss_parse_service_list fun:__nss_database_lookup } { uv_spawn_with_optimizations Memcheck:Leak fun:malloc fun:uv_spawn fun:libuv_process_spawn fun:process_spawn fun:job_start } neovim-0.2.2/src/Doxyfile000066400000000000000000002354741320401574200153220ustar00rootroot00000000000000# Doxyfile 1.8.4 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed # in front of the TAG it is preceding . # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or sequence of words) that should # identify the project. Note that if you do not use Doxywizard you need # to put quotes around the project name if it contains spaces. PROJECT_NAME = "Neovim" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = contrib/doxygen/logo-devdoc.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = build/doxygen # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian, # Persian, Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, # Slovak, Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. Note that you specify absolute paths here, but also # relative paths, which will be relative from the directory where doxygen is # started. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding # "class=itcl::class" will allow you to use the command class in the # itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, # and language is one of the parsers supported by doxygen: IDL, Java, # Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, # C++. For instance to make doxygen treat .inc files as Fortran files (default # is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note # that for custom extensions you also need to set FILE_PATTERNS otherwise the # files are not read by doxygen. EXTENSION_MAPPING = # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all # comments according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you # can mix doxygen, HTML, and XML commands with Markdown formatting. # Disable only in case of backward compatibilities issues. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by by putting a % sign in front of the word # or globally by setting AUTOLINK_SUPPORT to NO. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES (the # default) will make doxygen replace the get and set methods by a property in # the documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and # unions with only public data fields or simple typedef fields will be shown # inline in the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO (the default), structs, classes, and unions are shown on a separate # page (for HTML and Man pages) or section (for LaTeX and RTF). INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can # be an expensive process and often the same symbol appear multiple times in # the code, doxygen keeps a cache of pre-resolved symbols. If the cache is too # small doxygen will become slower. If the cache is too large, memory is wasted. # The cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid # range is 0..9, the default is 0, corresponding to a cache size of 2^16 = 65536 # symbols. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal # scope will be included in the documentation. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if section-label ... \endif # and \cond section-label ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files # containing the references data. This must be a list of .bib files. The # .bib extension is automatically appended if omitted. Using this command # requires the bibtex tool to be installed. See also # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this # feature you need bibtex and perl available in the search path. Do not use # file names with spaces, bibtex cannot handle them. CITE_BIB_FILES = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = src/ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = *.h *.c # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be ignored. # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = # If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C, C++ and Fortran comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is advised to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when # changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = contrib/doxygen/header.html # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = contrib/doxygen/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If left blank doxygen will # generate a default style sheet. Note that it is recommended to use # HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this # tag will in the future become obsolete. HTML_STYLESHEET = contrib/doxygen/customdoxygen.css # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional # user-defined cascading style sheet that is included after the standard # style sheets created by doxygen. Using this option one can overrule # certain style aspects. This is preferred over using HTML_STYLESHEET # since it does not replace the standard style sheet and is therefor more # robust against future updates. Doxygen will copy the style sheet file to # the output directory. HTML_EXTRA_STYLESHEET = contrib/doxygen/extra.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the style sheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of # entries shown in the various tree structured indices initially; the user # can expand and collapse entries dynamically later on. Doxygen will expand # the tree to such a level that at most the specified number of entries are # visible (unless a fully collapsed tree already exceeds this amount). # So setting the number of entries 1 will produce a full collapsed tree by # default. 0 is a special value representing an infinite number of entries # and will result in a full expanded tree by default. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely # identify the documentation publisher. This should be a reverse domain-name # style string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) # at top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. Since the tabs have the same information as the # navigation tree you can set this option to NO if you already set # GENERATE_TREEVIEW to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. # Since the tree basically has the same information as the tab index you # could consider to set DISABLE_INDEX to NO when enabling this option. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you may also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and # SVG. The default value is HTML-CSS, which is slower, but has the best # compatibility. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to # the MathJax Content Delivery Network so you can quickly see the result without # installing MathJax. # However, it is strongly recommended to install a local # copy of MathJax from http://www.mathjax.org before deployment. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension # names that should be enabled during MathJax rendering. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript # pieces of code that will be used on startup of the MathJax code. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a web server instead of a web client using Javascript. # There are two flavours of web server based search depending on the # EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for # searching and an index file used by the script. When EXTERNAL_SEARCH is # enabled the indexing and searching needs to be provided by external tools. # See the manual for details. SERVER_BASED_SEARCH = NO # When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP # script for searching. Instead the search results are written to an XML file # which needs to be processed by an external indexer. Doxygen will invoke an # external search engine pointed to by the SEARCHENGINE_URL option to obtain # the search results. Doxygen ships with an example indexer (doxyindexer) and # search engine (doxysearch.cgi) which are based on the open source search # engine library Xapian. See the manual for configuration details. EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will returned the search results when EXTERNAL_SEARCH is enabled. # Doxygen ships with an example search engine (doxysearch) which is based on # the open source search engine library Xapian. See the manual for configuration # details. SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the # SEARCHDATA_FILE tag the name of this file can be specified. SEARCHDATA_FILE = searchdata.xml # When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is # useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple # projects and redirect the results back to the right project. EXTERNAL_SEARCH_ID = # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are # all added to the same external search index. Each project needs to have a # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id # of to a relative location where the documentation can be found. # The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4 will be used. PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images # or other source files which should be copied to the LaTeX output directory. # Note that the files will be copied as-is; there are no commands or markers # available. LATEX_EXTRA_FILES = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See # http://en.wikipedia.org/wiki/BibTeX for more info. LATEX_BIB_STYLE = plain #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load style sheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- # If the GENERATE_DOCBOOK tag is set to YES Doxygen will generate DOCBOOK files # that can be used to generate PDF. GENERATE_DOCBOOK = NO # The DOCBOOK_OUTPUT tag is used to specify where the DOCBOOK pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be put in # front of it. If left blank docbook will be used as the default path. DOCBOOK_OUTPUT = docbook #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. For each # tag file the location of the external documentation should be added. The # format of a tag file without this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths # or URLs. Note that each tag file must have a unique name (where the name does # NOT include the path). If a tag file is not located in the directory in which # doxygen is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # If the EXTERNAL_PAGES tag is set to YES all external pages will be listed # in the related pages index. If set to NO, only the current project's # pages will be listed. EXTERNAL_PAGES = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate an inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will use the Helvetica font for all dot files that # doxygen generates. When you want a differently looking font you can specify # the font name using DOT_FONTNAME. You need to make sure dot is able to find # the font, which can be done by putting it in a standard location or by setting # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the # directory containing the font. DOT_FONTNAME = Helvetica # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the Helvetica font. # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to # set the path where dot can find it. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If the UML_LOOK tag is enabled, the fields and methods are shown inside # the class node. If there are many fields or methods and many nodes the # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS # threshold limits the number of items for each type to make the size more # manageable. Set this to 0 for no limit. Note that the threshold may be # exceeded by 50% before the limit is enforced. UML_LIMIT_NUM_FIELDS = 10 # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. If you choose svg you need to set # HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible in IE 9+ (other browsers do not have this requirement). DOT_IMAGE_FORMAT = png # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. # Note that this requires a modern browser other than Internet Explorer. # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible. Older versions of IE do not have SVG support. INTERACTIVE_SVG = NO # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = YES # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES neovim-0.2.2/src/clint.py000077500000000000000000004360751320401574200153020ustar00rootroot00000000000000#!/usr/bin/env python # vim: set fileencoding=utf-8 # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of Google Inc. nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """Does neovim-lint on c files. The goal of this script is to identify places in the code that *may* be in non-compliance with neovim style. It does not attempt to fix up these problems -- the point is to educate. It does also not attempt to find all problems, or to ensure that everything it does find is legitimately a problem. In particular, we can get very confused by /* and // inside strings! We do a small hack, which is to ignore //'s with "'s after them on the same line, but it is far from perfect (in either direction). """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import codecs import copy import getopt import math # for log import os import re import sre_compile import string import sys import unicodedata import json import collections # for defaultdict _USAGE = """ Syntax: clint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...] [--counting=total|toplevel|detailed] [--root=subdir] [--linelength=digits] [--record-errors=file] [--suppress-errors=file] [file] ... The style guidelines this tries to follow are those in http://neovim.io/development-wiki/style-guide/style-guide.xml Note: This is Google's cpplint.py modified for use with the Neovim project, which follows the Google C++ coding convention except with the following modifications: * Function names are lower_case. * Struct and enum names that are not typedef-ed are struct lower_case and enum lower_case. * The opening brace for functions appear on the next line. * All control structures must always use braces. Neovim is a C project. As a result, for .c and .h files, the following rules are suppressed: * [whitespace/braces] { should almost always be at the end of the previous line * [build/include] Include the directory when naming .h files * [runtime/int] Use int16/int64/etc, rather than the C type. Every problem is given a confidence score from 1-5, with 5 meaning we are certain of the problem, and 1 meaning it could be a legitimate construct. This will miss some errors, and is not a substitute for a code review. To suppress false-positive errors of a certain category, add a 'NOLINT(category)' comment to the line. NOLINT or NOLINT(*) suppresses errors of all categories on that line. The files passed in will be linted; at least one file must be provided. Default linted extensions are .cc, .cpp, .cu, .cuh and .h. Change the extensions with the --extensions flag. Flags: output=vs7 By default, the output is formatted to ease emacs parsing. Visual Studio compatible output (vs7) may also be used. Other formats are unsupported. verbose=# Specify a number 0-5 to restrict errors to certain verbosity levels. filter=-x,+y,... Specify a comma-separated list of category-filters to apply: only error messages whose category names pass the filters will be printed. (Category names are printed with the message and look like "[whitespace/indent]".) Filters are evaluated left to right. "-FOO" and "FOO" means "do not print categories that start with FOO". "+FOO" means "do print categories that start with FOO". Examples: --filter=-whitespace,+whitespace/braces --filter=whitespace,runtime/printf,+runtime/printf_format --filter=-,+build/include_what_you_use To see a list of all the categories used in cpplint, pass no arg: --filter= counting=total|toplevel|detailed The total number of errors found is always printed. If 'toplevel' is provided, then the count of errors in each of the top-level categories like 'build' and 'whitespace' will also be printed. If 'detailed' is provided, then a count is provided for each category. root=subdir The root directory used for deriving header guard CPP variable. By default, the header guard CPP variable is calculated as the relative path to the directory that contains .git, .hg, or .svn. When this flag is specified, the relative path is calculated from the specified directory. If the specified directory does not exist, this flag is ignored. Examples: Assuing that src/.git exists, the header guard CPP variables for src/chrome/browser/ui/browser.h are: No flag => CHROME_BROWSER_UI_BROWSER_H_ --root=chrome => BROWSER_UI_BROWSER_H_ --root=chrome/browser => UI_BROWSER_H_ linelength=digits This is the allowed line length for the project. The default value is 80 characters. Examples: --linelength=120 extensions=extension,extension,... The allowed file extensions that cpplint will check Examples: --extensions=hpp,cpp record-errors=file Record errors to the given location. This file may later be used for error suppression using suppress-errors flag. suppress-errors=file Errors listed in the given file will not be reported. """ # We categorize each error message we print. Here are the categories. # We want an explicit list so we can list them all in cpplint --filter=. # If you add a new error message with a new category, add it to the list # here! cpplint_unittest.py should tell you if you forget to do this. _ERROR_CATEGORIES = [ 'build/deprecated', 'build/endif_comment', 'build/header_guard', 'build/include', 'build/include_alpha', 'build/include_order', 'build/printf_format', 'build/storage_class', 'build/useless_fattr', 'readability/alt_tokens', 'readability/bool', 'readability/braces', 'readability/fn_size', 'readability/multiline_comment', 'readability/multiline_string', 'readability/nolint', 'readability/nul', 'readability/todo', 'readability/utf8', 'readability/increment', 'runtime/arrays', 'runtime/int', 'runtime/invalid_increment', 'runtime/memset', 'runtime/printf', 'runtime/printf_format', 'runtime/threadsafe_fn', 'syntax/parenthesis', 'whitespace/alignment', 'whitespace/blank_line', 'whitespace/braces', 'whitespace/comma', 'whitespace/comments', 'whitespace/empty_conditional_body', 'whitespace/empty_loop_body', 'whitespace/end_of_line', 'whitespace/ending_newline', 'whitespace/indent', 'whitespace/line_length', 'whitespace/newline', 'whitespace/operators', 'whitespace/parens', 'whitespace/semicolon', 'whitespace/tab', 'whitespace/todo', 'whitespace/line_continuation', 'whitespace/cast', ] # The default state of the category filter. This is overrided by the --filter= # flag. By default all errors are on, so only add here categories that should be # off by default (i.e., categories that must be enabled by the --filter= flags). # All entries here should start with a '-' or '+', as in the --filter= flag. _DEFAULT_FILTERS = ['-build/include_alpha'] # We used to check for high-bit characters, but after much discussion we # decided those were OK, as long as they were in UTF-8 and didn't represent # hard-coded international strings, which belong in a separate i18n file. # Alternative tokens and their replacements. For full list, see section 2.5 # Alternative tokens [lex.digraph] in the C++ standard. # # Digraphs (such as '%:') are not included here since it's a mess to # match those on a word boundary. _ALT_TOKEN_REPLACEMENT = { 'and': '&&', 'bitor': '|', 'or': '||', 'xor': '^', 'compl': '~', 'bitand': '&', 'and_eq': '&=', 'or_eq': '|=', 'xor_eq': '^=', 'not': '!', 'not_eq': '!=' } # Compile regular expression that matches all the above keywords. The "[ =()]" # bit is meant to avoid matching these keywords outside of boolean expressions. # # False positives include C-style multi-line comments and multi-line strings # but those have always been troublesome for cpplint. _ALT_TOKEN_REPLACEMENT_PATTERN = re.compile( r'[ =()](' + ('|'.join(_ALT_TOKEN_REPLACEMENT.keys())) + r')(?=[ (]|$)') # These constants define types of headers for use with # _IncludeState.CheckNextIncludeOrder(). _C_SYS_HEADER = 1 _OTHER_HEADER = 5 # These constants define the current inline assembly state _NO_ASM = 0 # Outside of inline assembly block _INSIDE_ASM = 1 # Inside inline assembly block _END_ASM = 2 # Last line of inline assembly block _BLOCK_ASM = 3 # The whole block is an inline assembly block # Match start of assembly blocks _MATCH_ASM = re.compile(r'^\s*(?:asm|_asm|__asm|__asm__)' r'(?:\s+(volatile|__volatile__))?' r'\s*[{(]') _regexp_compile_cache = {} # Finds occurrences of NOLINT or NOLINT(...). _RE_SUPPRESSION = re.compile(r'\bNOLINT\b(\([^)]*\))?') # {str, set(int)}: a map from error categories to sets of linenumbers # on which those errors are expected and should be suppressed. _error_suppressions = {} # {(str, int)}: a set of error categories and line numbers which are expected to # be suppressed _error_suppressions_2 = set() # The allowed line length of files. # This is set by --linelength flag. _line_length = 80 # The allowed extensions for file names # This is set by --extensions flag. _valid_extensions = set(['c', 'h']) def ParseNolintSuppressions(filename, raw_line, linenum, error): """Updates the global list of error-suppressions. Parses any NOLINT comments on the current line, updating the global error_suppressions store. Reports an error if the NOLINT comment was malformed. Args: filename: str, the name of the input file. raw_line: str, the line of input text, with comments. linenum: int, the number of the current line. error: function, an error handler. """ # FIXME(adonovan): "NOLINT(" is misparsed as NOLINT(*). matched = _RE_SUPPRESSION.search(raw_line) if matched: category = matched.group(1) if category in (None, '(*)'): # => "suppress all" _error_suppressions.setdefault(None, set()).add(linenum) else: if category.startswith('(') and category.endswith(')'): category = category[1:-1] if category in _ERROR_CATEGORIES: _error_suppressions.setdefault( category, set()).add(linenum) else: error(filename, linenum, 'readability/nolint', 5, 'Unknown NOLINT error category: %s' % category) def ParseKnownErrorSuppressions(filename, raw_lines, linenum): """Updates the global list of error-suppressions from suppress-file. Args: filename: str, the name of the input file. raw_lines: list, all file lines linenum: int, the number of the current line. """ key = tuple(raw_lines[linenum - 1 if linenum else 0:linenum + 2]) if key in _cpplint_state.suppressed_errors[filename]: for category in _cpplint_state.suppressed_errors[filename][key]: _error_suppressions_2.add((category, linenum)) def ResetNolintSuppressions(): "Resets the set of NOLINT suppressions to empty." _error_suppressions.clear() def ResetKnownErrorSuppressions(): "Resets the set of suppress-errors=file suppressions to empty." _error_suppressions_2.clear() def IsErrorSuppressedByNolint(category, linenum): """Returns true if the specified error category is suppressed on this line. Consults the global error_suppressions map populated by ParseNolintSuppressions/ResetNolintSuppressions. Args: category: str, the category of the error. linenum: int, the current line number. Returns: bool, True iff the error should be suppressed due to a NOLINT comment. """ return (linenum in _error_suppressions.get(category, set()) or linenum in _error_suppressions.get(None, set())) def IsErrorInSuppressedErrorsList(category, linenum): """Returns true if the specified error is suppressed by suppress-errors=file Args: category: str, the category of the error. linenum: int, the current line number. Returns: bool, True iff the error should be suppressed due to presense in suppressions file. """ return (category, linenum) in _error_suppressions_2 def Match(pattern, s): """Matches the string with the pattern, caching the compiled regexp.""" # The regexp compilation caching is inlined in both Match and Search for # performance reasons; factoring it out into a separate function turns out # to be noticeably expensive. if pattern not in _regexp_compile_cache: _regexp_compile_cache[pattern] = sre_compile.compile(pattern) return _regexp_compile_cache[pattern].match(s) def Search(pattern, s): """Searches the string for the pattern, caching the compiled regexp.""" if pattern not in _regexp_compile_cache: _regexp_compile_cache[pattern] = sre_compile.compile(pattern) return _regexp_compile_cache[pattern].search(s) class _IncludeState(dict): """Tracks line numbers for includes, and the order in which includes appear. As a dict, an _IncludeState object serves as a mapping between include filename and line number on which that file was included. Call CheckNextIncludeOrder() once for each header in the file, passing in the type constants defined above. """ # self._section will move monotonically through this set. If it ever # needs to move backwards, CheckNextIncludeOrder will raise an error. _INITIAL_SECTION = 0 _C_SECTION = 2 _OTHER_H_SECTION = 4 _TYPE_NAMES = { _C_SYS_HEADER: 'C system header', _OTHER_HEADER: 'other header', } _SECTION_NAMES = { _INITIAL_SECTION: "... nothing. (This can't be an error.)", _C_SECTION: 'C system header', _OTHER_H_SECTION: 'other header', } def __init__(self): dict.__init__(self) self.ResetSection() def ResetSection(self): # The name of the current section. self._section = self._INITIAL_SECTION # The path of last found header. self._last_header = '' def SetLastHeader(self, header_path): self._last_header = header_path def CanonicalizeAlphabeticalOrder(self, header_path): """Returns a path canonicalized for alphabetical comparison. - replaces "-" with "_" so they both cmp the same. - lowercase everything, just in case. Args: header_path: Path to be canonicalized. Returns: Canonicalized path. """ return header_path.replace('-', '_').lower() def CheckNextIncludeOrder(self, header_type): """Returns a non-empty error message if the next header is out of order. This function also updates the internal state to be ready to check the next include. Args: header_type: One of the _XXX_HEADER constants defined above. Returns: The empty string if the header is in the right order, or an error message describing what's wrong. """ error_message = ('Found %s after %s' % (self._TYPE_NAMES[header_type], self._SECTION_NAMES[self._section])) last_section = self._section if header_type == _C_SYS_HEADER: if self._section <= self._C_SECTION: self._section = self._C_SECTION else: self._last_header = '' return error_message else: assert header_type == _OTHER_HEADER self._section = self._OTHER_H_SECTION if last_section != self._section: self._last_header = '' return '' class _CppLintState(object): """Maintains module-wide state..""" def __init__(self): self.verbose_level = 1 # global setting. self.error_count = 0 # global count of reported errors # filters to apply when emitting error messages self.filters = _DEFAULT_FILTERS[:] self.counting = 'total' # In what way are we counting errors? self.errors_by_category = {} # string to int dict storing error counts # output format: # "emacs" - format that emacs can parse (default) # "vs7" - format that Microsoft Visual Studio 7 can parse self.output_format = 'emacs' self.record_errors_file = None self.suppressed_errors = collections.defaultdict( lambda: collections.defaultdict(set)) def SetOutputFormat(self, output_format): """Sets the output format for errors.""" self.output_format = output_format def SetVerboseLevel(self, level): """Sets the module's verbosity, and returns the previous setting.""" last_verbose_level = self.verbose_level self.verbose_level = level return last_verbose_level def SetCountingStyle(self, counting_style): """Sets the module's counting options.""" self.counting = counting_style def SetFilters(self, filters): """Sets the error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters. E.g. "+whitespace/indent". Each filter should start with + or -; else we die. Raises: ValueError: The comma-separated filters did not all start with '+' or '-'. E.g. "-,+whitespace,-whitespace/indent,whitespace/bad" """ # Default filters always have less priority than the flag ones. self.filters = _DEFAULT_FILTERS[:] for filt in filters.split(','): clean_filt = filt.strip() if clean_filt: self.filters.append(clean_filt) for filt in self.filters: if not (filt.startswith('+') or filt.startswith('-')): raise ValueError('Every filter in --filters must start with ' '+ or - (%s does not)' % filt) def ResetErrorCounts(self): """Sets the module's error statistic back to zero.""" self.error_count = 0 self.errors_by_category = {} def IncrementErrorCount(self, category): """Bumps the module's error statistic.""" self.error_count += 1 if self.counting in ('toplevel', 'detailed'): if self.counting != 'detailed': category = category.split('/')[0] if category not in self.errors_by_category: self.errors_by_category[category] = 0 self.errors_by_category[category] += 1 def PrintErrorCounts(self): """Print a summary of errors by category, and the total.""" for category, count in self.errors_by_category.items(): sys.stderr.write('Category \'%s\' errors found: %d\n' % (category, count)) if self.error_count: sys.stderr.write('Total errors found: %d\n' % self.error_count) def SuppressErrorsFrom(self, fname): """Open file and read a list of suppressed errors from it""" if fname is None: return try: with open(fname) as fp: for line in fp: fname, lines, category = json.loads(line) lines = tuple(lines) self.suppressed_errors[fname][lines].add(category) except IOError: pass def RecordErrorsTo(self, fname): """Open file with suppressed errors for writing""" if fname is None: return self.record_errors_file = open(fname, 'w') _cpplint_state = _CppLintState() def _OutputFormat(): """Gets the module's output format.""" return _cpplint_state.output_format def _SetOutputFormat(output_format): """Sets the module's output format.""" _cpplint_state.SetOutputFormat(output_format) def _VerboseLevel(): """Returns the module's verbosity setting.""" return _cpplint_state.verbose_level def _SetVerboseLevel(level): """Sets the module's verbosity, and returns the previous setting.""" return _cpplint_state.SetVerboseLevel(level) def _SetCountingStyle(level): """Sets the module's counting options.""" _cpplint_state.SetCountingStyle(level) def _SuppressErrorsFrom(fname): """Sets the file containing suppressed errors.""" _cpplint_state.SuppressErrorsFrom(fname) def _RecordErrorsTo(fname): """Sets the file containing suppressed errors to write to.""" _cpplint_state.RecordErrorsTo(fname) def _Filters(): """Returns the module's list of output filters, as a list.""" return _cpplint_state.filters def _SetFilters(filters): """Sets the module's error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "whitespace/indent"). Each filter should start with + or -; else we die. """ _cpplint_state.SetFilters(filters) class _FunctionState(object): """Tracks current function name and the number of lines in its body.""" _NORMAL_TRIGGER = 250 # for --v=0, 500 for --v=1, etc. _TEST_TRIGGER = 400 # about 50% more than _NORMAL_TRIGGER. def __init__(self): self.in_a_function = False self.lines_in_function = 0 self.current_function = '' def Begin(self, function_name): """Start analyzing function body. Args: function_name: The name of the function being tracked. """ self.in_a_function = True self.lines_in_function = 0 self.current_function = function_name def Count(self): """Count line in current function body.""" if self.in_a_function: self.lines_in_function += 1 def Check(self, error, filename, linenum): """Report if too many lines in function body. Args: error: The function to call with any errors found. filename: The name of the current file. linenum: The number of the line to check. """ if Match(r'T(EST|est)', self.current_function): base_trigger = self._TEST_TRIGGER else: base_trigger = self._NORMAL_TRIGGER trigger = base_trigger * 2**_VerboseLevel() if self.lines_in_function > trigger: error_level = int( math.log(self.lines_in_function / base_trigger, 2)) # 50 => 0, 100 => 1, 200 => 2, 400 => 3, 800 => 4, 1600 => 5, ... if error_level > 5: error_level = 5 error(filename, linenum, 'readability/fn_size', error_level, 'Small and focused functions are preferred:' ' %s has %d non-comment lines' ' (error triggered by exceeding %d lines).' % ( self.current_function, self.lines_in_function, trigger)) def End(self): """Stop analyzing function body.""" self.in_a_function = False class FileInfo: """Provides utility functions for filenames. FileInfo provides easy access to the components of a file's path relative to the project root. """ def __init__(self, filename): self._filename = filename def FullName(self): """Make Windows paths like Unix.""" return os.path.abspath(self._filename).replace('\\', '/') def RelativePath(self): """FullName with /src/nvim/ chopped off.""" fullname = self.FullName() if os.path.exists(fullname): project_dir = os.path.dirname(fullname) root_dir = os.path.dirname(fullname) while (root_dir != os.path.dirname(root_dir) and not os.path.exists(os.path.join(root_dir, ".git"))): root_dir = os.path.dirname(root_dir) if os.path.exists(os.path.join(root_dir, ".git")): root_dir = os.path.join(root_dir, "src", "nvim") prefix = os.path.commonprefix([root_dir, project_dir]) return fullname[len(prefix) + 1:] # Don't know what to do; header guard warnings may be wrong... return fullname def Split(self): """Splits the file into the directory, basename, and extension. For 'chrome/browser/browser.cc', Split() would return ('chrome/browser', 'browser', '.cc') Returns: A tuple of (directory, basename, extension). """ googlename = self.RelativePath() project, rest = os.path.split(googlename) return (project,) + os.path.splitext(rest) def BaseName(self): """File base name - text after the final slash, before final period.""" return self.Split()[1] def Extension(self): """File extension - text following the final period.""" return self.Split()[2] def _ShouldPrintError(category, confidence, linenum): """If confidence >= verbose, category passes filter and isn't suppressed.""" # There are three ways we might decide not to print an error message: # a "NOLINT(category)" comment appears in the source, # the verbosity level isn't high enough, or the filters filter it out. if IsErrorSuppressedByNolint(category, linenum): return False if IsErrorInSuppressedErrorsList(category, linenum): return False if confidence < _cpplint_state.verbose_level: return False is_filtered = False for one_filter in _Filters(): if one_filter.startswith('-'): if category.startswith(one_filter[1:]): is_filtered = True elif one_filter.startswith('+'): if category.startswith(one_filter[1:]): is_filtered = False else: assert False # should have been checked for in SetFilter. if is_filtered: return False return True def Error(filename, linenum, category, confidence, message): """Logs the fact we've found a lint error. We log where the error was found, and also our confidence in the error, that is, how certain we are this is a legitimate style regression, and not a misidentification or a use that's sometimes justified. False positives can be suppressed by the use of "cpplint(category)" comments on the offending line. These are parsed into _error_suppressions. Args: filename: The name of the file containing the error. linenum: The number of the line containing the error. category: A string used to describe the "category" this bug falls under: "whitespace", say, or "runtime". Categories may have a hierarchy separated by slashes: "whitespace/indent". confidence: A number from 1-5 representing a confidence score for the error, with 5 meaning that we are certain of the problem, and 1 meaning that it could be a legitimate construct. message: The error message. """ if _ShouldPrintError(category, confidence, linenum): _cpplint_state.IncrementErrorCount(category) if _cpplint_state.output_format == 'vs7': sys.stderr.write('%s(%s): %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) elif _cpplint_state.output_format == 'eclipse': sys.stderr.write('%s:%s: warning: %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) else: sys.stderr.write('%s:%s: %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) # Matches standard C++ escape sequences per 2.13.2.3 of the C++ standard. _RE_PATTERN_CLEANSE_LINE_ESCAPES = re.compile( r'\\([abfnrtv?"\\\']|\d+|x[0-9a-fA-F]+)') # Matches strings. Escape codes should already be removed by ESCAPES. _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"([^"]*)"') # Matches characters. Escape codes should already be removed by ESCAPES. _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'(.)'") # Matches multi-line C++ comments. # This RE is a little bit more complicated than one might expect, because we # have to take care of space removals tools so we can handle comments inside # statements better. # The current rule is: We only clear spaces from both sides when we're at the # end of the line. Otherwise, we try to remove spaces from the right side, # if this doesn't work we try on left side but only if there's a non-character # on the right. _RE_PATTERN_CLEANSE_LINE_C_COMMENTS = re.compile( r"""(\s*/\*.*\*/\s*$| /\*.*\*/\s+| \s+/\*.*\*/(?=\W)| /\*.*\*/)""", re.VERBOSE) def IsCppString(line): """Does line terminate so, that the next symbol is in string constant. This function does not consider single-line nor multi-line comments. Args: line: is a partial line of code starting from the 0..n. Returns: True, if next character appended to 'line' is inside a string constant. """ line = line.replace(r'\\', 'XX') # after this, \\" does not match to \" return ((line.count('"') - line.count(r'\"') - line.count("'\"'")) & 1) == 1 def FindNextMultiLineCommentStart(lines, lineix): """Find the beginning marker for a multiline comment.""" while lineix < len(lines): if lines[lineix].strip().startswith('/*'): # Only return this marker if the comment goes beyond this line if lines[lineix].strip().find('*/', 2) < 0: return lineix lineix += 1 return len(lines) def FindNextMultiLineCommentEnd(lines, lineix): """We are inside a comment, find the end marker.""" while lineix < len(lines): if lines[lineix].strip().endswith('*/'): return lineix lineix += 1 return len(lines) def RemoveMultiLineCommentsFromRange(lines, begin, end): """Clears a range of lines for multi-line comments.""" # Having // dummy comments makes the lines non-empty, so we will not get # unnecessary blank line warnings later in the code. for i in range(begin, end): lines[i] = '// dummy' def RemoveMultiLineComments(filename, lines, error): """Removes multiline (c-style) comments from lines.""" lineix = 0 while lineix < len(lines): lineix_begin = FindNextMultiLineCommentStart(lines, lineix) if lineix_begin >= len(lines): return lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin) if lineix_end >= len(lines): error(filename, lineix_begin + 1, 'readability/multiline_comment', 5, 'Could not find end of multi-line comment') return RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1) lineix = lineix_end + 1 def CleanseComments(line): """Removes //-comments and single-line C-style /* */ comments. Args: line: A line of C++ source. Returns: The line with single-line comments removed. """ commentpos = line.find('//') if commentpos != -1 and not IsCppString(line[:commentpos]): line = line[:commentpos].rstrip() # get rid of /* ... */ return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS.sub('', line) class CleansedLines(object): """Holds 5 copies of all lines with different preprocessing applied to them. 1) elided member contains lines without strings and comments, 2) lines member contains lines without comments, and 3) raw_lines member contains all the lines with multiline comments replaced. 4) init_lines member contains all the lines without processing. 5) elided_with_space_strings is like elided, but with string literals looking like `" "`. All these three members are of , and of the same length. """ def __init__(self, lines, init_lines): self.elided = [] self.lines = [] self.raw_lines = lines self.num_lines = len(lines) self.init_lines = init_lines self.lines_without_raw_strings = lines self.elided_with_space_strings = [] for linenum in range(len(self.lines_without_raw_strings)): self.lines.append(CleanseComments( self.lines_without_raw_strings[linenum])) elided = self._CollapseStrings( self.lines_without_raw_strings[linenum]) self.elided.append(CleanseComments(elided)) elided = CleanseComments(self._CollapseStrings( self.lines_without_raw_strings[linenum], True)) self.elided_with_space_strings.append(elided) def NumLines(self): """Returns the number of lines represented.""" return self.num_lines @staticmethod def _CollapseStrings(elided, keep_spaces=False): """Collapses strings and chars on a line to simple "" or '' blocks. We nix strings first so we're not fooled by text like '"http://"' Args: elided: The line being processed. keep_spaces: If true, collapse to Returns: The line with collapsed strings. """ if not _RE_PATTERN_INCLUDE.match(elided): # Remove escaped characters first to make quote/single quote # collapsing basic. Things that look like escaped characters # shouldn't occur outside of strings and chars. elided = _RE_PATTERN_CLEANSE_LINE_ESCAPES.sub( '' if not keep_spaces else lambda m: ' ' * len(m.group(0)), elided) elided = _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES.sub( "''" if not keep_spaces else lambda m: "'" + (' ' * len(m.group(1))) + "'", elided) elided = _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES.sub( '""' if not keep_spaces else lambda m: '"' + (' ' * len(m.group(1))) + '"', elided) return elided BRACES = { '(': ')', '{': '}', '[': ']', # '<': '>', C++-specific pair removed } CLOSING_BRACES = dict(((v, k) for k, v in BRACES.items())) def GetExprBracesPosition(clean_lines, linenum, pos): """List positions of all kinds of braces If input points to ( or { or [ then function proceeds until finding the position which closes it. Args: clean_lines: A CleansedLines instance containing the file. linenum: Current line number. pos: A position on the line. Yields: A tuple (linenum, pos, brace, depth) that points to each brace. Additionally each new line (linenum, pos, 's', depth) is yielded, for each line end (linenum, pos, 'e', depth) is yielded and at the very end it yields (linenum, pos, None, None). """ depth = 0 yielded_line_start = True startpos = pos while linenum < clean_lines.NumLines() - 1: line = clean_lines.elided_with_space_strings[linenum] if not line.startswith('#') or yielded_line_start: # Ignore #ifdefs, but not if it is macros that are checked for i, brace in enumerate(line[startpos:]): pos = i + startpos if brace != ' ' and not yielded_line_start: yield (linenum, pos, 's', depth) yielded_line_start = True if brace in BRACES: depth += 1 yield (linenum, pos, brace, depth) elif brace in CLOSING_BRACES: yield (linenum, pos, brace, depth) depth -= 1 if depth == 0: yield (linenum, pos, None, None) return yield (linenum, len(line) - 1, 'e', depth) yielded_line_start = False startpos = 0 linenum += 1 def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar): """Find the position just after the matching endchar. Args: line: a CleansedLines line. startpos: start searching at this position. depth: nesting level at startpos. startchar: expression opening character. endchar: expression closing character. Returns: On finding matching endchar: (index just after matching endchar, 0) Otherwise: (-1, new depth at end of this line) """ for i in range(startpos, len(line)): if line[i] == startchar: depth += 1 elif line[i] == endchar: depth -= 1 if depth == 0: return (i + 1, 0) return (-1, depth) def CloseExpression(clean_lines, linenum, pos): """If input points to ( or { or [, finds the position that closes it. If lines[linenum][pos] points to a '(' or '{' or '[', finds the linenum/pos that correspond to the closing of the expression. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. pos: A position on the line. Returns: A tuple (line, linenum, pos) pointer *past* the closing brace, or (line, len(lines), -1) if we never find a close. Note we ignore strings and comments when matching; and the line we return is the 'cleansed' line at linenum. """ line = clean_lines.elided[linenum] startchar = line[pos] if startchar not in BRACES: return (line, clean_lines.NumLines(), -1) endchar = BRACES[startchar] # Check first line (end_pos, num_open) = FindEndOfExpressionInLine( line, pos, 0, startchar, endchar) if end_pos > -1: return (line, linenum, end_pos) # Continue scanning forward while linenum < clean_lines.NumLines() - 1: linenum += 1 line = clean_lines.elided[linenum] (end_pos, num_open) = FindEndOfExpressionInLine( line, 0, num_open, startchar, endchar) if end_pos > -1: return (line, linenum, end_pos) # Did not find endchar before end of file, give up return (line, clean_lines.NumLines(), -1) def FindStartOfExpressionInLine(line, endpos, depth, startchar, endchar): """Find position at the matching startchar. This is almost the reverse of FindEndOfExpressionInLine, but note that the input position and returned position differs by 1. Args: line: a CleansedLines line. endpos: start searching at this position. depth: nesting level at endpos. startchar: expression opening character. endchar: expression closing character. Returns: On finding matching startchar: (index at matching startchar, 0) Otherwise: (-1, new depth at beginning of this line) """ for i in range(endpos, -1, -1): if line[i] == endchar: depth += 1 elif line[i] == startchar: depth -= 1 if depth == 0: return (i, 0) return (-1, depth) def ReverseCloseExpression(clean_lines, linenum, pos): """If input points to ) or } or ] or >, finds the position that opens it. If lines[linenum][pos] points to a ')' or '}' or ']' or '>', finds the linenum/pos that correspond to the opening of the expression. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. pos: A position on the line. Returns: A tuple (line, linenum, pos) pointer *at* the opening brace, or (line, 0, -1) if we never find the matching opening brace. Note we ignore strings and comments when matching; and the line we return is the 'cleansed' line at linenum. """ line = clean_lines.elided[linenum] endchar = line[pos] if endchar not in ')}]>': return (line, 0, -1) if endchar == ')': startchar = '(' if endchar == ']': startchar = '[' if endchar == '}': startchar = '{' if endchar == '>': startchar = '<' # Check last line (start_pos, num_open) = FindStartOfExpressionInLine( line, pos, 0, startchar, endchar) if start_pos > -1: return (line, linenum, start_pos) # Continue scanning backward while linenum > 0: linenum -= 1 line = clean_lines.elided[linenum] (start_pos, num_open) = FindStartOfExpressionInLine( line, len(line) - 1, num_open, startchar, endchar) if start_pos > -1: return (line, linenum, start_pos) # Did not find startchar before beginning of file, give up return (line, 0, -1) def GetHeaderGuardCPPVariable(filename): """Returns the CPP variable that should be used as a header guard. Args: filename: The name of a C++ header file. Returns: The CPP variable that should be used as a header guard in the named file. """ # Restores original filename in case that cpplint is invoked from Emacs's # flymake. filename = re.sub(r'_flymake\.h$', '.h', filename) filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename) fileinfo = FileInfo(filename) file_path_from_root = fileinfo.RelativePath() return 'NVIM_' + re.sub(r'[-./\s]', '_', file_path_from_root).upper() def CheckForHeaderGuard(filename, lines, error): """Checks that the file contains a header guard. Logs an error if no #ifndef header guard is present. For other headers, checks that the full pathname is used. Args: filename: The name of the C++ header file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found. """ if filename.endswith('.c.h') or FileInfo(filename).RelativePath() in set(( 'func_attr.h', )): return cppvar = GetHeaderGuardCPPVariable(filename) ifndef = None ifndef_linenum = 0 define = None endif = None endif_linenum = 0 for linenum, line in enumerate(lines): linesplit = line.split() if len(linesplit) >= 2: # find the first occurrence of #ifndef and #define, save arg if not ifndef and linesplit[0] == '#ifndef': # set ifndef to the header guard presented on the #ifndef line. ifndef = linesplit[1] ifndef_linenum = linenum if not define and linesplit[0] == '#define': define = linesplit[1] # find the last occurrence of #endif, save entire line if line.startswith('#endif'): endif = line endif_linenum = linenum if not ifndef: error(filename, 0, 'build/header_guard', 5, 'No #ifndef header guard found, suggested CPP variable is: %s' % cppvar) return if not define: error(filename, 0, 'build/header_guard', 5, 'No #define header guard found, suggested CPP variable is: %s' % cppvar) return # The guard should be PATH_FILE_H_, but we also allow PATH_FILE_H__ # for backward compatibility. if ifndef != cppvar: error_level = 0 if ifndef != cppvar + '_': error_level = 5 ParseNolintSuppressions(filename, lines[ifndef_linenum], ifndef_linenum, error) error(filename, ifndef_linenum, 'build/header_guard', error_level, '#ifndef header guard has wrong style, please use: %s' % cppvar) if define != ifndef: error(filename, 0, 'build/header_guard', 5, '#ifndef and #define don\'t match, suggested CPP variable is: %s' % cppvar) return if endif != ('#endif // %s' % cppvar): error_level = 0 if endif != ('#endif // %s' % (cppvar + '_')): error_level = 5 ParseNolintSuppressions(filename, lines[endif_linenum], endif_linenum, error) error(filename, endif_linenum, 'build/header_guard', error_level, '#endif line should be "#endif // %s"' % cppvar) def CheckForBadCharacters(filename, lines, error): """Logs an error for each line containing bad characters. Two kinds of bad characters: 1. Unicode replacement characters: These indicate that either the file contained invalid UTF-8 (likely) or Unicode replacement characters (which it shouldn't). Note that it's possible for this to throw off line numbering if the invalid UTF-8 occurred adjacent to a newline. 2. NUL bytes. These are problematic for some tools. Args: filename: The name of the current file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found. """ for linenum, line in enumerate(lines): if u'\ufffd' in line: error(filename, linenum, 'readability/utf8', 5, 'Line contains invalid UTF-8' ' (or Unicode replacement character).') if '\0' in line: error(filename, linenum, 'readability/nul', 5, 'Line contains NUL byte.') def CheckForNewlineAtEOF(filename, lines, error): """Logs an error if there is no newline char at the end of the file. Args: filename: The name of the current file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found. """ # The array lines() was created by adding two newlines to the # original file (go figure), then splitting on \n. # To verify that the file ends in \n, we just have to make sure the # last-but-two element of lines() exists and is empty. if len(lines) < 3 or lines[-2]: error(filename, len(lines) - 2, 'whitespace/ending_newline', 5, 'Could not find a newline character at the end of the file.') def CheckForMultilineCommentsAndStrings(filename, clean_lines, linenum, error): """Logs an error if we see /* ... */ or "..." that extend past one line. /* ... */ comments are legit inside macros, for one line. Otherwise, we prefer // comments, so it's ok to warn about the other. Likewise, it's ok for strings to extend across multiple lines, as long as a line continuation character (backslash) terminates each line. Although not currently prohibited by the C++ style guide, it's ugly and unnecessary. We don't do well with either in this lint program, so we warn about both. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # Remove all \\ (escaped backslashes) from the line. They are OK, and the # second (escaped) slash may trigger later \" detection erroneously. line = line.replace('\\\\', '') if line.count('/*') > line.count('*/'): error(filename, linenum, 'readability/multiline_comment', 5, 'Complex multi-line /*...*/-style comment found. ' 'Lint may give bogus warnings. ' 'Consider replacing these with //-style comments, ' 'with #if 0...#endif, ' 'or with more clearly structured multi-line comments.') if (line.count('"') - line.count('\\"')) % 2: error(filename, linenum, 'readability/multiline_string', 5, 'Multi-line string ("...") found. This lint script doesn\'t ' 'do well with such strings, and may give bogus warnings. ' 'Use C++11 raw strings or concatenation instead.') def CheckForOldStyleComments(filename, line, linenum, error): """Logs an error if we see /*-style comment Args: filename: The name of the current file. line: The text of the line to check. linenum: The number of the line to check. error: The function to call with any errors found. """ if line.find('/*') >= 0 and line[-1] != '\\': error(filename, linenum, 'readability/old_style_comment', 5, '/*-style comment found, it should be replaced with //-style. ' '/*-style comments are only allowed inside macros. ' 'Note that you should not use /*-style comments to document ' 'macros itself, use doxygen-style comments for this.') threading_list = ( ('asctime(', 'os_asctime_r('), ('ctime(', 'os_ctime_r('), ('getgrgid(', 'os_getgrgid_r('), ('getgrnam(', 'os_getgrnam_r('), ('getlogin(', 'os_getlogin_r('), ('getpwnam(', 'os_getpwnam_r('), ('getpwuid(', 'os_getpwuid_r('), ('gmtime(', 'os_gmtime_r('), ('localtime(', 'os_localtime_r('), ('strtok(', 'os_strtok_r('), ('ttyname(', 'os_ttyname_r('), ('asctime_r(', 'os_asctime_r('), ('ctime_r(', 'os_ctime_r('), ('getgrgid_r(', 'os_getgrgid_r('), ('getgrnam_r(', 'os_getgrnam_r('), ('getlogin_r(', 'os_getlogin_r('), ('getpwnam_r(', 'os_getpwnam_r('), ('getpwuid_r(', 'os_getpwuid_r('), ('gmtime_r(', 'os_gmtime_r('), ('localtime_r(', 'os_localtime_r('), ('strtok_r(', 'os_strtok_r('), ('ttyname_r(', 'os_ttyname_r('), ) def CheckPosixThreading(filename, clean_lines, linenum, error): """Checks for calls to thread-unsafe functions. Much code has been originally written without consideration of multi-threading. Also, engineers are relying on their old experience; they have learned posix before threading extensions were added. These tests guide the engineers to use thread-safe functions (when using posix directly). Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] for single_thread_function, multithread_safe_function in threading_list: ix = line.find(single_thread_function) # Comparisons made explicit for clarity -- pylint: # disable=g-explicit-bool-comparison if ix >= 0 and (ix == 0 or (not line[ix - 1].isalnum() and line[ix - 1] not in ('_', '.', '>'))): error(filename, linenum, 'runtime/threadsafe_fn', 2, 'Use ' + multithread_safe_function + '...) instead of ' + single_thread_function + '...). If it is missing, consider implementing it;' + ' see os_localtime_r for an example.') memory_functions = ( ('malloc(', 'xmalloc('), ('calloc(', 'xcalloc('), ('realloc(', 'xrealloc('), ('strdup(', 'xstrdup('), ('free(', 'xfree('), ) memory_ignore_pattern = re.compile(r'src/nvim/memory.c$') def CheckMemoryFunctions(filename, clean_lines, linenum, error): """Checks for calls to invalid functions. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ if memory_ignore_pattern.search(filename): return line = clean_lines.elided[linenum] for function, suggested_function in memory_functions: ix = line.find(function) # Comparisons made explicit for clarity -- pylint: # disable=g-explicit-bool-comparison if ix >= 0 and (ix == 0 or (not line[ix - 1].isalnum() and line[ix - 1] not in ('_', '.', '>'))): error(filename, linenum, 'runtime/memory_fn', 2, 'Use ' + suggested_function + '...) instead of ' + function + '...).') # Matches invalid increment: *count++, which moves pointer instead of # incrementing a value. _RE_PATTERN_INVALID_INCREMENT = re.compile( r'^\s*\*\w+(\+\+|--);') class _BlockInfo(object): """Stores information about a generic block of code.""" def __init__(self, seen_open_brace): self.seen_open_brace = seen_open_brace self.open_parentheses = 0 self.inline_asm = _NO_ASM class _PreprocessorInfo(object): """Stores checkpoints of nesting stacks when #if/#else is seen.""" def __init__(self, stack_before_if): # The entire nesting stack before #if self.stack_before_if = stack_before_if # The entire nesting stack up to #else self.stack_before_else = [] # Whether we have already seen #else or #elif self.seen_else = False class _NestingState(object): """Holds states related to parsing braces.""" def __init__(self): # Stack for tracking all braces. An object is pushed whenever we # see a "{", and popped when we see a "}". Only 1 type of # object is possible: # - _BlockInfo: some type of block. self.stack = [] # Stack of _PreprocessorInfo objects. self.pp_stack = [] def SeenOpenBrace(self): """Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace. """ return (not self.stack) or self.stack[-1].seen_open_brace def UpdatePreprocessor(self, line): """Update preprocessor stack. We need to handle preprocessors due to classes like this: #ifdef SWIG struct ResultDetailsPageElementExtensionPoint { #else struct ResultDetailsPageElementExtensionPoint : public Extension { #endif We make the following assumptions (good enough for most files): - Preprocessor condition evaluates to true from #if up to first #else/#elif/#endif. - Preprocessor condition evaluates to false from #else/#elif up to #endif. We still perform lint checks on these lines, but these do not affect nesting stack. Args: line: current line to check. """ if Match(r'^\s*#\s*(if|ifdef|ifndef)\b', line): # Beginning of #if block, save the nesting stack here. The saved # stack will allow us to restore the parsing state in the #else # case. self.pp_stack.append(_PreprocessorInfo(copy.deepcopy(self.stack))) elif Match(r'^\s*#\s*(else|elif)\b', line): # Beginning of #else block if self.pp_stack: if not self.pp_stack[-1].seen_else: # This is the first #else or #elif block. Remember the # whole nesting stack up to this point. This is what we # keep after the #endif. self.pp_stack[-1].seen_else = True self.pp_stack[-1].stack_before_else = copy.deepcopy( self.stack) # Restore the stack to how it was before the #if self.stack = copy.deepcopy(self.pp_stack[-1].stack_before_if) else: # TODO(unknown): unexpected #else, issue warning? pass elif Match(r'^\s*#\s*endif\b', line): # End of #if or #else blocks. if self.pp_stack: # If we saw an #else, we will need to restore the nesting # stack to its former state before the #else, otherwise we # will just continue from where we left off. if self.pp_stack[-1].seen_else: # Here we can just use a shallow copy since we are the last # reference to it. self.stack = self.pp_stack[-1].stack_before_else # Drop the corresponding #if self.pp_stack.pop() else: # TODO(unknown): unexpected #endif, issue warning? pass def Update(self, filename, clean_lines, linenum, error): """Update nesting state with current line. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # Update pp_stack first self.UpdatePreprocessor(line) # Count parentheses. This is to avoid adding struct arguments to # the nesting stack. if self.stack: inner_block = self.stack[-1] depth_change = line.count('(') - line.count(')') inner_block.open_parentheses += depth_change # Also check if we are starting or ending an inline assembly block. if inner_block.inline_asm in (_NO_ASM, _END_ASM): if (depth_change != 0 and inner_block.open_parentheses == 1 and _MATCH_ASM.match(line)): # Enter assembly block inner_block.inline_asm = _INSIDE_ASM else: # Not entering assembly block. If previous line was # _END_ASM, we will now shift to _NO_ASM state. inner_block.inline_asm = _NO_ASM elif (inner_block.inline_asm == _INSIDE_ASM and inner_block.open_parentheses == 0): # Exit assembly block inner_block.inline_asm = _END_ASM # Consume braces or semicolons from what's left of the line while True: # Match first brace, semicolon, or closed parenthesis. matched = Match(r'^[^{;)}]*([{;)}])(.*)$', line) if not matched: break token = matched.group(1) if token == '{': # If namespace or class hasn't seen an opening brace yet, mark # namespace/class head as complete. Push a new block onto the # stack otherwise. if not self.SeenOpenBrace(): self.stack[-1].seen_open_brace = True else: self.stack.append(_BlockInfo(True)) if _MATCH_ASM.match(line): self.stack[-1].inline_asm = _BLOCK_ASM elif token == ';' or token == ')': # If we haven't seen an opening brace yet, but we already saw # a semicolon, this is probably a forward declaration. Pop # the stack for these. # # Similarly, if we haven't seen an opening brace yet, but we # already saw a closing parenthesis, then these are probably # function arguments with extra "class" or "struct" keywords. # Also pop these stack for these. if not self.SeenOpenBrace(): self.stack.pop() else: # token == '}' # Perform end of block checks and pop the stack. if self.stack: self.stack.pop() line = matched.group(2) def CheckForNonStandardConstructs(filename, clean_lines, linenum, nesting_state, error): r"""Logs an error if we see certain non-ANSI constructs ignored by gcc-2. Complain about several constructs which gcc-2 accepts, but which are not standard C++. Warning about these in lint is one way to ease the transition to new compilers. - put storage class first (e.g. "static const" instead of "const static"). - "%" PRId64 instead of %qd" in printf-type functions. - "%1$d" is non-standard in printf-type functions. - "\%" is an undefined character escape sequence. - text after #endif is not allowed. - invalid inner-style forward declaration. - >? and ?= and )\?=?\s*(\w+|[+-]?\d+)(\.\d*)?', line): error(filename, linenum, 'build/deprecated', 3, '>? and 1: error(filename, linenum, 'whitespace/todo', 2, 'Too many spaces before TODO') username = match.group(2) if not username: error(filename, linenum, 'readability/todo', 2, 'Missing username in TODO; it should look like ' '"// TODO(my_username): Stuff."') colon = match.group(3) if not colon: error(filename, linenum, 'readability/todo', 2, 'Missing colon in TODO; it should look like ' '"// TODO(my_username): Stuff."') middle_whitespace = match.group(4) # Comparisons made explicit for correctness -- pylint: # disable=g-explicit-bool-comparison if middle_whitespace != ' ' and middle_whitespace != '': error(filename, linenum, 'whitespace/todo', 2, 'TODO(my_username): should be followed by a space') def FindNextMatchingAngleBracket(clean_lines, linenum, init_suffix): """Find the corresponding > to close a template. Args: clean_lines: A CleansedLines instance containing the file. linenum: Current line number. init_suffix: Remainder of the current line after the initial <. Returns: True if a matching bracket exists. """ line = init_suffix nesting_stack = ['<'] while True: # Find the next operator that can tell us whether < is used as an # opening bracket or as a less-than operator. We only want to # warn on the latter case. # # We could also check all other operators and terminate the search # early, e.g. if we got something like this "a(),;\[\]]*([<>(),;\[\]])(.*)$', line) if match: # Found an operator, update nesting stack operator = match.group(1) line = match.group(2) if nesting_stack[-1] == '<': # Expecting closing angle bracket if operator in ('<', '(', '['): nesting_stack.append(operator) elif operator == '>': nesting_stack.pop() if not nesting_stack: # Found matching angle bracket return True elif operator == ',': # Got a comma after a bracket, this is most likely a # template argument. We have not seen a closing angle # bracket yet, but it's probably a few lines later if we # look for it, so just return early here. return True else: # Got some other operator. return False else: # Expecting closing parenthesis or closing bracket if operator in ('<', '(', '['): nesting_stack.append(operator) elif operator in (')', ']'): # We don't bother checking for matching () or []. If we got # something like (] or [), it would have been a syntax # error. nesting_stack.pop() else: # Scan the next line linenum += 1 if linenum >= len(clean_lines.elided): break line = clean_lines.elided[linenum] # Exhausted all remaining lines and still no matching angle bracket. # Most likely the input was incomplete, otherwise we should have # seen a semicolon and returned early. return True def FindPreviousMatchingAngleBracket(clean_lines, linenum, init_prefix): """Find the corresponding < that started a template. Args: clean_lines: A CleansedLines instance containing the file. linenum: Current line number. init_prefix: Part of the current line before the initial >. Returns: True if a matching bracket exists. """ line = init_prefix nesting_stack = ['>'] while True: # Find the previous operator match = Search(r'^(.*)([<>(),;\[\]])[^<>(),;\[\]]*$', line) if match: # Found an operator, update nesting stack operator = match.group(2) line = match.group(1) if nesting_stack[-1] == '>': # Expecting opening angle bracket if operator in ('>', ')', ']'): nesting_stack.append(operator) elif operator == '<': nesting_stack.pop() if not nesting_stack: # Found matching angle bracket return True elif operator == ',': # Got a comma before a bracket, this is most likely a # template argument. The opening angle bracket is probably # there if we look for it, so just return early here. return True else: # Got some other operator. return False else: # Expecting opening parenthesis or opening bracket if operator in ('>', ')', ']'): nesting_stack.append(operator) elif operator in ('(', '['): nesting_stack.pop() else: # Scan the previous line linenum -= 1 if linenum < 0: break line = clean_lines.elided[linenum] # Exhausted all earlier lines and still no matching angle bracket. return False def CheckExpressionAlignment(filename, clean_lines, linenum, error, startpos=0): """Checks for the correctness of alignment inside expressions Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. startpos: Position where to start searching for expression start. """ level_starts = {} line = clean_lines.elided_with_space_strings[linenum] prev_line_start = Search(r'\S', line).start() depth_line_starts = {} pos = min([ idx for idx in ( line.find(k, startpos) for k in BRACES if k != '{' ) if idx >= 0 ] + [len(line) + 1]) if pos == len(line) + 1: return ignore_error_levels = set() firstlinenum = linenum for linenum, pos, brace, depth in GetExprBracesPosition( clean_lines, linenum, pos ): line = clean_lines.elided_with_space_strings[linenum] if depth is None: if pos < len(line) - 1: CheckExpressionAlignment(filename, clean_lines, linenum, error, pos + 1) return elif depth <= 0: error(filename, linenum, 'syntax/parenthesis', 4, 'Unbalanced parenthesis') return if brace == 's': assert firstlinenum != linenum if level_starts[depth][1]: if line[pos] == BRACES[depth_line_starts[depth][1]]: if pos != depth_line_starts[depth][0]: if depth not in ignore_error_levels: error(filename, linenum, 'whitespace/indent', 2, 'End of the inner expression should have ' 'the same indent as start') else: if (pos != depth_line_starts[depth][0] + 4 and not (depth_line_starts[depth][1] == '{' and pos == depth_line_starts[depth][0] + 2)): if depth not in ignore_error_levels: error(filename, linenum, 'whitespace/indent', 2, 'Inner expression indentation should be 4') else: if (pos != level_starts[depth][0] + 1 + (level_starts[depth][2] == '{')): if depth not in ignore_error_levels: error(filename, linenum, 'whitespace/alignment', 2, 'Inner expression should be aligned ' 'as opening brace + 1 (+ 2 in case of {)') prev_line_start = pos elif brace == 'e': pass else: opening = brace in BRACES if opening: # Only treat {} as part of the expression if it is preceded by # "=" (brace initializer) or "(type)" (construct like (struct # foo) { ... }). if brace == '{' and not (Search( r'(?:= *|\((?:struct )?\w+(\s*\[\w*\])?\)) *$', line[:pos]) ): ignore_error_levels.add(depth) line_ended_with_opening = ( pos == len(line) - 2 * (line.endswith(' \\')) - 1) level_starts[depth] = (pos, line_ended_with_opening, brace) if line_ended_with_opening: depth_line_starts[depth] = (prev_line_start, brace) else: del level_starts[depth] def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): """Checks for the correctness of various spacing issues in the code. Things we check for: spaces around operators, spaces after if/for/while/switch, no spaces around parens in function calls, two spaces between code and comment, don't start a block with a blank line, don't end a function with a blank line, don't add a blank line after public/protected/private, don't have too many blank lines in a row, spaces after {, spaces before }. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. nesting_state: A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error: The function to call with any errors found. """ # Don't use "elided" lines here, otherwise we can't check commented lines. # Don't want to use "raw" either, because we don't want to check inside # C++11 raw strings, raw = clean_lines.lines_without_raw_strings line = raw[linenum] # Before nixing comments, check if the line is blank for no good # reason. This includes the first line after a block is opened, and # blank lines at the end of a function (ie, right before a line like '}' # # Skip all the blank line checks if we are immediately inside a # namespace body. In other words, don't issue blank line warnings # for this block: # namespace { # # } # # A warning about missing end of namespace comments will be issued instead. if IsBlankLine(line): elided = clean_lines.elided prev_line = elided[linenum - 1] prevbrace = prev_line.rfind('{') # TODO(unknown): Don't complain if line before blank line, and line # after,both start with alnums and are indented the same # amount. This ignores whitespace at the start of a # namespace block because those are not usually indented. if prevbrace != -1 and prev_line[prevbrace:].find('}') == -1: # OK, we have a blank line at the start of a code block. Before we # complain, we check if it is an exception to the rule: The previous # non-empty line has the parameters of a function header that are # indented 4 spaces (because they did not fit in a 80 column line # when placed on the same line as the function name). We also check # for the case where the previous line is indented 6 spaces, which # may happen when the initializers of a constructor do not fit into # a 80 column line. exception = False if Match(r' {6}\w', prev_line): # Initializer list? # We are looking for the opening column of initializer list, # which should be indented 4 spaces to cause 6 space indentation # afterwards. search_position = linenum - 2 while (search_position >= 0 and Match(r' {6}\w', elided[search_position])): search_position -= 1 exception = (search_position >= 0 and elided[search_position][:5] == ' :') else: # Search for the function arguments or an initializer list. We # use a simple heuristic here: If the line is indented 4 spaces; # and we have a closing paren, without the opening paren, # followed by an opening brace or colon (for initializer lists) # we assume that it is the last line of a function header. If # we have a colon indented 4 spaces, it is an initializer list. exception = (Match(r' {4}\w[^\(]*\)\s*(const\s*)?(\{\s*$|:)', prev_line) or Match(r' {4}:', prev_line)) if not exception: error(filename, linenum, 'whitespace/blank_line', 2, 'Redundant blank line at the start of a code block ' 'should be deleted.') # Ignore blank lines at the end of a block in a long if-else # chain, like this: # if (condition1) { # // Something followed by a blank line # # } else if (condition2) { # // Something else # } if linenum + 1 < clean_lines.NumLines(): next_line = raw[linenum + 1] if (next_line and Match(r'\s*}', next_line) and next_line.find('} else ') == -1): error(filename, linenum, 'whitespace/blank_line', 3, 'Redundant blank line at the end of a code block ' 'should be deleted.') # Next, we complain if there's a comment too near the text commentpos = line.find('//') if commentpos != -1: # Check if the // may be in quotes. If so, ignore it # Comparisons made explicit for clarity -- pylint: # disable=g-explicit-bool-comparison if (line.count('"', 0, commentpos) - line.count('\\"', 0, commentpos)) % 2 == 0: # not in quotes # Allow one space for new scopes, two spaces otherwise: if (not Match(r'^\s*{ //', line) and ((commentpos >= 1 and line[commentpos - 1] not in string.whitespace) or (commentpos >= 2 and line[commentpos - 2] not in string.whitespace))): error(filename, linenum, 'whitespace/comments', 2, 'At least two spaces is best between code and comments') # There should always be a space between the // and the comment commentend = commentpos + 2 if commentend < len(line) and not line[commentend] == ' ': # but some lines are exceptions -- e.g. if they're big # comment delimiters like: # //---------------------------------------------------------- # or are an empty C++ style Doxygen comment, like: # /// # or C++ style Doxygen comments placed after the variable: # ///< Header comment # //!< Header comment # or they begin with multiple slashes followed by a space: # //////// Header comment # or they are Vim {{{ fold markers match = (Search(r'[=/-]{4,}\s*$', line[commentend:]) or Search(r'^/$', line[commentend:]) or Search(r'^!< ', line[commentend:]) or Search(r'^/< ', line[commentend:]) or Search(r'^/+ ', line[commentend:]) or Search(r'^(?:\{{3}|\}{3})\d*(?: |$)', line[commentend:])) if not match: error(filename, linenum, 'whitespace/comments', 4, 'Should have a space between // and comment') CheckComment(line[commentpos:], filename, linenum, error) line = clean_lines.elided[linenum] # get rid of comments and strings # Don't try to do spacing checks for operator methods line = re.sub(r'operator(==|!=|<|<<|<=|>=|>>|>)\(', 'operator\(', line) # We allow no-spaces around = within an if: "if ( (a=Foo()) == 0 )". # Otherwise not. Note we only check for non-spaces on *both* sides; # sometimes people put non-spaces on one side when aligning ='s among # many lines (not that this is behavior that I approve of...) if Search(r'[\w.]=[\w.]', line) and not Search(r'\b(if|while) ', line): error(filename, linenum, 'whitespace/operators', 4, 'Missing spaces around =') # It's ok not to have spaces around binary operators like + - * /, but if # there's too little whitespace, we get concerned. It's hard to tell, # though, so we punt on this one for now. TODO. match = Search(r'(?:[^ (*/![])+(?= first to avoid false positives with < and >, then # check non-include lines for spacing around < and >. match = Search(r'[^<>=!\s](==|!=|<=|>=)[^<>=!\s]', line) if match: error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around %s' % match.group(1)) # Boolean operators should be placed on the next line. if Search(r'(?:&&|\|\|)$', line): error(filename, linenum, 'whitespace/operators', 4, 'Boolean operator should be placed on the same line as the start ' 'of its right operand') # We allow no-spaces around << when used like this: 10<<20, but # not otherwise (particularly, not when used as streams) # Also ignore using ns::operator<<; match = Search(r'(operator|\S)(?:L|UL|ULL|l|ul|ull)?<<(\S)', line) if (match and not (match.group(1).isdigit() and match.group(2).isdigit()) and not (match.group(1) == 'operator' and match.group(2) == ';')): error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around <<') elif not Match(r'#.*include', line): # Avoid false positives on -> reduced_line = line.replace('->', '') # Look for < that is not surrounded by spaces. This is only # triggered if both sides are missing spaces, even though # technically should should flag if at least one side is missing a # space. This is done to avoid some false positives with shifts. match = Search(r'[^\s<]<([^\s=<].*)', reduced_line) if (match and not FindNextMatchingAngleBracket(clean_lines, linenum, match.group(1))): error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around <') # Look for > that is not surrounded by spaces. Similar to the # above, we only trigger if both sides are missing spaces to avoid # false positives with shifts. match = Search(r'^(.*[^\s>])>[^\s=>]', reduced_line) if (match and not FindPreviousMatchingAngleBracket(clean_lines, linenum, match.group(1))): error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around >') # We allow no-spaces around >> for almost anything. This is because # C++11 allows ">>" to close nested templates, which accounts for # most cases when ">>" is not followed by a space. # # We still warn on ">>" followed by alpha character, because that is # likely due to ">>" being used for right shifts, e.g.: # value >> alpha # # When ">>" is used to close templates, the alphanumeric letter that # follows would be part of an identifier, and there should still be # a space separating the template type and the identifier. # type> alpha match = Search(r'>>[a-zA-Z_]', line) if match: error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around >>') # There shouldn't be space around unary operators match = Search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line) if match: error(filename, linenum, 'whitespace/operators', 4, 'Extra space for operator %s' % match.group(1)) # A pet peeve of mine: no spaces after an if, while, switch, or for match = Search(r' (if\(|for\(|while\(|switch\()', line) if match: error(filename, linenum, 'whitespace/parens', 5, 'Missing space before ( in %s' % match.group(1)) # For if/for/while/switch, the left and right parens should be # consistent about how many spaces are inside the parens, and # there should either be zero or one spaces inside the parens. # We don't want: "if ( foo)" or "if ( foo )". # Exception: "for ( ; foo; bar)" and "for (foo; bar; )" are allowed. match = Search(r'\b(if|for|while|switch)\s*' r'\(([ ]*)(.).*[^ ]+([ ]*)\)\s*{\s*$', line) if match: if len(match.group(2)) != len(match.group(4)): if not (match.group(3) == ';' and len(match.group(2)) == 1 + len(match.group(4)) or not match.group(2) and Search(r'\bfor\s*\(.*; \)', line)): error(filename, linenum, 'whitespace/parens', 5, 'Mismatching spaces inside () in %s' % match.group(1)) if len(match.group(2)) not in [0, 1]: error(filename, linenum, 'whitespace/parens', 5, 'Should have zero or one spaces inside ( and ) in %s' % match.group(1)) # You should always have a space after a comma (either as fn arg or # operator). # # This does not apply when the non-space character following the # comma is another comma, since the only time when that happens is # for empty macro arguments. # # We run this check in two passes: first pass on elided lines to # verify that lines contain missing whitespaces, second pass on raw # lines to confirm that those missing whitespaces are not due to # elided comments. if Search(r',[^,\s]', line) and Search(r',[^,\s]', raw[linenum]): error(filename, linenum, 'whitespace/comma', 3, 'Missing space after ,') # You should always have a space after a semicolon # except for few corner cases # TODO(unknown): clarify if 'if (1) { return 1;}' is requires one more # space after ; if Search(r';[^\s};\\)/]', line): error(filename, linenum, 'whitespace/semicolon', 3, 'Missing space after ;') # Next we will look for issues with function calls. CheckSpacingForFunctionCall(filename, line, linenum, error) # Check whether everything inside expressions is aligned correctly if any((line.find(k) >= 0 for k in BRACES if k != '{')): CheckExpressionAlignment(filename, clean_lines, linenum, error) # Except after an opening paren, or after another opening brace (in case of # an initializer list, for instance), you should have spaces before your # braces. And since you should never have braces at the beginning of a line, # this is an easy test. match = Match(r'^(.*[^ ({]){', line) if match: # Try a bit harder to check for brace initialization. This # happens in one of the following forms: # Constructor() : initializer_list_{} { ... } # Constructor{}.MemberFunction() # Type variable{}; # FunctionCall(type{}, ...); # LastArgument(..., type{}); # LOG(INFO) << type{} << " ..."; # map_of_type[{...}] = ...; # # We check for the character following the closing brace, and # silence the warning if it's one of those listed above, i.e. # "{.;,)<]". # # To account for nested initializer list, we allow any number of # closing braces up to "{;,)<". We can't simply silence the # warning on first sight of closing brace, because that would # cause false negatives for things that are not initializer lists. # Silence this: But not this: # Outer{ if (...) { # Inner{...} if (...){ // Missing space before { # }; } # # There is a false negative with this approach if people inserted # spurious semicolons, e.g. "if (cond){};", but we will catch the # spurious semicolon with a separate check. (endline, endlinenum, endpos) = CloseExpression( clean_lines, linenum, len(match.group(1))) trailing_text = '' if endpos > -1: trailing_text = endline[endpos:] for offset in range(endlinenum + 1, min(endlinenum + 3, clean_lines.NumLines() - 1)): trailing_text += clean_lines.elided[offset] if not Match(r'^[\s}]*[{.;,)<\]]', trailing_text): error(filename, linenum, 'whitespace/braces', 5, 'Missing space before {') # Make sure '} else {' has spaces. if Search(r'}else', line): error(filename, linenum, 'whitespace/braces', 5, 'Missing space before else') # You shouldn't have spaces before your brackets, except maybe after # 'delete []' or 'new char * []'. if Search(r'\w\s+\[', line): error(filename, linenum, 'whitespace/braces', 5, 'Extra space before [') # You shouldn't have a space before a semicolon at the end of the line. if Search(r':\s*;\s*$', line): error(filename, linenum, 'whitespace/semicolon', 5, 'Semicolon defining empty statement. Use {} instead.') elif Search(r'^\s*;\s*$', line): error(filename, linenum, 'whitespace/semicolon', 5, 'Line contains only semicolon. If this should be an empty' ' statement, use {} instead.') elif Search(r'\s+;\s*$', line): error(filename, linenum, 'whitespace/semicolon', 5, 'Extra space before last semicolon. If this should be an empty ' 'statement, use {} instead.') if Search(r'\{(?!\})\S', line): error(filename, linenum, 'whitespace/braces', 5, 'Missing space after {') if Search(r'\S(?= 0: prevline = clean_lines.elided[prevlinenum] if not IsBlankLine(prevline): # if not a blank line... return (prevline, prevlinenum) prevlinenum -= 1 return ('', -1) def CheckBraces(filename, clean_lines, linenum, error): """Looks for misplaced braces (e.g. at the end of line). Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # get rid of comments and strings if Match(r'\s+{\s*$', line): # We allow an open brace to start a line in the case where someone # is using braces in a block to explicitly create a new scope, which # is commonly used to control the lifetime of stack-allocated # variables. Braces are also used for brace initializers inside # function calls. We don't detect this perfectly: we just don't # complain if the last non-whitespace character on the previous # non-blank line is ',', ';', ':', '(', '{', or '}', or if the # previous line starts a preprocessor block. prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0] if (not Search(r'[,;:}{(]\s*$', prevline) and not Match(r'\s*#', prevline)): error(filename, linenum, 'whitespace/braces', 4, '{ should almost always be at the end' ' of the previous line') # Brace must appear after function signature, but on the *next* line if Match(r'^(?:\w+(?: ?\*+)? )+\w+\(', line): pos = line.find('(') (endline, end_linenum, endpos) = CloseExpression( clean_lines, linenum, pos) if endline.endswith('{'): error(filename, end_linenum, 'readability/braces', 5, 'Brace starting function body must be placed on its own line') else: func_start_linenum = end_linenum + 1 while not clean_lines.lines[func_start_linenum] == '{': attrline = Match(r'^((?!# *define).*?)(?:FUNC_ATTR|FUNC_API|REAL_FATTR)_\w+(?:\(\d+(, \d+)*\))?', clean_lines.lines[func_start_linenum]) if attrline: if len(attrline.group(1)) != 2: error(filename, func_start_linenum, 'whitespace/indent', 5, 'Function attribute line should have 2-space ' 'indent') func_start_linenum += 1 else: func_start = clean_lines.lines[func_start_linenum] if not func_start.startswith('enum ') and func_start.endswith('{'): error(filename, func_start_linenum, 'readability/braces', 5, 'Brace starting function body must be placed ' 'after the function signature') break # An else clause should be on the same line as the preceding closing brace. # If there is no preceding closing brace, there should be one. if Match(r'\s*else\s*', line): prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0] if Match(r'\s*}\s*$', prevline): error(filename, linenum, 'whitespace/newline', 4, 'An else should appear on the same line as the preceding }') else: error(filename, linenum, 'readability/braces', 5, 'An else should always have braces before it') # If should always have a brace for blockstart in ('if', 'while', 'for'): if Match(r'\s*{0}(?!\w)[^{{]*$'.format(blockstart), line): pos = line.find(blockstart) pos = line.find('(', pos) if pos > 0: (endline, _, endpos) = CloseExpression( clean_lines, linenum, pos) if endline[endpos:].find('{') == -1: error(filename, linenum, 'readability/braces', 5, '{0} should always use braces'.format(blockstart)) # If braces come on one side of an else, they should be on both. # However, we have to worry about "else if" that spans multiple lines! if Search(r'}\s*else[^{]*$', line) or Match(r'[^}]*else\s*{', line): if Search(r'}\s*else if([^{]*)$', line): # could be multi-line if # find the ( after the if pos = line.find('else if') pos = line.find('(', pos) if pos > 0: (endline, _, endpos) = CloseExpression( clean_lines, linenum, pos) # must be brace after if if endline[endpos:].find('{') == -1: error(filename, linenum, 'readability/braces', 5, 'If an else has a brace on one side,' ' it should have it on both') else: # common case: else not followed by a multi-line if error(filename, linenum, 'readability/braces', 5, 'If an else has a brace on one side,' ' it should have it on both') # Likewise, an else should never have the else clause on the same line if Search(r'\belse [^\s{]', line) and not Search(r'\belse if\b', line): error(filename, linenum, 'whitespace/newline', 4, 'Else clause should never be on same line as else (use 2 lines)') # In the same way, a do/while should never be on one line if Match(r'\s*do [^\s{]', line): error(filename, linenum, 'whitespace/newline', 4, 'do/while clauses should not be on a single line') # Block bodies should not be followed by a semicolon. Due to C++11 # brace initialization, there are more places where semicolons are # required than not, so we use a whitelist approach to check these # rather than a blacklist. These are the places where "};" should # be replaced by just "}": # 1. Some flavor of block following closing parenthesis: # for (;;) {}; # while (...) {}; # switch (...) {}; # Function(...) {}; # if (...) {}; # if (...) else if (...) {}; # # 2. else block: # if (...) else {}; # # 3. const member function: # Function(...) const {}; # # 4. Block following some statement: # x = 42; # {}; # # 5. Block at the beginning of a function: # Function(...) { # {}; # } # # Note that naively checking for the preceding "{" will also match # braces inside multi-dimensional arrays, but this is fine since # that expression will not contain semicolons. # # 6. Block following another block: # while (true) {} # {}; # # 7. End of namespaces: # namespace {}; # # These semicolons seems far more common than other kinds of # redundant semicolons, possibly due to people converting classes # to namespaces. For now we do not warn for this case. # # Try matching case 1 first. match = Match(r'^(.*\)\s*)\{', line) if match: # Matched closing parenthesis (case 1). Check the token before the # matching opening parenthesis, and don't warn if it looks like a # macro. This avoids these false positives: # - macro that defines a base class # - multi-line macro that defines a base class # - macro that defines the whole class-head # # But we still issue warnings for macros that we know are safe to # warn, specifically: # - TEST, TEST_F, TEST_P, MATCHER, MATCHER_P # - TYPED_TEST # - INTERFACE_DEF # - EXCLUSIVE_LOCKS_REQUIRED, SHARED_LOCKS_REQUIRED, LOCKS_EXCLUDED: # # We implement a whitelist of safe macros instead of a blacklist of # unsafe macros, even though the latter appears less frequently in # google code and would have been easier to implement. This is because # the downside for getting the whitelist wrong means some extra # semicolons, while the downside for getting the blacklist wrong # would result in compile errors. # # In addition to macros, we also don't want to warn on compound # literals. closing_brace_pos = match.group(1).rfind(')') opening_parenthesis = ReverseCloseExpression( clean_lines, linenum, closing_brace_pos) if opening_parenthesis[2] > -1: line_prefix = opening_parenthesis[0][0:opening_parenthesis[2]] macro = Search(r'\b([A-Z_]+)\s*$', line_prefix) if ((macro and macro.group(1) not in ( 'TEST', 'TEST_F', 'MATCHER', 'MATCHER_P', 'TYPED_TEST', 'EXCLUSIVE_LOCKS_REQUIRED', 'SHARED_LOCKS_REQUIRED', 'LOCKS_EXCLUDED', 'INTERFACE_DEF')) or Search(r'\s+=\s*$', line_prefix) or Search(r'^\s*return\s*$', line_prefix)): match = None else: # Try matching cases 2-3. match = Match(r'^(.*(?:else|\)\s*const)\s*)\{', line) if not match: # Try matching cases 4-6. These are always matched on separate # lines. # # Note that we can't simply concatenate the previous line to the # current line and do a single match, otherwise we may output # duplicate warnings for the blank line case: # if (cond) { # // blank line # } prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0] if prevline and Search(r'[;{}]\s*$', prevline): match = Match(r'^(\s*)\{', line) # Check matching closing brace if match: (endline, endlinenum, endpos) = CloseExpression( clean_lines, linenum, len(match.group(1))) if endpos > -1 and Match(r'^\s*;', endline[endpos:]): # Current {} pair is eligible for semicolon check, and we have found # the redundant semicolon, output warning here. # # Note: because we are scanning forward for opening braces, and # outputting warnings for the matching closing brace, if there are # nested blocks with trailing semicolons, we will get the error # messages in reversed order. error(filename, endlinenum, 'readability/braces', 4, "You don't need a ; after a }") def CheckEmptyBlockBody(filename, clean_lines, linenum, error): """Look for empty loop/conditional body with only a single semicolon. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ # Search for loop keywords at the beginning of the line. Because only # whitespaces are allowed before the keywords, this will also ignore most # do-while-loops, since those lines should start with closing brace. # # We also check "if" blocks here, since an empty conditional block # is likely an error. line = clean_lines.elided[linenum] matched = Match(r'\s*(for|while|if)\s*\(', line) if matched: # Find the end of the conditional expression (end_line, end_linenum, end_pos) = CloseExpression( clean_lines, linenum, line.find('(')) # Output warning if what follows the condition expression is a # semicolon. No warning for all other cases, including whitespace or # newline, since we have a separate check for semicolons preceded by # whitespace. if end_pos >= 0 and Match(r';', end_line[end_pos:]): if matched.group(1) == 'if': error(filename, end_linenum, 'whitespace/empty_conditional_body', 5, 'Empty conditional bodies should use {}') else: error(filename, end_linenum, 'whitespace/empty_loop_body', 5, 'Empty loop bodies should use {} or continue') def CheckAltTokens(filename, clean_lines, linenum, error): """Check alternative keywords being used in boolean expressions. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # Avoid preprocessor lines if Match(r'^\s*#', line): return # Last ditch effort to avoid multi-line comments. This will not help # if the comment started before the current line or ended after the # current line, but it catches most of the false positives. At least, # it provides a way to workaround this warning for people who use # multi-line comments in preprocessor macros. # # TODO(unknown): remove this once cpplint has better support for # multi-line comments. if line.find('/*') >= 0 or line.find('*/') >= 0: return for match in _ALT_TOKEN_REPLACEMENT_PATTERN.finditer(line): error(filename, linenum, 'readability/alt_tokens', 2, 'Use operator %s instead of %s' % ( _ALT_TOKEN_REPLACEMENT[match.group(1)], match.group(1))) def GetLineWidth(line): """Determines the width of the line in column positions. Args: line: A string, which may be a Unicode string. Returns: The width of the line in column positions, accounting for Unicode combining characters and wide characters. """ if isinstance(line, str): width = 0 for uc in unicodedata.normalize('NFC', line): if unicodedata.east_asian_width(uc) in ('W', 'F'): width += 2 elif not unicodedata.combining(uc): width += 1 return width else: return len(line) def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state, error): """Checks rules from the 'C++ style rules' section of cppguide.html. Most of these rules are hard to test (naming, comment style), but we do what we can. In particular we check for 2-space indents, line lengths, tab usage, spaces inside code, etc. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. file_extension: The extension (without the dot) of the filename. nesting_state: A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error: The function to call with any errors found. """ # Don't use "elided" lines here, otherwise we can't check commented lines. # Don't want to use "raw" either, because we don't want to check inside # C++11 raw strings, raw_lines = clean_lines.lines_without_raw_strings line = raw_lines[linenum] if line.find('\t') != -1: error(filename, linenum, 'whitespace/tab', 1, 'Tab found; better to use spaces') # One or three blank spaces at the beginning of the line is weird; it's # hard to reconcile that with 2-space indents. # NOTE: here are the conditions rob pike used for his tests. Mine aren't # as sophisticated, but it may be worth becoming so: # RLENGTH==initial_spaces # if(RLENGTH > 20) complain = 0; # if(match($0, " +(error|private|public|protected):")) complain = 0; # if(match(prev, "&& *$")) complain = 0; # if(match(prev, "\\|\\| *$")) complain = 0; # if(match(prev, "[\",=><] *$")) complain = 0; # if(match($0, " <<")) complain = 0; # if(match(prev, " +for \\(")) complain = 0; # if(prevodd && match(prevprev, " +for \\(")) complain = 0; initial_spaces = 0 cleansed_line = clean_lines.elided[linenum] while initial_spaces < len(line) and line[initial_spaces] == ' ': initial_spaces += 1 if line and line[-1].isspace(): error(filename, linenum, 'whitespace/end_of_line', 4, 'Line ends in whitespace. Consider deleting these extra spaces.') # There are certain situations we allow one space, notably for section # labels elif ((initial_spaces == 1 or initial_spaces == 3) and not Match(r'\s*\w+\s*:\s*$', cleansed_line)): error(filename, linenum, 'whitespace/indent', 3, 'Weird number of spaces at line-start. ' 'Are you using a 2-space indent?') # Check if the line is a header guard. is_header_guard = False if file_extension == 'h': cppvar = GetHeaderGuardCPPVariable(filename) if (line.startswith('#ifndef %s' % cppvar) or line.startswith('#define %s' % cppvar) or line.startswith('#endif // %s' % cppvar)): is_header_guard = True # #include lines and header guards can be long, since there's no clean way # to split them. # # URLs can be long too. It's possible to split these, but it makes them # harder to cut&paste. # # The "$Id:...$" comment may also get very long without it being the # developers fault. if (not line.startswith('#include') and not is_header_guard and not Match(r'^\s*//.*http(s?)://\S*$', line) and not Match(r'^// \$Id:.*#[0-9]+ \$$', line)): line_width = GetLineWidth(line) extended_length = int((_line_length * 1.25)) if line_width > extended_length: error(filename, linenum, 'whitespace/line_length', 4, 'Lines should very rarely be longer than %i characters' % extended_length) elif line_width > _line_length: error(filename, linenum, 'whitespace/line_length', 2, 'Lines should be <= %i characters long' % _line_length) if (cleansed_line.count(';') > 1 and # for loops are allowed two ;'s (and may run over two lines). cleansed_line.find('for') == -1 and (GetPreviousNonBlankLine(clean_lines, linenum)[0].find('for') == -1 or GetPreviousNonBlankLine(clean_lines, linenum)[0].find(';') != -1) and # It's ok to have many commands in a switch case that fits in 1 line not ((cleansed_line.find('case ') != -1 or cleansed_line.find('default:') != -1) and cleansed_line.find('break;') != -1)): error(filename, linenum, 'whitespace/newline', 0, 'More than one command on the same line') # Some more style checks CheckBraces(filename, clean_lines, linenum, error) CheckEmptyBlockBody(filename, clean_lines, linenum, error) CheckSpacing(filename, clean_lines, linenum, nesting_state, error) CheckAltTokens(filename, clean_lines, linenum, error) _RE_PATTERN_INCLUDE_NEW_STYLE = re.compile(r'#include +"[^/]+\.h"') _RE_PATTERN_INCLUDE = re.compile(r'^\s*#\s*include\s*([<"])([^>"]*)[>"].*$') # Matches the first component of a filename delimited by -s and _s. That is: # _RE_FIRST_COMPONENT.match('foo').group(0) == 'foo' # _RE_FIRST_COMPONENT.match('foo.cc').group(0) == 'foo' # _RE_FIRST_COMPONENT.match('foo-bar_baz.cc').group(0) == 'foo' # _RE_FIRST_COMPONENT.match('foo_bar-baz.cc').group(0) == 'foo' _RE_FIRST_COMPONENT = re.compile(r'^[^-_.]+') def _ClassifyInclude(fileinfo, include, is_system): """Figures out what kind of header 'include' is. Args: fileinfo: The current file cpplint is running over. A FileInfo instance. include: The path to a #included file. is_system: True if the #include used <> rather than "". Returns: One of the _XXX_HEADER constants. """ if is_system: return _C_SYS_HEADER return _OTHER_HEADER def CheckIncludeLine(filename, clean_lines, linenum, include_state, error): """Check rules that are applicable to #include lines. Strings on #include lines are NOT removed from elided line, to make certain tasks easier. However, to prevent false positives, checks applicable to #include lines in CheckLanguage must be put here. Args: filename : The name of the current file. clean_lines : A CleansedLines instance containing the file. linenum : The number of the line to check. include_state : An _IncludeState instance in which the headers are inserted. error : The function to call with any errors found. """ fileinfo = FileInfo(filename) line = clean_lines.lines[linenum] # "include" should use the new style "foo/bar.h" instead of just "bar.h" # XXX: neovim doesn't currently use this style # if _RE_PATTERN_INCLUDE_NEW_STYLE.search(line): # error(filename, linenum, 'build/include', 4, # 'Include the directory when naming .h files') # we shouldn't include a file more than once. actually, there are a # handful of instances where doing so is okay, but in general it's # not. match = _RE_PATTERN_INCLUDE.search(line) if match: include = match.group(2) is_system = (match.group(1) == '<') if include in include_state: if is_system or not include.endswith('.c.h'): error(filename, linenum, 'build/include', 4, '"%s" already included at %s:%s' % (include, filename, include_state[include])) else: include_state[include] = linenum # We want to ensure that headers appear in the right order: # 1) for foo.cc, foo.h (preferred location) # 2) c system files # 3) cpp system files # 4) for foo.cc, foo.h (deprecated location) # 5) other google headers # # We classify each include statement as one of those 5 types # using a number of techniques. The include_state object keeps # track of the highest type seen, and complains if we see a # lower type after that. error_message = include_state.CheckNextIncludeOrder( _ClassifyInclude(fileinfo, include, is_system)) if error_message: error(filename, linenum, 'build/include_order', 4, '%s. Should be: c system, c++ system, other.' % error_message) canonical_include = include_state.CanonicalizeAlphabeticalOrder( include) include_state.SetLastHeader(canonical_include) def _GetTextInside(text, start_pattern): r"""Retrieves all the text between matching open and close parentheses. Given a string of lines and a regular expression string, retrieve all the text following the expression and between opening punctuation symbols like (, [, or {, and the matching close-punctuation symbol. This properly nested occurrences of the punctuations, so for the text like printf(a(), b(c())); a call to _GetTextInside(text, r'printf\(') will return 'a(), b(c())'. start_pattern must match string having an open punctuation symbol at the end. Args: text: The lines to extract text. Its comments and strings must be elided. It can be single line and can span multiple lines. start_pattern: The regexp string indicating where to start extracting the text. Returns: The extracted text. None if either the opening string or ending punctuation couldn't be found. """ # TODO(sugawarayu): Audit cpplint.py to see what places could be profitably # rewritten to use _GetTextInside (and use inferior regexp matching today). # Give opening punctuations to get the matching close-punctuations. matching_punctuation = {'(': ')', '{': '}', '[': ']'} closing_punctuation = set(matching_punctuation.values()) # Find the position to start extracting text. match = re.search(start_pattern, text, re.M) if not match: # start_pattern not found in text. return None start_position = match.end(0) assert start_position > 0, ( 'start_pattern must ends with an opening punctuation.') assert text[start_position - 1] in matching_punctuation, ( 'start_pattern must ends with an opening punctuation.') # Stack of closing punctuations we expect to have in text after position. punctuation_stack = [matching_punctuation[text[start_position - 1]]] position = start_position while punctuation_stack and position < len(text): if text[position] == punctuation_stack[-1]: punctuation_stack.pop() elif text[position] in closing_punctuation: # A closing punctuation without matching opening punctuations. return None elif text[position] in matching_punctuation: punctuation_stack.append(matching_punctuation[text[position]]) position += 1 if punctuation_stack: # Opening punctuations left without matching close-punctuations. return None # punctuations match. return text[start_position:position - 1] def CheckLanguage(filename, clean_lines, linenum, file_extension, include_state, nesting_state, error): """Checks rules from the 'C++ language rules' section of cppguide.html. Some of these rules are hard to test (function overloading, using uint32 inappropriately), but we do the best we can. Args: filename : The name of the current file. clean_lines : A CleansedLines instance containing the file. linenum : The number of the line to check. file_extension : The extension (without the dot) of the filename. include_state : An _IncludeState instance in which the headers are inserted. nesting_state : A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error : The function to call with any errors found. """ # If the line is empty or consists of entirely a comment, no need to # check it. line = clean_lines.elided[linenum] if not line: return match = _RE_PATTERN_INCLUDE.search(line) if match: CheckIncludeLine(filename, clean_lines, linenum, include_state, error) return # Reset include state across preprocessor directives. This is meant # to silence warnings for conditional includes. if Match(r'^\s*#\s*(?:ifdef|elif|else|endif)\b', line): include_state.ResetSection() # TODO(unknown): figure out if they're using default arguments in fn proto. # Check if people are using the verboten C basic types. match = Search(r'\b(short|long long)\b', line) if match: error(filename, linenum, 'runtime/int', 4, 'Use int16_t/int64_t/etc, rather than the C type %s' % match.group(1)) # When snprintf is used, the second argument shouldn't be a literal. match = Search(r'snprintf\s*\(([^,]*),\s*([0-9]*)\s*,', line) if match and match.group(2) != '0': # If 2nd arg is zero, snprintf is used to calculate size. error(filename, linenum, 'runtime/printf', 3, 'If you can, use sizeof(%s) instead of %s as the 2nd arg ' 'to snprintf.' % (match.group(1), match.group(2))) # Check if some verboten C functions are being used. if Search(r'\bsprintf\b', line): error(filename, linenum, 'runtime/printf', 5, 'Use snprintf instead of sprintf.') match = Search(r'\b(strncpy|STRNCPY)\b', line) if match: error(filename, linenum, 'runtime/printf', 4, 'Use xstrlcpy or snprintf instead of %s (unless this is from Vim)' % match.group(1)) match = Search(r'\b(strcpy)\b', line) if match: error(filename, linenum, 'runtime/printf', 4, 'Use xstrlcpy or snprintf instead of %s' % match.group(1)) match = Search(r'\b(STRNCAT|strncat|strcat|vim_strcat)\b', line) if match: error(filename, linenum, 'runtime/printf', 4, 'Use xstrlcat or snprintf instead of %s' % match.group(1)) # Check for suspicious usage of "if" like # } if (a == b) { if Search(r'\}\s*if\s*\(', line): error(filename, linenum, 'readability/braces', 4, 'Did you mean "else if"? If not, start a new line for "if".') # Check for potential format string bugs like printf(foo). # We constrain the pattern not to pick things like DocidForPrintf(foo). # Not perfect but it can catch printf(foo.c_str()) and printf(foo->c_str()) # TODO(sugawarayu): Catch the following case. Need to change the calling # convention of the whole function to process multiple line to handle it. # printf( # boy_this_is_a_really_long_variable_that_cannot_fit_on_the_prev_line); printf_args = _GetTextInside(line, r'(?i)\b(string)?printf\s*\(') if printf_args: match = Match(r'([\w.\->()]+)$', printf_args) if match and match.group(1) != '__VA_ARGS__': function_name = re.search(r'\b((?:string)?printf)\s*\(', line, re.I).group(1) error(filename, linenum, 'runtime/printf', 4, 'Potential format string bug. Do %s("%%s", %s) instead.' % (function_name, match.group(1))) # Check for potential memset bugs like memset(buf, sizeof(buf), 0). match = Search(r'memset\s*\(([^,]*),\s*([^,]*),\s*0\s*\)', line) if match and not Match(r"^''|-?[0-9]+|0x[0-9A-Fa-f]$", match.group(2)): error(filename, linenum, 'runtime/memset', 4, 'Did you mean "memset(%s, 0, %s)"?' % (match.group(1), match.group(2))) # Detect variable-length arrays. match = Match(r'\s*(.+::)?(\w+) [a-z]\w*\[(.+)];', line) if (match and match.group(2) != 'return' and match.group(2) != 'delete' and match.group(3).find(']') == -1): # Split the size using space and arithmetic operators as delimiters. # If any of the resulting tokens are not compile time constants then # report the error. tokens = re.split(r'\s|\+|\-|\*|\/|<<|>>]', match.group(3)) is_const = True skip_next = False for tok in tokens: if skip_next: skip_next = False continue if Search(r'sizeof\(.+\)', tok): continue if Search(r'arraysize\(\w+\)', tok): continue tok = tok.lstrip('(') tok = tok.rstrip(')') if not tok: continue if Match(r'\d+', tok): continue if Match(r'0[xX][0-9a-fA-F]+', tok): continue if Match(r'k[A-Z0-9]\w*', tok): continue if Match(r'(.+::)?k[A-Z0-9]\w*', tok): continue if Match(r'(.+::)?[A-Z][A-Z0-9_]*', tok): continue # A catch all for tricky sizeof cases, including # 'sizeof expression', 'sizeof(*type)', 'sizeof(const type)', # 'sizeof(struct StructName)' requires skipping the next token # because we split on ' ' and '*'. if tok.startswith('sizeof'): skip_next = True continue is_const = False break if not is_const: error(filename, linenum, 'runtime/arrays', 1, "Do not use variable-length arrays. Use an appropriately" " named ('k' followed by CamelCase) compile-time constant for" " the size.") # Detect TRUE and FALSE. match = Search(r'\b(TRUE|FALSE)\b', line) if match: token = match.group(1) error(filename, linenum, 'readability/bool', 4, 'Use %s instead of %s.' % (token.lower(), token)) # Detect preincrement/predecrement match = Match(r'^\s*(?:\+\+|--)', line) if match: error(filename, linenum, 'readability/increment', 5, 'Do not use preincrement in statements, ' 'use postincrement instead') # Detect preincrement/predecrement in for(;; preincrement) match = Search(r';\s*(\+\+|--)', line) if match: end_pos, end_depth = FindEndOfExpressionInLine(line, match.start(1), 1, '(', ')') expr = line[match.start(1):end_pos] if end_depth == 0 and ';' not in expr and ' = ' not in expr: error(filename, linenum, 'readability/increment', 4, 'Do not use preincrement in statements, including ' 'for(;; action)') def ProcessLine(filename, file_extension, clean_lines, line, include_state, function_state, nesting_state, error, extra_check_functions=[]): """Processes a single line in the file. Args: filename : Filename of the file that is being processed. file_extension : The extension (dot not included) of the file. clean_lines : An array of strings, each representing a line of the file, with comments stripped. line : Number of line being processed. include_state : An _IncludeState instance in which the headers are inserted. function_state : A _FunctionState instance which counts function lines, etc. nesting_state : A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error : A callable to which errors are reported, which takes 4 arguments: filename, line number, error level, and message extra_check_functions : An array of additional check functions that will be run on each source line. Each function takes 4 arguments : filename, clean_lines, line, error """ raw_lines = clean_lines.raw_lines init_lines = clean_lines.init_lines ParseNolintSuppressions(filename, raw_lines[line], line, error) nesting_state.Update(filename, clean_lines, line, error) if nesting_state.stack and nesting_state.stack[-1].inline_asm != _NO_ASM: return CheckForFunctionLengths(filename, clean_lines, line, function_state, error) CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error) CheckForOldStyleComments(filename, init_lines[line], line, error) CheckStyle( filename, clean_lines, line, file_extension, nesting_state, error) CheckLanguage(filename, clean_lines, line, file_extension, include_state, nesting_state, error) CheckForNonStandardConstructs(filename, clean_lines, line, nesting_state, error) CheckPosixThreading(filename, clean_lines, line, error) CheckMemoryFunctions(filename, clean_lines, line, error) for check_fn in extra_check_functions: check_fn(filename, clean_lines, line, error) def ProcessFileData(filename, file_extension, lines, error, extra_check_functions=[]): """Performs lint checks and reports any errors to the given error function. Args: filename: Filename of the file that is being processed. file_extension: The extension (dot not included) of the file. lines: An array of strings, each representing a line of the file, with the last element being empty if the file is terminated with a newline. error: A callable to which errors are reported, which takes 4 arguments: filename, line number, error level, and message extra_check_functions: An array of additional check functions that will be run on each source line. Each function takes 4 arguments: filename, clean_lines, line, error """ lines = (['// marker so line numbers and indices both start at 1'] + lines + ['// marker so line numbers end in a known way']) include_state = _IncludeState() function_state = _FunctionState() nesting_state = _NestingState() ResetNolintSuppressions() ResetKnownErrorSuppressions() for line in range(1, len(lines)): ParseKnownErrorSuppressions(filename, lines, line) init_lines = lines[:] if _cpplint_state.record_errors_file: def RecordedError(filename, linenum, category, confidence, message): if not IsErrorSuppressedByNolint(category, linenum): key = init_lines[linenum - 1 if linenum else 0:linenum + 2] err = [filename, key, category] json.dump(err, _cpplint_state.record_errors_file) _cpplint_state.record_errors_file.write('\n') Error(filename, linenum, category, confidence, message) error = RecordedError if file_extension == 'h': CheckForHeaderGuard(filename, lines, error) RemoveMultiLineComments(filename, lines, error) clean_lines = CleansedLines(lines, init_lines) for line in range(clean_lines.NumLines()): ProcessLine(filename, file_extension, clean_lines, line, include_state, function_state, nesting_state, error, extra_check_functions) # We check here rather than inside ProcessLine so that we see raw # lines rather than "cleaned" lines. CheckForBadCharacters(filename, lines, error) CheckForNewlineAtEOF(filename, lines, error) def ProcessFile(filename, vlevel, extra_check_functions=[]): """Does neovim-lint on a single file. Args: filename: The name of the file to parse. vlevel: The level of errors to report. Every error of confidence >= verbose_level will be reported. 0 is a good default. extra_check_functions: An array of additional check functions that will be run on each source line. Each function takes 4 arguments: filename, clean_lines, line, error """ _SetVerboseLevel(vlevel) try: # Support the Unix convention of using "-" for stdin. Note that # we are not opening the file with universal newline support # (which codecs doesn't support anyway), so the resulting lines do # contain trailing '\r' characters if we are reading a file that # has CRLF endings. # If after the split a trailing '\r' is present, it is removed # below. If it is not expected to be present (i.e. os.linesep != # '\r\n' as in Windows), a warning is issued below if this file # is processed. if filename == '-': lines = codecs.StreamReaderWriter(sys.stdin, codecs.getreader('utf8'), codecs.getwriter('utf8'), 'replace').read().split('\n') else: lines = codecs.open( filename, 'r', 'utf8', 'replace').read().split('\n') carriage_return_found = False # Remove trailing '\r'. for linenum in range(len(lines)): if lines[linenum].endswith('\r'): lines[linenum] = lines[linenum].rstrip('\r') carriage_return_found = True except IOError: sys.stderr.write( "Skipping input '%s': Can't open for reading\n" % filename) return # Note, if no dot is found, this will give the entire filename as the ext. file_extension = filename[filename.rfind('.') + 1:] # When reading from stdin, the extension is unknown, so no cpplint tests # should rely on the extension. if filename != '-' and file_extension not in _valid_extensions: sys.stderr.write('Ignoring {}; only linting {} files\n'.format( filename, ', '.join('.{}'.format(ext) for ext in _valid_extensions))) else: ProcessFileData(filename, file_extension, lines, Error, extra_check_functions) if carriage_return_found and os.linesep != '\r\n': # Use 0 for linenum since outputting only one error for potentially # several lines. Error(filename, 0, 'whitespace/newline', 1, 'One or more unexpected \\r (^M) found;' 'better to use only a \\n') def PrintUsage(message): """Prints a brief usage string and exits, optionally with an error message. Args: message: The optional error message. """ if message: sys.stderr.write(_USAGE) sys.exit('\nFATAL ERROR: ' + message) else: sys.stdout.write(_USAGE) sys.exit(0) def PrintCategories(): """Prints a list of all the error-categories used by error messages. These are the categories used to filter messages via --filter. """ sys.stdout.write(''.join(' %s\n' % cat for cat in _ERROR_CATEGORIES)) sys.exit(0) def ParseArguments(args): """Parses the command line arguments. This may set the output format and verbosity level as side-effects. Args: args: The command line arguments: Returns: The list of filenames to lint. """ try: (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose=', 'counting=', 'filter=', 'root=', 'linelength=', 'extensions=', 'record-errors=', 'suppress-errors=']) except getopt.GetoptError: PrintUsage('Invalid arguments.') verbosity = _VerboseLevel() output_format = _OutputFormat() filters = '' counting_style = '' record_errors_file = None suppress_errors_file = None for (opt, val) in opts: if opt == '--help': PrintUsage(None) elif opt == '--output': if val not in ('emacs', 'vs7', 'eclipse'): PrintUsage('The only allowed output formats are emacs,' ' vs7 and eclipse.') output_format = val elif opt == '--verbose': verbosity = int(val) elif opt == '--filter': filters = val if not filters: PrintCategories() elif opt == '--counting': if val not in ('total', 'toplevel', 'detailed'): PrintUsage( 'Valid counting options are total, toplevel, and detailed') counting_style = val elif opt == '--linelength': global _line_length try: _line_length = int(val) except ValueError: PrintUsage('Line length must be digits.') elif opt == '--extensions': global _valid_extensions try: _valid_extensions = set(val.split(',')) except ValueError: PrintUsage('Extensions must be comma separated list.') elif opt == '--record-errors': record_errors_file = val elif opt == '--suppress-errors': suppress_errors_file = val if not filenames: PrintUsage('No files were specified.') _SetOutputFormat(output_format) _SetVerboseLevel(verbosity) _SetFilters(filters) _SetCountingStyle(counting_style) _SuppressErrorsFrom(suppress_errors_file) _RecordErrorsTo(record_errors_file) return filenames def main(): filenames = ParseArguments(sys.argv[1:]) _cpplint_state.ResetErrorCounts() for filename in filenames: ProcessFile(filename, _cpplint_state.verbose_level) _cpplint_state.PrintErrorCounts() sys.exit(_cpplint_state.error_count > 0) if __name__ == '__main__': main() # vim: ts=4 sts=4 sw=4 foldmarker=▶,▲ # Ignore "too complex" warnings when using pymode. # pylama:ignore=C901 neovim-0.2.2/src/coverity-model.c000066400000000000000000000032551320401574200167100ustar00rootroot00000000000000// Coverity Scan model // // This is a modeling file for Coverity Scan. Modeling helps to avoid false // positives. // // - A model file can't import any header files. // - Therefore only some built-in primitives like int, char and void are // available but not wchar_t, NULL etc. // - Modeling doesn't need full structs and typedefs. Rudimentary structs // and similar types are sufficient. // - An uninitialized local pointer is not an error. It signifies that the // variable could be either NULL or have some data. // // Coverity Scan doesn't pick up modifications automatically. The model file // must be uploaded by an admin in the analysis settings of // http://scan.coverity.com/projects/neovim-neovim // // Issue 105985 // // Teach coverity that uv_pipe_open saves fd on success (0 return value) // and doesn't save it on failure (return value != 0). struct uv_pipe_s { int something; }; int uv_pipe_open(struct uv_pipe_s *handle, int fd) { int result; if (result == 0) { __coverity_escape__(fd); } return result; } // Issue 2422 // // Teach coverity about jemalloc functions, so that it understands // they are equivalent to malloc ones. void *je_malloc(size_t size) { return __coverity_alloc__(size); } void je_free(void *ptr) { __coverity_free__(ptr); } void *je_calloc(size_t count, size_t size) { return je_malloc(count * size); } void *je_realloc(void *ptr, size_t size) { je_free(ptr); return je_malloc(size); } // Hint Coverity that adding item to d avoids losing track // of the memory allocated for item. typedef struct {} dictitem_T; typedef struct {} dict_T; int tv_dict_add(dict_T *const d, dictitem_T *const item) { __coverity_escape__(item); } neovim-0.2.2/src/nvim/000077500000000000000000000000001320401574200145465ustar00rootroot00000000000000neovim-0.2.2/src/nvim/CMakeLists.txt000066400000000000000000000567701320401574200173250ustar00rootroot00000000000000option(USE_GCOV "Enable gcov support" OFF) if(NOT CLANG_TSAN) # GCOV and TSAN results in false data race reports if(USE_GCOV) message(STATUS "Enabling gcov support") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage") endif() endif() if(WIN32) # tell MinGW compiler to enable wmain set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -municode") endif() set(TOUCHES_DIR ${PROJECT_BINARY_DIR}/touches) set(GENERATOR_DIR ${CMAKE_CURRENT_LIST_DIR}/generators) set(GENERATED_DIR ${PROJECT_BINARY_DIR}/src/nvim/auto) set(API_DISPATCH_GENERATOR ${GENERATOR_DIR}/gen_api_dispatch.lua) set(API_UI_EVENTS_GENERATOR ${GENERATOR_DIR}/gen_api_ui_events.lua) set(API_METADATA ${PROJECT_BINARY_DIR}/api_metadata.mpack) set(FUNCS_DATA ${PROJECT_BINARY_DIR}/funcs_data.mpack) set(MSGPACK_LUA_C_BINDINGS ${GENERATED_DIR}/msgpack_lua_c_bindings.generated.c) set(HEADER_GENERATOR ${GENERATOR_DIR}/gen_declarations.lua) set(GENERATED_INCLUDES_DIR ${PROJECT_BINARY_DIR}/include) set(GENERATED_API_DISPATCH ${GENERATED_DIR}/api/private/dispatch_wrappers.generated.h) set(GENERATED_FUNCS_METADATA ${GENERATED_DIR}/api/private/funcs_metadata.generated.h) set(GENERATED_UI_EVENTS ${GENERATED_DIR}/ui_events.generated.h) set(GENERATED_UI_EVENTS_CALL ${GENERATED_DIR}/ui_events_call.generated.h) set(GENERATED_UI_EVENTS_REMOTE ${GENERATED_DIR}/ui_events_remote.generated.h) set(GENERATED_UI_EVENTS_BRIDGE ${GENERATED_DIR}/ui_events_bridge.generated.h) set(GENERATED_UI_EVENTS_METADATA ${GENERATED_DIR}/api/private/ui_events_metadata.generated.h) set(GENERATED_EX_CMDS_ENUM ${GENERATED_INCLUDES_DIR}/ex_cmds_enum.generated.h) set(GENERATED_EX_CMDS_DEFS ${GENERATED_DIR}/ex_cmds_defs.generated.h) set(GENERATED_FUNCS ${GENERATED_DIR}/funcs.generated.h) set(GENERATED_EVENTS_ENUM ${GENERATED_INCLUDES_DIR}/auevents_enum.generated.h) set(GENERATED_EVENTS_NAMES_MAP ${GENERATED_DIR}/auevents_name_map.generated.h) set(GENERATED_OPTIONS ${GENERATED_DIR}/options.generated.h) set(EX_CMDS_GENERATOR ${GENERATOR_DIR}/gen_ex_cmds.lua) set(FUNCS_GENERATOR ${GENERATOR_DIR}/gen_eval.lua) set(EVENTS_GENERATOR ${GENERATOR_DIR}/gen_events.lua) set(OPTIONS_GENERATOR ${GENERATOR_DIR}/gen_options.lua) set(UNICODE_TABLES_GENERATOR ${GENERATOR_DIR}/gen_unicode_tables.lua) set(UNICODE_DIR ${PROJECT_SOURCE_DIR}/unicode) set(GENERATED_UNICODE_TABLES ${GENERATED_DIR}/unicode_tables.generated.h) set(VIM_MODULE_FILE ${GENERATED_DIR}/lua/vim_module.generated.h) set(VIM_MODULE_SOURCE ${PROJECT_SOURCE_DIR}/src/nvim/lua/vim.lua) set(CHAR_BLOB_GENERATOR ${GENERATOR_DIR}/gen_char_blob.lua) set(LINT_SUPPRESS_FILE ${PROJECT_BINARY_DIR}/errors.json) set(LINT_SUPPRESS_URL_BASE "https://raw.githubusercontent.com/neovim/doc/gh-pages/reports/clint") set(LINT_SUPPRESS_URL "${LINT_SUPPRESS_URL_BASE}/errors.json") set(LINT_PRG ${PROJECT_SOURCE_DIR}/src/clint.py) set(DOWNLOAD_SCRIPT ${PROJECT_SOURCE_DIR}/cmake/Download.cmake) set(LINT_SUPPRESSES_ROOT ${PROJECT_BINARY_DIR}/errors) set(LINT_SUPPRESSES_URL "${LINT_SUPPRESS_URL_BASE}/errors.tar.gz") set(LINT_SUPPRESSES_ARCHIVE ${LINT_SUPPRESSES_ROOT}/errors.tar.gz) set(LINT_SUPPRESSES_TOUCH_FILE "${TOUCHES_DIR}/unpacked-clint-errors-archive") set(LINT_SUPPRESSES_INSTALL_SCRIPT "${PROJECT_SOURCE_DIR}/cmake/InstallClintErrors.cmake") file(GLOB UNICODE_FILES ${UNICODE_DIR}/*.txt) file(GLOB API_HEADERS api/*.h) list(REMOVE_ITEM API_HEADERS ${CMAKE_CURRENT_LIST_DIR}/api/ui_events.in.h) file(GLOB MSGPACK_RPC_HEADERS msgpack_rpc/*.h) include_directories(${GENERATED_DIR}) include_directories(${CACHED_GENERATED_DIR}) include_directories(${GENERATED_INCLUDES_DIR}) file(MAKE_DIRECTORY ${TOUCHES_DIR}) file(MAKE_DIRECTORY ${GENERATED_DIR}) file(MAKE_DIRECTORY ${GENERATED_INCLUDES_DIR}) file(MAKE_DIRECTORY ${LINT_SUPPRESSES_ROOT}) file(MAKE_DIRECTORY ${LINT_SUPPRESSES_ROOT}/src) file(GLOB NVIM_SOURCES *.c) file(GLOB NVIM_HEADERS *.h) foreach(subdir os api api/private msgpack_rpc tui event eval lua ) if(${subdir} MATCHES "tui" AND NOT FEAT_TUI) continue() endif() file(MAKE_DIRECTORY ${GENERATED_DIR}/${subdir}) file(MAKE_DIRECTORY ${GENERATED_INCLUDES_DIR}/${subdir}) file(GLOB sources ${subdir}/*.c) file(GLOB headers ${subdir}/*.h) list(APPEND NVIM_SOURCES ${sources}) list(APPEND NVIM_HEADERS ${headers}) endforeach() file(GLOB UNIT_TEST_FIXTURES ${PROJECT_SOURCE_DIR}/test/unit/fixtures/*.c) # Sort file lists to ensure generated files are created in the same order from # build to build. list(SORT NVIM_SOURCES) list(SORT NVIM_HEADERS) list(APPEND LINT_NVIM_SOURCES ${NVIM_SOURCES} ${NVIM_HEADERS}) foreach(sfile ${NVIM_SOURCES}) get_filename_component(f ${sfile} NAME) if(${f} MATCHES "^(regexp_nfa.c)$") list(APPEND to_remove ${sfile}) endif() if(WIN32 AND ${f} MATCHES "^(pty_process_unix.c)$") list(APPEND to_remove ${sfile}) endif() if(NOT WIN32 AND ${f} MATCHES "^(pty_process_win.c)$") list(APPEND to_remove ${sfile}) endif() endforeach() list(REMOVE_ITEM NVIM_SOURCES ${to_remove}) # Legacy files that do not yet pass -Wconversion. set(CONV_SOURCES diff.c edit.c eval.c ex_cmds.c ex_docmd.c ex_getln.c fileio.c mbyte.c memline.c message.c regexp.c screen.c search.c spell.c spellfile.c syntax.c tag.c window.c) foreach(sfile ${CONV_SOURCES}) if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/${sfile}") message(FATAL_ERROR "${sfile} doesn't exist (it was added to CONV_SOURCES)") endif() endforeach() if(NOT MSVC) set_source_files_properties( ${CONV_SOURCES} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-conversion") # gperf generates ANSI-C with incorrect linkage, ignore it. check_c_compiler_flag(-Wno-static-in-inline HAS_WNO_STATIC_IN_INLINE_FLAG) if(HAS_WNO_STATIC_IN_INLINE_FLAG) set_source_files_properties( eval.c PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-static-in-inline -Wno-conversion") else() set_source_files_properties( eval.c PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-conversion") endif() endif() if(NOT "${MIN_LOG_LEVEL}" MATCHES "^$") add_definitions(-DMIN_LOG_LEVEL=${MIN_LOG_LEVEL}) endif() get_directory_property(gen_cdefs COMPILE_DEFINITIONS) foreach(gen_cdef ${gen_cdefs} DO_NOT_DEFINE_EMPTY_ATTRIBUTES) if(NOT "${gen_cdef}" MATCHES "INCLUDE_GENERATED_DECLARATIONS") list(APPEND gen_cflags "-D${gen_cdef}") endif() endforeach() if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) list(APPEND gen_cflags "-DEXITFREE") endif() get_directory_property(gen_includes INCLUDE_DIRECTORIES) foreach(gen_include ${gen_includes} ${LUA_PREFERRED_INCLUDE_DIRS}) list(APPEND gen_cflags "-I${gen_include}") endforeach() string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type) separate_arguments(C_FLAGS_ARRAY UNIX_COMMAND ${CMAKE_C_FLAGS}) separate_arguments(C_FLAGS_${build_type}_ARRAY UNIX_COMMAND ${CMAKE_C_FLAGS_${build_type}}) set(gen_cflags ${gen_cflags} ${C_FLAGS_${build_type}_ARRAY} ${C_FLAGS_ARRAY}) function(get_preproc_output varname iname) if(MSVC) set(${varname} /P /Fi${iname} PARENT_SCOPE) else() set(${varname} -E -o ${iname} PARENT_SCOPE) endif() endfunction() # NVIM_GENERATED_FOR_HEADERS: generated headers to be included in headers # NVIM_GENERATED_FOR_SOURCES: generated headers to be included in sources # NVIM_GENERATED_SOURCES: generated source files # These lists must be mutually exclusive. foreach(sfile ${NVIM_SOURCES} "${CMAKE_CURRENT_LIST_DIR}/regexp_nfa.c" ${GENERATED_API_DISPATCH} "${GENERATED_UI_EVENTS_CALL}" "${GENERATED_UI_EVENTS_REMOTE}" "${GENERATED_UI_EVENTS_BRIDGE}" ) get_filename_component(full_d ${sfile} PATH) file(RELATIVE_PATH d "${CMAKE_CURRENT_LIST_DIR}" "${full_d}") if(${d} MATCHES "^[.][.]|auto/") file(RELATIVE_PATH d "${GENERATED_DIR}" "${full_d}") endif() get_filename_component(f ${sfile} NAME) get_filename_component(r ${sfile} NAME_WE) if(NOT ${d} EQUAL ".") set(f "${d}/${f}") set(r "${d}/${r}") endif() set(gf_c_h "${GENERATED_DIR}/${r}.c.generated.h") set(gf_h_h "${GENERATED_INCLUDES_DIR}/${r}.h.generated.h") set(gf_i "${GENERATED_DIR}/${r}.i") get_preproc_output(PREPROC_OUTPUT ${gf_i}) add_custom_command( OUTPUT "${gf_c_h}" "${gf_h_h}" COMMAND ${CMAKE_C_COMPILER} ${sfile} ${PREPROC_OUTPUT} ${gen_cflags} ${C_FLAGS_ARRAY} COMMAND "${LUA_PRG}" "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}" DEPENDS "${HEADER_GENERATOR}" "${sfile}" ) list(APPEND NVIM_GENERATED_FOR_SOURCES "${gf_c_h}") list(APPEND NVIM_GENERATED_FOR_HEADERS "${gf_h_h}") if(${d} MATCHES "^api$" AND NOT ${f} MATCHES "^api/helpers.c$") list(APPEND API_HEADERS ${gf_h_h}) endif() endforeach() add_custom_command(OUTPUT ${GENERATED_UNICODE_TABLES} COMMAND ${LUA_PRG} ${UNICODE_TABLES_GENERATOR} ${UNICODE_DIR} ${GENERATED_UNICODE_TABLES} DEPENDS ${UNICODE_TABLES_GENERATOR} ${UNICODE_FILES} ) add_custom_command( OUTPUT ${GENERATED_API_DISPATCH} ${GENERATED_FUNCS_METADATA} ${API_METADATA} ${MSGPACK_LUA_C_BINDINGS} COMMAND ${LUA_PRG} ${API_DISPATCH_GENERATOR} ${CMAKE_CURRENT_LIST_DIR} ${GENERATED_API_DISPATCH} ${GENERATED_FUNCS_METADATA} ${API_METADATA} ${MSGPACK_LUA_C_BINDINGS} ${API_HEADERS} DEPENDS ${API_HEADERS} ${MSGPACK_RPC_HEADERS} ${API_DISPATCH_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/api/dispatch_deprecated.lua ) add_custom_command( OUTPUT ${VIM_MODULE_FILE} COMMAND ${LUA_PRG} ${CHAR_BLOB_GENERATOR} ${VIM_MODULE_SOURCE} ${VIM_MODULE_FILE} vim_module DEPENDS ${CHAR_BLOB_GENERATOR} ${VIM_MODULE_SOURCE} ) list(APPEND NVIM_GENERATED_SOURCES "${MSGPACK_LUA_C_BINDINGS}" ) add_custom_command( OUTPUT ${GENERATED_UI_EVENTS} ${GENERATED_UI_EVENTS_CALL} ${GENERATED_UI_EVENTS_REMOTE} ${GENERATED_UI_EVENTS_BRIDGE} ${GENERATED_UI_EVENTS_METADATA} COMMAND ${LUA_PRG} ${API_UI_EVENTS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/api/ui_events.in.h ${GENERATED_UI_EVENTS} ${GENERATED_UI_EVENTS_CALL} ${GENERATED_UI_EVENTS_REMOTE} ${GENERATED_UI_EVENTS_BRIDGE} ${GENERATED_UI_EVENTS_METADATA} DEPENDS ${API_UI_EVENTS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/api/ui_events.in.h ) list(APPEND NVIM_GENERATED_FOR_HEADERS "${GENERATED_EX_CMDS_ENUM}" "${GENERATED_EVENTS_ENUM}" ) list(APPEND NVIM_GENERATED_FOR_SOURCES "${GENERATED_API_DISPATCH}" "${GENERATED_EX_CMDS_DEFS}" "${GENERATED_EVENTS_NAMES_MAP}" "${GENERATED_OPTIONS}" "${GENERATED_UNICODE_TABLES}" "${VIM_MODULE_FILE}" ) list(APPEND NVIM_GENERATED_SOURCES "${PROJECT_BINARY_DIR}/config/auto/pathdef.c" ) add_custom_command(OUTPUT ${GENERATED_EX_CMDS_ENUM} ${GENERATED_EX_CMDS_DEFS} COMMAND ${LUA_PRG} ${EX_CMDS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR} ${GENERATED_INCLUDES_DIR} ${GENERATED_DIR} DEPENDS ${EX_CMDS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/ex_cmds.lua ) if(NOT GPERF_PRG) message(FATAL_ERROR "gperf was not found.") endif() add_custom_command(OUTPUT ${GENERATED_FUNCS} ${FUNCS_DATA} COMMAND ${LUA_PRG} ${FUNCS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR} ${GENERATED_DIR} ${API_METADATA} ${FUNCS_DATA} COMMAND ${GPERF_PRG} ${GENERATED_DIR}/funcs.generated.h.gperf --output-file=${GENERATED_FUNCS} DEPENDS ${FUNCS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/eval.lua ${API_METADATA} ) list(APPEND NVIM_GENERATED_FOR_SOURCES "${GENERATED_FUNCS}") add_custom_command(OUTPUT ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP} COMMAND ${LUA_PRG} ${EVENTS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR} ${GENERATED_EVENTS_ENUM} ${GENERATED_EVENTS_NAMES_MAP} DEPENDS ${EVENTS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/auevents.lua ) add_custom_command(OUTPUT ${GENERATED_OPTIONS} COMMAND ${LUA_PRG} ${OPTIONS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR} ${GENERATED_OPTIONS} DEPENDS ${OPTIONS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua ) # NVIM_GENERATED_FOR_SOURCES and NVIM_GENERATED_FOR_HEADERS must be mutually exclusive. foreach(hfile ${NVIM_GENERATED_FOR_HEADERS}) list(FIND NVIM_GENERATED_FOR_SOURCES ${hfile} hfile_idx) if(NOT ${hfile_idx} EQUAL -1) message(FATAL_ERROR "File included in both NVIM_GENERATED_FOR_HEADERS and NVIM_GENERATED_FOR_SOURCES") endif() endforeach() # Our dependencies come first. if (LibIntl_FOUND) list(APPEND NVIM_LINK_LIBRARIES ${LibIntl_LIBRARY}) endif() if(Iconv_LIBRARIES) list(APPEND NVIM_LINK_LIBRARIES ${Iconv_LIBRARIES}) endif() if(WIN32) list(APPEND NVIM_LINK_LIBRARIES ${WINPTY_LIBRARIES}) endif() # Put these last on the link line, since multiple things may depend on them. list(APPEND NVIM_LINK_LIBRARIES ${LIBUV_LIBRARIES} ${MSGPACK_LIBRARIES} ${LIBVTERM_LIBRARIES} ${LIBTERMKEY_LIBRARIES} ${UNIBILIUM_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ) if(UNIX) list(APPEND NVIM_LINK_LIBRARIES m util ) endif() set(NVIM_EXEC_LINK_LIBRARIES ${NVIM_LINK_LIBRARIES} ${LUA_PREFERRED_LIBRARIES}) if(CMAKE_VERSION VERSION_LESS "2.8.8") # Use include_directories() because INCLUDE_DIRECTORIES target property # is not supported include_directories(${LUA_PREFERRED_INCLUDE_DIRS}) endif() # Don't use jemalloc in the unit test library. if(JEMALLOC_FOUND) list(APPEND NVIM_EXEC_LINK_LIBRARIES ${JEMALLOC_LIBRARIES}) endif() add_executable(nvim ${NVIM_GENERATED_FOR_SOURCES} ${NVIM_GENERATED_FOR_HEADERS} ${NVIM_GENERATED_SOURCES} ${NVIM_SOURCES} ${NVIM_HEADERS}) target_link_libraries(nvim ${NVIM_EXEC_LINK_LIBRARIES}) install_helper(TARGETS nvim) set_property(TARGET nvim APPEND PROPERTY INCLUDE_DIRECTORIES ${LUA_PREFERRED_INCLUDE_DIRS}) if(WIN32) # Copy DLLs and third-party tools to bin/ and install them along with nvim add_custom_target(nvim_runtime_deps ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_BINARY_DIR}/windows_runtime_deps/ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) install(DIRECTORY ${PROJECT_BINARY_DIR}/windows_runtime_deps/ DESTINATION ${CMAKE_INSTALL_BINDIR}) add_custom_target(nvim_dll_deps DEPENDS nvim COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/windows_runtime_deps COMMAND ${CMAKE_COMMAND} "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" -DBINARY="${PROJECT_BINARY_DIR}/bin/nvim${CMAKE_EXECUTABLE_SUFFIX}" -DDST=${PROJECT_BINARY_DIR}/windows_runtime_deps -P ${PROJECT_SOURCE_DIR}/cmake/WindowsDllCopy.cmake) add_dependencies(nvim_runtime_deps nvim_dll_deps) add_custom_target(external_blobs COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/windows_runtime_deps/platforms COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/ca-bundle.crt" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/cat.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/curl.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/diff.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/tee.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/tidy.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/win32yank.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/winpty-agent.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/D3Dcompiler_47.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/libEGL.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/libgcc_s_dw2-1.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/libGLESV2.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/libstdc++-6.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/libwinpthread-1.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/nvim-qt.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/Qt5Core.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/Qt5Gui.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/Qt5Network.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/Qt5Svg.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/Qt5Widgets.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/winpty.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/platforms/qwindows.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/platforms/ ) add_dependencies(nvim_runtime_deps external_blobs) endif() add_library( libnvim STATIC EXCLUDE_FROM_ALL ${NVIM_SOURCES} ${NVIM_GENERATED_SOURCES} ${NVIM_HEADERS} ${NVIM_GENERATED_FOR_SOURCES} ${NVIM_GENERATED_FOR_HEADERS} ) set_property(TARGET libnvim APPEND PROPERTY INCLUDE_DIRECTORIES ${LUA_PREFERRED_INCLUDE_DIRS}) set_target_properties( libnvim PROPERTIES POSITION_INDEPENDENT_CODE ON OUTPUT_NAME nvim ) set_property( TARGET libnvim APPEND_STRING PROPERTY COMPILE_FLAGS " -DMAKE_LIB " ) if(LUAJIT_FOUND) set(NVIM_TEST_LINK_LIBRARIES ${NVIM_LINK_LIBRARIES} ${LUAJIT_LIBRARIES}) add_library( nvim-test MODULE EXCLUDE_FROM_ALL ${NVIM_SOURCES} ${NVIM_GENERATED_SOURCES} ${NVIM_HEADERS} ${NVIM_GENERATED_FOR_SOURCES} ${NVIM_GENERATED_FOR_HEADERS} ${UNIT_TEST_FIXTURES} ) target_link_libraries(nvim-test ${NVIM_TEST_LINK_LIBRARIES}) target_link_libraries(libnvim ${NVIM_TEST_LINK_LIBRARIES}) set_property( TARGET nvim-test APPEND PROPERTY INCLUDE_DIRECTORIES ${LUAJIT_INCLUDE_DIRS} ) set_target_properties( nvim-test PROPERTIES POSITION_INDEPENDENT_CODE ON ) set_property( TARGET nvim-test APPEND_STRING PROPERTY COMPILE_FLAGS " -DUNIT_TESTING " ) endif() if(CLANG_ASAN_UBSAN) message(STATUS "Enabling Clang address sanitizer and undefined behavior sanitizer for nvim.") check_c_compiler_flag(-fno-sanitize-recover=all SANITIZE_RECOVER_ALL) if(SANITIZE_RECOVER_ALL) set(SANITIZE_RECOVER -fno-sanitize-recover=all) # Clang 3.6+ else() set(SANITIZE_RECOVER -fno-sanitize-recover) # Clang 3.5- endif() set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "-DEXITFREE ") set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "${SANITIZE_RECOVER} -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address -fsanitize=undefined -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/src/.asan-blacklist") set_property(TARGET nvim APPEND_STRING PROPERTY LINK_FLAGS "-fsanitize=address -fsanitize=undefined ") elseif(CLANG_MSAN) message(STATUS "Enabling Clang memory sanitizer for nvim.") set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "-DEXITFREE ") set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "-fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -fno-optimize-sibling-calls ") set_property(TARGET nvim APPEND_STRING PROPERTY LINK_FLAGS "-fsanitize=memory -fsanitize-memory-track-origins ") elseif(CLANG_TSAN) message(STATUS "Enabling Clang thread sanitizer for nvim.") set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "-DEXITFREE ") set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "-fsanitize=thread ") set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "-fPIE ") set_property(TARGET nvim APPEND_STRING PROPERTY LINK_FLAGS "-fsanitize=thread ") endif() function(get_test_target prefix sfile relative_path_var target_var) get_filename_component(full_d "${sfile}" PATH) file(RELATIVE_PATH d "${PROJECT_SOURCE_DIR}/src/nvim" "${full_d}") if(d MATCHES "^[.][.]") file(RELATIVE_PATH d "${GENERATED_DIR}" "${full_d}") endif() get_filename_component(r "${sfile}" NAME) if(NOT d MATCHES "^[.]?$") set(r "${d}/${r}") endif() string(REGEX REPLACE "[/.]" "-" suffix "${r}") set(${relative_path_var} ${r} PARENT_SCOPE) if(prefix STREQUAL "") set(${target_var} "${suffix}" PARENT_SCOPE) else() set(${target_var} "${prefix}-${suffix}" PARENT_SCOPE) endif() endfunction() set(NO_SINGLE_CHECK_HEADERS os/win_defs.h os/pty_process_win.h ) foreach(hfile ${NVIM_HEADERS}) get_test_target(test-includes "${hfile}" relative_path texe) if(NOT ${hfile} MATCHES "[.](c|in)[.]h$") set(tsource "${GENERATED_DIR}/${relative_path}.test-include.c") write_file("${tsource}" "#include \"${hfile}\"\nint main(int argc, char **argv) { return 0; }") add_executable( ${texe} EXCLUDE_FROM_ALL ${tsource} ${NVIM_HEADERS} ${NVIM_GENERATED_FOR_HEADERS}) set_property( TARGET ${texe} APPEND PROPERTY INCLUDE_DIRECTORIES ${LUA_PREFERRED_INCLUDE_DIRS} ) list(FIND NO_SINGLE_CHECK_HEADERS "${relative_path}" hfile_exclude_idx) if(${hfile_exclude_idx} EQUAL -1) list(APPEND HEADER_CHECK_TARGETS ${texe}) endif() endif() endforeach() add_custom_target(check-single-includes DEPENDS ${HEADER_CHECK_TARGETS}) function(add_download output url allow_failure) add_custom_command( OUTPUT "${output}" COMMAND ${CMAKE_COMMAND} -DURL=${url} -DFILE=${output} -DALLOW_FAILURE=${allow_failure} -P ${DOWNLOAD_SCRIPT} DEPENDS ${DOWNLOAD_SCRIPT} ) endfunction() add_download(${LINT_SUPPRESSES_ARCHIVE} ${LINT_SUPPRESSES_URL} off) add_custom_command( OUTPUT ${LINT_SUPPRESSES_TOUCH_FILE} WORKING_DIRECTORY ${LINT_SUPPRESSES_ROOT}/src COMMAND ${CMAKE_COMMAND} -E tar xfz ${LINT_SUPPRESSES_ARCHIVE} COMMAND ${CMAKE_COMMAND} -DTARGET=${LINT_SUPPRESSES_ROOT} -P ${LINT_SUPPRESSES_INSTALL_SCRIPT} COMMAND ${CMAKE_COMMAND} -E touch ${LINT_SUPPRESSES_TOUCH_FILE} DEPENDS ${LINT_SUPPRESSES_ARCHIVE} ${LINT_SUPPRESSES_INSTALL_SCRIPT} ) add_download(${LINT_SUPPRESS_FILE} ${LINT_SUPPRESS_URL} off) set(LINT_NVIM_REL_SOURCES) foreach(sfile ${LINT_NVIM_SOURCES}) get_test_target("" "${sfile}" r suffix) set(suppress_file ${LINT_SUPPRESSES_ROOT}/${suffix}.json) set(suppress_url "${LINT_SUPPRESS_URL_BASE}/${suffix}.json") set(rsfile src/nvim/${r}) set(touch_file "${TOUCHES_DIR}/ran-clint-${suffix}") add_custom_command( OUTPUT ${touch_file} COMMAND ${LINT_PRG} --suppress-errors=${suppress_file} ${rsfile} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${CMAKE_COMMAND} -E touch ${touch_file} DEPENDS ${LINT_PRG} ${sfile} ${LINT_SUPPRESSES_TOUCH_FILE} ) list(APPEND LINT_TARGETS ${touch_file}) list(APPEND LINT_NVIM_REL_SOURCES ${rsfile}) endforeach() add_custom_target(clint DEPENDS ${LINT_TARGETS}) add_custom_target( clint-full COMMAND ${LINT_PRG} --suppress-errors=${LINT_SUPPRESS_FILE} ${LINT_NVIM_REL_SOURCES} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} DEPENDS ${LINT_PRG} ${LINT_NVIM_SOURCES} ${LINT_SUPPRESS_FILE} ) add_subdirectory(po) neovim-0.2.2/src/nvim/README.md000066400000000000000000000147621320401574200160370ustar00rootroot00000000000000Nvim core source ================ Module-specific details are documented at the top of each module (`terminal.c`, `screen.c`, ...). See `:help development` for more guidelines. Logs ---- Low-level log messages sink to `$NVIM_LOG_FILE`. You can use `LOG_CALLSTACK();` anywhere in the source to log the current stacktrace. To log in an alternate file, e.g. stderr, use `LOG_CALLSTACK_TO_FILE(FILE*)`. (Currently Linux-only.) UI events are logged at level 0 (`DEBUG_LOG_LEVEL`). rm -rf build/ make CMAKE_EXTRA_FLAGS="-DMIN_LOG_LEVEL=0" Filename conventions -------------------- The source files use extensions to hint about their purpose. - `*.c`, `*.generated.c` - full C files, with all includes, etc. - `*.c.h` - parametrized C files, contain all necessary includes, but require defining macros before actually using. Example: `typval_encode.c.h` - `*.h` - full headers, with all includes. Does *not* apply to `*.generated.h`. - `*.h.generated.h` - exported functions’ declarations. - `*.c.generated.h` - static functions’ declarations. Nvim lifecycle -------------- Following describes how Nvim processes input. Consider a typical Vim-like editing session: 01. Vim dispays the welcome screen 02. User types: `:` 03. Vim enters command-line mode 04. User types: `edit README.txt` 05. Vim opens the file and returns to normal mode 06. User types: `G` 07. Vim navigates to the end of the file 09. User types: `5` 10. Vim enters count-pending mode 11. User types: `d` 12. Vim enters operator-pending mode 13. User types: `w` 14. Vim deletes 5 words 15. User types: `g` 16. Vim enters the "g command mode" 17. User types: `g` 18. Vim goes to the beginning of the file 19. User types: `i` 20. Vim enters insert mode 21. User types: `word` 22. Vim inserts "word" at the beginning and returns to normal mode Note that we split user actions into sequences of inputs that change the state of the editor. While there's no documentation about a "g command mode" (step 16), internally it is implemented similarly to "operator-pending mode". From this we can see that Vim has the behavior of an input-driven state machine (more specifically, a pushdown automaton since it requires a stack for transitioning back from states). Assuming each state has a callback responsible for handling keys, this pseudocode represents the main program loop: ```py def state_enter(state_callback, data): do key = readkey() # read a key from the user while state_callback(data, key) # invoke the callback for the current state ``` That is, each state is entered by calling `state_enter` and passing a state-specific callback and data. Here is a high-level pseudocode for a program that implements something like the workflow described above: ```py def main() state_enter(normal_state, {}): def normal_state(data, key): if key == ':': state_enter(command_line_state, {}) elif key == 'i': state_enter(insert_state, {}) elif key == 'd': state_enter(delete_operator_state, {}) elif key == 'g': state_enter(g_command_state, {}) elif is_number(key): state_enter(get_operator_count_state, {'count': key}) elif key == 'G' jump_to_eof() return true def command_line_state(data, key): if key == '': if data['input']: execute_ex_command(data['input']) return false elif key == '' return false if not data['input']: data['input'] = '' data['input'] += key return true def delete_operator_state(data, key): count = data['count'] or 1 if key == 'w': delete_word(count) elif key == '$': delete_to_eol(count) return false # return to normal mode def g_command_state(data, key): if key == 'g': go_top() elif key == 'v': reselect() return false # return to normal mode def get_operator_count_state(data, key): if is_number(key): data['count'] += key return true unshift_key(key) # return key to the input buffer state_enter(delete_operator_state, data) return false def insert_state(data, key): if key == '': return false # exit insert mode self_insert(key) return true ``` The above gives an idea of how Nvim is organized internally. Some states like the `g_command_state` or `get_operator_count_state` do not have a dedicated `state_enter` callback, but are implicitly embedded into other states (this will change later as we continue the refactoring effort). To start reading the actual code, here's the recommended order: 1. `state_enter()` function (state.c). This is the actual program loop, note that a `VimState` structure is used, which contains function pointers for the callback and state data. 2. `main()` function (main.c). After all startup, `normal_enter` is called at the end of function to enter normal mode. 3. `normal_enter()` function (normal.c) is a small wrapper for setting up the NormalState structure and calling `state_enter`. 4. `normal_check()` function (normal.c) is called before each iteration of normal mode. 5. `normal_execute()` function (normal.c) is called when a key is read in normal mode. The basic structure described for normal mode in 3, 4 and 5 is used for other modes managed by the `state_enter` loop: - command-line mode: `command_line_{enter,check,execute}()`(`ex_getln.c`) - insert mode: `insert_{enter,check,execute}()`(`edit.c`) - terminal mode: `terminal_{enter,execute}()`(`terminal.c`) Async event support ------------------- One of the features Nvim added is the support for handling arbitrary asynchronous events, which can include: - RPC requests - job control callbacks - timers Nvim implements this functionality by entering another event loop while waiting for characters, so instead of: ```py def state_enter(state_callback, data): do key = readkey() # read a key from the user while state_callback(data, key) # invoke the callback for the current state ``` Nvim program loop is more like: ```py def state_enter(state_callback, data): do event = read_next_event() # read an event from the operating system while state_callback(data, event) # invoke the callback for the current state ``` where `event` is something the operating system delivers to us, including (but not limited to) user input. The `read_next_event()` part is internally implemented by libuv, the platform layer used by Nvim. Since Nvim inherited its code from Vim, the states are not prepared to receive "arbitrary events", so we use a special key to represent those (When a state receives an "arbitrary event", it normally doesn't do anything other update the screen). neovim-0.2.2/src/nvim/api/000077500000000000000000000000001320401574200153175ustar00rootroot00000000000000neovim-0.2.2/src/nvim/api/buffer.c000066400000000000000000000634721320401574200167500ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com // Much of this code was adapted from 'if_py_both.h' from the original // vim source #include #include #include #include #include "nvim/api/buffer.h" #include "nvim/api/private/helpers.h" #include "nvim/api/private/defs.h" #include "nvim/vim.h" #include "nvim/buffer.h" #include "nvim/cursor.h" #include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/misc1.h" #include "nvim/ex_cmds.h" #include "nvim/mark.h" #include "nvim/fileio.h" #include "nvim/move.h" #include "nvim/syntax.h" #include "nvim/window.h" #include "nvim/undo.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/buffer.c.generated.h" #endif /// Gets the buffer line count /// /// @param buffer Buffer handle /// @param[out] err Error details, if any /// @return Line count Integer nvim_buf_line_count(Buffer buffer, Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return 0; } return buf->b_ml.ml_line_count; } /// Gets a buffer line /// /// @deprecated use nvim_buf_get_lines instead. /// for positive indices (including 0) use /// "nvim_buf_get_lines(buffer, index, index+1, true)" /// for negative indices use /// "nvim_buf_get_lines(buffer, index-1, index, true)" /// /// @param buffer Buffer handle /// @param index Line index /// @param[out] err Error details, if any /// @return Line string String buffer_get_line(Buffer buffer, Integer index, Error *err) { String rv = { .size = 0 }; index = convert_index(index); Array slice = nvim_buf_get_lines(0, buffer, index, index+1, true, err); if (!ERROR_SET(err) && slice.size) { rv = slice.items[0].data.string; } xfree(slice.items); return rv; } /// Sets a buffer line /// /// @deprecated use nvim_buf_set_lines instead. /// for positive indices use /// "nvim_buf_set_lines(buffer, index, index+1, true, [line])" /// for negative indices use /// "nvim_buf_set_lines(buffer, index-1, index, true, [line])" /// /// @param buffer Buffer handle /// @param index Line index /// @param line Contents of the new line /// @param[out] err Error details, if any void buffer_set_line(Buffer buffer, Integer index, String line, Error *err) { Object l = STRING_OBJ(line); Array array = { .items = &l, .size = 1 }; index = convert_index(index); nvim_buf_set_lines(0, buffer, index, index+1, true, array, err); } /// Deletes a buffer line /// /// @deprecated use nvim_buf_set_lines instead. /// for positive indices use /// "nvim_buf_set_lines(buffer, index, index+1, true, [])" /// for negative indices use /// "nvim_buf_set_lines(buffer, index-1, index, true, [])" /// @param buffer buffer handle /// @param index line index /// @param[out] err Error details, if any void buffer_del_line(Buffer buffer, Integer index, Error *err) { Array array = ARRAY_DICT_INIT; index = convert_index(index); nvim_buf_set_lines(0, buffer, index, index+1, true, array, err); } /// Retrieves a line range from the buffer /// /// @deprecated use nvim_buf_get_lines(buffer, newstart, newend, false) /// where newstart = start + int(not include_start) - int(start < 0) /// newend = end + int(include_end) - int(end < 0) /// int(bool) = 1 if bool is true else 0 /// @param buffer Buffer handle /// @param start First line index /// @param end Last line index /// @param include_start True if the slice includes the `start` parameter /// @param include_end True if the slice includes the `end` parameter /// @param[out] err Error details, if any /// @return Array of lines ArrayOf(String) buffer_get_line_slice(Buffer buffer, Integer start, Integer end, Boolean include_start, Boolean include_end, Error *err) { start = convert_index(start) + !include_start; end = convert_index(end) + include_end; return nvim_buf_get_lines(0, buffer, start , end, false, err); } /// Retrieves a line range from the buffer /// /// Indexing is zero-based, end-exclusive. Negative indices are interpreted /// as length+1+index, i e -1 refers to the index past the end. So to get the /// last element set start=-2 and end=-1. /// /// Out-of-bounds indices are clamped to the nearest valid value, unless /// `strict_indexing` is set. /// /// @param buffer Buffer handle /// @param start First line index /// @param end Last line index (exclusive) /// @param strict_indexing Whether out-of-bounds should be an error. /// @param[out] err Error details, if any /// @return Array of lines ArrayOf(String) nvim_buf_get_lines(uint64_t channel_id, Buffer buffer, Integer start, Integer end, Boolean strict_indexing, Error *err) FUNC_API_SINCE(1) { Array rv = ARRAY_DICT_INIT; buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return rv; } bool oob = false; start = normalize_index(buf, start, &oob); end = normalize_index(buf, end, &oob); if (strict_indexing && oob) { api_set_error(err, kErrorTypeValidation, "Index out of bounds"); return rv; } if (start >= end) { // Return 0-length array return rv; } rv.size = (size_t)(end - start); rv.items = xcalloc(sizeof(Object), rv.size); for (size_t i = 0; i < rv.size; i++) { int64_t lnum = start + (int64_t)i; if (lnum > LONG_MAX) { api_set_error(err, kErrorTypeValidation, "Line index is too high"); goto end; } const char *bufstr = (char *) ml_get_buf(buf, (linenr_T) lnum, false); Object str = STRING_OBJ(cstr_to_string(bufstr)); // Vim represents NULs as NLs, but this may confuse clients. if (channel_id != VIML_INTERNAL_CALL) { strchrsub(str.data.string.data, '\n', '\0'); } rv.items[i] = str; } end: if (ERROR_SET(err)) { for (size_t i = 0; i < rv.size; i++) { xfree(rv.items[i].data.string.data); } xfree(rv.items); rv.items = NULL; } return rv; } /// Replaces a line range on the buffer /// /// @deprecated use nvim_buf_set_lines(buffer, newstart, newend, false, lines) /// where newstart = start + int(not include_start) + int(start < 0) /// newend = end + int(include_end) + int(end < 0) /// int(bool) = 1 if bool is true else 0 /// /// @param buffer Buffer handle /// @param start First line index /// @param end Last line index /// @param include_start True if the slice includes the `start` parameter /// @param include_end True if the slice includes the `end` parameter /// @param replacement Array of lines to use as replacement (0-length // array will delete the line range) /// @param[out] err Error details, if any void buffer_set_line_slice(Buffer buffer, Integer start, Integer end, Boolean include_start, Boolean include_end, ArrayOf(String) replacement, // NOLINT Error *err) { start = convert_index(start) + !include_start; end = convert_index(end) + include_end; nvim_buf_set_lines(0, buffer, start, end, false, replacement, err); } /// Replaces line range on the buffer /// /// Indexing is zero-based, end-exclusive. Negative indices are interpreted /// as length+1+index, i e -1 refers to the index past the end. So to change /// or delete the last element set start=-2 and end=-1. /// /// To insert lines at a given index, set both start and end to the same index. /// To delete a range of lines, set replacement to an empty array. /// /// Out-of-bounds indices are clamped to the nearest valid value, unless /// `strict_indexing` is set. /// /// @param buffer Buffer handle /// @param start First line index /// @param end Last line index (exclusive) /// @param strict_indexing Whether out-of-bounds should be an error. /// @param replacement Array of lines to use as replacement /// @param[out] err Error details, if any void nvim_buf_set_lines(uint64_t channel_id, Buffer buffer, Integer start, Integer end, Boolean strict_indexing, ArrayOf(String) replacement, // NOLINT Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return; } bool oob = false; start = normalize_index(buf, start, &oob); end = normalize_index(buf, end, &oob); if (strict_indexing && oob) { api_set_error(err, kErrorTypeValidation, "Index out of bounds"); return; } if (start > end) { api_set_error(err, kErrorTypeValidation, "Argument \"start\" is higher than \"end\""); return; } for (size_t i = 0; i < replacement.size; i++) { if (replacement.items[i].type != kObjectTypeString) { api_set_error(err, kErrorTypeValidation, "All items in the replacement array must be strings"); return; } // Disallow newlines in the middle of the line. if (channel_id != VIML_INTERNAL_CALL) { const String l = replacement.items[i].data.string; if (memchr(l.data, NL, l.size)) { api_set_error(err, kErrorTypeValidation, "String cannot contain newlines"); return; } } } win_T *save_curwin = NULL; tabpage_T *save_curtab = NULL; size_t new_len = replacement.size; size_t old_len = (size_t)(end - start); ptrdiff_t extra = 0; // lines added to text, can be negative char **lines = (new_len != 0) ? xcalloc(new_len, sizeof(char *)) : NULL; for (size_t i = 0; i < new_len; i++) { const String l = replacement.items[i].data.string; // Fill lines[i] with l's contents. Convert NULs to newlines as required by // NL-used-for-NUL. lines[i] = xmemdupz(l.data, l.size); memchrsub(lines[i], NUL, NL, l.size); } try_start(); bufref_T save_curbuf = { NULL, 0, 0 }; switch_to_win_for_buf(buf, &save_curwin, &save_curtab, &save_curbuf); if (u_save((linenr_T)(start - 1), (linenr_T)end) == FAIL) { api_set_error(err, kErrorTypeException, "Failed to save undo information"); goto end; } // If the size of the range is reducing (ie, new_len < old_len) we // need to delete some old_len. We do this at the start, by // repeatedly deleting line "start". size_t to_delete = (new_len < old_len) ? (size_t)(old_len - new_len) : 0; for (size_t i = 0; i < to_delete; i++) { if (ml_delete((linenr_T)start, false) == FAIL) { api_set_error(err, kErrorTypeException, "Failed to delete line"); goto end; } } if (to_delete > 0) { extra -= (ptrdiff_t)to_delete; } // For as long as possible, replace the existing old_len with the // new old_len. This is a more efficient operation, as it requires // less memory allocation and freeing. size_t to_replace = old_len < new_len ? old_len : new_len; for (size_t i = 0; i < to_replace; i++) { int64_t lnum = start + (int64_t)i; if (lnum > LONG_MAX) { api_set_error(err, kErrorTypeValidation, "Index value is too high"); goto end; } if (ml_replace((linenr_T)lnum, (char_u *)lines[i], false) == FAIL) { api_set_error(err, kErrorTypeException, "Failed to replace line"); goto end; } // Mark lines that haven't been passed to the buffer as they need // to be freed later lines[i] = NULL; } // Now we may need to insert the remaining new old_len for (size_t i = to_replace; i < new_len; i++) { int64_t lnum = start + (int64_t)i - 1; if (lnum > LONG_MAX) { api_set_error(err, kErrorTypeValidation, "Index value is too high"); goto end; } if (ml_append((linenr_T)lnum, (char_u *)lines[i], 0, false) == FAIL) { api_set_error(err, kErrorTypeException, "Failed to insert line"); goto end; } // Same as with replacing, but we also need to free lines xfree(lines[i]); lines[i] = NULL; extra++; } // Adjust marks. Invalidate any which lie in the // changed range, and move any in the remainder of the buffer. // Only adjust marks if we managed to switch to a window that holds // the buffer, otherwise line numbers will be invalid. if (save_curbuf.br_buf == NULL) { mark_adjust((linenr_T)start, (linenr_T)(end - 1), MAXLNUM, extra, false); } changed_lines((linenr_T)start, 0, (linenr_T)end, (long)extra); if (save_curbuf.br_buf == NULL) { fix_cursor((linenr_T)start, (linenr_T)end, (linenr_T)extra); } end: for (size_t i = 0; i < new_len; i++) { xfree(lines[i]); } xfree(lines); restore_win_for_buf(save_curwin, save_curtab, &save_curbuf); try_end(err); } /// Gets a buffer-scoped (b:) variable. /// /// @param buffer Buffer handle /// @param name Variable name /// @param[out] err Error details, if any /// @return Variable value Object nvim_buf_get_var(Buffer buffer, String name, Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return (Object) OBJECT_INIT; } return dict_get_value(buf->b_vars, name, err); } /// Gets a changed tick of a buffer /// /// @param[in] buffer Buffer handle. /// @param[out] err Error details, if any /// /// @return `b:changedtick` value. Integer nvim_buf_get_changedtick(Buffer buffer, Error *err) FUNC_API_SINCE(2) { const buf_T *const buf = find_buffer_by_handle(buffer, err); if (!buf) { return -1; } return buf->b_changedtick; } /// Gets a list of dictionaries describing buffer-local mappings. /// The "buffer" key in the returned dictionary reflects the buffer /// handle where the mapping is present. /// /// @param mode Mode short-name ("n", "i", "v", ...) /// @param buffer Buffer handle /// @param[out] err Error details, if any /// @returns Array of maparg()-like dictionaries describing mappings ArrayOf(Dictionary) nvim_buf_get_keymap(Buffer buffer, String mode, Error *err) FUNC_API_SINCE(3) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return (Array)ARRAY_DICT_INIT; } return keymap_array(mode, buf); } /// Sets a buffer-scoped (b:) variable /// /// @param buffer Buffer handle /// @param name Variable name /// @param value Variable value /// @param[out] err Error details, if any void nvim_buf_set_var(Buffer buffer, String name, Object value, Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return; } dict_set_var(buf->b_vars, name, value, false, false, err); } /// Removes a buffer-scoped (b:) variable /// /// @param buffer Buffer handle /// @param name Variable name /// @param[out] err Error details, if any void nvim_buf_del_var(Buffer buffer, String name, Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return; } dict_set_var(buf->b_vars, name, NIL, true, false, err); } /// Sets a buffer-scoped (b:) variable /// /// @deprecated /// /// @param buffer Buffer handle /// @param name Variable name /// @param value Variable value /// @param[out] err Error details, if any /// @return Old value or nil if there was no previous value. /// /// @warning It may return nil if there was no previous value /// or if previous value was `v:null`. Object buffer_set_var(Buffer buffer, String name, Object value, Error *err) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return (Object) OBJECT_INIT; } return dict_set_var(buf->b_vars, name, value, false, true, err); } /// Removes a buffer-scoped (b:) variable /// /// @deprecated /// /// @param buffer Buffer handle /// @param name Variable name /// @param[out] err Error details, if any /// @return Old value Object buffer_del_var(Buffer buffer, String name, Error *err) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return (Object) OBJECT_INIT; } return dict_set_var(buf->b_vars, name, NIL, true, true, err); } /// Gets a buffer option value /// /// @param buffer Buffer handle /// @param name Option name /// @param[out] err Error details, if any /// @return Option value Object nvim_buf_get_option(Buffer buffer, String name, Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return (Object) OBJECT_INIT; } return get_option_from(buf, SREQ_BUF, name, err); } /// Sets a buffer option value. Passing 'nil' as value deletes the option (only /// works if there's a global fallback) /// /// @param buffer Buffer handle /// @param name Option name /// @param value Option value /// @param[out] err Error details, if any void nvim_buf_set_option(Buffer buffer, String name, Object value, Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return; } set_option_to(buf, SREQ_BUF, name, value, err); } /// Gets the buffer number /// /// @deprecated The buffer number now is equal to the object id, /// so there is no need to use this function. /// /// @param buffer Buffer handle /// @param[out] err Error details, if any /// @return Buffer number Integer nvim_buf_get_number(Buffer buffer, Error *err) FUNC_API_SINCE(1) FUNC_API_DEPRECATED_SINCE(2) { Integer rv = 0; buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return rv; } return buf->b_fnum; } /// Gets the full file name for the buffer /// /// @param buffer Buffer handle /// @param[out] err Error details, if any /// @return Buffer name String nvim_buf_get_name(Buffer buffer, Error *err) FUNC_API_SINCE(1) { String rv = STRING_INIT; buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf || buf->b_ffname == NULL) { return rv; } return cstr_to_string((char *)buf->b_ffname); } /// Sets the full file name for a buffer /// /// @param buffer Buffer handle /// @param name Buffer name /// @param[out] err Error details, if any void nvim_buf_set_name(Buffer buffer, String name, Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return; } try_start(); // Using aucmd_*: autocommands will be executed by rename_buffer aco_save_T aco; aucmd_prepbuf(&aco, buf); int ren_ret = rename_buffer((char_u *) name.data); aucmd_restbuf(&aco); if (try_end(err)) { return; } if (ren_ret == FAIL) { api_set_error(err, kErrorTypeException, "Failed to rename buffer"); } } /// Checks if a buffer is valid /// /// @param buffer Buffer handle /// @return true if the buffer is valid, false otherwise Boolean nvim_buf_is_valid(Buffer buffer) FUNC_API_SINCE(1) { Error stub = ERROR_INIT; Boolean ret = find_buffer_by_handle(buffer, &stub) != NULL; api_clear_error(&stub); return ret; } /// Inserts a sequence of lines to a buffer at a certain index /// /// @deprecated use nvim_buf_set_lines(buffer, lnum, lnum, true, lines) /// /// @param buffer Buffer handle /// @param lnum Insert the lines after `lnum`. If negative, appends to /// the end of the buffer. /// @param lines Array of lines /// @param[out] err Error details, if any void buffer_insert(Buffer buffer, Integer lnum, ArrayOf(String) lines, Error *err) { // "lnum" will be the index of the line after inserting, // no matter if it is negative or not nvim_buf_set_lines(0, buffer, lnum, lnum, true, lines, err); } /// Return a tuple (row,col) representing the position of the named mark /// /// @param buffer Buffer handle /// @param name Mark name /// @param[out] err Error details, if any /// @return (row, col) tuple ArrayOf(Integer, 2) nvim_buf_get_mark(Buffer buffer, String name, Error *err) FUNC_API_SINCE(1) { Array rv = ARRAY_DICT_INIT; buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return rv; } if (name.size != 1) { api_set_error(err, kErrorTypeValidation, "Mark name must be a single character"); return rv; } pos_T *posp; char mark = *name.data; try_start(); bufref_T save_buf; switch_buffer(&save_buf, buf); posp = getmark(mark, false); restore_buffer(&save_buf); if (try_end(err)) { return rv; } if (posp == NULL) { api_set_error(err, kErrorTypeValidation, "Invalid mark name"); return rv; } ADD(rv, INTEGER_OBJ(posp->lnum)); ADD(rv, INTEGER_OBJ(posp->col)); return rv; } /// Adds a highlight to buffer. /// /// Useful for plugins that dynamically generate highlights to a buffer /// (like a semantic highlighter or linter). The function adds a single /// highlight to a buffer. Unlike matchaddpos() highlights follow changes to /// line numbering (as lines are inserted/removed above the highlighted line), /// like signs and marks do. /// /// `src_id` is useful for batch deletion/updating of a set of highlights. When /// called with `src_id = 0`, an unique source id is generated and returned. /// Successive calls can pass that `src_id` to associate new highlights with /// the same source group. All highlights in the same group can be cleared /// with `nvim_buf_clear_highlight`. If the highlight never will be manually /// deleted, pass `src_id = -1`. /// /// If `hl_group` is the empty string no highlight is added, but a new `src_id` /// is still returned. This is useful for an external plugin to synchrounously /// request an unique `src_id` at initialization, and later asynchronously add /// and clear highlights in response to buffer changes. /// /// @param buffer Buffer handle /// @param src_id Source group to use or 0 to use a new group, /// or -1 for ungrouped highlight /// @param hl_group Name of the highlight group to use /// @param line Line to highlight (zero-indexed) /// @param col_start Start of range of columns to highlight /// @param col_end End of range of columns to highlight, /// or -1 to highlight to end of line /// @param[out] err Error details, if any /// @return The src_id that was used Integer nvim_buf_add_highlight(Buffer buffer, Integer src_id, String hl_group, Integer line, Integer col_start, Integer col_end, Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return 0; } if (line < 0 || line >= MAXLNUM) { api_set_error(err, kErrorTypeValidation, "Line number outside range"); return 0; } if (col_start < 0 || col_start > MAXCOL) { api_set_error(err, kErrorTypeValidation, "Column value outside range"); return 0; } if (col_end < 0 || col_end > MAXCOL) { col_end = MAXCOL; } int hlg_id = 0; if (hl_group.size > 0) { hlg_id = syn_check_group((char_u *)hl_group.data, (int)hl_group.size); } src_id = bufhl_add_hl(buf, (int)src_id, hlg_id, (linenr_T)line+1, (colnr_T)col_start+1, (colnr_T)col_end); return src_id; } /// Clears highlights from a given source group and a range of lines /// /// To clear a source group in the entire buffer, pass in 1 and -1 to /// line_start and line_end respectively. /// /// @param buffer Buffer handle /// @param src_id Highlight source group to clear, or -1 to clear all. /// @param line_start Start of range of lines to clear /// @param line_end End of range of lines to clear (exclusive) or -1 to clear /// to end of file. /// @param[out] err Error details, if any void nvim_buf_clear_highlight(Buffer buffer, Integer src_id, Integer line_start, Integer line_end, Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return; } if (line_start < 0 || line_start >= MAXLNUM) { api_set_error(err, kErrorTypeValidation, "Line number outside range"); return; } if (line_end < 0 || line_end > MAXLNUM) { line_end = MAXLNUM; } bufhl_clear_line_range(buf, (int)src_id, (int)line_start+1, (int)line_end); } // Check if deleting lines made the cursor position invalid. // Changed the lines from "lo" to "hi" and added "extra" lines (negative if // deleted). static void fix_cursor(linenr_T lo, linenr_T hi, linenr_T extra) { if (curwin->w_cursor.lnum >= lo) { // Adjust the cursor position if it's in/after the changed // lines. if (curwin->w_cursor.lnum >= hi) { curwin->w_cursor.lnum += extra; check_cursor_col(); } else if (extra < 0) { curwin->w_cursor.lnum = lo; check_cursor(); } else { check_cursor_col(); } changed_cline_bef_curs(); } invalidate_botline(); } // Normalizes 0-based indexes to buffer line numbers static int64_t normalize_index(buf_T *buf, int64_t index, bool *oob) { int64_t line_count = buf->b_ml.ml_line_count; // Fix if < 0 index = index < 0 ? line_count + index +1 : index; // Check for oob if (index > line_count) { *oob = true; index = line_count; } else if (index < 0) { *oob = true; index = 0; } // Convert the index to a vim line number index++; return index; } static int64_t convert_index(int64_t index) { return index < 0 ? index - 1 : index; } neovim-0.2.2/src/nvim/api/buffer.h000066400000000000000000000003351320401574200167420ustar00rootroot00000000000000#ifndef NVIM_API_BUFFER_H #define NVIM_API_BUFFER_H #include #include "nvim/api/private/defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/buffer.h.generated.h" #endif #endif // NVIM_API_BUFFER_H neovim-0.2.2/src/nvim/api/dispatch_deprecated.lua000066400000000000000000000053361320401574200220100ustar00rootroot00000000000000local deprecated_aliases = { nvim_buf_add_highlight="buffer_add_highlight", nvim_buf_clear_highlight="buffer_clear_highlight", nvim_buf_get_lines="buffer_get_lines", nvim_buf_get_mark="buffer_get_mark", nvim_buf_get_name="buffer_get_name", nvim_buf_get_number="buffer_get_number", nvim_buf_get_option="buffer_get_option", nvim_buf_get_var="buffer_get_var", nvim_buf_is_valid="buffer_is_valid", nvim_buf_line_count="buffer_line_count", nvim_buf_set_lines="buffer_set_lines", nvim_buf_set_name="buffer_set_name", nvim_buf_set_option="buffer_set_option", nvim_call_function="vim_call_function", nvim_command="vim_command", nvim_command_output="vim_command_output", nvim_del_current_line="vim_del_current_line", nvim_err_write="vim_err_write", nvim_err_writeln="vim_report_error", nvim_eval="vim_eval", nvim_feedkeys="vim_feedkeys", nvim_get_api_info="vim_get_api_info", nvim_get_color_by_name="vim_name_to_color", nvim_get_color_map="vim_get_color_map", nvim_get_current_buf="vim_get_current_buffer", nvim_get_current_line="vim_get_current_line", nvim_get_current_tabpage="vim_get_current_tabpage", nvim_get_current_win="vim_get_current_window", nvim_get_option="vim_get_option", nvim_get_var="vim_get_var", nvim_get_vvar="vim_get_vvar", nvim_input="vim_input", nvim_list_bufs="vim_get_buffers", nvim_list_runtime_paths="vim_list_runtime_paths", nvim_list_tabpages="vim_get_tabpages", nvim_list_wins="vim_get_windows", nvim_out_write="vim_out_write", nvim_replace_termcodes="vim_replace_termcodes", nvim_set_current_buf="vim_set_current_buffer", nvim_set_current_dir="vim_change_directory", nvim_set_current_line="vim_set_current_line", nvim_set_current_tabpage="vim_set_current_tabpage", nvim_set_current_win="vim_set_current_window", nvim_set_option="vim_set_option", nvim_strwidth="vim_strwidth", nvim_subscribe="vim_subscribe", nvim_tabpage_get_var="tabpage_get_var", nvim_tabpage_get_win="tabpage_get_window", nvim_tabpage_is_valid="tabpage_is_valid", nvim_tabpage_list_wins="tabpage_get_windows", nvim_ui_detach="ui_detach", nvim_ui_try_resize="ui_try_resize", nvim_unsubscribe="vim_unsubscribe", nvim_win_get_buf="window_get_buffer", nvim_win_get_cursor="window_get_cursor", nvim_win_get_height="window_get_height", nvim_win_get_option="window_get_option", nvim_win_get_position="window_get_position", nvim_win_get_tabpage="window_get_tabpage", nvim_win_get_var="window_get_var", nvim_win_get_width="window_get_width", nvim_win_is_valid="window_is_valid", nvim_win_set_cursor="window_set_cursor", nvim_win_set_height="window_set_height", nvim_win_set_option="window_set_option", nvim_win_set_width="window_set_width", } return deprecated_aliases neovim-0.2.2/src/nvim/api/private/000077500000000000000000000000001320401574200167715ustar00rootroot00000000000000neovim-0.2.2/src/nvim/api/private/defs.h000066400000000000000000000052641320401574200200720ustar00rootroot00000000000000#ifndef NVIM_API_PRIVATE_DEFS_H #define NVIM_API_PRIVATE_DEFS_H #include #include #include #include "nvim/func_attr.h" #define ARRAY_DICT_INIT {.size = 0, .capacity = 0, .items = NULL} #define STRING_INIT {.data = NULL, .size = 0} #define OBJECT_INIT { .type = kObjectTypeNil } #define ERROR_INIT { .type = kErrorTypeNone, .msg = NULL } #define REMOTE_TYPE(type) typedef handle_T type #define ERROR_SET(e) ((e)->type != kErrorTypeNone) #ifdef INCLUDE_GENERATED_DECLARATIONS # define ArrayOf(...) Array # define DictionaryOf(...) Dictionary #endif typedef int handle_T; // Basic types typedef enum { kErrorTypeNone = -1, kErrorTypeException, kErrorTypeValidation } ErrorType; typedef enum { kMessageTypeRequest, kMessageTypeResponse, kMessageTypeNotification } MessageType; /// Used as the message ID of notifications. #define NO_RESPONSE UINT64_MAX /// Mask for all internal calls #define INTERNAL_CALL_MASK (((uint64_t)1) << (sizeof(uint64_t) * 8 - 1)) /// Internal call from VimL code #define VIML_INTERNAL_CALL INTERNAL_CALL_MASK /// Internal call from lua code #define LUA_INTERNAL_CALL (VIML_INTERNAL_CALL + 1) static inline bool is_internal_call(uint64_t channel_id) REAL_FATTR_ALWAYS_INLINE REAL_FATTR_CONST; /// Check whether call is internal /// /// @param[in] channel_id Channel id. /// /// @return true if channel_id refers to internal channel. static inline bool is_internal_call(const uint64_t channel_id) { return !!(channel_id & INTERNAL_CALL_MASK); } typedef struct { ErrorType type; char *msg; } Error; typedef bool Boolean; typedef int64_t Integer; typedef double Float; /// Maximum value of an Integer #define API_INTEGER_MAX INT64_MAX /// Minimum value of an Integer #define API_INTEGER_MIN INT64_MIN typedef struct { char *data; size_t size; } String; REMOTE_TYPE(Buffer); REMOTE_TYPE(Window); REMOTE_TYPE(Tabpage); typedef struct object Object; typedef struct { Object *items; size_t size, capacity; } Array; typedef struct key_value_pair KeyValuePair; typedef struct { KeyValuePair *items; size_t size, capacity; } Dictionary; typedef enum { kObjectTypeNil = 0, kObjectTypeBoolean, kObjectTypeInteger, kObjectTypeFloat, kObjectTypeString, kObjectTypeArray, kObjectTypeDictionary, // EXT types, cannot be split or reordered, see #EXT_OBJECT_TYPE_SHIFT kObjectTypeBuffer, kObjectTypeWindow, kObjectTypeTabpage, } ObjectType; struct object { ObjectType type; union { Boolean boolean; Integer integer; Float floating; String string; Array array; Dictionary dictionary; } data; }; struct key_value_pair { String key; Object value; }; #endif // NVIM_API_PRIVATE_DEFS_H neovim-0.2.2/src/nvim/api/private/dispatch.c000066400000000000000000000025331320401574200207370ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include #include #include #include #include #include "nvim/map.h" #include "nvim/log.h" #include "nvim/vim.h" #include "nvim/msgpack_rpc/helpers.h" #include "nvim/api/private/dispatch.h" #include "nvim/api/private/helpers.h" #include "nvim/api/private/defs.h" #include "nvim/api/buffer.h" #include "nvim/api/tabpage.h" #include "nvim/api/ui.h" #include "nvim/api/vim.h" #include "nvim/api/window.h" static Map(String, MsgpackRpcRequestHandler) *methods = NULL; static void msgpack_rpc_add_method_handler(String method, MsgpackRpcRequestHandler handler) { map_put(String, MsgpackRpcRequestHandler)(methods, method, handler); } MsgpackRpcRequestHandler msgpack_rpc_get_handler_for(const char *name, size_t name_len) { String m = { .data = (char *)name, .size = name_len }; MsgpackRpcRequestHandler rv = map_get(String, MsgpackRpcRequestHandler)(methods, m); if (!rv.fn) { rv.fn = msgpack_rpc_handle_missing_method; } return rv; } #ifdef INCLUDE_GENERATED_DECLARATIONS #include "api/private/dispatch_wrappers.generated.h" #endif neovim-0.2.2/src/nvim/api/private/dispatch.h000066400000000000000000000014251320401574200207430ustar00rootroot00000000000000#ifndef NVIM_API_PRIVATE_DISPATCH_H #define NVIM_API_PRIVATE_DISPATCH_H #include "nvim/api/private/defs.h" typedef Object (*ApiDispatchWrapper)(uint64_t channel_id, Array args, Error *error); /// The rpc_method_handlers table, used in msgpack_rpc_dispatch(), stores /// functions of this type. typedef struct { ApiDispatchWrapper fn; bool async; // function is always safe to run immediately instead of being // put in a request queue for handling when nvim waits for input. } MsgpackRpcRequestHandler; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/private/dispatch.h.generated.h" # include "api/private/dispatch_wrappers.h.generated.h" #endif #endif // NVIM_API_PRIVATE_DISPATCH_H neovim-0.2.2/src/nvim/api/private/handle.c000066400000000000000000000017331320401574200203740ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include #include #include "nvim/vim.h" #include "nvim/map.h" #include "nvim/api/private/handle.h" #define HANDLE_INIT(name) name##_handles = pmap_new(handle_T)() #define HANDLE_IMPL(type, name) \ static PMap(handle_T) *name##_handles = NULL; /* NOLINT */ \ \ type *handle_get_##name(handle_T handle) \ { \ return pmap_get(handle_T)(name##_handles, handle); \ } \ \ void handle_register_##name(type *name) \ { \ pmap_put(handle_T)(name##_handles, name->handle, name); \ } \ \ void handle_unregister_##name(type *name) \ { \ pmap_del(handle_T)(name##_handles, name->handle); \ } HANDLE_IMPL(buf_T, buffer) HANDLE_IMPL(win_T, window) HANDLE_IMPL(tabpage_T, tabpage) void handle_init(void) { HANDLE_INIT(buffer); HANDLE_INIT(window); HANDLE_INIT(tabpage); } neovim-0.2.2/src/nvim/api/private/handle.h000066400000000000000000000012701320401574200203750ustar00rootroot00000000000000#ifndef NVIM_API_PRIVATE_HANDLE_H #define NVIM_API_PRIVATE_HANDLE_H #include "nvim/vim.h" #include "nvim/buffer_defs.h" #include "nvim/api/private/defs.h" #define HANDLE_DECLS(type, name) \ type *handle_get_##name(handle_T handle); \ void handle_register_##name(type *name); \ void handle_unregister_##name(type *name); // handle_get_buffer handle_register_buffer, handle_unregister_buffer HANDLE_DECLS(buf_T, buffer) // handle_get_window handle_register_window, handle_unregister_window HANDLE_DECLS(win_T, window) // handle_get_tabpage handle_register_tabpage, handle_unregister_tabpage HANDLE_DECLS(tabpage_T, tabpage) void handle_init(void); #endif // NVIM_API_PRIVATE_HANDLE_H neovim-0.2.2/src/nvim/api/private/helpers.c000066400000000000000000001015641320401574200206060ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include #include #include #include #include #include "nvim/api/private/helpers.h" #include "nvim/api/private/defs.h" #include "nvim/api/private/handle.h" #include "nvim/msgpack_rpc/helpers.h" #include "nvim/ascii.h" #include "nvim/vim.h" #include "nvim/buffer.h" #include "nvim/window.h" #include "nvim/memory.h" #include "nvim/eval.h" #include "nvim/eval/typval.h" #include "nvim/map_defs.h" #include "nvim/map.h" #include "nvim/option.h" #include "nvim/option_defs.h" #include "nvim/version.h" #include "nvim/lib/kvec.h" #include "nvim/getchar.h" /// Helper structure for vim_to_object typedef struct { kvec_t(Object) stack; ///< Object stack. } EncodedData; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/private/helpers.c.generated.h" # include "api/private/funcs_metadata.generated.h" # include "api/private/ui_events_metadata.generated.h" #endif /// Start block that may cause VimL exceptions while evaluating another code /// /// Used when caller is supposed to be operating when other VimL code is being /// processed and that “other VimL code” must not be affected. /// /// @param[out] tstate Location where try state should be saved. void try_enter(TryState *const tstate) { *tstate = (TryState) { .current_exception = current_exception, .msg_list = (const struct msglist *const *)msg_list, .private_msg_list = NULL, .trylevel = trylevel, .got_int = got_int, .did_throw = did_throw, .need_rethrow = need_rethrow, .did_emsg = did_emsg, }; msg_list = &tstate->private_msg_list; current_exception = NULL; trylevel = 1; got_int = false; did_throw = false; need_rethrow = false; did_emsg = false; } /// End try block, set the error message if any and restore previous state /// /// @warning Return is consistent with most functions (false on error), not with /// try_end (true on error). /// /// @param[in] tstate Previous state to restore. /// @param[out] err Location where error should be saved. /// /// @return false if error occurred, true otherwise. bool try_leave(const TryState *const tstate, Error *const err) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT { const bool ret = !try_end(err); assert(trylevel == 0); assert(!need_rethrow); assert(!got_int); assert(!did_throw); assert(!did_emsg); assert(msg_list == &tstate->private_msg_list); assert(*msg_list == NULL); assert(current_exception == NULL); msg_list = (struct msglist **)tstate->msg_list; current_exception = tstate->current_exception; trylevel = tstate->trylevel; got_int = tstate->got_int; did_throw = tstate->did_throw; need_rethrow = tstate->need_rethrow; did_emsg = tstate->did_emsg; return ret; } /// Start block that may cause vimscript exceptions /// /// Each try_start() call should be mirrored by try_end() call. /// /// To be used as a replacement of `:try … catch … endtry` in C code, in cases /// when error flag could not already be set. If there may be pending error /// state at the time try_start() is executed which needs to be preserved, /// try_enter()/try_leave() pair should be used instead. void try_start(void) { ++trylevel; } /// End try block, set the error message if any and return true if an error /// occurred. /// /// @param err Pointer to the stack-allocated error object /// @return true if an error occurred bool try_end(Error *err) { // Note: all globals manipulated here should be saved/restored in // try_enter/try_leave. trylevel--; // Without this it stops processing all subsequent VimL commands and // generates strange error messages if I e.g. try calling Test() in a // cycle did_emsg = false; if (got_int) { if (did_throw) { // If we got an interrupt, discard the current exception discard_current_exception(); } api_set_error(err, kErrorTypeException, "Keyboard interrupt"); got_int = false; } else if (msg_list != NULL && *msg_list != NULL) { int should_free; char *msg = (char *)get_exception_string(*msg_list, ET_ERROR, NULL, &should_free); api_set_error(err, kErrorTypeException, "%s", msg); free_global_msglist(); if (should_free) { xfree(msg); } } else if (did_throw) { api_set_error(err, kErrorTypeException, "%s", current_exception->value); discard_current_exception(); } return ERROR_SET(err); } /// Recursively expands a vimscript value in a dict /// /// @param dict The vimscript dict /// @param key The key /// @param[out] err Details of an error that may have occurred Object dict_get_value(dict_T *dict, String key, Error *err) { dictitem_T *const di = tv_dict_find(dict, key.data, (ptrdiff_t)key.size); if (di == NULL) { api_set_error(err, kErrorTypeValidation, "Key '%s' not found", key.data); return (Object)OBJECT_INIT; } return vim_to_object(&di->di_tv); } /// Set a value in a scope dict. Objects are recursively expanded into their /// vimscript equivalents. /// /// @param dict The vimscript dict /// @param key The key /// @param value The new value /// @param del Delete key in place of setting it. Argument `value` is ignored in /// this case. /// @param retval If true the old value will be converted and returned. /// @param[out] err Details of an error that may have occurred /// @return The old value if `retval` is true and the key was present, else NIL Object dict_set_var(dict_T *dict, String key, Object value, bool del, bool retval, Error *err) { Object rv = OBJECT_INIT; if (dict->dv_lock) { api_set_error(err, kErrorTypeException, "Dictionary is locked"); return rv; } if (key.size == 0) { api_set_error(err, kErrorTypeValidation, "Empty variable names aren't allowed"); return rv; } if (key.size > INT_MAX) { api_set_error(err, kErrorTypeValidation, "Key length is too high"); return rv; } dictitem_T *di = tv_dict_find(dict, key.data, (ptrdiff_t)key.size); if (di != NULL) { if (di->di_flags & DI_FLAGS_RO) { api_set_error(err, kErrorTypeException, "Key is read-only: %s", key.data); return rv; } else if (di->di_flags & DI_FLAGS_FIX) { api_set_error(err, kErrorTypeException, "Key is fixed: %s", key.data); return rv; } else if (di->di_flags & DI_FLAGS_LOCK) { api_set_error(err, kErrorTypeException, "Key is locked: %s", key.data); return rv; } } if (del) { // Delete the key if (di == NULL) { // Doesn't exist, fail api_set_error(err, kErrorTypeValidation, "Key does not exist: %s", key.data); } else { // Return the old value if (retval) { rv = vim_to_object(&di->di_tv); } // Delete the entry tv_dict_item_remove(dict, di); } } else { // Update the key typval_T tv; // Convert the object to a vimscript type in the temporary variable if (!object_to_vim(value, &tv, err)) { return rv; } if (di == NULL) { // Need to create an entry di = tv_dict_item_alloc_len(key.data, key.size); tv_dict_add(dict, di); } else { // Return the old value if (retval) { rv = vim_to_object(&di->di_tv); } tv_clear(&di->di_tv); } // Update the value tv_copy(&tv, &di->di_tv); // Clear the temporary variable tv_clear(&tv); } return rv; } /// Gets the value of a global or local(buffer, window) option. /// /// @param from If `type` is `SREQ_WIN` or `SREQ_BUF`, this must be a pointer /// to the window or buffer. /// @param type One of `SREQ_GLOBAL`, `SREQ_WIN` or `SREQ_BUF` /// @param name The option name /// @param[out] err Details of an error that may have occurred /// @return the option value Object get_option_from(void *from, int type, String name, Error *err) { Object rv = OBJECT_INIT; if (name.size == 0) { api_set_error(err, kErrorTypeValidation, "Empty option name"); return rv; } // Return values int64_t numval; char *stringval = NULL; int flags = get_option_value_strict(name.data, &numval, &stringval, type, from); if (!flags) { api_set_error(err, kErrorTypeValidation, "Invalid option name \"%s\"", name.data); return rv; } if (flags & SOPT_BOOL) { rv.type = kObjectTypeBoolean; rv.data.boolean = numval ? true : false; } else if (flags & SOPT_NUM) { rv.type = kObjectTypeInteger; rv.data.integer = numval; } else if (flags & SOPT_STRING) { if (stringval) { rv.type = kObjectTypeString; rv.data.string.data = stringval; rv.data.string.size = strlen(stringval); } else { api_set_error(err, kErrorTypeException, "Unable to get value for option \"%s\"", name.data); } } else { api_set_error(err, kErrorTypeException, "Unknown type for option \"%s\"", name.data); } return rv; } /// Sets the value of a global or local(buffer, window) option. /// /// @param to If `type` is `SREQ_WIN` or `SREQ_BUF`, this must be a pointer /// to the window or buffer. /// @param type One of `SREQ_GLOBAL`, `SREQ_WIN` or `SREQ_BUF` /// @param name The option name /// @param[out] err Details of an error that may have occurred void set_option_to(void *to, int type, String name, Object value, Error *err) { if (name.size == 0) { api_set_error(err, kErrorTypeValidation, "Empty option name"); return; } int flags = get_option_value_strict(name.data, NULL, NULL, type, to); if (flags == 0) { api_set_error(err, kErrorTypeValidation, "Invalid option name \"%s\"", name.data); return; } if (value.type == kObjectTypeNil) { if (type == SREQ_GLOBAL) { api_set_error(err, kErrorTypeException, "Unable to unset option \"%s\"", name.data); return; } else if (!(flags & SOPT_GLOBAL)) { api_set_error(err, kErrorTypeException, "Cannot unset option \"%s\" " "because it doesn't have a global value", name.data); return; } else { unset_global_local_option(name.data, to); return; } } int opt_flags = (type == SREQ_GLOBAL) ? OPT_GLOBAL : OPT_LOCAL; if (flags & SOPT_BOOL) { if (value.type != kObjectTypeBoolean) { api_set_error(err, kErrorTypeValidation, "Option \"%s\" requires a boolean value", name.data); return; } bool val = value.data.boolean; set_option_value_for(name.data, val, NULL, opt_flags, type, to, err); } else if (flags & SOPT_NUM) { if (value.type != kObjectTypeInteger) { api_set_error(err, kErrorTypeValidation, "Option \"%s\" requires an integer value", name.data); return; } if (value.data.integer > INT_MAX || value.data.integer < INT_MIN) { api_set_error(err, kErrorTypeValidation, "Value for option \"%s\" is outside range", name.data); return; } int val = (int) value.data.integer; set_option_value_for(name.data, val, NULL, opt_flags, type, to, err); } else { if (value.type != kObjectTypeString) { api_set_error(err, kErrorTypeValidation, "Option \"%s\" requires a string value", name.data); return; } set_option_value_for(name.data, 0, value.data.string.data, opt_flags, type, to, err); } } #define TYPVAL_ENCODE_ALLOW_SPECIALS false #define TYPVAL_ENCODE_CONV_NIL(tv) \ kv_push(edata->stack, NIL) #define TYPVAL_ENCODE_CONV_BOOL(tv, num) \ kv_push(edata->stack, BOOLEAN_OBJ((Boolean)(num))) #define TYPVAL_ENCODE_CONV_NUMBER(tv, num) \ kv_push(edata->stack, INTEGER_OBJ((Integer)(num))) #define TYPVAL_ENCODE_CONV_UNSIGNED_NUMBER TYPVAL_ENCODE_CONV_NUMBER #define TYPVAL_ENCODE_CONV_FLOAT(tv, flt) \ kv_push(edata->stack, FLOAT_OBJ((Float)(flt))) #define TYPVAL_ENCODE_CONV_STRING(tv, str, len) \ do { \ const size_t len_ = (size_t)(len); \ const char *const str_ = (const char *)(str); \ assert(len_ == 0 || str_ != NULL); \ kv_push(edata->stack, STRING_OBJ(((String) { \ .data = xmemdupz((len_?str_:""), len_), \ .size = len_ \ }))); \ } while (0) #define TYPVAL_ENCODE_CONV_STR_STRING TYPVAL_ENCODE_CONV_STRING #define TYPVAL_ENCODE_CONV_EXT_STRING(tv, str, len, type) \ TYPVAL_ENCODE_CONV_NIL(tv) #define TYPVAL_ENCODE_CONV_FUNC_START(tv, fun) \ do { \ TYPVAL_ENCODE_CONV_NIL(tv); \ goto typval_encode_stop_converting_one_item; \ } while (0) #define TYPVAL_ENCODE_CONV_FUNC_BEFORE_ARGS(tv, len) #define TYPVAL_ENCODE_CONV_FUNC_BEFORE_SELF(tv, len) #define TYPVAL_ENCODE_CONV_FUNC_END(tv) #define TYPVAL_ENCODE_CONV_EMPTY_LIST(tv) \ kv_push(edata->stack, ARRAY_OBJ(((Array) { .capacity = 0, .size = 0 }))) #define TYPVAL_ENCODE_CONV_EMPTY_DICT(tv, dict) \ kv_push(edata->stack, \ DICTIONARY_OBJ(((Dictionary) { .capacity = 0, .size = 0 }))) static inline void typval_encode_list_start(EncodedData *const edata, const size_t len) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL { kv_push(edata->stack, ARRAY_OBJ(((Array) { .capacity = len, .size = 0, .items = xmalloc(len * sizeof(*((Object)OBJECT_INIT).data.array.items)), }))); } #define TYPVAL_ENCODE_CONV_LIST_START(tv, len) \ typval_encode_list_start(edata, (size_t)(len)) #define TYPVAL_ENCODE_CONV_REAL_LIST_AFTER_START(tv, mpsv) static inline void typval_encode_between_list_items(EncodedData *const edata) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL { Object item = kv_pop(edata->stack); Object *const list = &kv_last(edata->stack); assert(list->type == kObjectTypeArray); assert(list->data.array.size < list->data.array.capacity); list->data.array.items[list->data.array.size++] = item; } #define TYPVAL_ENCODE_CONV_LIST_BETWEEN_ITEMS(tv) \ typval_encode_between_list_items(edata) static inline void typval_encode_list_end(EncodedData *const edata) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL { typval_encode_between_list_items(edata); #ifndef NDEBUG const Object *const list = &kv_last(edata->stack); assert(list->data.array.size == list->data.array.capacity); #endif } #define TYPVAL_ENCODE_CONV_LIST_END(tv) \ typval_encode_list_end(edata) static inline void typval_encode_dict_start(EncodedData *const edata, const size_t len) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL { kv_push(edata->stack, DICTIONARY_OBJ(((Dictionary) { .capacity = len, .size = 0, .items = xmalloc(len * sizeof( *((Object)OBJECT_INIT).data.dictionary.items)), }))); } #define TYPVAL_ENCODE_CONV_DICT_START(tv, dict, len) \ typval_encode_dict_start(edata, (size_t)(len)) #define TYPVAL_ENCODE_CONV_REAL_DICT_AFTER_START(tv, dict, mpsv) #define TYPVAL_ENCODE_SPECIAL_DICT_KEY_CHECK(label, kv_pair) static inline void typval_encode_after_key(EncodedData *const edata) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL { Object key = kv_pop(edata->stack); Object *const dict = &kv_last(edata->stack); assert(dict->type == kObjectTypeDictionary); assert(dict->data.dictionary.size < dict->data.dictionary.capacity); if (key.type == kObjectTypeString) { dict->data.dictionary.items[dict->data.dictionary.size].key = key.data.string; } else { api_free_object(key); dict->data.dictionary.items[dict->data.dictionary.size].key = STATIC_CSTR_TO_STRING("__INVALID_KEY__"); } } #define TYPVAL_ENCODE_CONV_DICT_AFTER_KEY(tv, dict) \ typval_encode_after_key(edata) static inline void typval_encode_between_dict_items(EncodedData *const edata) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL { Object val = kv_pop(edata->stack); Object *const dict = &kv_last(edata->stack); assert(dict->type == kObjectTypeDictionary); assert(dict->data.dictionary.size < dict->data.dictionary.capacity); dict->data.dictionary.items[dict->data.dictionary.size++].value = val; } #define TYPVAL_ENCODE_CONV_DICT_BETWEEN_ITEMS(tv, dict) \ typval_encode_between_dict_items(edata) static inline void typval_encode_dict_end(EncodedData *const edata) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL { typval_encode_between_dict_items(edata); #ifndef NDEBUG const Object *const dict = &kv_last(edata->stack); assert(dict->data.dictionary.size == dict->data.dictionary.capacity); #endif } #define TYPVAL_ENCODE_CONV_DICT_END(tv, dict) \ typval_encode_dict_end(edata) #define TYPVAL_ENCODE_CONV_RECURSE(val, conv_type) \ TYPVAL_ENCODE_CONV_NIL() #define TYPVAL_ENCODE_SCOPE static #define TYPVAL_ENCODE_NAME object #define TYPVAL_ENCODE_FIRST_ARG_TYPE EncodedData *const #define TYPVAL_ENCODE_FIRST_ARG_NAME edata #include "nvim/eval/typval_encode.c.h" #undef TYPVAL_ENCODE_SCOPE #undef TYPVAL_ENCODE_NAME #undef TYPVAL_ENCODE_FIRST_ARG_TYPE #undef TYPVAL_ENCODE_FIRST_ARG_NAME #undef TYPVAL_ENCODE_CONV_STRING #undef TYPVAL_ENCODE_CONV_STR_STRING #undef TYPVAL_ENCODE_CONV_EXT_STRING #undef TYPVAL_ENCODE_CONV_NUMBER #undef TYPVAL_ENCODE_CONV_FLOAT #undef TYPVAL_ENCODE_CONV_FUNC_START #undef TYPVAL_ENCODE_CONV_FUNC_BEFORE_ARGS #undef TYPVAL_ENCODE_CONV_FUNC_BEFORE_SELF #undef TYPVAL_ENCODE_CONV_FUNC_END #undef TYPVAL_ENCODE_CONV_EMPTY_LIST #undef TYPVAL_ENCODE_CONV_LIST_START #undef TYPVAL_ENCODE_CONV_REAL_LIST_AFTER_START #undef TYPVAL_ENCODE_CONV_EMPTY_DICT #undef TYPVAL_ENCODE_CONV_NIL #undef TYPVAL_ENCODE_CONV_BOOL #undef TYPVAL_ENCODE_CONV_UNSIGNED_NUMBER #undef TYPVAL_ENCODE_CONV_DICT_START #undef TYPVAL_ENCODE_CONV_REAL_DICT_AFTER_START #undef TYPVAL_ENCODE_CONV_DICT_END #undef TYPVAL_ENCODE_CONV_DICT_AFTER_KEY #undef TYPVAL_ENCODE_CONV_DICT_BETWEEN_ITEMS #undef TYPVAL_ENCODE_SPECIAL_DICT_KEY_CHECK #undef TYPVAL_ENCODE_CONV_LIST_END #undef TYPVAL_ENCODE_CONV_LIST_BETWEEN_ITEMS #undef TYPVAL_ENCODE_CONV_RECURSE #undef TYPVAL_ENCODE_ALLOW_SPECIALS /// Convert a vim object to an `Object` instance, recursively expanding /// Arrays/Dictionaries. /// /// @param obj The source object /// @return The converted value Object vim_to_object(typval_T *obj) { EncodedData edata = { .stack = KV_INITIAL_VALUE }; const int evo_ret = encode_vim_to_object(&edata, obj, "vim_to_object argument"); (void)evo_ret; assert(evo_ret == OK); Object ret = kv_A(edata.stack, 0); assert(kv_size(edata.stack) == 1); kv_destroy(edata.stack); return ret; } buf_T *find_buffer_by_handle(Buffer buffer, Error *err) { if (buffer == 0) { return curbuf; } buf_T *rv = handle_get_buffer(buffer); if (!rv) { api_set_error(err, kErrorTypeValidation, "Invalid buffer id"); } return rv; } win_T *find_window_by_handle(Window window, Error *err) { if (window == 0) { return curwin; } win_T *rv = handle_get_window(window); if (!rv) { api_set_error(err, kErrorTypeValidation, "Invalid window id"); } return rv; } tabpage_T *find_tab_by_handle(Tabpage tabpage, Error *err) { if (tabpage == 0) { return curtab; } tabpage_T *rv = handle_get_tabpage(tabpage); if (!rv) { api_set_error(err, kErrorTypeValidation, "Invalid tabpage id"); } return rv; } /// Allocates a String consisting of a single char. Does not support multibyte /// characters. The resulting string is also NUL-terminated, to facilitate /// interoperating with code using C strings. /// /// @param char the char to convert /// @return the resulting String, if the input char was NUL, an /// empty String is returned String cchar_to_string(char c) { char buf[] = { c, NUL }; return (String) { .data = xmemdupz(buf, 1), .size = (c != NUL) ? 1 : 0 }; } /// Copies a C string into a String (binary safe string, characters + length). /// The resulting string is also NUL-terminated, to facilitate interoperating /// with code using C strings. /// /// @param str the C string to copy /// @return the resulting String, if the input string was NULL, an /// empty String is returned String cstr_to_string(const char *str) { if (str == NULL) { return (String) STRING_INIT; } size_t len = strlen(str); return (String) { .data = xmemdupz(str, len), .size = len }; } /// Copies buffer to an allocated String. /// The resulting string is also NUL-terminated, to facilitate interoperating /// with code using C strings. /// /// @param buf the buffer to copy /// @param size length of the buffer /// @return the resulting String, if the input string was NULL, an /// empty String is returned String cbuf_to_string(const char *buf, size_t size) FUNC_ATTR_NONNULL_ALL { return (String) { .data = xmemdupz(buf, size), .size = size }; } /// Creates a String using the given C string. Unlike /// cstr_to_string this function DOES NOT copy the C string. /// /// @param str the C string to use /// @return The resulting String, or an empty String if /// str was NULL String cstr_as_string(char *str) FUNC_ATTR_PURE { if (str == NULL) { return (String) STRING_INIT; } return (String) { .data = str, .size = strlen(str) }; } /// Converts from type Object to a VimL value. /// /// @param obj Object to convert from. /// @param tv Conversion result is placed here. On failure member v_type is /// set to VAR_UNKNOWN (no allocation was made for this variable). /// returns true if conversion is successful, otherwise false. bool object_to_vim(Object obj, typval_T *tv, Error *err) { tv->v_type = VAR_UNKNOWN; tv->v_lock = VAR_UNLOCKED; switch (obj.type) { case kObjectTypeNil: tv->v_type = VAR_SPECIAL; tv->vval.v_special = kSpecialVarNull; break; case kObjectTypeBoolean: tv->v_type = VAR_SPECIAL; tv->vval.v_special = obj.data.boolean? kSpecialVarTrue: kSpecialVarFalse; break; case kObjectTypeBuffer: case kObjectTypeWindow: case kObjectTypeTabpage: case kObjectTypeInteger: if (obj.data.integer > VARNUMBER_MAX || obj.data.integer < VARNUMBER_MIN) { api_set_error(err, kErrorTypeValidation, "Integer value outside range"); return false; } tv->v_type = VAR_NUMBER; tv->vval.v_number = (varnumber_T)obj.data.integer; break; case kObjectTypeFloat: tv->v_type = VAR_FLOAT; tv->vval.v_float = obj.data.floating; break; case kObjectTypeString: tv->v_type = VAR_STRING; if (obj.data.string.data == NULL) { tv->vval.v_string = NULL; } else { tv->vval.v_string = xmemdupz(obj.data.string.data, obj.data.string.size); } break; case kObjectTypeArray: { list_T *const list = tv_list_alloc(); for (uint32_t i = 0; i < obj.data.array.size; i++) { Object item = obj.data.array.items[i]; listitem_T *li = tv_list_item_alloc(); if (!object_to_vim(item, &li->li_tv, err)) { // cleanup tv_list_item_free(li); tv_list_free(list); return false; } tv_list_append(list, li); } list->lv_refcount++; tv->v_type = VAR_LIST; tv->vval.v_list = list; break; } case kObjectTypeDictionary: { dict_T *const dict = tv_dict_alloc(); for (uint32_t i = 0; i < obj.data.dictionary.size; i++) { KeyValuePair item = obj.data.dictionary.items[i]; String key = item.key; if (key.size == 0) { api_set_error(err, kErrorTypeValidation, "Empty dictionary keys aren't allowed"); // cleanup tv_dict_free(dict); return false; } dictitem_T *const di = tv_dict_item_alloc(key.data); if (!object_to_vim(item.value, &di->di_tv, err)) { // cleanup tv_dict_item_free(di); tv_dict_free(dict); return false; } tv_dict_add(dict, di); } dict->dv_refcount++; tv->v_type = VAR_DICT; tv->vval.v_dict = dict; break; } default: abort(); } return true; } void api_free_string(String value) { if (!value.data) { return; } xfree(value.data); } void api_free_object(Object value) { switch (value.type) { case kObjectTypeNil: case kObjectTypeBoolean: case kObjectTypeInteger: case kObjectTypeFloat: case kObjectTypeBuffer: case kObjectTypeWindow: case kObjectTypeTabpage: break; case kObjectTypeString: api_free_string(value.data.string); break; case kObjectTypeArray: api_free_array(value.data.array); break; case kObjectTypeDictionary: api_free_dictionary(value.data.dictionary); break; default: abort(); } } void api_free_array(Array value) { for (size_t i = 0; i < value.size; i++) { api_free_object(value.items[i]); } xfree(value.items); } void api_free_dictionary(Dictionary value) { for (size_t i = 0; i < value.size; i++) { api_free_string(value.items[i].key); api_free_object(value.items[i].value); } xfree(value.items); } void api_clear_error(Error *value) FUNC_ATTR_NONNULL_ALL { if (!ERROR_SET(value)) { return; } xfree(value->msg); value->msg = NULL; value->type = kErrorTypeNone; } Dictionary api_metadata(void) { static Dictionary metadata = ARRAY_DICT_INIT; if (!metadata.size) { PUT(metadata, "version", DICTIONARY_OBJ(version_dict())); init_function_metadata(&metadata); init_ui_event_metadata(&metadata); init_error_type_metadata(&metadata); init_type_metadata(&metadata); } return copy_object(DICTIONARY_OBJ(metadata)).data.dictionary; } static void init_function_metadata(Dictionary *metadata) { msgpack_unpacked unpacked; msgpack_unpacked_init(&unpacked); if (msgpack_unpack_next(&unpacked, (const char *)funcs_metadata, sizeof(funcs_metadata), NULL) != MSGPACK_UNPACK_SUCCESS) { abort(); } Object functions; msgpack_rpc_to_object(&unpacked.data, &functions); msgpack_unpacked_destroy(&unpacked); PUT(*metadata, "functions", functions); } static void init_ui_event_metadata(Dictionary *metadata) { msgpack_unpacked unpacked; msgpack_unpacked_init(&unpacked); if (msgpack_unpack_next(&unpacked, (const char *)ui_events_metadata, sizeof(ui_events_metadata), NULL) != MSGPACK_UNPACK_SUCCESS) { abort(); } Object ui_events; msgpack_rpc_to_object(&unpacked.data, &ui_events); msgpack_unpacked_destroy(&unpacked); PUT(*metadata, "ui_events", ui_events); } static void init_error_type_metadata(Dictionary *metadata) { Dictionary types = ARRAY_DICT_INIT; Dictionary exception_metadata = ARRAY_DICT_INIT; PUT(exception_metadata, "id", INTEGER_OBJ(kErrorTypeException)); Dictionary validation_metadata = ARRAY_DICT_INIT; PUT(validation_metadata, "id", INTEGER_OBJ(kErrorTypeValidation)); PUT(types, "Exception", DICTIONARY_OBJ(exception_metadata)); PUT(types, "Validation", DICTIONARY_OBJ(validation_metadata)); PUT(*metadata, "error_types", DICTIONARY_OBJ(types)); } static void init_type_metadata(Dictionary *metadata) { Dictionary types = ARRAY_DICT_INIT; Dictionary buffer_metadata = ARRAY_DICT_INIT; PUT(buffer_metadata, "id", INTEGER_OBJ(kObjectTypeBuffer - EXT_OBJECT_TYPE_SHIFT)); PUT(buffer_metadata, "prefix", STRING_OBJ(cstr_to_string("nvim_buf_"))); Dictionary window_metadata = ARRAY_DICT_INIT; PUT(window_metadata, "id", INTEGER_OBJ(kObjectTypeWindow - EXT_OBJECT_TYPE_SHIFT)); PUT(window_metadata, "prefix", STRING_OBJ(cstr_to_string("nvim_win_"))); Dictionary tabpage_metadata = ARRAY_DICT_INIT; PUT(tabpage_metadata, "id", INTEGER_OBJ(kObjectTypeTabpage - EXT_OBJECT_TYPE_SHIFT)); PUT(tabpage_metadata, "prefix", STRING_OBJ(cstr_to_string("nvim_tabpage_"))); PUT(types, "Buffer", DICTIONARY_OBJ(buffer_metadata)); PUT(types, "Window", DICTIONARY_OBJ(window_metadata)); PUT(types, "Tabpage", DICTIONARY_OBJ(tabpage_metadata)); PUT(*metadata, "types", DICTIONARY_OBJ(types)); } String copy_string(String str) { if (str.data != NULL) { return (String){ .data = xmemdupz(str.data, str.size), .size = str.size }; } else { return (String)STRING_INIT; } } Array copy_array(Array array) { Array rv = ARRAY_DICT_INIT; for (size_t i = 0; i < array.size; i++) { ADD(rv, copy_object(array.items[i])); } return rv; } /// Creates a deep clone of an object Object copy_object(Object obj) { switch (obj.type) { case kObjectTypeNil: case kObjectTypeBoolean: case kObjectTypeInteger: case kObjectTypeFloat: return obj; case kObjectTypeString: return STRING_OBJ(copy_string(obj.data.string)); case kObjectTypeArray: return ARRAY_OBJ(copy_array(obj.data.array)); case kObjectTypeDictionary: { Dictionary rv = ARRAY_DICT_INIT; for (size_t i = 0; i < obj.data.dictionary.size; i++) { KeyValuePair item = obj.data.dictionary.items[i]; PUT(rv, item.key.data, copy_object(item.value)); } return DICTIONARY_OBJ(rv); } default: abort(); } } static void set_option_value_for(char *key, int numval, char *stringval, int opt_flags, int opt_type, void *from, Error *err) { win_T *save_curwin = NULL; tabpage_T *save_curtab = NULL; bufref_T save_curbuf = { NULL, 0, 0 }; try_start(); switch (opt_type) { case SREQ_WIN: if (switch_win(&save_curwin, &save_curtab, (win_T *)from, win_find_tabpage((win_T *)from), false) == FAIL) { if (try_end(err)) { return; } api_set_error(err, kErrorTypeException, "Problem while switching windows"); return; } set_option_value_err(key, numval, stringval, opt_flags, err); restore_win(save_curwin, save_curtab, true); break; case SREQ_BUF: switch_buffer(&save_curbuf, (buf_T *)from); set_option_value_err(key, numval, stringval, opt_flags, err); restore_buffer(&save_curbuf); break; case SREQ_GLOBAL: set_option_value_err(key, numval, stringval, opt_flags, err); break; } if (ERROR_SET(err)) { return; } try_end(err); } static void set_option_value_err(char *key, int numval, char *stringval, int opt_flags, Error *err) { char *errmsg; if ((errmsg = set_option_value(key, numval, stringval, opt_flags))) { if (try_end(err)) { return; } api_set_error(err, kErrorTypeException, "%s", errmsg); } } void api_set_error(Error *err, ErrorType errType, const char *format, ...) FUNC_ATTR_NONNULL_ALL { assert(kErrorTypeNone != errType); va_list args1; va_list args2; va_start(args1, format); va_copy(args2, args1); int len = vsnprintf(NULL, 0, format, args1); va_end(args1); assert(len >= 0); // Limit error message to 1 MB. size_t bufsize = MIN((size_t)len + 1, 1024 * 1024); err->msg = xmalloc(bufsize); vsnprintf(err->msg, bufsize, format, args2); va_end(args2); err->type = errType; } /// Get an array containing dictionaries describing mappings /// based on mode and buffer id /// /// @param mode The abbreviation for the mode /// @param buf The buffer to get the mapping array. NULL for global /// @returns An array of maparg() like dictionaries describing mappings ArrayOf(Dictionary) keymap_array(String mode, buf_T *buf) { Array mappings = ARRAY_DICT_INIT; dict_T *const dict = tv_dict_alloc(); // Convert the string mode to the integer mode // that is stored within each mapblock char_u *p = (char_u *)mode.data; int int_mode = get_map_mode(&p, 0); // Determine the desired buffer value long buffer_value = (buf == NULL) ? 0 : buf->handle; for (int i = 0; i < MAX_MAPHASH; i++) { for (const mapblock_T *current_maphash = get_maphash(i, buf); current_maphash; current_maphash = current_maphash->m_next) { // Check for correct mode if (int_mode & current_maphash->m_mode) { mapblock_fill_dict(dict, current_maphash, buffer_value, false); ADD(mappings, vim_to_object( (typval_T[]) { { .v_type = VAR_DICT, .vval.v_dict = dict } })); tv_dict_clear(dict); } } } tv_dict_free(dict); return mappings; } neovim-0.2.2/src/nvim/api/private/helpers.h000066400000000000000000000053001320401574200206020ustar00rootroot00000000000000#ifndef NVIM_API_PRIVATE_HELPERS_H #define NVIM_API_PRIVATE_HELPERS_H #include #include "nvim/api/private/defs.h" #include "nvim/vim.h" #include "nvim/memory.h" #include "nvim/ex_eval.h" #include "nvim/lib/kvec.h" #define OBJECT_OBJ(o) o #define BOOLEAN_OBJ(b) ((Object) { \ .type = kObjectTypeBoolean, \ .data.boolean = b }) #define INTEGER_OBJ(i) ((Object) { \ .type = kObjectTypeInteger, \ .data.integer = i }) #define FLOAT_OBJ(f) ((Object) { \ .type = kObjectTypeFloat, \ .data.floating = f }) #define STRING_OBJ(s) ((Object) { \ .type = kObjectTypeString, \ .data.string = s }) #define BUFFER_OBJ(s) ((Object) { \ .type = kObjectTypeBuffer, \ .data.integer = s }) #define WINDOW_OBJ(s) ((Object) { \ .type = kObjectTypeWindow, \ .data.integer = s }) #define TABPAGE_OBJ(s) ((Object) { \ .type = kObjectTypeTabpage, \ .data.integer = s }) #define ARRAY_OBJ(a) ((Object) { \ .type = kObjectTypeArray, \ .data.array = a }) #define DICTIONARY_OBJ(d) ((Object) { \ .type = kObjectTypeDictionary, \ .data.dictionary = d }) #define NIL ((Object) {.type = kObjectTypeNil}) #define PUT(dict, k, v) \ kv_push(dict, ((KeyValuePair) { .key = cstr_to_string(k), .value = v })) #define ADD(array, item) \ kv_push(array, item) #define STATIC_CSTR_AS_STRING(s) ((String) {.data = s, .size = sizeof(s) - 1}) /// Create a new String instance, putting data in allocated memory /// /// @param[in] s String to work with. Must be a string literal. #define STATIC_CSTR_TO_STRING(s) ((String){ \ .data = xmemdupz(s, sizeof(s) - 1), \ .size = sizeof(s) - 1 }) // Helpers used by the generated msgpack-rpc api wrappers #define api_init_boolean #define api_init_integer #define api_init_float #define api_init_string = STRING_INIT #define api_init_buffer #define api_init_window #define api_init_tabpage #define api_init_object = NIL #define api_init_array = ARRAY_DICT_INIT #define api_init_dictionary = ARRAY_DICT_INIT #define api_free_boolean(value) #define api_free_integer(value) #define api_free_float(value) #define api_free_buffer(value) #define api_free_window(value) #define api_free_tabpage(value) /// Structure used for saving state for :try /// /// Used when caller is supposed to be operating when other VimL code is being /// processed and that “other VimL code” must not be affected. typedef struct { except_T *current_exception; struct msglist *private_msg_list; const struct msglist *const *msg_list; int trylevel; int got_int; int did_throw; int need_rethrow; int did_emsg; } TryState; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/private/helpers.h.generated.h" #endif #endif // NVIM_API_PRIVATE_HELPERS_H neovim-0.2.2/src/nvim/api/tabpage.c000066400000000000000000000112021320401574200170620ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include #include #include #include "nvim/api/tabpage.h" #include "nvim/api/vim.h" #include "nvim/api/private/defs.h" #include "nvim/api/private/helpers.h" #include "nvim/memory.h" #include "nvim/window.h" /// Gets the windows in a tabpage /// /// @param tabpage Tabpage /// @param[out] err Error details, if any /// @return List of windows in `tabpage` ArrayOf(Window) nvim_tabpage_list_wins(Tabpage tabpage, Error *err) FUNC_API_SINCE(1) { Array rv = ARRAY_DICT_INIT; tabpage_T *tab = find_tab_by_handle(tabpage, err); if (!tab || !valid_tabpage(tab)) { return rv; } FOR_ALL_WINDOWS_IN_TAB(wp, tab) { rv.size++; } rv.items = xmalloc(sizeof(Object) * rv.size); size_t i = 0; FOR_ALL_WINDOWS_IN_TAB(wp, tab) { rv.items[i++] = WINDOW_OBJ(wp->handle); } return rv; } /// Gets a tab-scoped (t:) variable /// /// @param tabpage Tabpage handle /// @param name Variable name /// @param[out] err Error details, if any /// @return Variable value Object nvim_tabpage_get_var(Tabpage tabpage, String name, Error *err) FUNC_API_SINCE(1) { tabpage_T *tab = find_tab_by_handle(tabpage, err); if (!tab) { return (Object) OBJECT_INIT; } return dict_get_value(tab->tp_vars, name, err); } /// Sets a tab-scoped (t:) variable /// /// @param tabpage Tabpage handle /// @param name Variable name /// @param value Variable value /// @param[out] err Error details, if any void nvim_tabpage_set_var(Tabpage tabpage, String name, Object value, Error *err) FUNC_API_SINCE(1) { tabpage_T *tab = find_tab_by_handle(tabpage, err); if (!tab) { return; } dict_set_var(tab->tp_vars, name, value, false, false, err); } /// Removes a tab-scoped (t:) variable /// /// @param tabpage Tabpage handle /// @param name Variable name /// @param[out] err Error details, if any void nvim_tabpage_del_var(Tabpage tabpage, String name, Error *err) FUNC_API_SINCE(1) { tabpage_T *tab = find_tab_by_handle(tabpage, err); if (!tab) { return; } dict_set_var(tab->tp_vars, name, NIL, true, false, err); } /// Sets a tab-scoped (t:) variable /// /// @deprecated /// /// @param tabpage Tabpage handle /// @param name Variable name /// @param value Variable value /// @param[out] err Error details, if any /// @return Old value or nil if there was no previous value. /// /// @warning It may return nil if there was no previous value /// or if previous value was `v:null`. Object tabpage_set_var(Tabpage tabpage, String name, Object value, Error *err) { tabpage_T *tab = find_tab_by_handle(tabpage, err); if (!tab) { return (Object) OBJECT_INIT; } return dict_set_var(tab->tp_vars, name, value, false, true, err); } /// Removes a tab-scoped (t:) variable /// /// @deprecated /// /// @param tabpage Tabpage handle /// @param name Variable name /// @param[out] err Error details, if any /// @return Old value Object tabpage_del_var(Tabpage tabpage, String name, Error *err) { tabpage_T *tab = find_tab_by_handle(tabpage, err); if (!tab) { return (Object) OBJECT_INIT; } return dict_set_var(tab->tp_vars, name, NIL, true, true, err); } /// Gets the current window in a tabpage /// /// @param tabpage Tabpage handle /// @param[out] err Error details, if any /// @return Window handle Window nvim_tabpage_get_win(Tabpage tabpage, Error *err) FUNC_API_SINCE(1) { Window rv = 0; tabpage_T *tab = find_tab_by_handle(tabpage, err); if (!tab || !valid_tabpage(tab)) { return rv; } if (tab == curtab) { return nvim_get_current_win(); } else { FOR_ALL_WINDOWS_IN_TAB(wp, tab) { if (wp == tab->tp_curwin) { return wp->handle; } } // There should always be a current window for a tabpage abort(); } } /// Gets the tabpage number /// /// @param tabpage Tabpage handle /// @param[out] err Error details, if any /// @return Tabpage number Integer nvim_tabpage_get_number(Tabpage tabpage, Error *err) FUNC_API_SINCE(1) { Integer rv = 0; tabpage_T *tab = find_tab_by_handle(tabpage, err); if (!tab) { return rv; } return tabpage_index(tab); } /// Checks if a tabpage is valid /// /// @param tabpage Tabpage handle /// @return true if the tabpage is valid, false otherwise Boolean nvim_tabpage_is_valid(Tabpage tabpage) FUNC_API_SINCE(1) { Error stub = ERROR_INIT; Boolean ret = find_tab_by_handle(tabpage, &stub) != NULL; api_clear_error(&stub); return ret; } neovim-0.2.2/src/nvim/api/tabpage.h000066400000000000000000000003411320401574200170710ustar00rootroot00000000000000#ifndef NVIM_API_TABPAGE_H #define NVIM_API_TABPAGE_H #include #include "nvim/api/private/defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/tabpage.h.generated.h" #endif #endif // NVIM_API_TABPAGE_H neovim-0.2.2/src/nvim/api/ui.c000066400000000000000000000170231320401574200161030ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include #include #include #include #include "nvim/vim.h" #include "nvim/ui.h" #include "nvim/memory.h" #include "nvim/map.h" #include "nvim/msgpack_rpc/channel.h" #include "nvim/api/ui.h" #include "nvim/api/private/defs.h" #include "nvim/api/private/helpers.h" #include "nvim/popupmnu.h" #include "nvim/cursor_shape.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/ui.c.generated.h" # include "ui_events_remote.generated.h" #endif typedef struct { uint64_t channel_id; Array buffer; } UIData; static PMap(uint64_t) *connected_uis = NULL; void remote_ui_init(void) FUNC_API_NOEXPORT { connected_uis = pmap_new(uint64_t)(); } void remote_ui_disconnect(uint64_t channel_id) FUNC_API_NOEXPORT { UI *ui = pmap_get(uint64_t)(connected_uis, channel_id); if (!ui) { return; } UIData *data = ui->data; // destroy pending screen updates api_free_array(data->buffer); pmap_del(uint64_t)(connected_uis, channel_id); xfree(ui->data); ui_detach_impl(ui); xfree(ui); } void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height, Dictionary options, Error *err) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY { if (pmap_has(uint64_t)(connected_uis, channel_id)) { api_set_error(err, kErrorTypeException, "UI already attached for channel"); return; } if (width <= 0 || height <= 0) { api_set_error(err, kErrorTypeValidation, "Expected width > 0 and height > 0"); return; } UI *ui = xcalloc(1, sizeof(UI)); ui->width = (int)width; ui->height = (int)height; ui->rgb = true; ui->resize = remote_ui_resize; ui->clear = remote_ui_clear; ui->eol_clear = remote_ui_eol_clear; ui->cursor_goto = remote_ui_cursor_goto; ui->mode_info_set = remote_ui_mode_info_set; ui->update_menu = remote_ui_update_menu; ui->busy_start = remote_ui_busy_start; ui->busy_stop = remote_ui_busy_stop; ui->mouse_on = remote_ui_mouse_on; ui->mouse_off = remote_ui_mouse_off; ui->mode_change = remote_ui_mode_change; ui->set_scroll_region = remote_ui_set_scroll_region; ui->scroll = remote_ui_scroll; ui->highlight_set = remote_ui_highlight_set; ui->put = remote_ui_put; ui->bell = remote_ui_bell; ui->visual_bell = remote_ui_visual_bell; ui->update_fg = remote_ui_update_fg; ui->update_bg = remote_ui_update_bg; ui->update_sp = remote_ui_update_sp; ui->flush = remote_ui_flush; ui->suspend = remote_ui_suspend; ui->set_title = remote_ui_set_title; ui->set_icon = remote_ui_set_icon; ui->event = remote_ui_event; memset(ui->ui_ext, 0, sizeof(ui->ui_ext)); for (size_t i = 0; i < options.size; i++) { ui_set_option(ui, options.items[i].key, options.items[i].value, err); if (ERROR_SET(err)) { xfree(ui); return; } } UIData *data = xmalloc(sizeof(UIData)); data->channel_id = channel_id; data->buffer = (Array)ARRAY_DICT_INIT; ui->data = data; pmap_put(uint64_t)(connected_uis, channel_id, ui); ui_attach_impl(ui); } /// @deprecated void ui_attach(uint64_t channel_id, Integer width, Integer height, Boolean enable_rgb, Error *err) { Dictionary opts = ARRAY_DICT_INIT; PUT(opts, "rgb", BOOLEAN_OBJ(enable_rgb)); nvim_ui_attach(channel_id, width, height, opts, err); api_free_dictionary(opts); } void nvim_ui_detach(uint64_t channel_id, Error *err) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY { if (!pmap_has(uint64_t)(connected_uis, channel_id)) { api_set_error(err, kErrorTypeException, "UI is not attached for channel"); return; } remote_ui_disconnect(channel_id); } void nvim_ui_try_resize(uint64_t channel_id, Integer width, Integer height, Error *err) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY { if (!pmap_has(uint64_t)(connected_uis, channel_id)) { api_set_error(err, kErrorTypeException, "UI is not attached for channel"); return; } if (width <= 0 || height <= 0) { api_set_error(err, kErrorTypeValidation, "Expected width > 0 and height > 0"); return; } UI *ui = pmap_get(uint64_t)(connected_uis, channel_id); ui->width = (int)width; ui->height = (int)height; ui_refresh(); } void nvim_ui_set_option(uint64_t channel_id, String name, Object value, Error *error) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY { if (!pmap_has(uint64_t)(connected_uis, channel_id)) { api_set_error(error, kErrorTypeException, "UI is not attached for channel"); return; } UI *ui = pmap_get(uint64_t)(connected_uis, channel_id); ui_set_option(ui, name, value, error); if (!ERROR_SET(error)) { ui_refresh(); } } static void ui_set_option(UI *ui, String name, Object value, Error *error) { #define UI_EXT_OPTION(o, e) \ do { \ if (strequal(name.data, #o)) { \ if (value.type != kObjectTypeBoolean) { \ api_set_error(error, kErrorTypeValidation, #o " must be a Boolean"); \ return; \ } \ ui->ui_ext[(e)] = value.data.boolean; \ return; \ } \ } while (0) if (strequal(name.data, "rgb")) { if (value.type != kObjectTypeBoolean) { api_set_error(error, kErrorTypeValidation, "rgb must be a Boolean"); return; } ui->rgb = value.data.boolean; return; } UI_EXT_OPTION(ext_cmdline, kUICmdline); UI_EXT_OPTION(ext_popupmenu, kUIPopupmenu); UI_EXT_OPTION(ext_tabline, kUITabline); UI_EXT_OPTION(ext_wildmenu, kUIWildmenu); if (strequal(name.data, "popupmenu_external")) { // LEGACY: Deprecated option, use `ui_ext` instead. if (value.type != kObjectTypeBoolean) { api_set_error(error, kErrorTypeValidation, "popupmenu_external must be a Boolean"); return; } ui->ui_ext[kUIPopupmenu] = value.data.boolean; return; } api_set_error(error, kErrorTypeValidation, "No such ui option"); #undef UI_EXT_OPTION } /// Pushes data into UI.UIData, to be consumed later by remote_ui_flush(). static void push_call(UI *ui, char *name, Array args) { Array call = ARRAY_DICT_INIT; UIData *data = ui->data; // To optimize data transfer(especially for "put"), we bundle adjacent // calls to same method together, so only add a new call entry if the last // method call is different from "name" if (kv_size(data->buffer)) { call = kv_A(data->buffer, kv_size(data->buffer) - 1).data.array; } if (!kv_size(call) || strcmp(kv_A(call, 0).data.string.data, name)) { call = (Array)ARRAY_DICT_INIT; ADD(data->buffer, ARRAY_OBJ(call)); ADD(call, STRING_OBJ(cstr_to_string(name))); } ADD(call, ARRAY_OBJ(args)); kv_A(data->buffer, kv_size(data->buffer) - 1).data.array = call; } static void remote_ui_highlight_set(UI *ui, HlAttrs attrs) { Array args = ARRAY_DICT_INIT; Dictionary hl = hlattrs2dict(attrs); ADD(args, DICTIONARY_OBJ(hl)); push_call(ui, "highlight_set", args); } static void remote_ui_flush(UI *ui) { UIData *data = ui->data; if (data->buffer.size > 0) { channel_send_event(data->channel_id, "redraw", data->buffer); data->buffer = (Array)ARRAY_DICT_INIT; } } static void remote_ui_event(UI *ui, char *name, Array args, bool *args_consumed) { Array my_args = ARRAY_DICT_INIT; // Objects are currently single-reference // make a copy, but only if necessary if (*args_consumed) { for (size_t i = 0; i < args.size; i++) { ADD(my_args, copy_object(args.items[i])); } } else { my_args = args; *args_consumed = true; } push_call(ui, name, my_args); } neovim-0.2.2/src/nvim/api/ui.h000066400000000000000000000003151320401574200161040ustar00rootroot00000000000000#ifndef NVIM_API_UI_H #define NVIM_API_UI_H #include #include "nvim/api/private/defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/ui.h.generated.h" #endif #endif // NVIM_API_UI_H neovim-0.2.2/src/nvim/api/ui_events.in.h000066400000000000000000000055141320401574200201030ustar00rootroot00000000000000#ifndef NVIM_API_UI_EVENTS_IN_H #define NVIM_API_UI_EVENTS_IN_H // This file is not compiled, just parsed for definitons #ifdef INCLUDE_GENERATED_DECLARATIONS # error "don't include this file, include nvim/ui.h" #endif #include "nvim/api/private/defs.h" #include "nvim/func_attr.h" #include "nvim/ui.h" void resize(Integer rows, Integer columns) FUNC_API_SINCE(3); void clear(void) FUNC_API_SINCE(3); void eol_clear(void) FUNC_API_SINCE(3); void cursor_goto(Integer row, Integer col) FUNC_API_SINCE(3); void mode_info_set(Boolean enabled, Array cursor_styles) FUNC_API_SINCE(3); void update_menu(void) FUNC_API_SINCE(3); void busy_start(void) FUNC_API_SINCE(3); void busy_stop(void) FUNC_API_SINCE(3); void mouse_on(void) FUNC_API_SINCE(3); void mouse_off(void) FUNC_API_SINCE(3); void mode_change(String mode, Integer mode_idx) FUNC_API_SINCE(3); void set_scroll_region(Integer top, Integer bot, Integer left, Integer right) FUNC_API_SINCE(3); void scroll(Integer count) FUNC_API_SINCE(3); void highlight_set(HlAttrs attrs) FUNC_API_SINCE(3) FUNC_API_REMOTE_IMPL FUNC_API_BRIDGE_IMPL; void put(String str) FUNC_API_SINCE(3); void bell(void) FUNC_API_SINCE(3); void visual_bell(void) FUNC_API_SINCE(3); void flush(void) FUNC_API_SINCE(3) FUNC_API_REMOTE_IMPL; void update_fg(Integer fg) FUNC_API_SINCE(3); void update_bg(Integer bg) FUNC_API_SINCE(3); void update_sp(Integer sp) FUNC_API_SINCE(3); void suspend(void) FUNC_API_SINCE(3) FUNC_API_BRIDGE_IMPL; void set_title(String title) FUNC_API_SINCE(3); void set_icon(String icon) FUNC_API_SINCE(3); void popupmenu_show(Array items, Integer selected, Integer row, Integer col) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void popupmenu_hide(void) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void popupmenu_select(Integer selected) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void tabline_update(Tabpage current, Array tabs) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void cmdline_show(Array content, Integer pos, String firstc, String prompt, Integer indent, Integer level) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void cmdline_pos(Integer pos, Integer level) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void cmdline_special_char(String c, Boolean shift, Integer level) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void cmdline_hide(Integer level) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void cmdline_block_show(Array lines) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void cmdline_block_append(Array lines) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void cmdline_block_hide(void) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void wildmenu_show(Array items) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void wildmenu_select(Integer selected) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; void wildmenu_hide(void) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY; #endif // NVIM_API_UI_EVENTS_IN_H neovim-0.2.2/src/nvim/api/vim.c000066400000000000000000000621401320401574200162610ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include #include #include #include #include #include #include #include "nvim/api/vim.h" #include "nvim/ascii.h" #include "nvim/api/private/helpers.h" #include "nvim/api/private/defs.h" #include "nvim/api/private/dispatch.h" #include "nvim/api/buffer.h" #include "nvim/msgpack_rpc/channel.h" #include "nvim/lua/executor.h" #include "nvim/vim.h" #include "nvim/buffer.h" #include "nvim/file_search.h" #include "nvim/window.h" #include "nvim/types.h" #include "nvim/ex_docmd.h" #include "nvim/screen.h" #include "nvim/memory.h" #include "nvim/message.h" #include "nvim/eval.h" #include "nvim/eval/typval.h" #include "nvim/option.h" #include "nvim/state.h" #include "nvim/syntax.h" #include "nvim/getchar.h" #include "nvim/os/input.h" #define LINE_BUFFER_SIZE 4096 #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/vim.c.generated.h" #endif /// Executes an ex-command. /// On VimL error: Returns the VimL error; v:errmsg is not updated. /// /// @param command Ex-command string /// @param[out] err Error details (including actual VimL error), if any void nvim_command(String command, Error *err) FUNC_API_SINCE(1) { // Run the command try_start(); do_cmdline_cmd(command.data); update_screen(VALID); try_end(err); } /// Gets a highlight definition by name. /// /// @param name Highlight group name /// @param rgb Export RGB colors /// @param[out] err Error details, if any /// @return Highlight definition map /// @see nvim_get_hl_by_id Dictionary nvim_get_hl_by_name(String name, Boolean rgb, Error *err) FUNC_API_SINCE(3) { Dictionary result = ARRAY_DICT_INIT; int id = syn_name2id((const char_u *)name.data); if (id == 0) { api_set_error(err, kErrorTypeException, "Invalid highlight name: %s", name.data); return result; } result = nvim_get_hl_by_id(id, rgb, err); return result; } /// Gets a highlight definition by id. |hlID()| /// /// @param hl_id Highlight id as returned by |hlID()| /// @param rgb Export RGB colors /// @param[out] err Error details, if any /// @return Highlight definition map /// @see nvim_get_hl_by_name Dictionary nvim_get_hl_by_id(Integer hl_id, Boolean rgb, Error *err) FUNC_API_SINCE(3) { Dictionary dic = ARRAY_DICT_INIT; if (syn_get_final_id((int)hl_id) == 0) { api_set_error(err, kErrorTypeException, "Invalid highlight id: %" PRId64, hl_id); return dic; } int attrcode = syn_id2attr((int)hl_id); return hl_get_attr_by_id(attrcode, rgb, err); } /// Passes input keys to Nvim. /// On VimL error: Does not fail, but updates v:errmsg. /// /// @param keys to be typed /// @param mode mapping options /// @param escape_csi If true, escape K_SPECIAL/CSI bytes in `keys` /// @see feedkeys() /// @see vim_strsave_escape_csi void nvim_feedkeys(String keys, String mode, Boolean escape_csi) FUNC_API_SINCE(1) { bool remap = true; bool insert = false; bool typed = false; bool execute = false; bool dangerous = false; for (size_t i = 0; i < mode.size; ++i) { switch (mode.data[i]) { case 'n': remap = false; break; case 'm': remap = true; break; case 't': typed = true; break; case 'i': insert = true; break; case 'x': execute = true; break; case '!': dangerous = true; break; } } if (keys.size == 0 && !execute) { return; } char *keys_esc; if (escape_csi) { // Need to escape K_SPECIAL and CSI before putting the string in the // typeahead buffer. keys_esc = (char *)vim_strsave_escape_csi((char_u *)keys.data); } else { keys_esc = keys.data; } ins_typebuf((char_u *)keys_esc, (remap ? REMAP_YES : REMAP_NONE), insert ? 0 : typebuf.tb_len, !typed, false); if (escape_csi) { xfree(keys_esc); } if (vgetc_busy) { typebuf_was_filled = true; } if (execute) { int save_msg_scroll = msg_scroll; /* Avoid a 1 second delay when the keys start Insert mode. */ msg_scroll = false; if (!dangerous) { ex_normal_busy++; } exec_normal(true); if (!dangerous) { ex_normal_busy--; } msg_scroll |= save_msg_scroll; } } /// Passes keys to Nvim as raw user-input. /// On VimL error: Does not fail, but updates v:errmsg. /// /// Unlike `nvim_feedkeys`, this uses a lower-level input buffer and the call /// is not deferred. This is the most reliable way to send real user input. /// /// @note |keycodes| like are translated, so "<" is special. /// To input a literal "<", send . /// /// @param keys to be typed /// @return Number of bytes actually written (can be fewer than /// requested if the buffer becomes full). Integer nvim_input(String keys) FUNC_API_SINCE(1) FUNC_API_ASYNC { return (Integer)input_enqueue(keys); } /// Replaces terminal codes and |keycodes| (, , ...) in a string with /// the internal representation. /// /// @param str String to be converted. /// @param from_part Legacy Vim parameter. Usually true. /// @param do_lt Also translate . Ignored if `special` is false. /// @param special Replace |keycodes|, e.g. becomes a "\n" char. /// @see replace_termcodes /// @see cpoptions String nvim_replace_termcodes(String str, Boolean from_part, Boolean do_lt, Boolean special) FUNC_API_SINCE(1) { if (str.size == 0) { // Empty string return (String) { .data = NULL, .size = 0 }; } char *ptr = NULL; replace_termcodes((char_u *)str.data, str.size, (char_u **)&ptr, from_part, do_lt, special, CPO_TO_CPO_FLAGS); return cstr_as_string(ptr); } String nvim_command_output(String str, Error *err) FUNC_API_SINCE(1) { do_cmdline_cmd("redir => v:command_output"); nvim_command(str, err); do_cmdline_cmd("redir END"); if (ERROR_SET(err)) { return (String)STRING_INIT; } return cstr_to_string((char *)get_vim_var_str(VV_COMMAND_OUTPUT)); } /// Evaluates a VimL expression (:help expression). /// Dictionaries and Lists are recursively expanded. /// On VimL error: Returns a generic error; v:errmsg is not updated. /// /// @param expr VimL expression string /// @param[out] err Error details, if any /// @return Evaluation result or expanded object Object nvim_eval(String expr, Error *err) FUNC_API_SINCE(1) { Object rv = OBJECT_INIT; // Evaluate the expression try_start(); typval_T rettv; if (eval0((char_u *)expr.data, &rettv, NULL, true) == FAIL) { api_set_error(err, kErrorTypeException, "Failed to evaluate expression"); } if (!try_end(err)) { // No errors, convert the result rv = vim_to_object(&rettv); } // Free the Vim object tv_clear(&rettv); return rv; } /// Calls a VimL function with the given arguments /// /// On VimL error: Returns a generic error; v:errmsg is not updated. /// /// @param fname Function to call /// @param args Function arguments packed in an Array /// @param[out] err Error details, if any /// @return Result of the function call Object nvim_call_function(String fname, Array args, Error *err) FUNC_API_SINCE(1) { Object rv = OBJECT_INIT; if (args.size > MAX_FUNC_ARGS) { api_set_error(err, kErrorTypeValidation, "Function called with too many arguments."); return rv; } // Convert the arguments in args from Object to typval_T values typval_T vim_args[MAX_FUNC_ARGS + 1]; size_t i = 0; // also used for freeing the variables for (; i < args.size; i++) { if (!object_to_vim(args.items[i], &vim_args[i], err)) { goto free_vim_args; } } try_start(); // Call the function typval_T rettv; int dummy; int r = call_func((char_u *)fname.data, (int)fname.size, &rettv, (int)args.size, vim_args, NULL, curwin->w_cursor.lnum, curwin->w_cursor.lnum, &dummy, true, NULL, NULL); if (r == FAIL) { api_set_error(err, kErrorTypeException, "Error calling function."); } if (!try_end(err)) { rv = vim_to_object(&rettv); } tv_clear(&rettv); free_vim_args: while (i > 0) { tv_clear(&vim_args[--i]); } return rv; } /// Execute lua code. Parameters (if any) are available as `...` inside the /// chunk. The chunk can return a value. /// /// Only statements are executed. To evaluate an expression, prefix it /// with `return`: return my_function(...) /// /// @param code lua code to execute /// @param args Arguments to the code /// @param[out] err Details of an error encountered while parsing /// or executing the lua code. /// /// @return Return value of lua code if present or NIL. Object nvim_execute_lua(String code, Array args, Error *err) FUNC_API_SINCE(3) FUNC_API_REMOTE_ONLY { return executor_exec_lua_api(code, args, err); } /// Calculates the number of display cells occupied by `text`. /// counts as one cell. /// /// @param text Some text /// @param[out] err Error details, if any /// @return Number of cells Integer nvim_strwidth(String text, Error *err) FUNC_API_SINCE(1) { if (text.size > INT_MAX) { api_set_error(err, kErrorTypeValidation, "String length is too high"); return 0; } return (Integer)mb_string2cells((char_u *)text.data); } /// Gets the paths contained in 'runtimepath'. /// /// @return List of paths ArrayOf(String) nvim_list_runtime_paths(void) FUNC_API_SINCE(1) { Array rv = ARRAY_DICT_INIT; char_u *rtp = p_rtp; if (*rtp == NUL) { // No paths return rv; } // Count the number of paths in rtp while (*rtp != NUL) { if (*rtp == ',') { rv.size++; } rtp++; } rv.size++; // Allocate memory for the copies rv.items = xmalloc(sizeof(*rv.items) * rv.size); // Reset the position rtp = p_rtp; // Start copying for (size_t i = 0; i < rv.size; i++) { rv.items[i].type = kObjectTypeString; rv.items[i].data.string.data = xmalloc(MAXPATHL); // Copy the path from 'runtimepath' to rv.items[i] size_t length = copy_option_part(&rtp, (char_u *)rv.items[i].data.string.data, MAXPATHL, ","); rv.items[i].data.string.size = length; } return rv; } /// Changes the global working directory. /// /// @param dir Directory path /// @param[out] err Error details, if any void nvim_set_current_dir(String dir, Error *err) FUNC_API_SINCE(1) { if (dir.size >= MAXPATHL) { api_set_error(err, kErrorTypeValidation, "Directory string is too long"); return; } char string[MAXPATHL]; memcpy(string, dir.data, dir.size); string[dir.size] = NUL; try_start(); if (vim_chdir((char_u *)string, kCdScopeGlobal)) { if (!try_end(err)) { api_set_error(err, kErrorTypeException, "Failed to change directory"); } return; } post_chdir(kCdScopeGlobal); try_end(err); } /// Gets the current line /// /// @param[out] err Error details, if any /// @return Current line string String nvim_get_current_line(Error *err) FUNC_API_SINCE(1) { return buffer_get_line(curbuf->handle, curwin->w_cursor.lnum - 1, err); } /// Sets the current line /// /// @param line Line contents /// @param[out] err Error details, if any void nvim_set_current_line(String line, Error *err) FUNC_API_SINCE(1) { buffer_set_line(curbuf->handle, curwin->w_cursor.lnum - 1, line, err); } /// Deletes the current line /// /// @param[out] err Error details, if any void nvim_del_current_line(Error *err) FUNC_API_SINCE(1) { buffer_del_line(curbuf->handle, curwin->w_cursor.lnum - 1, err); } /// Gets a global (g:) variable /// /// @param name Variable name /// @param[out] err Error details, if any /// @return Variable value Object nvim_get_var(String name, Error *err) FUNC_API_SINCE(1) { return dict_get_value(&globvardict, name, err); } /// Sets a global (g:) variable /// /// @param name Variable name /// @param value Variable value /// @param[out] err Error details, if any void nvim_set_var(String name, Object value, Error *err) FUNC_API_SINCE(1) { dict_set_var(&globvardict, name, value, false, false, err); } /// Removes a global (g:) variable /// /// @param name Variable name /// @param[out] err Error details, if any void nvim_del_var(String name, Error *err) FUNC_API_SINCE(1) { dict_set_var(&globvardict, name, NIL, true, false, err); } /// @deprecated /// @see nvim_set_var /// @return Old value or nil if there was no previous value. /// @warning May return nil if there was no previous value /// OR if previous value was `v:null`. Object vim_set_var(String name, Object value, Error *err) { return dict_set_var(&globvardict, name, value, false, true, err); } /// @deprecated /// @see nvim_del_var Object vim_del_var(String name, Error *err) { return dict_set_var(&globvardict, name, NIL, true, true, err); } /// Gets a v: variable /// /// @param name Variable name /// @param[out] err Error details, if any /// @return Variable value Object nvim_get_vvar(String name, Error *err) FUNC_API_SINCE(1) { return dict_get_value(&vimvardict, name, err); } /// Gets an option value string /// /// @param name Option name /// @param[out] err Error details, if any /// @return Option value (global) Object nvim_get_option(String name, Error *err) FUNC_API_SINCE(1) { return get_option_from(NULL, SREQ_GLOBAL, name, err); } /// Sets an option value /// /// @param name Option name /// @param value New option value /// @param[out] err Error details, if any void nvim_set_option(String name, Object value, Error *err) FUNC_API_SINCE(1) { set_option_to(NULL, SREQ_GLOBAL, name, value, err); } /// Writes a message to the Vim output buffer. Does not append "\n", the /// message is buffered (won't display) until a linefeed is written. /// /// @param str Message void nvim_out_write(String str) FUNC_API_SINCE(1) { write_msg(str, false); } /// Writes a message to the Vim error buffer. Does not append "\n", the /// message is buffered (won't display) until a linefeed is written. /// /// @param str Message void nvim_err_write(String str) FUNC_API_SINCE(1) { write_msg(str, true); } /// Writes a message to the Vim error buffer. Appends "\n", so the buffer is /// flushed (and displayed). /// /// @param str Message /// @see nvim_err_write() void nvim_err_writeln(String str) FUNC_API_SINCE(1) { nvim_err_write(str); nvim_err_write((String) { .data = "\n", .size = 1 }); } /// Gets the current list of buffer handles /// /// @return List of buffer handles ArrayOf(Buffer) nvim_list_bufs(void) FUNC_API_SINCE(1) { Array rv = ARRAY_DICT_INIT; FOR_ALL_BUFFERS(b) { rv.size++; } rv.items = xmalloc(sizeof(Object) * rv.size); size_t i = 0; FOR_ALL_BUFFERS(b) { rv.items[i++] = BUFFER_OBJ(b->handle); } return rv; } /// Gets the current buffer /// /// @return Buffer handle Buffer nvim_get_current_buf(void) FUNC_API_SINCE(1) { return curbuf->handle; } /// Sets the current buffer /// /// @param buffer Buffer handle /// @param[out] err Error details, if any void nvim_set_current_buf(Buffer buffer, Error *err) FUNC_API_SINCE(1) { buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { return; } try_start(); int result = do_buffer(DOBUF_GOTO, DOBUF_FIRST, FORWARD, buf->b_fnum, 0); if (!try_end(err) && result == FAIL) { api_set_error(err, kErrorTypeException, "Failed to switch to buffer %d", buffer); } } /// Gets the current list of window handles /// /// @return List of window handles ArrayOf(Window) nvim_list_wins(void) FUNC_API_SINCE(1) { Array rv = ARRAY_DICT_INIT; FOR_ALL_TAB_WINDOWS(tp, wp) { rv.size++; } rv.items = xmalloc(sizeof(Object) * rv.size); size_t i = 0; FOR_ALL_TAB_WINDOWS(tp, wp) { rv.items[i++] = WINDOW_OBJ(wp->handle); } return rv; } /// Gets the current window /// /// @return Window handle Window nvim_get_current_win(void) FUNC_API_SINCE(1) { return curwin->handle; } /// Sets the current window /// /// @param window Window handle void nvim_set_current_win(Window window, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return; } try_start(); goto_tabpage_win(win_find_tabpage(win), win); if (!try_end(err) && win != curwin) { api_set_error(err, kErrorTypeException, "Failed to switch to window %d", window); } } /// Gets the current list of tabpage handles /// /// @return List of tabpage handles ArrayOf(Tabpage) nvim_list_tabpages(void) FUNC_API_SINCE(1) { Array rv = ARRAY_DICT_INIT; FOR_ALL_TABS(tp) { rv.size++; } rv.items = xmalloc(sizeof(Object) * rv.size); size_t i = 0; FOR_ALL_TABS(tp) { rv.items[i++] = TABPAGE_OBJ(tp->handle); } return rv; } /// Gets the current tabpage /// /// @return Tabpage handle Tabpage nvim_get_current_tabpage(void) FUNC_API_SINCE(1) { return curtab->handle; } /// Sets the current tabpage /// /// @param tabpage Tabpage handle /// @param[out] err Error details, if any void nvim_set_current_tabpage(Tabpage tabpage, Error *err) FUNC_API_SINCE(1) { tabpage_T *tp = find_tab_by_handle(tabpage, err); if (!tp) { return; } try_start(); goto_tabpage_tp(tp, true, true); if (!try_end(err) && tp != curtab) { api_set_error(err, kErrorTypeException, "Failed to switch to tabpage %d", tabpage); } } /// Subscribes to event broadcasts /// /// @param channel_id Channel id (passed automatically by the dispatcher) /// @param event Event type string void nvim_subscribe(uint64_t channel_id, String event) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY { size_t length = (event.size < METHOD_MAXLEN ? event.size : METHOD_MAXLEN); char e[METHOD_MAXLEN + 1]; memcpy(e, event.data, length); e[length] = NUL; channel_subscribe(channel_id, e); } /// Unsubscribes to event broadcasts /// /// @param channel_id Channel id (passed automatically by the dispatcher) /// @param event Event type string void nvim_unsubscribe(uint64_t channel_id, String event) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY { size_t length = (event.size < METHOD_MAXLEN ? event.size : METHOD_MAXLEN); char e[METHOD_MAXLEN + 1]; memcpy(e, event.data, length); e[length] = NUL; channel_unsubscribe(channel_id, e); } Integer nvim_get_color_by_name(String name) FUNC_API_SINCE(1) { return name_to_color((char_u *)name.data); } Dictionary nvim_get_color_map(void) FUNC_API_SINCE(1) { Dictionary colors = ARRAY_DICT_INIT; for (int i = 0; color_name_table[i].name != NULL; i++) { PUT(colors, color_name_table[i].name, INTEGER_OBJ(color_name_table[i].color)); } return colors; } /// Gets the current mode. |mode()| /// "blocking" is true if Nvim is waiting for input. /// /// @returns Dictionary { "mode": String, "blocking": Boolean } Dictionary nvim_get_mode(void) FUNC_API_SINCE(2) FUNC_API_ASYNC { Dictionary rv = ARRAY_DICT_INIT; char *modestr = get_mode(); bool blocked = input_blocking(); PUT(rv, "mode", STRING_OBJ(cstr_as_string(modestr))); PUT(rv, "blocking", BOOLEAN_OBJ(blocked)); return rv; } /// Gets a list of dictionaries describing global (non-buffer) mappings. /// The "buffer" key in the returned dictionary is always zero. /// /// @param mode Mode short-name ("n", "i", "v", ...) /// @returns Array of maparg()-like dictionaries describing mappings ArrayOf(Dictionary) nvim_get_keymap(String mode) FUNC_API_SINCE(3) { return keymap_array(mode, NULL); } Array nvim_get_api_info(uint64_t channel_id) FUNC_API_SINCE(1) FUNC_API_ASYNC FUNC_API_REMOTE_ONLY { Array rv = ARRAY_DICT_INIT; assert(channel_id <= INT64_MAX); ADD(rv, INTEGER_OBJ((int64_t)channel_id)); ADD(rv, DICTIONARY_OBJ(api_metadata())); return rv; } /// Call many api methods atomically /// /// This has two main usages: Firstly, to perform several requests from an /// async context atomically, i.e. without processing requests from other rpc /// clients or redrawing or allowing user interaction in between. Note that api /// methods that could fire autocommands or do event processing still might do /// so. For instance invoking the :sleep command might call timer callbacks. /// Secondly, it can be used to reduce rpc overhead (roundtrips) when doing /// many requests in sequence. /// /// @param calls an array of calls, where each call is described by an array /// with two elements: the request name, and an array of arguments. /// @param[out] err Details of a validation error of the nvim_multi_request call /// itself, i e malformatted `calls` parameter. Errors from called methods will /// be indicated in the return value, see below. /// /// @return an array with two elements. The first is an array of return /// values. The second is NIL if all calls succeeded. If a call resulted in /// an error, it is a three-element array with the zero-based index of the call /// which resulted in an error, the error type and the error message. If an /// error ocurred, the values from all preceding calls will still be returned. Array nvim_call_atomic(uint64_t channel_id, Array calls, Error *err) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY { Array rv = ARRAY_DICT_INIT; Array results = ARRAY_DICT_INIT; Error nested_error = ERROR_INIT; size_t i; // also used for freeing the variables for (i = 0; i < calls.size; i++) { if (calls.items[i].type != kObjectTypeArray) { api_set_error(err, kErrorTypeValidation, "All items in calls array must be arrays"); goto validation_error; } Array call = calls.items[i].data.array; if (call.size != 2) { api_set_error(err, kErrorTypeValidation, "All items in calls array must be arrays of size 2"); goto validation_error; } if (call.items[0].type != kObjectTypeString) { api_set_error(err, kErrorTypeValidation, "Name must be String"); goto validation_error; } String name = call.items[0].data.string; if (call.items[1].type != kObjectTypeArray) { api_set_error(err, kErrorTypeValidation, "Args must be Array"); goto validation_error; } Array args = call.items[1].data.array; MsgpackRpcRequestHandler handler = msgpack_rpc_get_handler_for(name.data, name.size); Object result = handler.fn(channel_id, args, &nested_error); if (ERROR_SET(&nested_error)) { // error handled after loop break; } ADD(results, result); } ADD(rv, ARRAY_OBJ(results)); if (ERROR_SET(&nested_error)) { Array errval = ARRAY_DICT_INIT; ADD(errval, INTEGER_OBJ((Integer)i)); ADD(errval, INTEGER_OBJ(nested_error.type)); ADD(errval, STRING_OBJ(cstr_to_string(nested_error.msg))); ADD(rv, ARRAY_OBJ(errval)); } else { ADD(rv, NIL); } goto theend; validation_error: api_free_array(results); theend: api_clear_error(&nested_error); return rv; } /// Writes a message to vim output or error buffer. The string is split /// and flushed after each newline. Incomplete lines are kept for writing /// later. /// /// @param message Message to write /// @param to_err true: message is an error (uses `emsg` instead of `msg`) static void write_msg(String message, bool to_err) { static size_t out_pos = 0, err_pos = 0; static char out_line_buf[LINE_BUFFER_SIZE], err_line_buf[LINE_BUFFER_SIZE]; #define PUSH_CHAR(i, pos, line_buf, msg) \ if (message.data[i] == NL || pos == LINE_BUFFER_SIZE - 1) { \ line_buf[pos] = NUL; \ msg((char_u *)line_buf); \ pos = 0; \ continue; \ } \ \ line_buf[pos++] = message.data[i]; ++no_wait_return; for (uint32_t i = 0; i < message.size; i++) { if (to_err) { PUSH_CHAR(i, err_pos, err_line_buf, emsg); } else { PUSH_CHAR(i, out_pos, out_line_buf, msg); } } --no_wait_return; msg_end(); } // Functions used for testing purposes /// Returns object given as argument /// /// This API function is used for testing. One should not rely on its presence /// in plugins. /// /// @param[in] obj Object to return. /// /// @return its argument. Object nvim__id(Object obj) { return copy_object(obj); } /// Returns array given as argument /// /// This API function is used for testing. One should not rely on its presence /// in plugins. /// /// @param[in] arr Array to return. /// /// @return its argument. Array nvim__id_array(Array arr) { return copy_object(ARRAY_OBJ(arr)).data.array; } /// Returns dictionary given as argument /// /// This API function is used for testing. One should not rely on its presence /// in plugins. /// /// @param[in] dct Dictionary to return. /// /// @return its argument. Dictionary nvim__id_dictionary(Dictionary dct) { return copy_object(DICTIONARY_OBJ(dct)).data.dictionary; } /// Returns floating-point value given as argument /// /// This API function is used for testing. One should not rely on its presence /// in plugins. /// /// @param[in] flt Value to return. /// /// @return its argument. Float nvim__id_float(Float flt) { return flt; } neovim-0.2.2/src/nvim/api/vim.h000066400000000000000000000003211320401574200162570ustar00rootroot00000000000000#ifndef NVIM_API_VIM_H #define NVIM_API_VIM_H #include #include "nvim/api/private/defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/vim.h.generated.h" #endif #endif // NVIM_API_VIM_H neovim-0.2.2/src/nvim/api/window.c000066400000000000000000000222001320401574200167660ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include #include #include #include #include "nvim/api/window.h" #include "nvim/api/private/defs.h" #include "nvim/api/private/helpers.h" #include "nvim/vim.h" #include "nvim/cursor.h" #include "nvim/window.h" #include "nvim/screen.h" #include "nvim/move.h" /// Gets the current buffer in a window /// /// @param window Window handle /// @param[out] err Error details, if any /// @return Buffer handle Buffer nvim_win_get_buf(Window window, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return 0; } return win->w_buffer->handle; } /// Gets the cursor position in the window /// /// @param window Window handle /// @param[out] err Error details, if any /// @return (row, col) tuple ArrayOf(Integer, 2) nvim_win_get_cursor(Window window, Error *err) FUNC_API_SINCE(1) { Array rv = ARRAY_DICT_INIT; win_T *win = find_window_by_handle(window, err); if (win) { ADD(rv, INTEGER_OBJ(win->w_cursor.lnum)); ADD(rv, INTEGER_OBJ(win->w_cursor.col)); } return rv; } /// Sets the cursor position in the window /// /// @param window Window handle /// @param pos (row, col) tuple representing the new position /// @param[out] err Error details, if any void nvim_win_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return; } if (pos.size != 2 || pos.items[0].type != kObjectTypeInteger || pos.items[1].type != kObjectTypeInteger) { api_set_error(err, kErrorTypeValidation, "Argument \"pos\" must be a [row, col] array"); return; } int64_t row = pos.items[0].data.integer; int64_t col = pos.items[1].data.integer; if (row <= 0 || row > win->w_buffer->b_ml.ml_line_count) { api_set_error(err, kErrorTypeValidation, "Cursor position outside buffer"); return; } if (col > MAXCOL || col < 0) { api_set_error(err, kErrorTypeValidation, "Column value outside range"); return; } win->w_cursor.lnum = (linenr_T)row; win->w_cursor.col = (colnr_T)col; win->w_cursor.coladd = 0; // When column is out of range silently correct it. check_cursor_col_win(win); // make sure cursor is in visible range even if win != curwin update_topline_win(win); update_screen(VALID); } /// Gets the window height /// /// @param window Window handle /// @param[out] err Error details, if any /// @return Height as a count of rows Integer nvim_win_get_height(Window window, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return 0; } return win->w_height; } /// Sets the window height. This will only succeed if the screen is split /// horizontally. /// /// @param window Window handle /// @param height Height as a count of rows /// @param[out] err Error details, if any void nvim_win_set_height(Window window, Integer height, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return; } if (height > INT_MAX || height < INT_MIN) { api_set_error(err, kErrorTypeValidation, "Height value outside range"); return; } win_T *savewin = curwin; curwin = win; try_start(); win_setheight((int)height); curwin = savewin; try_end(err); } /// Gets the window width /// /// @param window Window handle /// @param[out] err Error details, if any /// @return Width as a count of columns Integer nvim_win_get_width(Window window, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return 0; } return win->w_width; } /// Sets the window width. This will only succeed if the screen is split /// vertically. /// /// @param window Window handle /// @param width Width as a count of columns /// @param[out] err Error details, if any void nvim_win_set_width(Window window, Integer width, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return; } if (width > INT_MAX || width < INT_MIN) { api_set_error(err, kErrorTypeValidation, "Width value outside range"); return; } win_T *savewin = curwin; curwin = win; try_start(); win_setwidth((int)width); curwin = savewin; try_end(err); } /// Gets a window-scoped (w:) variable /// /// @param window Window handle /// @param name Variable name /// @param[out] err Error details, if any /// @return Variable value Object nvim_win_get_var(Window window, String name, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return (Object) OBJECT_INIT; } return dict_get_value(win->w_vars, name, err); } /// Sets a window-scoped (w:) variable /// /// @param window Window handle /// @param name Variable name /// @param value Variable value /// @param[out] err Error details, if any void nvim_win_set_var(Window window, String name, Object value, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return; } dict_set_var(win->w_vars, name, value, false, false, err); } /// Removes a window-scoped (w:) variable /// /// @param window Window handle /// @param name Variable name /// @param[out] err Error details, if any void nvim_win_del_var(Window window, String name, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return; } dict_set_var(win->w_vars, name, NIL, true, false, err); } /// Sets a window-scoped (w:) variable /// /// @deprecated /// /// @param window Window handle /// @param name Variable name /// @param value Variable value /// @param[out] err Error details, if any /// @return Old value or nil if there was no previous value. /// /// @warning It may return nil if there was no previous value /// or if previous value was `v:null`. Object window_set_var(Window window, String name, Object value, Error *err) { win_T *win = find_window_by_handle(window, err); if (!win) { return (Object) OBJECT_INIT; } return dict_set_var(win->w_vars, name, value, false, true, err); } /// Removes a window-scoped (w:) variable /// /// @deprecated /// /// @param window Window handle /// @param name variable name /// @param[out] err Error details, if any /// @return Old value Object window_del_var(Window window, String name, Error *err) { win_T *win = find_window_by_handle(window, err); if (!win) { return (Object) OBJECT_INIT; } return dict_set_var(win->w_vars, name, NIL, true, true, err); } /// Gets a window option value /// /// @param window Window handle /// @param name Option name /// @param[out] err Error details, if any /// @return Option value Object nvim_win_get_option(Window window, String name, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return (Object) OBJECT_INIT; } return get_option_from(win, SREQ_WIN, name, err); } /// Sets a window option value. Passing 'nil' as value deletes the option(only /// works if there's a global fallback) /// /// @param window Window handle /// @param name Option name /// @param value Option value /// @param[out] err Error details, if any void nvim_win_set_option(Window window, String name, Object value, Error *err) FUNC_API_SINCE(1) { win_T *win = find_window_by_handle(window, err); if (!win) { return; } set_option_to(win, SREQ_WIN, name, value, err); } /// Gets the window position in display cells. First position is zero. /// /// @param window Window handle /// @param[out] err Error details, if any /// @return (row, col) tuple with the window position ArrayOf(Integer, 2) nvim_win_get_position(Window window, Error *err) FUNC_API_SINCE(1) { Array rv = ARRAY_DICT_INIT; win_T *win = find_window_by_handle(window, err); if (win) { ADD(rv, INTEGER_OBJ(win->w_winrow)); ADD(rv, INTEGER_OBJ(win->w_wincol)); } return rv; } /// Gets the window tabpage /// /// @param window Window handle /// @param[out] err Error details, if any /// @return Tabpage that contains the window Tabpage nvim_win_get_tabpage(Window window, Error *err) FUNC_API_SINCE(1) { Tabpage rv = 0; win_T *win = find_window_by_handle(window, err); if (win) { rv = win_find_tabpage(win)->handle; } return rv; } /// Gets the window number /// /// @param window Window handle /// @param[out] err Error details, if any /// @return Window number Integer nvim_win_get_number(Window window, Error *err) FUNC_API_SINCE(1) { int rv = 0; win_T *win = find_window_by_handle(window, err); if (!win) { return rv; } int tabnr; win_get_tabwin(window, &tabnr, &rv); return rv; } /// Checks if a window is valid /// /// @param window Window handle /// @return true if the window is valid, false otherwise Boolean nvim_win_is_valid(Window window) FUNC_API_SINCE(1) { Error stub = ERROR_INIT; Boolean ret = find_window_by_handle(window, &stub) != NULL; api_clear_error(&stub); return ret; } neovim-0.2.2/src/nvim/api/window.h000066400000000000000000000003351320401574200170000ustar00rootroot00000000000000#ifndef NVIM_API_WINDOW_H #define NVIM_API_WINDOW_H #include #include "nvim/api/private/defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/window.h.generated.h" #endif #endif // NVIM_API_WINDOW_H neovim-0.2.2/src/nvim/arabic.c000066400000000000000000000766371320401574200161560ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /// @file arabic.c /// /// Functions for Arabic language. /// /// Arabic characters are categorized into following types: /// /// Isolated - iso-8859-6 form char denoted with a_* /// Initial - unicode form-B start char denoted with a_i_* /// Medial - unicode form-B middle char denoted with a_m_* /// Final - unicode form-B final char denoted with a_f_* /// Stand-Alone - unicode form-B isolated char denoted with a_s_* (NOT USED) #include #include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/arabic.h" // Arabic ISO-10646-1 character set definition // Arabic ISO-8859-6 (subset of 10646; 0600 - 06FF) #define a_COMMA 0x060C #define a_SEMICOLON 0x061B #define a_QUESTION 0x061F #define a_HAMZA 0x0621 #define a_ALEF_MADDA 0x0622 #define a_ALEF_HAMZA_ABOVE 0x0623 #define a_WAW_HAMZA 0x0624 #define a_ALEF_HAMZA_BELOW 0x0625 #define a_YEH_HAMZA 0x0626 #define a_ALEF 0x0627 #define a_BEH 0x0628 #define a_TEH_MARBUTA 0x0629 #define a_TEH 0x062a #define a_THEH 0x062b #define a_JEEM 0x062c #define a_HAH 0x062d #define a_KHAH 0x062e #define a_DAL 0x062f #define a_THAL 0x0630 #define a_REH 0x0631 #define a_ZAIN 0x0632 #define a_SEEN 0x0633 #define a_SHEEN 0x0634 #define a_SAD 0x0635 #define a_DAD 0x0636 #define a_TAH 0x0637 #define a_ZAH 0x0638 #define a_AIN 0x0639 #define a_GHAIN 0x063a #define a_TATWEEL 0x0640 #define a_FEH 0x0641 #define a_QAF 0x0642 #define a_KAF 0x0643 #define a_LAM 0x0644 #define a_MEEM 0x0645 #define a_NOON 0x0646 #define a_HEH 0x0647 #define a_WAW 0x0648 #define a_ALEF_MAKSURA 0x0649 #define a_YEH 0x064a #define a_FATHATAN 0x064b #define a_DAMMATAN 0x064c #define a_KASRATAN 0x064d #define a_FATHA 0x064e #define a_DAMMA 0x064f #define a_KASRA 0x0650 #define a_SHADDA 0x0651 #define a_SUKUN 0x0652 #define a_MADDA_ABOVE 0x0653 #define a_HAMZA_ABOVE 0x0654 #define a_HAMZA_BELOW 0x0655 #define a_ZERO 0x0660 #define a_ONE 0x0661 #define a_TWO 0x0662 #define a_THREE 0x0663 #define a_FOUR 0x0664 #define a_FIVE 0x0665 #define a_SIX 0x0666 #define a_SEVEN 0x0667 #define a_EIGHT 0x0668 #define a_NINE 0x0669 #define a_PERCENT 0x066a #define a_DECIMAL 0x066b #define a_THOUSANDS 0x066c #define a_STAR 0x066d #define a_MINI_ALEF 0x0670 // Rest of 8859-6 does not relate to Arabic // Arabic Presentation Form-B (subset of 10646; FE70 - FEFF) // // s -> isolated // i -> initial // m -> medial // f -> final #define a_s_FATHATAN 0xfe70 #define a_m_TATWEEL_FATHATAN 0xfe71 #define a_s_DAMMATAN 0xfe72 #define a_s_KASRATAN 0xfe74 #define a_s_FATHA 0xfe76 #define a_m_FATHA 0xfe77 #define a_s_DAMMA 0xfe78 #define a_m_DAMMA 0xfe79 #define a_s_KASRA 0xfe7a #define a_m_KASRA 0xfe7b #define a_s_SHADDA 0xfe7c #define a_m_SHADDA 0xfe7d #define a_s_SUKUN 0xfe7e #define a_m_SUKUN 0xfe7f #define a_s_HAMZA 0xfe80 #define a_s_ALEF_MADDA 0xfe81 #define a_f_ALEF_MADDA 0xfe82 #define a_s_ALEF_HAMZA_ABOVE 0xfe83 #define a_f_ALEF_HAMZA_ABOVE 0xfe84 #define a_s_WAW_HAMZA 0xfe85 #define a_f_WAW_HAMZA 0xfe86 #define a_s_ALEF_HAMZA_BELOW 0xfe87 #define a_f_ALEF_HAMZA_BELOW 0xfe88 #define a_s_YEH_HAMZA 0xfe89 #define a_f_YEH_HAMZA 0xfe8a #define a_i_YEH_HAMZA 0xfe8b #define a_m_YEH_HAMZA 0xfe8c #define a_s_ALEF 0xfe8d #define a_f_ALEF 0xfe8e #define a_s_BEH 0xfe8f #define a_f_BEH 0xfe90 #define a_i_BEH 0xfe91 #define a_m_BEH 0xfe92 #define a_s_TEH_MARBUTA 0xfe93 #define a_f_TEH_MARBUTA 0xfe94 #define a_s_TEH 0xfe95 #define a_f_TEH 0xfe96 #define a_i_TEH 0xfe97 #define a_m_TEH 0xfe98 #define a_s_THEH 0xfe99 #define a_f_THEH 0xfe9a #define a_i_THEH 0xfe9b #define a_m_THEH 0xfe9c #define a_s_JEEM 0xfe9d #define a_f_JEEM 0xfe9e #define a_i_JEEM 0xfe9f #define a_m_JEEM 0xfea0 #define a_s_HAH 0xfea1 #define a_f_HAH 0xfea2 #define a_i_HAH 0xfea3 #define a_m_HAH 0xfea4 #define a_s_KHAH 0xfea5 #define a_f_KHAH 0xfea6 #define a_i_KHAH 0xfea7 #define a_m_KHAH 0xfea8 #define a_s_DAL 0xfea9 #define a_f_DAL 0xfeaa #define a_s_THAL 0xfeab #define a_f_THAL 0xfeac #define a_s_REH 0xfead #define a_f_REH 0xfeae #define a_s_ZAIN 0xfeaf #define a_f_ZAIN 0xfeb0 #define a_s_SEEN 0xfeb1 #define a_f_SEEN 0xfeb2 #define a_i_SEEN 0xfeb3 #define a_m_SEEN 0xfeb4 #define a_s_SHEEN 0xfeb5 #define a_f_SHEEN 0xfeb6 #define a_i_SHEEN 0xfeb7 #define a_m_SHEEN 0xfeb8 #define a_s_SAD 0xfeb9 #define a_f_SAD 0xfeba #define a_i_SAD 0xfebb #define a_m_SAD 0xfebc #define a_s_DAD 0xfebd #define a_f_DAD 0xfebe #define a_i_DAD 0xfebf #define a_m_DAD 0xfec0 #define a_s_TAH 0xfec1 #define a_f_TAH 0xfec2 #define a_i_TAH 0xfec3 #define a_m_TAH 0xfec4 #define a_s_ZAH 0xfec5 #define a_f_ZAH 0xfec6 #define a_i_ZAH 0xfec7 #define a_m_ZAH 0xfec8 #define a_s_AIN 0xfec9 #define a_f_AIN 0xfeca #define a_i_AIN 0xfecb #define a_m_AIN 0xfecc #define a_s_GHAIN 0xfecd #define a_f_GHAIN 0xfece #define a_i_GHAIN 0xfecf #define a_m_GHAIN 0xfed0 #define a_s_FEH 0xfed1 #define a_f_FEH 0xfed2 #define a_i_FEH 0xfed3 #define a_m_FEH 0xfed4 #define a_s_QAF 0xfed5 #define a_f_QAF 0xfed6 #define a_i_QAF 0xfed7 #define a_m_QAF 0xfed8 #define a_s_KAF 0xfed9 #define a_f_KAF 0xfeda #define a_i_KAF 0xfedb #define a_m_KAF 0xfedc #define a_s_LAM 0xfedd #define a_f_LAM 0xfede #define a_i_LAM 0xfedf #define a_m_LAM 0xfee0 #define a_s_MEEM 0xfee1 #define a_f_MEEM 0xfee2 #define a_i_MEEM 0xfee3 #define a_m_MEEM 0xfee4 #define a_s_NOON 0xfee5 #define a_f_NOON 0xfee6 #define a_i_NOON 0xfee7 #define a_m_NOON 0xfee8 #define a_s_HEH 0xfee9 #define a_f_HEH 0xfeea #define a_i_HEH 0xfeeb #define a_m_HEH 0xfeec #define a_s_WAW 0xfeed #define a_f_WAW 0xfeee #define a_s_ALEF_MAKSURA 0xfeef #define a_f_ALEF_MAKSURA 0xfef0 #define a_s_YEH 0xfef1 #define a_f_YEH 0xfef2 #define a_i_YEH 0xfef3 #define a_m_YEH 0xfef4 #define a_s_LAM_ALEF_MADDA_ABOVE 0xfef5 #define a_f_LAM_ALEF_MADDA_ABOVE 0xfef6 #define a_s_LAM_ALEF_HAMZA_ABOVE 0xfef7 #define a_f_LAM_ALEF_HAMZA_ABOVE 0xfef8 #define a_s_LAM_ALEF_HAMZA_BELOW 0xfef9 #define a_f_LAM_ALEF_HAMZA_BELOW 0xfefa #define a_s_LAM_ALEF 0xfefb #define a_f_LAM_ALEF 0xfefc #define a_BYTE_ORDER_MARK 0xfeff #ifdef INCLUDE_GENERATED_DECLARATIONS # include "arabic.c.generated.h" #endif // Returns true if c is an ISO-8859-6 shaped ARABIC letter (user entered). static bool A_is_a(int cur_c) { switch (cur_c) { case a_HAMZA: case a_ALEF_MADDA: case a_ALEF_HAMZA_ABOVE: case a_WAW_HAMZA: case a_ALEF_HAMZA_BELOW: case a_YEH_HAMZA: case a_ALEF: case a_BEH: case a_TEH_MARBUTA: case a_TEH: case a_THEH: case a_JEEM: case a_HAH: case a_KHAH: case a_DAL: case a_THAL: case a_REH: case a_ZAIN: case a_SEEN: case a_SHEEN: case a_SAD: case a_DAD: case a_TAH: case a_ZAH: case a_AIN: case a_GHAIN: case a_TATWEEL: case a_FEH: case a_QAF: case a_KAF: case a_LAM: case a_MEEM: case a_NOON: case a_HEH: case a_WAW: case a_ALEF_MAKSURA: case a_YEH: return true; } return false; } // Returns true if c is an Isolated Form-B ARABIC letter static bool A_is_s(int cur_c) { switch (cur_c) { case a_s_HAMZA: case a_s_ALEF_MADDA: case a_s_ALEF_HAMZA_ABOVE: case a_s_WAW_HAMZA: case a_s_ALEF_HAMZA_BELOW: case a_s_YEH_HAMZA: case a_s_ALEF: case a_s_BEH: case a_s_TEH_MARBUTA: case a_s_TEH: case a_s_THEH: case a_s_JEEM: case a_s_HAH: case a_s_KHAH: case a_s_DAL: case a_s_THAL: case a_s_REH: case a_s_ZAIN: case a_s_SEEN: case a_s_SHEEN: case a_s_SAD: case a_s_DAD: case a_s_TAH: case a_s_ZAH: case a_s_AIN: case a_s_GHAIN: case a_s_FEH: case a_s_QAF: case a_s_KAF: case a_s_LAM: case a_s_MEEM: case a_s_NOON: case a_s_HEH: case a_s_WAW: case a_s_ALEF_MAKSURA: case a_s_YEH: return true; } return false; } // Returns true if c is a Final shape of an ARABIC letter static bool A_is_f(int cur_c) { switch (cur_c) { case a_f_ALEF_MADDA: case a_f_ALEF_HAMZA_ABOVE: case a_f_WAW_HAMZA: case a_f_ALEF_HAMZA_BELOW: case a_f_YEH_HAMZA: case a_f_ALEF: case a_f_BEH: case a_f_TEH_MARBUTA: case a_f_TEH: case a_f_THEH: case a_f_JEEM: case a_f_HAH: case a_f_KHAH: case a_f_DAL: case a_f_THAL: case a_f_REH: case a_f_ZAIN: case a_f_SEEN: case a_f_SHEEN: case a_f_SAD: case a_f_DAD: case a_f_TAH: case a_f_ZAH: case a_f_AIN: case a_f_GHAIN: case a_f_FEH: case a_f_QAF: case a_f_KAF: case a_f_LAM: case a_f_MEEM: case a_f_NOON: case a_f_HEH: case a_f_WAW: case a_f_ALEF_MAKSURA: case a_f_YEH: case a_f_LAM_ALEF_MADDA_ABOVE: case a_f_LAM_ALEF_HAMZA_ABOVE: case a_f_LAM_ALEF_HAMZA_BELOW: case a_f_LAM_ALEF: return true; } return false; } // Change shape - from ISO-8859-6/Isolated to Form-B Isolated static int chg_c_a2s(int cur_c) { int tempc; switch (cur_c) { case a_HAMZA: tempc = a_s_HAMZA; break; case a_ALEF_MADDA: tempc = a_s_ALEF_MADDA; break; case a_ALEF_HAMZA_ABOVE: tempc = a_s_ALEF_HAMZA_ABOVE; break; case a_WAW_HAMZA: tempc = a_s_WAW_HAMZA; break; case a_ALEF_HAMZA_BELOW: tempc = a_s_ALEF_HAMZA_BELOW; break; case a_YEH_HAMZA: tempc = a_s_YEH_HAMZA; break; case a_ALEF: tempc = a_s_ALEF; break; case a_TEH_MARBUTA: tempc = a_s_TEH_MARBUTA; break; case a_DAL: tempc = a_s_DAL; break; case a_THAL: tempc = a_s_THAL; break; case a_REH: tempc = a_s_REH; break; case a_ZAIN: tempc = a_s_ZAIN; break; case a_TATWEEL: // exceptions tempc = cur_c; break; case a_WAW: tempc = a_s_WAW; break; case a_ALEF_MAKSURA: tempc = a_s_ALEF_MAKSURA; break; case a_BEH: tempc = a_s_BEH; break; case a_TEH: tempc = a_s_TEH; break; case a_THEH: tempc = a_s_THEH; break; case a_JEEM: tempc = a_s_JEEM; break; case a_HAH: tempc = a_s_HAH; break; case a_KHAH: tempc = a_s_KHAH; break; case a_SEEN: tempc = a_s_SEEN; break; case a_SHEEN: tempc = a_s_SHEEN; break; case a_SAD: tempc = a_s_SAD; break; case a_DAD: tempc = a_s_DAD; break; case a_TAH: tempc = a_s_TAH; break; case a_ZAH: tempc = a_s_ZAH; break; case a_AIN: tempc = a_s_AIN; break; case a_GHAIN: tempc = a_s_GHAIN; break; case a_FEH: tempc = a_s_FEH; break; case a_QAF: tempc = a_s_QAF; break; case a_KAF: tempc = a_s_KAF; break; case a_LAM: tempc = a_s_LAM; break; case a_MEEM: tempc = a_s_MEEM; break; case a_NOON: tempc = a_s_NOON; break; case a_HEH: tempc = a_s_HEH; break; case a_YEH: tempc = a_s_YEH; break; default: tempc = 0; } return tempc; } // Change shape - from ISO-8859-6/Isolated to Initial static int chg_c_a2i(int cur_c) { int tempc; switch (cur_c) { case a_YEH_HAMZA: tempc = a_i_YEH_HAMZA; break; case a_HAMZA: // exceptions tempc = a_s_HAMZA; break; case a_ALEF_MADDA: // exceptions tempc = a_s_ALEF_MADDA; break; case a_ALEF_HAMZA_ABOVE: // exceptions tempc = a_s_ALEF_HAMZA_ABOVE; break; case a_WAW_HAMZA: // exceptions tempc = a_s_WAW_HAMZA; break; case a_ALEF_HAMZA_BELOW: // exceptions tempc = a_s_ALEF_HAMZA_BELOW; break; case a_ALEF: // exceptions tempc = a_s_ALEF; break; case a_TEH_MARBUTA: // exceptions tempc = a_s_TEH_MARBUTA; break; case a_DAL: // exceptions tempc = a_s_DAL; break; case a_THAL: // exceptions tempc = a_s_THAL; break; case a_REH: // exceptions tempc = a_s_REH; break; case a_ZAIN: // exceptions tempc = a_s_ZAIN; break; case a_TATWEEL: // exceptions tempc = cur_c; break; case a_WAW: // exceptions tempc = a_s_WAW; break; case a_ALEF_MAKSURA: // exceptions tempc = a_s_ALEF_MAKSURA; break; case a_BEH: tempc = a_i_BEH; break; case a_TEH: tempc = a_i_TEH; break; case a_THEH: tempc = a_i_THEH; break; case a_JEEM: tempc = a_i_JEEM; break; case a_HAH: tempc = a_i_HAH; break; case a_KHAH: tempc = a_i_KHAH; break; case a_SEEN: tempc = a_i_SEEN; break; case a_SHEEN: tempc = a_i_SHEEN; break; case a_SAD: tempc = a_i_SAD; break; case a_DAD: tempc = a_i_DAD; break; case a_TAH: tempc = a_i_TAH; break; case a_ZAH: tempc = a_i_ZAH; break; case a_AIN: tempc = a_i_AIN; break; case a_GHAIN: tempc = a_i_GHAIN; break; case a_FEH: tempc = a_i_FEH; break; case a_QAF: tempc = a_i_QAF; break; case a_KAF: tempc = a_i_KAF; break; case a_LAM: tempc = a_i_LAM; break; case a_MEEM: tempc = a_i_MEEM; break; case a_NOON: tempc = a_i_NOON; break; case a_HEH: tempc = a_i_HEH; break; case a_YEH: tempc = a_i_YEH; break; default: tempc = 0; } return tempc; } // Change shape - from ISO-8859-6/Isolated to Medial static int chg_c_a2m(int cur_c) { int tempc; switch (cur_c) { case a_HAMZA: // exception tempc = a_s_HAMZA; break; case a_ALEF_MADDA: // exception tempc = a_f_ALEF_MADDA; break; case a_ALEF_HAMZA_ABOVE: // exception tempc = a_f_ALEF_HAMZA_ABOVE; break; case a_WAW_HAMZA: // exception tempc = a_f_WAW_HAMZA; break; case a_ALEF_HAMZA_BELOW: // exception tempc = a_f_ALEF_HAMZA_BELOW; break; case a_YEH_HAMZA: tempc = a_m_YEH_HAMZA; break; case a_ALEF: // exception tempc = a_f_ALEF; break; case a_BEH: tempc = a_m_BEH; break; case a_TEH_MARBUTA: // exception tempc = a_f_TEH_MARBUTA; break; case a_TEH: tempc = a_m_TEH; break; case a_THEH: tempc = a_m_THEH; break; case a_JEEM: tempc = a_m_JEEM; break; case a_HAH: tempc = a_m_HAH; break; case a_KHAH: tempc = a_m_KHAH; break; case a_DAL: // exception tempc = a_f_DAL; break; case a_THAL: // exception tempc = a_f_THAL; break; case a_REH: // exception tempc = a_f_REH; break; case a_ZAIN: // exception tempc = a_f_ZAIN; break; case a_SEEN: tempc = a_m_SEEN; break; case a_SHEEN: tempc = a_m_SHEEN; break; case a_SAD: tempc = a_m_SAD; break; case a_DAD: tempc = a_m_DAD; break; case a_TAH: tempc = a_m_TAH; break; case a_ZAH: tempc = a_m_ZAH; break; case a_AIN: tempc = a_m_AIN; break; case a_GHAIN: tempc = a_m_GHAIN; break; case a_TATWEEL: // exception tempc = cur_c; break; case a_FEH: tempc = a_m_FEH; break; case a_QAF: tempc = a_m_QAF; break; case a_KAF: tempc = a_m_KAF; break; case a_LAM: tempc = a_m_LAM; break; case a_MEEM: tempc = a_m_MEEM; break; case a_NOON: tempc = a_m_NOON; break; case a_HEH: tempc = a_m_HEH; break; case a_WAW: // exception tempc = a_f_WAW; break; case a_ALEF_MAKSURA: // exception tempc = a_f_ALEF_MAKSURA; break; case a_YEH: tempc = a_m_YEH; break; default: tempc = 0; } return tempc; } // Change shape - from ISO-8859-6/Isolated to final static int chg_c_a2f(int cur_c) { int tempc; // NOTE: these encodings need to be accounted for // // a_f_ALEF_MADDA; // a_f_ALEF_HAMZA_ABOVE; // a_f_ALEF_HAMZA_BELOW; // a_f_LAM_ALEF_MADDA_ABOVE; // a_f_LAM_ALEF_HAMZA_ABOVE; // a_f_LAM_ALEF_HAMZA_BELOW; switch (cur_c) { case a_HAMZA: // exception tempc = a_s_HAMZA; break; case a_ALEF_MADDA: tempc = a_f_ALEF_MADDA; break; case a_ALEF_HAMZA_ABOVE: tempc = a_f_ALEF_HAMZA_ABOVE; break; case a_WAW_HAMZA: tempc = a_f_WAW_HAMZA; break; case a_ALEF_HAMZA_BELOW: tempc = a_f_ALEF_HAMZA_BELOW; break; case a_YEH_HAMZA: tempc = a_f_YEH_HAMZA; break; case a_ALEF: tempc = a_f_ALEF; break; case a_BEH: tempc = a_f_BEH; break; case a_TEH_MARBUTA: tempc = a_f_TEH_MARBUTA; break; case a_TEH: tempc = a_f_TEH; break; case a_THEH: tempc = a_f_THEH; break; case a_JEEM: tempc = a_f_JEEM; break; case a_HAH: tempc = a_f_HAH; break; case a_KHAH: tempc = a_f_KHAH; break; case a_DAL: tempc = a_f_DAL; break; case a_THAL: tempc = a_f_THAL; break; case a_REH: tempc = a_f_REH; break; case a_ZAIN: tempc = a_f_ZAIN; break; case a_SEEN: tempc = a_f_SEEN; break; case a_SHEEN: tempc = a_f_SHEEN; break; case a_SAD: tempc = a_f_SAD; break; case a_DAD: tempc = a_f_DAD; break; case a_TAH: tempc = a_f_TAH; break; case a_ZAH: tempc = a_f_ZAH; break; case a_AIN: tempc = a_f_AIN; break; case a_GHAIN: tempc = a_f_GHAIN; break; case a_TATWEEL: // exception tempc = cur_c; break; case a_FEH: tempc = a_f_FEH; break; case a_QAF: tempc = a_f_QAF; break; case a_KAF: tempc = a_f_KAF; break; case a_LAM: tempc = a_f_LAM; break; case a_MEEM: tempc = a_f_MEEM; break; case a_NOON: tempc = a_f_NOON; break; case a_HEH: tempc = a_f_HEH; break; case a_WAW: tempc = a_f_WAW; break; case a_ALEF_MAKSURA: tempc = a_f_ALEF_MAKSURA; break; case a_YEH: tempc = a_f_YEH; break; default: tempc = 0; } return tempc; } // Change shape - from Initial to Medial static int chg_c_i2m(int cur_c) { int tempc; switch (cur_c) { case a_i_YEH_HAMZA: tempc = a_m_YEH_HAMZA; break; case a_i_BEH: tempc = a_m_BEH; break; case a_i_TEH: tempc = a_m_TEH; break; case a_i_THEH: tempc = a_m_THEH; break; case a_i_JEEM: tempc = a_m_JEEM; break; case a_i_HAH: tempc = a_m_HAH; break; case a_i_KHAH: tempc = a_m_KHAH; break; case a_i_SEEN: tempc = a_m_SEEN; break; case a_i_SHEEN: tempc = a_m_SHEEN; break; case a_i_SAD: tempc = a_m_SAD; break; case a_i_DAD: tempc = a_m_DAD; break; case a_i_TAH: tempc = a_m_TAH; break; case a_i_ZAH: tempc = a_m_ZAH; break; case a_i_AIN: tempc = a_m_AIN; break; case a_i_GHAIN: tempc = a_m_GHAIN; break; case a_i_FEH: tempc = a_m_FEH; break; case a_i_QAF: tempc = a_m_QAF; break; case a_i_KAF: tempc = a_m_KAF; break; case a_i_LAM: tempc = a_m_LAM; break; case a_i_MEEM: tempc = a_m_MEEM; break; case a_i_NOON: tempc = a_m_NOON; break; case a_i_HEH: tempc = a_m_HEH; break; case a_i_YEH: tempc = a_m_YEH; break; default: tempc = 0; } return tempc; } // Change shape - from Final to Medial static int chg_c_f2m(int cur_c) { int tempc; switch (cur_c) { // NOTE: these encodings are multi-positional, no ? // case a_f_ALEF_MADDA: // case a_f_ALEF_HAMZA_ABOVE: // case a_f_ALEF_HAMZA_BELOW: case a_f_YEH_HAMZA: tempc = a_m_YEH_HAMZA; break; case a_f_WAW_HAMZA: // exceptions case a_f_ALEF: case a_f_TEH_MARBUTA: case a_f_DAL: case a_f_THAL: case a_f_REH: case a_f_ZAIN: case a_f_WAW: case a_f_ALEF_MAKSURA: tempc = cur_c; break; case a_f_BEH: tempc = a_m_BEH; break; case a_f_TEH: tempc = a_m_TEH; break; case a_f_THEH: tempc = a_m_THEH; break; case a_f_JEEM: tempc = a_m_JEEM; break; case a_f_HAH: tempc = a_m_HAH; break; case a_f_KHAH: tempc = a_m_KHAH; break; case a_f_SEEN: tempc = a_m_SEEN; break; case a_f_SHEEN: tempc = a_m_SHEEN; break; case a_f_SAD: tempc = a_m_SAD; break; case a_f_DAD: tempc = a_m_DAD; break; case a_f_TAH: tempc = a_m_TAH; break; case a_f_ZAH: tempc = a_m_ZAH; break; case a_f_AIN: tempc = a_m_AIN; break; case a_f_GHAIN: tempc = a_m_GHAIN; break; case a_f_FEH: tempc = a_m_FEH; break; case a_f_QAF: tempc = a_m_QAF; break; case a_f_KAF: tempc = a_m_KAF; break; case a_f_LAM: tempc = a_m_LAM; break; case a_f_MEEM: tempc = a_m_MEEM; break; case a_f_NOON: tempc = a_m_NOON; break; case a_f_HEH: tempc = a_m_HEH; break; case a_f_YEH: tempc = a_m_YEH; break; // NOTE: these encodings are multi-positional, no ? // case a_f_LAM_ALEF_MADDA_ABOVE: // case a_f_LAM_ALEF_HAMZA_ABOVE: // case a_f_LAM_ALEF_HAMZA_BELOW: // case a_f_LAM_ALEF: default: tempc = 0; } return tempc; } // Change shape - from Combination (2 char) to an Isolated. static int chg_c_laa2i(int hid_c) { int tempc; switch (hid_c) { case a_ALEF_MADDA: tempc = a_s_LAM_ALEF_MADDA_ABOVE; break; case a_ALEF_HAMZA_ABOVE: tempc = a_s_LAM_ALEF_HAMZA_ABOVE; break; case a_ALEF_HAMZA_BELOW: tempc = a_s_LAM_ALEF_HAMZA_BELOW; break; case a_ALEF: tempc = a_s_LAM_ALEF; break; default: tempc = 0; } return tempc; } // Change shape - from Combination-Isolated to Final. static int chg_c_laa2f(int hid_c) { int tempc; switch (hid_c) { case a_ALEF_MADDA: tempc = a_f_LAM_ALEF_MADDA_ABOVE; break; case a_ALEF_HAMZA_ABOVE: tempc = a_f_LAM_ALEF_HAMZA_ABOVE; break; case a_ALEF_HAMZA_BELOW: tempc = a_f_LAM_ALEF_HAMZA_BELOW; break; case a_ALEF: tempc = a_f_LAM_ALEF; break; default: tempc = 0; } return tempc; } // Do "half-shaping" on character "c". Return zero if no shaping. static int half_shape(int c) { if (A_is_a(c)) { return chg_c_a2i(c); } if (A_is_valid(c) && A_is_f(c)) { return chg_c_f2m(c); } return 0; } // Do Arabic shaping on character "c". Returns the shaped character. // out: "ccp" points to the first byte of the character to be shaped. // in/out: "c1p" points to the first composing char for "c". // in: "prev_c" is the previous character (not shaped) // in: "prev_c1" is the first composing char for the previous char // (not shaped) // in: "next_c" is the next character (not shaped). int arabic_shape(int c, int *ccp, int *c1p, int prev_c, int prev_c1, int next_c) { // Deal only with Arabic character, pass back all others if (!A_is_ok(c)) { return c; } // half-shape current and previous character int shape_c = half_shape(prev_c); // Save away current character int curr_c = c; int curr_laa = A_firstc_laa(c, *c1p); int prev_laa = A_firstc_laa(prev_c, prev_c1); if (curr_laa) { if (A_is_valid(prev_c) && !A_is_f(shape_c) && !A_is_s(shape_c) && !prev_laa) { curr_c = chg_c_laa2f(curr_laa); } else { curr_c = chg_c_laa2i(curr_laa); } // Remove the composing character *c1p = 0; } else if (!A_is_valid(prev_c) && A_is_valid(next_c)) { curr_c = chg_c_a2i(c); } else if (!shape_c || A_is_f(shape_c) || A_is_s(shape_c) || prev_laa) { curr_c = A_is_valid(next_c) ? chg_c_a2i(c) : chg_c_a2s(c); } else if (A_is_valid(next_c)) { curr_c = A_is_iso(c) ? chg_c_a2m(c) : chg_c_i2m(c); } else if (A_is_valid(prev_c)) { curr_c = chg_c_a2f(c); } else { curr_c = chg_c_a2s(c); } // Sanity check -- curr_c should, in the future, never be 0. // We should, in the future, insert a fatal error here. if (curr_c == NUL) { curr_c = c; } if ((curr_c != c) && (ccp != NULL)) { char_u buf[MB_MAXBYTES + 1]; // Update the first byte of the character (*mb_char2bytes)(curr_c, buf); *ccp = buf[0]; } // Return the shaped character return curr_c; } /// Check whether we are dealing with Arabic combining characters. /// Note: these are NOT really composing characters! /// /// @param one First character. /// @param two Character just after "one". bool arabic_combine(int one, int two) { if (one == a_LAM) { return arabic_maycombine(two); } return false; } /// Check whether we are dealing with a character that could be regarded as an /// Arabic combining character, need to check the character before this. bool arabic_maycombine(int two) { if (p_arshape && !p_tbidi) { return two == a_ALEF_MADDA || two == a_ALEF_HAMZA_ABOVE || two == a_ALEF_HAMZA_BELOW || two == a_ALEF; } return false; } // A_firstc_laa returns first character of LAA combination if it ex.ists // in: "c" base character // in: "c1" first composing character static int A_firstc_laa(int c, int c1) { if ((c1 != NUL) && (c == a_LAM) && !A_is_harakat(c1)) { return c1; } return 0; } // A_is_harakat returns true if 'c' is an Arabic Harakat character. // (harakat/tanween) static bool A_is_harakat(int c) { return c >= a_FATHATAN && c <= a_SUKUN; } // A_is_iso returns true if 'c' is an Arabic ISO-8859-6 character. // (alphabet/number/punctuation) static bool A_is_iso(int c) { return ((c >= a_HAMZA && c <= a_GHAIN) || (c >= a_TATWEEL && c <= a_HAMZA_BELOW) || c == a_MINI_ALEF); } // A_is_formb returns true if 'c' is an Arabic 10646-1 FormB character. // (alphabet/number/punctuation) static bool A_is_formb(int c) { return ((c >= a_s_FATHATAN && c <= a_s_DAMMATAN) || c == a_s_KASRATAN || (c >= a_s_FATHA && c <= a_f_LAM_ALEF) || c == a_BYTE_ORDER_MARK); } // A_is_ok returns true if 'c' is an Arabic 10646 (8859-6 or Form-B). static bool A_is_ok(int c) { return A_is_iso(c) || A_is_formb(c); } // A_is_valid returns true if 'c' is an Arabic 10646 (8859-6 or Form-B), // with some exceptions/exclusions. static bool A_is_valid(int c) { return A_is_ok(c) && !A_is_special(c); } // A_is_special returns true if 'c' is not a special Arabic character. // Specials don't adhere to most of the rules. static bool A_is_special(int c) { return c == a_HAMZA || c == a_s_HAMZA; } neovim-0.2.2/src/nvim/arabic.h000066400000000000000000000005721320401574200161440ustar00rootroot00000000000000#ifndef NVIM_ARABIC_H #define NVIM_ARABIC_H #include /// Whether c belongs to the range of Arabic characters that might be shaped. static inline bool arabic_char(int c) { // return c >= a_HAMZA && c <= a_MINI_ALEF; return c >= 0x0621 && c <= 0x0670; } #ifdef INCLUDE_GENERATED_DECLARATIONS # include "arabic.h.generated.h" #endif #endif // NVIM_ARABIC_H neovim-0.2.2/src/nvim/ascii.h000066400000000000000000000102721320401574200160110ustar00rootroot00000000000000#ifndef NVIM_ASCII_H #define NVIM_ASCII_H #include #include "nvim/func_attr.h" #include "nvim/os/os_defs.h" // Definitions of various common control characters. #define CharOrd(x) ((uint8_t)(x) < 'a' \ ? (uint8_t)(x) - 'A'\ : (uint8_t)(x) - 'a') #define CharOrdLow(x) ((uint8_t)(x) - 'a') #define CharOrdUp(x) ((uint8_t)(x) - 'A') #define ROT13(c, a) (((((c) - (a)) + 13) % 26) + (a)) #define NUL '\000' #define BELL '\007' #define BS '\010' #define TAB '\011' #define NL '\012' #define NL_STR "\012" #define FF '\014' #define CAR '\015' /* CR is used by Mac OS X */ #define ESC '\033' #define ESC_STR "\033" #define DEL 0x7f #define DEL_STR "\177" #define CSI 0x9b // Control Sequence Introducer #define CSI_STR "\233" #define DCS 0x90 /* Device Control String */ #define STERM 0x9c /* String Terminator */ #define POUND 0xA3 #define Ctrl_chr(x) (TOUPPER_ASC(x) ^ 0x40) /* '?' -> DEL, '@' -> ^@, etc. */ #define Meta(x) ((x) | 0x80) #define CTRL_F_STR "\006" #define CTRL_H_STR "\010" #define CTRL_V_STR "\026" #define Ctrl_AT 0 /* @ */ #define Ctrl_A 1 #define Ctrl_B 2 #define Ctrl_C 3 #define Ctrl_D 4 #define Ctrl_E 5 #define Ctrl_F 6 #define Ctrl_G 7 #define Ctrl_H 8 #define Ctrl_I 9 #define Ctrl_J 10 #define Ctrl_K 11 #define Ctrl_L 12 #define Ctrl_M 13 #define Ctrl_N 14 #define Ctrl_O 15 #define Ctrl_P 16 #define Ctrl_Q 17 #define Ctrl_R 18 #define Ctrl_S 19 #define Ctrl_T 20 #define Ctrl_U 21 #define Ctrl_V 22 #define Ctrl_W 23 #define Ctrl_X 24 #define Ctrl_Y 25 #define Ctrl_Z 26 /* CTRL- [ Left Square Bracket == ESC*/ #define Ctrl_BSL 28 /* \ BackSLash */ #define Ctrl_RSB 29 /* ] Right Square Bracket */ #define Ctrl_HAT 30 /* ^ */ #define Ctrl__ 31 /* * Character that separates dir names in a path. */ #ifdef BACKSLASH_IN_FILENAME # define PATHSEP psepc # define PATHSEPSTR pseps #else # define PATHSEP '/' # define PATHSEPSTR "/" #endif static inline bool ascii_iswhite(int) REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE; static inline bool ascii_isdigit(int) REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE; static inline bool ascii_isxdigit(int) REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE; static inline bool ascii_isbdigit(int) REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE; static inline bool ascii_isspace(int) REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE; /// Checks if `c` is a space or tab character. /// /// @see {ascii_isdigit} static inline bool ascii_iswhite(int c) { return c == ' ' || c == '\t'; } /// Check whether character is a decimal digit. /// /// Library isdigit() function is officially locale-dependent and, for /// example, returns true for superscript 1 (¹) in locales where encoding /// contains it in lower 8 bits. Also avoids crashes in case c is below /// 0 or above 255: library functions are officially defined as accepting /// only EOF and unsigned char values (otherwise it is undefined behaviour) /// what may be used for some optimizations (e.g. simple `return /// isdigit_table[c];`). static inline bool ascii_isdigit(int c) { return c >= '0' && c <= '9'; } /// Checks if `c` is a hexadecimal digit, that is, one of 0-9, a-f, A-F. /// /// @see {ascii_isdigit} static inline bool ascii_isxdigit(int c) { return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); } /// Checks if `c` is a binary digit, that is, 0-1. /// /// @see {ascii_isdigit} static inline bool ascii_isbdigit(int c) { return (c == '0' || c == '1'); } /// Checks if `c` is a white-space character, that is, /// one of \f, \n, \r, \t, \v. /// /// @see {ascii_isdigit} static inline bool ascii_isspace(int c) { return (c >= 9 && c <= 13) || c == ' '; } #endif /* NVIM_ASCII_H */ neovim-0.2.2/src/nvim/assert.h000066400000000000000000000110311320401574200162140ustar00rootroot00000000000000#ifndef NVIM_ASSERT_H #define NVIM_ASSERT_H // support static asserts (aka compile-time asserts) // some compilers don't properly support short-circuiting apparently, giving // ugly syntax errors when using things like defined(__clang__) && // defined(__has_feature) && __has_feature(...). Therefore we define Clang's // __has_feature and __has_extension macro's before referring to them. #ifndef __has_feature # define __has_feature(x) 0 #endif #ifndef __has_extension # define __has_extension __has_feature #endif /// @def STATIC_ASSERT /// @brief Assert at compile time if condition is not satisfied. /// /// Should be put on its own line, followed by a semicolon. /// /// Example: /// /// STATIC_ASSERT(sizeof(void *) == 8, "Expected 64-bit mode"); /// /// @param[in] condition Condition to check, should be an integer constant /// expression. /// @param[in] message Message which will be given if check fails. /// @def STATIC_ASSERT_EXPR /// @brief Like #STATIC_ASSERT, but can be used where expressions are used. /// /// STATIC_ASSERT_EXPR may be put in brace initializer lists. Error message /// given in this case is not very nice with the current implementation though /// and `message` argument is ignored. // define STATIC_ASSERT as C11's _Static_assert whenever either C11 mode is // detected or the compiler is known to support it. Note that Clang in C99 // mode defines __has_feature(c_static_assert) as false and // __has_extension(c_static_assert) as true. Meaning it does support it, but // warns. A similar thing goes for gcc, which warns when it's not compiling // as C11 but does support _Static_assert since 4.6. Since we prefer the // clearer messages we get from _Static_assert, we suppress the warnings // temporarily. #define STATIC_ASSERT_PRAGMA_START #define STATIC_ASSERT_PRAGMA_END #define STATIC_ASSERT(cond, msg) \ do { \ STATIC_ASSERT_PRAGMA_START \ STATIC_ASSERT_STATEMENT(cond, msg); \ STATIC_ASSERT_PRAGMA_END \ } while (0) // the easiest case, when the mode is C11 (generic compiler) or Clang // advertises explicit support for c_static_assert, meaning it won't warn. #if __STDC_VERSION__ >= 201112L || __has_feature(c_static_assert) # define STATIC_ASSERT_STATEMENT(cond, msg) _Static_assert(cond, msg) // if we're dealing with gcc >= 4.6 in C99 mode, we can still use // _Static_assert but we need to suppress warnings, this is pretty ugly. #elif (!defined(__clang__) && !defined(__INTEL_COMPILER)) && \ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) # define STATIC_ASSERT_STATEMENT(cond, msg) _Static_assert(cond, msg) # undef STATIC_ASSERT_PRAGMA_START #if __GNUC__ >= 6 # define STATIC_ASSERT_PRAGMA_START \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wpedantic\"") #else # define STATIC_ASSERT_PRAGMA_START \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-pedantic\"") #endif # undef STATIC_ASSERT_PRAGMA_END # define STATIC_ASSERT_PRAGMA_END \ _Pragma("GCC diagnostic pop") \ // the same goes for clang in C99 mode, but we suppress a different warning #elif defined(__clang__) && __has_extension(c_static_assert) # define STATIC_ASSERT_STATEMENT(cond, msg) _Static_assert(cond, msg) # undef STATIC_ASSERT_PRAGMA_START # define STATIC_ASSERT_PRAGMA_START \ _Pragma("clang diagnostic push") \ _Pragma("clang diagnostic ignored \"-Wc11-extensions\"") \ # undef STATIC_ASSERT_PRAGMA_END # define STATIC_ASSERT_PRAGMA_END \ _Pragma("clang diagnostic pop") \ // TODO(aktau): verify that this works, don't have MSVC on hand. #elif _MSC_VER >= 1600 # define STATIC_ASSERT_STATEMENT(cond, msg) static_assert(cond, msg) // fallback for compilers that don't support _Static_assert or static_assert // not as pretty but gets the job done. Credit goes to Pádraig Brady and // contributors. #else # define STATIC_ASSERT_STATEMENT STATIC_ASSERT_EXPR #endif #define ASSERT_CONCAT_(a, b) a##b #define ASSERT_CONCAT(a, b) ASSERT_CONCAT_(a, b) // These can't be used after statements in c89. #ifdef __COUNTER__ # define STATIC_ASSERT_EXPR(e, m) \ ((enum { ASSERT_CONCAT(static_assert_, __COUNTER__) = 1/(!!(e)) }) 0) #else // This can't be used twice on the same line so ensure if using in headers // that the headers are not included twice (by wrapping in #ifndef...#endif) // Note it doesn't cause an issue when used on same line of separate modules // compiled with gcc -combine -fwhole-program. # define STATIC_ASSERT_EXPR(e, m) \ ((enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(!!(e)) }) 0) #endif #endif // NVIM_ASSERT_H neovim-0.2.2/src/nvim/aucmd.c000066400000000000000000000020031320401574200157760ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include "nvim/os/os.h" #include "nvim/fileio.h" #include "nvim/vim.h" #include "nvim/main.h" #include "nvim/ui.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "aucmd.c.generated.h" #endif static void focusgained_event(void **argv) { bool *gainedp = argv[0]; do_autocmd_focusgained(*gainedp); xfree(gainedp); } void aucmd_schedule_focusgained(bool gained) { bool *gainedp = xmalloc(sizeof(*gainedp)); *gainedp = gained; loop_schedule_deferred(&main_loop, event_create(focusgained_event, 1, gainedp)); } static void do_autocmd_focusgained(bool gained) FUNC_ATTR_NONNULL_ALL { static bool recursive = false; if (recursive) { return; // disallow recursion } recursive = true; apply_autocmds((gained ? EVENT_FOCUSGAINED : EVENT_FOCUSLOST), NULL, NULL, false, curbuf); recursive = false; } neovim-0.2.2/src/nvim/aucmd.h000066400000000000000000000002221320401574200160040ustar00rootroot00000000000000#ifndef NVIM_AUCMD_H #define NVIM_AUCMD_H #ifdef INCLUDE_GENERATED_DECLARATIONS # include "aucmd.h.generated.h" #endif #endif // NVIM_AUCMD_H neovim-0.2.2/src/nvim/auevents.lua000066400000000000000000000136621320401574200171130ustar00rootroot00000000000000return { events = { 'BufAdd', -- after adding a buffer to the buffer list 'BufDelete', -- deleting a buffer from the buffer list 'BufEnter', -- after entering a buffer 'BufFilePost', -- after renaming a buffer 'BufFilePre', -- before renaming a buffer 'BufHidden', -- just after buffer becomes hidden 'BufLeave', -- before leaving a buffer 'BufNew', -- after creating any buffer 'BufNewFile', -- when creating a buffer for a new file 'BufReadCmd', -- read buffer using command 'BufReadPost', -- after reading a buffer 'BufReadPre', -- before reading a buffer 'BufUnload', -- just before unloading a buffer 'BufWinEnter', -- after showing a buffer in a window 'BufWinLeave', -- just after buffer removed from window 'BufWipeout', -- just before really deleting a buffer 'BufWriteCmd', -- write buffer using command 'BufWritePost', -- after writing a buffer 'BufWritePre', -- before writing a buffer 'CmdUndefined', -- command undefined 'CmdWinEnter', -- after entering the cmdline window 'CmdWinLeave', -- before leaving the cmdline window 'ColorScheme', -- after loading a colorscheme 'CompleteDone', -- after finishing insert complete 'CursorHold', -- cursor in same position for a while 'CursorHoldI', -- idem, in Insert mode 'CursorMoved', -- cursor was moved 'CursorMovedI', -- cursor was moved in Insert mode 'DirChanged', -- directory changed 'EncodingChanged', -- after changing the 'encoding' option 'FileAppendCmd', -- append to a file using command 'FileAppendPost', -- after appending to a file 'FileAppendPre', -- before appending to a file 'FileChangedRO', -- before first change to read-only file 'FileChangedShell', -- after shell command that changed file 'FileChangedShellPost', -- after (not) reloading changed file 'FileReadCmd', -- read from a file using command 'FileReadPost', -- after reading a file 'FileReadPre', -- before reading a file 'FileType', -- new file type detected (user defined) 'FileWriteCmd', -- write to a file using command 'FileWritePost', -- after writing a file 'FileWritePre', -- before writing a file 'FilterReadPost', -- after reading from a filter 'FilterReadPre', -- before reading from a filter 'FilterWritePost', -- after writing to a filter 'FilterWritePre', -- before writing to a filter 'FocusGained', -- got the focus 'FocusLost', -- lost the focus to another app 'FuncUndefined', -- if calling a function which doesn't exist 'GUIEnter', -- after starting the GUI 'GUIFailed', -- after starting the GUI failed 'InsertChange', -- when changing Insert/Replace mode 'InsertCharPre', -- before inserting a char 'InsertEnter', -- when entering Insert mode 'InsertLeave', -- when leaving Insert mode 'JobActivity', -- when job sent some data 'MenuPopup', -- just before popup menu is displayed 'OptionSet', -- after setting any option 'QuickFixCmdPost', -- after :make, :grep etc. 'QuickFixCmdPre', -- before :make, :grep etc. 'QuitPre', -- before :quit 'RemoteReply', -- upon string reception from a remote vim 'SessionLoadPost', -- after loading a session file 'ShellCmdPost', -- after ":!cmd" 'ShellFilterPost', -- after ":1,2!cmd", ":w !cmd", ":r !cmd". 'SourceCmd', -- sourcing a Vim script using command 'SourcePre', -- before sourcing a Vim script 'SpellFileMissing', -- spell file missing 'StdinReadPost', -- after reading from stdin 'StdinReadPre', -- before reading from stdin 'SwapExists', -- found existing swap file 'Syntax', -- syntax selected 'TabClosed', -- a tab has closed 'TabEnter', -- after entering a tab page 'TabLeave', -- before leaving a tab page 'TabNew', -- when creating a new tab 'TabNewEntered', -- after entering a new tab 'TermChanged', -- after changing 'term' 'TermClose', -- after the processs exits 'TermOpen', -- after opening a terminal buffer 'TermResponse', -- after setting "v:termresponse" 'TextChanged', -- text was modified 'TextChangedI', -- text was modified in Insert mode 'TextYankPost', -- after a yank or delete was done (y, d, c) 'User', -- user defined autocommand 'VimEnter', -- after starting Vim 'VimLeave', -- before exiting Vim 'VimLeavePre', -- before exiting Vim and writing ShaDa file 'VimResized', -- after Vim window was resized 'WinNew', -- when entering a new window 'WinEnter', -- after entering a window 'WinLeave', -- before leaving a window }, aliases = { BufCreate = 'BufAdd', BufRead = 'BufReadPost', BufWrite = 'BufWritePre', FileEncoding = 'EncodingChanged', }, -- List of neovim-specific events or aliases for the purpose of generating -- syntax file neovim_specific = { DirChanged=true, TabClosed=true, TabNew=true, TabNewEntered=true, TermClose=true, TermOpen=true, }, } neovim-0.2.2/src/nvim/buffer.c000066400000000000000000005116341320401574200161750ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /* * buffer.c: functions for dealing with the buffer structure */ /* * The buffer list is a double linked list of all buffers. * Each buffer can be in one of these states: * never loaded: BF_NEVERLOADED is set, only the file name is valid * not loaded: b_ml.ml_mfp == NULL, no memfile allocated * hidden: b_nwindows == 0, loaded but not displayed in a window * normal: loaded and displayed in a window * * Instead of storing file names all over the place, each file name is * stored in the buffer list. It can be referenced by a number. * * The current implementation remembers all file names ever used. */ #include #include #include #include "nvim/api/private/handle.h" #include "nvim/api/private/helpers.h" #include "nvim/ascii.h" #include "nvim/assert.h" #include "nvim/vim.h" #include "nvim/buffer.h" #include "nvim/charset.h" #include "nvim/cursor.h" #include "nvim/diff.h" #include "nvim/digraph.h" #include "nvim/eval.h" #include "nvim/ex_cmds2.h" #include "nvim/ex_cmds.h" #include "nvim/ex_docmd.h" #include "nvim/ex_eval.h" #include "nvim/ex_getln.h" #include "nvim/fileio.h" #include "nvim/file_search.h" #include "nvim/fold.h" #include "nvim/getchar.h" #include "nvim/hashtab.h" #include "nvim/indent.h" #include "nvim/indent_c.h" #include "nvim/main.h" #include "nvim/mark.h" #include "nvim/mbyte.h" #include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/message.h" #include "nvim/misc1.h" #include "nvim/garray.h" #include "nvim/move.h" #include "nvim/option.h" #include "nvim/os_unix.h" #include "nvim/path.h" #include "nvim/quickfix.h" #include "nvim/regexp.h" #include "nvim/screen.h" #include "nvim/spell.h" #include "nvim/strings.h" #include "nvim/syntax.h" #include "nvim/ui.h" #include "nvim/undo.h" #include "nvim/version.h" #include "nvim/window.h" #include "nvim/shada.h" #include "nvim/os/os.h" #include "nvim/os/time.h" #include "nvim/os/input.h" typedef enum { kBLSUnchanged = 0, kBLSChanged = 1, kBLSDeleted = 2, } BufhlLineStatus; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "buffer.c.generated.h" #endif static char *msg_loclist = N_("[Location List]"); static char *msg_qflist = N_("[Quickfix List]"); static char *e_auabort = N_("E855: Autocommands caused command to abort"); // Number of times free_buffer() was called. static int buf_free_count = 0; // Read data from buffer for retrying. static int read_buffer( int read_stdin, // read file from stdin, otherwise fifo exarg_T *eap, // for forced 'ff' and 'fenc' or NULL int flags) // extra flags for readfile() { int retval = OK; linenr_T line_count; // // Read from the buffer which the text is already filled in and append at // the end. This makes it possible to retry when 'fileformat' or // 'fileencoding' was guessed wrong. // line_count = curbuf->b_ml.ml_line_count; retval = readfile( read_stdin ? NULL : curbuf->b_ffname, read_stdin ? NULL : curbuf->b_fname, (linenr_T)line_count, (linenr_T)0, (linenr_T)MAXLNUM, eap, flags | READ_BUFFER); if (retval == OK) { // Delete the binary lines. while (--line_count >= 0) { ml_delete((linenr_T)1, false); } } else { // Delete the converted lines. while (curbuf->b_ml.ml_line_count > line_count) { ml_delete(line_count, false); } } // Put the cursor on the first line. curwin->w_cursor.lnum = 1; curwin->w_cursor.col = 0; if (read_stdin) { // Set or reset 'modified' before executing autocommands, so that // it can be changed there. if (!readonlymode && !bufempty()) { changed(); } else if (retval != FAIL) { unchanged(curbuf, false); } apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, false, curbuf, &retval); } return retval; } /* * Open current buffer, that is: open the memfile and read the file into * memory. * Return FAIL for failure, OK otherwise. */ int open_buffer ( int read_stdin, /* read file from stdin */ exarg_T *eap, /* for forced 'ff' and 'fenc' or NULL */ int flags /* extra flags for readfile() */ ) { int retval = OK; bufref_T old_curbuf; long old_tw = curbuf->b_p_tw; int read_fifo = false; /* * The 'readonly' flag is only set when BF_NEVERLOADED is being reset. * When re-entering the same buffer, it should not change, because the * user may have reset the flag by hand. */ if (readonlymode && curbuf->b_ffname != NULL && (curbuf->b_flags & BF_NEVERLOADED)) curbuf->b_p_ro = TRUE; if (ml_open(curbuf) == FAIL) { /* * There MUST be a memfile, otherwise we can't do anything * If we can't create one for the current buffer, take another buffer */ close_buffer(NULL, curbuf, 0, FALSE); curbuf = NULL; FOR_ALL_BUFFERS(buf) { if (buf->b_ml.ml_mfp != NULL) { curbuf = buf; break; } } /* * if there is no memfile at all, exit * This is OK, since there are no changes to lose. */ if (curbuf == NULL) { EMSG(_("E82: Cannot allocate any buffer, exiting...")); getout(2); } EMSG(_("E83: Cannot allocate buffer, using other one...")); enter_buffer(curbuf); if (old_tw != curbuf->b_p_tw) check_colorcolumn(curwin); return FAIL; } // The autocommands in readfile() may change the buffer, but only AFTER // reading the file. set_bufref(&old_curbuf, curbuf); modified_was_set = false; /* mark cursor position as being invalid */ curwin->w_valid = 0; if (curbuf->b_ffname != NULL) { int old_msg_silent = msg_silent; #ifdef UNIX int save_bin = curbuf->b_p_bin; int perm; perm = os_getperm((const char *)curbuf->b_ffname); if (perm >= 0 && (0 # ifdef S_ISFIFO || S_ISFIFO(perm) # endif # ifdef S_ISSOCK || S_ISSOCK(perm) # endif # ifdef OPEN_CHR_FILES || (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname)) # endif ) ) { read_fifo = true; } if (read_fifo) { curbuf->b_p_bin = true; } #endif if (shortmess(SHM_FILEINFO)) { msg_silent = 1; } retval = readfile(curbuf->b_ffname, curbuf->b_fname, (linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM, eap, flags | READ_NEW | (read_fifo ? READ_FIFO : 0)); #ifdef UNIX if (read_fifo) { curbuf->b_p_bin = save_bin; if (retval == OK) { retval = read_buffer(false, eap, flags); } } #endif msg_silent = old_msg_silent; // Help buffer is filtered. if (curbuf->b_help) { fix_help_buffer(); } } else if (read_stdin) { int save_bin = curbuf->b_p_bin; /* * First read the text in binary mode into the buffer. * Then read from that same buffer and append at the end. This makes * it possible to retry when 'fileformat' or 'fileencoding' was * guessed wrong. */ curbuf->b_p_bin = TRUE; retval = readfile(NULL, NULL, (linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM, NULL, flags | (READ_NEW + READ_STDIN)); curbuf->b_p_bin = save_bin; if (retval == OK) { retval = read_buffer(true, eap, flags); } } /* if first time loading this buffer, init b_chartab[] */ if (curbuf->b_flags & BF_NEVERLOADED) { (void)buf_init_chartab(curbuf, false); parse_cino(curbuf); } // Set/reset the Changed flag first, autocmds may change the buffer. // Apply the automatic commands, before processing the modelines. // So the modelines have priority over auto commands. // When reading stdin, the buffer contents always needs writing, so set // the changed flag. Unless in readonly mode: "ls | nvim -R -". // When interrupted and 'cpoptions' contains 'i' set changed flag. if ((got_int && vim_strchr(p_cpo, CPO_INTMOD) != NULL) || modified_was_set // ":set modified" used in autocmd || (aborting() && vim_strchr(p_cpo, CPO_INTMOD) != NULL)) { changed(); } else if (retval != FAIL && !read_stdin && !read_fifo) { unchanged(curbuf, false); } save_file_ff(curbuf); // keep this fileformat /* require "!" to overwrite the file, because it wasn't read completely */ if (aborting()) curbuf->b_flags |= BF_READERR; /* Need to update automatic folding. Do this before the autocommands, * they may use the fold info. */ foldUpdateAll(curwin); /* need to set w_topline, unless some autocommand already did that. */ if (!(curwin->w_valid & VALID_TOPLINE)) { curwin->w_topline = 1; curwin->w_topfill = 0; } apply_autocmds_retval(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf, &retval); if (retval == FAIL) { return FAIL; } /* * The autocommands may have changed the current buffer. Apply the * modelines to the correct buffer, if it still exists and is loaded. */ if (bufref_valid(&old_curbuf) && old_curbuf.br_buf->b_ml.ml_mfp != NULL) { aco_save_T aco; // Go to the buffer that was opened. aucmd_prepbuf(&aco, old_curbuf.br_buf); do_modelines(0); curbuf->b_flags &= ~(BF_CHECK_RO | BF_NEVERLOADED); apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf, &retval); /* restore curwin/curbuf and a few other things */ aucmd_restbuf(&aco); } return retval; } /// Store "buf" in "bufref" and set the free count. /// /// @param bufref Reference to be used for the buffer. /// @param buf The buffer to reference. void set_bufref(bufref_T *bufref, buf_T *buf) { bufref->br_buf = buf; bufref->br_fnum = buf->b_fnum; bufref->br_buf_free_count = buf_free_count; } /// Return true if "bufref->br_buf" points to the same buffer as when /// set_bufref() was called and it is a valid buffer. /// Only goes through the buffer list if buf_free_count changed. /// Also checks if b_fnum is still the same, a :bwipe followed by :new might get /// the same allocated memory, but it's a different buffer. /// /// @param bufref Buffer reference to check for. bool bufref_valid(bufref_T *bufref) { return bufref->br_buf_free_count == buf_free_count ? true : buf_valid(bufref->br_buf) && bufref->br_fnum == bufref->br_buf->b_fnum; } /// Check that "buf" points to a valid buffer in the buffer list. /// /// Can be slow if there are many buffers, prefer using bufref_valid(). /// /// @param buf The buffer to check for. bool buf_valid(buf_T *buf) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { if (buf == NULL) { return false; } // Assume that we more often have a recent buffer, // start with the last one. for (buf_T *bp = lastbuf; bp != NULL; bp = bp->b_prev) { if (bp == buf) { return true; } } return false; } /// Close the link to a buffer. /// /// @param win If not NULL, set b_last_cursor. /// @param buf /// @param action Used when there is no longer a window for the buffer. /// Possible values: /// 0 buffer becomes hidden /// DOBUF_UNLOAD buffer is unloaded /// DOBUF_DELETE buffer is unloaded and removed from buffer list /// DOBUF_WIPE buffer is unloaded and really deleted /// When doing all but the first one on the current buffer, the /// caller should get a new buffer very soon! /// The 'bufhidden' option can force freeing and deleting. /// @param abort_if_last /// If TRUE, do not close the buffer if autocommands cause /// there to be only one window with this buffer. e.g. when /// ":quit" is supposed to close the window but autocommands /// close all other windows. void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last) { bool unload_buf = (action != 0); bool del_buf = (action == DOBUF_DEL || action == DOBUF_WIPE); bool wipe_buf = (action == DOBUF_WIPE); bool is_curwin = (curwin != NULL && curwin->w_buffer == buf); win_T *the_curwin = curwin; tabpage_T *the_curtab = curtab; // Force unloading or deleting when 'bufhidden' says so, but not for terminal // buffers. // The caller must take care of NOT deleting/freeing when 'bufhidden' is // "hide" (otherwise we could never free or delete a buffer). if (!buf->terminal) { if (buf->b_p_bh[0] == 'd') { // 'bufhidden' == "delete" del_buf = true; unload_buf = true; } else if (buf->b_p_bh[0] == 'w') { // 'bufhidden' == "wipe" del_buf = true; unload_buf = true; wipe_buf = true; } else if (buf->b_p_bh[0] == 'u') // 'bufhidden' == "unload" unload_buf = true; } if (buf->terminal && (unload_buf || del_buf || wipe_buf)) { // terminal buffers can only be wiped unload_buf = true; del_buf = true; wipe_buf = true; } // Disallow deleting the buffer when it is locked (already being closed or // halfway a command that relies on it). Unloading is allowed. if (buf->b_locked > 0 && (del_buf || wipe_buf)) { EMSG(_("E937: Attempt to delete a buffer that is in use")); return; } if (win_valid_any_tab(win)) { // Set b_last_cursor when closing the last window for the buffer. // Remember the last cursor position and window options of the buffer. // This used to be only for the current window, but then options like // 'foldmethod' may be lost with a ":only" command. if (buf->b_nwindows == 1) { set_last_cursor(win); } buflist_setfpos(buf, win, win->w_cursor.lnum == 1 ? 0 : win->w_cursor.lnum, win->w_cursor.col, TRUE); } bufref_T bufref; set_bufref(&bufref, buf); /* When the buffer is no longer in a window, trigger BufWinLeave */ if (buf->b_nwindows == 1) { buf->b_locked++; if (apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, buf->b_fname, false, buf) && !bufref_valid(&bufref)) { // Autocommands deleted the buffer. EMSG(_(e_auabort)); return; } buf->b_locked--; if (abort_if_last && one_window()) { /* Autocommands made this the only window. */ EMSG(_(e_auabort)); return; } // When the buffer becomes hidden, but is not unloaded, trigger // BufHidden if (!unload_buf) { buf->b_locked++; if (apply_autocmds(EVENT_BUFHIDDEN, buf->b_fname, buf->b_fname, false, buf) && !bufref_valid(&bufref)) { // Autocommands deleted the buffer. EMSG(_(e_auabort)); return; } buf->b_locked--; if (abort_if_last && one_window()) { /* Autocommands made this the only window. */ EMSG(_(e_auabort)); return; } } if (aborting()) /* autocmds may abort script processing */ return; } // If the buffer was in curwin and the window has changed, go back to that // window, if it still exists. This avoids that ":edit x" triggering a // "tabnext" BufUnload autocmd leaves a window behind without a buffer. if (is_curwin && curwin != the_curwin && win_valid_any_tab(the_curwin)) { block_autocmds(); goto_tabpage_win(the_curtab, the_curwin); unblock_autocmds(); } int nwindows = buf->b_nwindows; /* decrease the link count from windows (unless not in any window) */ if (buf->b_nwindows > 0) --buf->b_nwindows; /* Return when a window is displaying the buffer or when it's not * unloaded. */ if (buf->b_nwindows > 0 || !unload_buf) return; if (buf->terminal) { terminal_close(buf->terminal, NULL); } /* Always remove the buffer when there is no file name. */ if (buf->b_ffname == NULL) del_buf = TRUE; /* * Free all things allocated for this buffer. * Also calls the "BufDelete" autocommands when del_buf is TRUE. */ /* Remember if we are closing the current buffer. Restore the number of * windows, so that autocommands in buf_freeall() don't get confused. */ bool is_curbuf = (buf == curbuf); // When closing the current buffer stop Visual mode before freeing // anything. if (is_curbuf && VIsual_active #if defined(EXITFREE) && !entered_free_all_mem #endif ) { end_visual_mode(); } buf->b_nwindows = nwindows; buf_freeall(buf, (del_buf ? BFA_DEL : 0) + (wipe_buf ? BFA_WIPE : 0)); if (!bufref_valid(&bufref)) { // Autocommands may have deleted the buffer. return; } if (aborting()) { // Autocmds may abort script processing. return; } /* * It's possible that autocommands change curbuf to the one being deleted. * This might cause the previous curbuf to be deleted unexpectedly. But * in some cases it's OK to delete the curbuf, because a new one is * obtained anyway. Therefore only return if curbuf changed to the * deleted buffer. */ if (buf == curbuf && !is_curbuf) return; if (win_valid_any_tab(win) && win->w_buffer == buf) { win->w_buffer = NULL; // make sure we don't use the buffer now } // Autocommands may have opened or closed windows for this buffer. // Decrement the count for the close we do here. if (buf->b_nwindows > 0) { buf->b_nwindows--; } /* Change directories when the 'acd' option is set. */ do_autochdir(); /* * Remove the buffer from the list. */ if (wipe_buf) { xfree(buf->b_ffname); xfree(buf->b_sfname); if (buf->b_prev == NULL) firstbuf = buf->b_next; else buf->b_prev->b_next = buf->b_next; if (buf->b_next == NULL) lastbuf = buf->b_prev; else buf->b_next->b_prev = buf->b_prev; free_buffer(buf); } else { if (del_buf) { /* Free all internal variables and reset option values, to make * ":bdel" compatible with Vim 5.7. */ free_buffer_stuff(buf, TRUE); /* Make it look like a new buffer. */ buf->b_flags = BF_CHECK_RO | BF_NEVERLOADED; /* Init the options when loaded again. */ buf->b_p_initialized = false; } buf_clear_file(buf); if (del_buf) buf->b_p_bl = FALSE; } } /* * Make buffer not contain a file. */ void buf_clear_file(buf_T *buf) { buf->b_ml.ml_line_count = 1; unchanged(buf, TRUE); buf->b_p_eol = TRUE; buf->b_start_eol = TRUE; buf->b_p_bomb = FALSE; buf->b_start_bomb = FALSE; buf->b_ml.ml_mfp = NULL; buf->b_ml.ml_flags = ML_EMPTY; /* empty buffer */ } /// Clears the current buffer contents. void buf_clear(void) { linenr_T line_count = curbuf->b_ml.ml_line_count; while (!(curbuf->b_ml.ml_flags & ML_EMPTY)) { ml_delete((linenr_T)1, false); } deleted_lines_mark(1, line_count); // prepare for display ml_close(curbuf, true); // free memline_T buf_clear_file(curbuf); } /// buf_freeall() - free all things allocated for a buffer that are related to /// the file. Careful: get here with "curwin" NULL when exiting. /// /// @param flags BFA_DEL buffer is going to be deleted /// BFA_WIPE buffer is going to be wiped out /// BFA_KEEP_UNDO do not free undo information void buf_freeall(buf_T *buf, int flags) { bool is_curbuf = (buf == curbuf); int is_curwin = (curwin != NULL && curwin->w_buffer == buf); win_T *the_curwin = curwin; tabpage_T *the_curtab = curtab; // Make sure the buffer isn't closed by autocommands. buf->b_locked++; bufref_T bufref; set_bufref(&bufref, buf); if ((buf->b_ml.ml_mfp != NULL) && apply_autocmds(EVENT_BUFUNLOAD, buf->b_fname, buf->b_fname, false, buf) && !bufref_valid(&bufref)) { // Autocommands deleted the buffer. return; } if ((flags & BFA_DEL) && buf->b_p_bl && apply_autocmds(EVENT_BUFDELETE, buf->b_fname, buf->b_fname, false, buf) && !bufref_valid(&bufref)) { // Autocommands may delete the buffer. return; } if ((flags & BFA_WIPE) && apply_autocmds(EVENT_BUFWIPEOUT, buf->b_fname, buf->b_fname, false, buf) && !bufref_valid(&bufref)) { // Autocommands may delete the buffer. return; } buf->b_locked--; // If the buffer was in curwin and the window has changed, go back to that // window, if it still exists. This avoids that ":edit x" triggering a // "tabnext" BufUnload autocmd leaves a window behind without a buffer. if (is_curwin && curwin != the_curwin && win_valid_any_tab(the_curwin)) { block_autocmds(); goto_tabpage_win(the_curtab, the_curwin); unblock_autocmds(); } if (aborting()) { // autocmds may abort script processing return; } /* * It's possible that autocommands change curbuf to the one being deleted. * This might cause curbuf to be deleted unexpectedly. But in some cases * it's OK to delete the curbuf, because a new one is obtained anyway. * Therefore only return if curbuf changed to the deleted buffer. */ if (buf == curbuf && !is_curbuf) return; diff_buf_delete(buf); // Can't use 'diff' for unloaded buffer. // Remove any ownsyntax, unless exiting. if (curwin != NULL && curwin->w_buffer == buf) { reset_synblock(curwin); } /* No folds in an empty buffer. */ FOR_ALL_TAB_WINDOWS(tp, win) { if (win->w_buffer == buf) { clearFolding(win); } } ml_close(buf, TRUE); /* close and delete the memline/memfile */ buf->b_ml.ml_line_count = 0; /* no lines in buffer */ if ((flags & BFA_KEEP_UNDO) == 0) { u_blockfree(buf); /* free the memory allocated for undo */ u_clearall(buf); /* reset all undo information */ } syntax_clear(&buf->b_s); /* reset syntax info */ buf->b_flags &= ~BF_READERR; /* a read error is no longer relevant */ } /* * Free a buffer structure and the things it contains related to the buffer * itself (not the file, that must have been done already). */ static void free_buffer(buf_T *buf) { handle_unregister_buffer(buf); buf_free_count++; free_buffer_stuff(buf, true); unref_var_dict(buf->b_vars); aubuflocal_remove(buf); tv_dict_unref(buf->additional_data); clear_fmark(&buf->b_last_cursor); clear_fmark(&buf->b_last_insert); clear_fmark(&buf->b_last_change); for (size_t i = 0; i < NMARKS; i++) { free_fmark(buf->b_namedm[i]); } for (int i = 0; i < buf->b_changelistlen; i++) { free_fmark(buf->b_changelist[i]); } if (autocmd_busy) { // Do not free the buffer structure while autocommands are executing, // it's still needed. Free it when autocmd_busy is reset. memset(&buf->b_namedm[0], 0, sizeof(buf->b_namedm)); memset(&buf->b_changelist[0], 0, sizeof(buf->b_changelist)); buf->b_next = au_pending_free_buf; au_pending_free_buf = buf; } else { xfree(buf); } } /* * Free stuff in the buffer for ":bdel" and when wiping out the buffer. */ static void free_buffer_stuff ( buf_T *buf, int free_options /* free options as well */ ) { if (free_options) { clear_wininfo(buf); // including window-local options free_buf_options(buf, true); ga_clear(&buf->b_s.b_langp); } { // Avoid loosing b:changedtick when deleting buffer: clearing variables // implies using clear_tv() on b:changedtick and that sets changedtick to // zero. hashitem_T *const changedtick_hi = hash_find( &buf->b_vars->dv_hashtab, (const char_u *)"changedtick"); assert(changedtick_hi != NULL); hash_remove(&buf->b_vars->dv_hashtab, changedtick_hi); } vars_clear(&buf->b_vars->dv_hashtab); // free all internal variables hash_init(&buf->b_vars->dv_hashtab); buf_init_changedtick(buf); uc_clear(&buf->b_ucmds); // clear local user commands buf_delete_signs(buf); // delete any signs bufhl_clear_all(buf); // delete any highligts map_clear_int(buf, MAP_ALL_MODES, true, false); // clear local mappings map_clear_int(buf, MAP_ALL_MODES, true, true); // clear local abbrevs xfree(buf->b_start_fenc); buf->b_start_fenc = NULL; } /* * Free the b_wininfo list for buffer "buf". */ static void clear_wininfo(buf_T *buf) { wininfo_T *wip; while (buf->b_wininfo != NULL) { wip = buf->b_wininfo; buf->b_wininfo = wip->wi_next; if (wip->wi_optset) { clear_winopt(&wip->wi_opt); deleteFoldRecurse(&wip->wi_folds); } xfree(wip); } } /* * Go to another buffer. Handles the result of the ATTENTION dialog. */ void goto_buffer(exarg_T *eap, int start, int dir, int count) { bufref_T old_curbuf; set_bufref(&old_curbuf, curbuf); swap_exists_action = SEA_DIALOG; (void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO, start, dir, count, eap->forceit); if (swap_exists_action == SEA_QUIT && *eap->cmd == 's') { cleanup_T cs; /* Reset the error/interrupt/exception state here so that * aborting() returns FALSE when closing a window. */ enter_cleanup(&cs); /* Quitting means closing the split window, nothing else. */ win_close(curwin, TRUE); swap_exists_action = SEA_NONE; swap_exists_did_quit = TRUE; /* Restore the error/interrupt/exception state if not discarded by a * new aborting error, interrupt, or uncaught exception. */ leave_cleanup(&cs); } else { handle_swap_exists(&old_curbuf); } } /// Handle the situation of swap_exists_action being set. /// /// It is allowed for "old_curbuf" to be NULL or invalid. /// /// @param old_curbuf The buffer to check for. void handle_swap_exists(bufref_T *old_curbuf) { cleanup_T cs; long old_tw = curbuf->b_p_tw; buf_T *buf; if (swap_exists_action == SEA_QUIT) { /* Reset the error/interrupt/exception state here so that * aborting() returns FALSE when closing a buffer. */ enter_cleanup(&cs); // User selected Quit at ATTENTION prompt. Go back to previous // buffer. If that buffer is gone or the same as the current one, // open a new, empty buffer. swap_exists_action = SEA_NONE; // don't want it again swap_exists_did_quit = true; close_buffer(curwin, curbuf, DOBUF_UNLOAD, false); if (old_curbuf == NULL || !bufref_valid(old_curbuf) || old_curbuf->br_buf == curbuf) { buf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED); } else { buf = old_curbuf->br_buf; } if (buf != NULL) { enter_buffer(buf); if (old_tw != curbuf->b_p_tw) { check_colorcolumn(curwin); } } /* If "old_curbuf" is NULL we are in big trouble here... */ /* Restore the error/interrupt/exception state if not discarded by a * new aborting error, interrupt, or uncaught exception. */ leave_cleanup(&cs); } else if (swap_exists_action == SEA_RECOVER) { /* Reset the error/interrupt/exception state here so that * aborting() returns FALSE when closing a buffer. */ enter_cleanup(&cs); /* User selected Recover at ATTENTION prompt. */ msg_scroll = TRUE; ml_recover(); MSG_PUTS("\n"); /* don't overwrite the last message */ cmdline_row = msg_row; do_modelines(0); /* Restore the error/interrupt/exception state if not discarded by a * new aborting error, interrupt, or uncaught exception. */ leave_cleanup(&cs); } swap_exists_action = SEA_NONE; // -V519 } /* * do_bufdel() - delete or unload buffer(s) * * addr_count == 0: ":bdel" - delete current buffer * addr_count == 1: ":N bdel" or ":bdel N [N ..]" - first delete * buffer "end_bnr", then any other arguments. * addr_count == 2: ":N,N bdel" - delete buffers in range * * command can be DOBUF_UNLOAD (":bunload"), DOBUF_WIPE (":bwipeout") or * DOBUF_DEL (":bdel") * * Returns error message or NULL */ char_u * do_bufdel ( int command, char_u *arg, /* pointer to extra arguments */ int addr_count, int start_bnr, /* first buffer number in a range */ int end_bnr, /* buffer nr or last buffer nr in a range */ int forceit ) { int do_current = 0; /* delete current buffer? */ int deleted = 0; /* number of buffers deleted */ char_u *errormsg = NULL; /* return value */ int bnr; /* buffer number */ char_u *p; if (addr_count == 0) { (void)do_buffer(command, DOBUF_CURRENT, FORWARD, 0, forceit); } else { if (addr_count == 2) { if (*arg) /* both range and argument is not allowed */ return (char_u *)_(e_trailing); bnr = start_bnr; } else /* addr_count == 1 */ bnr = end_bnr; for (; !got_int; os_breakcheck()) { /* * delete the current buffer last, otherwise when the * current buffer is deleted, the next buffer becomes * the current one and will be loaded, which may then * also be deleted, etc. */ if (bnr == curbuf->b_fnum) do_current = bnr; else if (do_buffer(command, DOBUF_FIRST, FORWARD, bnr, forceit) == OK) ++deleted; /* * find next buffer number to delete/unload */ if (addr_count == 2) { if (++bnr > end_bnr) break; } else { /* addr_count == 1 */ arg = skipwhite(arg); if (*arg == NUL) break; if (!ascii_isdigit(*arg)) { p = skiptowhite_esc(arg); bnr = buflist_findpat(arg, p, command == DOBUF_WIPE, FALSE, FALSE); if (bnr < 0) /* failed */ break; arg = p; } else bnr = getdigits_int(&arg); } } if (!got_int && do_current && do_buffer(command, DOBUF_FIRST, FORWARD, do_current, forceit) == OK) ++deleted; if (deleted == 0) { if (command == DOBUF_UNLOAD) STRCPY(IObuff, _("E515: No buffers were unloaded")); else if (command == DOBUF_DEL) STRCPY(IObuff, _("E516: No buffers were deleted")); else STRCPY(IObuff, _("E517: No buffers were wiped out")); errormsg = IObuff; } else if (deleted >= p_report) { if (command == DOBUF_UNLOAD) { if (deleted == 1) MSG(_("1 buffer unloaded")); else smsg(_("%d buffers unloaded"), deleted); } else if (command == DOBUF_DEL) { if (deleted == 1) MSG(_("1 buffer deleted")); else smsg(_("%d buffers deleted"), deleted); } else { if (deleted == 1) MSG(_("1 buffer wiped out")); else smsg(_("%d buffers wiped out"), deleted); } } } return errormsg; } /* * Make the current buffer empty. * Used when it is wiped out and it's the last buffer. */ static int empty_curbuf(int close_others, int forceit, int action) { int retval; buf_T *buf = curbuf; if (action == DOBUF_UNLOAD) { EMSG(_("E90: Cannot unload last buffer")); return FAIL; } bufref_T bufref; set_bufref(&bufref, buf); if (close_others) { /* Close any other windows on this buffer, then make it empty. */ close_windows(buf, TRUE); } setpcmark(); retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, forceit ? ECMD_FORCEIT : 0, curwin); // do_ecmd() may create a new buffer, then we have to delete // the old one. But do_ecmd() may have done that already, check // if the buffer still exists. if (buf != curbuf && bufref_valid(&bufref) && buf->b_nwindows == 0) { close_buffer(NULL, buf, action, false); } if (!close_others) { need_fileinfo = false; } return retval; } /* * Implementation of the commands for the buffer list. * * action == DOBUF_GOTO go to specified buffer * action == DOBUF_SPLIT split window and go to specified buffer * action == DOBUF_UNLOAD unload specified buffer(s) * action == DOBUF_DEL delete specified buffer(s) from buffer list * action == DOBUF_WIPE delete specified buffer(s) really * * start == DOBUF_CURRENT go to "count" buffer from current buffer * start == DOBUF_FIRST go to "count" buffer from first buffer * start == DOBUF_LAST go to "count" buffer from last buffer * start == DOBUF_MOD go to "count" modified buffer from current buffer * * Return FAIL or OK. */ int do_buffer ( int action, int start, int dir, /* FORWARD or BACKWARD */ int count, /* buffer number or number of buffers */ int forceit /* TRUE for :...! */ ) { buf_T *buf; buf_T *bp; int unload = (action == DOBUF_UNLOAD || action == DOBUF_DEL || action == DOBUF_WIPE); switch (start) { case DOBUF_FIRST: buf = firstbuf; break; case DOBUF_LAST: buf = lastbuf; break; default: buf = curbuf; break; } if (start == DOBUF_MOD) { /* find next modified buffer */ while (count-- > 0) { do { buf = buf->b_next; if (buf == NULL) buf = firstbuf; } while (buf != curbuf && !bufIsChanged(buf)); } if (!bufIsChanged(buf)) { EMSG(_("E84: No modified buffer found")); return FAIL; } } else if (start == DOBUF_FIRST && count) { /* find specified buffer number */ while (buf != NULL && buf->b_fnum != count) buf = buf->b_next; } else { bp = NULL; while (count > 0 || (!unload && !buf->b_p_bl && bp != buf)) { /* remember the buffer where we start, we come back there when all * buffers are unlisted. */ if (bp == NULL) bp = buf; if (dir == FORWARD) { buf = buf->b_next; if (buf == NULL) buf = firstbuf; } else { buf = buf->b_prev; if (buf == NULL) buf = lastbuf; } /* don't count unlisted buffers */ if (unload || buf->b_p_bl) { --count; bp = NULL; /* use this buffer as new starting point */ } if (bp == buf) { /* back where we started, didn't find anything. */ EMSG(_("E85: There is no listed buffer")); return FAIL; } } } if (buf == NULL) { /* could not find it */ if (start == DOBUF_FIRST) { // don't warn when deleting if (!unload) { EMSGN(_(e_nobufnr), count); } } else if (dir == FORWARD) { EMSG(_("E87: Cannot go beyond last buffer")); } else { EMSG(_("E88: Cannot go before first buffer")); } return FAIL; } /* * delete buffer buf from memory and/or the list */ if (unload) { int forward; bufref_T bufref; set_bufref(&bufref, buf); /* When unloading or deleting a buffer that's already unloaded and * unlisted: fail silently. */ if (action != DOBUF_WIPE && buf->b_ml.ml_mfp == NULL && !buf->b_p_bl) return FAIL; if (!forceit && (buf->terminal || bufIsChanged(buf))) { if ((p_confirm || cmdmod.confirm) && p_write && !buf->terminal) { dialog_changed(buf, false); if (!bufref_valid(&bufref)) { // Autocommand deleted buffer, oops! It's not changed now. return FAIL; } // If it's still changed fail silently, the dialog already // mentioned why it fails. if (bufIsChanged(buf)) { return FAIL; } } else { if (buf->terminal) { EMSG2(_("E89: %s will be killed(add ! to override)"), (char *)buf->b_fname); } else { EMSGN(_("E89: No write since last change for buffer %" PRId64 " (add ! to override)"), buf->b_fnum); } return FAIL; } } // When closing the current buffer stop Visual mode. if (buf == curbuf && VIsual_active) { end_visual_mode(); } /* * If deleting the last (listed) buffer, make it empty. * The last (listed) buffer cannot be unloaded. */ bp = NULL; FOR_ALL_BUFFERS(bp2) { if (bp2->b_p_bl && bp2 != buf) { bp = bp2; break; } } if (bp == NULL && buf == curbuf) return empty_curbuf(TRUE, forceit, action); /* * If the deleted buffer is the current one, close the current window * (unless it's the only window). Repeat this so long as we end up in * a window with this buffer. */ while (buf == curbuf && !(curwin->w_closing || curwin->w_buffer->b_locked > 0) && (!ONE_WINDOW || first_tabpage->tp_next != NULL)) { if (win_close(curwin, false) == FAIL) break; } /* * If the buffer to be deleted is not the current one, delete it here. */ if (buf != curbuf) { close_windows(buf, false); if (buf != curbuf && bufref_valid(&bufref) && buf->b_nwindows <= 0) { close_buffer(NULL, buf, action, false); } return OK; } // Deleting the current buffer: Need to find another buffer to go to. // There should be another, otherwise it would have been handled // above. However, autocommands may have deleted all buffers. // First use au_new_curbuf.br_buf, if it is valid. // Then prefer the buffer we most recently visited. // Else try to find one that is loaded, after the current buffer, // then before the current buffer. // Finally use any buffer. buf = NULL; // Selected buffer. bp = NULL; // Used when no loaded buffer found. if (au_new_curbuf.br_buf != NULL && bufref_valid(&au_new_curbuf)) { buf = au_new_curbuf.br_buf; } else if (curwin->w_jumplistlen > 0) { int jumpidx; jumpidx = curwin->w_jumplistidx - 1; if (jumpidx < 0) jumpidx = curwin->w_jumplistlen - 1; forward = jumpidx; while (jumpidx != curwin->w_jumplistidx) { buf = buflist_findnr(curwin->w_jumplist[jumpidx].fmark.fnum); if (buf != NULL) { if (buf == curbuf || !buf->b_p_bl) buf = NULL; /* skip current and unlisted bufs */ else if (buf->b_ml.ml_mfp == NULL) { /* skip unloaded buf, but may keep it for later */ if (bp == NULL) bp = buf; buf = NULL; } } if (buf != NULL) /* found a valid buffer: stop searching */ break; /* advance to older entry in jump list */ if (!jumpidx && curwin->w_jumplistidx == curwin->w_jumplistlen) break; if (--jumpidx < 0) jumpidx = curwin->w_jumplistlen - 1; if (jumpidx == forward) /* List exhausted for sure */ break; } } if (buf == NULL) { /* No previous buffer, Try 2'nd approach */ forward = TRUE; buf = curbuf->b_next; for (;; ) { if (buf == NULL) { if (!forward) /* tried both directions */ break; buf = curbuf->b_prev; forward = FALSE; continue; } /* in non-help buffer, try to skip help buffers, and vv */ if (buf->b_help == curbuf->b_help && buf->b_p_bl) { if (buf->b_ml.ml_mfp != NULL) /* found loaded buffer */ break; if (bp == NULL) /* remember unloaded buf for later */ bp = buf; } if (forward) buf = buf->b_next; else buf = buf->b_prev; } } if (buf == NULL) /* No loaded buffer, use unloaded one */ buf = bp; if (buf == NULL) { /* No loaded buffer, find listed one */ FOR_ALL_BUFFERS(buf2) { if (buf2->b_p_bl && buf2 != curbuf) { buf = buf2; break; } } } if (buf == NULL) { /* Still no buffer, just take one */ if (curbuf->b_next != NULL) buf = curbuf->b_next; else buf = curbuf->b_prev; } } if (buf == NULL) { /* Autocommands must have wiped out all other buffers. Only option * now is to make the current buffer empty. */ return empty_curbuf(FALSE, forceit, action); } /* * make buf current buffer */ if (action == DOBUF_SPLIT) { /* split window first */ /* If 'switchbuf' contains "useopen": jump to first window containing * "buf" if one exists */ if ((swb_flags & SWB_USEOPEN) && buf_jump_open_win(buf)) return OK; /* If 'switchbuf' contains "usetab": jump to first window in any tab * page containing "buf" if one exists */ if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf)) return OK; if (win_split(0, 0) == FAIL) return FAIL; } /* go to current buffer - nothing to do */ if (buf == curbuf) return OK; /* * Check if the current buffer may be abandoned. */ if (action == DOBUF_GOTO && !can_abandon(curbuf, forceit)) { if ((p_confirm || cmdmod.confirm) && p_write) { bufref_T bufref; set_bufref(&bufref, buf); dialog_changed(curbuf, false); if (!bufref_valid(&bufref)) { // Autocommand deleted buffer, oops! return FAIL; } } if (bufIsChanged(curbuf)) { EMSG(_(e_nowrtmsg)); return FAIL; } } /* Go to the other buffer. */ set_curbuf(buf, action); if (action == DOBUF_SPLIT) { RESET_BINDING(curwin); /* reset 'scrollbind' and 'cursorbind' */ } if (aborting()) /* autocmds may abort script processing */ return FAIL; return OK; } /* * Set current buffer to "buf". Executes autocommands and closes current * buffer. "action" tells how to close the current buffer: * DOBUF_GOTO free or hide it * DOBUF_SPLIT nothing * DOBUF_UNLOAD unload it * DOBUF_DEL delete it * DOBUF_WIPE wipe it out */ void set_curbuf(buf_T *buf, int action) { buf_T *prevbuf; int unload = (action == DOBUF_UNLOAD || action == DOBUF_DEL || action == DOBUF_WIPE); long old_tw = curbuf->b_p_tw; setpcmark(); if (!cmdmod.keepalt) curwin->w_alt_fnum = curbuf->b_fnum; /* remember alternate file */ buflist_altfpos(curwin); /* remember curpos */ /* Don't restart Select mode after switching to another buffer. */ VIsual_reselect = FALSE; /* close_windows() or apply_autocmds() may change curbuf */ prevbuf = curbuf; bufref_T bufref; set_bufref(&bufref, prevbuf); if (!apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, false, curbuf) || (bufref_valid(&bufref) && !aborting())) { if (prevbuf == curwin->w_buffer) { reset_synblock(curwin); } if (unload) { close_windows(prevbuf, false); } if (bufref_valid(&bufref) && !aborting()) { win_T *previouswin = curwin; if (prevbuf == curbuf) u_sync(FALSE); close_buffer(prevbuf == curwin->w_buffer ? curwin : NULL, prevbuf, unload ? action : (action == DOBUF_GOTO && !P_HID(prevbuf) && !bufIsChanged( prevbuf)) ? DOBUF_UNLOAD : 0, FALSE); if (curwin != previouswin && win_valid(previouswin)) /* autocommands changed curwin, Grr! */ curwin = previouswin; } } /* An autocommand may have deleted "buf", already entered it (e.g., when * it did ":bunload") or aborted the script processing! * If curwin->w_buffer is null, enter_buffer() will make it valid again */ if ((buf_valid(buf) && buf != curbuf && !aborting() ) || curwin->w_buffer == NULL ) { enter_buffer(buf); if (old_tw != curbuf->b_p_tw) check_colorcolumn(curwin); } } /* * Enter a new current buffer. * Old curbuf must have been abandoned already! This also means "curbuf" may * be pointing to freed memory. */ void enter_buffer(buf_T *buf) { /* Copy buffer and window local option values. Not for a help buffer. */ buf_copy_options(buf, BCO_ENTER | BCO_NOHELP); if (!buf->b_help) get_winopts(buf); else /* Remove all folds in the window. */ clearFolding(curwin); foldUpdateAll(curwin); /* update folds (later). */ /* Get the buffer in the current window. */ curwin->w_buffer = buf; curbuf = buf; ++curbuf->b_nwindows; if (curwin->w_p_diff) diff_buf_add(curbuf); curwin->w_s = &(buf->b_s); /* Cursor on first line by default. */ curwin->w_cursor.lnum = 1; curwin->w_cursor.col = 0; curwin->w_cursor.coladd = 0; curwin->w_set_curswant = TRUE; curwin->w_topline_was_set = FALSE; /* mark cursor position as being invalid */ curwin->w_valid = 0; /* Make sure the buffer is loaded. */ if (curbuf->b_ml.ml_mfp == NULL) { /* need to load the file */ /* If there is no filetype, allow for detecting one. Esp. useful for * ":ball" used in an autocommand. If there already is a filetype we * might prefer to keep it. */ if (*curbuf->b_p_ft == NUL) did_filetype = FALSE; open_buffer(FALSE, NULL, 0); } else { if (!msg_silent) need_fileinfo = TRUE; /* display file info after redraw */ (void)buf_check_timestamp(curbuf, FALSE); /* check if file changed */ curwin->w_topline = 1; curwin->w_topfill = 0; apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf); apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf); } /* If autocommands did not change the cursor position, restore cursor lnum * and possibly cursor col. */ if (curwin->w_cursor.lnum == 1 && inindent(0)) buflist_getfpos(); check_arg_idx(curwin); /* check for valid arg_idx */ maketitle(); /* when autocmds didn't change it */ if (curwin->w_topline == 1 && !curwin->w_topline_was_set) scroll_cursor_halfway(FALSE); /* redisplay at correct position */ /* Change directories when the 'acd' option is set. */ do_autochdir(); if (curbuf->b_kmap_state & KEYMAP_INIT) (void)keymap_init(); /* May need to set the spell language. Can only do this after the buffer * has been properly setup. */ if (!curbuf->b_help && curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL) (void)did_set_spelllang(curwin); redraw_later(NOT_VALID); } // Change to the directory of the current buffer. // Don't do this while still starting up. void do_autochdir(void) { if (p_acd) { if (starting == 0 && curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK) { shorten_fnames(true); } } } // // functions for dealing with the buffer list // static int top_file_num = 1; ///< highest file number /// Initialize b:changedtick and changedtick_val attribute /// /// @param[out] buf Buffer to intialize for. static inline void buf_init_changedtick(buf_T *const buf) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL { STATIC_ASSERT(sizeof("changedtick") <= sizeof(buf->changedtick_di.di_key), "buf->changedtick_di cannot hold large enough keys"); buf->changedtick_di = (ChangedtickDictItem) { .di_flags = DI_FLAGS_RO|DI_FLAGS_FIX, // Must not include DI_FLAGS_ALLOC. .di_tv = (typval_T) { .v_type = VAR_NUMBER, .v_lock = VAR_FIXED, .vval.v_number = buf->b_changedtick, }, .di_key = "changedtick", }; tv_dict_add(buf->b_vars, (dictitem_T *)&buf->changedtick_di); } /// Add a file name to the buffer list. /// If the same file name already exists return a pointer to that buffer. /// If it does not exist, or if fname == NULL, a new entry is created. /// If (flags & BLN_CURBUF) is TRUE, may use current buffer. /// If (flags & BLN_LISTED) is TRUE, add new buffer to buffer list. /// If (flags & BLN_DUMMY) is TRUE, don't count it as a real buffer. /// If (flags & BLN_NEW) is TRUE, don't use an existing buffer. /// If (flags & BLN_NOOPT) is TRUE, don't copy options from the current buffer /// if the buffer already exists. /// This is the ONLY way to create a new buffer. /// /// @param ffname full path of fname or relative /// @param sfname short fname or NULL /// @param lnum preferred cursor line /// @param flags BLN_ defines /// @param bufnr /// /// @return pointer to the buffer buf_T * buflist_new(char_u *ffname, char_u *sfname, linenr_T lnum, int flags) { buf_T *buf; fname_expand(curbuf, &ffname, &sfname); // will allocate ffname /* * If file name already exists in the list, update the entry. */ /* We can use inode numbers when the file exists. Works better * for hard links. */ FileID file_id; bool file_id_valid = (sfname != NULL && os_fileid((char *)sfname, &file_id)); if (ffname != NULL && !(flags & BLN_DUMMY) && (buf = buflist_findname_file_id(ffname, &file_id, file_id_valid)) != NULL) { xfree(ffname); if (lnum != 0) { buflist_setfpos(buf, curwin, lnum, (colnr_T)0, false); } if ((flags & BLN_NOOPT) == 0) { // Copy the options now, if 'cpo' doesn't have 's' and not done already. buf_copy_options(buf, 0); } if ((flags & BLN_LISTED) && !buf->b_p_bl) { buf->b_p_bl = true; bufref_T bufref; set_bufref(&bufref, buf); if (!(flags & BLN_DUMMY)) { if (apply_autocmds(EVENT_BUFADD, NULL, NULL, false, buf) && !bufref_valid(&bufref)) { return NULL; } } } return buf; } /* * If the current buffer has no name and no contents, use the current * buffer. Otherwise: Need to allocate a new buffer structure. * * This is the ONLY place where a new buffer structure is allocated! * (A spell file buffer is allocated in spell.c, but that's not a normal * buffer.) */ buf = NULL; if ((flags & BLN_CURBUF) && curbuf != NULL && curbuf->b_ffname == NULL && curbuf->b_nwindows <= 1 && (curbuf->b_ml.ml_mfp == NULL || bufempty())) { buf = curbuf; /* It's like this buffer is deleted. Watch out for autocommands that * change curbuf! If that happens, allocate a new buffer anyway. */ if (curbuf->b_p_bl) apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf); if (buf == curbuf) apply_autocmds(EVENT_BUFWIPEOUT, NULL, NULL, FALSE, curbuf); if (aborting()) /* autocmds may abort script processing */ return NULL; if (buf == curbuf) { /* Make sure 'bufhidden' and 'buftype' are empty */ clear_string_option(&buf->b_p_bh); clear_string_option(&buf->b_p_bt); } } if (buf != curbuf || curbuf == NULL) { buf = xcalloc(1, sizeof(buf_T)); // init b: variables buf->b_vars = tv_dict_alloc(); init_var_dict(buf->b_vars, &buf->b_bufvar, VAR_SCOPE); buf_init_changedtick(buf); } if (ffname != NULL) { buf->b_ffname = ffname; buf->b_sfname = vim_strsave(sfname); } clear_wininfo(buf); buf->b_wininfo = xcalloc(1, sizeof(wininfo_T)); if (ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL)) { xfree(buf->b_ffname); buf->b_ffname = NULL; xfree(buf->b_sfname); buf->b_sfname = NULL; if (buf != curbuf) free_buffer(buf); return NULL; } if (buf == curbuf) { /* free all things allocated for this buffer */ buf_freeall(buf, 0); if (buf != curbuf) /* autocommands deleted the buffer! */ return NULL; if (aborting()) /* autocmds may abort script processing */ return NULL; free_buffer_stuff(buf, FALSE); /* delete local variables et al. */ /* Init the options. */ buf->b_p_initialized = false; buf_copy_options(buf, BCO_ENTER); /* need to reload lmaps and set b:keymap_name */ curbuf->b_kmap_state |= KEYMAP_INIT; } else { /* * put new buffer at the end of the buffer list */ buf->b_next = NULL; if (firstbuf == NULL) { /* buffer list is empty */ buf->b_prev = NULL; firstbuf = buf; } else { /* append new buffer at end of list */ lastbuf->b_next = buf; buf->b_prev = lastbuf; } lastbuf = buf; buf->b_fnum = top_file_num++; handle_register_buffer(buf); if (top_file_num < 0) { // wrap around (may cause duplicates) EMSG(_("W14: Warning: List of file names overflow")); if (emsg_silent == 0) { ui_flush(); os_delay(3000L, true); // make sure it is noticed } top_file_num = 1; } /* * Always copy the options from the current buffer. */ buf_copy_options(buf, BCO_ALWAYS); } buf->b_wininfo->wi_fpos.lnum = lnum; buf->b_wininfo->wi_win = curwin; hash_init(&buf->b_s.b_keywtab); hash_init(&buf->b_s.b_keywtab_ic); buf->b_fname = buf->b_sfname; if (!file_id_valid) { buf->file_id_valid = false; } else { buf->file_id_valid = true; buf->file_id = file_id; } buf->b_u_synced = true; buf->b_flags = BF_CHECK_RO | BF_NEVERLOADED; if (flags & BLN_DUMMY) buf->b_flags |= BF_DUMMY; buf_clear_file(buf); clrallmarks(buf); /* clear marks */ fmarks_check_names(buf); /* check file marks for this file */ buf->b_p_bl = (flags & BLN_LISTED) ? TRUE : FALSE; /* init 'buflisted' */ if (!(flags & BLN_DUMMY)) { // Tricky: these autocommands may change the buffer list. They could also // split the window with re-using the one empty buffer. This may result in // unexpectedly losing the empty buffer. bufref_T bufref; set_bufref(&bufref, buf); if (apply_autocmds(EVENT_BUFNEW, NULL, NULL, false, buf) && !bufref_valid(&bufref)) { return NULL; } if ((flags & BLN_LISTED) && apply_autocmds(EVENT_BUFADD, NULL, NULL, false, buf) && !bufref_valid(&bufref)) { return NULL; } if (aborting()) { // Autocmds may abort script processing. return NULL; } } return buf; } /* * Free the memory for the options of a buffer. * If "free_p_ff" is TRUE also free 'fileformat', 'buftype' and * 'fileencoding'. */ void free_buf_options(buf_T *buf, int free_p_ff) { if (free_p_ff) { clear_string_option(&buf->b_p_fenc); clear_string_option(&buf->b_p_ff); clear_string_option(&buf->b_p_bh); clear_string_option(&buf->b_p_bt); } clear_string_option(&buf->b_p_def); clear_string_option(&buf->b_p_inc); clear_string_option(&buf->b_p_inex); clear_string_option(&buf->b_p_inde); clear_string_option(&buf->b_p_indk); clear_string_option(&buf->b_p_fp); clear_string_option(&buf->b_p_fex); clear_string_option(&buf->b_p_kp); clear_string_option(&buf->b_p_mps); clear_string_option(&buf->b_p_fo); clear_string_option(&buf->b_p_flp); clear_string_option(&buf->b_p_isk); clear_string_option(&buf->b_p_keymap); ga_clear(&buf->b_kmap_ga); clear_string_option(&buf->b_p_com); clear_string_option(&buf->b_p_cms); clear_string_option(&buf->b_p_nf); clear_string_option(&buf->b_p_syn); clear_string_option(&buf->b_s.b_syn_isk); clear_string_option(&buf->b_s.b_p_spc); clear_string_option(&buf->b_s.b_p_spf); vim_regfree(buf->b_s.b_cap_prog); buf->b_s.b_cap_prog = NULL; clear_string_option(&buf->b_s.b_p_spl); clear_string_option(&buf->b_p_sua); clear_string_option(&buf->b_p_ft); clear_string_option(&buf->b_p_cink); clear_string_option(&buf->b_p_cino); clear_string_option(&buf->b_p_cinw); clear_string_option(&buf->b_p_cpt); clear_string_option(&buf->b_p_cfu); clear_string_option(&buf->b_p_ofu); clear_string_option(&buf->b_p_gp); clear_string_option(&buf->b_p_mp); clear_string_option(&buf->b_p_efm); clear_string_option(&buf->b_p_ep); clear_string_option(&buf->b_p_path); clear_string_option(&buf->b_p_tags); clear_string_option(&buf->b_p_tc); clear_string_option(&buf->b_p_dict); clear_string_option(&buf->b_p_tsr); clear_string_option(&buf->b_p_qe); buf->b_p_ar = -1; buf->b_p_ul = NO_LOCAL_UNDOLEVEL; clear_string_option(&buf->b_p_lw); clear_string_option(&buf->b_p_bkc); } /// Get alternate file "n". /// Set linenr to "lnum" or altfpos.lnum if "lnum" == 0. /// Also set cursor column to altfpos.col if 'startofline' is not set. /// if (options & GETF_SETMARK) call setpcmark() /// if (options & GETF_ALT) we are jumping to an alternate file. /// if (options & GETF_SWITCH) respect 'switchbuf' settings when jumping /// /// Return FAIL for failure, OK for success. int buflist_getfile(int n, linenr_T lnum, int options, int forceit) { buf_T *buf; win_T *wp = NULL; pos_T *fpos; colnr_T col; buf = buflist_findnr(n); if (buf == NULL) { if ((options & GETF_ALT) && n == 0) EMSG(_(e_noalt)); else EMSGN(_("E92: Buffer %" PRId64 " not found"), n); return FAIL; } /* if alternate file is the current buffer, nothing to do */ if (buf == curbuf) return OK; if (text_locked()) { text_locked_msg(); return FAIL; } if (curbuf_locked()) return FAIL; /* altfpos may be changed by getfile(), get it now */ if (lnum == 0) { fpos = buflist_findfpos(buf); lnum = fpos->lnum; col = fpos->col; } else col = 0; if (options & GETF_SWITCH) { // If 'switchbuf' contains "useopen": jump to first window containing // "buf" if one exists if (swb_flags & SWB_USEOPEN) { wp = buf_jump_open_win(buf); } // If 'switchbuf' contains "usetab": jump to first window in any tab // page containing "buf" if one exists if (wp == NULL && (swb_flags & SWB_USETAB)) { wp = buf_jump_open_tab(buf); } // If 'switchbuf' contains "split", "vsplit" or "newtab" and the // current buffer isn't empty: open new tab or window if (wp == NULL && (swb_flags & (SWB_VSPLIT | SWB_SPLIT | SWB_NEWTAB)) && !bufempty()) { if (swb_flags & SWB_NEWTAB) { tabpage_new(); } else if (win_split(0, (swb_flags & SWB_VSPLIT) ? WSP_VERT : 0) == FAIL) { return FAIL; } RESET_BINDING(curwin); } } ++RedrawingDisabled; if (getfile(buf->b_fnum, NULL, NULL, (options & GETF_SETMARK), lnum, forceit) <= 0) { --RedrawingDisabled; /* cursor is at to BOL and w_cursor.lnum is checked due to getfile() */ if (!p_sol && col != 0) { curwin->w_cursor.col = col; check_cursor_col(); curwin->w_cursor.coladd = 0; curwin->w_set_curswant = TRUE; } return OK; } --RedrawingDisabled; return FAIL; } // Go to the last known line number for the current buffer. void buflist_getfpos(void) { pos_T *fpos; fpos = buflist_findfpos(curbuf); curwin->w_cursor.lnum = fpos->lnum; check_cursor_lnum(); if (p_sol) curwin->w_cursor.col = 0; else { curwin->w_cursor.col = fpos->col; check_cursor_col(); curwin->w_cursor.coladd = 0; curwin->w_set_curswant = TRUE; } } /* * Find file in buffer list by name (it has to be for the current window). * Returns NULL if not found. */ buf_T *buflist_findname_exp(char_u *fname) { char_u *ffname; buf_T *buf = NULL; /* First make the name into a full path name */ ffname = (char_u *)FullName_save((char *)fname, #ifdef UNIX TRUE /* force expansion, get rid of symbolic links */ #else FALSE #endif ); if (ffname != NULL) { buf = buflist_findname(ffname); xfree(ffname); } return buf; } /* * Find file in buffer list by name (it has to be for the current window). * "ffname" must have a full path. * Skips dummy buffers. * Returns NULL if not found. */ buf_T *buflist_findname(char_u *ffname) { FileID file_id; bool file_id_valid = os_fileid((char *)ffname, &file_id); return buflist_findname_file_id(ffname, &file_id, file_id_valid); } /* * Same as buflist_findname(), but pass the FileID structure to avoid * getting it twice for the same file. * Returns NULL if not found. */ static buf_T *buflist_findname_file_id(char_u *ffname, FileID *file_id, bool file_id_valid) { // Start at the last buffer, expect to find a match sooner. FOR_ALL_BUFFERS_BACKWARDS(buf) { if ((buf->b_flags & BF_DUMMY) == 0 && !otherfile_buf(buf, ffname, file_id, file_id_valid)) { return buf; } } return NULL; } /// Find file in buffer list by a regexp pattern. /// Return fnum of the found buffer. /// Return < 0 for error. int buflist_findpat( const char_u *pattern, const char_u *pattern_end, // pointer to first char after pattern int unlisted, // find unlisted buffers int diffmode, // find diff-mode buffers only int curtab_only // find buffers in current tab only ) { int match = -1; int find_listed; char_u *pat; char_u *patend; int attempt; char_u *p; int toggledollar; if (pattern_end == pattern + 1 && (*pattern == '%' || *pattern == '#')) { if (*pattern == '%') { match = curbuf->b_fnum; } else { match = curwin->w_alt_fnum; } buf_T *found_buf = buflist_findnr(match); if (diffmode && !(found_buf && diff_mode_buf(found_buf))) { match = -1; } } /* * Try four ways of matching a listed buffer: * attempt == 0: without '^' or '$' (at any position) * attempt == 1: with '^' at start (only at position 0) * attempt == 2: with '$' at end (only match at end) * attempt == 3: with '^' at start and '$' at end (only full match) * Repeat this for finding an unlisted buffer if there was no matching * listed buffer. */ else { pat = file_pat_to_reg_pat(pattern, pattern_end, NULL, FALSE); if (pat == NULL) return -1; patend = pat + STRLEN(pat) - 1; toggledollar = (patend > pat && *patend == '$'); /* First try finding a listed buffer. If not found and "unlisted" * is TRUE, try finding an unlisted buffer. */ find_listed = TRUE; for (;; ) { for (attempt = 0; attempt <= 3; ++attempt) { /* may add '^' and '$' */ if (toggledollar) *patend = (attempt < 2) ? NUL : '$'; /* add/remove '$' */ p = pat; if (*p == '^' && !(attempt & 1)) /* add/remove '^' */ ++p; regmatch_T regmatch; regmatch.regprog = vim_regcomp(p, p_magic ? RE_MAGIC : 0); if (regmatch.regprog == NULL) { xfree(pat); return -1; } FOR_ALL_BUFFERS_BACKWARDS(buf) { if (buf->b_p_bl == find_listed && (!diffmode || diff_mode_buf(buf)) && buflist_match(®match, buf, false) != NULL) { if (curtab_only) { /* Ignore the match if the buffer is not open in * the current tab. */ bool found_window = false; FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { if (wp->w_buffer == buf) { found_window = true; break; } } if (!found_window) { continue; } } if (match >= 0) { /* already found a match */ match = -2; break; } match = buf->b_fnum; /* remember first match */ } } vim_regfree(regmatch.regprog); if (match >= 0) /* found one match */ break; } /* Only search for unlisted buffers if there was no match with * a listed buffer. */ if (!unlisted || !find_listed || match != -1) break; find_listed = FALSE; } xfree(pat); } if (match == -2) EMSG2(_("E93: More than one match for %s"), pattern); else if (match < 0) EMSG2(_("E94: No matching buffer for %s"), pattern); return match; } /* * Find all buffer names that match. * For command line expansion of ":buf" and ":sbuf". * Return OK if matches found, FAIL otherwise. */ int ExpandBufnames(char_u *pat, int *num_file, char_u ***file, int options) { int count = 0; int round; char_u *p; int attempt; char_u *patc; *num_file = 0; /* return values in case of FAIL */ *file = NULL; /* Make a copy of "pat" and change "^" to "\(^\|[\/]\)". */ if (*pat == '^') { patc = xmalloc(STRLEN(pat) + 11); STRCPY(patc, "\\(^\\|[\\/]\\)"); STRCPY(patc + 11, pat + 1); } else patc = pat; /* * attempt == 0: try match with '\<', match at start of word * attempt == 1: try match without '\<', match anywhere */ for (attempt = 0; attempt <= 1; ++attempt) { if (attempt > 0 && patc == pat) break; /* there was no anchor, no need to try again */ regmatch_T regmatch; regmatch.regprog = vim_regcomp(patc + attempt * 11, RE_MAGIC); if (regmatch.regprog == NULL) { if (patc != pat) xfree(patc); return FAIL; } /* * round == 1: Count the matches. * round == 2: Build the array to keep the matches. */ for (round = 1; round <= 2; ++round) { count = 0; FOR_ALL_BUFFERS(buf) { if (!buf->b_p_bl) /* skip unlisted buffers */ continue; p = buflist_match(®match, buf, p_wic); if (p != NULL) { if (round == 1) ++count; else { if (options & WILD_HOME_REPLACE) p = home_replace_save(buf, p); else p = vim_strsave(p); (*file)[count++] = p; } } } if (count == 0) /* no match found, break here */ break; if (round == 1) { *file = xmalloc((size_t)count * sizeof(**file)); } } vim_regfree(regmatch.regprog); if (count) /* match(es) found, break here */ break; } if (patc != pat) xfree(patc); *num_file = count; return count == 0 ? FAIL : OK; } /// Check for a match on the file name for buffer "buf" with regprog "prog". /// /// @param ignore_case When TRUE, ignore case. Use 'fic' otherwise. static char_u *buflist_match(regmatch_T *rmp, buf_T *buf, bool ignore_case) { // First try the short file name, then the long file name. char_u *match = fname_match(rmp, buf->b_sfname, ignore_case); if (match == NULL) { match = fname_match(rmp, buf->b_ffname, ignore_case); } return match; } /// Try matching the regexp in "prog" with file name "name". /// /// @param ignore_case When TRUE, ignore case. Use 'fileignorecase' otherwise. /// @return "name" when there is a match, NULL when not. static char_u *fname_match(regmatch_T *rmp, char_u *name, bool ignore_case) { char_u *match = NULL; char_u *p; if (name != NULL) { // Ignore case when 'fileignorecase' or the argument is set. rmp->rm_ic = p_fic || ignore_case; if (vim_regexec(rmp, name, (colnr_T)0)) match = name; else { /* Replace $(HOME) with '~' and try matching again. */ p = home_replace_save(NULL, name); if (vim_regexec(rmp, p, (colnr_T)0)) match = name; xfree(p); } } return match; } /// Find a file in the buffer list by buffer number. buf_T *buflist_findnr(int nr) { if (nr == 0) { nr = curwin->w_alt_fnum; } return handle_get_buffer((handle_T)nr); } /* * Get name of file 'n' in the buffer list. * When the file has no name an empty string is returned. * home_replace() is used to shorten the file name (used for marks). * Returns a pointer to allocated memory, of NULL when failed. */ char_u * buflist_nr2name ( int n, int fullname, int helptail /* for help buffers return tail only */ ) { buf_T *buf; buf = buflist_findnr(n); if (buf == NULL) return NULL; return home_replace_save(helptail ? buf : NULL, fullname ? buf->b_ffname : buf->b_fname); } /// Set the line and column numbers for the given buffer and window /// /// @param[in,out] buf Buffer for which line and column are set. /// @param[in,out] win Window for which line and column are set. /// @param[in] lnum Line number to be set. If it is zero then only /// options are touched. /// @param[in] col Column number to be set. /// @param[in] copy_options If true save the local window option values. void buflist_setfpos(buf_T *const buf, win_T *const win, linenr_T lnum, colnr_T col, bool copy_options) FUNC_ATTR_NONNULL_ALL { wininfo_T *wip; for (wip = buf->b_wininfo; wip != NULL; wip = wip->wi_next) if (wip->wi_win == win) break; if (wip == NULL) { /* allocate a new entry */ wip = xcalloc(1, sizeof(wininfo_T)); wip->wi_win = win; if (lnum == 0) /* set lnum even when it's 0 */ lnum = 1; } else { /* remove the entry from the list */ if (wip->wi_prev) wip->wi_prev->wi_next = wip->wi_next; else buf->b_wininfo = wip->wi_next; if (wip->wi_next) wip->wi_next->wi_prev = wip->wi_prev; if (copy_options && wip->wi_optset) { clear_winopt(&wip->wi_opt); deleteFoldRecurse(&wip->wi_folds); } } if (lnum != 0) { wip->wi_fpos.lnum = lnum; wip->wi_fpos.col = col; } if (copy_options) { /* Save the window-specific option values. */ copy_winopt(&win->w_onebuf_opt, &wip->wi_opt); wip->wi_fold_manual = win->w_fold_manual; cloneFoldGrowArray(&win->w_folds, &wip->wi_folds); wip->wi_optset = true; } /* insert the entry in front of the list */ wip->wi_next = buf->b_wininfo; buf->b_wininfo = wip; wip->wi_prev = NULL; if (wip->wi_next) wip->wi_next->wi_prev = wip; return; } /// Check that "wip" has 'diff' set and the diff is only for another tab page. /// That's because a diff is local to a tab page. static bool wininfo_other_tab_diff(wininfo_T *wip) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { if (wip->wi_opt.wo_diff) { FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { // return false when it's a window in the current tab page, thus // the buffer was in diff mode here if (wip->wi_win == wp) { return false; } } return true; } return false; } /* * Find info for the current window in buffer "buf". * If not found, return the info for the most recently used window. * When "skip_diff_buffer" is TRUE avoid windows with 'diff' set that is in * another tab page. * Returns NULL when there isn't any info. */ static wininfo_T *find_wininfo(buf_T *buf, int skip_diff_buffer) { wininfo_T *wip; for (wip = buf->b_wininfo; wip != NULL; wip = wip->wi_next) if (wip->wi_win == curwin && (!skip_diff_buffer || !wininfo_other_tab_diff(wip)) ) break; /* If no wininfo for curwin, use the first in the list (that doesn't have * 'diff' set and is in another tab page). */ if (wip == NULL) { if (skip_diff_buffer) { for (wip = buf->b_wininfo; wip != NULL; wip = wip->wi_next) if (!wininfo_other_tab_diff(wip)) break; } else wip = buf->b_wininfo; } return wip; } /* * Reset the local window options to the values last used in this window. * If the buffer wasn't used in this window before, use the values from * the most recently used window. If the values were never set, use the * global values for the window. */ void get_winopts(buf_T *buf) { wininfo_T *wip; clear_winopt(&curwin->w_onebuf_opt); clearFolding(curwin); wip = find_wininfo(buf, TRUE); if (wip != NULL && wip->wi_optset) { copy_winopt(&wip->wi_opt, &curwin->w_onebuf_opt); curwin->w_fold_manual = wip->wi_fold_manual; curwin->w_foldinvalid = true; cloneFoldGrowArray(&wip->wi_folds, &curwin->w_folds); } else copy_winopt(&curwin->w_allbuf_opt, &curwin->w_onebuf_opt); /* Set 'foldlevel' to 'foldlevelstart' if it's not negative. */ if (p_fdls >= 0) curwin->w_p_fdl = p_fdls; didset_window_options(curwin); } /* * Find the position (lnum and col) for the buffer 'buf' for the current * window. * Returns a pointer to no_position if no position is found. */ pos_T *buflist_findfpos(buf_T *buf) { static pos_T no_position = INIT_POS_T(1, 0, 0); wininfo_T *wip = find_wininfo(buf, FALSE); return (wip == NULL) ? &no_position : &(wip->wi_fpos); } /* * Find the lnum for the buffer 'buf' for the current window. */ linenr_T buflist_findlnum(buf_T *buf) { return buflist_findfpos(buf)->lnum; } // List all known file names (for :files and :buffers command). void buflist_list(exarg_T *eap) { buf_T *buf; int len; int i; for (buf = firstbuf; buf != NULL && !got_int; buf = buf->b_next) { // skip unspecified buffers if ((!buf->b_p_bl && !eap->forceit && !strchr((char *)eap->arg, 'u')) || (strchr((char *)eap->arg, 'u') && buf->b_p_bl) || (strchr((char *)eap->arg, '+') && ((buf->b_flags & BF_READERR) || !bufIsChanged(buf))) || (strchr((char *)eap->arg, 'a') && (buf->b_ml.ml_mfp == NULL || buf->b_nwindows == 0)) || (strchr((char *)eap->arg, 'h') && (buf->b_ml.ml_mfp == NULL || buf->b_nwindows != 0)) || (strchr((char *)eap->arg, '-') && buf->b_p_ma) || (strchr((char *)eap->arg, '=') && !buf->b_p_ro) || (strchr((char *)eap->arg, 'x') && !(buf->b_flags & BF_READERR)) || (strchr((char *)eap->arg, '%') && buf != curbuf) || (strchr((char *)eap->arg, '#') && (buf == curbuf || curwin->w_alt_fnum != buf->b_fnum))) { continue; } if (buf_spname(buf) != NULL) { STRLCPY(NameBuff, buf_spname(buf), MAXPATHL); } else { home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, true); } if (message_filtered(NameBuff)) { continue; } msg_putchar('\n'); len = vim_snprintf((char *)IObuff, IOSIZE - 20, "%3d%c%c%c%c%c \"%s\"", buf->b_fnum, buf->b_p_bl ? ' ' : 'u', buf == curbuf ? '%' : (curwin->w_alt_fnum == buf->b_fnum ? '#' : ' '), buf->b_ml.ml_mfp == NULL ? ' ' : (buf->b_nwindows == 0 ? 'h' : 'a'), !MODIFIABLE(buf) ? '-' : (buf->b_p_ro ? '=' : ' '), (buf->b_flags & BF_READERR) ? 'x' : (bufIsChanged(buf) ? '+' : ' '), NameBuff); if (len > IOSIZE - 20) { len = IOSIZE - 20; } /* put "line 999" in column 40 or after the file name */ i = 40 - vim_strsize(IObuff); do { IObuff[len++] = ' '; } while (--i > 0 && len < IOSIZE - 18); vim_snprintf((char *)IObuff + len, (size_t)(IOSIZE - len), _("line %" PRId64), buf == curbuf ? (int64_t)curwin->w_cursor.lnum : (int64_t)buflist_findlnum(buf)); msg_outtrans(IObuff); ui_flush(); /* output one line at a time */ os_breakcheck(); } } /* * Get file name and line number for file 'fnum'. * Used by DoOneCmd() for translating '%' and '#'. * Used by insert_reg() and cmdline_paste() for '#' register. * Return FAIL if not found, OK for success. */ int buflist_name_nr(int fnum, char_u **fname, linenr_T *lnum) { buf_T *buf; buf = buflist_findnr(fnum); if (buf == NULL || buf->b_fname == NULL) return FAIL; *fname = buf->b_fname; *lnum = buflist_findlnum(buf); return OK; } /* * Set the file name for "buf"' to 'ffname', short file name to 'sfname'. * The file name with the full path is also remembered, for when :cd is used. * Returns FAIL for failure (file name already in use by other buffer) * OK otherwise. */ int setfname ( buf_T *buf, char_u *ffname, char_u *sfname, int message /* give message when buffer already exists */ ) { buf_T *obuf = NULL; FileID file_id; bool file_id_valid = false; if (ffname == NULL || *ffname == NUL) { /* Removing the name. */ xfree(buf->b_ffname); xfree(buf->b_sfname); buf->b_ffname = NULL; buf->b_sfname = NULL; } else { fname_expand(buf, &ffname, &sfname); /* will allocate ffname */ if (ffname == NULL) /* out of memory */ return FAIL; /* * if the file name is already used in another buffer: * - if the buffer is loaded, fail * - if the buffer is not loaded, delete it from the list */ file_id_valid = os_fileid((char *)ffname, &file_id); if (!(buf->b_flags & BF_DUMMY)) { obuf = buflist_findname_file_id(ffname, &file_id, file_id_valid); } if (obuf != NULL && obuf != buf) { if (obuf->b_ml.ml_mfp != NULL) { /* it's loaded, fail */ if (message) EMSG(_("E95: Buffer with this name already exists")); xfree(ffname); return FAIL; } /* delete from the list */ close_buffer(NULL, obuf, DOBUF_WIPE, FALSE); } sfname = vim_strsave(sfname); #ifdef USE_FNAME_CASE path_fix_case(sfname); /* set correct case for short file name */ #endif xfree(buf->b_ffname); xfree(buf->b_sfname); buf->b_ffname = ffname; buf->b_sfname = sfname; } buf->b_fname = buf->b_sfname; if (!file_id_valid) { buf->file_id_valid = false; } else { buf->file_id_valid = true; buf->file_id = file_id; } buf_name_changed(buf); return OK; } /* * Crude way of changing the name of a buffer. Use with care! * The name should be relative to the current directory. */ void buf_set_name(int fnum, char_u *name) { buf_T *buf; buf = buflist_findnr(fnum); if (buf != NULL) { xfree(buf->b_sfname); xfree(buf->b_ffname); buf->b_ffname = vim_strsave(name); buf->b_sfname = NULL; /* Allocate ffname and expand into full path. Also resolves .lnk * files on Win32. */ fname_expand(buf, &buf->b_ffname, &buf->b_sfname); buf->b_fname = buf->b_sfname; } } /* * Take care of what needs to be done when the name of buffer "buf" has * changed. */ void buf_name_changed(buf_T *buf) { /* * If the file name changed, also change the name of the swapfile */ if (buf->b_ml.ml_mfp != NULL) ml_setname(buf); if (curwin->w_buffer == buf) check_arg_idx(curwin); /* check file name for arg list */ maketitle(); /* set window title */ status_redraw_all(); /* status lines need to be redrawn */ fmarks_check_names(buf); /* check named file marks */ ml_timestamp(buf); /* reset timestamp */ } /* * set alternate file name for current window * * Used by do_one_cmd(), do_write() and do_ecmd(). * Return the buffer. */ buf_T *setaltfname(char_u *ffname, char_u *sfname, linenr_T lnum) { buf_T *buf; // Create a buffer. 'buflisted' is not set if it's a new buffer buf = buflist_new(ffname, sfname, lnum, 0); if (buf != NULL && !cmdmod.keepalt) { curwin->w_alt_fnum = buf->b_fnum; } return buf; } /* * Get alternate file name for current window. * Return NULL if there isn't any, and give error message if requested. */ char_u * getaltfname ( int errmsg /* give error message */ ) { char_u *fname; linenr_T dummy; if (buflist_name_nr(0, &fname, &dummy) == FAIL) { if (errmsg) EMSG(_(e_noalt)); return NULL; } return fname; } /* * Add a file name to the buflist and return its number. * Uses same flags as buflist_new(), except BLN_DUMMY. * * used by qf_init(), main() and doarglist() */ int buflist_add(char_u *fname, int flags) { buf_T *buf; buf = buflist_new(fname, NULL, (linenr_T)0, flags); if (buf != NULL) { return buf->b_fnum; } return 0; } #if defined(BACKSLASH_IN_FILENAME) /* * Adjust slashes in file names. Called after 'shellslash' was set. */ void buflist_slash_adjust(void) { FOR_ALL_BUFFERS(bp) { if (bp->b_ffname != NULL) slash_adjust(bp->b_ffname); if (bp->b_sfname != NULL) slash_adjust(bp->b_sfname); } } #endif /* * Set alternate cursor position for the current buffer and window "win". * Also save the local window option values. */ void buflist_altfpos(win_T *win) { buflist_setfpos(curbuf, win, win->w_cursor.lnum, win->w_cursor.col, TRUE); } /// Check that "ffname" is not the same file as current file. /// Fname must have a full path (expanded by path_get_absolute_path()). /// /// @param ffname full path name to check bool otherfile(char_u *ffname) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { return otherfile_buf(curbuf, ffname, NULL, false); } /// Check that "ffname" is not the same file as the file loaded in "buf". /// Fname must have a full path (expanded by path_get_absolute_path()). /// /// @param buf buffer to check /// @param ffname full path name to check /// @param file_id_p information about the file at "ffname". /// @param file_id_valid whether a valid "file_id_p" was passed in. static bool otherfile_buf(buf_T *buf, char_u *ffname, FileID *file_id_p, bool file_id_valid) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { // no name is different if (ffname == NULL || *ffname == NUL || buf->b_ffname == NULL) { return true; } if (fnamecmp(ffname, buf->b_ffname) == 0) { return false; } { FileID file_id; // If no struct stat given, get it now if (file_id_p == NULL) { file_id_p = &file_id; file_id_valid = os_fileid((char *)ffname, file_id_p); } if (!file_id_valid) { // file_id not valid, assume files are different. return true; } // Use dev/ino to check if the files are the same, even when the names // are different (possible with links). Still need to compare the // name above, for when the file doesn't exist yet. // Problem: The dev/ino changes when a file is deleted (and created // again) and remains the same when renamed/moved. We don't want to // stat() each buffer each time, that would be too slow. Get the // dev/ino again when they appear to match, but not when they appear // to be different: Could skip a buffer when it's actually the same // file. if (buf_same_file_id(buf, file_id_p)) { buf_set_file_id(buf); if (buf_same_file_id(buf, file_id_p)) { return false; } } } return true; } // Set file_id for a buffer. // Must always be called when b_fname is changed! void buf_set_file_id(buf_T *buf) { FileID file_id; if (buf->b_fname != NULL && os_fileid((char *)buf->b_fname, &file_id)) { buf->file_id_valid = true; buf->file_id = file_id; } else { buf->file_id_valid = false; } } /// Check that file_id in buffer "buf" matches with "file_id". /// /// @param buf buffer /// @param file_id file id static bool buf_same_file_id(buf_T *buf, FileID *file_id) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { return buf->file_id_valid && os_fileid_equal(&(buf->file_id), file_id); } /* * Print info about the current buffer. */ void fileinfo ( int fullname, /* when non-zero print full path */ int shorthelp, int dont_truncate ) { char_u *name; int n; char_u *p; char_u *buffer; size_t len; buffer = xmalloc(IOSIZE); if (fullname > 1) { /* 2 CTRL-G: include buffer number */ vim_snprintf((char *)buffer, IOSIZE, "buf %d: ", curbuf->b_fnum); p = buffer + STRLEN(buffer); } else p = buffer; *p++ = '"'; if (buf_spname(curbuf) != NULL) STRLCPY(p, buf_spname(curbuf), IOSIZE - (p - buffer)); else { if (!fullname && curbuf->b_fname != NULL) name = curbuf->b_fname; else name = curbuf->b_ffname; home_replace(shorthelp ? curbuf : NULL, name, p, (size_t)(IOSIZE - (p - buffer)), true); } vim_snprintf_add((char *)buffer, IOSIZE, "\"%s%s%s%s%s%s", curbufIsChanged() ? (shortmess(SHM_MOD) ? " [+]" : _(" [Modified]")) : " ", (curbuf->b_flags & BF_NOTEDITED) && !bt_dontwrite(curbuf) ? _("[Not edited]") : "", (curbuf->b_flags & BF_NEW) && !bt_dontwrite(curbuf) ? _("[New file]") : "", (curbuf->b_flags & BF_READERR) ? _("[Read errors]") : "", curbuf->b_p_ro ? (shortmess(SHM_RO) ? _("[RO]") : _("[readonly]")) : "", (curbufIsChanged() || (curbuf->b_flags & BF_WRITE_MASK) || curbuf->b_p_ro) ? " " : ""); /* With 32 bit longs and more than 21,474,836 lines multiplying by 100 * causes an overflow, thus for large numbers divide instead. */ if (curwin->w_cursor.lnum > 1000000L) n = (int)(((long)curwin->w_cursor.lnum) / ((long)curbuf->b_ml.ml_line_count / 100L)); else n = (int)(((long)curwin->w_cursor.lnum * 100L) / (long)curbuf->b_ml.ml_line_count); if (curbuf->b_ml.ml_flags & ML_EMPTY) { vim_snprintf_add((char *)buffer, IOSIZE, "%s", _(no_lines_msg)); } else if (p_ru) { /* Current line and column are already on the screen -- webb */ if (curbuf->b_ml.ml_line_count == 1) vim_snprintf_add((char *)buffer, IOSIZE, _("1 line --%d%%--"), n); else vim_snprintf_add((char *)buffer, IOSIZE, _("%" PRId64 " lines --%d%%--"), (int64_t)curbuf->b_ml.ml_line_count, n); } else { vim_snprintf_add((char *)buffer, IOSIZE, _("line %" PRId64 " of %" PRId64 " --%d%%-- col "), (int64_t)curwin->w_cursor.lnum, (int64_t)curbuf->b_ml.ml_line_count, n); validate_virtcol(); len = STRLEN(buffer); col_print(buffer + len, IOSIZE - len, (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1); } (void)append_arg_number(curwin, buffer, IOSIZE, !shortmess(SHM_FILE)); if (dont_truncate) { /* Temporarily set msg_scroll to avoid the message being truncated. * First call msg_start() to get the message in the right place. */ msg_start(); n = msg_scroll; msg_scroll = TRUE; msg(buffer); msg_scroll = n; } else { p = msg_trunc_attr(buffer, FALSE, 0); if (restart_edit != 0 || (msg_scrolled && !need_wait_return)) /* Need to repeat the message after redrawing when: * - When restart_edit is set (otherwise there will be a delay * before redrawing). * - When the screen was scrolled but there is no wait-return * prompt. */ set_keep_msg(p, 0); } xfree(buffer); } void col_print(char_u *buf, size_t buflen, int col, int vcol) { if (col == vcol) vim_snprintf((char *)buf, buflen, "%d", col); else vim_snprintf((char *)buf, buflen, "%d-%d", col, vcol); } /* * put file name in title bar of window and in icon title */ static char_u *lasttitle = NULL; static char_u *lasticon = NULL; void maketitle(void) { char_u *p; char_u *t_str = NULL; char_u *i_name; char_u *i_str = NULL; int maxlen = 0; int len; int mustset; char_u buf[IOSIZE]; int off; if (!redrawing()) { /* Postpone updating the title when 'lazyredraw' is set. */ need_maketitle = TRUE; return; } need_maketitle = FALSE; if (!p_title && !p_icon && lasttitle == NULL && lasticon == NULL) return; if (p_title) { if (p_titlelen > 0) { maxlen = (int)(p_titlelen * Columns / 100); if (maxlen < 10) { maxlen = 10; } } t_str = buf; if (*p_titlestring != NUL) { if (stl_syntax & STL_IN_TITLE) { int use_sandbox = FALSE; int save_called_emsg = called_emsg; use_sandbox = was_set_insecurely((char_u *)"titlestring", 0); called_emsg = FALSE; build_stl_str_hl(curwin, t_str, sizeof(buf), p_titlestring, use_sandbox, 0, maxlen, NULL, NULL); if (called_emsg) set_string_option_direct((char_u *)"titlestring", -1, (char_u *)"", OPT_FREE, SID_ERROR); called_emsg |= save_called_emsg; } else t_str = p_titlestring; } else { /* format: "fname + (path) (1 of 2) - VIM" */ #define SPACE_FOR_FNAME (IOSIZE - 100) #define SPACE_FOR_DIR (IOSIZE - 20) #define SPACE_FOR_ARGNR (IOSIZE - 10) /* at least room for " - VIM" */ if (curbuf->b_fname == NULL) STRLCPY(buf, _("[No Name]"), SPACE_FOR_FNAME + 1); else { p = transstr(path_tail(curbuf->b_fname)); STRLCPY(buf, p, SPACE_FOR_FNAME + 1); xfree(p); } switch (bufIsChanged(curbuf) + (curbuf->b_p_ro * 2) + (!MODIFIABLE(curbuf) * 4)) { case 1: STRCAT(buf, " +"); break; case 2: STRCAT(buf, " ="); break; case 3: STRCAT(buf, " =+"); break; case 4: case 6: STRCAT(buf, " -"); break; case 5: case 7: STRCAT(buf, " -+"); break; } if (curbuf->b_fname != NULL) { /* Get path of file, replace home dir with ~ */ off = (int)STRLEN(buf); buf[off++] = ' '; buf[off++] = '('; home_replace(curbuf, curbuf->b_ffname, buf + off, (size_t)(SPACE_FOR_DIR - off), true); #ifdef BACKSLASH_IN_FILENAME /* avoid "c:/name" to be reduced to "c" */ if (isalpha(buf[off]) && buf[off + 1] == ':') off += 2; #endif /* remove the file name */ p = path_tail_with_sep(buf + off); if (p == buf + off) /* must be a help buffer */ STRLCPY(buf + off, _("help"), SPACE_FOR_DIR - off); else *p = NUL; /* Translate unprintable chars and concatenate. Keep some * room for the server name. When there is no room (very long * file name) use (...). */ if (off < SPACE_FOR_DIR) { p = transstr(buf + off); STRLCPY(buf + off, p, SPACE_FOR_DIR - off + 1); xfree(p); } else { STRLCPY(buf + off, "...", SPACE_FOR_ARGNR - off + 1); } STRCAT(buf, ")"); } append_arg_number(curwin, buf, SPACE_FOR_ARGNR, FALSE); STRCAT(buf, " - NVIM"); if (maxlen > 0) { /* make it shorter by removing a bit in the middle */ if (vim_strsize(buf) > maxlen) trunc_string(buf, buf, maxlen, IOSIZE); } } } mustset = ti_change(t_str, &lasttitle); if (p_icon) { i_str = buf; if (*p_iconstring != NUL) { if (stl_syntax & STL_IN_ICON) { int use_sandbox = FALSE; int save_called_emsg = called_emsg; use_sandbox = was_set_insecurely((char_u *)"iconstring", 0); called_emsg = FALSE; build_stl_str_hl(curwin, i_str, sizeof(buf), p_iconstring, use_sandbox, 0, 0, NULL, NULL); if (called_emsg) set_string_option_direct((char_u *)"iconstring", -1, (char_u *)"", OPT_FREE, SID_ERROR); called_emsg |= save_called_emsg; } else i_str = p_iconstring; } else { if (buf_spname(curbuf) != NULL) i_name = buf_spname(curbuf); else /* use file name only in icon */ i_name = path_tail(curbuf->b_ffname); *i_str = NUL; /* Truncate name at 100 bytes. */ len = (int)STRLEN(i_name); if (len > 100) { len -= 100; if (has_mbyte) len += (*mb_tail_off)(i_name, i_name + len) + 1; i_name += len; } STRCPY(i_str, i_name); trans_characters(i_str, IOSIZE); } } mustset |= ti_change(i_str, &lasticon); if (mustset) resettitle(); } /// Used for title and icon: Check if "str" differs from "*last". Set "*last" /// from "str" if it does by freeing the old value of "*last" and duplicating /// "str". /// /// @param str desired title string /// @param[in,out] last current title string // /// @return true when "*last" changed. static bool ti_change(char_u *str, char_u **last) FUNC_ATTR_WARN_UNUSED_RESULT { if ((str == NULL) != (*last == NULL) || (str != NULL && *last != NULL && STRCMP(str, *last) != 0)) { xfree(*last); if (str == NULL) { *last = NULL; } else { *last = vim_strsave(str); } return true; } return false; } /// Set current window title void resettitle(void) { ui_call_set_icon(cstr_as_string((char *)lasticon)); ui_call_set_title(cstr_as_string((char *)lasttitle)); ui_flush(); } # if defined(EXITFREE) void free_titles(void) { xfree(lasttitle); xfree(lasticon); } # endif /// Enumeration specifying the valid numeric bases that can /// be used when printing numbers in the status line. typedef enum { kNumBaseDecimal = 10, kNumBaseOctal = 8, kNumBaseHexadecimal = 16 } NumberBase; /// Build a string from the status line items in "fmt". /// Return length of string in screen cells. /// /// Normally works for window "wp", except when working for 'tabline' then it /// is "curwin". /// /// Items are drawn interspersed with the text that surrounds it /// Specials: %-(xxx%) => group, %= => separation marker, %< => truncation /// Item: %-. All but are optional /// /// If maxwidth is not zero, the string will be filled at any middle marker /// or truncated if too long, fillchar is used for all whitespace. /// /// @param wp The window to build a statusline for /// @param out The output buffer to write the statusline to /// Note: This should not be NameBuff /// @param outlen The length of the output buffer /// @param fmt The statusline format string /// @param use_sandbox Use a sandboxed environment when evaluating fmt /// @param fillchar Character to use when filling empty space in the statusline /// @param maxwidth The maximum width to make the statusline /// @param hltab HL attributes (can be NULL) /// @param tabtab Tab clicks definition (can be NULL). /// /// @return The final width of the statusline int build_stl_str_hl( win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use_sandbox, char_u fillchar, int maxwidth, struct stl_hlrec *hltab, StlClickRecord *tabtab ) { int groupitems[STL_MAX_ITEM]; struct stl_item { // Where the item starts in the status line output buffer char_u *start; // Function to run for ClickFunc items. char *cmd; // The minimum width of the item int minwid; // The maximum width of the item int maxwid; enum { Normal, Empty, Group, Separate, Highlight, TabPage, ClickFunc, Trunc } type; } items[STL_MAX_ITEM]; #define TMPLEN 70 char_u tmp[TMPLEN]; char_u *usefmt = fmt; // When the format starts with "%!" then evaluate it as an expression and // use the result as the actual format string. if (fmt[0] == '%' && fmt[1] == '!') { usefmt = eval_to_string_safe(fmt + 2, NULL, use_sandbox); if (usefmt == NULL) usefmt = fmt; } if (fillchar == 0) fillchar = ' '; // Can't handle a multi-byte fill character yet. else if (mb_char2len(fillchar) > 1) fillchar = '-'; // Get line & check if empty (cursorpos will show "0-1"). char_u *line_ptr = ml_get_buf(wp->w_buffer, wp->w_cursor.lnum, false); bool empty_line = (*line_ptr == NUL); // Get the byte value now, in case we need it below. This is more // efficient than making a copy of the line. int byteval; if (wp->w_cursor.col > (colnr_T)STRLEN(line_ptr)) byteval = 0; else byteval = (*mb_ptr2char)(line_ptr + wp->w_cursor.col); int groupdepth = 0; int curitem = 0; bool prevchar_isflag = true; bool prevchar_isitem = false; // out_p is the current position in the output buffer char_u *out_p = out; // out_end_p is the last valid character in the output buffer // Note: The null termination character must occur here or earlier, // so any user-visible characters must occur before here. char_u *out_end_p = (out + outlen) - 1; // Proceed character by character through the statusline format string // fmt_p is the current positon in the input buffer for (char_u *fmt_p = usefmt; *fmt_p; ) { if (curitem == STL_MAX_ITEM) { // There are too many items. Add the error code to the statusline // to give the user a hint about what went wrong. if (out_p + 5 < out_end_p) { memmove(out_p, " E541", (size_t)5); out_p += 5; } break; } if (*fmt_p != NUL && *fmt_p != '%') { prevchar_isflag = prevchar_isitem = false; } // Copy the formatting verbatim until we reach the end of the string // or find a formatting item (denoted by `%`) // or run out of room in our output buffer. while (*fmt_p != NUL && *fmt_p != '%' && out_p < out_end_p) *out_p++ = *fmt_p++; // If we have processed the entire format string or run out of // room in our output buffer, exit the loop. if (*fmt_p == NUL || out_p >= out_end_p) break; // The rest of this loop will handle a single `%` item. // Note: We increment here to skip over the `%` character we are currently // on so we can process the item's contents. fmt_p++; // Ignore `%` at the end of the format string if (*fmt_p == NUL) { break; } // Two `%` in a row is the escape sequence to print a // single `%` in the output buffer. if (*fmt_p == '%') { // Ignore the character if we're out of room in the output buffer. if (out_p >= out_end_p) break; *out_p++ = *fmt_p++; prevchar_isflag = prevchar_isitem = false; continue; } // STL_SEPARATE: Separation place between left and right aligned items. if (*fmt_p == STL_SEPARATE) { fmt_p++; // Ignored when we are inside of a grouping if (groupdepth > 0) { continue; } items[curitem].type = Separate; items[curitem++].start = out_p; continue; } // STL_TRUNCMARK: Where to begin truncating if the statusline is too long. if (*fmt_p == STL_TRUNCMARK) { fmt_p++; items[curitem].type = Trunc; items[curitem++].start = out_p; continue; } // The end of a grouping if (*fmt_p == ')') { fmt_p++; // Ignore if we are not actually inside a group currently if (groupdepth < 1) { continue; } groupdepth--; // Determine how long the group is. // Note: We set the current output position to null // so `vim_strsize` will work. char_u *t = items[groupitems[groupdepth]].start; *out_p = NUL; long group_len = vim_strsize(t); // If the group contained internal items // and the group did not have a minimum width, // and if there were no normal items in the group, // move the output pointer back to where the group started. // Note: This erases any non-item characters that were in the group. // Otherwise there would be no reason to do this step. if (curitem > groupitems[groupdepth] + 1 && items[groupitems[groupdepth]].minwid == 0) { bool has_normal_items = false; for (long n = groupitems[groupdepth] + 1; n < curitem; n++) { if (items[n].type == Normal || items[n].type == Highlight) { has_normal_items = true; break; } } if (!has_normal_items) { out_p = t; group_len = 0; } } // If the group is longer than it is allowed to be // truncate by removing bytes from the start of the group text. if (group_len > items[groupitems[groupdepth]].maxwid) { // { Determine the number of bytes to remove long n; if (has_mbyte) { /* Find the first character that should be included. */ n = 0; while (group_len >= items[groupitems[groupdepth]].maxwid) { group_len -= ptr2cells(t + n); n += (*mb_ptr2len)(t + n); } } else { n = (long)(out_p - t) - items[groupitems[groupdepth]].maxwid + 1; } // } // Prepend the `<` to indicate that the output was truncated. *t = '<'; // { Move the truncated output memmove(t + 1, t + n, (size_t)(out_p - (t + n))); out_p = out_p - n + 1; // Fill up space left over by half a double-wide char. while (++group_len < items[groupitems[groupdepth]].minwid) { *out_p++ = fillchar; } // } // correct the start of the items for the truncation for (int idx = groupitems[groupdepth] + 1; idx < curitem; idx++) { // Shift everything back by the number of removed bytes items[idx].start -= n; // If the item was partially or completely truncated, set its // start to the start of the group if (items[idx].start < t) { items[idx].start = t; } } // If the group is shorter than the minimum width, add padding characters. } else if (abs(items[groupitems[groupdepth]].minwid) > group_len) { long min_group_width = items[groupitems[groupdepth]].minwid; // If the group is left-aligned, add characters to the right. if (min_group_width < 0) { min_group_width = 0 - min_group_width; while (group_len++ < min_group_width && out_p < out_end_p) *out_p++ = fillchar; // If the group is right-aligned, shift everything to the right and // prepend with filler characters. } else { // { Move the group to the right memmove(t + min_group_width - group_len, t, (size_t)(out_p - t)); group_len = min_group_width - group_len; if (out_p + group_len >= (out_end_p + 1)) { group_len = (long)(out_end_p - out_p); } out_p += group_len; // } // Adjust item start positions for (int n = groupitems[groupdepth] + 1; n < curitem; n++) { items[n].start += group_len; } // Prepend the fill characters for (; group_len > 0; group_len--) { *t++ = fillchar; } } } continue; } int minwid = 0; int maxwid = 9999; bool left_align = false; // Denotes that numbers should be left-padded with zeros bool zeropad = (*fmt_p == '0'); if (zeropad) { fmt_p++; } // Denotes that the item should be left-aligned. // This is tracked by using a negative length. if (*fmt_p == '-') { fmt_p++; left_align = true; } // The first digit group is the item's min width if (ascii_isdigit(*fmt_p)) { minwid = getdigits_int(&fmt_p); if (minwid < 0) /* overflow */ minwid = 0; } // User highlight groups override the min width field // to denote the styling to use. if (*fmt_p == STL_USER_HL) { items[curitem].type = Highlight; items[curitem].start = out_p; items[curitem].minwid = minwid > 9 ? 1 : minwid; fmt_p++; curitem++; continue; } // TABPAGE pairs are used to denote a region that when clicked will // either switch to or close a tab. // // Ex: tabline=%0Ttab\ zero%X // This tabline has a TABPAGENR item with minwid `0`, // which is then closed with a TABCLOSENR item. // Clicking on this region with mouse enabled will switch to tab 0. // Setting the minwid to a different value will switch // to that tab, if it exists // // Ex: tabline=%1Xtab\ one%X // This tabline has a TABCLOSENR item with minwid `1`, // which is then closed with a TABCLOSENR item. // Clicking on this region with mouse enabled will close tab 0. // This is determined by the following formula: // tab to close = (1 - minwid) // This is because for TABPAGENR we use `minwid` = `tab number`. // For TABCLOSENR we store the tab number as a negative value. // Because 0 is a valid TABPAGENR value, we have to // start our numbering at `-1`. // So, `-1` corresponds to us wanting to close tab `0` // // Note: These options are only valid when creating a tabline. if (*fmt_p == STL_TABPAGENR || *fmt_p == STL_TABCLOSENR) { if (*fmt_p == STL_TABCLOSENR) { if (minwid == 0) { // %X ends the close label, go back to the previous tab label nr. for (long n = curitem - 1; n >= 0; n--) { if (items[n].type == TabPage && items[n].minwid >= 0) { minwid = items[n].minwid; break; } } } else { // close nrs are stored as negative values minwid = -minwid; } } items[curitem].type = TabPage; items[curitem].start = out_p; items[curitem].minwid = minwid; fmt_p++; curitem++; continue; } if (*fmt_p == STL_CLICK_FUNC) { fmt_p++; char *t = (char *) fmt_p; while (*fmt_p != STL_CLICK_FUNC && *fmt_p) { fmt_p++; } if (*fmt_p != STL_CLICK_FUNC) { break; } items[curitem].type = ClickFunc; items[curitem].start = out_p; items[curitem].cmd = xmemdupz(t, (size_t)(((char *)fmt_p - t))); items[curitem].minwid = minwid; fmt_p++; curitem++; continue; } // Denotes the end of the minwid // the maxwid may follow immediately after if (*fmt_p == '.') { fmt_p++; if (ascii_isdigit(*fmt_p)) { maxwid = getdigits_int(&fmt_p); if (maxwid <= 0) /* overflow */ maxwid = 50; } } // Bound the minimum width at 50. // Make the number negative to denote left alignment of the item minwid = (minwid > 50 ? 50 : minwid) * (left_align ? -1 : 1); // Denotes the start of a new group if (*fmt_p == '(') { groupitems[groupdepth++] = curitem; items[curitem].type = Group; items[curitem].start = out_p; items[curitem].minwid = minwid; items[curitem].maxwid = maxwid; fmt_p++; curitem++; continue; } // An invalid item was specified. // Continue processing on the next character of the format string. if (vim_strchr(STL_ALL, *fmt_p) == NULL) { fmt_p++; continue; } // The status line item type char_u opt = *fmt_p++; // OK - now for the real work NumberBase base = kNumBaseDecimal; bool itemisflag = false; bool fillable = true; long num = -1; char_u *str = NULL; switch (opt) { case STL_FILEPATH: case STL_FULLPATH: case STL_FILENAME: { // Set fillable to false so that ' ' in the filename will not // get replaced with the fillchar fillable = false; if (buf_spname(wp->w_buffer) != NULL) { STRLCPY(NameBuff, buf_spname(wp->w_buffer), MAXPATHL); } else { char_u *t = (opt == STL_FULLPATH) ? wp->w_buffer->b_ffname : wp->w_buffer->b_fname; home_replace(wp->w_buffer, t, NameBuff, MAXPATHL, true); } trans_characters(NameBuff, MAXPATHL); if (opt != STL_FILENAME) str = NameBuff; else str = path_tail(NameBuff); break; } case STL_VIM_EXPR: /* '{' */ { itemisflag = true; // Attempt to copy the expression to evaluate into // the output buffer as a null-terminated string. char_u *t = out_p; while (*fmt_p != '}' && *fmt_p != NUL && out_p < out_end_p) *out_p++ = *fmt_p++; if (*fmt_p != '}') /* missing '}' or out of space */ break; fmt_p++; *out_p = 0; // Move our position in the output buffer // to the beginning of the expression out_p = t; // { Evaluate the expression // Store the current buffer number as a string variable vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum); set_internal_string_var((char_u *)"actual_curbuf", tmp); buf_T *o_curbuf = curbuf; win_T *o_curwin = curwin; curwin = wp; curbuf = wp->w_buffer; // Note: The result stored in `t` is unused. str = eval_to_string_safe(out_p, &t, use_sandbox); curwin = o_curwin; curbuf = o_curbuf; // Remove the variable we just stored do_unlet(S_LEN("g:actual_curbuf"), true); // } // Check if the evaluated result is a number. // If so, convert the number to an int and free the string. if (str != NULL && *str != 0) { if (*skipdigits(str) == NUL) { num = atoi((char *)str); xfree(str); str = NULL; itemisflag = false; } } break; } case STL_LINE: num = (wp->w_buffer->b_ml.ml_flags & ML_EMPTY) ? 0L : (long)(wp->w_cursor.lnum); break; case STL_NUMLINES: num = wp->w_buffer->b_ml.ml_line_count; break; case STL_COLUMN: num = !(State & INSERT) && empty_line ? 0 : (int)wp->w_cursor.col + 1; break; case STL_VIRTCOL: case STL_VIRTCOL_ALT: { // In list mode virtcol needs to be recomputed colnr_T virtcol = wp->w_virtcol; if (wp->w_p_list && lcs_tab1 == NUL) { wp->w_p_list = FALSE; getvcol(wp, &wp->w_cursor, NULL, &virtcol, NULL); wp->w_p_list = TRUE; } ++virtcol; // Don't display %V if it's the same as %c. if (opt == STL_VIRTCOL_ALT && (virtcol == (colnr_T)(!(State & INSERT) && empty_line ? 0 : (int)wp->w_cursor.col + 1))) break; num = (long)virtcol; break; } case STL_PERCENTAGE: num = (int)(((long)wp->w_cursor.lnum * 100L) / (long)wp->w_buffer->b_ml.ml_line_count); break; case STL_ALTPERCENT: // Store the position percentage in our temporary buffer. // Note: We cannot store the value in `num` because // `get_rel_pos` can return a named position. Ex: "Top" get_rel_pos(wp, tmp, TMPLEN); str = tmp; break; case STL_ARGLISTSTAT: fillable = false; // Note: This is important because `append_arg_number` starts appending // at the end of the null-terminated string. // Setting the first byte to null means it will place the argument // number string at the beginning of the buffer. tmp[0] = 0; // Note: The call will only return true if it actually // appended data to the `tmp` buffer. if (append_arg_number(wp, tmp, (int)sizeof(tmp), false)) { str = tmp; } break; case STL_KEYMAP: fillable = false; if (get_keymap_str(wp, (char_u *)"<%s>", tmp, TMPLEN)) str = tmp; break; case STL_PAGENUM: num = printer_page_num; break; case STL_BUFNO: num = wp->w_buffer->b_fnum; break; case STL_OFFSET_X: base = kNumBaseHexadecimal; // fallthrough case STL_OFFSET: { long l = ml_find_line_or_offset(wp->w_buffer, wp->w_cursor.lnum, NULL); num = (wp->w_buffer->b_ml.ml_flags & ML_EMPTY) || l < 0 ? 0L : l + 1 + (!(State & INSERT) && empty_line ? 0 : (int)wp->w_cursor.col); break; } case STL_BYTEVAL_X: base = kNumBaseHexadecimal; // fallthrough case STL_BYTEVAL: num = byteval; if (num == NL) num = 0; else if (num == CAR && get_fileformat(wp->w_buffer) == EOL_MAC) num = NL; break; case STL_ROFLAG: case STL_ROFLAG_ALT: itemisflag = true; if (wp->w_buffer->b_p_ro) str = (char_u *)((opt == STL_ROFLAG_ALT) ? ",RO" : _("[RO]")); break; case STL_HELPFLAG: case STL_HELPFLAG_ALT: itemisflag = true; if (wp->w_buffer->b_help) str = (char_u *)((opt == STL_HELPFLAG_ALT) ? ",HLP" : _("[Help]")); break; case STL_FILETYPE: // Copy the filetype if it is not null and the formatted string will fit // in the temporary buffer // (including the brackets and null terminating character) if (*wp->w_buffer->b_p_ft != NUL && STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 3) { vim_snprintf((char *)tmp, sizeof(tmp), "[%s]", wp->w_buffer->b_p_ft); str = tmp; } break; case STL_FILETYPE_ALT: { itemisflag = true; // Copy the filetype if it is not null and the formatted string will fit // in the temporary buffer // (including the comma and null terminating character) if (*wp->w_buffer->b_p_ft != NUL && STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 2) { vim_snprintf((char *)tmp, sizeof(tmp), ",%s", wp->w_buffer->b_p_ft); // Uppercase the file extension for (char_u *t = tmp; *t != 0; t++) { *t = (char_u)TOUPPER_LOC(*t); } str = tmp; } break; } case STL_PREVIEWFLAG: case STL_PREVIEWFLAG_ALT: itemisflag = true; if (wp->w_p_pvw) str = (char_u *)((opt == STL_PREVIEWFLAG_ALT) ? ",PRV" : _("[Preview]")); break; case STL_QUICKFIX: if (bt_quickfix(wp->w_buffer)) str = (char_u *)(wp->w_llist_ref ? _(msg_loclist) : _(msg_qflist)); break; case STL_MODIFIED: case STL_MODIFIED_ALT: itemisflag = true; switch ((opt == STL_MODIFIED_ALT) + bufIsChanged(wp->w_buffer) * 2 + (!MODIFIABLE(wp->w_buffer)) * 4) { case 2: str = (char_u *)"[+]"; break; case 3: str = (char_u *)",+"; break; case 4: str = (char_u *)"[-]"; break; case 5: str = (char_u *)",-"; break; case 6: str = (char_u *)"[+-]"; break; case 7: str = (char_u *)",+-"; break; } break; case STL_HIGHLIGHT: { // { The name of the highlight is surrounded by `#` char_u *t = fmt_p; while (*fmt_p != '#' && *fmt_p != NUL) { ++fmt_p; } // } // Create a highlight item based on the name if (*fmt_p == '#') { items[curitem].type = Highlight; items[curitem].start = out_p; items[curitem].minwid = -syn_namen2id(t, (int)(fmt_p - t)); curitem++; fmt_p++; } continue; } } // If we made it this far, the item is normal and starts at // our current position in the output buffer. // Non-normal items would have `continued`. items[curitem].start = out_p; items[curitem].type = Normal; // Copy the item string into the output buffer if (str != NULL && *str) { // { Skip the leading `,` or ` ` if the item is a flag // and the proper conditions are met char_u *t = str; if (itemisflag) { if ((t[0] && t[1]) && ((!prevchar_isitem && *t == ',') || (prevchar_isflag && *t == ' '))) t++; prevchar_isflag = true; } // } long l = vim_strsize(t); // If this item is non-empty, record that the last thing // we put in the output buffer was an item if (l > 0) { prevchar_isitem = true; } // If the item is too wide, truncate it from the beginning if (l > maxwid) { while (l >= maxwid) if (has_mbyte) { l -= ptr2cells(t); t += (*mb_ptr2len)(t); } else { l -= byte2cells(*t++); } // Early out if there isn't enough room for the truncation marker if (out_p >= out_end_p) break; // Add the truncation marker *out_p++ = '<'; } // If the item is right aligned and not wide enough, // pad with fill characters. if (minwid > 0) { for (; l < minwid && out_p < out_end_p; l++) { // Don't put a "-" in front of a digit. if (l + 1 == minwid && fillchar == '-' && ascii_isdigit(*t)) *out_p++ = ' '; else *out_p++ = fillchar; } minwid = 0; } else { // Note: The negative value denotes a left aligned item. // Here we switch the minimum width back to a positive value. minwid *= -1; } // { Copy the string text into the output buffer while (*t && out_p < out_end_p) { *out_p++ = *t++; // Change a space by fillchar, unless fillchar is '-' and a // digit follows. if (fillable && out_p[-1] == ' ' && (!ascii_isdigit(*t) || fillchar != '-')) out_p[-1] = fillchar; } // } // For left-aligned items, fill any remaining space with the fillchar for (; l < minwid && out_p < out_end_p; l++) { *out_p++ = fillchar; } // Otherwise if the item is a number, copy that to the output buffer. } else if (num >= 0) { if (out_p + 20 > out_end_p) break; /* not sufficient space */ prevchar_isitem = true; // { Build the formatting string char_u nstr[20]; char_u *t = nstr; if (opt == STL_VIRTCOL_ALT) { *t++ = '-'; minwid--; } *t++ = '%'; if (zeropad) { *t++ = '0'; } // Note: The `*` means we take the width as one of the arguments *t++ = '*'; *t++ = (char_u) (base == kNumBaseHexadecimal ? 'X' : (base == kNumBaseOctal ? 'o' : 'd')); *t = 0; // } // { Determine how many characters the number will take up when printed // Note: We have to cast the base because the compiler uses // unsigned ints for the enum values. long num_chars = 1; for (long n = num; n >= (int) base; n /= (int) base) { num_chars++; } // VIRTCOL_ALT takes up an extra character because // of the `-` we added above. if (opt == STL_VIRTCOL_ALT) { num_chars++; } // } assert(out_end_p >= out_p); size_t remaining_buf_len = (size_t)(out_end_p - out_p) + 1; // If the number is going to take up too much room // Figure out the approximate number in "scientific" type notation. // Ex: 14532 with maxwid of 4 -> '14>3' if (num_chars > maxwid) { // Add two to the width because the power piece will take // two extra characters num_chars += 2; // How many extra characters there are long n = num_chars - maxwid; // { Reduce the number by base^n while (num_chars-- > maxwid) { num /= (long)base; } // } // { Add the format string for the exponent bit *t++ = '>'; *t++ = '%'; // Use the same base as the first number *t = t[-3]; *++t = 0; // } vim_snprintf((char *)out_p, remaining_buf_len, (char *)nstr, 0, num, n); } else { vim_snprintf((char *)out_p, remaining_buf_len, (char *)nstr, minwid, num); } // Advance the output buffer position to the end of the // number we just printed out_p += STRLEN(out_p); // Otherwise, there was nothing to print so mark the item as empty } else { items[curitem].type = Empty; } // Only free the string buffer if we allocated it. // Note: This is not needed if `str` is pointing at `tmp` if (opt == STL_VIM_EXPR) { xfree(str); } if (num >= 0 || (!itemisflag && str && *str)) prevchar_isflag = false; /* Item not NULL, but not a flag */ // Item processed, move to the next curitem++; } *out_p = NUL; int itemcnt = curitem; // Free the format buffer if we allocated it internally if (usefmt != fmt) { xfree(usefmt); } // We have now processed the entire statusline format string. // What follows is post-processing to handle alignment and highlighting. int width = vim_strsize(out); if (maxwidth > 0 && width > maxwidth) { // Result is too long, must truncate somewhere. int item_idx = 0; char_u *trunc_p; // If there are no items, truncate from beginning if (itemcnt == 0) { trunc_p = out; // Otherwise, look for the truncation item } else { // Default to truncating at the first item trunc_p = items[0].start; item_idx = 0; for (int i = 0; i < itemcnt; i++) { if (items[i].type == Trunc) { // Truncate at %< items. trunc_p = items[i].start; item_idx = i; break; } } } // If the truncation point we found is beyond the maximum // length of the string, truncate the end of the string. if (width - vim_strsize(trunc_p) >= maxwidth) { // If we are using a multi-byte encoding, walk from the beginning of the // string to find the last character that will fit. if (has_mbyte) { trunc_p = out; width = 0; for (;; ) { width += ptr2cells(trunc_p); if (width >= maxwidth) break; // Note: Only advance the pointer if the next // character will fit in the available output space trunc_p += (*mb_ptr2len)(trunc_p); } // Otherwise put the truncation point at the end, leaving enough room // for a single-character truncation marker } else { trunc_p = out + maxwidth - 1; } // Ignore any items in the statusline that occur after // the truncation point for (int i = 0; i < itemcnt; i++) { if (items[i].start > trunc_p) { itemcnt = i; break; } } // Truncate the output *trunc_p++ = '>'; *trunc_p = 0; // Truncate at the truncation point we found } else { // { Determine how many bytes to remove long trunc_len; if (has_mbyte) { trunc_len = 0; while (width >= maxwidth) { width -= ptr2cells(trunc_p + trunc_len); trunc_len += (*mb_ptr2len)(trunc_p + trunc_len); } } else { // Truncate an extra character so we can insert our `<`. trunc_len = (width - maxwidth) + 1; } // } // { Truncate the string char_u *trunc_end_p = trunc_p + trunc_len; STRMOVE(trunc_p + 1, trunc_end_p); // Put a `<` to mark where we truncated at *trunc_p = '<'; if (width + 1 < maxwidth) { // Advance the pointer to the end of the string trunc_p = trunc_p + STRLEN(trunc_p); } // Fill up for half a double-wide character. while (++width < maxwidth) { *trunc_p++ = fillchar; *trunc_p = NUL; } // } // { Change the start point for items based on // their position relative to our truncation point // Note: The offset is one less than the truncation length because // the truncation marker `<` is not counted. long item_offset = trunc_len - 1; for (int i = item_idx; i < itemcnt; i++) { // Items starting at or after the end of the truncated section need // to be moved backwards. if (items[i].start >= trunc_end_p) { items[i].start -= item_offset; // Anything inside the truncated area is set to start // at the `<` truncation character. } else { items[i].start = trunc_p; } } // } } width = maxwidth; // If there is room left in our statusline, and room left in our buffer, // add characters at the separate marker (if there is one) to // fill up the available space. } else if (width < maxwidth && STRLEN(out) + (size_t)(maxwidth - width) + 1 < outlen) { // Find how many separators there are, which we will use when // figuring out how many groups there are. int num_separators = 0; for (int i = 0; i < itemcnt; i++) { if (items[i].type == Separate) { num_separators++; } } // If we have separated groups, then we deal with it now if (num_separators) { // Create an array of the start location for each // separator mark. int separator_locations[STL_MAX_ITEM]; int index = 0; for (int i = 0; i < itemcnt; i++) { if (items[i].type == Separate) { separator_locations[index] = i; index++; } } int standard_spaces = (maxwidth - width) / num_separators; int final_spaces = (maxwidth - width) - standard_spaces * (num_separators - 1); for (int i = 0; i < num_separators; i++) { int dislocation = (i == (num_separators - 1)) ? final_spaces : standard_spaces; char_u *seploc = items[separator_locations[i]].start + dislocation; STRMOVE(seploc, items[separator_locations[i]].start); for (char_u *s = items[separator_locations[i]].start; s < seploc; s++) { *s = fillchar; } for (int item_idx = separator_locations[i] + 1; item_idx < itemcnt; item_idx++) { items[item_idx].start += dislocation; } } width = maxwidth; } } // Store the info about highlighting. if (hltab != NULL) { struct stl_hlrec *sp = hltab; for (long l = 0; l < itemcnt; l++) { if (items[l].type == Highlight) { sp->start = items[l].start; sp->userhl = items[l].minwid; sp++; } } sp->start = NULL; sp->userhl = 0; } // Store the info about tab pages labels. if (tabtab != NULL) { StlClickRecord *cur_tab_rec = tabtab; for (long l = 0; l < itemcnt; l++) { if (items[l].type == TabPage) { cur_tab_rec->start = (char *)items[l].start; if (items[l].minwid == 0) { cur_tab_rec->def.type = kStlClickDisabled; cur_tab_rec->def.tabnr = 0; } else { int tabnr = items[l].minwid; if (items[l].minwid > 0) { cur_tab_rec->def.type = kStlClickTabSwitch; } else { cur_tab_rec->def.type = kStlClickTabClose; tabnr = -tabnr; } cur_tab_rec->def.tabnr = tabnr; } cur_tab_rec->def.func = NULL; cur_tab_rec++; } else if (items[l].type == ClickFunc) { cur_tab_rec->start = (char *)items[l].start; cur_tab_rec->def.type = kStlClickFuncRun; cur_tab_rec->def.tabnr = items[l].minwid; cur_tab_rec->def.func = items[l].cmd; cur_tab_rec++; } } cur_tab_rec->start = NULL; cur_tab_rec->def.type = kStlClickDisabled; cur_tab_rec->def.tabnr = 0; cur_tab_rec->def.func = NULL; } return width; } /* * Get relative cursor position in window into "buf[buflen]", in the form 99%, * using "Top", "Bot" or "All" when appropriate. */ void get_rel_pos(win_T *wp, char_u *buf, int buflen) { // Need at least 3 chars for writing. if (buflen < 3) { return; } long above; /* number of lines above window */ long below; /* number of lines below window */ above = wp->w_topline - 1; above += diff_check_fill(wp, wp->w_topline) - wp->w_topfill; if (wp->w_topline == 1 && wp->w_topfill >= 1) { // All buffer lines are displayed and there is an indication // of filler lines, that can be considered seeing all lines. above = 0; } below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1; if (below <= 0) STRLCPY(buf, (above == 0 ? _("All") : _("Bot")), buflen); else if (above <= 0) STRLCPY(buf, _("Top"), buflen); else vim_snprintf((char *)buf, (size_t)buflen, "%2d%%", above > 1000000L ? (int)(above / ((above + below) / 100L)) : (int)(above * 100L / (above + below))); } /// Append (file 2 of 8) to "buf[buflen]", if editing more than one file. /// /// @param wp window whose buffers to check /// @param[in,out] buf string buffer to add the text to /// @param buflen length of the string buffer /// @param add_file if true, add "file" before the arg number /// /// @return true if it was appended. static bool append_arg_number(win_T *wp, char_u *buf, int buflen, bool add_file) FUNC_ATTR_NONNULL_ALL { // Nothing to do if (ARGCOUNT <= 1) { return false; } char_u *p = buf + STRLEN(buf); // go to the end of the buffer // Early out if the string is getting too long if (p - buf + 35 >= buflen) { return false; } *p++ = ' '; *p++ = '('; if (add_file) { STRCPY(p, "file "); p += 5; } vim_snprintf((char *)p, (size_t)(buflen - (p - buf)), wp->w_arg_idx_invalid ? "(%d) of %d)" : "%d of %d)", wp->w_arg_idx + 1, ARGCOUNT); return true; } /* * Make "ffname" a full file name, set "sfname" to "ffname" if not NULL. * "ffname" becomes a pointer to allocated memory (or NULL). */ void fname_expand(buf_T *buf, char_u **ffname, char_u **sfname) { if (*ffname == NULL) /* if no file name given, nothing to do */ return; if (*sfname == NULL) /* if no short file name given, use ffname */ *sfname = *ffname; *ffname = (char_u *)fix_fname((char *)*ffname); /* expand to full path */ #ifdef WIN32 if (!buf->b_p_bin) { // If the file name is a shortcut file, use the file it links to. char *rfname = os_resolve_shortcut((const char *)(*ffname)); if (rfname != NULL) { xfree(*ffname); *ffname = (char_u *)rfname; *sfname = (char_u *)rfname; } } #endif } /* * Get the file name for an argument list entry. */ char_u *alist_name(aentry_T *aep) { buf_T *bp; /* Use the name from the associated buffer if it exists. */ bp = buflist_findnr(aep->ae_fnum); if (bp == NULL || bp->b_fname == NULL) return aep->ae_fname; return bp->b_fname; } /* * do_arg_all(): Open up to 'count' windows, one for each argument. */ void do_arg_all ( int count, int forceit, /* hide buffers in current windows */ int keep_tabs /* keep current tabs, for ":tab drop file" */ ) { int i; char_u *opened; /* Array of weight for which args are open: * 0: not opened * 1: opened in other tab * 2: opened in curtab * 3: opened in curtab and curwin */ int opened_len; /* length of opened[] */ int use_firstwin = FALSE; /* use first window for arglist */ int split_ret = OK; bool p_ea_save; alist_T *alist; /* argument list to be used */ buf_T *buf; tabpage_T *tpnext; int had_tab = cmdmod.tab; win_T *old_curwin, *last_curwin; tabpage_T *old_curtab, *last_curtab; win_T *new_curwin = NULL; tabpage_T *new_curtab = NULL; assert(firstwin != NULL); // satisfy coverity if (ARGCOUNT <= 0) { /* Don't give an error message. We don't want it when the ":all" * command is in the .vimrc. */ return; } setpcmark(); opened_len = ARGCOUNT; opened = xcalloc((size_t)opened_len, 1); /* Autocommands may do anything to the argument list. Make sure it's not * freed while we are working here by "locking" it. We still have to * watch out for its size to be changed. */ alist = curwin->w_alist; ++alist->al_refcount; old_curwin = curwin; old_curtab = curtab; /* * Try closing all windows that are not in the argument list. * Also close windows that are not full width; * When 'hidden' or "forceit" set the buffer becomes hidden. * Windows that have a changed buffer and can't be hidden won't be closed. * When the ":tab" modifier was used do this for all tab pages. */ if (had_tab > 0) goto_tabpage_tp(first_tabpage, TRUE, TRUE); for (;; ) { win_T *wpnext = NULL; tpnext = curtab->tp_next; for (win_T *wp = firstwin; wp != NULL; wp = wpnext) { wpnext = wp->w_next; buf = wp->w_buffer; if (buf->b_ffname == NULL || (!keep_tabs && (buf->b_nwindows > 1 || wp->w_width != Columns))) { i = opened_len; } else { // check if the buffer in this window is in the arglist for (i = 0; i < opened_len; ++i) { if (i < alist->al_ga.ga_len && (AARGLIST(alist)[i].ae_fnum == buf->b_fnum || path_full_compare(alist_name(&AARGLIST(alist)[i]), buf->b_ffname, TRUE) & kEqualFiles)) { int weight = 1; if (old_curtab == curtab) { ++weight; if (old_curwin == wp) ++weight; } if (weight > (int)opened[i]) { opened[i] = (char_u)weight; if (i == 0) { if (new_curwin != NULL) new_curwin->w_arg_idx = opened_len; new_curwin = wp; new_curtab = curtab; } } else if (keep_tabs) i = opened_len; if (wp->w_alist != alist) { /* Use the current argument list for all windows * containing a file from it. */ alist_unlink(wp->w_alist); wp->w_alist = alist; ++wp->w_alist->al_refcount; } break; } } } wp->w_arg_idx = i; if (i == opened_len && !keep_tabs) { /* close this window */ if (P_HID(buf) || forceit || buf->b_nwindows > 1 || !bufIsChanged(buf)) { /* If the buffer was changed, and we would like to hide it, * try autowriting. */ if (!P_HID(buf) && buf->b_nwindows <= 1 && bufIsChanged(buf)) { bufref_T bufref; set_bufref(&bufref, buf); (void)autowrite(buf, false); // Check if autocommands removed the window. if (!win_valid(wp) || !bufref_valid(&bufref)) { wpnext = firstwin; // Start all over... continue; } } // don't close last window if (ONE_WINDOW && (first_tabpage->tp_next == NULL || !had_tab)) { use_firstwin = true; } else { win_close(wp, !P_HID(buf) && !bufIsChanged(buf)); // check if autocommands removed the next window if (!win_valid(wpnext)) { // start all over... wpnext = firstwin; } } } } } /* Without the ":tab" modifier only do the current tab page. */ if (had_tab == 0 || tpnext == NULL) break; /* check if autocommands removed the next tab page */ if (!valid_tabpage(tpnext)) tpnext = first_tabpage; /* start all over...*/ goto_tabpage_tp(tpnext, TRUE, TRUE); } /* * Open a window for files in the argument list that don't have one. * ARGCOUNT may change while doing this, because of autocommands. */ if (count > opened_len || count <= 0) count = opened_len; /* Don't execute Win/Buf Enter/Leave autocommands here. */ ++autocmd_no_enter; ++autocmd_no_leave; last_curwin = curwin; last_curtab = curtab; win_enter(lastwin, false); /* ":drop all" should re-use an empty window to avoid "--remote-tab" * leaving an empty tab page when executed locally. */ if (keep_tabs && bufempty() && curbuf->b_nwindows == 1 && curbuf->b_ffname == NULL && !curbuf->b_changed) use_firstwin = TRUE; for (i = 0; i < count && i < opened_len && !got_int; ++i) { if (alist == &global_alist && i == global_alist.al_ga.ga_len - 1) arg_had_last = TRUE; if (opened[i] > 0) { /* Move the already present window to below the current window */ if (curwin->w_arg_idx != i) { FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { if (wp->w_arg_idx == i) { if (keep_tabs) { new_curwin = wp; new_curtab = curtab; } else { win_move_after(wp, curwin); } break; } } } } else if (split_ret == OK) { if (!use_firstwin) { /* split current window */ p_ea_save = p_ea; p_ea = true; /* use space from all windows */ split_ret = win_split(0, WSP_ROOM | WSP_BELOW); p_ea = p_ea_save; if (split_ret == FAIL) continue; } else /* first window: do autocmd for leaving this buffer */ --autocmd_no_leave; /* * edit file "i" */ curwin->w_arg_idx = i; if (i == 0) { new_curwin = curwin; new_curtab = curtab; } (void)do_ecmd(0, alist_name(&AARGLIST(alist)[i]), NULL, NULL, ECMD_ONE, ((P_HID(curwin->w_buffer) || bufIsChanged(curwin->w_buffer)) ? ECMD_HIDE : 0) + ECMD_OLDBUF, curwin); if (use_firstwin) ++autocmd_no_leave; use_firstwin = FALSE; } os_breakcheck(); /* When ":tab" was used open a new tab for a new window repeatedly. */ if (had_tab > 0 && tabpage_index(NULL) <= p_tpm) cmdmod.tab = 9999; } /* Remove the "lock" on the argument list. */ alist_unlink(alist); autocmd_no_enter--; // restore last referenced tabpage's curwin if (last_curtab != new_curtab) { if (valid_tabpage(last_curtab)) { goto_tabpage_tp(last_curtab, true, true); } if (win_valid(last_curwin)) { win_enter(last_curwin, false); } } // to window with first arg if (valid_tabpage(new_curtab)) { goto_tabpage_tp(new_curtab, true, true); } if (win_valid(new_curwin)) { win_enter(new_curwin, false); } --autocmd_no_leave; xfree(opened); } /* * Open a window for a number of buffers. */ void ex_buffer_all(exarg_T *eap) { buf_T *buf; win_T *wp, *wpnext; int split_ret = OK; bool p_ea_save; int open_wins = 0; int r; long count; // Maximum number of windows to open. int all; // When TRUE also load inactive buffers. int had_tab = cmdmod.tab; tabpage_T *tpnext; if (eap->addr_count == 0) /* make as many windows as possible */ count = 9999; else count = eap->line2; /* make as many windows as specified */ if (eap->cmdidx == CMD_unhide || eap->cmdidx == CMD_sunhide) all = FALSE; else all = TRUE; setpcmark(); /* * Close superfluous windows (two windows for the same buffer). * Also close windows that are not full-width. */ if (had_tab > 0) goto_tabpage_tp(first_tabpage, TRUE, TRUE); for (;; ) { tpnext = curtab->tp_next; for (wp = firstwin; wp != NULL; wp = wpnext) { wpnext = wp->w_next; if ((wp->w_buffer->b_nwindows > 1 || ((cmdmod.split & WSP_VERT) ? wp->w_height + wp->w_status_height < Rows - p_ch - tabline_height() : wp->w_width != Columns) || (had_tab > 0 && wp != firstwin)) && !ONE_WINDOW && !(wp->w_closing || wp->w_buffer->b_locked > 0) ) { win_close(wp, FALSE); wpnext = firstwin; /* just in case an autocommand does something strange with windows */ tpnext = first_tabpage; /* start all over...*/ open_wins = 0; } else ++open_wins; } /* Without the ":tab" modifier only do the current tab page. */ if (had_tab == 0 || tpnext == NULL) break; goto_tabpage_tp(tpnext, TRUE, TRUE); } /* * Go through the buffer list. When a buffer doesn't have a window yet, * open one. Otherwise move the window to the right position. * Watch out for autocommands that delete buffers or windows! */ /* Don't execute Win/Buf Enter/Leave autocommands here. */ ++autocmd_no_enter; win_enter(lastwin, false); ++autocmd_no_leave; for (buf = firstbuf; buf != NULL && open_wins < count; buf = buf->b_next) { /* Check if this buffer needs a window */ if ((!all && buf->b_ml.ml_mfp == NULL) || !buf->b_p_bl) continue; if (had_tab != 0) { /* With the ":tab" modifier don't move the window. */ if (buf->b_nwindows > 0) wp = lastwin; /* buffer has a window, skip it */ else wp = NULL; } else { /* Check if this buffer already has a window */ for (wp = firstwin; wp != NULL; wp = wp->w_next) if (wp->w_buffer == buf) break; /* If the buffer already has a window, move it */ if (wp != NULL) win_move_after(wp, curwin); } if (wp == NULL && split_ret == OK) { bufref_T bufref; set_bufref(&bufref, buf); // Split the window and put the buffer in it. p_ea_save = p_ea; p_ea = true; /* use space from all windows */ split_ret = win_split(0, WSP_ROOM | WSP_BELOW); ++open_wins; p_ea = p_ea_save; if (split_ret == FAIL) continue; /* Open the buffer in this window. */ swap_exists_action = SEA_DIALOG; set_curbuf(buf, DOBUF_GOTO); if (!bufref_valid(&bufref)) { // Autocommands deleted the buffer. swap_exists_action = SEA_NONE; break; } if (swap_exists_action == SEA_QUIT) { cleanup_T cs; /* Reset the error/interrupt/exception state here so that * aborting() returns FALSE when closing a window. */ enter_cleanup(&cs); /* User selected Quit at ATTENTION prompt; close this window. */ win_close(curwin, TRUE); --open_wins; swap_exists_action = SEA_NONE; swap_exists_did_quit = TRUE; /* Restore the error/interrupt/exception state if not * discarded by a new aborting error, interrupt, or uncaught * exception. */ leave_cleanup(&cs); } else handle_swap_exists(NULL); } os_breakcheck(); if (got_int) { (void)vgetc(); /* only break the file loading, not the rest */ break; } /* Autocommands deleted the buffer or aborted script processing!!! */ if (aborting()) break; /* When ":tab" was used open a new tab for a new window repeatedly. */ if (had_tab > 0 && tabpage_index(NULL) <= p_tpm) cmdmod.tab = 9999; } --autocmd_no_enter; win_enter(firstwin, false); /* back to first window */ --autocmd_no_leave; /* * Close superfluous windows. */ for (wp = lastwin; open_wins > count; ) { r = (P_HID(wp->w_buffer) || !bufIsChanged(wp->w_buffer) || autowrite(wp->w_buffer, FALSE) == OK); if (!win_valid(wp)) { /* BufWrite Autocommands made the window invalid, start over */ wp = lastwin; } else if (r) { win_close(wp, !P_HID(wp->w_buffer)); --open_wins; wp = lastwin; } else { wp = wp->w_prev; if (wp == NULL) break; } } } /* * do_modelines() - process mode lines for the current file * * "flags" can be: * OPT_WINONLY only set options local to window * OPT_NOWIN don't set options local to window * * Returns immediately if the "ml" option isn't set. */ void do_modelines(int flags) { linenr_T lnum; int nmlines; static int entered = 0; if (!curbuf->b_p_ml || (nmlines = (int)p_mls) == 0) return; /* Disallow recursive entry here. Can happen when executing a modeline * triggers an autocommand, which reloads modelines with a ":do". */ if (entered) return; ++entered; for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count && lnum <= nmlines; ++lnum) if (chk_modeline(lnum, flags) == FAIL) nmlines = 0; for (lnum = curbuf->b_ml.ml_line_count; lnum > 0 && lnum > nmlines && lnum > curbuf->b_ml.ml_line_count - nmlines; --lnum) if (chk_modeline(lnum, flags) == FAIL) nmlines = 0; --entered; } /* * chk_modeline() - check a single line for a mode string * Return FAIL if an error encountered. */ static int chk_modeline ( linenr_T lnum, int flags /* Same as for do_modelines(). */ ) { char_u *s; char_u *e; char_u *linecopy; /* local copy of any modeline found */ int prev; intmax_t vers; int end; int retval = OK; char_u *save_sourcing_name; linenr_T save_sourcing_lnum; scid_T save_SID; prev = -1; for (s = ml_get(lnum); *s != NUL; ++s) { if (prev == -1 || ascii_isspace(prev)) { if ((prev != -1 && STRNCMP(s, "ex:", (size_t)3) == 0) || STRNCMP(s, "vi:", (size_t)3) == 0) break; /* Accept both "vim" and "Vim". */ if ((s[0] == 'v' || s[0] == 'V') && s[1] == 'i' && s[2] == 'm') { if (s[3] == '<' || s[3] == '=' || s[3] == '>') e = s + 4; else e = s + 3; if (getdigits_safe(&e, &vers) != OK) { continue; } if (*e == ':' && (s[0] != 'V' || STRNCMP(skipwhite(e + 1), "set", 3) == 0) && (s[3] == ':' || (VIM_VERSION_100 >= vers && isdigit(s[3])) || (VIM_VERSION_100 < vers && s[3] == '<') || (VIM_VERSION_100 > vers && s[3] == '>') || (VIM_VERSION_100 == vers && s[3] == '='))) { break; } } } prev = *s; } if (!*s) { return retval; } do /* skip over "ex:", "vi:" or "vim:" */ ++s; while (s[-1] != ':'); s = linecopy = vim_strsave(s); /* copy the line, it will change */ save_sourcing_lnum = sourcing_lnum; save_sourcing_name = sourcing_name; sourcing_lnum = lnum; /* prepare for emsg() */ sourcing_name = (char_u *)"modelines"; end = FALSE; while (end == FALSE) { s = skipwhite(s); if (*s == NUL) break; /* * Find end of set command: ':' or end of line. * Skip over "\:", replacing it with ":". */ for (e = s; *e != ':' && *e != NUL; ++e) if (e[0] == '\\' && e[1] == ':') STRMOVE(e, e + 1); if (*e == NUL) end = TRUE; /* * If there is a "set" command, require a terminating ':' and * ignore the stuff after the ':'. * "vi:set opt opt opt: foo" -- foo not interpreted * "vi:opt opt opt: foo" -- foo interpreted * Accept "se" for compatibility with Elvis. */ if (STRNCMP(s, "set ", (size_t)4) == 0 || STRNCMP(s, "se ", (size_t)3) == 0) { if (*e != ':') /* no terminating ':'? */ break; end = TRUE; s = vim_strchr(s, ' ') + 1; } *e = NUL; /* truncate the set command */ if (*s != NUL) { /* skip over an empty "::" */ save_SID = current_SID; current_SID = SID_MODELINE; retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags); current_SID = save_SID; if (retval == FAIL) /* stop if error found */ break; } s = e + 1; /* advance to next part */ } sourcing_lnum = save_sourcing_lnum; sourcing_name = save_sourcing_name; xfree(linecopy); return retval; } /* * Return special buffer name. * Returns NULL when the buffer has a normal file name. */ char_u *buf_spname(buf_T *buf) { if (bt_quickfix(buf)) { win_T *win; tabpage_T *tp; /* * For location list window, w_llist_ref points to the location list. * For quickfix window, w_llist_ref is NULL. */ if (find_win_for_buf(buf, &win, &tp) && win->w_llist_ref != NULL) return (char_u *)_(msg_loclist); else return (char_u *)_(msg_qflist); } /* There is no _file_ when 'buftype' is "nofile", b_sfname * contains the name as specified by the user */ if (bt_nofile(buf)) { if (buf->b_sfname != NULL) return buf->b_sfname; return (char_u *)_("[Scratch]"); } if (buf->b_fname == NULL) return (char_u *)_("[No Name]"); return NULL; } /// Find a window for buffer "buf". /// If found true is returned and "wp" and "tp" are set to /// the window and tabpage. /// If not found, false is returned. /// /// @param buf buffer to find a window for /// @param[out] wp stores the found window /// @param[out] tp stores the found tabpage /// /// @return true if a window was found for the buffer. bool find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp) { *wp = NULL; *tp = NULL; FOR_ALL_TAB_WINDOWS(tp2, wp2) { if (wp2->w_buffer == buf) { *tp = tp2; *wp = wp2; return true; } } return false; } /* * Insert the sign into the signlist. */ static void insert_sign( buf_T *buf, /* buffer to store sign in */ signlist_T *prev, /* previous sign entry */ signlist_T *next, /* next sign entry */ int id, /* sign ID */ linenr_T lnum, /* line number which gets the mark */ int typenr /* typenr of sign we are adding */ ) { signlist_T *newsign = xmalloc(sizeof(signlist_T)); newsign->id = id; newsign->lnum = lnum; newsign->typenr = typenr; newsign->next = next; if (prev == NULL) { /* When adding first sign need to redraw the windows to create the * column for signs. */ if (buf->b_signlist == NULL) { redraw_buf_later(buf, NOT_VALID); changed_cline_bef_curs(); } /* first sign in signlist */ buf->b_signlist = newsign; } else { prev->next = newsign; } } /* * Add the sign into the signlist. Find the right spot to do it though. */ void buf_addsign( buf_T *buf, /* buffer to store sign in */ int id, /* sign ID */ linenr_T lnum, /* line number which gets the mark */ int typenr /* typenr of sign we are adding */ ) { signlist_T *sign; /* a sign in the signlist */ signlist_T *prev; /* the previous sign */ prev = NULL; for (sign = buf->b_signlist; sign != NULL; sign = sign->next) { if (lnum == sign->lnum && id == sign->id) { sign->typenr = typenr; return; } else if ((lnum == sign->lnum && id != sign->id) || (id < 0 && lnum < sign->lnum)) { // attempt to keep signs sorted by lnum insert_sign(buf, prev, sign, id, lnum, typenr); return; } prev = sign; } insert_sign(buf, prev, sign, id, lnum, typenr); return; } // For an existing, placed sign "markId" change the type to "typenr". // Returns the line number of the sign, or zero if the sign is not found. linenr_T buf_change_sign_type( buf_T *buf, /* buffer to store sign in */ int markId, /* sign ID */ int typenr /* typenr of sign we are adding */ ) { signlist_T *sign; /* a sign in the signlist */ for (sign = buf->b_signlist; sign != NULL; sign = sign->next) { if (sign->id == markId) { sign->typenr = typenr; return sign->lnum; } } return (linenr_T)0; } int buf_getsigntype( buf_T *buf, linenr_T lnum, int type /* SIGN_ICON, SIGN_TEXT, SIGN_ANY, SIGN_LINEHL */ ) { signlist_T *sign; /* a sign in a b_signlist */ for (sign = buf->b_signlist; sign != NULL; sign = sign->next) { if (sign->lnum == lnum && (type == SIGN_ANY || (type == SIGN_TEXT && sign_get_text(sign->typenr) != NULL) || (type == SIGN_LINEHL && sign_get_attr(sign->typenr, TRUE) != 0))) { return sign->typenr; } } return 0; } linenr_T buf_delsign( buf_T *buf, /* buffer sign is stored in */ int id /* sign id */ ) { signlist_T **lastp; /* pointer to pointer to current sign */ signlist_T *sign; /* a sign in a b_signlist */ signlist_T *next; /* the next sign in a b_signlist */ linenr_T lnum; /* line number whose sign was deleted */ lastp = &buf->b_signlist; lnum = 0; for (sign = buf->b_signlist; sign != NULL; sign = next) { next = sign->next; if (sign->id == id) { *lastp = next; lnum = sign->lnum; xfree(sign); break; } else { lastp = &sign->next; } } /* When deleted the last sign needs to redraw the windows to remove the * sign column. */ if (buf->b_signlist == NULL) { redraw_buf_later(buf, NOT_VALID); changed_cline_bef_curs(); } return lnum; } /* * Find the line number of the sign with the requested id. If the sign does * not exist, return 0 as the line number. This will still let the correct file * get loaded. */ int buf_findsign( buf_T *buf, /* buffer to store sign in */ int id /* sign ID */ ) { signlist_T *sign; /* a sign in the signlist */ for (sign = buf->b_signlist; sign != NULL; sign = sign->next) { if (sign->id == id) { return (int)sign->lnum; } } return 0; } int buf_findsign_id( buf_T *buf, /* buffer whose sign we are searching for */ linenr_T lnum /* line number of sign */ ) { signlist_T *sign; /* a sign in the signlist */ for (sign = buf->b_signlist; sign != NULL; sign = sign->next) { if (sign->lnum == lnum) { return sign->id; } } return 0; } /* * Delete signs in buffer "buf". */ void buf_delete_signs(buf_T *buf) { signlist_T *next; // When deleting the last sign need to redraw the windows to remove the // sign column. Not when curwin is NULL (this means we're exiting). if (buf->b_signlist != NULL && curwin != NULL){ redraw_buf_later(buf, NOT_VALID); changed_cline_bef_curs(); } while (buf->b_signlist != NULL) { next = buf->b_signlist->next; xfree(buf->b_signlist); buf->b_signlist = next; } } /* * Delete all signs in all buffers. */ void buf_delete_all_signs(void) { FOR_ALL_BUFFERS(buf) { if (buf->b_signlist != NULL) { buf_delete_signs(buf); } } } /* * List placed signs for "rbuf". If "rbuf" is NULL do it for all buffers. */ void sign_list_placed(buf_T *rbuf) { buf_T *buf; signlist_T *p; char lbuf[BUFSIZ]; MSG_PUTS_TITLE(_("\n--- Signs ---")); msg_putchar('\n'); if (rbuf == NULL) { buf = firstbuf; } else { buf = rbuf; } while (buf != NULL && !got_int) { if (buf->b_signlist != NULL) { vim_snprintf(lbuf, BUFSIZ, _("Signs for %s:"), buf->b_fname); MSG_PUTS_ATTR(lbuf, hl_attr(HLF_D)); msg_putchar('\n'); } for (p = buf->b_signlist; p != NULL && !got_int; p = p->next) { vim_snprintf(lbuf, BUFSIZ, _(" line=%" PRId64 " id=%d name=%s"), (int64_t)p->lnum, p->id, sign_typenr2name(p->typenr)); MSG_PUTS(lbuf); msg_putchar('\n'); } if (rbuf != NULL) { break; } buf = buf->b_next; } } /* * Adjust a placed sign for inserted/deleted lines. */ void sign_mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after) { signlist_T *sign; /* a sign in a b_signlist */ for (sign = curbuf->b_signlist; sign != NULL; sign = sign->next) { if (sign->lnum >= line1 && sign->lnum <= line2) { if (amount == MAXLNUM) { sign->lnum = line1; } else { sign->lnum += amount; } } else if (sign->lnum > line2) sign->lnum += amount_after; } } // bufhl: plugin highlights associated with a buffer /// Get reference to line in kbtree_t /// /// @param b the three /// @param line the linenumber to lookup /// @param put if true, put a new line when not found /// if false, return NULL when not found BufhlLine *bufhl_tree_ref(BufhlInfo *b, linenr_T line, bool put) { BufhlLine t = BUFHLLINE_INIT(line); // kp_put() only works if key is absent, try get first BufhlLine **pp = kb_get(bufhl, b, &t); if (pp) { return *pp; } else if (!put) { return NULL; } BufhlLine *p = xmalloc(sizeof(*p)); *p = (BufhlLine)BUFHLLINE_INIT(line); kb_put(bufhl, b, p); return p; } /// Adds a highlight to buffer. /// /// Unlike matchaddpos() highlights follow changes to line numbering (as lines /// are inserted/removed above the highlighted line), like signs and marks do. /// /// When called with "src_id" set to 0, a unique source id is generated and /// returned. Succesive calls can pass it in as "src_id" to add new highlights /// to the same source group. All highlights in the same group can be cleared /// at once. If the highlight never will be manually deleted pass in -1 for /// "src_id" /// /// if "hl_id" or "lnum" is invalid no highlight is added, but a new src_id /// is still returned. /// /// @param buf The buffer to add highlights to /// @param src_id src_id to use or 0 to use a new src_id group, /// or -1 for ungrouped highlight. /// @param hl_id Id of the highlight group to use /// @param lnum The line to highlight /// @param col_start First column to highlight /// @param col_end The last column to highlight, /// or -1 to highlight to end of line /// @return The src_id that was used int bufhl_add_hl(buf_T *buf, int src_id, int hl_id, linenr_T lnum, colnr_T col_start, colnr_T col_end) { static int next_src_id = 1; if (src_id == 0) { src_id = next_src_id++; } if (hl_id <= 0) { // no highlight group or invalid line, just return src_id return src_id; } BufhlLine *lineinfo = bufhl_tree_ref(&buf->b_bufhl_info, lnum, true); BufhlItem *hlentry = kv_pushp(lineinfo->items); hlentry->src_id = src_id; hlentry->hl_id = hl_id; hlentry->start = col_start; hlentry->stop = col_end; if (0 < lnum && lnum <= buf->b_ml.ml_line_count) { changed_lines_buf(buf, lnum, lnum+1, 0); redraw_buf_later(buf, VALID); } return src_id; } /// Add highlighting to a buffer, bounded by two cursor positions, /// with an offset. /// /// @param buf Buffer to add highlights to /// @param src_id src_id to use or 0 to use a new src_id group, /// or -1 for ungrouped highlight. /// @param hl_id Highlight group id /// @param pos_start Cursor position to start the hightlighting at /// @param pos_end Cursor position to end the highlighting at /// @param offset Move the whole highlighting this many columns to the right void bufhl_add_hl_pos_offset(buf_T *buf, int src_id, int hl_id, lpos_T pos_start, lpos_T pos_end, colnr_T offset) { colnr_T hl_start = 0; colnr_T hl_end = 0; for (linenr_T lnum = pos_start.lnum; lnum <= pos_end.lnum; lnum ++) { if (pos_start.lnum < lnum && lnum < pos_end.lnum) { hl_start = offset; hl_end = MAXCOL; } else if (lnum == pos_start.lnum && lnum < pos_end.lnum) { hl_start = pos_start.col + offset + 1; hl_end = MAXCOL; } else if (pos_start.lnum < lnum && lnum == pos_end.lnum) { hl_start = offset; hl_end = pos_end.col + offset; } else if (pos_start.lnum == lnum && pos_end.lnum == lnum) { hl_start = pos_start.col + offset + 1; hl_end = pos_end.col + offset; } (void)bufhl_add_hl(buf, src_id, hl_id, lnum, hl_start, hl_end); } } /// Clear bufhl highlights from a given source group and range of lines. /// /// @param buf The buffer to remove highlights from /// @param src_id highlight source group to clear, or -1 to clear all groups. /// @param line_start first line to clear /// @param line_end last line to clear or MAXLNUM to clear to end of file. void bufhl_clear_line_range(buf_T *buf, int src_id, linenr_T line_start, linenr_T line_end) { linenr_T first_changed = MAXLNUM, last_changed = -1; kbitr_t(bufhl) itr; BufhlLine *l, t = BUFHLLINE_INIT(line_start); if (!kb_itr_get(bufhl, &buf->b_bufhl_info, &t, &itr)) { kb_itr_next(bufhl, &buf->b_bufhl_info, &itr); } for (; kb_itr_valid(&itr); kb_itr_next(bufhl, &buf->b_bufhl_info, &itr)) { l = kb_itr_key(&itr); linenr_T line = l->line; if (line > line_end) { break; } if (line_start <= line && line <= line_end) { BufhlLineStatus status = bufhl_clear_line(l, src_id, line); if (status != kBLSUnchanged) { if (line > last_changed) { last_changed = line; } if (line < first_changed) { first_changed = line; } } if (status == kBLSDeleted) { kb_del_itr(bufhl, &buf->b_bufhl_info, &itr); xfree(l); } } } if (last_changed != -1) { changed_lines_buf(buf, first_changed, last_changed+1, 0); redraw_buf_later(buf, VALID); } } /// Clear bufhl highlights from a given source group and given line /// /// @param bufhl_info The highlight info for the buffer /// @param src_id Highlight source group to clear, or -1 to clear all groups. /// @param lnum Linenr where the highlight should be cleared static BufhlLineStatus bufhl_clear_line(BufhlLine *lineinfo, int src_id, linenr_T lnum) { size_t oldsize = kv_size(lineinfo->items); if (src_id < 0) { kv_size(lineinfo->items) = 0; } else { size_t newidx = 0; for (size_t i = 0; i < kv_size(lineinfo->items); i++) { if (kv_A(lineinfo->items, i).src_id != src_id) { if (i != newidx) { kv_A(lineinfo->items, newidx) = kv_A(lineinfo->items, i); } newidx++; } } kv_size(lineinfo->items) = newidx; } if (kv_size(lineinfo->items) == 0) { kv_destroy(lineinfo->items); return kBLSDeleted; } return kv_size(lineinfo->items) != oldsize ? kBLSChanged : kBLSUnchanged; } /// Remove all highlights and free the highlight data void bufhl_clear_all(buf_T *buf) { bufhl_clear_line_range(buf, -1, 1, MAXLNUM); kb_destroy(bufhl, (&buf->b_bufhl_info)); kb_init(&buf->b_bufhl_info); kv_destroy(buf->b_bufhl_move_space); kv_init(buf->b_bufhl_move_space); } /// Adjust a placed highlight for inserted/deleted lines. void bufhl_mark_adjust(buf_T* buf, linenr_T line1, linenr_T line2, long amount, long amount_after, bool end_temp) { kbitr_t(bufhl) itr; BufhlLine *l, t = BUFHLLINE_INIT(line1); if (end_temp && amount < 0) { // Move all items from b_bufhl_move_space to the btree. for (size_t i = 0; i < kv_size(buf->b_bufhl_move_space); i++) { l = kv_A(buf->b_bufhl_move_space, i); l->line += amount; kb_put(bufhl, &buf->b_bufhl_info, l); } kv_size(buf->b_bufhl_move_space) = 0; return; } if (!kb_itr_get(bufhl, &buf->b_bufhl_info, &t, &itr)) { kb_itr_next(bufhl, &buf->b_bufhl_info, &itr); } for (; kb_itr_valid(&itr); kb_itr_next(bufhl, &buf->b_bufhl_info, &itr)) { l = kb_itr_key(&itr); if (l->line >= line1 && l->line <= line2) { if (end_temp && amount > 0) { kb_del_itr(bufhl, &buf->b_bufhl_info, &itr); kv_push(buf->b_bufhl_move_space, l); } if (amount == MAXLNUM) { if (bufhl_clear_line(l, -1, l->line) == kBLSDeleted) { kb_del_itr(bufhl, &buf->b_bufhl_info, &itr); xfree(l); } else { assert(false); } } else { l->line += amount; } } else if (l->line > line2) { if (amount_after == 0) { break; } l->line += amount_after; } } } /// Get highlights to display at a specific line /// /// @param buf The buffer handle /// @param lnum The line number /// @param[out] info The highligts for the line /// @return true if there was highlights to display bool bufhl_start_line(buf_T *buf, linenr_T lnum, BufhlLineInfo *info) { BufhlLine *lineinfo = bufhl_tree_ref(&buf->b_bufhl_info, lnum, false); if (!lineinfo) { return false; } info->valid_to = -1; info->entries = lineinfo->items; return kv_size(info->entries) > 0; } /// get highlighting at column col /// /// It is is assumed this will be called with /// non-decreasing column nrs, so that it is /// possible to only recalculate highlights /// at endpoints. /// /// @param info The info returned by bufhl_start_line /// @param col The column to get the attr for /// @return The highilight attr to display at the column int bufhl_get_attr(BufhlLineInfo *info, colnr_T col) { if (col <= info->valid_to) { return info->current; } int attr = 0; info->valid_to = MAXCOL; for (size_t i = 0; i < kv_size(info->entries); i++) { BufhlItem entry = kv_A(info->entries, i); if (entry.start <= col && col <= entry.stop) { int entry_attr = syn_id2attr(entry.hl_id); attr = hl_combine_attr(attr, entry_attr); if (entry.stop < info->valid_to) { info->valid_to = entry.stop; } } else if (col < entry.start && entry.start-1 < info->valid_to) { info->valid_to = entry.start-1; } } info->current = attr; return attr; } /* * Set 'buflisted' for curbuf to "on" and trigger autocommands if it changed. */ void set_buflisted(int on) { if (on != curbuf->b_p_bl) { curbuf->b_p_bl = on; if (on) apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, curbuf); else apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf); } } /// Read the file for "buf" again and check if the contents changed. /// Return true if it changed or this could not be checked. /// /// @param buf buffer to check /// /// @return true if the buffer's contents have changed bool buf_contents_changed(buf_T *buf) FUNC_ATTR_NONNULL_ALL { bool differ = true; // Allocate a buffer without putting it in the buffer list. buf_T *newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY); if (newbuf == NULL) { return true; } // Force the 'fileencoding' and 'fileformat' to be equal. exarg_T ea; prep_exarg(&ea, buf); // set curwin/curbuf to buf and save a few things aco_save_T aco; aucmd_prepbuf(&aco, newbuf); if (ml_open(curbuf) == OK && readfile(buf->b_ffname, buf->b_fname, (linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM, &ea, READ_NEW | READ_DUMMY) == OK) { // compare the two files line by line if (buf->b_ml.ml_line_count == curbuf->b_ml.ml_line_count) { differ = false; for (linenr_T lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum) { if (STRCMP(ml_get_buf(buf, lnum, false), ml_get(lnum)) != 0) { differ = true; break; } } } } xfree(ea.cmd); // restore curwin/curbuf and a few other things aucmd_restbuf(&aco); if (curbuf != newbuf) { // safety check wipe_buffer(newbuf, false); } return differ; } /* * Wipe out a buffer and decrement the last buffer number if it was used for * this buffer. Call this to wipe out a temp buffer that does not contain any * marks. */ void wipe_buffer ( buf_T *buf, int aucmd /* When TRUE trigger autocommands. */ ) { if (!aucmd) { // Don't trigger BufDelete autocommands here. block_autocmds(); } close_buffer(NULL, buf, DOBUF_WIPE, false); if (!aucmd) { unblock_autocmds(); } } /// Creates or switches to a scratch buffer. :h special-buffers /// Scratch buffer is: /// - buftype=nofile bufhidden=hide noswapfile /// - Always considered 'nomodified' /// /// @param bufnr Buffer to switch to, or 0 to create a new buffer. /// /// @see curbufIsChanged() void buf_open_scratch(handle_T bufnr, char *bufname) { (void)do_ecmd((int)bufnr, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL); (void)setfname(curbuf, (char_u *)bufname, NULL, true); set_option_value("bh", 0L, "hide", OPT_LOCAL); set_option_value("bt", 0L, "nofile", OPT_LOCAL); set_option_value("swf", 0L, NULL, OPT_LOCAL); RESET_BINDING(curwin); } neovim-0.2.2/src/nvim/buffer.h000066400000000000000000000102131320401574200161650ustar00rootroot00000000000000#ifndef NVIM_BUFFER_H #define NVIM_BUFFER_H #include "nvim/vim.h" #include "nvim/window.h" #include "nvim/pos.h" // for linenr_T #include "nvim/ex_cmds_defs.h" // for exarg_T #include "nvim/screen.h" // for StlClickRecord #include "nvim/func_attr.h" #include "nvim/eval.h" #include "nvim/macros.h" // Values for buflist_getfile() enum getf_values { GETF_SETMARK = 0x01, // set pcmark before jumping GETF_ALT = 0x02, // jumping to alternate file (not buf num) GETF_SWITCH = 0x04, // respect 'switchbuf' settings when jumping }; // Values for buflist_new() flags enum bln_values { BLN_CURBUF = 1, // May re-use curbuf for new buffer BLN_LISTED = 2, // Put new buffer in buffer list BLN_DUMMY = 4, // Allocating dummy buffer // TODO(mhinz): merge patch that introduces BLN_NEW BLN_NOOPT = 16, // Don't copy options to existing buffer }; // Values for action argument for do_buffer() enum dobuf_action_values { DOBUF_GOTO = 0, // go to specified buffer DOBUF_SPLIT = 1, // split window and go to specified buffer DOBUF_UNLOAD = 2, // unload specified buffer(s) DOBUF_DEL = 3, // delete specified buffer(s) from buflist DOBUF_WIPE = 4, // delete specified buffer(s) really }; // Values for start argument for do_buffer() enum dobuf_start_values { DOBUF_CURRENT = 0, // "count" buffer from current buffer DOBUF_FIRST = 1, // "count" buffer from first buffer DOBUF_LAST = 2, // "count" buffer from last buffer DOBUF_MOD = 3, // "count" mod. buffer from current buffer }; // flags for buf_freeall() enum bfa_values { BFA_DEL = 1, // buffer is going to be deleted BFA_WIPE = 2, // buffer is going to be wiped out BFA_KEEP_UNDO = 4, // do not free undo information }; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "buffer.h.generated.h" #endif // Find a window that contains "buf" and switch to it. // If there is no such window, use the current window and change "curbuf". // Caller must initialize save_curbuf to NULL. // restore_win_for_buf() MUST be called later! static inline void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, bufref_T *save_curbuf) { win_T *wp; tabpage_T *tp; if (!find_win_for_buf(buf, &wp, &tp) || switch_win(save_curwinp, save_curtabp, wp, tp, true) == FAIL) { switch_buffer(save_curbuf, buf); } } static inline void restore_win_for_buf(win_T *save_curwin, tabpage_T *save_curtab, bufref_T *save_curbuf) { if (save_curbuf->br_buf == NULL) { restore_win(save_curwin, save_curtab, true); } else { restore_buffer(save_curbuf); } } static inline void buf_set_changedtick(buf_T *const buf, const varnumber_T changedtick) REAL_FATTR_NONNULL_ALL REAL_FATTR_ALWAYS_INLINE; /// Set b_changedtick and corresponding variable /// /// @param[out] buf Buffer to set changedtick in. /// @param[in] changedtick New value. static inline void buf_set_changedtick(buf_T *const buf, const varnumber_T changedtick) { #ifndef NDEBUG dictitem_T *const changedtick_di = tv_dict_find( buf->b_vars, S_LEN("changedtick")); assert(changedtick_di != NULL); assert(changedtick_di->di_tv.v_type == VAR_NUMBER); assert(changedtick_di->di_tv.v_lock == VAR_FIXED); // For some reason formatc does not like the below. # ifndef UNIT_TESTING_LUA_PREPROCESSING assert(changedtick_di->di_flags == (DI_FLAGS_RO|DI_FLAGS_FIX)); # endif assert(changedtick_di == (dictitem_T *)&buf->changedtick_di); assert(&buf->b_changedtick // -V501 == &buf->changedtick_di.di_tv.vval.v_number); #endif buf->b_changedtick = changedtick; } #define WITH_BUFFER(b, code) \ do { \ win_T *save_curwin = NULL; \ tabpage_T *save_curtab = NULL; \ bufref_T save_curbuf = { NULL, 0, 0 }; \ switch_to_win_for_buf(b, &save_curwin, &save_curtab, &save_curbuf); \ code; \ restore_win_for_buf(save_curwin, save_curtab, &save_curbuf); \ } while (0) #endif // NVIM_BUFFER_H neovim-0.2.2/src/nvim/buffer_defs.h000066400000000000000000001416111320401574200171750ustar00rootroot00000000000000#ifndef NVIM_BUFFER_DEFS_H #define NVIM_BUFFER_DEFS_H #include #include // for FILE #include typedef struct file_buffer buf_T; // Forward declaration // Reference to a buffer that stores the value of buf_free_count. // bufref_valid() only needs to check "buf" when the count differs. typedef struct { buf_T *br_buf; int br_fnum; int br_buf_free_count; } bufref_T; // for garray_T #include "nvim/garray.h" // for HLF_COUNT #include "nvim/highlight_defs.h" // for pos_T, lpos_T and linenr_T #include "nvim/pos.h" // for the number window-local and buffer-local options #include "nvim/option_defs.h" // for jump list and tag stack sizes in a buffer and mark types #include "nvim/mark_defs.h" // for u_header_T; needs buf_T. #include "nvim/undo_defs.h" // for hashtab_T #include "nvim/hashtab.h" // for dict_T #include "nvim/eval/typval.h" // for proftime_T #include "nvim/profile.h" // for String #include "nvim/api/private/defs.h" // for Map(K, V) #include "nvim/map.h" #define MODIFIABLE(buf) (buf->b_p_ma) /* * Flags for w_valid. * These are set when something in a window structure becomes invalid, except * when the cursor is moved. Call check_cursor_moved() before testing one of * the flags. * These are reset when that thing has been updated and is valid again. * * Every function that invalidates one of these must call one of the * invalidate_* functions. * * w_valid is supposed to be used only in screen.c. From other files, use the * functions that set or reset the flags. * * VALID_BOTLINE VALID_BOTLINE_AP * on on w_botline valid * off on w_botline approximated * off off w_botline not valid * on off not possible */ #define VALID_WROW 0x01 /* w_wrow (window row) is valid */ #define VALID_WCOL 0x02 /* w_wcol (window col) is valid */ #define VALID_VIRTCOL 0x04 /* w_virtcol (file col) is valid */ #define VALID_CHEIGHT 0x08 /* w_cline_height and w_cline_folded valid */ #define VALID_CROW 0x10 /* w_cline_row is valid */ #define VALID_BOTLINE 0x20 /* w_botine and w_empty_rows are valid */ #define VALID_BOTLINE_AP 0x40 /* w_botine is approximated */ #define VALID_TOPLINE 0x80 /* w_topline is valid (for cursor position) */ // flags for b_flags #define BF_RECOVERED 0x01 // buffer has been recovered #define BF_CHECK_RO 0x02 // need to check readonly when loading file // into buffer (set by ":e", may be reset by // ":buf") #define BF_NEVERLOADED 0x04 // file has never been loaded into buffer, // many variables still need to be set #define BF_NOTEDITED 0x08 // Set when file name is changed after // starting to edit, reset when file is // written out. #define BF_NEW 0x10 // file didn't exist when editing started #define BF_NEW_W 0x20 // Warned for BF_NEW and file created #define BF_READERR 0x40 // got errors while reading the file #define BF_DUMMY 0x80 // dummy buffer, only used internally #define BF_PRESERVED 0x100 // ":preserve" was used /* Mask to check for flags that prevent normal writing */ #define BF_WRITE_MASK (BF_NOTEDITED + BF_NEW + BF_READERR) typedef struct window_S win_T; typedef struct wininfo_S wininfo_T; typedef struct frame_S frame_T; // for struct memline (it needs memfile_T) #include "nvim/memline_defs.h" // for struct memfile, bhdr_T, blocknr_T... (it needs buf_T) #include "nvim/memfile_defs.h" // for regprog_T. Needs win_T and buf_T. #include "nvim/regexp_defs.h" // for synstate_T (needs reg_extmatch_T, win_T, buf_T) #include "nvim/syntax_defs.h" // for signlist_T #include "nvim/sign_defs.h" // for bufhl_*_T #include "nvim/bufhl_defs.h" #include "nvim/os/fs_defs.h" // for FileID #include "nvim/terminal.h" // for Terminal /* * The taggy struct is used to store the information about a :tag command. */ typedef struct taggy { char_u *tagname; /* tag name */ fmark_T fmark; /* cursor position BEFORE ":tag" */ int cur_match; /* match number */ int cur_fnum; /* buffer number used for cur_match */ } taggy_T; typedef struct buffblock buffblock_T; typedef struct buffheader buffheader_T; /* * structure used to store one block of the stuff/redo/recording buffers */ struct buffblock { buffblock_T *b_next; // pointer to next buffblock char_u b_str[1]; // contents (actually longer) }; /* * header used for the stuff buffer and the redo buffer */ struct buffheader { buffblock_T bh_first; // first (dummy) block of list buffblock_T *bh_curr; // buffblock for appending size_t bh_index; // index for reading size_t bh_space; // space in bh_curr for appending }; /* * Structure that contains all options that are local to a window. * Used twice in a window: for the current buffer and for all buffers. * Also used in wininfo_T. */ typedef struct { int wo_arab; # define w_p_arab w_onebuf_opt.wo_arab /* 'arabic' */ int wo_bri; # define w_p_bri w_onebuf_opt.wo_bri /* 'breakindent' */ char_u *wo_briopt; # define w_p_briopt w_onebuf_opt.wo_briopt /* 'breakindentopt' */ int wo_diff; # define w_p_diff w_onebuf_opt.wo_diff /* 'diff' */ long wo_fdc; # define w_p_fdc w_onebuf_opt.wo_fdc /* 'foldcolumn' */ int wo_fdc_save; # define w_p_fdc_save w_onebuf_opt.wo_fdc_save /* 'foldenable' saved for diff mode */ int wo_fen; # define w_p_fen w_onebuf_opt.wo_fen /* 'foldenable' */ int wo_fen_save; # define w_p_fen_save w_onebuf_opt.wo_fen_save /* 'foldenable' saved for diff mode */ char_u *wo_fdi; # define w_p_fdi w_onebuf_opt.wo_fdi /* 'foldignore' */ long wo_fdl; # define w_p_fdl w_onebuf_opt.wo_fdl /* 'foldlevel' */ int wo_fdl_save; # define w_p_fdl_save w_onebuf_opt.wo_fdl_save /* 'foldlevel' state saved for diff mode */ char_u *wo_fdm; # define w_p_fdm w_onebuf_opt.wo_fdm /* 'foldmethod' */ char_u *wo_fdm_save; # define w_p_fdm_save w_onebuf_opt.wo_fdm_save /* 'fdm' saved for diff mode */ long wo_fml; # define w_p_fml w_onebuf_opt.wo_fml /* 'foldminlines' */ long wo_fdn; # define w_p_fdn w_onebuf_opt.wo_fdn /* 'foldnestmax' */ char_u *wo_fde; # define w_p_fde w_onebuf_opt.wo_fde /* 'foldexpr' */ char_u *wo_fdt; # define w_p_fdt w_onebuf_opt.wo_fdt /* 'foldtext' */ char_u *wo_fmr; # define w_p_fmr w_onebuf_opt.wo_fmr /* 'foldmarker' */ int wo_lbr; # define w_p_lbr w_onebuf_opt.wo_lbr /* 'linebreak' */ int wo_list; #define w_p_list w_onebuf_opt.wo_list /* 'list' */ int wo_nu; #define w_p_nu w_onebuf_opt.wo_nu /* 'number' */ int wo_rnu; #define w_p_rnu w_onebuf_opt.wo_rnu /* 'relativenumber' */ long wo_nuw; # define w_p_nuw w_onebuf_opt.wo_nuw /* 'numberwidth' */ int wo_wfh; # define w_p_wfh w_onebuf_opt.wo_wfh /* 'winfixheight' */ int wo_wfw; # define w_p_wfw w_onebuf_opt.wo_wfw /* 'winfixwidth' */ int wo_pvw; # define w_p_pvw w_onebuf_opt.wo_pvw /* 'previewwindow' */ int wo_rl; # define w_p_rl w_onebuf_opt.wo_rl /* 'rightleft' */ char_u *wo_rlc; # define w_p_rlc w_onebuf_opt.wo_rlc /* 'rightleftcmd' */ long wo_scr; #define w_p_scr w_onebuf_opt.wo_scr /* 'scroll' */ int wo_spell; # define w_p_spell w_onebuf_opt.wo_spell /* 'spell' */ int wo_cuc; # define w_p_cuc w_onebuf_opt.wo_cuc /* 'cursorcolumn' */ int wo_cul; # define w_p_cul w_onebuf_opt.wo_cul /* 'cursorline' */ char_u *wo_cc; # define w_p_cc w_onebuf_opt.wo_cc /* 'colorcolumn' */ char_u *wo_stl; #define w_p_stl w_onebuf_opt.wo_stl /* 'statusline' */ int wo_scb; # define w_p_scb w_onebuf_opt.wo_scb /* 'scrollbind' */ int wo_diff_saved; /* options were saved for starting diff mode */ # define w_p_diff_saved w_onebuf_opt.wo_diff_saved int wo_scb_save; /* 'scrollbind' saved for diff mode*/ # define w_p_scb_save w_onebuf_opt.wo_scb_save int wo_wrap; #define w_p_wrap w_onebuf_opt.wo_wrap /* 'wrap' */ int wo_wrap_save; /* 'wrap' state saved for diff mode*/ # define w_p_wrap_save w_onebuf_opt.wo_wrap_save char_u *wo_cocu; /* 'concealcursor' */ # define w_p_cocu w_onebuf_opt.wo_cocu long wo_cole; /* 'conceallevel' */ # define w_p_cole w_onebuf_opt.wo_cole int wo_crb; # define w_p_crb w_onebuf_opt.wo_crb /* 'cursorbind' */ int wo_crb_save; /* 'cursorbind' state saved for diff mode*/ # define w_p_crb_save w_onebuf_opt.wo_crb_save char_u *wo_scl; # define w_p_scl w_onebuf_opt.wo_scl // 'signcolumn' char_u *wo_winhl; # define w_p_winhl w_onebuf_opt.wo_winhl // 'winhighlight' int wo_scriptID[WV_COUNT]; /* SIDs for window-local options */ # define w_p_scriptID w_onebuf_opt.wo_scriptID } winopt_T; /* * Window info stored with a buffer. * * Two types of info are kept for a buffer which are associated with a * specific window: * 1. Each window can have a different line number associated with a buffer. * 2. The window-local options for a buffer work in a similar way. * The window-info is kept in a list at b_wininfo. It is kept in * most-recently-used order. */ struct wininfo_S { wininfo_T *wi_next; /* next entry or NULL for last entry */ wininfo_T *wi_prev; /* previous entry or NULL for first entry */ win_T *wi_win; /* pointer to window that did set wi_fpos */ pos_T wi_fpos; /* last cursor position in the file */ bool wi_optset; /* true when wi_opt has useful values */ winopt_T wi_opt; /* local window options */ bool wi_fold_manual; /* copy of w_fold_manual */ garray_T wi_folds; /* clone of w_folds */ }; /* * Argument list: Array of file names. * Used for the global argument list and the argument lists local to a window. * * TODO: move struct arglist to another header */ typedef struct arglist { garray_T al_ga; /* growarray with the array of file names */ int al_refcount; /* number of windows using this arglist */ int id; ///< id of this arglist } alist_T; /* * For each argument remember the file name as it was given, and the buffer * number that contains the expanded file name (required for when ":cd" is * used. * * TODO: move aentry_T to another header */ typedef struct argentry { char_u *ae_fname; /* file name as specified */ int ae_fnum; /* buffer number with expanded file name */ } aentry_T; # define ALIST(win) (win)->w_alist #define GARGLIST ((aentry_T *)global_alist.al_ga.ga_data) #define ARGLIST ((aentry_T *)ALIST(curwin)->al_ga.ga_data) #define WARGLIST(wp) ((aentry_T *)ALIST(wp)->al_ga.ga_data) #define AARGLIST(al) ((aentry_T *)((al)->al_ga.ga_data)) #define GARGCOUNT (global_alist.al_ga.ga_len) #define ARGCOUNT (ALIST(curwin)->al_ga.ga_len) #define WARGCOUNT(wp) (ALIST(wp)->al_ga.ga_len) /* * Used for the typeahead buffer: typebuf. */ typedef struct { char_u *tb_buf; /* buffer for typed characters */ char_u *tb_noremap; /* mapping flags for characters in tb_buf[] */ int tb_buflen; /* size of tb_buf[] */ int tb_off; /* current position in tb_buf[] */ int tb_len; /* number of valid bytes in tb_buf[] */ int tb_maplen; /* nr of mapped bytes in tb_buf[] */ int tb_silent; /* nr of silently mapped bytes in tb_buf[] */ int tb_no_abbr_cnt; /* nr of bytes without abbrev. in tb_buf[] */ int tb_change_cnt; /* nr of time tb_buf was changed; never zero */ } typebuf_T; /* Struct to hold the saved typeahead for save_typeahead(). */ typedef struct { typebuf_T save_typebuf; int typebuf_valid; /* TRUE when save_typebuf valid */ int old_char; int old_mod_mask; buffheader_T save_readbuf1; buffheader_T save_readbuf2; String save_inputbuf; } tasave_T; /* * Structure used for mappings and abbreviations. */ typedef struct mapblock mapblock_T; struct mapblock { mapblock_T *m_next; /* next mapblock in list */ char_u *m_keys; /* mapped from, lhs */ char_u *m_str; /* mapped to, rhs */ char_u *m_orig_str; /* rhs as entered by the user */ int m_keylen; /* strlen(m_keys) */ int m_mode; /* valid mode */ int m_noremap; /* if non-zero no re-mapping for m_str */ char m_silent; /* used, don't echo commands */ char m_nowait; /* used */ char m_expr; /* used, m_str is an expression */ scid_T m_script_ID; /* ID of script where map was defined */ }; /* * Used for highlighting in the status line. */ struct stl_hlrec { char_u *start; int userhl; /* 0: no HL, 1-9: User HL, < 0 for syn ID */ }; /* values for b_syn_spell: what to do with toplevel text */ #define SYNSPL_DEFAULT 0 /* spell check if @Spell not defined */ #define SYNSPL_TOP 1 /* spell check toplevel text */ #define SYNSPL_NOTOP 2 /* don't spell check toplevel text */ /* avoid #ifdefs for when b_spell is not available */ # define B_SPELL(buf) ((buf)->b_spell) typedef struct qf_info_S qf_info_T; /* * Used for :syntime: timing of executing a syntax pattern. */ typedef struct { proftime_T total; /* total time used */ proftime_T slowest; /* time of slowest call */ long count; /* nr of times used */ long match; /* nr of times matched */ } syn_time_T; /* * These are items normally related to a buffer. But when using ":ownsyntax" * a window may have its own instance. */ typedef struct { hashtab_T b_keywtab; /* syntax keywords hash table */ hashtab_T b_keywtab_ic; /* idem, ignore case */ int b_syn_error; /* TRUE when error occurred in HL */ int b_syn_ic; /* ignore case for :syn cmds */ int b_syn_spell; /* SYNSPL_ values */ garray_T b_syn_patterns; /* table for syntax patterns */ garray_T b_syn_clusters; /* table for syntax clusters */ int b_spell_cluster_id; /* @Spell cluster ID or 0 */ int b_nospell_cluster_id; /* @NoSpell cluster ID or 0 */ int b_syn_containedin; /* TRUE when there is an item with a "containedin" argument */ int b_syn_sync_flags; /* flags about how to sync */ short b_syn_sync_id; /* group to sync on */ long b_syn_sync_minlines; /* minimal sync lines offset */ long b_syn_sync_maxlines; /* maximal sync lines offset */ long b_syn_sync_linebreaks; /* offset for multi-line pattern */ char_u *b_syn_linecont_pat; /* line continuation pattern */ regprog_T *b_syn_linecont_prog; /* line continuation program */ syn_time_T b_syn_linecont_time; int b_syn_linecont_ic; /* ignore-case flag for above */ int b_syn_topgrp; /* for ":syntax include" */ int b_syn_conceal; /* auto-conceal for :syn cmds */ int b_syn_folditems; /* number of patterns with the HL_FOLD flag set */ /* * b_sst_array[] contains the state stack for a number of lines, for the * start of that line (col == 0). This avoids having to recompute the * syntax state too often. * b_sst_array[] is allocated to hold the state for all displayed lines, * and states for 1 out of about 20 other lines. * b_sst_array pointer to an array of synstate_T * b_sst_len number of entries in b_sst_array[] * b_sst_first pointer to first used entry in b_sst_array[] or NULL * b_sst_firstfree pointer to first free entry in b_sst_array[] or NULL * b_sst_freecount number of free entries in b_sst_array[] * b_sst_check_lnum entries after this lnum need to be checked for * validity (MAXLNUM means no check needed) */ synstate_T *b_sst_array; int b_sst_len; synstate_T *b_sst_first; synstate_T *b_sst_firstfree; int b_sst_freecount; linenr_T b_sst_check_lnum; uint16_t b_sst_lasttick; /* last display tick */ // for spell checking garray_T b_langp; // list of pointers to slang_T, see spell.c bool b_spell_ismw[256]; // flags: is midword char char_u *b_spell_ismw_mb; // multi-byte midword chars char_u *b_p_spc; // 'spellcapcheck' regprog_T *b_cap_prog; // program for 'spellcapcheck' char_u *b_p_spf; // 'spellfile' char_u *b_p_spl; // 'spelllang' int b_cjk; // all CJK letters as OK char_u b_syn_chartab[32]; // syntax iskeyword option char_u *b_syn_isk; // iskeyword option } synblock_T; /// Type used for changedtick_di member in buf_T /// /// Primary exists so that literals of relevant type can be made. typedef TV_DICTITEM_STRUCT(sizeof("changedtick")) ChangedtickDictItem; #define BUF_HAS_QF_ENTRY 1 #define BUF_HAS_LL_ENTRY 2 // Maximum number of maphash blocks we will have #define MAX_MAPHASH 256 /* * buffer: structure that holds information about one file * * Several windows can share a single Buffer * A buffer is unallocated if there is no memfile for it. * A buffer is new if the associated file has never been loaded yet. */ struct file_buffer { handle_T handle; // unique id for the buffer (buffer number) #define b_fnum handle memline_T b_ml; // associated memline (also contains line count buf_T *b_next; /* links in list of buffers */ buf_T *b_prev; int b_nwindows; /* nr of windows open on this buffer */ int b_flags; // various BF_ flags int b_locked; // Buffer is being closed or referenced, don't // let autocommands wipe it out. /* * b_ffname has the full path of the file (NULL for no name). * b_sfname is the name as the user typed it (or NULL). * b_fname is the same as b_sfname, unless ":cd" has been done, * then it is the same as b_ffname (NULL for no name). */ char_u *b_ffname; /* full path file name */ char_u *b_sfname; /* short file name */ char_u *b_fname; /* current file name */ bool file_id_valid; FileID file_id; int b_changed; // 'modified': Set to true if something in the // file has been changed and not written out. /// Change identifier incremented for each change, including undo #define b_changedtick changedtick_di.di_tv.vval.v_number ChangedtickDictItem changedtick_di; // b:changedtick dictionary item. bool b_saving; /* Set to true if we are in the middle of saving the buffer. */ /* * Changes to a buffer require updating of the display. To minimize the * work, remember changes made and update everything at once. */ bool b_mod_set; /* true when there are changes since the last time the display was updated */ linenr_T b_mod_top; /* topmost lnum that was changed */ linenr_T b_mod_bot; /* lnum below last changed line, AFTER the change */ long b_mod_xlines; /* number of extra buffer lines inserted; negative when lines were deleted */ wininfo_T *b_wininfo; /* list of last used info for each window */ long b_mtime; /* last change time of original file */ long b_mtime_read; /* last change time when reading */ uint64_t b_orig_size; /* size of original file in bytes */ int b_orig_mode; /* mode of original file */ fmark_T b_namedm[NMARKS]; /* current named marks (mark.c) */ /* These variables are set when VIsual_active becomes FALSE */ visualinfo_T b_visual; int b_visual_mode_eval; /* b_visual.vi_mode for visualmode() */ fmark_T b_last_cursor; // cursor position when last unloading this // buffer fmark_T b_last_insert; // where Insert mode was left fmark_T b_last_change; // position of last change: '. mark /* * the changelist contains old change positions */ fmark_T b_changelist[JUMPLISTSIZE]; int b_changelistlen; /* number of active entries */ bool b_new_change; /* set by u_savecommon() */ /* * Character table, only used in charset.c for 'iskeyword' * bitset with 4*64=256 bits: 1 bit per character 0-255. */ uint64_t b_chartab[4]; // Table used for mappings local to a buffer. mapblock_T *(b_maphash[MAX_MAPHASH]); /* First abbreviation local to a buffer. */ mapblock_T *b_first_abbr; /* User commands local to the buffer. */ garray_T b_ucmds; /* * start and end of an operator, also used for '[ and '] */ pos_T b_op_start; pos_T b_op_start_orig; // used for Insstart_orig pos_T b_op_end; bool b_marks_read; /* Have we read ShaDa marks yet? */ /* * The following only used in undo.c. */ u_header_T *b_u_oldhead; /* pointer to oldest header */ u_header_T *b_u_newhead; /* pointer to newest header; may not be valid if b_u_curhead is not NULL */ u_header_T *b_u_curhead; /* pointer to current header */ int b_u_numhead; /* current number of headers */ bool b_u_synced; /* entry lists are synced */ long b_u_seq_last; /* last used undo sequence number */ long b_u_save_nr_last; /* counter for last file write */ long b_u_seq_cur; /* hu_seq of header below which we are now */ time_t b_u_time_cur; /* uh_time of header below which we are now */ long b_u_save_nr_cur; /* file write nr after which we are now */ /* * variables for "U" command in undo.c */ char_u *b_u_line_ptr; /* saved line for "U" command */ linenr_T b_u_line_lnum; /* line number of line in u_line */ colnr_T b_u_line_colnr; /* optional column number */ bool b_scanned; /* ^N/^P have scanned this buffer */ /* flags for use of ":lmap" and IM control */ long b_p_iminsert; /* input mode for insert */ long b_p_imsearch; /* input mode for search */ #define B_IMODE_USE_INSERT -1 /* Use b_p_iminsert value for search */ #define B_IMODE_NONE 0 /* Input via none */ #define B_IMODE_LMAP 1 /* Input via langmap */ # define B_IMODE_LAST 1 short b_kmap_state; /* using "lmap" mappings */ # define KEYMAP_INIT 1 /* 'keymap' was set, call keymap_init() */ # define KEYMAP_LOADED 2 /* 'keymap' mappings have been loaded */ garray_T b_kmap_ga; /* the keymap table */ /* * Options local to a buffer. * They are here because their value depends on the type of file * or contents of the file being edited. */ bool b_p_initialized; /* set when options initialized */ int b_p_scriptID[BV_COUNT]; /* SIDs for buffer-local options */ int b_p_ai; ///< 'autoindent' int b_p_ai_nopaste; ///< b_p_ai saved for paste mode char_u *b_p_bkc; ///< 'backupco unsigned int b_bkc_flags; ///< flags for 'backupco int b_p_ci; ///< 'copyindent' int b_p_bin; ///< 'binary' int b_p_bomb; ///< 'bomb' char_u *b_p_bh; ///< 'bufhidden' char_u *b_p_bt; ///< 'buftype' int b_has_qf_entry; ///< quickfix exists for buffer int b_p_bl; ///< 'buflisted' int b_p_cin; ///< 'cindent' char_u *b_p_cino; ///< 'cinoptions' char_u *b_p_cink; ///< 'cinkeys' char_u *b_p_cinw; ///< 'cinwords' char_u *b_p_com; ///< 'comments' char_u *b_p_cms; ///< 'commentstring' char_u *b_p_cpt; ///< 'complete' char_u *b_p_cfu; ///< 'completefunc' char_u *b_p_ofu; ///< 'omnifunc' int b_p_eol; ///< 'endofline' int b_p_fixeol; ///< 'fixendofline' int b_p_et; ///< 'expandtab' int b_p_et_nobin; ///< b_p_et saved for binary mode int b_p_et_nopaste; ///< b_p_et saved for paste mode char_u *b_p_fenc; ///< 'fileencoding' char_u *b_p_ff; ///< 'fileformat' char_u *b_p_ft; ///< 'filetype' char_u *b_p_fo; ///< 'formatoptions' char_u *b_p_flp; ///< 'formatlistpat' int b_p_inf; ///< 'infercase' char_u *b_p_isk; ///< 'iskeyword' char_u *b_p_def; ///< 'define' local value char_u *b_p_inc; ///< 'include' char_u *b_p_inex; ///< 'includeexpr' uint32_t b_p_inex_flags; ///< flags for 'includeexpr' char_u *b_p_inde; ///< 'indentexpr' uint32_t b_p_inde_flags; ///< flags for 'indentexpr' char_u *b_p_indk; ///< 'indentkeys' char_u *b_p_fp; ///< 'formatprg' char_u *b_p_fex; ///< 'formatexpr' uint32_t b_p_fex_flags; ///< flags for 'formatexpr' char_u *b_p_kp; ///< 'keywordprg' int b_p_lisp; ///< 'lisp' char_u *b_p_mps; ///< 'matchpairs' int b_p_ml; ///< 'modeline' int b_p_ml_nobin; ///< b_p_ml saved for binary mode int b_p_ma; ///< 'modifiable' char_u *b_p_nf; ///< 'nrformats' int b_p_pi; ///< 'preserveindent' char_u *b_p_qe; ///< 'quoteescape' int b_p_ro; ///< 'readonly' long b_p_sw; ///< 'shiftwidth' long b_p_scbk; ///< 'scrollback' int b_p_si; ///< 'smartindent' long b_p_sts; ///< 'softtabstop' long b_p_sts_nopaste; ///< b_p_sts saved for paste mode char_u *b_p_sua; ///< 'suffixesadd' int b_p_swf; ///< 'swapfile' long b_p_smc; ///< 'synmaxcol' char_u *b_p_syn; ///< 'syntax' long b_p_ts; ///< 'tabstop' long b_p_tw; ///< 'textwidth' long b_p_tw_nobin; ///< b_p_tw saved for binary mode long b_p_tw_nopaste; ///< b_p_tw saved for paste mode long b_p_wm; ///< 'wrapmargin' long b_p_wm_nobin; ///< b_p_wm saved for binary mode long b_p_wm_nopaste; ///< b_p_wm saved for paste mode char_u *b_p_keymap; ///< 'keymap' // local values for options which are normally global char_u *b_p_gp; ///< 'grepprg' local value char_u *b_p_mp; ///< 'makeprg' local value char_u *b_p_efm; ///< 'errorformat' local value char_u *b_p_ep; ///< 'equalprg' local value char_u *b_p_path; ///< 'path' local value int b_p_ar; ///< 'autoread' local value char_u *b_p_tags; ///< 'tags' local value char_u *b_p_tc; ///< 'tagcase' local value unsigned b_tc_flags; ///< flags for 'tagcase' char_u *b_p_dict; ///< 'dictionary' local value char_u *b_p_tsr; ///< 'thesaurus' local value long b_p_ul; ///< 'undolevels' local value int b_p_udf; ///< 'undofile' char_u *b_p_lw; ///< 'lispwords' local value /* end of buffer options */ /* values set from b_p_cino */ int b_ind_level; int b_ind_open_imag; int b_ind_no_brace; int b_ind_first_open; int b_ind_open_extra; int b_ind_close_extra; int b_ind_open_left_imag; int b_ind_jump_label; int b_ind_case; int b_ind_case_code; int b_ind_case_break; int b_ind_param; int b_ind_func_type; int b_ind_comment; int b_ind_in_comment; int b_ind_in_comment2; int b_ind_cpp_baseclass; int b_ind_continuation; int b_ind_unclosed; int b_ind_unclosed2; int b_ind_unclosed_noignore; int b_ind_unclosed_wrapped; int b_ind_unclosed_whiteok; int b_ind_matching_paren; int b_ind_paren_prev; int b_ind_maxparen; int b_ind_maxcomment; int b_ind_scopedecl; int b_ind_scopedecl_code; int b_ind_java; int b_ind_js; int b_ind_keep_case_label; int b_ind_hash_comment; int b_ind_cpp_namespace; int b_ind_if_for_while; linenr_T b_no_eol_lnum; /* non-zero lnum when last line of next binary * write should not have an end-of-line */ int b_start_eol; /* last line had eol when it was read */ int b_start_ffc; /* first char of 'ff' when edit started */ char_u *b_start_fenc; /* 'fileencoding' when edit started or NULL */ int b_bad_char; /* "++bad=" argument when edit started or 0 */ int b_start_bomb; /* 'bomb' when it was read */ ScopeDictDictItem b_bufvar; ///< Variable for "b:" Dictionary. dict_T *b_vars; ///< b: scope dictionary. /* When a buffer is created, it starts without a swap file. b_may_swap is * then set to indicate that a swap file may be opened later. It is reset * if a swap file could not be opened. */ bool b_may_swap; bool b_did_warn; /* Set to true if user has been warned on first change of a read-only file */ /* Two special kinds of buffers: * help buffer - used for help files, won't use a swap file. * spell buffer - used for spell info, never displayed and doesn't have a * file name. */ bool b_help; /* TRUE for help file buffer (when set b_p_bt is "help") */ bool b_spell; /* True for a spell file buffer, most fields are not used! Use the B_SPELL macro to access b_spell without #ifdef. */ synblock_T b_s; /* Info related to syntax highlighting. w_s * normally points to this, but some windows * may use a different synblock_T. */ signlist_T *b_signlist; /* list of signs to draw */ Terminal *terminal; // Terminal instance associated with the buffer dict_T *additional_data; // Additional data from shada file if any. int b_mapped_ctrl_c; // modes where CTRL-C is mapped BufhlInfo b_bufhl_info; // buffer stored highlights kvec_t(BufhlLine *) b_bufhl_move_space; // temporary space for highlights }; /* * Stuff for diff mode. */ # define DB_COUNT 8 // up to four buffers can be diff'ed /* * Each diffblock defines where a block of lines starts in each of the buffers * and how many lines it occupies in that buffer. When the lines are missing * in the buffer the df_count[] is zero. This is all counted in * buffer lines. * There is always at least one unchanged line in between the diffs. * Otherwise it would have been included in the diff above or below it. * df_lnum[] + df_count[] is the lnum below the change. When in one buffer * lines have been inserted, in the other buffer df_lnum[] is the line below * the insertion and df_count[] is zero. When appending lines at the end of * the buffer, df_lnum[] is one beyond the end! * This is using a linked list, because the number of differences is expected * to be reasonable small. The list is sorted on lnum. */ typedef struct diffblock_S diff_T; struct diffblock_S { diff_T *df_next; linenr_T df_lnum[DB_COUNT]; /* line number in buffer */ linenr_T df_count[DB_COUNT]; /* nr of inserted/changed lines */ }; #define SNAP_HELP_IDX 0 # define SNAP_AUCMD_IDX 1 # define SNAP_COUNT 2 /// Tab pages point to the top frame of each tab page. /// Note: Most values are NOT valid for the current tab page! Use "curwin", /// "firstwin", etc. for that. "tp_topframe" is always valid and can be /// compared against "topframe" to find the current tab page. typedef struct tabpage_S tabpage_T; struct tabpage_S { handle_T handle; tabpage_T *tp_next; ///< next tabpage or NULL frame_T *tp_topframe; ///< topframe for the windows win_T *tp_curwin; ///< current window in this Tab page win_T *tp_prevwin; ///< previous window in this Tab page win_T *tp_firstwin; ///< first window in this Tab page win_T *tp_lastwin; ///< last window in this Tab page long tp_old_Rows; ///< Rows when Tab page was left long tp_old_Columns; ///< Columns when Tab page was left long tp_ch_used; ///< value of 'cmdheight' when frame size ///< was set diff_T *tp_first_diff; buf_T *(tp_diffbuf[DB_COUNT]); int tp_diff_invalid; ///< list of diffs is outdated frame_T *(tp_snapshot[SNAP_COUNT]); ///< window layout snapshots ScopeDictDictItem tp_winvar; ///< Variable for "t:" Dictionary. dict_T *tp_vars; ///< Internal variables, local to tab page. char_u *tp_localdir; ///< Absolute path of local cwd or NULL. }; /* * Structure to cache info for displayed lines in w_lines[]. * Each logical line has one entry. * The entry tells how the logical line is currently displayed in the window. * This is updated when displaying the window. * When the display is changed (e.g., when clearing the screen) w_lines_valid * is changed to exclude invalid entries. * When making changes to the buffer, wl_valid is reset to indicate wl_size * may not reflect what is actually in the buffer. When wl_valid is FALSE, * the entries can only be used to count the number of displayed lines used. * wl_lnum and wl_lastlnum are invalid too. */ typedef struct w_line { linenr_T wl_lnum; /* buffer line number for logical line */ uint16_t wl_size; /* height in screen lines */ char wl_valid; /* TRUE values are valid for text in buffer */ char wl_folded; /* TRUE when this is a range of folded lines */ linenr_T wl_lastlnum; /* last buffer line number for logical line */ } wline_T; /* * Windows are kept in a tree of frames. Each frame has a column (FR_COL) * or row (FR_ROW) layout or is a leaf, which has a window. */ struct frame_S { char fr_layout; /* FR_LEAF, FR_COL or FR_ROW */ int fr_width; int fr_newwidth; /* new width used in win_equal_rec() */ int fr_height; int fr_newheight; /* new height used in win_equal_rec() */ frame_T *fr_parent; /* containing frame or NULL */ frame_T *fr_next; /* frame right or below in same parent, NULL for first */ frame_T *fr_prev; /* frame left or above in same parent, NULL for last */ /* fr_child and fr_win are mutually exclusive */ frame_T *fr_child; /* first contained frame */ win_T *fr_win; /* window that fills this frame */ }; #define FR_LEAF 0 /* frame is a leaf */ #define FR_ROW 1 /* frame with a row of windows */ #define FR_COL 2 /* frame with a column of windows */ /* * Struct used for highlighting 'hlsearch' matches, matches defined by * ":match" and matches defined by match functions. * For 'hlsearch' there is one pattern for all windows. For ":match" and the * match functions there is a different pattern for each window. */ typedef struct { regmmatch_T rm; // points to the regexp program; contains last found // match (may continue in next line) buf_T *buf; // the buffer to search for a match linenr_T lnum; // the line to search for a match int attr; // attributes to be used for a match int attr_cur; // attributes currently active in win_line() linenr_T first_lnum; // first lnum to search for multi-line pat colnr_T startcol; // in win_line() points to char where HL starts colnr_T endcol; // in win_line() points to char where HL ends bool is_addpos; // position specified directly by matchaddpos() proftime_T tm; // for a time limit } match_T; /// number of positions supported by matchaddpos() #define MAXPOSMATCH 8 /// Same as lpos_T, but with additional field len. typedef struct { linenr_T lnum; ///< line number colnr_T col; ///< column number int len; ///< length: 0 - to the end of line } llpos_T; /// posmatch_T provides an array for storing match items for matchaddpos() /// function. typedef struct posmatch posmatch_T; struct posmatch { llpos_T pos[MAXPOSMATCH]; ///< array of positions int cur; ///< internal position counter linenr_T toplnum; ///< top buffer line linenr_T botlnum; ///< bottom buffer line }; /* * matchitem_T provides a linked list for storing match items for ":match" and * the match functions. */ typedef struct matchitem matchitem_T; struct matchitem { matchitem_T *next; int id; ///< match ID int priority; ///< match priority char_u *pattern; ///< pattern to highlight int hlg_id; ///< highlight group ID regmmatch_T match; ///< regexp program for pattern posmatch_T pos; ///< position matches match_T hl; ///< struct for doing the actual highlighting int conceal_char; ///< cchar for Conceal highlighting }; /* * Structure which contains all information that belongs to a window * * All row numbers are relative to the start of the window, except w_winrow. */ struct window_S { handle_T handle; ///< unique identifier for the window buf_T *w_buffer; ///< buffer we are a window into (used ///< often, keep it the first item!) synblock_T *w_s; /* for :ownsyntax */ int w_hl_id_normal; ///< 'winhighlight' normal id int w_hl_attr_normal; ///< 'winhighlight' normal final attrs int w_hl_ids[HLF_COUNT]; ///< 'winhighlight' id int w_hl_attrs[HLF_COUNT]; ///< 'winhighlight' final attrs int w_hl_needs_update; ///< attrs need to be recalculated win_T *w_prev; /* link to previous window */ win_T *w_next; /* link to next window */ bool w_closing; /* window is being closed, don't let autocommands close it too. */ frame_T *w_frame; /* frame containing this window */ pos_T w_cursor; /* cursor position in buffer */ colnr_T w_curswant; /* The column we'd like to be at. This is used to try to stay in the same column for up/down cursor motions. */ int w_set_curswant; /* If set, then update w_curswant the next time through cursupdate() to the current virtual column */ // the next seven are used to update the visual part char w_old_visual_mode; ///< last known VIsual_mode linenr_T w_old_cursor_lnum; ///< last known end of visual part colnr_T w_old_cursor_fcol; ///< first column for block visual part colnr_T w_old_cursor_lcol; ///< last column for block visual part linenr_T w_old_visual_lnum; ///< last known start of visual part colnr_T w_old_visual_col; ///< last known start of visual part colnr_T w_old_curswant; ///< last known value of Curswant /* * "w_topline", "w_leftcol" and "w_skipcol" specify the offsets for * displaying the buffer. */ linenr_T w_topline; /* buffer line number of the line at the top of the window */ char w_topline_was_set; /* flag set to TRUE when topline is set, e.g. by winrestview() */ int w_topfill; /* number of filler lines above w_topline */ int w_old_topfill; /* w_topfill at last redraw */ bool w_botfill; /* true when filler lines are actually below w_topline (at end of file) */ bool w_old_botfill; /* w_botfill at last redraw */ colnr_T w_leftcol; /* window column number of the left most character in the window; used when 'wrap' is off */ colnr_T w_skipcol; /* starting column when a single line doesn't fit in the window */ /* * Layout of the window in the screen. * May need to add "msg_scrolled" to "w_winrow" in rare situations. */ int w_winrow; /* first row of window in screen */ int w_height; /* number of rows in window, excluding status/command line(s) */ int w_status_height; /* number of status lines (0 or 1) */ int w_wincol; /* Leftmost column of window in screen. */ int w_width; /* Width of window, excluding separation. */ int w_vsep_width; /* Number of separator columns (0 or 1). */ /* * === start of cached values ==== */ /* * Recomputing is minimized by storing the result of computations. * Use functions in screen.c to check if they are valid and to update. * w_valid is a bitfield of flags, which indicate if specific values are * valid or need to be recomputed. */ int w_valid; pos_T w_valid_cursor; /* last known position of w_cursor, used to adjust w_valid */ colnr_T w_valid_leftcol; /* last known w_leftcol */ /* * w_cline_height is the number of physical lines taken by the buffer line * that the cursor is on. We use this to avoid extra calls to plines(). */ int w_cline_height; /* current size of cursor line */ bool w_cline_folded; /* cursor line is folded */ int w_cline_row; /* starting row of the cursor line */ colnr_T w_virtcol; /* column number of the cursor in the buffer line, as opposed to the column number we're at on the screen. This makes a difference on lines which span more than one screen line or when w_leftcol is non-zero */ /* * w_wrow and w_wcol specify the cursor position in the window. * This is related to positions in the window, not in the display or * buffer, thus w_wrow is relative to w_winrow. */ int w_wrow, w_wcol; /* cursor position in window */ linenr_T w_botline; // number of the line below the bottom of // the window int w_empty_rows; // number of ~ rows in window int w_filler_rows; // number of filler rows at the end of the // window /* * Info about the lines currently in the window is remembered to avoid * recomputing it every time. The allocated size of w_lines[] is Rows. * Only the w_lines_valid entries are actually valid. * When the display is up-to-date w_lines[0].wl_lnum is equal to w_topline * and w_lines[w_lines_valid - 1].wl_lnum is equal to w_botline. * Between changing text and updating the display w_lines[] represents * what is currently displayed. wl_valid is reset to indicated this. * This is used for efficient redrawing. */ int w_lines_valid; /* number of valid entries */ wline_T *w_lines; garray_T w_folds; /* array of nested folds */ bool w_fold_manual; /* when true: some folds are opened/closed manually */ bool w_foldinvalid; /* when true: folding needs to be recomputed */ int w_nrwidth; /* width of 'number' and 'relativenumber' column being used */ /* * === end of cached values === */ int w_redr_type; /* type of redraw to be performed on win */ int w_upd_rows; /* number of window lines to update when w_redr_type is REDRAW_TOP */ linenr_T w_redraw_top; /* when != 0: first line needing redraw */ linenr_T w_redraw_bot; /* when != 0: last line needing redraw */ int w_redr_status; /* if TRUE status line must be redrawn */ /* remember what is shown in the ruler for this window (if 'ruler' set) */ pos_T w_ru_cursor; /* cursor position shown in ruler */ colnr_T w_ru_virtcol; /* virtcol shown in ruler */ linenr_T w_ru_topline; /* topline shown in ruler */ linenr_T w_ru_line_count; /* line count used for ruler */ int w_ru_topfill; /* topfill shown in ruler */ char w_ru_empty; /* TRUE if ruler shows 0-1 (empty line) */ int w_alt_fnum; /* alternate file (for # and CTRL-^) */ alist_T *w_alist; /* pointer to arglist for this window */ int w_arg_idx; /* current index in argument list (can be out of range!) */ int w_arg_idx_invalid; /* editing another file than w_arg_idx */ char_u *w_localdir; /* absolute path of local directory or NULL */ /* * Options local to a window. * They are local because they influence the layout of the window or * depend on the window layout. * There are two values: w_onebuf_opt is local to the buffer currently in * this window, w_allbuf_opt is for all buffers in this window. */ winopt_T w_onebuf_opt; winopt_T w_allbuf_opt; /* A few options have local flags for P_INSECURE. */ uint32_t w_p_stl_flags; /* flags for 'statusline' */ uint32_t w_p_fde_flags; /* flags for 'foldexpr' */ uint32_t w_p_fdt_flags; /* flags for 'foldtext' */ int *w_p_cc_cols; /* array of columns to highlight or NULL */ int w_p_brimin; /* minimum width for breakindent */ int w_p_brishift; /* additional shift for breakindent */ bool w_p_brisbr; /* sbr in 'briopt' */ /* transform a pointer to a "onebuf" option into a "allbuf" option */ #define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T)) long w_scbind_pos; ScopeDictDictItem w_winvar; ///< Variable for "w:" dictionary. dict_T *w_vars; ///< Dictionary with w: variables. int w_farsi; /* for the window dependent Farsi functions */ /* * The w_prev_pcmark field is used to check whether we really did jump to * a new line after setting the w_pcmark. If not, then we revert to * using the previous w_pcmark. */ pos_T w_pcmark; /* previous context mark */ pos_T w_prev_pcmark; /* previous w_pcmark */ /* * the jumplist contains old cursor positions */ xfmark_T w_jumplist[JUMPLISTSIZE]; int w_jumplistlen; /* number of active entries */ int w_jumplistidx; /* current position */ int w_changelistidx; /* current position in b_changelist */ matchitem_T *w_match_head; /* head of match list */ int w_next_match_id; /* next match ID */ /* * the tagstack grows from 0 upwards: * entry 0: older * entry 1: newer * entry 2: newest */ taggy_T w_tagstack[TAGSTACKSIZE]; /* the tag stack */ int w_tagstackidx; /* idx just below active entry */ int w_tagstacklen; /* number of tags on stack */ /* * w_fraction is the fractional row of the cursor within the window, from * 0 at the top row to FRACTION_MULT at the last row. * w_prev_fraction_row was the actual cursor row when w_fraction was last * calculated. */ int w_fraction; int w_prev_fraction_row; linenr_T w_nrwidth_line_count; /* line count when ml_nrwidth_width * was computed. */ int w_nrwidth_width; /* nr of chars to print line count. */ qf_info_T *w_llist; /* Location list for this window */ /* * Location list reference used in the location list window. * In a non-location list window, w_llist_ref is NULL. */ qf_info_T *w_llist_ref; }; static inline int win_hl_attr(win_T *wp, int hlf) { return wp->w_hl_attrs[hlf]; } #endif // NVIM_BUFFER_DEFS_H neovim-0.2.2/src/nvim/bufhl_defs.h000066400000000000000000000014071320401574200170220ustar00rootroot00000000000000#ifndef NVIM_BUFHL_DEFS_H #define NVIM_BUFHL_DEFS_H #include "nvim/pos.h" #include "nvim/lib/kvec.h" #include "nvim/lib/kbtree.h" // bufhl: buffer specific highlighting typedef struct { int src_id; int hl_id; // highlight group colnr_T start; // first column to highlight colnr_T stop; // last column to highlight } BufhlItem; typedef kvec_t(BufhlItem) BufhlItemVec; typedef struct { linenr_T line; BufhlItemVec items; } BufhlLine; #define BUFHLLINE_INIT(l) { l, KV_INITIAL_VALUE } typedef struct { BufhlItemVec entries; int current; colnr_T valid_to; } BufhlLineInfo; #define BUFHL_CMP(a, b) ((int)(((a)->line - (b)->line))) KBTREE_INIT(bufhl, BufhlLine *, BUFHL_CMP, 10) // -V512 typedef kbtree_t(bufhl) BufhlInfo; #endif // NVIM_BUFHL_DEFS_H neovim-0.2.2/src/nvim/charset.c000066400000000000000000001342121320401574200163460ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /// @file charset.c /// /// Code related to character sets. #include #include #include #include // for towupper() and towlower() #include #include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/charset.h" #include "nvim/farsi.h" #include "nvim/func_attr.h" #include "nvim/indent.h" #include "nvim/main.h" #include "nvim/mark.h" #include "nvim/mbyte.h" #include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/misc1.h" #include "nvim/garray.h" #include "nvim/move.h" #include "nvim/option.h" #include "nvim/os_unix.h" #include "nvim/state.h" #include "nvim/strings.h" #include "nvim/path.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "charset.c.generated.h" #endif static bool chartab_initialized = false; // b_chartab[] is an array with 256 bits, each bit representing one of the // characters 0-255. #define SET_CHARTAB(buf, c) \ (buf)->b_chartab[(unsigned)(c) >> 6] |= (1ull << ((c) & 0x3f)) #define RESET_CHARTAB(buf, c) \ (buf)->b_chartab[(unsigned)(c) >> 6] &= ~(1ull << ((c) & 0x3f)) #define GET_CHARTAB_TAB(chartab, c) \ ((chartab)[(unsigned)(c) >> 6] & (1ull << ((c) & 0x3f))) #define GET_CHARTAB(buf, c) \ GET_CHARTAB_TAB((buf)->b_chartab, c) // Table used below, see init_chartab() for an explanation static char_u g_chartab[256]; // Flags for g_chartab[]. #define CT_CELL_MASK 0x07 ///< mask: nr of display cells (1, 2 or 4) #define CT_PRINT_CHAR 0x10 ///< flag: set for printable chars #define CT_ID_CHAR 0x20 ///< flag: set for ID chars #define CT_FNAME_CHAR 0x40 ///< flag: set for file name chars /// Fill g_chartab[]. Also fills curbuf->b_chartab[] with flags for keyword /// characters for current buffer. /// /// Depends on the option settings 'iskeyword', 'isident', 'isfname', /// 'isprint' and 'encoding'. /// /// The index in g_chartab[] is the character when first byte is up to 0x80, /// if the first byte is 0x80 and above it depends on further bytes. /// /// The contents of g_chartab[]: /// - The lower two bits, masked by CT_CELL_MASK, give the number of display /// cells the character occupies (1 or 2). Not valid for UTF-8 above 0x80. /// - CT_PRINT_CHAR bit is set when the character is printable (no need to /// translate the character before displaying it). Note that only DBCS /// characters can have 2 display cells and still be printable. /// - CT_FNAME_CHAR bit is set when the character can be in a file name. /// - CT_ID_CHAR bit is set when the character can be in an identifier. /// /// @return FAIL if 'iskeyword', 'isident', 'isfname' or 'isprint' option has /// an error, OK otherwise. int init_chartab(void) { return buf_init_chartab(curbuf, true); } /// Helper for init_chartab /// /// @param global false: only set buf->b_chartab[] /// /// @return FAIL if 'iskeyword', 'isident', 'isfname' or 'isprint' option has /// an error, OK otherwise. int buf_init_chartab(buf_T *buf, int global) { int c; int c2; int i; bool tilde; bool do_isalpha; if (global) { // Set the default size for printable characters: // From to '~' is 1 (printable), others are 2 (not printable). // This also inits all 'isident' and 'isfname' flags to false. c = 0; while (c < ' ') { g_chartab[c++] = (dy_flags & DY_UHEX) ? 4 : 2; } while (c <= '~') { g_chartab[c++] = 1 + CT_PRINT_CHAR; } if (p_altkeymap) { while (c < YE) { g_chartab[c++] = 1 + CT_PRINT_CHAR; } } while (c < 256) { if (c >= 0xa0) { // UTF-8: bytes 0xa0 - 0xff are printable (latin1) g_chartab[c++] = CT_PRINT_CHAR + 1; } else { // the rest is unprintable by default g_chartab[c++] = (dy_flags & DY_UHEX) ? 4 : 2; } } // Assume that every multi-byte char is a filename character. for (c = 1; c < 256; c++) { if (c >= 0xa0) { g_chartab[c] |= CT_FNAME_CHAR; } } } // Init word char flags all to false memset(buf->b_chartab, 0, (size_t)32); // In lisp mode the '-' character is included in keywords. if (buf->b_p_lisp) { SET_CHARTAB(buf, '-'); } // Walk through the 'isident', 'iskeyword', 'isfname' and 'isprint' // options Each option is a list of characters, character numbers or // ranges, separated by commas, e.g.: "200-210,x,#-178,-" for (i = global ? 0 : 3; i <= 3; i++) { const char_u *p; if (i == 0) { // first round: 'isident' p = p_isi; } else if (i == 1) { // second round: 'isprint' p = p_isp; } else if (i == 2) { // third round: 'isfname' p = p_isf; } else { // i == 3 // fourth round: 'iskeyword' p = buf->b_p_isk; } while (*p) { tilde = false; do_isalpha = false; if ((*p == '^') && (p[1] != NUL)) { tilde = true; ++p; } if (ascii_isdigit(*p)) { c = getdigits_int((char_u **)&p); } else { c = mb_ptr2char_adv(&p); } c2 = -1; if ((*p == '-') && (p[1] != NUL)) { ++p; if (ascii_isdigit(*p)) { c2 = getdigits_int((char_u **)&p); } else { c2 = mb_ptr2char_adv(&p); } } if ((c <= 0) || (c >= 256) || ((c2 < c) && (c2 != -1)) || (c2 >= 256) || !((*p == NUL) || (*p == ','))) { return FAIL; } if (c2 == -1) { // not a range // A single '@' (not "@-@"): // Decide on letters being ID/printable/keyword chars with // standard function isalpha(). This takes care of locale for // single-byte characters). if (c == '@') { do_isalpha = true; c = 1; c2 = 255; } else { c2 = c; } } while (c <= c2) { // Use the MB_ functions here, because isalpha() doesn't // work properly when 'encoding' is "latin1" and the locale is // "C". if (!do_isalpha || mb_islower(c) || mb_isupper(c) || (p_altkeymap && (F_isalpha(c) || F_isdigit(c)))) { if (i == 0) { // (re)set ID flag if (tilde) { g_chartab[c] &= (uint8_t)~CT_ID_CHAR; } else { g_chartab[c] |= CT_ID_CHAR; } } else if (i == 1) { // (re)set printable // For double-byte we keep the cell width, so // that we can detect it from the first byte. if (((c < ' ') || (c > '~') || (p_altkeymap && (F_isalpha(c) || F_isdigit(c))))) { if (tilde) { g_chartab[c] = (uint8_t)((g_chartab[c] & ~CT_CELL_MASK) + ((dy_flags & DY_UHEX) ? 4 : 2)); g_chartab[c] &= (uint8_t)~CT_PRINT_CHAR; } else { g_chartab[c] = (uint8_t)((g_chartab[c] & ~CT_CELL_MASK) + 1); g_chartab[c] |= CT_PRINT_CHAR; } } } else if (i == 2) { // (re)set fname flag if (tilde) { g_chartab[c] &= (uint8_t)~CT_FNAME_CHAR; } else { g_chartab[c] |= CT_FNAME_CHAR; } } else { // i == 3 // (re)set keyword flag if (tilde) { RESET_CHARTAB(buf, c); } else { SET_CHARTAB(buf, c); } } } ++c; } c = *p; p = skip_to_option_part(p); if ((c == ',') && (*p == NUL)) { // Trailing comma is not allowed. return FAIL; } } } chartab_initialized = true; return OK; } /// Translate any special characters in buf[bufsize] in-place. /// /// The result is a string with only printable characters, but if there is not /// enough room, not all characters will be translated. /// /// @param buf /// @param bufsize void trans_characters(char_u *buf, int bufsize) { int len; // length of string needing translation int room; // room in buffer after string char_u *trs; // translated character int trs_len; // length of trs[] len = (int)STRLEN(buf); room = bufsize - len; while (*buf != 0) { // Assume a multi-byte character doesn't need translation. if ((trs_len = (*mb_ptr2len)(buf)) > 1) { len -= trs_len; } else { trs = transchar_byte(*buf); trs_len = (int)STRLEN(trs); if (trs_len > 1) { room -= trs_len - 1; if (room <= 0) { return; } memmove(buf + trs_len, buf + 1, (size_t)len); } memmove(buf, trs, (size_t)trs_len); --len; } buf += trs_len; } } /// Translate a string into allocated memory, replacing special chars with /// printable chars. /// /// @param s /// /// @return translated string char_u *transstr(char_u *s) FUNC_ATTR_NONNULL_RET { char_u *res; char_u *p; int c; size_t l; char_u hexbuf[11]; // Compute the length of the result, taking account of unprintable // multi-byte characters. size_t len = 0; p = s; while (*p != NUL) { if ((l = (size_t)(*mb_ptr2len)(p)) > 1) { c = (*mb_ptr2char)(p); p += l; if (vim_isprintc(c)) { len += l; } else { transchar_hex(hexbuf, c); len += STRLEN(hexbuf); } } else { l = (size_t)byte2cells(*p++); if (l > 0) { len += l; } else { // illegal byte sequence len += 4; } } } res = xmallocz(len); *res = NUL; p = s; while (*p != NUL) { if ((l = (size_t)(*mb_ptr2len)(p)) > 1) { c = (*mb_ptr2char)(p); if (vim_isprintc(c)) { // append printable multi-byte char STRNCAT(res, p, l); } else { transchar_hex(res + STRLEN(res), c); } p += l; } else { STRCAT(res, transchar_byte(*p++)); } } return res; } /// Convert the string "str[orglen]" to do ignore-case comparing. /// Use the current locale. /// /// When "buf" is NULL, return an allocated string. /// Otherwise, put the result in buf, limited by buflen, and return buf. char_u* str_foldcase(char_u *str, int orglen, char_u *buf, int buflen) FUNC_ATTR_NONNULL_RET { garray_T ga; int i; int len = orglen; #define GA_CHAR(i) ((char_u *)ga.ga_data)[i] #define GA_PTR(i) ((char_u *)ga.ga_data + i) #define STR_CHAR(i) (buf == NULL ? GA_CHAR(i) : buf[i]) #define STR_PTR(i) (buf == NULL ? GA_PTR(i) : buf + i) // Copy "str" into "buf" or allocated memory, unmodified. if (buf == NULL) { ga_init(&ga, 1, 10); ga_grow(&ga, len + 1); memmove(ga.ga_data, str, (size_t)len); ga.ga_len = len; } else { if (len >= buflen) { // Ugly! len = buflen - 1; } memmove(buf, str, (size_t)len); } if (buf == NULL) { GA_CHAR(len) = NUL; } else { buf[len] = NUL; } // Make each character lower case. i = 0; while (STR_CHAR(i) != NUL) { int c = utf_ptr2char(STR_PTR(i)); int olen = utf_ptr2len(STR_PTR(i)); int lc = mb_tolower(c); // Only replace the character when it is not an invalid // sequence (ASCII character or more than one byte) and // mb_tolower() doesn't return the original character. if (((c < 0x80) || (olen > 1)) && (c != lc)) { int nlen = utf_char2len(lc); // If the byte length changes need to shift the following // characters forward or backward. if (olen != nlen) { if (nlen > olen) { if (buf == NULL) { ga_grow(&ga, nlen - olen + 1); } else { if (len + nlen - olen >= buflen) { // out of memory, keep old char lc = c; nlen = olen; } } } if (olen != nlen) { if (buf == NULL) { STRMOVE(GA_PTR(i) + nlen, GA_PTR(i) + olen); ga.ga_len += nlen - olen; } else { STRMOVE(buf + i + nlen, buf + i + olen); len += nlen - olen; } } } (void)utf_char2bytes(lc, STR_PTR(i)); } // skip to next multi-byte char i += (*mb_ptr2len)(STR_PTR(i)); } if (buf == NULL) { return (char_u *)ga.ga_data; } return buf; } // Catch 22: g_chartab[] can't be initialized before the options are // initialized, and initializing options may cause transchar() to be called! // When chartab_initialized == false don't use g_chartab[]. // Does NOT work for multi-byte characters, c must be <= 255. // Also doesn't work for the first byte of a multi-byte, "c" must be a // character! static char_u transchar_buf[7]; /// Translates a character /// /// @param c /// /// @return translated character. char_u* transchar(int c) { int i = 0; if (IS_SPECIAL(c)) { // special key code, display as ~@ char transchar_buf[0] = '~'; transchar_buf[1] = '@'; i = 2; c = K_SECOND(c); } if ((!chartab_initialized && (((c >= ' ') && (c <= '~')) || (p_altkeymap && F_ischar(c)))) || ((c < 256) && vim_isprintc_strict(c))) { // printable character transchar_buf[i] = (char_u)c; transchar_buf[i + 1] = NUL; } else { transchar_nonprint(transchar_buf + i, c); } return transchar_buf; } /// Like transchar(), but called with a byte instead of a character. Checks /// for an illegal UTF-8 byte. /// /// @param c /// /// @return pointer to translated character in transchar_buf. char_u* transchar_byte(int c) { if (c >= 0x80) { transchar_nonprint(transchar_buf, c); return transchar_buf; } return transchar(c); } /// Convert non-printable character to two or more printable characters in /// "buf[]". "buf" needs to be able to hold five bytes. /// Does NOT work for multi-byte characters, c must be <= 255. /// /// @param buf /// @param c void transchar_nonprint(char_u *buf, int c) { if (c == NL) { // we use newline in place of a NUL c = NUL; } else if ((c == CAR) && (get_fileformat(curbuf) == EOL_MAC)) { // we use CR in place of NL in this case c = NL; } if (dy_flags & DY_UHEX) { // 'display' has "uhex" transchar_hex(buf, c); } else if (c <= 0x7f) { // 0x00 - 0x1f and 0x7f buf[0] = '^'; // DEL displayed as ^? buf[1] = (char_u)(c ^ 0x40); buf[2] = NUL; } else { transchar_hex(buf, c); } } /// Convert a non-printable character to hex. /// /// @param buf /// @param c void transchar_hex(char_u *buf, int c) { int i = 0; buf[0] = '<'; if (c > 255) { buf[++i] = (char_u)nr2hex((unsigned)c >> 12); buf[++i] = (char_u)nr2hex((unsigned)c >> 8); } buf[++i] = (char_u)(nr2hex((unsigned)c >> 4)); buf[++i] = (char_u)(nr2hex((unsigned)c)); buf[++i] = '>'; buf[++i] = NUL; } /// Convert the lower 4 bits of byte "c" to its hex character. /// Lower case letters are used to avoid the confusion of being 0xf1 or /// function key 1. /// /// @param c /// /// @return the hex character. static unsigned nr2hex(unsigned c) { if ((c & 0xf) <= 9) { return (c & 0xf) + '0'; } return (c & 0xf) - 10 + 'a'; } /// Return number of display cells occupied by byte "b". /// /// Caller must make sure 0 <= b <= 255. /// For multi-byte mode "b" must be the first byte of a character. /// A TAB is counted as two cells: "^I". /// This will return 0 for bytes >= 0x80, because the number of /// cells depends on further bytes in UTF-8. /// /// @param b /// /// @reeturn Number of display cells. int byte2cells(int b) { if (b >= 0x80) { return 0; } return g_chartab[b] & CT_CELL_MASK; } /// Return number of display cells occupied by character "c". /// /// "c" can be a special key (negative number) in which case 3 or 4 is returned. /// A TAB is counted as two cells: "^I" or four: "<09>". /// /// @param c /// /// @return Number of display cells. int char2cells(int c) { if (IS_SPECIAL(c)) { return char2cells(K_SECOND(c)) + 2; } if (c >= 0x80) { // UTF-8: above 0x80 need to check the value return utf_char2cells(c); } return g_chartab[c & 0xff] & CT_CELL_MASK; } /// Return number of display cells occupied by character at "*p". /// A TAB is counted as two cells: "^I" or four: "<09>". /// /// @param p /// /// @return number of display cells. int ptr2cells(const char_u *p) { // For UTF-8 we need to look at more bytes if the first byte is >= 0x80. if (*p >= 0x80) { return utf_ptr2cells(p); } // For DBCS we can tell the cell count from the first byte. return g_chartab[*p] & CT_CELL_MASK; } /// Return the number of character cells string "s" will take on the screen, /// counting TABs as two characters: "^I". /// /// 's' must be non-null. /// /// @param s /// /// @return number of character cells. int vim_strsize(char_u *s) { return vim_strnsize(s, (int)MAXCOL); } /// Return the number of character cells string "s[len]" will take on the /// screen, counting TABs as two characters: "^I". /// /// 's' must be non-null. /// /// @param s /// @param len /// /// @return Number of character cells. int vim_strnsize(char_u *s, int len) { assert(s != NULL); int size = 0; while (*s != NUL && --len >= 0) { int l = (*mb_ptr2len)(s); size += ptr2cells(s); s += l; len -= l - 1; } return size; } /// Return the number of characters 'c' will take on the screen, taking /// into account the size of a tab. /// Use a define to make it fast, this is used very often!!! /// Also see getvcol() below. /// /// @param p /// @param col /// /// @return Number of characters. #define RET_WIN_BUF_CHARTABSIZE(wp, buf, p, col) \ if (*(p) == TAB && (!(wp)->w_p_list || lcs_tab1)) { \ const int ts = (int) (buf)->b_p_ts; \ return (ts - (int)(col % ts)); \ } else { \ return ptr2cells(p); \ } int chartabsize(char_u *p, colnr_T col) { RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, p, col) } static int win_chartabsize(win_T *wp, char_u *p, colnr_T col) { RET_WIN_BUF_CHARTABSIZE(wp, wp->w_buffer, p, col) } /// Return the number of characters the string 's' will take on the screen, /// taking into account the size of a tab. /// /// @param s /// /// @return Number of characters the string will take on the screen. int linetabsize(char_u *s) { return linetabsize_col(0, s); } /// Like linetabsize(), but starting at column "startcol". /// /// @param startcol /// @param s /// /// @return Number of characters the string will take on the screen. int linetabsize_col(int startcol, char_u *s) { colnr_T col = startcol; char_u *line = s; /* pointer to start of line, for breakindent */ while (*s != NUL) { col += lbr_chartabsize_adv(line, &s, col); } return (int)col; } /// Like linetabsize(), but for a given window instead of the current one. /// /// @param wp /// @param line /// @param len /// /// @return Number of characters the string will take on the screen. unsigned int win_linetabsize(win_T *wp, char_u *line, colnr_T len) { colnr_T col = 0; for (char_u *s = line; *s != NUL && (len == MAXCOL || s < line + len); mb_ptr_adv(s)) { col += win_lbr_chartabsize(wp, line, s, col, NULL); } return (unsigned int)col; } /// Check that "c" is a normal identifier character: /// Letters and characters from the 'isident' option. /// /// @param c character to check bool vim_isIDc(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return c > 0 && c < 0x100 && (g_chartab[c] & CT_ID_CHAR); } /// Check that "c" is a keyword character: /// Letters and characters from 'iskeyword' option for the current buffer. /// For multi-byte characters mb_get_class() is used (builtin rules). /// /// @param c character to check bool vim_iswordc(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return vim_iswordc_buf(c, curbuf); } /// Check that "c" is a keyword character /// Letters and characters from 'iskeyword' option for given buffer. /// For multi-byte characters mb_get_class() is used (builtin rules). /// /// @param[in] c Character to check. /// @param[in] chartab Buffer chartab. bool vim_iswordc_tab(const int c, const uint64_t *const chartab) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { return (c >= 0x100 ? (utf_class(c) >= 2) : (c > 0 && GET_CHARTAB_TAB(chartab, c) != 0)); } /// Check that "c" is a keyword character: /// Letters and characters from 'iskeyword' option for given buffer. /// For multi-byte characters mb_get_class() is used (builtin rules). /// /// @param c character to check /// @param buf buffer whose keywords to use bool vim_iswordc_buf(int c, buf_T *buf) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ARG(2) { return vim_iswordc_tab(c, buf->b_chartab); } /// Just like vim_iswordc() but uses a pointer to the (multi-byte) character. /// /// @param p pointer to the multi-byte character /// /// @return true if "p" points to a keyword character. bool vim_iswordp(char_u *p) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { if (MB_BYTE2LEN(*p) > 1) { return mb_get_class(p) >= 2; } return GET_CHARTAB(curbuf, *p) != 0; } /// Just like vim_iswordc_buf() but uses a pointer to the (multi-byte) /// character. /// /// @param p pointer to the multi-byte character /// @param buf buffer whose keywords to use /// /// @return true if "p" points to a keyword character. bool vim_iswordp_buf(char_u *p, buf_T *buf) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { if (MB_BYTE2LEN(*p) > 1) { return mb_get_class(p) >= 2; } return GET_CHARTAB(buf, *p) != 0; } /// Check that "c" is a valid file-name character. /// Assume characters above 0x100 are valid (multi-byte). /// /// @param c character to check bool vim_isfilec(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return c >= 0x100 || (c > 0 && (g_chartab[c] & CT_FNAME_CHAR)); } /// Check that "c" is a valid file-name character or a wildcard character /// Assume characters above 0x100 are valid (multi-byte). /// Explicitly interpret ']' as a wildcard character as path_has_wildcard("]") /// returns false. /// /// @param c character to check bool vim_isfilec_or_wc(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { char_u buf[2]; buf[0] = (char_u)c; buf[1] = NUL; return vim_isfilec(c) || c == ']' || path_has_wildcard(buf); } /// Check that "c" is a printable character. /// Assume characters above 0x100 are printable for double-byte encodings. /// /// @param c character to check bool vim_isprintc(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { if (c >= 0x100) { return utf_printable(c); } return c >= 0x100 || (c > 0 && (g_chartab[c] & CT_PRINT_CHAR)); } /// Strict version of vim_isprintc(c), don't return true if "c" is the head /// byte of a double-byte character. /// /// @param c character to check /// /// @return true if "c" is a printable character. bool vim_isprintc_strict(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { if (c >= 0x100) { return utf_printable(c); } return c > 0 && (g_chartab[c] & CT_PRINT_CHAR); } /// like chartabsize(), but also check for line breaks on the screen /// /// @param line /// @param s /// @param col /// /// @return The number of characters taken up on the screen. int lbr_chartabsize(char_u *line, unsigned char *s, colnr_T col) { if (!curwin->w_p_lbr && (*p_sbr == NUL) && !curwin->w_p_bri) { if (curwin->w_p_wrap) { return win_nolbr_chartabsize(curwin, s, col, NULL); } RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, s, col) } return win_lbr_chartabsize(curwin, line == NULL ? s: line, s, col, NULL); } /// Call lbr_chartabsize() and advance the pointer. /// /// @param line /// @param s /// @param col /// /// @return The number of characters take up on the screen. int lbr_chartabsize_adv(char_u *line, char_u **s, colnr_T col) { int retval; retval = lbr_chartabsize(line, *s, col); mb_ptr_adv(*s); return retval; } /// This function is used very often, keep it fast!!!! /// /// If "headp" not NULL, set *headp to the size of what we for 'showbreak' /// string at start of line. Warning: *headp is only set if it's a non-zero /// value, init to 0 before calling. /// /// @param wp /// @param line /// @param s /// @param col /// @param headp /// /// @return The number of characters taken up on the screen. int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *headp) { colnr_T col2; colnr_T col_adj = 0; /* col + screen size of tab */ colnr_T colmax; int added; int mb_added = 0; int numberextra; char_u *ps; int n; // No 'linebreak', 'showbreak' and 'breakindent': return quickly. if (!wp->w_p_lbr && !wp->w_p_bri && (*p_sbr == NUL)) { if (wp->w_p_wrap) { return win_nolbr_chartabsize(wp, s, col, headp); } RET_WIN_BUF_CHARTABSIZE(wp, wp->w_buffer, s, col) } // First get normal size, without 'linebreak' int size = win_chartabsize(wp, s, col); int c = *s; if (*s == TAB) { col_adj = size - 1; } // If 'linebreak' set check at a blank before a non-blank if the line // needs a break here if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(s[1]) && wp->w_p_wrap && (wp->w_width != 0)) { // Count all characters from first non-blank after a blank up to next // non-blank after a blank. numberextra = win_col_off(wp); col2 = col; colmax = (colnr_T)(wp->w_width - numberextra - col_adj); if (col >= colmax) { colmax += col_adj; n = colmax + win_col_off2(wp); if (n > 0) { colmax += (((col - colmax) / n) + 1) * n - col_adj; } } for (;;) { ps = s; mb_ptr_adv(s); c = *s; if (!(c != NUL && (vim_isbreak(c) || col2 == col || !vim_isbreak(*ps)))) { break; } col2 += win_chartabsize(wp, s, col2); if (col2 >= colmax) { /* doesn't fit */ size = colmax - col + col_adj; break; } } } else if ((size == 2) && (MB_BYTE2LEN(*s) > 1) && wp->w_p_wrap && in_win_border(wp, col)) { // Count the ">" in the last column. ++size; mb_added = 1; } // May have to add something for 'breakindent' and/or 'showbreak' // string at start of line. // Set *headp to the size of what we add. added = 0; if ((*p_sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && (col != 0)) { colnr_T sbrlen = 0; int numberwidth = win_col_off(wp); numberextra = numberwidth; col += numberextra + mb_added; if (col >= (colnr_T)wp->w_width) { col -= wp->w_width; numberextra = wp->w_width - (numberextra - win_col_off2(wp)); if (col >= numberextra && numberextra > 0) { col %= numberextra; } if (*p_sbr != NUL) { sbrlen = (colnr_T)MB_CHARLEN(p_sbr); if (col >= sbrlen) { col -= sbrlen; } } if (col >= numberextra && numberextra > 0) { col %= numberextra; } else if (col > 0 && numberextra > 0) { col += numberwidth - win_col_off2(wp); } numberwidth -= win_col_off2(wp); } if (col == 0 || (col + size + sbrlen > (colnr_T)wp->w_width)) { added = 0; if (*p_sbr != NUL) { if (size + sbrlen + numberwidth > (colnr_T)wp->w_width) { // Calculate effective window width. int width = (colnr_T)wp->w_width - sbrlen - numberwidth; int prev_width = col ? ((colnr_T)wp->w_width - (sbrlen + col)) : 0; if (width == 0) { width = (colnr_T)wp->w_width; } added += ((size - prev_width) / width) * vim_strsize(p_sbr); if ((size - prev_width) % width) { // Wrapped, add another length of 'sbr'. added += vim_strsize(p_sbr); } } else { added += vim_strsize(p_sbr); } } if (wp->w_p_bri) added += get_breakindent_win(wp, line); size += added; if (col != 0) { added = 0; } } } if (headp != NULL) { *headp = added + mb_added; } return size; } /// Like win_lbr_chartabsize(), except that we know 'linebreak' is off and /// 'wrap' is on. This means we need to check for a double-byte character that /// doesn't fit at the end of the screen line. /// /// @param wp /// @param s /// @param col /// @param headp /// /// @return The number of characters take up on the screen. static int win_nolbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp) { int n; if ((*s == TAB) && (!wp->w_p_list || lcs_tab1)) { n = (int)wp->w_buffer->b_p_ts; return n - (col % n); } n = ptr2cells(s); // Add one cell for a double-width character in the last column of the // window, displayed with a ">". if ((n == 2) && (MB_BYTE2LEN(*s) > 1) && in_win_border(wp, col)) { if (headp != NULL) { *headp = 1; } return 3; } return n; } /// Check that virtual column "vcol" is in the rightmost column of window "wp". /// /// @param wp window /// @param vcol column number bool in_win_border(win_T *wp, colnr_T vcol) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ARG(1) { int width1; // width of first line (after line number) int width2; // width of further lines if (wp->w_width == 0) { // there is no border return false; } width1 = wp->w_width - win_col_off(wp); if ((int)vcol < width1 - 1) { return false; } if ((int)vcol == width1 - 1) { return true; } width2 = width1 + win_col_off2(wp); if (width2 <= 0) { return false; } return (vcol - width1) % width2 == width2 - 1; } /// Get virtual column number of pos. /// start: on the first position of this character (TAB, ctrl) /// cursor: where the cursor is on this character (first char, except for TAB) /// end: on the last position of this character (TAB, ctrl) /// /// This is used very often, keep it fast! /// /// @param wp /// @param pos /// @param start /// @param cursor /// @param end void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end) { colnr_T vcol; char_u *ptr; // points to current char char_u *posptr; // points to char at pos->col char_u *line; // start of the line int incr; int head; int ts = (int)wp->w_buffer->b_p_ts; int c; vcol = 0; line = ptr = ml_get_buf(wp->w_buffer, pos->lnum, false); if (pos->col == MAXCOL) { // continue until the NUL posptr = NULL; } else { // Special check for an empty line, which can happen on exit, when // ml_get_buf() always returns an empty string. if (*ptr == NUL) { pos->col = 0; } posptr = ptr + pos->col; posptr -= utf_head_off(line, posptr); } // This function is used very often, do some speed optimizations. // When 'list', 'linebreak', 'showbreak' and 'breakindent' are not set // use a simple loop. // Also use this when 'list' is set but tabs take their normal size. if ((!wp->w_p_list || (lcs_tab1 != NUL)) && !wp->w_p_lbr && (*p_sbr == NUL) && !wp->w_p_bri ) { for (;;) { head = 0; c = *ptr; // make sure we don't go past the end of the line if (c == NUL) { // NUL at end of line only takes one column incr = 1; break; } // A tab gets expanded, depending on the current column if (c == TAB) { incr = ts - (vcol % ts); } else { // For utf-8, if the byte is >= 0x80, need to look at // further bytes to find the cell width. if (c >= 0x80) { incr = utf_ptr2cells(ptr); } else { incr = g_chartab[c] & CT_CELL_MASK; } // If a double-cell char doesn't fit at the end of a line // it wraps to the next line, it's like this char is three // cells wide. if ((incr == 2) && wp->w_p_wrap && (MB_BYTE2LEN(*ptr) > 1) && in_win_border(wp, vcol)) { incr++; head = 1; } } if ((posptr != NULL) && (ptr >= posptr)) { // character at pos->col break; } vcol += incr; mb_ptr_adv(ptr); } } else { for (;;) { // A tab gets expanded, depending on the current column head = 0; incr = win_lbr_chartabsize(wp, line, ptr, vcol, &head); // make sure we don't go past the end of the line if (*ptr == NUL) { // NUL at end of line only takes one column incr = 1; break; } if ((posptr != NULL) && (ptr >= posptr)) { // character at pos->col break; } vcol += incr; mb_ptr_adv(ptr); } } if (start != NULL) { *start = vcol + head; } if (end != NULL) { *end = vcol + incr - 1; } if (cursor != NULL) { if ((*ptr == TAB) && (State & NORMAL) && !wp->w_p_list && !virtual_active() && !(VIsual_active && ((*p_sel == 'e') || ltoreq(*pos, VIsual)))) { // cursor at end *cursor = vcol + incr - 1; } else { // cursor at start *cursor = vcol + head; } } } /// Get virtual cursor column in the current window, pretending 'list' is off. /// /// @param posp /// /// @retujrn The virtual cursor column. colnr_T getvcol_nolist(pos_T *posp) { int list_save = curwin->w_p_list; colnr_T vcol; curwin->w_p_list = false; getvcol(curwin, posp, NULL, &vcol, NULL); curwin->w_p_list = list_save; return vcol; } /// Get virtual column in virtual mode. /// /// @param wp /// @param pos /// @param start /// @param cursor /// @param end void getvvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end) { colnr_T col; colnr_T coladd; colnr_T endadd; char_u *ptr; if (virtual_active()) { // For virtual mode, only want one value getvcol(wp, pos, &col, NULL, NULL); coladd = pos->coladd; endadd = 0; // Cannot put the cursor on part of a wide character. ptr = ml_get_buf(wp->w_buffer, pos->lnum, false); if (pos->col < (colnr_T)STRLEN(ptr)) { int c = (*mb_ptr2char)(ptr + pos->col); if ((c != TAB) && vim_isprintc(c)) { endadd = (colnr_T)(char2cells(c) - 1); if (coladd > endadd) { // past end of line endadd = 0; } else { coladd = 0; } } } col += coladd; if (start != NULL) { *start = col; } if (cursor != NULL) { *cursor = col; } if (end != NULL) { *end = col + endadd; } } else { getvcol(wp, pos, start, cursor, end); } } /// Get the leftmost and rightmost virtual column of pos1 and pos2. /// Used for Visual block mode. /// /// @param wp /// @param pos1 /// @param pos2 /// @param left /// @param right void getvcols(win_T *wp, pos_T *pos1, pos_T *pos2, colnr_T *left, colnr_T *right) { colnr_T from1; colnr_T from2; colnr_T to1; colnr_T to2; if (lt(*pos1, *pos2)) { getvvcol(wp, pos1, &from1, NULL, &to1); getvvcol(wp, pos2, &from2, NULL, &to2); } else { getvvcol(wp, pos2, &from1, NULL, &to1); getvvcol(wp, pos1, &from2, NULL, &to2); } if (from2 < from1) { *left = from2; } else { *left = from1; } if (to2 > to1) { if ((*p_sel == 'e') && (from2 - 1 >= to1)) { *right = from2 - 1; } else { *right = to2; } } else { *right = to1; } } /// skipwhite: skip over ' ' and '\t'. /// /// @param[in] q String to skip in. /// /// @return Pointer to character after the skipped whitespace. char_u *skipwhite(const char_u *q) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET { const char_u *p = q; while (ascii_iswhite(*p)) { p++; } return (char_u *)p; } /// Skip over digits /// /// @param[in] q String to skip digits in. /// /// @return Pointer to the character after the skipped digits. char_u *skipdigits(const char_u *q) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET { const char_u *p = q; while (ascii_isdigit(*p)) { // skip to next non-digit p++; } return (char_u *)p; } /// skip over binary digits /// /// @param q pointer to string /// /// @return Pointer to the character after the skipped digits. const char* skipbin(const char *q) FUNC_ATTR_PURE FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET { const char *p = q; while (ascii_isbdigit(*p)) { // skip to next non-digit p++; } return p; } /// skip over digits and hex characters /// /// @param q /// /// @return Pointer to the character after the skipped digits and hex /// characters. char_u* skiphex(char_u *q) { char_u *p = q; while (ascii_isxdigit(*p)) { // skip to next non-digit p++; } return p; } /// skip to digit (or NUL after the string) /// /// @param q /// /// @return Pointer to the digit or (NUL after the string). char_u* skiptodigit(char_u *q) { char_u *p = q; while (*p != NUL && !ascii_isdigit(*p)) { // skip to next digit p++; } return p; } /// skip to binary character (or NUL after the string) /// /// @param q pointer to string /// /// @return Pointer to the binary character or (NUL after the string). const char* skiptobin(const char *q) FUNC_ATTR_PURE FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET { const char *p = q; while (*p != NUL && !ascii_isbdigit(*p)) { // skip to next digit p++; } return p; } /// skip to hex character (or NUL after the string) /// /// @param q /// /// @return Pointer to the hex character or (NUL after the string). char_u* skiptohex(char_u *q) { char_u *p = q; while (*p != NUL && !ascii_isxdigit(*p)) { // skip to next digit p++; } return p; } /// Skip over text until ' ' or '\t' or NUL /// /// @param[in] p Text to skip over. /// /// @return Pointer to the next whitespace or NUL character. char_u *skiptowhite(const char_u *p) { while (*p != ' ' && *p != '\t' && *p != NUL) { p++; } return (char_u *)p; } /// skiptowhite_esc: Like skiptowhite(), but also skip escaped chars /// /// @param p /// /// @return Pointer to the next whitespace character. char_u* skiptowhite_esc(char_u *p) { while (*p != ' ' && *p != '\t' && *p != NUL) { if (((*p == '\\') || (*p == Ctrl_V)) && (*(p + 1) != NUL)) { ++p; } ++p; } return p; } /// Get a number from a string and skip over it, signalling overflows /// /// @param[out] pp A pointer to a pointer to char_u. /// It will be advanced past the read number. /// @param[out] nr Number read from the string. /// /// @return OK on success, FAIL on error/overflow int getdigits_safe(char_u **pp, intmax_t *nr) { errno = 0; *nr = strtoimax((char *)(*pp), (char **)pp, 10); if ((*nr == INTMAX_MIN || *nr == INTMAX_MAX) && errno == ERANGE) { return FAIL; } return OK; } /// Get a number from a string and skip over it. /// /// @param[out] pp A pointer to a pointer to char_u. /// It will be advanced past the read number. /// /// @return Number read from the string. intmax_t getdigits(char_u **pp) { intmax_t number; int ret = getdigits_safe(pp, &number); (void)ret; // Avoid "unused variable" warning in Release build assert(ret == OK); return number; } /// Get an int number from a string. Like getdigits(), but restricted to `int`. int getdigits_int(char_u **pp) { intmax_t number = getdigits(pp); #if SIZEOF_INTMAX_T > SIZEOF_INT assert(number >= INT_MIN && number <= INT_MAX); #endif return (int)number; } /// Get a long number from a string. Like getdigits(), but restricted to `long`. long getdigits_long(char_u **pp) { intmax_t number = getdigits(pp); #if SIZEOF_INTMAX_T > SIZEOF_LONG assert(number >= LONG_MIN && number <= LONG_MAX); #endif return (long)number; } /// Check that "lbuf" is empty or only contains blanks. /// /// @param lbuf line buffer to check bool vim_isblankline(char_u *lbuf) { char_u *p = skipwhite(lbuf); return *p == NUL || *p == '\r' || *p == '\n'; } /// Convert a string into a long and/or unsigned long, taking care of /// hexadecimal, octal and binary numbers. Accepts a '-' sign. /// If "prep" is not NULL, returns a flag to indicate the type of the number: /// 0 decimal /// '0' octal /// 'B' bin /// 'b' bin /// 'X' hex /// 'x' hex /// If "len" is not NULL, the length of the number in characters is returned. /// If "nptr" is not NULL, the signed result is returned in it. /// If "unptr" is not NULL, the unsigned result is returned in it. /// If "what" contains STR2NR_BIN recognize binary numbers. /// If "what" contains STR2NR_OCT recognize octal numbers. /// If "what" contains STR2NR_HEX recognize hex numbers. /// If "what" contains STR2NR_FORCE always assume bin/oct/hex. /// If maxlen > 0, check at a maximum maxlen chars. /// /// @param start /// @param prep Returns type of number 0 = decimal, 'x' or 'X' is hex, /// '0' = octal, 'b' or 'B' is bin /// @param len Returns the detected length of number. /// @param what Recognizes what number passed. /// @param nptr Returns the signed result. /// @param unptr Returns the unsigned result. /// @param maxlen Max length of string to check. void vim_str2nr(const char_u *const start, int *const prep, int *const len, const int what, varnumber_T *const nptr, uvarnumber_T *const unptr, const int maxlen) { const char_u *ptr = start; int pre = 0; // default is decimal bool negative = false; uvarnumber_T un = 0; if (ptr[0] == '-') { negative = true; ptr++; } // Recognize hex, octal and bin. if ((ptr[0] == '0') && (ptr[1] != '8') && (ptr[1] != '9') && (maxlen == 0 || maxlen > 1)) { pre = ptr[1]; if ((what & STR2NR_HEX) && ((pre == 'X') || (pre == 'x')) && ascii_isxdigit(ptr[2]) && (maxlen == 0 || maxlen > 2)) { // hexadecimal ptr += 2; } else if ((what & STR2NR_BIN) && ((pre == 'B') || (pre == 'b')) && ascii_isbdigit(ptr[2]) && (maxlen == 0 || maxlen > 2)) { // binary ptr += 2; } else { // decimal or octal, default is decimal pre = 0; if (what & STR2NR_OCT) { // Don't interpret "0", "08" or "0129" as octal. for (int n = 1; ascii_isdigit(ptr[n]); ++n) { if (ptr[n] > '7') { // can't be octal pre = 0; break; } if (ptr[n] >= '0') { // assume octal pre = '0'; } if (n == maxlen) { break; } } } } } // Do the string-to-numeric conversion "manually" to avoid sscanf quirks. int n = 1; if ((pre == 'B') || (pre == 'b') || what == STR2NR_BIN + STR2NR_FORCE) { // bin if (pre != 0) { n += 2; // skip over "0b" } while ('0' <= *ptr && *ptr <= '1') { // avoid ubsan error for overflow if (un < UVARNUMBER_MAX / 2) { un = 2 * un + (uvarnumber_T)(*ptr - '0'); } else { un = UVARNUMBER_MAX; } ptr++; if (n++ == maxlen) { break; } } } else if ((pre == '0') || what == STR2NR_OCT + STR2NR_FORCE) { // octal while ('0' <= *ptr && *ptr <= '7') { // avoid ubsan error for overflow if (un < UVARNUMBER_MAX / 8) { un = 8 * un + (uvarnumber_T)(*ptr - '0'); } else { un = UVARNUMBER_MAX; } ptr++; if (n++ == maxlen) { break; } } } else if ((pre == 'X') || (pre == 'x') || what == STR2NR_HEX + STR2NR_FORCE) { // hex if (pre != 0) { n += 2; // skip over "0x" } while (ascii_isxdigit(*ptr)) { // avoid ubsan error for overflow if (un < UVARNUMBER_MAX / 16) { un = 16 * un + (uvarnumber_T)hex2nr(*ptr); } else { un = UVARNUMBER_MAX; } ptr++; if (n++ == maxlen) { break; } } } else { // decimal while (ascii_isdigit(*ptr)) { // avoid ubsan error for overflow if (un < UVARNUMBER_MAX / 10) { un = 10 * un + (uvarnumber_T)(*ptr - '0'); } else { un = UVARNUMBER_MAX; } ptr++; if (n++ == maxlen) { break; } } } if (prep != NULL) { *prep = pre; } if (len != NULL) { *len = (int)(ptr - start); } if (nptr != NULL) { if (negative) { // account for leading '-' for decimal numbers // avoid ubsan error for overflow if (un > VARNUMBER_MAX) { *nptr = VARNUMBER_MIN; } else { *nptr = -(varnumber_T)un; } } else { if (un > VARNUMBER_MAX) { un = VARNUMBER_MAX; } *nptr = (varnumber_T)un; } } if (unptr != NULL) { *unptr = un; } } /// Return the value of a single hex character. /// Only valid when the argument is '0' - '9', 'A' - 'F' or 'a' - 'f'. /// /// @param c /// /// @return The value of the hex character. int hex2nr(int c) { if ((c >= 'a') && (c <= 'f')) { return c - 'a' + 10; } if ((c >= 'A') && (c <= 'F')) { return c - 'A' + 10; } return c - '0'; } /// Check that "str" starts with a backslash that should be removed. /// For Windows this is only done when the character after the /// backslash is not a normal file name character. /// '$' is a valid file name character, we don't remove the backslash before /// it. This means it is not possible to use an environment variable after a /// backslash. "C:\$VIM\doc" is taken literally, only "$VIM\doc" works. /// Although "\ name" is valid, the backslash in "Program\ files" must be /// removed. Assume a file name doesn't start with a space. /// For multi-byte names, never remove a backslash before a non-ascii /// character, assume that all multi-byte characters are valid file name /// characters. /// /// @param str file path string to check bool rem_backslash(const char_u *str) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { #ifdef BACKSLASH_IN_FILENAME return str[0] == '\\' && str[1] < 0x80 && (str[1] == ' ' || (str[1] != NUL && str[1] != '*' && str[1] != '?' && !vim_isfilec(str[1]))); #else // ifdef BACKSLASH_IN_FILENAME return str[0] == '\\' && str[1] != NUL; #endif // ifdef BACKSLASH_IN_FILENAME } /// Halve the number of backslashes in a file name argument. /// /// @param p void backslash_halve(char_u *p) { for (; *p; ++p) { if (rem_backslash(p)) { STRMOVE(p, p + 1); } } } /// backslash_halve() plus save the result in allocated memory. /// /// @param p /// /// @return String with the number of backslashes halved. char_u* backslash_halve_save(char_u *p) { // TODO(philix): simplify and improve backslash_halve_save algorithm char_u *res = vim_strsave(p); backslash_halve(res); return res; } neovim-0.2.2/src/nvim/charset.h000066400000000000000000000007601320401574200163530ustar00rootroot00000000000000#ifndef NVIM_CHARSET_H #define NVIM_CHARSET_H #include "nvim/types.h" #include "nvim/pos.h" #include "nvim/buffer_defs.h" /// Return the folded-case equivalent of the given character /// /// @param[in] c Character to transform. /// /// @return Folded variant. #define CH_FOLD(c) \ utf_fold((sizeof(c) == sizeof(char)) \ ?((int)(uint8_t)(c)) \ :((int)(c))) #ifdef INCLUDE_GENERATED_DECLARATIONS # include "charset.h.generated.h" #endif #endif // NVIM_CHARSET_H neovim-0.2.2/src/nvim/cursor.c000066400000000000000000000325721320401574200162400ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include #include #include "nvim/cursor.h" #include "nvim/charset.h" #include "nvim/fold.h" #include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/misc1.h" #include "nvim/move.h" #include "nvim/screen.h" #include "nvim/state.h" #include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/mark.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "cursor.c.generated.h" #endif /* * Get the screen position of the cursor. */ int getviscol(void) { colnr_T x; getvvcol(curwin, &curwin->w_cursor, &x, NULL, NULL); return (int)x; } /* * Get the screen position of character col with a coladd in the cursor line. */ int getviscol2(colnr_T col, colnr_T coladd) { colnr_T x; pos_T pos; pos.lnum = curwin->w_cursor.lnum; pos.col = col; pos.coladd = coladd; getvvcol(curwin, &pos, &x, NULL, NULL); return (int)x; } /* * Go to column "wcol", and add/insert white space as necessary to get the * cursor in that column. * The caller must have saved the cursor line for undo! */ int coladvance_force(colnr_T wcol) { int rc = coladvance2(&curwin->w_cursor, true, false, wcol); if (wcol == MAXCOL) { curwin->w_valid &= ~VALID_VIRTCOL; } else { /* Virtcol is valid */ curwin->w_valid |= VALID_VIRTCOL; curwin->w_virtcol = wcol; } return rc; } /* * Try to advance the Cursor to the specified screen column. * If virtual editing: fine tune the cursor position. * Note that all virtual positions off the end of a line should share * a curwin->w_cursor.col value (n.b. this is equal to STRLEN(line)), * beginning at coladd 0. * * return OK if desired column is reached, FAIL if not */ int coladvance(colnr_T wcol) { int rc = getvpos(&curwin->w_cursor, wcol); if (wcol == MAXCOL || rc == FAIL) curwin->w_valid &= ~VALID_VIRTCOL; else if (*get_cursor_pos_ptr() != TAB) { /* Virtcol is valid when not on a TAB */ curwin->w_valid |= VALID_VIRTCOL; curwin->w_virtcol = wcol; } return rc; } static int coladvance2( pos_T *pos, bool addspaces, /* change the text to achieve our goal? */ bool finetune, /* change char offset for the exact column */ colnr_T wcol /* column to move to */ ) { int idx; char_u *ptr; char_u *line; colnr_T col = 0; int csize = 0; int one_more; int head = 0; one_more = (State & INSERT) || restart_edit != NUL || (VIsual_active && *p_sel != 'o') || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL); line = ml_get_buf(curbuf, pos->lnum, false); if (wcol >= MAXCOL) { idx = (int)STRLEN(line) - 1 + one_more; col = wcol; if ((addspaces || finetune) && !VIsual_active) { curwin->w_curswant = linetabsize(line) + one_more; if (curwin->w_curswant > 0) --curwin->w_curswant; } } else { int width = curwin->w_width - win_col_off(curwin); if (finetune && curwin->w_p_wrap && curwin->w_width != 0 && wcol >= (colnr_T)width) { csize = linetabsize(line); if (csize > 0) csize--; if (wcol / width > (colnr_T)csize / width && ((State & INSERT) == 0 || (int)wcol > csize + 1)) { /* In case of line wrapping don't move the cursor beyond the * right screen edge. In Insert mode allow going just beyond * the last character (like what happens when typing and * reaching the right window edge). */ wcol = (csize / width + 1) * width - 1; } } ptr = line; while (col <= wcol && *ptr != NUL) { /* Count a tab for what it's worth (if list mode not on) */ csize = win_lbr_chartabsize(curwin, line, ptr, col, &head); mb_ptr_adv(ptr); col += csize; } idx = (int)(ptr - line); /* * Handle all the special cases. The virtual_active() check * is needed to ensure that a virtual position off the end of * a line has the correct indexing. The one_more comparison * replaces an explicit add of one_more later on. */ if (col > wcol || (!virtual_active() && one_more == 0)) { idx -= 1; /* Don't count the chars from 'showbreak'. */ csize -= head; col -= csize; } if (virtual_active() && addspaces && ((col != wcol && col != wcol + 1) || csize > 1)) { /* 'virtualedit' is set: The difference between wcol and col is * filled with spaces. */ if (line[idx] == NUL) { /* Append spaces */ int correct = wcol - col; char_u *newline = xmallocz((size_t)(idx + correct)); memcpy(newline, line, (size_t)idx); memset(newline + idx, ' ', (size_t)correct); ml_replace(pos->lnum, newline, false); changed_bytes(pos->lnum, (colnr_T)idx); idx += correct; col = wcol; } else { /* Break a tab */ int linelen = (int)STRLEN(line); int correct = wcol - col - csize + 1; /* negative!! */ char_u *newline; if (-correct > csize) return FAIL; newline = xmallocz((size_t)(linelen - 1 + csize)); // Copy first idx chars memcpy(newline, line, (size_t)idx); // Replace idx'th char with csize spaces memset(newline + idx, ' ', (size_t)csize); // Copy the rest of the line memcpy(newline + idx + csize, line + idx + 1, (size_t)(linelen - idx - 1)); ml_replace(pos->lnum, newline, false); changed_bytes(pos->lnum, idx); idx += (csize - 1 + correct); col += correct; } } } if (idx < 0) pos->col = 0; else pos->col = idx; pos->coladd = 0; if (finetune) { if (wcol == MAXCOL) { /* The width of the last character is used to set coladd. */ if (!one_more) { colnr_T scol, ecol; getvcol(curwin, pos, &scol, NULL, &ecol); pos->coladd = ecol - scol; } } else { int b = (int)wcol - (int)col; /* The difference between wcol and col is used to set coladd. */ if (b > 0 && b < (MAXCOL - 2 * curwin->w_width)) pos->coladd = b; col += b; } } // Prevent from moving onto a trail byte. if (has_mbyte) { mark_mb_adjustpos(curbuf, pos); } if (col < wcol) return FAIL; return OK; } /* * Return in "pos" the position of the cursor advanced to screen column "wcol". * return OK if desired column is reached, FAIL if not */ int getvpos(pos_T *pos, colnr_T wcol) { return coladvance2(pos, false, virtual_active(), wcol); } /* * Increment the cursor position. See inc() for return values. */ int inc_cursor(void) { return inc(&curwin->w_cursor); } /* * dec(p) * * Decrement the line pointer 'p' crossing line boundaries as necessary. * Return 1 when crossing a line, -1 when at start of file, 0 otherwise. */ int dec_cursor(void) { return dec(&curwin->w_cursor); } /// Get the line number relative to the current cursor position, i.e. the /// difference between line number and cursor position. Only look for lines that /// can be visible, folded lines don't count. /// /// @param lnum line number to get the result for linenr_T get_cursor_rel_lnum(win_T *wp, linenr_T lnum) { linenr_T cursor = wp->w_cursor.lnum; if (lnum == cursor || !hasAnyFolding(wp)) { return lnum - cursor; } linenr_T from_line = lnum < cursor ? lnum : cursor; linenr_T to_line = lnum > cursor ? lnum : cursor; linenr_T retval = 0; // Loop until we reach to_line, skipping folds. for (; from_line < to_line; from_line++, retval++) { // If from_line is in a fold, set it to the last line of that fold. (void)hasFoldingWin(wp, from_line, NULL, &from_line, true, NULL); } // If to_line is in a closed fold, the line count is off by +1. Correct it. if (from_line > to_line) { retval--; } return (lnum < cursor) ? -retval : retval; } // Make sure "pos.lnum" and "pos.col" are valid in "buf". // This allows for the col to be on the NUL byte. void check_pos(buf_T *buf, pos_T *pos) { char_u *line; colnr_T len; if (pos->lnum > buf->b_ml.ml_line_count) { pos->lnum = buf->b_ml.ml_line_count; } if (pos->col > 0) { line = ml_get_buf(buf, pos->lnum, false); len = (colnr_T)STRLEN(line); if (pos->col > len) { pos->col = len; } } } /* * Make sure curwin->w_cursor.lnum is valid. */ void check_cursor_lnum(void) { if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count) { /* If there is a closed fold at the end of the file, put the cursor in * its first line. Otherwise in the last line. */ if (!hasFolding(curbuf->b_ml.ml_line_count, &curwin->w_cursor.lnum, NULL)) curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count; } if (curwin->w_cursor.lnum <= 0) curwin->w_cursor.lnum = 1; } /* * Make sure curwin->w_cursor.col is valid. */ void check_cursor_col(void) { check_cursor_col_win(curwin); } /// Make sure win->w_cursor.col is valid. Special handling of insert-mode. /// @see mb_check_adjust_col void check_cursor_col_win(win_T *win) { colnr_T len; colnr_T oldcol = win->w_cursor.col; colnr_T oldcoladd = win->w_cursor.col + win->w_cursor.coladd; len = (colnr_T)STRLEN(ml_get_buf(win->w_buffer, win->w_cursor.lnum, false)); if (len == 0) { win->w_cursor.col = 0; } else if (win->w_cursor.col >= len) { /* Allow cursor past end-of-line when: * - in Insert mode or restarting Insert mode * - in Visual mode and 'selection' isn't "old" * - 'virtualedit' is set */ if ((State & INSERT) || restart_edit || (VIsual_active && *p_sel != 'o') || (ve_flags & VE_ONEMORE) || virtual_active()) { win->w_cursor.col = len; } else { win->w_cursor.col = len - 1; // Move the cursor to the head byte. if (has_mbyte) { mark_mb_adjustpos(win->w_buffer, &win->w_cursor); } } } else if (win->w_cursor.col < 0) { win->w_cursor.col = 0; } // If virtual editing is on, we can leave the cursor on the old position, // only we must set it to virtual. But don't do it when at the end of the // line. if (oldcol == MAXCOL) { win->w_cursor.coladd = 0; } else if (ve_flags == VE_ALL) { if (oldcoladd > win->w_cursor.col) { win->w_cursor.coladd = oldcoladd - win->w_cursor.col; // Make sure that coladd is not more than the char width. // Not for the last character, coladd is then used when the cursor // is actually after the last character. if (win->w_cursor.col + 1 < len && win->w_cursor.coladd > 0) { int cs, ce; getvcol(win, &win->w_cursor, &cs, NULL, &ce); if (win->w_cursor.coladd > ce - cs) { win->w_cursor.coladd = ce - cs; } } } else { // avoid weird number when there is a miscalculation or overflow win->w_cursor.coladd = 0; } } } /* * make sure curwin->w_cursor in on a valid character */ void check_cursor(void) { check_cursor_lnum(); check_cursor_col(); } /* * Make sure curwin->w_cursor is not on the NUL at the end of the line. * Allow it when in Visual mode and 'selection' is not "old". */ void adjust_cursor_col(void) { if (curwin->w_cursor.col > 0 && (!VIsual_active || *p_sel == 'o') && gchar_cursor() == NUL) --curwin->w_cursor.col; } /* * When curwin->w_leftcol has changed, adjust the cursor position. * Return true if the cursor was moved. */ bool leftcol_changed(void) { // TODO(hinidu): I think it should be colnr_T or int, but p_siso is long. // Perhaps we can change p_siso to int. int64_t lastcol; colnr_T s, e; bool retval = false; changed_cline_bef_curs(); lastcol = curwin->w_leftcol + curwin->w_width - curwin_col_off() - 1; validate_virtcol(); /* * If the cursor is right or left of the screen, move it to last or first * character. */ if (curwin->w_virtcol > (colnr_T)(lastcol - p_siso)) { retval = true; coladvance((colnr_T)(lastcol - p_siso)); } else if (curwin->w_virtcol < curwin->w_leftcol + p_siso) { retval = true; coladvance((colnr_T)(curwin->w_leftcol + p_siso)); } /* * If the start of the character under the cursor is not on the screen, * advance the cursor one more char. If this fails (last char of the * line) adjust the scrolling. */ getvvcol(curwin, &curwin->w_cursor, &s, NULL, &e); if (e > (colnr_T)lastcol) { retval = true; coladvance(s - 1); } else if (s < curwin->w_leftcol) { retval = true; if (coladvance(e + 1) == FAIL) { /* there isn't another character */ curwin->w_leftcol = s; /* adjust w_leftcol instead */ changed_cline_bef_curs(); } } if (retval) curwin->w_set_curswant = true; redraw_later(NOT_VALID); return retval; } int gchar_cursor(void) { if (has_mbyte) return (*mb_ptr2char)(get_cursor_pos_ptr()); return (int)*get_cursor_pos_ptr(); } /* * Write a character at the current cursor position. * It is directly written into the block. */ void pchar_cursor(char_u c) { *(ml_get_buf(curbuf, curwin->w_cursor.lnum, true) + curwin->w_cursor.col) = c; } /* * Return pointer to cursor line. */ char_u *get_cursor_line_ptr(void) { return ml_get_buf(curbuf, curwin->w_cursor.lnum, false); } /* * Return pointer to cursor position. */ char_u *get_cursor_pos_ptr(void) { return ml_get_buf(curbuf, curwin->w_cursor.lnum, false) + curwin->w_cursor.col; } neovim-0.2.2/src/nvim/cursor.h000066400000000000000000000003021320401574200162270ustar00rootroot00000000000000#ifndef NVIM_CURSOR_H #define NVIM_CURSOR_H #include #include "nvim/vim.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "cursor.h.generated.h" #endif #endif // NVIM_CURSOR_H neovim-0.2.2/src/nvim/cursor_shape.c000066400000000000000000000243411320401574200174130ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include #include #include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/cursor_shape.h" #include "nvim/ex_getln.h" #include "nvim/charset.h" #include "nvim/strings.h" #include "nvim/syntax.h" #include "nvim/api/private/helpers.h" #include "nvim/ui.h" /// Handling of cursor and mouse pointer shapes in various modes. cursorentry_T shape_table[SHAPE_IDX_COUNT] = { // Values are set by 'guicursor' and 'mouseshape'. // Adjust the SHAPE_IDX_ defines when changing this! { "normal", 0, 0, 0, 700L, 400L, 250L, 0, 0, "n", SHAPE_CURSOR+SHAPE_MOUSE }, { "visual", 0, 0, 0, 700L, 400L, 250L, 0, 0, "v", SHAPE_CURSOR+SHAPE_MOUSE }, { "insert", 0, 0, 0, 700L, 400L, 250L, 0, 0, "i", SHAPE_CURSOR+SHAPE_MOUSE }, { "replace", 0, 0, 0, 700L, 400L, 250L, 0, 0, "r", SHAPE_CURSOR+SHAPE_MOUSE }, { "cmdline_normal", 0, 0, 0, 700L, 400L, 250L, 0, 0, "c", SHAPE_CURSOR+SHAPE_MOUSE }, { "cmdline_insert", 0, 0, 0, 700L, 400L, 250L, 0, 0, "ci", SHAPE_CURSOR+SHAPE_MOUSE }, { "cmdline_replace", 0, 0, 0, 700L, 400L, 250L, 0, 0, "cr", SHAPE_CURSOR+SHAPE_MOUSE }, { "operator", 0, 0, 0, 700L, 400L, 250L, 0, 0, "o", SHAPE_CURSOR+SHAPE_MOUSE }, { "visual_select", 0, 0, 0, 700L, 400L, 250L, 0, 0, "ve", SHAPE_CURSOR+SHAPE_MOUSE }, { "cmdline_hover", 0, 0, 0, 0L, 0L, 0L, 0, 0, "e", SHAPE_MOUSE }, { "statusline_hover", 0, 0, 0, 0L, 0L, 0L, 0, 0, "s", SHAPE_MOUSE }, { "statusline_drag", 0, 0, 0, 0L, 0L, 0L, 0, 0, "sd", SHAPE_MOUSE }, { "vsep_hover", 0, 0, 0, 0L, 0L, 0L, 0, 0, "vs", SHAPE_MOUSE }, { "vsep_drag", 0, 0, 0, 0L, 0L, 0L, 0, 0, "vd", SHAPE_MOUSE }, { "more", 0, 0, 0, 0L, 0L, 0L, 0, 0, "m", SHAPE_MOUSE }, { "more_lastline", 0, 0, 0, 0L, 0L, 0L, 0, 0, "ml", SHAPE_MOUSE }, { "showmatch", 0, 0, 0, 100L, 100L, 100L, 0, 0, "sm", SHAPE_CURSOR }, }; /// Converts cursor_shapes into an Array of Dictionaries /// @return Array of the form {[ "cursor_shape": ... ], ...} Array mode_style_array(void) { Array all = ARRAY_DICT_INIT; for (int i = 0; i < SHAPE_IDX_COUNT; i++) { Dictionary dic = ARRAY_DICT_INIT; cursorentry_T *cur = &shape_table[i]; if (cur->used_for & SHAPE_MOUSE) { PUT(dic, "mouse_shape", INTEGER_OBJ(cur->mshape)); } if (cur->used_for & SHAPE_CURSOR) { String shape_str; switch (cur->shape) { case SHAPE_BLOCK: shape_str = cstr_to_string("block"); break; case SHAPE_VER: shape_str = cstr_to_string("vertical"); break; case SHAPE_HOR: shape_str = cstr_to_string("horizontal"); break; default: shape_str = cstr_to_string("unknown"); } PUT(dic, "cursor_shape", STRING_OBJ(shape_str)); PUT(dic, "cell_percentage", INTEGER_OBJ(cur->percentage)); PUT(dic, "blinkwait", INTEGER_OBJ(cur->blinkwait)); PUT(dic, "blinkon", INTEGER_OBJ(cur->blinkon)); PUT(dic, "blinkoff", INTEGER_OBJ(cur->blinkoff)); PUT(dic, "hl_id", INTEGER_OBJ(cur->id)); PUT(dic, "id_lm", INTEGER_OBJ(cur->id_lm)); } PUT(dic, "name", STRING_OBJ(cstr_to_string(cur->full_name))); PUT(dic, "short_name", STRING_OBJ(cstr_to_string(cur->name))); ADD(all, DICTIONARY_OBJ(dic)); } return all; } /// Parse the 'guicursor' option /// /// @param what SHAPE_CURSOR or SHAPE_MOUSE ('mouseshape') /// /// @returns error message for an illegal option, NULL otherwise. char_u *parse_shape_opt(int what) { char_u *modep; char_u *colonp; char_u *commap; char_u *slashp; char_u *p, *endp; int idx = 0; /* init for GCC */ int all_idx; int len; int i; int found_ve = false; /* found "ve" flag */ int round; // First round: check for errors; second round: do it for real. for (round = 1; round <= 2; round++) { // Repeat for all comma separated parts. modep = p_guicursor; if (*p_guicursor == NUL) { modep = (char_u *)"a:block-blinkon0"; } while (*modep != NUL) { colonp = vim_strchr(modep, ':'); if (colonp == NULL) return (char_u *)N_("E545: Missing colon"); if (colonp == modep) return (char_u *)N_("E546: Illegal mode"); commap = vim_strchr(modep, ','); // Repeat for all modes before the colon. // For the 'a' mode, we loop to handle all the modes. all_idx = -1; assert(modep < colonp); while (modep < colonp || all_idx >= 0) { if (all_idx < 0) { // Find the mode if (modep[1] == '-' || modep[1] == ':') { len = 1; } else { len = 2; } if (len == 1 && TOLOWER_ASC(modep[0]) == 'a') { all_idx = SHAPE_IDX_COUNT - 1; } else { for (idx = 0; idx < SHAPE_IDX_COUNT; ++idx) if (STRNICMP(modep, shape_table[idx].name, len) == 0) break; if (idx == SHAPE_IDX_COUNT || (shape_table[idx].used_for & what) == 0) return (char_u *)N_("E546: Illegal mode"); if (len == 2 && modep[0] == 'v' && modep[1] == 'e') found_ve = true; } modep += len + 1; } if (all_idx >= 0) { idx = all_idx--; } else if (round == 2) { { // Set the defaults, for the missing parts shape_table[idx].shape = SHAPE_BLOCK; shape_table[idx].blinkwait = 0L; shape_table[idx].blinkon = 0L; shape_table[idx].blinkoff = 0L; } } /* Parse the part after the colon */ for (p = colonp + 1; *p && *p != ','; ) { { /* * First handle the ones with a number argument. */ i = *p; len = 0; if (STRNICMP(p, "ver", 3) == 0) len = 3; else if (STRNICMP(p, "hor", 3) == 0) len = 3; else if (STRNICMP(p, "blinkwait", 9) == 0) len = 9; else if (STRNICMP(p, "blinkon", 7) == 0) len = 7; else if (STRNICMP(p, "blinkoff", 8) == 0) len = 8; if (len != 0) { p += len; if (!ascii_isdigit(*p)) return (char_u *)N_("E548: digit expected"); int n = getdigits_int(&p); if (len == 3) { /* "ver" or "hor" */ if (n == 0) return (char_u *)N_("E549: Illegal percentage"); if (round == 2) { if (TOLOWER_ASC(i) == 'v') shape_table[idx].shape = SHAPE_VER; else shape_table[idx].shape = SHAPE_HOR; shape_table[idx].percentage = n; } } else if (round == 2) { if (len == 9) shape_table[idx].blinkwait = n; else if (len == 7) shape_table[idx].blinkon = n; else shape_table[idx].blinkoff = n; } } else if (STRNICMP(p, "block", 5) == 0) { if (round == 2) shape_table[idx].shape = SHAPE_BLOCK; p += 5; } else { /* must be a highlight group name then */ endp = vim_strchr(p, '-'); if (commap == NULL) { /* last part */ if (endp == NULL) endp = p + STRLEN(p); /* find end of part */ } else if (endp > commap || endp == NULL) { endp = commap; } slashp = vim_strchr(p, '/'); if (slashp != NULL && slashp < endp) { /* "group/langmap_group" */ i = syn_check_group(p, (int)(slashp - p)); p = slashp + 1; } if (round == 2) { shape_table[idx].id = syn_check_group(p, (int)(endp - p)); shape_table[idx].id_lm = shape_table[idx].id; if (slashp != NULL && slashp < endp) shape_table[idx].id = i; } p = endp; } } /* if (what != SHAPE_MOUSE) */ if (*p == '-') ++p; } } modep = p; if (*modep == ',') ++modep; } } /* If the 's' flag is not given, use the 'v' cursor for 's' */ if (!found_ve) { { shape_table[SHAPE_IDX_VE].shape = shape_table[SHAPE_IDX_V].shape; shape_table[SHAPE_IDX_VE].percentage = shape_table[SHAPE_IDX_V].percentage; shape_table[SHAPE_IDX_VE].blinkwait = shape_table[SHAPE_IDX_V].blinkwait; shape_table[SHAPE_IDX_VE].blinkon = shape_table[SHAPE_IDX_V].blinkon; shape_table[SHAPE_IDX_VE].blinkoff = shape_table[SHAPE_IDX_V].blinkoff; shape_table[SHAPE_IDX_VE].id = shape_table[SHAPE_IDX_V].id; shape_table[SHAPE_IDX_VE].id_lm = shape_table[SHAPE_IDX_V].id_lm; } } ui_mode_info_set(); return NULL; } /// Map cursor mode from string to integer /// /// @param mode Fullname of the mode whose id we are looking for /// @return -1 in case of failure, else the matching SHAPE_ID* integer int cursor_mode_str2int(const char *mode) { for (int current_mode = 0; current_mode < SHAPE_IDX_COUNT; current_mode++) { if (strcmp(shape_table[current_mode].full_name, mode) == 0) { return current_mode; } } WLOG("Unknown mode %s", mode); return -1; } /// Return the index into shape_table[] for the current mode. int cursor_get_mode_idx(void) { if (State == SHOWMATCH) { return SHAPE_IDX_SM; } else if (State & VREPLACE_FLAG) { return SHAPE_IDX_R; } else if (State & REPLACE_FLAG) { return SHAPE_IDX_R; } else if (State & INSERT) { return SHAPE_IDX_I; } else if (State & CMDLINE) { if (cmdline_at_end()) { return SHAPE_IDX_C; } else if (cmdline_overstrike()) { return SHAPE_IDX_CR; } else { return SHAPE_IDX_CI; } } else if (finish_op) { return SHAPE_IDX_O; } else if (VIsual_active) { if (*p_sel == 'e') { return SHAPE_IDX_VE; } else { return SHAPE_IDX_V; } } else { return SHAPE_IDX_N; } } neovim-0.2.2/src/nvim/cursor_shape.h000066400000000000000000000047111320401574200174170ustar00rootroot00000000000000#ifndef NVIM_CURSOR_SHAPE_H #define NVIM_CURSOR_SHAPE_H #include "nvim/types.h" #include "nvim/api/private/defs.h" /// struct to store values from 'guicursor' and 'mouseshape' /// Indexes in shape_table[] typedef enum { SHAPE_IDX_N = 0, ///< Normal mode SHAPE_IDX_V = 1, ///< Visual mode SHAPE_IDX_I = 2, ///< Insert mode SHAPE_IDX_R = 3, ///< Replace mode SHAPE_IDX_C = 4, ///< Command line Normal mode SHAPE_IDX_CI = 5, ///< Command line Insert mode SHAPE_IDX_CR = 6, ///< Command line Replace mode SHAPE_IDX_O = 7, ///< Operator-pending mode SHAPE_IDX_VE = 8, ///< Visual mode with 'selection' exclusive SHAPE_IDX_CLINE = 9, ///< On command line SHAPE_IDX_STATUS = 10, ///< On status line SHAPE_IDX_SDRAG = 11, ///< dragging a status line SHAPE_IDX_VSEP = 12, ///< On vertical separator line SHAPE_IDX_VDRAG = 13, ///< dragging a vertical separator line SHAPE_IDX_MORE = 14, ///< Hit-return or More SHAPE_IDX_MOREL = 15, ///< Hit-return or More in last line SHAPE_IDX_SM = 16, ///< showing matching paren SHAPE_IDX_COUNT = 17 } ModeShape; typedef enum { SHAPE_BLOCK = 0, ///< block cursor SHAPE_HOR = 1, ///< horizontal bar cursor SHAPE_VER = 2 ///< vertical bar cursor } CursorShape; #define MSHAPE_NUMBERED 1000 /* offset for shapes identified by number */ #define MSHAPE_HIDE 1 /* hide mouse pointer */ #define SHAPE_MOUSE 1 /* used for mouse pointer shape */ #define SHAPE_CURSOR 2 /* used for text cursor shape */ typedef struct cursor_entry { char *full_name; ///< mode description CursorShape shape; ///< cursor shape: one of the SHAPE_ defines int mshape; ///< mouse shape: one of the MSHAPE defines int percentage; ///< percentage of cell for bar long blinkwait; ///< blinking, wait time before blinking starts long blinkon; ///< blinking, on time long blinkoff; ///< blinking, off time int id; ///< highlight group ID int id_lm; ///< highlight group ID for :lmap mode char *name; ///< mode short name char used_for; ///< SHAPE_MOUSE and/or SHAPE_CURSOR } cursorentry_T; extern cursorentry_T shape_table[SHAPE_IDX_COUNT]; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "cursor_shape.h.generated.h" #endif #endif // NVIM_CURSOR_SHAPE_H neovim-0.2.2/src/nvim/diff.c000066400000000000000000002111261320401574200156250ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /// @file diff.c /// /// Code for diff'ing two, three or four buffers. #include #include #include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/diff.h" #include "nvim/buffer.h" #include "nvim/charset.h" #include "nvim/cursor.h" #include "nvim/eval.h" #include "nvim/ex_cmds.h" #include "nvim/ex_docmd.h" #include "nvim/fileio.h" #include "nvim/fold.h" #include "nvim/mark.h" #include "nvim/mbyte.h" #include "nvim/memline.h" #include "nvim/message.h" #include "nvim/misc1.h" #include "nvim/memory.h" #include "nvim/move.h" #include "nvim/normal.h" #include "nvim/option.h" #include "nvim/path.h" #include "nvim/screen.h" #include "nvim/strings.h" #include "nvim/undo.h" #include "nvim/window.h" #include "nvim/os/os.h" #include "nvim/os/shell.h" static int diff_busy = FALSE; // ex_diffgetput() is busy // Flags obtained from the 'diffopt' option #define DIFF_FILLER 1 // display filler lines #define DIFF_ICASE 2 // ignore case #define DIFF_IWHITE 4 // ignore change in white space #define DIFF_HORIZONTAL 8 // horizontal splits #define DIFF_VERTICAL 16 // vertical splits static int diff_flags = DIFF_FILLER; #define LBUFLEN 50 // length of line in diff file // TRUE when "diff -a" works, FALSE when it doesn't work, MAYBE when not // checked yet static int diff_a_works = MAYBE; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "diff.c.generated.h" #endif /// Called when deleting or unloading a buffer: No longer make a diff with it. /// /// @param buf void diff_buf_delete(buf_T *buf) { FOR_ALL_TABS(tp) { int i = diff_buf_idx_tp(buf, tp); if (i != DB_COUNT) { tp->tp_diffbuf[i] = NULL; tp->tp_diff_invalid = TRUE; if (tp == curtab) { diff_redraw(TRUE); } } } } /// Check if the current buffer should be added to or removed from the list of /// diff buffers. /// /// @param win void diff_buf_adjust(win_T *win) { if (!win->w_p_diff) { // When there is no window showing a diff for this buffer, remove // it from the diffs. bool found_win = false; FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { if ((wp->w_buffer == win->w_buffer) && wp->w_p_diff) { found_win = true; } } if (!found_win) { int i = diff_buf_idx(win->w_buffer); if (i != DB_COUNT) { curtab->tp_diffbuf[i] = NULL; curtab->tp_diff_invalid = TRUE; diff_redraw(TRUE); } } } else { diff_buf_add(win->w_buffer); } } /// Add a buffer to make diffs for. /// /// Call this when a new buffer is being edited in the current window where /// 'diff' is set. /// Marks the current buffer as being part of the diff and requiring updating. /// This must be done before any autocmd, because a command may use info /// about the screen contents. /// /// @param buf The buffer to add. void diff_buf_add(buf_T *buf) { if (diff_buf_idx(buf) != DB_COUNT) { // It's already there. return; } int i; for (i = 0; i < DB_COUNT; ++i) { if (curtab->tp_diffbuf[i] == NULL) { curtab->tp_diffbuf[i] = buf; curtab->tp_diff_invalid = TRUE; diff_redraw(TRUE); return; } } EMSGN(_("E96: Cannot diff more than %" PRId64 " buffers"), DB_COUNT); } /// /// Remove all buffers to make diffs for. /// static void diff_buf_clear(void) { for (int i = 0; i < DB_COUNT; i++) { if (curtab->tp_diffbuf[i] != NULL) { curtab->tp_diffbuf[i] = NULL; curtab->tp_diff_invalid = true; diff_redraw(true); } } } /// Find buffer "buf" in the list of diff buffers for the current tab page. /// /// @param buf The buffer to find. /// /// @return Its index or DB_COUNT if not found. static int diff_buf_idx(buf_T *buf) { int idx; for (idx = 0; idx < DB_COUNT; ++idx) { if (curtab->tp_diffbuf[idx] == buf) { break; } } return idx; } /// Find buffer "buf" in the list of diff buffers for tab page "tp". /// /// @param buf /// @param tp /// /// @return its index or DB_COUNT if not found. static int diff_buf_idx_tp(buf_T *buf, tabpage_T *tp) { int idx; for (idx = 0; idx < DB_COUNT; ++idx) { if (tp->tp_diffbuf[idx] == buf) { break; } } return idx; } /// Mark the diff info involving buffer "buf" as invalid, it will be updated /// when info is requested. /// /// @param buf void diff_invalidate(buf_T *buf) { FOR_ALL_TABS(tp) { int i = diff_buf_idx_tp(buf, tp); if (i != DB_COUNT) { tp->tp_diff_invalid = TRUE; if (tp == curtab) { diff_redraw(TRUE); } } } } /// Called by mark_adjust(): update line numbers in "curbuf". /// /// @param line1 /// @param line2 /// @param amount /// @param amount_after void diff_mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_after) { // Handle all tab pages that use the current buffer in a diff. FOR_ALL_TABS(tp) { int idx = diff_buf_idx_tp(curbuf, tp); if (idx != DB_COUNT) { diff_mark_adjust_tp(tp, idx, line1, line2, amount, amount_after); } } } /// Update line numbers in tab page "tp" for "curbuf" with index "idx". /// /// This attempts to update the changes as much as possible: /// When inserting/deleting lines outside of existing change blocks, create a /// new change block and update the line numbers in following blocks. /// When inserting/deleting lines in existing change blocks, update them. /// /// @param tp /// @param idx /// @param line1 /// @param line2 /// @param amount /// @amount_after static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1, linenr_T line2, long amount, long amount_after) { int inserted; int deleted; if (line2 == MAXLNUM) { // mark_adjust(99, MAXLNUM, 9, 0): insert lines inserted = amount; deleted = 0; } else if (amount_after > 0) { // mark_adjust(99, 98, MAXLNUM, 9): a change that inserts lines inserted = amount_after; deleted = 0; } else { // mark_adjust(98, 99, MAXLNUM, -2): delete lines inserted = 0; deleted = -amount_after; } diff_T *dprev = NULL; diff_T *dp = tp->tp_first_diff; linenr_T last; linenr_T lnum_deleted = line1; // lnum of remaining deletion int n; int off; for (;;) { // If the change is after the previous diff block and before the next // diff block, thus not touching an existing change, create a new diff // block. Don't do this when ex_diffgetput() is busy. if (((dp == NULL) || (dp->df_lnum[idx] - 1 > line2) || ((line2 == MAXLNUM) && (dp->df_lnum[idx] > line1))) && ((dprev == NULL) || (dprev->df_lnum[idx] + dprev->df_count[idx] < line1)) && !diff_busy) { diff_T *dnext = diff_alloc_new(tp, dprev, dp); dnext->df_lnum[idx] = line1; dnext->df_count[idx] = inserted; int i; for (i = 0; i < DB_COUNT; ++i) { if ((tp->tp_diffbuf[i] != NULL) && (i != idx)) { if (dprev == NULL) { dnext->df_lnum[i] = line1; } else { dnext->df_lnum[i] = line1 + (dprev->df_lnum[i] + dprev->df_count[i]) - (dprev->df_lnum[idx] + dprev->df_count[idx]); } dnext->df_count[i] = deleted; } } } // if at end of the list, quit if (dp == NULL) { break; } // // Check for these situations: // 1 2 3 // 1 2 3 // line1 2 3 4 5 // 2 3 4 5 // 2 3 4 5 // line2 2 3 4 5 // 3 5 6 // 3 5 6 // compute last line of this change last = dp->df_lnum[idx] + dp->df_count[idx] - 1; // 1. change completely above line1: nothing to do if (last >= line1 - 1) { // 6. change below line2: only adjust for amount_after; also when // "deleted" became zero when deleted all lines between two diffs. if (dp->df_lnum[idx] - (deleted + inserted != 0) > line2) { if (amount_after == 0) { // nothing left to change break; } dp->df_lnum[idx] += amount_after; } else { int check_unchanged = FALSE; // 2. 3. 4. 5.: inserted/deleted lines touching this diff. if (deleted > 0) { if (dp->df_lnum[idx] >= line1) { off = dp->df_lnum[idx] - lnum_deleted; if (last <= line2) { // 4. delete all lines of diff if ((dp->df_next != NULL) && (dp->df_next->df_lnum[idx] - 1 <= line2)) { // delete continues in next diff, only do // lines until that one n = dp->df_next->df_lnum[idx] - lnum_deleted; deleted -= n; n -= dp->df_count[idx]; lnum_deleted = dp->df_next->df_lnum[idx]; } else { n = deleted - dp->df_count[idx]; } dp->df_count[idx] = 0; } else { // 5. delete lines at or just before top of diff n = off; dp->df_count[idx] -= line2 - dp->df_lnum[idx] + 1; check_unchanged = TRUE; } dp->df_lnum[idx] = line1; } else { off = 0; if (last < line2) { // 2. delete at end of of diff dp->df_count[idx] -= last - lnum_deleted + 1; if ((dp->df_next != NULL) && (dp->df_next->df_lnum[idx] - 1 <= line2)) { // delete continues in next diff, only do // lines until that one n = dp->df_next->df_lnum[idx] - 1 - last; deleted -= dp->df_next->df_lnum[idx] - lnum_deleted; lnum_deleted = dp->df_next->df_lnum[idx]; } else { n = line2 - last; } check_unchanged = TRUE; } else { // 3. delete lines inside the diff n = 0; dp->df_count[idx] -= deleted; } } int i; for (i = 0; i < DB_COUNT; ++i) { if ((tp->tp_diffbuf[i] != NULL) && (i != idx)) { dp->df_lnum[i] -= off; dp->df_count[i] += n; } } } else { if (dp->df_lnum[idx] <= line1) { // inserted lines somewhere in this diff dp->df_count[idx] += inserted; check_unchanged = TRUE; } else { // inserted lines somewhere above this diff dp->df_lnum[idx] += inserted; } } if (check_unchanged) { // Check if inserted lines are equal, may reduce the size of the // diff. // // TODO: also check for equal lines in the middle and perhaps split // the block. diff_check_unchanged(tp, dp); } } } // check if this block touches the previous one, may merge them. if ((dprev != NULL) && (dprev->df_lnum[idx] + dprev->df_count[idx] == dp->df_lnum[idx])) { int i; for (i = 0; i < DB_COUNT; ++i) { if (tp->tp_diffbuf[i] != NULL) { dprev->df_count[i] += dp->df_count[i]; } } dprev->df_next = dp->df_next; xfree(dp); dp = dprev->df_next; } else { // Advance to next entry. dprev = dp; dp = dp->df_next; } } dprev = NULL; dp = tp->tp_first_diff; while (dp != NULL) { // All counts are zero, remove this entry. int i; for (i = 0; i < DB_COUNT; ++i) { if ((tp->tp_diffbuf[i] != NULL) && (dp->df_count[i] != 0)) { break; } } if (i == DB_COUNT) { diff_T *dnext = dp->df_next; xfree(dp); dp = dnext; if (dprev == NULL) { tp->tp_first_diff = dnext; } else { dprev->df_next = dnext; } } else { // Advance to next entry. dprev = dp; dp = dp->df_next; } } if (tp == curtab) { diff_redraw(TRUE); // Need to recompute the scroll binding, may remove or add filler // lines (e.g., when adding lines above w_topline). But it's slow when // making many changes, postpone until redrawing. diff_need_scrollbind = TRUE; } } /// Allocate a new diff block and link it between "dprev" and "dp". /// /// @param tp /// @param dprev /// @param dp /// /// @return The new diff block. static diff_T* diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp) { diff_T *dnew = xmalloc(sizeof(*dnew)); dnew->df_next = dp; if (dprev == NULL) { tp->tp_first_diff = dnew; } else { dprev->df_next = dnew; } return dnew; } /// Check if the diff block "dp" can be made smaller for lines at the start and /// end that are equal. Called after inserting lines. /// /// This may result in a change where all buffers have zero lines, the caller /// must take care of removing it. /// /// @param tp /// @param dp static void diff_check_unchanged(tabpage_T *tp, diff_T *dp) { // Find the first buffers, use it as the original, compare the other // buffer lines against this one. int i_org; for (i_org = 0; i_org < DB_COUNT; ++i_org) { if (tp->tp_diffbuf[i_org] != NULL) { break; } } // safety check if (i_org == DB_COUNT) { return; } if (diff_check_sanity(tp, dp) == FAIL) { return; } // First check lines at the top, then at the bottom. int off_org = 0; int off_new = 0; int dir = FORWARD; for (;;) { // Repeat until a line is found which is different or the number of // lines has become zero. while (dp->df_count[i_org] > 0) { // Copy the line, the next ml_get() will invalidate it. if (dir == BACKWARD) { off_org = dp->df_count[i_org] - 1; } char_u *line_org = vim_strsave(ml_get_buf(tp->tp_diffbuf[i_org], dp->df_lnum[i_org] + off_org, FALSE)); int i_new; for (i_new = i_org + 1; i_new < DB_COUNT; ++i_new) { if (tp->tp_diffbuf[i_new] == NULL) { continue; } if (dir == BACKWARD) { off_new = dp->df_count[i_new] - 1; } // if other buffer doesn't have this line, it was inserted if ((off_new < 0) || (off_new >= dp->df_count[i_new])) { break; } if (diff_cmp(line_org, ml_get_buf(tp->tp_diffbuf[i_new], dp->df_lnum[i_new] + off_new, FALSE)) != 0) { break; } } xfree(line_org); // Stop when a line isn't equal in all diff buffers. if (i_new != DB_COUNT) { break; } // Line matched in all buffers, remove it from the diff. for (i_new = i_org; i_new < DB_COUNT; ++i_new) { if (tp->tp_diffbuf[i_new] != NULL) { if (dir == FORWARD) { dp->df_lnum[i_new]++; } dp->df_count[i_new]--; } } } if (dir == BACKWARD) { break; } dir = BACKWARD; } } /// Check if a diff block doesn't contain invalid line numbers. /// This can happen when the diff program returns invalid results. /// /// @param tp /// @param dp /// /// @return OK if the diff block doesn't contain invalid line numbers. static int diff_check_sanity(tabpage_T *tp, diff_T *dp) { int i; for (i = 0; i < DB_COUNT; ++i) { if (tp->tp_diffbuf[i] != NULL) { if (dp->df_lnum[i] + dp->df_count[i] - 1 > tp->tp_diffbuf[i]->b_ml.ml_line_count) { return FAIL; } } } return OK; } /// Mark all diff buffers in the current tab page for redraw. /// /// @param dofold Also recompute the folds static void diff_redraw(int dofold) { FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { if (!wp->w_p_diff) { continue; } redraw_win_later(wp, SOME_VALID); if (dofold && foldmethodIsDiff(wp)) { foldUpdateAll(wp); } /* A change may have made filler lines invalid, need to take care * of that for other windows. */ int n = diff_check(wp, wp->w_topline); if (((wp != curwin) && (wp->w_topfill > 0)) || (n > 0)) { if (wp->w_topfill > n) { wp->w_topfill = (n < 0 ? 0 : n); } else if ((n > 0) && (n > wp->w_topfill)) { wp->w_topfill = n; } check_topfill(wp, FALSE); } } } /// Write buffer "buf" to file "name". /// /// Always use 'fileformat' set to "unix". /// /// @param buf /// @param fname /// /// @return FAIL for failure static int diff_write(buf_T *buf, char_u *fname) { char_u *save_ff = buf->b_p_ff; buf->b_p_ff = vim_strsave((char_u *)FF_UNIX); int r = buf_write(buf, fname, NULL, (linenr_T)1, buf->b_ml.ml_line_count, NULL, FALSE, FALSE, FALSE, TRUE); free_string_option(buf->b_p_ff); buf->b_p_ff = save_ff; return r; } /// Completely update the diffs for the buffers involved. /// /// This uses the ordinary "diff" command. /// The buffers are written to a file, also for unmodified buffers (the file /// could have been produced by autocommands, e.g. the netrw plugin). /// /// @param eap can be NULL void ex_diffupdate(exarg_T *eap) { // Delete all diffblocks. diff_clear(curtab); curtab->tp_diff_invalid = FALSE; // Use the first buffer as the original text. int idx_orig; for (idx_orig = 0; idx_orig < DB_COUNT; ++idx_orig) { if (curtab->tp_diffbuf[idx_orig] != NULL) { break; } } if (idx_orig == DB_COUNT) { return; } // Only need to do something when there is another buffer. int idx_new; for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new) { if (curtab->tp_diffbuf[idx_new] != NULL) { break; } } if (idx_new == DB_COUNT) { return; } // We need three temp file names. char *tmp_orig = (char *) vim_tempname(); char *tmp_new = (char *) vim_tempname(); char *tmp_diff = (char *) vim_tempname(); if ((tmp_orig == NULL) || (tmp_new == NULL) || (tmp_diff == NULL)) { goto theend; } // Do a quick test if "diff" really works. Otherwise it looks like there // are no differences. Can't use the return value, it's non-zero when // there are differences. // May try twice, first with "-a" and then without. int io_error = false; bool ok = false; for (;;) { ok = false; FILE *fd = mch_fopen(tmp_orig, "w"); if (fd == NULL) { io_error = TRUE; } else { if (fwrite("line1\n", (size_t)6, (size_t)1, fd) != 1) { io_error = TRUE; } fclose(fd); fd = mch_fopen(tmp_new, "w"); if (fd == NULL) { io_error = TRUE; } else { if (fwrite("line2\n", (size_t)6, (size_t)1, fd) != 1) { io_error = TRUE; } fclose(fd); diff_file(tmp_orig, tmp_new, tmp_diff); fd = mch_fopen(tmp_diff, "r"); if (fd == NULL) { io_error = TRUE; } else { char_u linebuf[LBUFLEN]; for (;;) { // There must be a line that contains "1c1". if (vim_fgets(linebuf, LBUFLEN, fd)) { break; } if (STRNCMP(linebuf, "1c1", 3) == 0) { ok = TRUE; } } fclose(fd); } os_remove(tmp_diff); os_remove(tmp_new); } os_remove(tmp_orig); } // When using 'diffexpr' break here. if (*p_dex != NUL) { break; } // If we checked if "-a" works already, break here. if (diff_a_works != MAYBE) { break; } diff_a_works = ok; // If "-a" works break here, otherwise retry without "-a". if (ok) { break; } } if (!ok) { if (io_error) { EMSG(_("E810: Cannot read or write temp files")); } EMSG(_("E97: Cannot create diffs")); diff_a_works = MAYBE; goto theend; } // :diffupdate! if ((eap != NULL) && eap->forceit) { for (idx_new = idx_orig; idx_new < DB_COUNT; ++idx_new) { buf_T *buf = curtab->tp_diffbuf[idx_new]; if (buf_valid(buf)) { buf_check_timestamp(buf, FALSE); } } } // Write the first buffer to a tempfile. buf_T *buf = curtab->tp_diffbuf[idx_orig]; if (diff_write(buf, (char_u *) tmp_orig) == FAIL) { goto theend; } // Make a difference between the first buffer and every other. for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new) { buf_T *buf = curtab->tp_diffbuf[idx_new]; if (buf == NULL || buf->b_ml.ml_mfp == NULL) { continue; // skip buffer that isn't loaded } if (diff_write(buf, (char_u *) tmp_new) == FAIL) { continue; } diff_file(tmp_orig, tmp_new, tmp_diff); // Read the diff output and add each entry to the diff list. diff_read(idx_orig, idx_new, (char_u *) tmp_diff); os_remove(tmp_diff); os_remove(tmp_new); } os_remove(tmp_orig); // force updating cursor position on screen curwin->w_valid_cursor.lnum = 0; diff_redraw(TRUE); theend: xfree(tmp_orig); xfree(tmp_new); xfree(tmp_diff); } /// Make a diff between files "tmp_orig" and "tmp_new", results in "tmp_diff". /// /// @param tmp_orig /// @param tmp_new /// @param tmp_diff static void diff_file(const char *const tmp_orig, const char *const tmp_new, const char *const tmp_diff) { if (*p_dex != NUL) { // Use 'diffexpr' to generate the diff file. eval_diff(tmp_orig, tmp_new, tmp_diff); } else { const size_t len = (strlen(tmp_orig) + strlen(tmp_new) + strlen(tmp_diff) + STRLEN(p_srr) + 27); char *const cmd = xmalloc(len); /* We don't want $DIFF_OPTIONS to get in the way. */ if (os_getenv("DIFF_OPTIONS")) { os_unsetenv("DIFF_OPTIONS"); } /* Build the diff command and execute it. Always use -a, binary * differences are of no use. Ignore errors, diff returns * non-zero when differences have been found. */ vim_snprintf(cmd, len, "diff %s%s%s%s%s %s", diff_a_works ? "-a " : "", "", (diff_flags & DIFF_IWHITE) ? "-b " : "", (diff_flags & DIFF_ICASE) ? "-i " : "", tmp_orig, tmp_new); append_redir(cmd, len, (char *) p_srr, tmp_diff); block_autocmds(); // Avoid ShellCmdPost stuff (void)call_shell((char_u *) cmd, kShellOptFilter | kShellOptSilent | kShellOptDoOut, NULL); unblock_autocmds(); xfree(cmd); } } /// Create a new version of a file from the current buffer and a diff file. /// /// The buffer is written to a file, also for unmodified buffers (the file /// could have been produced by autocommands, e.g. the netrw plugin). /// /// @param eap void ex_diffpatch(exarg_T *eap) { char_u *buf = NULL; win_T *old_curwin = curwin; char_u *newname = NULL; // name of patched file buffer #ifdef UNIX char_u dirbuf[MAXPATHL]; char_u *fullname = NULL; #endif // ifdef UNIX // We need two temp file names. // Name of original temp file. char_u *tmp_orig = vim_tempname(); // Name of patched temp file. char_u *tmp_new = vim_tempname(); if ((tmp_orig == NULL) || (tmp_new == NULL)) { goto theend; } // Write the current buffer to "tmp_orig". if (buf_write(curbuf, tmp_orig, NULL, (linenr_T)1, curbuf->b_ml.ml_line_count, NULL, FALSE, FALSE, FALSE, TRUE) == FAIL) { goto theend; } #ifdef UNIX // Get the absolute path of the patchfile, changing directory below. fullname = (char_u *)FullName_save((char *)eap->arg, FALSE); #endif // ifdef UNIX #ifdef UNIX size_t buflen = STRLEN(tmp_orig) + (fullname != NULL ? STRLEN(fullname) : STRLEN(eap->arg)) + STRLEN(tmp_new) + 16; #else size_t buflen = STRLEN(tmp_orig) + (STRLEN(eap->arg)) + STRLEN(tmp_new) + 16; #endif // ifdef UNIX buf = xmalloc(buflen); #ifdef UNIX // Temporarily chdir to /tmp, to avoid patching files in the current // directory when the patch file contains more than one patch. When we // have our own temp dir use that instead, it will be cleaned up when we // exit (any .rej files created). Don't change directory if we can't // return to the current. if ((os_dirname(dirbuf, MAXPATHL) != OK) || (os_chdir((char *)dirbuf) != 0)) { dirbuf[0] = NUL; } else { char *tempdir = (char *)vim_gettempdir(); if (tempdir == NULL) { tempdir = "/tmp"; } os_chdir(tempdir); shorten_fnames(TRUE); } #endif // ifdef UNIX if (*p_pex != NUL) { // Use 'patchexpr' to generate the new file. #ifdef UNIX eval_patch((char *) tmp_orig, (char *) (fullname != NULL ? fullname : eap->arg), (char *) tmp_new); #else eval_patch((char *) tmp_orig, (char *) eap->arg, (char *) tmp_new); #endif // ifdef UNIX } else { // Build the patch command and execute it. Ignore errors. #ifdef UNIX vim_snprintf((char *)buf, buflen, "patch -o %s %s < \"%s\"", tmp_new, tmp_orig, fullname != NULL ? fullname : eap->arg); #else vim_snprintf((char *)buf, buflen, "patch -o %s %s < \"%s\"", tmp_new, tmp_orig, eap->arg); #endif // ifdef UNIX block_autocmds(); // Avoid ShellCmdPost stuff (void)call_shell(buf, kShellOptFilter, NULL); unblock_autocmds(); } #ifdef UNIX if (dirbuf[0] != NUL) { if (os_chdir((char *)dirbuf) != 0) { EMSG(_(e_prev_dir)); } shorten_fnames(TRUE); } #endif // ifdef UNIX // patch probably has written over the screen redraw_later(CLEAR); // Delete any .orig or .rej file created. STRCPY(buf, tmp_new); STRCAT(buf, ".orig"); os_remove((char *)buf); STRCPY(buf, tmp_new); STRCAT(buf, ".rej"); os_remove((char *)buf); // Only continue if the output file was created. FileInfo file_info; bool info_ok = os_fileinfo((char *)tmp_new, &file_info); uint64_t filesize = os_fileinfo_size(&file_info); if (!info_ok || filesize == 0) { EMSG(_("E816: Cannot read patch output")); } else { if (curbuf->b_fname != NULL) { newname = vim_strnsave(curbuf->b_fname, (int)(STRLEN(curbuf->b_fname) + 4)); STRCAT(newname, ".new"); } // don't use a new tab page, each tab page has its own diffs cmdmod.tab = 0; if (win_split(0, (diff_flags & DIFF_VERTICAL) ? WSP_VERT : 0) != FAIL) { // Pretend it was a ":split fname" command eap->cmdidx = CMD_split; eap->arg = tmp_new; do_exedit(eap, old_curwin); // check that split worked and editing tmp_new if ((curwin != old_curwin) && win_valid(old_curwin)) { // Set 'diff', 'scrollbind' on and 'wrap' off. diff_win_options(curwin, TRUE); diff_win_options(old_curwin, TRUE); if (newname != NULL) { // do a ":file filename.new" on the patched buffer eap->arg = newname; ex_file(eap); // Do filetype detection with the new name. if (au_has_group((char_u *)"filetypedetect")) { do_cmdline_cmd(":doau filetypedetect BufRead"); } } } } } theend: if (tmp_orig != NULL) { os_remove((char *)tmp_orig); } xfree(tmp_orig); if (tmp_new != NULL) { os_remove((char *)tmp_new); } xfree(tmp_new); xfree(newname); xfree(buf); #ifdef UNIX xfree(fullname); #endif // ifdef UNIX } /// Split the window and edit another file, setting options to show the diffs. /// /// @param eap void ex_diffsplit(exarg_T *eap) { win_T *old_curwin = curwin; bufref_T old_curbuf; set_bufref(&old_curbuf, curbuf); // Need to compute w_fraction when no redraw happened yet. validate_cursor(); set_fraction(curwin); // don't use a new tab page, each tab page has its own diffs cmdmod.tab = 0; if (win_split(0, (diff_flags & DIFF_VERTICAL) ? WSP_VERT : 0) != FAIL) { // Pretend it was a ":split fname" command eap->cmdidx = CMD_split; curwin->w_p_diff = TRUE; do_exedit(eap, old_curwin); // split must have worked if (curwin != old_curwin) { // Set 'diff', 'scrollbind' on and 'wrap' off. diff_win_options(curwin, true); if (win_valid(old_curwin)) { diff_win_options(old_curwin, true); if (bufref_valid(&old_curbuf)) { // Move the cursor position to that of the old window. curwin->w_cursor.lnum = diff_get_corresponding_line( old_curbuf.br_buf, old_curwin->w_cursor.lnum); } } // Now that lines are folded scroll to show the cursor at the same // relative position. scroll_to_fraction(curwin, curwin->w_height); } } } // Set options to show diffs for the current window. void ex_diffthis(exarg_T *eap) { // Set 'diff', 'scrollbind' on and 'wrap' off. diff_win_options(curwin, TRUE); } /// Set options in window "wp" for diff mode. /// /// @param addbuf Add buffer to diff. void diff_win_options(win_T *wp, int addbuf) { win_T *old_curwin = curwin; // close the manually opened folds curwin = wp; newFoldLevel(); curwin = old_curwin; // Use 'scrollbind' and 'cursorbind' when available if (!wp->w_p_diff) { wp->w_p_scb_save = wp->w_p_scb; } wp->w_p_scb = TRUE; if (!wp->w_p_diff) { wp->w_p_crb_save = wp->w_p_crb; } wp->w_p_crb = TRUE; if (!wp->w_p_diff) { wp->w_p_wrap_save = wp->w_p_wrap; } wp->w_p_wrap = false; curwin = wp; // -V519 curbuf = curwin->w_buffer; if (!wp->w_p_diff) { if (wp->w_p_diff_saved) { free_string_option(wp->w_p_fdm_save); } wp->w_p_fdm_save = vim_strsave(wp->w_p_fdm); } set_string_option_direct((char_u *)"fdm", -1, (char_u *)"diff", OPT_LOCAL | OPT_FREE, 0); curwin = old_curwin; curbuf = curwin->w_buffer; if (!wp->w_p_diff) { wp->w_p_fdc_save = wp->w_p_fdc; wp->w_p_fen_save = wp->w_p_fen; wp->w_p_fdl_save = wp->w_p_fdl; } wp->w_p_fdc = diff_foldcolumn; wp->w_p_fen = TRUE; wp->w_p_fdl = 0; foldUpdateAll(wp); // make sure topline is not halfway through a fold changed_window_setting_win(wp); if (vim_strchr(p_sbo, 'h') == NULL) { do_cmdline_cmd("set sbo+=hor"); } // Saved the current values, to be restored in ex_diffoff(). wp->w_p_diff_saved = TRUE; wp->w_p_diff = true; if (addbuf) { diff_buf_add(wp->w_buffer); } redraw_win_later(wp, NOT_VALID); } /// Set options not to show diffs. For the current window or all windows. /// Only in the current tab page. /// /// @param eap void ex_diffoff(exarg_T *eap) { int diffwin = false; FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { if (eap->forceit ? wp->w_p_diff : (wp == curwin)) { // Set 'diff' off. If option values were saved in // diff_win_options(), restore the ones whose settings seem to have // been left over from diff mode. wp->w_p_diff = false; if (wp->w_p_diff_saved) { if (wp->w_p_scb) { wp->w_p_scb = wp->w_p_scb_save; } if (wp->w_p_crb) { wp->w_p_crb = wp->w_p_crb_save; } if (!wp->w_p_wrap) { wp->w_p_wrap = wp->w_p_wrap_save; } free_string_option(wp->w_p_fdm); wp->w_p_fdm = vim_strsave(wp->w_p_fdm_save); if (wp->w_p_fdc == diff_foldcolumn) { wp->w_p_fdc = wp->w_p_fdc_save; } if (wp->w_p_fdl == 0) { wp->w_p_fdl = wp->w_p_fdl_save; } // Only restore 'foldenable' when 'foldmethod' is not // "manual", otherwise we continue to show the diff folds. if (wp->w_p_fen) { wp->w_p_fen = foldmethodIsManual(wp) ? false : wp->w_p_fen_save; } foldUpdateAll(wp); } // remove filler lines wp->w_topfill = 0; // make sure topline is not halfway a fold and cursor is // invalidated changed_window_setting_win(wp); // Note: 'sbo' is not restored, it's a global option. diff_buf_adjust(wp); } diffwin |= wp->w_p_diff; } // Also remove hidden buffers from the list. if (eap->forceit) { diff_buf_clear(); } // Remove "hor" from from 'scrollopt' if there are no diff windows left. if (!diffwin && (vim_strchr(p_sbo, 'h') != NULL)) { do_cmdline_cmd("set sbo-=hor"); } } /// Read the diff output and add each entry to the diff list. /// /// @param idx_orig idx of original file /// @param idx_new idx of new file /// @param fname name of diff output file static void diff_read(int idx_orig, int idx_new, char_u *fname) { FILE *fd; diff_T *dprev = NULL; diff_T *dp = curtab->tp_first_diff; diff_T *dn, *dpl; long f1, l1, f2, l2; char_u linebuf[LBUFLEN]; // only need to hold the diff line int difftype; char_u *p; long off; int i; linenr_T lnum_orig, lnum_new; long count_orig, count_new; int notset = TRUE; // block "*dp" not set yet fd = mch_fopen((char *)fname, "r"); if (fd == NULL) { EMSG(_("E98: Cannot read diff output")); return; } for (;;) { if (vim_fgets(linebuf, LBUFLEN, fd)) { // end of file break; } if (!isdigit(*linebuf)) { // not the start of a diff block continue; } // This line must be one of three formats: // {first}[,{last}]c{first}[,{last}] // {first}a{first}[,{last}] // {first}[,{last}]d{first} p = linebuf; f1 = getdigits_long(&p); if (*p == ',') { ++p; l1 = getdigits_long(&p); } else { l1 = f1; } if ((*p != 'a') && (*p != 'c') && (*p != 'd')) { // invalid diff format continue; } difftype = *p++; f2 = getdigits_long(&p); if (*p == ',') { ++p; l2 = getdigits_long(&p); } else { l2 = f2; } if ((l1 < f1) || (l2 < f2)) { // invalid line range continue; } if (difftype == 'a') { lnum_orig = f1 + 1; count_orig = 0; } else { lnum_orig = f1; count_orig = l1 - f1 + 1; } if (difftype == 'd') { lnum_new = f2 + 1; count_new = 0; } else { lnum_new = f2; count_new = l2 - f2 + 1; } // Go over blocks before the change, for which orig and new are equal. // Copy blocks from orig to new. while (dp != NULL && lnum_orig > dp->df_lnum[idx_orig] + dp->df_count[idx_orig]) { if (notset) { diff_copy_entry(dprev, dp, idx_orig, idx_new); } dprev = dp; dp = dp->df_next; notset = TRUE; } if ((dp != NULL) && (lnum_orig <= dp->df_lnum[idx_orig] + dp->df_count[idx_orig]) && (lnum_orig + count_orig >= dp->df_lnum[idx_orig])) { // New block overlaps with existing block(s). // First find last block that overlaps. for (dpl = dp; dpl->df_next != NULL; dpl = dpl->df_next) { if (lnum_orig + count_orig < dpl->df_next->df_lnum[idx_orig]) { break; } } // If the newly found block starts before the old one, set the // start back a number of lines. off = dp->df_lnum[idx_orig] - lnum_orig; if (off > 0) { for (i = idx_orig; i < idx_new; ++i) { if (curtab->tp_diffbuf[i] != NULL) { dp->df_lnum[i] -= off; } } dp->df_lnum[idx_new] = lnum_new; dp->df_count[idx_new] = count_new; } else if (notset) { // new block inside existing one, adjust new block dp->df_lnum[idx_new] = lnum_new + off; dp->df_count[idx_new] = count_new - off; } else { // second overlap of new block with existing block dp->df_count[idx_new] += count_new - count_orig + dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig] - (dp->df_lnum[idx_orig] + dp->df_count[idx_orig]); } // Adjust the size of the block to include all the lines to the // end of the existing block or the new diff, whatever ends last. off = (lnum_orig + count_orig) - (dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig]); if (off < 0) { // new change ends in existing block, adjust the end if not // done already if (notset) { dp->df_count[idx_new] += -off; } off = 0; } for (i = idx_orig; i < idx_new; ++i) { if (curtab->tp_diffbuf[i] != NULL) { dp->df_count[i] = dpl->df_lnum[i] + dpl->df_count[i] - dp->df_lnum[i] + off; } } // Delete the diff blocks that have been merged into one. dn = dp->df_next; dp->df_next = dpl->df_next; while (dn != dp->df_next) { dpl = dn->df_next; xfree(dn); dn = dpl; } } else { // Allocate a new diffblock. dp = diff_alloc_new(curtab, dprev, dp); dp->df_lnum[idx_orig] = lnum_orig; dp->df_count[idx_orig] = count_orig; dp->df_lnum[idx_new] = lnum_new; dp->df_count[idx_new] = count_new; // Set values for other buffers, these must be equal to the // original buffer, otherwise there would have been a change // already. for (i = idx_orig + 1; i < idx_new; ++i) { if (curtab->tp_diffbuf[i] != NULL) { diff_copy_entry(dprev, dp, idx_orig, i); } } } notset = FALSE; // "*dp" has been set } // for remaining diff blocks orig and new are equal while (dp != NULL) { if (notset) { diff_copy_entry(dprev, dp, idx_orig, idx_new); } dprev = dp; dp = dp->df_next; notset = TRUE; } fclose(fd); } /// Copy an entry at "dp" from "idx_orig" to "idx_new". /// /// @param dprev /// @param dp /// @param idx_orig /// @param idx_new static void diff_copy_entry(diff_T *dprev, diff_T *dp, int idx_orig, int idx_new) { long off; if (dprev == NULL) { off = 0; } else { off = (dprev->df_lnum[idx_orig] + dprev->df_count[idx_orig]) - (dprev->df_lnum[idx_new] + dprev->df_count[idx_new]); } dp->df_lnum[idx_new] = dp->df_lnum[idx_orig] - off; dp->df_count[idx_new] = dp->df_count[idx_orig]; } /// Clear the list of diffblocks for tab page "tp". /// /// @param tp void diff_clear(tabpage_T *tp) { diff_T *p; diff_T *next_p; for (p = tp->tp_first_diff; p != NULL; p = next_p) { next_p = p->df_next; xfree(p); } tp->tp_first_diff = NULL; } /// Check diff status for line "lnum" in buffer "buf": /// /// Returns 0 for nothing special /// Returns -1 for a line that should be highlighted as changed. /// Returns -2 for a line that should be highlighted as added/deleted. /// Returns > 0 for inserting that many filler lines above it (never happens /// when 'diffopt' doesn't contain "filler"). /// This should only be used for windows where 'diff' is set. /// /// @param wp /// @param lnum /// /// @return diff status. int diff_check(win_T *wp, linenr_T lnum) { int idx; // index in tp_diffbuf[] for this buffer diff_T *dp; int maxcount; int i; buf_T *buf = wp->w_buffer; int cmp; if (curtab->tp_diff_invalid) { // update after a big change ex_diffupdate(NULL); } // no diffs at all if ((curtab->tp_first_diff == NULL) || !wp->w_p_diff) { return 0; } // safety check: "lnum" must be a buffer line if ((lnum < 1) || (lnum > buf->b_ml.ml_line_count + 1)) { return 0; } idx = diff_buf_idx(buf); if (idx == DB_COUNT) { // no diffs for buffer "buf" return 0; } // A closed fold never has filler lines. if (hasFoldingWin(wp, lnum, NULL, NULL, TRUE, NULL)) { return 0; } // search for a change that includes "lnum" in the list of diffblocks. for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next) { if (lnum <= dp->df_lnum[idx] + dp->df_count[idx]) { break; } } if ((dp == NULL) || (lnum < dp->df_lnum[idx])) { return 0; } if (lnum < dp->df_lnum[idx] + dp->df_count[idx]) { int zero = FALSE; // Changed or inserted line. If the other buffers have a count of // zero, the lines were inserted. If the other buffers have the same // count, check if the lines are identical. cmp = FALSE; for (i = 0; i < DB_COUNT; ++i) { if ((i != idx) && (curtab->tp_diffbuf[i] != NULL)) { if (dp->df_count[i] == 0) { zero = TRUE; } else { if (dp->df_count[i] != dp->df_count[idx]) { // nr of lines changed. return -1; } cmp = TRUE; } } } if (cmp) { // Compare all lines. If they are equal the lines were inserted // in some buffers, deleted in others, but not changed. for (i = 0; i < DB_COUNT; ++i) { if ((i != idx) && (curtab->tp_diffbuf[i] != NULL) && (dp->df_count[i] != 0)) { if (!diff_equal_entry(dp, idx, i)) { return -1; } } } } // If there is no buffer with zero lines then there is no difference // any longer. Happens when making a change (or undo) that removes // the difference. Can't remove the entry here, we might be halfway // through updating the window. Just report the text as unchanged. // Other windows might still show the change though. if (zero == FALSE) { return 0; } return -2; } // If 'diffopt' doesn't contain "filler", return 0. if (!(diff_flags & DIFF_FILLER)) { return 0; } // Insert filler lines above the line just below the change. Will return // 0 when this buf had the max count. maxcount = 0; for (i = 0; i < DB_COUNT; ++i) { if ((curtab->tp_diffbuf[i] != NULL) && (dp->df_count[i] > maxcount)) { maxcount = dp->df_count[i]; } } return maxcount - dp->df_count[idx]; } /// Compare two entries in diff "dp" and return true if they are equal. /// /// @param dp diff /// @param idx1 first entry in diff "dp" /// @param idx2 second entry in diff "dp" /// /// @return true if two entires are equal. static bool diff_equal_entry(diff_T *dp, int idx1, int idx2) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ARG(1) { if (dp->df_count[idx1] != dp->df_count[idx2]) { return false; } if (diff_check_sanity(curtab, dp) == FAIL) { return false; } for (int i = 0; i < dp->df_count[idx1]; i++) { char_u *line = vim_strsave(ml_get_buf(curtab->tp_diffbuf[idx1], dp->df_lnum[idx1] + i, false)); int cmp = diff_cmp(line, ml_get_buf(curtab->tp_diffbuf[idx2], dp->df_lnum[idx2] + i, false)); xfree(line); if (cmp != 0) { return false; } } return true; } /// Compare strings "s1" and "s2" according to 'diffopt'. /// Return non-zero when they are different. /// /// @param s1 The first string /// @param s2 The second string /// /// @return on-zero if the two strings are different. static int diff_cmp(char_u *s1, char_u *s2) { if ((diff_flags & (DIFF_ICASE | DIFF_IWHITE)) == 0) { return STRCMP(s1, s2); } if ((diff_flags & DIFF_ICASE) && !(diff_flags & DIFF_IWHITE)) { return mb_stricmp((const char *)s1, (const char *)s2); } // Ignore white space changes and possibly ignore case. char_u *p1 = s1; char_u *p2 = s2; while (*p1 != NUL && *p2 != NUL) { if (ascii_iswhite(*p1) && ascii_iswhite(*p2)) { p1 = skipwhite(p1); p2 = skipwhite(p2); } else { int l = (*mb_ptr2len)(p1); if (l != (*mb_ptr2len)(p2)) { break; } if (l > 1) { if ((STRNCMP(p1, p2, l) != 0) && (!enc_utf8 || !(diff_flags & DIFF_ICASE) || (utf_fold(utf_ptr2char(p1)) != utf_fold(utf_ptr2char(p2))))) { break; } p1 += l; p2 += l; } else { if ((*p1 != *p2) && (!(diff_flags & DIFF_ICASE) || (TOLOWER_LOC(*p1) != TOLOWER_LOC(*p2)))) { break; } ++p1; ++p2; } } } // Ignore trailing white space. p1 = skipwhite(p1); p2 = skipwhite(p2); if ((*p1 != NUL) || (*p2 != NUL)) { return 1; } return 0; } /// Return the number of filler lines above "lnum". /// /// @param wp /// @param lnum /// /// @return Number of filler lines above lnum int diff_check_fill(win_T *wp, linenr_T lnum) { // be quick when there are no filler lines if (!(diff_flags & DIFF_FILLER)) { return 0; } int n = diff_check(wp, lnum); if (n <= 0) { return 0; } return n; } /// Set the topline of "towin" to match the position in "fromwin", so that they /// show the same diff'ed lines. /// /// @param fromwin /// @param towin void diff_set_topline(win_T *fromwin, win_T *towin) { buf_T *frombuf = fromwin->w_buffer; linenr_T lnum = fromwin->w_topline; diff_T *dp; int max_count; int i; int fromidx = diff_buf_idx(frombuf); if (fromidx == DB_COUNT) { // safety check return; } if (curtab->tp_diff_invalid) { // update after a big change ex_diffupdate(NULL); } towin->w_topfill = 0; // search for a change that includes "lnum" in the list of diffblocks. for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next) { if (lnum <= dp->df_lnum[fromidx] + dp->df_count[fromidx]) { break; } } if (dp == NULL) { // After last change, compute topline relative to end of file; no // filler lines. towin->w_topline = towin->w_buffer->b_ml.ml_line_count - (frombuf->b_ml.ml_line_count - lnum); } else { // Find index for "towin". int toidx = diff_buf_idx(towin->w_buffer); if (toidx == DB_COUNT) { // safety check return; } towin->w_topline = lnum + (dp->df_lnum[toidx] - dp->df_lnum[fromidx]); if (lnum >= dp->df_lnum[fromidx]) { // Inside a change: compute filler lines. With three or more // buffers we need to know the largest count. max_count = 0; for (i = 0; i < DB_COUNT; ++i) { if ((curtab->tp_diffbuf[i] != NULL) && (max_count < dp->df_count[i])) { max_count = dp->df_count[i]; } } if (dp->df_count[toidx] == dp->df_count[fromidx]) { // same number of lines: use same filler count towin->w_topfill = fromwin->w_topfill; } else if (dp->df_count[toidx] > dp->df_count[fromidx]) { if (lnum == dp->df_lnum[fromidx] + dp->df_count[fromidx]) { // more lines in towin and fromwin doesn't show diff // lines, only filler lines if (max_count - fromwin->w_topfill >= dp->df_count[toidx]) { // towin also only shows filler lines towin->w_topline = dp->df_lnum[toidx] + dp->df_count[toidx]; towin->w_topfill = fromwin->w_topfill; } else { // towin still has some diff lines to show towin->w_topline = dp->df_lnum[toidx] + max_count - fromwin->w_topfill; } } } else if (towin->w_topline >= dp->df_lnum[toidx] + dp->df_count[toidx]) { // less lines in towin and no diff lines to show: compute // filler lines towin->w_topline = dp->df_lnum[toidx] + dp->df_count[toidx]; if (diff_flags & DIFF_FILLER) { if (lnum == dp->df_lnum[fromidx] + dp->df_count[fromidx]) { // fromwin is also out of diff lines towin->w_topfill = fromwin->w_topfill; } else { // fromwin has some diff lines towin->w_topfill = dp->df_lnum[fromidx] + max_count - lnum; } } } } } // safety check (if diff info gets outdated strange things may happen) towin->w_botfill = false; if (towin->w_topline > towin->w_buffer->b_ml.ml_line_count) { towin->w_topline = towin->w_buffer->b_ml.ml_line_count; towin->w_botfill = true; } if (towin->w_topline < 1) { towin->w_topline = 1; towin->w_topfill = 0; } // When w_topline changes need to recompute w_botline and cursor position invalidate_botline_win(towin); changed_line_abv_curs_win(towin); check_topfill(towin, false); (void)hasFoldingWin(towin, towin->w_topline, &towin->w_topline, NULL, TRUE, NULL); } /// This is called when 'diffopt' is changed. /// /// @return int diffopt_changed(void) { int diff_context_new = 6; int diff_flags_new = 0; int diff_foldcolumn_new = 2; char_u *p = p_dip; while (*p != NUL) { if (STRNCMP(p, "filler", 6) == 0) { p += 6; diff_flags_new |= DIFF_FILLER; } else if ((STRNCMP(p, "context:", 8) == 0) && ascii_isdigit(p[8])) { p += 8; diff_context_new = getdigits_int(&p); } else if (STRNCMP(p, "icase", 5) == 0) { p += 5; diff_flags_new |= DIFF_ICASE; } else if (STRNCMP(p, "iwhite", 6) == 0) { p += 6; diff_flags_new |= DIFF_IWHITE; } else if (STRNCMP(p, "horizontal", 10) == 0) { p += 10; diff_flags_new |= DIFF_HORIZONTAL; } else if (STRNCMP(p, "vertical", 8) == 0) { p += 8; diff_flags_new |= DIFF_VERTICAL; } else if ((STRNCMP(p, "foldcolumn:", 11) == 0) && ascii_isdigit(p[11])) { p += 11; diff_foldcolumn_new = getdigits_int(&p); } if ((*p != ',') && (*p != NUL)) { return FAIL; } if (*p == ',') { ++p; } } // Can't have both "horizontal" and "vertical". if ((diff_flags_new & DIFF_HORIZONTAL) && (diff_flags_new & DIFF_VERTICAL)) { return FAIL; } // If "icase" or "iwhite" was added or removed, need to update the diff. if (diff_flags != diff_flags_new) { FOR_ALL_TABS(tp) { tp->tp_diff_invalid = TRUE; } } diff_flags = diff_flags_new; diff_context = diff_context_new; diff_foldcolumn = diff_foldcolumn_new; diff_redraw(TRUE); // recompute the scroll binding with the new option value, may // remove or add filler lines check_scrollbind((linenr_T)0, 0L); return OK; } /// Check that "diffopt" contains "horizontal". bool diffopt_horizontal(void) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return (diff_flags & DIFF_HORIZONTAL) != 0; } /// Find the difference within a changed line. /// /// @param wp window whose current buffer to check /// @param lnum line number to check within the buffer /// @param startp first char of the change /// @param endp last char of the change /// /// @return true if the line was added, no other buffer has it. bool diff_find_change(win_T *wp, linenr_T lnum, int *startp, int *endp) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { char_u *line_new; int si_org; int si_new; int ei_org; int ei_new; bool added = true; // Make a copy of the line, the next ml_get() will invalidate it. char_u *line_org = vim_strsave(ml_get_buf(wp->w_buffer, lnum, FALSE)); int idx = diff_buf_idx(wp->w_buffer); if (idx == DB_COUNT) { // cannot happen xfree(line_org); return false; } // search for a change that includes "lnum" in the list of diffblocks. diff_T *dp; for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next) { if (lnum <= dp->df_lnum[idx] + dp->df_count[idx]) { break; } } if ((dp == NULL) || (diff_check_sanity(curtab, dp) == FAIL)) { xfree(line_org); return false; } int off = lnum - dp->df_lnum[idx]; int i; for (i = 0; i < DB_COUNT; ++i) { if ((curtab->tp_diffbuf[i] != NULL) && (i != idx)) { // Skip lines that are not in the other change (filler lines). if (off >= dp->df_count[i]) { continue; } added = false; line_new = ml_get_buf(curtab->tp_diffbuf[i], dp->df_lnum[i] + off, FALSE); // Search for start of difference si_org = si_new = 0; while (line_org[si_org] != NUL) { if ((diff_flags & DIFF_IWHITE) && ascii_iswhite(line_org[si_org]) && ascii_iswhite(line_new[si_new])) { si_org = (int)(skipwhite(line_org + si_org) - line_org); si_new = (int)(skipwhite(line_new + si_new) - line_new); } else { if (line_org[si_org] != line_new[si_new]) { break; } ++si_org; ++si_new; } } if (has_mbyte) { // Move back to first byte of character in both lines (may // have "nn^" in line_org and "n^ in line_new). si_org -= (*mb_head_off)(line_org, line_org + si_org); si_new -= (*mb_head_off)(line_new, line_new + si_new); } if (*startp > si_org) { *startp = si_org; } // Search for end of difference, if any. if ((line_org[si_org] != NUL) || (line_new[si_new] != NUL)) { ei_org = (int)STRLEN(line_org); ei_new = (int)STRLEN(line_new); while (ei_org >= *startp && ei_new >= si_new && ei_org >= 0 && ei_new >= 0) { if ((diff_flags & DIFF_IWHITE) && ascii_iswhite(line_org[ei_org]) && ascii_iswhite(line_new[ei_new])) { while (ei_org >= *startp && ascii_iswhite(line_org[ei_org])) { ei_org--; } while (ei_new >= si_new && ascii_iswhite(line_new[ei_new])) { ei_new--; } } else { if (line_org[ei_org] != line_new[ei_new]) { break; } ei_org--; ei_new--; } } if (*endp < ei_org) { *endp = ei_org; } } } } xfree(line_org); return added; } /// Check that line "lnum" is not close to a diff block, this line should /// be in a fold. /// /// @param wp window containing the buffer to check /// @param lnum line number to check within the buffer /// /// @return false if there are no diff blocks at all in this window. bool diff_infold(win_T *wp, linenr_T lnum) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ARG(1) { bool other = false; diff_T *dp; // Return if 'diff' isn't set. if (!wp->w_p_diff) { return false; } int idx = -1; int i; for (i = 0; i < DB_COUNT; ++i) { if (curtab->tp_diffbuf[i] == wp->w_buffer) { idx = i; } else if (curtab->tp_diffbuf[i] != NULL) { other = true; } } // return here if there are no diffs in the window if ((idx == -1) || !other) { return false; } if (curtab->tp_diff_invalid) { // update after a big change ex_diffupdate(NULL); } // Return if there are no diff blocks. All lines will be folded. if (curtab->tp_first_diff == NULL) { return true; } for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next) { // If this change is below the line there can't be any further match. if (dp->df_lnum[idx] - diff_context > lnum) { break; } // If this change ends before the line we have a match. if (dp->df_lnum[idx] + dp->df_count[idx] + diff_context > lnum) { return false; } } return true; } /// "dp" and "do" commands. void nv_diffgetput(bool put, size_t count) { exarg_T ea; char buf[30]; if (count == 0) { ea.arg = (char_u *)""; } else { vim_snprintf(buf, 30, "%zu", count); ea.arg = (char_u *)buf; } if (put) { ea.cmdidx = CMD_diffput; } else { ea.cmdidx = CMD_diffget; } ea.addr_count = 0; ea.line1 = curwin->w_cursor.lnum; ea.line2 = curwin->w_cursor.lnum; ex_diffgetput(&ea); } /// ":diffget" and ":diffput" /// /// @param eap void ex_diffgetput(exarg_T *eap) { linenr_T lnum; int count; linenr_T off = 0; diff_T *dp; diff_T *dprev; diff_T *dfree; int i; int added; char_u *p; aco_save_T aco; buf_T *buf; int start_skip, end_skip; int new_count; int buf_empty; int found_not_ma = FALSE; int idx_other; int idx_from; int idx_to; // Find the current buffer in the list of diff buffers. int idx_cur = diff_buf_idx(curbuf); if (idx_cur == DB_COUNT) { EMSG(_("E99: Current buffer is not in diff mode")); return; } if (*eap->arg == NUL) { // No argument: Find the other buffer in the list of diff buffers. for (idx_other = 0; idx_other < DB_COUNT; ++idx_other) { if ((curtab->tp_diffbuf[idx_other] != curbuf) && (curtab->tp_diffbuf[idx_other] != NULL)) { if ((eap->cmdidx != CMD_diffput) || MODIFIABLE(curtab->tp_diffbuf[idx_other])) { break; } found_not_ma = TRUE; } } if (idx_other == DB_COUNT) { if (found_not_ma) { EMSG(_("E793: No other buffer in diff mode is modifiable")); } else { EMSG(_("E100: No other buffer in diff mode")); } return; } // Check that there isn't a third buffer in the list for (i = idx_other + 1; i < DB_COUNT; ++i) { if ((curtab->tp_diffbuf[i] != curbuf) && (curtab->tp_diffbuf[i] != NULL) && ((eap->cmdidx != CMD_diffput) || MODIFIABLE(curtab->tp_diffbuf[i]))) { EMSG(_("E101: More than two buffers in diff mode, don't know " "which one to use")); return; } } } else { // Buffer number or pattern given. Ignore trailing white space. p = eap->arg + STRLEN(eap->arg); while (p > eap->arg && ascii_iswhite(p[-1])) { p--; } for (i = 0; ascii_isdigit(eap->arg[i]) && eap->arg + i < p; ++i) { } if (eap->arg + i == p) { // digits only i = atol((char *)eap->arg); } else { i = buflist_findpat(eap->arg, p, FALSE, TRUE, FALSE); if (i < 0) { // error message already given return; } } buf = buflist_findnr(i); if (buf == NULL) { EMSG2(_("E102: Can't find buffer \"%s\""), eap->arg); return; } if (buf == curbuf) { // nothing to do return; } idx_other = diff_buf_idx(buf); if (idx_other == DB_COUNT) { EMSG2(_("E103: Buffer \"%s\" is not in diff mode"), eap->arg); return; } } diff_busy = TRUE; // When no range given include the line above or below the cursor. if (eap->addr_count == 0) { // Make it possible that ":diffget" on the last line gets line below // the cursor line when there is no difference above the cursor. if ((eap->cmdidx == CMD_diffget) && (eap->line1 == curbuf->b_ml.ml_line_count) && (diff_check(curwin, eap->line1) == 0) && ((eap->line1 == 1) || (diff_check(curwin, eap->line1 - 1) == 0))) { ++eap->line2; } else if (eap->line1 > 0) { --eap->line1; } } if (eap->cmdidx == CMD_diffget) { idx_from = idx_other; idx_to = idx_cur; } else { idx_from = idx_cur; idx_to = idx_other; // Need to make the other buffer the current buffer to be able to make // changes in it. // set curwin/curbuf to buf and save a few things aucmd_prepbuf(&aco, curtab->tp_diffbuf[idx_other]); } // May give the warning for a changed buffer here, which can trigger the // FileChangedRO autocommand, which may do nasty things and mess // everything up. if (!curbuf->b_changed) { change_warning(0); if (diff_buf_idx(curbuf) != idx_to) { EMSG(_("E787: Buffer changed unexpectedly")); return; } } dprev = NULL; for (dp = curtab->tp_first_diff; dp != NULL;) { if (dp->df_lnum[idx_cur] > eap->line2 + off) { // past the range that was specified break; } dfree = NULL; lnum = dp->df_lnum[idx_to]; count = dp->df_count[idx_to]; if ((dp->df_lnum[idx_cur] + dp->df_count[idx_cur] > eap->line1 + off) && (u_save(lnum - 1, lnum + count) != FAIL)) { // Inside the specified range and saving for undo worked. start_skip = 0; end_skip = 0; if (eap->addr_count > 0) { // A range was specified: check if lines need to be skipped. start_skip = eap->line1 + off - dp->df_lnum[idx_cur]; if (start_skip > 0) { // range starts below start of current diff block if (start_skip > count) { lnum += count; count = 0; } else { count -= start_skip; lnum += start_skip; } } else { start_skip = 0; } end_skip = dp->df_lnum[idx_cur] + dp->df_count[idx_cur] - 1 - (eap->line2 + off); if (end_skip > 0) { // range ends above end of current/from diff block if (idx_cur == idx_from) { // :diffput i = dp->df_count[idx_cur] - start_skip - end_skip; if (count > i) { count = i; } } else { // :diffget count -= end_skip; end_skip = dp->df_count[idx_from] - start_skip - count; if (end_skip < 0) { end_skip = 0; } } } else { end_skip = 0; } } buf_empty = bufempty(); added = 0; for (i = 0; i < count; ++i) { // remember deleting the last line of the buffer buf_empty = curbuf->b_ml.ml_line_count == 1; ml_delete(lnum, FALSE); added--; } for (i = 0; i < dp->df_count[idx_from] - start_skip - end_skip; ++i) { linenr_T nr = dp->df_lnum[idx_from] + start_skip + i; if (nr > curtab->tp_diffbuf[idx_from]->b_ml.ml_line_count) { break; } p = vim_strsave(ml_get_buf(curtab->tp_diffbuf[idx_from], nr, FALSE)); ml_append(lnum + i - 1, p, 0, FALSE); xfree(p); added++; if (buf_empty && (curbuf->b_ml.ml_line_count == 2)) { // Added the first line into an empty buffer, need to // delete the dummy empty line. buf_empty = FALSE; ml_delete((linenr_T)2, FALSE); } } new_count = dp->df_count[idx_to] + added; dp->df_count[idx_to] = new_count; if ((start_skip == 0) && (end_skip == 0)) { // Check if there are any other buffers and if the diff is // equal in them. for (i = 0; i < DB_COUNT; ++i) { if ((curtab->tp_diffbuf[i] != NULL) && (i != idx_from) && (i != idx_to) && !diff_equal_entry(dp, idx_from, i)) { break; } } if (i == DB_COUNT) { // delete the diff entry, the buffers are now equal here dfree = dp; dp = dp->df_next; if (dprev == NULL) { curtab->tp_first_diff = dp; } else { dprev->df_next = dp; } } } // Adjust marks. This will change the following entries! if (added != 0) { mark_adjust(lnum, lnum + count - 1, (long)MAXLNUM, (long)added, false); if (curwin->w_cursor.lnum >= lnum) { // Adjust the cursor position if it's in/after the changed // lines. if (curwin->w_cursor.lnum >= lnum + count) { curwin->w_cursor.lnum += added; } else if (added < 0) { curwin->w_cursor.lnum = lnum; } } } changed_lines(lnum, 0, lnum + count, (long)added); if (dfree != NULL) { // Diff is deleted, update folds in other windows. diff_fold_update(dfree, idx_to); xfree(dfree); } else { // mark_adjust() may have changed the count in a wrong way dp->df_count[idx_to] = new_count; } // When changing the current buffer, keep track of line numbers if (idx_cur == idx_to) { off += added; } } // If before the range or not deleted, go to next diff. if (dfree == NULL) { dprev = dp; dp = dp->df_next; } } // restore curwin/curbuf and a few other things if (eap->cmdidx != CMD_diffget) { // Syncing undo only works for the current buffer, but we change // another buffer. Sync undo if the command was typed. This isn't // 100% right when ":diffput" is used in a function or mapping. if (KeyTyped) { u_sync(FALSE); } aucmd_restbuf(&aco); } diff_busy = FALSE; // Check that the cursor is on a valid character and update it's position. // When there were filler lines the topline has become invalid. check_cursor(); changed_line_abv_curs(); // Also need to redraw the other buffers. diff_redraw(FALSE); } /// Update folds for all diff buffers for entry "dp". /// /// Skip buffer with index "skip_idx". /// When there are no diffs, all folds are removed. /// /// @param dp /// @param skip_idx static void diff_fold_update(diff_T *dp, int skip_idx) { FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { for (int i = 0; i < DB_COUNT; ++i) { if ((curtab->tp_diffbuf[i] == wp->w_buffer) && (i != skip_idx)) { foldUpdate(wp, dp->df_lnum[i], dp->df_lnum[i] + dp->df_count[i]); } } } } /// Checks that the buffer is in diff-mode. /// /// @param buf buffer to check. bool diff_mode_buf(buf_T *buf) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ARG(1) { FOR_ALL_TABS(tp) { if (diff_buf_idx_tp(buf, tp) != DB_COUNT) { return true; } } return false; } /// Move "count" times in direction "dir" to the next diff block. /// /// @param dir /// @param count /// /// @return FAIL if there isn't such a diff block. int diff_move_to(int dir, long count) { linenr_T lnum = curwin->w_cursor.lnum; int idx = diff_buf_idx(curbuf); if ((idx == DB_COUNT) || (curtab->tp_first_diff == NULL)) { return FAIL; } if (curtab->tp_diff_invalid) { // update after a big change ex_diffupdate(NULL); } if (curtab->tp_first_diff == NULL) { // no diffs today return FAIL; } while (--count >= 0) { // Check if already before first diff. if ((dir == BACKWARD) && (lnum <= curtab->tp_first_diff->df_lnum[idx])) { break; } diff_T *dp; for (dp = curtab->tp_first_diff;; dp = dp->df_next) { if (dp == NULL) { break; } if (((dir == FORWARD) && (lnum < dp->df_lnum[idx])) || ((dir == BACKWARD) && ((dp->df_next == NULL) || (lnum <= dp->df_next->df_lnum[idx])))) { lnum = dp->df_lnum[idx]; break; } } } // don't end up past the end of the file if (lnum > curbuf->b_ml.ml_line_count) { lnum = curbuf->b_ml.ml_line_count; } // When the cursor didn't move at all we fail. if (lnum == curwin->w_cursor.lnum) { return FAIL; } setpcmark(); curwin->w_cursor.lnum = lnum; curwin->w_cursor.col = 0; return OK; } /// Return the line number in the current window that is closest to "lnum1" in /// "buf1" in diff mode. static linenr_T diff_get_corresponding_line_int(buf_T *buf1, linenr_T lnum1) { int idx1; int idx2; diff_T *dp; int baseline = 0; idx1 = diff_buf_idx(buf1); idx2 = diff_buf_idx(curbuf); if ((idx1 == DB_COUNT) || (idx2 == DB_COUNT) || (curtab->tp_first_diff == NULL)) { return lnum1; } if (curtab->tp_diff_invalid) { // update after a big change ex_diffupdate(NULL); } if (curtab->tp_first_diff == NULL) { // no diffs today return lnum1; } for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next) { if (dp->df_lnum[idx1] > lnum1) { return lnum1 - baseline; } if ((dp->df_lnum[idx1] + dp->df_count[idx1]) > lnum1) { // Inside the diffblock baseline = lnum1 - dp->df_lnum[idx1]; if (baseline > dp->df_count[idx2]) { baseline = dp->df_count[idx2]; } return dp->df_lnum[idx2] + baseline; } if ((dp->df_lnum[idx1] == lnum1) && (dp->df_count[idx1] == 0) && (dp->df_lnum[idx2] <= curwin->w_cursor.lnum) && ((dp->df_lnum[idx2] + dp->df_count[idx2]) > curwin->w_cursor.lnum)) { // Special case: if the cursor is just after a zero-count // block (i.e. all filler) and the target cursor is already // inside the corresponding block, leave the target cursor // unmoved. This makes repeated CTRL-W W operations work // as expected. return curwin->w_cursor.lnum; } baseline = (dp->df_lnum[idx1] + dp->df_count[idx1]) - (dp->df_lnum[idx2] + dp->df_count[idx2]); } // If we get here then the cursor is after the last diff return lnum1 - baseline; } /// Finds the corresponding line in a diff. /// /// @param buf1 /// @param lnum1 /// /// @return The corresponding line. linenr_T diff_get_corresponding_line(buf_T *buf1, linenr_T lnum1) { linenr_T lnum = diff_get_corresponding_line_int(buf1, lnum1); // don't end up past the end of the file if (lnum > curbuf->b_ml.ml_line_count) { return curbuf->b_ml.ml_line_count; } return lnum; } /// For line "lnum" in the current window find the equivalent lnum in window /// "wp", compensating for inserted/deleted lines. linenr_T diff_lnum_win(linenr_T lnum, win_T *wp) { diff_T *dp; int idx; int i; linenr_T n; idx = diff_buf_idx(curbuf); if (idx == DB_COUNT) { // safety check return (linenr_T)0; } if (curtab->tp_diff_invalid) { // update after a big change ex_diffupdate(NULL); } // search for a change that includes "lnum" in the list of diffblocks. for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next) { if (lnum <= dp->df_lnum[idx] + dp->df_count[idx]) { break; } } // When after the last change, compute relative to the last line number. if (dp == NULL) { return wp->w_buffer->b_ml.ml_line_count - (curbuf->b_ml.ml_line_count - lnum); } // Find index for "wp". i = diff_buf_idx(wp->w_buffer); if (i == DB_COUNT) { // safety check return (linenr_T)0; } n = lnum + (dp->df_lnum[i] - dp->df_lnum[idx]); if (n > dp->df_lnum[i] + dp->df_count[i]) { n = dp->df_lnum[i] + dp->df_count[i]; } return n; } neovim-0.2.2/src/nvim/diff.h000066400000000000000000000003021320401574200156220ustar00rootroot00000000000000#ifndef NVIM_DIFF_H #define NVIM_DIFF_H #include "nvim/pos.h" #include "nvim/ex_cmds_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "diff.h.generated.h" #endif #endif // NVIM_DIFF_H neovim-0.2.2/src/nvim/digraph.c000066400000000000000000001266671320401574200163520ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /// @file digraph.c /// /// code for digraphs #include #include #include #include #include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/digraph.h" #include "nvim/charset.h" #include "nvim/ex_cmds2.h" #include "nvim/ex_docmd.h" #include "nvim/ex_getln.h" #include "nvim/getchar.h" #include "nvim/mbyte.h" #include "nvim/message.h" #include "nvim/memory.h" #include "nvim/garray.h" #include "nvim/normal.h" #include "nvim/screen.h" #include "nvim/strings.h" #include "nvim/os/input.h" typedef int result_T; typedef struct digraph { char_u char1; char_u char2; result_T result; } digr_T; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "digraph.c.generated.h" #endif // digraphs added by the user static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL}; /// Note: Characters marked with XX are not included literally, because some /// compilers cannot handle them (Amiga SAS/C is the most picky one). static digr_T digraphdefault[] = // digraphs for Unicode from RFC1345 // (also work for ISO-8859-1 aka latin1) { { 'N', 'U', 0x0a }, // LF for NUL { 'S', 'H', 0x01 }, { 'S', 'X', 0x02 }, { 'E', 'X', 0x03 }, { 'E', 'T', 0x04 }, { 'E', 'Q', 0x05 }, { 'A', 'K', 0x06 }, { 'B', 'L', 0x07 }, { 'B', 'S', 0x08 }, { 'H', 'T', 0x09 }, { 'L', 'F', 0x0a }, { 'V', 'T', 0x0b }, { 'F', 'F', 0x0c }, { 'C', 'R', 0x0d }, { 'S', 'O', 0x0e }, { 'S', 'I', 0x0f }, { 'D', 'L', 0x10 }, { 'D', '1', 0x11 }, { 'D', '2', 0x12 }, { 'D', '3', 0x13 }, { 'D', '4', 0x14 }, { 'N', 'K', 0x15 }, { 'S', 'Y', 0x16 }, { 'E', 'B', 0x17 }, { 'C', 'N', 0x18 }, { 'E', 'M', 0x19 }, { 'S', 'B', 0x1a }, { 'E', 'C', 0x1b }, { 'F', 'S', 0x1c }, { 'G', 'S', 0x1d }, { 'R', 'S', 0x1e }, { 'U', 'S', 0x1f }, { 'S', 'P', 0x20 }, { 'N', 'b', 0x23 }, { 'D', 'O', 0x24 }, { 'A', 't', 0x40 }, { '<', '(', 0x5b }, { '/', '/', 0x5c }, { ')', '>', 0x5d }, { '\'', '>', 0x5e }, { '\'', '!', 0x60 }, { '(', '!', 0x7b }, { '!', '!', 0x7c }, { '!', ')', 0x7d }, { '\'', '?', 0x7e }, { 'D', 'T', 0x7f }, { 'P', 'A', 0x80 }, { 'H', 'O', 0x81 }, { 'B', 'H', 0x82 }, { 'N', 'H', 0x83 }, { 'I', 'N', 0x84 }, { 'N', 'L', 0x85 }, { 'S', 'A', 0x86 }, { 'E', 'S', 0x87 }, { 'H', 'S', 0x88 }, { 'H', 'J', 0x89 }, { 'V', 'S', 0x8a }, { 'P', 'D', 0x8b }, { 'P', 'U', 0x8c }, { 'R', 'I', 0x8d }, { 'S', '2', 0x8e }, { 'S', '3', 0x8f }, { 'D', 'C', 0x90 }, { 'P', '1', 0x91 }, { 'P', '2', 0x92 }, { 'T', 'S', 0x93 }, { 'C', 'C', 0x94 }, { 'M', 'W', 0x95 }, { 'S', 'G', 0x96 }, { 'E', 'G', 0x97 }, { 'S', 'S', 0x98 }, { 'G', 'C', 0x99 }, { 'S', 'C', 0x9a }, { 'C', 'I', 0x9b }, { 'S', 'T', 0x9c }, { 'O', 'C', 0x9d }, { 'P', 'M', 0x9e }, { 'A', 'C', 0x9f }, { 'N', 'S', 0xa0 }, { '!', 'I', 0xa1 }, { 'C', 't', 0xa2 }, { 'P', 'd', 0xa3 }, { 'C', 'u', 0xa4 }, { 'Y', 'e', 0xa5 }, { 'B', 'B', 0xa6 }, { 'S', 'E', 0xa7 }, { '\'', ':', 0xa8 }, { 'C', 'o', 0xa9 }, { '-', 'a', 0xaa }, { '<', '<', 0xab }, { 'N', 'O', 0xac }, { '-', '-', 0xad }, { 'R', 'g', 0xae }, { '\'', 'm', 0xaf }, { 'D', 'G', 0xb0 }, { '+', '-', 0xb1 }, { '2', 'S', 0xb2 }, { '3', 'S', 0xb3 }, { '\'', '\'', 0xb4 }, { 'M', 'y', 0xb5 }, { 'P', 'I', 0xb6 }, { '.', 'M', 0xb7 }, { '\'', ',', 0xb8 }, { '1', 'S', 0xb9 }, { '-', 'o', 0xba }, { '>', '>', 0xbb }, { '1', '4', 0xbc }, { '1', '2', 0xbd }, { '3', '4', 0xbe }, { '?', 'I', 0xbf }, { 'A', '!', 0xc0 }, { 'A', '\'', 0xc1 }, { 'A', '>', 0xc2 }, { 'A', '?', 0xc3 }, { 'A', ':', 0xc4 }, { 'A', 'A', 0xc5 }, { 'A', 'E', 0xc6 }, { 'C', ',', 0xc7 }, { 'E', '!', 0xc8 }, { 'E', '\'', 0xc9 }, { 'E', '>', 0xca }, { 'E', ':', 0xcb }, { 'I', '!', 0xcc }, { 'I', '\'', 0xcd }, { 'I', '>', 0xce }, { 'I', ':', 0xcf }, { 'D', '-', 0xd0 }, { 'N', '?', 0xd1 }, { 'O', '!', 0xd2 }, { 'O', '\'', 0xd3 }, { 'O', '>', 0xd4 }, { 'O', '?', 0xd5 }, { 'O', ':', 0xd6 }, { '*', 'X', 0xd7 }, { 'O', '/', 0xd8 }, { 'U', '!', 0xd9 }, { 'U', '\'', 0xda }, { 'U', '>', 0xdb }, { 'U', ':', 0xdc }, { 'Y', '\'', 0xdd }, { 'T', 'H', 0xde }, { 's', 's', 0xdf }, { 'a', '!', 0xe0 }, { 'a', '\'', 0xe1 }, { 'a', '>', 0xe2 }, { 'a', '?', 0xe3 }, { 'a', ':', 0xe4 }, { 'a', 'a', 0xe5 }, { 'a', 'e', 0xe6 }, { 'c', ',', 0xe7 }, { 'e', '!', 0xe8 }, { 'e', '\'', 0xe9 }, { 'e', '>', 0xea }, { 'e', ':', 0xeb }, { 'i', '!', 0xec }, { 'i', '\'', 0xed }, { 'i', '>', 0xee }, { 'i', ':', 0xef }, { 'd', '-', 0xf0 }, { 'n', '?', 0xf1 }, { 'o', '!', 0xf2 }, { 'o', '\'', 0xf3 }, { 'o', '>', 0xf4 }, { 'o', '?', 0xf5 }, { 'o', ':', 0xf6 }, { '-', ':', 0xf7 }, { 'o', '/', 0xf8 }, { 'u', '!', 0xf9 }, { 'u', '\'', 0xfa }, { 'u', '>', 0xfb }, { 'u', ':', 0xfc }, { 'y', '\'', 0xfd }, { 't', 'h', 0xfe }, { 'y', ':', 0xff }, { 'A', '-', 0x0100 }, { 'a', '-', 0x0101 }, { 'A', '(', 0x0102 }, { 'a', '(', 0x0103 }, { 'A', ';', 0x0104 }, { 'a', ';', 0x0105 }, { 'C', '\'', 0x0106 }, { 'c', '\'', 0x0107 }, { 'C', '>', 0x0108 }, { 'c', '>', 0x0109 }, { 'C', '.', 0x010a }, { 'c', '.', 0x010b }, { 'C', '<', 0x010c }, { 'c', '<', 0x010d }, { 'D', '<', 0x010e }, { 'd', '<', 0x010f }, { 'D', '/', 0x0110 }, { 'd', '/', 0x0111 }, { 'E', '-', 0x0112 }, { 'e', '-', 0x0113 }, { 'E', '(', 0x0114 }, { 'e', '(', 0x0115 }, { 'E', '.', 0x0116 }, { 'e', '.', 0x0117 }, { 'E', ';', 0x0118 }, { 'e', ';', 0x0119 }, { 'E', '<', 0x011a }, { 'e', '<', 0x011b }, { 'G', '>', 0x011c }, { 'g', '>', 0x011d }, { 'G', '(', 0x011e }, { 'g', '(', 0x011f }, { 'G', '.', 0x0120 }, { 'g', '.', 0x0121 }, { 'G', ',', 0x0122 }, { 'g', ',', 0x0123 }, { 'H', '>', 0x0124 }, { 'h', '>', 0x0125 }, { 'H', '/', 0x0126 }, { 'h', '/', 0x0127 }, { 'I', '?', 0x0128 }, { 'i', '?', 0x0129 }, { 'I', '-', 0x012a }, { 'i', '-', 0x012b }, { 'I', '(', 0x012c }, { 'i', '(', 0x012d }, { 'I', ';', 0x012e }, { 'i', ';', 0x012f }, { 'I', '.', 0x0130 }, { 'i', '.', 0x0131 }, { 'I', 'J', 0x0132 }, { 'i', 'j', 0x0133 }, { 'J', '>', 0x0134 }, { 'j', '>', 0x0135 }, { 'K', ',', 0x0136 }, { 'k', ',', 0x0137 }, { 'k', 'k', 0x0138 }, { 'L', '\'', 0x0139 }, { 'l', '\'', 0x013a }, { 'L', ',', 0x013b }, { 'l', ',', 0x013c }, { 'L', '<', 0x013d }, { 'l', '<', 0x013e }, { 'L', '.', 0x013f }, { 'l', '.', 0x0140 }, { 'L', '/', 0x0141 }, { 'l', '/', 0x0142 }, { 'N', '\'', 0x0143 }, { 'n', '\'', 0x0144 }, { 'N', ',', 0x0145 }, { 'n', ',', 0x0146 }, { 'N', '<', 0x0147 }, { 'n', '<', 0x0148 }, { '\'', 'n', 0x0149 }, { 'N', 'G', 0x014a }, { 'n', 'g', 0x014b }, { 'O', '-', 0x014c }, { 'o', '-', 0x014d }, { 'O', '(', 0x014e }, { 'o', '(', 0x014f }, { 'O', '"', 0x0150 }, { 'o', '"', 0x0151 }, { 'O', 'E', 0x0152 }, { 'o', 'e', 0x0153 }, { 'R', '\'', 0x0154 }, { 'r', '\'', 0x0155 }, { 'R', ',', 0x0156 }, { 'r', ',', 0x0157 }, { 'R', '<', 0x0158 }, { 'r', '<', 0x0159 }, { 'S', '\'', 0x015a }, { 's', '\'', 0x015b }, { 'S', '>', 0x015c }, { 's', '>', 0x015d }, { 'S', ',', 0x015e }, { 's', ',', 0x015f }, { 'S', '<', 0x0160 }, { 's', '<', 0x0161 }, { 'T', ',', 0x0162 }, { 't', ',', 0x0163 }, { 'T', '<', 0x0164 }, { 't', '<', 0x0165 }, { 'T', '/', 0x0166 }, { 't', '/', 0x0167 }, { 'U', '?', 0x0168 }, { 'u', '?', 0x0169 }, { 'U', '-', 0x016a }, { 'u', '-', 0x016b }, { 'U', '(', 0x016c }, { 'u', '(', 0x016d }, { 'U', '0', 0x016e }, { 'u', '0', 0x016f }, { 'U', '"', 0x0170 }, { 'u', '"', 0x0171 }, { 'U', ';', 0x0172 }, { 'u', ';', 0x0173 }, { 'W', '>', 0x0174 }, { 'w', '>', 0x0175 }, { 'Y', '>', 0x0176 }, { 'y', '>', 0x0177 }, { 'Y', ':', 0x0178 }, { 'Z', '\'', 0x0179 }, { 'z', '\'', 0x017a }, { 'Z', '.', 0x017b }, { 'z', '.', 0x017c }, { 'Z', '<', 0x017d }, { 'z', '<', 0x017e }, { 'O', '9', 0x01a0 }, { 'o', '9', 0x01a1 }, { 'O', 'I', 0x01a2 }, { 'o', 'i', 0x01a3 }, { 'y', 'r', 0x01a6 }, { 'U', '9', 0x01af }, { 'u', '9', 0x01b0 }, { 'Z', '/', 0x01b5 }, { 'z', '/', 0x01b6 }, { 'E', 'D', 0x01b7 }, { 'A', '<', 0x01cd }, { 'a', '<', 0x01ce }, { 'I', '<', 0x01cf }, { 'i', '<', 0x01d0 }, { 'O', '<', 0x01d1 }, { 'o', '<', 0x01d2 }, { 'U', '<', 0x01d3 }, { 'u', '<', 0x01d4 }, { 'A', '1', 0x01de }, { 'a', '1', 0x01df }, { 'A', '7', 0x01e0 }, { 'a', '7', 0x01e1 }, { 'A', '3', 0x01e2 }, { 'a', '3', 0x01e3 }, { 'G', '/', 0x01e4 }, { 'g', '/', 0x01e5 }, { 'G', '<', 0x01e6 }, { 'g', '<', 0x01e7 }, { 'K', '<', 0x01e8 }, { 'k', '<', 0x01e9 }, { 'O', ';', 0x01ea }, { 'o', ';', 0x01eb }, { 'O', '1', 0x01ec }, { 'o', '1', 0x01ed }, { 'E', 'Z', 0x01ee }, { 'e', 'z', 0x01ef }, { 'j', '<', 0x01f0 }, { 'G', '\'', 0x01f4 }, { 'g', '\'', 0x01f5 }, { ';', 'S', 0x02bf }, { '\'', '<', 0x02c7 }, { '\'', '(', 0x02d8 }, { '\'', '.', 0x02d9 }, { '\'', '0', 0x02da }, { '\'', ';', 0x02db }, { '\'', '"', 0x02dd }, { 'A', '%', 0x0386 }, { 'E', '%', 0x0388 }, { 'Y', '%', 0x0389 }, { 'I', '%', 0x038a }, { 'O', '%', 0x038c }, { 'U', '%', 0x038e }, { 'W', '%', 0x038f }, { 'i', '3', 0x0390 }, { 'A', '*', 0x0391 }, { 'B', '*', 0x0392 }, { 'G', '*', 0x0393 }, { 'D', '*', 0x0394 }, { 'E', '*', 0x0395 }, { 'Z', '*', 0x0396 }, { 'Y', '*', 0x0397 }, { 'H', '*', 0x0398 }, { 'I', '*', 0x0399 }, { 'K', '*', 0x039a }, { 'L', '*', 0x039b }, { 'M', '*', 0x039c }, { 'N', '*', 0x039d }, { 'C', '*', 0x039e }, { 'O', '*', 0x039f }, { 'P', '*', 0x03a0 }, { 'R', '*', 0x03a1 }, { 'S', '*', 0x03a3 }, { 'T', '*', 0x03a4 }, { 'U', '*', 0x03a5 }, { 'F', '*', 0x03a6 }, { 'X', '*', 0x03a7 }, { 'Q', '*', 0x03a8 }, { 'W', '*', 0x03a9 }, { 'J', '*', 0x03aa }, { 'V', '*', 0x03ab }, { 'a', '%', 0x03ac }, { 'e', '%', 0x03ad }, { 'y', '%', 0x03ae }, { 'i', '%', 0x03af }, { 'u', '3', 0x03b0 }, { 'a', '*', 0x03b1 }, { 'b', '*', 0x03b2 }, { 'g', '*', 0x03b3 }, { 'd', '*', 0x03b4 }, { 'e', '*', 0x03b5 }, { 'z', '*', 0x03b6 }, { 'y', '*', 0x03b7 }, { 'h', '*', 0x03b8 }, { 'i', '*', 0x03b9 }, { 'k', '*', 0x03ba }, { 'l', '*', 0x03bb }, { 'm', '*', 0x03bc }, { 'n', '*', 0x03bd }, { 'c', '*', 0x03be }, { 'o', '*', 0x03bf }, { 'p', '*', 0x03c0 }, { 'r', '*', 0x03c1 }, { '*', 's', 0x03c2 }, { 's', '*', 0x03c3 }, { 't', '*', 0x03c4 }, { 'u', '*', 0x03c5 }, { 'f', '*', 0x03c6 }, { 'x', '*', 0x03c7 }, { 'q', '*', 0x03c8 }, { 'w', '*', 0x03c9 }, { 'j', '*', 0x03ca }, { 'v', '*', 0x03cb }, { 'o', '%', 0x03cc }, { 'u', '%', 0x03cd }, { 'w', '%', 0x03ce }, { '\'', 'G', 0x03d8 }, { ',', 'G', 0x03d9 }, { 'T', '3', 0x03da }, { 't', '3', 0x03db }, { 'M', '3', 0x03dc }, { 'm', '3', 0x03dd }, { 'K', '3', 0x03de }, { 'k', '3', 0x03df }, { 'P', '3', 0x03e0 }, { 'p', '3', 0x03e1 }, { '\'', '%', 0x03f4 }, { 'j', '3', 0x03f5 }, { 'I', 'O', 0x0401 }, { 'D', '%', 0x0402 }, { 'G', '%', 0x0403 }, { 'I', 'E', 0x0404 }, { 'D', 'S', 0x0405 }, { 'I', 'I', 0x0406 }, { 'Y', 'I', 0x0407 }, { 'J', '%', 0x0408 }, { 'L', 'J', 0x0409 }, { 'N', 'J', 0x040a }, { 'T', 's', 0x040b }, { 'K', 'J', 0x040c }, { 'V', '%', 0x040e }, { 'D', 'Z', 0x040f }, { 'A', '=', 0x0410 }, { 'B', '=', 0x0411 }, { 'V', '=', 0x0412 }, { 'G', '=', 0x0413 }, { 'D', '=', 0x0414 }, { 'E', '=', 0x0415 }, { 'Z', '%', 0x0416 }, { 'Z', '=', 0x0417 }, { 'I', '=', 0x0418 }, { 'J', '=', 0x0419 }, { 'K', '=', 0x041a }, { 'L', '=', 0x041b }, { 'M', '=', 0x041c }, { 'N', '=', 0x041d }, { 'O', '=', 0x041e }, { 'P', '=', 0x041f }, { 'R', '=', 0x0420 }, { 'S', '=', 0x0421 }, { 'T', '=', 0x0422 }, { 'U', '=', 0x0423 }, { 'F', '=', 0x0424 }, { 'H', '=', 0x0425 }, { 'C', '=', 0x0426 }, { 'C', '%', 0x0427 }, { 'S', '%', 0x0428 }, { 'S', 'c', 0x0429 }, { '=', '"', 0x042a }, { 'Y', '=', 0x042b }, { '%', '"', 0x042c }, { 'J', 'E', 0x042d }, { 'J', 'U', 0x042e }, { 'J', 'A', 0x042f }, { 'a', '=', 0x0430 }, { 'b', '=', 0x0431 }, { 'v', '=', 0x0432 }, { 'g', '=', 0x0433 }, { 'd', '=', 0x0434 }, { 'e', '=', 0x0435 }, { 'z', '%', 0x0436 }, { 'z', '=', 0x0437 }, { 'i', '=', 0x0438 }, { 'j', '=', 0x0439 }, { 'k', '=', 0x043a }, { 'l', '=', 0x043b }, { 'm', '=', 0x043c }, { 'n', '=', 0x043d }, { 'o', '=', 0x043e }, { 'p', '=', 0x043f }, { 'r', '=', 0x0440 }, { 's', '=', 0x0441 }, { 't', '=', 0x0442 }, { 'u', '=', 0x0443 }, { 'f', '=', 0x0444 }, { 'h', '=', 0x0445 }, { 'c', '=', 0x0446 }, { 'c', '%', 0x0447 }, { 's', '%', 0x0448 }, { 's', 'c', 0x0449 }, { '=', '\'', 0x044a }, { 'y', '=', 0x044b }, { '%', '\'', 0x044c }, { 'j', 'e', 0x044d }, { 'j', 'u', 0x044e }, { 'j', 'a', 0x044f }, { 'i', 'o', 0x0451 }, { 'd', '%', 0x0452 }, { 'g', '%', 0x0453 }, { 'i', 'e', 0x0454 }, { 'd', 's', 0x0455 }, { 'i', 'i', 0x0456 }, { 'y', 'i', 0x0457 }, { 'j', '%', 0x0458 }, { 'l', 'j', 0x0459 }, { 'n', 'j', 0x045a }, { 't', 's', 0x045b }, { 'k', 'j', 0x045c }, { 'v', '%', 0x045e }, { 'd', 'z', 0x045f }, { 'Y', '3', 0x0462 }, { 'y', '3', 0x0463 }, { 'O', '3', 0x046a }, { 'o', '3', 0x046b }, { 'F', '3', 0x0472 }, { 'f', '3', 0x0473 }, { 'V', '3', 0x0474 }, { 'v', '3', 0x0475 }, { 'C', '3', 0x0480 }, { 'c', '3', 0x0481 }, { 'G', '3', 0x0490 }, { 'g', '3', 0x0491 }, { 'A', '+', 0x05d0 }, { 'B', '+', 0x05d1 }, { 'G', '+', 0x05d2 }, { 'D', '+', 0x05d3 }, { 'H', '+', 0x05d4 }, { 'W', '+', 0x05d5 }, { 'Z', '+', 0x05d6 }, { 'X', '+', 0x05d7 }, { 'T', 'j', 0x05d8 }, { 'J', '+', 0x05d9 }, { 'K', '%', 0x05da }, { 'K', '+', 0x05db }, { 'L', '+', 0x05dc }, { 'M', '%', 0x05dd }, { 'M', '+', 0x05de }, { 'N', '%', 0x05df }, { 'N', '+', 0x05e0 }, { 'S', '+', 0x05e1 }, { 'E', '+', 0x05e2 }, { 'P', '%', 0x05e3 }, { 'P', '+', 0x05e4 }, { 'Z', 'j', 0x05e5 }, { 'Z', 'J', 0x05e6 }, { 'Q', '+', 0x05e7 }, { 'R', '+', 0x05e8 }, { 'S', 'h', 0x05e9 }, { 'T', '+', 0x05ea }, { ',', '+', 0x060c }, { ';', '+', 0x061b }, { '?', '+', 0x061f }, { 'H', '\'', 0x0621 }, { 'a', 'M', 0x0622 }, { 'a', 'H', 0x0623 }, { 'w', 'H', 0x0624 }, { 'a', 'h', 0x0625 }, { 'y', 'H', 0x0626 }, { 'a', '+', 0x0627 }, { 'b', '+', 0x0628 }, { 't', 'm', 0x0629 }, { 't', '+', 0x062a }, { 't', 'k', 0x062b }, { 'g', '+', 0x062c }, { 'h', 'k', 0x062d }, { 'x', '+', 0x062e }, { 'd', '+', 0x062f }, { 'd', 'k', 0x0630 }, { 'r', '+', 0x0631 }, { 'z', '+', 0x0632 }, { 's', '+', 0x0633 }, { 's', 'n', 0x0634 }, { 'c', '+', 0x0635 }, { 'd', 'd', 0x0636 }, { 't', 'j', 0x0637 }, { 'z', 'H', 0x0638 }, { 'e', '+', 0x0639 }, { 'i', '+', 0x063a }, { '+', '+', 0x0640 }, { 'f', '+', 0x0641 }, { 'q', '+', 0x0642 }, { 'k', '+', 0x0643 }, { 'l', '+', 0x0644 }, { 'm', '+', 0x0645 }, { 'n', '+', 0x0646 }, { 'h', '+', 0x0647 }, { 'w', '+', 0x0648 }, { 'j', '+', 0x0649 }, { 'y', '+', 0x064a }, { ':', '+', 0x064b }, { '"', '+', 0x064c }, { '=', '+', 0x064d }, { '/', '+', 0x064e }, { '\'', '+', 0x064f }, { '1', '+', 0x0650 }, { '3', '+', 0x0651 }, { '0', '+', 0x0652 }, { 'a', 'S', 0x0670 }, { 'p', '+', 0x067e }, { 'v', '+', 0x06a4 }, { 'g', 'f', 0x06af }, { '0', 'a', 0x06f0 }, { '1', 'a', 0x06f1 }, { '2', 'a', 0x06f2 }, { '3', 'a', 0x06f3 }, { '4', 'a', 0x06f4 }, { '5', 'a', 0x06f5 }, { '6', 'a', 0x06f6 }, { '7', 'a', 0x06f7 }, { '8', 'a', 0x06f8 }, { '9', 'a', 0x06f9 }, { 'B', '.', 0x1e02 }, { 'b', '.', 0x1e03 }, { 'B', '_', 0x1e06 }, { 'b', '_', 0x1e07 }, { 'D', '.', 0x1e0a }, { 'd', '.', 0x1e0b }, { 'D', '_', 0x1e0e }, { 'd', '_', 0x1e0f }, { 'D', ',', 0x1e10 }, { 'd', ',', 0x1e11 }, { 'F', '.', 0x1e1e }, { 'f', '.', 0x1e1f }, { 'G', '-', 0x1e20 }, { 'g', '-', 0x1e21 }, { 'H', '.', 0x1e22 }, { 'h', '.', 0x1e23 }, { 'H', ':', 0x1e26 }, { 'h', ':', 0x1e27 }, { 'H', ',', 0x1e28 }, { 'h', ',', 0x1e29 }, { 'K', '\'', 0x1e30 }, { 'k', '\'', 0x1e31 }, { 'K', '_', 0x1e34 }, { 'k', '_', 0x1e35 }, { 'L', '_', 0x1e3a }, { 'l', '_', 0x1e3b }, { 'M', '\'', 0x1e3e }, { 'm', '\'', 0x1e3f }, { 'M', '.', 0x1e40 }, { 'm', '.', 0x1e41 }, { 'N', '.', 0x1e44 }, { 'n', '.', 0x1e45 }, { 'N', '_', 0x1e48 }, { 'n', '_', 0x1e49 }, { 'P', '\'', 0x1e54 }, { 'p', '\'', 0x1e55 }, { 'P', '.', 0x1e56 }, { 'p', '.', 0x1e57 }, { 'R', '.', 0x1e58 }, { 'r', '.', 0x1e59 }, { 'R', '_', 0x1e5e }, { 'r', '_', 0x1e5f }, { 'S', '.', 0x1e60 }, { 's', '.', 0x1e61 }, { 'T', '.', 0x1e6a }, { 't', '.', 0x1e6b }, { 'T', '_', 0x1e6e }, { 't', '_', 0x1e6f }, { 'V', '?', 0x1e7c }, { 'v', '?', 0x1e7d }, { 'W', '!', 0x1e80 }, { 'w', '!', 0x1e81 }, { 'W', '\'', 0x1e82 }, { 'w', '\'', 0x1e83 }, { 'W', ':', 0x1e84 }, { 'w', ':', 0x1e85 }, { 'W', '.', 0x1e86 }, { 'w', '.', 0x1e87 }, { 'X', '.', 0x1e8a }, { 'x', '.', 0x1e8b }, { 'X', ':', 0x1e8c }, { 'x', ':', 0x1e8d }, { 'Y', '.', 0x1e8e }, { 'y', '.', 0x1e8f }, { 'Z', '>', 0x1e90 }, { 'z', '>', 0x1e91 }, { 'Z', '_', 0x1e94 }, { 'z', '_', 0x1e95 }, { 'h', '_', 0x1e96 }, { 't', ':', 0x1e97 }, { 'w', '0', 0x1e98 }, { 'y', '0', 0x1e99 }, { 'A', '2', 0x1ea2 }, { 'a', '2', 0x1ea3 }, { 'E', '2', 0x1eba }, { 'e', '2', 0x1ebb }, { 'E', '?', 0x1ebc }, { 'e', '?', 0x1ebd }, { 'I', '2', 0x1ec8 }, { 'i', '2', 0x1ec9 }, { 'O', '2', 0x1ece }, { 'o', '2', 0x1ecf }, { 'U', '2', 0x1ee6 }, { 'u', '2', 0x1ee7 }, { 'Y', '!', 0x1ef2 }, { 'y', '!', 0x1ef3 }, { 'Y', '2', 0x1ef6 }, { 'y', '2', 0x1ef7 }, { 'Y', '?', 0x1ef8 }, { 'y', '?', 0x1ef9 }, { ';', '\'', 0x1f00 }, { ',', '\'', 0x1f01 }, { ';', '!', 0x1f02 }, { ',', '!', 0x1f03 }, { '?', ';', 0x1f04 }, { '?', ',', 0x1f05 }, { '!', ':', 0x1f06 }, { '?', ':', 0x1f07 }, { '1', 'N', 0x2002 }, { '1', 'M', 0x2003 }, { '3', 'M', 0x2004 }, { '4', 'M', 0x2005 }, { '6', 'M', 0x2006 }, { '1', 'T', 0x2009 }, { '1', 'H', 0x200a }, { '-', '1', 0x2010 }, { '-', 'N', 0x2013 }, { '-', 'M', 0x2014 }, { '-', '3', 0x2015 }, { '!', '2', 0x2016 }, { '=', '2', 0x2017 }, { '\'', '6', 0x2018 }, { '\'', '9', 0x2019 }, { '.', '9', 0x201a }, { '9', '\'', 0x201b }, { '"', '6', 0x201c }, { '"', '9', 0x201d }, { ':', '9', 0x201e }, { '9', '"', 0x201f }, { '/', '-', 0x2020 }, { '/', '=', 0x2021 }, { '.', '.', 0x2025 }, { ',', '.', 0x2026 }, { '%', '0', 0x2030 }, { '1', '\'', 0x2032 }, { '2', '\'', 0x2033 }, { '3', '\'', 0x2034 }, { '1', '"', 0x2035 }, { '2', '"', 0x2036 }, { '3', '"', 0x2037 }, { 'C', 'a', 0x2038 }, { '<', '1', 0x2039 }, { '>', '1', 0x203a }, { ':', 'X', 0x203b }, { '\'', '-', 0x203e }, { '/', 'f', 0x2044 }, { '0', 'S', 0x2070 }, { '4', 'S', 0x2074 }, { '5', 'S', 0x2075 }, { '6', 'S', 0x2076 }, { '7', 'S', 0x2077 }, { '8', 'S', 0x2078 }, { '9', 'S', 0x2079 }, { '+', 'S', 0x207a }, { '-', 'S', 0x207b }, { '=', 'S', 0x207c }, { '(', 'S', 0x207d }, { ')', 'S', 0x207e }, { 'n', 'S', 0x207f }, { '0', 's', 0x2080 }, { '1', 's', 0x2081 }, { '2', 's', 0x2082 }, { '3', 's', 0x2083 }, { '4', 's', 0x2084 }, { '5', 's', 0x2085 }, { '6', 's', 0x2086 }, { '7', 's', 0x2087 }, { '8', 's', 0x2088 }, { '9', 's', 0x2089 }, { '+', 's', 0x208a }, { '-', 's', 0x208b }, { '=', 's', 0x208c }, { '(', 's', 0x208d }, { ')', 's', 0x208e }, { 'L', 'i', 0x20a4 }, { 'P', 't', 0x20a7 }, { 'W', '=', 0x20a9 }, { '=', 'e', 0x20ac }, // euro { 'E', 'u', 0x20ac }, // euro { '=', 'R', 0x20bd }, // rouble { '=', 'P', 0x20bd }, // rouble { 'o', 'C', 0x2103 }, { 'c', 'o', 0x2105 }, { 'o', 'F', 0x2109 }, { 'N', '0', 0x2116 }, { 'P', 'O', 0x2117 }, { 'R', 'x', 0x211e }, { 'S', 'M', 0x2120 }, { 'T', 'M', 0x2122 }, { 'O', 'm', 0x2126 }, { 'A', 'O', 0x212b }, { '1', '3', 0x2153 }, { '2', '3', 0x2154 }, { '1', '5', 0x2155 }, { '2', '5', 0x2156 }, { '3', '5', 0x2157 }, { '4', '5', 0x2158 }, { '1', '6', 0x2159 }, { '5', '6', 0x215a }, { '1', '8', 0x215b }, { '3', '8', 0x215c }, { '5', '8', 0x215d }, { '7', '8', 0x215e }, { '1', 'R', 0x2160 }, { '2', 'R', 0x2161 }, { '3', 'R', 0x2162 }, { '4', 'R', 0x2163 }, { '5', 'R', 0x2164 }, { '6', 'R', 0x2165 }, { '7', 'R', 0x2166 }, { '8', 'R', 0x2167 }, { '9', 'R', 0x2168 }, { 'a', 'R', 0x2169 }, { 'b', 'R', 0x216a }, { 'c', 'R', 0x216b }, { '1', 'r', 0x2170 }, { '2', 'r', 0x2171 }, { '3', 'r', 0x2172 }, { '4', 'r', 0x2173 }, { '5', 'r', 0x2174 }, { '6', 'r', 0x2175 }, { '7', 'r', 0x2176 }, { '8', 'r', 0x2177 }, { '9', 'r', 0x2178 }, { 'a', 'r', 0x2179 }, { 'b', 'r', 0x217a }, { 'c', 'r', 0x217b }, { '<', '-', 0x2190 }, { '-', '!', 0x2191 }, { '-', '>', 0x2192 }, { '-', 'v', 0x2193 }, { '<', '>', 0x2194 }, { 'U', 'D', 0x2195 }, { '<', '=', 0x21d0 }, { '=', '>', 0x21d2 }, { '=', '=', 0x21d4 }, { 'F', 'A', 0x2200 }, { 'd', 'P', 0x2202 }, { 'T', 'E', 0x2203 }, { '/', '0', 0x2205 }, { 'D', 'E', 0x2206 }, { 'N', 'B', 0x2207 }, { '(', '-', 0x2208 }, { '-', ')', 0x220b }, { '*', 'P', 0x220f }, { '+', 'Z', 0x2211 }, { '-', '2', 0x2212 }, { '-', '+', 0x2213 }, { '*', '-', 0x2217 }, { 'O', 'b', 0x2218 }, { 'S', 'b', 0x2219 }, { 'R', 'T', 0x221a }, { '0', '(', 0x221d }, { '0', '0', 0x221e }, { '-', 'L', 0x221f }, { '-', 'V', 0x2220 }, { 'P', 'P', 0x2225 }, { 'A', 'N', 0x2227 }, { 'O', 'R', 0x2228 }, { '(', 'U', 0x2229 }, { ')', 'U', 0x222a }, { 'I', 'n', 0x222b }, { 'D', 'I', 0x222c }, { 'I', 'o', 0x222e }, { '.', ':', 0x2234 }, { ':', '.', 0x2235 }, { ':', 'R', 0x2236 }, { ':', ':', 0x2237 }, { '?', '1', 0x223c }, { 'C', 'G', 0x223e }, { '?', '-', 0x2243 }, { '?', '=', 0x2245 }, { '?', '2', 0x2248 }, { '=', '?', 0x224c }, { 'H', 'I', 0x2253 }, { '!', '=', 0x2260 }, { '=', '3', 0x2261 }, { '=', '<', 0x2264 }, { '>', '=', 0x2265 }, { '<', '*', 0x226a }, { '*', '>', 0x226b }, { '!', '<', 0x226e }, { '!', '>', 0x226f }, { '(', 'C', 0x2282 }, { ')', 'C', 0x2283 }, { '(', '_', 0x2286 }, { ')', '_', 0x2287 }, { '0', '.', 0x2299 }, { '0', '2', 0x229a }, { '-', 'T', 0x22a5 }, { '.', 'P', 0x22c5 }, { ':', '3', 0x22ee }, { '.', '3', 0x22ef }, { 'E', 'h', 0x2302 }, { '<', '7', 0x2308 }, { '>', '7', 0x2309 }, { '7', '<', 0x230a }, { '7', '>', 0x230b }, { 'N', 'I', 0x2310 }, { '(', 'A', 0x2312 }, { 'T', 'R', 0x2315 }, { 'I', 'u', 0x2320 }, { 'I', 'l', 0x2321 }, { '<', '/', 0x2329 }, { '/', '>', 0x232a }, { 'V', 's', 0x2423 }, { '1', 'h', 0x2440 }, { '3', 'h', 0x2441 }, { '2', 'h', 0x2442 }, { '4', 'h', 0x2443 }, { '1', 'j', 0x2446 }, { '2', 'j', 0x2447 }, { '3', 'j', 0x2448 }, { '4', 'j', 0x2449 }, { '1', '.', 0x2488 }, { '2', '.', 0x2489 }, { '3', '.', 0x248a }, { '4', '.', 0x248b }, { '5', '.', 0x248c }, { '6', '.', 0x248d }, { '7', '.', 0x248e }, { '8', '.', 0x248f }, { '9', '.', 0x2490 }, { 'h', 'h', 0x2500 }, { 'H', 'H', 0x2501 }, { 'v', 'v', 0x2502 }, { 'V', 'V', 0x2503 }, { '3', '-', 0x2504 }, { '3', '_', 0x2505 }, { '3', '!', 0x2506 }, { '3', '/', 0x2507 }, { '4', '-', 0x2508 }, { '4', '_', 0x2509 }, { '4', '!', 0x250a }, { '4', '/', 0x250b }, { 'd', 'r', 0x250c }, { 'd', 'R', 0x250d }, { 'D', 'r', 0x250e }, { 'D', 'R', 0x250f }, { 'd', 'l', 0x2510 }, { 'd', 'L', 0x2511 }, { 'D', 'l', 0x2512 }, { 'L', 'D', 0x2513 }, { 'u', 'r', 0x2514 }, { 'u', 'R', 0x2515 }, { 'U', 'r', 0x2516 }, { 'U', 'R', 0x2517 }, { 'u', 'l', 0x2518 }, { 'u', 'L', 0x2519 }, { 'U', 'l', 0x251a }, { 'U', 'L', 0x251b }, { 'v', 'r', 0x251c }, { 'v', 'R', 0x251d }, { 'V', 'r', 0x2520 }, { 'V', 'R', 0x2523 }, { 'v', 'l', 0x2524 }, { 'v', 'L', 0x2525 }, { 'V', 'l', 0x2528 }, { 'V', 'L', 0x252b }, { 'd', 'h', 0x252c }, { 'd', 'H', 0x252f }, { 'D', 'h', 0x2530 }, { 'D', 'H', 0x2533 }, { 'u', 'h', 0x2534 }, { 'u', 'H', 0x2537 }, { 'U', 'h', 0x2538 }, { 'U', 'H', 0x253b }, { 'v', 'h', 0x253c }, { 'v', 'H', 0x253f }, { 'V', 'h', 0x2542 }, { 'V', 'H', 0x254b }, { 'F', 'D', 0x2571 }, { 'B', 'D', 0x2572 }, { 'T', 'B', 0x2580 }, { 'L', 'B', 0x2584 }, { 'F', 'B', 0x2588 }, { 'l', 'B', 0x258c }, { 'R', 'B', 0x2590 }, { '.', 'S', 0x2591 }, { ':', 'S', 0x2592 }, { '?', 'S', 0x2593 }, { 'f', 'S', 0x25a0 }, { 'O', 'S', 0x25a1 }, { 'R', 'O', 0x25a2 }, { 'R', 'r', 0x25a3 }, { 'R', 'F', 0x25a4 }, { 'R', 'Y', 0x25a5 }, { 'R', 'H', 0x25a6 }, { 'R', 'Z', 0x25a7 }, { 'R', 'K', 0x25a8 }, { 'R', 'X', 0x25a9 }, { 's', 'B', 0x25aa }, { 'S', 'R', 0x25ac }, { 'O', 'r', 0x25ad }, { 'U', 'T', 0x25b2 }, { 'u', 'T', 0x25b3 }, { 'P', 'R', 0x25b6 }, { 'T', 'r', 0x25b7 }, { 'D', 't', 0x25bc }, { 'd', 'T', 0x25bd }, { 'P', 'L', 0x25c0 }, { 'T', 'l', 0x25c1 }, { 'D', 'b', 0x25c6 }, { 'D', 'w', 0x25c7 }, { 'L', 'Z', 0x25ca }, { '0', 'm', 0x25cb }, { '0', 'o', 0x25ce }, { '0', 'M', 0x25cf }, { '0', 'L', 0x25d0 }, { '0', 'R', 0x25d1 }, { 'S', 'n', 0x25d8 }, { 'I', 'c', 0x25d9 }, { 'F', 'd', 0x25e2 }, { 'B', 'd', 0x25e3 }, { '*', '2', 0x2605 }, { '*', '1', 0x2606 }, { '<', 'H', 0x261c }, { '>', 'H', 0x261e }, { '0', 'u', 0x263a }, { '0', 'U', 0x263b }, { 'S', 'U', 0x263c }, { 'F', 'm', 0x2640 }, { 'M', 'l', 0x2642 }, { 'c', 'S', 0x2660 }, { 'c', 'H', 0x2661 }, { 'c', 'D', 0x2662 }, { 'c', 'C', 0x2663 }, { 'M', 'd', 0x2669 }, { 'M', '8', 0x266a }, { 'M', '2', 0x266b }, { 'M', 'b', 0x266d }, { 'M', 'x', 0x266e }, { 'M', 'X', 0x266f }, { 'O', 'K', 0x2713 }, { 'X', 'X', 0x2717 }, { '-', 'X', 0x2720 }, { 'I', 'S', 0x3000 }, { ',', '_', 0x3001 }, { '.', '_', 0x3002 }, { '+', '"', 0x3003 }, { '+', '_', 0x3004 }, { '*', '_', 0x3005 }, { ';', '_', 0x3006 }, { '0', '_', 0x3007 }, { '<', '+', 0x300a }, { '>', '+', 0x300b }, { '<', '\'', 0x300c }, { '>', '\'', 0x300d }, { '<', '"', 0x300e }, { '>', '"', 0x300f }, { '(', '"', 0x3010 }, { ')', '"', 0x3011 }, { '=', 'T', 0x3012 }, { '=', '_', 0x3013 }, { '(', '\'', 0x3014 }, { ')', '\'', 0x3015 }, { '(', 'I', 0x3016 }, { ')', 'I', 0x3017 }, { '-', '?', 0x301c }, { 'A', '5', 0x3041 }, { 'a', '5', 0x3042 }, { 'I', '5', 0x3043 }, { 'i', '5', 0x3044 }, { 'U', '5', 0x3045 }, { 'u', '5', 0x3046 }, { 'E', '5', 0x3047 }, { 'e', '5', 0x3048 }, { 'O', '5', 0x3049 }, { 'o', '5', 0x304a }, { 'k', 'a', 0x304b }, { 'g', 'a', 0x304c }, { 'k', 'i', 0x304d }, { 'g', 'i', 0x304e }, { 'k', 'u', 0x304f }, { 'g', 'u', 0x3050 }, { 'k', 'e', 0x3051 }, { 'g', 'e', 0x3052 }, { 'k', 'o', 0x3053 }, { 'g', 'o', 0x3054 }, { 's', 'a', 0x3055 }, { 'z', 'a', 0x3056 }, { 's', 'i', 0x3057 }, { 'z', 'i', 0x3058 }, { 's', 'u', 0x3059 }, { 'z', 'u', 0x305a }, { 's', 'e', 0x305b }, { 'z', 'e', 0x305c }, { 's', 'o', 0x305d }, { 'z', 'o', 0x305e }, { 't', 'a', 0x305f }, { 'd', 'a', 0x3060 }, { 't', 'i', 0x3061 }, { 'd', 'i', 0x3062 }, { 't', 'U', 0x3063 }, { 't', 'u', 0x3064 }, { 'd', 'u', 0x3065 }, { 't', 'e', 0x3066 }, { 'd', 'e', 0x3067 }, { 't', 'o', 0x3068 }, { 'd', 'o', 0x3069 }, { 'n', 'a', 0x306a }, { 'n', 'i', 0x306b }, { 'n', 'u', 0x306c }, { 'n', 'e', 0x306d }, { 'n', 'o', 0x306e }, { 'h', 'a', 0x306f }, { 'b', 'a', 0x3070 }, { 'p', 'a', 0x3071 }, { 'h', 'i', 0x3072 }, { 'b', 'i', 0x3073 }, { 'p', 'i', 0x3074 }, { 'h', 'u', 0x3075 }, { 'b', 'u', 0x3076 }, { 'p', 'u', 0x3077 }, { 'h', 'e', 0x3078 }, { 'b', 'e', 0x3079 }, { 'p', 'e', 0x307a }, { 'h', 'o', 0x307b }, { 'b', 'o', 0x307c }, { 'p', 'o', 0x307d }, { 'm', 'a', 0x307e }, { 'm', 'i', 0x307f }, { 'm', 'u', 0x3080 }, { 'm', 'e', 0x3081 }, { 'm', 'o', 0x3082 }, { 'y', 'A', 0x3083 }, { 'y', 'a', 0x3084 }, { 'y', 'U', 0x3085 }, { 'y', 'u', 0x3086 }, { 'y', 'O', 0x3087 }, { 'y', 'o', 0x3088 }, { 'r', 'a', 0x3089 }, { 'r', 'i', 0x308a }, { 'r', 'u', 0x308b }, { 'r', 'e', 0x308c }, { 'r', 'o', 0x308d }, { 'w', 'A', 0x308e }, { 'w', 'a', 0x308f }, { 'w', 'i', 0x3090 }, { 'w', 'e', 0x3091 }, { 'w', 'o', 0x3092 }, { 'n', '5', 0x3093 }, { 'v', 'u', 0x3094 }, { '"', '5', 0x309b }, { '0', '5', 0x309c }, { '*', '5', 0x309d }, { '+', '5', 0x309e }, { 'a', '6', 0x30a1 }, { 'A', '6', 0x30a2 }, { 'i', '6', 0x30a3 }, { 'I', '6', 0x30a4 }, { 'u', '6', 0x30a5 }, { 'U', '6', 0x30a6 }, { 'e', '6', 0x30a7 }, { 'E', '6', 0x30a8 }, { 'o', '6', 0x30a9 }, { 'O', '6', 0x30aa }, { 'K', 'a', 0x30ab }, { 'G', 'a', 0x30ac }, { 'K', 'i', 0x30ad }, { 'G', 'i', 0x30ae }, { 'K', 'u', 0x30af }, { 'G', 'u', 0x30b0 }, { 'K', 'e', 0x30b1 }, { 'G', 'e', 0x30b2 }, { 'K', 'o', 0x30b3 }, { 'G', 'o', 0x30b4 }, { 'S', 'a', 0x30b5 }, { 'Z', 'a', 0x30b6 }, { 'S', 'i', 0x30b7 }, { 'Z', 'i', 0x30b8 }, { 'S', 'u', 0x30b9 }, { 'Z', 'u', 0x30ba }, { 'S', 'e', 0x30bb }, { 'Z', 'e', 0x30bc }, { 'S', 'o', 0x30bd }, { 'Z', 'o', 0x30be }, { 'T', 'a', 0x30bf }, { 'D', 'a', 0x30c0 }, { 'T', 'i', 0x30c1 }, { 'D', 'i', 0x30c2 }, { 'T', 'U', 0x30c3 }, { 'T', 'u', 0x30c4 }, { 'D', 'u', 0x30c5 }, { 'T', 'e', 0x30c6 }, { 'D', 'e', 0x30c7 }, { 'T', 'o', 0x30c8 }, { 'D', 'o', 0x30c9 }, { 'N', 'a', 0x30ca }, { 'N', 'i', 0x30cb }, { 'N', 'u', 0x30cc }, { 'N', 'e', 0x30cd }, { 'N', 'o', 0x30ce }, { 'H', 'a', 0x30cf }, { 'B', 'a', 0x30d0 }, { 'P', 'a', 0x30d1 }, { 'H', 'i', 0x30d2 }, { 'B', 'i', 0x30d3 }, { 'P', 'i', 0x30d4 }, { 'H', 'u', 0x30d5 }, { 'B', 'u', 0x30d6 }, { 'P', 'u', 0x30d7 }, { 'H', 'e', 0x30d8 }, { 'B', 'e', 0x30d9 }, { 'P', 'e', 0x30da }, { 'H', 'o', 0x30db }, { 'B', 'o', 0x30dc }, { 'P', 'o', 0x30dd }, { 'M', 'a', 0x30de }, { 'M', 'i', 0x30df }, { 'M', 'u', 0x30e0 }, { 'M', 'e', 0x30e1 }, { 'M', 'o', 0x30e2 }, { 'Y', 'A', 0x30e3 }, { 'Y', 'a', 0x30e4 }, { 'Y', 'U', 0x30e5 }, { 'Y', 'u', 0x30e6 }, { 'Y', 'O', 0x30e7 }, { 'Y', 'o', 0x30e8 }, { 'R', 'a', 0x30e9 }, { 'R', 'i', 0x30ea }, { 'R', 'u', 0x30eb }, { 'R', 'e', 0x30ec }, { 'R', 'o', 0x30ed }, { 'W', 'A', 0x30ee }, { 'W', 'a', 0x30ef }, { 'W', 'i', 0x30f0 }, { 'W', 'e', 0x30f1 }, { 'W', 'o', 0x30f2 }, { 'N', '6', 0x30f3 }, { 'V', 'u', 0x30f4 }, { 'K', 'A', 0x30f5 }, { 'K', 'E', 0x30f6 }, { 'V', 'a', 0x30f7 }, { 'V', 'i', 0x30f8 }, { 'V', 'e', 0x30f9 }, { 'V', 'o', 0x30fa }, { '.', '6', 0x30fb }, { '-', '6', 0x30fc }, { '*', '6', 0x30fd }, { '+', '6', 0x30fe }, { 'b', '4', 0x3105 }, { 'p', '4', 0x3106 }, { 'm', '4', 0x3107 }, { 'f', '4', 0x3108 }, { 'd', '4', 0x3109 }, { 't', '4', 0x310a }, { 'n', '4', 0x310b }, { 'l', '4', 0x310c }, { 'g', '4', 0x310d }, { 'k', '4', 0x310e }, { 'h', '4', 0x310f }, { 'j', '4', 0x3110 }, { 'q', '4', 0x3111 }, { 'x', '4', 0x3112 }, { 'z', 'h', 0x3113 }, { 'c', 'h', 0x3114 }, { 's', 'h', 0x3115 }, { 'r', '4', 0x3116 }, { 'z', '4', 0x3117 }, { 'c', '4', 0x3118 }, { 's', '4', 0x3119 }, { 'a', '4', 0x311a }, { 'o', '4', 0x311b }, { 'e', '4', 0x311c }, { 'a', 'i', 0x311e }, { 'e', 'i', 0x311f }, { 'a', 'u', 0x3120 }, { 'o', 'u', 0x3121 }, { 'a', 'n', 0x3122 }, { 'e', 'n', 0x3123 }, { 'a', 'N', 0x3124 }, { 'e', 'N', 0x3125 }, { 'e', 'r', 0x3126 }, { 'i', '4', 0x3127 }, { 'u', '4', 0x3128 }, { 'i', 'u', 0x3129 }, { 'v', '4', 0x312a }, { 'n', 'G', 0x312b }, { 'g', 'n', 0x312c }, { '1', 'c', 0x3220 }, { '2', 'c', 0x3221 }, { '3', 'c', 0x3222 }, { '4', 'c', 0x3223 }, { '5', 'c', 0x3224 }, { '6', 'c', 0x3225 }, { '7', 'c', 0x3226 }, { '8', 'c', 0x3227 }, { '9', 'c', 0x3228 }, // code points 0xe000 - 0xefff excluded, they have no assigned // characters, only used in proposals. { 'f', 'f', 0xfb00 }, { 'f', 'i', 0xfb01 }, { 'f', 'l', 0xfb02 }, { 'f', 't', 0xfb05 }, { 's', 't', 0xfb06 }, // Vim 5.x compatible digraphs that don't conflict with the above { '~', '!', 161 }, // { 'c', '|', 162 }, // { '$', '$', 163 }, // { 'o', 'x', 164 }, // - currency symbol in ISO 8859-1 { 'Y', '-', 165 }, // { '|', '|', 166 }, // { 'c', 'O', 169 }, // { '-', ',', 172 }, // { '-', '=', 175 }, // { '~', 'o', 176 }, // { '2', '2', 178 }, // { '3', '3', 179 }, // { 'p', 'p', 182 }, // { '~', '.', 183 }, // { '1', '1', 185 }, // { '~', '?', 191 }, // { 'A', '`', 192 }, // { 'A', '^', 194 }, // { 'A', '~', 195 }, // { 'A', '"', 196 }, // { 'A', '@', 197 }, // { 'E', '`', 200 }, // { 'E', '^', 202 }, // { 'E', '"', 203 }, // { 'I', '`', 204 }, // { 'I', '^', 206 }, // { 'I', '"', 207 }, // { 'N', '~', 209 }, // { 'O', '`', 210 }, // { 'O', '^', 212 }, // { 'O', '~', 213 }, // { '/', '\\', 215 }, // - multiplication symbol in ISO 8859-1 { 'U', '`', 217 }, // { 'U', '^', 219 }, // { 'I', 'p', 222 }, // { 'a', '`', 224 }, // { 'a', '^', 226 }, // { 'a', '~', 227 }, // { 'a', '"', 228 }, // { 'a', '@', 229 }, // { 'e', '`', 232 }, // { 'e', '^', 234 }, // { 'e', '"', 235 }, // { 'i', '`', 236 }, // { 'i', '^', 238 }, // { 'n', '~', 241 }, // { 'o', '`', 242 }, // { 'o', '^', 244 }, // { 'o', '~', 245 }, // { 'u', '`', 249 }, // { 'u', '^', 251 }, // { 'y', '"', 255 }, // x XX { NUL, NUL, NUL } }; /// handle digraphs after typing a character /// /// @param c /// /// @return The digraph. int do_digraph(int c) { static int backspaced; // character before K_BS static int lastchar; // last typed character if (c == -1) { // init values backspaced = -1; } else if (p_dg) { if (backspaced >= 0) { c = getdigraph(backspaced, c, FALSE); } backspaced = -1; if (((c == K_BS) || (c == Ctrl_H)) && (lastchar >= 0)) { backspaced = lastchar; } } lastchar = c; return c; } /// Get a digraph. Used after typing CTRL-K on the command line or in normal /// mode. /// /// @param cmdline TRUE when called from the cmdline /// /// @returns composed character, or NUL when ESC was used. int get_digraph(int cmdline) { int cc; no_mapping++; int c = plain_vgetc(); no_mapping--; if (c != ESC) { // ESC cancels CTRL-K if (IS_SPECIAL(c)) { // insert special key code return c; } if (cmdline) { if ((char2cells(c) == 1) && (cmdline_star == 0)) { putcmdline(c, TRUE); } } else { add_to_showcmd(c); } no_mapping++; cc = plain_vgetc(); no_mapping--; if (cc != ESC) { // ESC cancels CTRL-K return getdigraph(c, cc, TRUE); } } return NUL; } /// Lookup the pair "char1", "char2" in the digraph tables. /// /// @param char1 /// @param char2 /// @param meta_char /// /// @return If no match, return "char2". If "meta_char" is TRUE and "char1" // is a space, return "char2" | 0x80. static int getexactdigraph(int char1, int char2, int meta_char) { int retval = 0; if (IS_SPECIAL(char1) || IS_SPECIAL(char2)) { return char2; } // Search user digraphs first. digr_T *dp = (digr_T *)user_digraphs.ga_data; for (int i = 0; i < user_digraphs.ga_len; ++i) { if (((int) dp->char1 == char1) && ((int) dp->char2 == char2)) { retval = dp->result; break; } ++dp; } // Search default digraphs. if (retval == 0) { dp = digraphdefault; for (int i = 0; dp->char1 != 0; ++i) { if (((int) dp->char1 == char1) && ((int) dp->char2 == char2)) { retval = dp->result; break; } ++dp; } } if ((retval != 0) && !enc_utf8) { char_u buf[6], *to; vimconv_T vc; // Convert the Unicode digraph to 'encoding'. int i = utf_char2bytes(retval, buf); retval = 0; vc.vc_type = CONV_NONE; if (convert_setup(&vc, (char_u *)"utf-8", p_enc) == OK) { vc.vc_fail = true; assert(i >= 0); size_t len = (size_t)i; to = string_convert(&vc, buf, &len); if (to != NULL) { retval = (*mb_ptr2char)(to); xfree(to); } (void)convert_setup(&vc, NULL, NULL); } } // Ignore multi-byte characters when not in multi-byte mode. if (!has_mbyte && (retval > 0xff)) { retval = 0; } if (retval == 0) { // digraph deleted or not found if ((char1 == ' ') && meta_char) { // --> meta-char return char2 | 0x80; } return char2; } return retval; } /// Get digraph. /// Allow for both char1-char2 and char2-char1 /// /// @param char1 /// @param char2 /// @param meta_char /// /// @return The digraph. int getdigraph(int char1, int char2, int meta_char) { int retval; if (((retval = getexactdigraph(char1, char2, meta_char)) == char2) && (char1 != char2) && ((retval = getexactdigraph(char2, char1, meta_char)) // -V764 == char1)) { return char2; } return retval; } /// Add the digraphs in the argument to the digraph table. /// format: {c1}{c2} char {c1}{c2} char ... /// /// @param str void putdigraph(char_u *str) { char_u char1, char2; digr_T *dp; while (*str != NUL) { str = skipwhite(str); if (*str == NUL) { return; } char1 = *str++; char2 = *str++; if (char2 == 0) { EMSG(_(e_invarg)); return; } if ((char1 == ESC) || (char2 == ESC)) { EMSG(_("E104: Escape not allowed in digraph")); return; } str = skipwhite(str); if (!ascii_isdigit(*str)) { EMSG(_(e_number_exp)); return; } int n = getdigits_int(&str); // If the digraph already exists, replace the result. dp = (digr_T *)user_digraphs.ga_data; int i; for (i = 0; i < user_digraphs.ga_len; ++i) { if (((int)dp->char1 == char1) && ((int)dp->char2 == char2)) { dp->result = n; break; } ++dp; } // Add a new digraph to the table. if (i == user_digraphs.ga_len) { dp = GA_APPEND_VIA_PTR(digr_T, &user_digraphs); dp->char1 = char1; dp->char2 = char2; dp->result = n; } } } void listdigraphs(void) { digr_T *dp; msg_putchar('\n'); dp = digraphdefault; for (int i = 0; dp->char1 != NUL && !got_int; ++i) { digr_T tmp; // May need to convert the result to 'encoding'. tmp.char1 = dp->char1; tmp.char2 = dp->char2; tmp.result = getexactdigraph(tmp.char1, tmp.char2, FALSE); if ((tmp.result != 0) && (tmp.result != tmp.char2) && (has_mbyte || (tmp.result <= 255))) { printdigraph(&tmp); } dp++; os_breakcheck(); } dp = (digr_T *)user_digraphs.ga_data; for (int i = 0; i < user_digraphs.ga_len && !got_int; ++i) { printdigraph(dp); os_breakcheck(); dp++; } // clear screen, because some digraphs may be wrong, in which case we messed // up ScreenLines must_redraw = CLEAR; } static void printdigraph(digr_T *dp) { char_u buf[30]; char_u *p; int list_width; list_width = 13; if (dp->result != 0) { if (msg_col > Columns - list_width) { msg_putchar('\n'); } // Make msg_col a multiple of list_width by using spaces. if (msg_col % list_width != 0) { int spaces = (msg_col / list_width + 1) * list_width - msg_col; while (spaces--) { msg_putchar(' '); } } p = buf; *p++ = dp->char1; *p++ = dp->char2; *p++ = ' '; // add a space to draw a composing char on if (utf_iscomposing(dp->result)) { *p++ = ' '; } p += (*mb_char2bytes)(dp->result, p); if (char2cells(dp->result) == 1) { *p++ = ' '; } assert(p >= buf); vim_snprintf((char *)p, sizeof(buf) - (size_t)(p - buf), " %3d", dp->result); msg_outtrans(buf); } } /// structure used for b_kmap_ga.ga_data typedef struct { char_u *from; char_u *to; } kmap_T; #define KMAP_MAXLEN 20 // maximum length of "from" or "to" /// Set up key mapping tables for the 'keymap' option. /// /// @return NULL if OK, an error message for failure. This only needs to be /// used when setting the option, not later when the value has already /// been checked. char_u* keymap_init(void) { curbuf->b_kmap_state &= ~KEYMAP_INIT; if (*curbuf->b_p_keymap == NUL) { // Stop any active keymap and clear the table. Also remove // b:keymap_name, as no keymap is active now. keymap_unload(); do_cmdline_cmd("unlet! b:keymap_name"); } else { char *buf; size_t buflen; // Source the keymap file. It will contain a ":loadkeymap" command // which will call ex_loadkeymap() below. buflen = STRLEN(curbuf->b_p_keymap) + STRLEN(p_enc) + 14; buf = xmalloc(buflen); // try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' vim_snprintf(buf, buflen, "keymap/%s_%s.vim", curbuf->b_p_keymap, p_enc); if (source_runtime((char_u *)buf, 0) == FAIL) { // try finding "keymap/'keymap'.vim" in 'runtimepath' vim_snprintf(buf, buflen, "keymap/%s.vim", curbuf->b_p_keymap); if (source_runtime((char_u *)buf, 0) == FAIL) { xfree(buf); return (char_u *)N_("E544: Keymap file not found"); } } xfree(buf); } return NULL; } /// ":loadkeymap" command: load the following lines as the keymap. /// /// @param eap void ex_loadkeymap(exarg_T *eap) { char_u *line; char_u *p; char_u *s; #define KMAP_LLEN 200 // max length of "to" and "from" together char_u buf[KMAP_LLEN + 11]; char_u *save_cpo = p_cpo; if (!getline_equal(eap->getline, eap->cookie, getsourceline)) { EMSG(_("E105: Using :loadkeymap not in a sourced file")); return; } // Stop any active keymap and clear the table. keymap_unload(); curbuf->b_kmap_state = 0; ga_init(&curbuf->b_kmap_ga, (int)sizeof(kmap_T), 20); // Set 'cpoptions' to "C" to avoid line continuation. p_cpo = (char_u *)"C"; // Get each line of the sourced file, break at the end. for (;;) { line = eap->getline(0, eap->cookie, 0); if (line == NULL) { break; } p = skipwhite(line); if ((*p != '"') && (*p != NUL)) { kmap_T *kp = GA_APPEND_VIA_PTR(kmap_T, &curbuf->b_kmap_ga); s = skiptowhite(p); kp->from = vim_strnsave(p, (size_t)(s - p)); p = skipwhite(s); s = skiptowhite(p); kp->to = vim_strnsave(p, (size_t)(s - p)); if ((STRLEN(kp->from) + STRLEN(kp->to) >= KMAP_LLEN) || (*kp->from == NUL) || (*kp->to == NUL)) { if (*kp->to == NUL) { EMSG(_("E791: Empty keymap entry")); } xfree(kp->from); xfree(kp->to); --curbuf->b_kmap_ga.ga_len; } } xfree(line); } // setup ":lnoremap" to map the keys for (int i = 0; i < curbuf->b_kmap_ga.ga_len; ++i) { vim_snprintf((char *)buf, sizeof(buf), " %s %s", ((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].from, ((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].to); (void)do_map(2, buf, LANGMAP, FALSE); } p_cpo = save_cpo; curbuf->b_kmap_state |= KEYMAP_LOADED; status_redraw_curbuf(); } /// Stop using 'keymap'. static void keymap_unload(void) { char_u buf[KMAP_MAXLEN + 10]; char_u *save_cpo = p_cpo; kmap_T *kp; if (!(curbuf->b_kmap_state & KEYMAP_LOADED)) { return; } // Set 'cpoptions' to "C" to avoid line continuation. p_cpo = (char_u *)"C"; // clear the ":lmap"s kp = (kmap_T *)curbuf->b_kmap_ga.ga_data; for (int i = 0; i < curbuf->b_kmap_ga.ga_len; ++i) { vim_snprintf((char *)buf, sizeof(buf), " %s", kp[i].from); (void)do_map(1, buf, LANGMAP, FALSE); xfree(kp[i].from); xfree(kp[i].to); } p_cpo = save_cpo; ga_clear(&curbuf->b_kmap_ga); curbuf->b_kmap_state &= ~KEYMAP_LOADED; status_redraw_curbuf(); } neovim-0.2.2/src/nvim/digraph.h000066400000000000000000000003201320401574200163300ustar00rootroot00000000000000#ifndef NVIM_DIGRAPH_H #define NVIM_DIGRAPH_H #include "nvim/types.h" #include "nvim/ex_cmds_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "digraph.h.generated.h" #endif #endif // NVIM_DIGRAPH_H neovim-0.2.2/src/nvim/edit.c000066400000000000000000007660351320401574200156600ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /* * edit.c: functions for Insert mode */ #include #include #include #include #include "nvim/vim.h" #include "nvim/ascii.h" #include "nvim/edit.h" #include "nvim/buffer.h" #include "nvim/charset.h" #include "nvim/cursor.h" #include "nvim/digraph.h" #include "nvim/eval.h" #include "nvim/eval/typval.h" #include "nvim/ex_docmd.h" #include "nvim/ex_getln.h" #include "nvim/farsi.h" #include "nvim/fileio.h" #include "nvim/fold.h" #include "nvim/getchar.h" #include "nvim/indent.h" #include "nvim/indent_c.h" #include "nvim/main.h" #include "nvim/mbyte.h" #include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/message.h" #include "nvim/misc1.h" #include "nvim/keymap.h" #include "nvim/move.h" #include "nvim/normal.h" #include "nvim/ops.h" #include "nvim/option.h" #include "nvim/path.h" #include "nvim/popupmnu.h" #include "nvim/quickfix.h" #include "nvim/regexp.h" #include "nvim/screen.h" #include "nvim/search.h" #include "nvim/spell.h" #include "nvim/strings.h" #include "nvim/state.h" #include "nvim/syntax.h" #include "nvim/tag.h" #include "nvim/ui.h" #include "nvim/mouse.h" #include "nvim/terminal.h" #include "nvim/undo.h" #include "nvim/window.h" #include "nvim/event/loop.h" #include "nvim/mark.h" #include "nvim/os/input.h" #include "nvim/os/time.h" /* * definitions used for CTRL-X submode */ #define CTRL_X_WANT_IDENT 0x100 #define CTRL_X_NOT_DEFINED_YET 1 #define CTRL_X_SCROLL 2 #define CTRL_X_WHOLE_LINE 3 #define CTRL_X_FILES 4 #define CTRL_X_TAGS (5 + CTRL_X_WANT_IDENT) #define CTRL_X_PATH_PATTERNS (6 + CTRL_X_WANT_IDENT) #define CTRL_X_PATH_DEFINES (7 + CTRL_X_WANT_IDENT) #define CTRL_X_FINISHED 8 #define CTRL_X_DICTIONARY (9 + CTRL_X_WANT_IDENT) #define CTRL_X_THESAURUS (10 + CTRL_X_WANT_IDENT) #define CTRL_X_CMDLINE 11 #define CTRL_X_FUNCTION 12 #define CTRL_X_OMNI 13 #define CTRL_X_SPELL 14 #define CTRL_X_LOCAL_MSG 15 /* only used in "ctrl_x_msgs" */ #define CTRL_X_EVAL 16 ///< for builtin function complete() #define CTRL_X_MSG(i) ctrl_x_msgs[(i) & ~CTRL_X_WANT_IDENT] #define CTRL_X_MODE_LINE_OR_EVAL(m) (m == CTRL_X_WHOLE_LINE || m == CTRL_X_EVAL) static char *ctrl_x_msgs[] = { N_(" Keyword completion (^N^P)"), /* ctrl_x_mode == 0, ^P/^N compl. */ N_(" ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"), NULL, N_(" Whole line completion (^L^N^P)"), N_(" File name completion (^F^N^P)"), N_(" Tag completion (^]^N^P)"), N_(" Path pattern completion (^N^P)"), N_(" Definition completion (^D^N^P)"), NULL, N_(" Dictionary completion (^K^N^P)"), N_(" Thesaurus completion (^T^N^P)"), N_(" Command-line completion (^V^N^P)"), N_(" User defined completion (^U^N^P)"), N_(" Omni completion (^O^N^P)"), N_(" Spelling suggestion (s^N^P)"), N_(" Keyword Local completion (^N^P)"), NULL, // CTRL_X_EVAL doesn't use msg. }; static char e_hitend[] = N_("Hit end of paragraph"); static char e_complwin[] = N_("E839: Completion function changed window"); static char e_compldel[] = N_("E840: Completion function deleted text"); /* * Structure used to store one match for insert completion. */ typedef struct compl_S compl_T; struct compl_S { compl_T *cp_next; compl_T *cp_prev; char_u *cp_str; /* matched text */ char cp_icase; /* TRUE or FALSE: ignore case */ char_u *(cp_text[CPT_COUNT]); /* text for the menu */ char_u *cp_fname; /* file containing the match, allocated when * cp_flags has FREE_FNAME */ int cp_flags; /* ORIGINAL_TEXT, CONT_S_IPOS or FREE_FNAME */ int cp_number; /* sequence number */ }; #define ORIGINAL_TEXT (1) /* the original text when the expansion begun */ #define FREE_FNAME (2) /* * All the current matches are stored in a list. * "compl_first_match" points to the start of the list. * "compl_curr_match" points to the currently selected entry. * "compl_shown_match" is different from compl_curr_match during * ins_compl_get_exp(). */ static compl_T *compl_first_match = NULL; static compl_T *compl_curr_match = NULL; static compl_T *compl_shown_match = NULL; /* After using a cursor key selects a match in the popup menu, * otherwise it inserts a line break. */ static int compl_enter_selects = FALSE; /* When "compl_leader" is not NULL only matches that start with this string * are used. */ static char_u *compl_leader = NULL; static int compl_get_longest = FALSE; /* put longest common string in compl_leader */ static int compl_no_insert = FALSE; /* FALSE: select & insert TRUE: noinsert */ static int compl_no_select = FALSE; /* FALSE: select & insert TRUE: noselect */ static int compl_used_match; /* Selected one of the matches. When FALSE the match was edited or using the longest common string. */ static int compl_was_interrupted = FALSE; /* didn't finish finding completions. */ static int compl_restarting = FALSE; /* don't insert match */ /* When the first completion is done "compl_started" is set. When it's * FALSE the word to be completed must be located. */ static int compl_started = FALSE; static int compl_matches = 0; static char_u *compl_pattern = NULL; static int compl_direction = FORWARD; static int compl_shows_dir = FORWARD; static int compl_pending = 0; /* > 1 for postponed CTRL-N */ static pos_T compl_startpos; static colnr_T compl_col = 0; /* column where the text starts * that is being completed */ static char_u *compl_orig_text = NULL; /* text as it was before * completion started */ static int compl_cont_mode = 0; static expand_T compl_xp; static int compl_opt_refresh_always = FALSE; typedef struct insert_state { VimState state; cmdarg_T *ca; int mincol; int cmdchar; int startln; long count; int c; int lastc; int i; bool did_backspace; // previous char was backspace bool line_is_white; // line is empty before insert linenr_T old_topline; // topline before insertion int old_topfill; int inserted_space; // just inserted a space int replaceState; int did_restart_edit; // remember if insert mode was restarted // after a ctrl+o bool nomove; char_u *ptr; } InsertState; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "edit.c.generated.h" #endif #define BACKSPACE_CHAR 1 #define BACKSPACE_WORD 2 #define BACKSPACE_WORD_NOT_SPACE 3 #define BACKSPACE_LINE 4 static size_t spell_bad_len = 0; /* length of located bad word */ static colnr_T Insstart_textlen; /* length of line when insert started */ static colnr_T Insstart_blank_vcol; /* vcol for first inserted blank */ static bool update_Insstart_orig = true; /* set Insstart_orig to Insstart */ static char_u *last_insert = NULL; /* the text of the previous insert, K_SPECIAL and CSI are escaped */ static int last_insert_skip; /* nr of chars in front of previous insert */ static int new_insert_skip; /* nr of chars in front of current insert */ static int did_restart_edit; /* "restart_edit" when calling edit() */ static int can_cindent; /* may do cindenting on this line */ static int old_indent = 0; /* for ^^D command in insert mode */ static int revins_on; /* reverse insert mode on */ static int revins_chars; /* how much to skip after edit */ static int revins_legal; /* was the last char 'legal'? */ static int revins_scol; /* start column of revins session */ static int ins_need_undo; /* call u_save() before inserting a char. Set when edit() is called. after that arrow_used is used. */ static int did_add_space = FALSE; /* auto_format() added an extra space under the cursor */ static int dont_sync_undo = false; // CTRL-G U prevents syncing undo // for the next left/right cursor static linenr_T o_lnum = 0; static void insert_enter(InsertState *s) { s->did_backspace = true; s->old_topfill = -1; s->replaceState = REPLACE; // Remember whether editing was restarted after CTRL-O did_restart_edit = restart_edit; // sleep before redrawing, needed for "CTRL-O :" that results in an // error message check_for_delay(true); // set Insstart_orig to Insstart update_Insstart_orig = true; ins_compl_clear(); // clear stuff for CTRL-X mode // Trigger InsertEnter autocommands. Do not do this for "r" or "grx". if (s->cmdchar != 'r' && s->cmdchar != 'v') { pos_T save_cursor = curwin->w_cursor; if (s->cmdchar == 'R') { s->ptr = (char_u *)"r"; } else if (s->cmdchar == 'V') { s->ptr = (char_u *)"v"; } else { s->ptr = (char_u *)"i"; } set_vim_var_string(VV_INSERTMODE, (char *) s->ptr, 1); set_vim_var_string(VV_CHAR, NULL, -1); apply_autocmds(EVENT_INSERTENTER, NULL, NULL, false, curbuf); // Make sure the cursor didn't move. Do call check_cursor_col() in // case the text was modified. Since Insert mode was not started yet // a call to check_cursor_col() may move the cursor, especially with // the "A" command, thus set State to avoid that. Also check that the // line number is still valid (lines may have been deleted). // Do not restore if v:char was set to a non-empty string. if (!equalpos(curwin->w_cursor, save_cursor) && *get_vim_var_str(VV_CHAR) == NUL && save_cursor.lnum <= curbuf->b_ml.ml_line_count) { int save_state = State; curwin->w_cursor = save_cursor; State = INSERT; check_cursor_col(); State = save_state; } } // Check if the cursor line needs redrawing before changing State. If // 'concealcursor' is "n" it needs to be redrawn without concealing. conceal_check_cursur_line(); // When doing a paste with the middle mouse button, Insstart is set to // where the paste started. if (where_paste_started.lnum != 0) { Insstart = where_paste_started; } else { Insstart = curwin->w_cursor; if (s->startln) { Insstart.col = 0; } } Insstart_textlen = (colnr_T)linetabsize(get_cursor_line_ptr()); Insstart_blank_vcol = MAXCOL; if (!did_ai) { ai_col = 0; } if (s->cmdchar != NUL && restart_edit == 0) { ResetRedobuff(); AppendNumberToRedobuff(s->count); if (s->cmdchar == 'V' || s->cmdchar == 'v') { // "gR" or "gr" command AppendCharToRedobuff('g'); AppendCharToRedobuff((s->cmdchar == 'v') ? 'r' : 'R'); } else { AppendCharToRedobuff(s->cmdchar); if (s->cmdchar == 'g') { // "gI" command AppendCharToRedobuff('I'); } else if (s->cmdchar == 'r') { // "r" command s->count = 1; // insert only one } } } if (s->cmdchar == 'R') { if (p_fkmap && p_ri) { beep_flush(); EMSG(farsi_text_3); // encoded in Farsi State = INSERT; } else { State = REPLACE; } } else if (s->cmdchar == 'V' || s->cmdchar == 'v') { State = VREPLACE; s->replaceState = VREPLACE; orig_line_count = curbuf->b_ml.ml_line_count; vr_lines_changed = 1; } else { State = INSERT; } stop_insert_mode = false; // Need to recompute the cursor position, it might move when the cursor is // on a TAB or special character. curs_columns(true); // Enable langmap or IME, indicated by 'iminsert'. // Note that IME may enabled/disabled without us noticing here, thus the // 'iminsert' value may not reflect what is actually used. It is updated // when hitting . if (curbuf->b_p_iminsert == B_IMODE_LMAP) { State |= LANGMAP; } setmouse(); clear_showcmd(); // there is no reverse replace mode revins_on = (State == INSERT && p_ri); if (revins_on) { undisplay_dollar(); } revins_chars = 0; revins_legal = 0; revins_scol = -1; // Handle restarting Insert mode. // Don't do this for "CTRL-O ." (repeat an insert): we get here with // restart_edit non-zero, and something in the stuff buffer. if (restart_edit != 0 && stuff_empty()) { // After a paste we consider text typed to be part of the insert for // the pasted text. You can backspace over the pasted text too. if (where_paste_started.lnum) { arrow_used = false; } else { arrow_used = true; } restart_edit = 0; // If the cursor was after the end-of-line before the CTRL-O and it is // now at the end-of-line, put it after the end-of-line (this is not // correct in very rare cases). // Also do this if curswant is greater than the current virtual // column. Eg after "^O$" or "^O80|". validate_virtcol(); update_curswant(); if (((ins_at_eol && curwin->w_cursor.lnum == o_lnum) || curwin->w_curswant > curwin->w_virtcol) && *(s->ptr = get_cursor_line_ptr() + curwin->w_cursor.col) != NUL) { if (s->ptr[1] == NUL) { ++curwin->w_cursor.col; } else if (has_mbyte) { s->i = (*mb_ptr2len)(s->ptr); if (s->ptr[s->i] == NUL) { curwin->w_cursor.col += s->i; } } } ins_at_eol = false; } else { arrow_used = false; } // we are in insert mode now, don't need to start it anymore need_start_insertmode = false; // Need to save the line for undo before inserting the first char. ins_need_undo = true; where_paste_started.lnum = 0; can_cindent = true; // The cursor line is not in a closed fold, unless 'insertmode' is set or // restarting. if (!p_im && did_restart_edit == 0) { foldOpenCursor(); } // If 'showmode' is set, show the current (insert/replace/..) mode. // A warning message for changing a readonly file is given here, before // actually changing anything. It's put after the mode, if any. s->i = 0; if (p_smd && msg_silent == 0) { s->i = showmode(); } if (!p_im && did_restart_edit == 0) { change_warning(s->i == 0 ? 0 : s->i + 1); } ui_cursor_shape(); /* may show different cursor shape */ do_digraph(-1); /* clear digraphs */ // Get the current length of the redo buffer, those characters have to be // skipped if we want to get to the inserted characters. s->ptr = get_inserted(); if (s->ptr == NULL) { new_insert_skip = 0; } else { new_insert_skip = (int)STRLEN(s->ptr); xfree(s->ptr); } old_indent = 0; do { state_enter(&s->state); // If s->count != 0, `ins_esc` will prepare the redo buffer for reprocessing // and return false, causing `state_enter` to be called again. } while (!ins_esc(&s->count, s->cmdchar, s->nomove)); // Always update o_lnum, so that a "CTRL-O ." that adds a line // still puts the cursor back after the inserted text. if (ins_at_eol) { o_lnum = curwin->w_cursor.lnum; } foldUpdateAfterInsert(); if (s->cmdchar != 'r' && s->cmdchar != 'v') { apply_autocmds(EVENT_INSERTLEAVE, NULL, NULL, false, curbuf); } did_cursorhold = false; } static int insert_check(VimState *state) { InsertState *s = (InsertState *)state; // If typed something may trigger CursorHoldI again. if (s->c != K_EVENT // but not in CTRL-X mode, a script can't restore the state && ctrl_x_mode == 0) { did_cursorhold = false; } // If the cursor was moved we didn't just insert a space */ if (arrow_used) { s->inserted_space = false; } if (can_cindent && cindent_on() && ctrl_x_mode == 0) { insert_do_cindent(s); } if (!revins_legal) { revins_scol = -1; // reset on illegal motions } else { revins_legal = 0; } if (arrow_used) { // don't repeat insert when arrow key used s->count = 0; } if (update_Insstart_orig) { Insstart_orig = Insstart; } if (stop_insert_mode && !pum_visible()) { // ":stopinsert" used or 'insertmode' reset s->count = 0; return 0; // exit insert mode } // set curwin->w_curswant for next K_DOWN or K_UP if (!arrow_used) { curwin->w_set_curswant = true; } // If there is no typeahead may check for timestamps (e.g., for when a // menu invoked a shell command). if (stuff_empty()) { did_check_timestamps = false; if (need_check_timestamps) { check_timestamps(false); } } // When emsg() was called msg_scroll will have been set. msg_scroll = false; // Open fold at the cursor line, according to 'foldopen'. if (fdo_flags & FDO_INSERT) { foldOpenCursor(); } // Close folds where the cursor isn't, according to 'foldclose' if (!char_avail()) { foldCheckClose(); } // If we inserted a character at the last position of the last line in the // window, scroll the window one line up. This avoids an extra redraw. This // is detected when the cursor column is smaller after inserting something. // Don't do this when the topline changed already, it has already been // adjusted (by insertchar() calling open_line())). if (curbuf->b_mod_set && curwin->w_p_wrap && !s->did_backspace && curwin->w_topline == s->old_topline && curwin->w_topfill == s->old_topfill) { s->mincol = curwin->w_wcol; validate_cursor_col(); if (curwin->w_wcol < s->mincol - curbuf->b_p_ts && curwin->w_wrow == curwin->w_winrow + curwin->w_height - 1 - p_so && (curwin->w_cursor.lnum != curwin->w_topline || curwin->w_topfill > 0)) { if (curwin->w_topfill > 0) { --curwin->w_topfill; } else if (hasFolding(curwin->w_topline, NULL, &s->old_topline)) { set_topline(curwin, s->old_topline + 1); } else { set_topline(curwin, curwin->w_topline + 1); } } } // May need to adjust w_topline to show the cursor. update_topline(); s->did_backspace = false; validate_cursor(); // may set must_redraw // Redraw the display when no characters are waiting. // Also shows mode, ruler and positions cursor. ins_redraw(true); if (curwin->w_p_scb) { do_check_scrollbind(true); } if (curwin->w_p_crb) { do_check_cursorbind(); } update_curswant(); s->old_topline = curwin->w_topline; s->old_topfill = curwin->w_topfill; s->lastc = s->c; // remember previous char for CTRL-D // After using CTRL-G U the next cursor key will not break undo. if (dont_sync_undo == MAYBE) { dont_sync_undo = true; } else { dont_sync_undo = false; } return 1; } static int insert_execute(VimState *state, int key) { if (key == K_IGNORE) { return -1; // get another key } InsertState *s = (InsertState *)state; s->c = key; // Don't want K_EVENT with cursorhold for the second key, e.g., after CTRL-V. did_cursorhold = true; if (p_hkmap && KeyTyped) { s->c = hkmap(s->c); // Hebrew mode mapping } if (p_fkmap && KeyTyped) { s->c = fkmap(s->c); // Farsi mode mapping } // Special handling of keys while the popup menu is visible or wanted // and the cursor is still in the completed word. Only when there is // a match, skip this when no matches were found. if (compl_started && pum_wanted() && curwin->w_cursor.col >= compl_col && (compl_shown_match == NULL || compl_shown_match != compl_shown_match->cp_next)) { // BS: Delete one character from "compl_leader". if ((s->c == K_BS || s->c == Ctrl_H) && curwin->w_cursor.col > compl_col && (s->c = ins_compl_bs()) == NUL) { return 1; // continue } // When no match was selected or it was edited. if (!compl_used_match) { // CTRL-L: Add one character from the current match to // "compl_leader". Except when at the original match and // there is nothing to add, CTRL-L works like CTRL-P then. if (s->c == Ctrl_L && (!CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode) || (int)STRLEN(compl_shown_match->cp_str) > curwin->w_cursor.col - compl_col)) { ins_compl_addfrommatch(); return 1; // continue } // A non-white character that fits in with the current // completion: Add to "compl_leader". if (ins_compl_accept_char(s->c)) { // Trigger InsertCharPre. char_u *str = do_insert_char_pre(s->c); char_u *p; if (str != NULL) { for (p = str; *p != NUL; mb_ptr_adv(p)) { ins_compl_addleader(PTR2CHAR(p)); } xfree(str); } else { ins_compl_addleader(s->c); } return 1; // continue } // Pressing CTRL-Y selects the current match. When // compl_enter_selects is set the Enter key does the same. if ((s->c == Ctrl_Y || (compl_enter_selects && (s->c == CAR || s->c == K_KENTER || s->c == NL))) && stop_arrow() == OK) { ins_compl_delete(); ins_compl_insert(false); } } } // Prepare for or stop CTRL-X mode. This doesn't do completion, but it does // fix up the text when finishing completion. compl_get_longest = false; if (ins_compl_prep(s->c)) { return 1; // continue } // CTRL-\ CTRL-N goes to Normal mode, // CTRL-\ CTRL-G goes to mode selected with 'insertmode', // CTRL-\ CTRL-O is like CTRL-O but without moving the cursor if (s->c == Ctrl_BSL) { // may need to redraw when no more chars available now ins_redraw(false); no_mapping++; s->c = plain_vgetc(); no_mapping--; if (s->c != Ctrl_N && s->c != Ctrl_G && s->c != Ctrl_O) { // it's something else vungetc(s->c); s->c = Ctrl_BSL; } else if (s->c == Ctrl_G && p_im) { return 1; // continue } else { if (s->c == Ctrl_O) { ins_ctrl_o(); ins_at_eol = false; // cursor keeps its column s->nomove = true; } s->count = 0; return 0; } } s->c = do_digraph(s->c); if ((s->c == Ctrl_V || s->c == Ctrl_Q) && ctrl_x_mode == CTRL_X_CMDLINE) { insert_do_complete(s); return 1; } if (s->c == Ctrl_V || s->c == Ctrl_Q) { ins_ctrl_v(); s->c = Ctrl_V; // pretend CTRL-V is last typed character return 1; // continue } if (cindent_on() && ctrl_x_mode == 0) { // A key name preceded by a bang means this key is not to be // inserted. Skip ahead to the re-indenting below. // A key name preceded by a star means that indenting has to be // done before inserting the key. s->line_is_white = inindent(0); if (in_cinkeys(s->c, '!', s->line_is_white)) { insert_do_cindent(s); return 1; // continue } if (can_cindent && in_cinkeys(s->c, '*', s->line_is_white) && stop_arrow() == OK) { do_c_expr_indent(); } } if (curwin->w_p_rl) switch (s->c) { case K_LEFT: s->c = K_RIGHT; break; case K_S_LEFT: s->c = K_S_RIGHT; break; case K_C_LEFT: s->c = K_C_RIGHT; break; case K_RIGHT: s->c = K_LEFT; break; case K_S_RIGHT: s->c = K_S_LEFT; break; case K_C_RIGHT: s->c = K_C_LEFT; break; } // If 'keymodel' contains "startsel", may start selection. If it // does, a CTRL-O and c will be stuffed, we need to get these // characters. if (ins_start_select(s->c)) { return 1; // continue } return insert_handle_key(s); } static int insert_handle_key(InsertState *s) { // The big switch to handle a character in insert mode. // TODO(tarruda): This could look better if a lookup table is used. // (similar to normal mode `nv_cmds[]`) switch (s->c) { case ESC: // End input mode if (echeck_abbr(ESC + ABBR_OFF)) { break; } // FALLTHROUGH case Ctrl_C: // End input mode if (s->c == Ctrl_C && cmdwin_type != 0) { // Close the cmdline window. */ cmdwin_result = K_IGNORE; got_int = false; // don't stop executing autocommands et al s->nomove = true; return 0; // exit insert mode } // when 'insertmode' set, and not halfway through a mapping, don't leave // Insert mode if (goto_im()) { if (got_int) { (void)vgetc(); // flush all buffers got_int = false; } else { vim_beep(BO_IM); } break; } return 0; // exit insert mode case Ctrl_Z: // suspend when 'insertmode' set if (!p_im) { goto normalchar; // insert CTRL-Z as normal char } do_cmdline_cmd("stop"); ui_cursor_shape(); // may need to update cursor shape break; case Ctrl_O: // execute one command if (ctrl_x_mode == CTRL_X_OMNI) { insert_do_complete(s); break; } if (echeck_abbr(Ctrl_O + ABBR_OFF)) { break; } ins_ctrl_o(); // don't move the cursor left when 'virtualedit' has "onemore". if (ve_flags & VE_ONEMORE) { ins_at_eol = false; s->nomove = true; } s->count = 0; return 0; // exit insert mode case K_INS: // toggle insert/replace mode case K_KINS: ins_insert(s->replaceState); break; case K_SELECT: // end of Select mode mapping - ignore break; case K_HELP: // Help key works like case K_F1: case K_XF1: stuffcharReadbuff(K_HELP); if (p_im) { need_start_insertmode = true; } return 0; // exit insert mode case ' ': if (mod_mask != 4) { goto normalchar; } // FALLTHROUGH case K_ZERO: // Insert the previously inserted text. case NUL: case Ctrl_A: // For ^@ the trailing ESC will end the insert, unless there is an // error. if (stuff_inserted(NUL, 1L, (s->c == Ctrl_A)) == FAIL && s->c != Ctrl_A && !p_im) { return 0; // exit insert mode } s->inserted_space = false; break; case Ctrl_R: // insert the contents of a register ins_reg(); auto_format(false, true); s->inserted_space = false; break; case Ctrl_G: // commands starting with CTRL-G ins_ctrl_g(); break; case Ctrl_HAT: // switch input mode and/or langmap ins_ctrl_hat(); break; case Ctrl__: // switch between languages if (!p_ari) { goto normalchar; } ins_ctrl_(); break; case Ctrl_D: // Make indent one shiftwidth smaller. if (ctrl_x_mode == CTRL_X_PATH_DEFINES) { insert_do_complete(s); break; } // FALLTHROUGH case Ctrl_T: // Make indent one shiftwidth greater. if (s->c == Ctrl_T && ctrl_x_mode == CTRL_X_THESAURUS) { if (check_compl_option(false)) { insert_do_complete(s); } break; } ins_shift(s->c, s->lastc); auto_format(false, true); s->inserted_space = false; break; case K_DEL: // delete character under the cursor case K_KDEL: ins_del(); auto_format(false, true); break; case K_BS: // delete character before the cursor case Ctrl_H: s->did_backspace = ins_bs(s->c, BACKSPACE_CHAR, &s->inserted_space); auto_format(false, true); break; case Ctrl_W: // delete word before the cursor s->did_backspace = ins_bs(s->c, BACKSPACE_WORD, &s->inserted_space); auto_format(false, true); break; case Ctrl_U: // delete all inserted text in current line // CTRL-X CTRL-U completes with 'completefunc'. if (ctrl_x_mode == CTRL_X_FUNCTION) { insert_do_complete(s); } else { s->did_backspace = ins_bs(s->c, BACKSPACE_LINE, &s->inserted_space); auto_format(false, true); s->inserted_space = false; } break; case K_LEFTMOUSE: // mouse keys case K_LEFTMOUSE_NM: case K_LEFTDRAG: case K_LEFTRELEASE: case K_LEFTRELEASE_NM: case K_MIDDLEMOUSE: case K_MIDDLEDRAG: case K_MIDDLERELEASE: case K_RIGHTMOUSE: case K_RIGHTDRAG: case K_RIGHTRELEASE: case K_X1MOUSE: case K_X1DRAG: case K_X1RELEASE: case K_X2MOUSE: case K_X2DRAG: case K_X2RELEASE: ins_mouse(s->c); break; case K_MOUSEDOWN: // Default action for scroll wheel up: scroll up ins_mousescroll(MSCR_DOWN); break; case K_MOUSEUP: // Default action for scroll wheel down: scroll down ins_mousescroll(MSCR_UP); break; case K_MOUSELEFT: // Scroll wheel left ins_mousescroll(MSCR_LEFT); break; case K_MOUSERIGHT: // Scroll wheel right ins_mousescroll(MSCR_RIGHT); break; case K_IGNORE: // Something mapped to nothing break; case K_EVENT: // some event multiqueue_process_events(main_loop.events); break; case K_HOME: // case K_KHOME: case K_S_HOME: case K_C_HOME: ins_home(s->c); break; case K_END: // case K_KEND: case K_S_END: case K_C_END: ins_end(s->c); break; case K_LEFT: // if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL)) { ins_s_left(); } else { ins_left(dont_sync_undo == false); } break; case K_S_LEFT: // case K_C_LEFT: ins_s_left(); break; case K_RIGHT: // if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL)) { ins_s_right(); } else { ins_right(dont_sync_undo == false); } break; case K_S_RIGHT: // case K_C_RIGHT: ins_s_right(); break; case K_UP: // if (pum_visible()) { insert_do_complete(s); } else if (mod_mask & MOD_MASK_SHIFT) { ins_pageup(); } else { ins_up(false); } break; case K_S_UP: // case K_PAGEUP: case K_KPAGEUP: if (pum_visible()) { insert_do_complete(s); } else { ins_pageup(); } break; case K_DOWN: // if (pum_visible()) { insert_do_complete(s); } else if (mod_mask & MOD_MASK_SHIFT) { ins_pagedown(); } else { ins_down(false); } break; case K_S_DOWN: // case K_PAGEDOWN: case K_KPAGEDOWN: if (pum_visible()) { insert_do_complete(s); } else { ins_pagedown(); } break; case K_S_TAB: // When not mapped, use like a normal TAB s->c = TAB; // FALLTHROUGH case TAB: // TAB or Complete patterns along path if (ctrl_x_mode == CTRL_X_PATH_PATTERNS) { insert_do_complete(s); break; } s->inserted_space = false; if (ins_tab()) { goto normalchar; // insert TAB as a normal char } auto_format(false, true); break; case K_KENTER: // s->c = CAR; // FALLTHROUGH case CAR: case NL: // In a quickfix window a jumps to the error under the // cursor. if (bt_quickfix(curbuf) && s->c == CAR) { if (curwin->w_llist_ref == NULL) { // quickfix window do_cmdline_cmd(".cc"); } else { // location list window do_cmdline_cmd(".ll"); } break; } if (cmdwin_type != 0) { // Execute the command in the cmdline window. cmdwin_result = CAR; return 0; } if (ins_eol(s->c) && !p_im) { return 0; // out of memory } auto_format(false, false); s->inserted_space = false; break; case Ctrl_K: // digraph or keyword completion if (ctrl_x_mode == CTRL_X_DICTIONARY) { if (check_compl_option(true)) { insert_do_complete(s); } break; } s->c = ins_digraph(); if (s->c == NUL) { break; } goto normalchar; case Ctrl_X: // Enter CTRL-X mode ins_ctrl_x(); break; case Ctrl_RSB: // Tag name completion after ^X if (ctrl_x_mode != CTRL_X_TAGS) { goto normalchar; } else { insert_do_complete(s); } break; case Ctrl_F: // File name completion after ^X if (ctrl_x_mode != CTRL_X_FILES) { goto normalchar; } else { insert_do_complete(s); } break; case 's': // Spelling completion after ^X case Ctrl_S: if (ctrl_x_mode != CTRL_X_SPELL) { goto normalchar; } else { insert_do_complete(s); } break; case Ctrl_L: // Whole line completion after ^X if (ctrl_x_mode != CTRL_X_WHOLE_LINE) { // CTRL-L with 'insertmode' set: Leave Insert mode if (p_im) { if (echeck_abbr(Ctrl_L + ABBR_OFF)) { break; } return 0; // exit insert mode } goto normalchar; } // FALLTHROUGH case Ctrl_P: // Do previous/next pattern completion case Ctrl_N: // if 'complete' is empty then plain ^P is no longer special, // but it is under other ^X modes if (*curbuf->b_p_cpt == NUL && ctrl_x_mode != 0 && !(compl_cont_status & CONT_LOCAL)) { goto normalchar; } insert_do_complete(s); break; case Ctrl_Y: // copy from previous line or scroll down case Ctrl_E: // copy from next line or scroll up s->c = ins_ctrl_ey(s->c); break; default: normalchar: // Insert a normal character. if (!p_paste) { // Trigger InsertCharPre. char_u *str = do_insert_char_pre(s->c); char_u *p; if (str != NULL) { if (*str != NUL && stop_arrow() != FAIL) { // Insert the new value of v:char literally. for (p = str; *p != NUL; mb_ptr_adv(p)) { s->c = PTR2CHAR(p); if (s->c == CAR || s->c == K_KENTER || s->c == NL) { ins_eol(s->c); } else { ins_char(s->c); } } AppendToRedobuffLit(str, -1); } xfree(str); s->c = NUL; } // If the new value is already inserted or an empty string // then don't insert any character. if (s->c == NUL) break; } // Try to perform smart-indenting. ins_try_si(s->c); if (s->c == ' ') { s->inserted_space = true; if (inindent(0)) { can_cindent = false; } if (Insstart_blank_vcol == MAXCOL && curwin->w_cursor.lnum == Insstart.lnum) { Insstart_blank_vcol = get_nolist_virtcol(); } } // Insert a normal character and check for abbreviations on a // special character. Let CTRL-] expand abbreviations without // inserting it. if (vim_iswordc(s->c) || (!echeck_abbr( // Add ABBR_OFF for characters above 0x100, this is // what check_abbr() expects. (has_mbyte && s->c >= 0x100) ? (s->c + ABBR_OFF) : s->c) && s->c != Ctrl_RSB)) { insert_special(s->c, false, false); revins_legal++; revins_chars++; } auto_format(false, true); // When inserting a character the cursor line must never be in a // closed fold. foldOpenCursor(); break; } // end of switch (s->c) return 1; // continue } static void insert_do_complete(InsertState *s) { compl_busy = true; if (ins_complete(s->c, true) == FAIL) { compl_cont_status = 0; } compl_busy = false; } static void insert_do_cindent(InsertState *s) { // Indent now if a key was typed that is in 'cinkeys'. if (in_cinkeys(s->c, ' ', s->line_is_white)) { if (stop_arrow() == OK) { // re-indent the current line do_c_expr_indent(); } } } /// edit(): Start inserting text. /// /// "cmdchar" can be: /// 'i' normal insert command /// 'a' normal append command /// 'R' replace command /// 'r' "r" command: insert one . /// Note: count can be > 1, for redo, but still only one is inserted. /// is not used for redo. /// 'g' "gI" command. /// 'V' "gR" command for Virtual Replace mode. /// 'v' "gr" command for single character Virtual Replace mode. /// /// This function is not called recursively. For CTRL-O commands, it returns /// and lets the caller handle the Normal-mode command. /// /// @param cmdchar command that started the insert /// @param startln if true, insert at start of line /// @param count repeat count for the command /// /// @return true if a CTRL-O command caused the return (insert mode pending). bool edit(int cmdchar, bool startln, long count) { if (curbuf->terminal) { if (ex_normal_busy) { // Do not enter terminal mode from ex_normal(), which would cause havoc // (such as terminal-mode recursiveness). Instead set a flag to force-set // the value of `restart_edit` before `ex_normal` returns. restart_edit = 'i'; force_restart_edit = true; } else { terminal_enter(); } return false; } // Don't allow inserting in the sandbox. if (sandbox != 0) { EMSG(_(e_sandbox)); return false; } // Don't allow changes in the buffer while editing the cmdline. The // caller of getcmdline() may get confused. if (textlock != 0) { EMSG(_(e_secure)); return false; } // Don't allow recursive insert mode when busy with completion. if (compl_started || compl_busy || pum_visible()) { EMSG(_(e_secure)); return false; } InsertState state, *s = &state; memset(s, 0, sizeof(InsertState)); s->state.execute = insert_execute; s->state.check = insert_check; s->cmdchar = cmdchar; s->startln = startln; s->count = count; insert_enter(s); return s->c == Ctrl_O; } /* * Redraw for Insert mode. * This is postponed until getting the next character to make '$' in the 'cpo' * option work correctly. * Only redraw when there are no characters available. This speeds up * inserting sequences of characters (e.g., for CTRL-R). */ static void ins_redraw ( int ready /* not busy with something */ ) { linenr_T conceal_old_cursor_line = 0; linenr_T conceal_new_cursor_line = 0; int conceal_update_lines = FALSE; if (char_avail()) return; // Trigger CursorMoved if the cursor moved. Not when the popup menu is // visible, the command might delete it. if (ready && (has_event(EVENT_CURSORMOVEDI) || curwin->w_p_cole > 0) && !equalpos(last_cursormoved, curwin->w_cursor) && !pum_visible()) { // Need to update the screen first, to make sure syntax // highlighting is correct after making a change (e.g., inserting // a "(". The autocommand may also require a redraw, so it's done // again below, unfortunately. if (syntax_present(curwin) && must_redraw) { update_screen(0); } if (has_event(EVENT_CURSORMOVEDI)) { // Make sure curswant is correct, an autocommand may call // getcurpos() update_curswant(); apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, false, curbuf); } if (curwin->w_p_cole > 0) { conceal_old_cursor_line = last_cursormoved.lnum; conceal_new_cursor_line = curwin->w_cursor.lnum; conceal_update_lines = TRUE; } last_cursormoved = curwin->w_cursor; } // Trigger TextChangedI if b_changedtick differs. if (ready && has_event(EVENT_TEXTCHANGEDI) && last_changedtick != curbuf->b_changedtick && !pum_visible()) { if (last_changedtick_buf == curbuf) { apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, false, curbuf); } last_changedtick_buf = curbuf; last_changedtick = curbuf->b_changedtick; } if (must_redraw) update_screen(0); else if (clear_cmdline || redraw_cmdline) showmode(); /* clear cmdline and show mode */ if ((conceal_update_lines && (conceal_old_cursor_line != conceal_new_cursor_line || conceal_cursor_line(curwin))) || need_cursor_line_redraw) { if (conceal_old_cursor_line != conceal_new_cursor_line) update_single_line(curwin, conceal_old_cursor_line); update_single_line(curwin, conceal_new_cursor_line == 0 ? curwin->w_cursor.lnum : conceal_new_cursor_line); curwin->w_valid &= ~VALID_CROW; } showruler(FALSE); setcursor(); emsg_on_display = FALSE; /* may remove error message now */ } /* * Handle a CTRL-V or CTRL-Q typed in Insert mode. */ static void ins_ctrl_v(void) { int c; int did_putchar = FALSE; /* may need to redraw when no more chars available now */ ins_redraw(FALSE); if (redrawing() && !char_avail()) { edit_putchar('^', TRUE); did_putchar = TRUE; } AppendToRedobuff(CTRL_V_STR); add_to_showcmd_c(Ctrl_V); c = get_literal(); if (did_putchar) /* when the line fits in 'columns' the '^' is at the start of the next * line and will not removed by the redraw */ edit_unputchar(); clear_showcmd(); insert_special(c, FALSE, TRUE); revins_chars++; revins_legal++; } /* * Put a character directly onto the screen. It's not stored in a buffer. * Used while handling CTRL-K, CTRL-V, etc. in Insert mode. */ static int pc_status; #define PC_STATUS_UNSET 0 /* pc_bytes was not set */ #define PC_STATUS_RIGHT 1 /* right halve of double-wide char */ #define PC_STATUS_LEFT 2 /* left halve of double-wide char */ #define PC_STATUS_SET 3 /* pc_bytes was filled */ static char_u pc_bytes[MB_MAXBYTES + 1]; /* saved bytes */ static int pc_attr; static int pc_row; static int pc_col; void edit_putchar(int c, int highlight) { int attr; if (ScreenLines != NULL) { update_topline(); /* just in case w_topline isn't valid */ validate_cursor(); if (highlight) attr = hl_attr(HLF_8); else attr = 0; pc_row = curwin->w_winrow + curwin->w_wrow; pc_col = curwin->w_wincol; pc_status = PC_STATUS_UNSET; if (curwin->w_p_rl) { pc_col += curwin->w_width - 1 - curwin->w_wcol; if (has_mbyte) { int fix_col = mb_fix_col(pc_col, pc_row); if (fix_col != pc_col) { screen_putchar(' ', pc_row, fix_col, attr); --curwin->w_wcol; pc_status = PC_STATUS_RIGHT; } } } else { pc_col += curwin->w_wcol; if (mb_lefthalve(pc_row, pc_col)) pc_status = PC_STATUS_LEFT; } /* save the character to be able to put it back */ if (pc_status == PC_STATUS_UNSET) { screen_getbytes(pc_row, pc_col, pc_bytes, &pc_attr); pc_status = PC_STATUS_SET; } screen_putchar(c, pc_row, pc_col, attr); } } /* * Undo the previous edit_putchar(). */ void edit_unputchar(void) { if (pc_status != PC_STATUS_UNSET && pc_row >= msg_scrolled) { if (pc_status == PC_STATUS_RIGHT) ++curwin->w_wcol; if (pc_status == PC_STATUS_RIGHT || pc_status == PC_STATUS_LEFT) redrawWinline(curwin->w_cursor.lnum, FALSE); else screen_puts(pc_bytes, pc_row - msg_scrolled, pc_col, pc_attr); } } /* * Called when p_dollar is set: display a '$' at the end of the changed text * Only works when cursor is in the line that changes. */ void display_dollar(colnr_T col) { colnr_T save_col; if (!redrawing()) return; save_col = curwin->w_cursor.col; curwin->w_cursor.col = col; if (has_mbyte) { char_u *p; /* If on the last byte of a multi-byte move to the first byte. */ p = get_cursor_line_ptr(); curwin->w_cursor.col -= (*mb_head_off)(p, p + col); } curs_columns(FALSE); /* recompute w_wrow and w_wcol */ if (curwin->w_wcol < curwin->w_width) { edit_putchar('$', FALSE); dollar_vcol = curwin->w_virtcol; } curwin->w_cursor.col = save_col; } /* * Call this function before moving the cursor from the normal insert position * in insert mode. */ static void undisplay_dollar(void) { if (dollar_vcol >= 0) { dollar_vcol = -1; redrawWinline(curwin->w_cursor.lnum, FALSE); } } /* * Insert an indent (for or CTRL-T) or delete an indent (for CTRL-D). * Keep the cursor on the same character. * type == INDENT_INC increase indent (for CTRL-T or ) * type == INDENT_DEC decrease indent (for CTRL-D) * type == INDENT_SET set indent to "amount" * if round is TRUE, round the indent to 'shiftwidth' (only with _INC and _Dec). */ void change_indent ( int type, int amount, int round, int replaced, /* replaced character, put on replace stack */ int call_changed_bytes /* call changed_bytes() */ ) { int vcol; int last_vcol; int insstart_less; /* reduction for Insstart.col */ int new_cursor_col; int i; char_u *ptr; int save_p_list; int start_col; colnr_T vc; colnr_T orig_col = 0; /* init for GCC */ char_u *new_line, *orig_line = NULL; /* init for GCC */ /* VREPLACE mode needs to know what the line was like before changing */ if (State & VREPLACE_FLAG) { orig_line = vim_strsave(get_cursor_line_ptr()); /* Deal with NULL below */ orig_col = curwin->w_cursor.col; } /* for the following tricks we don't want list mode */ save_p_list = curwin->w_p_list; curwin->w_p_list = FALSE; vc = getvcol_nolist(&curwin->w_cursor); vcol = vc; /* * For Replace mode we need to fix the replace stack later, which is only * possible when the cursor is in the indent. Remember the number of * characters before the cursor if it's possible. */ start_col = curwin->w_cursor.col; /* determine offset from first non-blank */ new_cursor_col = curwin->w_cursor.col; beginline(BL_WHITE); new_cursor_col -= curwin->w_cursor.col; insstart_less = curwin->w_cursor.col; /* * If the cursor is in the indent, compute how many screen columns the * cursor is to the left of the first non-blank. */ if (new_cursor_col < 0) vcol = get_indent() - vcol; if (new_cursor_col > 0) /* can't fix replace stack */ start_col = -1; /* * Set the new indent. The cursor will be put on the first non-blank. */ if (type == INDENT_SET) (void)set_indent(amount, call_changed_bytes ? SIN_CHANGED : 0); else { int save_State = State; /* Avoid being called recursively. */ if (State & VREPLACE_FLAG) State = INSERT; shift_line(type == INDENT_DEC, round, 1, call_changed_bytes); State = save_State; } insstart_less -= curwin->w_cursor.col; /* * Try to put cursor on same character. * If the cursor is at or after the first non-blank in the line, * compute the cursor column relative to the column of the first * non-blank character. * If we are not in insert mode, leave the cursor on the first non-blank. * If the cursor is before the first non-blank, position it relative * to the first non-blank, counted in screen columns. */ if (new_cursor_col >= 0) { /* * When changing the indent while the cursor is touching it, reset * Insstart_col to 0. */ if (new_cursor_col == 0) insstart_less = MAXCOL; new_cursor_col += curwin->w_cursor.col; } else if (!(State & INSERT)) new_cursor_col = curwin->w_cursor.col; else { /* * Compute the screen column where the cursor should be. */ vcol = get_indent() - vcol; curwin->w_virtcol = (colnr_T)((vcol < 0) ? 0 : vcol); /* * Advance the cursor until we reach the right screen column. */ vcol = last_vcol = 0; new_cursor_col = -1; ptr = get_cursor_line_ptr(); while (vcol <= (int)curwin->w_virtcol) { last_vcol = vcol; if (has_mbyte && new_cursor_col >= 0) new_cursor_col += (*mb_ptr2len)(ptr + new_cursor_col); else ++new_cursor_col; vcol += lbr_chartabsize(ptr, ptr + new_cursor_col, (colnr_T)vcol); } vcol = last_vcol; /* * May need to insert spaces to be able to position the cursor on * the right screen column. */ if (vcol != (int)curwin->w_virtcol) { curwin->w_cursor.col = (colnr_T)new_cursor_col; i = (int)curwin->w_virtcol - vcol; ptr = xmallocz(i); memset(ptr, ' ', i); new_cursor_col += i; ins_str(ptr); xfree(ptr); } /* * When changing the indent while the cursor is in it, reset * Insstart_col to 0. */ insstart_less = MAXCOL; } curwin->w_p_list = save_p_list; if (new_cursor_col <= 0) curwin->w_cursor.col = 0; else curwin->w_cursor.col = (colnr_T)new_cursor_col; curwin->w_set_curswant = TRUE; changed_cline_bef_curs(); /* * May have to adjust the start of the insert. */ if (State & INSERT) { if (curwin->w_cursor.lnum == Insstart.lnum && Insstart.col != 0) { if ((int)Insstart.col <= insstart_less) Insstart.col = 0; else Insstart.col -= insstart_less; } if ((int)ai_col <= insstart_less) ai_col = 0; else ai_col -= insstart_less; } /* * For REPLACE mode, may have to fix the replace stack, if it's possible. * If the number of characters before the cursor decreased, need to pop a * few characters from the replace stack. * If the number of characters before the cursor increased, need to push a * few NULs onto the replace stack. */ if (REPLACE_NORMAL(State) && start_col >= 0) { while (start_col > (int)curwin->w_cursor.col) { replace_join(0); /* remove a NUL from the replace stack */ --start_col; } while (start_col < (int)curwin->w_cursor.col || replaced) { replace_push(NUL); if (replaced) { replace_push(replaced); replaced = NUL; } ++start_col; } } /* * For VREPLACE mode, we also have to fix the replace stack. In this case * it is always possible because we backspace over the whole line and then * put it back again the way we wanted it. */ if (State & VREPLACE_FLAG) { /* Save new line */ new_line = vim_strsave(get_cursor_line_ptr()); /* We only put back the new line up to the cursor */ new_line[curwin->w_cursor.col] = NUL; /* Put back original line */ ml_replace(curwin->w_cursor.lnum, orig_line, FALSE); curwin->w_cursor.col = orig_col; /* Backspace from cursor to start of line */ backspace_until_column(0); /* Insert new stuff into line again */ ins_bytes(new_line); xfree(new_line); } } /* * Truncate the space at the end of a line. This is to be used only in an * insert mode. It handles fixing the replace stack for REPLACE and VREPLACE * modes. */ void truncate_spaces(char_u *line) { int i; /* find start of trailing white space */ for (i = (int)STRLEN(line) - 1; i >= 0 && ascii_iswhite(line[i]); i--) { if (State & REPLACE_FLAG) replace_join(0); /* remove a NUL from the replace stack */ } line[i + 1] = NUL; } /* * Backspace the cursor until the given column. Handles REPLACE and VREPLACE * modes correctly. May also be used when not in insert mode at all. * Will attempt not to go before "col" even when there is a composing * character. */ void backspace_until_column(int col) { while ((int)curwin->w_cursor.col > col) { curwin->w_cursor.col--; if (State & REPLACE_FLAG) replace_do_bs(col); else if (!del_char_after_col(col)) break; } } /// Like del_char(), but make sure not to go before column "limit_col". /// Only matters when there are composing characters. /// /// @param limit_col only delete the character if it is after this column // /// @return true when something was deleted. static bool del_char_after_col(int limit_col) { if (enc_utf8 && limit_col >= 0) { colnr_T ecol = curwin->w_cursor.col + 1; // Make sure the cursor is at the start of a character, but // skip forward again when going too far back because of a // composing character. mb_adjust_cursor(); while (curwin->w_cursor.col < (colnr_T)limit_col) { int l = utf_ptr2len(get_cursor_pos_ptr()); if (l == 0) { // end of line break; } curwin->w_cursor.col += l; } if (*get_cursor_pos_ptr() == NUL || curwin->w_cursor.col == ecol) { return false; } del_bytes(ecol - curwin->w_cursor.col, false, true); } else { del_char(false); } return true; } /* * CTRL-X pressed in Insert mode. */ static void ins_ctrl_x(void) { /* CTRL-X after CTRL-X CTRL-V doesn't do anything, so that CTRL-X * CTRL-V works like CTRL-N */ if (ctrl_x_mode != CTRL_X_CMDLINE) { /* if the next ^X<> won't ADD nothing, then reset * compl_cont_status */ if (compl_cont_status & CONT_N_ADDS) compl_cont_status |= CONT_INTRPT; else compl_cont_status = 0; /* We're not sure which CTRL-X mode it will be yet */ ctrl_x_mode = CTRL_X_NOT_DEFINED_YET; edit_submode = (char_u *)_(CTRL_X_MSG(ctrl_x_mode)); edit_submode_pre = NULL; showmode(); } } /// Check that the "dict" or "tsr" option can be used. /// /// @param dict_opt check "dict" when true, "tsr" when false. static bool check_compl_option(bool dict_opt) { if (dict_opt ? (*curbuf->b_p_dict == NUL && *p_dict == NUL && !curwin->w_p_spell) : (*curbuf->b_p_tsr == NUL && *p_tsr == NUL)) { ctrl_x_mode = 0; edit_submode = NULL; msg_attr((dict_opt ? _("'dictionary' option is empty") : _("'thesaurus' option is empty")), hl_attr(HLF_E)); if (emsg_silent == 0) { vim_beep(BO_COMPL); setcursor(); ui_flush(); os_delay(2000L, false); } return false; } return true; } /// Check that the character "c" a valid key to go to or keep us in CTRL-X mode? /// This depends on the current mode. /// /// @param c character to check bool vim_is_ctrl_x_key(int c) FUNC_ATTR_WARN_UNUSED_RESULT { // Always allow ^R - let its results then be checked if (c == Ctrl_R) { return true; } // Accept and if the popup menu is visible. if (ins_compl_pum_key(c)) { return true; } switch (ctrl_x_mode) { case 0: // Not in any CTRL-X mode return c == Ctrl_N || c == Ctrl_P || c == Ctrl_X; case CTRL_X_NOT_DEFINED_YET: return c == Ctrl_X || c == Ctrl_Y || c == Ctrl_E || c == Ctrl_L || c == Ctrl_F || c == Ctrl_RSB || c == Ctrl_I || c == Ctrl_D || c == Ctrl_P || c == Ctrl_N || c == Ctrl_T || c == Ctrl_V || c == Ctrl_Q || c == Ctrl_U || c == Ctrl_O || c == Ctrl_S || c == Ctrl_K || c == 's'; case CTRL_X_SCROLL: return c == Ctrl_Y || c == Ctrl_E; case CTRL_X_WHOLE_LINE: return c == Ctrl_L || c == Ctrl_P || c == Ctrl_N; case CTRL_X_FILES: return c == Ctrl_F || c == Ctrl_P || c == Ctrl_N; case CTRL_X_DICTIONARY: return c == Ctrl_K || c == Ctrl_P || c == Ctrl_N; case CTRL_X_THESAURUS: return c == Ctrl_T || c == Ctrl_P || c == Ctrl_N; case CTRL_X_TAGS: return c == Ctrl_RSB || c == Ctrl_P || c == Ctrl_N; case CTRL_X_PATH_PATTERNS: return c == Ctrl_P || c == Ctrl_N; case CTRL_X_PATH_DEFINES: return c == Ctrl_D || c == Ctrl_P || c == Ctrl_N; case CTRL_X_CMDLINE: return c == Ctrl_V || c == Ctrl_Q || c == Ctrl_P || c == Ctrl_N || c == Ctrl_X; case CTRL_X_FUNCTION: return c == Ctrl_U || c == Ctrl_P || c == Ctrl_N; case CTRL_X_OMNI: return c == Ctrl_O || c == Ctrl_P || c == Ctrl_N; case CTRL_X_SPELL: return c == Ctrl_S || c == Ctrl_P || c == Ctrl_N; case CTRL_X_EVAL: return (c == Ctrl_P || c == Ctrl_N); } EMSG(_(e_internal)); return false; } /// Check that character "c" is part of the item currently being /// completed. Used to decide whether to abandon complete mode when the menu /// is visible. /// /// @param c character to check static bool ins_compl_accept_char(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { if (ctrl_x_mode & CTRL_X_WANT_IDENT) { // When expanding an identifier only accept identifier chars. return vim_isIDc(c); } switch (ctrl_x_mode) { case CTRL_X_FILES: // When expanding file name only accept file name chars. But not // path separators, so that "proto/" expands files in // "proto", not "proto/" as a whole return vim_isfilec(c) && !vim_ispathsep(c); case CTRL_X_CMDLINE: case CTRL_X_OMNI: // Command line and Omni completion can work with just about any // printable character, but do stop at white space. return vim_isprintc(c) && !ascii_iswhite(c); case CTRL_X_WHOLE_LINE: // For while line completion a space can be part of the line. return vim_isprintc(c); } return vim_iswordc(c); } /* * This is like ins_compl_add(), but if 'ic' and 'inf' are set, then the * case of the originally typed text is used, and the case of the completed * text is inferred, ie this tries to work out what case you probably wanted * the rest of the word to be in -- webb */ int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname, int dir, int flags) { int i, c; int actual_len; /* Take multi-byte characters */ int actual_compl_length; /* into account. */ int min_len; int *wca; /* Wide character array. */ int has_lower = FALSE; int was_letter = FALSE; if (p_ic && curbuf->b_p_inf && len > 0) { // Infer case of completed part. // Find actual length of completion. if (has_mbyte) { const char_u *p = str; actual_len = 0; while (*p != NUL) { mb_ptr_adv(p); ++actual_len; } } else actual_len = len; /* Find actual length of original text. */ if (has_mbyte) { const char_u *p = compl_orig_text; actual_compl_length = 0; while (*p != NUL) { mb_ptr_adv(p); ++actual_compl_length; } } else actual_compl_length = compl_length; /* "actual_len" may be smaller than "actual_compl_length" when using * thesaurus, only use the minimum when comparing. */ min_len = actual_len < actual_compl_length ? actual_len : actual_compl_length; /* Allocate wide character array for the completion and fill it. */ wca = xmalloc(actual_len * sizeof(*wca)); { const char_u *p = str; for (i = 0; i < actual_len; i++) { if (has_mbyte) { wca[i] = mb_ptr2char_adv(&p); } else { wca[i] = *(p++); } } } // Rule 1: Were any chars converted to lower? { const char_u *p = compl_orig_text; for (i = 0; i < min_len; i++) { if (has_mbyte) { c = mb_ptr2char_adv(&p); } else { c = *(p++); } if (mb_islower(c)) { has_lower = true; if (mb_isupper(wca[i])) { // Rule 1 is satisfied. for (i = actual_compl_length; i < actual_len; i++) { wca[i] = mb_tolower(wca[i]); } break; } } } } /* * Rule 2: No lower case, 2nd consecutive letter converted to * upper case. */ if (!has_lower) { const char_u *p = compl_orig_text; for (i = 0; i < min_len; i++) { if (has_mbyte) { c = mb_ptr2char_adv(&p); } else { c = *(p++); } if (was_letter && mb_isupper(c) && mb_islower(wca[i])) { // Rule 2 is satisfied. for (i = actual_compl_length; i < actual_len; i++) { wca[i] = mb_toupper(wca[i]); } break; } was_letter = mb_islower(c) || mb_isupper(c); } } // Copy the original case of the part we typed. { const char_u *p = compl_orig_text; for (i = 0; i < min_len; i++) { if (has_mbyte) { c = mb_ptr2char_adv(&p); } else { c = *(p++); } if (mb_islower(c)) { wca[i] = mb_tolower(wca[i]); } else if (mb_isupper(c)) { wca[i] = mb_toupper(wca[i]); } } } // Generate encoding specific output from wide character array. // Multi-byte characters can occupy up to five bytes more than // ASCII characters, and we also need one byte for NUL, so stay // six bytes away from the edge of IObuff. { char_u *p = IObuff; i = 0; while (i < actual_len && (p - IObuff + 6) < IOSIZE) { if (has_mbyte) { p += (*mb_char2bytes)(wca[i++], p); } else { *(p++) = wca[i++]; } } *p = NUL; } xfree(wca); return ins_compl_add(IObuff, len, icase, fname, NULL, false, dir, flags, false); } return ins_compl_add(str, len, icase, fname, NULL, false, dir, flags, false); } /// Add a match to the list of matches /// /// @param[in] str Match to add. /// @param[in] len Match length, -1 to use #STRLEN. /// @param[in] icase Whether case is to be ignored. /// @param[in] fname File name match comes from. May be NULL. /// @param[in] cptext Extra text for popup menu. May be NULL. If not NULL, /// must have exactly #CPT_COUNT items. /// @param[in] cptext_allocated If true, will not copy cptext strings. /// /// @note Will free strings in case of error. /// cptext itself will not be freed. /// @param[in] cdir Completion direction. /// @param[in] adup True if duplicate matches are to be accepted. /// /// @return NOTDONE if the given string is already in the list of completions, /// otherwise it is added to the list and OK is returned. FAIL will be /// returned in case of error. static int ins_compl_add(char_u *const str, int len, const bool icase, char_u *const fname, char_u *const *const cptext, const bool cptext_allocated, const Direction cdir, int flags, const bool adup) FUNC_ATTR_NONNULL_ARG(1) { compl_T *match; int dir = (cdir == kDirectionNotSet ? compl_direction : cdir); os_breakcheck(); #define FREE_CPTEXT(cptext, cptext_allocated) \ do { \ if (cptext != NULL && cptext_allocated) { \ for (size_t i = 0; i < CPT_COUNT; i++) { \ xfree(cptext[i]); \ } \ } \ } while (0) if (got_int) { FREE_CPTEXT(cptext, cptext_allocated); return FAIL; } if (len < 0) { len = (int)STRLEN(str); } /* * If the same match is already present, don't add it. */ if (compl_first_match != NULL && !adup) { match = compl_first_match; do { if (!(match->cp_flags & ORIGINAL_TEXT) && STRNCMP(match->cp_str, str, len) == 0 && match->cp_str[len] == NUL) { FREE_CPTEXT(cptext, cptext_allocated); return NOTDONE; } match = match->cp_next; } while (match != NULL && match != compl_first_match); } /* Remove any popup menu before changing the list of matches. */ ins_compl_del_pum(); /* * Allocate a new match structure. * Copy the values to the new match structure. */ match = xcalloc(1, sizeof(compl_T)); match->cp_number = -1; if (flags & ORIGINAL_TEXT) match->cp_number = 0; match->cp_str = vim_strnsave(str, len); match->cp_icase = icase; /* match-fname is: * - compl_curr_match->cp_fname if it is a string equal to fname. * - a copy of fname, FREE_FNAME is set to free later THE allocated mem. * - NULL otherwise. --Acevedo */ if (fname != NULL && compl_curr_match != NULL && compl_curr_match->cp_fname != NULL && STRCMP(fname, compl_curr_match->cp_fname) == 0) match->cp_fname = compl_curr_match->cp_fname; else if (fname != NULL) { match->cp_fname = vim_strsave(fname); flags |= FREE_FNAME; } else { match->cp_fname = NULL; } match->cp_flags = flags; if (cptext != NULL) { int i; for (i = 0; i < CPT_COUNT; i++) { if (cptext[i] == NULL) { continue; } if (*cptext[i] != NUL) { match->cp_text[i] = (cptext_allocated ? cptext[i] : (char_u *)xstrdup((char *)cptext[i])); } else if (cptext_allocated) { xfree(cptext[i]); } } } /* * Link the new match structure in the list of matches. */ if (compl_first_match == NULL) match->cp_next = match->cp_prev = NULL; else if (dir == FORWARD) { match->cp_next = compl_curr_match->cp_next; match->cp_prev = compl_curr_match; } else { /* BACKWARD */ match->cp_next = compl_curr_match; match->cp_prev = compl_curr_match->cp_prev; } if (match->cp_next) match->cp_next->cp_prev = match; if (match->cp_prev) match->cp_prev->cp_next = match; else /* if there's nothing before, it is the first match */ compl_first_match = match; compl_curr_match = match; /* * Find the longest common string if still doing that. */ if (compl_get_longest && (flags & ORIGINAL_TEXT) == 0) ins_compl_longest_match(match); return OK; } /// Check that "str[len]" matches with "match->cp_str", considering /// "match->cp_icase". /// /// @param match completion match /// @param str character string to check /// @param len lenth of "str" static bool ins_compl_equal(compl_T *match, char_u *str, size_t len) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { if (match->cp_icase) { return STRNICMP(match->cp_str, str, len) == 0; } return STRNCMP(match->cp_str, str, len) == 0; } /* * Reduce the longest common string for match "match". */ static void ins_compl_longest_match(compl_T *match) { char_u *p, *s; int c1, c2; int had_match; if (compl_leader == NULL) { /* First match, use it as a whole. */ compl_leader = vim_strsave(match->cp_str); had_match = (curwin->w_cursor.col > compl_col); ins_compl_delete(); ins_bytes(compl_leader + ins_compl_len()); ins_redraw(FALSE); /* When the match isn't there (to avoid matching itself) remove it * again after redrawing. */ if (!had_match) ins_compl_delete(); compl_used_match = FALSE; } else { /* Reduce the text if this match differs from compl_leader. */ p = compl_leader; s = match->cp_str; while (*p != NUL) { if (has_mbyte) { c1 = mb_ptr2char(p); c2 = mb_ptr2char(s); } else { c1 = *p; c2 = *s; } if (match->cp_icase ? (mb_tolower(c1) != mb_tolower(c2)) : (c1 != c2)) { break; } if (has_mbyte) { mb_ptr_adv(p); mb_ptr_adv(s); } else { ++p; ++s; } } if (*p != NUL) { /* Leader was shortened, need to change the inserted text. */ *p = NUL; had_match = (curwin->w_cursor.col > compl_col); ins_compl_delete(); ins_bytes(compl_leader + ins_compl_len()); ins_redraw(FALSE); /* When the match isn't there (to avoid matching itself) remove it * again after redrawing. */ if (!had_match) ins_compl_delete(); } compl_used_match = FALSE; } } /* * Add an array of matches to the list of matches. * Frees matches[]. */ static void ins_compl_add_matches(int num_matches, char_u **matches, int icase) { int i; int add_r = OK; int dir = compl_direction; for (i = 0; i < num_matches && add_r != FAIL; i++) if ((add_r = ins_compl_add(matches[i], -1, icase, NULL, NULL, false, dir, 0, false)) == OK) { // If dir was BACKWARD then honor it just once. dir = FORWARD; } FreeWild(num_matches, matches); } /* Make the completion list cyclic. * Return the number of matches (excluding the original). */ static int ins_compl_make_cyclic(void) { compl_T *match; int count = 0; if (compl_first_match != NULL) { /* * Find the end of the list. */ match = compl_first_match; /* there's always an entry for the compl_orig_text, it doesn't count. */ while (match->cp_next != NULL && match->cp_next != compl_first_match) { match = match->cp_next; ++count; } match->cp_next = compl_first_match; compl_first_match->cp_prev = match; } return count; } // Set variables that store noselect and noinsert behavior from the // 'completeopt' value. void completeopt_was_set(void) { compl_no_insert = false; compl_no_select = false; if (strstr((char *)p_cot, "noselect") != NULL) { compl_no_select = true; } if (strstr((char *)p_cot, "noinsert") != NULL) { compl_no_insert = true; } } /* * Start completion for the complete() function. * "startcol" is where the matched text starts (1 is first column). * "list" is the list of matches. */ void set_completion(colnr_T startcol, list_T *list) { // If already doing completions stop it. if (ctrl_x_mode != 0) { ins_compl_prep(' '); } ins_compl_clear(); ins_compl_free(); compl_direction = FORWARD; if (startcol > curwin->w_cursor.col) startcol = curwin->w_cursor.col; compl_col = startcol; compl_length = (int)curwin->w_cursor.col - (int)startcol; /* compl_pattern doesn't need to be set */ compl_orig_text = vim_strnsave(get_cursor_line_ptr() + compl_col, compl_length); if (ins_compl_add(compl_orig_text, -1, p_ic, NULL, NULL, false, 0, ORIGINAL_TEXT, false) != OK) { return; } ctrl_x_mode = CTRL_X_EVAL; ins_compl_add_list(list); compl_matches = ins_compl_make_cyclic(); compl_started = TRUE; compl_used_match = TRUE; compl_cont_status = 0; int save_w_wrow = curwin->w_wrow; int save_w_leftcol = curwin->w_leftcol; compl_curr_match = compl_first_match; if (compl_no_insert || compl_no_select) { ins_complete(K_DOWN, false); if (compl_no_select) { ins_complete(K_UP, false); } } else { ins_complete(Ctrl_N, false); } compl_enter_selects = compl_no_insert; // Lazily show the popup menu, unless we got interrupted. if (!compl_interrupted) { show_pum(save_w_wrow, save_w_leftcol); } ui_flush(); } /* "compl_match_array" points the currently displayed list of entries in the * popup menu. It is NULL when there is no popup menu. */ static pumitem_T *compl_match_array = NULL; static int compl_match_arraysize; /* * Update the screen and when there is any scrolling remove the popup menu. */ static void ins_compl_upd_pum(void) { int h; if (compl_match_array != NULL) { h = curwin->w_cline_height; update_screen(0); if (h != curwin->w_cline_height) ins_compl_del_pum(); } } /* * Remove any popup menu. */ static void ins_compl_del_pum(void) { if (compl_match_array != NULL) { pum_undisplay(); xfree(compl_match_array); compl_match_array = NULL; } } /// Check if the popup menu should be displayed. static bool pum_wanted(void) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { // "completeopt" must contain "menu" or "menuone" return vim_strchr(p_cot, 'm') != NULL; } /// Check that there are two or more matches to be shown in the popup menu. /// One if "completopt" contains "menuone". static bool pum_enough_matches(void) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { // Don't display the popup menu if there are no matches or there is only // one (ignoring the original text). compl_T *comp = compl_first_match; int i = 0; do { if (comp == NULL || ((comp->cp_flags & ORIGINAL_TEXT) == 0 && ++i == 2)) { break; } comp = comp->cp_next; } while (comp != compl_first_match); if (strstr((char *)p_cot, "menuone") != NULL) { return i >= 1; } return i >= 2; } /* * Show the popup menu for the list of matches. * Also adjusts "compl_shown_match" to an entry that is actually displayed. */ void ins_compl_show_pum(void) { compl_T *compl; compl_T *shown_compl = NULL; int did_find_shown_match = FALSE; int shown_match_ok = FALSE; int i; int cur = -1; colnr_T col; int lead_len = 0; bool array_changed = false; if (!pum_wanted() || !pum_enough_matches()) return; /* Dirty hard-coded hack: remove any matchparen highlighting. */ do_cmdline_cmd("if exists('g:loaded_matchparen')|3match none|endif"); /* Update the screen before drawing the popup menu over it. */ update_screen(0); if (compl_match_array == NULL) { array_changed = true; // Need to build the popup menu list. compl_match_arraysize = 0; compl = compl_first_match; /* * If it's user complete function and refresh_always, * not use "compl_leader" as prefix filter. */ if (ins_compl_need_restart()){ xfree(compl_leader); compl_leader = NULL; } if (compl_leader != NULL) lead_len = (int)STRLEN(compl_leader); do { if ((compl->cp_flags & ORIGINAL_TEXT) == 0 && (compl_leader == NULL || ins_compl_equal(compl, compl_leader, lead_len))) ++compl_match_arraysize; compl = compl->cp_next; } while (compl != NULL && compl != compl_first_match); if (compl_match_arraysize == 0) return; assert(compl_match_arraysize >= 0); compl_match_array = xcalloc(compl_match_arraysize, sizeof(pumitem_T)); /* If the current match is the original text don't find the first * match after it, don't highlight anything. */ if (compl_shown_match->cp_flags & ORIGINAL_TEXT) shown_match_ok = TRUE; i = 0; compl = compl_first_match; do { if ((compl->cp_flags & ORIGINAL_TEXT) == 0 && (compl_leader == NULL || ins_compl_equal(compl, compl_leader, lead_len))) { if (!shown_match_ok) { if (compl == compl_shown_match || did_find_shown_match) { /* This item is the shown match or this is the * first displayed item after the shown match. */ compl_shown_match = compl; did_find_shown_match = TRUE; shown_match_ok = TRUE; } else /* Remember this displayed match for when the * shown match is just below it. */ shown_compl = compl; cur = i; } if (compl->cp_text[CPT_ABBR] != NULL) compl_match_array[i].pum_text = compl->cp_text[CPT_ABBR]; else compl_match_array[i].pum_text = compl->cp_str; compl_match_array[i].pum_kind = compl->cp_text[CPT_KIND]; compl_match_array[i].pum_info = compl->cp_text[CPT_INFO]; if (compl->cp_text[CPT_MENU] != NULL) compl_match_array[i++].pum_extra = compl->cp_text[CPT_MENU]; else compl_match_array[i++].pum_extra = compl->cp_fname; } if (compl == compl_shown_match) { did_find_shown_match = TRUE; /* When the original text is the shown match don't set * compl_shown_match. */ if (compl->cp_flags & ORIGINAL_TEXT) shown_match_ok = TRUE; if (!shown_match_ok && shown_compl != NULL) { /* The shown match isn't displayed, set it to the * previously displayed match. */ compl_shown_match = shown_compl; shown_match_ok = TRUE; } } compl = compl->cp_next; } while (compl != NULL && compl != compl_first_match); if (!shown_match_ok) /* no displayed match at all */ cur = -1; } else { /* popup menu already exists, only need to find the current item.*/ for (i = 0; i < compl_match_arraysize; ++i) if (compl_match_array[i].pum_text == compl_shown_match->cp_str || compl_match_array[i].pum_text == compl_shown_match->cp_text[CPT_ABBR]) { cur = i; break; } } // In Replace mode when a $ is displayed at the end of the line only // part of the screen would be updated. We do need to redraw here. dollar_vcol = -1; // Compute the screen column of the start of the completed text. // Use the cursor to get all wrapping and other settings right. col = curwin->w_cursor.col; curwin->w_cursor.col = compl_col; pum_display(compl_match_array, compl_match_arraysize, cur, array_changed); curwin->w_cursor.col = col; } #define DICT_FIRST (1) /* use just first element in "dict" */ #define DICT_EXACT (2) /* "dict" is the exact name of a file */ /* * Add any identifiers that match the given pattern in the list of dictionary * files "dict_start" to the list of completions. */ static void ins_compl_dictionaries ( char_u *dict_start, char_u *pat, int flags, /* DICT_FIRST and/or DICT_EXACT */ int thesaurus /* Thesaurus completion */ ) { char_u *dict = dict_start; char_u *ptr; char_u *buf; regmatch_T regmatch; char_u **files; int count; int save_p_scs; int dir = compl_direction; if (*dict == NUL) { /* When 'dictionary' is empty and spell checking is enabled use * "spell". */ if (!thesaurus && curwin->w_p_spell) dict = (char_u *)"spell"; else return; } buf = xmalloc(LSIZE); regmatch.regprog = NULL; /* so that we can goto theend */ /* If 'infercase' is set, don't use 'smartcase' here */ save_p_scs = p_scs; if (curbuf->b_p_inf) p_scs = FALSE; /* When invoked to match whole lines for CTRL-X CTRL-L adjust the pattern * to only match at the start of a line. Otherwise just match the * pattern. Also need to double backslashes. */ if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)) { char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\"); size_t len = STRLEN(pat_esc) + 10; ptr = xmalloc(len); vim_snprintf((char *)ptr, len, "^\\s*\\zs\\V%s", pat_esc); regmatch.regprog = vim_regcomp(ptr, RE_MAGIC); xfree(pat_esc); xfree(ptr); } else { regmatch.regprog = vim_regcomp(pat, p_magic ? RE_MAGIC : 0); if (regmatch.regprog == NULL) goto theend; } /* ignore case depends on 'ignorecase', 'smartcase' and "pat" */ regmatch.rm_ic = ignorecase(pat); while (*dict != NUL && !got_int && !compl_interrupted) { /* copy one dictionary file name into buf */ if (flags == DICT_EXACT) { count = 1; files = &dict; } else { /* Expand wildcards in the dictionary name, but do not allow * backticks (for security, the 'dict' option may have been set in * a modeline). */ copy_option_part(&dict, buf, LSIZE, ","); if (!thesaurus && STRCMP(buf, "spell") == 0) count = -1; else if (vim_strchr(buf, '`') != NULL || expand_wildcards(1, &buf, &count, &files, EW_FILE|EW_SILENT) != OK) count = 0; } if (count == -1) { /* Complete from active spelling. Skip "\<" in the pattern, we * don't use it as a RE. */ if (pat[0] == '\\' && pat[1] == '<') ptr = pat + 2; else ptr = pat; spell_dump_compl(ptr, regmatch.rm_ic, &dir, 0); } else if (count > 0) { /* avoid warning for using "files" uninit */ ins_compl_files(count, files, thesaurus, flags, ®match, buf, &dir); if (flags != DICT_EXACT) FreeWild(count, files); } if (flags != 0) break; } theend: p_scs = save_p_scs; vim_regfree(regmatch.regprog); xfree(buf); } static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir) { char_u *ptr; int i; FILE *fp; int add_r; for (i = 0; i < count && !got_int && !compl_interrupted; i++) { fp = mch_fopen((char *)files[i], "r"); /* open dictionary file */ if (flags != DICT_EXACT) { vim_snprintf((char *)IObuff, IOSIZE, _("Scanning dictionary: %s"), (char *)files[i]); (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R)); } if (fp == NULL) { continue; } /* * Read dictionary file line by line. * Check each line for a match. */ while (!got_int && !compl_interrupted && !vim_fgets(buf, LSIZE, fp)) { ptr = buf; while (vim_regexec(regmatch, buf, (colnr_T)(ptr - buf))) { ptr = regmatch->startp[0]; if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)) { ptr = find_line_end(ptr); } else { ptr = find_word_end(ptr); } add_r = ins_compl_add_infercase(regmatch->startp[0], (int)(ptr - regmatch->startp[0]), p_ic, files[i], *dir, 0); if (thesaurus) { char_u *wstart; /* * Add the other matches on the line */ ptr = buf; while (!got_int) { /* Find start of the next word. Skip white * space and punctuation. */ ptr = find_word_start(ptr); if (*ptr == NUL || *ptr == NL) break; wstart = ptr; /* Find end of the word. */ if (has_mbyte) /* Japanese words may have characters in * different classes, only separate words * with single-byte non-word characters. */ while (*ptr != NUL) { int l = (*mb_ptr2len)(ptr); if (l < 2 && !vim_iswordc(*ptr)) break; ptr += l; } else ptr = find_word_end(ptr); /* Add the word. Skip the regexp match. */ if (wstart != regmatch->startp[0]) add_r = ins_compl_add_infercase(wstart, (int)(ptr - wstart), p_ic, files[i], *dir, 0); } } if (add_r == OK) /* if dir was BACKWARD then honor it just once */ *dir = FORWARD; else if (add_r == FAIL) break; /* avoid expensive call to vim_regexec() when at end * of line */ if (*ptr == '\n' || got_int) break; } line_breakcheck(); ins_compl_check_keys(50, false); } fclose(fp); } } /* * Find the start of the next word. * Returns a pointer to the first char of the word. Also stops at a NUL. */ char_u *find_word_start(char_u *ptr) { if (has_mbyte) while (*ptr != NUL && *ptr != '\n' && mb_get_class(ptr) <= 1) ptr += (*mb_ptr2len)(ptr); else while (*ptr != NUL && *ptr != '\n' && !vim_iswordc(*ptr)) ++ptr; return ptr; } /* * Find the end of the word. Assumes it starts inside a word. * Returns a pointer to just after the word. */ char_u *find_word_end(char_u *ptr) { int start_class; if (has_mbyte) { start_class = mb_get_class(ptr); if (start_class > 1) while (*ptr != NUL) { ptr += (*mb_ptr2len)(ptr); if (mb_get_class(ptr) != start_class) break; } } else while (vim_iswordc(*ptr)) ++ptr; return ptr; } /* * Find the end of the line, omitting CR and NL at the end. * Returns a pointer to just after the line. */ static char_u *find_line_end(char_u *ptr) { char_u *s; s = ptr + STRLEN(ptr); while (s > ptr && (s[-1] == CAR || s[-1] == NL)) --s; return s; } /* * Free the list of completions */ static void ins_compl_free(void) { compl_T *match; int i; xfree(compl_pattern); compl_pattern = NULL; xfree(compl_leader); compl_leader = NULL; if (compl_first_match == NULL) return; ins_compl_del_pum(); pum_clear(); compl_curr_match = compl_first_match; do { match = compl_curr_match; compl_curr_match = compl_curr_match->cp_next; xfree(match->cp_str); /* several entries may use the same fname, free it just once. */ if (match->cp_flags & FREE_FNAME) xfree(match->cp_fname); for (i = 0; i < CPT_COUNT; ++i) xfree(match->cp_text[i]); xfree(match); } while (compl_curr_match != NULL && compl_curr_match != compl_first_match); compl_first_match = compl_curr_match = NULL; compl_shown_match = NULL; } static void ins_compl_clear(void) { compl_cont_status = 0; compl_started = FALSE; compl_matches = 0; xfree(compl_pattern); compl_pattern = NULL; xfree(compl_leader); compl_leader = NULL; edit_submode_extra = NULL; xfree(compl_orig_text); compl_orig_text = NULL; compl_enter_selects = FALSE; // clear v:completed_item set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc()); } /// Check that Insert completion is active. bool ins_compl_active(void) FUNC_ATTR_PURE { return compl_started; } /* * Delete one character before the cursor and show the subset of the matches * that match the word that is now before the cursor. * Returns the character to be used, NUL if the work is done and another char * to be got from the user. */ static int ins_compl_bs(void) { char_u *line; char_u *p; line = get_cursor_line_ptr(); p = line + curwin->w_cursor.col; mb_ptr_back(line, p); // Stop completion when the whole word was deleted. For Omni completion // allow the word to be deleted, we won't match everything. // Respect the 'backspace' option. if ((int)(p - line) - (int)compl_col < 0 || ((int)(p - line) - (int)compl_col == 0 && ctrl_x_mode != CTRL_X_OMNI) || ctrl_x_mode == CTRL_X_EVAL || (!can_bs(BS_START) && (int)(p - line) - (int)compl_col - compl_length < 0)) { return K_BS; } /* Deleted more than what was used to find matches or didn't finish * finding all matches: need to look for matches all over again. */ if (curwin->w_cursor.col <= compl_col + compl_length || ins_compl_need_restart()) ins_compl_restart(); xfree(compl_leader); compl_leader = vim_strnsave(line + compl_col, (int)(p - line) - compl_col); ins_compl_new_leader(); if (compl_shown_match != NULL) /* Make sure current match is not a hidden item. */ compl_curr_match = compl_shown_match; return NUL; } /// Check that we need to find matches again, ins_compl_restart() is to /// be called. static bool ins_compl_need_restart(void) FUNC_ATTR_PURE { // Return true if we didn't complete finding matches or when the // "completefunc" returned "always" in the "refresh" dictionary item. return compl_was_interrupted || ((ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI) && compl_opt_refresh_always); } /* * Called after changing "compl_leader". * Show the popup menu with a different set of matches. * May also search for matches again if the previous search was interrupted. */ static void ins_compl_new_leader(void) { ins_compl_del_pum(); ins_compl_delete(); ins_bytes(compl_leader + ins_compl_len()); compl_used_match = FALSE; if (compl_started) { ins_compl_set_original_text(compl_leader); } else { spell_bad_len = 0; // need to redetect bad word // Matches were cleared, need to search for them now. // Set "compl_restarting" to avoid that the first match is inserted. compl_restarting = true; if (ins_complete(Ctrl_N, true) == FAIL) { compl_cont_status = 0; } compl_restarting = false; } compl_enter_selects = !compl_used_match; /* Show the popup menu with a different set of matches. */ ins_compl_show_pum(); /* Don't let Enter select the original text when there is no popup menu. * Don't let Enter select when use user function and refresh_always is set */ if (compl_match_array == NULL || ins_compl_need_restart()) compl_enter_selects = FALSE; } /* * Return the length of the completion, from the completion start column to * the cursor column. Making sure it never goes below zero. */ static int ins_compl_len(void) { int off = (int)curwin->w_cursor.col - (int)compl_col; if (off < 0) return 0; return off; } /* * Append one character to the match leader. May reduce the number of * matches. */ static void ins_compl_addleader(int c) { int cc; if (stop_arrow() == FAIL) { return; } if (has_mbyte && (cc = (*mb_char2len)(c)) > 1) { char_u buf[MB_MAXBYTES + 1]; (*mb_char2bytes)(c, buf); buf[cc] = NUL; ins_char_bytes(buf, cc); } else { ins_char(c); } /* If we didn't complete finding matches we must search again. */ if (ins_compl_need_restart()) ins_compl_restart(); xfree(compl_leader); compl_leader = vim_strnsave(get_cursor_line_ptr() + compl_col, (int)(curwin->w_cursor.col - compl_col)); ins_compl_new_leader(); } /* * Setup for finding completions again without leaving CTRL-X mode. Used when * BS or a key was typed while still searching for matches. */ static void ins_compl_restart(void) { /* update screen before restart. * so if complete is blocked, * will stay to the last popup menu and reduce flicker */ update_screen(0); ins_compl_free(); compl_started = FALSE; compl_matches = 0; compl_cont_status = 0; compl_cont_mode = 0; } /* * Set the first match, the original text. */ static void ins_compl_set_original_text(char_u *str) { /* Replace the original text entry. */ if (compl_first_match->cp_flags & ORIGINAL_TEXT) { /* safety check */ xfree(compl_first_match->cp_str); compl_first_match->cp_str = vim_strsave(str); } } /* * Append one character to the match leader. May reduce the number of * matches. */ static void ins_compl_addfrommatch(void) { char_u *p; int len = (int)curwin->w_cursor.col - (int)compl_col; int c; compl_T *cp; p = compl_shown_match->cp_str; if ((int)STRLEN(p) <= len) { /* the match is too short */ /* When still at the original match use the first entry that matches * the leader. */ if (compl_shown_match->cp_flags & ORIGINAL_TEXT) { p = NULL; for (cp = compl_shown_match->cp_next; cp != NULL && cp != compl_first_match; cp = cp->cp_next) { if (compl_leader == NULL || ins_compl_equal(cp, compl_leader, (int)STRLEN(compl_leader))) { p = cp->cp_str; break; } } if (p == NULL || (int)STRLEN(p) <= len) return; } else return; } p += len; c = PTR2CHAR(p); ins_compl_addleader(c); } /// Prepare for Insert mode completion, or stop it. /// Called just after typing a character in Insert mode. /// /// @param c character that was typed /// /// @return true when the character is not to be inserted; static bool ins_compl_prep(int c) { char_u *ptr; bool retval = false; /* Forget any previous 'special' messages if this is actually * a ^X mode key - bar ^R, in which case we wait to see what it gives us. */ if (c != Ctrl_R && vim_is_ctrl_x_key(c)) edit_submode_extra = NULL; /* Ignore end of Select mode mapping and mouse scroll buttons. */ if (c == K_SELECT || c == K_MOUSEDOWN || c == K_MOUSEUP || c == K_MOUSELEFT || c == K_MOUSERIGHT || c == K_EVENT) { return retval; } /* Set "compl_get_longest" when finding the first matches. */ if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET || (ctrl_x_mode == 0 && !compl_started)) { compl_get_longest = (strstr((char *)p_cot, "longest") != NULL); compl_used_match = TRUE; } if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET) { /* * We have just typed CTRL-X and aren't quite sure which CTRL-X mode * it will be yet. Now we decide. */ switch (c) { case Ctrl_E: case Ctrl_Y: ctrl_x_mode = CTRL_X_SCROLL; if (!(State & REPLACE_FLAG)) edit_submode = (char_u *)_(" (insert) Scroll (^E/^Y)"); else edit_submode = (char_u *)_(" (replace) Scroll (^E/^Y)"); edit_submode_pre = NULL; showmode(); break; case Ctrl_L: ctrl_x_mode = CTRL_X_WHOLE_LINE; break; case Ctrl_F: ctrl_x_mode = CTRL_X_FILES; break; case Ctrl_K: ctrl_x_mode = CTRL_X_DICTIONARY; break; case Ctrl_R: /* Simply allow ^R to happen without affecting ^X mode */ break; case Ctrl_T: ctrl_x_mode = CTRL_X_THESAURUS; break; case Ctrl_U: ctrl_x_mode = CTRL_X_FUNCTION; break; case Ctrl_O: ctrl_x_mode = CTRL_X_OMNI; break; case 's': case Ctrl_S: ctrl_x_mode = CTRL_X_SPELL; ++emsg_off; /* Avoid getting the E756 error twice. */ spell_back_to_badword(); --emsg_off; break; case Ctrl_RSB: ctrl_x_mode = CTRL_X_TAGS; break; case Ctrl_I: case K_S_TAB: ctrl_x_mode = CTRL_X_PATH_PATTERNS; break; case Ctrl_D: ctrl_x_mode = CTRL_X_PATH_DEFINES; break; case Ctrl_V: case Ctrl_Q: ctrl_x_mode = CTRL_X_CMDLINE; break; case Ctrl_P: case Ctrl_N: /* ^X^P means LOCAL expansion if nothing interrupted (eg we * just started ^X mode, or there were enough ^X's to cancel * the previous mode, say ^X^F^X^X^P or ^P^X^X^X^P, see below) * do normal expansion when interrupting a different mode (say * ^X^F^X^P or ^P^X^X^P, see below) * nothing changes if interrupting mode 0, (eg, the flag * doesn't change when going to ADDING mode -- Acevedo */ if (!(compl_cont_status & CONT_INTRPT)) compl_cont_status |= CONT_LOCAL; else if (compl_cont_mode != 0) compl_cont_status &= ~CONT_LOCAL; /* FALLTHROUGH */ default: /* If we have typed at least 2 ^X's... for modes != 0, we set * compl_cont_status = 0 (eg, as if we had just started ^X * mode). * For mode 0, we set "compl_cont_mode" to an impossible * value, in both cases ^X^X can be used to restart the same * mode (avoiding ADDING mode). * Undocumented feature: In a mode != 0 ^X^P and ^X^X^P start * 'complete' and local ^P expansions respectively. * In mode 0 an extra ^X is needed since ^X^P goes to ADDING * mode -- Acevedo */ if (c == Ctrl_X) { if (compl_cont_mode != 0) compl_cont_status = 0; else compl_cont_mode = CTRL_X_NOT_DEFINED_YET; } ctrl_x_mode = 0; edit_submode = NULL; showmode(); break; } } else if (ctrl_x_mode != 0) { /* We're already in CTRL-X mode, do we stay in it? */ if (!vim_is_ctrl_x_key(c)) { if (ctrl_x_mode == CTRL_X_SCROLL) ctrl_x_mode = 0; else ctrl_x_mode = CTRL_X_FINISHED; edit_submode = NULL; } showmode(); } if (compl_started || ctrl_x_mode == CTRL_X_FINISHED) { /* Show error message from attempted keyword completion (probably * 'Pattern not found') until another key is hit, then go back to * showing what mode we are in. */ showmode(); if ((ctrl_x_mode == 0 && c != Ctrl_N && c != Ctrl_P && c != Ctrl_R && !ins_compl_pum_key(c)) || ctrl_x_mode == CTRL_X_FINISHED) { /* Get here when we have finished typing a sequence of ^N and * ^P or other completion characters in CTRL-X mode. Free up * memory that was used, and make sure we can redo the insert. */ if (compl_curr_match != NULL || compl_leader != NULL || c == Ctrl_E) { /* * If any of the original typed text has been changed, eg when * ignorecase is set, we must add back-spaces to the redo * buffer. We add as few as necessary to delete just the part * of the original text that has changed. * When using the longest match, edited the match or used * CTRL-E then don't use the current match. */ if (compl_curr_match != NULL && compl_used_match && c != Ctrl_E) ptr = compl_curr_match->cp_str; else ptr = NULL; ins_compl_fixRedoBufForLeader(ptr); } bool want_cindent = (can_cindent && cindent_on()); // When completing whole lines: fix indent for 'cindent'. // Otherwise, break line if it's too long. if (compl_cont_mode == CTRL_X_WHOLE_LINE) { /* re-indent the current line */ if (want_cindent) { do_c_expr_indent(); want_cindent = FALSE; /* don't do it again */ } } else { int prev_col = curwin->w_cursor.col; // put the cursor on the last char, for 'tw' formatting if (prev_col > 0) { dec_cursor(); } if (!arrow_used && !ins_need_undo && c != Ctrl_E) { insertchar(NUL, 0, -1); } if (prev_col > 0 && get_cursor_line_ptr()[curwin->w_cursor.col] != NUL) { inc_cursor(); } } // If the popup menu is displayed pressing CTRL-Y means accepting // the selection without inserting anything. When // compl_enter_selects is set the Enter key does the same. if ((c == Ctrl_Y || (compl_enter_selects && (c == CAR || c == K_KENTER || c == NL))) && pum_visible()) { retval = true; } // CTRL-E means completion is Ended, go back to the typed text. // but only do this, if the Popup is still visible if (c == Ctrl_E) { ins_compl_delete(); if (compl_leader != NULL) { ins_bytes(compl_leader + ins_compl_len()); } else if (compl_first_match != NULL) { ins_bytes(compl_orig_text + ins_compl_len()); } retval = true; } auto_format(FALSE, TRUE); ins_compl_free(); compl_started = FALSE; compl_matches = 0; if (!shortmess(SHM_COMPLETIONMENU)) { msg_clr_cmdline(); // necessary for "noshowmode" } ctrl_x_mode = 0; compl_enter_selects = FALSE; if (edit_submode != NULL) { edit_submode = NULL; showmode(); } // Avoid the popup menu remains displayed when leaving the // command line window. if (c == Ctrl_C && cmdwin_type != 0) { update_screen(0); } /* * Indent now if a key was typed that is in 'cinkeys'. */ if (want_cindent && in_cinkeys(KEY_COMPLETE, ' ', inindent(0))) do_c_expr_indent(); /* Trigger the CompleteDone event to give scripts a chance to act * upon the completion. */ apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf); } } else if (ctrl_x_mode == CTRL_X_LOCAL_MSG) /* Trigger the CompleteDone event to give scripts a chance to act * upon the (possibly failed) completion. */ apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf); /* reset continue_* if we left expansion-mode, if we stay they'll be * (re)set properly in ins_complete() */ if (!vim_is_ctrl_x_key(c)) { compl_cont_status = 0; compl_cont_mode = 0; } return retval; } /* * Fix the redo buffer for the completion leader replacing some of the typed * text. This inserts backspaces and appends the changed text. * "ptr" is the known leader text or NUL. */ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg) { int len; char_u *p; char_u *ptr = ptr_arg; if (ptr == NULL) { if (compl_leader != NULL) ptr = compl_leader; else return; /* nothing to do */ } if (compl_orig_text != NULL) { p = compl_orig_text; for (len = 0; p[len] != NUL && p[len] == ptr[len]; ++len) ; if (len > 0) len -= (*mb_head_off)(p, p + len); for (p += len; *p != NUL; mb_ptr_adv(p)) AppendCharToRedobuff(K_BS); } else { len = 0; } AppendToRedobuffLit(ptr + len, -1); } /* * Loops through the list of windows, loaded-buffers or non-loaded-buffers * (depending on flag) starting from buf and looking for a non-scanned * buffer (other than curbuf). curbuf is special, if it is called with * buf=curbuf then it has to be the first call for a given flag/expansion. * * Returns the buffer to scan, if any, otherwise returns curbuf -- Acevedo */ static buf_T *ins_compl_next_buf(buf_T *buf, int flag) { static win_T *wp; if (flag == 'w') { /* just windows */ if (buf == curbuf) /* first call for this flag/expansion */ wp = curwin; assert(wp); while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin && wp->w_buffer->b_scanned) ; buf = wp->w_buffer; } else /* 'b' (just loaded buffers), 'u' (just non-loaded buffers) or 'U' * (unlisted buffers) * When completing whole lines skip unloaded buffers. */ while ((buf = (buf->b_next != NULL ? buf->b_next : firstbuf)) != curbuf && ((flag == 'U' ? buf->b_p_bl : (!buf->b_p_bl || (buf->b_ml.ml_mfp == NULL) != (flag == 'u'))) || buf->b_scanned)) ; return buf; } /* * Execute user defined complete function 'completefunc' or 'omnifunc', and * get matches in "matches". */ static void expand_by_function ( int type, /* CTRL_X_OMNI or CTRL_X_FUNCTION */ char_u *base ) { list_T *matchlist = NULL; dict_T *matchdict = NULL; char_u *funcname; pos_T pos; win_T *curwin_save; buf_T *curbuf_save; typval_T rettv; funcname = (type == CTRL_X_FUNCTION) ? curbuf->b_p_cfu : curbuf->b_p_ofu; if (*funcname == NUL) return; // Call 'completefunc' to obtain the list of matches. const char_u *const args[2] = { (char_u *)"0", base }; pos = curwin->w_cursor; curwin_save = curwin; curbuf_save = curbuf; /* Call a function, which returns a list or dict. */ if (call_vim_function(funcname, 2, args, FALSE, FALSE, &rettv) == OK) { switch (rettv.v_type) { case VAR_LIST: matchlist = rettv.vval.v_list; break; case VAR_DICT: matchdict = rettv.vval.v_dict; break; default: // TODO(brammool): Give error message? tv_clear(&rettv); break; } } if (curwin_save != curwin || curbuf_save != curbuf) { EMSG(_(e_complwin)); goto theend; } curwin->w_cursor = pos; /* restore the cursor position */ validate_cursor(); if (!equalpos(curwin->w_cursor, pos)) { EMSG(_(e_compldel)); goto theend; } if (matchlist != NULL) ins_compl_add_list(matchlist); else if (matchdict != NULL) ins_compl_add_dict(matchdict); theend: if (matchdict != NULL) { tv_dict_unref(matchdict); } if (matchlist != NULL) { tv_list_unref(matchlist); } } /* * Add completions from a list. */ static void ins_compl_add_list(list_T *list) { listitem_T *li; int dir = compl_direction; /* Go through the List with matches and add each of them. */ for (li = list->lv_first; li != NULL; li = li->li_next) { if (ins_compl_add_tv(&li->li_tv, dir) == OK) /* if dir was BACKWARD then honor it just once */ dir = FORWARD; else if (did_emsg) break; } } /* * Add completions from a dict. */ static void ins_compl_add_dict(dict_T *dict) { dictitem_T *di_refresh; dictitem_T *di_words; // Check for optional "refresh" item. compl_opt_refresh_always = false; di_refresh = tv_dict_find(dict, S_LEN("refresh")); if (di_refresh != NULL && di_refresh->di_tv.v_type == VAR_STRING) { const char *v = (const char *)di_refresh->di_tv.vval.v_string; if (v != NULL && strcmp(v, "always") == 0) { compl_opt_refresh_always = true; } } // Add completions from a "words" list. di_words = tv_dict_find(dict, S_LEN("words")); if (di_words != NULL && di_words->di_tv.v_type == VAR_LIST) { ins_compl_add_list(di_words->di_tv.vval.v_list); } } /// Add a match to the list of matches from VimL object /// /// @param[in] tv Object to get matches from. /// @param[in] dir Completion direction. /// /// @return NOTDONE if the given string is already in the list of completions, /// otherwise it is added to the list and OK is returned. FAIL will be /// returned in case of error. int ins_compl_add_tv(typval_T *const tv, const Direction dir) FUNC_ATTR_NONNULL_ALL { const char *word; bool icase = false; bool adup = false; bool aempty = false; char *(cptext[CPT_COUNT]); if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL) { word = tv_dict_get_string(tv->vval.v_dict, "word", false); cptext[CPT_ABBR] = tv_dict_get_string(tv->vval.v_dict, "abbr", true); cptext[CPT_MENU] = tv_dict_get_string(tv->vval.v_dict, "menu", true); cptext[CPT_KIND] = tv_dict_get_string(tv->vval.v_dict, "kind", true); cptext[CPT_INFO] = tv_dict_get_string(tv->vval.v_dict, "info", true); icase = (bool)tv_dict_get_number(tv->vval.v_dict, "icase"); adup = (bool)tv_dict_get_number(tv->vval.v_dict, "dup"); aempty = (bool)tv_dict_get_number(tv->vval.v_dict, "empty"); } else { word = (const char *)tv_get_string_chk(tv); memset(cptext, 0, sizeof(cptext)); } if (word == NULL || (!aempty && *word == NUL)) { return FAIL; } return ins_compl_add((char_u *)word, -1, icase, NULL, (char_u **)cptext, true, dir, 0, adup); } /* * Get the next expansion(s), using "compl_pattern". * The search starts at position "ini" in curbuf and in the direction * compl_direction. * When "compl_started" is FALSE start at that position, otherwise continue * where we stopped searching before. * This may return before finding all the matches. * Return the total number of matches or -1 if still unknown -- Acevedo */ static int ins_compl_get_exp(pos_T *ini) { static pos_T first_match_pos; static pos_T last_match_pos; static char_u *e_cpt = (char_u *)""; /* curr. entry in 'complete' */ static int found_all = FALSE; /* Found all matches of a certain type. */ static buf_T *ins_buf = NULL; /* buffer being scanned */ pos_T *pos; char_u **matches; int save_p_scs; bool save_p_ws; int save_p_ic; int i; int num_matches; int len; int found_new_match; int type = ctrl_x_mode; char_u *ptr; char_u *dict = NULL; int dict_f = 0; compl_T *old_match; int set_match_pos; int l_ctrl_x_mode = ctrl_x_mode; if (!compl_started) { FOR_ALL_BUFFERS(buf) { buf->b_scanned = false; } found_all = FALSE; ins_buf = curbuf; e_cpt = (compl_cont_status & CONT_LOCAL) ? (char_u *)"." : curbuf->b_p_cpt; last_match_pos = first_match_pos = *ini; } old_match = compl_curr_match; /* remember the last current match */ pos = (compl_direction == FORWARD) ? &last_match_pos : &first_match_pos; /* For ^N/^P loop over all the flags/windows/buffers in 'complete' */ for (;; ) { found_new_match = FAIL; set_match_pos = FALSE; assert(l_ctrl_x_mode == ctrl_x_mode); /* For ^N/^P pick a new entry from e_cpt if compl_started is off, * or if found_all says this entry is done. For ^X^L only use the * entries from 'complete' that look in loaded buffers. */ if ((l_ctrl_x_mode == 0 || CTRL_X_MODE_LINE_OR_EVAL(l_ctrl_x_mode)) && (!compl_started || found_all)) { found_all = FALSE; while (*e_cpt == ',' || *e_cpt == ' ') e_cpt++; if (*e_cpt == '.' && !curbuf->b_scanned) { ins_buf = curbuf; first_match_pos = *ini; /* So that ^N can match word immediately after cursor */ if (l_ctrl_x_mode == 0) dec(&first_match_pos); last_match_pos = first_match_pos; type = 0; /* Remember the first match so that the loop stops when we * wrap and come back there a second time. */ set_match_pos = TRUE; } else if (vim_strchr((char_u *)"buwU", *e_cpt) != NULL && (ins_buf = ins_compl_next_buf(ins_buf, *e_cpt)) != curbuf) { /* Scan a buffer, but not the current one. */ if (ins_buf->b_ml.ml_mfp != NULL) { /* loaded buffer */ compl_started = TRUE; first_match_pos.col = last_match_pos.col = 0; first_match_pos.lnum = ins_buf->b_ml.ml_line_count + 1; last_match_pos.lnum = 0; type = 0; } else { /* unloaded buffer, scan like dictionary */ found_all = TRUE; if (ins_buf->b_fname == NULL) continue; type = CTRL_X_DICTIONARY; dict = ins_buf->b_fname; dict_f = DICT_EXACT; } vim_snprintf((char *)IObuff, IOSIZE, _("Scanning: %s"), ins_buf->b_fname == NULL ? buf_spname(ins_buf) : ins_buf->b_sfname == NULL ? ins_buf->b_fname : ins_buf->b_sfname); (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R)); } else if (*e_cpt == NUL) break; else { if (CTRL_X_MODE_LINE_OR_EVAL(l_ctrl_x_mode)) { type = -1; } else if (*e_cpt == 'k' || *e_cpt == 's') { if (*e_cpt == 'k') type = CTRL_X_DICTIONARY; else type = CTRL_X_THESAURUS; if (*++e_cpt != ',' && *e_cpt != NUL) { dict = e_cpt; dict_f = DICT_FIRST; } } else if (*e_cpt == 'i') type = CTRL_X_PATH_PATTERNS; else if (*e_cpt == 'd') type = CTRL_X_PATH_DEFINES; else if (*e_cpt == ']' || *e_cpt == 't') { type = CTRL_X_TAGS; vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags.")); (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R)); } else type = -1; /* in any case e_cpt is advanced to the next entry */ (void)copy_option_part(&e_cpt, IObuff, IOSIZE, ","); found_all = TRUE; if (type == -1) continue; } } switch (type) { case -1: break; case CTRL_X_PATH_PATTERNS: case CTRL_X_PATH_DEFINES: find_pattern_in_path(compl_pattern, compl_direction, STRLEN(compl_pattern), FALSE, FALSE, ((type == CTRL_X_PATH_DEFINES && !(compl_cont_status & CONT_SOL)) ? FIND_DEFINE : FIND_ANY), 1L, ACTION_EXPAND, 1, MAXLNUM); break; case CTRL_X_DICTIONARY: case CTRL_X_THESAURUS: ins_compl_dictionaries( dict != NULL ? dict : (type == CTRL_X_THESAURUS ? (*curbuf->b_p_tsr == NUL ? p_tsr : curbuf->b_p_tsr) : (*curbuf->b_p_dict == NUL ? p_dict : curbuf->b_p_dict)), compl_pattern, dict != NULL ? dict_f : 0, type == CTRL_X_THESAURUS); dict = NULL; break; case CTRL_X_TAGS: /* set p_ic according to p_ic, p_scs and pat for find_tags(). */ save_p_ic = p_ic; p_ic = ignorecase(compl_pattern); /* Find up to TAG_MANY matches. Avoids that an enormous number * of matches is found when compl_pattern is empty */ if (find_tags(compl_pattern, &num_matches, &matches, TAG_REGEXP | TAG_NAMES | TAG_NOIC | TAG_INS_COMP | (l_ctrl_x_mode ? TAG_VERBOSE : 0), TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0) { ins_compl_add_matches(num_matches, matches, p_ic); } p_ic = save_p_ic; break; case CTRL_X_FILES: if (expand_wildcards(1, &compl_pattern, &num_matches, &matches, EW_FILE|EW_DIR|EW_ADDSLASH|EW_SILENT) == OK) { /* May change home directory back to "~". */ tilde_replace(compl_pattern, num_matches, matches); ins_compl_add_matches(num_matches, matches, p_fic || p_wic); } break; case CTRL_X_CMDLINE: if (expand_cmdline(&compl_xp, compl_pattern, (int)STRLEN(compl_pattern), &num_matches, &matches) == EXPAND_OK) ins_compl_add_matches(num_matches, matches, FALSE); break; case CTRL_X_FUNCTION: case CTRL_X_OMNI: expand_by_function(type, compl_pattern); break; case CTRL_X_SPELL: num_matches = expand_spelling(first_match_pos.lnum, compl_pattern, &matches); if (num_matches > 0) ins_compl_add_matches(num_matches, matches, p_ic); break; default: /* normal ^P/^N and ^X^L */ /* * If 'infercase' is set, don't use 'smartcase' here */ save_p_scs = p_scs; assert(ins_buf); if (ins_buf->b_p_inf) p_scs = FALSE; /* Buffers other than curbuf are scanned from the beginning or the * end but never from the middle, thus setting nowrapscan in this * buffers is a good idea, on the other hand, we always set * wrapscan for curbuf to avoid missing matches -- Acevedo,Webb */ save_p_ws = p_ws; if (ins_buf != curbuf) p_ws = false; else if (*e_cpt == '.') p_ws = true; for (;; ) { int flags = 0; ++msg_silent; /* Don't want messages for wrapscan. */ // CTRL_X_MODE_LINE_OR_EVAL(l_ctrl_x_mode) || word-wise search that // has added a word that was at the beginning of the line. if (CTRL_X_MODE_LINE_OR_EVAL(l_ctrl_x_mode) || (compl_cont_status & CONT_SOL)) { found_new_match = search_for_exact_line(ins_buf, pos, compl_direction, compl_pattern); } else found_new_match = searchit(NULL, ins_buf, pos, compl_direction, compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG, RE_LAST, (linenr_T)0, NULL); --msg_silent; if (!compl_started || set_match_pos) { /* set "compl_started" even on fail */ compl_started = TRUE; first_match_pos = *pos; last_match_pos = *pos; set_match_pos = FALSE; } else if (first_match_pos.lnum == last_match_pos.lnum && first_match_pos.col == last_match_pos.col) found_new_match = FAIL; if (found_new_match == FAIL) { if (ins_buf == curbuf) found_all = TRUE; break; } /* when ADDING, the text before the cursor matches, skip it */ if ( (compl_cont_status & CONT_ADDING) && ins_buf == curbuf && ini->lnum == pos->lnum && ini->col == pos->col) continue; ptr = ml_get_buf(ins_buf, pos->lnum, FALSE) + pos->col; if (CTRL_X_MODE_LINE_OR_EVAL(l_ctrl_x_mode)) { if (compl_cont_status & CONT_ADDING) { if (pos->lnum >= ins_buf->b_ml.ml_line_count) continue; ptr = ml_get_buf(ins_buf, pos->lnum + 1, FALSE); if (!p_paste) ptr = skipwhite(ptr); } len = (int)STRLEN(ptr); } else { char_u *tmp_ptr = ptr; if (compl_cont_status & CONT_ADDING) { tmp_ptr += compl_length; /* Skip if already inside a word. */ if (vim_iswordp(tmp_ptr)) continue; /* Find start of next word. */ tmp_ptr = find_word_start(tmp_ptr); } /* Find end of this word. */ tmp_ptr = find_word_end(tmp_ptr); len = (int)(tmp_ptr - ptr); if ((compl_cont_status & CONT_ADDING) && len == compl_length) { if (pos->lnum < ins_buf->b_ml.ml_line_count) { // Try next line, if any. the new word will be "join" as if the // normal command "J" was used. IOSIZE is always greater than // compl_length, so the next STRNCPY always works -- Acevedo STRNCPY(IObuff, ptr, len); ptr = ml_get_buf(ins_buf, pos->lnum + 1, false); tmp_ptr = ptr = skipwhite(ptr); /* Find start of next word. */ tmp_ptr = find_word_start(tmp_ptr); /* Find end of next word. */ tmp_ptr = find_word_end(tmp_ptr); if (tmp_ptr > ptr) { if (*ptr != ')' && IObuff[len - 1] != TAB) { if (IObuff[len - 1] != ' ') IObuff[len++] = ' '; /* IObuf =~ "\k.* ", thus len >= 2 */ if (p_js && (IObuff[len - 2] == '.' || IObuff[len - 2] == '?' || IObuff[len - 2] == '!')) { IObuff[len++] = ' '; } } /* copy as much as possible of the new word */ if (tmp_ptr - ptr >= IOSIZE - len) tmp_ptr = ptr + IOSIZE - len - 1; STRNCPY(IObuff + len, ptr, tmp_ptr - ptr); len += (int)(tmp_ptr - ptr); flags |= CONT_S_IPOS; } IObuff[len] = NUL; ptr = IObuff; } if (len == compl_length) continue; } } if (ins_compl_add_infercase(ptr, len, p_ic, ins_buf == curbuf ? NULL : ins_buf->b_sfname, 0, flags) != NOTDONE) { found_new_match = OK; break; } } p_scs = save_p_scs; p_ws = save_p_ws; } /* check if compl_curr_match has changed, (e.g. other type of * expansion added something) */ if (type != 0 && compl_curr_match != old_match) found_new_match = OK; /* break the loop for specialized modes (use 'complete' just for the * generic l_ctrl_x_mode == 0) or when we've found a new match */ if ((l_ctrl_x_mode != 0 && !CTRL_X_MODE_LINE_OR_EVAL(l_ctrl_x_mode)) || found_new_match != FAIL) { if (got_int) break; /* Fill the popup menu as soon as possible. */ if (type != -1) ins_compl_check_keys(0, false); if ((l_ctrl_x_mode != 0 && !CTRL_X_MODE_LINE_OR_EVAL(l_ctrl_x_mode)) || compl_interrupted) { break; } compl_started = TRUE; } else { /* Mark a buffer scanned when it has been scanned completely */ if (type == 0 || type == CTRL_X_PATH_PATTERNS) { assert(ins_buf); ins_buf->b_scanned = true; } compl_started = FALSE; } } compl_started = TRUE; if ((l_ctrl_x_mode == 0 || CTRL_X_MODE_LINE_OR_EVAL(l_ctrl_x_mode)) && *e_cpt == NUL) { // Got to end of 'complete' found_new_match = FAIL; } i = -1; /* total of matches, unknown */ if (found_new_match == FAIL || (l_ctrl_x_mode != 0 && !CTRL_X_MODE_LINE_OR_EVAL(l_ctrl_x_mode))) { i = ins_compl_make_cyclic(); } /* If several matches were added (FORWARD) or the search failed and has * just been made cyclic then we have to move compl_curr_match to the next * or previous entry (if any) -- Acevedo */ compl_curr_match = compl_direction == FORWARD ? old_match->cp_next : old_match->cp_prev; if (compl_curr_match == NULL) compl_curr_match = old_match; return i; } /* Delete the old text being completed. */ static void ins_compl_delete(void) { int col; // In insert mode: Delete the typed part. // In replace mode: Put the old characters back, if any. col = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0); if ((int)curwin->w_cursor.col > col) { if (stop_arrow() == FAIL) { return; } backspace_until_column(col); } // TODO(vim): is this sufficient for redrawing? Redrawing everything // causes flicker, thus we can't do that. changed_cline_bef_curs(); // clear v:completed_item set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc()); } // Insert the new text being completed. // "in_compl_func" is TRUE when called from complete_check(). static void ins_compl_insert(int in_compl_func) { ins_bytes(compl_shown_match->cp_str + ins_compl_len()); if (compl_shown_match->cp_flags & ORIGINAL_TEXT) compl_used_match = FALSE; else compl_used_match = TRUE; // Set completed item. // { word, abbr, menu, kind, info } dict_T *dict = tv_dict_alloc(); tv_dict_add_str(dict, S_LEN("word"), (const char *)EMPTY_IF_NULL(compl_shown_match->cp_str)); tv_dict_add_str( dict, S_LEN("abbr"), (const char *)EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_ABBR])); tv_dict_add_str( dict, S_LEN("menu"), (const char *)EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_MENU])); tv_dict_add_str( dict, S_LEN("kind"), (const char *)EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_KIND])); tv_dict_add_str( dict, S_LEN("info"), (const char *)EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_INFO])); set_vim_var_dict(VV_COMPLETED_ITEM, dict); if (!in_compl_func) { compl_curr_match = compl_shown_match; } } /* * Fill in the next completion in the current direction. * If "allow_get_expansion" is TRUE, then we may call ins_compl_get_exp() to * get more completions. If it is FALSE, then we just do nothing when there * are no more completions in a given direction. The latter case is used when * we are still in the middle of finding completions, to allow browsing * through the ones found so far. * Return the total number of matches, or -1 if still unknown -- webb. * * compl_curr_match is currently being used by ins_compl_get_exp(), so we use * compl_shown_match here. * * Note that this function may be called recursively once only. First with * "allow_get_expansion" TRUE, which calls ins_compl_get_exp(), which in turn * calls this function with "allow_get_expansion" FALSE. */ static int ins_compl_next ( int allow_get_expansion, int count, // Repeat completion this many times; should // be at least 1 int insert_match, // Insert the newly selected match int in_compl_func // Called from complete_check() ) { int num_matches = -1; int i; int todo = count; compl_T *found_compl = NULL; int found_end = FALSE; int advance; int started = compl_started; /* When user complete function return -1 for findstart which is next * time of 'always', compl_shown_match become NULL. */ if (compl_shown_match == NULL) return -1; if (compl_leader != NULL && (compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0) { /* Set "compl_shown_match" to the actually shown match, it may differ * when "compl_leader" is used to omit some of the matches. */ while (!ins_compl_equal(compl_shown_match, compl_leader, (int)STRLEN(compl_leader)) && compl_shown_match->cp_next != NULL && compl_shown_match->cp_next != compl_first_match) compl_shown_match = compl_shown_match->cp_next; /* If we didn't find it searching forward, and compl_shows_dir is * backward, find the last match. */ if (compl_shows_dir == BACKWARD && !ins_compl_equal(compl_shown_match, compl_leader, (int)STRLEN(compl_leader)) && (compl_shown_match->cp_next == NULL || compl_shown_match->cp_next == compl_first_match)) { while (!ins_compl_equal(compl_shown_match, compl_leader, (int)STRLEN(compl_leader)) && compl_shown_match->cp_prev != NULL && compl_shown_match->cp_prev != compl_first_match) compl_shown_match = compl_shown_match->cp_prev; } } if (allow_get_expansion && insert_match && (!(compl_get_longest || compl_restarting) || compl_used_match)) /* Delete old text to be replaced */ ins_compl_delete(); /* When finding the longest common text we stick at the original text, * don't let CTRL-N or CTRL-P move to the first match. */ advance = count != 1 || !allow_get_expansion || !compl_get_longest; /* When restarting the search don't insert the first match either. */ if (compl_restarting) { advance = FALSE; compl_restarting = FALSE; } /* Repeat this for when or is typed. But don't wrap * around. */ while (--todo >= 0) { if (compl_shows_dir == FORWARD && compl_shown_match->cp_next != NULL) { compl_shown_match = compl_shown_match->cp_next; found_end = (compl_first_match != NULL && (compl_shown_match->cp_next == compl_first_match || compl_shown_match == compl_first_match)); } else if (compl_shows_dir == BACKWARD && compl_shown_match->cp_prev != NULL) { found_end = (compl_shown_match == compl_first_match); compl_shown_match = compl_shown_match->cp_prev; found_end |= (compl_shown_match == compl_first_match); } else { if (!allow_get_expansion) { if (advance) { if (compl_shows_dir == BACKWARD) compl_pending -= todo + 1; else compl_pending += todo + 1; } return -1; } if (!compl_no_select && advance) { if (compl_shows_dir == BACKWARD) --compl_pending; else ++compl_pending; } /* Find matches. */ num_matches = ins_compl_get_exp(&compl_startpos); /* handle any pending completions */ while (compl_pending != 0 && compl_direction == compl_shows_dir && advance) { if (compl_pending > 0 && compl_shown_match->cp_next != NULL) { compl_shown_match = compl_shown_match->cp_next; --compl_pending; } if (compl_pending < 0 && compl_shown_match->cp_prev != NULL) { compl_shown_match = compl_shown_match->cp_prev; ++compl_pending; } else break; } found_end = FALSE; } if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0 && compl_leader != NULL && !ins_compl_equal(compl_shown_match, compl_leader, (int)STRLEN(compl_leader))) ++todo; else /* Remember a matching item. */ found_compl = compl_shown_match; /* Stop at the end of the list when we found a usable match. */ if (found_end) { if (found_compl != NULL) { compl_shown_match = found_compl; break; } todo = 1; /* use first usable match after wrapping around */ } } /* Insert the text of the new completion, or the compl_leader. */ if (compl_no_insert && !started) { ins_bytes(compl_orig_text + ins_compl_len()); compl_used_match = FALSE; } else if (insert_match) { if (!compl_get_longest || compl_used_match) { ins_compl_insert(in_compl_func); } else { ins_bytes(compl_leader + ins_compl_len()); } } else { compl_used_match = FALSE; } if (!allow_get_expansion) { /* may undisplay the popup menu first */ ins_compl_upd_pum(); /* redraw to show the user what was inserted */ update_screen(0); /* display the updated popup menu */ ins_compl_show_pum(); /* Delete old text to be replaced, since we're still searching and * don't want to match ourselves! */ ins_compl_delete(); } /* Enter will select a match when the match wasn't inserted and the popup * menu is visible. */ if (compl_no_insert && !started) { compl_enter_selects = TRUE; } else { compl_enter_selects = !insert_match && compl_match_array != NULL; } /* * Show the file name for the match (if any) * Truncate the file name to avoid a wait for return. */ if (compl_shown_match->cp_fname != NULL) { STRCPY(IObuff, "match in file "); i = (vim_strsize(compl_shown_match->cp_fname) + 16) - sc_col; if (i <= 0) i = 0; else STRCAT(IObuff, "<"); STRCAT(IObuff, compl_shown_match->cp_fname + i); msg(IObuff); redraw_cmdline = FALSE; /* don't overwrite! */ } return num_matches; } // Call this while finding completions, to check whether the user has hit a key // that should change the currently displayed completion, or exit completion // mode. Also, when compl_pending is not zero, show a completion as soon as // possible. -- webb // "frequency" specifies out of how many calls we actually check. // "in_compl_func" is TRUE when called from complete_check(), don't set // compl_curr_match. void ins_compl_check_keys(int frequency, int in_compl_func) { static int count = 0; int c; /* Don't check when reading keys from a script. That would break the test * scripts */ if (using_script()) return; /* Only do this at regular intervals */ if (++count < frequency) return; count = 0; /* Check for a typed key. Do use mappings, otherwise vim_is_ctrl_x_key() * can't do its work correctly. */ c = vpeekc_any(); if (c != NUL) { if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R) { c = safe_vgetc(); /* Eat the character */ compl_shows_dir = ins_compl_key2dir(c); (void)ins_compl_next(false, ins_compl_key2count(c), c != K_UP && c != K_DOWN, in_compl_func); } else { /* Need to get the character to have KeyTyped set. We'll put it * back with vungetc() below. But skip K_IGNORE. */ c = safe_vgetc(); if (c != K_IGNORE) { /* Don't interrupt completion when the character wasn't typed, * e.g., when doing @q to replay keys. */ if (c != Ctrl_R && KeyTyped) compl_interrupted = TRUE; vungetc(c); } } } if (compl_pending != 0 && !got_int && !compl_no_insert) { int todo = compl_pending > 0 ? compl_pending : -compl_pending; compl_pending = 0; (void)ins_compl_next(false, todo, true, in_compl_func); } } /* * Decide the direction of Insert mode complete from the key typed. * Returns BACKWARD or FORWARD. */ static int ins_compl_key2dir(int c) { if (c == Ctrl_P || c == Ctrl_L || c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP || c == K_UP) { return BACKWARD; } return FORWARD; } /// Check that "c" is a valid completion key only while the popup menu is shown /// /// @param c character to check static bool ins_compl_pum_key(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP || c == K_PAGEDOWN || c == K_KPAGEDOWN || c == K_S_DOWN || c == K_UP || c == K_DOWN); } /* * Decide the number of completions to move forward. * Returns 1 for most keys, height of the popup menu for page-up/down keys. */ static int ins_compl_key2count(int c) { int h; if (ins_compl_pum_key(c) && c != K_UP && c != K_DOWN) { h = pum_get_height(); if (h > 3) h -= 2; /* keep some context */ return h; } return 1; } /// Check that completion with "c" should insert the match, false if only /// to change the currently selected completion. /// /// @param c character to check static bool ins_compl_use_match(int c) FUNC_ATTR_CONST FUNC_ATTR_WARN_UNUSED_RESULT { switch (c) { case K_UP: case K_DOWN: case K_PAGEDOWN: case K_KPAGEDOWN: case K_S_DOWN: case K_PAGEUP: case K_KPAGEUP: case K_S_UP: return false; } return true; } /* * Do Insert mode completion. * Called when character "c" was typed, which has a meaning for completion. * Returns OK if completion was done, FAIL if something failed. */ static int ins_complete(int c, bool enable_pum) { char_u *line; int startcol = 0; /* column where searched text starts */ colnr_T curs_col; /* cursor column */ int n; int save_w_wrow; int save_w_leftcol; int insert_match; int save_did_ai = did_ai; compl_direction = ins_compl_key2dir(c); insert_match = ins_compl_use_match(c); if (!compl_started) { /* First time we hit ^N or ^P (in a row, I mean) */ did_ai = FALSE; did_si = FALSE; can_si = FALSE; can_si_back = FALSE; if (stop_arrow() == FAIL) return FAIL; line = ml_get(curwin->w_cursor.lnum); curs_col = curwin->w_cursor.col; compl_pending = 0; /* If this same ctrl_x_mode has been interrupted use the text from * "compl_startpos" to the cursor as a pattern to add a new word * instead of expand the one before the cursor, in word-wise if * "compl_startpos" is not in the same line as the cursor then fix it * (the line has been split because it was longer than 'tw'). if SOL * is set then skip the previous pattern, a word at the beginning of * the line has been inserted, we'll look for that -- Acevedo. */ if ((compl_cont_status & CONT_INTRPT) == CONT_INTRPT && compl_cont_mode == ctrl_x_mode) { /* * it is a continued search */ compl_cont_status &= ~CONT_INTRPT; /* remove INTRPT */ if (ctrl_x_mode == 0 || ctrl_x_mode == CTRL_X_PATH_PATTERNS || ctrl_x_mode == CTRL_X_PATH_DEFINES) { if (compl_startpos.lnum != curwin->w_cursor.lnum) { /* line (probably) wrapped, set compl_startpos to the * first non_blank in the line, if it is not a wordchar * include it to get a better pattern, but then we don't * want the "\\<" prefix, check it bellow */ compl_col = (colnr_T)(skipwhite(line) - line); compl_startpos.col = compl_col; compl_startpos.lnum = curwin->w_cursor.lnum; compl_cont_status &= ~CONT_SOL; /* clear SOL if present */ } else { /* S_IPOS was set when we inserted a word that was at the * beginning of the line, which means that we'll go to SOL * mode but first we need to redefine compl_startpos */ if (compl_cont_status & CONT_S_IPOS) { compl_cont_status |= CONT_SOL; compl_startpos.col = (colnr_T)(skipwhite( line + compl_length + compl_startpos.col) - line); } compl_col = compl_startpos.col; } compl_length = curwin->w_cursor.col - (int)compl_col; /* IObuff is used to add a "word from the next line" would we * have enough space? just being paranoid */ #define MIN_SPACE 75 if (compl_length > (IOSIZE - MIN_SPACE)) { compl_cont_status &= ~CONT_SOL; compl_length = (IOSIZE - MIN_SPACE); compl_col = curwin->w_cursor.col - compl_length; } compl_cont_status |= CONT_ADDING | CONT_N_ADDS; if (compl_length < 1) compl_cont_status &= CONT_LOCAL; } else if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)) { compl_cont_status = CONT_ADDING | CONT_N_ADDS; } else compl_cont_status = 0; } else compl_cont_status &= CONT_LOCAL; if (!(compl_cont_status & CONT_ADDING)) { /* normal expansion */ compl_cont_mode = ctrl_x_mode; if (ctrl_x_mode != 0) /* Remove LOCAL if ctrl_x_mode != 0 */ compl_cont_status = 0; compl_cont_status |= CONT_N_ADDS; compl_startpos = curwin->w_cursor; startcol = (int)curs_col; compl_col = 0; } /* Work out completion pattern and original text -- webb */ if (ctrl_x_mode == 0 || (ctrl_x_mode & CTRL_X_WANT_IDENT)) { if ((compl_cont_status & CONT_SOL) || ctrl_x_mode == CTRL_X_PATH_DEFINES) { if (!(compl_cont_status & CONT_ADDING)) { while (--startcol >= 0 && vim_isIDc(line[startcol])) ; compl_col += ++startcol; compl_length = curs_col - startcol; } if (p_ic) compl_pattern = str_foldcase(line + compl_col, compl_length, NULL, 0); else compl_pattern = vim_strnsave(line + compl_col, compl_length); } else if (compl_cont_status & CONT_ADDING) { char_u *prefix = (char_u *)"\\<"; /* we need up to 2 extra chars for the prefix */ compl_pattern = xmalloc(quote_meta(NULL, line + compl_col, compl_length) + 2); if (!vim_iswordp(line + compl_col) || (compl_col > 0 && ( vim_iswordp(mb_prevptr(line, line + compl_col)) ))) prefix = (char_u *)""; STRCPY((char *)compl_pattern, prefix); (void)quote_meta(compl_pattern + STRLEN(prefix), line + compl_col, compl_length); } else if (--startcol < 0 || !vim_iswordp(mb_prevptr(line, line + startcol + 1))) { // Match any word of at least two chars compl_pattern = vim_strsave((char_u *)"\\<\\k\\k"); compl_col += curs_col; compl_length = 0; } else { /* Search the point of change class of multibyte character * or not a word single byte character backward. */ if (has_mbyte) { int base_class; int head_off; startcol -= (*mb_head_off)(line, line + startcol); base_class = mb_get_class(line + startcol); while (--startcol >= 0) { head_off = (*mb_head_off)(line, line + startcol); if (base_class != mb_get_class(line + startcol - head_off)) break; startcol -= head_off; } } else while (--startcol >= 0 && vim_iswordc(line[startcol])) ; compl_col += ++startcol; compl_length = (int)curs_col - startcol; if (compl_length == 1) { /* Only match word with at least two chars -- webb * there's no need to call quote_meta, * xmalloc(7) is enough -- Acevedo */ compl_pattern = xmalloc(7); STRCPY((char *)compl_pattern, "\\<"); (void)quote_meta(compl_pattern + 2, line + compl_col, 1); STRCAT((char *)compl_pattern, "\\k"); } else { compl_pattern = xmalloc(quote_meta(NULL, line + compl_col, compl_length) + 2); STRCPY((char *)compl_pattern, "\\<"); (void)quote_meta(compl_pattern + 2, line + compl_col, compl_length); } } } else if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)) { compl_col = (colnr_T)(skipwhite(line) - line); compl_length = (int)curs_col - (int)compl_col; if (compl_length < 0) /* cursor in indent: empty pattern */ compl_length = 0; if (p_ic) compl_pattern = str_foldcase(line + compl_col, compl_length, NULL, 0); else compl_pattern = vim_strnsave(line + compl_col, compl_length); } else if (ctrl_x_mode == CTRL_X_FILES) { /* Go back to just before the first filename character. */ if (startcol > 0) { char_u *p = line + startcol; mb_ptr_back(line, p); while (p > line && vim_isfilec(PTR2CHAR(p))) mb_ptr_back(line, p); if (p == line && vim_isfilec(PTR2CHAR(p))) startcol = 0; else startcol = (int)(p - line) + 1; } compl_col += startcol; compl_length = (int)curs_col - startcol; compl_pattern = addstar(line + compl_col, compl_length, EXPAND_FILES); } else if (ctrl_x_mode == CTRL_X_CMDLINE) { compl_pattern = vim_strnsave(line, curs_col); set_cmd_context(&compl_xp, compl_pattern, (int)STRLEN(compl_pattern), curs_col, false); if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL || compl_xp.xp_context == EXPAND_NOTHING) { // No completion possible, use an empty pattern to get a // "pattern not found" message. compl_col = curs_col; } else { compl_col = (int)(compl_xp.xp_pattern - compl_pattern); } compl_length = curs_col - compl_col; } else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI) { /* * Call user defined function 'completefunc' with "a:findstart" * set to 1 to obtain the length of text to use for completion. */ int col; char_u *funcname; pos_T pos; win_T *curwin_save; buf_T *curbuf_save; /* Call 'completefunc' or 'omnifunc' and get pattern length as a * string */ funcname = ctrl_x_mode == CTRL_X_FUNCTION ? curbuf->b_p_cfu : curbuf->b_p_ofu; if (*funcname == NUL) { EMSG2(_(e_notset), ctrl_x_mode == CTRL_X_FUNCTION ? "completefunc" : "omnifunc"); // restore did_ai, so that adding comment leader works did_ai = save_did_ai; return FAIL; } const char_u *const args[2] = { (char_u *)"1", NULL }; pos = curwin->w_cursor; curwin_save = curwin; curbuf_save = curbuf; col = call_func_retnr(funcname, 2, args, FALSE); if (curwin_save != curwin || curbuf_save != curbuf) { EMSG(_(e_complwin)); return FAIL; } curwin->w_cursor = pos; /* restore the cursor position */ validate_cursor(); if (!equalpos(curwin->w_cursor, pos)) { EMSG(_(e_compldel)); return FAIL; } /* Return value -2 means the user complete function wants to * cancel the complete without an error. * Return value -3 does the same as -2 and leaves CTRL-X mode.*/ if (col == -2) return FAIL; if (col == -3) { ctrl_x_mode = 0; edit_submode = NULL; if (!shortmess(SHM_COMPLETIONMENU)) { msg_clr_cmdline(); } return FAIL; } /* * Reset extended parameters of completion, when start new * completion. */ compl_opt_refresh_always = FALSE; if (col < 0) col = curs_col; compl_col = col; if (compl_col > curs_col) compl_col = curs_col; /* Setup variables for completion. Need to obtain "line" again, * it may have become invalid. */ line = ml_get(curwin->w_cursor.lnum); compl_length = curs_col - compl_col; compl_pattern = vim_strnsave(line + compl_col, compl_length); } else if (ctrl_x_mode == CTRL_X_SPELL) { if (spell_bad_len > 0) { assert(spell_bad_len <= INT_MAX); compl_col = curs_col - (int)spell_bad_len; } else compl_col = spell_word_start(startcol); if (compl_col >= (colnr_T)startcol) { compl_length = 0; compl_col = curs_col; } else { spell_expand_check_cap(compl_col); compl_length = (int)curs_col - compl_col; } /* Need to obtain "line" again, it may have become invalid. */ line = ml_get(curwin->w_cursor.lnum); compl_pattern = vim_strnsave(line + compl_col, compl_length); } else { EMSG2(_(e_intern2), "ins_complete()"); return FAIL; } if (compl_cont_status & CONT_ADDING) { edit_submode_pre = (char_u *)_(" Adding"); if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)) { /* Insert a new line, keep indentation but ignore 'comments' */ char_u *old = curbuf->b_p_com; curbuf->b_p_com = (char_u *)""; compl_startpos.lnum = curwin->w_cursor.lnum; compl_startpos.col = compl_col; ins_eol('\r'); curbuf->b_p_com = old; compl_length = 0; compl_col = curwin->w_cursor.col; } } else { edit_submode_pre = NULL; compl_startpos.col = compl_col; } if (compl_cont_status & CONT_LOCAL) edit_submode = (char_u *)_(ctrl_x_msgs[CTRL_X_LOCAL_MSG]); else edit_submode = (char_u *)_(CTRL_X_MSG(ctrl_x_mode)); /* If any of the original typed text has been changed we need to fix * the redo buffer. */ ins_compl_fixRedoBufForLeader(NULL); /* Always add completion for the original text. */ xfree(compl_orig_text); compl_orig_text = vim_strnsave(line + compl_col, compl_length); if (ins_compl_add(compl_orig_text, -1, p_ic, NULL, NULL, false, 0, ORIGINAL_TEXT, false) != OK) { xfree(compl_pattern); compl_pattern = NULL; xfree(compl_orig_text); compl_orig_text = NULL; return FAIL; } /* showmode might reset the internal line pointers, so it must * be called before line = ml_get(), or when this address is no * longer needed. -- Acevedo. */ edit_submode_extra = (char_u *)_("-- Searching..."); edit_submode_highl = HLF_COUNT; showmode(); edit_submode_extra = NULL; ui_flush(); } else if (insert_match && stop_arrow() == FAIL) { return FAIL; } compl_shown_match = compl_curr_match; compl_shows_dir = compl_direction; /* * Find next match (and following matches). */ save_w_wrow = curwin->w_wrow; save_w_leftcol = curwin->w_leftcol; n = ins_compl_next(true, ins_compl_key2count(c), insert_match, false); /* may undisplay the popup menu */ ins_compl_upd_pum(); if (n > 1) /* all matches have been found */ compl_matches = n; compl_curr_match = compl_shown_match; compl_direction = compl_shows_dir; /* Eat the ESC that vgetc() returns after a CTRL-C to avoid leaving Insert * mode. */ if (got_int && !global_busy) { (void)vgetc(); got_int = FALSE; } /* we found no match if the list has only the "compl_orig_text"-entry */ if (compl_first_match == compl_first_match->cp_next) { edit_submode_extra = (compl_cont_status & CONT_ADDING) && compl_length > 1 ? (char_u *)_(e_hitend) : (char_u *)_(e_patnotf); edit_submode_highl = HLF_E; /* remove N_ADDS flag, so next ^X<> won't try to go to ADDING mode, * because we couldn't expand anything at first place, but if we used * ^P, ^N, ^X^I or ^X^D we might want to add-expand a single-char-word * (such as M in M'exico) if not tried already. -- Acevedo */ if ( compl_length > 1 || (compl_cont_status & CONT_ADDING) || (ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_PATH_PATTERNS && ctrl_x_mode != CTRL_X_PATH_DEFINES)) compl_cont_status &= ~CONT_N_ADDS; } if (compl_curr_match->cp_flags & CONT_S_IPOS) compl_cont_status |= CONT_S_IPOS; else compl_cont_status &= ~CONT_S_IPOS; if (edit_submode_extra == NULL) { if (compl_curr_match->cp_flags & ORIGINAL_TEXT) { edit_submode_extra = (char_u *)_("Back at original"); edit_submode_highl = HLF_W; } else if (compl_cont_status & CONT_S_IPOS) { edit_submode_extra = (char_u *)_("Word from other line"); edit_submode_highl = HLF_COUNT; } else if (compl_curr_match->cp_next == compl_curr_match->cp_prev) { edit_submode_extra = (char_u *)_("The only match"); edit_submode_highl = HLF_COUNT; } else { /* Update completion sequence number when needed. */ if (compl_curr_match->cp_number == -1) { int number = 0; compl_T *match; if (compl_direction == FORWARD) { /* search backwards for the first valid (!= -1) number. * This should normally succeed already at the first loop * cycle, so it's fast! */ for (match = compl_curr_match->cp_prev; match != NULL && match != compl_first_match; match = match->cp_prev) if (match->cp_number != -1) { number = match->cp_number; break; } if (match != NULL) /* go up and assign all numbers which are not assigned * yet */ for (match = match->cp_next; match != NULL && match->cp_number == -1; match = match->cp_next) match->cp_number = ++number; } else { /* BACKWARD */ /* search forwards (upwards) for the first valid (!= -1) * number. This should normally succeed already at the * first loop cycle, so it's fast! */ for (match = compl_curr_match->cp_next; match != NULL && match != compl_first_match; match = match->cp_next) if (match->cp_number != -1) { number = match->cp_number; break; } if (match != NULL) /* go down and assign all numbers which are not * assigned yet */ for (match = match->cp_prev; match && match->cp_number == -1; match = match->cp_prev) match->cp_number = ++number; } } /* The match should always have a sequence number now, this is * just a safety check. */ if (compl_curr_match->cp_number != -1) { /* Space for 10 text chars. + 2x10-digit no.s = 31. * Translations may need more than twice that. */ static char_u match_ref[81]; if (compl_matches > 0) vim_snprintf((char *)match_ref, sizeof(match_ref), _("match %d of %d"), compl_curr_match->cp_number, compl_matches); else vim_snprintf((char *)match_ref, sizeof(match_ref), _("match %d"), compl_curr_match->cp_number); edit_submode_extra = match_ref; edit_submode_highl = HLF_R; if (dollar_vcol >= 0) curs_columns(FALSE); } } } /* Show a message about what (completion) mode we're in. */ showmode(); if (!shortmess(SHM_COMPLETIONMENU)) { if (edit_submode_extra != NULL) { if (!p_smd) { msg_attr((const char *)edit_submode_extra, (edit_submode_highl < HLF_COUNT ? hl_attr(edit_submode_highl) : 0)); } } else { msg_clr_cmdline(); // necessary for "noshowmode" } } // Show the popup menu, unless we got interrupted. if (enable_pum && !compl_interrupted) { show_pum(save_w_wrow, save_w_leftcol); } compl_was_interrupted = compl_interrupted; compl_interrupted = FALSE; return OK; } /* * Looks in the first "len" chars. of "src" for search-metachars. * If dest is not NULL the chars. are copied there quoting (with * a backslash) the metachars, and dest would be NUL terminated. * Returns the length (needed) of dest */ static unsigned quote_meta(char_u *dest, char_u *src, int len) { unsigned m = (unsigned)len + 1; /* one extra for the NUL */ for (; --len >= 0; src++) { switch (*src) { case '.': case '*': case '[': if (ctrl_x_mode == CTRL_X_DICTIONARY || ctrl_x_mode == CTRL_X_THESAURUS) break; // fallthrough case '~': if (!p_magic) /* quote these only if magic is set */ break; // fallthrough case '\\': if (ctrl_x_mode == CTRL_X_DICTIONARY || ctrl_x_mode == CTRL_X_THESAURUS) break; // fallthrough case '^': // currently it's not needed. case '$': m++; if (dest != NULL) *dest++ = '\\'; break; } if (dest != NULL) *dest++ = *src; /* Copy remaining bytes of a multibyte character. */ if (has_mbyte) { int i, mb_len; mb_len = (*mb_ptr2len)(src) - 1; if (mb_len > 0 && len >= mb_len) for (i = 0; i < mb_len; ++i) { --len; ++src; if (dest != NULL) *dest++ = *src; } } } if (dest != NULL) *dest = NUL; return m; } /* * Next character is interpreted literally. * A one, two or three digit decimal number is interpreted as its byte value. * If one or two digits are entered, the next character is given to vungetc(). * For Unicode a character > 255 may be returned. */ int get_literal(void) { int cc; int nc; int i; int hex = FALSE; int octal = FALSE; int unicode = 0; if (got_int) return Ctrl_C; ++no_mapping; /* don't map the next key hits */ cc = 0; i = 0; for (;; ) { nc = plain_vgetc(); if (!(State & CMDLINE) && MB_BYTE2LEN_CHECK(nc) == 1 ) add_to_showcmd(nc); if (nc == 'x' || nc == 'X') hex = TRUE; else if (nc == 'o' || nc == 'O') octal = TRUE; else if (nc == 'u' || nc == 'U') unicode = nc; else { if (hex || unicode != 0 ) { if (!ascii_isxdigit(nc)) break; cc = cc * 16 + hex2nr(nc); } else if (octal) { if (nc < '0' || nc > '7') break; cc = cc * 8 + nc - '0'; } else { if (!ascii_isdigit(nc)) break; cc = cc * 10 + nc - '0'; } ++i; } if (cc > 255 && unicode == 0 ) cc = 255; /* limit range to 0-255 */ nc = 0; if (hex) { /* hex: up to two chars */ if (i >= 2) break; } else if (unicode) { /* Unicode: up to four or eight chars */ if ((unicode == 'u' && i >= 4) || (unicode == 'U' && i >= 8)) break; } else if (i >= 3) /* decimal or octal: up to three chars */ break; } if (i == 0) { /* no number entered */ if (nc == K_ZERO) { /* NUL is stored as NL */ cc = '\n'; nc = 0; } else { cc = nc; nc = 0; } } if (cc == 0) /* NUL is stored as NL */ cc = '\n'; if (enc_dbcs && (cc & 0xff) == 0) cc = '?'; /* don't accept an illegal DBCS char, the NUL in the second byte will cause trouble! */ --no_mapping; if (nc) vungetc(nc); got_int = FALSE; /* CTRL-C typed after CTRL-V is not an interrupt */ return cc; } /// Insert character, taking care of special keys and mod_mask /// /// @param ctrlv `c` was typed after CTRL-V static void insert_special(int c, int allow_modmask, int ctrlv) { char_u *p; int len; /* * Special function key, translate into "". Up to the last '>' is * inserted with ins_str(), so as not to replace characters in replace * mode. * Only use mod_mask for special keys, to avoid things like , * unless 'allow_modmask' is TRUE. */ if (mod_mask & MOD_MASK_CMD) { // Command-key never produces a normal key. allow_modmask = true; } if (IS_SPECIAL(c) || (mod_mask && allow_modmask)) { p = get_special_key_name(c, mod_mask); len = (int)STRLEN(p); c = p[len - 1]; if (len > 2) { if (stop_arrow() == FAIL) return; p[len - 1] = NUL; ins_str(p); AppendToRedobuffLit(p, -1); ctrlv = FALSE; } } if (stop_arrow() == OK) insertchar(c, ctrlv ? INSCHAR_CTRLV : 0, -1); } /* * Special characters in this context are those that need processing other * than the simple insertion that can be performed here. This includes ESC * which terminates the insert, and CR/NL which need special processing to * open up a new line. This routine tries to optimize insertions performed by * the "redo", "undo" or "put" commands, so it needs to know when it should * stop and defer processing to the "normal" mechanism. * '0' and '^' are special, because they can be followed by CTRL-D. */ # define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^') # define WHITECHAR(cc) (ascii_iswhite(cc) && \ (!enc_utf8 || \ !utf_iscomposing( \ utf_ptr2char(get_cursor_pos_ptr() + 1)))) /* * "flags": INSCHAR_FORMAT - force formatting * INSCHAR_CTRLV - char typed just after CTRL-V * INSCHAR_NO_FEX - don't use 'formatexpr' * * NOTE: passes the flags value straight through to internal_format() which, * beside INSCHAR_FORMAT (above), is also looking for these: * INSCHAR_DO_COM - format comments * INSCHAR_COM_LIST - format comments with num list or 2nd line indent */ void insertchar ( int c, /* character to insert or NUL */ int flags, /* INSCHAR_FORMAT, etc. */ int second_indent /* indent for second line if >= 0 */ ) { int textwidth; char_u *p; int fo_ins_blank; int force_format = flags & INSCHAR_FORMAT; textwidth = comp_textwidth(force_format); fo_ins_blank = has_format_option(FO_INS_BLANK); /* * Try to break the line in two or more pieces when: * - Always do this if we have been called to do formatting only. * - Always do this when 'formatoptions' has the 'a' flag and the line * ends in white space. * - Otherwise: * - Don't do this if inserting a blank * - Don't do this if an existing character is being replaced, unless * we're in VREPLACE mode. * - Do this if the cursor is not on the line where insert started * or - 'formatoptions' doesn't have 'l' or the line was not too long * before the insert. * - 'formatoptions' doesn't have 'b' or a blank was inserted at or * before 'textwidth' */ if (textwidth > 0 && (force_format || (!ascii_iswhite(c) && !((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG) && *get_cursor_pos_ptr() != NUL) && (curwin->w_cursor.lnum != Insstart.lnum || ((!has_format_option(FO_INS_LONG) || Insstart_textlen <= (colnr_T)textwidth) && (!fo_ins_blank || Insstart_blank_vcol <= (colnr_T)textwidth )))))) { /* Format with 'formatexpr' when it's set. Use internal formatting * when 'formatexpr' isn't set or it returns non-zero. */ int do_internal = TRUE; colnr_T virtcol = get_nolist_virtcol() + char2cells(c != NUL ? c : gchar_cursor()); if (*curbuf->b_p_fex != NUL && (flags & INSCHAR_NO_FEX) == 0 && (force_format || virtcol > (colnr_T)textwidth)) { do_internal = (fex_format(curwin->w_cursor.lnum, 1L, c) != 0); /* It may be required to save for undo again, e.g. when setline() * was called. */ ins_need_undo = TRUE; } if (do_internal) internal_format(textwidth, second_indent, flags, c == NUL, c); } if (c == NUL) /* only formatting was wanted */ return; /* Check whether this character should end a comment. */ if (did_ai && c == end_comment_pending) { char_u *line; char_u lead_end[COM_MAX_LEN]; /* end-comment string */ int middle_len, end_len; int i; /* * Need to remove existing (middle) comment leader and insert end * comment leader. First, check what comment leader we can find. */ i = get_leader_len(line = get_cursor_line_ptr(), &p, FALSE, TRUE); if (i > 0 && vim_strchr(p, COM_MIDDLE) != NULL) { /* Just checking */ /* Skip middle-comment string */ while (*p && p[-1] != ':') /* find end of middle flags */ ++p; middle_len = copy_option_part(&p, lead_end, COM_MAX_LEN, ","); /* Don't count trailing white space for middle_len */ while (middle_len > 0 && ascii_iswhite(lead_end[middle_len - 1])) --middle_len; /* Find the end-comment string */ while (*p && p[-1] != ':') /* find end of end flags */ ++p; end_len = copy_option_part(&p, lead_end, COM_MAX_LEN, ","); /* Skip white space before the cursor */ i = curwin->w_cursor.col; while (--i >= 0 && ascii_iswhite(line[i])) ; i++; /* Skip to before the middle leader */ i -= middle_len; /* Check some expected things before we go on */ if (i >= 0 && lead_end[end_len - 1] == end_comment_pending) { /* Backspace over all the stuff we want to replace */ backspace_until_column(i); /* * Insert the end-comment string, except for the last * character, which will get inserted as normal later. */ ins_bytes_len(lead_end, end_len - 1); } } } end_comment_pending = NUL; did_ai = FALSE; did_si = FALSE; can_si = FALSE; can_si_back = FALSE; // If there's any pending input, grab up to INPUT_BUFLEN at once. // This speeds up normal text input considerably. // Don't do this when 'cindent' or 'indentexpr' is set, because we might // need to re-indent at a ':', or any other character (but not what // 'paste' is set).. // Don't do this when there an InsertCharPre autocommand is defined, // because we need to fire the event for every character. if (!ISSPECIAL(c) && (!has_mbyte || (*mb_char2len)(c) == 1) && vpeekc() != NUL && !(State & REPLACE_FLAG) && !cindent_on() && !p_ri && !has_event(EVENT_INSERTCHARPRE)) { #define INPUT_BUFLEN 100 char_u buf[INPUT_BUFLEN + 1]; int i; colnr_T virtcol = 0; buf[0] = c; i = 1; if (textwidth > 0) virtcol = get_nolist_virtcol(); /* * Stop the string when: * - no more chars available * - finding a special character (command key) * - buffer is full * - running into the 'textwidth' boundary * - need to check for abbreviation: A non-word char after a word-char */ while ( (c = vpeekc()) != NUL && !ISSPECIAL(c) && (!has_mbyte || MB_BYTE2LEN_CHECK(c) == 1) && i < INPUT_BUFLEN && (textwidth == 0 || (virtcol += byte2cells(buf[i - 1])) < (colnr_T)textwidth) && !(!no_abbr && !vim_iswordc(c) && vim_iswordc(buf[i - 1]))) { c = vgetc(); if (p_hkmap && KeyTyped) c = hkmap(c); /* Hebrew mode mapping */ if (p_fkmap && KeyTyped) c = fkmap(c); /* Farsi mode mapping */ buf[i++] = c; } do_digraph(-1); /* clear digraphs */ do_digraph(buf[i-1]); /* may be the start of a digraph */ buf[i] = NUL; ins_str(buf); if (flags & INSCHAR_CTRLV) { redo_literal(*buf); i = 1; } else i = 0; if (buf[i] != NUL) AppendToRedobuffLit(buf + i, -1); } else { int cc; if (has_mbyte && (cc = (*mb_char2len)(c)) > 1) { char_u buf[MB_MAXBYTES + 1]; (*mb_char2bytes)(c, buf); buf[cc] = NUL; ins_char_bytes(buf, cc); AppendCharToRedobuff(c); } else { ins_char(c); if (flags & INSCHAR_CTRLV) redo_literal(c); else AppendCharToRedobuff(c); } } } /* * Format text at the current insert position. * * If the INSCHAR_COM_LIST flag is present, then the value of second_indent * will be the comment leader length sent to open_line(). */ static void internal_format ( int textwidth, int second_indent, int flags, int format_only, int c /* character to be inserted (can be NUL) */ ) { int cc; int save_char = NUL; int haveto_redraw = FALSE; int fo_ins_blank = has_format_option(FO_INS_BLANK); int fo_multibyte = has_format_option(FO_MBYTE_BREAK); int fo_white_par = has_format_option(FO_WHITE_PAR); int first_line = TRUE; colnr_T leader_len; int no_leader = FALSE; int do_comments = (flags & INSCHAR_DO_COM); int has_lbr = curwin->w_p_lbr; // make sure win_lbr_chartabsize() counts correctly curwin->w_p_lbr = false; /* * When 'ai' is off we don't want a space under the cursor to be * deleted. Replace it with an 'x' temporarily. */ if (!curbuf->b_p_ai && !(State & VREPLACE_FLAG) ) { cc = gchar_cursor(); if (ascii_iswhite(cc)) { save_char = cc; pchar_cursor('x'); } } /* * Repeat breaking lines, until the current line is not too long. */ while (!got_int) { int startcol; /* Cursor column at entry */ int wantcol; /* column at textwidth border */ int foundcol; /* column for start of spaces */ int end_foundcol = 0; /* column for start of word */ colnr_T len; colnr_T virtcol; int orig_col = 0; char_u *saved_text = NULL; colnr_T col; colnr_T end_col; virtcol = get_nolist_virtcol() + char2cells(c != NUL ? c : gchar_cursor()); if (virtcol <= (colnr_T)textwidth) break; if (no_leader) do_comments = FALSE; else if (!(flags & INSCHAR_FORMAT) && has_format_option(FO_WRAP_COMS)) do_comments = TRUE; /* Don't break until after the comment leader */ if (do_comments) leader_len = get_leader_len(get_cursor_line_ptr(), NULL, FALSE, TRUE); else leader_len = 0; /* If the line doesn't start with a comment leader, then don't * start one in a following broken line. Avoids that a %word * moved to the start of the next line causes all following lines * to start with %. */ if (leader_len == 0) no_leader = TRUE; if (!(flags & INSCHAR_FORMAT) && leader_len == 0 && !has_format_option(FO_WRAP)) break; if ((startcol = curwin->w_cursor.col) == 0) break; /* find column of textwidth border */ coladvance((colnr_T)textwidth); wantcol = curwin->w_cursor.col; curwin->w_cursor.col = startcol; foundcol = 0; /* * Find position to break at. * Stop at first entered white when 'formatoptions' has 'v' */ while ((!fo_ins_blank && !has_format_option(FO_INS_VI)) || (flags & INSCHAR_FORMAT) || curwin->w_cursor.lnum != Insstart.lnum || curwin->w_cursor.col >= Insstart.col) { if (curwin->w_cursor.col == startcol && c != NUL) cc = c; else cc = gchar_cursor(); if (WHITECHAR(cc)) { /* remember position of blank just before text */ end_col = curwin->w_cursor.col; /* find start of sequence of blanks */ while (curwin->w_cursor.col > 0 && WHITECHAR(cc)) { dec_cursor(); cc = gchar_cursor(); } if (curwin->w_cursor.col == 0 && WHITECHAR(cc)) break; /* only spaces in front of text */ /* Don't break until after the comment leader */ if (curwin->w_cursor.col < leader_len) break; if (has_format_option(FO_ONE_LETTER)) { /* do not break after one-letter words */ if (curwin->w_cursor.col == 0) break; /* one-letter word at begin */ /* do not break "#a b" when 'tw' is 2 */ if (curwin->w_cursor.col <= leader_len) break; col = curwin->w_cursor.col; dec_cursor(); cc = gchar_cursor(); if (WHITECHAR(cc)) continue; /* one-letter, continue */ curwin->w_cursor.col = col; } inc_cursor(); end_foundcol = end_col + 1; foundcol = curwin->w_cursor.col; if (curwin->w_cursor.col <= (colnr_T)wantcol) break; } else if (cc >= 0x100 && fo_multibyte) { /* Break after or before a multi-byte character. */ if (curwin->w_cursor.col != startcol) { /* Don't break until after the comment leader */ if (curwin->w_cursor.col < leader_len) break; col = curwin->w_cursor.col; inc_cursor(); /* Don't change end_foundcol if already set. */ if (foundcol != curwin->w_cursor.col) { foundcol = curwin->w_cursor.col; end_foundcol = foundcol; if (curwin->w_cursor.col <= (colnr_T)wantcol) break; } curwin->w_cursor.col = col; } if (curwin->w_cursor.col == 0) break; col = curwin->w_cursor.col; dec_cursor(); cc = gchar_cursor(); if (WHITECHAR(cc)) continue; /* break with space */ /* Don't break until after the comment leader */ if (curwin->w_cursor.col < leader_len) break; curwin->w_cursor.col = col; foundcol = curwin->w_cursor.col; end_foundcol = foundcol; if (curwin->w_cursor.col <= (colnr_T)wantcol) break; } if (curwin->w_cursor.col == 0) break; dec_cursor(); } if (foundcol == 0) { /* no spaces, cannot break line */ curwin->w_cursor.col = startcol; break; } /* Going to break the line, remove any "$" now. */ undisplay_dollar(); /* * Offset between cursor position and line break is used by replace * stack functions. VREPLACE does not use this, and backspaces * over the text instead. */ if (State & VREPLACE_FLAG) orig_col = startcol; /* Will start backspacing from here */ else replace_offset = startcol - end_foundcol; /* * adjust startcol for spaces that will be deleted and * characters that will remain on top line */ curwin->w_cursor.col = foundcol; while ((cc = gchar_cursor(), WHITECHAR(cc)) && (!fo_white_par || curwin->w_cursor.col < startcol)) inc_cursor(); startcol -= curwin->w_cursor.col; if (startcol < 0) startcol = 0; if (State & VREPLACE_FLAG) { /* * In VREPLACE mode, we will backspace over the text to be * wrapped, so save a copy now to put on the next line. */ saved_text = vim_strsave(get_cursor_pos_ptr()); curwin->w_cursor.col = orig_col; saved_text[startcol] = NUL; /* Backspace over characters that will move to the next line */ if (!fo_white_par) backspace_until_column(foundcol); } else { /* put cursor after pos. to break line */ if (!fo_white_par) curwin->w_cursor.col = foundcol; } /* * Split the line just before the margin. * Only insert/delete lines, but don't really redraw the window. */ open_line(FORWARD, OPENLINE_DELSPACES + OPENLINE_MARKFIX + (fo_white_par ? OPENLINE_KEEPTRAIL : 0) + (do_comments ? OPENLINE_DO_COM : 0) + ((flags & INSCHAR_COM_LIST) ? OPENLINE_COM_LIST : 0) , ((flags & INSCHAR_COM_LIST) ? second_indent : old_indent)); if (!(flags & INSCHAR_COM_LIST)) old_indent = 0; replace_offset = 0; if (first_line) { if (!(flags & INSCHAR_COM_LIST)) { /* * This section is for auto-wrap of numeric lists. When not * in insert mode (i.e. format_lines()), the INSCHAR_COM_LIST * flag will be set and open_line() will handle it (as seen * above). The code here (and in get_number_indent()) will * recognize comments if needed... */ if (second_indent < 0 && has_format_option(FO_Q_NUMBER)) second_indent = get_number_indent(curwin->w_cursor.lnum - 1); if (second_indent >= 0) { if (State & VREPLACE_FLAG) change_indent(INDENT_SET, second_indent, FALSE, NUL, TRUE); else if (leader_len > 0 && second_indent - leader_len > 0) { int i; int padding = second_indent - leader_len; /* We started at the first_line of a numbered list * that has a comment. the open_line() function has * inserted the proper comment leader and positioned * the cursor at the end of the split line. Now we * add the additional whitespace needed after the * comment leader for the numbered list. */ for (i = 0; i < padding; i++) ins_str((char_u *)" "); changed_bytes(curwin->w_cursor.lnum, leader_len); } else { (void)set_indent(second_indent, SIN_CHANGED); } } } first_line = FALSE; } if (State & VREPLACE_FLAG) { /* * In VREPLACE mode we have backspaced over the text to be * moved, now we re-insert it into the new line. */ ins_bytes(saved_text); xfree(saved_text); } else { /* * Check if cursor is not past the NUL off the line, cindent * may have added or removed indent. */ curwin->w_cursor.col += startcol; len = (colnr_T)STRLEN(get_cursor_line_ptr()); if (curwin->w_cursor.col > len) curwin->w_cursor.col = len; } haveto_redraw = TRUE; can_cindent = TRUE; /* moved the cursor, don't autoindent or cindent now */ did_ai = FALSE; did_si = FALSE; can_si = FALSE; can_si_back = FALSE; line_breakcheck(); } if (save_char != NUL) /* put back space after cursor */ pchar_cursor(save_char); curwin->w_p_lbr = has_lbr; if (!format_only && haveto_redraw) { update_topline(); redraw_curbuf_later(VALID); } } /* * Called after inserting or deleting text: When 'formatoptions' includes the * 'a' flag format from the current line until the end of the paragraph. * Keep the cursor at the same position relative to the text. * The caller must have saved the cursor line for undo, following ones will be * saved here. */ void auto_format ( int trailblank, /* when TRUE also format with trailing blank */ int prev_line /* may start in previous line */ ) { pos_T pos; colnr_T len; char_u *old; char_u *new, *pnew; int wasatend; int cc; if (!has_format_option(FO_AUTO)) return; pos = curwin->w_cursor; old = get_cursor_line_ptr(); /* may remove added space */ check_auto_format(FALSE); /* Don't format in Insert mode when the cursor is on a trailing blank, the * user might insert normal text next. Also skip formatting when "1" is * in 'formatoptions' and there is a single character before the cursor. * Otherwise the line would be broken and when typing another non-white * next they are not joined back together. */ wasatend = (pos.col == (colnr_T)STRLEN(old)); if (*old != NUL && !trailblank && wasatend) { dec_cursor(); cc = gchar_cursor(); if (!WHITECHAR(cc) && curwin->w_cursor.col > 0 && has_format_option(FO_ONE_LETTER)) dec_cursor(); cc = gchar_cursor(); if (WHITECHAR(cc)) { curwin->w_cursor = pos; return; } curwin->w_cursor = pos; } /* With the 'c' flag in 'formatoptions' and 't' missing: only format * comments. */ if (has_format_option(FO_WRAP_COMS) && !has_format_option(FO_WRAP) && get_leader_len(old, NULL, FALSE, TRUE) == 0) return; /* * May start formatting in a previous line, so that after "x" a word is * moved to the previous line if it fits there now. Only when this is not * the start of a paragraph. */ if (prev_line && !paragraph_start(curwin->w_cursor.lnum)) { --curwin->w_cursor.lnum; if (u_save_cursor() == FAIL) return; } /* * Do the formatting and restore the cursor position. "saved_cursor" will * be adjusted for the text formatting. */ saved_cursor = pos; format_lines((linenr_T)-1, FALSE); curwin->w_cursor = saved_cursor; saved_cursor.lnum = 0; if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count) { /* "cannot happen" */ curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count; coladvance((colnr_T)MAXCOL); } else check_cursor_col(); /* Insert mode: If the cursor is now after the end of the line while it * previously wasn't, the line was broken. Because of the rule above we * need to add a space when 'w' is in 'formatoptions' to keep a paragraph * formatted. */ if (!wasatend && has_format_option(FO_WHITE_PAR)) { new = get_cursor_line_ptr(); len = (colnr_T)STRLEN(new); if (curwin->w_cursor.col == len) { pnew = vim_strnsave(new, len + 2); pnew[len] = ' '; pnew[len + 1] = NUL; ml_replace(curwin->w_cursor.lnum, pnew, FALSE); /* remove the space later */ did_add_space = TRUE; } else /* may remove added space */ check_auto_format(FALSE); } check_cursor(); } /* * When an extra space was added to continue a paragraph for auto-formatting, * delete it now. The space must be under the cursor, just after the insert * position. */ static void check_auto_format ( int end_insert /* TRUE when ending Insert mode */ ) { int c = ' '; int cc; if (did_add_space) { cc = gchar_cursor(); if (!WHITECHAR(cc)) /* Somehow the space was removed already. */ did_add_space = FALSE; else { if (!end_insert) { inc_cursor(); c = gchar_cursor(); dec_cursor(); } if (c != NUL) { /* The space is no longer at the end of the line, delete it. */ del_char(FALSE); did_add_space = FALSE; } } } } /* * Find out textwidth to be used for formatting: * if 'textwidth' option is set, use it * else if 'wrapmargin' option is set, use curwin->w_width - 'wrapmargin' * if invalid value, use 0. * Set default to window width (maximum 79) for "gq" operator. */ int comp_textwidth ( int ff /* force formatting (for "gq" command) */ ) { int textwidth; textwidth = curbuf->b_p_tw; if (textwidth == 0 && curbuf->b_p_wm) { /* The width is the window width minus 'wrapmargin' minus all the * things that add to the margin. */ textwidth = curwin->w_width - curbuf->b_p_wm; if (cmdwin_type != 0) textwidth -= 1; textwidth -= curwin->w_p_fdc; if (signcolumn_on(curwin)) { textwidth -= 1; } if (curwin->w_p_nu || curwin->w_p_rnu) textwidth -= 8; } if (textwidth < 0) textwidth = 0; if (ff && textwidth == 0) { textwidth = curwin->w_width - 1; if (textwidth > 79) textwidth = 79; } return textwidth; } /* * Put a character in the redo buffer, for when just after a CTRL-V. */ static void redo_literal(int c) { char buf[10]; // Only digits need special treatment. Translate them into a string of // three digits. if (ascii_isdigit(c)) { vim_snprintf(buf, sizeof(buf), "%03d", c); AppendToRedobuff(buf); } else { AppendCharToRedobuff(c); } } // start_arrow() is called when an arrow key is used in insert mode. // For undo/redo it resembles hitting the key. static void start_arrow(pos_T *end_insert_pos /* can be NULL */) { start_arrow_common(end_insert_pos, true); } /// Like start_arrow() but with end_change argument. /// Will prepare for redo of CTRL-G U if "end_change" is FALSE. /// @param end_insert_pos can be NULL /// @param end_change end undoable change static void start_arrow_with_change(pos_T *end_insert_pos, bool end_change) { start_arrow_common(end_insert_pos, end_change); if (!end_change) { AppendCharToRedobuff(Ctrl_G); AppendCharToRedobuff('U'); } } /// @param end_insert_pos can be NULL /// @param end_change end undoable change static void start_arrow_common(pos_T *end_insert_pos, bool end_change) { if (!arrow_used && end_change) { // something has been inserted AppendToRedobuff(ESC_STR); stop_insert(end_insert_pos, false, false); arrow_used = true; // This means we stopped the current insert. } check_spell_redraw(); } /* * If we skipped highlighting word at cursor, do it now. * It may be skipped again, thus reset spell_redraw_lnum first. */ static void check_spell_redraw(void) { if (spell_redraw_lnum != 0) { linenr_T lnum = spell_redraw_lnum; spell_redraw_lnum = 0; redrawWinline(lnum, FALSE); } } /* * Called when starting CTRL_X_SPELL mode: Move backwards to a previous badly * spelled word, if there is one. */ static void spell_back_to_badword(void) { pos_T tpos = curwin->w_cursor; spell_bad_len = spell_move_to(curwin, BACKWARD, TRUE, TRUE, NULL); if (curwin->w_cursor.col != tpos.col) start_arrow(&tpos); } /* * stop_arrow() is called before a change is made in insert mode. * If an arrow key has been used, start a new insertion. * Returns FAIL if undo is impossible, shouldn't insert then. */ int stop_arrow(void) { if (arrow_used) { Insstart = curwin->w_cursor; //new insertion starts here if (Insstart.col > Insstart_orig.col && !ins_need_undo) { // Don't update the original insert position when moved to the // right, except when nothing was inserted yet. update_Insstart_orig = FALSE; } Insstart_textlen = (colnr_T)linetabsize(get_cursor_line_ptr()); if (u_save_cursor() == OK) { arrow_used = FALSE; ins_need_undo = FALSE; } ai_col = 0; if (State & VREPLACE_FLAG) { orig_line_count = curbuf->b_ml.ml_line_count; vr_lines_changed = 1; } ResetRedobuff(); AppendToRedobuff("1i"); // Pretend we start an insertion. new_insert_skip = 2; } else if (ins_need_undo) { if (u_save_cursor() == OK) ins_need_undo = FALSE; } /* Always open fold at the cursor line when inserting something. */ foldOpenCursor(); return arrow_used || ins_need_undo ? FAIL : OK; } /* * Do a few things to stop inserting. * "end_insert_pos" is where insert ended. It is NULL when we already jumped * to another window/buffer. */ static void stop_insert ( pos_T *end_insert_pos, int esc, /* called by ins_esc() */ int nomove /* , don't move cursor */ ) { int cc; char_u *ptr; stop_redo_ins(); replace_flush(); /* abandon replace stack */ /* * Save the inserted text for later redo with ^@ and CTRL-A. * Don't do it when "restart_edit" was set and nothing was inserted, * otherwise CTRL-O w and then will clear "last_insert". */ ptr = get_inserted(); if (did_restart_edit == 0 || (ptr != NULL && (int)STRLEN(ptr) > new_insert_skip)) { xfree(last_insert); last_insert = ptr; last_insert_skip = new_insert_skip; } else xfree(ptr); if (!arrow_used && end_insert_pos != NULL) { /* Auto-format now. It may seem strange to do this when stopping an * insertion (or moving the cursor), but it's required when appending * a line and having it end in a space. But only do it when something * was actually inserted, otherwise undo won't work. */ if (!ins_need_undo && has_format_option(FO_AUTO)) { pos_T tpos = curwin->w_cursor; /* When the cursor is at the end of the line after a space the * formatting will move it to the following word. Avoid that by * moving the cursor onto the space. */ cc = 'x'; if (curwin->w_cursor.col > 0 && gchar_cursor() == NUL) { dec_cursor(); cc = gchar_cursor(); if (!ascii_iswhite(cc)) curwin->w_cursor = tpos; } auto_format(TRUE, FALSE); if (ascii_iswhite(cc)) { if (gchar_cursor() != NUL) inc_cursor(); /* If the cursor is still at the same character, also keep * the "coladd". */ if (gchar_cursor() == NUL && curwin->w_cursor.lnum == tpos.lnum && curwin->w_cursor.col == tpos.col) curwin->w_cursor.coladd = tpos.coladd; } } /* If a space was inserted for auto-formatting, remove it now. */ check_auto_format(TRUE); /* If we just did an auto-indent, remove the white space from the end * of the line, and put the cursor back. * Do this when ESC was used or moving the cursor up/down. * Check for the old position still being valid, just in case the text * got changed unexpectedly. */ if (!nomove && did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL && curwin->w_cursor.lnum != end_insert_pos->lnum)) && end_insert_pos->lnum <= curbuf->b_ml.ml_line_count) { pos_T tpos = curwin->w_cursor; curwin->w_cursor = *end_insert_pos; check_cursor_col(); /* make sure it is not past the line */ for (;; ) { if (gchar_cursor() == NUL && curwin->w_cursor.col > 0) --curwin->w_cursor.col; cc = gchar_cursor(); if (!ascii_iswhite(cc)) break; if (del_char(TRUE) == FAIL) break; /* should not happen */ } if (curwin->w_cursor.lnum != tpos.lnum) curwin->w_cursor = tpos; else { /* reset tpos, could have been invalidated in the loop above */ tpos = curwin->w_cursor; tpos.col++; if (cc != NUL && gchar_pos(&tpos) == NUL) { ++curwin->w_cursor.col; // put cursor back on the NUL } } /* may have started Visual mode, adjust the position for * deleted characters. */ if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum) { int len = (int)STRLEN(get_cursor_line_ptr()); if (VIsual.col > len) { VIsual.col = len; VIsual.coladd = 0; } } } } did_ai = FALSE; did_si = FALSE; can_si = FALSE; can_si_back = FALSE; /* Set '[ and '] to the inserted text. When end_insert_pos is NULL we are * now in a different buffer. */ if (end_insert_pos != NULL) { curbuf->b_op_start = Insstart; curbuf->b_op_start_orig = Insstart_orig; curbuf->b_op_end = *end_insert_pos; } } /* * Set the last inserted text to a single character. * Used for the replace command. */ void set_last_insert(int c) { char_u *s; xfree(last_insert); last_insert = xmalloc(MB_MAXBYTES * 3 + 5); s = last_insert; /* Use the CTRL-V only when entering a special char */ if (c < ' ' || c == DEL) *s++ = Ctrl_V; s = add_char2buf(c, s); *s++ = ESC; *s++ = NUL; last_insert_skip = 0; } #if defined(EXITFREE) void free_last_insert(void) { xfree(last_insert); last_insert = NULL; xfree(compl_orig_text); compl_orig_text = NULL; } #endif /* * Add character "c" to buffer "s". Escape the special meaning of K_SPECIAL * and CSI. Handle multi-byte characters. * Returns a pointer to after the added bytes. */ char_u *add_char2buf(int c, char_u *s) { char_u temp[MB_MAXBYTES + 1]; int i; int len; len = (*mb_char2bytes)(c, temp); for (i = 0; i < len; ++i) { c = temp[i]; /* Need to escape K_SPECIAL and CSI like in the typeahead buffer. */ if (c == K_SPECIAL) { *s++ = K_SPECIAL; *s++ = KS_SPECIAL; *s++ = KE_FILLER; } else *s++ = c; } return s; } /* * move cursor to start of line * if flags & BL_WHITE move to first non-white * if flags & BL_SOL move to first non-white if startofline is set, * otherwise keep "curswant" column * if flags & BL_FIX don't leave the cursor on a NUL. */ void beginline(int flags) { if ((flags & BL_SOL) && !p_sol) coladvance(curwin->w_curswant); else { curwin->w_cursor.col = 0; curwin->w_cursor.coladd = 0; if (flags & (BL_WHITE | BL_SOL)) { char_u *ptr; for (ptr = get_cursor_line_ptr(); ascii_iswhite(*ptr) && !((flags & BL_FIX) && ptr[1] == NUL); ++ptr) ++curwin->w_cursor.col; } curwin->w_set_curswant = TRUE; } } /* * oneright oneleft cursor_down cursor_up * * Move one char {right,left,down,up}. * Doesn't move onto the NUL past the end of the line, unless it is allowed. * Return OK when successful, FAIL when we hit a line of file boundary. */ int oneright(void) { char_u *ptr; int l; if (virtual_active()) { pos_T prevpos = curwin->w_cursor; /* Adjust for multi-wide char (excluding TAB) */ ptr = get_cursor_pos_ptr(); coladvance(getviscol() + ((*ptr != TAB && vim_isprintc( (*mb_ptr2char)(ptr) )) ? ptr2cells(ptr) : 1)); curwin->w_set_curswant = TRUE; /* Return OK if the cursor moved, FAIL otherwise (at window edge). */ return (prevpos.col != curwin->w_cursor.col || prevpos.coladd != curwin->w_cursor.coladd) ? OK : FAIL; } ptr = get_cursor_pos_ptr(); if (*ptr == NUL) return FAIL; /* already at the very end */ if (has_mbyte) l = (*mb_ptr2len)(ptr); else l = 1; /* move "l" bytes right, but don't end up on the NUL, unless 'virtualedit' * contains "onemore". */ if (ptr[l] == NUL && (ve_flags & VE_ONEMORE) == 0 ) return FAIL; curwin->w_cursor.col += l; curwin->w_set_curswant = TRUE; return OK; } int oneleft(void) { if (virtual_active()) { int width; int v = getviscol(); if (v == 0) return FAIL; /* We might get stuck on 'showbreak', skip over it. */ width = 1; for (;; ) { coladvance(v - width); /* getviscol() is slow, skip it when 'showbreak' is empty, 'breakindent' is not set and there are no multi-byte characters */ if ((*p_sbr == NUL && !curwin->w_p_bri && !has_mbyte ) || getviscol() < v) break; ++width; } if (curwin->w_cursor.coladd == 1) { char_u *ptr; /* Adjust for multi-wide char (not a TAB) */ ptr = get_cursor_pos_ptr(); if (*ptr != TAB && vim_isprintc( (*mb_ptr2char)(ptr) ) && ptr2cells(ptr) > 1) curwin->w_cursor.coladd = 0; } curwin->w_set_curswant = TRUE; return OK; } if (curwin->w_cursor.col == 0) return FAIL; curwin->w_set_curswant = TRUE; --curwin->w_cursor.col; /* if the character on the left of the current cursor is a multi-byte * character, move to its first byte */ if (has_mbyte) mb_adjust_cursor(); return OK; } int cursor_up ( long n, int upd_topline /* When TRUE: update topline */ ) { linenr_T lnum; if (n > 0) { lnum = curwin->w_cursor.lnum; // This fails if the cursor is already in the first line. if (lnum <= 1) { return FAIL; } if (n >= lnum) lnum = 1; else if (hasAnyFolding(curwin)) { /* * Count each sequence of folded lines as one logical line. */ /* go to the start of the current fold */ (void)hasFolding(lnum, &lnum, NULL); while (n--) { /* move up one line */ --lnum; if (lnum <= 1) break; /* If we entered a fold, move to the beginning, unless in * Insert mode or when 'foldopen' contains "all": it will open * in a moment. */ if (n > 0 || !((State & INSERT) || (fdo_flags & FDO_ALL))) (void)hasFolding(lnum, &lnum, NULL); } if (lnum < 1) lnum = 1; } else lnum -= n; curwin->w_cursor.lnum = lnum; } /* try to advance to the column we want to be at */ coladvance(curwin->w_curswant); if (upd_topline) update_topline(); /* make sure curwin->w_topline is valid */ return OK; } /* * Cursor down a number of logical lines. */ int cursor_down ( long n, int upd_topline /* When TRUE: update topline */ ) { linenr_T lnum; if (n > 0) { lnum = curwin->w_cursor.lnum; /* Move to last line of fold, will fail if it's the end-of-file. */ (void)hasFolding(lnum, NULL, &lnum); // This fails if the cursor is already in the last line. if (lnum >= curbuf->b_ml.ml_line_count) { return FAIL; } if (lnum + n >= curbuf->b_ml.ml_line_count) lnum = curbuf->b_ml.ml_line_count; else if (hasAnyFolding(curwin)) { linenr_T last; /* count each sequence of folded lines as one logical line */ while (n--) { if (hasFolding(lnum, NULL, &last)) lnum = last + 1; else ++lnum; if (lnum >= curbuf->b_ml.ml_line_count) break; } if (lnum > curbuf->b_ml.ml_line_count) lnum = curbuf->b_ml.ml_line_count; } else lnum += n; curwin->w_cursor.lnum = lnum; } /* try to advance to the column we want to be at */ coladvance(curwin->w_curswant); if (upd_topline) update_topline(); /* make sure curwin->w_topline is valid */ return OK; } /* * Stuff the last inserted text in the read buffer. * Last_insert actually is a copy of the redo buffer, so we * first have to remove the command. */ int stuff_inserted ( int c, /* Command character to be inserted */ long count, /* Repeat this many times */ int no_esc /* Don't add an ESC at the end */ ) { char_u *esc_ptr; char_u *ptr; char_u *last_ptr; char_u last = NUL; ptr = get_last_insert(); if (ptr == NULL) { EMSG(_(e_noinstext)); return FAIL; } /* may want to stuff the command character, to start Insert mode */ if (c != NUL) stuffcharReadbuff(c); if ((esc_ptr = (char_u *)vim_strrchr(ptr, ESC)) != NULL) *esc_ptr = NUL; /* remove the ESC */ /* when the last char is either "0" or "^" it will be quoted if no ESC * comes after it OR if it will inserted more than once and "ptr" * starts with ^D. -- Acevedo */ last_ptr = (esc_ptr ? esc_ptr : ptr + STRLEN(ptr)) - 1; if (last_ptr >= ptr && (*last_ptr == '0' || *last_ptr == '^') && (no_esc || (*ptr == Ctrl_D && count > 1))) { last = *last_ptr; *last_ptr = NUL; } do { stuffReadbuff((const char *)ptr); // A trailing "0" is inserted as "048", "^" as "^". if (last) { stuffReadbuff((last == '0' ? "\026\060\064\070" : "\026^")); } } while (--count > 0); if (last) *last_ptr = last; if (esc_ptr != NULL) *esc_ptr = ESC; /* put the ESC back */ /* may want to stuff a trailing ESC, to get out of Insert mode */ if (!no_esc) stuffcharReadbuff(ESC); return OK; } char_u *get_last_insert(void) { if (last_insert == NULL) return NULL; return last_insert + last_insert_skip; } /* * Get last inserted string, and remove trailing . * Returns pointer to allocated memory (must be freed) or NULL. */ char_u *get_last_insert_save(void) { char_u *s; int len; if (last_insert == NULL) return NULL; s = vim_strsave(last_insert + last_insert_skip); len = (int)STRLEN(s); if (len > 0 && s[len - 1] == ESC) /* remove trailing ESC */ s[len - 1] = NUL; return s; } /// Check the word in front of the cursor for an abbreviation. /// Called when the non-id character "c" has been entered. /// When an abbreviation is recognized it is removed from the text and /// the replacement string is inserted in typebuf.tb_buf[], followed by "c". /// /// @param c character /// /// @return true if the word is a known abbreviation. static bool echeck_abbr(int c) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { // Don't check for abbreviation in paste mode, when disabled and just // after moving around with cursor keys. if (p_paste || no_abbr || arrow_used) { return false; } return check_abbr(c, get_cursor_line_ptr(), curwin->w_cursor.col, curwin->w_cursor.lnum == Insstart.lnum ? Insstart.col : 0); } /* * replace-stack functions * * When replacing characters, the replaced characters are remembered for each * new character. This is used to re-insert the old text when backspacing. * * There is a NUL headed list of characters for each character that is * currently in the file after the insertion point. When BS is used, one NUL * headed list is put back for the deleted character. * * For a newline, there are two NUL headed lists. One contains the characters * that the NL replaced. The extra one stores the characters after the cursor * that were deleted (always white space). */ static char_u *replace_stack = NULL; static ssize_t replace_stack_nr = 0; /* next entry in replace stack */ static ssize_t replace_stack_len = 0; /* max. number of entries */ /// Push character that is replaced onto the the replace stack. /// /// replace_offset is normally 0, in which case replace_push will add a new /// character at the end of the stack. If replace_offset is not 0, that many /// characters will be left on the stack above the newly inserted character. /// /// @param c character that is replaced (NUL is none) void replace_push(int c) { if (replace_stack_nr < replace_offset) { // nothing to do return; } if (replace_stack_len <= replace_stack_nr) { replace_stack_len += 50; replace_stack = xrealloc(replace_stack, replace_stack_len); } char_u *p = replace_stack + replace_stack_nr - replace_offset; if (replace_offset) { memmove(p + 1, p, replace_offset); } *p = (char_u)c; ++replace_stack_nr; } /* * Push a character onto the replace stack. Handles a multi-byte character in * reverse byte order, so that the first byte is popped off first. * Return the number of bytes done (includes composing characters). */ int replace_push_mb(char_u *p) { int l = (*mb_ptr2len)(p); int j; for (j = l - 1; j >= 0; --j) replace_push(p[j]); return l; } /// Pop one item from the replace stack. /// /// @return -1 if stack is empty, replaced character or NUL otherwise static int replace_pop(void) { return (replace_stack_nr == 0) ? -1 : (int)replace_stack[--replace_stack_nr]; } /* * Join the top two items on the replace stack. This removes to "off"'th NUL * encountered. */ static void replace_join ( int off /* offset for which NUL to remove */ ) { int i; for (i = replace_stack_nr; --i >= 0; ) if (replace_stack[i] == NUL && off-- <= 0) { --replace_stack_nr; memmove(replace_stack + i, replace_stack + i + 1, (size_t)(replace_stack_nr - i)); return; } } /* * Pop bytes from the replace stack until a NUL is found, and insert them * before the cursor. Can only be used in REPLACE or VREPLACE mode. */ static void replace_pop_ins(void) { int cc; int oldState = State; State = NORMAL; /* don't want REPLACE here */ while ((cc = replace_pop()) > 0) { mb_replace_pop_ins(cc); dec_cursor(); } State = oldState; } /* * Insert bytes popped from the replace stack. "cc" is the first byte. If it * indicates a multi-byte char, pop the other bytes too. */ static void mb_replace_pop_ins(int cc) { int n; char_u buf[MB_MAXBYTES + 1]; int i; int c; if (has_mbyte && (n = MB_BYTE2LEN(cc)) > 1) { buf[0] = cc; for (i = 1; i < n; ++i) buf[i] = replace_pop(); ins_bytes_len(buf, n); } else ins_char(cc); if (enc_utf8) /* Handle composing chars. */ for (;; ) { c = replace_pop(); if (c == -1) /* stack empty */ break; if ((n = MB_BYTE2LEN(c)) == 1) { /* Not a multi-byte char, put it back. */ replace_push(c); break; } else { buf[0] = c; assert(n > 1); for (i = 1; i < n; ++i) buf[i] = replace_pop(); if (utf_iscomposing(utf_ptr2char(buf))) ins_bytes_len(buf, n); else { /* Not a composing char, put it back. */ for (i = n - 1; i >= 0; --i) replace_push(buf[i]); break; } } } } /* * make the replace stack empty * (called when exiting replace mode) */ static void replace_flush(void) { xfree(replace_stack); replace_stack = NULL; replace_stack_len = 0; replace_stack_nr = 0; } /* * Handle doing a BS for one character. * cc < 0: replace stack empty, just move cursor * cc == 0: character was inserted, delete it * cc > 0: character was replaced, put cc (first byte of original char) back * and check for more characters to be put back * When "limit_col" is >= 0, don't delete before this column. Matters when * using composing characters, use del_char_after_col() instead of del_char(). */ static void replace_do_bs(int limit_col) { int cc; int orig_len = 0; int ins_len; int orig_vcols = 0; colnr_T start_vcol; char_u *p; int i; int vcol; const int l_State = State; cc = replace_pop(); if (cc > 0) { if (l_State & VREPLACE_FLAG) { /* Get the number of screen cells used by the character we are * going to delete. */ getvcol(curwin, &curwin->w_cursor, NULL, &start_vcol, NULL); orig_vcols = chartabsize(get_cursor_pos_ptr(), start_vcol); } if (has_mbyte) { (void)del_char_after_col(limit_col); if (l_State & VREPLACE_FLAG) orig_len = (int)STRLEN(get_cursor_pos_ptr()); replace_push(cc); } else { pchar_cursor(cc); if (l_State & VREPLACE_FLAG) orig_len = (int)STRLEN(get_cursor_pos_ptr()) - 1; } replace_pop_ins(); if (l_State & VREPLACE_FLAG) { /* Get the number of screen cells used by the inserted characters */ p = get_cursor_pos_ptr(); ins_len = (int)STRLEN(p) - orig_len; vcol = start_vcol; for (i = 0; i < ins_len; ++i) { vcol += chartabsize(p + i, vcol); i += (*mb_ptr2len)(p) - 1; } vcol -= start_vcol; /* Delete spaces that were inserted after the cursor to keep the * text aligned. */ curwin->w_cursor.col += ins_len; while (vcol > orig_vcols && gchar_cursor() == ' ') { del_char(FALSE); ++orig_vcols; } curwin->w_cursor.col -= ins_len; } /* mark the buffer as changed and prepare for displaying */ changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col); } else if (cc == 0) (void)del_char_after_col(limit_col); } /// Check that C-indenting is on. static bool cindent_on(void) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { return !p_paste && (curbuf->b_p_cin || *curbuf->b_p_inde != NUL); } /* * Re-indent the current line, based on the current contents of it and the * surrounding lines. Fixing the cursor position seems really easy -- I'm very * confused what all the part that handles Control-T is doing that I'm not. * "get_the_indent" should be get_c_indent, get_expr_indent or get_lisp_indent. */ void fixthisline(IndentGetter get_the_indent) { int amount = get_the_indent(); if (amount >= 0) { change_indent(INDENT_SET, amount, false, 0, true); if (linewhite(curwin->w_cursor.lnum)) { did_ai = true; // delete the indent if the line stays empty } } } void fix_indent(void) { if (p_paste) return; if (curbuf->b_p_lisp && curbuf->b_p_ai) fixthisline(get_lisp_indent); else if (cindent_on()) do_c_expr_indent(); } /// Check that "cinkeys" contains the key "keytyped", /// when == '*': Only if key is preceded with '*' (indent before insert) /// when == '!': Only if key is preceded with '!' (don't insert) /// when == ' ': Only if key is not preceded with '*' (indent afterwards) /// /// "keytyped" can have a few special values: /// KEY_OPEN_FORW : /// KEY_OPEN_BACK : /// KEY_COMPLETE : Just finished completion. /// /// @param keytyped key that was typed /// @param when condition on when to perform the check /// @param line_is_empty when true, accept keys with '0' before them. bool in_cinkeys(int keytyped, int when, bool line_is_empty) { char_u *look; int try_match; int try_match_word; char_u *p; char_u *line; int icase; int i; if (keytyped == NUL) { // Can happen with CTRL-Y and CTRL-E on a short line. return false; } if (*curbuf->b_p_inde != NUL) look = curbuf->b_p_indk; /* 'indentexpr' set: use 'indentkeys' */ else look = curbuf->b_p_cink; /* 'indentexpr' empty: use 'cinkeys' */ while (*look) { /* * Find out if we want to try a match with this key, depending on * 'when' and a '*' or '!' before the key. */ switch (when) { case '*': try_match = (*look == '*'); break; case '!': try_match = (*look == '!'); break; default: try_match = (*look != '*'); break; } if (*look == '*' || *look == '!') { look++; } // If there is a '0', only accept a match if the line is empty. // But may still match when typing last char of a word. if (*look == '0') { try_match_word = try_match; if (!line_is_empty) { try_match = false; } look++; } else { try_match_word = false; } // Does it look like a control character? if (*look == '^' && look[1] >= '?' && look[1] <= '_') { if (try_match && keytyped == Ctrl_chr(look[1])) { return true; } look += 2; // 'o' means "o" command, open forward. // 'O' means "O" command, open backward. } else if (*look == 'o') { if (try_match && keytyped == KEY_OPEN_FORW) { return true; } look++; } else if (*look == 'O') { if (try_match && keytyped == KEY_OPEN_BACK) { return true; } look++; // 'e' means to check for "else" at start of line and just before the // cursor. } else if (*look == 'e') { if (try_match && keytyped == 'e' && curwin->w_cursor.col >= 4) { p = get_cursor_line_ptr(); if (skipwhite(p) == p + curwin->w_cursor.col - 4 && STRNCMP(p + curwin->w_cursor.col - 4, "else", 4) == 0) { return true; } } look++; // ':' only causes an indent if it is at the end of a label or case // statement, or when it was before typing the ':' (to fix // class::method for C++). } else if (*look == ':') { if (try_match && keytyped == ':') { p = get_cursor_line_ptr(); if (cin_iscase(p, false) || cin_isscopedecl(p) || cin_islabel()) { return true; } // Need to get the line again after cin_islabel(). p = get_cursor_line_ptr(); if (curwin->w_cursor.col > 2 && p[curwin->w_cursor.col - 1] == ':' && p[curwin->w_cursor.col - 2] == ':') { p[curwin->w_cursor.col - 1] = ' '; i = (cin_iscase(p, FALSE) || cin_isscopedecl(p) || cin_islabel()); p = get_cursor_line_ptr(); p[curwin->w_cursor.col - 1] = ':'; if (i) { return true; } } } look++; // Is it a key in <>, maybe? } else if (*look == '<') { if (try_match) { // make up some named keys , , , <0>, <>>, <<>, <*>, // <:> and so that people can re-indent on o, O, e, 0, <, // >, *, : and ! keys if they really really want to. if (vim_strchr((char_u *)"<>!*oOe0:", look[1]) != NULL && keytyped == look[1]) { return true; } if (keytyped == get_special_key_code(look + 1)) { return true; } } while (*look && *look != '>') look++; while (*look == '>') look++; } /* * Is it a word: "=word"? */ else if (*look == '=' && look[1] != ',' && look[1] != NUL) { ++look; if (*look == '~') { icase = TRUE; ++look; } else icase = FALSE; p = vim_strchr(look, ','); if (p == NULL) p = look + STRLEN(look); if ((try_match || try_match_word) && curwin->w_cursor.col >= (colnr_T)(p - look)) { int match = FALSE; if (keytyped == KEY_COMPLETE) { char_u *s; /* Just completed a word, check if it starts with "look". * search back for the start of a word. */ line = get_cursor_line_ptr(); if (has_mbyte) { char_u *n; for (s = line + curwin->w_cursor.col; s > line; s = n) { n = mb_prevptr(line, s); if (!vim_iswordp(n)) break; } } else for (s = line + curwin->w_cursor.col; s > line; --s) if (!vim_iswordc(s[-1])) break; assert(p >= look && (uintmax_t)(p - look) <= SIZE_MAX); if (s + (p - look) <= line + curwin->w_cursor.col && (icase ? mb_strnicmp(s, look, (size_t)(p - look)) : STRNCMP(s, look, p - look)) == 0) match = TRUE; } else /* TODO: multi-byte */ if (keytyped == (int)p[-1] || (icase && keytyped < 256 && TOLOWER_LOC(keytyped) == TOLOWER_LOC((int)p[-1]))) { line = get_cursor_pos_ptr(); assert(p >= look && (uintmax_t)(p - look) <= SIZE_MAX); if ((curwin->w_cursor.col == (colnr_T)(p - look) || !vim_iswordc(line[-(p - look) - 1])) && (icase ? mb_strnicmp(line - (p - look), look, (size_t)(p - look)) : STRNCMP(line - (p - look), look, p - look)) == 0) match = TRUE; } if (match && try_match_word && !try_match) { /* "0=word": Check if there are only blanks before the * word. */ line = get_cursor_line_ptr(); if ((int)(skipwhite(line) - line) != (int)(curwin->w_cursor.col - (p - look))) match = FALSE; } if (match) { return true; } } look = p; // Ok, it's a boring generic character. } else { if (try_match && *look == keytyped) { return true; } look++; } /* * Skip over ", ". */ look = skip_to_option_part(look); } return false; } /* * Map Hebrew keyboard when in hkmap mode. */ int hkmap(int c) { if (p_hkmapp) { /* phonetic mapping, by Ilya Dogolazky */ enum {hALEF=0, BET, GIMEL, DALET, HEI, VAV, ZAIN, HET, TET, IUD, KAFsofit, hKAF, LAMED, MEMsofit, MEM, NUNsofit, NUN, SAMEH, AIN, PEIsofit, PEI, ZADIsofit, ZADI, KOF, RESH, hSHIN, TAV}; static char_u map[26] = {(char_u)hALEF /*a*/, (char_u)BET /*b*/, (char_u)hKAF /*c*/, (char_u)DALET /*d*/, (char_u)-1 /*e*/, (char_u)PEIsofit /*f*/, (char_u)GIMEL /*g*/, (char_u)HEI /*h*/, (char_u)IUD /*i*/, (char_u)HET /*j*/, (char_u)KOF /*k*/, (char_u)LAMED /*l*/, (char_u)MEM /*m*/, (char_u)NUN /*n*/, (char_u)SAMEH /*o*/, (char_u)PEI /*p*/, (char_u)-1 /*q*/, (char_u)RESH /*r*/, (char_u)ZAIN /*s*/, (char_u)TAV /*t*/, (char_u)TET /*u*/, (char_u)VAV /*v*/, (char_u)hSHIN /*w*/, (char_u)-1 /*x*/, (char_u)AIN /*y*/, (char_u)ZADI /*z*/}; if (c == 'N' || c == 'M' || c == 'P' || c == 'C' || c == 'Z') return (int)(map[CharOrd(c)] - 1 + p_aleph); /* '-1'='sofit' */ else if (c == 'x') return 'X'; else if (c == 'q') return '\''; /* {geresh}={'} */ else if (c == 246) return ' '; /* \"o --> ' ' for a german keyboard */ else if (c == 228) return ' '; /* \"a --> ' ' -- / -- */ else if (c == 252) return ' '; /* \"u --> ' ' -- / -- */ /* NOTE: islower() does not do the right thing for us on Linux so we * do this the same was as 5.7 and previous, so it works correctly on * all systems. Specifically, the e.g. Delete and Arrow keys are * munged and won't work if e.g. searching for Hebrew text. */ else if (c >= 'a' && c <= 'z') return (int)(map[CharOrdLow(c)] + p_aleph); else return c; } else { switch (c) { case '`': return ';'; case '/': return '.'; case '\'': return ','; case 'q': return '/'; case 'w': return '\''; /* Hebrew letters - set offset from 'a' */ case ',': c = '{'; break; case '.': c = 'v'; break; case ';': c = 't'; break; default: { static char str[] = "zqbcxlsjphmkwonu ydafe rig"; if (c < 'a' || c > 'z') return c; c = str[CharOrdLow(c)]; break; } } return (int)(CharOrdLow(c) + p_aleph); } } static void ins_reg(void) { int need_redraw = FALSE; int regname; int literally = 0; int vis_active = VIsual_active; /* * If we are going to wait for a character, show a '"'. */ pc_status = PC_STATUS_UNSET; if (redrawing() && !char_avail()) { /* may need to redraw when no more chars available now */ ins_redraw(FALSE); edit_putchar('"', TRUE); add_to_showcmd_c(Ctrl_R); } /* * Don't map the register name. This also prevents the mode message to be * deleted when ESC is hit. */ ++no_mapping; regname = plain_vgetc(); LANGMAP_ADJUST(regname, TRUE); if (regname == Ctrl_R || regname == Ctrl_O || regname == Ctrl_P) { /* Get a third key for literal register insertion */ literally = regname; add_to_showcmd_c(literally); regname = plain_vgetc(); LANGMAP_ADJUST(regname, TRUE); } --no_mapping; /* Don't call u_sync() while typing the expression or giving an error * message for it. Only call it explicitly. */ ++no_u_sync; if (regname == '=') { /* Sync undo when evaluating the expression calls setline() or * append(), so that it can be undone separately. */ u_sync_once = 2; regname = get_expr_register(); } if (regname == NUL || !valid_yank_reg(regname, false)) { vim_beep(BO_REG); need_redraw = true; // remove the '"' } else { if (literally == Ctrl_O || literally == Ctrl_P) { /* Append the command to the redo buffer. */ AppendCharToRedobuff(Ctrl_R); AppendCharToRedobuff(literally); AppendCharToRedobuff(regname); do_put(regname, NULL, BACKWARD, 1, (literally == Ctrl_P ? PUT_FIXINDENT : 0) | PUT_CURSEND); } else if (insert_reg(regname, literally) == FAIL) { vim_beep(BO_REG); need_redraw = true; // remove the '"' } else if (stop_insert_mode) { // When the '=' register was used and a function was invoked that // did ":stopinsert" then stuff_empty() returns FALSE but we won't // insert anything, need to remove the '"' need_redraw = true; } } --no_u_sync; if (u_sync_once == 1) ins_need_undo = TRUE; u_sync_once = 0; clear_showcmd(); /* If the inserted register is empty, we need to remove the '"' */ if (need_redraw || stuff_empty()) edit_unputchar(); /* Disallow starting Visual mode here, would get a weird mode. */ if (!vis_active && VIsual_active) end_visual_mode(); } /* * CTRL-G commands in Insert mode. */ static void ins_ctrl_g(void) { int c; /* Right after CTRL-X the cursor will be after the ruler. */ setcursor(); /* * Don't map the second key. This also prevents the mode message to be * deleted when ESC is hit. */ ++no_mapping; c = plain_vgetc(); --no_mapping; switch (c) { /* CTRL-G k and CTRL-G : cursor up to Insstart.col */ case K_UP: case Ctrl_K: case 'k': ins_up(TRUE); break; /* CTRL-G j and CTRL-G : cursor down to Insstart.col */ case K_DOWN: case Ctrl_J: case 'j': ins_down(TRUE); break; /* CTRL-G u: start new undoable edit */ case 'u': u_sync(TRUE); ins_need_undo = TRUE; /* Need to reset Insstart, esp. because a BS that joins * a line to the previous one must save for undo. */ update_Insstart_orig = false; Insstart = curwin->w_cursor; break; // CTRL-G U: do not break undo with the next char. case 'U': // Allow one left/right cursor movement with the next char, // without breaking undo. dont_sync_undo = MAYBE; break; /* Unknown CTRL-G command, reserved for future expansion. */ default: vim_beep(BO_CTRLG); } } /* * CTRL-^ in Insert mode. */ static void ins_ctrl_hat(void) { if (map_to_exists_mode("", LANGMAP, false)) { // ":lmap" mappings exists, Toggle use of ":lmap" mappings. if (State & LANGMAP) { curbuf->b_p_iminsert = B_IMODE_NONE; State &= ~LANGMAP; } else { curbuf->b_p_iminsert = B_IMODE_LMAP; State |= LANGMAP; } } set_iminsert_global(); showmode(); /* Show/unshow value of 'keymap' in status lines. */ status_redraw_curbuf(); } /// Handle ESC in insert mode. /// /// @param[in,out] count repeat count of the insert command /// @param cmdchar command that started the insert /// @param nomove when true, don't move the cursor /// /// @return true when leaving insert mode, false when repeating the insert. static bool ins_esc(long *count, int cmdchar, bool nomove) FUNC_ATTR_NONNULL_ARG(1) { static bool disabled_redraw = false; check_spell_redraw(); int temp = curwin->w_cursor.col; if (disabled_redraw) { RedrawingDisabled--; disabled_redraw = false; } if (!arrow_used) { // Don't append the ESC for "r" and "grx". // When 'insertmode' is set only CTRL-L stops Insert mode. Needed for // when "count" is non-zero. if (cmdchar != 'r' && cmdchar != 'v') { AppendToRedobuff(p_im ? "\014" : ESC_STR); } /* * Repeating insert may take a long time. Check for * interrupt now and then. */ if (*count > 0) { line_breakcheck(); if (got_int) *count = 0; } if (--*count > 0) { /* repeat what was typed */ /* Vi repeats the insert without replacing characters. */ if (vim_strchr(p_cpo, CPO_REPLCNT) != NULL) State &= ~REPLACE_FLAG; (void)start_redo_ins(); if (cmdchar == 'r' || cmdchar == 'v') { stuffRedoReadbuff(ESC_STR); // No ESC in redo buffer } RedrawingDisabled++; disabled_redraw = true; // Repeat the insert return false; } stop_insert(&curwin->w_cursor, TRUE, nomove); undisplay_dollar(); } /* When an autoindent was removed, curswant stays after the * indent */ if (restart_edit == NUL && (colnr_T)temp == curwin->w_cursor.col) curwin->w_set_curswant = TRUE; /* Remember the last Insert position in the '^ mark. */ if (!cmdmod.keepjumps) { RESET_FMARK(&curbuf->b_last_insert, curwin->w_cursor, curbuf->b_fnum); } /* * The cursor should end up on the last inserted character. * Don't do it for CTRL-O, unless past the end of the line. */ if (!nomove && (curwin->w_cursor.col != 0 || curwin->w_cursor.coladd > 0 ) && (restart_edit == NUL || (gchar_cursor() == NUL && !VIsual_active )) && !revins_on ) { if (curwin->w_cursor.coladd > 0 || ve_flags == VE_ALL) { oneleft(); if (restart_edit != NUL) ++curwin->w_cursor.coladd; } else { --curwin->w_cursor.col; /* Correct cursor for multi-byte character. */ if (has_mbyte) mb_adjust_cursor(); } } State = NORMAL; /* need to position cursor again (e.g. when on a TAB ) */ changed_cline_bef_curs(); setmouse(); ui_cursor_shape(); /* may show different cursor shape */ // When recording or for CTRL-O, need to display the new mode. // Otherwise remove the mode message. if (Recording || restart_edit != NUL) { showmode(); } else if (p_smd) { MSG(""); } // Exit Insert mode return true; } /* * Toggle language: hkmap and revins_on. * Move to end of reverse inserted text. */ static void ins_ctrl_(void) { if (revins_on && revins_chars && revins_scol >= 0) { while (gchar_cursor() != NUL && revins_chars--) ++curwin->w_cursor.col; } p_ri = !p_ri; revins_on = (State == INSERT && p_ri); if (revins_on) { revins_scol = curwin->w_cursor.col; revins_legal++; revins_chars = 0; undisplay_dollar(); } else revins_scol = -1; if (p_altkeymap) { /* * to be consistent also for redo command, using '.' * set arrow_used to true and stop it - causing to redo * characters entered in one mode (normal/reverse insert). */ arrow_used = TRUE; (void)stop_arrow(); p_fkmap = curwin->w_p_rl ^ p_ri; if (p_fkmap && p_ri) State = INSERT; } else p_hkmap = curwin->w_p_rl ^ p_ri; /* be consistent! */ showmode(); } /// If 'keymodel' contains "startsel", may start selection. /// /// @param c character to check // /// @return true when a CTRL-O and other keys stuffed. static bool ins_start_select(int c) FUNC_ATTR_WARN_UNUSED_RESULT { if (!km_startsel) { return false; } switch (c) { case K_KHOME: case K_KEND: case K_PAGEUP: case K_KPAGEUP: case K_PAGEDOWN: case K_KPAGEDOWN: if (!(mod_mask & MOD_MASK_SHIFT)) break; // FALLTHROUGH case K_S_LEFT: case K_S_RIGHT: case K_S_UP: case K_S_DOWN: case K_S_END: case K_S_HOME: // Start selection right away, the cursor can move with // CTRL-O when beyond the end of the line. start_selection(); // Execute the key in (insert) Select mode. stuffcharReadbuff(Ctrl_O); if (mod_mask) { const char buf[] = { (char)K_SPECIAL, (char)KS_MODIFIER, (char)(uint8_t)mod_mask, NUL }; stuffReadbuff(buf); } stuffcharReadbuff(c); return true; } return false; } /* * key in Insert mode: toggle insert/replace mode. */ static void ins_insert(int replaceState) { if (p_fkmap && p_ri) { beep_flush(); EMSG(farsi_text_3); /* encoded in Farsi */ return; } set_vim_var_string(VV_INSERTMODE, ((State & REPLACE_FLAG) ? "i" : replaceState == VREPLACE ? "v" : "r"), 1); apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, false, curbuf); if (State & REPLACE_FLAG) { State = INSERT | (State & LANGMAP); } else { State = replaceState | (State & LANGMAP); } AppendCharToRedobuff(K_INS); showmode(); ui_cursor_shape(); /* may show different cursor shape */ } /* * Pressed CTRL-O in Insert mode. */ static void ins_ctrl_o(void) { if (State & VREPLACE_FLAG) restart_edit = 'V'; else if (State & REPLACE_FLAG) restart_edit = 'R'; else restart_edit = 'I'; if (virtual_active()) ins_at_eol = FALSE; /* cursor always keeps its column */ else ins_at_eol = (gchar_cursor() == NUL); } /* * If the cursor is on an indent, ^T/^D insert/delete one * shiftwidth. Otherwise ^T/^D behave like a "<<" or ">>". * Always round the indent to 'shiftwidth', this is compatible * with vi. But vi only supports ^T and ^D after an * autoindent, we support it everywhere. */ static void ins_shift(int c, int lastc) { if (stop_arrow() == FAIL) return; AppendCharToRedobuff(c); /* * 0^D and ^^D: remove all indent. */ if (c == Ctrl_D && (lastc == '0' || lastc == '^') && curwin->w_cursor.col > 0) { --curwin->w_cursor.col; (void)del_char(FALSE); /* delete the '^' or '0' */ /* In Replace mode, restore the characters that '^' or '0' replaced. */ if (State & REPLACE_FLAG) replace_pop_ins(); if (lastc == '^') old_indent = get_indent(); /* remember curr. indent */ change_indent(INDENT_SET, 0, TRUE, 0, TRUE); } else change_indent(c == Ctrl_D ? INDENT_DEC : INDENT_INC, 0, TRUE, 0, TRUE); if (did_ai && *skipwhite(get_cursor_line_ptr()) != NUL) did_ai = FALSE; did_si = FALSE; can_si = FALSE; can_si_back = FALSE; can_cindent = FALSE; /* no cindenting after ^D or ^T */ } static void ins_del(void) { int temp; if (stop_arrow() == FAIL) return; if (gchar_cursor() == NUL) { /* delete newline */ temp = curwin->w_cursor.col; if (!can_bs(BS_EOL) // only if "eol" included || do_join(2, false, true, false, false) == FAIL) { vim_beep(BO_BS); } else { curwin->w_cursor.col = temp; } } else if (del_char(false) == FAIL) { // delete char under cursor vim_beep(BO_BS); } did_ai = FALSE; did_si = FALSE; can_si = FALSE; can_si_back = FALSE; AppendCharToRedobuff(K_DEL); } /* * Delete one character for ins_bs(). */ static void ins_bs_one(colnr_T *vcolp) { dec_cursor(); getvcol(curwin, &curwin->w_cursor, vcolp, NULL, NULL); if (State & REPLACE_FLAG) { /* Don't delete characters before the insert point when in * Replace mode */ if (curwin->w_cursor.lnum != Insstart.lnum || curwin->w_cursor.col >= Insstart.col) replace_do_bs(-1); } else (void)del_char(FALSE); } /// Handle Backspace, delete-word and delete-line in Insert mode. /// /// @param c charcter that was typed /// @param mode backspace mode to use /// @param[in,out] inserted_space_p whether a space was the last // character inserted /// /// @return true when backspace was actually used. static bool ins_bs(int c, int mode, int *inserted_space_p) FUNC_ATTR_NONNULL_ARG(3) { linenr_T lnum; int cc; int temp = 0; /* init for GCC */ colnr_T save_col; colnr_T mincol; bool did_backspace = false; int in_indent; int oldState; int cpc[MAX_MCO]; /* composing characters */ /* * can't delete anything in an empty file * can't backup past first character in buffer * can't backup past starting point unless 'backspace' > 1 * can backup to a previous line if 'backspace' == 0 */ if (bufempty() || (!revins_on && ((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0) || (!can_bs(BS_START) && (arrow_used || (curwin->w_cursor.lnum == Insstart_orig.lnum && curwin->w_cursor.col <= Insstart_orig.col))) || (!can_bs(BS_INDENT) && !arrow_used && ai_col > 0 && curwin->w_cursor.col <= ai_col) || (!can_bs(BS_EOL) && curwin->w_cursor.col == 0)))) { vim_beep(BO_BS); return false; } if (stop_arrow() == FAIL) { return false; } in_indent = inindent(0); if (in_indent) { can_cindent = false; } end_comment_pending = NUL; // After BS, don't auto-end comment if (revins_on) { // put cursor after last inserted char inc_cursor(); } // Virtualedit: // BACKSPACE_CHAR eats a virtual space // BACKSPACE_WORD eats all coladd // BACKSPACE_LINE eats all coladd and keeps going if (curwin->w_cursor.coladd > 0) { if (mode == BACKSPACE_CHAR) { curwin->w_cursor.coladd--; return true; } if (mode == BACKSPACE_WORD) { curwin->w_cursor.coladd = 0; return true; } curwin->w_cursor.coladd = 0; } /* * delete newline! */ if (curwin->w_cursor.col == 0) { lnum = Insstart.lnum; if (curwin->w_cursor.lnum == lnum || revins_on) { if (u_save((linenr_T)(curwin->w_cursor.lnum - 2), (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL) { return false; } Insstart.lnum--; Insstart.col = MAXCOL; } /* * In replace mode: * cc < 0: NL was inserted, delete it * cc >= 0: NL was replaced, put original characters back */ cc = -1; if (State & REPLACE_FLAG) cc = replace_pop(); /* returns -1 if NL was inserted */ /* * In replace mode, in the line we started replacing, we only move the * cursor. */ if ((State & REPLACE_FLAG) && curwin->w_cursor.lnum <= lnum) { dec_cursor(); } else { if (!(State & VREPLACE_FLAG) || curwin->w_cursor.lnum > orig_line_count) { temp = gchar_cursor(); /* remember current char */ --curwin->w_cursor.lnum; /* When "aw" is in 'formatoptions' we must delete the space at * the end of the line, otherwise the line will be broken * again when auto-formatting. */ if (has_format_option(FO_AUTO) && has_format_option(FO_WHITE_PAR)) { char_u *ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE); int len; len = (int)STRLEN(ptr); if (len > 0 && ptr[len - 1] == ' ') ptr[len - 1] = NUL; } do_join(2, FALSE, FALSE, FALSE, false); if (temp == NUL && gchar_cursor() != NUL) inc_cursor(); } else dec_cursor(); /* * In REPLACE mode we have to put back the text that was replaced * by the NL. On the replace stack is first a NUL-terminated * sequence of characters that were deleted and then the * characters that NL replaced. */ if (State & REPLACE_FLAG) { /* * Do the next ins_char() in NORMAL state, to * prevent ins_char() from replacing characters and * avoiding showmatch(). */ oldState = State; State = NORMAL; /* * restore characters (blanks) deleted after cursor */ while (cc > 0) { save_col = curwin->w_cursor.col; mb_replace_pop_ins(cc); curwin->w_cursor.col = save_col; cc = replace_pop(); } /* restore the characters that NL replaced */ replace_pop_ins(); State = oldState; } } did_ai = FALSE; } else { /* * Delete character(s) before the cursor. */ if (revins_on) /* put cursor on last inserted char */ dec_cursor(); mincol = 0; /* keep indent */ if (mode == BACKSPACE_LINE && (curbuf->b_p_ai || cindent_on() ) && !revins_on ) { save_col = curwin->w_cursor.col; beginline(BL_WHITE); if (curwin->w_cursor.col < save_col) mincol = curwin->w_cursor.col; curwin->w_cursor.col = save_col; } /* * Handle deleting one 'shiftwidth' or 'softtabstop'. */ if ( mode == BACKSPACE_CHAR && ((p_sta && in_indent) || (get_sts_value() != 0 && curwin->w_cursor.col > 0 && (*(get_cursor_pos_ptr() - 1) == TAB || (*(get_cursor_pos_ptr() - 1) == ' ' && (!*inserted_space_p || arrow_used)))))) { int ts; colnr_T vcol; colnr_T want_vcol; colnr_T start_vcol; *inserted_space_p = FALSE; if (p_sta && in_indent) ts = get_sw_value(curbuf); else ts = get_sts_value(); /* Compute the virtual column where we want to be. Since * 'showbreak' may get in the way, need to get the last column of * the previous character. */ getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); start_vcol = vcol; dec_cursor(); getvcol(curwin, &curwin->w_cursor, NULL, NULL, &want_vcol); inc_cursor(); want_vcol = (want_vcol / ts) * ts; /* delete characters until we are at or before want_vcol */ while (vcol > want_vcol && (cc = *(get_cursor_pos_ptr() - 1), ascii_iswhite(cc))) ins_bs_one(&vcol); /* insert extra spaces until we are at want_vcol */ while (vcol < want_vcol) { /* Remember the first char we inserted */ if (curwin->w_cursor.lnum == Insstart_orig.lnum && curwin->w_cursor.col < Insstart_orig.col) { Insstart_orig.col = curwin->w_cursor.col; } if (State & VREPLACE_FLAG) ins_char(' '); else { ins_str((char_u *)" "); if ((State & REPLACE_FLAG)) replace_push(NUL); } getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); } /* If we are now back where we started delete one character. Can * happen when using 'sts' and 'linebreak'. */ if (vcol >= start_vcol) ins_bs_one(&vcol); // Delete upto starting point, start of line or previous word. } else { int cclass = 0, prev_cclass = 0; if (has_mbyte) { cclass = mb_get_class(get_cursor_pos_ptr()); } do { if (!revins_on) { // put cursor on char to be deleted dec_cursor(); } cc = gchar_cursor(); // look multi-byte character class if (has_mbyte) { prev_cclass = cclass; cclass = mb_get_class(get_cursor_pos_ptr()); } if (mode == BACKSPACE_WORD && !ascii_isspace(cc)) { // start of word? mode = BACKSPACE_WORD_NOT_SPACE; temp = vim_iswordc(cc); } else if (mode == BACKSPACE_WORD_NOT_SPACE && ((ascii_isspace(cc) || vim_iswordc(cc) != temp) || prev_cclass != cclass)) { // end of word? if (!revins_on) { inc_cursor(); } else if (State & REPLACE_FLAG) { dec_cursor(); } break; } if (State & REPLACE_FLAG) replace_do_bs(-1); else { const bool l_enc_utf8 = enc_utf8; const int l_p_deco = p_deco; if (l_enc_utf8 && l_p_deco) (void)utfc_ptr2char(get_cursor_pos_ptr(), cpc); (void)del_char(FALSE); /* * If there are combining characters and 'delcombine' is set * move the cursor back. Don't back up before the base * character. */ if (l_enc_utf8 && l_p_deco && cpc[0] != NUL) inc_cursor(); if (revins_chars) { revins_chars--; revins_legal++; } if (revins_on && gchar_cursor() == NUL) break; } // Just a single backspace?: if (mode == BACKSPACE_CHAR) { break; } } while (revins_on || (curwin->w_cursor.col > mincol && (curwin->w_cursor.lnum != Insstart_orig.lnum || curwin->w_cursor.col != Insstart_orig.col))); } did_backspace = true; } did_si = false; can_si = false; can_si_back = false; if (curwin->w_cursor.col <= 1) { did_ai = false; } // It's a little strange to put backspaces into the redo // buffer, but it makes auto-indent a lot easier to deal // with. AppendCharToRedobuff(c); /* If deleted before the insertion point, adjust it */ if (curwin->w_cursor.lnum == Insstart_orig.lnum && curwin->w_cursor.col < Insstart_orig.col) { Insstart_orig.col = curwin->w_cursor.col; } /* vi behaviour: the cursor moves backward but the character that * was there remains visible * Vim behaviour: the cursor moves backward and the character that * was there is erased from the screen. * We can emulate the vi behaviour by pretending there is a dollar * displayed even when there isn't. * --pkv Sun Jan 19 01:56:40 EST 2003 */ if (vim_strchr(p_cpo, CPO_BACKSPACE) != NULL && dollar_vcol == -1) dollar_vcol = curwin->w_virtcol; // When deleting a char the cursor line must never be in a closed fold. // E.g., when 'foldmethod' is indent and deleting the first non-white // char before a Tab. if (did_backspace) { foldOpenCursor(); } return did_backspace; } static void ins_mouse(int c) { pos_T tpos; win_T *old_curwin = curwin; if (!mouse_has(MOUSE_INSERT)) return; undisplay_dollar(); tpos = curwin->w_cursor; if (do_mouse(NULL, c, BACKWARD, 1, 0)) { win_T *new_curwin = curwin; if (curwin != old_curwin && win_valid(old_curwin)) { /* Mouse took us to another window. We need to go back to the * previous one to stop insert there properly. */ curwin = old_curwin; curbuf = curwin->w_buffer; } start_arrow(curwin == old_curwin ? &tpos : NULL); if (curwin != new_curwin && win_valid(new_curwin)) { curwin = new_curwin; curbuf = curwin->w_buffer; } can_cindent = TRUE; } /* redraw status lines (in case another window became active) */ redraw_statuslines(); } static void ins_mousescroll(int dir) { pos_T tpos; win_T *old_curwin = curwin; int did_scroll = FALSE; tpos = curwin->w_cursor; if (mouse_row >= 0 && mouse_col >= 0) { int row, col; row = mouse_row; col = mouse_col; /* find the window at the pointer coordinates */ curwin = mouse_find_win(&row, &col); curbuf = curwin->w_buffer; } if (curwin == old_curwin) undisplay_dollar(); /* Don't scroll the window in which completion is being done. */ if (!pum_visible() || curwin != old_curwin ) { if (dir == MSCR_DOWN || dir == MSCR_UP) { if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) scroll_redraw(dir, (long)(curwin->w_botline - curwin->w_topline)); else scroll_redraw(dir, 3L); } else { mouse_scroll_horiz(dir); } did_scroll = TRUE; } curwin->w_redr_status = TRUE; curwin = old_curwin; curbuf = curwin->w_buffer; /* The popup menu may overlay the window, need to redraw it. * TODO: Would be more efficient to only redraw the windows that are * overlapped by the popup menu. */ if (pum_visible() && did_scroll) { redraw_all_later(NOT_VALID); ins_compl_show_pum(); } if (!equalpos(curwin->w_cursor, tpos)) { start_arrow(&tpos); can_cindent = TRUE; } } static void ins_left(bool end_change) { pos_T tpos; if ((fdo_flags & FDO_HOR) && KeyTyped) foldOpenCursor(); undisplay_dollar(); tpos = curwin->w_cursor; if (oneleft() == OK) { start_arrow_with_change(&tpos, end_change); if (!end_change) { AppendCharToRedobuff(K_LEFT); } /* If exit reversed string, position is fixed */ if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol) revins_legal++; revins_chars++; } else if (vim_strchr(p_ww, '[') != NULL && curwin->w_cursor.lnum > 1) { // if 'whichwrap' set for cursor in insert mode may go to previous line. // always break undo when moving upwards/downwards, else undo may break start_arrow(&tpos); --(curwin->w_cursor.lnum); coladvance((colnr_T)MAXCOL); curwin->w_set_curswant = true; // so we stay at the end } else { vim_beep(BO_CRSR); } dont_sync_undo = false; } static void ins_home(int c) { pos_T tpos; if ((fdo_flags & FDO_HOR) && KeyTyped) foldOpenCursor(); undisplay_dollar(); tpos = curwin->w_cursor; if (c == K_C_HOME) curwin->w_cursor.lnum = 1; curwin->w_cursor.col = 0; curwin->w_cursor.coladd = 0; curwin->w_curswant = 0; start_arrow(&tpos); } static void ins_end(int c) { pos_T tpos; if ((fdo_flags & FDO_HOR) && KeyTyped) foldOpenCursor(); undisplay_dollar(); tpos = curwin->w_cursor; if (c == K_C_END) curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count; coladvance((colnr_T)MAXCOL); curwin->w_curswant = MAXCOL; start_arrow(&tpos); } static void ins_s_left(void) { if ((fdo_flags & FDO_HOR) && KeyTyped) foldOpenCursor(); undisplay_dollar(); if (curwin->w_cursor.lnum > 1 || curwin->w_cursor.col > 0) { start_arrow(&curwin->w_cursor); (void)bck_word(1L, false, false); curwin->w_set_curswant = true; } else { vim_beep(BO_CRSR); } } /// @param end_change end undoable change static void ins_right(bool end_change) { if ((fdo_flags & FDO_HOR) && KeyTyped) foldOpenCursor(); undisplay_dollar(); if (gchar_cursor() != NUL || virtual_active()) { start_arrow_with_change(&curwin->w_cursor, end_change); if (!end_change) { AppendCharToRedobuff(K_RIGHT); } curwin->w_set_curswant = true; if (virtual_active()) oneright(); else { if (has_mbyte) curwin->w_cursor.col += (*mb_ptr2len)(get_cursor_pos_ptr()); else ++curwin->w_cursor.col; } revins_legal++; if (revins_chars) revins_chars--; } /* if 'whichwrap' set for cursor in insert mode, may move the * cursor to the next line */ else if (vim_strchr(p_ww, ']') != NULL && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) { start_arrow(&curwin->w_cursor); curwin->w_set_curswant = TRUE; ++curwin->w_cursor.lnum; curwin->w_cursor.col = 0; } else { vim_beep(BO_CRSR); } dont_sync_undo = false; } static void ins_s_right(void) { if ((fdo_flags & FDO_HOR) && KeyTyped) foldOpenCursor(); undisplay_dollar(); if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count || gchar_cursor() != NUL) { start_arrow(&curwin->w_cursor); (void)fwd_word(1L, false, 0); curwin->w_set_curswant = true; } else { vim_beep(BO_CRSR); } } static void ins_up ( int startcol /* when TRUE move to Insstart.col */ ) { pos_T tpos; linenr_T old_topline = curwin->w_topline; int old_topfill = curwin->w_topfill; undisplay_dollar(); tpos = curwin->w_cursor; if (cursor_up(1L, TRUE) == OK) { if (startcol) coladvance(getvcol_nolist(&Insstart)); if (old_topline != curwin->w_topline || old_topfill != curwin->w_topfill ) redraw_later(VALID); start_arrow(&tpos); can_cindent = true; } else { vim_beep(BO_CRSR); } } static void ins_pageup(void) { pos_T tpos; undisplay_dollar(); if (mod_mask & MOD_MASK_CTRL) { /* : tab page back */ if (first_tabpage->tp_next != NULL) { start_arrow(&curwin->w_cursor); goto_tabpage(-1); } return; } tpos = curwin->w_cursor; if (onepage(BACKWARD, 1L) == OK) { start_arrow(&tpos); can_cindent = true; } else { vim_beep(BO_CRSR); } } static void ins_down ( int startcol /* when TRUE move to Insstart.col */ ) { pos_T tpos; linenr_T old_topline = curwin->w_topline; int old_topfill = curwin->w_topfill; undisplay_dollar(); tpos = curwin->w_cursor; if (cursor_down(1L, TRUE) == OK) { if (startcol) coladvance(getvcol_nolist(&Insstart)); if (old_topline != curwin->w_topline || old_topfill != curwin->w_topfill ) redraw_later(VALID); start_arrow(&tpos); can_cindent = true; } else { vim_beep(BO_CRSR); } } static void ins_pagedown(void) { pos_T tpos; undisplay_dollar(); if (mod_mask & MOD_MASK_CTRL) { /* : tab page forward */ if (first_tabpage->tp_next != NULL) { start_arrow(&curwin->w_cursor); goto_tabpage(0); } return; } tpos = curwin->w_cursor; if (onepage(FORWARD, 1L) == OK) { start_arrow(&tpos); can_cindent = true; } else { vim_beep(BO_CRSR); } } /// Handle TAB in Insert or Replace mode. /// /// @return true when the TAB needs to be inserted like a normal character. static bool ins_tab(void) FUNC_ATTR_WARN_UNUSED_RESULT { int i; int temp; if (Insstart_blank_vcol == MAXCOL && curwin->w_cursor.lnum == Insstart.lnum) { Insstart_blank_vcol = get_nolist_virtcol(); } if (echeck_abbr(TAB + ABBR_OFF)) { return false; } int ind = inindent(0); if (ind) { can_cindent = false; } // When nothing special, insert TAB like a normal character if (!curbuf->b_p_et && !(p_sta && ind && curbuf->b_p_ts != get_sw_value(curbuf)) && get_sts_value() == 0) { return true; } if (stop_arrow() == FAIL) { return true; } did_ai = false; did_si = false; can_si = false; can_si_back = false; AppendToRedobuff("\t"); if (p_sta && ind) { // insert tab in indent, use "shiftwidth" temp = get_sw_value(curbuf); } else if (curbuf->b_p_sts != 0) { // use "softtabstop" when set temp = get_sts_value(); } else { // otherwise use "tabstop" temp = (int)curbuf->b_p_ts; } temp -= get_nolist_virtcol() % temp; /* * Insert the first space with ins_char(). It will delete one char in * replace mode. Insert the rest with ins_str(); it will not delete any * chars. For VREPLACE mode, we use ins_char() for all characters. */ ins_char(' '); while (--temp > 0) { if (State & VREPLACE_FLAG) ins_char(' '); else { ins_str((char_u *)" "); if (State & REPLACE_FLAG) /* no char replaced */ replace_push(NUL); } } /* * When 'expandtab' not set: Replace spaces by TABs where possible. */ if (!curbuf->b_p_et && (get_sts_value() || (p_sta && ind))) { char_u *ptr; char_u *saved_line = NULL; /* init for GCC */ pos_T pos; pos_T fpos; pos_T *cursor; colnr_T want_vcol, vcol; int change_col = -1; int save_list = curwin->w_p_list; /* * Get the current line. For VREPLACE mode, don't make real changes * yet, just work on a copy of the line. */ if (State & VREPLACE_FLAG) { pos = curwin->w_cursor; cursor = &pos; saved_line = vim_strsave(get_cursor_line_ptr()); ptr = saved_line + pos.col; } else { ptr = get_cursor_pos_ptr(); cursor = &curwin->w_cursor; } /* When 'L' is not in 'cpoptions' a tab always takes up 'ts' spaces. */ if (vim_strchr(p_cpo, CPO_LISTWM) == NULL) curwin->w_p_list = FALSE; /* Find first white before the cursor */ fpos = curwin->w_cursor; while (fpos.col > 0 && ascii_iswhite(ptr[-1])) { --fpos.col; --ptr; } /* In Replace mode, don't change characters before the insert point. */ if ((State & REPLACE_FLAG) && fpos.lnum == Insstart.lnum && fpos.col < Insstart.col) { ptr += Insstart.col - fpos.col; fpos.col = Insstart.col; } /* compute virtual column numbers of first white and cursor */ getvcol(curwin, &fpos, &vcol, NULL, NULL); getvcol(curwin, cursor, &want_vcol, NULL, NULL); /* Use as many TABs as possible. Beware of 'breakindent', 'showbreak' and 'linebreak' adding extra virtual columns. */ while (ascii_iswhite(*ptr)) { i = lbr_chartabsize(NULL, (char_u *)"\t", vcol); if (vcol + i > want_vcol) break; if (*ptr != TAB) { *ptr = TAB; if (change_col < 0) { change_col = fpos.col; /* Column of first change */ /* May have to adjust Insstart */ if (fpos.lnum == Insstart.lnum && fpos.col < Insstart.col) Insstart.col = fpos.col; } } ++fpos.col; ++ptr; vcol += i; } if (change_col >= 0) { int repl_off = 0; char_u *line = ptr; /* Skip over the spaces we need. */ while (vcol < want_vcol && *ptr == ' ') { vcol += lbr_chartabsize(line, ptr, vcol); ++ptr; ++repl_off; } if (vcol > want_vcol) { /* Must have a char with 'showbreak' just before it. */ --ptr; --repl_off; } fpos.col += repl_off; /* Delete following spaces. */ i = cursor->col - fpos.col; if (i > 0) { STRMOVE(ptr, ptr + i); /* correct replace stack. */ if ((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG) ) for (temp = i; --temp >= 0; ) replace_join(repl_off); } cursor->col -= i; /* * In VREPLACE mode, we haven't changed anything yet. Do it now by * backspacing over the changed spacing and then inserting the new * spacing. */ if (State & VREPLACE_FLAG) { /* Backspace from real cursor to change_col */ backspace_until_column(change_col); /* Insert each char in saved_line from changed_col to * ptr-cursor */ ins_bytes_len(saved_line + change_col, cursor->col - change_col); } } if (State & VREPLACE_FLAG) xfree(saved_line); curwin->w_p_list = save_list; } return false; } /// Handle CR or NL in insert mode. /// /// @return true when it can't undo. static bool ins_eol(int c) { if (echeck_abbr(c + ABBR_OFF)) { return false; } if (stop_arrow() == FAIL) { return true; } undisplay_dollar(); /* * Strange Vi behaviour: In Replace mode, typing a NL will not delete the * character under the cursor. Only push a NUL on the replace stack, * nothing to put back when the NL is deleted. */ if ((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG) ) replace_push(NUL); /* * In VREPLACE mode, a NL replaces the rest of the line, and starts * replacing the next line, so we push all of the characters left on the * line onto the replace stack. This is not done here though, it is done * in open_line(). */ /* Put cursor on NUL if on the last char and coladd is 1 (happens after * CTRL-O). */ if (virtual_active() && curwin->w_cursor.coladd > 0) coladvance(getviscol()); if (p_altkeymap && p_fkmap) fkmap(NL); /* NL in reverse insert will always start in the end of * current line. */ if (revins_on) curwin->w_cursor.col += (colnr_T)STRLEN(get_cursor_pos_ptr()); AppendToRedobuff(NL_STR); bool i = open_line(FORWARD, has_format_option(FO_RET_COMS) ? OPENLINE_DO_COM : 0, old_indent); old_indent = 0; can_cindent = TRUE; /* When inserting a line the cursor line must never be in a closed fold. */ foldOpenCursor(); return !i; } /* * Handle digraph in insert mode. * Returns character still to be inserted, or NUL when nothing remaining to be * done. */ static int ins_digraph(void) { int c; int cc; int did_putchar = FALSE; pc_status = PC_STATUS_UNSET; if (redrawing() && !char_avail()) { /* may need to redraw when no more chars available now */ ins_redraw(FALSE); edit_putchar('?', TRUE); did_putchar = TRUE; add_to_showcmd_c(Ctrl_K); } // don't map the digraph chars. This also prevents the // mode message to be deleted when ESC is hit no_mapping++; c = plain_vgetc(); no_mapping--; if (did_putchar) { // when the line fits in 'columns' the '?' is at the start of the next // line and will not be removed by the redraw edit_unputchar(); } if (IS_SPECIAL(c) || mod_mask) { /* special key */ clear_showcmd(); insert_special(c, TRUE, FALSE); return NUL; } if (c != ESC) { did_putchar = FALSE; if (redrawing() && !char_avail()) { /* may need to redraw when no more chars available now */ ins_redraw(FALSE); if (char2cells(c) == 1) { ins_redraw(FALSE); edit_putchar(c, TRUE); did_putchar = TRUE; } add_to_showcmd_c(c); } no_mapping++; cc = plain_vgetc(); no_mapping--; if (did_putchar) { // when the line fits in 'columns' the '?' is at the start of the // next line and will not be removed by a redraw edit_unputchar(); } if (cc != ESC) { AppendToRedobuff(CTRL_V_STR); c = getdigraph(c, cc, true); clear_showcmd(); return c; } } clear_showcmd(); return NUL; } /* * Handle CTRL-E and CTRL-Y in Insert mode: copy char from other line. * Returns the char to be inserted, or NUL if none found. */ int ins_copychar(linenr_T lnum) { int c; int temp; char_u *ptr, *prev_ptr; char_u *line; if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count) { vim_beep(BO_COPY); return NUL; } /* try to advance to the cursor column */ temp = 0; line = ptr = ml_get(lnum); prev_ptr = ptr; validate_virtcol(); while ((colnr_T)temp < curwin->w_virtcol && *ptr != NUL) { prev_ptr = ptr; temp += lbr_chartabsize_adv(line, &ptr, (colnr_T)temp); } if ((colnr_T)temp > curwin->w_virtcol) ptr = prev_ptr; c = (*mb_ptr2char)(ptr); if (c == NUL) { vim_beep(BO_COPY); } return c; } /* * CTRL-Y or CTRL-E typed in Insert mode. */ static int ins_ctrl_ey(int tc) { int c = tc; if (ctrl_x_mode == CTRL_X_SCROLL) { if (c == Ctrl_Y) scrolldown_clamp(); else scrollup_clamp(); redraw_later(VALID); } else { c = ins_copychar(curwin->w_cursor.lnum + (c == Ctrl_Y ? -1 : 1)); if (c != NUL) { long tw_save; // The character must be taken literally, insert like it // was typed after a CTRL-V, and pretend 'textwidth' // wasn't set. Digits, 'o' and 'x' are special after a // CTRL-V, don't use it for these. if (c < 256 && !isalnum(c)) { AppendToRedobuff(CTRL_V_STR); } tw_save = curbuf->b_p_tw; curbuf->b_p_tw = -1; insert_special(c, TRUE, FALSE); curbuf->b_p_tw = tw_save; revins_chars++; revins_legal++; c = Ctrl_V; /* pretend CTRL-V is last character */ auto_format(FALSE, TRUE); } } return c; } /* * Try to do some very smart auto-indenting. * Used when inserting a "normal" character. */ static void ins_try_si(int c) { pos_T *pos, old_pos; char_u *ptr; int i; int temp; /* * do some very smart indenting when entering '{' or '}' */ if (((did_si || can_si_back) && c == '{') || (can_si && c == '}')) { /* * for '}' set indent equal to indent of line containing matching '{' */ if (c == '}' && (pos = findmatch(NULL, '{')) != NULL) { old_pos = curwin->w_cursor; /* * If the matching '{' has a ')' immediately before it (ignoring * white-space), then line up with the start of the line * containing the matching '(' if there is one. This handles the * case where an "if (..\n..) {" statement continues over multiple * lines -- webb */ ptr = ml_get(pos->lnum); i = pos->col; if (i > 0) /* skip blanks before '{' */ while (--i > 0 && ascii_iswhite(ptr[i])) ; curwin->w_cursor.lnum = pos->lnum; curwin->w_cursor.col = i; if (ptr[i] == ')' && (pos = findmatch(NULL, '(')) != NULL) curwin->w_cursor = *pos; i = get_indent(); curwin->w_cursor = old_pos; if (State & VREPLACE_FLAG) change_indent(INDENT_SET, i, FALSE, NUL, TRUE); else (void)set_indent(i, SIN_CHANGED); } else if (curwin->w_cursor.col > 0) { /* * when inserting '{' after "O" reduce indent, but not * more than indent of previous line */ temp = TRUE; if (c == '{' && can_si_back && curwin->w_cursor.lnum > 1) { old_pos = curwin->w_cursor; i = get_indent(); while (curwin->w_cursor.lnum > 1) { ptr = skipwhite(ml_get(--(curwin->w_cursor.lnum))); /* ignore empty lines and lines starting with '#'. */ if (*ptr != '#' && *ptr != NUL) break; } if (get_indent() >= i) temp = FALSE; curwin->w_cursor = old_pos; } if (temp) shift_line(TRUE, FALSE, 1, TRUE); } } /* * set indent of '#' always to 0 */ if (curwin->w_cursor.col > 0 && can_si && c == '#') { /* remember current indent for next line */ old_indent = get_indent(); (void)set_indent(0, SIN_CHANGED); } /* Adjust ai_col, the char at this position can be deleted. */ if (ai_col > curwin->w_cursor.col) ai_col = curwin->w_cursor.col; } /* * Get the value that w_virtcol would have when 'list' is off. * Unless 'cpo' contains the 'L' flag. */ static colnr_T get_nolist_virtcol(void) { if (curwin->w_p_list && vim_strchr(p_cpo, CPO_LISTWM) == NULL) return getvcol_nolist(&curwin->w_cursor); validate_virtcol(); return curwin->w_virtcol; } /* * Handle the InsertCharPre autocommand. * "c" is the character that was typed. * Return a pointer to allocated memory with the replacement string. * Return NULL to continue inserting "c". */ static char_u *do_insert_char_pre(int c) { char buf[MB_MAXBYTES + 1]; // Return quickly when there is nothing to do. if (!has_event(EVENT_INSERTCHARPRE)) { return NULL; } if (has_mbyte) { buf[(*mb_char2bytes)(c, (char_u *) buf)] = NUL; } else { buf[0] = c; buf[1] = NUL; } // Lock the text to avoid weird things from happening. textlock++; set_vim_var_string(VV_CHAR, buf, -1); char_u *res = NULL; if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, FALSE, curbuf)) { /* Get the value of v:char. It may be empty or more than one * character. Only use it when changed, otherwise continue with the * original character to avoid breaking autoindent. */ if (STRCMP(buf, get_vim_var_str(VV_CHAR)) != 0) res = vim_strsave(get_vim_var_str(VV_CHAR)); } set_vim_var_string(VV_CHAR, NULL, -1); textlock--; return res; } static void show_pum(int prev_w_wrow, int prev_w_leftcol) { // RedrawingDisabled may be set when invoked through complete(). int n = RedrawingDisabled; RedrawingDisabled = 0; // If the cursor moved or the display scrolled we need to remove the pum // first. setcursor(); if (prev_w_wrow != curwin->w_wrow || prev_w_leftcol != curwin->w_leftcol) { ins_compl_del_pum(); } ins_compl_show_pum(); setcursor(); RedrawingDisabled = n; } neovim-0.2.2/src/nvim/edit.h000066400000000000000000000025401320401574200156450ustar00rootroot00000000000000#ifndef NVIM_EDIT_H #define NVIM_EDIT_H #include "nvim/vim.h" /* * Array indexes used for cptext argument of ins_compl_add(). */ #define CPT_ABBR 0 /* "abbr" */ #define CPT_MENU 1 /* "menu" */ #define CPT_KIND 2 /* "kind" */ #define CPT_INFO 3 /* "info" */ #define CPT_COUNT 4 /* Number of entries */ typedef int (*IndentGetter)(void); /* Values for in_cinkeys() */ #define KEY_OPEN_FORW 0x101 #define KEY_OPEN_BACK 0x102 #define KEY_COMPLETE 0x103 /* end of completion */ /* Values for change_indent() */ #define INDENT_SET 1 /* set indent */ #define INDENT_INC 2 /* increase indent */ #define INDENT_DEC 3 /* decrease indent */ /* flags for beginline() */ #define BL_WHITE 1 /* cursor on first non-white in the line */ #define BL_SOL 2 /* use 'sol' option */ #define BL_FIX 4 /* don't leave cursor on a NUL */ /* flags for insertchar() */ #define INSCHAR_FORMAT 1 /* force formatting */ #define INSCHAR_DO_COM 2 /* format comments */ #define INSCHAR_CTRLV 4 /* char typed just after CTRL-V */ #define INSCHAR_NO_FEX 8 /* don't use 'formatexpr' */ #define INSCHAR_COM_LIST 16 /* format comments with list/2nd line indent */ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "edit.h.generated.h" #endif #endif // NVIM_EDIT_H neovim-0.2.2/src/nvim/eval.c000066400000000000000000023127531320401574200156560ustar00rootroot00000000000000// This is an open source non-commercial project. Dear PVS-Studio, please check // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /* * eval.c: Expression evaluation. */ #include #include #include #include #include #include #include #include #include #include #include "nvim/assert.h" #include "nvim/vim.h" #include "nvim/ascii.h" #ifdef HAVE_LOCALE_H # include #endif #include "nvim/eval.h" #include "nvim/buffer.h" #include "nvim/charset.h" #include "nvim/cursor.h" #include "nvim/diff.h" #include "nvim/edit.h" #include "nvim/ex_cmds.h" #include "nvim/ex_cmds2.h" #include "nvim/ex_docmd.h" #include "nvim/ex_eval.h" #include "nvim/ex_getln.h" #include "nvim/fileio.h" #include "nvim/os/fileio.h" #include "nvim/func_attr.h" #include "nvim/fold.h" #include "nvim/getchar.h" #include "nvim/hashtab.h" #include "nvim/iconv.h" #include "nvim/if_cscope.h" #include "nvim/indent_c.h" #include "nvim/indent.h" #include "nvim/mark.h" #include "nvim/mbyte.h" #include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/menu.h" #include "nvim/message.h" #include "nvim/misc1.h" #include "nvim/keymap.h" #include "nvim/map.h" #include "nvim/file_search.h" #include "nvim/garray.h" #include "nvim/move.h" #include "nvim/normal.h" #include "nvim/ops.h" #include "nvim/option.h" #include "nvim/os_unix.h" #include "nvim/path.h" #include "nvim/popupmnu.h" #include "nvim/profile.h" #include "nvim/quickfix.h" #include "nvim/regexp.h" #include "nvim/screen.h" #include "nvim/search.h" #include "nvim/sha256.h" #include "nvim/spell.h" #include "nvim/state.h" #include "nvim/strings.h" #include "nvim/syntax.h" #include "nvim/tag.h" #include "nvim/ui.h" #include "nvim/main.h" #include "nvim/mouse.h" #include "nvim/terminal.h" #include "nvim/undo.h" #include "nvim/version.h" #include "nvim/window.h" #include "nvim/eval/encode.h" #include "nvim/eval/decode.h" #include "nvim/os/os.h" #include "nvim/event/libuv_process.h" #include "nvim/os/pty_process.h" #include "nvim/event/rstream.h" #include "nvim/event/wstream.h" #include "nvim/event/time.h" #include "nvim/os/time.h" #include "nvim/msgpack_rpc/channel.h" #include "nvim/msgpack_rpc/server.h" #include "nvim/msgpack_rpc/helpers.h" #include "nvim/api/private/helpers.h" #include "nvim/api/vim.h" #include "nvim/os/dl.h" #include "nvim/os/input.h" #include "nvim/event/loop.h" #include "nvim/lib/kvec.h" #include "nvim/lib/khash.h" #include "nvim/lib/queue.h" #include "nvim/lua/executor.h" #include "nvim/eval/typval.h" #include "nvim/eval/executor.h" #include "nvim/eval/gc.h" #include "nvim/macros.h" // TODO(ZyX-I): Remove DICT_MAXNEST, make users be non-recursive instead #define DICT_MAXNEST 100 /* maximum nesting of lists and dicts */ #define DO_NOT_FREE_CNT 99999 /* refcount for dict or list that should not be freed. */ #define AUTOLOAD_CHAR '#' /* Character used as separator in autoload function/variable names. */ /* * Structure returned by get_lval() and used by set_var_lval(). * For a plain name: * "name" points to the variable name. * "exp_name" is NULL. * "tv" is NULL * For a magic braces name: * "name" points to the expanded variable name. * "exp_name" is non-NULL, to be freed later. * "tv" is NULL * For an index in a list: * "name" points to the (expanded) variable name. * "exp_name" NULL or non-NULL, to be freed later. * "tv" points to the (first) list item value * "li" points to the (first) list item * "range", "n1", "n2" and "empty2" indicate what items are used. * For an existing Dict item: * "name" points to the (expanded) variable name. * "exp_name" NULL or non-NULL, to be freed later. * "tv" points to the dict item value * "newkey" is NULL * For a non-existing Dict item: * "name" points to the (expanded) variable name. * "exp_name" NULL or non-NULL, to be freed later. * "tv" points to the Dictionary typval_T * "newkey" is the key for the new item. */ typedef struct lval_S { const char *ll_name; ///< Start of variable name (can be NULL). size_t ll_name_len; ///< Length of the .ll_name. char *ll_exp_name; ///< NULL or expanded name in allocated memory. typval_T *ll_tv; ///< Typeval of item being used. If "newkey" ///< isn't NULL it's the Dict to which to add the item. listitem_T *ll_li; ///< The list item or NULL. list_T *ll_list; ///< The list or NULL. int ll_range; ///< TRUE when a [i:j] range was used. long ll_n1; ///< First index for list. long ll_n2; ///< Second index for list range. int ll_empty2; ///< Second index is empty: [i:]. dict_T *ll_dict; ///< The Dictionary or NULL. dictitem_T *ll_di; ///< The dictitem or NULL. char_u *ll_newkey; ///< New key for Dict in allocated memory or NULL. } lval_T; static char *e_letunexp = N_("E18: Unexpected characters in :let"); static char *e_missbrac = N_("E111: Missing ']'"); static char *e_listarg = N_("E686: Argument of %s must be a List"); static char *e_listdictarg = N_( "E712: Argument of %s must be a List or Dictionary"); static char *e_listreq = N_("E714: List required"); static char *e_dictreq = N_("E715: Dictionary required"); static char *e_stringreq = N_("E928: String required"); static char *e_toomanyarg = N_("E118: Too many arguments for function: %s"); static char *e_dictkey = N_("E716: Key not present in Dictionary: %s"); static char *e_funcexts = N_( "E122: Function %s already exists, add ! to replace it"); static char *e_funcdict = N_("E717: Dictionary entry already exists"); static char *e_funcref = N_("E718: Funcref required"); static char *e_dictrange = N_("E719: Cannot use [:] with a Dictionary"); static char *e_nofunc = N_("E130: Unknown function: %s"); static char *e_illvar = N_("E461: Illegal variable name: %s"); static const char *e_readonlyvar = N_( "E46: Cannot change read-only variable \"%.*s\""); // TODO(ZyX-I): move to eval/executor static char *e_letwrong = N_("E734: Wrong variable type for %s="); static char_u * const namespace_char = (char_u *)"abglstvw"; /// Variable used for g: static ScopeDictDictItem globvars_var; /// g: value #define globvarht globvardict.dv_hashtab /* * Old Vim variables such as "v:version" are also available without the "v:". * Also in functions. We need a special hashtable for them. */ static hashtab_T compat_hashtab; hashtab_T func_hashtab; // Used for checking if local variables or arguments used in a lambda. static int *eval_lavars_used = NULL; /* * Array to hold the hashtab with variables local to each sourced script. * Each item holds a variable (nameless) that points to the dict_T. */ typedef struct { ScopeDictDictItem sv_var; dict_T sv_dict; } scriptvar_T; static garray_T ga_scripts = {0, 0, sizeof(scriptvar_T *), 4, NULL}; #define SCRIPT_SV(id) (((scriptvar_T **)ga_scripts.ga_data)[(id) - 1]) #define SCRIPT_VARS(id) (SCRIPT_SV(id)->sv_dict.dv_hashtab) static int echo_attr = 0; /* attributes used for ":echo" */ /// trans_function_name() flags typedef enum { TFN_INT = 1, ///< May use internal function name TFN_QUIET = 2, ///< Do not emit error messages. TFN_NO_AUTOLOAD = 4, ///< Do not use script autoloading. TFN_NO_DEREF = 8, ///< Do not dereference a Funcref. TFN_READ_ONLY = 16, ///< Will not change the variable. } TransFunctionNameFlags; /// get_lval() flags typedef enum { GLV_QUIET = TFN_QUIET, ///< Do not emit error messages. GLV_NO_AUTOLOAD = TFN_NO_AUTOLOAD, ///< Do not use script autoloading. GLV_READ_ONLY = TFN_READ_ONLY, ///< Indicates that caller will not change ///< the value (prevents error message). } GetLvalFlags; // function flags #define FC_ABORT 0x01 // abort function on error #define FC_RANGE 0x02 // function accepts range #define FC_DICT 0x04 // Dict function, uses "self" #define FC_CLOSURE 0x08 // closure, uses outer scope variables #define FC_DELETED 0x10 // :delfunction used while uf_refcount > 0 #define FC_REMOVED 0x20 // function redefined while uf_refcount > 0 // The names of packages that once were loaded are remembered. static garray_T ga_loaded = { 0, 0, sizeof(char_u *), 4, NULL }; #define FUNCARG(fp, j) ((char_u **)(fp->uf_args.ga_data))[j] #define FUNCLINE(fp, j) ((char_u **)(fp->uf_lines.ga_data))[j] /// Short variable name length #define VAR_SHORT_LEN 20 /// Number of fixed variables used for arguments #define FIXVAR_CNT 12 struct funccall_S { ufunc_T *func; ///< Function being called. int linenr; ///< Next line to be executed. int returned; ///< ":return" used. /// Fixed variables for arguments. TV_DICTITEM_STRUCT(VAR_SHORT_LEN + 1) fixvar[FIXVAR_CNT]; dict_T l_vars; ///< l: local function variables. ScopeDictDictItem l_vars_var; ///< Variable for l: scope. dict_T l_avars; ///< a: argument variables. ScopeDictDictItem l_avars_var; ///< Variable for a: scope. list_T l_varlist; ///< List for a:000. listitem_T l_listitems[MAX_FUNC_ARGS]; ///< List items for a:000. typval_T *rettv; ///< Return value. linenr_T breakpoint; ///< Next line with breakpoint or zero. int dbg_tick; ///< Debug_tick when breakpoint was set. int level; ///< Top nesting level of executed function. proftime_T prof_child; ///< Time spent in a child. funccall_T *caller; ///< Calling function or NULL. int fc_refcount; ///< Number of user functions that reference this funccall. int fc_copyID; ///< CopyID used for garbage collection. garray_T fc_funcs; ///< List of ufunc_T* which keep a reference to "func". }; ///< Structure used by trans_function_name() typedef struct { dict_T *fd_dict; ///< Dictionary used. char_u *fd_newkey; ///< New key in "dict" in allocated memory. dictitem_T *fd_di; ///< Dictionary item used. } funcdict_T; /* * Info used by a ":for" loop. */ typedef struct { int fi_semicolon; /* TRUE if ending in '; var]' */ int fi_varcount; /* nr of variables in the list */ listwatch_T fi_lw; /* keep an eye on the item used. */ list_T *fi_list; /* list being used */ } forinfo_T; /* * enum used by var_flavour() */ typedef enum { VAR_FLAVOUR_DEFAULT, /* doesn't start with uppercase */ VAR_FLAVOUR_SESSION, /* starts with uppercase, some lower */ VAR_FLAVOUR_SHADA /* all uppercase */ } var_flavour_T; /* values for vv_flags: */ #define VV_COMPAT 1 /* compatible, also used without "v:" */ #define VV_RO 2 /* read-only */ #define VV_RO_SBX 4 /* read-only in the sandbox */ #define VV(idx, name, type, flags) \ [idx] = { \ .vv_name = name, \ .vv_di = { \ .di_tv = { .v_type = type }, \ .di_flags = 0, \ .di_key = { 0 }, \ }, \ .vv_flags = flags, \ } // Array to hold the value of v: variables. // The value is in a dictitem, so that it can also be used in the v: scope. // The reason to use this table anyway is for very quick access to the // variables with the VV_ defines. static struct vimvar { char *vv_name; ///< Name of the variable, without v:. TV_DICTITEM_STRUCT(17) vv_di; ///< Value and name for key (max 16 chars). char vv_flags; ///< Flags: #VV_COMPAT, #VV_RO, #VV_RO_SBX. } vimvars[] = { // VV_ tails differing from upcased string literals: // VV_CC_FROM "charconvert_from" // VV_CC_TO "charconvert_to" // VV_SEND_SERVER "servername" // VV_REG "register" // VV_OP "operator" VV(VV_COUNT, "count", VAR_NUMBER, VV_RO), VV(VV_COUNT1, "count1", VAR_NUMBER, VV_RO), VV(VV_PREVCOUNT, "prevcount", VAR_NUMBER, VV_RO), VV(VV_ERRMSG, "errmsg", VAR_STRING, VV_COMPAT), VV(VV_WARNINGMSG, "warningmsg", VAR_STRING, 0), VV(VV_STATUSMSG, "statusmsg", VAR_STRING, 0), VV(VV_SHELL_ERROR, "shell_error", VAR_NUMBER, VV_COMPAT+VV_RO), VV(VV_THIS_SESSION, "this_session", VAR_STRING, VV_COMPAT), VV(VV_VERSION, "version", VAR_NUMBER, VV_COMPAT+VV_RO), VV(VV_LNUM, "lnum", VAR_NUMBER, VV_RO_SBX), VV(VV_TERMRESPONSE, "termresponse", VAR_STRING, VV_RO), VV(VV_FNAME, "fname", VAR_STRING, VV_RO), VV(VV_LANG, "lang", VAR_STRING, VV_RO), VV(VV_LC_TIME, "lc_time", VAR_STRING, VV_RO), VV(VV_CTYPE, "ctype", VAR_STRING, VV_RO), VV(VV_CC_FROM, "charconvert_from", VAR_STRING, VV_RO), VV(VV_CC_TO, "charconvert_to", VAR_STRING, VV_RO), VV(VV_FNAME_IN, "fname_in", VAR_STRING, VV_RO), VV(VV_FNAME_OUT, "fname_out", VAR_STRING, VV_RO), VV(VV_FNAME_NEW, "fname_new", VAR_STRING, VV_RO), VV(VV_FNAME_DIFF, "fname_diff", VAR_STRING, VV_RO), VV(VV_CMDARG, "cmdarg", VAR_STRING, VV_RO), VV(VV_FOLDSTART, "foldstart", VAR_NUMBER, VV_RO_SBX), VV(VV_FOLDEND, "foldend", VAR_NUMBER, VV_RO_SBX), VV(VV_FOLDDASHES, "folddashes", VAR_STRING, VV_RO_SBX), VV(VV_FOLDLEVEL, "foldlevel", VAR_NUMBER, VV_RO_SBX), VV(VV_PROGNAME, "progname", VAR_STRING, VV_RO), VV(VV_SEND_SERVER, "servername", VAR_STRING, VV_RO), VV(VV_DYING, "dying", VAR_NUMBER, VV_RO), VV(VV_EXCEPTION, "exception", VAR_STRING, VV_RO), VV(VV_THROWPOINT, "throwpoint", VAR_STRING, VV_RO), VV(VV_REG, "register", VAR_STRING, VV_RO), VV(VV_CMDBANG, "cmdbang", VAR_NUMBER, VV_RO), VV(VV_INSERTMODE, "insertmode", VAR_STRING, VV_RO), VV(VV_VAL, "val", VAR_UNKNOWN, VV_RO), VV(VV_KEY, "key", VAR_UNKNOWN, VV_RO), VV(VV_PROFILING, "profiling", VAR_NUMBER, VV_RO), VV(VV_FCS_REASON, "fcs_reason", VAR_STRING, VV_RO), VV(VV_FCS_CHOICE, "fcs_choice", VAR_STRING, 0), VV(VV_BEVAL_BUFNR, "beval_bufnr", VAR_NUMBER, VV_RO), VV(VV_BEVAL_WINNR, "beval_winnr", VAR_NUMBER, VV_RO), VV(VV_BEVAL_WINID, "beval_winid", VAR_NUMBER, VV_RO), VV(VV_BEVAL_LNUM, "beval_lnum", VAR_NUMBER, VV_RO), VV(VV_BEVAL_COL, "beval_col", VAR_NUMBER, VV_RO), VV(VV_BEVAL_TEXT, "beval_text", VAR_STRING, VV_RO), VV(VV_SCROLLSTART, "scrollstart", VAR_STRING, 0), VV(VV_SWAPNAME, "swapname", VAR_STRING, VV_RO), VV(VV_SWAPCHOICE, "swapchoice", VAR_STRING, 0), VV(VV_SWAPCOMMAND, "swapcommand", VAR_STRING, VV_RO), VV(VV_CHAR, "char", VAR_STRING, 0), VV(VV_MOUSE_WIN, "mouse_win", VAR_NUMBER, 0), VV(VV_MOUSE_WINID, "mouse_winid", VAR_NUMBER, 0), VV(VV_MOUSE_LNUM, "mouse_lnum", VAR_NUMBER, 0), VV(VV_MOUSE_COL, "mouse_col", VAR_NUMBER, 0), VV(VV_OP, "operator", VAR_STRING, VV_RO), VV(VV_SEARCHFORWARD, "searchforward", VAR_NUMBER, 0), VV(VV_HLSEARCH, "hlsearch", VAR_NUMBER, 0), VV(VV_OLDFILES, "oldfiles", VAR_LIST, 0), VV(VV_WINDOWID, "windowid", VAR_NUMBER, VV_RO_SBX), VV(VV_PROGPATH, "progpath", VAR_STRING, VV_RO), VV(VV_COMMAND_OUTPUT, "command_output", VAR_STRING, 0), VV(VV_COMPLETED_ITEM, "completed_item", VAR_DICT, VV_RO), VV(VV_OPTION_NEW, "option_new", VAR_STRING, VV_RO), VV(VV_OPTION_OLD, "option_old", VAR_STRING, VV_RO), VV(VV_OPTION_TYPE, "option_type", VAR_STRING, VV_RO), VV(VV_ERRORS, "errors", VAR_LIST, 0), VV(VV_MSGPACK_TYPES, "msgpack_types", VAR_DICT, VV_RO), VV(VV_EVENT, "event", VAR_DICT, VV_RO), VV(VV_FALSE, "false", VAR_SPECIAL, VV_RO), VV(VV_TRUE, "true", VAR_SPECIAL, VV_RO), VV(VV_NULL, "null", VAR_SPECIAL, VV_RO), VV(VV__NULL_LIST, "_null_list", VAR_LIST, VV_RO), VV(VV__NULL_DICT, "_null_dict", VAR_DICT, VV_RO), VV(VV_VIM_DID_ENTER, "vim_did_enter", VAR_NUMBER, VV_RO), VV(VV_TESTING, "testing", VAR_NUMBER, 0), VV(VV_TYPE_NUMBER, "t_number", VAR_NUMBER, VV_RO), VV(VV_TYPE_STRING, "t_string", VAR_NUMBER, VV_RO), VV(VV_TYPE_FUNC, "t_func", VAR_NUMBER, VV_RO), VV(VV_TYPE_LIST, "t_list", VAR_NUMBER, VV_RO), VV(VV_TYPE_DICT, "t_dict", VAR_NUMBER, VV_RO), VV(VV_TYPE_FLOAT, "t_float", VAR_NUMBER, VV_RO), VV(VV_TYPE_BOOL, "t_bool", VAR_NUMBER, VV_RO), VV(VV_EXITING, "exiting", VAR_NUMBER, VV_RO), }; #undef VV /* shorthand */ #define vv_type vv_di.di_tv.v_type #define vv_nr vv_di.di_tv.vval.v_number #define vv_special vv_di.di_tv.vval.v_special #define vv_float vv_di.di_tv.vval.v_float #define vv_str vv_di.di_tv.vval.v_string #define vv_list vv_di.di_tv.vval.v_list #define vv_dict vv_di.di_tv.vval.v_dict #define vv_tv vv_di.di_tv /// Variable used for v: static ScopeDictDictItem vimvars_var; /// v: hashtab #define vimvarht vimvardict.dv_hashtab typedef struct { union { LibuvProcess uv; PtyProcess pty; } proc; Stream in, out, err; // Initialized in common_job_start(). Terminal *term; bool stopped; bool exited; bool rpc; int refcount; Callback on_stdout, on_stderr, on_exit; varnumber_T *status_ptr; uint64_t id; MultiQueue *events; } TerminalJobData; typedef struct { TerminalJobData *data; Callback *callback; const char *type; list_T *received; int status; } JobEvent; typedef struct { TimeWatcher tw; int timer_id; int repeat_count; int refcount; long timeout; bool stopped; bool paused; Callback callback; } timer_T; typedef void (*FunPtr)(void); /// Prototype of C function that implements VimL function typedef void (*VimLFunc)(typval_T *args, typval_T *rvar, FunPtr data); /// Structure holding VimL function definition typedef struct fst { char *name; ///< Name of the function. uint8_t min_argc; ///< Minimal number of arguments. uint8_t max_argc; ///< Maximal number of arguments. VimLFunc func; ///< Function implementation. FunPtr data; ///< Userdata for function implementation. } VimLFuncDef; KHASH_MAP_INIT_STR(functions, VimLFuncDef) /// Type of assert_* check being performed typedef enum { ASSERT_EQUAL, ASSERT_NOTEQUAL, ASSERT_MATCH, ASSERT_NOTMATCH, ASSERT_INRANGE, ASSERT_OTHER, } assert_type_T; /// Type for dict_list function typedef enum { kDictListKeys, ///< List dictionary keys. kDictListValues, ///< List dictionary values. kDictListItems, ///< List dictionary contents: [keys, values]. } DictListType; #ifdef INCLUDE_GENERATED_DECLARATIONS # include "eval.c.generated.h" #endif #define FNE_INCL_BR 1 /* find_name_end(): include [] in name */ #define FNE_CHECK_START 2 /* find_name_end(): check name starts with valid character */ static PMap(uint64_t) *jobs = NULL; static uint64_t last_timer_id = 0; static PMap(uint64_t) *timers = NULL; /// Dummy va_list for passing to vim_snprintf /// /// Used because: /// - passing a NULL pointer doesn't work when va_list isn't a pointer /// - locally in the function results in a "used before set" warning /// - using va_start() to initialize it gives "function with fixed args" error static va_list dummy_ap; static const char *const msgpack_type_names[] = { [kMPNil] = "nil", [kMPBoolean] = "boolean", [kMPInteger] = "integer", [kMPFloat] = "float", [kMPString] = "string", [kMPBinary] = "binary", [kMPArray] = "array", [kMPMap] = "map", [kMPExt] = "ext", }; const list_T *eval_msgpack_type_lists[] = { [kMPNil] = NULL, [kMPBoolean] = NULL, [kMPInteger] = NULL, [kMPFloat] = NULL, [kMPString] = NULL, [kMPBinary] = NULL, [kMPArray] = NULL, [kMPMap] = NULL, [kMPExt] = NULL, }; /* * Initialize the global and v: variables. */ void eval_init(void) { vimvars[VV_VERSION].vv_nr = VIM_VERSION_100; jobs = pmap_new(uint64_t)(); timers = pmap_new(uint64_t)(); struct vimvar *p; init_var_dict(&globvardict, &globvars_var, VAR_DEF_SCOPE); init_var_dict(&vimvardict, &vimvars_var, VAR_SCOPE); vimvardict.dv_lock = VAR_FIXED; hash_init(&compat_hashtab); hash_init(&func_hashtab); for (size_t i = 0; i < ARRAY_SIZE(vimvars); i++) { p = &vimvars[i]; assert(STRLEN(p->vv_name) <= 16); STRCPY(p->vv_di.di_key, p->vv_name); if (p->vv_flags & VV_RO) p->vv_di.di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; else if (p->vv_flags & VV_RO_SBX) p->vv_di.di_flags = DI_FLAGS_RO_SBX | DI_FLAGS_FIX; else p->vv_di.di_flags = DI_FLAGS_FIX; /* add to v: scope dict, unless the value is not always available */ if (p->vv_type != VAR_UNKNOWN) hash_add(&vimvarht, p->vv_di.di_key); if (p->vv_flags & VV_COMPAT) /* add to compat scope dict */ hash_add(&compat_hashtab, p->vv_di.di_key); } vimvars[VV_VERSION].vv_nr = VIM_VERSION_100; dict_T *const msgpack_types_dict = tv_dict_alloc(); for (size_t i = 0; i < ARRAY_SIZE(msgpack_type_names); i++) { list_T *const type_list = tv_list_alloc(); type_list->lv_lock = VAR_FIXED; type_list->lv_refcount = 1; dictitem_T *const di = tv_dict_item_alloc(msgpack_type_names[i]); di->di_flags |= DI_FLAGS_RO|DI_FLAGS_FIX; di->di_tv = (typval_T) { .v_type = VAR_LIST, .vval = { .v_list = type_list, }, }; eval_msgpack_type_lists[i] = type_list; if (tv_dict_add(msgpack_types_dict, di) == FAIL) { // There must not be duplicate items in this dictionary by definition. assert(false); } } msgpack_types_dict->dv_lock = VAR_FIXED; set_vim_var_dict(VV_MSGPACK_TYPES, msgpack_types_dict); set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc()); dict_T *v_event = tv_dict_alloc(); v_event->dv_lock = VAR_FIXED; set_vim_var_dict(VV_EVENT, v_event); set_vim_var_list(VV_ERRORS, tv_list_alloc()); set_vim_var_nr(VV_SEARCHFORWARD, 1L); set_vim_var_nr(VV_HLSEARCH, 1L); set_vim_var_nr(VV_COUNT1, 1); set_vim_var_nr(VV_TYPE_NUMBER, VAR_TYPE_NUMBER); set_vim_var_nr(VV_TYPE_STRING, VAR_TYPE_STRING); set_vim_var_nr(VV_TYPE_FUNC, VAR_TYPE_FUNC); set_vim_var_nr(VV_TYPE_LIST, VAR_TYPE_LIST); set_vim_var_nr(VV_TYPE_DICT, VAR_TYPE_DICT); set_vim_var_nr(VV_TYPE_FLOAT, VAR_TYPE_FLOAT); set_vim_var_nr(VV_TYPE_BOOL, VAR_TYPE_BOOL); set_vim_var_special(VV_FALSE, kSpecialVarFalse); set_vim_var_special(VV_TRUE, kSpecialVarTrue); set_vim_var_special(VV_NULL, kSpecialVarNull); set_vim_var_special(VV_EXITING, kSpecialVarNull); set_reg_var(0); // default for v:register is not 0 but '"' } #if defined(EXITFREE) void eval_clear(void) { struct vimvar *p; for (size_t i = 0; i < ARRAY_SIZE(vimvars); i++) { p = &vimvars[i]; if (p->vv_di.di_tv.v_type == VAR_STRING) { xfree(p->vv_str); p->vv_str = NULL; } else if (p->vv_di.di_tv.v_type == VAR_LIST) { tv_list_unref(p->vv_list); p->vv_list = NULL; } } hash_clear(&vimvarht); hash_init(&vimvarht); /* garbage_collect() will access it */ hash_clear(&compat_hashtab); free_scriptnames(); free_locales(); /* global variables */ vars_clear(&globvarht); /* autoloaded script names */ ga_clear_strings(&ga_loaded); /* Script-local variables. First clear all the variables and in a second * loop free the scriptvar_T, because a variable in one script might hold * a reference to the whole scope of another script. */ for (int i = 1; i <= ga_scripts.ga_len; ++i) vars_clear(&SCRIPT_VARS(i)); for (int i = 1; i <= ga_scripts.ga_len; ++i) xfree(SCRIPT_SV(i)); ga_clear(&ga_scripts); // unreferenced lists and dicts (void)garbage_collect(false); // functions free_all_functions(); } #endif /* * Return the name of the executed function. */ char_u *func_name(void *cookie) { return ((funccall_T *)cookie)->func->uf_name; } /* * Return the address holding the next breakpoint line for a funccall cookie. */ linenr_T *func_breakpoint(void *cookie) { return &((funccall_T *)cookie)->breakpoint; } /* * Return the address holding the debug tick for a funccall cookie. */ int *func_dbg_tick(void *cookie) { return &((funccall_T *)cookie)->dbg_tick; } /* * Return the nesting level for a funccall cookie. */ int func_level(void *cookie) { return ((funccall_T *)cookie)->level; } /* pointer to funccal for currently active function */ funccall_T *current_funccal = NULL; /* pointer to list of previously used funccal, still around because some * item in it is still being used. */ funccall_T *previous_funccal = NULL; /* * Return TRUE when a function was ended by a ":return" command. */ int current_func_returned(void) { return current_funccal->returned; } /* * Set an internal variable to a string value. Creates the variable if it does * not already exist. */ void set_internal_string_var(char_u *name, char_u *value) { const typval_T tv = { .v_type = VAR_STRING, .vval.v_string = value, }; set_var((const char *)name, STRLEN(name), (typval_T *)&tv, true); } static lval_T *redir_lval = NULL; static garray_T redir_ga; // Only valid when redir_lval is not NULL. static char_u *redir_endp = NULL; static char_u *redir_varname = NULL; /* * Start recording command output to a variable * Returns OK if successfully completed the setup. FAIL otherwise. */ int var_redir_start ( char_u *name, int append /* append to an existing variable */ ) { int save_emsg; int err; typval_T tv; /* Catch a bad name early. */ if (!eval_isnamec1(*name)) { EMSG(_(e_invarg)); return FAIL; } /* Make a copy of the name, it is used in redir_lval until redir ends. */ redir_varname = vim_strsave(name); redir_lval = xcalloc(1, sizeof(lval_T)); /* The output is stored in growarray "redir_ga" until redirection ends. */ ga_init(&redir_ga, (int)sizeof(char), 500); // Parse the variable name (can be a dict or list entry). redir_endp = (char_u *)get_lval(redir_varname, NULL, redir_lval, false, false, 0, FNE_CHECK_START); if (redir_endp == NULL || redir_lval->ll_name == NULL || *redir_endp != NUL) { clear_lval(redir_lval); if (redir_endp != NULL && *redir_endp != NUL) /* Trailing characters are present after the variable name */ EMSG(_(e_trailing)); else EMSG(_(e_invarg)); redir_endp = NULL; /* don't store a value, only cleanup */ var_redir_stop(); return FAIL; } /* check if we can write to the variable: set it to or append an empty * string */ save_emsg = did_emsg; did_emsg = FALSE; tv.v_type = VAR_STRING; tv.vval.v_string = (char_u *)""; if (append) set_var_lval(redir_lval, redir_endp, &tv, TRUE, (char_u *)"."); else set_var_lval(redir_lval, redir_endp, &tv, TRUE, (char_u *)"="); clear_lval(redir_lval); err = did_emsg; did_emsg |= save_emsg; if (err) { redir_endp = NULL; /* don't store a value, only cleanup */ var_redir_stop(); return FAIL; } return OK; } /* * Append "value[value_len]" to the variable set by var_redir_start(). * The actual appending is postponed until redirection ends, because the value * appended may in fact be the string we write to, changing it may cause freed * memory to be used: * :redir => foo * :let foo * :redir END */ void var_redir_str(char_u *value, int value_len) { int len; if (redir_lval == NULL) return; if (value_len == -1) len = (int)STRLEN(value); /* Append the entire string */ else len = value_len; /* Append only "value_len" characters */ ga_grow(&redir_ga, len); memmove((char *)redir_ga.ga_data + redir_ga.ga_len, value, len); redir_ga.ga_len += len; } /* * Stop redirecting command output to a variable. * Frees the allocated memory. */ void var_redir_stop(void) { typval_T tv; if (redir_lval != NULL) { /* If there was no error: assign the text to the variable. */ if (redir_endp != NULL) { ga_append(&redir_ga, NUL); /* Append the trailing NUL. */ tv.v_type = VAR_STRING; tv.vval.v_string = redir_ga.ga_data; // Call get_lval() again, if it's inside a Dict or List it may // have changed. redir_endp = (char_u *)get_lval(redir_varname, NULL, redir_lval, false, false, 0, FNE_CHECK_START); if (redir_endp != NULL && redir_lval->ll_name != NULL) { set_var_lval(redir_lval, redir_endp, &tv, false, (char_u *)"."); } clear_lval(redir_lval); } /* free the collected output */ xfree(redir_ga.ga_data); redir_ga.ga_data = NULL; xfree(redir_lval); redir_lval = NULL; } xfree(redir_varname); redir_varname = NULL; } int eval_charconvert(const char *const enc_from, const char *const enc_to, const char *const fname_from, const char *const fname_to) { bool err = false; set_vim_var_string(VV_CC_FROM, enc_from, -1); set_vim_var_string(VV_CC_TO, enc_to, -1); set_vim_var_string(VV_FNAME_IN, fname_from, -1); set_vim_var_string(VV_FNAME_OUT, fname_to, -1); if (eval_to_bool(p_ccv, &err, NULL, false)) { err = true; } set_vim_var_string(VV_CC_FROM, NULL, -1); set_vim_var_string(VV_CC_TO, NULL, -1); set_vim_var_string(VV_FNAME_IN, NULL, -1); set_vim_var_string(VV_FNAME_OUT, NULL, -1); if (err) { return FAIL; } return OK; } int eval_printexpr(const char *const fname, const char *const args) { bool err = false; set_vim_var_string(VV_FNAME_IN, fname, -1); set_vim_var_string(VV_CMDARG, args, -1); if (eval_to_bool(p_pexpr, &err, NULL, false)) { err = true; } set_vim_var_string(VV_FNAME_IN, NULL, -1); set_vim_var_string(VV_CMDARG, NULL, -1); if (err) { os_remove(fname); return FAIL; } return OK; } void eval_diff(const char *const origfile, const char *const newfile, const char *const outfile) { bool err = false; set_vim_var_string(VV_FNAME_IN, origfile, -1); set_vim_var_string(VV_FNAME_NEW, newfile, -1); set_vim_var_string(VV_FNAME_OUT, outfile, -1); (void)eval_to_bool(p_dex, &err, NULL, FALSE); set_vim_var_string(VV_FNAME_IN, NULL, -1); set_vim_var_string(VV_FNAME_NEW, NULL, -1); set_vim_var_string(VV_FNAME_OUT, NULL, -1); } void eval_patch(const char *const origfile, const char *const difffile, const char *const outfile) { bool err = false; set_vim_var_string(VV_FNAME_IN, origfile, -1); set_vim_var_string(VV_FNAME_DIFF, difffile, -1); set_vim_var_string(VV_FNAME_OUT, outfile, -1); (void)eval_to_bool(p_pex, &err, NULL, FALSE); set_vim_var_string(VV_FNAME_IN, NULL, -1); set_vim_var_string(VV_FNAME_DIFF, NULL, -1); set_vim_var_string(VV_FNAME_OUT, NULL, -1); } /* * Top level evaluation function, returning a boolean. * Sets "error" to TRUE if there was an error. * Return TRUE or FALSE. */ int eval_to_bool ( char_u *arg, bool *error, char_u **nextcmd, int skip /* only parse, don't execute */ ) { typval_T tv; bool retval = false; if (skip) { emsg_skip++; } if (eval0(arg, &tv, nextcmd, !skip) == FAIL) { *error = true; } else { *error = false; if (!skip) { retval = (tv_get_number_chk(&tv, error) != 0); tv_clear(&tv); } } if (skip) { emsg_skip--; } return retval; } /// Top level evaluation function, returning a string /// /// @param[in] arg String to evaluate. /// @param nextcmd Pointer to the start of the next Ex command. /// @param[in] skip If true, only do parsing to nextcmd without reporting /// errors or actually evaluating anything. /// /// @return [allocated] string result of evaluation or NULL in case of error or /// when skipping. char *eval_to_string_skip(const char *arg, const char **nextcmd, const bool skip) FUNC_ATTR_MALLOC FUNC_ATTR_NONNULL_ARG(1) FUNC_ATTR_WARN_UNUSED_RESULT { typval_T tv; char *retval; if (skip) { emsg_skip++; } if (eval0((char_u *)arg, &tv, (char_u **)nextcmd, !skip) == FAIL || skip) { retval = NULL; } else { retval = xstrdup(tv_get_string(&tv)); tv_clear(&tv); } if (skip) { emsg_skip--; } return retval; } /* * Skip over an expression at "*pp". * Return FAIL for an error, OK otherwise. */ int skip_expr(char_u **pp) { typval_T rettv; *pp = skipwhite(*pp); return eval1(pp, &rettv, FALSE); } /* * Top level evaluation function, returning a string. * When "convert" is TRUE convert a List into a sequence of lines and convert * a Float to a String. * Return pointer to allocated memory, or NULL for failure. */ char_u *eval_to_string(char_u *arg, char_u **nextcmd, int convert) { typval_T tv; char *retval; garray_T ga; if (eval0(arg, &tv, nextcmd, true) == FAIL) { retval = NULL; } else { if (convert && tv.v_type == VAR_LIST) { ga_init(&ga, (int)sizeof(char), 80); if (tv.vval.v_list != NULL) { tv_list_join(&ga, tv.vval.v_list, "\n"); if (tv.vval.v_list->lv_len > 0) { ga_append(&ga, NL); } } ga_append(&ga, NUL); retval = (char *)ga.ga_data; } else if (convert && tv.v_type == VAR_FLOAT) { char numbuf[NUMBUFLEN]; vim_snprintf(numbuf, NUMBUFLEN, "%g", tv.vval.v_float); retval = xstrdup(numbuf); } else { retval = xstrdup(tv_get_string(&tv)); } tv_clear(&tv); } return (char_u *)retval; } /* * Call eval_to_string() without using current local variables and using * textlock. When "use_sandbox" is TRUE use the sandbox. */ char_u *eval_to_string_safe(char_u *arg, char_u **nextcmd, int use_sandbox) { char_u *retval; void *save_funccalp; save_funccalp = save_funccal(); if (use_sandbox) ++sandbox; ++textlock; retval = eval_to_string(arg, nextcmd, FALSE); if (use_sandbox) --sandbox; --textlock; restore_funccal(save_funccalp); return retval; } /* * Top level evaluation function, returning a number. * Evaluates "expr" silently. * Returns -1 for an error. */ varnumber_T eval_to_number(char_u *expr) { typval_T rettv; varnumber_T retval; char_u *p = skipwhite(expr); ++emsg_off; if (eval1(&p, &rettv, true) == FAIL) { retval = -1; } else { retval = tv_get_number_chk(&rettv, NULL); tv_clear(&rettv); } --emsg_off; return retval; } /* * Prepare v: variable "idx" to be used. * Save the current typeval in "save_tv". * When not used yet add the variable to the v: hashtable. */ static void prepare_vimvar(int idx, typval_T *save_tv) { *save_tv = vimvars[idx].vv_tv; if (vimvars[idx].vv_type == VAR_UNKNOWN) hash_add(&vimvarht, vimvars[idx].vv_di.di_key); } /* * Restore v: variable "idx" to typeval "save_tv". * When no longer defined, remove the variable from the v: hashtable. */ static void restore_vimvar(int idx, typval_T *save_tv) { hashitem_T *hi; vimvars[idx].vv_tv = *save_tv; if (vimvars[idx].vv_type == VAR_UNKNOWN) { hi = hash_find(&vimvarht, vimvars[idx].vv_di.di_key); if (HASHITEM_EMPTY(hi)) EMSG2(_(e_intern2), "restore_vimvar()"); else hash_remove(&vimvarht, hi); } } /* * Evaluate an expression to a list with suggestions. * For the "expr:" part of 'spellsuggest'. * Returns NULL when there is an error. */ list_T *eval_spell_expr(char_u *badword, char_u *expr) { typval_T save_val; typval_T rettv; list_T *list = NULL; char_u *p = skipwhite(expr); /* Set "v:val" to the bad word. */ prepare_vimvar(VV_VAL, &save_val); vimvars[VV_VAL].vv_type = VAR_STRING; vimvars[VV_VAL].vv_str = badword; if (p_verbose == 0) ++emsg_off; if (eval1(&p, &rettv, true) == OK) { if (rettv.v_type != VAR_LIST) { tv_clear(&rettv); } else { list = rettv.vval.v_list; } } if (p_verbose == 0) --emsg_off; restore_vimvar(VV_VAL, &save_val); return list; } /* * "list" is supposed to contain two items: a word and a number. Return the * word in "pp" and the number as the return value. * Return -1 if anything isn't right. * Used to get the good word and score from the eval_spell_expr() result. */ int get_spellword(list_T *list, const char **pp) { listitem_T *li; li = list->lv_first; if (li == NULL) { return -1; } *pp = tv_get_string(&li->li_tv); li = li->li_next; if (li == NULL) { return -1; } return tv_get_number(&li->li_tv); } // Call some vim script function and return the result in "*rettv". // Uses argv[argc] for the function arguments. Only Number and String // arguments are currently supported. // // Return OK or FAIL. int call_vim_function( const char_u *func, int argc, const char_u *const *const argv, int safe, // use the sandbox int str_arg_only, // all arguments are strings typval_T *rettv ) { varnumber_T n; int len; int doesrange; void *save_funccalp = NULL; int ret; typval_T *argvars = xmalloc((argc + 1) * sizeof(typval_T)); for (int i = 0; i < argc; i++) { // Pass a NULL or empty argument as an empty string if (argv[i] == NULL || *argv[i] == NUL) { argvars[i].v_type = VAR_STRING; argvars[i].vval.v_string = (char_u *)""; continue; } if (str_arg_only) { len = 0; } else { // Recognize a number argument, the others must be strings. vim_str2nr(argv[i], NULL, &len, STR2NR_ALL, &n, NULL, 0); } if (len != 0 && len == (int)STRLEN(argv[i])) { argvars[i].v_type = VAR_NUMBER; argvars[i].vval.v_number = n; } else { argvars[i].v_type = VAR_STRING; argvars[i].vval.v_string = (char_u *)argv[i]; } } if (safe) { save_funccalp = save_funccal(); ++sandbox; } rettv->v_type = VAR_UNKNOWN; // tv_clear() uses this. ret = call_func(func, (int)STRLEN(func), rettv, argc, argvars, NULL, curwin->w_cursor.lnum, curwin->w_cursor.lnum, &doesrange, true, NULL, NULL); if (safe) { --sandbox; restore_funccal(save_funccalp); } xfree(argvars); if (ret == FAIL) { tv_clear(rettv); } return ret; } /// Call Vim script function and return the result as a number /// /// @param[in] func Function name. /// @param[in] argc Number of arguments. /// @param[in] argv Array with string arguments. /// @param[in] safe Use with sandbox. /// /// @return -1 when calling function fails, result of function otherwise. varnumber_T call_func_retnr(char_u *func, int argc, const char_u *const *const argv, int safe) { typval_T rettv; varnumber_T retval; /* All arguments are passed as strings, no conversion to number. */ if (call_vim_function(func, argc, argv, safe, TRUE, &rettv) == FAIL) return -1; retval = tv_get_number_chk(&rettv, NULL); tv_clear(&rettv); return retval; } /// Call Vim script function and return the result as a string /// /// @param[in] func Function name. /// @param[in] argc Number of arguments. /// @param[in] argv Array with string arguments. /// @param[in] safe Use the sandbox. /// /// @return [allocated] NULL when calling function fails, allocated string /// otherwise. char *call_func_retstr(const char *const func, const int argc, const char_u *const *const argv, const bool safe) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_MALLOC { typval_T rettv; // All arguments are passed as strings, no conversion to number. if (call_vim_function((const char_u *)func, argc, argv, safe, true, &rettv) == FAIL) { return NULL; } char *const retval = xstrdup(tv_get_string(&rettv)); tv_clear(&rettv); return retval; } /// Call Vim script function and return the result as a List /// /// @param[in] func Function name. /// @param[in] argc Number of arguments. /// @param[in] argv Array with string arguments. /// @param[in] safe Use the sandbox. /// /// @return [allocated] NULL when calling function fails or return tv is not a /// List, allocated List otherwise. void *call_func_retlist(char_u *func, int argc, const char_u *const *const argv, int safe) { typval_T rettv; /* All arguments are passed as strings, no conversion to number. */ if (call_vim_function(func, argc, argv, safe, TRUE, &rettv) == FAIL) return NULL; if (rettv.v_type != VAR_LIST) { tv_clear(&rettv); return NULL; } return rettv.vval.v_list; } /* * Save the current function call pointer, and set it to NULL. * Used when executing autocommands and for ":source". */ void *save_funccal(void) { funccall_T *fc = current_funccal; current_funccal = NULL; return (void *)fc; } void restore_funccal(void *vfc) { funccall_T *fc = (funccall_T *)vfc; current_funccal = fc; } /* * Prepare profiling for entering a child or something else that is not * counted for the script/function itself. * Should always be called in pair with prof_child_exit(). */ void prof_child_enter(proftime_T *tm /* place to store waittime */ ) { funccall_T *fc = current_funccal; if (fc != NULL && fc->func->uf_profiling) { fc->prof_child = profile_start(); } script_prof_save(tm); } /* * Take care of time spent in a child. * Should always be called after prof_child_enter(). */ void prof_child_exit(proftime_T *tm /* where waittime was stored */ ) { funccall_T *fc = current_funccal; if (fc != NULL && fc->func->uf_profiling) { fc->prof_child = profile_end(fc->prof_child); // don't count waiting time fc->prof_child = profile_sub_wait(*tm, fc->prof_child); fc->func->uf_tm_children = profile_add(fc->func->uf_tm_children, fc->prof_child); fc->func->uf_tml_children = profile_add(fc->func->uf_tml_children, fc->prof_child); } script_prof_restore(tm); } /* * Evaluate 'foldexpr'. Returns the foldlevel, and any character preceding * it in "*cp". Doesn't give error messages. */ int eval_foldexpr(char_u *arg, int *cp) { typval_T tv; varnumber_T retval; char_u *s; int use_sandbox = was_set_insecurely((char_u *)"foldexpr", OPT_LOCAL); ++emsg_off; if (use_sandbox) ++sandbox; ++textlock; *cp = NUL; if (eval0(arg, &tv, NULL, TRUE) == FAIL) retval = 0; else { /* If the result is a number, just return the number. */ if (tv.v_type == VAR_NUMBER) retval = tv.vval.v_number; else if (tv.v_type != VAR_STRING || tv.vval.v_string == NULL) retval = 0; else { /* If the result is a string, check if there is a non-digit before * the number. */ s = tv.vval.v_string; if (!ascii_isdigit(*s) && *s != '-') *cp = *s++; retval = atol((char *)s); } tv_clear(&tv); } --emsg_off; if (use_sandbox) --sandbox; --textlock; return (int)retval; } /* * ":let" list all variable values * ":let var1 var2" list variable values * ":let var = expr" assignment command. * ":let var += expr" assignment command. * ":let var -= expr" assignment command. * ":let var .= expr" assignment command. * ":let [var1, var2] = expr" unpack list. */ void ex_let(exarg_T *eap) { char_u *arg = eap->arg; char_u *expr = NULL; typval_T rettv; int i; int var_count = 0; int semicolon = 0; char_u op[2]; char_u *argend; int first = TRUE; argend = (char_u *)skip_var_list(arg, &var_count, &semicolon); if (argend == NULL) { return; } if (argend > arg && argend[-1] == '.') { // For var.='str'. argend--; } expr = skipwhite(argend); if (*expr != '=' && !(vim_strchr((char_u *)"+-.", *expr) != NULL && expr[1] == '=')) { // ":let" without "=": list variables if (*arg == '[') { EMSG(_(e_invarg)); } else if (!ends_excmd(*arg)) { // ":let var1 var2" arg = (char_u *)list_arg_vars(eap, (const char *)arg, &first); } else if (!eap->skip) { // ":let" list_glob_vars(&first); list_buf_vars(&first); list_win_vars(&first); list_tab_vars(&first); list_script_vars(&first); list_func_vars(&first); list_vim_vars(&first); } eap->nextcmd = check_nextcmd(arg); } else { op[0] = '='; op[1] = NUL; if (*expr != '=') { if (vim_strchr((char_u *)"+-.", *expr) != NULL) { op[0] = *expr; // +=, -=, .= } expr = skipwhite(expr + 2); } else { expr = skipwhite(expr + 1); } if (eap->skip) ++emsg_skip; i = eval0(expr, &rettv, &eap->nextcmd, !eap->skip); if (eap->skip) { if (i != FAIL) { tv_clear(&rettv); } emsg_skip--; } else if (i != FAIL) { (void)ex_let_vars(eap->arg, &rettv, false, semicolon, var_count, op); tv_clear(&rettv); } } } /* * Assign the typevalue "tv" to the variable or variables at "arg_start". * Handles both "var" with any type and "[var, var; var]" with a list type. * When "nextchars" is not NULL it points to a string with characters that * must appear after the variable(s). Use "+", "-" or "." for add, subtract * or concatenate. * Returns OK or FAIL; */ static int ex_let_vars ( char_u *arg_start, typval_T *tv, int copy, /* copy values from "tv", don't move */ int semicolon, /* from skip_var_list() */ int var_count, /* from skip_var_list() */ char_u *nextchars ) { char_u *arg = arg_start; list_T *l; int i; listitem_T *item; typval_T ltv; if (*arg != '[') { /* * ":let var = expr" or ":for var in list" */ if (ex_let_one(arg, tv, copy, nextchars, nextchars) == NULL) return FAIL; return OK; } /* * ":let [v1, v2] = list" or ":for [v1, v2] in listlist" */ if (tv->v_type != VAR_LIST || (l = tv->vval.v_list) == NULL) { EMSG(_(e_listreq)); return FAIL; } i = tv_list_len(l); if (semicolon == 0 && var_count < i) { EMSG(_("E687: Less targets than List items")); return FAIL; } if (var_count - semicolon > i) { EMSG(_("E688: More targets than List items")); return FAIL; } item = l->lv_first; while (*arg != ']') { arg = skipwhite(arg + 1); arg = ex_let_one(arg, &item->li_tv, TRUE, (char_u *)",;]", nextchars); item = item->li_next; if (arg == NULL) return FAIL; arg = skipwhite(arg); if (*arg == ';') { /* Put the rest of the list (may be empty) in the var after ';'. * Create a new list for this. */ l = tv_list_alloc(); while (item != NULL) { tv_list_append_tv(l, &item->li_tv); item = item->li_next; } ltv.v_type = VAR_LIST; ltv.v_lock = 0; ltv.vval.v_list = l; l->lv_refcount = 1; arg = ex_let_one(skipwhite(arg + 1), <v, false, (char_u *)"]", nextchars); tv_clear(<v); if (arg == NULL) { return FAIL; } break; } else if (*arg != ',' && *arg != ']') { EMSG2(_(e_intern2), "ex_let_vars()"); return FAIL; } } return OK; } /* * Skip over assignable variable "var" or list of variables "[var, var]". * Used for ":let varvar = expr" and ":for varvar in expr". * For "[var, var]" increment "*var_count" for each variable. * for "[var, var; var]" set "semicolon". * Return NULL for an error. */ static const char_u *skip_var_list(const char_u *arg, int *var_count, int *semicolon) { const char_u *p; const char_u *s; if (*arg == '[') { /* "[var, var]": find the matching ']'. */ p = arg; for (;; ) { p = skipwhite(p + 1); /* skip whites after '[', ';' or ',' */ s = skip_var_one(p); if (s == p) { EMSG2(_(e_invarg2), p); return NULL; } ++*var_count; p = skipwhite(s); if (*p == ']') break; else if (*p == ';') { if (*semicolon == 1) { EMSG(_("Double ; in list of variables")); return NULL; } *semicolon = 1; } else if (*p != ',') { EMSG2(_(e_invarg2), p); return NULL; } } return p + 1; } else return skip_var_one(arg); } /* * Skip one (assignable) variable name, including @r, $VAR, &option, d.key, * l[idx]. */ static const char_u *skip_var_one(const char_u *arg) { if (*arg == '@' && arg[1] != NUL) return arg + 2; return find_name_end(*arg == '$' || *arg == '&' ? arg + 1 : arg, NULL, NULL, FNE_INCL_BR | FNE_CHECK_START); } /* * List variables for hashtab "ht" with prefix "prefix". * If "empty" is TRUE also list NULL strings as empty strings. */ static void list_hashtable_vars(hashtab_T *ht, const char *prefix, int empty, int *first) { hashitem_T *hi; dictitem_T *di; int todo; todo = (int)ht->ht_used; for (hi = ht->ht_array; todo > 0 && !got_int; ++hi) { if (!HASHITEM_EMPTY(hi)) { todo--; di = TV_DICT_HI2DI(hi); if (empty || di->di_tv.v_type != VAR_STRING || di->di_tv.vval.v_string != NULL) { list_one_var(di, prefix, first); } } } } /* * List global variables. */ static void list_glob_vars(int *first) { list_hashtable_vars(&globvarht, "", true, first); } /* * List buffer variables. */ static void list_buf_vars(int *first) { list_hashtable_vars(&curbuf->b_vars->dv_hashtab, "b:", true, first); } /* * List window variables. */ static void list_win_vars(int *first) { list_hashtable_vars(&curwin->w_vars->dv_hashtab, "w:", true, first); } /* * List tab page variables. */ static void list_tab_vars(int *first) { list_hashtable_vars(&curtab->tp_vars->dv_hashtab, "t:", true, first); } /* * List Vim variables. */ static void list_vim_vars(int *first) { list_hashtable_vars(&vimvarht, "v:", false, first); } /* * List script-local variables, if there is a script. */ static void list_script_vars(int *first) { if (current_SID > 0 && current_SID <= ga_scripts.ga_len) { list_hashtable_vars(&SCRIPT_VARS(current_SID), "s:", false, first); } } /* * List function variables, if there is a function. */ static void list_func_vars(int *first) { if (current_funccal != NULL) { list_hashtable_vars(¤t_funccal->l_vars.dv_hashtab, "l:", false, first); } } /* * List variables in "arg". */ static const char *list_arg_vars(exarg_T *eap, const char *arg, int *first) { int error = FALSE; int len; const char *name; const char *name_start; typval_T tv; while (!ends_excmd(*arg) && !got_int) { if (error || eap->skip) { arg = (const char *)find_name_end((char_u *)arg, NULL, NULL, FNE_INCL_BR | FNE_CHECK_START); if (!ascii_iswhite(*arg) && !ends_excmd(*arg)) { emsg_severe = TRUE; EMSG(_(e_trailing)); break; } } else { // get_name_len() takes care of expanding curly braces name_start = name = arg; char *tofree; len = get_name_len(&arg, &tofree, true, true); if (len <= 0) { /* This is mainly to keep test 49 working: when expanding * curly braces fails overrule the exception error message. */ if (len < 0 && !aborting()) { emsg_severe = TRUE; EMSG2(_(e_invarg2), arg); break; } error = TRUE; } else { if (tofree != NULL) { name = tofree; } if (get_var_tv((const char *)name, len, &tv, NULL, true, false) == FAIL) { error = true; } else { // handle d.key, l[idx], f(expr) const char *const arg_subsc = arg; if (handle_subscript(&arg, &tv, true, true) == FAIL) { error = true; } else { if (arg == arg_subsc && len == 2 && name[1] == ':') { switch (*name) { case 'g': list_glob_vars(first); break; case 'b': list_buf_vars(first); break; case 'w': list_win_vars(first); break; case 't': list_tab_vars(first); break; case 'v': list_vim_vars(first); break; case 's': list_script_vars(first); break; case 'l': list_func_vars(first); break; default: EMSG2(_("E738: Can't list variables for %s"), name); } } else { char *const s = encode_tv2echo(&tv, NULL); const char *const used_name = (arg == arg_subsc ? name : name_start); const ptrdiff_t name_size = (used_name == tofree ? (ptrdiff_t)strlen(used_name) : (arg - used_name)); list_one_var_a("", used_name, name_size, tv.v_type, s == NULL ? "" : s, first); xfree(s); } tv_clear(&tv); } } } xfree(tofree); } arg = (const char *)skipwhite((const char_u *)arg); } return arg; } // TODO(ZyX-I): move to eval/ex_cmds /// Set one item of `:let var = expr` or `:let [v1, v2] = list` to its value /// /// @param[in] arg Start of the variable name. /// @param[in] tv Value to assign to the variable. /// @param[in] copy If true, copy value from `tv`. /// @param[in] endchars Valid characters after variable name or NULL. /// @param[in] op Operation performed: *op is `+`, `-`, `.` for `+=`, etc. /// NULL for `=`. /// /// @return a pointer to the char just after the var name or NULL in case of /// error. static char_u *ex_let_one(char_u *arg, typval_T *const tv, const bool copy, const char_u *const endchars, const char_u *const op) FUNC_ATTR_NONNULL_ARG(1, 2) FUNC_ATTR_WARN_UNUSED_RESULT { char_u *arg_end = NULL; int len; int opt_flags; char_u *tofree = NULL; /* * ":let $VAR = expr": Set environment variable. */ if (*arg == '$') { // Find the end of the name. arg++; char *name = (char *)arg; len = get_env_len((const char_u **)&arg); if (len == 0) { EMSG2(_(e_invarg2), name - 1); } else { if (op != NULL && (*op == '+' || *op == '-')) { EMSG2(_(e_letwrong), op); } else if (endchars != NULL && vim_strchr(endchars, *skipwhite(arg)) == NULL) { EMSG(_(e_letunexp)); } else if (!check_secure()) { const char c1 = name[len]; name[len] = NUL; const char *p = tv_get_string_chk(tv); if (p != NULL && op != NULL && *op == '.') { char *s = vim_getenv(name); if (s != NULL) { tofree = concat_str((const char_u *)s, (const char_u *)p); p = (const char *)tofree; xfree(s); } } if (p != NULL) { vim_setenv(name, p); if (STRICMP(name, "HOME") == 0) { init_homedir(); } else if (didset_vim && STRICMP(name, "VIM") == 0) { didset_vim = false; } else if (didset_vimruntime && STRICMP(name, "VIMRUNTIME") == 0) { didset_vimruntime = false; } arg_end = arg; } name[len] = c1; xfree(tofree); } } // ":let &option = expr": Set option value. // ":let &l:option = expr": Set local option value. // ":let &g:option = expr": Set global option value. } else if (*arg == '&') { // Find the end of the name. char *const p = (char *)find_option_end((const char **)&arg, &opt_flags); if (p == NULL || (endchars != NULL && vim_strchr(endchars, *skipwhite((const char_u *)p)) == NULL)) { EMSG(_(e_letunexp)); } else { int opt_type; long numval; char *stringval = NULL; const char c1 = *p; *p = NUL; varnumber_T n = tv_get_number(tv); const char *s = tv_get_string_chk(tv); // != NULL if number or string. if (s != NULL && op != NULL && *op != '=') { opt_type = get_option_value(arg, &numval, (char_u **)&stringval, opt_flags); if ((opt_type == 1 && *op == '.') || (opt_type == 0 && *op != '.')) { EMSG2(_(e_letwrong), op); } else { if (opt_type == 1) { // number if (*op == '+') { n = numval + n; } else { n = numval - n; } } else if (opt_type == 0 && stringval != NULL) { // string char *const oldstringval = stringval; stringval = (char *)concat_str((const char_u *)stringval, (const char_u *)s); xfree(oldstringval); s = stringval; } } } if (s != NULL) { set_option_value((const char *)arg, n, s, opt_flags); arg_end = (char_u *)p; } *p = c1; xfree(stringval); } // ":let @r = expr": Set register contents. } else if (*arg == '@') { arg++; if (op != NULL && (*op == '+' || *op == '-')) { emsgf(_(e_letwrong), op); } else if (endchars != NULL && vim_strchr(endchars, *skipwhite(arg + 1)) == NULL) { emsgf(_(e_letunexp)); } else { char_u *s; char_u *ptofree = NULL; const char *p = tv_get_string_chk(tv); if (p != NULL && op != NULL && *op == '.') { s = get_reg_contents(*arg == '@' ? '"' : *arg, kGRegExprSrc); if (s != NULL) { ptofree = concat_str(s, (const char_u *)p); p = (const char *)ptofree; xfree(s); } } if (p != NULL) { write_reg_contents(*arg == '@' ? '"' : *arg, (const char_u *)p, STRLEN(p), false); arg_end = arg + 1; } xfree(ptofree); } } /* * ":let var = expr": Set internal variable. * ":let {expr} = expr": Idem, name made with curly braces */ else if (eval_isnamec1(*arg) || *arg == '{') { lval_T lv; char_u *const p = get_lval(arg, tv, &lv, false, false, 0, FNE_CHECK_START); if (p != NULL && lv.ll_name != NULL) { if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL) { EMSG(_(e_letunexp)); } else { set_var_lval(&lv, p, tv, copy, op); arg_end = p; } } clear_lval(&lv); } else EMSG2(_(e_invarg2), arg); return arg_end; } // TODO(ZyX-I): move to eval/executor /// Get an lvalue /// /// Lvalue may be /// - variable: "name", "na{me}" /// - dictionary item: "dict.key", "dict['key']" /// - list item: "list[expr]" /// - list slice: "list[expr:expr]" /// /// Indexing only works if trying to use it with an existing List or Dictionary. /// /// @param[in] name Name to parse. /// @param rettv Pointer to the value to be assigned or NULL. /// @param[out] lp Lvalue definition. When evaluation errors occur `->ll_name` /// is NULL. /// @param[in] unlet True if using `:unlet`. This results in slightly /// different behaviour when something is wrong; must end in /// space or cmd separator. /// @param[in] skip True when skipping. /// @param[in] flags @see GetLvalFlags. /// @param[in] fne_flags Flags for find_name_end(). /// /// @return A pointer to just after the name, including indexes. Returns NULL /// for a parsing error, but it is still needed to free items in lp. static char_u *get_lval(char_u *const name, typval_T *const rettv, lval_T *const lp, const bool unlet, const bool skip, const int flags, const int fne_flags) FUNC_ATTR_NONNULL_ARG(1, 3) { dictitem_T *v; typval_T var1; typval_T var2; int empty1 = FALSE; listitem_T *ni; hashtab_T *ht; int quiet = flags & GLV_QUIET; /* Clear everything in "lp". */ memset(lp, 0, sizeof(lval_T)); if (skip) { // When skipping just find the end of the name. lp->ll_name = (const char *)name; return (char_u *)find_name_end((const char_u *)name, NULL, NULL, FNE_INCL_BR | fne_flags); } // Find the end of the name. char_u *expr_start; char_u *expr_end; char_u *p = (char_u *)find_name_end(name, (const char_u **)&expr_start, (const char_u **)&expr_end, fne_flags); if (expr_start != NULL) { /* Don't expand the name when we already know there is an error. */ if (unlet && !ascii_iswhite(*p) && !ends_excmd(*p) && *p != '[' && *p != '.') { EMSG(_(e_trailing)); return NULL; } lp->ll_exp_name = (char *)make_expanded_name(name, expr_start, expr_end, (char_u *)p); lp->ll_name = lp->ll_exp_name; if (lp->ll_exp_name == NULL) { /* Report an invalid expression in braces, unless the * expression evaluation has been cancelled due to an * aborting error, an interrupt, or an exception. */ if (!aborting() && !quiet) { emsg_severe = TRUE; EMSG2(_(e_invarg2), name); return NULL; } lp->ll_name_len = 0; } else { lp->ll_name_len = strlen(lp->ll_name); } } else { lp->ll_name = (const char *)name; lp->ll_name_len = (size_t)((const char *)p - lp->ll_name); } // Without [idx] or .key we are done. if ((*p != '[' && *p != '.') || lp->ll_name == NULL) { return p; } v = find_var(lp->ll_name, lp->ll_name_len, &ht, flags & GLV_NO_AUTOLOAD); if (v == NULL && !quiet) { emsgf(_("E121: Undefined variable: %.*s"), (int)lp->ll_name_len, lp->ll_name); } if (v == NULL) { return NULL; } /* * Loop until no more [idx] or .key is following. */ lp->ll_tv = &v->di_tv; while (*p == '[' || (*p == '.' && lp->ll_tv->v_type == VAR_DICT)) { if (!(lp->ll_tv->v_type == VAR_LIST && lp->ll_tv->vval.v_list != NULL) && !(lp->ll_tv->v_type == VAR_DICT && lp->ll_tv->vval.v_dict != NULL)) { if (!quiet) EMSG(_("E689: Can only index a List or Dictionary")); return NULL; } if (lp->ll_range) { if (!quiet) EMSG(_("E708: [:] must come last")); return NULL; } int len = -1; char_u *key = NULL; if (*p == '.') { key = p + 1; for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; len++) { } if (len == 0) { if (!quiet) { EMSG(_("E713: Cannot use empty key after .")); } return NULL; } p = key + len; } else { /* Get the index [expr] or the first index [expr: ]. */ p = skipwhite(p + 1); if (*p == ':') { empty1 = true; } else { empty1 = false; if (eval1(&p, &var1, true) == FAIL) { // Recursive! return NULL; } if (!tv_check_str(&var1)) { // Not a number or string. tv_clear(&var1); return NULL; } } /* Optionally get the second index [ :expr]. */ if (*p == ':') { if (lp->ll_tv->v_type == VAR_DICT) { if (!quiet) { EMSG(_(e_dictrange)); } if (!empty1) { tv_clear(&var1); } return NULL; } if (rettv != NULL && (rettv->v_type != VAR_LIST || rettv->vval.v_list == NULL)) { if (!quiet) { emsgf(_("E709: [:] requires a List value")); } if (!empty1) { tv_clear(&var1); } return NULL; } p = skipwhite(p + 1); if (*p == ']') { lp->ll_empty2 = true; } else { lp->ll_empty2 = false; if (eval1(&p, &var2, true) == FAIL) { // Recursive! if (!empty1) { tv_clear(&var1); } return NULL; } if (!tv_check_str(&var2)) { // Not a number or string. if (!empty1) { tv_clear(&var1); } tv_clear(&var2); return NULL; } } lp->ll_range = TRUE; } else lp->ll_range = FALSE; if (*p != ']') { if (!quiet) { emsgf(_(e_missbrac)); } if (!empty1) { tv_clear(&var1); } if (lp->ll_range && !lp->ll_empty2) { tv_clear(&var2); } return NULL; } /* Skip to past ']'. */ ++p; } if (lp->ll_tv->v_type == VAR_DICT) { if (len == -1) { // "[key]": get key from "var1" key = (char_u *)tv_get_string(&var1); // is number or string if (key == NULL) { tv_clear(&var1); return NULL; } } lp->ll_list = NULL; lp->ll_dict = lp->ll_tv->vval.v_dict; lp->ll_di = tv_dict_find(lp->ll_dict, (const char *)key, len); /* When assigning to a scope dictionary check that a function and * variable name is valid (only variable name unless it is l: or * g: dictionary). Disallow overwriting a builtin function. */ if (rettv != NULL && lp->ll_dict->dv_scope != 0) { int prevval; int wrong; if (len != -1) { prevval = key[len]; key[len] = NUL; } else { prevval = 0; // Avoid compiler warning. } wrong = ((lp->ll_dict->dv_scope == VAR_DEF_SCOPE && tv_is_func(*rettv) && !var_check_func_name((const char *)key, lp->ll_di == NULL)) || !valid_varname((const char *)key)); if (len != -1) { key[len] = prevval; } if (wrong) { return NULL; } } if (lp->ll_di == NULL) { /* Can't add "v:" variable. */ if (lp->ll_dict == &vimvardict) { EMSG2(_(e_illvar), name); return NULL; } /* Key does not exist in dict: may need to add it. */ if (*p == '[' || *p == '.' || unlet) { if (!quiet) { emsgf(_(e_dictkey), key); } if (len == -1) { tv_clear(&var1); } return NULL; } if (len == -1) { lp->ll_newkey = vim_strsave(key); } else { lp->ll_newkey = vim_strnsave(key, len); } if (len == -1) { tv_clear(&var1); } break; // existing variable, need to check if it can be changed } else if (!(flags & GLV_READ_ONLY) && var_check_ro(lp->ll_di->di_flags, (const char *)name, (size_t)(p - name))) { if (len == -1) { tv_clear(&var1); } return NULL; } if (len == -1) { tv_clear(&var1); } lp->ll_tv = &lp->ll_di->di_tv; } else { // Get the number and item for the only or first index of the List. if (empty1) { lp->ll_n1 = 0; } else { lp->ll_n1 = (long)tv_get_number(&var1); // Is number or string. tv_clear(&var1); } lp->ll_dict = NULL; lp->ll_list = lp->ll_tv->vval.v_list; lp->ll_li = tv_list_find(lp->ll_list, lp->ll_n1); if (lp->ll_li == NULL) { if (lp->ll_n1 < 0) { lp->ll_n1 = 0; lp->ll_li = tv_list_find(lp->ll_list, lp->ll_n1); } } if (lp->ll_li == NULL) { if (lp->ll_range && !lp->ll_empty2) { tv_clear(&var2); } if (!quiet) { EMSGN(_(e_listidx), lp->ll_n1); } return NULL; } /* * May need to find the item or absolute index for the second * index of a range. * When no index given: "lp->ll_empty2" is TRUE. * Otherwise "lp->ll_n2" is set to the second index. */ if (lp->ll_range && !lp->ll_empty2) { lp->ll_n2 = (long)tv_get_number(&var2); // Is number or string. tv_clear(&var2); if (lp->ll_n2 < 0) { ni = tv_list_find(lp->ll_list, lp->ll_n2); if (ni == NULL) { if (!quiet) EMSGN(_(e_listidx), lp->ll_n2); return NULL; } lp->ll_n2 = tv_list_idx_of_item(lp->ll_list, ni); } // Check that lp->ll_n2 isn't before lp->ll_n1. if (lp->ll_n1 < 0) { lp->ll_n1 = tv_list_idx_of_item(lp->ll_list, lp->ll_li); } if (lp->ll_n2 < lp->ll_n1) { if (!quiet) { EMSGN(_(e_listidx), lp->ll_n2); } return NULL; } } lp->ll_tv = &lp->ll_li->li_tv; } } return p; } // TODO(ZyX-I): move to eval/executor /* * Clear lval "lp" that was filled by get_lval(). */ static void clear_lval(lval_T *lp) { xfree(lp->ll_exp_name); xfree(lp->ll_newkey); } // TODO(ZyX-I): move to eval/executor /* * Set a variable that was parsed by get_lval() to "rettv". * "endp" points to just after the parsed name. * "op" is NULL, "+" for "+=", "-" for "-=", "." for ".=" or "=" for "=". */ static void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv, int copy, const char_u *op) { int cc; listitem_T *ri; dictitem_T *di; if (lp->ll_tv == NULL) { cc = *endp; *endp = NUL; if (op != NULL && *op != '=') { typval_T tv; // handle +=, -= and .= di = NULL; if (get_var_tv((const char *)lp->ll_name, (int)STRLEN(lp->ll_name), &tv, &di, true, false) == OK) { if ((di == NULL || (!var_check_ro(di->di_flags, (const char *)lp->ll_name, TV_CSTRING) && !tv_check_lock(di->di_tv.v_lock, (const char *)lp->ll_name, TV_CSTRING))) && eexe_mod_op(&tv, rettv, (const char *)op) == OK) { set_var(lp->ll_name, lp->ll_name_len, &tv, false); } tv_clear(&tv); } } else { set_var(lp->ll_name, lp->ll_name_len, rettv, copy); } *endp = cc; } else if (tv_check_lock(lp->ll_newkey == NULL ? lp->ll_tv->v_lock : lp->ll_tv->vval.v_dict->dv_lock, (const char *)lp->ll_name, TV_CSTRING)) { } else if (lp->ll_range) { listitem_T *ll_li = lp->ll_li; int ll_n1 = lp->ll_n1; // Check whether any of the list items is locked for (listitem_T *ri = rettv->vval.v_list->lv_first; ri != NULL && ll_li != NULL; ) { if (tv_check_lock(ll_li->li_tv.v_lock, (const char *)lp->ll_name, TV_CSTRING)) { return; } ri = ri->li_next; if (ri == NULL || (!lp->ll_empty2 && lp->ll_n2 == ll_n1)) { break; } ll_li = ll_li->li_next; ll_n1++; } /* * Assign the List values to the list items. */ for (ri = rettv->vval.v_list->lv_first; ri != NULL; ) { if (op != NULL && *op != '=') { eexe_mod_op(&lp->ll_li->li_tv, &ri->li_tv, (const char *)op); } else { tv_clear(&lp->ll_li->li_tv); tv_copy(&ri->li_tv, &lp->ll_li->li_tv); } ri = ri->li_next; if (ri == NULL || (!lp->ll_empty2 && lp->ll_n2 == lp->ll_n1)) break; if (lp->ll_li->li_next == NULL) { // Need to add an empty item. tv_list_append_number(lp->ll_list, 0); assert(lp->ll_li->li_next); } lp->ll_li = lp->ll_li->li_next; ++lp->ll_n1; } if (ri != NULL) EMSG(_("E710: List value has more items than target")); else if (lp->ll_empty2 ? (lp->ll_li != NULL && lp->ll_li->li_next != NULL) : lp->ll_n1 != lp->ll_n2) EMSG(_("E711: List value has not enough items")); } else { typval_T oldtv = TV_INITIAL_VALUE; dict_T *dict = lp->ll_dict; bool watched = tv_dict_is_watched(dict); // Assign to a List or Dictionary item. if (lp->ll_newkey != NULL) { if (op != NULL && *op != '=') { EMSG2(_(e_letwrong), op); return; } // Need to add an item to the Dictionary. di = tv_dict_item_alloc((const char *)lp->ll_newkey); if (tv_dict_add(lp->ll_tv->vval.v_dict, di) == FAIL) { xfree(di); return; } lp->ll_tv = &di->di_tv; } else { if (watched) { tv_copy(lp->ll_tv, &oldtv); } if (op != NULL && *op != '=') { eexe_mod_op(lp->ll_tv, rettv, (const char *)op); goto notify; } else { tv_clear(lp->ll_tv); } } // Assign the value to the variable or list item. if (copy) { tv_copy(rettv, lp->ll_tv); } else { *lp->ll_tv = *rettv; lp->ll_tv->v_lock = 0; tv_init(rettv); } notify: if (watched) { if (oldtv.v_type == VAR_UNKNOWN) { tv_dict_watcher_notify(dict, (char *)lp->ll_newkey, lp->ll_tv, NULL); } else { dictitem_T *di = lp->ll_di; tv_dict_watcher_notify(dict, (char *)di->di_key, lp->ll_tv, &oldtv); tv_clear(&oldtv); } } } } // TODO(ZyX-I): move to eval/ex_cmds /* * Evaluate the expression used in a ":for var in expr" command. * "arg" points to "var". * Set "*errp" to TRUE for an error, FALSE otherwise; * Return a pointer that holds the info. Null when there is an error. */ void *eval_for_line(const char_u *arg, bool *errp, char_u **nextcmdp, int skip) { forinfo_T *fi = xcalloc(1, sizeof(forinfo_T)); const char_u *expr; typval_T tv; list_T *l; *errp = true; // Default: there is an error. expr = skip_var_list(arg, &fi->fi_varcount, &fi->fi_semicolon); if (expr == NULL) return fi; expr = skipwhite(expr); if (expr[0] != 'i' || expr[1] != 'n' || !ascii_iswhite(expr[2])) { EMSG(_("E690: Missing \"in\" after :for")); return fi; } if (skip) ++emsg_skip; if (eval0(skipwhite(expr + 2), &tv, nextcmdp, !skip) == OK) { *errp = false; if (!skip) { l = tv.vval.v_list; if (tv.v_type != VAR_LIST) { EMSG(_(e_listreq)); tv_clear(&tv); } else if (l == NULL) { // a null list is like an empty list: do nothing tv_clear(&tv); } else { /* No need to increment the refcount, it's already set for the * list being used in "tv". */ fi->fi_list = l; tv_list_watch_add(l, &fi->fi_lw); fi->fi_lw.lw_item = l->lv_first; } } } if (skip) --emsg_skip; return fi; } // TODO(ZyX-I): move to eval/ex_cmds /* * Use the first item in a ":for" list. Advance to the next. * Assign the values to the variable (list). "arg" points to the first one. * Return TRUE when a valid item was found, FALSE when at end of list or * something wrong. */ int next_for_item(void *fi_void, char_u *arg) { forinfo_T *fi = (forinfo_T *)fi_void; int result; listitem_T *item; item = fi->fi_lw.lw_item; if (item == NULL) result = FALSE; else { fi->fi_lw.lw_item = item->li_next; result = (ex_let_vars(arg, &item->li_tv, TRUE, fi->fi_semicolon, fi->fi_varcount, NULL) == OK); } return result; } // TODO(ZyX-I): move to eval/ex_cmds /* * Free the structure used to store info used by ":for". */ void free_for_info(void *fi_void) { forinfo_T *fi = (forinfo_T *)fi_void; if (fi != NULL && fi->fi_list != NULL) { tv_list_watch_remove(fi->fi_list, &fi->fi_lw); tv_list_unref(fi->fi_list); } xfree(fi); } void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx) { int got_eq = FALSE; int c; char_u *p; if (cmdidx == CMD_let) { xp->xp_context = EXPAND_USER_VARS; if (vim_strpbrk(arg, (char_u *)"\"'+-*/%.=!?~|&$([<>,#") == NULL) { /* ":let var1 var2 ...": find last space. */ for (p = arg + STRLEN(arg); p >= arg; ) { xp->xp_pattern = p; mb_ptr_back(arg, p); if (ascii_iswhite(*p)) break; } return; } } else xp->xp_context = cmdidx == CMD_call ? EXPAND_FUNCTIONS : EXPAND_EXPRESSION; while ((xp->xp_pattern = vim_strpbrk(arg, (char_u *)"\"'+-*/%.=!?~|&$([<>,#")) != NULL) { c = *xp->xp_pattern; if (c == '&') { c = xp->xp_pattern[1]; if (c == '&') { ++xp->xp_pattern; xp->xp_context = cmdidx != CMD_let || got_eq ? EXPAND_EXPRESSION : EXPAND_NOTHING; } else if (c != ' ') { xp->xp_context = EXPAND_SETTINGS; if ((c == 'l' || c == 'g') && xp->xp_pattern[2] == ':') xp->xp_pattern += 2; } } else if (c == '$') { /* environment variable */ xp->xp_context = EXPAND_ENV_VARS; } else if (c == '=') { got_eq = TRUE; xp->xp_context = EXPAND_EXPRESSION; } else if (c == '#' && xp->xp_context == EXPAND_EXPRESSION) { // Autoload function/variable contains '#' break; } else if ((c == '<' || c == '#') && xp->xp_context == EXPAND_FUNCTIONS && vim_strchr(xp->xp_pattern, '(') == NULL) { /* Function name can start with "" and contain '#'. */ break; } else if (cmdidx != CMD_let || got_eq) { if (c == '"') { /* string */ while ((c = *++xp->xp_pattern) != NUL && c != '"') if (c == '\\' && xp->xp_pattern[1] != NUL) ++xp->xp_pattern; xp->xp_context = EXPAND_NOTHING; } else if (c == '\'') { /* literal string */ /* Trick: '' is like stopping and starting a literal string. */ while ((c = *++xp->xp_pattern) != NUL && c != '\'') /* skip */; xp->xp_context = EXPAND_NOTHING; } else if (c == '|') { if (xp->xp_pattern[1] == '|') { ++xp->xp_pattern; xp->xp_context = EXPAND_EXPRESSION; } else xp->xp_context = EXPAND_COMMANDS; } else xp->xp_context = EXPAND_EXPRESSION; } else /* Doesn't look like something valid, expand as an expression * anyway. */ xp->xp_context = EXPAND_EXPRESSION; arg = xp->xp_pattern; if (*arg != NUL) while ((c = *++arg) != NUL && (c == ' ' || c == '\t')) /* skip */; } xp->xp_pattern = arg; } // TODO(ZyX-I): move to eval/ex_cmds /* * ":1,25call func(arg1, arg2)" function call. */ void ex_call(exarg_T *eap) { char_u *arg = eap->arg; char_u *startarg; char_u *name; char_u *tofree; int len; typval_T rettv; linenr_T lnum; int doesrange; bool failed = false; funcdict_T fudi; partial_T *partial = NULL; if (eap->skip) { // trans_function_name() doesn't work well when skipping, use eval0() // instead to skip to any following command, e.g. for: // :if 0 | call dict.foo().bar() | endif. emsg_skip++; if (eval0(eap->arg, &rettv, &eap->nextcmd, false) != FAIL) { tv_clear(&rettv); } emsg_skip--; return; } tofree = trans_function_name(&arg, eap->skip, TFN_INT, &fudi, &partial); if (fudi.fd_newkey != NULL) { /* Still need to give an error message for missing key. */ EMSG2(_(e_dictkey), fudi.fd_newkey); xfree(fudi.fd_newkey); } if (tofree == NULL) return; /* Increase refcount on dictionary, it could get deleted when evaluating * the arguments. */ if (fudi.fd_dict != NULL) ++fudi.fd_dict->dv_refcount; // If it is the name of a variable of type VAR_FUNC or VAR_PARTIAL use its // contents. For VAR_PARTIAL get its partial, unless we already have one // from trans_function_name(). len = (int)STRLEN(tofree); name = deref_func_name((const char *)tofree, &len, partial != NULL ? NULL : &partial, false); /* Skip white space to allow ":call func ()". Not good, but required for * backward compatibility. */ startarg = skipwhite(arg); rettv.v_type = VAR_UNKNOWN; // tv_clear() uses this. if (*startarg != '(') { EMSG2(_("E107: Missing parentheses: %s"), eap->arg); goto end; } /* * When skipping, evaluate the function once, to find the end of the * arguments. * When the function takes a range, this is discovered after the first * call, and the loop is broken. */ if (eap->skip) { emsg_skip++; lnum = eap->line2; // Do it once, also with an invalid range. } else { lnum = eap->line1; } for (; lnum <= eap->line2; lnum++) { if (!eap->skip && eap->addr_count > 0) { // -V560 curwin->w_cursor.lnum = lnum; curwin->w_cursor.col = 0; curwin->w_cursor.coladd = 0; } arg = startarg; if (get_func_tv(name, (int)STRLEN(name), &rettv, &arg, eap->line1, eap->line2, &doesrange, !eap->skip, partial, fudi.fd_dict) == FAIL) { failed = true; break; } // Handle a function returning a Funcref, Dictionary or List. if (handle_subscript((const char **)&arg, &rettv, !eap->skip, true) == FAIL) { failed = true; break; } tv_clear(&rettv); if (doesrange || eap->skip) { // -V560 break; } /* Stop when immediately aborting on error, or when an interrupt * occurred or an exception was thrown but not caught. * get_func_tv() returned OK, so that the check for trailing * characters below is executed. */ if (aborting()) break; } if (eap->skip) --emsg_skip; if (!failed) { /* Check for trailing illegal characters and a following command. */ if (!ends_excmd(*arg)) { emsg_severe = TRUE; EMSG(_(e_trailing)); } else eap->nextcmd = check_nextcmd(arg); } end: tv_dict_unref(fudi.fd_dict); xfree(tofree); } // TODO(ZyX-I): move to eval/ex_cmds /* * ":unlet[!] var1 ... " command. */ void ex_unlet(exarg_T *eap) { ex_unletlock(eap, eap->arg, 0); } // TODO(ZyX-I): move to eval/ex_cmds /* * ":lockvar" and ":unlockvar" commands */ void ex_lockvar(exarg_T *eap) { char_u *arg = eap->arg; int deep = 2; if (eap->forceit) deep = -1; else if (ascii_isdigit(*arg)) { deep = getdigits_int(&arg); arg = skipwhite(arg); } ex_unletlock(eap, arg, deep); } // TODO(ZyX-I): move to eval/ex_cmds /* * ":unlet", ":lockvar" and ":unlockvar" are quite similar. */ static void ex_unletlock(exarg_T *eap, char_u *argstart, int deep) { char_u *arg = argstart; bool error = false; lval_T lv; do { // Parse the name and find the end. char_u *const name_end = (char_u *)get_lval(arg, NULL, &lv, true, eap->skip || error, 0, FNE_CHECK_START); if (lv.ll_name == NULL) { error = true; // error, but continue parsing. } if (name_end == NULL || (!ascii_iswhite(*name_end) && !ends_excmd(*name_end))) { if (name_end != NULL) { emsg_severe = TRUE; EMSG(_(e_trailing)); } if (!(eap->skip || error)) clear_lval(&lv); break; } if (!error && !eap->skip) { if (eap->cmdidx == CMD_unlet) { if (do_unlet_var(&lv, name_end, eap->forceit) == FAIL) error = TRUE; } else { if (do_lock_var(&lv, name_end, deep, eap->cmdidx == CMD_lockvar) == FAIL) { error = true; } } } if (!eap->skip) clear_lval(&lv); arg = skipwhite(name_end); } while (!ends_excmd(*arg)); eap->nextcmd = check_nextcmd(arg); } // TODO(ZyX-I): move to eval/ex_cmds static int do_unlet_var(lval_T *const lp, char_u *const name_end, int forceit) { int ret = OK; int cc; if (lp->ll_tv == NULL) { cc = *name_end; *name_end = NUL; // Normal name or expanded name. if (do_unlet(lp->ll_name, lp->ll_name_len, forceit) == FAIL) { ret = FAIL; } *name_end = cc; } else if ((lp->ll_list != NULL && tv_check_lock(lp->ll_list->lv_lock, (const char *)lp->ll_name, lp->ll_name_len)) || (lp->ll_dict != NULL && tv_check_lock(lp->ll_dict->dv_lock, (const char *)lp->ll_name, lp->ll_name_len))) { return FAIL; } else if (lp->ll_range) { listitem_T *li; listitem_T *ll_li = lp->ll_li; int ll_n1 = lp->ll_n1; while (ll_li != NULL && (lp->ll_empty2 || lp->ll_n2 >= ll_n1)) { li = ll_li->li_next; if (tv_check_lock(ll_li->li_tv.v_lock, (const char *)lp->ll_name, lp->ll_name_len)) { return false; } ll_li = li; ll_n1++; } /* Delete a range of List items. */ while (lp->ll_li != NULL && (lp->ll_empty2 || lp->ll_n2 >= lp->ll_n1)) { li = lp->ll_li->li_next; tv_list_item_remove(lp->ll_list, lp->ll_li); lp->ll_li = li; ++lp->ll_n1; } } else { if (lp->ll_list != NULL) { // unlet a List item. tv_list_item_remove(lp->ll_list, lp->ll_li); } else { // unlet a Dictionary item. dict_T *d = lp->ll_dict; dictitem_T *di = lp->ll_di; bool watched = tv_dict_is_watched(d); char *key = NULL; typval_T oldtv; if (watched) { tv_copy(&di->di_tv, &oldtv); // need to save key because dictitem_remove will free it key = xstrdup((char *)di->di_key); } tv_dict_item_remove(d, di); if (watched) { tv_dict_watcher_notify(d, key, NULL, &oldtv); tv_clear(&oldtv); xfree(key); } } } return ret; } // TODO(ZyX-I): move to eval/ex_cmds /// unlet a variable /// /// @param[in] name Variable name to unlet. /// @param[in] name_len Variable name length. /// @param[in] fonceit If true, do not complain if variable doesn’t exist. /// /// @return OK if it existed, FAIL otherwise. int do_unlet(const char *const name, const size_t name_len, const int forceit) FUNC_ATTR_NONNULL_ALL { const char *varname; dict_T *dict; hashtab_T *ht = find_var_ht_dict(name, name_len, &varname, &dict); if (ht != NULL && *varname != NUL) { dict_T *d; if (ht == &globvarht) { d = &globvardict; } else if (current_funccal != NULL && ht == ¤t_funccal->l_vars.dv_hashtab) { d = ¤t_funccal->l_vars; } else if (ht == &compat_hashtab) { d = &vimvardict; } else { dictitem_T *const di = find_var_in_ht(ht, *name, "", 0, false); d = di->di_tv.vval.v_dict; } if (d == NULL) { EMSG2(_(e_intern2), "do_unlet()"); return FAIL; } hashitem_T *hi = hash_find(ht, (const char_u *)varname); if (HASHITEM_EMPTY(hi)) { hi = find_hi_in_scoped_ht((const char *)name, &ht); } if (hi != NULL && !HASHITEM_EMPTY(hi)) { dictitem_T *const di = TV_DICT_HI2DI(hi); if (var_check_fixed(di->di_flags, (const char *)name, TV_CSTRING) || var_check_ro(di->di_flags, (const char *)name, TV_CSTRING) || tv_check_lock(d->dv_lock, (const char *)name, TV_CSTRING)) { return FAIL; } if (tv_check_lock(d->dv_lock, (const char *)name, TV_CSTRING)) { return FAIL; } typval_T oldtv; bool watched = tv_dict_is_watched(dict); if (watched) { tv_copy(&di->di_tv, &oldtv); } delete_var(ht, hi); if (watched) { tv_dict_watcher_notify(dict, varname, NULL, &oldtv); tv_clear(&oldtv); } return OK; } } if (forceit) return OK; EMSG2(_("E108: No such variable: \"%s\""), name); return FAIL; } // TODO(ZyX-I): move to eval/ex_cmds /* * Lock or unlock variable indicated by "lp". * "deep" is the levels to go (-1 for unlimited); * "lock" is TRUE for ":lockvar", FALSE for ":unlockvar". */ static int do_lock_var(lval_T *lp, char_u *const name_end, const int deep, const bool lock) { int ret = OK; if (deep == 0) { // Nothing to do. return OK; } if (lp->ll_tv == NULL) { // Normal name or expanded name. dictitem_T *const di = find_var( (const char *)lp->ll_name, lp->ll_name_len, NULL, true); if (di == NULL) { ret = FAIL; } else if ((di->di_flags & DI_FLAGS_FIX) && di->di_tv.v_type != VAR_DICT && di->di_tv.v_type != VAR_LIST) { // For historical reasons this error is not given for Lists and // Dictionaries. E.g. b: dictionary may be locked/unlocked. emsgf(_("E940: Cannot lock or unlock variable %s"), lp->ll_name); } else { if (lock) { di->di_flags |= DI_FLAGS_LOCK; } else { di->di_flags &= ~DI_FLAGS_LOCK; } tv_item_lock(&di->di_tv, deep, lock); } } else if (lp->ll_range) { listitem_T *li = lp->ll_li; /* (un)lock a range of List items. */ while (li != NULL && (lp->ll_empty2 || lp->ll_n2 >= lp->ll_n1)) { tv_item_lock(&li->li_tv, deep, lock); li = li->li_next; ++lp->ll_n1; } } else if (lp->ll_list != NULL) { // (un)lock a List item. tv_item_lock(&lp->ll_li->li_tv, deep, lock); } else { // (un)lock a Dictionary item. tv_item_lock(&lp->ll_di->di_tv, deep, lock); } return ret; } /* * Delete all "menutrans_" variables. */ void del_menutrans_vars(void) { hash_lock(&globvarht); HASHTAB_ITER(&globvarht, hi, { if (STRNCMP(hi->hi_key, "menutrans_", 10) == 0) { delete_var(&globvarht, hi); } }); hash_unlock(&globvarht); } /* * Local string buffer for the next two functions to store a variable name * with its prefix. Allocated in cat_prefix_varname(), freed later in * get_user_var_name(). */ static char_u *varnamebuf = NULL; static size_t varnamebuflen = 0; /* * Function to concatenate a prefix and a variable name. */ static char_u *cat_prefix_varname(int prefix, char_u *name) { size_t len = STRLEN(name) + 3; if (len > varnamebuflen) { xfree(varnamebuf); len += 10; /* some additional space */ varnamebuf = xmalloc(len); varnamebuflen = len; } *varnamebuf = prefix; varnamebuf[1] = ':'; STRCPY(varnamebuf + 2, name); return varnamebuf; } /* * Function given to ExpandGeneric() to obtain the list of user defined * (global/buffer/window/built-in) variable names. */ char_u *get_user_var_name(expand_T *xp, int idx) { static size_t gdone; static size_t bdone; static size_t wdone; static size_t tdone; static size_t vidx; static hashitem_T *hi; hashtab_T *ht; if (idx == 0) { gdone = bdone = wdone = vidx = 0; tdone = 0; } /* Global variables */ if (gdone < globvarht.ht_used) { if (gdone++ == 0) hi = globvarht.ht_array; else ++hi; while (HASHITEM_EMPTY(hi)) ++hi; if (STRNCMP("g:", xp->xp_pattern, 2) == 0) return cat_prefix_varname('g', hi->hi_key); return hi->hi_key; } /* b: variables */ ht = &curbuf->b_vars->dv_hashtab; if (bdone < ht->ht_used) { if (bdone++ == 0) hi = ht->ht_array; else ++hi; while (HASHITEM_EMPTY(hi)) ++hi; return cat_prefix_varname('b', hi->hi_key); } /* w: variables */ ht = &curwin->w_vars->dv_hashtab; if (wdone < ht->ht_used) { if (wdone++ == 0) hi = ht->ht_array; else ++hi; while (HASHITEM_EMPTY(hi)) ++hi; return cat_prefix_varname('w', hi->hi_key); } /* t: variables */ ht = &curtab->tp_vars->dv_hashtab; if (tdone < ht->ht_used) { if (tdone++ == 0) hi = ht->ht_array; else ++hi; while (HASHITEM_EMPTY(hi)) ++hi; return cat_prefix_varname('t', hi->hi_key); } // v: variables if (vidx < ARRAY_SIZE(vimvars)) { return cat_prefix_varname('v', (char_u *)vimvars[vidx++].vv_name); } xfree(varnamebuf); varnamebuf = NULL; varnamebuflen = 0; return NULL; } // TODO(ZyX-I): move to eval/expressions /// Return TRUE if "pat" matches "text". /// Does not use 'cpo' and always uses 'magic'. static int pattern_match(char_u *pat, char_u *text, int ic) { int matches = 0; regmatch_T regmatch; // avoid 'l' flag in 'cpoptions' char_u *save_cpo = p_cpo; p_cpo = (char_u *)""; regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING); if (regmatch.regprog != NULL) { regmatch.rm_ic = ic; matches = vim_regexec_nl(®match, text, (colnr_T)0); vim_regfree(regmatch.regprog); } p_cpo = save_cpo; return matches; } /* * types for expressions. */ typedef enum { TYPE_UNKNOWN = 0 , TYPE_EQUAL /* == */ , TYPE_NEQUAL /* != */ , TYPE_GREATER /* > */ , TYPE_GEQUAL /* >= */ , TYPE_SMALLER /* < */ , TYPE_SEQUAL /* <= */ , TYPE_MATCH /* =~ */ , TYPE_NOMATCH /* !~ */ } exptype_T; // TODO(ZyX-I): move to eval/expressions /* * The "evaluate" argument: When FALSE, the argument is only parsed but not * executed. The function may return OK, but the rettv will be of type * VAR_UNKNOWN. The function still returns FAIL for a syntax error. */ /* * Handle zero level expression. * This calls eval1() and handles error message and nextcmd. * Put the result in "rettv" when returning OK and "evaluate" is TRUE. * Note: "rettv.v_lock" is not set. * Return OK or FAIL. */ int eval0(char_u *arg, typval_T *rettv, char_u **nextcmd, int evaluate) { int ret; char_u *p; p = skipwhite(arg); ret = eval1(&p, rettv, evaluate); if (ret == FAIL || !ends_excmd(*p)) { if (ret != FAIL) { tv_clear(rettv); } // Report the invalid expression unless the expression evaluation has // been cancelled due to an aborting error, an interrupt, or an // exception. if (!aborting()) { emsgf(_(e_invexpr2), arg); } ret = FAIL; } if (nextcmd != NULL) *nextcmd = check_nextcmd(p); return ret; } // TODO(ZyX-I): move to eval/expressions /* * Handle top level expression: * expr2 ? expr1 : expr1 * * "arg" must point to the first non-white of the expression. * "arg" is advanced to the next non-white after the recognized expression. * * Note: "rettv.v_lock" is not set. * * Return OK or FAIL. */ static int eval1(char_u **arg, typval_T *rettv, int evaluate) { int result; typval_T var2; /* * Get the first variable. */ if (eval2(arg, rettv, evaluate) == FAIL) return FAIL; if ((*arg)[0] == '?') { result = FALSE; if (evaluate) { bool error = false; if (tv_get_number_chk(rettv, &error) != 0) { result = true; } tv_clear(rettv); if (error) { return FAIL; } } /* * Get the second variable. */ *arg = skipwhite(*arg + 1); if (eval1(arg, rettv, evaluate && result) == FAIL) /* recursive! */ return FAIL; /* * Check for the ":". */ if ((*arg)[0] != ':') { emsgf(_("E109: Missing ':' after '?'")); if (evaluate && result) { tv_clear(rettv); } return FAIL; } /* * Get the third variable. */ *arg = skipwhite(*arg + 1); if (eval1(arg, &var2, evaluate && !result) == FAIL) { // Recursive! if (evaluate && result) { tv_clear(rettv); } return FAIL; } if (evaluate && !result) *rettv = var2; } return OK; } // TODO(ZyX-I): move to eval/expressions /* * Handle first level expression: * expr2 || expr2 || expr2 logical OR * * "arg" must point to the first non-white of the expression. * "arg" is advanced to the next non-white after the recognized expression. * * Return OK or FAIL. */ static int eval2(char_u **arg, typval_T *rettv, int evaluate) { typval_T var2; long result; int first; bool error = false; /* * Get the first variable. */ if (eval3(arg, rettv, evaluate) == FAIL) return FAIL; /* * Repeat until there is no following "||". */ first = TRUE; result = FALSE; while ((*arg)[0] == '|' && (*arg)[1] == '|') { if (evaluate && first) { if (tv_get_number_chk(rettv, &error) != 0) { result = true; } tv_clear(rettv); if (error) { return FAIL; } first = false; } /* * Get the second variable. */ *arg = skipwhite(*arg + 2); if (eval3(arg, &var2, evaluate && !result) == FAIL) return FAIL; /* * Compute the result. */ if (evaluate && !result) { if (tv_get_number_chk(&var2, &error) != 0) { result = true; } tv_clear(&var2); if (error) { return FAIL; } } if (evaluate) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = result; } } return OK; } // TODO(ZyX-I): move to eval/expressions /* * Handle second level expression: * expr3 && expr3 && expr3 logical AND * * "arg" must point to the first non-white of the expression. * "arg" is advanced to the next non-white after the recognized expression. * * Return OK or FAIL. */ static int eval3(char_u **arg, typval_T *rettv, int evaluate) { typval_T var2; long result; int first; bool error = false; /* * Get the first variable. */ if (eval4(arg, rettv, evaluate) == FAIL) return FAIL; /* * Repeat until there is no following "&&". */ first = TRUE; result = TRUE; while ((*arg)[0] == '&' && (*arg)[1] == '&') { if (evaluate && first) { if (tv_get_number_chk(rettv, &error) == 0) { result = false; } tv_clear(rettv); if (error) { return FAIL; } first = false; } /* * Get the second variable. */ *arg = skipwhite(*arg + 2); if (eval4(arg, &var2, evaluate && result) == FAIL) return FAIL; /* * Compute the result. */ if (evaluate && result) { if (tv_get_number_chk(&var2, &error) == 0) { result = false; } tv_clear(&var2); if (error) { return FAIL; } } if (evaluate) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = result; } } return OK; } // TODO(ZyX-I): move to eval/expressions /* * Handle third level expression: * var1 == var2 * var1 =~ var2 * var1 != var2 * var1 !~ var2 * var1 > var2 * var1 >= var2 * var1 < var2 * var1 <= var2 * var1 is var2 * var1 isnot var2 * * "arg" must point to the first non-white of the expression. * "arg" is advanced to the next non-white after the recognized expression. * * Return OK or FAIL. */ static int eval4(char_u **arg, typval_T *rettv, int evaluate) { typval_T var2; char_u *p; int i; exptype_T type = TYPE_UNKNOWN; int type_is = FALSE; /* TRUE for "is" and "isnot" */ int len = 2; varnumber_T n1, n2; int ic; /* * Get the first variable. */ if (eval5(arg, rettv, evaluate) == FAIL) return FAIL; p = *arg; switch (p[0]) { case '=': if (p[1] == '=') type = TYPE_EQUAL; else if (p[1] == '~') type = TYPE_MATCH; break; case '!': if (p[1] == '=') type = TYPE_NEQUAL; else if (p[1] == '~') type = TYPE_NOMATCH; break; case '>': if (p[1] != '=') { type = TYPE_GREATER; len = 1; } else type = TYPE_GEQUAL; break; case '<': if (p[1] != '=') { type = TYPE_SMALLER; len = 1; } else type = TYPE_SEQUAL; break; case 'i': if (p[1] == 's') { if (p[2] == 'n' && p[3] == 'o' && p[4] == 't') { len = 5; } if (!isalnum(p[len]) && p[len] != '_') { type = len == 2 ? TYPE_EQUAL : TYPE_NEQUAL; type_is = TRUE; } } break; } /* * If there is a comparative operator, use it. */ if (type != TYPE_UNKNOWN) { /* extra question mark appended: ignore case */ if (p[len] == '?') { ic = TRUE; ++len; } /* extra '#' appended: match case */ else if (p[len] == '#') { ic = FALSE; ++len; } /* nothing appended: use 'ignorecase' */ else ic = p_ic; /* * Get the second variable. */ *arg = skipwhite(p + len); if (eval5(arg, &var2, evaluate) == FAIL) { tv_clear(rettv); return FAIL; } if (evaluate) { if (type_is && rettv->v_type != var2.v_type) { /* For "is" a different type always means FALSE, for "notis" * it means TRUE. */ n1 = (type == TYPE_NEQUAL); } else if (rettv->v_type == VAR_LIST || var2.v_type == VAR_LIST) { if (type_is) { n1 = (rettv->v_type == var2.v_type && rettv->vval.v_list == var2.vval.v_list); if (type == TYPE_NEQUAL) n1 = !n1; } else if (rettv->v_type != var2.v_type || (type != TYPE_EQUAL && type != TYPE_NEQUAL)) { if (rettv->v_type != var2.v_type) { EMSG(_("E691: Can only compare List with List")); } else { EMSG(_("E692: Invalid operation for List")); } tv_clear(rettv); tv_clear(&var2); return FAIL; } else { // Compare two Lists for being equal or unequal. n1 = tv_list_equal(rettv->vval.v_list, var2.vval.v_list, ic, false); if (type == TYPE_NEQUAL) { n1 = !n1; } } } else if (rettv->v_type == VAR_DICT || var2.v_type == VAR_DICT) { if (type_is) { n1 = (rettv->v_type == var2.v_type && rettv->vval.v_dict == var2.vval.v_dict); if (type == TYPE_NEQUAL) n1 = !n1; } else if (rettv->v_type != var2.v_type || (type != TYPE_EQUAL && type != TYPE_NEQUAL)) { if (rettv->v_type != var2.v_type) EMSG(_("E735: Can only compare Dictionary with Dictionary")); else EMSG(_("E736: Invalid operation for Dictionary")); tv_clear(rettv); tv_clear(&var2); return FAIL; } else { // Compare two Dictionaries for being equal or unequal. n1 = tv_dict_equal(rettv->vval.v_dict, var2.vval.v_dict, ic, false); if (type == TYPE_NEQUAL) { n1 = !n1; } } } else if (tv_is_func(*rettv) || tv_is_func(var2)) { if (type != TYPE_EQUAL && type != TYPE_NEQUAL) { EMSG(_("E694: Invalid operation for Funcrefs")); tv_clear(rettv); tv_clear(&var2); return FAIL; } if ((rettv->v_type == VAR_PARTIAL && rettv->vval.v_partial == NULL) || (var2.v_type == VAR_PARTIAL && var2.vval.v_partial == NULL)) { // when a partial is NULL assume not equal n1 = false; } else if (type_is) { if (rettv->v_type == VAR_FUNC && var2.v_type == VAR_FUNC) { // strings are considered the same if their value is // the same n1 = tv_equal(rettv, &var2, ic, false); } else if (rettv->v_type == VAR_PARTIAL && var2.v_type == VAR_PARTIAL) { n1 = (rettv->vval.v_partial == var2.vval.v_partial); } else { n1 = false; } } else { n1 = tv_equal(rettv, &var2, ic, false); } if (type == TYPE_NEQUAL) { n1 = !n1; } } /* * If one of the two variables is a float, compare as a float. * When using "=~" or "!~", always compare as string. */ else if ((rettv->v_type == VAR_FLOAT || var2.v_type == VAR_FLOAT) && type != TYPE_MATCH && type != TYPE_NOMATCH) { float_T f1, f2; if (rettv->v_type == VAR_FLOAT) { f1 = rettv->vval.v_float; } else { f1 = tv_get_number(rettv); } if (var2.v_type == VAR_FLOAT) { f2 = var2.vval.v_float; } else { f2 = tv_get_number(&var2); } n1 = false; switch (type) { case TYPE_EQUAL: n1 = (f1 == f2); break; case TYPE_NEQUAL: n1 = (f1 != f2); break; case TYPE_GREATER: n1 = (f1 > f2); break; case TYPE_GEQUAL: n1 = (f1 >= f2); break; case TYPE_SMALLER: n1 = (f1 < f2); break; case TYPE_SEQUAL: n1 = (f1 <= f2); break; case TYPE_UNKNOWN: case TYPE_MATCH: case TYPE_NOMATCH: break; } } /* * If one of the two variables is a number, compare as a number. * When using "=~" or "!~", always compare as string. */ else if ((rettv->v_type == VAR_NUMBER || var2.v_type == VAR_NUMBER) && type != TYPE_MATCH && type != TYPE_NOMATCH) { n1 = tv_get_number(rettv); n2 = tv_get_number(&var2); switch (type) { case TYPE_EQUAL: n1 = (n1 == n2); break; case TYPE_NEQUAL: n1 = (n1 != n2); break; case TYPE_GREATER: n1 = (n1 > n2); break; case TYPE_GEQUAL: n1 = (n1 >= n2); break; case TYPE_SMALLER: n1 = (n1 < n2); break; case TYPE_SEQUAL: n1 = (n1 <= n2); break; case TYPE_UNKNOWN: case TYPE_MATCH: case TYPE_NOMATCH: break; } } else { char buf1[NUMBUFLEN]; char buf2[NUMBUFLEN]; const char *const s1 = tv_get_string_buf(rettv, buf1); const char *const s2 = tv_get_string_buf(&var2, buf2); if (type != TYPE_MATCH && type != TYPE_NOMATCH) { i = mb_strcmp_ic((bool)ic, s1, s2); } else { i = 0; } n1 = false; switch (type) { case TYPE_EQUAL: n1 = (i == 0); break; case TYPE_NEQUAL: n1 = (i != 0); break; case TYPE_GREATER: n1 = (i > 0); break; case TYPE_GEQUAL: n1 = (i >= 0); break; case TYPE_SMALLER: n1 = (i < 0); break; case TYPE_SEQUAL: n1 = (i <= 0); break; case TYPE_MATCH: case TYPE_NOMATCH: { n1 = pattern_match((char_u *)s2, (char_u *)s1, ic); if (type == TYPE_NOMATCH) { n1 = !n1; } break; } case TYPE_UNKNOWN: break; // Avoid gcc warning. } } tv_clear(rettv); tv_clear(&var2); rettv->v_type = VAR_NUMBER; rettv->vval.v_number = n1; } } return OK; } // TODO(ZyX-I): move to eval/expressions /* * Handle fourth level expression: * + number addition * - number subtraction * . string concatenation * * "arg" must point to the first non-white of the expression. * "arg" is advanced to the next non-white after the recognized expression. * * Return OK or FAIL. */ static int eval5(char_u **arg, typval_T *rettv, int evaluate) { typval_T var2; typval_T var3; int op; varnumber_T n1, n2; float_T f1 = 0, f2 = 0; char_u *p; /* * Get the first variable. */ if (eval6(arg, rettv, evaluate, FALSE) == FAIL) return FAIL; /* * Repeat computing, until no '+', '-' or '.' is following. */ for (;; ) { op = **arg; if (op != '+' && op != '-' && op != '.') break; if ((op != '+' || rettv->v_type != VAR_LIST) && (op == '.' || rettv->v_type != VAR_FLOAT)) { // For "list + ...", an illegal use of the first operand as // a number cannot be determined before evaluating the 2nd // operand: if this is also a list, all is ok. // For "something . ...", "something - ..." or "non-list + ...", // we know that the first operand needs to be a string or number // without evaluating the 2nd operand. So check before to avoid // side effects after an error. if (evaluate && !tv_check_str(rettv)) { tv_clear(rettv); return FAIL; } } /* * Get the second variable. */ *arg = skipwhite(*arg + 1); if (eval6(arg, &var2, evaluate, op == '.') == FAIL) { tv_clear(rettv); return FAIL; } if (evaluate) { /* * Compute the result. */ if (op == '.') { char buf1[NUMBUFLEN]; char buf2[NUMBUFLEN]; // s1 already checked const char *const s1 = tv_get_string_buf(rettv, buf1); const char *const s2 = tv_get_string_buf_chk(&var2, buf2); if (s2 == NULL) { // Type error? tv_clear(rettv); tv_clear(&var2); return FAIL; } p = concat_str((const char_u *)s1, (const char_u *)s2); tv_clear(rettv); rettv->v_type = VAR_STRING; rettv->vval.v_string = p; } else if (op == '+' && rettv->v_type == VAR_LIST && var2.v_type == VAR_LIST) { // Concatenate Lists. if (tv_list_concat(rettv->vval.v_list, var2.vval.v_list, &var3) == FAIL) { tv_clear(rettv); tv_clear(&var2); return FAIL; } tv_clear(rettv); *rettv = var3; } else { bool error = false; if (rettv->v_type == VAR_FLOAT) { f1 = rettv->vval.v_float; n1 = 0; } else { n1 = tv_get_number_chk(rettv, &error); if (error) { /* This can only happen for "list + non-list". For * "non-list + ..." or "something - ...", we returned * before evaluating the 2nd operand. */ tv_clear(rettv); return FAIL; } if (var2.v_type == VAR_FLOAT) f1 = n1; } if (var2.v_type == VAR_FLOAT) { f2 = var2.vval.v_float; n2 = 0; } else { n2 = tv_get_number_chk(&var2, &error); if (error) { tv_clear(rettv); tv_clear(&var2); return FAIL; } if (rettv->v_type == VAR_FLOAT) f2 = n2; } tv_clear(rettv); /* If there is a float on either side the result is a float. */ if (rettv->v_type == VAR_FLOAT || var2.v_type == VAR_FLOAT) { if (op == '+') f1 = f1 + f2; else f1 = f1 - f2; rettv->v_type = VAR_FLOAT; rettv->vval.v_float = f1; } else { if (op == '+') n1 = n1 + n2; else n1 = n1 - n2; rettv->v_type = VAR_NUMBER; rettv->vval.v_number = n1; } } tv_clear(&var2); } } return OK; } // TODO(ZyX-I): move to eval/expressions /// Handle fifth level expression: /// - * number multiplication /// - / number division /// - % number modulo /// /// @param[in,out] arg Points to the first non-whitespace character of the /// expression. Is advanced to the next non-whitespace /// character after the recognized expression. /// @param[out] rettv Location where result is saved. /// @param[in] evaluate If not true, rettv is not populated. /// @param[in] want_string True if "." is string_concatenation, otherwise /// float /// @return OK or FAIL. static int eval6(char_u **arg, typval_T *rettv, int evaluate, int want_string) FUNC_ATTR_NO_SANITIZE_UNDEFINED { typval_T var2; int op; varnumber_T n1, n2; bool use_float = false; float_T f1 = 0, f2; bool error = false; /* * Get the first variable. */ if (eval7(arg, rettv, evaluate, want_string) == FAIL) return FAIL; /* * Repeat computing, until no '*', '/' or '%' is following. */ for (;; ) { op = **arg; if (op != '*' && op != '/' && op != '%') break; if (evaluate) { if (rettv->v_type == VAR_FLOAT) { f1 = rettv->vval.v_float; use_float = true; n1 = 0; } else { n1 = tv_get_number_chk(rettv, &error); } tv_clear(rettv); if (error) { return FAIL; } } else { n1 = 0; } /* * Get the second variable. */ *arg = skipwhite(*arg + 1); if (eval7(arg, &var2, evaluate, FALSE) == FAIL) return FAIL; if (evaluate) { if (var2.v_type == VAR_FLOAT) { if (!use_float) { f1 = n1; use_float = true; } f2 = var2.vval.v_float; n2 = 0; } else { n2 = tv_get_number_chk(&var2, &error); tv_clear(&var2); if (error) { return FAIL; } if (use_float) { f2 = n2; } } /* * Compute the result. * When either side is a float the result is a float. */ if (use_float) { if (op == '*') { f1 = f1 * f2; } else if (op == '/') { // Division by zero triggers error from AddressSanitizer f1 = (f2 == 0 ? ( #ifdef NAN f1 == 0 ? NAN : #endif (f1 > 0 ? INFINITY : -INFINITY) ) : f1 / f2); } else { EMSG(_("E804: Cannot use '%' with Float")); return FAIL; } rettv->v_type = VAR_FLOAT; rettv->vval.v_float = f1; } else { if (op == '*') { n1 = n1 * n2; } else if (op == '/') { if (n2 == 0) { // give an error message? if (n1 == 0) { n1 = VARNUMBER_MIN; // similar to NaN } else if (n1 < 0) { n1 = -VARNUMBER_MAX; } else { n1 = VARNUMBER_MAX; } } else { n1 = n1 / n2; } } else { if (n2 == 0) /* give an error message? */ n1 = 0; else n1 = n1 % n2; } rettv->v_type = VAR_NUMBER; rettv->vval.v_number = n1; } } } return OK; } // TODO(ZyX-I): move to eval/expressions // Handle sixth level expression: // number number constant // "string" string constant // 'string' literal string constant // &option-name option value // @r register contents // identifier variable value // function() function call // $VAR environment variable // (expression) nested expression // [expr, expr] List // {key: val, key: val} Dictionary // // Also handle: // ! in front logical NOT // - in front unary minus // + in front unary plus (ignored) // trailing [] subscript in String or List // trailing .name entry in Dictionary // // "arg" must point to the first non-white of the expression. // "arg" is advanced to the next non-white after the recognized expression. // // Return OK or FAIL. static int eval7( char_u **arg, typval_T *rettv, int evaluate, int want_string // after "." operator ) { varnumber_T n; int len; char_u *s; char_u *start_leader, *end_leader; int ret = OK; char_u *alias; // Initialise variable so that tv_clear() can't mistake this for a // string and free a string that isn't there. rettv->v_type = VAR_UNKNOWN; // Skip '!', '-' and '+' characters. They are handled later. start_leader = *arg; while (**arg == '!' || **arg == '-' || **arg == '+') { *arg = skipwhite(*arg + 1); } end_leader = *arg; switch (**arg) { // Number constant. case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { char_u *p = skipdigits(*arg + 1); int get_float = false; // We accept a float when the format matches // "[0-9]\+\.[0-9]\+\([eE][+-]\?[0-9]\+\)\?". This is very // strict to avoid backwards compatibility problems. // Don't look for a float after the "." operator, so that // ":let vers = 1.2.3" doesn't fail. if (!want_string && p[0] == '.' && ascii_isdigit(p[1])) { get_float = true; p = skipdigits(p + 2); if (*p == 'e' || *p == 'E') { ++p; if (*p == '-' || *p == '+') { ++p; } if (!ascii_isdigit(*p)) { get_float = false; } else { p = skipdigits(p + 1); } } if (ASCII_ISALPHA(*p) || *p == '.') { get_float = false; } } if (get_float) { float_T f; *arg += string2float((char *) *arg, &f); if (evaluate) { rettv->v_type = VAR_FLOAT; rettv->vval.v_float = f; } } else { vim_str2nr(*arg, NULL, &len, STR2NR_ALL, &n, NULL, 0); *arg += len; if (evaluate) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = n; } } break; } // String constant: "string". case '"': ret = get_string_tv(arg, rettv, evaluate); break; // Literal string constant: 'str''ing'. case '\'': ret = get_lit_string_tv(arg, rettv, evaluate); break; // List: [expr, expr] case '[': ret = get_list_tv(arg, rettv, evaluate); break; // Lambda: {arg, arg -> expr} // Dictionary: {key: val, key: val} case '{': ret = get_lambda_tv(arg, rettv, evaluate); if (ret == NOTDONE) { ret = get_dict_tv(arg, rettv, evaluate); } break; // Option value: &name case '&': { ret = get_option_tv((const char **)arg, rettv, evaluate); break; } // Environment variable: $VAR. case '$': ret = get_env_tv(arg, rettv, evaluate); break; // Register contents: @r. case '@': ++*arg; if (evaluate) { rettv->v_type = VAR_STRING; rettv->vval.v_string = get_reg_contents(**arg, kGRegExprSrc); } if (**arg != NUL) { ++*arg; } break; // nested expression: (expression). case '(': *arg = skipwhite(*arg + 1); ret = eval1(arg, rettv, evaluate); // recursive! if (**arg == ')') { ++*arg; } else if (ret == OK) { EMSG(_("E110: Missing ')'")); tv_clear(rettv); ret = FAIL; } break; default: ret = NOTDONE; break; } if (ret == NOTDONE) { // Must be a variable or function name. // Can also be a curly-braces kind of name: {expr}. s = *arg; len = get_name_len((const char **)arg, (char **)&alias, evaluate, true); if (alias != NULL) { s = alias; } if (len <= 0) { ret = FAIL; } else { if (**arg == '(') { // recursive! partial_T *partial; if (!evaluate) { check_vars((const char *)s, len); } // If "s" is the name of a variable of type VAR_FUNC // use its contents. s = deref_func_name((const char *)s, &len, &partial, !evaluate); // Need to make a copy, in case evaluating the arguments makes // the name invalid. s = xmemdupz(s, len); // Invoke the function. ret = get_func_tv(s, len, rettv, arg, curwin->w_cursor.lnum, curwin->w_cursor.lnum, &len, evaluate, partial, NULL); xfree(s); // If evaluate is false rettv->v_type was not set in // get_func_tv, but it's needed in handle_subscript() to parse // what follows. So set it here. if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(') { rettv->vval.v_string = (char_u *)tv_empty_string; rettv->v_type = VAR_FUNC; } // Stop the expression evaluation when immediately // aborting on error, or when an interrupt occurred or // an exception was thrown but not caught. if (aborting()) { if (ret == OK) { tv_clear(rettv); } ret = FAIL; } } else if (evaluate) { ret = get_var_tv((const char *)s, len, rettv, NULL, true, false); } else { check_vars((const char *)s, len); ret = OK; } } xfree(alias); } *arg = skipwhite(*arg); // Handle following '[', '(' and '.' for expr[expr], expr.name, // expr(expr). if (ret == OK) { ret = handle_subscript((const char **)arg, rettv, evaluate, true); } // Apply logical NOT and unary '-', from right to left, ignore '+'. if (ret == OK && evaluate && end_leader > start_leader) { bool error = false; varnumber_T val = 0; float_T f = 0.0; if (rettv->v_type == VAR_FLOAT) { f = rettv->vval.v_float; } else { val = tv_get_number_chk(rettv, &error); } if (error) { tv_clear(rettv); ret = FAIL; } else { while (end_leader > start_leader) { --end_leader; if (*end_leader == '!') { if (rettv->v_type == VAR_FLOAT) { f = !f; } else { val = !val; } } else if (*end_leader == '-') { if (rettv->v_type == VAR_FLOAT) { f = -f; } else { val = -val; } } } if (rettv->v_type == VAR_FLOAT) { tv_clear(rettv); rettv->vval.v_float = f; } else { tv_clear(rettv); rettv->v_type = VAR_NUMBER; rettv->vval.v_number = val; } } } return ret; } // TODO(ZyX-I): move to eval/expressions /* * Evaluate an "[expr]" or "[expr:expr]" index. Also "dict.key". * "*arg" points to the '[' or '.'. * Returns FAIL or OK. "*arg" is advanced to after the ']'. */ static int eval_index ( char_u **arg, typval_T *rettv, int evaluate, int verbose /* give error messages */ ) { bool empty1 = false; bool empty2 = false; long n1, n2 = 0; ptrdiff_t len = -1; int range = false; char_u *key = NULL; switch (rettv->v_type) { case VAR_FUNC: case VAR_PARTIAL: { if (verbose) { EMSG(_("E695: Cannot index a Funcref")); } return FAIL; } case VAR_FLOAT: { if (verbose) { EMSG(_(e_float_as_string)); } return FAIL; } case VAR_SPECIAL: { if (verbose) { EMSG(_("E909: Cannot index a special variable")); } return FAIL; } case VAR_UNKNOWN: { if (evaluate) { return FAIL; } // fallthrough } case VAR_STRING: case VAR_NUMBER: case VAR_LIST: case VAR_DICT: { break; } } typval_T var1 = TV_INITIAL_VALUE; typval_T var2 = TV_INITIAL_VALUE; if (**arg == '.') { /* * dict.name */ key = *arg + 1; for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; ++len) ; if (len == 0) return FAIL; *arg = skipwhite(key + len); } else { /* * something[idx] * * Get the (first) variable from inside the []. */ *arg = skipwhite(*arg + 1); if (**arg == ':') { empty1 = true; } else if (eval1(arg, &var1, evaluate) == FAIL) { // Recursive! return FAIL; } else if (evaluate && !tv_check_str(&var1)) { // Not a number or string. tv_clear(&var1); return FAIL; } /* * Get the second variable from inside the [:]. */ if (**arg == ':') { range = TRUE; *arg = skipwhite(*arg + 1); if (**arg == ']') { empty2 = true; } else if (eval1(arg, &var2, evaluate) == FAIL) { // Recursive! if (!empty1) { tv_clear(&var1); } return FAIL; } else if (evaluate && !tv_check_str(&var2)) { // Not a number or string. if (!empty1) { tv_clear(&var1); } tv_clear(&var2); return FAIL; } } /* Check for the ']'. */ if (**arg != ']') { if (verbose) { emsgf(_(e_missbrac)); } tv_clear(&var1); if (range) { tv_clear(&var2); } return FAIL; } *arg = skipwhite(*arg + 1); /* skip the ']' */ } if (evaluate) { n1 = 0; if (!empty1 && rettv->v_type != VAR_DICT) { n1 = tv_get_number(&var1); tv_clear(&var1); } if (range) { if (empty2) { n2 = -1; } else { n2 = tv_get_number(&var2); tv_clear(&var2); } } switch (rettv->v_type) { case VAR_NUMBER: case VAR_STRING: { const char *const s = tv_get_string(rettv); char *v; len = (ptrdiff_t)strlen(s); if (range) { // The resulting variable is a substring. If the indexes // are out of range the result is empty. if (n1 < 0) { n1 = len + n1; if (n1 < 0) { n1 = 0; } } if (n2 < 0) { n2 = len + n2; } else if (n2 >= len) { n2 = len; } if (n1 >= len || n2 < 0 || n1 > n2) { v = NULL; } else { v = xmemdupz(s + n1, (size_t)(n2 - n1 + 1)); } } else { // The resulting variable is a string of a single // character. If the index is too big or negative the // result is empty. if (n1 >= len || n1 < 0) { v = NULL; } else { v = xmemdupz(s + n1, 1); } } tv_clear(rettv); rettv->v_type = VAR_STRING; rettv->vval.v_string = (char_u *)v; break; } case VAR_LIST: { len = tv_list_len(rettv->vval.v_list); if (n1 < 0) { n1 = len + n1; } if (!empty1 && (n1 < 0 || n1 >= len)) { // For a range we allow invalid values and return an empty // list. A list index out of range is an error. if (!range) { if (verbose) { EMSGN(_(e_listidx), n1); } return FAIL; } n1 = len; } if (range) { list_T *l; listitem_T *item; if (n2 < 0) { n2 = len + n2; } else if (n2 >= len) { n2 = len - 1; } if (!empty2 && (n2 < 0 || n2 + 1 < n1)) { n2 = -1; } l = tv_list_alloc(); item = tv_list_find(rettv->vval.v_list, n1); while (n1++ <= n2) { tv_list_append_tv(l, &item->li_tv); item = item->li_next; } tv_clear(rettv); rettv->v_type = VAR_LIST; rettv->vval.v_list = l; l->lv_refcount++; } else { tv_copy(&tv_list_find(rettv->vval.v_list, n1)->li_tv, &var1); tv_clear(rettv); *rettv = var1; } break; } case VAR_DICT: { if (range) { if (verbose) { emsgf(_(e_dictrange)); } if (len == -1) { tv_clear(&var1); } return FAIL; } if (len == -1) { key = (char_u *)tv_get_string_chk(&var1); if (key == NULL) { tv_clear(&var1); return FAIL; } } dictitem_T *const item = tv_dict_find(rettv->vval.v_dict, (const char *)key, len); if (item == NULL && verbose) { emsgf(_(e_dictkey), key); } if (len == -1) { tv_clear(&var1); } if (item == NULL) { return FAIL; } tv_copy(&item->di_tv, &var1); tv_clear(rettv); *rettv = var1; break; } case VAR_SPECIAL: case VAR_FUNC: case VAR_FLOAT: case VAR_PARTIAL: case VAR_UNKNOWN: { break; // Not evaluating, skipping over subscript } } } return OK; } // TODO(ZyX-I): move to eval/executor /// Get an option value /// /// @param[in,out] arg Points to the '&' or '+' before the option name. Is /// advanced to the character after the option name. /// @param[out] rettv Location where result is saved. /// @param[in] evaluate If not true, rettv is not populated. /// /// @return OK or FAIL. static int get_option_tv(const char **const arg, typval_T *const rettv, const bool evaluate) FUNC_ATTR_NONNULL_ARG(1) { long numval; char_u *stringval; int opt_type; int c; bool working = (**arg == '+'); // has("+option") int ret = OK; int opt_flags; // Isolate the option name and find its value. char *option_end = (char *)find_option_end(arg, &opt_flags); if (option_end == NULL) { if (rettv != NULL) { EMSG2(_("E112: Option name missing: %s"), *arg); } return FAIL; } if (!evaluate) { *arg = option_end; return OK; } c = *option_end; *option_end = NUL; opt_type = get_option_value((char_u *)(*arg), &numval, rettv == NULL ? NULL : &stringval, opt_flags); if (opt_type == -3) { /* invalid name */ if (rettv != NULL) EMSG2(_("E113: Unknown option: %s"), *arg); ret = FAIL; } else if (rettv != NULL) { if (opt_type == -2) { /* hidden string option */ rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; } else if (opt_type == -1) { /* hidden number option */ rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; } else if (opt_type == 1) { /* number option */ rettv->v_type = VAR_NUMBER; rettv->vval.v_number = numval; } else { /* string option */ rettv->v_type = VAR_STRING; rettv->vval.v_string = stringval; } } else if (working && (opt_type == -2 || opt_type == -1)) ret = FAIL; *option_end = c; /* put back for error messages */ *arg = option_end; return ret; } /* * Allocate a variable for a string constant. * Return OK or FAIL. */ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate) { char_u *p; char_u *name; unsigned int extra = 0; /* * Find the end of the string, skipping backslashed characters. */ for (p = *arg + 1; *p != NUL && *p != '"'; mb_ptr_adv(p)) { if (*p == '\\' && p[1] != NUL) { ++p; /* A "\" form occupies at least 4 characters, and produces up * to 6 characters: reserve space for 2 extra */ if (*p == '<') extra += 2; } } if (*p != '"') { EMSG2(_("E114: Missing quote: %s"), *arg); return FAIL; } /* If only parsing, set *arg and return here */ if (!evaluate) { *arg = p + 1; return OK; } /* * Copy the string into allocated memory, handling backslashed * characters. */ name = xmalloc(p - *arg + extra); rettv->v_type = VAR_STRING; rettv->vval.v_string = name; for (p = *arg + 1; *p != NUL && *p != '"'; ) { if (*p == '\\') { switch (*++p) { case 'b': *name++ = BS; ++p; break; case 'e': *name++ = ESC; ++p; break; case 'f': *name++ = FF; ++p; break; case 'n': *name++ = NL; ++p; break; case 'r': *name++ = CAR; ++p; break; case 't': *name++ = TAB; ++p; break; case 'X': /* hex: "\x1", "\x12" */ case 'x': case 'u': /* Unicode: "\u0023" */ case 'U': if (ascii_isxdigit(p[1])) { int n, nr; int c = toupper(*p); if (c == 'X') { n = 2; } else if (*p == 'u') { n = 4; } else { n = 8; } nr = 0; while (--n >= 0 && ascii_isxdigit(p[1])) { ++p; nr = (nr << 4) + hex2nr(*p); } ++p; /* For "\u" store the number according to * 'encoding'. */ if (c != 'X') name += (*mb_char2bytes)(nr, name); else *name++ = nr; } break; /* octal: "\1", "\12", "\123" */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': *name = *p++ - '0'; if (*p >= '0' && *p <= '7') { *name = (*name << 3) + *p++ - '0'; if (*p >= '0' && *p <= '7') *name = (*name << 3) + *p++ - '0'; } ++name; break; // Special key, e.g.: "\" case '<': extra = trans_special((const char_u **)&p, STRLEN(p), name, true, true); if (extra != 0) { name += extra; break; } // FALLTHROUGH default: MB_COPY_CHAR(p, name); break; } } else MB_COPY_CHAR(p, name); } *name = NUL; if (*p != NUL) { // just in case p++; } *arg = p; return OK; } /* * Allocate a variable for a 'str''ing' constant. * Return OK or FAIL. */ static int get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate) { char_u *p; char_u *str; int reduce = 0; /* * Find the end of the string, skipping ''. */ for (p = *arg + 1; *p != NUL; mb_ptr_adv(p)) { if (*p == '\'') { if (p[1] != '\'') break; ++reduce; ++p; } } if (*p != '\'') { EMSG2(_("E115: Missing quote: %s"), *arg); return FAIL; } /* If only parsing return after setting "*arg" */ if (!evaluate) { *arg = p + 1; return OK; } /* * Copy the string into allocated memory, handling '' to ' reduction. */ str = xmalloc((p - *arg) - reduce); rettv->v_type = VAR_STRING; rettv->vval.v_string = str; for (p = *arg + 1; *p != NUL; ) { if (*p == '\'') { if (p[1] != '\'') break; ++p; } MB_COPY_CHAR(p, str); } *str = NUL; *arg = p + 1; return OK; } /// @return the function name of the partial. char_u *partial_name(partial_T *pt) { if (pt->pt_name != NULL) { return pt->pt_name; } return pt->pt_func->uf_name; } // TODO(ZyX-I): Move to eval/typval.h static void partial_free(partial_T *pt) { for (int i = 0; i < pt->pt_argc; i++) { tv_clear(&pt->pt_argv[i]); } xfree(pt->pt_argv); tv_dict_unref(pt->pt_dict); if (pt->pt_name != NULL) { func_unref(pt->pt_name); xfree(pt->pt_name); } else { func_ptr_unref(pt->pt_func); } xfree(pt); } // TODO(ZyX-I): Move to eval/typval.h /// Unreference a closure: decrement the reference count and free it when it /// becomes zero. void partial_unref(partial_T *pt) { if (pt != NULL && --pt->pt_refcount <= 0) { partial_free(pt); } } /// Allocate a variable for a List and fill it from "*arg". /// Return OK or FAIL. static int get_list_tv(char_u **arg, typval_T *rettv, int evaluate) { list_T *l = NULL; typval_T tv; listitem_T *item; if (evaluate) { l = tv_list_alloc(); } *arg = skipwhite(*arg + 1); while (**arg != ']' && **arg != NUL) { if (eval1(arg, &tv, evaluate) == FAIL) /* recursive! */ goto failret; if (evaluate) { item = tv_list_item_alloc(); item->li_tv = tv; item->li_tv.v_lock = 0; tv_list_append(l, item); } if (**arg == ']') break; if (**arg != ',') { EMSG2(_("E696: Missing comma in List: %s"), *arg); goto failret; } *arg = skipwhite(*arg + 1); } if (**arg != ']') { EMSG2(_("E697: Missing end of List ']': %s"), *arg); failret: if (evaluate) { tv_list_free(l); } return FAIL; } *arg = skipwhite(*arg + 1); if (evaluate) { rettv->v_type = VAR_LIST; rettv->vval.v_list = l; ++l->lv_refcount; } return OK; } bool func_equal( typval_T *tv1, typval_T *tv2, bool ic // ignore case ) { char_u *s1, *s2; dict_T *d1, *d2; int a1, a2; // empty and NULL function name considered the same s1 = tv1->v_type == VAR_FUNC ? tv1->vval.v_string : partial_name(tv1->vval.v_partial); if (s1 != NULL && *s1 == NUL) { s1 = NULL; } s2 = tv2->v_type == VAR_FUNC ? tv2->vval.v_string : partial_name(tv2->vval.v_partial); if (s2 != NULL && *s2 == NUL) { s2 = NULL; } if (s1 == NULL || s2 == NULL) { if (s1 != s2) { return false; } } else if (STRCMP(s1, s2) != 0) { return false; } // empty dict and NULL dict is different d1 = tv1->v_type == VAR_FUNC ? NULL : tv1->vval.v_partial->pt_dict; d2 = tv2->v_type == VAR_FUNC ? NULL : tv2->vval.v_partial->pt_dict; if (d1 == NULL || d2 == NULL) { if (d1 != d2) { return false; } } else if (!tv_dict_equal(d1, d2, ic, true)) { return false; } // empty list and no list considered the same a1 = tv1->v_type == VAR_FUNC ? 0 : tv1->vval.v_partial->pt_argc; a2 = tv2->v_type == VAR_FUNC ? 0 : tv2->vval.v_partial->pt_argc; if (a1 != a2) { return false; } for (int i = 0; i < a1; i++) { if (!tv_equal(tv1->vval.v_partial->pt_argv + i, tv2->vval.v_partial->pt_argv + i, ic, true)) { return false; } } return true; } /// Get next (unique) copy ID /// /// Used for traversing nested structures e.g. when serializing them or garbage /// collecting. int get_copyID(void) FUNC_ATTR_WARN_UNUSED_RESULT { // CopyID for recursively traversing lists and dicts // // This value is needed to avoid endless recursiveness. Last bit is used for // previous_funccal and normally ignored when comparing. static int current_copyID = 0; current_copyID += COPYID_INC; return current_copyID; } // Used by get_func_tv() static garray_T funcargs = GA_EMPTY_INIT_VALUE; /* * Garbage collection for lists and dictionaries. * * We use reference counts to be able to free most items right away when they * are no longer used. But for composite items it's possible that it becomes * unused while the reference count is > 0: When there is a recursive * reference. Example: * :let l = [1, 2, 3] * :let d = {9: l} * :let l[1] = d * * Since this is quite unusual we handle this with garbage collection: every * once in a while find out which lists and dicts are not referenced from any * variable. * * Here is a good reference text about garbage collection (refers to Python * but it applies to all reference-counting mechanisms): * http://python.ca/nas/python/gc/ */ /// Do garbage collection for lists and dicts. /// /// @param testing true if called from test_garbagecollect_now(). /// @returns true if some memory was freed. bool garbage_collect(bool testing) { bool abort = false; #define ABORTING(func) abort = abort || func if (!testing) { // Only do this once. want_garbage_collect = false; may_garbage_collect = false; garbage_collect_at_exit = false; } // We advance by two (COPYID_INC) because we add one for items referenced // through previous_funccal. const int copyID = get_copyID(); // 1. Go through all accessible variables and mark all lists and dicts // with copyID. // Don't free variables in the previous_funccal list unless they are only // referenced through previous_funccal. This must be first, because if // the item is referenced elsewhere the funccal must not be freed. for (funccall_T *fc = previous_funccal; fc != NULL; fc = fc->caller) { fc->fc_copyID = copyID + 1; ABORTING(set_ref_in_ht)(&fc->l_vars.dv_hashtab, copyID + 1, NULL); ABORTING(set_ref_in_ht)(&fc->l_avars.dv_hashtab, copyID + 1, NULL); } // script-local variables for (int i = 1; i <= ga_scripts.ga_len; ++i) { ABORTING(set_ref_in_ht)(&SCRIPT_VARS(i), copyID, NULL); } FOR_ALL_BUFFERS(buf) { // buffer-local variables ABORTING(set_ref_in_item)(&buf->b_bufvar.di_tv, copyID, NULL, NULL); // buffer marks (ShaDa additional data) ABORTING(set_ref_in_fmark)(buf->b_last_cursor, copyID); ABORTING(set_ref_in_fmark)(buf->b_last_insert, copyID); ABORTING(set_ref_in_fmark)(buf->b_last_change, copyID); for (size_t i = 0; i < NMARKS; i++) { ABORTING(set_ref_in_fmark)(buf->b_namedm[i], copyID); } // buffer change list (ShaDa additional data) for (int i = 0; i < buf->b_changelistlen; i++) { ABORTING(set_ref_in_fmark)(buf->b_changelist[i], copyID); } // buffer ShaDa additional data ABORTING(set_ref_dict)(buf->additional_data, copyID); } FOR_ALL_TAB_WINDOWS(tp, wp) { // window-local variables ABORTING(set_ref_in_item)(&wp->w_winvar.di_tv, copyID, NULL, NULL); // window jump list (ShaDa additional data) for (int i = 0; i < wp->w_jumplistlen; i++) { ABORTING(set_ref_in_fmark)(wp->w_jumplist[i].fmark, copyID); } } if (aucmd_win != NULL) { ABORTING(set_ref_in_item)(&aucmd_win->w_winvar.di_tv, copyID, NULL, NULL); } // registers (ShaDa additional data) { const void *reg_iter = NULL; do { yankreg_T reg; char name = NUL; bool is_unnamed = false; reg_iter = op_register_iter(reg_iter, &name, ®, &is_unnamed); if (name != NUL) { ABORTING(set_ref_dict)(reg.additional_data, copyID); } } while (reg_iter != NULL); } // global marks (ShaDa additional data) { const void *mark_iter = NULL; do { xfmark_T fm; char name = NUL; mark_iter = mark_global_iter(mark_iter, &name, &fm); if (name != NUL) { ABORTING(set_ref_dict)(fm.fmark.additional_data, copyID); } } while (mark_iter != NULL); } // tabpage-local variables FOR_ALL_TABS(tp) { ABORTING(set_ref_in_item)(&tp->tp_winvar.di_tv, copyID, NULL, NULL); } // global variables ABORTING(set_ref_in_ht)(&globvarht, copyID, NULL); // function-local variables for (funccall_T *fc = current_funccal; fc != NULL; fc = fc->caller) { fc->fc_copyID = copyID; ABORTING(set_ref_in_ht)(&fc->l_vars.dv_hashtab, copyID, NULL); ABORTING(set_ref_in_ht)(&fc->l_avars.dv_hashtab, copyID, NULL); } // named functions (matters for closures) ABORTING(set_ref_in_functions(copyID)); // Jobs { TerminalJobData *data; map_foreach_value(jobs, data, { set_ref_in_callback(&data->on_stdout, copyID, NULL, NULL); set_ref_in_callback(&data->on_stderr, copyID, NULL, NULL); set_ref_in_callback(&data->on_exit, copyID, NULL, NULL); }) } // Timers { timer_T *timer; map_foreach_value(timers, timer, { set_ref_in_callback(&timer->callback, copyID, NULL, NULL); }) } // function call arguments, if v:testing is set. for (int i = 0; i < funcargs.ga_len; i++) { ABORTING(set_ref_in_item)(((typval_T **)funcargs.ga_data)[i], copyID, NULL, NULL); } // v: vars ABORTING(set_ref_in_ht)(&vimvarht, copyID, NULL); // history items (ShaDa additional elements) if (p_hi) { for (uint8_t i = 0; i < HIST_COUNT; i++) { const void *iter = NULL; do { histentry_T hist; iter = hist_iter(iter, i, false, &hist); if (hist.hisstr != NULL) { ABORTING(set_ref_list)(hist.additional_elements, copyID); } } while (iter != NULL); } } // previously used search/substitute patterns (ShaDa additional data) { SearchPattern pat; get_search_pattern(&pat); ABORTING(set_ref_dict)(pat.additional_data, copyID); get_substitute_pattern(&pat); ABORTING(set_ref_dict)(pat.additional_data, copyID); } // previously used replacement string { SubReplacementString sub; sub_get_replacement(&sub); ABORTING(set_ref_list)(sub.additional_elements, copyID); } bool did_free = false; if (!abort) { // 2. Free lists and dictionaries that are not referenced. did_free = free_unref_items(copyID); // 3. Check if any funccal can be freed now. bool did_free_funccal = false; for (funccall_T **pfc = &previous_funccal; *pfc != NULL;) { if (can_free_funccal(*pfc, copyID)) { funccall_T *fc = *pfc; *pfc = fc->caller; free_funccal(fc, true); did_free = true; did_free_funccal = true; } else { pfc = &(*pfc)->caller; } } if (did_free_funccal) { // When a funccal was freed some more items might be garbage // collected, so run again. (void)garbage_collect(testing); } } else if (p_verbose > 0) { verb_msg((char_u *)_( "Not enough memory to set references, garbage collection aborted!")); } #undef ABORTING return did_free; } /// Free lists and dictionaries that are no longer referenced. /// /// @note This function may only be called from garbage_collect(). /// /// @param copyID Free lists/dictionaries that don't have this ID. /// @return true, if something was freed. static int free_unref_items(int copyID) { dict_T *dd, *dd_next; list_T *ll, *ll_next; bool did_free = false; // Let all "free" functions know that we are here. This means no // dictionaries, lists, or jobs are to be freed, because we will // do that here. tv_in_free_unref_items = true; // PASS 1: free the contents of the items. We don't free the items // themselves yet, so that it is possible to decrement refcount counters. // Go through the list of dicts and free items without the copyID. // Don't free dicts that are referenced internally. for (dict_T *dd = gc_first_dict; dd != NULL; dd = dd->dv_used_next) { if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK)) { // Free the Dictionary and ordinary items it contains, but don't // recurse into Lists and Dictionaries, they will be in the list // of dicts or list of lists. tv_dict_free_contents(dd); did_free = true; } } // Go through the list of lists and free items without the copyID. // But don't free a list that has a watcher (used in a for loop), these // are not referenced anywhere. for (list_T *ll = gc_first_list; ll != NULL; ll = ll->lv_used_next) { if ((ll->lv_copyID & COPYID_MASK) != (copyID & COPYID_MASK) && ll->lv_watch == NULL) { // Free the List and ordinary items it contains, but don't recurse // into Lists and Dictionaries, they will be in the list of dicts // or list of lists. tv_list_free_contents(ll); did_free = true; } } // PASS 2: free the items themselves. for (dd = gc_first_dict; dd != NULL; dd = dd_next) { dd_next = dd->dv_used_next; if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK)) { tv_dict_free_dict(dd); } } for (ll = gc_first_list; ll != NULL; ll = ll_next) { ll_next = ll->lv_used_next; if ((ll->lv_copyID & COPYID_MASK) != (copyID & COPYID_MASK) && ll->lv_watch == NULL) { // Free the List and ordinary items it contains, but don't recurse // into Lists and Dictionaries, they will be in the list of dicts // or list of lists. tv_list_free_list(ll); } } tv_in_free_unref_items = false; return did_free; } /// Mark all lists and dicts referenced through hashtab "ht" with "copyID". /// /// @param ht Hashtab content will be marked. /// @param copyID New mark for lists and dicts. /// @param list_stack Used to add lists to be marked. Can be NULL. /// /// @returns true if setting references failed somehow. bool set_ref_in_ht(hashtab_T *ht, int copyID, list_stack_T **list_stack) FUNC_ATTR_WARN_UNUSED_RESULT { bool abort = false; ht_stack_T *ht_stack = NULL; hashtab_T *cur_ht = ht; for (;;) { if (!abort) { // Mark each item in the hashtab. If the item contains a hashtab // it is added to ht_stack, if it contains a list it is added to // list_stack. HASHTAB_ITER(cur_ht, hi, { abort = abort || set_ref_in_item( &TV_DICT_HI2DI(hi)->di_tv, copyID, &ht_stack, list_stack); }); } if (ht_stack == NULL) { break; } // take an item from the stack cur_ht = ht_stack->ht; ht_stack_T *tempitem = ht_stack; ht_stack = ht_stack->prev; xfree(tempitem); } return abort; } /// Mark all lists and dicts referenced through list "l" with "copyID". /// /// @param l List content will be marked. /// @param copyID New mark for lists and dicts. /// @param ht_stack Used to add hashtabs to be marked. Can be NULL. /// /// @returns true if setting references failed somehow. bool set_ref_in_list(list_T *l, int copyID, ht_stack_T **ht_stack) FUNC_ATTR_WARN_UNUSED_RESULT { bool abort = false; list_stack_T *list_stack = NULL; list_T *cur_l = l; for (;;) { if (!abort) { // Mark each item in the list. If the item contains a hashtab // it is added to ht_stack, if it contains a list it is added to // list_stack. for (listitem_T *li = cur_l->lv_first; !abort && li != NULL; li = li->li_next) { abort = set_ref_in_item(&li->li_tv, copyID, ht_stack, &list_stack); } } if (list_stack == NULL) { break; } // take an item from the stack cur_l = list_stack->list; list_stack_T *tempitem = list_stack; list_stack = list_stack->prev; xfree(tempitem); } return abort; } /// Mark all lists and dicts referenced through typval "tv" with "copyID". /// /// @param tv Typval content will be marked. /// @param copyID New mark for lists and dicts. /// @param ht_stack Used to add hashtabs to be marked. Can be NULL. /// @param list_stack Used to add lists to be marked. Can be NULL. /// /// @returns true if setting references failed somehow. bool set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack) FUNC_ATTR_WARN_UNUSED_RESULT { bool abort = false; switch (tv->v_type) { case VAR_DICT: { dict_T *dd = tv->vval.v_dict; if (dd != NULL && dd->dv_copyID != copyID) { // Didn't see this dict yet. dd->dv_copyID = copyID; if (ht_stack == NULL) { abort = set_ref_in_ht(&dd->dv_hashtab, copyID, list_stack); } else { ht_stack_T *newitem = try_malloc(sizeof(ht_stack_T)); if (newitem == NULL) { abort = true; } else { newitem->ht = &dd->dv_hashtab; newitem->prev = *ht_stack; *ht_stack = newitem; } } QUEUE *w = NULL; DictWatcher *watcher = NULL; QUEUE_FOREACH(w, &dd->watchers) { watcher = tv_dict_watcher_node_data(w); set_ref_in_callback(&watcher->callback, copyID, ht_stack, list_stack); } } break; } case VAR_LIST: { list_T *ll = tv->vval.v_list; if (ll != NULL && ll->lv_copyID != copyID) { // Didn't see this list yet. ll->lv_copyID = copyID; if (list_stack == NULL) { abort = set_ref_in_list(ll, copyID, ht_stack); } else { list_stack_T *newitem = try_malloc(sizeof(list_stack_T)); if (newitem == NULL) { abort = true; } else { newitem->list = ll; newitem->prev = *list_stack; *list_stack = newitem; } } } break; } case VAR_PARTIAL: { partial_T *pt = tv->vval.v_partial; // A partial does not have a copyID, because it cannot contain itself. if (pt != NULL) { abort = set_ref_in_func(pt->pt_name, pt->pt_func, copyID); if (pt->pt_dict != NULL) { typval_T dtv; dtv.v_type = VAR_DICT; dtv.vval.v_dict = pt->pt_dict; abort = abort || set_ref_in_item(&dtv, copyID, ht_stack, list_stack); } for (int i = 0; i < pt->pt_argc; i++) { abort = abort || set_ref_in_item(&pt->pt_argv[i], copyID, ht_stack, list_stack); } } break; } case VAR_FUNC: abort = set_ref_in_func(tv->vval.v_string, NULL, copyID); break; case VAR_UNKNOWN: case VAR_SPECIAL: case VAR_FLOAT: case VAR_NUMBER: case VAR_STRING: { break; } } return abort; } /// Set "copyID" in all functions available by name. bool set_ref_in_functions(int copyID) { int todo; hashitem_T *hi = NULL; bool abort = false; ufunc_T *fp; todo = (int)func_hashtab.ht_used; for (hi = func_hashtab.ht_array; todo > 0 && !got_int; hi++) { if (!HASHITEM_EMPTY(hi)) { todo--; fp = HI2UF(hi); if (!func_name_refcount(fp->uf_name)) { abort = abort || set_ref_in_func(NULL, fp, copyID); } } } return abort; } /// Mark all lists and dicts referenced in given mark /// /// @returns true if setting references failed somehow. static inline bool set_ref_in_fmark(fmark_T fm, int copyID) FUNC_ATTR_WARN_UNUSED_RESULT { if (fm.additional_data != NULL && fm.additional_data->dv_copyID != copyID) { fm.additional_data->dv_copyID = copyID; return set_ref_in_ht(&fm.additional_data->dv_hashtab, copyID, NULL); } return false; } /// Mark all lists and dicts referenced in given list and the list itself /// /// @returns true if setting references failed somehow. static inline bool set_ref_list(list_T *list, int copyID) FUNC_ATTR_WARN_UNUSED_RESULT { if (list != NULL) { typval_T tv = (typval_T) { .v_type = VAR_LIST, .vval = { .v_list = list } }; return set_ref_in_item(&tv, copyID, NULL, NULL); } return false; } /// Mark all lists and dicts referenced in given dict and the dict itself /// /// @returns true if setting references failed somehow. static inline bool set_ref_dict(dict_T *dict, int copyID) FUNC_ATTR_WARN_UNUSED_RESULT { if (dict != NULL) { typval_T tv = (typval_T) { .v_type = VAR_DICT, .vval = { .v_dict = dict } }; return set_ref_in_item(&tv, copyID, NULL, NULL); } return false; } static bool set_ref_in_funccal(funccall_T *fc, int copyID) { bool abort = false; if (fc->fc_copyID != copyID) { fc->fc_copyID = copyID; abort = abort || set_ref_in_ht(&fc->l_vars.dv_hashtab, copyID, NULL); abort = abort || set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID, NULL); abort = abort || set_ref_in_func(NULL, fc->func, copyID); } return abort; } /* * Allocate a variable for a Dictionary and fill it from "*arg". * Return OK or FAIL. Returns NOTDONE for {expr}. */ static int get_dict_tv(char_u **arg, typval_T *rettv, int evaluate) { dict_T *d = NULL; typval_T tvkey; typval_T tv; char_u *key = NULL; dictitem_T *item; char_u *start = skipwhite(*arg + 1); char buf[NUMBUFLEN]; /* * First check if it's not a curly-braces thing: {expr}. * Must do this without evaluating, otherwise a function may be called * twice. Unfortunately this means we need to call eval1() twice for the * first item. * But {} is an empty Dictionary. */ if (*start != '}') { if (eval1(&start, &tv, FALSE) == FAIL) /* recursive! */ return FAIL; if (*start == '}') return NOTDONE; } if (evaluate) { d = tv_dict_alloc(); } tvkey.v_type = VAR_UNKNOWN; tv.v_type = VAR_UNKNOWN; *arg = skipwhite(*arg + 1); while (**arg != '}' && **arg != NUL) { if (eval1(arg, &tvkey, evaluate) == FAIL) /* recursive! */ goto failret; if (**arg != ':') { EMSG2(_("E720: Missing colon in Dictionary: %s"), *arg); tv_clear(&tvkey); goto failret; } if (evaluate) { key = (char_u *)tv_get_string_buf_chk(&tvkey, buf); if (key == NULL) { // "key" is NULL when tv_get_string_buf_chk() gave an errmsg tv_clear(&tvkey); goto failret; } } *arg = skipwhite(*arg + 1); if (eval1(arg, &tv, evaluate) == FAIL) { // Recursive! if (evaluate) { tv_clear(&tvkey); } goto failret; } if (evaluate) { item = tv_dict_find(d, (const char *)key, -1); if (item != NULL) { EMSG2(_("E721: Duplicate key in Dictionary: \"%s\""), key); tv_clear(&tvkey); tv_clear(&tv); goto failret; } item = tv_dict_item_alloc((const char *)key); tv_clear(&tvkey); item->di_tv = tv; item->di_tv.v_lock = 0; if (tv_dict_add(d, item) == FAIL) { tv_dict_item_free(item); } } if (**arg == '}') break; if (**arg != ',') { EMSG2(_("E722: Missing comma in Dictionary: %s"), *arg); goto failret; } *arg = skipwhite(*arg + 1); } if (**arg != '}') { EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg); failret: if (evaluate) { tv_dict_free(d); } return FAIL; } *arg = skipwhite(*arg + 1); if (evaluate) { rettv->v_type = VAR_DICT; rettv->vval.v_dict = d; ++d->dv_refcount; } return OK; } /// Get function arguments. static int get_function_args(char_u **argp, char_u endchar, garray_T *newargs, int *varargs, bool skip) { bool mustend = false; char_u *arg = *argp; char_u *p = arg; int c; int i; if (newargs != NULL) { ga_init(newargs, (int)sizeof(char_u *), 3); } if (varargs != NULL) { *varargs = false; } // Isolate the arguments: "arg1, arg2, ...)" while (*p != endchar) { if (p[0] == '.' && p[1] == '.' && p[2] == '.') { if (varargs != NULL) { *varargs = true; } p += 3; mustend = true; } else { arg = p; while (ASCII_ISALNUM(*p) || *p == '_') { p++; } if (arg == p || isdigit(*arg) || (p - arg == 9 && STRNCMP(arg, "firstline", 9) == 0) || (p - arg == 8 && STRNCMP(arg, "lastline", 8) == 0)) { if (!skip) { EMSG2(_("E125: Illegal argument: %s"), arg); } break; } if (newargs != NULL) { ga_grow(newargs, 1); c = *p; *p = NUL; arg = vim_strsave(arg); if (arg == NULL) { *p = c; goto err_ret; } // Check for duplicate argument name. for (i = 0; i < newargs->ga_len; i++) { if (STRCMP(((char_u **)(newargs->ga_data))[i], arg) == 0) { EMSG2(_("E853: Duplicate argument name: %s"), arg); xfree(arg); goto err_ret; } } ((char_u **)(newargs->ga_data))[newargs->ga_len] = arg; newargs->ga_len++; *p = c; } if (*p == ',') { p++; } else { mustend = true; } } p = skipwhite(p); if (mustend && *p != endchar) { if (!skip) { EMSG2(_(e_invarg2), *argp); } break; } } if (*p != endchar) { goto err_ret; } p++; // skip "endchar" *argp = p; return OK; err_ret: if (newargs != NULL) { ga_clear_strings(newargs); } return FAIL; } /// Register function "fp" as using "current_funccal" as its scope. static void register_closure(ufunc_T *fp) { if (fp->uf_scoped == current_funccal) { // no change return; } funccal_unref(fp->uf_scoped, fp, false); fp->uf_scoped = current_funccal; current_funccal->fc_refcount++; ga_grow(¤t_funccal->fc_funcs, 1); ((ufunc_T **)current_funccal->fc_funcs.ga_data) [current_funccal->fc_funcs.ga_len++] = fp; } /// Parse a lambda expression and get a Funcref from "*arg". /// /// @return OK or FAIL. Returns NOTDONE for dict or {expr}. static int get_lambda_tv(char_u **arg, typval_T *rettv, bool evaluate) { garray_T newargs = GA_EMPTY_INIT_VALUE; garray_T *pnewargs; ufunc_T *fp = NULL; int varargs; int ret; char_u *start = skipwhite(*arg + 1); char_u *s, *e; static int lambda_no = 0; int *old_eval_lavars = eval_lavars_used; int eval_lavars = false; // First, check if this is a lambda expression. "->" must exists. ret = get_function_args(&start, '-', NULL, NULL, true); if (ret == FAIL || *start != '>') { return NOTDONE; } // Parse the arguments again. if (evaluate) { pnewargs = &newargs; } else { pnewargs = NULL; } *arg = skipwhite(*arg + 1); ret = get_function_args(arg, '-', pnewargs, &varargs, false); if (ret == FAIL || **arg != '>') { goto errret; } // Set up a flag for checking local variables and arguments. if (evaluate) { eval_lavars_used = &eval_lavars; } // Get the start and the end of the expression. *arg = skipwhite(*arg + 1); s = *arg; ret = skip_expr(arg); if (ret == FAIL) { goto errret; } e = *arg; *arg = skipwhite(*arg); if (**arg != '}') { goto errret; } (*arg)++; if (evaluate) { int len, flags = 0; char_u *p; char_u name[20]; partial_T *pt; garray_T newlines; lambda_no++; snprintf((char *)name, sizeof(name), "%d", lambda_no); fp = (ufunc_T *)xcalloc(1, sizeof(ufunc_T) + STRLEN(name)); pt = (partial_T *)xcalloc(1, sizeof(partial_T)); if (pt == NULL) { xfree(fp); goto errret; } ga_init(&newlines, (int)sizeof(char_u *), 1); ga_grow(&newlines, 1); // Add "return " before the expression. len = 7 + e - s + 1; p = (char_u *)xmalloc(len); ((char_u **)(newlines.ga_data))[newlines.ga_len++] = p; STRCPY(p, "return "); STRLCPY(p + 7, s, e - s + 1); fp->uf_refcount = 1; STRCPY(fp->uf_name, name); hash_add(&func_hashtab, UF2HIKEY(fp)); fp->uf_args = newargs; fp->uf_lines = newlines; if (current_funccal != NULL && eval_lavars) { flags |= FC_CLOSURE; register_closure(fp); } else { fp->uf_scoped = NULL; } fp->uf_tml_count = NULL; fp->uf_tml_total = NULL; fp->uf_tml_self = NULL; fp->uf_profiling = false; if (prof_def_func()) { func_do_profile(fp); } fp->uf_varargs = true; fp->uf_flags = flags; fp->uf_calls = 0; fp->uf_script_ID = current_SID; pt->pt_func = fp; pt->pt_refcount = 1; rettv->vval.v_partial = pt; rettv->v_type = VAR_PARTIAL; } eval_lavars_used = old_eval_lavars; return OK; errret: ga_clear_strings(&newargs); xfree(fp); eval_lavars_used = old_eval_lavars; return FAIL; } /// Convert the string to a floating point number /// /// This uses strtod(). setlocale(LC_NUMERIC, "C") has been used earlier to /// make sure this always uses a decimal point. /// /// @param[in] text String to convert. /// @param[out] ret_value Location where conversion result is saved. /// /// @return Length of the text that was consumed. size_t string2float(const char *const text, float_T *const ret_value) FUNC_ATTR_NONNULL_ALL { char *s = NULL; // MS-Windows does not deal with "inf" and "nan" properly if (STRNICMP(text, "inf", 3) == 0) { *ret_value = INFINITY; return 3; } if (STRNICMP(text, "-inf", 3) == 0) { *ret_value = -INFINITY; return 4; } if (STRNICMP(text, "nan", 3) == 0) { *ret_value = NAN; return 3; } *ret_value = strtod(text, &s); return (size_t) (s - text); } /// Get the value of an environment variable. /// /// If the environment variable was not set, silently assume it is empty. /// /// @param arg Points to the '$'. It is advanced to after the name. /// @return FAIL if the name is invalid. /// static int get_env_tv(char_u **arg, typval_T *rettv, int evaluate) { char_u *name; char_u *string = NULL; int len; int cc; ++*arg; name = *arg; len = get_env_len((const char_u **)arg); if (evaluate) { if (len == 0) { return FAIL; // Invalid empty name. } cc = name[len]; name[len] = NUL; // First try vim_getenv(), fast for normal environment vars. string = (char_u *)vim_getenv((char *)name); if (string == NULL || *string == NUL) { xfree(string); // Next try expanding things like $VIM and ${HOME}. string = expand_env_save(name - 1); if (string != NULL && *string == '$') { xfree(string); string = NULL; } } name[len] = cc; rettv->v_type = VAR_STRING; rettv->vval.v_string = string; } return OK; } #ifdef INCLUDE_GENERATED_DECLARATIONS # include "funcs.generated.h" #endif /* * Function given to ExpandGeneric() to obtain the list of internal * or user defined function names. */ char_u *get_function_name(expand_T *xp, int idx) { static int intidx = -1; char_u *name; if (idx == 0) intidx = -1; if (intidx < 0) { name = get_user_func_name(xp, idx); if (name != NULL) return name; } while ( (size_t)++intidx < ARRAY_SIZE(functions) && functions[intidx].name[0] == '\0') { } if ((size_t)intidx >= ARRAY_SIZE(functions)) { return NULL; } const char *const key = functions[intidx].name; const size_t key_len = strlen(key); memcpy(IObuff, key, key_len); IObuff[key_len] = '('; if (functions[intidx].max_argc == 0) { IObuff[key_len + 1] = ')'; IObuff[key_len + 2] = NUL; } else { IObuff[key_len + 1] = NUL; } return IObuff; } /* * Function given to ExpandGeneric() to obtain the list of internal or * user defined variable or function names. */ char_u *get_expr_name(expand_T *xp, int idx) { static int intidx = -1; char_u *name; if (idx == 0) intidx = -1; if (intidx < 0) { name = get_function_name(xp, idx); if (name != NULL) return name; } return get_user_var_name(xp, ++intidx); } /// Find internal function in hash functions /// /// @param[in] name Name of the function. /// /// Returns pointer to the function definition or NULL if not found. static const VimLFuncDef *find_internal_func(const char *const name) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_PURE FUNC_ATTR_NONNULL_ALL { size_t len = strlen(name); return find_internal_func_gperf(name, len); } /// Return name of the function corresponding to `name` /// /// If `name` points to variable that is either a function or partial then /// corresponding function name is returned. Otherwise it returns `name` itself. /// /// @param[in] name Function name to check. /// @param[in,out] lenp Location where length of the returned name is stored. /// Must be set to the length of the `name` argument. /// @param[out] partialp Location where partial will be stored if found /// function appears to be a partial. May be NULL if this /// is not needed. /// @param[in] no_autoload If true, do not source autoload scripts if function /// was not found. /// /// @return name of the function. static char_u *deref_func_name(const char *name, int *lenp, partial_T **const partialp, bool no_autoload) FUNC_ATTR_NONNULL_ARG(1, 2) { if (partialp != NULL) { *partialp = NULL; } dictitem_T *const v = find_var(name, (size_t)(*lenp), NULL, no_autoload); if (v != NULL && v->di_tv.v_type == VAR_FUNC) { if (v->di_tv.vval.v_string == NULL) { // just in case *lenp = 0; return (char_u *)""; } *lenp = (int)STRLEN(v->di_tv.vval.v_string); return v->di_tv.vval.v_string; } if (v != NULL && v->di_tv.v_type == VAR_PARTIAL) { partial_T *const pt = v->di_tv.vval.v_partial; if (pt == NULL) { // just in case *lenp = 0; return (char_u *)""; } if (partialp != NULL) { *partialp = pt; } char_u *s = partial_name(pt); *lenp = (int)STRLEN(s); return s; } return (char_u *)name; } /* * Allocate a variable for the result of a function. * Return OK or FAIL. */ static int get_func_tv ( char_u *name, /* name of the function */ int len, /* length of "name" */ typval_T *rettv, char_u **arg, /* argument, pointing to the '(' */ linenr_T firstline, /* first line of range */ linenr_T lastline, /* last line of range */ int *doesrange, /* return: function handled range */ int evaluate, partial_T *partial, // for extra arguments dict_T *selfdict // Dictionary for "self" ) { char_u *argp; int ret = OK; typval_T argvars[MAX_FUNC_ARGS + 1]; /* vars for arguments */ int argcount = 0; /* number of arguments found */ /* * Get the arguments. */ argp = *arg; while (argcount < MAX_FUNC_ARGS - (partial == NULL ? 0 : partial->pt_argc)) { argp = skipwhite(argp + 1); // skip the '(' or ',' if (*argp == ')' || *argp == ',' || *argp == NUL) { break; } if (eval1(&argp, &argvars[argcount], evaluate) == FAIL) { ret = FAIL; break; } ++argcount; if (*argp != ',') break; } if (*argp == ')') ++argp; else ret = FAIL; if (ret == OK) { int i = 0; if (get_vim_var_nr(VV_TESTING)) { // Prepare for calling garbagecollect_for_testing(), need to know // what variables are used on the call stack. if (funcargs.ga_itemsize == 0) { ga_init(&funcargs, (int)sizeof(typval_T *), 50); } for (i = 0; i < argcount; i++) { ga_grow(&funcargs, 1); ((typval_T **)funcargs.ga_data)[funcargs.ga_len++] = &argvars[i]; } } ret = call_func(name, len, rettv, argcount, argvars, NULL, firstline, lastline, doesrange, evaluate, partial, selfdict); funcargs.ga_len -= i; } else if (!aborting()) { if (argcount == MAX_FUNC_ARGS) { emsg_funcname(N_("E740: Too many arguments for function %s"), name); } else { emsg_funcname(N_("E116: Invalid arguments for function %s"), name); } } while (--argcount >= 0) { tv_clear(&argvars[argcount]); } *arg = skipwhite(argp); return ret; } typedef enum { ERROR_UNKNOWN = 0, ERROR_TOOMANY, ERROR_TOOFEW, ERROR_SCRIPT, ERROR_DICT, ERROR_NONE, ERROR_OTHER, ERROR_BOTH, ERROR_DELETED, } FnameTransError; #define FLEN_FIXED 40 /// In a script transform script-local names into actually used names /// /// Transforms "" and "s:" prefixes to `K_SNR {N}` (e.g. K_SNR "123") and /// "" prefix to `K_SNR`. Uses `fname_buf` buffer that is supposed to have /// #FLEN_FIXED + 1 length when it fits, otherwise it allocates memory. /// /// @param[in] name Name to transform. /// @param fname_buf Buffer to save resulting function name to, if it fits. /// Must have at least #FLEN_FIXED + 1 length. /// @param[out] tofree Location where pointer to an allocated memory is saved /// in case result does not fit into fname_buf. /// @param[out] error Location where error type is saved, @see /// FnameTransError. /// /// @return transformed name: either `fname_buf` or a pointer to an allocated /// memory. static char_u *fname_trans_sid(const char_u *const name, char_u *const fname_buf, char_u **const tofree, int *const error) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT { char_u *fname; const int llen = eval_fname_script((const char *)name); if (llen > 0) { fname_buf[0] = K_SPECIAL; fname_buf[1] = KS_EXTRA; fname_buf[2] = (int)KE_SNR; int i = 3; if (eval_fname_sid((const char *)name)) { // "" or "s:" if (current_SID <= 0) { *error = ERROR_SCRIPT; } else { snprintf((char *)fname_buf + 3, FLEN_FIXED + 1, "%" PRId64 "_", (int64_t)current_SID); i = (int)STRLEN(fname_buf); } } if (i + STRLEN(name + llen) < FLEN_FIXED) { STRCPY(fname_buf + i, name + llen); fname = fname_buf; } else { fname = xmalloc(i + STRLEN(name + llen) + 1); if (fname == NULL) { *error = ERROR_OTHER; } else { *tofree = fname; memmove(fname, fname_buf, (size_t)i); STRCPY(fname + i, name + llen); } } } else { fname = (char_u *)name; } return fname; } /// Mark all lists and dicts referenced through function "name" with "copyID". /// "list_stack" is used to add lists to be marked. Can be NULL. /// "ht_stack" is used to add hashtabs to be marked. Can be NULL. /// /// @return true if setting references failed somehow. bool set_ref_in_func(char_u *name, ufunc_T *fp_in, int copyID) { ufunc_T *fp = fp_in; funccall_T *fc; int error = ERROR_NONE; char_u fname_buf[FLEN_FIXED + 1]; char_u *tofree = NULL; char_u *fname; bool abort = false; if (name == NULL && fp_in == NULL) { return false; } if (fp_in == NULL) { fname = fname_trans_sid(name, fname_buf, &tofree, &error); fp = find_func(fname); } if (fp != NULL) { for (fc = fp->uf_scoped; fc != NULL; fc = fc->func->uf_scoped) { abort = abort || set_ref_in_funccal(fc, copyID); } } xfree(tofree); return abort; } /// Call a function with its resolved parameters /// /// "argv_func", when not NULL, can be used to fill in arguments only when the /// invoked function uses them. It is called like this: /// new_argcount = argv_func(current_argcount, argv, called_func_argcount) /// /// Return FAIL when the function can't be called, OK otherwise. /// Also returns OK when an error was encountered while executing the function. int call_func( const char_u *funcname, // name of the function int len, // length of "name" typval_T *rettv, // return value goes here int argcount_in, // number of "argvars" typval_T *argvars_in, // vars for arguments, must have "argcount" // PLUS ONE elements! ArgvFunc argv_func, // function to fill in argvars linenr_T firstline, // first line of range linenr_T lastline, // last line of range int *doesrange, // return: function handled range bool evaluate, partial_T *partial, // optional, can be NULL dict_T *selfdict_in // Dictionary for "self" ) { int ret = FAIL; int error = ERROR_NONE; ufunc_T *fp; char_u fname_buf[FLEN_FIXED + 1]; char_u *tofree = NULL; char_u *fname; char_u *name; int argcount = argcount_in; typval_T *argvars = argvars_in; dict_T *selfdict = selfdict_in; typval_T argv[MAX_FUNC_ARGS + 1]; // used when "partial" is not NULL int argv_clear = 0; // Make a copy of the name, if it comes from a funcref variable it could // be changed or deleted in the called function. name = vim_strnsave(funcname, len); if (name == NULL) { return ret; } fname = fname_trans_sid(name, fname_buf, &tofree, &error); *doesrange = false; if (partial != NULL) { // When the function has a partial with a dict and there is a dict // argument, use the dict argument. That is backwards compatible. // When the dict was bound explicitly use the one from the partial. if (partial->pt_dict != NULL && (selfdict_in == NULL || !partial->pt_auto)) { selfdict = partial->pt_dict; } if (error == ERROR_NONE && partial->pt_argc > 0) { for (argv_clear = 0; argv_clear < partial->pt_argc; argv_clear++) { tv_copy(&partial->pt_argv[argv_clear], &argv[argv_clear]); } for (int i = 0; i < argcount_in; i++) { argv[i + argv_clear] = argvars_in[i]; } argvars = argv; argcount = partial->pt_argc + argcount_in; } } /* execute the function if no errors detected and executing */ if (evaluate && error == ERROR_NONE) { char_u *rfname = fname; /* Ignore "g:" before a function name. */ if (fname[0] == 'g' && fname[1] == ':') { rfname = fname + 2; } rettv->v_type = VAR_NUMBER; /* default rettv is number zero */ rettv->vval.v_number = 0; error = ERROR_UNKNOWN; if (!builtin_function((const char *)rfname, -1)) { // User defined function. if (partial != NULL && partial->pt_func != NULL) { fp = partial->pt_func; } else { fp = find_func(rfname); } // Trigger FuncUndefined event, may load the function. if (fp == NULL && apply_autocmds(EVENT_FUNCUNDEFINED, rfname, rfname, TRUE, NULL) && !aborting()) { /* executed an autocommand, search for the function again */ fp = find_func(rfname); } // Try loading a package. if (fp == NULL && script_autoload((const char *)rfname, STRLEN(rfname), true) && !aborting()) { // Loaded a package, search for the function again. fp = find_func(rfname); } if (fp != NULL && (fp->uf_flags & FC_DELETED)) { error = ERROR_DELETED; } else if (fp != NULL) { if (argv_func != NULL) { argcount = argv_func(argcount, argvars, fp->uf_args.ga_len); } if (fp->uf_flags & FC_RANGE) { *doesrange = true; } if (argcount < fp->uf_args.ga_len) { error = ERROR_TOOFEW; } else if (!fp->uf_varargs && argcount > fp->uf_args.ga_len) { error = ERROR_TOOMANY; } else if ((fp->uf_flags & FC_DICT) && selfdict == NULL) { error = ERROR_DICT; } else { // Call the user function. call_user_func(fp, argcount, argvars, rettv, firstline, lastline, (fp->uf_flags & FC_DICT) ? selfdict : NULL); error = ERROR_NONE; } } } else { // Find the function name in the table, call its implementation. const VimLFuncDef *const fdef = find_internal_func((const char *)fname); if (fdef != NULL) { if (argcount < fdef->min_argc) { error = ERROR_TOOFEW; } else if (argcount > fdef->max_argc) { error = ERROR_TOOMANY; } else { argvars[argcount].v_type = VAR_UNKNOWN; fdef->func(argvars, rettv, fdef->data); error = ERROR_NONE; } } } /* * The function call (or "FuncUndefined" autocommand sequence) might * have been aborted by an error, an interrupt, or an explicitly thrown * exception that has not been caught so far. This situation can be * tested for by calling aborting(). For an error in an internal * function or for the "E132" error in call_user_func(), however, the * throw point at which the "force_abort" flag (temporarily reset by * emsg()) is normally updated has not been reached yet. We need to * update that flag first to make aborting() reliable. */ update_force_abort(); } if (error == ERROR_NONE) ret = OK; /* * Report an error unless the argument evaluation or function call has been * cancelled due to an aborting error, an interrupt, or an exception. */ if (!aborting()) { switch (error) { case ERROR_UNKNOWN: emsg_funcname(N_("E117: Unknown function: %s"), name); break; case ERROR_DELETED: emsg_funcname(N_("E933: Function was deleted: %s"), name); break; case ERROR_TOOMANY: emsg_funcname(e_toomanyarg, name); break; case ERROR_TOOFEW: emsg_funcname(N_("E119: Not enough arguments for function: %s"), name); break; case ERROR_SCRIPT: emsg_funcname(N_("E120: Using not in a script context: %s"), name); break; case ERROR_DICT: emsg_funcname(N_("E725: Calling dict function without Dictionary: %s"), name); break; } } while (argv_clear > 0) { tv_clear(&argv[--argv_clear]); } xfree(tofree); xfree(name); return ret; } /* * Give an error message with a function name. Handle things. * "ermsg" is to be passed without translation, use N_() instead of _(). */ static void emsg_funcname(char *ermsg, char_u *name) { char_u *p; if (*name == K_SPECIAL) p = concat_str((char_u *)"", name + 3); else p = name; EMSG2(_(ermsg), p); if (p != name) xfree(p); } /* * Return TRUE for a non-zero Number and a non-empty String. */ static int non_zero_arg(typval_T *argvars) { return ((argvars[0].v_type == VAR_NUMBER && argvars[0].vval.v_number != 0) || (argvars[0].v_type == VAR_SPECIAL && argvars[0].vval.v_special == kSpecialVarTrue) || (argvars[0].v_type == VAR_STRING && argvars[0].vval.v_string != NULL && *argvars[0].vval.v_string != NUL)); } /********************************************* * Implementation of the built-in functions */ // Apply a floating point C function on a typval with one float_T. // // Some versions of glibc on i386 have an optimization that makes it harder to // call math functions indirectly from inside an inlined function, causing // compile-time errors. Avoid `inline` in that case. #3072 static void float_op_wrapper(typval_T *argvars, typval_T *rettv, FunPtr fptr) { float_T f; float_T (*function)(float_T) = (float_T (*)(float_T))fptr; rettv->v_type = VAR_FLOAT; if (tv_get_float_chk(argvars, &f)) { rettv->vval.v_float = function(f); } else { rettv->vval.v_float = 0.0; } } static void api_wrapper(typval_T *argvars, typval_T *rettv, FunPtr fptr) { ApiDispatchWrapper fn = (ApiDispatchWrapper)fptr; Array args = ARRAY_DICT_INIT; for (typval_T *tv = argvars; tv->v_type != VAR_UNKNOWN; tv++) { ADD(args, vim_to_object(tv)); } Error err = ERROR_INIT; Object result = fn(VIML_INTERNAL_CALL, args, &err); if (ERROR_SET(&err)) { nvim_err_writeln(cstr_as_string(err.msg)); goto end; } if (!object_to_vim(result, rettv, &err)) { EMSG2(_("Error converting the call result: %s"), err.msg); } end: api_free_array(args); api_free_object(result); api_clear_error(&err); } /* * "abs(expr)" function */ static void f_abs(typval_T *argvars, typval_T *rettv, FunPtr fptr) { if (argvars[0].v_type == VAR_FLOAT) { float_op_wrapper(argvars, rettv, (FunPtr)&fabs); } else { varnumber_T n; bool error = false; n = tv_get_number_chk(&argvars[0], &error); if (error) { rettv->vval.v_number = -1; } else if (n > 0) { rettv->vval.v_number = n; } else { rettv->vval.v_number = -n; } } } /* * "add(list, item)" function */ static void f_add(typval_T *argvars, typval_T *rettv, FunPtr fptr) { list_T *l; rettv->vval.v_number = 1; /* Default: Failed */ if (argvars[0].v_type == VAR_LIST) { if ((l = argvars[0].vval.v_list) != NULL && !tv_check_lock(l->lv_lock, "add() argument", TV_TRANSLATE)) { tv_list_append_tv(l, &argvars[1]); tv_copy(&argvars[0], rettv); } } else { EMSG(_(e_listreq)); } } /* * "and(expr, expr)" function */ static void f_and(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = tv_get_number_chk(&argvars[0], NULL) & tv_get_number_chk(&argvars[1], NULL); } /// "api_info()" function static void f_api_info(typval_T *argvars, typval_T *rettv, FunPtr fptr) { Dictionary metadata = api_metadata(); (void)object_to_vim(DICTIONARY_OBJ(metadata), rettv, NULL); api_free_dictionary(metadata); } /* * "append(lnum, string/list)" function */ static void f_append(typval_T *argvars, typval_T *rettv, FunPtr fptr) { long lnum; list_T *l = NULL; listitem_T *li = NULL; typval_T *tv; long added = 0; /* When coming here from Insert mode, sync undo, so that this can be * undone separately from what was previously inserted. */ if (u_sync_once == 2) { u_sync_once = 1; /* notify that u_sync() was called */ u_sync(TRUE); } lnum = tv_get_lnum(argvars); if (lnum >= 0 && lnum <= curbuf->b_ml.ml_line_count && u_save(lnum, lnum + 1) == OK) { if (argvars[1].v_type == VAR_LIST) { l = argvars[1].vval.v_list; if (l == NULL) return; li = l->lv_first; } for (;; ) { if (l == NULL) { tv = &argvars[1]; // Append a string. } else if (li == NULL) { break; // End of list. } else { tv = &li->li_tv; // Append item from list. } const char *const line = tv_get_string_chk(tv); if (line == NULL) { // Type error. rettv->vval.v_number = 1; // Failed. break; } ml_append(lnum + added, (char_u *)line, (colnr_T)0, false); added++; if (l == NULL) { break; } li = li->li_next; } appended_lines_mark(lnum, added); if (curwin->w_cursor.lnum > lnum) curwin->w_cursor.lnum += added; } else rettv->vval.v_number = 1; /* Failed */ } /* * "argc()" function */ static void f_argc(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = ARGCOUNT; } /* * "argidx()" function */ static void f_argidx(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = curwin->w_arg_idx; } /// "arglistid" function static void f_arglistid(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = -1; win_T *wp = find_tabwin(&argvars[0], &argvars[1]); if (wp != NULL) { rettv->vval.v_number = wp->w_alist->id; } } /* * "argv(nr)" function */ static void f_argv(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int idx; if (argvars[0].v_type != VAR_UNKNOWN) { idx = (int)tv_get_number_chk(&argvars[0], NULL); if (idx >= 0 && idx < ARGCOUNT) { rettv->vval.v_string = (char_u *)xstrdup( (const char *)alist_name(&ARGLIST[idx])); } else { rettv->vval.v_string = NULL; } rettv->v_type = VAR_STRING; } else { tv_list_alloc_ret(rettv); for (idx = 0; idx < ARGCOUNT; idx++) { tv_list_append_string(rettv->vval.v_list, (const char *)alist_name(&ARGLIST[idx]), -1); } } } // Prepare "gap" for an assert error and add the sourcing position. static void prepare_assert_error(garray_T *gap) { char buf[NUMBUFLEN]; ga_init(gap, 1, 100); if (sourcing_name != NULL) { ga_concat(gap, sourcing_name); if (sourcing_lnum > 0) { ga_concat(gap, (char_u *)" "); } } if (sourcing_lnum > 0) { vim_snprintf(buf, ARRAY_SIZE(buf), "line %" PRId64, (int64_t)sourcing_lnum); ga_concat(gap, (char_u *)buf); } if (sourcing_name != NULL || sourcing_lnum > 0) { ga_concat(gap, (char_u *)": "); } } // Append "str" to "gap", escaping unprintable characters. // Changes NL to \n, CR to \r, etc. static void ga_concat_esc(garray_T *gap, char_u *str) { char_u *p; char_u buf[NUMBUFLEN]; if (str == NULL) { ga_concat(gap, (char_u *)"NULL"); return; } for (p = str; *p != NUL; p++) { switch (*p) { case BS: ga_concat(gap, (char_u *)"\\b"); break; case ESC: ga_concat(gap, (char_u *)"\\e"); break; case FF: ga_concat(gap, (char_u *)"\\f"); break; case NL: ga_concat(gap, (char_u *)"\\n"); break; case TAB: ga_concat(gap, (char_u *)"\\t"); break; case CAR: ga_concat(gap, (char_u *)"\\r"); break; case '\\': ga_concat(gap, (char_u *)"\\\\"); break; default: if (*p < ' ') { vim_snprintf((char *)buf, NUMBUFLEN, "\\x%02x", *p); ga_concat(gap, buf); } else { ga_append(gap, *p); } break; } } } // Fill "gap" with information about an assert error. static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv, char_u *exp_str, typval_T *exp_tv, typval_T *got_tv, assert_type_T atype) { char_u *tofree; if (opt_msg_tv->v_type != VAR_UNKNOWN) { tofree = (char_u *) encode_tv2string(opt_msg_tv, NULL); ga_concat(gap, tofree); xfree(tofree); } else { if (atype == ASSERT_MATCH || atype == ASSERT_NOTMATCH) { ga_concat(gap, (char_u *)"Pattern "); } else if (atype == ASSERT_NOTEQUAL) { ga_concat(gap, (char_u *)"Expected not equal to "); } else { ga_concat(gap, (char_u *)"Expected "); } if (exp_str == NULL) { tofree = (char_u *)encode_tv2string(exp_tv, NULL); ga_concat_esc(gap, tofree); xfree(tofree); } else { ga_concat_esc(gap, exp_str); } if (atype != ASSERT_NOTEQUAL) { if (atype == ASSERT_MATCH) { ga_concat(gap, (char_u *)" does not match "); } else if (atype == ASSERT_NOTMATCH) { ga_concat(gap, (char_u *)" does match "); } else { ga_concat(gap, (char_u *)" but got "); } tofree = (char_u *)encode_tv2string(got_tv, NULL); ga_concat_esc(gap, tofree); xfree(tofree); } } } // Add an assert error to v:errors. static void assert_error(garray_T *gap) { struct vimvar *vp = &vimvars[VV_ERRORS]; if (vp->vv_type != VAR_LIST || vimvars[VV_ERRORS].vv_list == NULL) { // Make sure v:errors is a list. set_vim_var_list(VV_ERRORS, tv_list_alloc()); } tv_list_append_string(vimvars[VV_ERRORS].vv_list, (const char *)gap->ga_data, (ptrdiff_t)gap->ga_len); } static void assert_equal_common(typval_T *argvars, assert_type_T atype) { garray_T ga; if (tv_equal(&argvars[0], &argvars[1], false, false) != (atype == ASSERT_EQUAL)) { prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1], atype); assert_error(&ga); ga_clear(&ga); } } // "assert_equal(expected, actual[, msg])" function static void f_assert_equal(typval_T *argvars, typval_T *rettv, FunPtr fptr) { assert_equal_common(argvars, ASSERT_EQUAL); } // "assert_notequal(expected, actual[, msg])" function static void f_assert_notequal(typval_T *argvars, typval_T *rettv, FunPtr fptr) { assert_equal_common(argvars, ASSERT_NOTEQUAL); } /// "assert_report(msg) static void f_assert_report(typval_T *argvars, typval_T *rettv, FunPtr fptr) { garray_T ga; prepare_assert_error(&ga); ga_concat(&ga, (const char_u *)tv_get_string(&argvars[0])); assert_error(&ga); ga_clear(&ga); } /// "assert_exception(string[, msg])" function static void f_assert_exception(typval_T *argvars, typval_T *rettv, FunPtr fptr) { garray_T ga; const char *const error = tv_get_string_chk(&argvars[0]); if (vimvars[VV_EXCEPTION].vv_str == NULL) { prepare_assert_error(&ga); ga_concat(&ga, (char_u *)"v:exception is not set"); assert_error(&ga); ga_clear(&ga); } else if (error != NULL && strstr((char *)vimvars[VV_EXCEPTION].vv_str, error) == NULL) { prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[1], NULL, &argvars[0], &vimvars[VV_EXCEPTION].vv_tv, ASSERT_OTHER); assert_error(&ga); ga_clear(&ga); } } /// "assert_fails(cmd [, error])" function static void f_assert_fails(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *const cmd = tv_get_string_chk(&argvars[0]); garray_T ga; called_emsg = false; suppress_errthrow = true; emsg_silent = true; do_cmdline_cmd(cmd); if (!called_emsg) { prepare_assert_error(&ga); ga_concat(&ga, (const char_u *)"command did not fail: "); ga_concat(&ga, (const char_u *)cmd); assert_error(&ga); ga_clear(&ga); } else if (argvars[1].v_type != VAR_UNKNOWN) { char buf[NUMBUFLEN]; const char *const error = tv_get_string_buf_chk(&argvars[1], buf); if (error == NULL || strstr((char *)vimvars[VV_ERRMSG].vv_str, error) == NULL) { prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[2], NULL, &argvars[1], &vimvars[VV_ERRMSG].vv_tv, ASSERT_OTHER); assert_error(&ga); ga_clear(&ga); } } called_emsg = false; suppress_errthrow = false; emsg_silent = false; emsg_on_display = false; set_vim_var_string(VV_ERRMSG, NULL, 0); } void assert_inrange(typval_T *argvars) { bool error = false; const varnumber_T lower = tv_get_number_chk(&argvars[0], &error); const varnumber_T upper = tv_get_number_chk(&argvars[1], &error); const varnumber_T actual = tv_get_number_chk(&argvars[2], &error); if (error) { return; } if (actual < lower || actual > upper) { garray_T ga; prepare_assert_error(&ga); char msg[55]; vim_snprintf(msg, sizeof(msg), "range %" PRIdVARNUMBER " - %" PRIdVARNUMBER ",", lower, upper); fill_assert_error(&ga, &argvars[3], (char_u *)msg, NULL, &argvars[2], ASSERT_INRANGE); assert_error(&ga); ga_clear(&ga); } } // Common for assert_true() and assert_false(). static void assert_bool(typval_T *argvars, bool is_true) { bool error = false; garray_T ga; if ((argvars[0].v_type != VAR_NUMBER || (tv_get_number_chk(&argvars[0], &error) == 0) == is_true || error) && (argvars[0].v_type != VAR_SPECIAL || (argvars[0].vval.v_special != (SpecialVarValue) (is_true ? kSpecialVarTrue : kSpecialVarFalse)))) { prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[1], (char_u *)(is_true ? "True" : "False"), NULL, &argvars[0], ASSERT_OTHER); assert_error(&ga); ga_clear(&ga); } } // "assert_false(actual[, msg])" function static void f_assert_false(typval_T *argvars, typval_T *rettv, FunPtr fptr) { assert_bool(argvars, false); } static void assert_match_common(typval_T *argvars, assert_type_T atype) { char buf1[NUMBUFLEN]; char buf2[NUMBUFLEN]; const char *const pat = tv_get_string_buf_chk(&argvars[0], buf1); const char *const text = tv_get_string_buf_chk(&argvars[1], buf2); if (pat == NULL || text == NULL) { EMSG(_(e_invarg)); } else if (pattern_match((char_u *)pat, (char_u *)text, false) != (atype == ASSERT_MATCH)) { garray_T ga; prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1], atype); assert_error(&ga); ga_clear(&ga); } } /// "assert_inrange(lower, upper[, msg])" function static void f_assert_inrange(typval_T *argvars, typval_T *rettv, FunPtr fptr) { assert_inrange(argvars); } /// "assert_match(pattern, actual[, msg])" function static void f_assert_match(typval_T *argvars, typval_T *rettv, FunPtr fptr) { assert_match_common(argvars, ASSERT_MATCH); } /// "assert_notmatch(pattern, actual[, msg])" function static void f_assert_notmatch(typval_T *argvars, typval_T *rettv, FunPtr fptr) { assert_match_common(argvars, ASSERT_NOTMATCH); } // "assert_true(actual[, msg])" function static void f_assert_true(typval_T *argvars, typval_T *rettv, FunPtr fptr) { assert_bool(argvars, true); } /* * "atan2()" function */ static void f_atan2(typval_T *argvars, typval_T *rettv, FunPtr fptr) { float_T fx; float_T fy; rettv->v_type = VAR_FLOAT; if (tv_get_float_chk(argvars, &fx) && tv_get_float_chk(&argvars[1], &fy)) { rettv->vval.v_float = atan2(fx, fy); } else { rettv->vval.v_float = 0.0; } } /* * "browse(save, title, initdir, default)" function */ static void f_browse(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_string = NULL; rettv->v_type = VAR_STRING; } /* * "browsedir(title, initdir)" function */ static void f_browsedir(typval_T *argvars, typval_T *rettv, FunPtr fptr) { f_browse(argvars, rettv, NULL); } /* * Find a buffer by number or exact name. */ static buf_T *find_buffer(typval_T *avar) { buf_T *buf = NULL; if (avar->v_type == VAR_NUMBER) buf = buflist_findnr((int)avar->vval.v_number); else if (avar->v_type == VAR_STRING && avar->vval.v_string != NULL) { buf = buflist_findname_exp(avar->vval.v_string); if (buf == NULL) { /* No full path name match, try a match with a URL or a "nofile" * buffer, these don't use the full path. */ FOR_ALL_BUFFERS(bp) { if (bp->b_fname != NULL && (path_with_url((char *)bp->b_fname) || bt_nofile(bp) ) && STRCMP(bp->b_fname, avar->vval.v_string) == 0) { buf = bp; break; } } } } return buf; } /* * "bufexists(expr)" function */ static void f_bufexists(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = (find_buffer(&argvars[0]) != NULL); } /* * "buflisted(expr)" function */ static void f_buflisted(typval_T *argvars, typval_T *rettv, FunPtr fptr) { buf_T *buf; buf = find_buffer(&argvars[0]); rettv->vval.v_number = (buf != NULL && buf->b_p_bl); } /* * "bufloaded(expr)" function */ static void f_bufloaded(typval_T *argvars, typval_T *rettv, FunPtr fptr) { buf_T *buf; buf = find_buffer(&argvars[0]); rettv->vval.v_number = (buf != NULL && buf->b_ml.ml_mfp != NULL); } /* * Get buffer by number or pattern. */ static buf_T *get_buf_tv(typval_T *tv, int curtab_only) { char_u *name = tv->vval.v_string; int save_magic; char_u *save_cpo; buf_T *buf; if (tv->v_type == VAR_NUMBER) return buflist_findnr((int)tv->vval.v_number); if (tv->v_type != VAR_STRING) return NULL; if (name == NULL || *name == NUL) return curbuf; if (name[0] == '$' && name[1] == NUL) return lastbuf; /* Ignore 'magic' and 'cpoptions' here to make scripts portable */ save_magic = p_magic; p_magic = TRUE; save_cpo = p_cpo; p_cpo = (char_u *)""; buf = buflist_findnr(buflist_findpat(name, name + STRLEN(name), TRUE, FALSE, curtab_only)); p_magic = save_magic; p_cpo = save_cpo; /* If not found, try expanding the name, like done for bufexists(). */ if (buf == NULL) buf = find_buffer(tv); return buf; } /* * "bufname(expr)" function */ static void f_bufname(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; if (!tv_check_str_or_nr(&argvars[0])) { return; } emsg_off++; const buf_T *const buf = get_buf_tv(&argvars[0], false); emsg_off--; if (buf != NULL && buf->b_fname != NULL) { rettv->vval.v_string = (char_u *)xstrdup((char *)buf->b_fname); } } /* * "bufnr(expr)" function */ static void f_bufnr(typval_T *argvars, typval_T *rettv, FunPtr fptr) { bool error = false; rettv->vval.v_number = -1; if (!tv_check_str_or_nr(&argvars[0])) { return; } emsg_off++; const buf_T *buf = get_buf_tv(&argvars[0], false); emsg_off--; // If the buffer isn't found and the second argument is not zero create a // new buffer. const char *name; if (buf == NULL && argvars[1].v_type != VAR_UNKNOWN && tv_get_number_chk(&argvars[1], &error) != 0 && !error && (name = tv_get_string_chk(&argvars[0])) != NULL && !error) { buf = buflist_new((char_u *)name, NULL, 1, 0); } if (buf != NULL) { rettv->vval.v_number = buf->b_fnum; } } static void buf_win_common(typval_T *argvars, typval_T *rettv, bool get_nr) { if (!tv_check_str_or_nr(&argvars[0])) { rettv->vval.v_number = -1; return; } emsg_off++; buf_T *buf = get_buf_tv(&argvars[0], true); if (buf == NULL) { // no need to search if buffer was not found rettv->vval.v_number = -1; goto end; } int winnr = 0; int winid; bool found_buf = false; FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { winnr++; if (wp->w_buffer == buf) { found_buf = true; winid = wp->handle; break; } } rettv->vval.v_number = (found_buf ? (get_nr ? winnr : winid) : -1); end: emsg_off--; } /// "bufwinid(nr)" function static void f_bufwinid(typval_T *argvars, typval_T *rettv, FunPtr fptr) { buf_win_common(argvars, rettv, false); } /// "bufwinnr(nr)" function static void f_bufwinnr(typval_T *argvars, typval_T *rettv, FunPtr fptr) { buf_win_common(argvars, rettv, true); } /* * "byte2line(byte)" function */ static void f_byte2line(typval_T *argvars, typval_T *rettv, FunPtr fptr) { long boff = tv_get_number(&argvars[0]) - 1; if (boff < 0) { rettv->vval.v_number = -1; } else { rettv->vval.v_number = (varnumber_T)ml_find_line_or_offset(curbuf, 0, &boff); } } static void byteidx(typval_T *argvars, typval_T *rettv, int comp) { const char *const str = tv_get_string_chk(&argvars[0]); varnumber_T idx = tv_get_number_chk(&argvars[1], NULL); rettv->vval.v_number = -1; if (str == NULL || idx < 0) { return; } const char *t = str; for (; idx > 0; idx--) { if (*t == NUL) { // EOL reached. return; } if (enc_utf8 && comp) { t += utf_ptr2len((const char_u *)t); } else { t += (*mb_ptr2len)((const char_u *)t); } } rettv->vval.v_number = (varnumber_T)(t - str); } /* * "byteidx()" function */ static void f_byteidx(typval_T *argvars, typval_T *rettv, FunPtr fptr) { byteidx(argvars, rettv, FALSE); } /* * "byteidxcomp()" function */ static void f_byteidxcomp(typval_T *argvars, typval_T *rettv, FunPtr fptr) { byteidx(argvars, rettv, TRUE); } int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv) { listitem_T *item; typval_T argv[MAX_FUNC_ARGS + 1]; int argc = 0; int dummy; int r = 0; for (item = args->vval.v_list->lv_first; item != NULL; item = item->li_next) { if (argc == MAX_FUNC_ARGS - (partial == NULL ? 0 : partial->pt_argc)) { EMSG(_("E699: Too many arguments")); break; } /* Make a copy of each argument. This is needed to be able to set * v_lock to VAR_FIXED in the copy without changing the original list. */ tv_copy(&item->li_tv, &argv[argc++]); } if (item == NULL) { r = call_func(name, (int)STRLEN(name), rettv, argc, argv, NULL, curwin->w_cursor.lnum, curwin->w_cursor.lnum, &dummy, true, partial, selfdict); } // Free the arguments. while (argc > 0) { tv_clear(&argv[--argc]); } return r; } /// "call(func, arglist [, dict])" function static void f_call(typval_T *argvars, typval_T *rettv, FunPtr fptr) { if (argvars[1].v_type != VAR_LIST) { EMSG(_(e_listreq)); return; } if (argvars[1].vval.v_list == NULL) { return; } char_u *func; partial_T *partial = NULL; dict_T *selfdict = NULL; if (argvars[0].v_type == VAR_FUNC) { func = argvars[0].vval.v_string; } else if (argvars[0].v_type == VAR_PARTIAL) { partial = argvars[0].vval.v_partial; func = partial_name(partial); } else { func = (char_u *)tv_get_string(&argvars[0]); } if (*func == NUL) { return; // type error or empty name } if (argvars[2].v_type != VAR_UNKNOWN) { if (argvars[2].v_type != VAR_DICT) { EMSG(_(e_dictreq)); return; } selfdict = argvars[2].vval.v_dict; } func_call(func, &argvars[1], partial, selfdict, rettv); } /* * "changenr()" function */ static void f_changenr(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = curbuf->b_u_seq_cur; } /* * "char2nr(string)" function */ static void f_char2nr(typval_T *argvars, typval_T *rettv, FunPtr fptr) { if (argvars[1].v_type != VAR_UNKNOWN) { if (!tv_check_num(&argvars[1])) { return; } } rettv->vval.v_number = utf_ptr2char( (const char_u *)tv_get_string(&argvars[0])); } /* * "cindent(lnum)" function */ static void f_cindent(typval_T *argvars, typval_T *rettv, FunPtr fptr) { pos_T pos; linenr_T lnum; pos = curwin->w_cursor; lnum = tv_get_lnum(argvars); if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count) { curwin->w_cursor.lnum = lnum; rettv->vval.v_number = get_c_indent(); curwin->w_cursor = pos; } else rettv->vval.v_number = -1; } /* * "clearmatches()" function */ static void f_clearmatches(typval_T *argvars, typval_T *rettv, FunPtr fptr) { clear_matches(curwin); } /* * "col(string)" function */ static void f_col(typval_T *argvars, typval_T *rettv, FunPtr fptr) { colnr_T col = 0; pos_T *fp; int fnum = curbuf->b_fnum; fp = var2fpos(&argvars[0], FALSE, &fnum); if (fp != NULL && fnum == curbuf->b_fnum) { if (fp->col == MAXCOL) { /* '> can be MAXCOL, get the length of the line then */ if (fp->lnum <= curbuf->b_ml.ml_line_count) col = (colnr_T)STRLEN(ml_get(fp->lnum)) + 1; else col = MAXCOL; } else { col = fp->col + 1; /* col(".") when the cursor is on the NUL at the end of the line * because of "coladd" can be seen as an extra column. */ if (virtual_active() && fp == &curwin->w_cursor) { char_u *p = get_cursor_pos_ptr(); if (curwin->w_cursor.coladd >= (colnr_T)chartabsize(p, curwin->w_virtcol - curwin->w_cursor.coladd)) { int l; if (*p != NUL && p[(l = (*mb_ptr2len)(p))] == NUL) col += l; } } } } rettv->vval.v_number = col; } /* * "complete()" function */ static void f_complete(typval_T *argvars, typval_T *rettv, FunPtr fptr) { if ((State & INSERT) == 0) { EMSG(_("E785: complete() can only be used in Insert mode")); return; } /* Check for undo allowed here, because if something was already inserted * the line was already saved for undo and this check isn't done. */ if (!undo_allowed()) return; if (argvars[1].v_type != VAR_LIST || argvars[1].vval.v_list == NULL) { EMSG(_(e_invarg)); return; } const colnr_T startcol = tv_get_number_chk(&argvars[0], NULL); if (startcol <= 0) { return; } set_completion(startcol - 1, argvars[1].vval.v_list); } /* * "complete_add()" function */ static void f_complete_add(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = ins_compl_add_tv(&argvars[0], 0); } /* * "complete_check()" function */ static void f_complete_check(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int saved = RedrawingDisabled; RedrawingDisabled = 0; ins_compl_check_keys(0, true); rettv->vval.v_number = compl_interrupted; RedrawingDisabled = saved; } /* * "confirm(message, buttons[, default [, type]])" function */ static void f_confirm(typval_T *argvars, typval_T *rettv, FunPtr fptr) { char buf[NUMBUFLEN]; char buf2[NUMBUFLEN]; const char *message; const char *buttons = NULL; int def = 1; int type = VIM_GENERIC; const char *typestr; bool error = false; message = tv_get_string_chk(&argvars[0]); if (message == NULL) { error = true; } if (argvars[1].v_type != VAR_UNKNOWN) { buttons = tv_get_string_buf_chk(&argvars[1], buf); if (buttons == NULL) { error = true; } if (argvars[2].v_type != VAR_UNKNOWN) { def = tv_get_number_chk(&argvars[2], &error); if (argvars[3].v_type != VAR_UNKNOWN) { typestr = tv_get_string_buf_chk(&argvars[3], buf2); if (typestr == NULL) { error = true; } else { switch (TOUPPER_ASC(*typestr)) { case 'E': type = VIM_ERROR; break; case 'Q': type = VIM_QUESTION; break; case 'I': type = VIM_INFO; break; case 'W': type = VIM_WARNING; break; case 'G': type = VIM_GENERIC; break; } } } } } if (buttons == NULL || *buttons == NUL) { buttons = _("&Ok"); } if (!error) { rettv->vval.v_number = do_dialog( type, NULL, (char_u *)message, (char_u *)buttons, def, NULL, false); } } /* * "copy()" function */ static void f_copy(typval_T *argvars, typval_T *rettv, FunPtr fptr) { var_item_copy(NULL, &argvars[0], rettv, false, 0); } /* * "count()" function */ static void f_count(typval_T *argvars, typval_T *rettv, FunPtr fptr) { long n = 0; int ic = FALSE; if (argvars[0].v_type == VAR_LIST) { listitem_T *li; list_T *l; long idx; if ((l = argvars[0].vval.v_list) != NULL) { li = l->lv_first; if (argvars[2].v_type != VAR_UNKNOWN) { bool error = false; ic = tv_get_number_chk(&argvars[2], &error); if (argvars[3].v_type != VAR_UNKNOWN) { idx = tv_get_number_chk(&argvars[3], &error); if (!error) { li = tv_list_find(l, idx); if (li == NULL) { EMSGN(_(e_listidx), idx); } } } if (error) li = NULL; } for (; li != NULL; li = li->li_next) if (tv_equal(&li->li_tv, &argvars[1], ic, FALSE)) ++n; } } else if (argvars[0].v_type == VAR_DICT) { int todo; dict_T *d; hashitem_T *hi; if ((d = argvars[0].vval.v_dict) != NULL) { bool error = false; if (argvars[2].v_type != VAR_UNKNOWN) { ic = tv_get_number_chk(&argvars[2], &error); if (argvars[3].v_type != VAR_UNKNOWN) { EMSG(_(e_invarg)); } } todo = error ? 0 : (int)d->dv_hashtab.ht_used; for (hi = d->dv_hashtab.ht_array; todo > 0; ++hi) { if (!HASHITEM_EMPTY(hi)) { todo--; if (tv_equal(&TV_DICT_HI2DI(hi)->di_tv, &argvars[1], ic, false)) { n++; } } } } } else EMSG2(_(e_listdictarg), "count()"); rettv->vval.v_number = n; } /* * "cscope_connection([{num} , {dbpath} [, {prepend}]])" function * * Checks the existence of a cscope connection. */ static void f_cscope_connection(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int num = 0; const char *dbpath = NULL; const char *prepend = NULL; char buf[NUMBUFLEN]; if (argvars[0].v_type != VAR_UNKNOWN && argvars[1].v_type != VAR_UNKNOWN) { num = (int)tv_get_number(&argvars[0]); dbpath = tv_get_string(&argvars[1]); if (argvars[2].v_type != VAR_UNKNOWN) { prepend = tv_get_string_buf(&argvars[2], buf); } } rettv->vval.v_number = cs_connection(num, (char_u *)dbpath, (char_u *)prepend); } /// "cursor(lnum, col)" function, or /// "cursor(list)" /// /// Moves the cursor to the specified line and column. /// /// @returns 0 when the position could be set, -1 otherwise. static void f_cursor(typval_T *argvars, typval_T *rettv, FunPtr fptr) { long line, col; long coladd = 0; bool set_curswant = true; rettv->vval.v_number = -1; if (argvars[1].v_type == VAR_UNKNOWN) { pos_T pos; colnr_T curswant = -1; if (list2fpos(argvars, &pos, NULL, &curswant) == FAIL) { EMSG(_(e_invarg)); return; } line = pos.lnum; col = pos.col; coladd = pos.coladd; if (curswant >= 0) { curwin->w_curswant = curswant - 1; set_curswant = false; } } else { line = tv_get_lnum(argvars); col = (long)tv_get_number_chk(&argvars[1], NULL); if (argvars[2].v_type != VAR_UNKNOWN) { coladd = (long)tv_get_number_chk(&argvars[2], NULL); } } if (line < 0 || col < 0 || coladd < 0) { return; // type error; errmsg already given } if (line > 0) { curwin->w_cursor.lnum = line; } if (col > 0) { curwin->w_cursor.col = col - 1; } curwin->w_cursor.coladd = coladd; // Make sure the cursor is in a valid position. check_cursor(); // Correct cursor for multi-byte character. if (has_mbyte) { mb_adjust_cursor(); } curwin->w_set_curswant = set_curswant; rettv->vval.v_number = 0; } /* * "deepcopy()" function */ static void f_deepcopy(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int noref = 0; if (argvars[1].v_type != VAR_UNKNOWN) { noref = tv_get_number_chk(&argvars[1], NULL); } if (noref < 0 || noref > 1) { emsgf(_(e_invarg)); } else { var_item_copy(NULL, &argvars[0], rettv, true, (noref == 0 ? get_copyID() : 0)); } } // "delete()" function static void f_delete(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = -1; if (check_restricted() || check_secure()) { return; } const char *const name = tv_get_string(&argvars[0]); if (name == NULL || *name == NUL) { EMSG(_(e_invarg)); return; } char nbuf[NUMBUFLEN]; const char *flags; if (argvars[1].v_type != VAR_UNKNOWN) { flags = tv_get_string_buf(&argvars[1], nbuf); } else { flags = ""; } if (*flags == NUL) { // delete a file rettv->vval.v_number = os_remove(name) == 0 ? 0 : -1; } else if (strcmp(flags, "d") == 0) { // delete an empty directory rettv->vval.v_number = os_rmdir(name) == 0 ? 0 : -1; } else if (strcmp(flags, "rf") == 0) { // delete a directory recursively rettv->vval.v_number = delete_recursive(name); } else { EMSG2(_(e_invexpr2), flags); } } // dictwatcheradd(dict, key, funcref) function static void f_dictwatcheradd(typval_T *argvars, typval_T *rettv, FunPtr fptr) { if (check_restricted() || check_secure()) { return; } if (argvars[0].v_type != VAR_DICT) { emsgf(_(e_invarg2), "dict"); return; } else if (argvars[0].vval.v_dict == NULL) { const char *const arg_errmsg = _("dictwatcheradd() argument"); const size_t arg_errmsg_len = strlen(arg_errmsg); emsgf(_(e_readonlyvar), (int)arg_errmsg_len, arg_errmsg); return; } if (argvars[1].v_type != VAR_STRING && argvars[1].v_type != VAR_NUMBER) { emsgf(_(e_invarg2), "key"); return; } const char *const key_pattern = tv_get_string_chk(argvars + 1); if (key_pattern == NULL) { return; } const size_t key_pattern_len = strlen(key_pattern); Callback callback; if (!callback_from_typval(&callback, &argvars[2])) { emsgf(_(e_invarg2), "funcref"); return; } tv_dict_watcher_add(argvars[0].vval.v_dict, key_pattern, key_pattern_len, callback); } // dictwatcherdel(dict, key, funcref) function static void f_dictwatcherdel(typval_T *argvars, typval_T *rettv, FunPtr fptr) { if (check_restricted() || check_secure()) { return; } if (argvars[0].v_type != VAR_DICT) { emsgf(_(e_invarg2), "dict"); return; } if (argvars[2].v_type != VAR_FUNC && argvars[2].v_type != VAR_STRING) { emsgf(_(e_invarg2), "funcref"); return; } const char *const key_pattern = tv_get_string_chk(argvars + 1); if (key_pattern == NULL) { return; } Callback callback; if (!callback_from_typval(&callback, &argvars[2])) { return; } if (!tv_dict_watcher_remove(argvars[0].vval.v_dict, key_pattern, strlen(key_pattern), callback)) { EMSG("Couldn't find a watcher matching key and callback"); } callback_free(&callback); } /* * "did_filetype()" function */ static void f_did_filetype(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = did_filetype; } /* * "diff_filler()" function */ static void f_diff_filler(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = diff_check_fill(curwin, tv_get_lnum(argvars)); } /* * "diff_hlID()" function */ static void f_diff_hlID(typval_T *argvars, typval_T *rettv, FunPtr fptr) { linenr_T lnum = tv_get_lnum(argvars); static linenr_T prev_lnum = 0; static int changedtick = 0; static int fnum = 0; static int change_start = 0; static int change_end = 0; static hlf_T hlID = (hlf_T)0; int filler_lines; int col; if (lnum < 0) /* ignore type error in {lnum} arg */ lnum = 0; if (lnum != prev_lnum || changedtick != curbuf->b_changedtick || fnum != curbuf->b_fnum) { /* New line, buffer, change: need to get the values. */ filler_lines = diff_check(curwin, lnum); if (filler_lines < 0) { if (filler_lines == -1) { change_start = MAXCOL; change_end = -1; if (diff_find_change(curwin, lnum, &change_start, &change_end)) hlID = HLF_ADD; /* added line */ else hlID = HLF_CHD; /* changed line */ } else hlID = HLF_ADD; /* added line */ } else hlID = (hlf_T)0; prev_lnum = lnum; changedtick = curbuf->b_changedtick; fnum = curbuf->b_fnum; } if (hlID == HLF_CHD || hlID == HLF_TXD) { col = tv_get_number(&argvars[1]) - 1; // Ignore type error in {col}. if (col >= change_start && col <= change_end) { hlID = HLF_TXD; // Changed text. } else { hlID = HLF_CHD; // Changed line. } } rettv->vval.v_number = hlID == (hlf_T)0 ? 0 : (int)hlID; } /* * "empty({expr})" function */ static void f_empty(typval_T *argvars, typval_T *rettv, FunPtr fptr) { bool n = true; switch (argvars[0].v_type) { case VAR_STRING: case VAR_FUNC: n = argvars[0].vval.v_string == NULL || *argvars[0].vval.v_string == NUL; break; case VAR_PARTIAL: n = false; break; case VAR_NUMBER: n = argvars[0].vval.v_number == 0; break; case VAR_FLOAT: n = argvars[0].vval.v_float == 0.0; break; case VAR_LIST: n = argvars[0].vval.v_list == NULL || argvars[0].vval.v_list->lv_first == NULL; break; case VAR_DICT: n = argvars[0].vval.v_dict == NULL || argvars[0].vval.v_dict->dv_hashtab.ht_used == 0; break; case VAR_SPECIAL: n = argvars[0].vval.v_special != kSpecialVarTrue; break; case VAR_UNKNOWN: EMSG2(_(e_intern2), "f_empty(UNKNOWN)"); break; } rettv->vval.v_number = n; } /* * "escape({string}, {chars})" function */ static void f_escape(typval_T *argvars, typval_T *rettv, FunPtr fptr) { char buf[NUMBUFLEN]; rettv->vval.v_string = vim_strsave_escaped( (const char_u *)tv_get_string(&argvars[0]), (const char_u *)tv_get_string_buf(&argvars[1], buf)); rettv->v_type = VAR_STRING; } /* * "eval()" function */ static void f_eval(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *s = tv_get_string_chk(&argvars[0]); if (s != NULL) { s = (const char *)skipwhite((const char_u *)s); } const char *const expr_start = s; if (s == NULL || eval1((char_u **)&s, rettv, true) == FAIL) { if (expr_start != NULL && !aborting()) { EMSG2(_(e_invexpr2), expr_start); } need_clr_eos = FALSE; rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; } else if (*s != NUL) { EMSG(_(e_trailing)); } } /* * "eventhandler()" function */ static void f_eventhandler(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = vgetc_busy; } /* * "executable()" function */ static void f_executable(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *name = tv_get_string(&argvars[0]); // Check in $PATH and also check directly if there is a directory name rettv->vval.v_number = ( os_can_exe((const char_u *)name, NULL, true) || (gettail_dir(name) != name && os_can_exe((const char_u *)name, NULL, false))); } static char_u *get_list_line(int c, void *cookie, int indent) { const listitem_T **const p = (const listitem_T **)cookie; const listitem_T *item = *p; if (item == NULL) { return NULL; } char buf[NUMBUFLEN]; const char *const s = tv_get_string_buf_chk(&item->li_tv, buf); *p = item->li_next; return (char_u *)(s == NULL ? NULL : xstrdup(s)); } // "execute(command)" function static void f_execute(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const int save_msg_silent = msg_silent; const int save_emsg_silent = emsg_silent; const bool save_emsg_noredir = emsg_noredir; garray_T *const save_capture_ga = capture_ga; if (check_secure()) { return; } if (argvars[1].v_type != VAR_UNKNOWN) { char buf[NUMBUFLEN]; const char *const s = tv_get_string_buf_chk(&argvars[1], buf); if (s == NULL) { return; } if (strncmp(s, "silent", 6) == 0) { msg_silent++; } if (strcmp(s, "silent!") == 0) { emsg_silent = true; emsg_noredir = true; } } else { msg_silent++; } garray_T capture_local; ga_init(&capture_local, (int)sizeof(char), 80); capture_ga = &capture_local; if (argvars[0].v_type != VAR_LIST) { do_cmdline_cmd(tv_get_string(&argvars[0])); } else if (argvars[0].vval.v_list != NULL) { list_T *const list = argvars[0].vval.v_list; list->lv_refcount++; listitem_T *const item = list->lv_first; do_cmdline(NULL, get_list_line, (void *)&item, DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT|DOCMD_KEYTYPED); list->lv_refcount--; } msg_silent = save_msg_silent; emsg_silent = save_emsg_silent; emsg_noredir = save_emsg_noredir; ga_append(capture_ga, NUL); rettv->v_type = VAR_STRING; rettv->vval.v_string = vim_strsave(capture_ga->ga_data); ga_clear(capture_ga); capture_ga = save_capture_ga; } /// "exepath()" function static void f_exepath(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *arg = tv_get_string(&argvars[0]); char_u *path = NULL; (void)os_can_exe((const char_u *)arg, &path, true); rettv->v_type = VAR_STRING; rettv->vval.v_string = path; } /* * "exists()" function */ static void f_exists(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int n = false; int len = 0; const char *p = tv_get_string(&argvars[0]); if (*p == '$') { // Environment variable. // First try "normal" environment variables (fast). if (os_getenv(p + 1) != NULL) { n = true; } else { // Try expanding things like $VIM and ${HOME}. char_u *const exp = expand_env_save((char_u *)p); if (exp != NULL && *exp != '$') { n = true; } xfree(exp); } } else if (*p == '&' || *p == '+') { // Option. n = (get_option_tv(&p, NULL, true) == OK); if (*skipwhite((const char_u *)p) != NUL) { n = false; // Trailing garbage. } } else if (*p == '*') { // Internal or user defined function. n = function_exists(p + 1, false); } else if (*p == ':') { n = cmd_exists(p + 1); } else if (*p == '#') { if (p[1] == '#') { n = autocmd_supported(p + 2); } else { n = au_exists(p + 1); } } else { // Internal variable. typval_T tv; // get_name_len() takes care of expanding curly braces const char *name = p; char *tofree; len = get_name_len((const char **)&p, &tofree, true, false); if (len > 0) { if (tofree != NULL) { name = tofree; } n = (get_var_tv(name, len, &tv, NULL, false, true) == OK); if (n) { // Handle d.key, l[idx], f(expr). n = (handle_subscript(&p, &tv, true, false) == OK); if (n) { tv_clear(&tv); } } } if (*p != NUL) n = FALSE; xfree(tofree); } rettv->vval.v_number = n; } /* * "expand()" function */ static void f_expand(typval_T *argvars, typval_T *rettv, FunPtr fptr) { size_t len; char_u *errormsg; int options = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND; expand_T xpc; bool error = false; char_u *result; rettv->v_type = VAR_STRING; if (argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN && tv_get_number_chk(&argvars[2], &error) && !error) { rettv->v_type = VAR_LIST; rettv->vval.v_list = NULL; } const char *s = tv_get_string(&argvars[0]); if (*s == '%' || *s == '#' || *s == '<') { emsg_off++; result = eval_vars((char_u *)s, (char_u *)s, &len, NULL, &errormsg, NULL); emsg_off--; if (rettv->v_type == VAR_LIST) { tv_list_alloc_ret(rettv); if (result != NULL) { tv_list_append_string(rettv->vval.v_list, (const char *)result, -1); } } else rettv->vval.v_string = result; } else { /* When the optional second argument is non-zero, don't remove matches * for 'wildignore' and don't put matches for 'suffixes' at the end. */ if (argvars[1].v_type != VAR_UNKNOWN && tv_get_number_chk(&argvars[1], &error)) { options |= WILD_KEEP_ALL; } if (!error) { ExpandInit(&xpc); xpc.xp_context = EXPAND_FILES; if (p_wic) { options += WILD_ICASE; } if (rettv->v_type == VAR_STRING) { rettv->vval.v_string = ExpandOne(&xpc, (char_u *)s, NULL, options, WILD_ALL); } else { tv_list_alloc_ret(rettv); ExpandOne(&xpc, (char_u *)s, NULL, options, WILD_ALL_KEEP); for (int i = 0; i < xpc.xp_numfiles; i++) { tv_list_append_string(rettv->vval.v_list, (const char *)xpc.xp_files[i], -1); } ExpandCleanup(&xpc); } } else { rettv->vval.v_string = NULL; } } } /// "menu_get(path [, modes])" function static void f_menu_get(typval_T *argvars, typval_T *rettv, FunPtr fptr) { tv_list_alloc_ret(rettv); int modes = MENU_ALL_MODES; if (argvars[1].v_type == VAR_STRING) { const char_u *const strmodes = (char_u *)tv_get_string(&argvars[1]); modes = get_menu_cmd_modes(strmodes, false, NULL, NULL); } menu_get((char_u *)tv_get_string(&argvars[0]), modes, rettv->vval.v_list); } /* * "extend(list, list [, idx])" function * "extend(dict, dict [, action])" function */ static void f_extend(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *const arg_errmsg = N_("extend() argument"); if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST) { long before; bool error = false; list_T *const l1 = argvars[0].vval.v_list; list_T *const l2 = argvars[1].vval.v_list; if (l1 == NULL) { const bool locked = tv_check_lock(VAR_FIXED, arg_errmsg, TV_TRANSLATE); (void)locked; assert(locked == true); } else if (l2 == NULL) { // Do nothing tv_copy(&argvars[0], rettv); } else if (!tv_check_lock(l1->lv_lock, arg_errmsg, TV_TRANSLATE)) { listitem_T *item; if (argvars[2].v_type != VAR_UNKNOWN) { before = (long)tv_get_number_chk(&argvars[2], &error); if (error) { return; // Type error; errmsg already given. } if (before == l1->lv_len) { item = NULL; } else { item = tv_list_find(l1, before); if (item == NULL) { EMSGN(_(e_listidx), before); return; } } } else item = NULL; tv_list_extend(l1, l2, item); tv_copy(&argvars[0], rettv); } } else if (argvars[0].v_type == VAR_DICT && argvars[1].v_type == VAR_DICT) { dict_T *const d1 = argvars[0].vval.v_dict; dict_T *const d2 = argvars[1].vval.v_dict; if (d1 == NULL) { const bool locked = tv_check_lock(VAR_FIXED, arg_errmsg, TV_TRANSLATE); (void)locked; assert(locked == true); } else if (d2 == NULL) { // Do nothing tv_copy(&argvars[0], rettv); } else if (!tv_check_lock(d1->dv_lock, arg_errmsg, TV_TRANSLATE)) { const char *action = "force"; // Check the third argument. if (argvars[2].v_type != VAR_UNKNOWN) { const char *const av[] = { "keep", "force", "error" }; action = tv_get_string_chk(&argvars[2]); if (action == NULL) { return; // Type error; error message already given. } size_t i; for (i = 0; i < ARRAY_SIZE(av); i++) { if (strcmp(action, av[i]) == 0) { break; } } if (i == 3) { EMSG2(_(e_invarg2), action); return; } } tv_dict_extend(d1, d2, action); tv_copy(&argvars[0], rettv); } } else { EMSG2(_(e_listdictarg), "extend()"); } } /* * "feedkeys()" function */ static void f_feedkeys(typval_T *argvars, typval_T *rettv, FunPtr fptr) { // This is not allowed in the sandbox. If the commands would still be // executed in the sandbox it would be OK, but it probably happens later, // when "sandbox" is no longer set. if (check_secure()) { return; } const char *const keys = tv_get_string(&argvars[0]); char nbuf[NUMBUFLEN]; const char *flags = NULL; if (argvars[1].v_type != VAR_UNKNOWN) { flags = tv_get_string_buf(&argvars[1], nbuf); } nvim_feedkeys(cstr_as_string((char *)keys), cstr_as_string((char *)flags), true); } /// "filereadable()" function static void f_filereadable(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *const p = tv_get_string(&argvars[0]); rettv->vval.v_number = (*p && !os_isdir((const char_u *)p) && os_file_is_readable(p)); } /* * Return 0 for not writable, 1 for writable file, 2 for a dir which we have * rights to write into. */ static void f_filewritable(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *filename = tv_get_string(&argvars[0]); rettv->vval.v_number = os_file_is_writable(filename); } static void findfilendir(typval_T *argvars, typval_T *rettv, int find_what) { char_u *fresult = NULL; char_u *path = *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path; int count = 1; bool first = true; bool error = false; rettv->vval.v_string = NULL; rettv->v_type = VAR_STRING; const char *fname = tv_get_string(&argvars[0]); char pathbuf[NUMBUFLEN]; if (argvars[1].v_type != VAR_UNKNOWN) { const char *p = tv_get_string_buf_chk(&argvars[1], pathbuf); if (p == NULL) { error = true; } else { if (*p != NUL) { path = (char_u *)p; } if (argvars[2].v_type != VAR_UNKNOWN) { count = tv_get_number_chk(&argvars[2], &error); } } } if (count < 0) { tv_list_alloc_ret(rettv); } if (*fname != NUL && !error) { do { if (rettv->v_type == VAR_STRING || rettv->v_type == VAR_LIST) xfree(fresult); fresult = find_file_in_path_option(first ? (char_u *)fname : NULL, first ? strlen(fname) : 0, 0, first, path, find_what, curbuf->b_ffname, (find_what == FINDFILE_DIR ? (char_u *)"" : curbuf->b_p_sua)); first = false; if (fresult != NULL && rettv->v_type == VAR_LIST) { tv_list_append_string(rettv->vval.v_list, (const char *)fresult, -1); } } while ((rettv->v_type == VAR_LIST || --count > 0) && fresult != NULL); } if (rettv->v_type == VAR_STRING) rettv->vval.v_string = fresult; } /* * Implementation of map() and filter(). */ static void filter_map(typval_T *argvars, typval_T *rettv, int map) { typval_T *expr; listitem_T *li, *nli; list_T *l = NULL; dictitem_T *di; hashtab_T *ht; hashitem_T *hi; dict_T *d = NULL; typval_T save_val; typval_T save_key; int rem = false; int todo; char_u *ermsg = (char_u *)(map ? "map()" : "filter()"); const char *const arg_errmsg = (map ? N_("map() argument") : N_("filter() argument")); int save_did_emsg; int idx = 0; if (argvars[0].v_type == VAR_LIST) { if ((l = argvars[0].vval.v_list) == NULL || (!map && tv_check_lock(l->lv_lock, arg_errmsg, TV_TRANSLATE))) { return; } } else if (argvars[0].v_type == VAR_DICT) { if ((d = argvars[0].vval.v_dict) == NULL || (!map && tv_check_lock(d->dv_lock, arg_errmsg, TV_TRANSLATE))) { return; } } else { EMSG2(_(e_listdictarg), ermsg); return; } expr = &argvars[1]; // On type errors, the preceding call has already displayed an error // message. Avoid a misleading error message for an empty string that // was not passed as argument. if (expr->v_type != VAR_UNKNOWN) { prepare_vimvar(VV_VAL, &save_val); // We reset "did_emsg" to be able to detect whether an error // occurred during evaluation of the expression. save_did_emsg = did_emsg; did_emsg = FALSE; prepare_vimvar(VV_KEY, &save_key); if (argvars[0].v_type == VAR_DICT) { vimvars[VV_KEY].vv_type = VAR_STRING; ht = &d->dv_hashtab; hash_lock(ht); todo = (int)ht->ht_used; for (hi = ht->ht_array; todo > 0; ++hi) { if (!HASHITEM_EMPTY(hi)) { --todo; di = TV_DICT_HI2DI(hi); if (map && (tv_check_lock(di->di_tv.v_lock, arg_errmsg, TV_TRANSLATE) || var_check_ro(di->di_flags, arg_errmsg, TV_TRANSLATE))) { break; } vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); int r = filter_map_one(&di->di_tv, expr, map, &rem); tv_clear(&vimvars[VV_KEY].vv_tv); if (r == FAIL || did_emsg) { break; } if (!map && rem) { if (var_check_fixed(di->di_flags, arg_errmsg, TV_TRANSLATE) || var_check_ro(di->di_flags, arg_errmsg, TV_TRANSLATE)) { break; } tv_dict_item_remove(d, di); } } } hash_unlock(ht); } else { vimvars[VV_KEY].vv_type = VAR_NUMBER; for (li = l->lv_first; li != NULL; li = nli) { if (map && tv_check_lock(li->li_tv.v_lock, arg_errmsg, TV_TRANSLATE)) { break; } nli = li->li_next; vimvars[VV_KEY].vv_nr = idx; if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL || did_emsg) break; if (!map && rem) { tv_list_item_remove(l, li); } idx++; } } restore_vimvar(VV_KEY, &save_key); restore_vimvar(VV_VAL, &save_val); did_emsg |= save_did_emsg; } tv_copy(&argvars[0], rettv); } static int filter_map_one(typval_T *tv, typval_T *expr, int map, int *remp) { typval_T rettv; typval_T argv[3]; int retval = FAIL; int dummy; tv_copy(tv, &vimvars[VV_VAL].vv_tv); argv[0] = vimvars[VV_KEY].vv_tv; argv[1] = vimvars[VV_VAL].vv_tv; if (expr->v_type == VAR_FUNC) { const char_u *const s = expr->vval.v_string; if (call_func(s, (int)STRLEN(s), &rettv, 2, argv, NULL, 0L, 0L, &dummy, true, NULL, NULL) == FAIL) { goto theend; } } else if (expr->v_type == VAR_PARTIAL) { partial_T *partial = expr->vval.v_partial; const char_u *const s = partial_name(partial); if (call_func(s, (int)STRLEN(s), &rettv, 2, argv, NULL, 0L, 0L, &dummy, true, partial, NULL) == FAIL) { goto theend; } } else { char buf[NUMBUFLEN]; const char *s = tv_get_string_buf_chk(expr, buf); if (s == NULL) { goto theend; } s = (const char *)skipwhite((const char_u *)s); if (eval1((char_u **)&s, &rettv, true) == FAIL) { goto theend; } if (*s != NUL) { // check for trailing chars after expr emsgf(_(e_invexpr2), s); goto theend; } } if (map) { // map(): replace the list item value. tv_clear(tv); rettv.v_lock = 0; *tv = rettv; } else { bool error = false; // filter(): when expr is zero remove the item *remp = (tv_get_number_chk(&rettv, &error) == 0); tv_clear(&rettv); // On type error, nothing has been removed; return FAIL to stop the // loop. The error message was given by tv_get_number_chk(). if (error) { goto theend; } } retval = OK; theend: tv_clear(&vimvars[VV_VAL].vv_tv); return retval; } /* * "filter()" function */ static void f_filter(typval_T *argvars, typval_T *rettv, FunPtr fptr) { filter_map(argvars, rettv, FALSE); } /* * "finddir({fname}[, {path}[, {count}]])" function */ static void f_finddir(typval_T *argvars, typval_T *rettv, FunPtr fptr) { findfilendir(argvars, rettv, FINDFILE_DIR); } /* * "findfile({fname}[, {path}[, {count}]])" function */ static void f_findfile(typval_T *argvars, typval_T *rettv, FunPtr fptr) { findfilendir(argvars, rettv, FINDFILE_FILE); } /* * "float2nr({float})" function */ static void f_float2nr(typval_T *argvars, typval_T *rettv, FunPtr fptr) { float_T f; if (tv_get_float_chk(argvars, &f)) { if (f <= -VARNUMBER_MAX + DBL_EPSILON) { rettv->vval.v_number = -VARNUMBER_MAX; } else if (f >= VARNUMBER_MAX - DBL_EPSILON) { rettv->vval.v_number = VARNUMBER_MAX; } else { rettv->vval.v_number = (varnumber_T)f; } } } /* * "fmod()" function */ static void f_fmod(typval_T *argvars, typval_T *rettv, FunPtr fptr) { float_T fx; float_T fy; rettv->v_type = VAR_FLOAT; if (tv_get_float_chk(argvars, &fx) && tv_get_float_chk(&argvars[1], &fy)) { rettv->vval.v_float = fmod(fx, fy); } else { rettv->vval.v_float = 0.0; } } /* * "fnameescape({string})" function */ static void f_fnameescape(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_string = (char_u *)vim_strsave_fnameescape( tv_get_string(&argvars[0]), false); rettv->v_type = VAR_STRING; } /* * "fnamemodify({fname}, {mods})" function */ static void f_fnamemodify(typval_T *argvars, typval_T *rettv, FunPtr fptr) { char_u *fbuf = NULL; size_t len; char buf[NUMBUFLEN]; const char *fname = tv_get_string_chk(&argvars[0]); const char *const mods = tv_get_string_buf_chk(&argvars[1], buf); if (fname == NULL || mods == NULL) { fname = NULL; } else { len = strlen(fname); size_t usedlen = 0; (void)modify_fname((char_u *)mods, &usedlen, (char_u **)&fname, &fbuf, &len); } rettv->v_type = VAR_STRING; if (fname == NULL) { rettv->vval.v_string = NULL; } else { rettv->vval.v_string = (char_u *)xmemdupz(fname, len); } xfree(fbuf); } /* * "foldclosed()" function */ static void foldclosed_both(typval_T *argvars, typval_T *rettv, int end) { const linenr_T lnum = tv_get_lnum(argvars); if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count) { linenr_T first; linenr_T last; if (hasFoldingWin(curwin, lnum, &first, &last, false, NULL)) { if (end) { rettv->vval.v_number = (varnumber_T)last; } else { rettv->vval.v_number = (varnumber_T)first; } return; } } rettv->vval.v_number = -1; } /* * "foldclosed()" function */ static void f_foldclosed(typval_T *argvars, typval_T *rettv, FunPtr fptr) { foldclosed_both(argvars, rettv, FALSE); } /* * "foldclosedend()" function */ static void f_foldclosedend(typval_T *argvars, typval_T *rettv, FunPtr fptr) { foldclosed_both(argvars, rettv, TRUE); } /* * "foldlevel()" function */ static void f_foldlevel(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const linenr_T lnum = tv_get_lnum(argvars); if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count) { rettv->vval.v_number = foldLevel(lnum); } } /* * "foldtext()" function */ static void f_foldtext(typval_T *argvars, typval_T *rettv, FunPtr fptr) { linenr_T foldstart; linenr_T foldend; char_u *dashes; linenr_T lnum; char_u *s; char_u *r; int len; char *txt; rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; foldstart = (linenr_T)get_vim_var_nr(VV_FOLDSTART); foldend = (linenr_T)get_vim_var_nr(VV_FOLDEND); dashes = get_vim_var_str(VV_FOLDDASHES); if (foldstart > 0 && foldend <= curbuf->b_ml.ml_line_count && dashes != NULL) { /* Find first non-empty line in the fold. */ for (lnum = foldstart; lnum < foldend; ++lnum) { if (!linewhite(lnum)) { break; } } /* Find interesting text in this line. */ s = skipwhite(ml_get(lnum)); /* skip C comment-start */ if (s[0] == '/' && (s[1] == '*' || s[1] == '/')) { s = skipwhite(s + 2); if (*skipwhite(s) == NUL && lnum + 1 < foldend) { s = skipwhite(ml_get(lnum + 1)); if (*s == '*') s = skipwhite(s + 1); } } unsigned long count = (unsigned long)(foldend - foldstart + 1); txt = ngettext("+-%s%3ld line: ", "+-%s%3ld lines: ", count); r = xmalloc(STRLEN(txt) + STRLEN(dashes) // for %s + 20 // for %3ld + STRLEN(s)); // concatenated sprintf((char *)r, txt, dashes, count); len = (int)STRLEN(r); STRCAT(r, s); /* remove 'foldmarker' and 'commentstring' */ foldtext_cleanup(r + len); rettv->vval.v_string = r; } } /* * "foldtextresult(lnum)" function */ static void f_foldtextresult(typval_T *argvars, typval_T *rettv, FunPtr fptr) { char_u *text; char_u buf[FOLD_TEXT_LEN]; foldinfo_T foldinfo; int fold_count; rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; linenr_T lnum = tv_get_lnum(argvars); // Treat illegal types and illegal string values for {lnum} the same. if (lnum < 0) { lnum = 0; } fold_count = foldedCount(curwin, lnum, &foldinfo); if (fold_count > 0) { text = get_foldtext(curwin, lnum, lnum + fold_count - 1, &foldinfo, buf); if (text == buf) { text = vim_strsave(text); } rettv->vval.v_string = text; } } /* * "foreground()" function */ static void f_foreground(typval_T *argvars, typval_T *rettv, FunPtr fptr) { } static void common_function(typval_T *argvars, typval_T *rettv, bool is_funcref, FunPtr fptr) { char_u *s; char_u *name; bool use_string = false; partial_T *arg_pt = NULL; char_u *trans_name = NULL; if (argvars[0].v_type == VAR_FUNC) { // function(MyFunc, [arg], dict) s = argvars[0].vval.v_string; } else if (argvars[0].v_type == VAR_PARTIAL && argvars[0].vval.v_partial != NULL) { // function(dict.MyFunc, [arg]) arg_pt = argvars[0].vval.v_partial; s = partial_name(arg_pt); } else { // function('MyFunc', [arg], dict) s = (char_u *)tv_get_string(&argvars[0]); use_string = true; } if ((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL) || is_funcref) { name = s; trans_name = trans_function_name(&name, false, TFN_INT | TFN_QUIET | TFN_NO_AUTOLOAD | TFN_NO_DEREF, NULL, NULL); if (*name != NUL) { s = NULL; } } if (s == NULL || *s == NUL || (use_string && ascii_isdigit(*s)) || (is_funcref && trans_name == NULL)) { emsgf(_(e_invarg2), (use_string ? tv_get_string(&argvars[0]) : (const char *)s)); // Don't check an autoload name for existence here. } else if (trans_name != NULL && (is_funcref ? find_func(trans_name) == NULL : !translated_function_exists((const char *)trans_name))) { EMSG2(_("E700: Unknown function: %s"), s); } else { int dict_idx = 0; int arg_idx = 0; list_T *list = NULL; if (STRNCMP(s, "s:", 2) == 0 || STRNCMP(s, "", 5) == 0) { char sid_buf[25]; int off = *s == 's' ? 2 : 5; // Expand s: and into nr_, so that the function can // also be called from another script. Using trans_function_name() // would also work, but some plugins depend on the name being // printable text. snprintf(sid_buf, sizeof(sid_buf), "%" PRId64 "_", (int64_t)current_SID); name = xmalloc(STRLEN(sid_buf) + STRLEN(s + off) + 1); if (name != NULL) { STRCPY(name, sid_buf); STRCAT(name, s + off); } } else { name = vim_strsave(s); } if (argvars[1].v_type != VAR_UNKNOWN) { if (argvars[2].v_type != VAR_UNKNOWN) { // function(name, [args], dict) arg_idx = 1; dict_idx = 2; } else if (argvars[1].v_type == VAR_DICT) { // function(name, dict) dict_idx = 1; } else { // function(name, [args]) arg_idx = 1; } if (dict_idx > 0) { if (argvars[dict_idx].v_type != VAR_DICT) { EMSG(_("E922: expected a dict")); xfree(name); goto theend; } if (argvars[dict_idx].vval.v_dict == NULL) { dict_idx = 0; } } if (arg_idx > 0) { if (argvars[arg_idx].v_type != VAR_LIST) { EMSG(_("E923: Second argument of function() must be " "a list or a dict")); xfree(name); goto theend; } list = argvars[arg_idx].vval.v_list; if (list == NULL || list->lv_len == 0) { arg_idx = 0; } } } if (dict_idx > 0 || arg_idx > 0 || arg_pt != NULL || is_funcref) { partial_T *const pt = xcalloc(1, sizeof(*pt)); // result is a VAR_PARTIAL if (arg_idx > 0 || (arg_pt != NULL && arg_pt->pt_argc > 0)) { const int arg_len = (arg_pt == NULL ? 0 : arg_pt->pt_argc); const int lv_len = (list == NULL ? 0 : list->lv_len); pt->pt_argc = arg_len + lv_len; pt->pt_argv = xmalloc(sizeof(pt->pt_argv[0]) * pt->pt_argc); if (pt->pt_argv == NULL) { xfree(pt); xfree(name); goto theend; } int i = 0; for (; i < arg_len; i++) { tv_copy(&arg_pt->pt_argv[i], &pt->pt_argv[i]); } if (lv_len > 0) { for (listitem_T *li = list->lv_first; li != NULL; li = li->li_next) { tv_copy(&li->li_tv, &pt->pt_argv[i++]); } } } // For "function(dict.func, [], dict)" and "func" is a partial // use "dict". That is backwards compatible. if (dict_idx > 0) { // The dict is bound explicitly, pt_auto is false pt->pt_dict = argvars[dict_idx].vval.v_dict; (pt->pt_dict->dv_refcount)++; } else if (arg_pt != NULL) { // If the dict was bound automatically the result is also // bound automatically. pt->pt_dict = arg_pt->pt_dict; pt->pt_auto = arg_pt->pt_auto; if (pt->pt_dict != NULL) { (pt->pt_dict->dv_refcount)++; } } pt->pt_refcount = 1; if (arg_pt != NULL && arg_pt->pt_func != NULL) { pt->pt_func = arg_pt->pt_func; func_ptr_ref(pt->pt_func); xfree(name); } else if (is_funcref) { pt->pt_func = find_func(trans_name); func_ptr_ref(pt->pt_func); xfree(name); } else { pt->pt_name = name; func_ref(name); } rettv->v_type = VAR_PARTIAL; rettv->vval.v_partial = pt; } else { // result is a VAR_FUNC rettv->v_type = VAR_FUNC; rettv->vval.v_string = name; func_ref(name); } } theend: xfree(trans_name); } static void f_funcref(typval_T *argvars, typval_T *rettv, FunPtr fptr) { common_function(argvars, rettv, true, fptr); } static void f_function(typval_T *argvars, typval_T *rettv, FunPtr fptr) { common_function(argvars, rettv, false, fptr); } /// "garbagecollect()" function static void f_garbagecollect(typval_T *argvars, typval_T *rettv, FunPtr fptr) { // This is postponed until we are back at the toplevel, because we may be // using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". want_garbage_collect = true; if (argvars[0].v_type != VAR_UNKNOWN && tv_get_number(&argvars[0]) == 1) { garbage_collect_at_exit = true; } } /* * "get()" function */ static void f_get(typval_T *argvars, typval_T *rettv, FunPtr fptr) { listitem_T *li; list_T *l; dictitem_T *di; dict_T *d; typval_T *tv = NULL; if (argvars[0].v_type == VAR_LIST) { if ((l = argvars[0].vval.v_list) != NULL) { bool error = false; li = tv_list_find(l, tv_get_number_chk(&argvars[1], &error)); if (!error && li != NULL) { tv = &li->li_tv; } } } else if (argvars[0].v_type == VAR_DICT) { if ((d = argvars[0].vval.v_dict) != NULL) { di = tv_dict_find(d, tv_get_string(&argvars[1]), -1); if (di != NULL) { tv = &di->di_tv; } } } else if (tv_is_func(argvars[0])) { partial_T *pt; partial_T fref_pt; if (argvars[0].v_type == VAR_PARTIAL) { pt = argvars[0].vval.v_partial; } else { memset(&fref_pt, 0, sizeof(fref_pt)); fref_pt.pt_name = argvars[0].vval.v_string; pt = &fref_pt; } if (pt != NULL) { const char *const what = tv_get_string(&argvars[1]); if (strcmp(what, "func") == 0 || strcmp(what, "name") == 0) { rettv->v_type = (*what == 'f' ? VAR_FUNC : VAR_STRING); const char *const n = (const char *)partial_name(pt); assert(n != NULL); rettv->vval.v_string = (char_u *)xstrdup(n); if (rettv->v_type == VAR_FUNC) { func_ref(rettv->vval.v_string); } } else if (strcmp(what, "dict") == 0) { rettv->v_type = VAR_DICT; rettv->vval.v_dict = pt->pt_dict; if (pt->pt_dict != NULL) { (pt->pt_dict->dv_refcount)++; } } else if (strcmp(what, "args") == 0) { rettv->v_type = VAR_LIST; if (tv_list_alloc_ret(rettv) != NULL) { for (int i = 0; i < pt->pt_argc; i++) { tv_list_append_tv(rettv->vval.v_list, &pt->pt_argv[i]); } } } else { EMSG2(_(e_invarg2), what); } return; } } else { EMSG2(_(e_listdictarg), "get()"); } if (tv == NULL) { if (argvars[2].v_type != VAR_UNKNOWN) { tv_copy(&argvars[2], rettv); } } else { tv_copy(tv, rettv); } } /// Returns information about signs placed in a buffer as list of dicts. static void get_buffer_signs(buf_T *buf, list_T *l) { for (signlist_T *sign = buf->b_signlist; sign; sign = sign->next) { dict_T *const d = tv_dict_alloc(); tv_dict_add_nr(d, S_LEN("id"), sign->id); tv_dict_add_nr(d, S_LEN("lnum"), sign->lnum); tv_dict_add_str(d, S_LEN("name"), (const char *)sign_typenr2name(sign->typenr)); tv_list_append_dict(l, d); } } /// Returns buffer options, variables and other attributes in a dictionary. static dict_T *get_buffer_info(buf_T *buf) { dict_T *const dict = tv_dict_alloc(); tv_dict_add_nr(dict, S_LEN("bufnr"), buf->b_fnum); tv_dict_add_str(dict, S_LEN("name"), buf->b_ffname != NULL ? (const char *)buf->b_ffname : ""); tv_dict_add_nr(dict, S_LEN("lnum"), buf == curbuf ? curwin->w_cursor.lnum : buflist_findlnum(buf)); tv_dict_add_nr(dict, S_LEN("loaded"), buf->b_ml.ml_mfp != NULL); tv_dict_add_nr(dict, S_LEN("listed"), buf->b_p_bl); tv_dict_add_nr(dict, S_LEN("changed"), bufIsChanged(buf)); tv_dict_add_nr(dict, S_LEN("changedtick"), buf->b_changedtick); tv_dict_add_nr(dict, S_LEN("hidden"), buf->b_ml.ml_mfp != NULL && buf->b_nwindows == 0); // Get a reference to buffer variables tv_dict_add_dict(dict, S_LEN("variables"), buf->b_vars); // List of windows displaying this buffer list_T *const windows = tv_list_alloc(); FOR_ALL_TAB_WINDOWS(tp, wp) { if (wp->w_buffer == buf) { tv_list_append_number(windows, (varnumber_T)wp->handle); } } tv_dict_add_list(dict, S_LEN("windows"), windows); if (buf->b_signlist != NULL) { // List of signs placed in this buffer list_T *const signs = tv_list_alloc(); get_buffer_signs(buf, signs); tv_dict_add_list(dict, S_LEN("signs"), signs); } return dict; } /// "getbufinfo()" function static void f_getbufinfo(typval_T *argvars, typval_T *rettv, FunPtr fptr) { buf_T *argbuf = NULL; bool filtered = false; bool sel_buflisted = false; bool sel_bufloaded = false; tv_list_alloc_ret(rettv); // List of all the buffers or selected buffers if (argvars[0].v_type == VAR_DICT) { dict_T *sel_d = argvars[0].vval.v_dict; if (sel_d != NULL) { dictitem_T *di; filtered = true; di = tv_dict_find(sel_d, S_LEN("buflisted")); if (di != NULL && tv_get_number(&di->di_tv)) { sel_buflisted = true; } di = tv_dict_find(sel_d, S_LEN("bufloaded")); if (di != NULL && tv_get_number(&di->di_tv)) { sel_bufloaded = true; } } } else if (argvars[0].v_type != VAR_UNKNOWN) { // Information about one buffer. Argument specifies the buffer if (tv_check_num(&argvars[0])) { // issue errmsg if type error emsg_off++; argbuf = get_buf_tv(&argvars[0], false); emsg_off--; if (argbuf == NULL) { return; } } } // Return information about all the buffers or a specified buffer FOR_ALL_BUFFERS(buf) { if (argbuf != NULL && argbuf != buf) { continue; } if (filtered && ((sel_bufloaded && buf->b_ml.ml_mfp == NULL) || (sel_buflisted && !buf->b_p_bl))) { continue; } dict_T *const d = get_buffer_info(buf); if (d != NULL) { tv_list_append_dict(rettv->vval.v_list, d); } if (argbuf != NULL) { return; } } } /* * Get line or list of lines from buffer "buf" into "rettv". * Return a range (from start to end) of lines in rettv from the specified * buffer. * If 'retlist' is TRUE, then the lines are returned as a Vim List. */ static void get_buffer_lines(buf_T *buf, linenr_T start, linenr_T end, int retlist, typval_T *rettv) { char_u *p; rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; if (retlist) { tv_list_alloc_ret(rettv); } if (buf == NULL || buf->b_ml.ml_mfp == NULL || start < 0) return; if (!retlist) { if (start >= 1 && start <= buf->b_ml.ml_line_count) p = ml_get_buf(buf, start, FALSE); else p = (char_u *)""; rettv->vval.v_string = vim_strsave(p); } else { if (end < start) return; if (start < 1) start = 1; if (end > buf->b_ml.ml_line_count) end = buf->b_ml.ml_line_count; while (start <= end) { tv_list_append_string(rettv->vval.v_list, (const char *)ml_get_buf(buf, start++, false), -1); } } } /// Get the line number from VimL object /// /// @note Unlike tv_get_lnum(), this one supports only "$" special string. /// /// @param[in] tv Object to get value from. Is expected to be a number or /// a special string "$". /// @param[in] buf Buffer to take last line number from in case tv is "$". May /// be NULL, in this case "$" results in zero return. /// /// @return Line number or 0 in case of error. static linenr_T tv_get_lnum_buf(const typval_T *const tv, const buf_T *const buf) FUNC_ATTR_NONNULL_ARG(1) FUNC_ATTR_WARN_UNUSED_RESULT { if (tv->v_type == VAR_STRING && tv->vval.v_string != NULL && tv->vval.v_string[0] == '$' && buf != NULL) { return buf->b_ml.ml_line_count; } return tv_get_number_chk(tv, NULL); } /* * "getbufline()" function */ static void f_getbufline(typval_T *argvars, typval_T *rettv, FunPtr fptr) { buf_T *buf = NULL; if (tv_check_str_or_nr(&argvars[0])) { emsg_off++; buf = get_buf_tv(&argvars[0], false); emsg_off--; } const linenr_T lnum = tv_get_lnum_buf(&argvars[1], buf); const linenr_T end = (argvars[2].v_type == VAR_UNKNOWN ? lnum : tv_get_lnum_buf(&argvars[2], buf)); get_buffer_lines(buf, lnum, end, true, rettv); } /* * "getbufvar()" function */ static void f_getbufvar(typval_T *argvars, typval_T *rettv, FunPtr fptr) { bool done = false; rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; if (!tv_check_str_or_nr(&argvars[0])) { goto f_getbufvar_end; } const char *varname = tv_get_string_chk(&argvars[1]); emsg_off++; buf_T *const buf = get_buf_tv(&argvars[0], false); if (buf != NULL && varname != NULL) { // set curbuf to be our buf, temporarily buf_T *const save_curbuf = curbuf; curbuf = buf; if (*varname == '&') { // buffer-local-option if (varname[1] == NUL) { // get all buffer-local options in a dict dict_T *opts = get_winbuf_options(true); if (opts != NULL) { rettv->v_type = VAR_DICT; rettv->vval.v_dict = opts; opts->dv_refcount++; done = true; } } else if (get_option_tv(&varname, rettv, true) == OK) { // buffer-local-option done = true; } } else { // Look up the variable. // Let getbufvar({nr}, "") return the "b:" dictionary. dictitem_T *const v = find_var_in_ht(&curbuf->b_vars->dv_hashtab, 'b', varname, strlen(varname), false); if (v != NULL) { tv_copy(&v->di_tv, rettv); done = true; } } // restore previous notion of curbuf curbuf = save_curbuf; } emsg_off--; f_getbufvar_end: if (!done && argvars[2].v_type != VAR_UNKNOWN) { // use the default value tv_copy(&argvars[2], rettv); } } /* * "getchar()" function */ static void f_getchar(typval_T *argvars, typval_T *rettv, FunPtr fptr) { varnumber_T n; bool error = false; no_mapping++; for (;; ) { // Position the cursor. Needed after a message that ends in a space, // or if event processing caused a redraw. ui_cursor_goto(msg_row, msg_col); if (argvars[0].v_type == VAR_UNKNOWN) { // getchar(): blocking wait. if (!(char_avail() || using_script() || input_available())) { input_enable_events(); (void)os_inchar(NULL, 0, -1, 0); input_disable_events(); if (!multiqueue_empty(main_loop.events)) { multiqueue_process_events(main_loop.events); continue; } } n = safe_vgetc(); } else if (tv_get_number_chk(&argvars[0], &error) == 1) { // getchar(1): only check if char avail n = vpeekc_any(); } else if (error || vpeekc_any() == NUL) { // illegal argument or getchar(0) and no char avail: return zero n = 0; } else { // getchar(0) and char avail: return char n = safe_vgetc(); } if (n == K_IGNORE) { continue; } break; } no_mapping--; vimvars[VV_MOUSE_WIN].vv_nr = 0; vimvars[VV_MOUSE_WINID].vv_nr = 0; vimvars[VV_MOUSE_LNUM].vv_nr = 0; vimvars[VV_MOUSE_COL].vv_nr = 0; rettv->vval.v_number = n; if (IS_SPECIAL(n) || mod_mask != 0) { char_u temp[10]; /* modifier: 3, mbyte-char: 6, NUL: 1 */ int i = 0; /* Turn a special key into three bytes, plus modifier. */ if (mod_mask != 0) { temp[i++] = K_SPECIAL; temp[i++] = KS_MODIFIER; temp[i++] = mod_mask; } if (IS_SPECIAL(n)) { temp[i++] = K_SPECIAL; temp[i++] = K_SECOND(n); temp[i++] = K_THIRD(n); } else if (has_mbyte) i += (*mb_char2bytes)(n, temp + i); else temp[i++] = n; temp[i++] = NUL; rettv->v_type = VAR_STRING; rettv->vval.v_string = vim_strsave(temp); if (is_mouse_key(n)) { int row = mouse_row; int col = mouse_col; win_T *win; linenr_T lnum; win_T *wp; int winnr = 1; if (row >= 0 && col >= 0) { /* Find the window at the mouse coordinates and compute the * text position. */ win = mouse_find_win(&row, &col); (void)mouse_comp_pos(win, &row, &col, &lnum); for (wp = firstwin; wp != win; wp = wp->w_next) ++winnr; vimvars[VV_MOUSE_WIN].vv_nr = winnr; vimvars[VV_MOUSE_WINID].vv_nr = wp->handle; vimvars[VV_MOUSE_LNUM].vv_nr = lnum; vimvars[VV_MOUSE_COL].vv_nr = col + 1; } } } } /* * "getcharmod()" function */ static void f_getcharmod(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = mod_mask; } /* * "getcharsearch()" function */ static void f_getcharsearch(typval_T *argvars, typval_T *rettv, FunPtr fptr) { tv_dict_alloc_ret(rettv); dict_T *dict = rettv->vval.v_dict; tv_dict_add_str(dict, S_LEN("char"), last_csearch()); tv_dict_add_nr(dict, S_LEN("forward"), last_csearch_forward()); tv_dict_add_nr(dict, S_LEN("until"), last_csearch_until()); } /* * "getcmdline()" function */ static void f_getcmdline(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_STRING; rettv->vval.v_string = get_cmdline_str(); } /* * "getcmdpos()" function */ static void f_getcmdpos(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = get_cmdline_pos() + 1; } /* * "getcmdtype()" function */ static void f_getcmdtype(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_STRING; rettv->vval.v_string = xmallocz(1); rettv->vval.v_string[0] = get_cmdline_type(); } /* * "getcmdwintype()" function */ static void f_getcmdwintype(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; rettv->vval.v_string = xmallocz(1); rettv->vval.v_string[0] = cmdwin_type; } // "getcompletion()" function static void f_getcompletion(typval_T *argvars, typval_T *rettv, FunPtr fptr) { char_u *pat; expand_T xpc; bool filtered = false; int options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH | WILD_NO_BEEP; if (argvars[2].v_type != VAR_UNKNOWN) { filtered = (bool)tv_get_number_chk(&argvars[2], NULL); } if (p_wic) { options |= WILD_ICASE; } // For filtered results, 'wildignore' is used if (!filtered) { options |= WILD_KEEP_ALL; } if (argvars[0].v_type != VAR_STRING || argvars[1].v_type != VAR_STRING) { EMSG(_(e_invarg)); return; } if (strcmp(tv_get_string(&argvars[1]), "cmdline") == 0) { set_one_cmd_context(&xpc, tv_get_string(&argvars[0])); xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern); goto theend; } ExpandInit(&xpc); xpc.xp_pattern = (char_u *)tv_get_string(&argvars[0]); xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern); xpc.xp_context = cmdcomplete_str_to_type( (char_u *)tv_get_string(&argvars[1])); if (xpc.xp_context == EXPAND_NOTHING) { EMSG2(_(e_invarg2), argvars[1].vval.v_string); return; } if (xpc.xp_context == EXPAND_MENUS) { set_context_in_menu_cmd(&xpc, (char_u *)"menu", xpc.xp_pattern, false); xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern); } if (xpc.xp_context == EXPAND_CSCOPE) { set_context_in_cscope_cmd(&xpc, (const char *)xpc.xp_pattern, CMD_cscope); xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern); } if (xpc.xp_context == EXPAND_SIGN) { set_context_in_sign_cmd(&xpc, xpc.xp_pattern); xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern); } theend: pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context); tv_list_alloc_ret(rettv); if (pat != NULL) { ExpandOne(&xpc, pat, NULL, options, WILD_ALL_KEEP); for (int i = 0; i < xpc.xp_numfiles; i++) { tv_list_append_string(rettv->vval.v_list, (const char *)xpc.xp_files[i], -1); } } xfree(pat); ExpandCleanup(&xpc); } /// `getcwd([{win}[, {tab}]])` function /// /// Every scope not specified implies the currently selected scope object. /// /// @pre The arguments must be of type number. /// @pre There may not be more than two arguments. /// @pre An argument may not be -1 if preceding arguments are not all -1. /// /// @post The return value will be a string. static void f_getcwd(typval_T *argvars, typval_T *rettv, FunPtr fptr) { // Possible scope of working directory to return. CdScope scope = kCdScopeInvalid; // Numbers of the scope objects (window, tab) we want the working directory // of. A `-1` means to skip this scope, a `0` means the current object. int scope_number[] = { [kCdScopeWindow] = 0, // Number of window to look at. [kCdScopeTab ] = 0, // Number of tab to look at. }; char_u *cwd = NULL; // Current working directory to print char_u *from = NULL; // The original string to copy tabpage_T *tp = curtab; // The tabpage to look at. win_T *win = curwin; // The window to look at. rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; // Pre-conditions and scope extraction together for (int i = MIN_CD_SCOPE; i < MAX_CD_SCOPE; i++) { // If there is no argument there are no more scopes after it, break out. if (argvars[i].v_type == VAR_UNKNOWN) { break; } if (argvars[i].v_type != VAR_NUMBER) { EMSG(_(e_invarg)); return; } scope_number[i] = argvars[i].vval.v_number; // It is an error for the scope number to be less than `-1`. if (scope_number[i] < -1) { EMSG(_(e_invarg)); return; } // Use the narrowest scope the user requested if (scope_number[i] >= 0 && scope == kCdScopeInvalid) { // The scope is the current iteration step. scope = i; } else if (scope_number[i] < 0) { scope = i + 1; } } // If the user didn't specify anything, default to window scope if (scope == kCdScopeInvalid) { scope = MIN_CD_SCOPE; } // Find the tabpage by number if (scope_number[kCdScopeTab] > 0) { tp = find_tabpage(scope_number[kCdScopeTab]); if (!tp) { EMSG(_("E5000: Cannot find tab number.")); return; } } // Find the window in `tp` by number, `NULL` if none. if (scope_number[kCdScopeWindow] >= 0) { if (scope_number[kCdScopeTab] < 0) { EMSG(_("E5001: Higher scope cannot be -1 if lower scope is >= 0.")); return; } if (scope_number[kCdScopeWindow] > 0) { win = find_win_by_nr(&argvars[0], tp); if (!win) { EMSG(_("E5002: Cannot find window number.")); return; } } } cwd = xmalloc(MAXPATHL); switch (scope) { case kCdScopeWindow: assert(win); from = win->w_localdir; if (from) { break; } // fallthrough case kCdScopeTab: assert(tp); from = tp->tp_localdir; if (from) { break; } // fallthrough case kCdScopeGlobal: if (globaldir) { // `globaldir` is not always set. from = globaldir; } else if (os_dirname(cwd, MAXPATHL) == FAIL) { // Get the OS CWD. from = (char_u *)""; // Return empty string on failure. } break; case kCdScopeInvalid: // We should never get here assert(false); } if (from) { xstrlcpy((char *)cwd, (char *)from, MAXPATHL); } rettv->vval.v_string = vim_strsave(cwd); #ifdef BACKSLASH_IN_FILENAME slash_adjust(rettv->vval.v_string); #endif xfree(cwd); } /* * "getfontname()" function */ static void f_getfontname(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; } /* * "getfperm({fname})" function */ static void f_getfperm(typval_T *argvars, typval_T *rettv, FunPtr fptr) { char *perm = NULL; char_u flags[] = "rwx"; const char *filename = tv_get_string(&argvars[0]); int32_t file_perm = os_getperm(filename); if (file_perm >= 0) { perm = xstrdup("---------"); for (int i = 0; i < 9; i++) { if (file_perm & (1 << (8 - i))) { perm[i] = flags[i % 3]; } } } rettv->v_type = VAR_STRING; rettv->vval.v_string = (char_u *)perm; } /* * "getfsize({fname})" function */ static void f_getfsize(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *fname = tv_get_string(&argvars[0]); rettv->v_type = VAR_NUMBER; FileInfo file_info; if (os_fileinfo(fname, &file_info)) { uint64_t filesize = os_fileinfo_size(&file_info); if (os_isdir((const char_u *)fname)) { rettv->vval.v_number = 0; } else { rettv->vval.v_number = (varnumber_T)filesize; /* non-perfect check for overflow */ if ((uint64_t)rettv->vval.v_number != filesize) { rettv->vval.v_number = -2; } } } else { rettv->vval.v_number = -1; } } /* * "getftime({fname})" function */ static void f_getftime(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *fname = tv_get_string(&argvars[0]); FileInfo file_info; if (os_fileinfo(fname, &file_info)) { rettv->vval.v_number = (varnumber_T)file_info.stat.st_mtim.tv_sec; } else { rettv->vval.v_number = -1; } } /* * "getftype({fname})" function */ static void f_getftype(typval_T *argvars, typval_T *rettv, FunPtr fptr) { char_u *type = NULL; char *t; const char *fname = tv_get_string(&argvars[0]); rettv->v_type = VAR_STRING; FileInfo file_info; if (os_fileinfo_link(fname, &file_info)) { uint64_t mode = file_info.stat.st_mode; #ifdef S_ISREG if (S_ISREG(mode)) t = "file"; else if (S_ISDIR(mode)) t = "dir"; # ifdef S_ISLNK else if (S_ISLNK(mode)) t = "link"; # endif # ifdef S_ISBLK else if (S_ISBLK(mode)) t = "bdev"; # endif # ifdef S_ISCHR else if (S_ISCHR(mode)) t = "cdev"; # endif # ifdef S_ISFIFO else if (S_ISFIFO(mode)) t = "fifo"; # endif # ifdef S_ISSOCK else if (S_ISSOCK(mode)) t = "fifo"; # endif else t = "other"; #else # ifdef S_IFMT switch (mode & S_IFMT) { case S_IFREG: t = "file"; break; case S_IFDIR: t = "dir"; break; # ifdef S_IFLNK case S_IFLNK: t = "link"; break; # endif # ifdef S_IFBLK case S_IFBLK: t = "bdev"; break; # endif # ifdef S_IFCHR case S_IFCHR: t = "cdev"; break; # endif # ifdef S_IFIFO case S_IFIFO: t = "fifo"; break; # endif # ifdef S_IFSOCK case S_IFSOCK: t = "socket"; break; # endif default: t = "other"; } # else if (os_isdir((const char_u *)fname)) { t = "dir"; } else { t = "file"; } # endif #endif type = vim_strsave((char_u *)t); } rettv->vval.v_string = type; } /* * "getline(lnum, [end])" function */ static void f_getline(typval_T *argvars, typval_T *rettv, FunPtr fptr) { linenr_T end; bool retlist; const linenr_T lnum = tv_get_lnum(argvars); if (argvars[1].v_type == VAR_UNKNOWN) { end = 0; retlist = false; } else { end = tv_get_lnum(&argvars[1]); retlist = true; } get_buffer_lines(curbuf, lnum, end, retlist, rettv); } static void get_qf_loc_list(int is_qf, win_T *wp, typval_T *what_arg, typval_T *rettv) { if (what_arg->v_type == VAR_UNKNOWN) { tv_list_alloc_ret(rettv); if (is_qf || wp != NULL) { (void)get_errorlist(wp, -1, rettv->vval.v_list); } } else { tv_dict_alloc_ret(rettv); if (is_qf || wp != NULL) { if (what_arg->v_type == VAR_DICT) { dict_T *d = what_arg->vval.v_dict; if (d != NULL) { get_errorlist_properties(wp, d, rettv->vval.v_dict); } } else { EMSG(_(e_dictreq)); } } } } /// "getloclist()" function static void f_getloclist(typval_T *argvars, typval_T *rettv, FunPtr fptr) { win_T *wp = find_win_by_nr(&argvars[0], NULL); get_qf_loc_list(false, wp, &argvars[1], rettv); } /* * "getmatches()" function */ static void f_getmatches(typval_T *argvars, typval_T *rettv, FunPtr fptr) { matchitem_T *cur = curwin->w_match_head; int i; tv_list_alloc_ret(rettv); while (cur != NULL) { dict_T *dict = tv_dict_alloc(); if (cur->match.regprog == NULL) { // match added with matchaddpos() for (i = 0; i < MAXPOSMATCH; ++i) { llpos_T *llpos; char buf[6]; llpos = &cur->pos.pos[i]; if (llpos->lnum == 0) { break; } list_T *l = tv_list_alloc(); tv_list_append_number(l, (varnumber_T)llpos->lnum); if (llpos->col > 0) { tv_list_append_number(l, (varnumber_T)llpos->col); tv_list_append_number(l, (varnumber_T)llpos->len); } int len = snprintf(buf, sizeof(buf), "pos%d", i + 1); assert((size_t)len < sizeof(buf)); tv_dict_add_list(dict, buf, (size_t)len, l); } } else { tv_dict_add_str(dict, S_LEN("pattern"), (const char *)cur->pattern); } tv_dict_add_str(dict, S_LEN("group"), (const char *)syn_id2name(cur->hlg_id)); tv_dict_add_nr(dict, S_LEN("priority"), (varnumber_T)cur->priority); tv_dict_add_nr(dict, S_LEN("id"), (varnumber_T)cur->id); if (cur->conceal_char) { char buf[MB_MAXBYTES + 1]; buf[(*mb_char2bytes)((int)cur->conceal_char, (char_u *)buf)] = NUL; tv_dict_add_str(dict, S_LEN("conceal"), buf); } tv_list_append_dict(rettv->vval.v_list, dict); cur = cur->next; } } /* * "getpid()" function */ static void f_getpid(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = os_get_pid(); } static void getpos_both(typval_T *argvars, typval_T *rettv, bool getcurpos) { pos_T *fp; int fnum = -1; if (getcurpos) { fp = &curwin->w_cursor; } else { fp = var2fpos(&argvars[0], true, &fnum); } list_T *l = tv_list_alloc_ret(rettv); tv_list_append_number(l, (fnum != -1) ? (varnumber_T)fnum : (varnumber_T)0); tv_list_append_number(l, ((fp != NULL) ? (varnumber_T)fp->lnum : (varnumber_T)0)); tv_list_append_number( l, ((fp != NULL) ? (varnumber_T)(fp->col == MAXCOL ? MAXCOL : fp->col + 1) : (varnumber_T)0)); tv_list_append_number( l, (fp != NULL) ? (varnumber_T)fp->coladd : (varnumber_T)0); if (getcurpos) { update_curswant(); tv_list_append_number(l, (curwin->w_curswant == MAXCOL ? (varnumber_T)MAXCOL : (varnumber_T)curwin->w_curswant + 1)); } } /* * "getcurpos(string)" function */ static void f_getcurpos(typval_T *argvars, typval_T *rettv, FunPtr fptr) { getpos_both(argvars, rettv, true); } /* * "getpos(string)" function */ static void f_getpos(typval_T *argvars, typval_T *rettv, FunPtr fptr) { getpos_both(argvars, rettv, false); } /// "getqflist()" functions static void f_getqflist(typval_T *argvars, typval_T *rettv, FunPtr fptr) { get_qf_loc_list(true, NULL, &argvars[0], rettv); } /// "getreg()" function static void f_getreg(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *strregname; int arg2 = false; bool return_list = false; bool error = false; if (argvars[0].v_type != VAR_UNKNOWN) { strregname = tv_get_string_chk(&argvars[0]); error = strregname == NULL; if (argvars[1].v_type != VAR_UNKNOWN) { arg2 = tv_get_number_chk(&argvars[1], &error); if (!error && argvars[2].v_type != VAR_UNKNOWN) { return_list = tv_get_number_chk(&argvars[2], &error); } } } else { strregname = (const char *)vimvars[VV_REG].vv_str; } if (error) { return; } int regname = (uint8_t)(strregname == NULL ? '"' : *strregname); if (regname == 0) { regname = '"'; } if (return_list) { rettv->v_type = VAR_LIST; rettv->vval.v_list = get_reg_contents(regname, (arg2 ? kGRegExprSrc : 0) | kGRegList); if (rettv->vval.v_list == NULL) { rettv->vval.v_list = tv_list_alloc(); } rettv->vval.v_list->lv_refcount++; } else { rettv->v_type = VAR_STRING; rettv->vval.v_string = get_reg_contents(regname, arg2 ? kGRegExprSrc : 0); } } /* * "getregtype()" function */ static void f_getregtype(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *strregname; if (argvars[0].v_type != VAR_UNKNOWN) { strregname = tv_get_string_chk(&argvars[0]); if (strregname == NULL) { // Type error; errmsg already given. rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; return; } } else { // Default to v:register. strregname = (const char *)vimvars[VV_REG].vv_str; } int regname = (uint8_t)(strregname == NULL ? '"' : *strregname); if (regname == 0) { regname = '"'; } colnr_T reglen = 0; char buf[NUMBUFLEN + 2]; MotionType reg_type = get_reg_type(regname, ®len); format_reg_type(reg_type, reglen, buf, ARRAY_SIZE(buf)); rettv->v_type = VAR_STRING; rettv->vval.v_string = (char_u *)xstrdup(buf); } /// Returns information (variables, options, etc.) about a tab page /// as a dictionary. static dict_T *get_tabpage_info(tabpage_T *tp, int tp_idx) { dict_T *const dict = tv_dict_alloc(); tv_dict_add_nr(dict, S_LEN("tabnr"), tp_idx); list_T *const l = tv_list_alloc(); FOR_ALL_WINDOWS_IN_TAB(wp, tp) { tv_list_append_number(l, (varnumber_T)wp->handle); } tv_dict_add_list(dict, S_LEN("windows"), l); // Make a reference to tabpage variables tv_dict_add_dict(dict, S_LEN("variables"), tp->tp_vars); return dict; } /// "gettabinfo()" function static void f_gettabinfo(typval_T *argvars, typval_T *rettv, FunPtr fptr) { tabpage_T *tparg = NULL; tv_list_alloc_ret(rettv); if (argvars[0].v_type != VAR_UNKNOWN) { // Information about one tab page tparg = find_tabpage((int)tv_get_number_chk(&argvars[0], NULL)); if (tparg == NULL) { return; } } // Get information about a specific tab page or all tab pages int tpnr = 0; FOR_ALL_TABS(tp) { tpnr++; if (tparg != NULL && tp != tparg) { continue; } dict_T *const d = get_tabpage_info(tp, tpnr); if (d != NULL) { tv_list_append_dict(rettv->vval.v_list, d); } if (tparg != NULL) { return; } } } /* * "gettabvar()" function */ static void f_gettabvar(typval_T *argvars, typval_T *rettv, FunPtr fptr) { win_T *oldcurwin; tabpage_T *tp, *oldtabpage; dictitem_T *v; bool done = false; rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; const char *const varname = tv_get_string_chk(&argvars[1]); tp = find_tabpage((int)tv_get_number_chk(&argvars[0], NULL)); if (tp != NULL && varname != NULL) { // Set tp to be our tabpage, temporarily. Also set the window to the // first window in the tabpage, otherwise the window is not valid. win_T *window = tp->tp_firstwin == NULL ? firstwin : tp->tp_firstwin; if (switch_win(&oldcurwin, &oldtabpage, window, tp, true) == OK) { // look up the variable // Let gettabvar({nr}, "") return the "t:" dictionary. v = find_var_in_ht(&tp->tp_vars->dv_hashtab, 't', varname, strlen(varname), false); if (v != NULL) { tv_copy(&v->di_tv, rettv); done = true; } } /* restore previous notion of curwin */ restore_win(oldcurwin, oldtabpage, TRUE); } if (!done && argvars[2].v_type != VAR_UNKNOWN) { tv_copy(&argvars[2], rettv); } } /* * "gettabwinvar()" function */ static void f_gettabwinvar(typval_T *argvars, typval_T *rettv, FunPtr fptr) { getwinvar(argvars, rettv, 1); } /// Returns information about a window as a dictionary. static dict_T *get_win_info(win_T *wp, int16_t tpnr, int16_t winnr) { dict_T *const dict = tv_dict_alloc(); tv_dict_add_nr(dict, S_LEN("tabnr"), tpnr); tv_dict_add_nr(dict, S_LEN("winnr"), winnr); tv_dict_add_nr(dict, S_LEN("winid"), wp->handle); tv_dict_add_nr(dict, S_LEN("height"), wp->w_height); tv_dict_add_nr(dict, S_LEN("width"), wp->w_width); tv_dict_add_nr(dict, S_LEN("bufnr"), wp->w_buffer->b_fnum); tv_dict_add_nr(dict, S_LEN("quickfix"), bt_quickfix(wp->w_buffer)); tv_dict_add_nr(dict, S_LEN("loclist"), (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL)); // Add a reference to window variables tv_dict_add_dict(dict, S_LEN("variables"), wp->w_vars); return dict; } /// "getwininfo()" function static void f_getwininfo(typval_T *argvars, typval_T *rettv, FunPtr fptr) { win_T *wparg = NULL; tv_list_alloc_ret(rettv); if (argvars[0].v_type != VAR_UNKNOWN) { wparg = win_id2wp(argvars); if (wparg == NULL) { return; } } // Collect information about either all the windows across all the tab // pages or one particular window. int16_t tabnr = 0; FOR_ALL_TABS(tp) { tabnr++; int16_t winnr = 0; FOR_ALL_WINDOWS_IN_TAB(wp, tp) { if (wparg != NULL && wp != wparg) { continue; } winnr++; dict_T *const d = get_win_info(wp, tabnr, winnr); if (d != NULL) { tv_list_append_dict(rettv->vval.v_list, d); } if (wparg != NULL) { // found information about a specific window return; } } } } /* * "getwinposx()" function */ static void f_getwinposx(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = -1; } /* * "getwinposy()" function */ static void f_getwinposy(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = -1; } /* * Find window specified by "vp" in tabpage "tp". */ static win_T * find_win_by_nr ( typval_T *vp, tabpage_T *tp /* NULL for current tab page */ ) { int nr = (int)tv_get_number_chk(vp, NULL); if (nr < 0) { return NULL; } if (nr == 0) { return curwin; } // This method accepts NULL as an alias for curtab. if (tp == NULL) { tp = curtab; } FOR_ALL_WINDOWS_IN_TAB(wp, tp) { if (nr >= LOWEST_WIN_ID) { if (wp->handle == nr) { return wp; } } else if (--nr <= 0) { return wp; } } return NULL; } /// Find window specified by "wvp" in tabpage "tvp". static win_T *find_tabwin(typval_T *wvp, typval_T *tvp) { win_T *wp = NULL; tabpage_T *tp = NULL; if (wvp->v_type != VAR_UNKNOWN) { if (tvp->v_type != VAR_UNKNOWN) { long n = tv_get_number(tvp); if (n >= 0) { tp = find_tabpage(n); } } else { tp = curtab; } if (tp != NULL) { wp = find_win_by_nr(wvp, tp); } } else { wp = curwin; } return wp; } /// "getwinvar()" function static void f_getwinvar(typval_T *argvars, typval_T *rettv, FunPtr fptr) { getwinvar(argvars, rettv, 0); } /* * getwinvar() and gettabwinvar() */ static void getwinvar ( typval_T *argvars, typval_T *rettv, int off /* 1 for gettabwinvar() */ ) { win_T *win, *oldcurwin; dictitem_T *v; tabpage_T *tp = NULL; tabpage_T *oldtabpage = NULL; bool done = false; if (off == 1) { tp = find_tabpage((int)tv_get_number_chk(&argvars[0], NULL)); } else { tp = curtab; } win = find_win_by_nr(&argvars[off], tp); const char *varname = tv_get_string_chk(&argvars[off + 1]); rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; emsg_off++; if (win != NULL && varname != NULL) { // Set curwin to be our win, temporarily. Also set the tabpage, // otherwise the window is not valid. Only do this when needed, // autocommands get blocked. bool need_switch_win = tp != curtab || win != curwin; if (!need_switch_win || switch_win(&oldcurwin, &oldtabpage, win, tp, true) == OK) { if (*varname == '&') { if (varname[1] == NUL) { // get all window-local options in a dict dict_T *opts = get_winbuf_options(false); if (opts != NULL) { rettv->v_type = VAR_DICT; rettv->vval.v_dict = opts; opts->dv_refcount++; done = true; } } else if (get_option_tv(&varname, rettv, 1) == OK) { // window-local-option done = true; } } else { // Look up the variable. // Let getwinvar({nr}, "") return the "w:" dictionary. v = find_var_in_ht(&win->w_vars->dv_hashtab, 'w', varname, strlen(varname), false); if (v != NULL) { tv_copy(&v->di_tv, rettv); done = true; } } } if (need_switch_win) { // restore previous notion of curwin restore_win(oldcurwin, oldtabpage, true); } } emsg_off--; if (!done && argvars[off + 2].v_type != VAR_UNKNOWN) { // use the default return value tv_copy(&argvars[off + 2], rettv); } } /* * "glob()" function */ static void f_glob(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int options = WILD_SILENT|WILD_USE_NL; expand_T xpc; bool error = false; /* When the optional second argument is non-zero, don't remove matches * for 'wildignore' and don't put matches for 'suffixes' at the end. */ rettv->v_type = VAR_STRING; if (argvars[1].v_type != VAR_UNKNOWN) { if (tv_get_number_chk(&argvars[1], &error)) { options |= WILD_KEEP_ALL; } if (argvars[2].v_type != VAR_UNKNOWN) { if (tv_get_number_chk(&argvars[2], &error)) { rettv->v_type = VAR_LIST; rettv->vval.v_list = NULL; } if (argvars[3].v_type != VAR_UNKNOWN && tv_get_number_chk(&argvars[3], &error)) { options |= WILD_ALLLINKS; } } } if (!error) { ExpandInit(&xpc); xpc.xp_context = EXPAND_FILES; if (p_wic) options += WILD_ICASE; if (rettv->v_type == VAR_STRING) { rettv->vval.v_string = ExpandOne( &xpc, (char_u *)tv_get_string(&argvars[0]), NULL, options, WILD_ALL); } else { tv_list_alloc_ret(rettv); ExpandOne(&xpc, (char_u *)tv_get_string(&argvars[0]), NULL, options, WILD_ALL_KEEP); for (int i = 0; i < xpc.xp_numfiles; i++) { tv_list_append_string(rettv->vval.v_list, (const char *)xpc.xp_files[i], -1); } ExpandCleanup(&xpc); } } else rettv->vval.v_string = NULL; } /// "globpath()" function static void f_globpath(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int flags = 0; // Flags for globpath. bool error = false; // Return a string, or a list if the optional third argument is non-zero. rettv->v_type = VAR_STRING; if (argvars[2].v_type != VAR_UNKNOWN) { // When the optional second argument is non-zero, don't remove matches // for 'wildignore' and don't put matches for 'suffixes' at the end. if (tv_get_number_chk(&argvars[2], &error)) { flags |= WILD_KEEP_ALL; } if (argvars[3].v_type != VAR_UNKNOWN) { if (tv_get_number_chk(&argvars[3], &error)) { rettv->v_type = VAR_LIST; rettv->vval.v_list = NULL; } if (argvars[4].v_type != VAR_UNKNOWN && tv_get_number_chk(&argvars[4], &error)) { flags |= WILD_ALLLINKS; } } } char buf1[NUMBUFLEN]; const char *const file = tv_get_string_buf_chk(&argvars[1], buf1); if (file != NULL && !error) { garray_T ga; ga_init(&ga, (int)sizeof(char_u *), 10); globpath((char_u *)tv_get_string(&argvars[0]), (char_u *)file, &ga, flags); if (rettv->v_type == VAR_STRING) { rettv->vval.v_string = ga_concat_strings_sep(&ga, "\n"); } else { tv_list_alloc_ret(rettv); for (int i = 0; i < ga.ga_len; i++) { tv_list_append_string(rettv->vval.v_list, ((const char **)(ga.ga_data))[i], -1); } } ga_clear_strings(&ga); } else { rettv->vval.v_string = NULL; } } // "glob2regpat()" function static void f_glob2regpat(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *const pat = tv_get_string_chk(&argvars[0]); // NULL on type error rettv->v_type = VAR_STRING; rettv->vval.v_string = ((pat == NULL) ? NULL : file_pat_to_reg_pat((char_u *)pat, NULL, NULL, false)); } /// "has()" function static void f_has(typval_T *argvars, typval_T *rettv, FunPtr fptr) { static const char *const has_list[] = { #ifdef UNIX "unix", #endif #if defined(WIN32) "win32", #endif #if defined(WIN64) || defined(_WIN64) "win64", #endif "fname_case", #ifdef HAVE_ACL "acl", #endif "arabic", "autocmd", "browsefilter", "byte_offset", "cindent", "cmdline_compl", "cmdline_hist", "comments", "conceal", "cscope", "cursorbind", "cursorshape", #ifdef DEBUG "debug", #endif "dialog_con", "diff", "digraphs", "eval", /* always present, of course! */ "ex_extra", "extra_search", "farsi", "file_in_path", "filterpipe", "find_in_path", "float", "folding", #if defined(UNIX) "fork", #endif "gettext", #if defined(HAVE_ICONV_H) && defined(USE_ICONV) "iconv", #endif "insert_expand", "jumplist", "keymap", "lambda", "langmap", "libcall", "linebreak", "lispindent", "listcmds", "localmap", #ifdef __APPLE__ "mac", "macunix", #endif "menu", "mksession", "modify_fname", "mouse", "multi_byte", "multi_lang", "num64", "packages", "path_extra", "persistent_undo", "postscript", "printer", "profile", "reltime", "quickfix", "rightleft", "scrollbind", "showcmd", "cmdline_info", "shada", "signs", "smartindent", "startuptime", "statusline", "spell", "syntax", #if !defined(UNIX) "system", // TODO(SplinterOfChaos): This IS defined for UNIX! #endif "tablineat", "tag_binary", "tag_old_static", "termguicolors", "termresponse", "textobjects", "timers", "title", "user-commands", /* was accidentally included in 5.4 */ "user_commands", "vertsplit", "virtualedit", "visual", "visualextra", "vreplace", "wildignore", "wildmenu", "windows", "winaltkeys", "writebackup", "nvim", }; bool n = false; const char *const name = tv_get_string(&argvars[0]); for (size_t i = 0; i < ARRAY_SIZE(has_list); i++) { if (STRICMP(name, has_list[i]) == 0) { n = true; break; } } if (!n) { if (STRNICMP(name, "patch", 5) == 0) { if (name[5] == '-' && strlen(name) >= 11 && ascii_isdigit(name[6]) && ascii_isdigit(name[8]) && ascii_isdigit(name[10])) { int major = atoi(name + 6); int minor = atoi(name + 8); // Expect "patch-9.9.01234". n = (major < VIM_VERSION_MAJOR || (major == VIM_VERSION_MAJOR && (minor < VIM_VERSION_MINOR || (minor == VIM_VERSION_MINOR && has_vim_patch(atoi(name + 10)))))); } else { n = has_vim_patch(atoi(name + 5)); } } else if (STRNICMP(name, "nvim-", 5) == 0) { // Expect "nvim-x.y.z" n = has_nvim_version(name + 5); } else if (STRICMP(name, "vim_starting") == 0) { n = (starting != 0); } else if (STRICMP(name, "ttyin") == 0) { n = stdin_isatty; } else if (STRICMP(name, "ttyout") == 0) { n = stdout_isatty; } else if (STRICMP(name, "multi_byte_encoding") == 0) { n = has_mbyte != 0; #if defined(USE_ICONV) && defined(DYNAMIC_ICONV) } else if (STRICMP(name, "iconv") == 0) { n = iconv_enabled(false); #endif } else if (STRICMP(name, "syntax_items") == 0) { n = syntax_present(curwin); #ifdef UNIX } else if (STRICMP(name, "unnamedplus") == 0) { n = eval_has_provider("clipboard"); #endif } } if (!n && eval_has_provider(name)) { n = true; } rettv->vval.v_number = n; } /* * "has_key()" function */ static void f_has_key(typval_T *argvars, typval_T *rettv, FunPtr fptr) { if (argvars[0].v_type != VAR_DICT) { EMSG(_(e_dictreq)); return; } if (argvars[0].vval.v_dict == NULL) return; rettv->vval.v_number = tv_dict_find(argvars[0].vval.v_dict, tv_get_string(&argvars[1]), -1) != NULL; } /// `haslocaldir([{win}[, {tab}]])` function /// /// Returns `1` if the scope object has a local directory, `0` otherwise. If a /// scope object is not specified the current one is implied. This function /// share a lot of code with `f_getcwd`. /// /// @pre The arguments must be of type number. /// @pre There may not be more than two arguments. /// @pre An argument may not be -1 if preceding arguments are not all -1. /// /// @post The return value will be either the number `1` or `0`. static void f_haslocaldir(typval_T *argvars, typval_T *rettv, FunPtr fptr) { // Possible scope of working directory to return. CdScope scope = kCdScopeInvalid; // Numbers of the scope objects (window, tab) we want the working directory // of. A `-1` means to skip this scope, a `0` means the current object. int scope_number[] = { [kCdScopeWindow] = 0, // Number of window to look at. [kCdScopeTab ] = 0, // Number of tab to look at. }; tabpage_T *tp = curtab; // The tabpage to look at. win_T *win = curwin; // The window to look at. rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; // Pre-conditions and scope extraction together for (int i = MIN_CD_SCOPE; i < MAX_CD_SCOPE; i++) { if (argvars[i].v_type == VAR_UNKNOWN) { break; } if (argvars[i].v_type != VAR_NUMBER) { EMSG(_(e_invarg)); return; } scope_number[i] = argvars[i].vval.v_number; if (scope_number[i] < -1) { EMSG(_(e_invarg)); return; } // Use the narrowest scope the user requested if (scope_number[i] >= 0 && scope == kCdScopeInvalid) { // The scope is the current iteration step. scope = i; } else if (scope_number[i] < 0) { scope = i + 1; } } // If the user didn't specify anything, default to window scope if (scope == kCdScopeInvalid) { scope = MIN_CD_SCOPE; } // Find the tabpage by number if (scope_number[kCdScopeTab] > 0) { tp = find_tabpage(scope_number[kCdScopeTab]); if (!tp) { EMSG(_("E5000: Cannot find tab number.")); return; } } // Find the window in `tp` by number, `NULL` if none. if (scope_number[kCdScopeWindow] >= 0) { if (scope_number[kCdScopeTab] < 0) { EMSG(_("E5001: Higher scope cannot be -1 if lower scope is >= 0.")); return; } if (scope_number[kCdScopeWindow] > 0) { win = find_win_by_nr(&argvars[0], tp); if (!win) { EMSG(_("E5002: Cannot find window number.")); return; } } } switch (scope) { case kCdScopeWindow: assert(win); rettv->vval.v_number = win->w_localdir ? 1 : 0; break; case kCdScopeTab: assert(tp); rettv->vval.v_number = tp->tp_localdir ? 1 : 0; break; case kCdScopeGlobal: // The global scope never has a local directory rettv->vval.v_number = 0; break; case kCdScopeInvalid: // We should never get here assert(false); } } /* * "hasmapto()" function */ static void f_hasmapto(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const char *mode; const char *const name = tv_get_string(&argvars[0]); bool abbr = false; char buf[NUMBUFLEN]; if (argvars[1].v_type == VAR_UNKNOWN) { mode = "nvo"; } else { mode = tv_get_string_buf(&argvars[1], buf); if (argvars[2].v_type != VAR_UNKNOWN) { abbr = tv_get_number(&argvars[2]); } } if (map_to_exists(name, mode, abbr)) { rettv->vval.v_number = true; } else { rettv->vval.v_number = false; } } /* * "histadd()" function */ static void f_histadd(typval_T *argvars, typval_T *rettv, FunPtr fptr) { HistoryType histype; rettv->vval.v_number = false; if (check_restricted() || check_secure()) { return; } const char *str = tv_get_string_chk(&argvars[0]); // NULL on type error histype = str != NULL ? get_histtype(str, strlen(str), false) : HIST_INVALID; if (histype != HIST_INVALID) { char buf[NUMBUFLEN]; str = tv_get_string_buf(&argvars[1], buf); if (*str != NUL) { init_history(); add_to_history(histype, (char_u *)str, false, NUL); rettv->vval.v_number = true; return; } } } /* * "histdel()" function */ static void f_histdel(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int n; const char *const str = tv_get_string_chk(&argvars[0]); // NULL on type error if (str == NULL) { n = 0; } else if (argvars[1].v_type == VAR_UNKNOWN) { // only one argument: clear entire history n = clr_history(get_histtype(str, strlen(str), false)); } else if (argvars[1].v_type == VAR_NUMBER) { // index given: remove that entry n = del_history_idx(get_histtype(str, strlen(str), false), (int)tv_get_number(&argvars[1])); } else { // string given: remove all matching entries char buf[NUMBUFLEN]; n = del_history_entry(get_histtype(str, strlen(str), false), (char_u *)tv_get_string_buf(&argvars[1], buf)); } rettv->vval.v_number = n; } /* * "histget()" function */ static void f_histget(typval_T *argvars, typval_T *rettv, FunPtr fptr) { HistoryType type; int idx; const char *const str = tv_get_string_chk(&argvars[0]); // NULL on type error if (str == NULL) { rettv->vval.v_string = NULL; } else { type = get_histtype(str, strlen(str), false); if (argvars[1].v_type == VAR_UNKNOWN) { idx = get_history_idx(type); } else { idx = (int)tv_get_number_chk(&argvars[1], NULL); } // -1 on type error rettv->vval.v_string = vim_strsave(get_history_entry(type, idx)); } rettv->v_type = VAR_STRING; } /* * "histnr()" function */ static void f_histnr(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int i; const char *const history = tv_get_string_chk(&argvars[0]); i = history == NULL ? HIST_CMD - 1 : get_histtype(history, strlen(history), false); if (i != HIST_INVALID) { i = get_history_idx(i); } else { i = -1; } rettv->vval.v_number = i; } /* * "highlightID(name)" function */ static void f_hlID(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = syn_name2id( (const char_u *)tv_get_string(&argvars[0])); } /* * "highlight_exists()" function */ static void f_hlexists(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = highlight_exists( (const char_u *)tv_get_string(&argvars[0])); } /* * "hostname()" function */ static void f_hostname(typval_T *argvars, typval_T *rettv, FunPtr fptr) { char hostname[256]; os_get_hostname(hostname, 256); rettv->v_type = VAR_STRING; rettv->vval.v_string = vim_strsave((char_u *)hostname); } /* * iconv() function */ static void f_iconv(typval_T *argvars, typval_T *rettv, FunPtr fptr) { vimconv_T vimconv; rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; const char *const str = tv_get_string(&argvars[0]); char buf1[NUMBUFLEN]; char_u *const from = enc_canonize(enc_skip( (char_u *)tv_get_string_buf(&argvars[1], buf1))); char buf2[NUMBUFLEN]; char_u *const to = enc_canonize(enc_skip( (char_u *)tv_get_string_buf(&argvars[2], buf2))); vimconv.vc_type = CONV_NONE; convert_setup(&vimconv, from, to); // If the encodings are equal, no conversion needed. if (vimconv.vc_type == CONV_NONE) { rettv->vval.v_string = (char_u *)xstrdup(str); } else { rettv->vval.v_string = string_convert(&vimconv, (char_u *)str, NULL); } convert_setup(&vimconv, NULL, NULL); xfree(from); xfree(to); } /* * "indent()" function */ static void f_indent(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const linenr_T lnum = tv_get_lnum(argvars); if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count) { rettv->vval.v_number = get_indent_lnum(lnum); } else { rettv->vval.v_number = -1; } } /* * "index()" function */ static void f_index(typval_T *argvars, typval_T *rettv, FunPtr fptr) { list_T *l; listitem_T *item; long idx = 0; int ic = FALSE; rettv->vval.v_number = -1; if (argvars[0].v_type != VAR_LIST) { EMSG(_(e_listreq)); return; } l = argvars[0].vval.v_list; if (l != NULL) { item = l->lv_first; if (argvars[2].v_type != VAR_UNKNOWN) { bool error = false; // Start at specified item. Use the cached index that tv_list_find() // sets, so that a negative number also works. item = tv_list_find(l, tv_get_number_chk(&argvars[2], &error)); idx = l->lv_idx; if (argvars[3].v_type != VAR_UNKNOWN) { ic = tv_get_number_chk(&argvars[3], &error); } if (error) { item = NULL; } } for (; item != NULL; item = item->li_next, ++idx) if (tv_equal(&item->li_tv, &argvars[1], ic, FALSE)) { rettv->vval.v_number = idx; break; } } } static int inputsecret_flag = 0; /* * This function is used by f_input() and f_inputdialog() functions. The third * argument to f_input() specifies the type of completion to use at the * prompt. The third argument to f_inputdialog() specifies the value to return * when the user cancels the prompt. */ void get_user_input(const typval_T *const argvars, typval_T *const rettv, const bool inputdialog) FUNC_ATTR_NONNULL_ALL { rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; const char *prompt = ""; const char *defstr = ""; const char *cancelreturn = NULL; const char *xp_name = NULL; Callback input_callback = { .type = kCallbackNone }; char prompt_buf[NUMBUFLEN]; char defstr_buf[NUMBUFLEN]; char cancelreturn_buf[NUMBUFLEN]; char xp_name_buf[NUMBUFLEN]; if (argvars[0].v_type == VAR_DICT) { if (argvars[1].v_type != VAR_UNKNOWN) { emsgf(_("E5050: {opts} must be the only argument")); return; } dict_T *const dict = argvars[0].vval.v_dict; prompt = tv_dict_get_string_buf_chk(dict, S_LEN("prompt"), prompt_buf, ""); if (prompt == NULL) { return; } defstr = tv_dict_get_string_buf_chk(dict, S_LEN("default"), defstr_buf, ""); if (defstr == NULL) { return; } char def[1] = { 0 }; cancelreturn = tv_dict_get_string_buf_chk(dict, S_LEN("cancelreturn"), cancelreturn_buf, def); if (cancelreturn == NULL) { // error return; } if (*cancelreturn == NUL) { cancelreturn = NULL; } xp_name = tv_dict_get_string_buf_chk(dict, S_LEN("completion"), xp_name_buf, def); if (xp_name == NULL) { // error return; } if (xp_name == def) { // default to NULL xp_name = NULL; } if (!tv_dict_get_callback(dict, S_LEN("highlight"), &input_callback)) { return; } } else { prompt = tv_get_string_buf_chk(&argvars[0], prompt_buf); if (prompt == NULL) { return; } if (argvars[1].v_type != VAR_UNKNOWN) { defstr = tv_get_string_buf_chk(&argvars[1], defstr_buf); if (defstr == NULL) { return; } if (argvars[2].v_type != VAR_UNKNOWN) { const char *const arg2 = tv_get_string_buf_chk(&argvars[2], cancelreturn_buf); if (arg2 == NULL) { return; } if (inputdialog) { cancelreturn = arg2; } else { xp_name = arg2; } } } } int xp_type = EXPAND_NOTHING; char *xp_arg = NULL; if (xp_name != NULL) { // input() with a third argument: completion const int xp_namelen = (int)strlen(xp_name); uint32_t argt; if (parse_compl_arg((char_u *)xp_name, xp_namelen, &xp_type, &argt, (char_u **)&xp_arg) == FAIL) { return; } } int cmd_silent_save = cmd_silent; cmd_silent = false; // Want to see the prompt. // Only the part of the message after the last NL is considered as // prompt for the command line, unlsess cmdline is externalized const char *p = prompt; if (!ui_is_external(kUICmdline)) { const char *lastnl = strrchr(prompt, '\n'); if (lastnl != NULL) { p = lastnl+1; msg_start(); msg_clr_eos(); msg_puts_attr_len(prompt, p - prompt, echo_attr); msg_didout = false; msg_starthere(); } } cmdline_row = msg_row; stuffReadbuffSpec(defstr); const int save_ex_normal_busy = ex_normal_busy; ex_normal_busy = 0; rettv->vval.v_string = (char_u *)getcmdline_prompt(inputsecret_flag ? NUL : '@', p, echo_attr, xp_type, xp_arg, input_callback); ex_normal_busy = save_ex_normal_busy; callback_free(&input_callback); if (rettv->vval.v_string == NULL && cancelreturn != NULL) { rettv->vval.v_string = (char_u *)xstrdup(cancelreturn); } xfree(xp_arg); // Since the user typed this, no need to wait for return. need_wait_return = false; msg_didout = false; cmd_silent = cmd_silent_save; } /* * "input()" function * Also handles inputsecret() when inputsecret is set. */ static void f_input(typval_T *argvars, typval_T *rettv, FunPtr fptr) { get_user_input(argvars, rettv, FALSE); } /* * "inputdialog()" function */ static void f_inputdialog(typval_T *argvars, typval_T *rettv, FunPtr fptr) { get_user_input(argvars, rettv, TRUE); } /* * "inputlist()" function */ static void f_inputlist(typval_T *argvars, typval_T *rettv, FunPtr fptr) { listitem_T *li; int selected; int mouse_used; if (argvars[0].v_type != VAR_LIST || argvars[0].vval.v_list == NULL) { EMSG2(_(e_listarg), "inputlist()"); return; } msg_start(); msg_row = Rows - 1; /* for when 'cmdheight' > 1 */ lines_left = Rows; /* avoid more prompt */ msg_scroll = TRUE; msg_clr_eos(); for (li = argvars[0].vval.v_list->lv_first; li != NULL; li = li->li_next) { msg_puts(tv_get_string(&li->li_tv)); msg_putchar('\n'); } /* Ask for choice. */ selected = prompt_for_number(&mouse_used); if (mouse_used) selected -= lines_left; rettv->vval.v_number = selected; } static garray_T ga_userinput = {0, 0, sizeof(tasave_T), 4, NULL}; /* * "inputrestore()" function */ static void f_inputrestore(typval_T *argvars, typval_T *rettv, FunPtr fptr) { if (!GA_EMPTY(&ga_userinput)) { --ga_userinput.ga_len; restore_typeahead((tasave_T *)(ga_userinput.ga_data) + ga_userinput.ga_len); /* default return is zero == OK */ } else if (p_verbose > 1) { verb_msg((char_u *)_("called inputrestore() more often than inputsave()")); rettv->vval.v_number = 1; /* Failed */ } } /* * "inputsave()" function */ static void f_inputsave(typval_T *argvars, typval_T *rettv, FunPtr fptr) { // Add an entry to the stack of typeahead storage. tasave_T *p = GA_APPEND_VIA_PTR(tasave_T, &ga_userinput); save_typeahead(p); } /* * "inputsecret()" function */ static void f_inputsecret(typval_T *argvars, typval_T *rettv, FunPtr fptr) { cmdline_star++; inputsecret_flag++; f_input(argvars, rettv, NULL); cmdline_star--; inputsecret_flag--; } /* * "insert()" function */ static void f_insert(typval_T *argvars, typval_T *rettv, FunPtr fptr) { list_T *l; bool error = false; if (argvars[0].v_type != VAR_LIST) { EMSG2(_(e_listarg), "insert()"); } else if ((l = argvars[0].vval.v_list) != NULL && !tv_check_lock(l->lv_lock, N_("insert() argument"), TV_TRANSLATE)) { long before = 0; if (argvars[2].v_type != VAR_UNKNOWN) { before = tv_get_number_chk(&argvars[2], &error); } if (error) { // type error; errmsg already given return; } listitem_T *item = NULL; if (before != l->lv_len) { item = tv_list_find(l, before); if (item == NULL) { EMSGN(_(e_listidx), before); l = NULL; } } if (l != NULL) { tv_list_insert_tv(l, &argvars[1], item); tv_copy(&argvars[0], rettv); } } } /* * "invert(expr)" function */ static void f_invert(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = ~tv_get_number_chk(&argvars[0], NULL); } /* * "isdirectory()" function */ static void f_isdirectory(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = os_isdir((const char_u *)tv_get_string(&argvars[0])); } /* * "islocked()" function */ static void f_islocked(typval_T *argvars, typval_T *rettv, FunPtr fptr) { lval_T lv; dictitem_T *di; rettv->vval.v_number = -1; const char_u *const end = get_lval((char_u *)tv_get_string(&argvars[0]), NULL, &lv, false, false, GLV_NO_AUTOLOAD|GLV_READ_ONLY, FNE_CHECK_START); if (end != NULL && lv.ll_name != NULL) { if (*end != NUL) { EMSG(_(e_trailing)); } else { if (lv.ll_tv == NULL) { di = find_var((const char *)lv.ll_name, lv.ll_name_len, NULL, true); if (di != NULL) { // Consider a variable locked when: // 1. the variable itself is locked // 2. the value of the variable is locked. // 3. the List or Dict value is locked. rettv->vval.v_number = ((di->di_flags & DI_FLAGS_LOCK) || tv_islocked(&di->di_tv)); } } else if (lv.ll_range) { EMSG(_("E786: Range not allowed")); } else if (lv.ll_newkey != NULL) { EMSG2(_(e_dictkey), lv.ll_newkey); } else if (lv.ll_list != NULL) { // List item. rettv->vval.v_number = tv_islocked(&lv.ll_li->li_tv); } else { // Dictionary item. rettv->vval.v_number = tv_islocked(&lv.ll_di->di_tv); } } } clear_lval(&lv); } /// Turn a dictionary into a list /// /// @param[in] tv Dictionary to convert. Is checked for actually being /// a dictionary, will give an error if not. /// @param[out] rettv Location where result will be saved. /// @param[in] what What to save in rettv. static void dict_list(typval_T *const tv, typval_T *const rettv, const DictListType what) { if (tv->v_type != VAR_DICT) { emsgf(_(e_dictreq)); return; } if (tv->vval.v_dict == NULL) { return; } tv_list_alloc_ret(rettv); TV_DICT_ITER(tv->vval.v_dict, di, { listitem_T *const li = tv_list_item_alloc(); tv_list_append(rettv->vval.v_list, li); switch (what) { case kDictListKeys: { li->li_tv.v_type = VAR_STRING; li->li_tv.v_lock = VAR_UNLOCKED; li->li_tv.vval.v_string = vim_strsave(di->di_key); break; } case kDictListValues: { tv_copy(&di->di_tv, &li->li_tv); break; } case kDictListItems: { // items() list_T *const sub_l = tv_list_alloc(); li->li_tv.v_type = VAR_LIST; li->li_tv.v_lock = VAR_UNLOCKED; li->li_tv.vval.v_list = sub_l; sub_l->lv_refcount++; listitem_T *sub_li = tv_list_item_alloc(); tv_list_append(sub_l, sub_li); sub_li->li_tv.v_type = VAR_STRING; sub_li->li_tv.v_lock = VAR_UNLOCKED; sub_li->li_tv.vval.v_string = vim_strsave(di->di_key); sub_li = tv_list_item_alloc(); tv_list_append(sub_l, sub_li); tv_copy(&di->di_tv, &sub_li->li_tv); break; } } }); } /// "id()" function static void f_id(typval_T *argvars, typval_T *rettv, FunPtr fptr) FUNC_ATTR_NONNULL_ALL { const int len = vim_vsnprintf(NULL, 0, "%p", dummy_ap, argvars); rettv->v_type = VAR_STRING; rettv->vval.v_string = xmalloc(len + 1); vim_vsnprintf((char *)rettv->vval.v_string, len + 1, "%p", dummy_ap, argvars); } /* * "items(dict)" function */ static void f_items(typval_T *argvars, typval_T *rettv, FunPtr fptr) { dict_list(argvars, rettv, 2); } // "jobclose(id[, stream])" function static void f_jobclose(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; if (check_restricted() || check_secure()) { return; } if (argvars[0].v_type != VAR_NUMBER || (argvars[1].v_type != VAR_STRING && argvars[1].v_type != VAR_UNKNOWN)) { EMSG(_(e_invarg)); return; } TerminalJobData *data = find_job(argvars[0].vval.v_number); if (!data) { EMSG(_(e_invjob)); return; } Process *proc = (Process *)&data->proc; if (argvars[1].v_type == VAR_STRING) { char *stream = (char *)argvars[1].vval.v_string; if (!strcmp(stream, "stdin")) { if (data->rpc) { EMSG(_("Invalid stream on rpc job, use jobclose(id, 'rpc')")); } else { process_close_in(proc); } } else if (!strcmp(stream, "stdout")) { if (data->rpc) { EMSG(_("Invalid stream on rpc job, use jobclose(id, 'rpc')")); } else { process_close_out(proc); } } else if (!strcmp(stream, "stderr")) { process_close_err(proc); } else if (!strcmp(stream, "rpc")) { if (data->rpc) { channel_close(data->id); } else { EMSG(_("Invalid job stream: Not an rpc job")); } } else { EMSG2(_("Invalid job stream \"%s\""), stream); } } else { if (data->rpc) { channel_close(data->id); process_close_err(proc); } else { process_close_streams(proc); if (proc->type == kProcessTypePty) { pty_process_close_master(&data->proc.pty); } } } } // "jobpid(id)" function static void f_jobpid(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; if (check_restricted() || check_secure()) { return; } if (argvars[0].v_type != VAR_NUMBER) { EMSG(_(e_invarg)); return; } TerminalJobData *data = find_job(argvars[0].vval.v_number); if (!data) { EMSG(_(e_invjob)); return; } Process *proc = (Process *)&data->proc; rettv->vval.v_number = proc->pid; } // "jobsend()" function static void f_jobsend(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; if (check_restricted() || check_secure()) { return; } if (argvars[0].v_type != VAR_NUMBER || argvars[1].v_type == VAR_UNKNOWN) { // First argument is the job id and second is the string or list to write // to the job's stdin EMSG(_(e_invarg)); return; } TerminalJobData *data = find_job(argvars[0].vval.v_number); if (!data) { EMSG(_(e_invjob)); return; } if (((Process *)&data->proc)->in->closed) { EMSG(_("Can't send data to the job: stdin is closed")); return; } if (data->rpc) { EMSG(_("Can't send raw data to rpc channel")); return; } ptrdiff_t input_len = 0; char *input = save_tv_as_string(&argvars[1], &input_len, false); if (!input) { // Either the error has been handled by save_tv_as_string(), or there is no // input to send. return; } WBuffer *buf = wstream_new_buffer(input, input_len, 1, xfree); rettv->vval.v_number = wstream_write(data->proc.uv.process.in, buf); } // "jobresize(job, width, height)" function static void f_jobresize(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; if (check_restricted() || check_secure()) { return; } if (argvars[0].v_type != VAR_NUMBER || argvars[1].v_type != VAR_NUMBER || argvars[2].v_type != VAR_NUMBER) { // job id, width, height EMSG(_(e_invarg)); return; } TerminalJobData *data = find_job(argvars[0].vval.v_number); if (!data) { EMSG(_(e_invjob)); return; } if (data->proc.uv.process.type != kProcessTypePty) { EMSG(_(e_jobnotpty)); return; } pty_process_resize(&data->proc.pty, argvars[1].vval.v_number, argvars[2].vval.v_number); rettv->vval.v_number = 1; } static char **tv_to_argv(typval_T *cmd_tv, const char **cmd, bool *executable) { if (cmd_tv->v_type == VAR_STRING) { const char *cmd_str = tv_get_string(cmd_tv); if (cmd) { *cmd = cmd_str; } return shell_build_argv(cmd_str, NULL); } if (cmd_tv->v_type != VAR_LIST) { EMSG2(_(e_invarg2), "expected String or List"); return NULL; } list_T *argl = cmd_tv->vval.v_list; int argc = argl->lv_len; if (!argc) { EMSG(_(e_invarg)); // List must have at least one item. return NULL; } assert(argl->lv_first); const char *exe = tv_get_string_chk(&argl->lv_first->li_tv); if (!exe || !os_can_exe((const char_u *)exe, NULL, true)) { if (exe && executable) { *executable = false; } return NULL; } if (cmd) { *cmd = exe; } // Build the argument vector int i = 0; char **argv = xcalloc(argc + 1, sizeof(char *)); for (listitem_T *arg = argl->lv_first; arg != NULL; arg = arg->li_next) { const char *a = tv_get_string_chk(&arg->li_tv); if (!a) { // Did emsg in tv_get_string_chk; just deallocate argv. shell_free_argv(argv); return NULL; } argv[i++] = xstrdup(a); } return argv; } // "jobstart()" function static void f_jobstart(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; if (check_restricted() || check_secure()) { return; } bool executable = true; char **argv = tv_to_argv(&argvars[0], NULL, &executable); if (!argv) { rettv->vval.v_number = executable ? 0 : -1; return; // Did error message in tv_to_argv. } if (argvars[1].v_type != VAR_DICT && argvars[1].v_type != VAR_UNKNOWN) { // Wrong argument types EMSG2(_(e_invarg2), "expected dictionary"); shell_free_argv(argv); return; } dict_T *job_opts = NULL; bool detach = false; bool rpc = false; bool pty = false; Callback on_stdout = CALLBACK_NONE; Callback on_stderr = CALLBACK_NONE; Callback on_exit = CALLBACK_NONE; char *cwd = NULL; if (argvars[1].v_type == VAR_DICT) { job_opts = argvars[1].vval.v_dict; detach = tv_dict_get_number(job_opts, "detach") != 0; rpc = tv_dict_get_number(job_opts, "rpc") != 0; pty = tv_dict_get_number(job_opts, "pty") != 0; if (pty && rpc) { EMSG2(_(e_invarg2), "job cannot have both 'pty' and 'rpc' options set"); shell_free_argv(argv); return; } char *new_cwd = tv_dict_get_string(job_opts, "cwd", false); if (new_cwd && strlen(new_cwd) > 0) { cwd = new_cwd; // The new cwd must be a directory. if (!os_isdir((char_u *)cwd)) { EMSG2(_(e_invarg2), "expected valid directory"); shell_free_argv(argv); return; } } if (!common_job_callbacks(job_opts, &on_stdout, &on_stderr, &on_exit)) { shell_free_argv(argv); return; } } TerminalJobData *data = common_job_init(argv, on_stdout, on_stderr, on_exit, pty, rpc, detach, cwd); Process *proc = (Process *)&data->proc; if (pty) { uint16_t width = (uint16_t)tv_dict_get_number(job_opts, "width"); if (width > 0) { data->proc.pty.width = width; } uint16_t height = (uint16_t)tv_dict_get_number(job_opts, "height"); if (height > 0) { data->proc.pty.height = height; } char *term = tv_dict_get_string(job_opts, "TERM", true); if (term) { data->proc.pty.term_name = term; } } if (!rpc && on_stdout.type == kCallbackNone) { proc->out = NULL; } if (on_stderr.type == kCallbackNone) { proc->err = NULL; } common_job_start(data, rettv); } // "jobstop()" function static void f_jobstop(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; if (check_restricted() || check_secure()) { return; } if (argvars[0].v_type != VAR_NUMBER) { // Only argument is the job id EMSG(_(e_invarg)); return; } TerminalJobData *data = find_job(argvars[0].vval.v_number); if (!data) { EMSG(_(e_invjob)); return; } process_stop((Process *)&data->proc); data->stopped = true; rettv->vval.v_number = 1; } // "jobwait(ids[, timeout])" function static void f_jobwait(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; if (check_restricted() || check_secure()) { return; } if (argvars[0].v_type != VAR_LIST || (argvars[1].v_type != VAR_NUMBER && argvars[1].v_type != VAR_UNKNOWN)) { EMSG(_(e_invarg)); return; } list_T *args = argvars[0].vval.v_list; list_T *rv = tv_list_alloc(); ui_busy_start(); MultiQueue *waiting_jobs = multiqueue_new_parent(loop_on_put, &main_loop); // For each item in the input list append an integer to the output list. -3 // is used to represent an invalid job id, -2 is for a interrupted job and // -1 for jobs that were skipped or timed out. for (listitem_T *arg = args->lv_first; arg != NULL; arg = arg->li_next) { TerminalJobData *data = NULL; if (arg->li_tv.v_type != VAR_NUMBER || !(data = find_job(arg->li_tv.vval.v_number))) { tv_list_append_number(rv, -3); } else { // append the list item and set the status pointer so we'll collect the // status code when the job exits tv_list_append_number(rv, -1); data->status_ptr = &rv->lv_last->li_tv.vval.v_number; // Process any pending events for the job because we'll temporarily // replace the parent queue multiqueue_process_events(data->events); multiqueue_replace_parent(data->events, waiting_jobs); } } int remaining = -1; uint64_t before = 0; if (argvars[1].v_type == VAR_NUMBER && argvars[1].vval.v_number >= 0) { remaining = argvars[1].vval.v_number; before = os_hrtime(); } for (listitem_T *arg = args->lv_first; arg != NULL; arg = arg->li_next) { TerminalJobData *data = NULL; if (remaining == 0) { // timed out break; } if (arg->li_tv.v_type != VAR_NUMBER || !(data = find_job(arg->li_tv.vval.v_number))) { continue; } int status = process_wait((Process *)&data->proc, remaining, waiting_jobs); if (status < 0) { // interrupted or timed out, skip remaining jobs. if (status == -2) { // set the status so the user can distinguish between interrupted and // skipped/timeout jobs. *data->status_ptr = -2; } break; } if (remaining > 0) { uint64_t now = os_hrtime(); remaining -= (int) ((now - before) / 1000000); before = now; if (remaining <= 0) { break; } } } for (listitem_T *arg = args->lv_first; arg != NULL; arg = arg->li_next) { TerminalJobData *data = NULL; if (arg->li_tv.v_type != VAR_NUMBER || !(data = find_job(arg->li_tv.vval.v_number))) { continue; } // remove the status pointer because the list may be freed before the // job exits data->status_ptr = NULL; } // restore the parent queue for any jobs still alive for (listitem_T *arg = args->lv_first; arg != NULL; arg = arg->li_next) { TerminalJobData *data = NULL; if (arg->li_tv.v_type != VAR_NUMBER || !(data = pmap_get(uint64_t)(jobs, arg->li_tv.vval.v_number))) { continue; } // restore the parent queue for the job multiqueue_process_events(data->events); multiqueue_replace_parent(data->events, main_loop.events); } multiqueue_free(waiting_jobs); ui_busy_stop(); rv->lv_refcount++; rettv->v_type = VAR_LIST; rettv->vval.v_list = rv; } /* * "join()" function */ static void f_join(typval_T *argvars, typval_T *rettv, FunPtr fptr) { if (argvars[0].v_type != VAR_LIST) { EMSG(_(e_listreq)); return; } if (argvars[0].vval.v_list == NULL) { return; } const char *const sep = (argvars[1].v_type == VAR_UNKNOWN ? " " : tv_get_string_chk(&argvars[1])); rettv->v_type = VAR_STRING; if (sep != NULL) { garray_T ga; ga_init(&ga, (int)sizeof(char), 80); tv_list_join(&ga, argvars[0].vval.v_list, sep); ga_append(&ga, NUL); rettv->vval.v_string = (char_u *)ga.ga_data; } else { rettv->vval.v_string = NULL; } } /// json_decode() function static void f_json_decode(typval_T *argvars, typval_T *rettv, FunPtr fptr) { char numbuf[NUMBUFLEN]; const char *s = NULL; char *tofree = NULL; size_t len; if (argvars[0].v_type == VAR_LIST) { if (!encode_vim_list_to_buf(argvars[0].vval.v_list, &len, &tofree)) { EMSG(_("E474: Failed to convert list to string")); return; } s = tofree; if (s == NULL) { assert(len == 0); s = ""; } } else { s = tv_get_string_buf_chk(&argvars[0], numbuf); if (s) { len = strlen(s); } else { return; } } if (json_decode_string(s, len, rettv) == FAIL) { emsgf(_("E474: Failed to parse %.*s"), (int) len, s); rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; } assert(rettv->v_type != VAR_UNKNOWN); xfree(tofree); } /// json_encode() function static void f_json_encode(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->v_type = VAR_STRING; rettv->vval.v_string = (char_u *) encode_tv2json(&argvars[0], NULL); } /* * "keys()" function */ static void f_keys(typval_T *argvars, typval_T *rettv, FunPtr fptr) { dict_list(argvars, rettv, 0); } /* * "last_buffer_nr()" function. */ static void f_last_buffer_nr(typval_T *argvars, typval_T *rettv, FunPtr fptr) { int n = 0; FOR_ALL_BUFFERS(buf) { if (n < buf->b_fnum) { n = buf->b_fnum; } } rettv->vval.v_number = n; } /* * "len()" function */ static void f_len(typval_T *argvars, typval_T *rettv, FunPtr fptr) { switch (argvars[0].v_type) { case VAR_STRING: case VAR_NUMBER: { rettv->vval.v_number = (varnumber_T)strlen( tv_get_string(&argvars[0])); break; } case VAR_LIST: { rettv->vval.v_number = tv_list_len(argvars[0].vval.v_list); break; } case VAR_DICT: { rettv->vval.v_number = tv_dict_len(argvars[0].vval.v_dict); break; } case VAR_UNKNOWN: case VAR_SPECIAL: case VAR_FLOAT: case VAR_PARTIAL: case VAR_FUNC: { EMSG(_("E701: Invalid type for len()")); break; } } } static void libcall_common(typval_T *argvars, typval_T *rettv, int out_type) { rettv->v_type = out_type; if (out_type != VAR_NUMBER) { rettv->vval.v_string = NULL; } if (check_restricted() || check_secure()) { return; } // The first two args (libname and funcname) must be strings if (argvars[0].v_type != VAR_STRING || argvars[1].v_type != VAR_STRING) { return; } const char *libname = (char *) argvars[0].vval.v_string; const char *funcname = (char *) argvars[1].vval.v_string; int in_type = argvars[2].v_type; // input variables char *str_in = (in_type == VAR_STRING) ? (char *) argvars[2].vval.v_string : NULL; int64_t int_in = argvars[2].vval.v_number; // output variables char **str_out = (out_type == VAR_STRING) ? (char **) &rettv->vval.v_string : NULL; int64_t int_out = 0; bool success = os_libcall(libname, funcname, str_in, int_in, str_out, &int_out); if (!success) { EMSG2(_(e_libcall), funcname); return; } if (out_type == VAR_NUMBER) { rettv->vval.v_number = (int) int_out; } } /* * "libcall()" function */ static void f_libcall(typval_T *argvars, typval_T *rettv, FunPtr fptr) { libcall_common(argvars, rettv, VAR_STRING); } /* * "libcallnr()" function */ static void f_libcallnr(typval_T *argvars, typval_T *rettv, FunPtr fptr) { libcall_common(argvars, rettv, VAR_NUMBER); } /* * "line(string)" function */ static void f_line(typval_T *argvars, typval_T *rettv, FunPtr fptr) { linenr_T lnum = 0; pos_T *fp; int fnum; fp = var2fpos(&argvars[0], TRUE, &fnum); if (fp != NULL) lnum = fp->lnum; rettv->vval.v_number = lnum; } /* * "line2byte(lnum)" function */ static void f_line2byte(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const linenr_T lnum = tv_get_lnum(argvars); if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count + 1) { rettv->vval.v_number = -1; } else { rettv->vval.v_number = ml_find_line_or_offset(curbuf, lnum, NULL); } if (rettv->vval.v_number >= 0) { rettv->vval.v_number++; } } /* * "lispindent(lnum)" function */ static void f_lispindent(typval_T *argvars, typval_T *rettv, FunPtr fptr) { const pos_T pos = curwin->w_cursor; const linenr_T lnum = tv_get_lnum(argvars); if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count) { curwin->w_cursor.lnum = lnum; rettv->vval.v_number = get_lisp_indent(); curwin->w_cursor = pos; } else { rettv->vval.v_number = -1; } } /* * "localtime()" function */ static void f_localtime(typval_T *argvars, typval_T *rettv, FunPtr fptr) { rettv->vval.v_number = (varnumber_T)time(NULL); } static void get_maparg(typval_T *argvars, typval_T *rettv, int exact) { char_u *keys_buf = NULL; char_u *rhs; int mode; int abbr = FALSE; int get_dict = FALSE; mapblock_T *mp; int buffer_local; // Return empty string for failure. rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; char_u *keys = (char_u *)tv_get_string(&argvars[0]); if (*keys == NUL) { return; } char buf[NUMBUFLEN]; const char *which; if (argvars[1].v_type != VAR_UNKNOWN) { which = tv_get_string_buf_chk(&argvars[1], buf); if (argvars[2].v_type != VAR_UNKNOWN) { abbr = tv_get_number(&argvars[2]); if (argvars[3].v_type != VAR_UNKNOWN) { get_dict = tv_get_number(&argvars[3]); } } } else { which = ""; } if (which == NULL) { return; } mode = get_map_mode((char_u **)&which, 0); keys = replace_termcodes(keys, STRLEN(keys), &keys_buf, true, true, true, CPO_TO_CPO_FLAGS); rhs = check_map(keys, mode, exact, false, abbr, &mp, &buffer_local); xfree(keys_buf); if (!get_dict) { // Return a string. if (rhs != NULL) { rettv->vval.v_string = (char_u *)str2special_save( (const char *)rhs, false, false); } } else { tv_dict_alloc_ret(rettv); if (rhs != NULL) { // Return a dictionary. mapblock_fill_dict(rettv->vval.v_dict, mp, buffer_local, true); } } } /// luaeval() function implementation static void f_luaeval(typval_T *argvars, typval_T *rettv, FunPtr fptr) FUNC_ATTR_NONNULL_ALL { const char *const str = (const char *)tv_get_string_chk(&argvars[0]); if (str == NULL) { return; } executor_eval_lua(cstr_as_string((char *)str), &argvars[1], rettv); } /// Fill a dictionary with all applicable maparg() like dictionaries /// /// @param dict The dictionary to be filled /// @param mp The maphash that contains the mapping information /// @param buffer_value The "buffer" value /// @param compatible True for compatible with old maparg() dict void mapblock_fill_dict(dict_T *const dict, const mapblock_T *const mp, long buffer_value, bool compatible) FUNC_ATTR_NONNULL_ALL { char *const lhs = str2special_save((const char *)mp->m_keys, compatible, !compatible); char *const mapmode = map_mode_to_chars(mp->m_mode); varnumber_T noremap_value; if (compatible) { // Keep old compatible behavior // This is unable to determine whether a mapping is a