Posts

Showing posts with the label Markdown

Markdown in VSCode, Vim emulation, and navigating between sections

Image
Table of Contents 1. Introduction 2. Vim in VSCode 3. Step-by-Step guide to entering the configuration 4. Native Navigation in VS Code: Go to Symbol / Title ( Ctrl + Shift + O ) 5. The Sidebar: “Outline” Panel 6. The Top Address Bar (Breadcrumbs) 7. Conclusions 1. Introduction Visual Studio Code is an excellent editor for Markdown. There are various built-in features in the editor that allow you to navigate quickly through the structure of Markdown documents. Additionally, for those familiar with VIM who have set up VSCode to emulate that editor, it’s also possible to configure a simple setup to use square bracket navigation. Let’s start with this method of jumping between sections using VIM emulation in VSCode. 2. Vim in VSCode For those familiar with Vim or who use modal editing, the speed of navigating through text is essential (as I discussed in detail in the article on Vim Beyond Vim ). To enable modal editing in VS Code, you can use the V...

A Python program to copy text from various PDFs and collect it into a single document in Markdown language.

Image
1. Subject of this article. 2. Python source analysis. 3. The full source code in Python. 1. Subject of this article. The goal is to generate a simple program to collect the text contained in various PDFs generated directly from word processing programs and insert the various fragments into a single document in Markdown language by separating the fragments with second-level headings corresponding to the name of the source documents. The "hands-on" solution is to copy the text from the individual documents, one by one, and paste it into a second document. Or you could build a simple application in Python that does all the work automatically, saving an amount of time directly proportional to the number of documents to be processed. The script , generated with the help of Copilot ( because I am not a programmer), requires the installation of the PyPDF2 library. Warning: this article does NOT discuss optical character recognition (OCR). For that topic, yo...

Markdown with Vim, Emacs, Sublime Text 4 and Visual Studio Code

Image
Abstract: How are four generalist editors, i.e., designed to be used with a wide range of programming languages and text files, performing when writing documents in Markdown language? This is the subject of this article based on my personal experiences in using Vim, Emacs, Sublime Text 4 and Visual Studio Code both directly and with extensions dedicated to the above mentioned markup language. 1. Introduction. 2. Vim and Markdown. 2.1. Vim without plugins . 2.2. Vim with the plugin vim-markdown. 2.3. Vim with the plugin UltiSnips. 2.4. Vim and Markdown preview. 3. Emacs and Markdown. 3.1. Emacs without plugins . 3.2. Emacs with markdown-mode . 3.3. Emacs and preview in Markdown. 4. Sublime Text 4 and Markdown. 4.1. Sublime Text 4 without plugins . 4.2. Sublime Text 4 with the plugin "MarkdownEditing". 4.3. Sublime Text 4 and preview in Markdown. 5. Visual Studio Code and Markdown. 5.1. VSCode without plugins 5.2. VSCode with ...

Vim and the Markdown preview

Image
1 Preamble 2 Previewing Vim in Markdown with the “Livedown” plugin 3 Previewing Vim in Markdown with the “Vim Markdown Preview” plugin 4 Simple solution without plugins 1 Preamble Vim is an excellent editor for Markdown, both for its own “native” features and for the possibility of adding specific functions via “plugins.” Previewing documents requires, unless you use the “manual” solution mentioned at the end of this article, using a dedicated “plugin.” Until a few years ago, my favorite was “ iamcco/markdown-preview.vim ” because it provided a true real-time live effect while typing text, even before periodic saving. Unfortunately, that project has been abandoned since February 2020. However, there are interesting alternative solutions that are the subject of these notes. The operating system predominantly used for this article is Arch Linux but there are indications for other GNU/Linux distributions as well. 2 Previewing...

Converting from Org Mode to Markdown GFM

Image
Converting from Org Mode to Markdown GFM Table of Contents 1. Does it make sense to talk about Org Mode instead of Markdown? 2. The export problems 3. Some examples to make it clearer 4. The solution: export from Org-Mode to Markdown via Pandoc with GFM option. 5. The special case of exporting code blocks. 1. Does it make sense to talk about Org Mode instead of Markdown? Why should I use Org-Mode to write articles to be published network in Markdown format? Wouldn't it be more convenient to write the articles directly in Markdown? The question is more than justified and the answer is not obvious. First, let me remind you that Org-Mode is a mode of GNU/Emacs. While there are various plugins for other editors, including Vim, none of them can match the outstanding efficiency of the original system. So: to write in Org-Mode, it's best to must use GNU/Emacs. Org-Mode is a complete and extremely powerful structured writing system, alth...

Markdown in Firefox

Image
Abstract Use Mozilla Firefox as a Markdown documents viewer written on Linux Ubuntu, Fedora and Arch, with mention of MS Windows and macOS. Mozilla Firefox and the Markdown layout Mozilla Firefox, one of the best Internet browsers, does not natively read documents written in Markdown. If you try to open a document written in Markdown, the browser asks whether it should save it locally or open it with an application among those offered by the operating system. But it doesn’t render the document. It is necessary, therefore, to use an add-on plugin to view a Markdown document in rendered mode within the navigator. An excellent plugin is Markdown Viewer Webext . In addition to displaying content written in Markdown, the component makes available a pop-up table of contents that also allows you to choose the style ( default and github ) and download the HTML version of the document locally. I did, however, have some problems to install the component under GNU/Linux, especially on...

Vim, Markdown, Snippets, UltiSnips: how to get a well-formatted link with a single command

Image
Vim, Markdown, Snippets, UltiSnips: how to get a well-formatted link with a single command Table of Contents 1. Objective of this post 2. An interesting solution found on the net 3. My solution 4. A simple animation 1 Objective of this post The objective of this post is to get a correctly formatted link in Markdown by merging in a single command a fragment of text and an Internet address previously saved in the Vim clipboard. Of course I assume that everybody that's reading this post knows how to create a well formatted link in Markdown, i.e. text in square brackets and URL in round brackets. Why did I ask myself this question? Very simple: I noticed that in "the-other-side-of-the-moon-called-Emacs" the link construction from a region (i. e. a selected text) is immediately available (markdown-mode, C-c C-l ) whereas in the honza list, which is used by Vim UltiSnips plugin, the same function is not among the presets. ...