VimWikiをつかってみる。ことはじめ。
vimwiki2htmlで書き出してみたが、いまいち、みにくい(のは、わたしのマークアップだけど。。。)。
cssは、Custom CSS and JSをつかって、vimwikiのスタイルシートを読み込んでみる。
インストールとか
以下が良URL
初期設定
.vimrcとかに以下を設定。
" Wikiページファイルのディレクトリ: ~/my_site/
" HTMLファイルの出力先ディレクトリ: ~/public_html/
:let g:vimwiki_list = [{'path':'~/Documents/Dropbox/wiki/vimwiki/', 'path_html':'~/Documents/Dropbox/wiki/vimwiki_html/'}]
スタート
| :vimwikiIndex | index.wikiを開く |
| <Leader>ww | index.wikiを開く |
| <Leader>wt | index.wikiを新しいタブで開く |
| :Calendar | カレンダーを開く。 |
| <Leader>cal | カレンダーを開く。 |
「<Leader>」は、「\」。mac os の場合、「\」は、Option-「¥」
:let mapleader = "\"
カレンダーは、「calendar.vim」。
HTMLに変換
| :VimwikiAll2HTML | 全Wikiページ |
| <Leader>wh | Convert current wiki page to HTML. |
| <Leader>whh | Convert current wiki page to HTML and open it in webbrowser. |
検索
:VimwikiSearch /pattern/
:VWS /pattern/
Search for /pattern/ in all files of current wiki.
To display all matches use |:lopen| command.
To display next match use |:lnext| command.
To display previous match use |:lprevious| command.
よくつかうマップ
| = | add header level. create if needed. |
| – | remove header level. |
| <a-left> | move current table column to the left. |
| <S-CR> | Split and follow |
| <C-CR> | Vertical split and follow |
| gqq or gww | Format table |
| <Tab> | Go to the next table cell |
| <S-CR> | Insert and a newline. |
todo
編集
* [ ] aaaa * [ ] abc * [ ] abc * [ ] abc * [ ] abc * [.] aaaa * [X] abc * [ ] abc * [ ] abc * [ ] abc * [o] aaaa * [X] abc * [X] abc * [ ] abc * [ ] abc * [O] aaaa * [X] abc * [X] abc * [X] abc * [ ] abc * [X] aaaa * [X] abc * [X] abc * [X] abc * [X] abc
ブラウザ
- aaaa
- abc
- abc
- abc
- abc
- aaaa
- abc
- abc
- abc
- abc
- aaaa
- abc
- abc
- abc
- abc
- aaaa
- abc
- abc
- abc
- abc
- aaaa
- abc
- abc
- abc
- abc
書体
編集
*bold text* _italic text_ ~~strikeout text~~ `code (no syntax) text` super^script^ sub,,script,,
HTML
<p> bold text italic text <del>strikeout text</del> <code>code (no syntax) text</code> super
<small>script</small>
sub
<small>script</small>
</p>
ブラウザ
bold text
italic text
strikeout text
code (no syntax) text
superscript
subscript
リンク
| ブラウザ | 編集 |
|---|---|
| WikiWords | AbcDef |
| NoWikiWords | !AbcDef |
[http://www.google.com google] |
|
![]() |
http://ma.ruyama.net/wp-content/uploads/vim-editor_logo.png |
見出し
編集
= 見出し1 = == 見出し2 == === 見出し3 === ==== 見出し4 ==== ===== 見出し5 ===== ====== 見出し6 ======
ブラウザ
見出し1
見出し2
見出し3
見出し4
見出し5
見出し6
リスト
| *unorder list | <ul> |
| -unorder list | <ul> |
| #orderlist | <ol> |
Definition lists
編集
Term 1:: Definition 1 Term 1:: :: Definition 1 :: Definition 2
ブラウザ
- Term 1
- Definition 1
- Term 1
- Definition 1
- Definition 2
テーブル
編集
| a | b | c | d | | \/ | e | > | f | | \/ | \/ | > | g | | h | > | > | > |
ブラウザ
| a | b | c | d |
| e | f | ||
| g | |||
| h | |||
Preformatted text
編集
{{{class="brush: python"
def hello(world):
for x in range(10):
print("Hello {0} number {1}".format(world, x))
}}}
HTML
<pre class="brush: python"
def hello(world):
for x in range(10):
print("Hello {0} number {1}".format(world, x))
</pre>
ブラウザ
def hello(world):
for x in range(10):
print("Hello {0} number {1}".format(world, x))
Blockquotes
Text started with 4 or more spaces is a blockquote.
Horizontal line
4 or more dashes at the start of the line is a ‘horizontal line’
テキストオブジェクト
| a\ | A cell in a table. |
| i\ | An inner cell in a table. |
後で
- どうもmacvimだと、CTRL-SPC(todoのトグル)がうまくきかないみたい。
Maps to |:VimwikiToggleListItem|. - DropBoxでhtml吐き出し。iphoneからだとリンクたどれない。

Post a Comment