Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phelipetls/vim-hugo
Vim plugin for web development with static site generator Hugo
https://github.com/phelipetls/vim-hugo
hugo vim
Last synced: about 2 months ago
JSON representation
Vim plugin for web development with static site generator Hugo
- Host: GitHub
- URL: https://github.com/phelipetls/vim-hugo
- Owner: phelipetls
- License: mit
- Created: 2020-07-24T03:41:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-20T13:48:27.000Z (7 months ago)
- Last Synced: 2024-08-07T18:46:40.375Z (5 months ago)
- Topics: hugo, vim
- Language: Vim Script
- Homepage:
- Size: 159 KB
- Stars: 33
- Watchers: 1
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-hugo
This is a Vim plugin for web development with the static site generator
[Hugo](https://gohugo.io/).# HTML
- syntax highlighting and identation is improved to support the HTML Go
template syntax.
- `:h path` includes default directories used by Hugo, like `layouts/partials`,
which is convenient to start editing files with `:h gf` and friends.
- `matchit` patterns are extended to support Go template.
- A compiler plugin is made available so you can build your website from inside
Vim with `compiler hugo | make`, and build errors will populate the quickfix
list.# Markdown
Markdown syntax highlight is also improved to add support for shortcodes and
YAML front matter.Embedded languages inside the `{{< highlight >}}` shortcode will be
highlighted. For example, to highlight Python code, add `let
g:markdown_fenced_languages=['python']` to your `.vimrc` or `init.vim`.```markdown
{{< highlight python >}}
import foo
{{< /highlight >}}
```If you want to highlight JavaScript code with `js` as a shorthand, use `let
g:markdown_fenced_languages=['js=javascript']`:```markdown
{{< highlight js >}}
import { bar } from './foo'
{{< /highlight >}}
```This is reused from Vim's built-in syntax files for markdown, so it'll also be
used for markdown code blocks.