Tiger, wrote a function, and added a shortcut key for the Octopress article to add some specific content, in the article list and the first page to display the article introduction or summary, and to create a directory of the article.
The reason to merge the two parts together, is because the directory is added to the first content of the article, then the directory will be as the beginning of the article displayed in the home page, not good-looking, so these two things are generally used in conjunction with.
What you need to add is as follows:
<!-- more -->* list element with functor item{:toc}
The function that implements this function is placed in the. VIMRC code as follows:
1 2 3 4 5 6 7 8 9 Ten One |
map <F7> : call Octopressindex() <cr>'s function octopressindex() Call append("") Call append(+<!--more--) Call append("") Call append(+,"* list element with functor item") Call append("{: TOC}") Call append("") Echohl warningmsg | echo "successful in adding the Octopress Index and read on." | Echohl Noneendfunction
|
The function is to insert the content to be added from 19 lines. Shortcut keys are
Here to illustrate, because my article is written in Vimwiki first, the front will be added a file header, so to add from 19 lines. After writing, I'll use the Vimdiff feature to merge the content into a blog post.
Original link Address: http://pangyi.github.io/blog/20141123/ zeng-jia-octopressde-shuo-ming-he-mu-lu-de-vimhan-shu-he-kuai-jie-jian-pei-zhi/
Written by pangyi?posted at Http://pangyi.github.io
Added octopress description and directory of VIM functions and shortcut key configuration