avataralpha2phi

Summary

This context provides a comprehensive guide to using Neovim for note-taking, writing, diagramming, and presentation, including a list of relevant plugins and tools.

Abstract

The context discusses the use of Neovim, a powerful text editor, for various tasks such as note-taking, writing, diagramming, and presentation. It begins by recapping the plugins mentioned in previous articles, such as VimWiki, vim-bujo, todo.txt-vim, neuron.nvim, vim-dotoo, Taskwarrior + VimWiki + TaskWiki, Neorg, nvim-orgmode, telekasten.nvim, mind.nvim, and Obsidian.nvim for note-taking, and markdown-preview.nvim, glow.nvim, vim-instant-markdown, and peek.nvim for Markdown preview. It also introduces new plugins and tools for scientific note-taking, writing, and presentation, such as nabla.nvim, goyo.vim, TrueZen.nvim, zen-mode.nvim, vim-markdown, vim-markdown-toc, glow.nvim, markdown-preview.nvim, vim-livedown, peek.nvim, vim-tex, vim-latex-live-preview, vim-grammarous, vim-LanguageTool, LanguageTool.nvim, ALE, vim-table-mode, vim-pandoc, vim-pencil, vim-abolish, HighStr.nvim, presenting.vim, Vim + Pandoc + reveal.js, Slidy, Mermaid.js, PlantUML, vim-diagram, plantuml-syntax, venn.nvim, vim-boxdraw, asciitree.nvim, ascii-blocks.nvim, vim-translator, pantran.nvim, mkdnflow.nvim, and ascii.nvim. The context also provides examples and code snippets for using these plugins and tools.

Bullet points

  • Neovim is a powerful text editor that can be used for note-taking, writing, diagramming, and presentation.
  • The context recaps the plugins mentioned in previous articles for note-taking and Markdown preview.
  • New plugins and tools are introduced for scientific note-taking, writing, and presentation.
  • Examples and code snippets are provided for using these plugins and tools.
  • The context also discusses the use of 3rd-party tools like Mermaid.js and PlantUML for diagramming.
  • Other approaches for diagramming, such as code-based diagramming and text-based diagramming using Vite and Mermaid, are also discussed.
  • The context provides examples and code snippets for using these approaches.
  • The context also discusses the use of Neorg for presentation and the integration of Slidev and lookatme for presentation.
  • Other plugins, such as vim-translator, pantran.nvim, mkdnflow.nvim, and ascii.nvim, are also discussed.
  • The context provides examples and code snippets for using these plugins.
  • The context concludes by providing references to other resources for learning more about Neovim.

Neovim for Beginners— Note Taking, Writing, Diagramming, and Presentation

Explore plugins for note-taking, writing, diagramming, and presentation.

Neovim for Beginners — Note Taking, Writing, Diagramming, and Presentation

Vim/Neovim is a great tool for note-taking and writing. In this article, we will recap the relevant plugins mentioned in the previous articles, and go through new plugins, tools, and tricks for note-taking, writing, diagramming, and presentation.

This article is part of the Neovim for Beginners series.

The Neovim configuration files can be found in this repository.

Getting Started

Besides coding, Neovim is a great tool for note-taking and writing. In several past articles, we walked through the plugins that could help us. Let’s recap before we explore other useful plugins and tools.

Note Taking

In the Vim/Neovim — Managing Notes and Todo List article, we talked about the following plugins.

  • For note-taking, we can use VimWiki, vim-bujo, todo.txt-vim, neuron.nvim, vim-dotoo, Taskwarrior + VimWiki + TaskWiki, Neorg, nvim-orgmode, telekasten.nvim, mind.nvim, Obsidian.nvim.
  • For Markdown preview, we can use markdown-preview.nvim, glow.nvim, vim-instant-markdown, peek.nvim.

Scientific Note Taking

For scientific note-taking, we can use nabla.nvim.

Writing

In the Vim/Neovim Plugins for Writing article, we talked about the following plugins.

  • For focused writing, we can use goyo.vim, TrueZen.nvim, zen-mode.nvim.
  • For writing in Markdown and previewing, we can use vim-markdown, vim-markdown-toc, glow.nvim, markdown-preview.nvim, vim-livedown, peek.nvim.
  • For writing in Latex we can use vim-tex, vim-latex-live-preview.
  • For grammar checking, we can use vim-grammarous, vim-LanguageTool, LanguageTool.nvim, ALE.
  • Other useful plugins for writing like vim-table-mode, vim-pandoc, vim-pencil, vim-abolish, HighStr.nvim.

Presentation

In the Using Vim/Neovim for Presentation article, we talked about the following plugins.

  • For presentation, we can use presenting.vim, Vim + Pandoc + reveal.js, Slidy.

Diagramming

For diagramming, we can leverage 3rd-party tools like Mermaid.js, or use plugins to draw diagrams within Neovim.

Mermaid.js, PlantUML

We can create diagrams in Markdown using Mermaid.js or PlantUML, and view them using markdown-preview.nvim or peek.nvim.

For example, we create the following diagrams using Markdown and preview them in the browser.

# Diagrams
## Mermaid Diagram
```mermaid
graph LR
  A[Start] --> B{Error?};
  B -->|Yes| C[Hmm...];
  C --> D[Debug];
  D --> B;
  B ---->|No| E[Yay!];
```
## PlantUML Diagram
```plantuml
Bob -> Alice : hello
```
Diagramming using Mermaid.js and PlantUML

For syntax highlighting, we can use the syntax plugins for Mermaid.js and PlantUML.

To install the plugins using packer.nvim.

-- Markdown
use {
  "iamcco/markdown-preview.nvim",
  run = function()
    vim.fn["mkdp#util#install"]()
  end,
  ft = "markdown",
  cmd = { "MarkdownPreview" },
  requires = { "zhaozg/vim-diagram", "aklt/plantuml-syntax" },
}
  • vim-diagram is a syntax plugin for Mermaid.js diagrams. The file type must be set to sequence or the file extensions must be in *.seq, or *.sequence.
  • plantuml-syntax is a syntax plugin for PlantUML diagrams. The file type must be set to plantuml, or the file extensions must be in .pu,*.uml,*.plantuml,*.puml,*.iuml.

Other Plugins

  • venn.nvim — A plugin to draw ASCII diagrams.
  • vim-boxdraw — A plugin to draw ASCII boxes.
  • asciitree.nvim — A plugin to convert selected text into an ASCII tree.
  • ascii-block.nvim — A plugin to quickly convert ASCII boxes into more visually appealing extended UTF-8 boxes.

Other Approaches

For other approaches, check out the following articles.

Presentation

Neorg

We talked about the Neorg plugin in a previous article. It supports presentation mode now using the Zen mode plugins.

For example, we configure this plugin using packer.nvim.

We can either use the zen-mode.nvim, or TrueZen.nvim plugin.

Presentation using Neorg

Slidev

In the Presentation — The Developer’s Way article, we talked about Slidev which is a web-based slides maker and presenter.

There is no editor plugin available for Neovim. However, we can define the key mapping to start the browser to preview the content. Any changes we make can be viewed immediately in the browser.

For example, in the lua/config/whichkey.lua file, we define the key mapping (<leader>pP) to start the Brave browser to view the slides using toggleterm.nvim.

keymap_p = {
name = "Project",
P={ "<cmd>TermExec cmd='BROWSER=brave yarn dev'<cr>", "Slidev" },
    
Presentation using Slidev

LookatMe

Using a similar trick, we can integrate the lookatme command-line Markdown presenter.

For example, we can use the command vsplit term://lookatme % --live to preview and live reload the current Markdown slide.

Presentation using lookatme

Notes:

  • Another similar command-line Markdown presenter to try is patat (Presentations Atop The ANSI Terminal).
  • Install the utility and we can use the command vsplit term://patat % --watch for presentation.

Other Plugins

vim-translator

vim-translator comes in handy when we need to translate text in the current document.

To install it usingpacker.nvim.

Translation

pantran.nvim

Another great translator plugin is pantran.nvim. It makes use of Neovim’s api-floatwin to implement an asynchronous, interactive machine translation interface, similar to how most of the various machine translation web frontend work.

To install it using packer.nvim.

use {
  "potamides/pantran.nvim"
}
pantran.nvim

Alternatively, in the Neovim for Beginners — Remote Plugins article, we use Python to develop a translator plugin.

mkdnflow.nvim

mkdnflow.nvim is designed for the fluent navigation of notebooks/journals/wikis written in Markdown.

It is a set of functions and mappings to those functions which make it easy to navigate and manipulate Markdown notebooks/journals/wikis in Neovim.

To install it using packer.nvim.

use {
  "jakewvincent/mkdnflow.nvim",
  config = function()
    require("mkdnflow").setup {}
  end,
  ft = "markdown",
}

In the screenshot below, we use the provided key mappings to increase or decrease the heading and create a link for the current word under the cursor.

mkdnflow.nvim

ascii.nvim

ascii.nvim provides a curated collection of ASCII art and utilities for your Neovim dashboard.

ascii.nvim

Do check out other plugins from Awesome Neovim.

Check out Learn Neovim The Practical Way for all the Vim/Neovim articles!

If you are not a Medium member yet and want to become one, click here (A part of the subscription fee will be used to support alpha2phi).

References

Vim
Coding
Programming
Software Development
Software Engineering
Recommended from ReadMedium
avatarAI Rabbit
Goodbye Obsidian

7 min read