在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):seth-brown/formd开源软件地址(OpenSource Url):https://github.com/seth-brown/formd开源编程语言(OpenSource Language):TypeScript 85.3%开源软件介绍(OpenSource Introduction):formd: a markdown formatting tool
Installationnpm install -g @seth-brown/formd If the default location npm installs packages to isn't in your path, you may need to add it to your path. For example: echo 'export PATH="$HOME/.node/bin:$PATH"' >> ~/.zshrc MotivationInline Markdown is difficult to read, but useful for writing and editing because the linked text and URLs are adjacent to the words you are writing. For example: The quick brown [fox](http://en.wikipedia.org/wiki/Fox) jumped over the lazy [dog](http://en.wikipedia.org/wiki/Dog). Referenced Markdown is awkward while writing because it requires jumping between links within the text and the reference section of the document. However, referenced Markdown is the superior syntax for reading because URLs do not breakup the flow of words or sentences. For example: The quick brown [fox][1] jumped over the lazy [dog][2].
Usage
For help:
To generate referenced Markdown use the -r flag: formd -r < <(echo "a line of text\na link with a [link]('www.foo.com')") To generate inline Markdown use the -i flag: cat my-markdown.md | formd -i Usage with Text Editors
:%! formd -r An easier approach is to use a function to execute " a function to execute `formd` and return the cursor back
" to it's original position within the buffer.
" This script assumes `formd` is in your path.
function! Formd(option)
:let save_view = winsaveview()
:let flag = a:option
:if flag == "-i"
:%! formd -i
:else
:%! formd -r
:endif
:call winrestview(save_view)
endfunction
" formd mappings
nmap <leader>fr :call Formd("-r")<CR>
nmap <leader>fi :call Formd("-i")<CR> Usage with App Launchers
Release History
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论