Giter Club home page Giter Club logo

xmledit's Introduction

xml-plugin

Maintainer: Devin Weaver [email protected]
Source: http://github.com/sukima/xmledit
Homepage: http://www.vim.org/scripts/script.php?script_id=301
Version: 1.9.4

XML Edit is a file type plugin to help edit XML documents. It includes tag completion and tag jumping.

Licence

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License.
See http://www.gnu.org/copyleft/gpl.txt

Build

Run the Makefile to build the vba file.

$ make

Now send it to all your friends.

Install

This is for users who have the xmledit.vba file.

If you do not have VIM version 7.0 or higher this will not work. Either upgrade or deal with the shaddy old plugin which you can get at http://github.com/sukima/xmledit/tree/v1.84. (Alternativly you could manually copy the files to there proper locations however older versions of VIM will not be supported in future development)

To install the created package open the vba file in vim and source it:

$ vim xmledit.vba
:so %

If you are installing this from the source (you don't have a .vba file) you can skip the building of one by running the Makefile:

$ make install

Now read doc/xml-plugin.txt or type :help xml-plugin.txt in VIM.

** NOTE for pathogen users **
You do not need to install via any means other then to place the source in the bundle directory. This can easily be done by cloning the git repository or by making a git submodule. Do not attempt to use a .vba file with pathogen.

$ git clone https://github.com/sukima/xmledit.git ~/.vim/bundle/

Or as a submodule (assuming .vim is a git repository)

$ cd ~/.vim
$ git submodule init
$ git submodule add https://github.com/sukima/xmledit.git bundle/
$ git submodule update

Using With Other File Types

This can be used with other file types besides XML. There are two ways to accomplish this. The plugin can be used as is for other languages or with extra features that are language specific via the callback method.

The first method is simply to copy xml.vim or symbolically (or hard) link it to the new file type. For example:

ftplugin/
|-xml.vim
|-php.vim -> xml.vim
`-xhtml.vim -> xml.vim

The second method expands on the idea of copying. It uses a callback method which can extend the functionality of the tags for that language. For example in an HTML document you might prefer your table tags to look like this:

<table cellpadding="0" cellspacing="0" border="0">
</table>

But by just linking html.vim to xml.vim you would have to type all that in every time. The callback could allow you to type just <table> and it would add the cellpadding=... attributes for you. The example in the documentation (:help xml-plugin-callbacks) shows how to do this with HTML files.

Credits

  • Brad Phelan [email protected] for completing tag matching and visual tag completion.
  • Ma, Xiangjiang [email protected] for pointing out VIM 6.0 map <buffer> feature.
  • Luc Hermitte [email protected] for testing the self install documentation code and providing good bug fixes.
  • Guo-Peng Wen for the self install documentation code.
  • Shawn Boles [email protected] for fixing the <Leader>x cancelation bug.
  • Martijn van der Kwast [email protected] for patching problems with multi-languages (XML and PHP).
  • Ilya Bobir [email protected] for patching xml_tag_syntax_pefixes option.
  • Eli L. [email protected] for converting to the vimball packaging format.

xmledit's People

Contributors

sukima avatar elindsey avatar

Stargazers

Bernardo Heynemann avatar

Watchers

Bernardo Heynemann avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.