this post was submitted on 06 Oct 2023
10 points (100.0% liked)

Neovim

496 readers
1 users here now

Neovim is a modal text editor forked off of Vim in 2014. Being modal means that you do not simply type text on screen, but the behavior and functionality of the editor changes entirely depending on the mode.

The most common and most used mode, the "normal mode" for Neovim is to essentially turn your keyboard in to hotkeys with which you can navigate and manipulate text. Several modes exist, but two other most common ones are "insert mode" where you type in text directly as if it was a traditional text editor, and "visual mode" where you select text.

Neovim seeks to enable further community participation in its development and to make drastic changes without turning it in to something that is "not Vim". Neovim also seeks to enable embedding the editor within GUI applications.

The Neovim logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 3 years ago
MODERATORS
 

Hello Everyone,

i'd like to ask for your opinion on the following issue:

i've created my own knowledge base based on asciidoc, with some custom shell scripts and a go application for creating backlinks, tags etc. I've chosen this way, as most solitions are based on markdown, which is not standarized and very limited compared to asciidoc, especially from a dev pov.

All my editing, searching etc. is done via neovim, which is very comfortable.

However, i'd like to improve the user experience with the setup, as i'd also like to see the rendered version, especially when adding mermaid diagrams and other things.

I've tried some plugins for the browser, which render the view and update automatically, however they are not in sync with my nvim, so i have to scroll on every save, if i want to see the rendered version. That's not ideal.

Any ideas?

Ideally I'd like some kind of application template, where i can embed a terminal / neovim and a webbrowser, ideally linked via lua scripting, so it integrates nicely. It can also be a completely separate application like anytype, however i've not seen anything that has a proper vim-like module editing support & allows for asciidoc rendering instead of markdown.

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 9 months ago (1 children)

Any ideas?

Pandoc allows conversion from and to various formats. You could use an autocmd to generate a rendered version of your document and access this version with your web browser. In your browser you could use an extension that automatically refreshes a tab every x seconds.

Would be a very manual and not-so-elegant variant, but hey :)

[–] [email protected] 1 points 9 months ago

The conversion is not an issue, there are already multiple tools for that, including a browser plugin with auto refresh.

However the tight integration with the editor, in this case neovim, is missing. At the bare minimum it should show the changed area curently being edited, ideally scroll with the editor scrolling like with common markdown extensions. Currently it just shows a static site that refreshs.

[–] humdrumgentleman 1 points 9 months ago (1 children)

Prescript: I am by no means a programmer, and input to follow is likely useless.

Have you looked at Markdown plugins that otherwise align with what you are looking for to see if there are usable approaches to be adopted? Or maybe even contribute a PR to one of those projects for Asciioc support?

In any case, I recently fell in love with Asciioc and selfishly hope you are successful!

[–] [email protected] 2 points 9 months ago

I had a similar idea, however i haven't seen a markdown plugin, that is well maintained and at the same time simple enough, so that the core, in this case markdown, can easily be replaced with a completely different engine, asciidoctor.

Any recommendations for that?

I also thought about changing neorg, but the missing support for treesitter is a k.o. for asciidoc.