Code Monkey home page Code Monkey logo

vim-jekyll's Introduction

jekyll.vim

Blogging from the command line should not be tedious.

This script is intended to automate the process of creating and editing Jekyll blog posts from within vim.

This is a complete rewrite of csexton/jekyll.vim with these improvements:

  • Commands are added as buffer commands when a Jekyll blog is found
  • Commands to edit/split/vsplit/tabnew a post
  • Tab completion for opening existing posts
  • Recognizes Octopress blogs and others with custom _posts directory
  • Customizable template for new posts
  • Customizable build command, with automatic support for bundler

Commands

The :Jpost (Jekyll post) command is used to create and edit blog posts. It has variants for opening a post in a horizontal or vertical split or a new tab. Call with a bang, (eg: :Jpost!) to create a new post. Call without a bang (eg: :Jpost) to edit a post. The :Jbuild command can be used to build a blog.

:Jpost[!]  [{name}] Create or edit the specified post. With no argument,
                    you will be prompted to select a post or enter a title.

:JSpost[!] [{name}] Same as :Jpost, but opens post in a horizontal split.

:JVpost[!] [{name}] Same as :Jpost, but opens post in a vertical split.

:JTpost[!] [{name}] Same as :Jpost, but opens post in a tab.

:Jbuild    [{args}] Generate blog. This will check for the presence of a
                    Gemfile; if found `bundle exec` is used to run the
                    `jekyll` command. The blog will be built with:

            jekyll --no-auto --no-server BLOG_ROOT BLOG_ROOT/SITE_DIR <args>

                    If this doesn't fit your situation, you can set a
                    custom command with `g:jekyll_build_command`. When
                    using a custom command no check for a Gemfile is
                    performed.

See also :help jekyll-commands.

Configuration

See :help jekyll-configuration.

License

Same as Vim itself, see :help license.

vim-jekyll's People

Contributors

itspriddle avatar parkr avatar psykidellic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-jekyll's Issues

An advice

Hi

I'm trying to find a way to add some liquid/jekyll snippet to my vim, something that would for example paste a
{% highlight raw %}
cursor here
{% endhighlight %}
if I type something like ysnipraw

I tried vim-surround and vim-jekyll, none of those both pluggins do the job.

By any chance can you give me a hint ?

Thanks & regards

Commands for working with drafts

Hi, thanks for maintaining this plugin. I will love to have commands for work with drafts on jekyll, like create, edit, and publish a draft. I would make a PR with some code I have (create, edit and publish drafts), but I'm very new to VimL.

cannot work when user use lazy load of plugin manager

in plugin/jekyll.vim

  autocmd BufNewFile,BufReadPost * call s:init(expand('<amatch>:p'))
  autocmd FileType           netrw call s:init(expand('<afile>:p'))

when user use lazy load, on the first time these autocmd will not work. perhaps make these function as autoload function will be better, user can add these function to their vimrc?

it is an advice. Thanks!

Time localization problem

Hi,

I begun to use your vim plugin and found a bug on date format on Japanese language environment. If :Jpost command on Japanese environment is used, date format is like "Sat 12 27 23:14:17 +0900 2014"(month is 12, not Dec). So ruby's Time.parse parses it into wrong date when Jekyll building. In this case, date is 2014/12/13.

You can understand it with executing the below command.
LANG=C date +%b #-> Dec
LANG=ja_JP date +%b #-> 12
This is by design of localization.

Do you have any solution?

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.