From f60923eaa3acd712fefe75ee424e676f61d2b140 Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Wed, 6 Jun 2018 21:27:25 +0200 Subject: [PATCH 01/13] Make master the recommended branch to use Discussed in #505 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 11d0824..1720e4c 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ Installation using [Vim-Plug](https://github.com/junegunn/vim-plug) Add the following to the plugin-configuration in your vimrc: - Plug 'vimwiki/vimwiki', { 'branch': 'dev' } + Plug 'vimwiki/vimwiki' Then run `:PlugInstall`. From 9f8b0082dbd99e706cc18de2076f7a66c2ca0a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=2E=20Sch=C3=B6nitzer?= Date: Tue, 12 Jun 2018 20:55:56 +0200 Subject: [PATCH 02/13] Add a command that shows the version or commit Ref #512 --- plugin/vimwiki.vim | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/plugin/vimwiki.vim b/plugin/vimwiki.vim index 1076588..4e0ee91 100644 --- a/plugin/vimwiki.vim +++ b/plugin/vimwiki.vim @@ -9,6 +9,11 @@ if exists("g:loaded_vimwiki") || &cp endif let g:loaded_vimwiki = 1 +" Set to version number for release, otherwise -1 for dev-branch +let s:plugin_vers = -1 + +" Get the directory the script is installed in +let s:plugin_dir = expand(':p:h:h') let s:old_cpo = &cpo set cpo&vim @@ -186,6 +191,23 @@ function! s:set_windowlocal_options() endfunction +function! s:get_version() + if s:plugin_vers != -1 + echo "Stable version: " . s:plugin_vers + else + let a:plugin_rev = system("git --git-dir " . s:plugin_dir . "/.git rev-parse --short HEAD") + let a:plugin_branch = system("git --git-dir " . s:plugin_dir . "/.git rev-parse --abbrev-ref HEAD") + let a:plugin_date = system("git --git-dir " . s:plugin_dir . "/.git show -s --format=%ci") + if v:shell_error == 0 + echo "Branch: " . a:plugin_branch + echo "Revision: " . a:plugin_rev + echo "Date: " . a:plugin_date + else + echo "Unknown version" + endif + endif +endfunction + " Initialization of Vimwiki starts here. Make sure everything below does not @@ -279,6 +301,8 @@ command! -count=1 VimwikiMakeTomorrowDiaryNote command! VimwikiDiaryGenerateLinks \ call vimwiki#diary#generate_diary_section() +command! VimwikiShowVersion call s:get_version() + let s:map_prefix = vimwiki#vars#get_global('map_prefix') From 9f797f6ad9fd2a5e943bc99b5f9cd44b2cbd0fb4 Mon Sep 17 00:00:00 2001 From: Steven Stallion Date: Thu, 12 Jul 2018 11:11:05 -0500 Subject: [PATCH 03/13] Initial commit --- doc/vimwiki.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index 92c0394..f3825a8 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -1438,7 +1438,7 @@ Hit |zr| one more time : Note: If you use the default Vimwiki syntax, folding on list items will work properly only if all of them are indented using the current 'shiftwidth'. -For MediaWiki syntax, * or # should be in the first column. +For Markdown and MediaWiki syntax, * or # should be in the first column. To turn folding on/off check |g:vimwiki_folding|. @@ -2289,8 +2289,8 @@ local mappings |vimwiki_glstar|, |vimwiki_gl#| |vimwiki_gl-|, |vimwiki_gl-|, |vimwiki_gl1|, |vimwiki_gla|, |vimwiki_glA|, |vimwiki_gli|, |vimwiki_glI| and |vimwiki_i__|. -Note: if you use MediaWiki syntax, you probably would like to set this option -to 0, because every indented line is considered verbatim text. +Note: if you use Markdown or MediaWiki syntax, you probably would like to set +this option to 0, because every indented line is considered verbatim text. *vimwiki-option-auto_tags* From f55ec31675e372e2f59d51322b445ea91191ec2b Mon Sep 17 00:00:00 2001 From: Daniel Quomsieh Date: Fri, 31 Aug 2018 16:05:42 +0300 Subject: [PATCH 04/13] fixed writing error --- doc/vimwiki.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index f3825a8..835036e 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -695,7 +695,7 @@ Vimwiki file. *:VimwikiGoto* Goto link provided by an argument. For example: > :VimwikiGoto HelloWorld -< opens opens/creates HelloWorld wiki page. +< opens/creates HelloWorld wiki page. Supports |cmdline-completion| for link name. From f882cf01528e471d78d10df28ce407bc1cc23bc9 Mon Sep 17 00:00:00 2001 From: Fredrik Arnerup Date: Mon, 17 Sep 2018 11:21:07 +0200 Subject: [PATCH 05/13] Don't include trailing period in link --- autoload/vimwiki/vars.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/vimwiki/vars.vim b/autoload/vimwiki/vars.vim index 7b8e507..2f1ab50 100644 --- a/autoload/vimwiki/vars.vim +++ b/autoload/vimwiki/vars.vim @@ -125,8 +125,8 @@ function! s:populate_global_variables() " this regexp defines what can form a link when the user presses in the " buffer (and not on a link) to create a link " basically, it's Ascii alphanumeric characters plus #|./@-_~ plus all - " non-Ascii characters - let g:vimwiki_global_vars.rxWord = '[^[:blank:]!"$%&''()*+,:;<=>?\[\]\\^`{}]\+' + " non-Ascii characters, except that . is not accepted as the last character + let g:vimwiki_global_vars.rxWord = '[^[:blank:]!"$%&''()*+,:;<=>?\[\]\\^`{}]*[^[:blank:]!"$%&''()*+.,:;<=>?\[\]\\^`{}]' let g:vimwiki_global_vars.rx_wikilink_prefix1 = g:vimwiki_global_vars.rx_wikilink_prefix . \ g:vimwiki_global_vars.rxWikiLinkUrl . g:vimwiki_global_vars.rx_wikilink_separator From 7ffc295094debc3d521cecf267d736cc8562c20e Mon Sep 17 00:00:00 2001 From: "CUI Hao (Lab)" Date: Mon, 8 Oct 2018 23:12:57 +0800 Subject: [PATCH 06/13] Update Chinese readme & add links to each readme --- README-cn.md | 140 +++++++++++++++++++++++++++++++-------------------- README.md | 2 + 2 files changed, 87 insertions(+), 55 deletions(-) diff --git a/README-cn.md b/README-cn.md index d00bf95..60574ae 100644 --- a/README-cn.md +++ b/README-cn.md @@ -1,63 +1,62 @@ -一个私人的维基——vim插件 +VimWiki —— Vim 个人 Wiki 插件 ============================================================================== +[English](README.md) + ![screenshot1](doc/screenshot_1.png) -![screenshot2](doc/screenshot_2.png) +![screenshot2](doc/screenshot_2.png) * 介绍 ------------------------------------------------------------------------------ -Vimwiki是私人维基的vim插件 -- 许多有自己代码高亮的text文件。 +Vimwiki 是 Vim 中的个人 Wiki —— 一组链接起来的、有独特语法高亮的文本文件。 -通过Vimwiki,你可以: +通过 Vimwiki,你可以: * 组织笔记和想法 - * 制作代办事项表 - * 写文档 + * 管理待办事项 + * 编写文档 + * 坚持写日记 + * 将这一切导出成 HTML 网页 -一个快速的开始,通常使用`ww`(一般是`\ww`),然后创建你的index wiki文件。 -通常,它在: +马上开始!按下 `ww`(通常是 `\ww`)进入作为目录页的 wiki 文件,这个文件默认存放在 `~/vimwiki/index.wiki`。 - ~/vimwiki/index.wiki +在该文件中输入以下示例: -在这个文件,输入如下的例子: + = 我的个人知识库 = + * 任务列表 -- _昨天_ 就该完成的事!!! + * Gutenberg 计划 -- 好书给我力量。 + * 草稿 -- 临时记录一些东西。 - = My knowledge base = - * Tasks -- things to be done _yesterday_!!! - * Project Gutenberg -- good books are power. - * Scratchpad -- various temporary stuff. +把光标移到 `任务` 二字上,按 Enter(回车)创建链接。按下后,`任务`二字会变成 `[[任务]]` —— 这是一个 Vimwiki 链接。再次按 Enter 即可进入这个链接(打开新的 wiki 文件)。编辑这个新文件,保存,然后按 Backspace(退格)就能回到目录页。 -将你的光标放到`Tasks`(任务)上,并且按回车键去创建一个链接。一旦按下,`Task`将会 -变成`[[Tasks]]` -- 一个vimwiki的链接。再按一次回车去打开它。编辑文件,保存它, -然后按backspace来返回你的index。 +如果 Vimwiki 链接长度不止一个单词(指的是英文单词),只需在 Visual 模式选择这段文本后按 Enter 即可。用上面的 `Gutenberg 计划` 试试吧。最终结果是这样: -一个vimwiki链接可以一句话创建。只需要通过选择visual模式选择这个句子,然后按回车。 -你可以通过选择`Project Gutenberg`来尝试。结果像是这个样子: - - = My knowledge base = - * [[Tasks]] -- things to be done _yesterday_!!! - * [[Project Gutenberg]] -- good books are power. - * Scratchpad -- various temporary stuff. + = 我的个人知识库 = + * [[任务列表]] -- _昨天_ 就该完成的事!!! + * [[Gutenberg 计划]] -- 好书给我力量。 + * 草稿 -- 临时记录一些东西。 基本标记 ------------------------------------------------------------------------------ - = Header1 = - == Header2 == - === Header3 === + = 一级标题 = + == 二级标题 == + === 三级标题 === - *bold* -- bold text - _italic_ -- italic text + *bold* -- 粗体文本 + _italic_ -- 斜体文本 + (应用于句中的汉字文本时,必须在标记前后加空格,例如:一段 *中文* 文本) - [[wiki link]] -- wiki link - [[wiki link|description]] -- wiki link with description + [[wiki link]] -- wiki 链接 + [[wiki link|description]] -- 带有描述文本的 wiki 链接 -列表: +列表: - * bullet list item 1 + * bullet list item 1(无编号列表) - bullet list item 2 - bullet list item 3 * bullet list item 4 @@ -67,13 +66,13 @@ Vimwiki是私人维基的vim插件 -- 许多有自己代码高亮的text文件 - bullet list item 8 - bullet list item 9 - 1. numbered list item 1 + 1. numbered list item 1(有编号列表) 2. numbered list item 2 a) numbered list item 3 b) numbered list item 4 -查看`:h vimwiki-syntax` +更多格式说明,请阅 `:h vimwiki-syntax` 键位绑定 @@ -81,46 +80,49 @@ Vimwiki是私人维基的vim插件 -- 许多有自己代码高亮的text文件 normal 模式: - * `ww` -- 打开默认的wiki index文件 - * `wt` -- 通过tab实现上一个功能 - * `ws` -- 选择并且打开index文件 - * `wd` -- 删除进入的wiki文件 - * `wr` -- 重命名你进入的wiki文件 - * `` -- 进入/创建 wiki 链接 - * `` -- 通过分屏模式sp,进入/创建wiki链接 - * `` -- 通过分屏模式vs,进入/创建wiki链接 - * `` -- 返回父节点 - * `` -- 寻找下一个wiki链接 - * `` -- 寻找上一个wiki链接 + * `ww` -- 打开默认的 wiki 目录文件 + * `wt` -- 在新标签(Tab)中打开 wiki 目录文件 + * `ws` -- 在多个 wiki 中选择并打开该 wiki 的目录文件 + * `wd` -- 删除当前 wiki 文件 + * `wr` -- 重命名当前 wiki 文件 + * `` -- 创建或打开 wiki 链接 + * `` -- 先上下分屏再打开 wiki 链接(若非链接则先创建) + * `` -- 先左右分屏再打开 wiki 链接(若非链接则先创建) + * `` -- 返回之前浏览的 wiki 文件 + * `` -- 跳到本文件中下一个 wiki 链接 + * `` -- 跳到本文件中上一个 wiki 链接 -查看`:h vimwiki-mappings` +更多快捷键说明,请阅 `:h vimwiki-mappings` 命令 ------------------------------------------------------------------------------ - * `:Vimwiki2HTML` -- 转换当前wiki成为html - * `:VimwikiAll2HTML` -- 转化你的全部wiki到html + * `:Vimwiki2HTML` -- 将当前 wiki 文件转换成 HTML 网页 + * `:VimwikiAll2HTML` -- 把所有 wiki 文件转换成 HTML 网页 * `:help vimwiki-commands` -- 显示全部命令 -安装细节 +安装 ============================================================================== -在安装之前,你需要做的 +准备工作 ------------------------------------------------------------------------------ -确定在`vimrc`中,你的设置是这样的。 +确保在 `vimrc` 中加入了以下设置: set nocompatible filetype plugin on syntax on -如果没有他们,Vimwiki将无法正常工作。 +没有这些设置,Vimwiki 将无法正常工作。 +通过 [Vim packages](http://vimhelp.appspot.com/repeat.txt.html#packages) 安装(Vim 7.4.1528 后) +------------------------------------------------------------------------------ + git clone https://github.com/vimwiki/vimwiki.git ~/.vim/pack/plugins/start/vimwiki -使用 pathogen (译者注:一个插件) (http://www.vim.org/scripts/script.php?script_id=2332 ) +通过 [Pathogen](http://www.vim.org/scripts/script.php?script_id=2332) 安装 ------------------------------------------------------------------------------ cd ~/.vim @@ -128,4 +130,32 @@ normal 模式: cd bundle git clone https://github.com/vimwiki/vimwiki.git -然后启动vim,使用`:Helptags` 然后 `:help vimwiki`来确保他已经被安装了。 +通过 [Vim-Plug](https://github.com/junegunn/vim-plug) 安装 +------------------------------------------------------------------------------ + +在 `vimrc` 中加入以下插件设置: + + Plug 'vimwiki/vimwiki', { 'branch': 'dev' } + +然后运行 `:PlugInstall`。 + +通过 [Vundle](https://github.com/VundleVim/Vundle.vim) 安装 +------------------------------------------------------------------------------ + +在 `vimrc` 中加入 `Plugin 'vimwiki/vimwiki'`,然后执行: + + vim +PluginInstall +qall + +或者下载 [zip 压缩包](https://github.com/vimwiki/vimwiki/archive/master.zip)然后解压到 `~/.vim/bundle/` 目录下。 + +安装后,启动 Vim 并执行 `:Helptags` 以及 `:help vimwiki`,检查安装是否成功。 + + +获取帮助 +============================================================================== + +遇到问题?在 Freenode 的 IRC 频道 `#vimwiki`([网页聊天](https://webchat.freenode.net/?channels=#vimwiki))提问,或者发送问题到[邮件列表](https://groups.google.com/forum/#!forum/vimwiki)上吧。 + + +---- +\* 前面截图中用的是 [solarized 配色方案](https://github.com/altercation/vim-colors-solarized)以及 [lightline](https://github.com/itchyny/lightline.vim) 插件。 diff --git a/README.md b/README.md index 1720e4c..a8a203a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ A Personal Wiki For Vim ============================================================================== +[中文](README-cn.md) + ![screenshot1](doc/screenshot_1.png) ![screenshot2](doc/screenshot_2.png) * From aca8c2b8cc721319fcd41ffb7f5ae3b92b8070a1 Mon Sep 17 00:00:00 2001 From: Nicolas Brailovsky Date: Wed, 12 Dec 2018 18:07:30 +0100 Subject: [PATCH 07/13] Patch for issue #585, fix anchor links for multiple extensions --- autoload/vimwiki/base.vim | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim index 2bb8c4d..8124444 100644 --- a/autoload/vimwiki/base.vim +++ b/autoload/vimwiki/base.vim @@ -152,7 +152,16 @@ function! vimwiki#base#resolve_link(link_text, ...) let link_infos.anchor = join(split_lnk[1:], '#') endif if link_text == '' " because the link was of the form '#anchor' - let link_text = fnamemodify(source_file, ':p:t:r') + if source_file =~ vimwiki#vars#get_wikilocal('ext') . '$' + " Source file has expected extension. Remove it, it will be added later on + let ext_len = strlen(vimwiki#vars#get_wikilocal('ext')) + let link_text = fnamemodify(source_file, ':p:t')[:-ext_len-1] + else + " Source file has unexpected (or no) extension. A new file with the proper + " extension appended will be created + " let link_text = fnamemodify(source_file, ':p:t:r') + endif + endif endif From 4e6db92d2c5a3ff24e64f6ba88220e7000f6c2b3 Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 15 Dec 2018 11:33:38 +0100 Subject: [PATCH 08/13] Patch for issue #585 - implement suggested improvements --- autoload/vimwiki/base.vim | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim index 8124444..01af8bf 100644 --- a/autoload/vimwiki/base.vim +++ b/autoload/vimwiki/base.vim @@ -152,14 +152,11 @@ function! vimwiki#base#resolve_link(link_text, ...) let link_infos.anchor = join(split_lnk[1:], '#') endif if link_text == '' " because the link was of the form '#anchor' - if source_file =~ vimwiki#vars#get_wikilocal('ext') . '$' + let expected_ext = vimwiki#u#escape(vimwiki#vars#get_wikilocal('ext')).'$' + if source_file =~# expected_ext " Source file has expected extension. Remove it, it will be added later on let ext_len = strlen(vimwiki#vars#get_wikilocal('ext')) let link_text = fnamemodify(source_file, ':p:t')[:-ext_len-1] - else - " Source file has unexpected (or no) extension. A new file with the proper - " extension appended will be created - " let link_text = fnamemodify(source_file, ':p:t:r') endif endif From 417490f30b3aaec600c19cfa59018cf2368dd87b Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Tue, 29 Jan 2019 19:45:46 +0100 Subject: [PATCH 09/13] doc: Fix spelling for --- doc/vimwiki.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index 835036e..5c56ee4 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -3193,7 +3193,7 @@ http://code.google.com/p/vimwiki/issues/list * Issue 210: HTML: para enclose header. * Issue 214: External links containing Chinese characters get trimmed. * Issue 218: Command to generate HTML file and open it in webbrowser. See - |:Vimwiki2HTMLBrowse|(bind to whh) + |:Vimwiki2HTMLBrowse|(bind to whh) * NEW: Added wh mapping to call |:Vimwiki2HTML| From 5ab8f8672e6832da8f5a7eb371d2b24e8e0fff2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=2E=20Sch=C3=B6nitzer?= Date: Sat, 9 Mar 2019 14:49:01 +0100 Subject: [PATCH 10/13] Add call for help and note about Riot --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a8a203a..1e5e757 100644 --- a/README.md +++ b/README.md @@ -161,8 +161,13 @@ Then launch Vim, run `:Helptags` and then `:help vimwiki` to verify it was insta Getting help ============================================================================== -Have a question? Visit the IRC channel `#vimwiki` on Freenode ([webchat](https://webchat.freenode.net/?channels=#vimwiki)) -or post to the [mailing list](https://groups.google.com/forum/#!forum/vimwiki). +Have a question? Visit the IRC channel `#vimwiki` on Freenode ([webchat](https://webchat.freenode.net/?channels=#vimwiki), also synced to Matrix/Riot: `#freenode_#vimwiki:matrix.org`) or post to the [mailing list](https://groups.google.com/forum/#!forum/vimwiki). + +Helping Vimwiki +============================================================================== + +Vimwiki has a lot of users but only very few recurring developers or people helping the community. Your help is therefore appreciated. Everyone can help! See [#625](https://github.com/vimwiki/vimwiki/issues/625) for information on how you can help. + ---- From 7f98bfbe4bb887edde1c88335138591f81d87be5 Mon Sep 17 00:00:00 2001 From: Rane Brown Date: Sun, 17 Mar 2019 22:06:10 -0600 Subject: [PATCH 11/13] Create a pull request template. --- .github/pull_request_template.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..256df18 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ +# Pull Request Checks + +1. **ALL** pull requests should be made against the `dev` branch! +2. Take a look at [CONTRIBUTING.MD](https://github.com/vimwiki/vimwiki/blob/dev/CONTRIBUTING.md) +3. Reference any related issues. +4. Provide a description of the proposed changes and any testing that was done. +5. Make sure to update the documentation in `doc/vimwiki.txt` if applicable. + +**DELETE THIS TEMPLATE TEXT PRIOR TO SUBMITTING YOUR PULL REQUEST** From 605604fc23e5717dd7063c1b7265c3d6c7b7ed0a Mon Sep 17 00:00:00 2001 From: Rane Brown Date: Sun, 17 Mar 2019 22:24:51 -0600 Subject: [PATCH 12/13] Create an issue template --- .github/issue_template.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/issue_template.md diff --git a/.github/issue_template.md b/.github/issue_template.md new file mode 100644 index 0000000..2e3673d --- /dev/null +++ b/.github/issue_template.md @@ -0,0 +1,11 @@ +# Issue Checks + +Prior to submitting a new issue make sure to complete these steps: + +1. Search _existing issues_ for the same or similiar problems that have already been reported. +2. Checkout the `dev` branch and confirm the issue is present there as well. + The `dev` branch contains fixes that may not have been merged to `master` yet. +3. Provide a detailed description of the problem including **steps to reproduce the issue**. +4. Include the output of `:VimwikiShowVersion`. + +**DELETE THIS TEMPLATE TEXT PRIOR TO SUBMITTING THE ISSUE** From a5ef4787505cb0c10544ef0a76fe9efbbc546972 Mon Sep 17 00:00:00 2001 From: Rane Brown Date: Wed, 20 Mar 2019 06:24:16 -0600 Subject: [PATCH 13/13] Improverize issue template per #513 --- .github/issue_template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/issue_template.md b/.github/issue_template.md index 2e3673d..ddc0501 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -2,9 +2,9 @@ Prior to submitting a new issue make sure to complete these steps: -1. Search _existing issues_ for the same or similiar problems that have already been reported. -2. Checkout the `dev` branch and confirm the issue is present there as well. +1. Checkout the `dev` branch and confirm the issue is present there as well. The `dev` branch contains fixes that may not have been merged to `master` yet. +2. Post the syntax you are using (default/mediawiki/markdown) **and** your vimwiki settings from your `.vimrc` 3. Provide a detailed description of the problem including **steps to reproduce the issue**. 4. Include the output of `:VimwikiShowVersion`.