Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [filetype-markdown]

The tag has no usage guidance.

0
votes
1answer
27 views

Finding Markdown image tags with regular expressions (E486)

I have a document that contains lines like ![My title](/path/to/image.jpg) This is the format for images in Markdown. I have constructed a regular expression which I believe should be able to find ...
0
votes
1answer
15 views

markdown html-element syntax highlighting fails when line has leading spaces

For some reason, my html elements stop being highlighted when they are preceded by 4 or more spaces. I use spaces to do indentation for nested elements, so this is quite unfortunate. This only ...
1
vote
2answers
38 views

Generating automated bullets and numbered lists with markdown

I'm looking for a good way to generate lists that are automatically bulleted. I tried the markdown plugin. It generates bullets automatically but not numbered lists. I also tried the vim-pandoc plugin ...
3
votes
1answer
45 views

Vim RegEx question: how to detect headings of markdown(.md) i.e. lines composed of '-' or '='

I'm learning Vimscript in Learn Vimscript the Hard way and trying an exercise. Here is this: The lines "underlined" with = characters are treated as headings by Markdown. :onoremap ih :<c-u>...
1
vote
0answers
20 views

My C like Comments include markdown, can I have vim highlight those in my JavaScript (Node.js) code? [duplicate]

I write a lot of C/C++ and get highlighting for my Doxygen docs in my comments. It's not perfect, but it sure helps avoiding many very simple mistakes on the spot. To handle that, I simply have the ...
1
vote
1answer
222 views

Make Vim stop highlighting certain underscores in my Markdown as errors

I'm using Kramdown-flavored Markdown in several of my Jekyll websites. Vim highlights all the underscores in those documents as errors, coloring them (in my color scheme) with bright red backgrounds. ...
1
vote
2answers
36 views

How to copy all non-alphanumeric characters at the begining of the line to the next line?

I want to implement something similar to Org mode M-RET into neovim. In Org mode it creates new list item or heading depending on what line the point is on. I'm thinking of a mapping in neovim that ...
1
vote
2answers
127 views

How can I turn off syntax highlighting for one specific element?

I'm editing pandoc markdown text with inline math. Since that uses underscores, vim will helpfully highlight everything after the first underscore, but there will be no matching one. How can I turn ...
3
votes
1answer
125 views

How to conceal Markdown syntax per-word, rather than per-paragraph?

I want to use Vim to write markdown in a sort-of-WYSIWYG manner (for use with an audience). For example, typing **Bold** should display Bold in bold font, with the asterisks automatically hidden as ...
3
votes
1answer
103 views

vim specific indentation for markdown

I want the indentation in markdown file as follows - [ ] Here is some text. When I press enter - [ ] <--- This entire thing should get populated. It means - [ ] should be copied onto the next ...
1
vote
1answer
532 views

Mardown files always have vimwiki filetype (vimwiki plugin)

Here is the relevant content of my .vimrc let g:vimwiki_global_ext=0 let g:vimwiki_list = [{'path': 'C:\Users\<USER>\vimwiki', \ 'syntax': 'markdown', 'ext': '.md'}] The ...
0
votes
1answer
265 views

Syntax highlight Markdown formulas using LaTeX highlighting

I often write non-trivial mathematical formulas inside Markdown documents, and having them syntax-highlighted would really help. In Markdown, LaTeX math formulae are denoted: $x^2$ and $$x^2$$, and ...
1
vote
0answers
35 views

Why are my bulleted lines automatically joining?

I use the a formatoption to make my text hard wrap, and the n formatoption to recognize numbered lists. The help says that the n option should use the formatlistpat regex to determine which lines not ...
2
votes
0answers
70 views

How to stop vim from reformatting lines inside a codeblock in a markdown file?

I keep the a formatoption in vim when I'm modifying markdown files, so my lines are automatically kept to textwidth characters long, with automatic reformatting when I modify text. How can I make ...
1
vote
2answers
627 views

How to show math equations or formula in markdown file

I like to write notes in markdown file. Most of the times my notes are about coding, but sometimes I need to write some math equations or symbols. I would like to see the equations directly in the vim,...
1
vote
0answers
308 views

Viewer for Markdown/MathJax rich text editing in vim/neovim?

Problem Statement Currently I use VIM in a terminal to write code. All my notes are on Microsoft Word 365, which I have been using for a long while. I tried using markdown recently, used VIM to ...
7
votes
3answers
438 views

Paste link to image in clipboard when editing Markdown

I have an image on the clipboard and I want to paste it into my document as the text [](img/image1.png). Instead of first copying it to that directory, I want to do it with a single p key press in ...
0
votes
2answers
469 views

No folding of markdown files

Running neovim 0.1.7. When I open a markdown file, it does not fold - even when I try zM zR zc, etc. :set tells me ft=markdown and foldmethod=syntax How do I get the folding?
1
vote
1answer
768 views

No italics in vim

I am using vimwiki on nvim 0.1.7 on Konsole 16.12.3 on Plasma 5.9.5 on Kubuntu 17.04. Wiki text appears bold when it is between two stars. But when between two underscores, it does not appear in ...
1
vote
2answers
124 views

Automatically add '>' at beginning of line following one starting with '>' when writing Markdown

When writing block quotes Markdown, I want to make vim act the same way it does with comment leaders and automatically start new lines with the '>'. I also want to be able to format text this way with ...
4
votes
3answers
187 views

How to decrease markdown header level in visual mode without a plugin?

I have a file like this: # Heading A ### Heading B1 lorem ipsum ### Heading B2 lorem ipsum and I want to reduce the header levels of B1 and B2 to look like this: # Heading A ## Heading B1 ...
2
votes
2answers
65 views

Adding Atex Markdown Headers in Vim

Is there a way to make it so that This is a header =<tab> converts into This is a header ================ in all files who filetype is markdown?
6
votes
4answers
1k views

Markdown in Neovim: which plugin sets conceallevel=2?

I'm experiecing the most annoying thing ever: when I edit a markdown file, asterisk characters are hidden by default. If I set on an open buffer :set conceallevel=0, asterisks shows up as they should,...
2
votes
0answers
94 views

Prevent Vim from breaking up inline code blocks in (r)markdown

I edit R-markdown files a lot, and this entails writing inline code blocks, such as `r sum(mylongvectorname)` I usually have my text hard-wrapped at 80 chars, and this causes problems for the ...
3
votes
1answer
131 views

prevent neovim from breaking one markdown bullet point into multiple ones

I have this markdown text: * Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown ...
1
vote
1answer
104 views

markdown spell checking with triple nested bullet point

I am confused about what is going on in this example and why spell checking is not working any help is appreciated. While editing a markdown file with spell checking enabled the following happens: * ...
8
votes
2answers
2k views

automatically rewrap lines when writing markdown in VIM

Very often, I write markdown in VIM, and there will be paragraphs in those markdown. To help my editing, I setup my Vim to wrap a line on 80 chars. It works nice if I just keep typing, but the problem ...
2
votes
2answers
157 views

How do I make regexes mutually contain each other?

I've written regexes for markdown for emphasis and bold as follows: syntax match PandocEmphasisMarker "\v(^|\s+)\zs_[^\n\t_ ]+([^_\n]|(\S_\S)|(\s_\S)|(\s+_\s+))+[^\n\t_ ]+_\ze($|\s+)" contains=...
3
votes
1answer
168 views

Vim-Markdown-Folding plugin error BufEnter E117

Inspired by Drew NEIL's course and the 'nested-folding' feature for Markdown files, I've installed the Vim-Markdown-Folding plugin, on my Vim (:version). The GitHub directory was copied into the ~/....
3
votes
1answer
320 views

Line formatting (gq) does not correctly indent long list items

I want to wrap my text to 79 characters, I do that using the gq command. For most filetypes this works just fine and indents following lines. With Markdown, however, it does the following: The ...
3
votes
2answers
4k views

How to fold markdown using the built-in markdown mode?

Looking at the ftplugin file for markdown in Vim, it certainly appears that folding is supported, but I cannot get folding to work. If I have some content like this: # A heading Some content. More ...
2
votes
2answers
279 views

Open markdown filename under cursor like gf, and jump to the section?

I have the file /path/a.md which has many sections as follows: # abc this this the content of section abc # def this this the content of section abc ## defg this this the content of subsection defg ...
7
votes
1answer
2k views

How to preview the result of markdown file edited in vim?

I use vim to edit latex, but latex is bit too heavy for taking notes casually on daily basis, so I decided to use markdown instead. So, I want to configure vim so that I could view markdown ...
2
votes
1answer
91 views

automatic text wrapping messed up with parenthesis

I like to wrap my text to 80 characters all the time, even when I am editing Markdown. I have a problem when I open parentheses: it doesn't wrap right anymore. Since it is hard for me to explain it, ...
4
votes
1answer
282 views

Vim Pandoc & Headers

When using vim-pandoc, I'm having some funny behavior with headers: For instance, if I position the cursor on a word and press v-a-w and then <localleader> - i, I get italics. if I position ...
2
votes
2answers
414 views

Pandoc and formatting

I'm using the vim-pandoc and vim-pandoc-syntax bundles in neovim. I'm converting the markdown to a docx file and I'm seeing that I need to do a double space in order to get a carriage return in the ...
1
vote
1answer
69 views

Can I restrict :s to a particular substring of a line?

I ran into this doing a quick conversion of markdown into JIRA markdown. - A standard markdown list - hierarchical - easy to read - tidy - A JIRA markdown list -- Hierarchical -- Somewhat ...
2
votes
0answers
520 views

Turn off markdown highlighting for underscores in inline code?

Markdown highlighting is great (when it works), but I've seen a problem on two different boxes with underscores in inline code and I'm wondering if there's an easy solution. When I put, for instance, ...
5
votes
2answers
511 views

Indent a markdown list item?

I am frequently editing markdown files, and when dealing with multi-line items in hierarchical lists, it would be great to have a rapid way to indent or un-indent a list item. For example, how can I ...
8
votes
1answer
661 views

NeoVim hides the * chars when editing markdown

I am using tpope's vim-markdown plugin to edit markdown files. Somehow, neovim hides the _ and * chars and changes the text in between to italic or bold depending on quantity of chars. I want to see ...
16
votes
5answers
875 views

Replace a series of asterisk bullet points with a numbered list

Imagine I have the following text: some random stuff * asdf * foo * bar some other random stuff I want to replace the asterisk bullets with numbers, like so: some random stuff 1. asdf 2. foo 3. bar ...
5
votes
2answers
424 views

How do I make Vim respect Markdown headers when formating text?

I want to use the combination gggqG to go to the top of the file and format the whole file from there, so that it fits into my 80 col textwidth border. But when I do, vim ignores my markdown headers. ...
2
votes
4answers
873 views

Why is autoindent not applied to my markdown files?

When editing markdown (*.md) formatted files, and making bullet points, upon pressing return I want the new bullet point to be automatically created in the same level under the previous one. ...
4
votes
2answers
231 views

Why does Vim load unrelated ftplugins?

When I open a file with .md extension, the filetype is set to markdown, as expected. But the ftplugin for HTML is also loaded as I can see since I have some insert mode mappings in there to auto-...
8
votes
2answers
3k views

Markdown: how to syntax-highlight Bold and Italic in different color than normal text?

Text marked as__bold__ or _italic_ appears in the same color as normal text. Headings and code do show up in different colors, so vim correctly recognizes the file as markdown. This is no matter ...
1
vote
2answers
470 views

How to make vim to automatically break lines in markdown files?

I'm using vim and markdown for note taking. Sometimes I find some useful information online, so I'll copy and paste into vim like below: useful information line1 useful information line2 useful ...
5
votes
1answer
509 views

Highlight double space in markdown

When writing markdown, a double space at the end of a line indicates a line break. Currently, neither single trailing whitespaces nor double-whitespaces are being highlighted. Is it possible to have ...
3
votes
2answers
185 views

write a key command for a markdown comment

I've been messing about with file type specific commands this evening (which is going to be very useful) and I'm trying to write a markdown comment command at the moment. I'm not sure how to go about ...
16
votes
1answer
216 views

Prevent Vim from breaking up links mid-tag in markdown

Let's say I have this Markdown file: [Lorem ipsum dolor sit ](http://vi.stackexchange.com/many-links-are-often-very) Lookin' good. But the link isn't finished it, so I type -long, and now Vim breaks ...