Git Product home page Git Product logo

vim-asciidoc's Introduction

vim-asciidoc

Enhanced editing support for Asciidoc files in Vim

Compilers

vim-asciidoc provides:

:compiler asciidoc

To use the original Python Asciidoc

:compiler asciidoctor

To use the newer Ruby Asciidoctor

Each compiler provides a :Theme command for changing the style-sheet.

Asciidoc
g:asciidoc_themes

The list of installed themes, defaulting to the two themes that come with standard asciidoc, flask and volnitsky.

g:asciidoc_theme

The name of your preferred default theme, defaulting to the asciidoc default blue stylesheet.

Asciidoctor
g:asciidoctor_themes_dir

The location of your CSS stylesheets

g:asciidoctor_theme

The name of your preferred default theme, defaulting to the asciidoctor default red stylesheet.

Live Reload

The Epiphany browser automatically refreshes when it detects that the source has been updated. This makes for a wonderful previewer when editing asciidoc files. Just run :make and switch to Epiphany and watch it auto-refresh. Chrome has plugins (LivePage and LiveReload) for the same effect.

Headings

The key sequence <leader>1 will turn the current line into a level 1 heading using the current heading style as defined in g:asciidoc_title_style (setext, or the default, atx). Similar mappings exist for heading levels 2-5.

The Vim section keys ([[ ]] [] ][) will move you between headings.

Heading Styles

By default, vim-asciidoc uses asymmetric atx style headings, like:

== Level 2 Heading

You can force symmetric atx style headings with let g:asciidoc_title_style_atx = "symmetric" which will result in headings like:

== Level 2 Heading ==

Setext style headings are also supported with let g:asciidoc_title_style = "setext" which results in headings like:

Level 2 Heading
---------------

Lists

Nested bullet and number lists are supported using the following syntax:
* item
** sub-item
*** sub-sub-item
And numbered lists:
. item
.. sub-item
... sub-sub-item

List Building Commands

Use the following visual mode list building commands:

lu

Create unordered lists

lo

Create ordered lists

l>

Increase list depth

l<

Decrease list depth

Reformatting

By default, Vim does the wrong thing by reformatting Asciidoc’s block delimiters as part of the paragraph. This plugin fixes that problem, correctly formatting blocks, lists and normal paragraphs.

Use the Q key to reformat the current block.

Syntax Highlighting

vim-asciidoc merely bundles Stuart Rackham’s original asciidoc syntax file.

If you have the SyntaxRange plugin installed, source blocks within [=+-] blocks will be highlighted according to the named language. Currently only C, Python and VimL are highlighted by default. Submit a PR if you want to extend this set, or just add your own to ~/.vim/after/syntax/asciidoc.vim

Snippets

vim-asciidoc provides several convenient snippets in the UltiSnips format.

vim-asciidoc's People

Contributors

dahu avatar saschazelzer avatar

Watchers

 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.