# Tag Info

10

The results from :VimwikiSearchTags are populated in the location-list window, so you can navigate using :lnext and :lprevious, or you can check all the results using :lopen. To be honest, despite I have been using Vimwiki for several years, I didn't know about the tags. Maybe it is because my wikis are not that large (~2 MB at most), but I find it easier ...

9

I was missing a trailing slash on both wiki_?.path values. I corrected my ~/.vimrc as follows: " vimwiki let wiki_1 = {} let wiki_1.path = '~/vimwiki/' let wiki_1.path_html = '~/vimwiki_html/' let wiki_2 = {} let wiki_2.path = '~/private/' let wiki_2.path_html = '~/private_html/' let g:vimwiki_list = [wiki_1, wiki_2] After a trailing slash is added, ...

8

Vimwiki has a simple search included. You can run :VimwikiSearch /pattern/ (the trailing slash is important). To go to the next hit run :lnext and :lprevious for the previous. For more details you can look into the help pages :h :VimwikiSearch.

8

I'm going to ignore the majority of your question (perhaps someone will be along later to provide more specifically what you're asking for) and instead suggest that you just use insert mode's indent command: Ctrl-T. :help i_CTRL-T: Insert one shiftwidth of indent at the start of the current line. The indent is always rounded to a 'shiftwidth' (this is ...

7

Folding lists in VimWiki According to the documentation in vimwiki version 2.1 (the latest I found), there are a few fold methods, and of them only one works for folding list items. The setting is in the variable g:vimwiki_folding. from :help g:vimwiki_folding: Enable/disable vimwiki's folding (outline) functionality. Folding in vimwiki can uses ...

7

This is the expected behavior of the plugin when you create a file in your vimwiki the filetype is set to vimwiki. If you don't want files created outside of the wiki directory to have this filetype you can follow this issue and add the following line to your .vimrc: let g:vimwiki_global_ext = 0

5

I think this is because Windows' cmd.exe has very limited support for colours; you can only use 16, and those 16 are different from what Unix terminals use (which mostly support at least 256 colours nowadays). The easiest solution is to just use Gvim. Windows is not designed to be used from the commandline, and doesn't really support it very well. You can ...

5

Moving completed tasks Presuming that a done line looks like this: - ~A completed task~ Then you can do so with a :global command that performs a :move: :g/^- \~.*\~$/m/^# Things done/+1 :g # find lines that match /^- \~.*\~$/ # the regular expression /^- \~.*\~$/ m ... 4 There are probably better ways but you could the help functionality as long as the filetype being help is ok. I basically use it to write down things I'm learning as I keep learning how to use gvim, it's only been 20 years :). At the moment I have one file that I edit elsewhere then copy to where the help file is as an archive. It's hit 1600 lines so I'll ... 4 I can do :echo globpath('~/path/to/dir', 'string*') to get a list like: This is not a List. This is a long String with newlines. To get a List you must supply the 4th argument as in :h globpath(): echo globpath('path', ''expr', 1, 1) 4 While on the line in question: :s/\w\+/:&:/g Breakdown \w\+ will match 1 or more word characters ([0-9A-Za-z_]). & has a special meaning in a replacement, depending on the value of 'magic' (default: on). It is replaced with the matched pattern. the g flag will perform this substitution for every occurrence on the line, not just the first. Non-... 4 Found a solution in vimwiki documentation. Here's a modification to my .vimrc: let g:vimwiki_list = [{ \ 'path': '$HOME/Dropbox/vimwiki', \ 'template_path': '$HOME/Dropbox/vimwiki/templates', \ 'template_default': 'default', \ 'template_ext': '.html'}] I had to create$HOME/Dropbox/vimwiki/templates/default.html, and I took original HTML file ...

3

Great tip with the slash and the \ws, thx! I have entered the following into my .vimrc (). Hope it helps someone: " Markdown for multiple vimwiki's " let g:vimwiki_list = [{'path': '~/Documents/myWiki/', 'syntax': 'markdown', 'ext': '.md'}, \ {'path': '~/Documents/myScripts.wiki/', 'syntax': 'markdown', 'ext': '.md'}] And \ws: 1 /...

3

The commands given with -c are executed after the first file is loaded. I guess that at that time, vimwiki is already initialized and asked for creation of the directory ~/vimwiki. Use --cmd .... This commands are executed before vimrc is loaded. So the variable should be set at the time vimwiki is initializing. Untested: gvim --cmd "let g:vimwiki_list = [...

2

vimgrep There is a command called vimgrep (see :h :vimgrep) that is a native grepping utility built into vim. To search for a pattern in every wiki files in a directory, assuming the wiki files have .wiki extension, you would do: :vimgrep /{pattern}/[g][j] path/to/directory/*.wiki Check :h :vimgrep for info on the flags With the above command vim will ...

2

It's possible your terminal doesn't support italics. Go through this link (if you're interested in learning a little) to possibly fix your issue. Start at the paragraph with vimrc in it. I'll provide a tl;dr transcription below Transcription of above link. type this into your shell: echo -e "\e[3mfoo\e[23m" if it shows up in italics, good we're halfway ...

2

No it is not possible. Wrapping occurs on the real characters on the line and not on the concealed characters. Note, that if this would be possible, this would cause kind of "wobbling" effect just by moving/scrolling the cursor, which would be most likely unwanted and it possibly would also affect performance. There is also a issue 260 about it that was ...

2

gll indents item right. glh indents item left.

2

I have found a way to work 256 colors in windows using ConEmu, link available here for download. After setting up ConEmu, check for these conditions - Vim’s executable must be named ‘vim.exe’; Check options ‘Inject ConEmuHk’ and ‘ANSI X3.64 / xterm 256 colors’ on Features page Check option ‘TrueMod (24bit color) support’ on Colors page Edit your ‘vimrc’ ...

2

Add a function like this to you ~/.bashrc: function vimwikipage() { vim -c "VimwikiIndex" -c "VimwikiGoto $1" } Now, you can open/create a specific Vimwiki page like this:$ vimwikipage ExampleVimwikiPage Explanation This command would be essentially equivalent to the following sequence of actions: $vim \ww :VimwikiGoto ... 2 How filepaths are currently handled is problematic for the situation OP described. But additionally, given the same feature, that filepath handling also leads to the following inconsistency. Suppose I have two wiki names myWikiPrsn and myWikiWork, pointing to ~/p and ~/w respectively. If the file I'm in happens to be in a directory somewhere under ~/p, then (... 2 I haven't had time to test more than the first code-block, but the others are mostly mechanical transformations. function MyLinks(pat, strip) abort return glob(a:pat, v:false, v:true) \ ->map({_, v -> printf('[%s](%s)', fnamemodify(v, ':t:r')->substitute(printf('^%s', a:strip), '', ''), fnamemodify(v, ':t'))}) \ ->join("\n&... 1 Vimwiki also allows you to list all the tags together, with a single : separating multiple tags, such as in: :Word:Compund_Word:Other_Tag: To accomplish this replacement, you can use a :s command that will replace a sequence of whitespace with a single :, and additionally match the beginning and end of the line to insert an extra : on each end. You can ... 1 I'm guessing here but it seems you are trying to run normal mode mappings in batch mode (IOW, vim -c <cmd>). Your 2wi ... I'm assuming that refers to [count]<Leader>wi, a VimWiki mapped command in the docs...? To run such mappings you need to use the norm command (:h :norm). For example, vim -c 'norm 2\wi' if your Leader key is the default \ (... 1 The pushd won’t work because it happens in a temporary shell. You could use cd && ..., but the best (I think) is git -C dir command, which makes git run in the provided directory. 1 Vimwiki supports markdown syntax. You can use this: [example_file](Notes_0-0-0/subfolder/example_file) 1 Specifying the python version in the script like #!/usr/bin/python3 (instead of just #!/usr/bin/python) solves the problem. 1 Vimwiki uses "$" and "$" as a delimiter not "$$" and "$$". also include this in your tag, so that MathJax doesn't prompt an error. <script type="text/javascript"> window.MathJax = { tex: { inlineMath: [['$', '$'], ['\$$', '\$$']] }, svg: { ... 1 Another solution I'm playing around with (for my own minimalist wiki setup) is the following (assume all notes are in ~/notes): setlocal path+=$HOME/notes/** for any files in ~/notes (this can be done with autocommands or with ftplugins by adding note. to the filetype of any file in ~/notes, though the latter is slightly more complicated) use gf to jump ...

1

I think with vim-wiki you can set anchors (from the help): Anchors~ A wikilink, interwiki link or diary link can be followed by a '#' and the name of an anchor. When opening a link, the cursor jumps to the anchor. > [[Todo List#Tomorrow|Tasks for tomorrow]] To jump inside the current wiki file you can omit the file: > [[#Tomorrow]] See |...

Only top voted, non community-wiki answers of a minimum length are eligible